/* ═══════════════════════════════════════════════
   BABA SLIM — Dark / Light Mode
   ═══════════════════════════════════════════════ */

:root {
    /* ─── Base sombre immersive ─── */
    --app-bg:       #111111;
    --app-surface:  #1a1a1a;
    --app-card:     #242424;
    --app-panel:    #1c1c1c;
    --app-line:     #333333;

    /* ─── Texte ─── */
    --app-text:     #f2f2f2;
    --app-muted:    #8a8a8a;

    /* ─── Couleurs d'action ─── */
    --app-accent:   #679b41;
    --app-accent-hover: #7fb854;
    --app-gold:     #ffd43b;
    --app-red:      #ef4444;
    --app-success:  #22c55e;

    /* ─── Rayons & ombres ─── */
    --radius-lg: 24px;
    --radius-md: 18px;
    --radius-sm: 14px;
    --shadow-soft: 0 8px 24px rgba(0, 0, 0, 0.35);
    --shadow-glow: 0 4px 20px rgba(103, 155, 65, 0.25);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html,
body {
    width: 100%;
    min-height: 100%;
    scroll-behavior: smooth;
}

body.webapp-body {
    font-family: "Inter", system-ui, -apple-system, Roboto, Arial, sans-serif;
    background: var(--app-bg);
    color: var(--app-text);
    line-height: 1.5;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
    overflow-x: hidden;
    overscroll-behavior-y: contain;
}

h1, h2, h3, h4, .section-title, .price-tag, .brand-mark, .bar-label {
    font-family: "Outfit", system-ui, sans-serif;
}

a {
    color: inherit;
    text-decoration: none;
}

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

button,
input {
    font: inherit;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

/* ═══════════════════════════════════════════════
   Stage & Device Shell
   ═══════════════════════════════════════════════ */

.webapp-stage {
    width: min(1420px, calc(100% - 2rem));
    margin: 0 auto;
    padding: max(10px, env(safe-area-inset-top)) 0 max(10px, env(safe-area-inset-bottom));
}

.device {
    border-radius: var(--radius-lg);
    border: 1px solid #222222;
    background: var(--app-bg);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
    overflow: hidden;
}

.device-screen {
    min-height: calc(100dvh - 44px);
    background: var(--app-bg);
}

/* ═══════════════════════════════════════════════
   Main Panel
   ═══════════════════════════════════════════════ */

.main-panel {
    background: var(--app-surface);
    padding: clamp(16px, 2.2vw, 28px);
    padding-bottom: calc(80px + env(safe-area-inset-bottom));
    display: flex;
    flex-direction: column;
    gap: 20px;
    min-width: 0;
}

/* ═══════════════════════════════════════════════
   Top Bar
   ═══════════════════════════════════════════════ */

.main-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.brand-mark {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    font-size: 1.1rem;
    color: var(--app-text);
}

.brand-mark img {
    width: 42px;
    height: 42px;
    object-fit: contain;
    filter: drop-shadow(0 2px 6px rgba(103, 155, 65, 0.3));
}

.top-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.locale-pill,
.install-chip,
.theme-toggle {
    border-radius: 999px;
    border: 1px solid var(--app-line);
    background: var(--app-card);
    min-height: 40px;
    padding: 0 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--app-text);
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.locale-toggle:hover,
.install-chip:hover,
.theme-toggle:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.3);
}

.theme-icon {
    font-size: 1.1rem;
    line-height: 1;
    transition: transform 0.3s ease;
}

.theme-toggle:hover .theme-icon {
    transform: rotate(30deg);
}

/* ═══════════════════════════════════════════════
   Old Nav Pills (hidden - replaced by bottom bar)
   ═══════════════════════════════════════════════ */

.app-tabs {
    display: none;
}

.app-tab,
.app-tab-group,
.app-subtabs,
.app-subtab {
    display: none;
}

/* ═══════════════════════════════════════════════
   Bottom Tab Bar (new navigation)
   ═══════════════════════════════════════════════ */

.bottom-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 100;
    display: flex;
    justify-content: space-around;
    align-items: center;
    background: rgba(17, 17, 17, 0.92);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding: 6px 0 max(6px, env(safe-area-inset-bottom));
}

.bar-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    font-size: 0.62rem;
    font-weight: 600;
    color: var(--app-muted);
    text-decoration: none;
    transition: color 0.2s ease, transform 0.2s ease;
    padding: 4px 12px;
    border-radius: 12px;
    position: relative;
}

.bar-item.active {
    color: var(--app-accent);
}

.bar-item.active::before {
    content: '';
    position: absolute;
    top: -6px;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 3px;
    border-radius: 999px;
    background: var(--app-accent);
}

.bar-icon {
    font-size: 1.25rem;
    line-height: 1;
}

.bar-label {
    font-weight: 700;
    letter-spacing: 0.01em;
}

/* ═══════════════════════════════════════════════
   Page Heading
   ═══════════════════════════════════════════════ */

.page-heading {
    padding-top: 4px;
}

.page-heading h1 {
    font-size: clamp(2rem, 4.5vw, 3.2rem);
    line-height: 0.95;
    letter-spacing: -0.03em;
    font-weight: 800;
    color: var(--app-text);
}

.page-heading h1 span {
    font-weight: 500;
    color: var(--app-accent);
}

.page-heading p {
    margin-top: 10px;
    color: var(--app-muted);
    max-width: 70ch;
    font-size: 0.9rem;
    line-height: 1.5;
}

/* ═══════════════════════════════════════════════
   Section Panel
   ═══════════════════════════════════════════════ */

.section-title {
    font-size: clamp(1.4rem, 2.8vw, 2rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    margin-bottom: 14px;
    color: var(--app-text);
}

.section-panel {
    background: var(--app-card);
    border: 1px solid var(--app-line);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-soft);
    padding: clamp(16px, 2.2vw, 22px);
    content-visibility: auto;
    contain-intrinsic-size: 420px;
}

/* ═══════════════════════════════════════════════
   Category Grid (Home)
   ═══════════════════════════════════════════════ */

.category-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.category-card {
    min-height: 180px;
    border-radius: 20px;
    border: 1px solid var(--app-line);
    background: #2a2a2a;
    padding: 16px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.category-card::after {
    content: '→';
    position: absolute;
    bottom: 16px;
    right: 16px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    color: var(--app-text);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: 700;
    transition: background 0.2s ease;
}

.category-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4);
}

.category-card:hover::after {
    background: var(--app-accent);
}

.category-card.is-focus:not(.hot) {
    border-color: var(--app-accent);
    box-shadow: 0 0 0 2px rgba(103, 155, 65, 0.2);
    transform: translateY(-2px);
}

.category-card.hot {
    background: linear-gradient(145deg, #d51e2d 0%, #b01020 100%);
    border-color: transparent;
    color: #ffffff;
    animation: hotPulse 3s ease-in-out infinite;
}

.category-card.hot-burger {
    background: linear-gradient(145deg, #679b41 0%, #527c34 100%);
    border-color: transparent;
    color: #ffffff;
    animation: hotBurgerPulse 3s ease-in-out infinite;
    box-shadow: 0 8px 28px rgba(103, 155, 65, 0.3);
}

.category-card.hot-burger h3 {
    font-size: clamp(1.05rem, 2vw, 1.18rem);
}

.category-card.hot-burger small {
    background: rgba(255, 255, 255, 0.2);
}

.category-thumb {
    width: 90px;
    height: 90px;
    object-fit: contain;
    filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.4));
    transition: transform 0.3s ease;
}

.category-card:hover .category-thumb {
    transform: scale(1.08) rotate(-2deg);
}

.category-card h3 {
    font-size: clamp(0.95rem, 1.8vw, 1.05rem);
    line-height: 1.15;
    font-weight: 800;
}

.category-card small {
    display: inline-flex;
    align-self: flex-start;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--app-muted);
}

.category-card.hot-burger small,
.category-card.hot small {
    color: #ffffff;
}

/* ═══════════════════════════════════════════════
   Popular / Best Seller Grid
   ═══════════════════════════════════════════════ */

.popular-scroll {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 8px;
    scrollbar-width: none;
}

.popular-scroll::-webkit-scrollbar {
    display: none;
}

.popular-grid {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 8px;
    scrollbar-width: none;
}

.popular-grid::-webkit-scrollbar {
    display: none;
}

.pop-item {
    min-width: 150px;
    flex-shrink: 0;
    scroll-snap-align: start;
    border-radius: 16px;
    border: 1px solid var(--app-line);
    background: var(--app-card);
    padding: 14px 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 8px;
    cursor: pointer;
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.pop-item:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-glow);
    border-color: var(--app-accent);
}

.pop-item img {
    width: 80px;
    height: 80px;
    object-fit: contain;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
    transition: transform 0.3s ease;
}

.pop-item:hover img {
    transform: scale(1.08);
}

.pop-item h4 {
    font-size: 0.78rem;
    line-height: 1.2;
    font-weight: 700;
    color: var(--app-text);
}

.pop-item p {
    font-size: 0.82rem;
    font-weight: 800;
    color: var(--app-gold);
}

/* ═══════════════════════════════════════════════
   CTA Button (Homepage call)
   ═══════════════════════════════════════════════ */

.cta-call {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 16px 20px;
    border-radius: 16px;
    background: var(--app-accent);
    color: #ffffff;
    font-family: "Outfit", system-ui, sans-serif;
    font-size: 1rem;
    font-weight: 800;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
    box-shadow: 0 6px 20px rgba(103, 155, 65, 0.35);
}

.cta-call:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 28px rgba(103, 155, 65, 0.45);
    background: var(--app-accent-hover);
}

.cta-call:active {
    transform: scale(0.98);
}

.cta-call .cta-icon {
    font-size: 1.2rem;
}

/* ═══════════════════════════════════════════════
   Menu Toolbar (Filters)
   ═══════════════════════════════════════════════ */

.menu-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 14px;
}

.filter-chip {
    border: 1px solid var(--app-line);
    background: var(--app-card);
    color: var(--app-muted);
    border-radius: 999px;
    padding: 8px 14px;
    font-size: 0.78rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
}

.filter-chip.active,
.filter-chip:hover {
    background: var(--app-accent);
    border-color: var(--app-accent);
    color: #ffffff;
}

/* ═══════════════════════════════════════════════
   Menu Item Cards
   ═══════════════════════════════════════════════ */

.menu-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.menu-item-card {
    border-radius: 16px;
    border: 1px solid var(--app-line);
    background: var(--app-card);
    padding: 12px;
    display: grid;
    grid-template-columns: 80px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    cursor: pointer;
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.menu-item-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-soft);
    border-color: rgba(103, 155, 65, 0.3);
}

.menu-item-card[hidden] {
    display: none;
}

.menu-item-card img {
    width: 80px;
    height: 80px;
    object-fit: contain;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
    transition: transform 0.3s ease;
}

.menu-item-card:hover img {
    transform: scale(1.06);
}

.menu-copy h3 {
    font-size: 0.88rem;
    font-weight: 700;
    line-height: 1.2;
    color: var(--app-text);
}

.menu-copy p {
    margin-top: 4px;
    font-size: 0.73rem;
    color: var(--app-muted);
    line-height: 1.4;
}

.menu-meta {
    margin-top: 8px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.price-tag {
    font-size: 0.88rem;
    font-weight: 800;
    color: var(--app-gold);
}

/* ═══════════════════════════════════════════════
   Add to Cart Button (+)
   ═══════════════════════════════════════════════ */

.add-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: var(--app-accent);
    color: #ffffff;
    font-size: 1.3rem;
    font-weight: 800;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    line-height: 1;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    box-shadow: 0 2px 8px rgba(103, 155, 65, 0.3);
}

.add-btn:hover {
    transform: scale(1.12);
    box-shadow: 0 4px 14px rgba(103, 155, 65, 0.45);
}

.add-btn:active {
    transform: scale(0.92);
}

/* ═══════════════════════════════════════════════
   Info Cards (Contact, About)
   ═══════════════════════════════════════════════ */

.info-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.info-card {
    border-radius: 14px;
    border: 1px solid var(--app-line);
    background: var(--app-card);
    padding: 14px;
}

.info-card h3 {
    font-size: 0.95rem;
    line-height: 1.2;
    font-weight: 800;
    margin-bottom: 6px;
    color: var(--app-text);
}

.info-card p,
.info-card li {
    color: var(--app-muted);
    font-size: 0.82rem;
    line-height: 1.5;
}

.info-card ul {
    margin: 8px 0 0 18px;
}

.info-card a {
    color: var(--app-accent);
    font-weight: 700;
    transition: color 0.2s ease;
}

.info-card a:hover {
    color: var(--app-accent-hover);
}

.map-wrap {
    border-radius: 16px;
    border: 1px solid var(--app-line);
    overflow: hidden;
    margin-top: 12px;
}

.map-wrap iframe {
    width: 100%;
    min-height: 260px;
    border: 0;
}

/* ═══════════════════════════════════════════════
   FAQ
   ═══════════════════════════════════════════════ */

.faq-list {
    display: grid;
    gap: 10px;
}

.faq-item {
    border-radius: 14px;
    border: 1px solid var(--app-line);
    background: var(--app-card);
    overflow: hidden;
}

.faq-item summary {
    list-style: none;
    cursor: pointer;
    font-size: 0.88rem;
    font-weight: 700;
    padding: 14px 16px;
    position: relative;
    padding-right: 40px;
    color: var(--app-text);
    transition: background 0.2s ease;
}

.faq-item summary:hover {
    background: rgba(255, 255, 255, 0.04);
}

.faq-item summary::after {
    content: "+";
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.15rem;
    color: var(--app-accent);
    font-weight: 800;
}

.faq-item[open] summary::after {
    content: "−";
}

.faq-item summary::-webkit-details-marker {
    display: none;
}

.faq-item p {
    border-top: 1px solid var(--app-line);
    padding: 12px 16px 14px;
    color: var(--app-muted);
    font-size: 0.82rem;
    line-height: 1.5;
}

/* ═══════════════════════════════════════════════
   Order Panel (Cart sidebar)
   ═══════════════════════════════════════════════ */

.order-panel {
    position: fixed;
    top: 0;
    right: 0;
    width: min(400px, 100vw);
    height: 100dvh;
    background: var(--app-panel);
    border-left: 1px solid var(--app-line);
    box-shadow: -16px 0 40px rgba(0, 0, 0, 0.4);
    padding: 20px 16px 18px;
    display: flex;
    flex-direction: column;
    z-index: 1002;
    transform: translateX(105%);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.28s ease, opacity 0.28s ease;
}

.order-panel.is-visible {
    transform: translateX(0);
    opacity: 1;
    pointer-events: auto;
}

.order-panel.is-empty {
    display: none;
}

.order-close {
    align-self: flex-end;
    width: 42px;
    height: 42px;
    border: 1px solid var(--app-line);
    background: var(--app-card);
    color: var(--app-text);
    border-radius: 999px;
    cursor: pointer;
    font-weight: 800;
    font-size: 1.1rem;
    line-height: 1;
    margin-bottom: 8px;
    transition: background 0.2s ease;
}

.order-close:hover {
    background: #3a3a3a;
}

.order-head h2 {
    font-size: 1.45rem;
    line-height: 1.05;
    font-weight: 800;
    color: var(--app-text);
}

.order-head p {
    margin-top: 4px;
    font-size: 0.72rem;
    color: var(--app-muted);
}

.order-list {
    margin-top: 16px;
    list-style: none;
    display: grid;
    gap: 10px;
    overflow: auto;
    padding-right: 2px;
}

.order-item {
    border-radius: 14px;
    border: 1px solid var(--app-line);
    background: var(--app-card);
    padding: 12px;
    display: grid;
    gap: 8px;
}

.order-item-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.order-item-head strong {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--app-text);
}

.order-item-head span {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--app-gold);
}

.qty-control {
    display: inline-flex;
    align-items: center;
    align-self: flex-start;
    gap: 6px;
    background: #1a1a1a;
    border-radius: 999px;
    border: 1px solid var(--app-line);
    padding: 2px;
}

.qty-btn {
    width: 32px;
    height: 32px;
    border-radius: 999px;
    border: 0;
    background: #2e2e2e;
    color: var(--app-text);
    cursor: pointer;
    font-weight: 800;
    transition: background 0.15s ease;
}

.qty-btn:hover {
    background: #3a3a3a;
}

.qty-btn.plus {
    background: var(--app-accent);
    color: #ffffff;
}

.qty-btn.plus:hover {
    background: var(--app-accent-hover);
}

.qty-value {
    width: 18px;
    text-align: center;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--app-text);
}

.order-note {
    margin-top: 12px;
    padding-top: 14px;
    border-top: 1px solid var(--app-line);
    color: var(--app-muted);
    font-size: 0.73rem;
    line-height: 1.4;
}

.order-total {
    margin-top: auto;
    border-top: 1px solid var(--app-line);
    padding-top: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.order-total span {
    font-size: 0.78rem;
    color: var(--app-muted);
}

.order-total strong {
    font-size: 1.35rem;
    line-height: 1;
    font-weight: 800;
    color: var(--app-gold);
}

.done-btn {
    margin-top: 12px;
    border-radius: 16px;
    background: var(--app-accent);
    color: #ffffff;
    font-family: "Outfit", system-ui, sans-serif;
    font-weight: 800;
    text-align: center;
    padding: 16px 14px;
    border: none;
    font-size: 0.95rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 4px 16px rgba(103, 155, 65, 0.3);
}

.done-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(103, 155, 65, 0.4);
}

/* ═══════════════════════════════════════════════
   Cart Overlay
   ═══════════════════════════════════════════════ */

.cart-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    border: 0;
    padding: 0;
    z-index: 1001;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
}

body.cart-open {
    overflow: hidden;
}

body.cart-open .cart-overlay {
    opacity: 1;
    pointer-events: auto;
}

/* ═══════════════════════════════════════════════
   Product Sheet (Bottom sheet)
   ═══════════════════════════════════════════════ */

.product-sheet-overlay {
    position: fixed;
    inset: 0;
    z-index: 1100;
    background: rgba(0, 0, 0, 0.55);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.24s ease;
}

.product-sheet {
    position: fixed;
    left: 50%;
    bottom: 0;
    transform: translate(-50%, 100%);
    width: min(640px, calc(100vw - 14px));
    max-height: 84dvh;
    border-radius: 28px 28px 0 0;
    background: var(--app-card);
    border: 1px solid var(--app-line);
    box-shadow: 0 -12px 36px rgba(0, 0, 0, 0.4);
    z-index: 1101;
    opacity: 0;
    pointer-events: none;
    transition: transform 0.3s ease, opacity 0.3s ease;
    overflow: hidden;
}

.product-sheet.is-open {
    transform: translate(-50%, 0);
    opacity: 1;
    pointer-events: auto;
}

.product-sheet-overlay.is-open {
    opacity: 1;
    pointer-events: auto;
}

.sheet-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 14px 16px;
    border-bottom: 1px solid var(--app-line);
}

.sheet-close {
    width: 40px;
    height: 40px;
    border-radius: 999px;
    border: 1px solid var(--app-line);
    background: var(--app-card);
    color: var(--app-text);
    cursor: pointer;
    font-weight: 800;
    transition: background 0.2s ease;
}

.sheet-close:hover {
    background: #3a3a3a;
}

.sheet-title {
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--app-muted);
}

.sheet-body {
    padding: 16px;
    overflow: auto;
    max-height: calc(84dvh - 64px);
}

.sheet-product {
    text-align: center;
    margin-bottom: 14px;
}

.sheet-product img {
    width: 100px;
    height: 100px;
    object-fit: contain;
    margin: 0 auto;
    filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.4));
}

.sheet-product h3 {
    margin-top: 8px;
    font-size: 1.55rem;
    line-height: 1.05;
    font-weight: 800;
    color: var(--app-text);
}

.sheet-product p {
    margin-top: 4px;
    color: var(--app-gold);
    font-weight: 800;
}

.sheet-options {
    list-style: none;
    display: grid;
    gap: 8px;
}

.sheet-option {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 12px;
    border: 1px solid var(--app-line);
    background: rgba(255, 255, 255, 0.03);
}

.sheet-option img {
    width: 28px;
    height: 28px;
    object-fit: contain;
}

.sheet-option-copy strong {
    display: block;
    font-size: 0.78rem;
    color: var(--app-text);
}

.sheet-option-copy span {
    display: block;
    font-size: 0.7rem;
    color: var(--app-muted);
}

.sheet-stepper {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.sheet-stepper button {
    width: 32px;
    height: 32px;
    border: 1px solid var(--app-line);
    border-radius: 999px;
    background: #2e2e2e;
    color: var(--app-text);
    cursor: pointer;
    font-weight: 800;
}

.sheet-stepper button.plus {
    background: var(--app-accent);
    border-color: var(--app-accent);
    color: #ffffff;
}

.sheet-stepper span {
    min-width: 20px;
    text-align: center;
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--app-text);
}

.sheet-actions {
    margin-top: 14px;
    display: flex;
    justify-content: center;
}

.sheet-apply {
    border: none;
    background: var(--app-accent);
    color: #ffffff;
    border-radius: 16px;
    min-height: 48px;
    padding: 0 22px;
    font-size: 0.85rem;
    font-weight: 800;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 4px 14px rgba(103, 155, 65, 0.3);
}

.sheet-apply:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(103, 155, 65, 0.4);
}

/* ═══════════════════════════════════════════════
   Footer
   ═══════════════════════════════════════════════ */

.page-foot {
    margin-top: 10px;
    color: var(--app-muted);
    font-size: 0.72rem;
    text-align: center;
}

.page-foot a {
    color: var(--app-muted);
    transition: color 0.2s ease;
}

.page-foot a:hover {
    color: var(--app-accent);
}

/* ═══════════════════════════════════════════════
   Reveal Animations
   ═══════════════════════════════════════════════ */

.reveal {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.55s ease, transform 0.55s ease;
}

.reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* ═══════════════════════════════════════════════
   Touch Targets
   ═══════════════════════════════════════════════ */

.locale-pill,
.install-chip,
.cart-chip,
.filter-chip,
.add-btn,
.sheet-close,
.sheet-apply,
.done-btn {
    min-height: 44px;
}

/* ═══════════════════════════════════════════════
   Keyframes
   ═══════════════════════════════════════════════ */

@keyframes hotPulse {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-2px); }
}

@keyframes hotBurgerPulse {
    0%, 100% {
        transform: translateY(0);
        box-shadow: 0 8px 28px rgba(103, 155, 65, 0.3);
    }
    50% {
        transform: translateY(-3px);
        box-shadow: 0 14px 40px rgba(103, 155, 65, 0.45);
    }
}

@keyframes cartBump {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-2px) scale(1.04); }
}

/* ═══════════════════════════════════════════════
   RTL Support
   ═══════════════════════════════════════════════ */

html[dir="rtl"] .main-top,
html[dir="rtl"] .order-item-head,
html[dir="rtl"] .order-total,
html[dir="rtl"] .menu-meta,
html[dir="rtl"] .top-actions {
    flex-direction: row-reverse;
}

html[dir="rtl"] .page-heading,
html[dir="rtl"] .order-head,
html[dir="rtl"] .order-note,
html[dir="rtl"] .page-foot,
html[dir="rtl"] .menu-copy,
html[dir="rtl"] .info-card,
html[dir="rtl"] .faq-item summary,
html[dir="rtl"] .faq-item p {
    text-align: right;
}

html[dir="rtl"] .menu-item-card {
    grid-template-columns: minmax(0, 1fr) 80px;
}

html[dir="rtl"] .sheet-option {
    grid-template-columns: auto minmax(0, 1fr) 34px;
}

html[dir="rtl"] .sheet-option-copy {
    text-align: right;
}

html[dir="rtl"] .order-panel {
    right: auto;
    left: 0;
    border-left: 0;
    border-right: 1px solid var(--app-line);
    box-shadow: 16px 0 40px rgba(0, 0, 0, 0.4);
    transform: translateX(-105%);
}

html[dir="rtl"] .order-panel.is-visible {
    transform: translateX(0);
}

/* ═══════════════════════════════════════════════
   Responsive — Tablet
   ═══════════════════════════════════════════════ */

@media (max-width: 1180px) {
    .category-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* ═══════════════════════════════════════════════
   Responsive — Small Tablet
   ═══════════════════════════════════════════════ */

@media (max-width: 900px) {
    .webapp-stage {
        width: min(100%, calc(100% - 1rem));
    }

    .device-screen {
        min-height: calc(100dvh - 16px);
    }

    .menu-grid,
    .info-grid,
    .order-list {
        grid-template-columns: 1fr;
    }

    .order-panel {
        width: min(460px, 100vw);
    }

    .product-sheet {
        width: calc(100vw - 8px);
        max-height: 88dvh;
    }
}

/* ═══════════════════════════════════════════════
   Responsive — Mobile
   ═══════════════════════════════════════════════ */

@media (max-width: 640px) {
    .webapp-stage {
        width: 100%;
        padding: 0;
    }

    .device {
        border-radius: 0;
        border: 0;
        box-shadow: none;
    }

    .device-screen {
        min-height: 100dvh;
    }

    .main-panel {
        padding: 14px 12px calc(80px + env(safe-area-inset-bottom));
    }

    .category-grid {
        grid-template-columns: 1fr;
    }

    .category-card {
        min-height: 140px;
        border-radius: 18px;
    }

    .menu-grid,
    .info-grid {
        grid-template-columns: 1fr;
    }

    .order-panel {
        width: 100vw;
        border-radius: 0;
        padding-bottom: calc(16px + env(safe-area-inset-bottom));
    }

    .product-sheet {
        width: 100vw;
        border-radius: 20px 20px 0 0;
        max-height: 90dvh;
    }
}

/* ═══════════════════════════════════════════════
   Touch Device Overrides
   ═══════════════════════════════════════════════ */

@media (pointer: coarse) {
    .category-card:hover,
    .pop-item:hover,
    .menu-item-card:hover,
    .locale-toggle:hover,
    .install-chip:hover,
    .cart-chip:hover,
    .sheet-apply:hover,
    .done-btn:hover,
    .add-btn:hover {
        transform: none;
        box-shadow: none;
    }

    .reveal {
        transition-duration: 0.34s;
    }
}

/* ═══════════════════════════════════════════════
   Reduced Motion
   ═══════════════════════════════════════════════ */

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation: none !important;
        transition: none !important;
    }

    .reveal {
        opacity: 1;
        transform: none;
    }
}

/* ═══════════════════════════════════════════════
   Image Lightbox
   ═══════════════════════════════════════════════ */

.img-lightbox-overlay {
    position: fixed;
    inset: 0;
    z-index: 2000;
    background: rgba(0, 0, 0, 0.92);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 18px;
    padding: 24px 16px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.28s ease;
    cursor: zoom-out;
}

.img-lightbox-overlay.is-open {
    opacity: 1;
    pointer-events: auto;
}

.img-lightbox-img {
    max-width: min(480px, 88vw);
    max-height: 60dvh;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 20px;
    transform: scale(0.88);
    transition: transform 0.32s cubic-bezier(0.34, 1.56, 0.64, 1);
    filter: drop-shadow(0 24px 48px rgba(0, 0, 0, 0.6));
}

.img-lightbox-overlay.is-open .img-lightbox-img {
    transform: scale(1);
}

.img-lightbox-info {
    text-align: center;
    color: #ffffff;
}

.img-lightbox-info h3 {
    font-size: 1.25rem;
    font-weight: 800;
    letter-spacing: -0.01em;
    line-height: 1.2;
}

.img-lightbox-info p {
    margin-top: 4px;
    font-size: 1rem;
    font-weight: 700;
    color: var(--app-gold);
}

.img-lightbox-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 44px;
    height: 44px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #ffffff;
    font-size: 1.4rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.18s ease;
    line-height: 1;
}

.img-lightbox-close:hover {
    background: rgba(255, 255, 255, 0.22);
}

/* Cursor hint on product images */
.menu-item-card img,
.pop-item img,
.category-card .category-thumb {
    cursor: zoom-in;
}

/* ═══════════════════════════════════════════════
   Light Mode Theme Overrides
   ═══════════════════════════════════════════════ */

body.light-mode {
    --app-bg:       #f7f7f7;
    --app-surface:  #ffffff;
    --app-card:     #ffffff;
    --app-panel:    #ffffff;
    --app-line:     #e2e2e2;
    --app-text:     #111111;
    --app-muted:    #666666;
    
    --shadow-soft: 0 4px 12px rgba(0, 0, 0, 0.08);
}

body.light-mode .bottom-bar {
    background: rgba(255, 255, 255, 0.92);
    border-top: 1px solid rgba(0, 0, 0, 0.08);
}

body.light-mode .category-card {
    background: #f0f0f0;
}

body.light-mode .category-card::after {
    background: rgba(0, 0, 0, 0.05);
    color: var(--app-text);
}

body.light-mode .category-card.hot-burger,
body.light-mode .category-card.hot {
    background: linear-gradient(145deg, #679b41 0%, #527c34 100%);
    color: #ffffff;
}

body.light-mode .locale-pill,
body.light-mode .install-chip,
body.light-mode .theme-toggle {
    background: #ffffff;
    border-color: #d1d1d1;
}

body.light-mode .locale-toggle:hover,
body.light-mode .install-chip:hover,
body.light-mode .theme-toggle:hover {
    background: #f0f0f0;
}
