/* ════════════════════════════════════════════════════════════════════════
   Mnoo storefront — consolidated stylesheet (layout reset + fonts + home +
   menu + product-detail). Loaded once by _MenuLayout.cshtml for every
   store page. Per-page selectors that share a class name across pages
   (.lang-btn, .avail-dot, .btn-back, bare h1) are scoped to their actual
   container so they don't leak across pages now that they share one file.
   ════════════════════════════════════════════════════════════════════════ */

/* ── Reset / layout (was menu-layout.css) ─────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
    font-family: 'Vazirmatn', sans-serif;
    background: var(--bg);
    color: var(--text);
    direction: inherit;
    min-height: 100vh;
    line-height: 1.6;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; }
button { cursor: pointer; font-family: inherit; }

::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--primary); border-radius: 3px; }

#toast-container {
    position: fixed; bottom: 1.5rem; left: 50%; transform: translateX(-50%);
    z-index: 9999; display: flex; flex-direction: column; gap: .5rem; align-items: center;
}
.toast {
    background: var(--card-bg); border: 1px solid var(--border); border-radius: 12px;
    padding: .75rem 1.5rem; font-size: .875rem; box-shadow: var(--shadow);
    animation: fadeUp .3s ease; backdrop-filter: blur(10px);
}
.toast.success { border-color: #22c55e; color: #4ade80; }
.toast.error { border-color: #ef4444; color: #f87171; }
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ── Cached media placeholder (CachedMediaTagHelper + media-cache.js) ──── */
.media-cache-hidden { display: none !important; }
.media-cache-spinner {
    display: flex !important; align-items: center; justify-content: center; gap: 5px;
}
.media-cache-spinner span {
    width: 7px; height: 7px; border-radius: 50%;
    background: var(--primary); animation: media-cache-bounce .9s ease-in-out infinite;
}
.media-cache-spinner span:nth-child(2) { animation-delay: .15s; }
.media-cache-spinner span:nth-child(3) { animation-delay: .30s; }
@keyframes media-cache-bounce {
    0%, 100% { transform: translateY(0); opacity: .5; }
    45% { transform: translateY(-8px); opacity: 1; }
}

/* ── Fonts (also in css/fonts.css, kept standalone for the landing page) ── */
@font-face {
  font-family: 'Vazirmatn';
  font-style: normal;
  font-weight: 300 800;
  font-display: swap;
  src: url('../../fonts/vazirmatn/vazirmatn-arabic.woff2') format('woff2');
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC, U+102E0-102FB, U+10E60-10E7E, U+10EC2-10EC4, U+10EFC-10EFF, U+1EE00-1EE03, U+1EE05-1EE1F, U+1EE21-1EE22, U+1EE24, U+1EE27, U+1EE29-1EE32, U+1EE34-1EE37, U+1EE39, U+1EE3B, U+1EE42, U+1EE47, U+1EE49, U+1EE4B, U+1EE4D-1EE4F, U+1EE51-1EE52, U+1EE54, U+1EE57, U+1EE59, U+1EE5B, U+1EE5D, U+1EE5F, U+1EE61-1EE62, U+1EE64, U+1EE67-1EE6A, U+1EE6C-1EE72, U+1EE74-1EE77, U+1EE79-1EE7C, U+1EE7E, U+1EE80-1EE89, U+1EE8B-1EE9B, U+1EEA1-1EEA3, U+1EEA5-1EEA9, U+1EEAB-1EEBB, U+1EEF0-1EEF1;
}
@font-face {
  font-family: 'Vazirmatn';
  font-style: normal;
  font-weight: 300 800;
  font-display: swap;
  src: url('../../fonts/vazirmatn/vazirmatn-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Vazirmatn';
  font-style: normal;
  font-weight: 300 800;
  font-display: swap;
  src: url('../../fonts/vazirmatn/vazirmatn-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Playfair Display';
  font-style: normal;
  font-weight: 700 800;
  font-display: swap;
  src: url('../../fonts/playfair/playfair-cyrillic.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Playfair Display';
  font-style: normal;
  font-weight: 700 800;
  font-display: swap;
  src: url('../../fonts/playfair/playfair-vietnamese.woff2') format('woff2');
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
@font-face {
  font-family: 'Playfair Display';
  font-style: normal;
  font-weight: 700 800;
  font-display: swap;
  src: url('../../fonts/playfair/playfair-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Playfair Display';
  font-style: normal;
  font-weight: 700 800;
  font-display: swap;
  src: url('../../fonts/playfair/playfair-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ── Home page (was home.css) ─────────────────────────────────────────── */
.hero {
    position: relative; min-height: 100svh;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    text-align: center; padding: 2rem 1rem; overflow: hidden;
}
.hero-bg {
    position: absolute; inset: 0; z-index: 0;
    background: linear-gradient(135deg, color-mix(in srgb, var(--primary) 40%, var(--bg)), var(--bg));
}
.hero-bg video, .hero-bg img {
    width: 100%; height: 100%; object-fit: cover;
    opacity: .25; position: absolute; inset: 0;
}
.hero-bg::after {
    content: ''; position: absolute; inset: 0;
    background: linear-gradient(to top, var(--bg) 10%, transparent 60%);
}
.hero-content { position: relative; z-index: 1; max-width: 600px; }
.store-logo {
    width: 100px; height: 100px; border-radius: 50%; object-fit: cover;
    border: 3px solid var(--primary); box-shadow: 0 0 30px color-mix(in srgb, var(--primary) 40%, transparent);
    margin-bottom: 1.5rem;
}
.store-logo-placeholder {
    width: 100px; height: 100px; border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    display: flex; align-items: center; justify-content: center;
    font-size: 2.5rem; font-weight: 800; margin: 0 auto 1.5rem;
    box-shadow: 0 0 30px color-mix(in srgb, var(--primary) 40%, transparent);
}
.hero-content h1 {
      font-size: clamp(2rem, 5vw, 3.5rem); font-weight: 800; margin-bottom: .5rem;
      color: #fff;
      /* A thick stroke on this heavy weight pushes each glyph's outline wide enough that it
         visually bridges into the gap between words; a thin stroke still outlines the letters
         without that bleed. */
      -webkit-text-stroke: 0.6px var(--primary);
      /* Very light glow in the store color around the title — subtle ambient color, not a hard
         edge, so it can't bridge into the word gaps the way the stroke did at higher widths. */
      text-shadow:
        0 0 10px color-mix(in srgb, var(--primary) 40%, transparent),
        0 0 22px color-mix(in srgb, var(--primary) 22%, transparent);
}
.store-desc { font-size: 1rem; opacity: .75; margin-bottom: 2rem; line-height: 1.8; }
.hero-actions { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }
.btn-primary {
    display: inline-flex; align-items: center; gap: .5rem;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white; padding: .875rem 2rem; border-radius: 50px; border: none;
    font-size: 1rem; font-weight: 600; text-decoration: none;
    box-shadow: 0 4px 20px color-mix(in srgb, var(--primary) 40%, transparent);
    transition: transform .2s, box-shadow .2s;
}
.btn-primary:hover { transform: translateY(-2px);
    box-shadow: 0 6px 30px color-mix(in srgb, var(--primary) 50%, transparent); }
.btn-secondary {
    display: inline-flex; align-items: center; gap: .5rem;
    background: transparent; color: var(--text);
    padding: .875rem 1.75rem; border-radius: 50px;
    border: 1px solid var(--border); font-size: 1rem; font-weight: 500;
    text-decoration: none; transition: background .2s, border-color .2s;
}
.btn-secondary:hover { background: color-mix(in srgb, var(--primary) 10%, transparent); border-color: var(--primary); }
.info-bar {
    position: relative; z-index: 1; margin-top: 3rem;
    display: flex; gap: 1.5rem; justify-content: center; flex-wrap: wrap;
    font-size: .875rem; opacity: .8;
}
.info-item { display: flex; align-items: center; gap: .4rem; transition: color .2s; }
a.info-item:hover { color: var(--primary); }
.info-icon { flex-shrink: 0; opacity: 1; color: var(--primary); }
.powered-by {
    position: absolute; bottom: 1rem; left: 50%; transform: translateX(-50%);
    font-size: .75rem; opacity: .4; z-index: 1;
}
.mw-section { padding: 3rem 1.25rem; max-width: 900px; margin: 0 auto; }
.mw-section h2 { font-size: clamp(1.5rem, 3vw, 2rem); font-weight: 800; margin-bottom: 1rem; color: var(--accent); text-align: center; }
.mw-section p { font-size: 1rem; line-height: 1.9; opacity: .85; white-space: pre-line; text-align: center; }
.mw-gallery {
    display: grid; gap: 1rem; margin-top: 1.5rem;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}
.mw-gallery img {
    width: 100%; aspect-ratio: 4/3; object-fit: cover; border-radius: 16px;
    border: 1px solid var(--border);
}
.mw-contact { display: flex; flex-direction: column; gap: .75rem; align-items: center; margin-top: 1rem; }
.mw-contact a, .mw-contact span {
    font-size: .95rem; opacity: .85; display: inline-flex; align-items: center; gap: .5rem;
}
.mw-contact a:hover { color: var(--accent); }

/* Home language switcher — scoped under .lang-switcher (Menu page has its own .lang-switch below) */
.lang-switcher {
    display: flex; gap: .4rem; justify-content: center; margin-bottom: 1.5rem;
}
.lang-switcher .lang-btn {
    background: transparent; border: 1px solid var(--border); color: var(--text);
    font-family: inherit; font-size: .78rem; font-weight: 600;
    padding: .3rem .85rem; border-radius: 20px; cursor: pointer;
    transition: background .2s, border-color .2s, color .2s;
    opacity: .65;
}
.lang-switcher .lang-btn:hover { opacity: 1; border-color: var(--primary); }
.lang-switcher .lang-btn.active {
    background: var(--primary); border-color: var(--primary);
    color: white; opacity: 1;
}

/* Home — social links (was an inline <style> block in Home.cshtml) */
.social-links-hero {
    display: flex;
    gap: 1.25rem;
    justify-content: center;
    align-items: center;
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
}
.social-icon {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    color: #fff;
    transition: transform 0.2s ease, opacity 0.2s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}
.social-icon:hover {
    transform: translateY(-3px);
    opacity: 0.9;
}
.social-icon.whatsapp {
    background: linear-gradient(135deg, #25D366, #128C7E);
}
.social-icon.instagram {
    background: radial-gradient(circle at 30% 107%, #fdf497 0%, #fdf497 5%, #fd5949 45%,#d6249f 60%,#285AEB 90%);
}
.social-icon svg {
    width: 22px;
    height: 22px;
}

/* ── Menu page (was menu.css) ─────────────────────────────────────────── */
.page-header {
    background: color-mix(in srgb, var(--bg) 88%, transparent);
    backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
}
.header-main {
    display: flex; align-items: center; gap: .75rem;
    padding: .75rem 1rem;
}
.btn-back {
    width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--border);
    background: transparent; color: var(--text); display: flex; align-items: center;
    justify-content: center; cursor: pointer; flex-shrink: 0; transition: background .2s;
    text-decoration: none;
}
.btn-back:hover { background: color-mix(in srgb, var(--primary) 15%, transparent); }
.store-title {
    flex: 1; text-align: center;
    font-family: 'Playfair Display', 'Vazirmatn', serif;
    font-size: clamp(1.1rem, 4vw, 1.5rem); font-weight: 800;
    background: linear-gradient(135deg, var(--text) 40%, var(--accent));
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.header-actions { display: flex; align-items: center; gap: .5rem; flex-shrink: 0; }
.lang-switch {
    display: flex; gap: 2px; padding: 3px; border-radius: 10px;
    background: color-mix(in srgb, var(--primary) 10%, transparent);
    border: 1px solid var(--border);
}
.lang-switch .lang-btn {
    background: transparent; border: none; color: var(--text); opacity: .5;
    font-family: inherit; font-size: .72rem; font-weight: 700; padding: .2rem .45rem;
    border-radius: 7px; cursor: pointer; transition: all .2s; min-width: 26px;
}
.lang-switch .lang-btn.active { background: var(--primary); color: white; opacity: 1; }
.btn-search {
    width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--border);
    background: transparent; color: var(--text); display: flex; align-items: center;
    justify-content: center; cursor: pointer; transition: background .2s, border-color .2s;
}
.btn-search:hover { background: color-mix(in srgb, var(--primary) 15%, transparent); border-color: var(--primary); }

/* Category filter — base (menu.css) + page overrides (was an inline <style> block in Menu.cshtml) */
.cat-filter {
    position: sticky; top: 0; z-index: 200;
    display: flex;
    flex-direction: column;
    padding: 0.75rem 1rem;
    background: color-mix(in srgb, var(--bg) 95%, var(--text) 5%);
    backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
}
.cat-row {
    display: flex;
    gap: 0.5rem;
    overflow-x: auto;
    padding-bottom: 0.25rem;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}
.cat-row + .cat-row {
    padding-top: 0.75rem !important;
    margin-top: 0.5rem;
    border-top: 1px solid color-mix(in srgb, var(--border) 40%, transparent);
}
.cat-row::-webkit-scrollbar { display: none; }
.cat-row {
    -ms-overflow-style: none;
    scrollbar-width: none;
}
.cat-pill {
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: 9999px;
    background: color-mix(in srgb, var(--primary) 6%, transparent);
    color: var(--text);
    border: 1px solid var(--border);
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: inherit;
}
.cat-pill.has-children::after {
    content: '›';
    margin-inline-start: 0.4rem;
    font-size: 1.1em;
    line-height: 1;
    opacity: 0.7;
}
.cat-pill:hover {
    background: color-mix(in srgb, var(--primary) 12%, transparent);
    color: var(--primary);
    border-color: var(--primary);
}
.cat-pill.active {
    background: var(--primary) !important;
    color: #fff !important;
    border-color: var(--primary) !important;
    box-shadow: 0 4px 12px color-mix(in srgb, var(--primary) 25%, transparent) !important;
}
#catRow1 .cat-pill {
    font-size: 0.8rem;
    padding: 0.4rem 0.875rem;
    background: transparent;
    border-color: color-mix(in srgb, var(--border) 60%, transparent);
}
#catRow1 .cat-pill.active {
    background: transparent !important;
    color: var(--primary) !important;
    border-color: var(--primary) !important;
    box-shadow: none !important;
}
#catRow2 .cat-pill {
    font-size: 0.75rem;
    padding: 0.3rem 0.75rem;
    background: transparent;
    border-color: transparent;
}
#catRow2 .cat-pill.active {
    color: var(--primary) !important;
    border-color: var(--primary) !important;
    background: color-mix(in srgb, var(--primary) 8%, transparent) !important;
}

/* ── Products grid ───────────────────────────────────── */
.menu-content { padding: 1rem 1rem 6rem; }
.cat-section { margin-bottom: 3rem; scroll-margin-top: 130px; }
.cat-section-title {
    font-size: 1.1rem; font-weight: 700; margin-bottom: 1rem;
    padding-bottom: .5rem; border-bottom: 1px solid var(--border);
    opacity: .7;
}
.products-grid {
    display: grid; gap: .9rem;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
}

/* ── Product card ────────────────────────────────────── */
.product-card {
    background: var(--card-bg); border: 1px solid var(--border); border-radius: 18px;
    overflow: hidden; cursor: pointer; text-decoration: none; color: inherit;
    display: flex; flex-direction: column;
    transition: transform .25s, box-shadow .25s, border-color .25s;
    position: relative;
}
.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 50px color-mix(in srgb, var(--primary) 32%, transparent);
    border-color: color-mix(in srgb, var(--primary) 65%, transparent);
}
.product-card.unavailable { opacity: .55; }
.product-img-wrap .avail-dot {
    position: absolute; top: .65rem; left: .65rem; z-index: 2;
    width: 10px; height: 10px; border-radius: 50%;
    box-shadow: 0 0 6px currentColor;
}
.product-img-wrap .avail-dot.on  { color: #22c55e; background: #22c55e; }
.product-img-wrap .avail-dot.off { color: #ef4444; background: #ef4444; }
.product-img-wrap { position: relative; aspect-ratio: 4/5; overflow: hidden; }
.product-img {
    width: 100%; height: 100%; object-fit: cover;
    transition: transform .4s;
}
.product-card:hover .product-img { transform: scale(1.04); }
.product-img-placeholder {
    width: 100%; height: 100%;
    background: linear-gradient(135deg,
        color-mix(in srgb, var(--primary) 12%, var(--bg)),
        color-mix(in srgb, var(--secondary) 12%, var(--bg)));
    display: flex; align-items: center; justify-content: center;
    font-size: 2.5rem; opacity: .4;
}
.badge-popular-img {
    position: absolute; top: .6rem; right: .6rem;
    background: linear-gradient(135deg, #ec4899, #f43f5e);
    color: white; font-size: .65rem; font-weight: 700;
    padding: .2rem .6rem; border-radius: 20px;
    box-shadow: 0 2px 8px rgba(244,63,94,.4);
}
.badge-highlighted-img {
    position: absolute; top: .6rem; right: .6rem;
    background: linear-gradient(135deg, #f59e0b, #f97316);
    color: white; font-size: .65rem; font-weight: 700;
    padding: .2rem .6rem; border-radius: 20px;
    box-shadow: 0 2px 8px rgba(245,158,11,.4);
}
.product-body { padding: .9rem; flex: 1; display: flex; flex-direction: column; }
.product-name { font-weight: 700; font-size: .975rem; line-height: 1.3; margin-bottom: .3rem; }
.product-desc {
    font-size: .8rem; opacity: .6; line-height: 1.6; margin-bottom: .6rem;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.product-footer { display: flex; align-items: center; justify-content: space-between; margin-top: auto; }
.product-price { font-weight: 800; font-size: 1rem; color: var(--primary) !important; }
.product-price-from { font-size: .75rem; font-weight: 500; opacity: .7; }
.product-more {
    width: 28px; height: 28px; border-radius: 50%;
    background: color-mix(in srgb, var(--primary) 15%, transparent) !important;
    display: flex; align-items: center; justify-content: center;
    color: var(--primary) !important; font-size: 1rem;
}
.product-cals { font-size: .72rem; opacity: .5; margin-top: .3rem; }

/* ── Inline search bar ───────────────────────────────── */
.inline-search-bar {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border);
}
.inline-search-wrap {
    position: relative;
    display: flex;
    align-items: center;
    background: color-mix(in srgb, var(--primary) 6%, transparent);
    border: 1px solid var(--border);
    border-radius: 0.75rem;
    padding: 0.25rem 0.75rem;
    transition: border-color 0.2s;
}
.inline-search-wrap:focus-within { border-color: var(--primary); }
.inline-search-wrap svg { opacity: .4; flex-shrink: 0; }
.inline-search-input {
    width: 100%;
    background: transparent;
    border: none;
    outline: none;
    color: var(--text);
    padding: 0.5rem 0.5rem 0.5rem 2rem;
    font-size: 0.875rem;
    font-family: inherit;
}
.inline-search-input::placeholder { opacity: .35; }
.inline-search-clear {
    position: absolute;
    left: 0.75rem;
    background: transparent;
    border: none;
    color: var(--text);
    opacity: 0.5;
    cursor: pointer;
    display: none;
}
.inline-search-clear.visible { display: block; }

/* ── Search overlay (legacy, currently unused markup but kept for parity) ── */
.search-overlay {
    position: fixed; inset: 0; z-index: 500;
    background: rgba(0,0,0,.75);
    backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
    display: flex; flex-direction: column;
    opacity: 0; pointer-events: none; transition: opacity .25s;
}
.search-overlay.open { opacity: 1; pointer-events: auto; }
.search-header {
    padding: 1rem 1rem .75rem;
    border-bottom: 1px solid rgba(255,255,255,.08);
}
.search-input-row {
    display: flex; align-items: center; gap: .75rem;
    background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.12);
    border-radius: 16px; padding: .75rem 1rem;
    transition: border-color .2s;
}
.search-input-row:focus-within { border-color: var(--primary); }
.search-input-row svg { opacity: .45; flex-shrink: 0; }
.search-input {
    flex: 1; background: transparent; border: none; outline: none;
    color: var(--text); font-family: inherit; font-size: 1.1rem; font-weight: 500;
}
.search-input::placeholder { opacity: .35; }
.btn-close-search {
    background: transparent; border: none; color: var(--text); opacity: .5;
    cursor: pointer; font-size: 1.4rem; line-height: 1; transition: opacity .2s;
    flex-shrink: 0;
}
.btn-close-search:hover { opacity: 1; }
.search-body { flex: 1; overflow-y: auto; padding: .5rem 1rem 2rem; }
.search-empty {
    text-align: center; padding: 3rem 1rem; opacity: .35;
    font-size: .95rem;
}
.search-result-item {
    display: flex; gap: .85rem; align-items: center;
    padding: .85rem .75rem; border-radius: 14px; cursor: pointer;
    transition: background .15s; text-decoration: none; color: inherit;
}
.search-result-item:hover { background: rgba(255,255,255,.06); }
.search-result-img {
    width: 54px; height: 54px; border-radius: 10px; object-fit: cover; flex-shrink: 0;
    background: color-mix(in srgb, var(--primary) 15%, var(--bg));
}
.search-result-name { font-weight: 600; font-size: .9rem; }
.search-result-price { font-size: .8rem; color: var(--accent); margin-top: .2rem; }

/* ── FABs ────────────────────────────────────────────── */
.fab-group {
    position: fixed; left: 1.25rem; bottom: 1.5rem; z-index: 400;
    display: flex; flex-direction: column; gap: .7rem;
}
.fab {
    width: 50px; height: 50px; border-radius: 50%; border: none;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; box-shadow: 0 4px 20px rgba(0,0,0,.35);
    transition: transform .2s, box-shadow .2s; text-decoration: none;
}
.fab:hover { transform: scale(1.1); box-shadow: 0 8px 30px rgba(0,0,0,.4); }
.fab-wa { background: #25d366; color: white; }
.fab-pdf { background: var(--primary); color: white; }

@media (max-width: 480px) {
    .products-grid:not(.layout-list) { grid-template-columns: repeat(2, 1fr); }
    .products-grid:not(.layout-list) .product-body { padding: .7rem; }
}
@media (min-width: 1024px) {
    .menu-content { max-width: 1200px; margin: 0 auto; }
    .header-main { max-width: 1200px; margin: 0 auto; }
    .cat-row { max-width: 1200px; margin: 0 auto; }
    .inline-search-wrap { max-width: 800px; margin: 0 auto; }
}

/* ── Product list layout (Store.MenuLayout = List) ────────────────────────
   Opt-in alternative to the grid above: each row is a small image + info,
   the image docked to whichever side is the writing direction's start edge.
   Pure CSS — flexbox respects the page's dir (body { direction: inherit }),
   and .product-img-wrap is first in the markup, so it lands on the right
   for RTL stores and the left for LTR ones automatically. */
.products-grid.layout-list { display: grid; gap: .75rem; grid-template-columns: 1fr; }
@media (min-width: 640px)  { .products-grid.layout-list { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .products-grid.layout-list { grid-template-columns: repeat(3, 1fr); } }
.layout-list .product-card { flex-direction: row; align-items: stretch; }
.layout-list .product-img-wrap {
    flex: 0 0 104px; width: 104px; aspect-ratio: 1/1; border-radius: 14px;
}
@media (min-width: 480px) { .layout-list .product-img-wrap { flex-basis: 128px; width: 128px; } }
@media (max-width: 480px) { .layout-list .product-img-wrap { flex-basis: 88px; width: 88px; } }
.layout-list .product-img-placeholder { font-size: 1.8rem; border-radius: 14px; }
.layout-list .product-img-wrap .avail-dot { top: .4rem; left: .4rem; width: 8px; height: 8px; }
.layout-list .badge-popular-img, .layout-list .badge-highlighted-img {
    top: .3rem; right: .3rem; font-size: .58rem; padding: .15rem .5rem;
}
.layout-list .product-body { padding: .7rem .9rem; min-width: 0; }
@media (max-width: 480px) { .layout-list .product-body { padding: .6rem .75rem; } }

/* ── Product detail page (was product-detail.css) ─────────────────────── */
.pd-header {
    position: sticky; top: 0; z-index: 100;
    display: flex; align-items: center; gap: .75rem; padding: .75rem 1rem;
    background: color-mix(in srgb, var(--bg) 88%, transparent);
    backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
}
.pd-lang-switch {
    display: flex; gap: 2px; padding: 3px; border-radius: 10px; flex-shrink: 0;
    background: color-mix(in srgb, var(--primary) 10%, transparent);
    border: 1px solid var(--border);
}
.pd-lang-btn {
    background: transparent; border: none; color: var(--text); opacity: .5;
    font-family: inherit; font-size: .72rem; font-weight: 700;
    padding: .2rem .45rem; border-radius: 7px; cursor: pointer;
    transition: all .2s; min-width: 26px;
}
.pd-lang-btn.active { background: var(--primary); color: white; opacity: 1; }
.pd-header-title {
    flex: 1; font-size: 1rem; font-weight: 700;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    opacity: 0; transition: opacity .3s;
}
.pd-header-title.visible { opacity: 1; }

/* ── Media area ───────────────────────────────────── */
.media-wrap {
    position: relative; width: 100%; aspect-ratio: 16/9;
    background: #0a0a12; overflow: hidden;
}
@media (min-width: 768px) {
    .media-wrap { aspect-ratio: 21/9; max-height: 520px; }
}

/* Image-only product media (no video): portrait card, capped width, centered. */
.media-wrap.media-wrap--portrait {
    aspect-ratio: 4/5;
    max-width: 480px;
    margin: 0 auto;
}
@media (min-width: 768px) {
    .media-wrap.media-wrap--portrait { aspect-ratio: 4/5; max-width: 560px; max-height: none; }
}

.media-img {
    width: 100%; height: 100%; object-fit: cover;
    display: block; cursor: zoom-in;
}

/* ── Image lightbox (click a product image to open, zoom/pan, back-button closes) ── */
.img-lightbox {
    position: fixed; inset: 0; z-index: 1000;
    background: rgba(0,0,0,.92);
    display: flex; align-items: center; justify-content: center;
    opacity: 0; pointer-events: none; transition: opacity .25s;
}
.img-lightbox.open { opacity: 1; pointer-events: auto; }
.lightbox-stage {
    width: 100%; height: 100%;
    display: flex; align-items: center; justify-content: center;
    overflow: hidden; touch-action: none;
    cursor: zoom-in;
}
.lightbox-stage.zoomed { cursor: grab; }
.lightbox-stage.dragging { cursor: grabbing; }
.lightbox-img {
    width: 100%; max-width: 750px;
    height: auto; max-height: 100vh;
    object-fit: contain;
    will-change: transform;
    user-select: none; -webkit-user-select: none;
}
.lightbox-close {
    position: absolute; top: 1rem; left: 1rem; z-index: 1001;
    width: 40px; height: 40px; border-radius: 50%;
    background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.2);
    color: white; display: flex; align-items: center; justify-content: center;
    cursor: pointer; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
    transition: background .2s;
}
.lightbox-close:hover { background: rgba(255,255,255,.22); }

.vid-wrap {
    position: relative; width: 100%; height: 100%;
}
.vid-el {
    width: 100%; height: 100%; object-fit: cover; display: block;
    background: #000;
}
.vid-controls {
    position: absolute; inset: 0;
    display: flex; flex-direction: column; justify-content: flex-end;
    background: linear-gradient(to top, rgba(0,0,0,.75) 0%, transparent 55%);
    opacity: 0; transition: opacity .3s;
}
.vid-wrap:hover .vid-controls,
.vid-wrap.paused .vid-controls { opacity: 1; }
.vid-play-center {
    position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
    pointer-events: none;
}
.vid-play-btn-big {
    width: 72px; height: 72px; border-radius: 50%;
    background: rgba(255,255,255,.15); backdrop-filter: blur(8px);
    border: 2px solid rgba(255,255,255,.3);
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; pointer-events: auto;
    transition: background .2s, transform .15s;
    color: white;
}
.vid-play-btn-big:hover { background: rgba(255,255,255,.25); transform: scale(1.08); }
.vid-bottom { padding: .75rem 1rem 1rem; display: flex; flex-direction: column; gap: .5rem; }
.vid-progress-wrap { position: relative; height: 4px; cursor: pointer; }
.vid-progress-bg {
    height: 4px; background: rgba(255,255,255,.2); border-radius: 2px;
    position: relative; overflow: hidden;
}
.vid-progress-fill {
    height: 100%; background: var(--accent); border-radius: 2px;
    width: 0%; transition: width .1s linear;
}
.vid-progress-wrap::after {
    content: ''; position: absolute; inset: -6px 0;
}
.vid-time-row { display: flex; align-items: center; gap: .75rem; }
.vid-btn {
    background: transparent; border: none; color: white;
    display: flex; align-items: center; cursor: pointer; padding: 0;
    transition: opacity .2s; opacity: .85;
}
.vid-btn:hover { opacity: 1; }
.vid-time { font-size: .78rem; color: rgba(255,255,255,.7); flex: 1; }
.vid-volume { display: flex; align-items: center; gap: .4rem; }
.vol-slider {
    width: 60px; height: 3px; accent-color: var(--accent);
    cursor: pointer; opacity: .8;
}

.media-tabs {
    position: absolute; top: .75rem; right: .75rem; z-index: 10;
    display: flex; gap: .35rem;
}
.media-tab {
    background: rgba(0,0,0,.55); backdrop-filter: blur(6px);
    border: 1px solid rgba(255,255,255,.15); color: white;
    font-family: inherit; font-size: .72rem; font-weight: 600;
    padding: .3rem .7rem; border-radius: 20px; cursor: pointer;
    transition: background .2s, border-color .2s;
}
.media-tab.active { background: var(--primary); border-color: var(--primary); }

/* ── Product body ──────────────────────────────────── */
.pd-body {
    max-width: 780px; margin: 0 auto; padding: 1.5rem 1rem 6rem;
}

.avail-row {
    display: flex; align-items: center; gap: .5rem; margin-bottom: 1rem;
}
.avail-indicator {
    display: flex; align-items: center; gap: .4rem;
    font-size: .82rem; font-weight: 600;
}
.avail-indicator .avail-dot {
    width: 9px; height: 9px; border-radius: 50%;
}
.avail-indicator .avail-dot.on  { background: #22c55e; box-shadow: 0 0 6px #22c55e; }
.avail-indicator .avail-dot.off { background: #ef4444; box-shadow: 0 0 6px #ef4444; }

.pd-name {
    font-family: 'Playfair Display', 'Vazirmatn', serif;
    font-size: clamp(1.7rem, 5vw, 2.5rem); font-weight: 800;
    line-height: 1.2; margin-bottom: .75rem;
}
.pd-badges { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: 1rem; }
.badge {
    font-size: .72rem; font-weight: 600; padding: .25rem .7rem;
    border-radius: 20px;
}
.badge-popular { background: linear-gradient(135deg, rgba(236,72,153,.2), rgba(244,63,94,.2)); color: #fda4af; }
.badge-highlighted { background: linear-gradient(135deg, rgba(245,158,11,.2), rgba(249,115,22,.2)); color: #fbbf24; }
.badge-calories { background: rgba(6,182,212,.12); color: var(--accent); }
.badge-prep { background: rgba(139,92,246,.12); color: #a78bfa; }

.pd-desc {
    font-size: 1rem; opacity: .75; line-height: 1.9; margin-bottom: 1.75rem;
}

.price-lines-label {
    font-size: .8rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
    opacity: .5; margin-bottom: .75rem;
}
.price-lines-grid { display: flex; flex-direction: column; gap: .6rem; margin-bottom: 1.75rem; }
.price-line-card {
    display: flex; align-items: center; justify-content: space-between;
    background: color-mix(in srgb, var(--primary) 6%, transparent);
    border: 1px solid var(--border); border-radius: 14px;
    padding: .85rem 1.1rem; cursor: pointer; transition: all .2s;
}
.price-line-card:hover, .price-line-card.selected {
    border-color: var(--primary);
    background: color-mix(in srgb, var(--primary) 12%, transparent);
    box-shadow: 0 0 16px color-mix(in srgb, var(--primary) 20%, transparent);
}
.price-line-card.unavail { opacity: .45; cursor: not-allowed; }
.pl-left { display: flex; flex-direction: column; gap: .2rem; }
.pl-name { font-weight: 700; font-size: .95rem; }
.pl-unit { font-size: .78rem; opacity: .55; }
.pl-desc { font-size: .78rem; opacity: .55; font-style: italic; }
.pl-price { font-size: 1.2rem; font-weight: 800; color: var(--primary); }

.allergy-section { margin-bottom: 1.5rem; }
.allergy-label { font-size: .8rem; font-weight: 700; opacity: .5; margin-bottom: .5rem; letter-spacing: .05em; text-transform: uppercase; }
.allergy-tags { display: flex; flex-wrap: wrap; gap: .4rem; }
.allergy-tag {
    font-size: .78rem; padding: .25rem .8rem; border-radius: 20px;
    border: 1px solid color-mix(in srgb, #f59e0b 40%, transparent);
    color: #fbbf24; background: color-mix(in srgb, #f59e0b 8%, transparent);
}

.nutrition-section { margin-bottom: 1.75rem; }
.nutrition-label { font-size: .8rem; font-weight: 700; opacity: .5; margin-bottom: .75rem; letter-spacing: .05em; text-transform: uppercase; }
.nutrition-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: .5rem;
}
.nutrition-item {
    background: color-mix(in srgb, var(--primary) 5%, transparent);
    border: 1px solid var(--border); border-radius: 12px;
    padding: .6rem .75rem; text-align: center;
}
.nutrition-val { font-weight: 700; font-size: .95rem; }
.nutrition-key { font-size: .72rem; opacity: .5; margin-top: .15rem; }

.ar-btn {
    display: inline-flex; align-items: center; gap: .5rem;
    background: color-mix(in srgb, var(--accent) 12%, transparent);
    border: 1px solid var(--accent); color: var(--accent);
    border-radius: 12px; padding: .7rem 1.25rem;
    font-family: inherit; font-size: .9rem; font-weight: 600;
    cursor: pointer; transition: background .2s; margin-bottom: 1.5rem;
}
.ar-btn:hover { background: color-mix(in srgb, var(--accent) 20%, transparent); }
#arModelWrap { margin-bottom: 1.5rem; border-radius: 16px; overflow: hidden; aspect-ratio: 1; }

.action-bar {
    position: fixed; bottom: 0; left: 0; right: 0; z-index: 200;
    background: color-mix(in srgb, var(--bg) 92%, transparent);
    backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid var(--border);
    padding: .85rem 1rem; display: flex; gap: .75rem;
    max-width: 780px; margin: 0 auto;
}
.btn-wa {
    flex: 1; display: flex; align-items: center; justify-content: center; gap: .5rem;
    background: #25d366; color: white; border: none; border-radius: 14px;
    padding: .95rem; font-size: .975rem; font-weight: 700; font-family: inherit;
    cursor: pointer; transition: opacity .2s; box-shadow: 0 4px 20px rgba(37,211,102,.3);
}
.btn-wa:hover { opacity: .9; }
.btn-wa:disabled { opacity: .4; cursor: not-allowed; }
