/* ================================================================
   MUQADDAS RESTAURANT — STYLESHEET
   Design language: warm spice-market palette (maroon + turmeric gold
   on a cream paper base), Fraunces for display type, Inter for body.
   Mobile-first, then scaled up with min-width breakpoints.
   ================================================================ */

:root {
    /* Color */
    --paper: #FBF1E2;
    --surface: #FFFFFF;
    --surface-warm: #FFF8EC;
    --ink: #2A1712;
    --ink-soft: #6E574C;
    --ink-faint: #9C8A80;
    --line: rgba(42, 23, 18, 0.10);
    --maroon: #9E2B22;
    --maroon-deep: #6F1D18;
    --maroon-tint: #FBE4E0;
    --turmeric: #D79A32;
    --turmeric-deep: #B47A1E;
    --herb: #4C7A52;
    --whatsapp: #25D366;
    --whatsapp-deep: #1DA851;
    --danger: #C23B2E;

    /* Type */
    --font-display: 'Fraunces', 'Georgia', serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;

    /* Radii — varied deliberately, not one value everywhere */
    --r-pill: 999px;
    --r-lg: 28px;
    --r-md: 16px;
    --r-sm: 10px;

    /* Shadow */
    --shadow-card: 0 2px 10px rgba(42, 23, 18, 0.06), 0 10px 24px rgba(42, 23, 18, 0.05);
    --shadow-pop: 0 12px 32px rgba(111, 29, 24, 0.18);

    --container-w: 1180px;
}

/* ---------------- RESET ---------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
    margin: 0;
    font-family: var(--font-body);
    color: var(--ink);
    background: var(--paper);
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    padding-bottom: 64px; /* space for mobile bottom nav */
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }
ul { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 700; line-height: 1.15; margin: 0 0 0.4em; color: var(--ink); }
p { margin: 0 0 1em; color: var(--ink-soft); }
.container { max-width: var(--container-w); margin: 0 auto; padding: 0 20px; }

@media (min-width: 900px) {
    body { padding-bottom: 0; }
}

:focus-visible { outline: 3px solid var(--turmeric); outline-offset: 2px; }

@media (prefers-reduced-motion: reduce) {
    * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

/* ---------------- BUTTONS ---------------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 13px 26px;
    border-radius: var(--r-pill);
    font-weight: 600;
    font-size: 15px;
    border: 2px solid transparent;
    transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
    white-space: nowrap;
}
.btn:active { transform: scale(0.97); }
.btn--primary { background: var(--maroon); color: #fff; box-shadow: var(--shadow-pop); }
.btn--primary:hover { background: var(--maroon-deep); }
.btn--outline { background: transparent; border-color: var(--maroon); color: var(--maroon); }
.btn--outline:hover { background: var(--maroon-tint); }
.btn--outline-light { background: transparent; border-color: rgba(255,255,255,0.7); color: #fff; }
.btn--outline-light:hover { background: rgba(255,255,255,0.12); }
.btn--whatsapp { background: var(--whatsapp); color: #fff; }
.btn--whatsapp:hover { background: var(--whatsapp-deep); }
.btn--lg { padding: 16px 32px; font-size: 16px; }
.btn--sm { padding: 9px 18px; font-size: 13px; }
.btn--block { width: 100%; }
.btn--add-cart {
    background: var(--ink);
    color: #fff;
    padding: 10px 16px;
    border-radius: var(--r-pill);
    font-size: 13px;
    font-weight: 600;
}
.btn--add-cart:hover { background: var(--maroon); }

.back-link {
    display: inline-block;
    margin-top: 16px;
    color: var(--maroon);
    font-weight: 600;
    font-size: 14px;
}

/* ---------------- HEADER ---------------- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
}
.site-header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 14px;
    padding-bottom: 14px;
    gap: 16px;
}
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--font-display); font-weight: 700; font-size: 20px; }
.brand__mark { font-size: 24px; }
.brand--light { color: #fff; }

.main-nav { display: none; gap: 28px; }
.main-nav a { font-weight: 600; font-size: 15px; color: var(--ink-soft); padding: 6px 0; border-bottom: 2px solid transparent; }
.main-nav a:hover, .main-nav a.active { color: var(--maroon); border-color: var(--maroon); }

.site-header__actions { display: flex; align-items: center; gap: 10px; }
.cart-pill {
    position: relative;
    width: 42px; height: 42px;
    display: flex; align-items: center; justify-content: center;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r-pill);
    color: var(--ink);
}
.cart-pill__count {
    position: absolute; top: -6px; right: -6px;
    background: var(--maroon); color: #fff;
    font-size: 11px; font-weight: 700;
    min-width: 18px; height: 18px; border-radius: 999px;
    display: flex; align-items: center; justify-content: center;
    padding: 0 4px;
}
.site-header__actions .btn--whatsapp.btn--sm { display: none; }

.nav-toggle {
    width: 38px; height: 38px;
    background: none; border: none;
    display: flex; flex-direction: column; justify-content: center; gap: 5px;
}
.nav-toggle span { width: 100%; height: 2px; background: var(--ink); border-radius: 2px; }

@media (min-width: 900px) {
    .main-nav { display: flex; }
    .nav-toggle { display: none; }
    .site-header__actions .btn--whatsapp.btn--sm { display: inline-flex; }
}

.main-nav.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0; right: 0;
    background: var(--paper);
    padding: 16px 20px 20px;
    border-bottom: 1px solid var(--line);
    gap: 16px;
}

/* ---------------- HERO ---------------- */
.hero {
    position: relative;
    background: var(--maroon-deep);
    background-image:
        radial-gradient(circle at 85% 20%, rgba(215,154,50,0.35), transparent 55%),
        radial-gradient(circle at 10% 90%, rgba(158,43,34,0.6), transparent 50%);
    overflow: hidden;
    padding: 72px 0 84px;
}
.hero::before {
    content: "";
    position: absolute; inset: 0;
    background-image: radial-gradient(rgba(255,255,255,0.09) 1.5px, transparent 1.5px);
    background-size: 22px 22px;
    opacity: 0.5;
}
.hero__inner { position: relative; z-index: 1; max-width: 640px; }
.hero__eyebrow { color: var(--turmeric); font-weight: 600; font-size: 15px; margin-bottom: 6px; }
.hero__title {
    font-family: var(--font-display);
    font-style: italic;
    font-weight: 700;
    font-size: clamp(40px, 9vw, 68px);
    color: #fff;
    margin-bottom: 14px;
}
.hero__tagline { color: rgba(255,255,255,0.88); font-size: 18px; max-width: 480px; margin-bottom: 30px; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------------- SECTIONS ---------------- */
.section { padding: 64px 0; }
.section--tight { padding: 32px 0 8px; }
.section--muted { background: var(--surface-warm); }
.section-head { max-width: 560px; margin-bottom: 34px; }
.section-head h2 { font-size: clamp(28px, 4vw, 36px); }
.section-head p { font-size: 16px; }

/* ---------------- FOOD GRID / CARDS ---------------- */
.food-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 20px;
}
.food-card {
    background: var(--surface);
    border-radius: var(--r-md);
    overflow: hidden;
    box-shadow: var(--shadow-card);
    display: flex;
    flex-direction: column;
}
.food-card__media { position: relative; display: block; aspect-ratio: 4/3; background: var(--surface-warm); overflow: hidden; }
.food-card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.35s ease; }
.food-card:hover .food-card__media img { transform: scale(1.05); }
.badge {
    position: absolute; top: 10px; left: 10px;
    background: var(--turmeric); color: #392a08;
    font-size: 12px; font-weight: 700;
    padding: 4px 10px; border-radius: var(--r-pill);
}
.food-card__body { padding: 16px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.food-card__name { font-family: var(--font-display); font-weight: 700; font-size: 18px; }
.food-card__desc { font-size: 14px; margin: 0; flex: 1; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.food-card__footer { display: flex; align-items: center; justify-content: space-between; margin-top: 8px; gap: 10px; }
.food-card__price { font-weight: 700; font-size: 16px; color: var(--maroon); }
.quick-add-form { margin: 0; }

/* ---------------- CATEGORY GRID ---------------- */
.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 16px;
}
.category-card {
    background: var(--surface);
    border-radius: var(--r-md);
    padding: 24px 12px;
    text-align: center;
    box-shadow: var(--shadow-card);
    transition: transform 0.15s ease;
}
.category-card:hover { transform: translateY(-4px); }
.category-card__icon { display: block; font-size: 32px; margin-bottom: 10px; }
.category-card__name { display: block; font-weight: 700; font-family: var(--font-display); font-size: 16px; }
.category-card__count { display: block; font-size: 12px; color: var(--ink-faint); margin-top: 2px; }

/* ---------------- FEATURE GRID ---------------- */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 24px;
}
.feature-card__icon { font-size: 30px; display: block; margin-bottom: 10px; }
.feature-card h3 { font-size: 18px; margin-bottom: 6px; }
.feature-card p { font-size: 14px; margin: 0; }

/* ---------------- STEPS ---------------- */
.steps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 24px;
}
.step-card { position: relative; padding-left: 4px; }
.step-card__num {
    display: inline-flex; align-items: center; justify-content: center;
    width: 40px; height: 40px; border-radius: var(--r-pill);
    background: var(--maroon); color: #fff; font-family: var(--font-display); font-weight: 700; font-size: 17px;
    margin-bottom: 12px;
}
.step-card h3 { font-size: 17px; margin-bottom: 4px; }
.step-card p { font-size: 14px; margin: 0; }

/* ---------------- LOCATION ---------------- */
.location-grid {
    display: grid;
    gap: 24px;
    grid-template-columns: 1fr;
}
.location-map { border-radius: var(--r-lg); overflow: hidden; min-height: 280px; box-shadow: var(--shadow-card); }
.location-info {
    background: var(--surface);
    border-radius: var(--r-lg);
    padding: 28px;
    box-shadow: var(--shadow-card);
}
.location-info h3 { font-size: 22px; }
.location-info__row { font-size: 15px; margin-bottom: 8px; }
.location-info__row a { color: var(--maroon); font-weight: 600; }
.location-info__actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }

@media (min-width: 860px) {
    .location-grid { grid-template-columns: 1.2fr 1fr; }
}

/* ---------------- PAGE HERO (inner pages) ---------------- */
.page-hero {
    background: var(--maroon-deep);
    color: #fff;
    padding: 48px 0;
    text-align: left;
}
.page-hero h1 { color: #fff; font-style: italic; font-size: clamp(30px, 6vw, 42px); }
.page-hero p { color: rgba(255,255,255,0.85); margin: 0; }

/* ---------------- MENU TABS ---------------- */
.menu-tabs {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding-bottom: 14px;
    margin-bottom: 26px;
    -webkit-overflow-scrolling: touch;
}
.menu-tabs::-webkit-scrollbar { display: none; }
.menu-tab {
    flex: 0 0 auto;
    padding: 9px 18px;
    border-radius: var(--r-pill);
    background: var(--surface);
    border: 1px solid var(--line);
    font-weight: 600;
    font-size: 14px;
    color: var(--ink-soft);
}
.menu-tab.active, .menu-tab:hover { background: var(--maroon); color: #fff; border-color: var(--maroon); }
.menu-category { margin-bottom: 46px; }
.menu-category__title { font-size: 24px; margin-bottom: 18px; }

/* ---------------- FOOD DETAIL ---------------- */
.food-detail__grid {
    display: grid;
    gap: 32px;
    grid-template-columns: 1fr;
}
.food-detail__media { position: relative; border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--shadow-card); aspect-ratio: 4/3; }
.food-detail__media img { width: 100%; height: 100%; object-fit: cover; }
.food-detail__category { color: var(--turmeric-deep); font-weight: 700; font-size: 13px; margin-bottom: 6px; }
.food-detail__info h1 { font-size: clamp(28px, 5vw, 38px); }
.food-detail__desc { font-size: 16px; }
.food-detail__price { font-size: 24px; font-weight: 700; color: var(--maroon); margin-bottom: 20px; }
.field-label { display: block; font-weight: 700; font-size: 13px; margin: 18px 0 8px; }

.qty-selector {
    display: inline-flex; align-items: center;
    border: 1px solid var(--line); border-radius: var(--r-pill);
    overflow: hidden; background: var(--surface);
}
.qty-btn { width: 42px; height: 42px; background: none; border: none; font-size: 18px; font-weight: 700; color: var(--maroon); }
.qty-btn:hover { background: var(--maroon-tint); }
.qty-selector input {
    width: 48px; border: none; text-align: center; font-weight: 700; font-size: 15px;
    background: transparent; -moz-appearance: textfield;
}
.qty-selector input::-webkit-outer-spin-button, .qty-selector input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.qty-selector--sm .qty-btn { width: 32px; height: 32px; font-size: 15px; }
.qty-selector--sm input { width: 36px; font-size: 14px; }

.quick-notes { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 4px; }
.quick-note-chip {
    padding: 7px 14px; border-radius: var(--r-pill);
    background: var(--surface-warm); border: 1px solid var(--line);
    font-size: 13px; font-weight: 600; color: var(--ink-soft);
}
.quick-note-chip.active { background: var(--herb); color: #fff; border-color: var(--herb); }

textarea, input[type=text], input[type=tel], input[type=email], input[type=number] {
    width: 100%;
    font-family: var(--font-body);
    font-size: 15px;
    padding: 12px 14px;
    border-radius: var(--r-sm);
    border: 1px solid var(--line);
    background: var(--surface);
    color: var(--ink);
}
textarea:focus, input:focus { border-color: var(--maroon); }
textarea { resize: vertical; }

@media (min-width: 860px) {
    .food-detail__grid { grid-template-columns: 1fr 1fr; align-items: start; }
}

/* ---------------- CART ---------------- */
.empty-state { text-align: center; padding: 60px 20px; }
.empty-state__icon { font-size: 56px; display: block; margin-bottom: 16px; }

.cart-layout { display: grid; gap: 28px; grid-template-columns: 1fr; align-items: start; }
.cart-items { display: flex; flex-direction: column; gap: 14px; }
.cart-item {
    display: grid;
    grid-template-columns: 64px 1fr auto;
    grid-template-areas: "img details remove" "img qty total";
    gap: 6px 14px;
    align-items: center;
    background: var(--surface);
    border-radius: var(--r-md);
    padding: 14px;
    box-shadow: var(--shadow-card);
}
.cart-item__img { grid-area: img; width: 64px; height: 64px; border-radius: var(--r-sm); object-fit: cover; }
.cart-item__details { grid-area: details; }
.cart-item__details h3 { font-size: 15px; margin-bottom: 2px; }
.cart-item__note { font-size: 12px; color: var(--herb); margin: 0; }
.cart-item__unit-price { font-size: 12px; margin: 0; color: var(--ink-faint); }
.cart-item__qty-form { grid-area: qty; margin: 0; }
.cart-item__line-total { grid-area: total; font-weight: 700; color: var(--maroon); justify-self: end; }
.cart-item__remove-form { grid-area: remove; justify-self: end; margin: 0; }
.remove-btn { background: none; border: none; color: var(--ink-faint); padding: 4px; }
.remove-btn:hover { color: var(--danger); }
.clear-cart-btn {
    align-self: flex-start;
    background: none; border: none;
    color: var(--ink-faint); font-size: 13px; font-weight: 600;
    text-decoration: underline; padding: 8px 0;
}
.clear-cart-btn:hover { color: var(--danger); }

.cart-summary {
    background: var(--surface);
    border-radius: var(--r-lg);
    padding: 24px;
    box-shadow: var(--shadow-card);
    position: sticky;
    top: 90px;
}
.cart-summary h3 { font-size: 18px; margin-bottom: 16px; }
.cart-summary__item, .cart-summary__row {
    display: flex; justify-content: space-between; font-size: 14px; margin-bottom: 10px;
}
.cart-summary__row { font-weight: 700; font-size: 15px; padding-top: 10px; border-top: 1px solid var(--line); }
.cart-summary__row--muted { font-weight: 500; color: var(--ink-faint); border: none; padding-top: 0; font-size: 13px; }
.cart-summary__note { font-size: 12px; color: var(--ink-faint); margin-bottom: 18px; }
.cart-summary .btn { margin-top: 10px; }

@media (min-width: 900px) {
    .cart-layout, .checkout-layout { grid-template-columns: 1fr 340px; }
}

/* ---------------- CHECKOUT ---------------- */
.checkout-layout { display: grid; gap: 28px; grid-template-columns: 1fr; align-items: start; }
.checkout-form { background: var(--surface); border-radius: var(--r-lg); padding: 26px; box-shadow: var(--shadow-card); }
.form-section { border: none; padding: 0; margin: 0 0 28px; }
.form-section legend { font-family: var(--font-display); font-weight: 700; font-size: 18px; margin-bottom: 14px; padding: 0; }
.form-row { margin-bottom: 14px; }
.form-row label { display: block; font-weight: 600; font-size: 13px; margin-bottom: 6px; }
.form-row--split { display: grid; grid-template-columns: 1fr; gap: 14px; }
@media (min-width: 560px) { .form-row--split { grid-template-columns: 1fr 1fr; } }
.checkbox-row { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 500; color: var(--ink-soft); }
.checkbox-row input { width: auto; }
.payment-note {
    background: var(--surface-warm);
    border: 1px dashed var(--turmeric);
    border-radius: var(--r-md);
    padding: 16px;
    margin-bottom: 20px;
    font-size: 14px;
}
.payment-note strong { display: block; margin-bottom: 4px; }
.payment-note p { margin: 0; font-size: 13px; }
.form-errors {
    background: #FDEBEA; border: 1px solid var(--danger); color: var(--danger);
    border-radius: var(--r-sm); padding: 14px 16px; margin-bottom: 20px; font-size: 14px;
}
.form-errors ul { margin: 8px 0 0 18px; list-style: disc; }

/* ---------------- ORDER SUCCESS ---------------- */
.order-success { text-align: center; }
.order-success__inner { max-width: 520px; margin: 0 auto; }
.order-success__icon { font-size: 52px; margin-bottom: 12px; }
.order-success__lead { font-size: 16px; }
.order-summary-card {
    background: var(--surface);
    border-radius: var(--r-lg);
    padding: 24px;
    box-shadow: var(--shadow-card);
    text-align: left;
    margin: 24px 0;
}
.order-summary-card__row { display: flex; justify-content: space-between; font-size: 14px; margin-bottom: 8px; }
.order-summary-card__row--muted { color: var(--ink-faint); font-size: 13px; }
.order-summary-card hr { border: none; border-top: 1px solid var(--line); margin: 12px 0; }
.order-success__note { font-size: 14px; }
.order-success__actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }

/* ---------------- FOOTER ---------------- */
.site-footer { background: var(--ink); color: rgba(255,255,255,0.75); padding: 56px 0 0; margin-top: 40px; }
.footer-grid { display: grid; gap: 32px; grid-template-columns: 1fr; padding-bottom: 40px; }
.footer-col h4 { color: #fff; font-size: 15px; margin-bottom: 14px; font-family: var(--font-body); }
.footer-col a, .footer-col p { display: block; margin-bottom: 10px; font-size: 14px; color: rgba(255,255,255,0.7); }
.footer-col a:hover { color: var(--turmeric); }
.footer-tagline { font-size: 14px; margin-top: 10px; max-width: 260px; }
.footer-social { display: flex; gap: 14px; margin-top: 6px; }
.footer-col .btn { margin-right: 8px; margin-top: 6px; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.1); padding: 18px 0; text-align: center; font-size: 13px; }
.footer-bottom p { margin: 0; color: rgba(255,255,255,0.55); }

@media (min-width: 720px) {
    .footer-grid { grid-template-columns: 1.4fr 1fr 1fr 1fr; }
}

/* ---------------- MOBILE BOTTOM NAV ---------------- */
.mobile-nav {
    position: fixed; bottom: 0; left: 0; right: 0; z-index: 60;
    background: var(--surface);
    border-top: 1px solid var(--line);
    display: flex;
    padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
    box-shadow: 0 -4px 16px rgba(0,0,0,0.06);
}
.mobile-nav a {
    flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px;
    font-size: 11px; font-weight: 600; color: var(--ink-faint); padding: 6px 0; position: relative;
}
.mobile-nav a.active { color: var(--maroon); }
.mobile-nav__cart { position: relative; }
.mobile-nav__badge {
    position: absolute; top: 0; right: 22%;
    background: var(--maroon); color: #fff; font-size: 10px; font-weight: 700;
    min-width: 15px; height: 15px; border-radius: 999px;
    display: flex; align-items: center; justify-content: center;
}
@media (min-width: 900px) { .mobile-nav { display: none; } }

/* ---------------- WHATSAPP FLOATING BUTTON ---------------- */
.whatsapp-fab {
    position: fixed; right: 18px; bottom: 78px; z-index: 55;
    width: 56px; height: 56px; border-radius: 50%;
    background: var(--whatsapp); color: #fff;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 8px 20px rgba(37,211,102,0.45);
}
.whatsapp-fab:hover { background: var(--whatsapp-deep); }
@media (min-width: 900px) { .whatsapp-fab { bottom: 24px; } }

/* ---------------- TOAST ---------------- */
.toast {
    position: fixed;
    left: 50%;
    bottom: 84px;
    transform: translate(-50%, 12px);
    background: var(--ink);
    color: #fff;
    padding: 12px 22px;
    border-radius: var(--r-pill);
    font-size: 14px;
    font-weight: 600;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease, transform 0.25s ease;
    z-index: 80;
    white-space: nowrap;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
@media (min-width: 900px) { .toast { bottom: 24px; } }
