/* ──────────────────────────────────────────────────────────────
   Auckland Indian Sweets & Snacks — design tokens (direction 1B)
   Maroon on cream, gold accent, rounded cards, Bitter + Archivo.
   ────────────────────────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Archivo:wght@400;500;600;700;800;900&family=Bitter:wght@400;600;800&display=swap');

:root {
    /* Existing variable names kept for backward compatibility with inline styles. */
    --maroon: #7e1316;
    --maroon-dark: #5d0d10;
    --saffron: #e8c268;       /* now the gold accent */
    --saffron-dark: #b08d3e;  /* gold-deep, used for eyebrow/category text */
    --gold: #e8c268;
    --gold-deep: #b08d3e;
    --cream: #fbf7f0;
    --cream-dark: #f3ead9;    /* cream-2, sunk panels */
    --ink: #2a1f1c;
    --ink-2: #4a3a34;
    --ink-soft: #5c4a41;      /* muted */
    --muted: #5c4a41;
    --muted-2: #8a7466;
    --line: #e3d8c6;
    --line-2: #ecdfca;
    --field-border: #ddd0ba;
    --white: #ffffff;
    --success: #2c4a2c;
    --ok-bg: #dfeadd;
    --ok-fg: #2c4a2c;
    --idle-bg: #efe7d8;

    --radius: 14px;           /* r-card, default for panels/cards */
    --r-card: 14px;
    --r-panel: 16px;
    --r-field: 10px;
    --r-pill: 999px;
    --shadow: 0 10px 28px rgba(93, 13, 16, 0.10);
    --max-width: 1280px;

    --font: 'Archivo', system-ui, -apple-system, sans-serif;
    --font-display: 'Bitter', Georgia, serif;
    --font-body: 'Archivo', system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: var(--font-body);
    background: var(--cream);
    color: var(--ink);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--maroon); text-decoration: none; }
a:hover { color: var(--maroon-dark); }
img { max-width: 100%; display: block; }

h1, h2, h3 { font-family: var(--font-display); line-height: 1.12; margin: 0 0 16px; font-weight: 800; }

.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 32px;
}
/* Grid items default to min-width:auto, which lets an aspect-ratio box's
   intrinsic size distort equal-fr track sizing (e.g. product image vs text
   column ending up 655px/270px instead of 50/50). This resets that. */
.container[style*="display:grid"] > * { min-width: 0; }

/* --- Buttons --- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font: inherit;
    padding: 13px 22px;
    border-radius: var(--r-pill);
    border: 0;
    font-weight: 700;
    font-size: 0.9rem;
    min-height: 44px;
    cursor: pointer;
    text-align: center;
    transition: background .12s ease, color .12s ease, border-color .12s ease, transform .12s ease;
}
.btn-primary { background: var(--maroon); color: var(--cream); }
.btn-primary:hover { background: var(--maroon-dark); color: var(--cream); }
.btn-outline { background: transparent; border: 1px solid var(--field-border); color: var(--ink-2); }
.btn-outline:hover { border-color: var(--maroon); color: var(--maroon); background: transparent; }
.btn-gold { background: var(--gold); color: #3a1210; }
.btn-gold:hover { background: #dcb257; }
.btn-sm { padding: 9px 16px; font-size: 0.82rem; min-height: 36px; }
.btn-block { width: 100%; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn:focus-visible { outline: 2px solid var(--maroon); outline-offset: 2px; }

/* --- Top utility bar --- */
.topbar {
    background: var(--maroon);
    color: var(--cream);
    font-size: 12px;
    letter-spacing: .02em;
}
.topbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 9px;
    padding-bottom: 9px;
    gap: 12px;
    flex-wrap: wrap;
}
.topbar a { color: var(--gold); font-weight: 700; }

/* --- Header / masthead --- */
.site-header {
    background: var(--white);
    border-bottom: 1px solid var(--line);
    position: sticky;
    top: 0;
    z-index: 40;
}
.site-header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding-top: 16px;
    padding-bottom: 16px;
    flex-wrap: wrap;
}
.logo {
    display: flex;
    align-items: center;
    line-height: 1;
    white-space: nowrap;
    flex: 0 0 auto;
}
.logo img { height: 64px; width: auto; max-width: 260px; object-fit: contain; }
.logo .mark { display: none; }
.logo span:not(small) {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 22px;
    color: var(--maroon);
}
.logo small {
    display: block;
    font-family: var(--font-body);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .22em;
    text-transform: uppercase;
    color: var(--gold-deep);
    margin-top: 3px;
}

.search-form {
    flex: 1 1 280px;
    max-width: 420px;
    display: flex;
}
.search-form input {
    flex: 1;
    border: 1px solid var(--field-border);
    border-right: none;
    border-radius: var(--r-field) 0 0 var(--r-field);
    padding: 11px 14px;
    font: inherit;
    font-size: 14px;
    background: var(--white);
}
.search-form input:focus { outline: 2px solid var(--maroon); outline-offset: 0; }
.search-form button {
    border: 0;
    background: var(--maroon);
    color: var(--cream);
    padding: 0 18px;
    border-radius: 0 var(--r-field) var(--r-field) 0;
    cursor: pointer;
    font-weight: 700;
    font-size: 13px;
}
.search-form button:hover { background: var(--maroon-dark); }

.header-actions {
    display: flex;
    align-items: center;
    gap: 18px;
    font-size: 13px;
    font-weight: 700;
}
.header-actions a { display: flex; align-items: center; gap: 6px; color: var(--ink-2); }
.header-actions a:hover { color: var(--maroon); }
.cart-pill {
    background: var(--cream-dark);
    padding: 9px 16px;
    border-radius: var(--r-pill);
    color: var(--maroon) !important;
}
.cart-pill .count {
    background: var(--maroon);
    color: var(--cream);
    border-radius: var(--r-pill);
    padding: 1px 8px;
    font-size: 11px;
}

/* --- Nav --- */
.main-nav {
    background: var(--white);
    border-top: 1px solid var(--line);
}
.main-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}
.main-nav a {
    display: block;
    padding: 12px 14px;
    font-weight: 600;
    font-size: 13px;
    color: var(--ink-2);
    border-bottom: 2px solid transparent;
}
.main-nav a:hover, .main-nav a.active { color: var(--maroon); border-bottom-color: var(--maroon); }

.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 40px;
    height: 40px;
    border: 1px solid var(--field-border);
    border-radius: var(--r-field);
    background: var(--white);
    cursor: pointer;
    padding: 0;
    flex: 0 0 auto;
}
.nav-toggle span { display: block; width: 18px; height: 2px; background: var(--ink-2); margin: 0 auto; }

/* --- Hero --- */
.hero {
    position: relative;
    background: var(--ink) center/cover no-repeat;
    padding: 90px 0;
    border-bottom: 1px solid var(--line);
    overflow: hidden;
}
.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to right, rgba(42,31,28,.92) 0%, rgba(42,31,28,.8) 42%, rgba(42,31,28,.15) 78%);
}
.hero .container { position: relative; z-index: 1; }
.hero-content { max-width: 620px; }
.eyebrow {
    text-transform: uppercase;
    letter-spacing: .18em;
    font-size: 12px;
    font-weight: 800;
    color: var(--gold);
    margin: 0 0 12px;
}
.hero h1 {
    font-size: clamp(2rem, 4vw, 3.2rem);
    color: var(--white);
}
.hero p { color: #e7dccb; margin: 0 0 24px; max-width: 46ch; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-badges {
    display: flex;
    gap: 28px;
    margin-top: 32px;
    flex-wrap: wrap;
}
.hero-badge { text-align: left; }
.hero-badge strong { display: block; font-family: var(--font-display); font-size: 1.5rem; color: var(--gold); }
.hero-badge span { font-size: 13px; color: #e7dccb; }
.hero .btn-outline { border-color: rgba(251,247,240,.45); color: var(--cream); }
.hero .btn-outline:hover { border-color: var(--gold); color: var(--gold); }
.hero-art {
    aspect-ratio: 4/3;
    border-radius: var(--r-panel);
    background: linear-gradient(135deg, var(--gold), var(--maroon-dark));
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.2rem;
    text-align: center;
    padding: 24px;
    box-shadow: var(--shadow);
    overflow: hidden;
}
.hero-art img { width: 100%; height: 100%; object-fit: cover; border-radius: inherit; }
.card { background: var(--white); border: 1px solid var(--line-2); border-radius: var(--r-card); overflow: hidden; }

/* On non-hero sections (product/about art placeholders) the dark hero style is wrong context —
   this variant keeps the same gradient block on a light section without forcing the dark hero bg. */
.section .hero-art { box-shadow: none; }

/* --- Feature strip --- */
.feature-strip {
    background: var(--cream-dark);
    border-bottom: 1px solid var(--line);
    padding: 30px 0;
}
.feature-strip .container {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}
.feature-item { text-align: center; }
.feature-item .icon {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: var(--white);
    color: var(--maroon);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 10px;
    font-size: 1.2rem;
}
.feature-item h3 { font-family: var(--font-body); font-weight: 800; font-size: 0.95rem; margin: 0 0 4px; }
.feature-item p { font-size: 13px; color: var(--muted); margin: 0; }

/* --- Section heading --- */
.section { padding: 46px 0; }
.section-head {
    display: flex;
    justify-content: space-between;
    align-items: end;
    gap: 16px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}
.section-head h2 {
    margin: 0;
    font-size: 32px;
    color: var(--maroon-dark);
}
.section-head p { margin: 6px 0 0; color: var(--muted); font-size: 15px; }

/* --- Category chips --- */
.chip-row {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 28px;
}
.chip {
    padding: 9px 18px;
    border-radius: var(--r-pill);
    background: var(--white);
    border: 1px solid var(--line-2);
    font-size: 13px;
    font-weight: 700;
    color: var(--ink-2);
}
.chip.active, .chip:hover { background: var(--maroon); color: var(--cream); border-color: var(--maroon); }

/* --- Product grid --- */
.product-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}
.product-card {
    background: var(--white);
    border: 1px solid var(--line-2);
    border-radius: var(--r-card);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: box-shadow .15s ease, transform .15s ease;
}
.product-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.product-card .thumb {
    aspect-ratio: 1/1;
    background: linear-gradient(135deg, var(--cream-dark), var(--white));
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--maroon);
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 0.95rem;
    text-align: center;
    padding: 14px;
    overflow: hidden;
}
.product-card .thumb img { width: 100%; height: 100%; object-fit: cover; }
.product-card .body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.product-card .cat { font-size: 11px; text-transform: uppercase; letter-spacing: .1em; color: var(--gold-deep); font-weight: 800; }
.product-card h3 { margin: 0; font-family: var(--font-body); font-weight: 700; font-size: 17px; }
.product-card .price { font-family: var(--font-body); font-weight: 800; font-size: 18px; color: var(--maroon); margin-top: auto; }
.product-card form { display: flex; flex-direction: column; gap: 8px; }
.product-card select { width: 100%; padding: 8px; border-radius: var(--r-field); border: 1px solid var(--field-border); font-size: 13px; background: var(--white); }
.product-card form .btn { width: 100%; }

/* --- Badges --- */
.badge {
    display: inline-block;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .06em;
    padding: 5px 11px;
    border-radius: var(--r-pill);
    background: var(--idle-bg);
    color: var(--muted);
}
.badge.active, .badge.paid, .badge-ok { background: var(--ok-bg); color: var(--ok-fg); }
.badge.unpaid { background: #f6dede; color: var(--maroon-dark); }
.badge-gold { background: var(--gold); color: #3a1210; }
.badge-ink { background: var(--ink); color: var(--cream); }

/* --- Panels & tiles (checkout, pickup, shipping) --- */
.panel { background: var(--white); border: 1px solid var(--line-2); border-radius: var(--r-panel); padding: 22px; }
.panel-cream { background: var(--cream-dark); border-radius: var(--r-panel); padding: 22px; }
.tile {
    border: 1px solid var(--line-2);
    border-radius: 12px;
    padding: 14px;
    background: var(--white);
    cursor: pointer;
    display: block;
    position: relative;
}
.tile input { position: absolute; opacity: 0; pointer-events: none; }
.tile:has(input:checked) { border: 2px solid var(--maroon); background: #fdf6ef; padding: 13px; }
.tile.is-selected { border: 2px solid var(--maroon); background: #fdf6ef; padding: 13px; }
.tile.is-disabled, .tile[disabled], .tile:has(input:disabled) { opacity: .45; pointer-events: none; }
.tile-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; }
.slot-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; }
.day-strip { display: flex; gap: 9px; overflow-x: auto; padding-bottom: 4px; }
.day-strip .tile { flex: 1 0 84px; text-align: center; }

/* --- Info/contact section --- */
.info-strip { background: var(--maroon); color: var(--cream); padding: 40px 0; }
.info-strip .container { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.store-card h3 { margin: 0 0 6px; font-family: var(--font-body); font-weight: 800; font-size: 15px; color: var(--gold); }
.store-card p { margin: 2px 0; font-size: 13px; opacity: .92; }

/* --- Catering banner --- */
.catering-banner {
    background: var(--maroon);
    color: var(--cream);
    padding: 44px 0;
    text-align: center;
}
.catering-banner h2 { color: var(--white); font-size: 32px; margin-bottom: 10px; }
.catering-banner p { margin: 0 0 20px; color: #e7dccb; }

/* --- Footer --- */
.site-footer { background: var(--maroon-dark); color: var(--cream); padding: 36px 0 20px; font-size: 13px; }
.site-footer .container { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 16px; }
.site-footer nav a { margin-right: 16px; opacity: .85; color: var(--cream); }
.site-footer nav a:hover { color: var(--gold); }
.site-footer .copyright { opacity: .6; margin-top: 18px; width: 100%; }

/* --- Cart page --- */
.cart-table { width: 100%; border-collapse: collapse; }
.cart-table th, .cart-table td { text-align: left; padding: 12px 8px; border-bottom: 1px solid var(--line); font-size: 14px; }
.cart-table th { color: var(--muted-2); font-size: 12px; text-transform: uppercase; letter-spacing: .04em; font-weight: 700; }
.cart-table input[type=number] { width: 60px; padding: 7px; border: 1px solid var(--field-border); border-radius: var(--r-field); font: inherit; }
.cart-summary { max-width: 360px; margin-left: auto; background: var(--white); border: 1px solid var(--line-2); border-radius: var(--r-panel); padding: 22px; }
.cart-summary .row { display: flex; justify-content: space-between; margin-bottom: 10px; font-size: 14px; }
.cart-summary .total { font-weight: 800; font-size: 18px; color: var(--maroon); border-top: 1px solid var(--line); padding-top: 12px; }

/* --- Page banner photo (About/Catering/Wedding/FAQ/Contact) --- */
.page-photo {
    width: 100%;
    height: 320px;
    object-fit: cover;
    border-radius: var(--r-panel);
    margin: 20px 0 28px;
}
@media (max-width: 560px) {
    .page-photo { height: 200px; }
}

/* --- Generic content page --- */
.content-page h1 { color: var(--maroon-dark); font-size: 40px; }
.content-page .lede { font-size: 17px; color: var(--muted); line-height: 1.7; }
.content-page p { color: var(--ink-2); line-height: 1.7; }
.flash { background: var(--cream-dark); border: 1px solid var(--gold); border-radius: var(--r-field); padding: 12px 16px; margin-bottom: 20px; font-size: 14px; }

/* --- FAQ accordion --- */
.faq-item { border-bottom: 1px solid var(--line); padding: 6px 0; }
.faq-item summary {
    cursor: pointer;
    list-style: none;
    padding: 14px 0;
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 17px;
    color: var(--maroon-dark);
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: '+'; font-size: 20px; color: var(--maroon); }
.faq-item[open] summary::after { content: '\2212'; }
.faq-item p { margin: 0 0 16px; color: var(--muted); }

/* --- Forms (generic inputs used inline across views) --- */
input[type=text], input[type=email], input[type=password], input[type=number], input[type=tel], select, textarea {
    font: inherit;
}
label { font-weight: 600; font-size: 14px; }
.rule { height: 1px; background: var(--line); border: 0; margin: 0; }
.field { display: block; margin-bottom: 14px; }
.field > label { display: block; }
.input, .select, .textarea {
    width: 100%;
    font: inherit;
    font-size: 14px;
    color: var(--ink);
    background: var(--white);
    border: 1px solid var(--field-border);
    border-radius: var(--r-field);
    padding: 12px;
}
.input:focus, .select:focus, .textarea:focus { outline: 2px solid var(--maroon); outline-offset: 0; border-color: var(--maroon); }
.textarea { min-height: 90px; resize: vertical; }

/* --- Admin --- */
.admin-shell { display: flex; min-height: 100vh; }
.admin-sidebar {
    width: 230px;
    background: var(--ink);
    color: var(--cream);
    padding: 20px 0;
    flex-shrink: 0;
}
.admin-sidebar .brand {
    padding: 0 20px 20px;
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 17px;
    border-bottom: 1px solid rgba(255,255,255,.12);
    margin-bottom: 10px;
    color: var(--white);
}
.admin-sidebar a { display: block; padding: 11px 20px; font-size: 14px; font-weight: 600; color: #e7dccb; }
.admin-sidebar a:hover { background: rgba(255,255,255,.06); color: var(--white); }
.admin-sidebar a.active { background: var(--maroon); color: var(--white); }
.admin-main { flex: 1; padding: 30px 34px; background: var(--cream); min-width: 0; }
.admin-topbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; }
.admin-topbar h1 { font-size: 28px; }
.admin-card { background: var(--white); border: 1px solid var(--line-2); border-radius: var(--r-panel); padding: 22px; }
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 28px; }
.stat-card { background: var(--white); border: 1px solid var(--line-2); border-radius: var(--r-card); padding: 18px; }
.stat-card .num { font-family: var(--font-display); font-size: 28px; font-weight: 800; color: var(--maroon); }
.stat-card .label { font-size: 13px; color: var(--muted); }
.admin-table { width: 100%; border-collapse: collapse; background: var(--white); border: 1px solid var(--line-2); border-radius: var(--r-card); overflow: hidden; }
.admin-table th, .admin-table td { text-align: left; padding: 11px 16px; border-bottom: 1px solid var(--line); font-size: 14px; }
.admin-table th { background: var(--cream-dark); font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted-2); font-weight: 700; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-grid label { display: block; font-size: 13px; font-weight: 700; margin-bottom: 5px; color: var(--muted-2); }
.form-grid input[type=text], .form-grid input[type=number], .form-grid input[type=password],
.form-grid select, .form-grid textarea {
    width: 100%; padding: 11px 12px; border: 1px solid var(--field-border); border-radius: var(--r-field); font-size: 14px;
}
.form-grid input:focus, .form-grid select:focus, .form-grid textarea:focus { outline: 2px solid var(--maroon); outline-offset: 0; border-color: var(--maroon); }
.login-box { max-width: 380px; margin: 90px auto; background: var(--white); border: 1px solid var(--line-2); border-radius: var(--r-panel); padding: 34px; }

/* --- Responsive --- */
@media (max-width: 900px) {
    .container { padding: 0 16px; }
    /* Several pages set a two-column grid via an inline style (checkout, product
       detail, contact); inline styles beat a plain media-query rule, so this has
       to win with !important to make those stack on narrow screens. */
    .container[style*="grid-template-columns"] { grid-template-columns: 1fr !important; }
    .cart-summary[style*="sticky"] { position: static !important; }
    .nav-toggle { display: flex; }
    .main-nav { display: none; border-top: 1px solid var(--line); }
    .main-nav.is-open { display: block; }
    .main-nav ul { flex-direction: column; gap: 0; padding: 8px 0; }
    .main-nav a { padding: 12px 0; border-bottom: 1px solid var(--line); }
    .main-nav a.active { border-bottom: 1px solid var(--line); }
    .site-header .container { flex-wrap: wrap; }
    .search-form { order: 3; flex: 1 1 100%; max-width: none; }
    .hero .container { grid-template-columns: 1fr; }
    .hero-art { order: -1; }
    .feature-strip .container { grid-template-columns: repeat(2, 1fr); }
    .product-grid { grid-template-columns: repeat(2, 1fr); }
    .info-strip .container { grid-template-columns: repeat(2, 1fr); }
    .form-grid { grid-template-columns: 1fr; }
    .admin-shell { flex-direction: column; }
    .admin-sidebar { width: 100%; }
}
@media (max-width: 560px) {
    .product-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
    .header-actions { gap: 12px; }
    .hero { padding: 40px 0; }
    .feature-strip .container { grid-template-columns: 1fr 1fr; }
}
