/* ============================================================
   WagonToGo – Hoofd stylesheet
   Design: Modern dark green + warm cream, premium to-go feel
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=Playfair+Display:wght@700&display=swap');

/* ── Custom Properties ──────────────────────────────────────── */
:root {
    --green-900: #0d2b1a;
    --green-800: #1a4230;
    --green-700: #26603f;
    --green-600: #2d7a4f;
    --green-500: #34a05f;
    --green-400: #4dc87a;
    --green-100: #d4f5e2;
    --cream-100: #fdf9f0;
    --cream-200: #f5efe0;
    --cream-300: #e8dcc8;
    --orange:    #f4803a;
    --red:       #e53935;
    --yellow:    #f6b93b;
    --blue:      #2196f3;
    --white:     #ffffff;
    --gray-50:   #f9fafb;
    --gray-100:  #f3f4f6;
    --gray-200:  #e5e7eb;
    --gray-400:  #9ca3af;
    --gray-600:  #4b5563;
    --gray-900:  #111827;

    --shadow-sm:  0 1px 3px rgba(0,0,0,.10), 0 1px 2px rgba(0,0,0,.06);
    --shadow:     0 4px 12px rgba(0,0,0,.10);
    --shadow-lg:  0 10px 30px rgba(0,0,0,.12);
    --radius:     10px;
    --radius-lg:  18px;
    --transition: 0.2s ease;
    --font:       'Inter', system-ui, sans-serif;
    --font-head:  'Playfair Display', Georgia, serif;
}

/* ── Reset ──────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 16px; scroll-behavior: smooth; }

body {
    font-family: var(--font);
    background: var(--cream-100);
    color: var(--gray-900);
    line-height: 1.6;
    min-height: 100vh;
}

a { color: var(--green-600); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--green-500); }

img { max-width: 100%; height: auto; display: block; }

/* ── Typography ─────────────────────────────────────────────── */
h1, h2, h3, h4 { font-weight: 700; line-height: 1.2; }
h1 { font-size: clamp(1.6rem, 4vw, 2.4rem); }
h2 { font-size: clamp(1.3rem, 3vw, 1.8rem); }
h3 { font-size: 1.2rem; }

.font-display { font-family: var(--font-head); }

/* ── Layout ─────────────────────────────────────────────────── */
.container { max-width: 1200px; margin: 0 auto; padding: 0 1.5rem; }
.container-sm { max-width: 720px; margin: 0 auto; padding: 0 1.5rem; }
.section { padding: 2.5rem 0; }

/* ── Navbar (Public) ─────────────────────────────────────────── */
.navbar {
    background: var(--green-900);
    color: var(--white);
    padding: 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow);
}
.navbar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
    gap: 1rem;
}
.navbar-brand {
    font-family: var(--font-head);
    font-size: 1.5rem;
    color: var(--green-400);
    letter-spacing: -.5px;
}
.navbar-brand span { color: var(--cream-100); }
.navbar-nav {
    display: flex;
    align-items: center;
    gap: .25rem;
    list-style: none;
}
.navbar-nav a {
    color: rgba(255,255,255,.85);
    font-size: .9rem;
    font-weight: 500;
    padding: .4rem .85rem;
    border-radius: var(--radius);
    transition: all var(--transition);
}
.navbar-nav a:hover,
.navbar-nav a.active { background: rgba(255,255,255,.1); color: var(--white); }
.navbar-nav .btn { margin-left: .5rem; }
.navbar-cart-badge {
    background: var(--orange);
    color: var(--white);
    border-radius: 999px;
    font-size: .7rem;
    font-weight: 700;
    padding: 0 .4rem;
    margin-left: .2rem;
}

/* ── Admin/Employee layout (body.admin-layout) ──────────────── */
.admin-layout {
    display: flex;
    min-height: 100vh;
    overflow: hidden;
}

.sidebar {
    width: 240px;
    height: 100vh;
    background: var(--green-900);
    color: var(--white);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    position: fixed;
    top: 0;
    left: 0;
    overflow-y: auto;
    z-index: 100;
}
.sidebar-brand {
    padding: 1.25rem 1.25rem .75rem;
    font-family: var(--font-head);
    font-size: 1.35rem;
    color: var(--green-400);
    border-bottom: 1px solid rgba(255,255,255,.08);
    letter-spacing: -.5px;
}
.sidebar-brand span { color: var(--cream-100); }
.sidebar-nav { padding: .75rem 0; flex: 1; }
.sidebar-link,
.sidebar-nav a {
    display: flex;
    align-items: center;
    gap: .75rem;
    color: rgba(255,255,255,.75);
    padding: .65rem 1.25rem;
    font-size: .875rem;
    font-weight: 500;
    transition: all var(--transition);
    border-left: 3px solid transparent;
    text-decoration: none;
}
.sidebar-link:hover,
.sidebar-nav a:hover,
.sidebar-nav a.active {
    color: var(--white);
    background: rgba(255,255,255,.08);
    border-left-color: var(--green-400);
}
.sidebar-section-label {
    padding: 1rem 1.25rem .25rem;
    font-size: .7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .1em;
    color: rgba(255,255,255,.35);
}
.sidebar-footer {
    padding: 1rem 1.25rem;
    border-top: 1px solid rgba(255,255,255,.08);
    font-size: .8rem;
    color: rgba(255,255,255,.5);
}

.main-content {
    margin-left: 240px;  /* gelijk aan sidebar breedte */
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    min-width: 0;
    background: var(--cream-100);
}
.topbar {
    background: var(--white);
    border-bottom: 1px solid var(--gray-200);
    padding: .75rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    position: sticky;
    top: 0;
    z-index: 50;
}
.topbar-title { font-size: 1.1rem; font-weight: 700; }
.topbar-user  { display: flex; align-items: center; gap: .75rem; font-size: .875rem; color: var(--gray-600); }
.content-area { padding: 1.5rem; flex: 1; }
.page-content { padding: 1.5rem; flex: 1; }


/* ── Buttons ─────────────────────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    font-family: var(--font);
    font-size: .9rem;
    font-weight: 600;
    padding: .55rem 1.2rem;
    border-radius: var(--radius);
    border: none;
    cursor: pointer;
    transition: all var(--transition);
    text-decoration: none;
    white-space: nowrap;
}
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-primary { background: var(--green-600); color: var(--white); }
.btn-primary:hover { background: var(--green-500); color: var(--white); }
.btn-secondary { background: var(--gray-100); color: var(--gray-900); }
.btn-secondary:hover { background: var(--gray-200); }
.btn-danger { background: var(--red); color: var(--white); }
.btn-danger:hover { background: #c62828; color: var(--white); }
.btn-orange { background: var(--orange); color: var(--white); }
.btn-orange:hover { background: #e06d24; color: var(--white); }
.btn-sm { font-size: .8rem; padding: .35rem .8rem; }
.btn-lg { font-size: 1rem; padding: .75rem 1.75rem; }
.btn-outline { background: transparent; border: 2px solid var(--green-600); color: var(--green-600); }
.btn-outline:hover { background: var(--green-600); color: var(--white); }

/* ── Cards ───────────────────────────────────────────────────── */
.card {
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    transition: box-shadow var(--transition);
}
.card:hover { box-shadow: var(--shadow); }
.card-body { padding: 1.25rem 1.5rem; }
.card-header {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--gray-100);
    font-weight: 700;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.card-footer {
    padding: .75rem 1.5rem;
    border-top: 1px solid var(--gray-100);
    background: var(--gray-50);
}

/* ── Stat Cards ──────────────────────────────────────────────── */
.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}
.stat-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    box-shadow: var(--shadow-sm);
    border-left: 4px solid var(--green-500);
}
.stat-card.orange { border-left-color: var(--orange); }
.stat-card.red    { border-left-color: var(--red); }
.stat-card.blue   { border-left-color: var(--blue); }
.stat-card-label  { font-size: .78rem; color: var(--gray-400); text-transform: uppercase; letter-spacing: .05em; font-weight: 600; }
.stat-card-value  { font-size: 2rem; font-weight: 800; color: var(--gray-900); margin-top: .15rem; }

/* ── Product Grid ────────────────────────────────────────────── */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1.25rem;
}
.product-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    transition: all var(--transition);
    display: flex;
    flex-direction: column;
}
.product-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-3px);
}
.product-card-img {
    width: 100%;
    aspect-ratio: 4/3;
    object-fit: cover;
    background: var(--cream-200);
}
.product-card-img-placeholder {
    width: 100%;
    aspect-ratio: 4/3;
    background: linear-gradient(135deg, var(--green-100), var(--cream-200));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
}
.product-card-body {
    padding: 1rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: .35rem;
}
.product-card-name { font-weight: 700; font-size: .95rem; }
.product-card-price {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--green-700);
}
.product-card-availability {
    font-size: .75rem;
    color: var(--gray-400);
}
.product-card-availability.out { color: var(--red); }
.product-card-footer {
    padding: .75rem 1rem;
    border-top: 1px solid var(--gray-100);
}

/* ── Forms ───────────────────────────────────────────────────── */
.form-group { margin-bottom: 1rem; }
.form-label { display: block; font-size: .85rem; font-weight: 600; margin-bottom: .35rem; color: var(--gray-600); }
.form-control {
    width: 100%;
    padding: .6rem .9rem;
    border: 1.5px solid var(--gray-200);
    border-radius: var(--radius);
    font-family: var(--font);
    font-size: .95rem;
    background: var(--white);
    color: var(--gray-900);
    transition: border-color var(--transition), box-shadow var(--transition);
}
.form-control:focus {
    outline: none;
    border-color: var(--green-500);
    box-shadow: 0 0 0 3px rgba(52,160,95,.15);
}
.form-control::placeholder { color: var(--gray-400); }
textarea.form-control { resize: vertical; min-height: 90px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form-hint { font-size: .78rem; color: var(--gray-400); margin-top: .2rem; }

/* ── Tables ──────────────────────────────────────────────────── */
.table-wrap { overflow-x: auto; border-radius: var(--radius); }
table { width: 100%; border-collapse: collapse; font-size: .9rem; }
thead th {
    background: var(--gray-50);
    font-size: .75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: var(--gray-400);
    padding: .75rem 1rem;
    border-bottom: 2px solid var(--gray-200);
    white-space: nowrap;
}
tbody td {
    padding: .75rem 1rem;
    border-bottom: 1px solid var(--gray-100);
    vertical-align: middle;
}
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover { background: var(--gray-50); }

/* ── Badges / Status ─────────────────────────────────────────── */
.badge {
    display: inline-block;
    padding: .25rem .6rem;
    border-radius: 999px;
    font-size: .72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .04em;
}
.badge-green  { background: var(--green-100); color: var(--green-800); }
.badge-orange { background: #fde8d4; color: #c0540c; }
.badge-red    { background: #fde8e8; color: #b91c1c; }
.badge-gray   { background: var(--gray-100); color: var(--gray-600); }
.badge-blue   { background: #dbeafe; color: #1d4ed8; }

/* ── Alerts / Flash messages ─────────────────────────────────── */
.alert {
    padding: .85rem 1.25rem;
    border-radius: var(--radius);
    margin-bottom: 1rem;
    font-size: .9rem;
    font-weight: 500;
    display: flex;
    align-items: flex-start;
    gap: .75rem;
}
.alert-success { background: var(--green-100); color: var(--green-800); border: 1px solid rgba(45,122,79,.2); }
.alert-error   { background: #fde8e8; color: #b91c1c; border: 1px solid rgba(229,57,53,.2); }
.alert-warning { background: #fef9e7; color: #92400e; border: 1px solid rgba(246,185,59,.3); }
.alert-info    { background: #dbeafe; color: #1d4ed8; border: 1px solid rgba(33,150,243,.2); }

/* ── Hero (homepage) ─────────────────────────────────────────── */
.hero {
    background: linear-gradient(135deg, var(--green-900) 0%, var(--green-700) 60%, var(--green-600) 100%);
    color: var(--white);
    padding: 5rem 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}
.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 70% 50%, rgba(77,200,122,.15), transparent 60%);
}
.hero h1 { font-family: var(--font-head); font-size: clamp(2rem, 6vw, 3.5rem); margin-bottom: 1rem; }
.hero p  { font-size: 1.1rem; opacity: .9; max-width: 560px; margin: 0 auto 2rem; }

/* ── Location cards ──────────────────────────────────────────── */
.location-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1.5rem; }
.location-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 1.75rem;
    box-shadow: var(--shadow-sm);
    border: 2px solid transparent;
    cursor: pointer;
    transition: all var(--transition);
    text-align: center;
}
.location-card:hover {
    border-color: var(--green-500);
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
}
.location-card h3 { color: var(--green-800); margin-bottom: .5rem; }
.location-card p  { color: var(--gray-600); font-size: .9rem; }

/* ── Cart ────────────────────────────────────────────────────── */
.cart-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 0;
    border-bottom: 1px solid var(--gray-100);
}
.cart-item img {
    width: 72px;
    height: 72px;
    object-fit: cover;
    border-radius: var(--radius);
    background: var(--cream-200);
}
.cart-item-info { flex: 1; }
.cart-item-name { font-weight: 600; }
.cart-item-price { font-size: .9rem; color: var(--gray-600); }

/* ── Checkout timeline ───────────────────────────────────────── */
.order-steps { display: flex; justify-content: center; gap: 0; margin-bottom: 2rem; }
.order-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .35rem;
    position: relative;
    flex: 1;
    max-width: 160px;
}
.order-step::before {
    content: '';
    position: absolute;
    top: 16px;
    left: 50%;
    width: 100%;
    height: 2px;
    background: var(--gray-200);
}
.order-step:last-child::before { display: none; }
.order-step-dot {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--gray-200);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .85rem;
    font-weight: 700;
    color: var(--gray-400);
    z-index: 1;
    position: relative;
}
.order-step.active .order-step-dot   { background: var(--green-600); color: var(--white); }
.order-step.done .order-step-dot     { background: var(--green-400); color: var(--white); }
.order-step-label { font-size: .75rem; color: var(--gray-400); font-weight: 600; text-align: center; }

/* ── Footer ──────────────────────────────────────────────────── */
.footer {
    background: var(--green-900);
    color: rgba(255,255,255,.65);
    text-align: center;
    padding: 1.5rem;
    font-size: .85rem;
    margin-top: auto;
}
.footer a { color: var(--green-400); }

/* ── Utilities ───────────────────────────────────────────────── */
.text-center { text-align: center; }
.text-right  { text-align: right; }
.text-muted  { color: var(--gray-400); }
.text-green  { color: var(--green-600); }
.text-red    { color: var(--red); }
.text-sm     { font-size: .85rem; }
.fw-bold     { font-weight: 700; }
.mt-1 { margin-top: .5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mb-1 { margin-bottom: .5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.d-flex  { display: flex; }
.align-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-1   { gap: .5rem; }
.gap-2   { gap: 1rem; }
.w-100   { width: 100%; }

/* ── Responsive ───────────────────────────────────────────────── */
@media (max-width: 768px) {
    .sidebar { display: none; }
    .form-row { grid-template-columns: 1fr; }
    .product-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
    .product-grid { grid-template-columns: 1fr; }
    .hero { padding: 3rem 0; }
}
