/* ==========================================================
   سنا جرانولا — واجهة المتجر: «رف المونة»
   حيط مدهون فيروزي · رفوف خشب · لاصق ورقي مكتوب بالماركر
   المواد أربع فقط: الحيط، الخشب، اللاصق/الورق، الحبر — والعسل لون الأزرار
   ========================================================== */

@font-face { font-family: "Aref Ruqaa"; font-weight: 400; font-display: swap; src: url("/fonts/aref-ruqaa-400-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; }
@font-face { font-family: "Aref Ruqaa"; font-weight: 400; font-display: swap; src: url("/fonts/aref-ruqaa-400-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: "Aref Ruqaa"; font-weight: 700; font-display: swap; src: url("/fonts/aref-ruqaa-700-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; }
@font-face { font-family: "Aref Ruqaa"; font-weight: 700; font-display: swap; src: url("/fonts/aref-ruqaa-700-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: "Readex Pro"; font-weight: 160 700; font-display: swap; src: url("/fonts/readex-pro-var-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; }
@font-face { font-family: "Readex Pro"; font-weight: 160 700; font-display: swap; src: url("/fonts/readex-pro-var-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; }

:root {
    /* الحيط: زهري فاتح من مرجاني «Granola» بالشعار، مع وشحات ناعمة */
    --wall: #F6DED6;
    --wash-a: rgba(255, 245, 238, 0.75);
    --wash-b: rgba(227, 131, 107, 0.34);
    --wash-c: rgba(232, 150, 42, 0.18);
    --on-wall: #2A2620;
    --on-wall-soft: #5A5140;
    --on-wall-faint: rgba(42, 38, 32, 0.28);

    /* الزيتوني من «Sana» في الشعار: الهيدر والشريط السفلي والظلال والأشرطة */
    --leaf: #5E6B27;
    --leaf-deep: #3F4A1C;
    --leaf-night: #2F3815;
    --on-leaf: #F4EDD6;
    --on-leaf-soft: #D4D9BC;

    /* اللاصق والورق: أفتح من الحيط حتى يبينوا عليه */
    --tape: #FAF1D4;
    --tape-deep: #EFE2B8;
    --paper: #FCF8EC;
    --paper-deep: #F3EBD3;
    --paper-rule: rgba(27, 26, 23, 0.16);

    /* الحبر */
    --ink: #1B1A17;
    --ink-soft: #4B4535;

    /* الخشب */
    --wood: #9A6236;
    --wood-top: #BA8150;
    --wood-deep: #5C3A1F;

    /* العسل: لون الفعل الوحيد */
    --honey: #E8962A;
    --honey-hi: #F2A944;

    --whatsapp: #0F7F43;
    --danger: #B3261E;

    --font-hand: "Aref Ruqaa", "Readex Pro", serif;
    --font-body: "Readex Pro", "Segoe UI", Tahoma, sans-serif;

    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
    --header-h: 64px;
    --tabbar-h: 62px;
    --wrap: 1180px;
    --gutter: 20px;

    /* أبعاد الرف: عرض المرطبان يحدد مكان اللوح */
    --jar-w: min(52vw, 230px);
    --jar-h: var(--jar-w);
    --plank: 22px;

    --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.36 0 0 0 0 0.28 0 0 0 0 0.18 0 0 0 .32 -.14'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

*,
*::before,
*::after { box-sizing: border-box; }

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
    background: var(--wall);
    overflow-x: clip;
}

body {
    margin: 0;
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.75;
    color: var(--on-wall);
    background-image: var(--grain);
    overflow-x: clip;
    -webkit-font-smoothing: antialiased;
    -webkit-tap-highlight-color: transparent;
    caret-color: var(--leaf);
}

/* وشحات لون ناعمة ثابتة خلف الصفحة، مثل ألوان مائية على الحيط */
body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background:
        radial-gradient(60vmax 45vmax at 92% 4%, var(--wash-a), transparent 70%),
        radial-gradient(55vmax 50vmax at 4% 48%, var(--wash-b), transparent 70%),
        radial-gradient(50vmax 40vmax at 80% 100%, var(--wash-c), transparent 70%),
        var(--wall);
}

body.no-scroll { overflow: hidden; }

::selection { background: var(--honey); color: var(--ink); }

img { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; padding: 0; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4, p, figure, dl, dd { margin: 0; }
[hidden] { display: none !important; }

[tabindex="-1"]:focus { outline: none; }

:focus-visible {
    outline: 3px solid var(--honey);
    outline-offset: 3px;
    border-radius: 8px;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

.wrap {
    width: 100%;
    max-width: var(--wrap);
    margin-inline: auto;
    padding-inline: var(--gutter);
}

.ic {
    width: 1.25em;
    height: 1.25em;
    flex: none;
    vertical-align: -0.2em;
}

/* ---------- اللاصق الورقي ---------- */
/* أطراف ممزقة بقناع متعرّج على الجانبين */
.tape {
    --r: -1.5deg;
    --tooth: 7px;
    display: inline-block;
    position: relative;
    color: var(--ink);
    background-color: var(--tape);
    background-image: var(--grain);
    padding: 0.08em 0.55em 0.14em;
    transform: rotate(var(--r));
    -webkit-mask:
        conic-gradient(from -135deg at right, #0000, #000 1deg 89deg, #0000 90deg) 100% 0 / 51% var(--tooth) repeat-y,
        conic-gradient(from 45deg at left, #0000, #000 1deg 89deg, #0000 90deg) 0 0 / 51% var(--tooth) repeat-y;
    mask:
        conic-gradient(from -135deg at right, #0000, #000 1deg 89deg, #0000 90deg) 100% 0 / 51% var(--tooth) repeat-y,
        conic-gradient(from 45deg at left, #0000, #000 1deg 89deg, #0000 90deg) 0 0 / 51% var(--tooth) repeat-y;
}
.tape-xl {
    --r: -2.2deg;
    --tooth: 12px;
    font-family: var(--font-hand);
    font-weight: 700;
    font-size: clamp(46px, 12vw, 120px);
    line-height: 1.35;
}
.tape-lg {
    --r: -1.6deg;
    --tooth: 9px;
    font-family: var(--font-hand);
    font-weight: 700;
    font-size: clamp(30px, 6vw, 52px);
    line-height: 1.4;
}
.tape-md {
    --r: 1.1deg;
    font-family: var(--font-hand);
    font-weight: 700;
    font-size: clamp(19px, 3.2vw, 30px);
    line-height: 1.55;
}

/* ---------- الأزرار ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 48px;
    padding: 10px 20px;
    border-radius: 14px;
    font-weight: 700;
    font-size: 15.5px;
    line-height: 1.2;
    white-space: nowrap;
    transition: transform 0.2s var(--ease-out), background-color 0.2s ease, box-shadow 0.2s ease, color 0.2s ease;
}
.btn:active { transform: translateY(1px) scale(0.98); }
.btn[disabled] { opacity: 0.55; cursor: not-allowed; }
.btn-honey {
    background: var(--honey);
    color: var(--ink);
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.35) inset, 0 8px 16px -10px rgba(0, 0, 0, 0.6);
}
.btn-honey:hover { background: var(--honey-hi); }
.btn-line {
    border: 1.5px solid currentColor;
    color: inherit;
    background: transparent;
}
.btn-line:hover { background: color-mix(in srgb, currentColor 10%, transparent); }
.btn-wa { background: var(--whatsapp); color: #fff; box-shadow: 0 8px 16px -10px rgba(0, 0, 0, 0.6); }
.btn-wa:hover { background: #0C6A38; }
.btn-block { width: 100%; }
.btn-sm { min-height: 40px; padding: 8px 16px; font-size: 14.5px; border-radius: 12px; }
.btn .ic { width: 1.15em; height: 1.15em; }

.icon-btn {
    width: 44px;
    height: 44px;
    display: inline-grid;
    place-items: center;
    border-radius: 50%;
    background: var(--paper);
    border: 1.5px solid var(--paper-rule);
    color: var(--ink);
    transition: background-color 0.2s ease, border-color 0.2s ease;
}
.icon-btn:hover { border-color: var(--ink-soft); }

/* ---------- شريط الإعلان: لاصق بعرض الحيط ---------- */
.announce {
    background-color: var(--tape);
    background-image: var(--grain);
    color: var(--ink);
    font-size: 14px;
    font-weight: 600;
    text-align: center;
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.12);
}
.announce .wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding-block: 8px;
    line-height: 1.5;
}
.announce button { color: var(--ink-soft); display: grid; place-items: center; padding: 4px; border-radius: 50%; }

/* ---------- الهيدر ---------- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 40;
    background-color: var(--leaf-deep);
    background-image: var(--grain);
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.14), 0 10px 18px -16px rgba(0, 0, 0, 0.6);
}
.site-header .wrap {
    height: var(--header-h);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}
.brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.brand img {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: 0 0 0 3px var(--leaf-night), 0 4px 10px -4px rgba(0, 0, 0, 0.6);
}
.brand-name {
    font-family: var(--font-hand);
    font-weight: 700;
    font-size: 25px;
    color: var(--on-leaf);
    line-height: 1.2;
    white-space: nowrap;
}
.main-nav { display: none; gap: 26px; font-weight: 600; font-size: 15px; color: var(--on-leaf-soft); }
.main-nav a {
    padding-block: 6px;
    text-decoration: underline 2px transparent;
    text-underline-offset: 8px;
    transition: color 0.2s ease, text-decoration-color 0.2s ease;
}
.main-nav a:hover { color: var(--on-leaf); text-decoration-color: var(--honey); }

.cart-tag {
    --r: 2deg;
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 40px;
    padding: 6px 14px;
    color: var(--ink);
    background-color: var(--tape);
    background-image: var(--grain);
    font-weight: 700;
    font-size: 14.5px;
    transform: rotate(var(--r));
    transition: transform 0.25s var(--ease-out);
}
.cart-tag:hover { --r: 0deg; }
.cart-tag .ic { width: 20px; height: 20px; }
.count-badge {
    position: absolute;
    top: -8px;
    inset-inline-end: -8px;
    min-width: 22px;
    height: 22px;
    padding-inline: 5px;
    border-radius: 999px;
    background: var(--ink);
    color: var(--tape);
    font-size: 12px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    display: grid;
    place-items: center;
    line-height: 1;
}
.count-badge.bump { animation: bump 0.45s var(--ease-out); }
@keyframes bump { 35% { transform: scale(1.45) rotate(-8deg); } }

/* ---------- الهيرو: صورة كبيرة ملزوقة على الحيط ---------- */
.pantry { padding-top: 34px; scroll-margin-top: var(--header-h); }
.hero { position: relative; }
/* اللاصق الكبير «ماسك» الصورة من فوق */
.hero-claim {
    --r: -3deg;
    position: relative;
    z-index: 3;
    margin-bottom: -0.42em;
    margin-inline-start: 6px;
    font-size: clamp(40px, 11vw, 92px);
    animation: stick 0.8s var(--ease-out) both;
}
.hero-frame + * { margin-top: 0; }
@keyframes stick {
    from { transform: rotate(calc(var(--r) - 3deg)) translateY(-8px) scale(1.05); }
}
.hero-frame {
    container-type: inline-size;
    position: relative;
    height: min(64svh, 560px);
    min-height: 420px;
    padding: 8px;
    background-color: var(--paper);
    background-image: var(--grain);
    transform: rotate(0.6deg);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.25), 0 30px 40px -28px rgba(0, 0, 0, 0.8);
}
.slides { position: relative; height: 100%; overflow: hidden; background: var(--leaf-deep); }
.slide {
    position: absolute;
    inset: 0;
    margin: 0;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.9s ease, visibility 0.9s;
}
.slide.is-active { opacity: 1; visibility: visible; }
.slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.06);
    transition: transform 7s ease-out;
}
.slide.is-active img { transform: scale(1); }
/* تظليل من تحت حتى يُقرأ الكلام فوق الصورة */
.slide::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(34, 30, 16, 0) 35%, rgba(34, 30, 16, 0.55) 62%, rgba(34, 30, 16, 0.9) 100%);
    pointer-events: none;
}
.slide-note {
    position: absolute;
    z-index: 1;
    inset-inline: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    padding: 0 20px 46px;
    color: var(--on-leaf);
}
.slide-note h2 { font-size: clamp(26px, 6vw, 50px); }
.slide-note p { max-width: 52ch; font-size: clamp(14.5px, 1.8vw, 17px); line-height: 1.8; color: #F6F1E2; text-shadow: 0 1px 10px rgba(0, 0, 0, 0.45); }
.slide-arrow {
    position: absolute;
    top: calc(50% - 22px);
    z-index: 2;
    display: none;
    width: 44px;
    height: 44px;
    place-items: center;
    border-radius: 50%;
    color: var(--ink);
    background: var(--tape);
    box-shadow: 0 6px 12px -6px rgba(0, 0, 0, 0.6);
}
.slide-arrow.prev { inset-inline-start: 20px; }
.slide-arrow.next { inset-inline-end: 20px; }
.slide-dots {
    position: absolute;
    z-index: 2;
    bottom: 22px;
    inset-inline: 0;
    display: flex;
    justify-content: center;
    gap: 8px;
}
.slide-dots button {
    width: 10px;
    height: 10px;
    border-radius: 999px;
    background: rgba(250, 241, 212, 0.55);
    transition: width 0.35s var(--ease-out), background-color 0.3s ease;
}
.slide-dots button.is-active { width: 30px; background: var(--tape); }

.notes {
    list-style: none;
    margin: 22px 0 0;
    padding: 0;
    display: flex;
    gap: 8px 18px;
    flex-wrap: wrap;
    font-size: 13px;
    font-weight: 500;
    color: var(--on-wall-soft);
    line-height: 1.5;
}
.notes li { display: inline-flex; align-items: center; gap: 6px; flex: none; }
.notes .ic { color: var(--on-wall); width: 18px; height: 18px; }

.shelves { padding-bottom: 8px; }
.shelf { margin-top: 30px; scroll-margin-top: calc(var(--header-h) + 8px); }
/* اسم الرف على لاصق ملزوق على الحيط */
.shelf-tag {
    --r: -1.8deg;
    display: inline-block;
    margin-bottom: 14px;
    padding: 0.02em 0.5em 0.1em;
    font-family: var(--font-hand);
    font-weight: 700;
    font-size: 22px;
    line-height: 1.45;
    color: var(--ink);
    background-color: var(--tape);
    background-image: var(--grain);
    transform: rotate(var(--r));
}

/* اللوح مرسوم كخلفية لصف المرطبانات حتى يمتد مع التمرير الأفقي */
.shelf-row {
    --plank-y: var(--jar-h);
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: var(--jar-w);
    column-gap: 18px;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: var(--gutter);
    padding: 4px var(--gutter) 22px;
    scrollbar-width: thin;
    scrollbar-color: var(--tape-deep) transparent;
    background:
        linear-gradient(rgba(0, 0, 0, 0.34), rgba(0, 0, 0, 0)) 0 calc(var(--plank-y) + 4px + var(--plank)) / 100% 28px no-repeat,
        linear-gradient(var(--wood-top) 0 6px, var(--wood) 6px calc(100% - 3px), var(--wood-deep) calc(100% - 3px)) 0 calc(var(--plank-y) + 4px) / 100% var(--plank) no-repeat;
    background-attachment: local;
}

.jar {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 12px;
    scroll-snap-align: start;
    min-width: 0;
}
.jar-glass {
    position: relative;
    display: block;
    width: 100%;
    height: var(--jar-h);
    border-radius: 22px 22px 6px 6px;
    overflow: hidden;
    background: var(--paper-deep);
    /* ظل التلامس مع اللوح */
    box-shadow: 0 7px 6px -4px rgba(0, 0, 0, 0.55);
    transition: transform 0.35s var(--ease-out);
}
.jar.is-box .jar-glass { border-radius: 6px; }
.jar-glass img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s var(--ease-out);
}
.badge {
    position: absolute;
    top: 14px;
    inset-inline-start: 10px;
    z-index: 1;
    max-width: calc(100% - 20px);
    padding: 0 12px 2px;
    font-family: var(--font-hand);
    font-weight: 700;
    font-size: 16px;
    line-height: 1.6;
    color: var(--ink);
    background-color: var(--tape);
    background-image: var(--grain);
    transform: rotate(-3deg);
}

/* ملصق اللاصق تحت اللوح: الاسم والسعر والحجم */
.label {
    --r: -1.2deg;
    margin-top: calc(var(--plank) + 2px);
    padding: 8px 12px 10px;
    color: var(--ink);
    background-color: var(--tape);
    background-image: var(--grain);
    transform: rotate(var(--r));
    transform-origin: 50% 0;
    transition: transform 0.3s var(--ease-out);
}
.jar:nth-child(even) .label { --r: 1deg; }
.label-top { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.label h3 {
    min-width: 0;
    font-family: var(--font-hand);
    font-weight: 700;
    font-size: 18px;
    line-height: 1.4;
}
.jar > .btn { width: 100%; margin-top: auto; }

.price {
    font-weight: 700;
    font-size: 17px;
    font-variant-numeric: tabular-nums;
    color: var(--ink);
    white-space: nowrap;
}
.label .price { font-size: 15.5px; }
.price small { font-size: 12px; font-weight: 500; margin-inline-start: 3px; color: var(--ink-soft); }

.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.label .chips { gap: 2px; margin-top: 4px; flex-wrap: nowrap; }
.chip {
    position: relative;
    min-height: 34px;
    padding: 3px 5px;
    white-space: nowrap;
    border-radius: 9px;
    border: 1.5px solid transparent;
    font-size: 13px;
    font-weight: 600;
    color: var(--ink-soft);
    text-decoration: underline 1.5px transparent;
    text-underline-offset: 5px;
    transition: color 0.15s ease, text-decoration-color 0.15s ease;
}
.chip:hover { color: var(--ink); text-decoration-color: currentColor; }
.chip.is-active { color: var(--ink); font-weight: 700; }
/* الاختيار = دائرة ماركر حوالين الحجم */
.chip.is-active::after {
    content: "";
    position: absolute;
    inset: -3px -4px;
    border: 2.5px solid var(--ink);
    border-radius: 52% 48% 55% 45% / 58% 46% 54% 42%;
    transform: rotate(-4deg);
    pointer-events: none;
}

@media (hover: hover) {
    .jar:hover .jar-glass img { transform: scale(1.05); }
    .jar:hover .label { --r: 0deg; }
}

/* لحظة الإضافة: المرطبان ينرفع ويستقر، والملصق ينضغط */
.jar.is-pressed .jar-glass { animation: settle 0.6s var(--ease-out); }
.jar.is-pressed .label { animation: press 0.6s var(--ease-out); }
@keyframes settle {
    30% { transform: translateY(-12px) rotate(-1.5deg); }
    65% { transform: translateY(2px); }
}
@keyframes press {
    30% { transform: rotate(var(--r)) scale(1.05, 0.88); }
    60% { transform: rotate(0deg) scale(1); }
}

/* خيال المرطبانات أثناء التحميل */
.jar.is-ghost .jar-glass {
    background: none;
    box-shadow: none;
    border: 2px dashed var(--on-wall-faint);
    animation: breathe 1.6s ease-in-out infinite;
}
.jar.is-ghost .jar-glass::after { display: none; }
@keyframes breathe { 50% { opacity: 0.45; } }

.empty-state { text-align: center; color: var(--on-wall-soft); padding: 32px 16px; grid-column: 1 / -1; }

/* ---------- الأقسام ---------- */
.section { padding-block: 56px; scroll-margin-top: var(--header-h); }
.wall-head { max-width: 680px; margin-bottom: 30px; }
.wall-head p { color: var(--on-wall-soft); margin-top: 14px; max-width: 56ch; }
.marker-head {
    font-family: var(--font-hand);
    font-weight: 700;
    font-size: clamp(30px, 5vw, 46px);
    line-height: 1.35;
    color: var(--ink);
    margin-bottom: 14px;
    text-wrap: balance;
}

/* ورقة ملزوقة على الحيط */
.sheet {
    position: relative;
    color: var(--ink-soft);
    background-color: var(--paper);
    background-image: var(--grain);
    padding: 40px 22px 26px;
    border-radius: 3px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.25), 0 24px 34px -24px rgba(0, 0, 0, 0.7);
}
.sheet::before,
.sheet::after {
    content: "";
    position: absolute;
    top: -12px;
    width: 92px;
    height: 28px;
    background-color: var(--tape);
    background-image: var(--grain);
    opacity: 0.92;
}
.sheet::before { inset-inline-start: 18px; transform: rotate(-5deg); }
.sheet::after { inset-inline-end: 18px; transform: rotate(4deg); }

/* ---------- قصتنا ---------- */
.story { display: grid; gap: 36px; align-items: center; }
.story .sheet p { margin-bottom: 14px; line-height: 2; max-width: 62ch; }
.story .sheet::before,
.story .sheet::after { display: none; }
.tally {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 22px;
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1.5px dashed var(--paper-rule);
    font-weight: 600;
    color: var(--ink);
}
.tally b {
    font-family: var(--font-body);
    font-weight: 700;
    font-size: 26px;
    line-height: 1.2;
    color: var(--ink);
    font-variant-numeric: tabular-nums;
    direction: ltr;
    unicode-bidi: isolate;
}
.story-photos {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    padding-top: 10px;
}
.story-photos:not(:has(img:not([hidden]))) { display: none; }
.story-photos img {
    width: 100%;
    aspect-ratio: 4 / 5;
    object-fit: cover;
    padding: 8px 8px 30px;
    background: var(--paper);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.25), 0 22px 30px -22px rgba(0, 0, 0, 0.75);
    transform: rotate(-2.5deg);
}
.story-photos img + img { transform: rotate(2deg) translateY(22px); }

/* ---------- الآراء ---------- */
.reviews-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.proofs {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 58%;
    gap: 18px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding: 18px var(--gutter) 22px;
    margin-inline: calc(var(--gutter) * -1);
    scrollbar-width: thin;
    scrollbar-color: var(--tape-deep) transparent;
}
.proof {
    position: relative;
    scroll-snap-align: start;
    display: flex;
    flex-direction: column;
    text-align: start;
    padding: 8px 8px 0;
    color: var(--ink-soft);
    background: var(--paper);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.25), 0 20px 28px -20px rgba(0, 0, 0, 0.75);
    transform: rotate(-1.2deg);
    transition: transform 0.35s var(--ease-out);
}
.proof:nth-child(even) { transform: rotate(1.4deg); }
.proof:hover { transform: rotate(0deg) translateY(-4px); }
.proof::before {
    content: "";
    position: absolute;
    top: -11px;
    left: 50%;
    z-index: 2;
    width: 74px;
    height: 24px;
    transform: translateX(-50%) rotate(-3deg);
    background-color: var(--tape);
    background-image: var(--grain);
    opacity: 0.94;
}
/* الصورة مطلقة التموضع حتى تبقى كل البطاقات بنفس المقاس مهما كانت أبعاد الصورة الأصلية */
.proof-img { position: relative; aspect-ratio: 9 / 16; background: #1b1b1b; overflow: hidden; }
.proof-img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: top; }
.platform {
    position: absolute;
    bottom: 8px;
    inset-inline-start: 8px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 9px;
    border-radius: 999px;
    font-size: 11.5px;
    font-weight: 600;
    color: #fff;
    background: var(--whatsapp);
}
.platform.facebook { background: #1663D4; }
.platform.instagram { background: #A62C78; }
.platform .ic { width: 12px; height: 12px; }
.proof-body { padding: 10px 4px 12px; }
.proof-body b { display: block; font-size: 14px; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.proof-body p {
    font-size: 12.5px;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.stars { display: flex; gap: 2px; color: var(--ink); }
.stars .ic { width: 15px; height: 15px; }

.reviews-grid { display: grid; gap: 22px; margin-top: 30px; }
.review {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 26px 20px 18px;
    color: var(--ink-soft);
    background-color: var(--paper);
    background-image: var(--grain);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.25), 0 20px 28px -20px rgba(0, 0, 0, 0.7);
    transform: rotate(0.8deg);
}
.review:nth-child(3n + 2) { transform: rotate(-1deg); }
.review::before {
    content: "";
    position: absolute;
    top: -11px;
    inset-inline-start: 24px;
    width: 70px;
    height: 24px;
    transform: rotate(-4deg);
    background-color: var(--tape);
    background-image: var(--grain);
    opacity: 0.94;
}
.review blockquote { margin: 0; color: var(--ink); line-height: 1.9; white-space: pre-line; }
.review-author { display: flex; align-items: center; gap: 12px; margin-top: auto; padding-top: 12px; border-top: 1.5px dashed var(--paper-rule); }
.avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    color: var(--on-leaf);
    font-family: var(--font-hand);
    font-weight: 700;
    font-size: 20px;
    flex: none;
}
.review-author b { display: block; font-size: 14.5px; color: var(--ink); }
.review-author span { font-size: 12.5px; color: var(--ink-soft); }
.review .btn-line { color: var(--ink); align-self: flex-start; }
.review .btn-line:hover { background: var(--paper-deep); }
.center { text-align: center; margin-top: 28px; }

.skeleton {
    min-height: 170px;
    border: 2px dashed var(--on-wall-faint);
    animation: breathe 1.6s ease-in-out infinite;
}

/* ---------- الأسئلة الشائعة ---------- */
.sheet-faq { max-width: 780px; margin-inline: auto; padding-top: 44px; }
.faqs { display: grid; }
.faq { border-top: 1.5px dashed var(--paper-rule); }
.faq:last-child { border-bottom: 1.5px dashed var(--paper-rule); }
.faq summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 15px 2px;
    font-weight: 600;
    font-size: 16px;
    color: var(--ink);
    cursor: pointer;
    list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary .ic { color: var(--ink-soft); transition: transform 0.3s var(--ease-out); }
.faq[open] summary .ic { transform: rotate(180deg); }
.faq-answer { padding: 0 2px 16px; color: var(--ink-soft); white-space: pre-line; line-height: 1.9; max-width: 66ch; }

/* ---------- الفوتر: خزانة الخشب تحت الحيط ---------- */
.site-footer {
    position: relative;
    margin-top: 40px;
    padding: 52px 0 calc(var(--tabbar-h) + 28px);
    color: var(--tape);
    background-color: var(--wood-deep);
    background-image:
        var(--grain),
        repeating-linear-gradient(90deg, rgba(0, 0, 0, 0) 0 46px, rgba(0, 0, 0, 0.08) 46px 48px, rgba(0, 0, 0, 0) 48px 131px);
    box-shadow: 0 -16px 0 var(--wood) inset;
}
/* سطح الخزانة */
.site-footer::before {
    content: "";
    position: absolute;
    top: 0;
    inset-inline: 0;
    height: 18px;
    background: linear-gradient(var(--wood-top) 0 6px, var(--wood) 6px 15px, rgba(0, 0, 0, 0.35) 15px);
}
.footer-grid { display: grid; gap: 28px; }
.footer-brand img { width: 150px; border-radius: 14px; margin-bottom: 14px; transform: rotate(-2deg); }
.footer-brand p { font-size: 14.5px; line-height: 1.9; max-width: 44ch; color: #E7D9B0; }
.site-footer h3 { font-family: var(--font-hand); font-weight: 700; font-size: 22px; color: var(--tape); margin-bottom: 10px; }
.footer-links { display: grid; gap: 8px; font-size: 14.5px; padding: 0; margin: 0; list-style: none; color: #E7D9B0; }
.footer-links a:hover { color: #fff; }
.footer-phone { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; direction: ltr; font-variant-numeric: tabular-nums; }
.socials { display: flex; gap: 10px; margin-top: 14px; }
.socials a {
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    border: 1.5px solid rgba(234, 223, 180, 0.4);
    transition: background-color 0.2s ease, color 0.2s ease;
}
.socials a:hover { background: var(--tape); color: var(--wood-deep); }
.footer-bottom {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: 32px;
    padding-top: 18px;
    border-top: 1px solid rgba(234, 223, 180, 0.2);
    font-size: 13px;
    color: #D9C99C;
}
.footer-bottom a { display: inline-flex; align-items: center; gap: 6px; }
.footer-bottom a:hover { color: #fff; }

/* ---------- شريط التنقل السفلي (الموبايل) ---------- */
.tabbar {
    position: fixed;
    bottom: 0;
    inset-inline: 0;
    z-index: 45;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    height: calc(var(--tabbar-h) + env(safe-area-inset-bottom));
    padding-bottom: env(safe-area-inset-bottom);
    background-color: var(--leaf-night);
    background-image: var(--grain);
    box-shadow: 0 -10px 20px -14px rgba(0, 0, 0, 0.8);
}
.tabbar a,
.tabbar button {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    font-size: 11.5px;
    font-weight: 600;
    color: var(--on-leaf-soft);
}
.tabbar .ic { width: 22px; height: 22px; }
.tabbar .is-active { color: var(--tape); }
.tabbar .is-active::before {
    content: "";
    position: absolute;
    top: 0;
    width: 30px;
    height: 3px;
    border-radius: 0 0 3px 3px;
    background: var(--tape);
}
.tabbar .wa .ic { color: #4CD787; }
.tabbar .count-badge { top: 5px; inset-inline-end: calc(50% - 26px); background: var(--tape); color: var(--ink); }

/* ---------- النوافذ ---------- */
.overlay {
    position: fixed;
    inset: 0;
    z-index: 60;
    display: flex;
    visibility: hidden;
    pointer-events: none;
}
.overlay.is-open { visibility: visible; pointer-events: auto; }
.backdrop {
    position: absolute;
    inset: 0;
    background: rgba(30, 26, 14, 0.6);
    opacity: 0;
    transition: opacity 0.3s ease;
}
.overlay.is-open .backdrop { opacity: 1; }
.sheet-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 18px;
    border-bottom: 1.5px dashed var(--paper-rule);
}
.sheet-head h2 {
    font-family: var(--font-hand);
    font-weight: 700;
    font-size: 26px;
    line-height: 1.3;
    color: var(--ink);
}

/* السلة: قائمة طلب مكتوبة على ورقة */
.drawer { justify-content: flex-end; }
.drawer-panel {
    position: relative;
    width: 100%;
    max-width: 440px;
    height: 100%;
    display: flex;
    flex-direction: column;
    color: var(--ink);
    background-color: var(--paper);
    background-image: var(--grain);
    transform: translateX(-100%);
    transition: transform 0.4s var(--ease-out);
    box-shadow: 14px 0 40px rgba(0, 0, 0, 0.35);
}
.overlay.is-open .drawer-panel { transform: none; }
.drawer-scroll { flex: 1; overflow-y: auto; padding: 8px 18px 18px; overscroll-behavior: contain; scrollbar-color: var(--tape-deep) transparent; }
.drawer-foot {
    padding: 14px 18px calc(14px + env(safe-area-inset-bottom));
    border-top: 1.5px dashed var(--paper-rule);
    background: var(--paper-deep);
}
.cart-line {
    display: grid;
    grid-template-columns: 56px 1fr auto;
    gap: 12px;
    align-items: center;
    padding-block: 12px;
    border-bottom: 1.5px dashed var(--paper-rule);
}
.cart-line img { width: 56px; height: 68px; object-fit: cover; border-radius: 12px 12px 6px 6px; background: var(--paper-deep); }
.cart-line h4 { font-size: 15px; font-weight: 600; color: var(--ink); line-height: 1.45; }
.cart-line .flavor { font-size: 12.5px; color: var(--ink-soft); }
.cart-line .line-price { font-size: 14px; font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; }
.stepper {
    display: flex;
    align-items: center;
    border: 1.5px solid var(--ink-soft);
    border-radius: 12px;
}
.stepper button { width: 36px; height: 36px; display: grid; place-items: center; color: var(--ink); }
.stepper button .ic { width: 15px; height: 15px; }
.stepper button.is-remove { color: var(--danger); }
.stepper span { min-width: 20px; text-align: center; font-weight: 700; font-size: 15px; font-variant-numeric: tabular-nums; }

.free-progress { margin: 14px 0 6px; font-size: 13.5px; font-weight: 600; color: var(--ink-soft); }
.free-progress .ic { color: var(--ink-soft); }
.free-progress .bar { height: 8px; border-radius: 8px; background: var(--paper-deep); margin-top: 6px; overflow: hidden; box-shadow: 0 0 0 1px var(--paper-rule) inset; }
.free-progress .bar i { display: block; height: 100%; border-radius: 8px; background: var(--leaf); transition: width 0.4s var(--ease-out); }

.form-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-hand);
    font-weight: 700;
    font-size: 21px;
    color: var(--ink);
    margin-block: 18px 8px;
}
.form-title .ic { color: var(--ink-soft); width: 20px; height: 20px; }
.field { display: block; margin-bottom: 12px; }
.field > span { display: block; font-size: 13px; font-weight: 600; color: var(--ink-soft); margin-bottom: 4px; }
.input {
    width: 100%;
    min-height: 48px;
    padding: 10px 14px;
    border-radius: 12px;
    border: 1.5px solid rgba(27, 26, 23, 0.22);
    background: #FFFCF0;
    color: var(--ink);
    font-size: 16px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.input::placeholder { color: #857B62; }
.input:focus { outline: none; border-color: var(--leaf); box-shadow: 0 0 0 3px rgba(94, 107, 39, 0.22); }
.input.is-invalid { border-color: var(--danger); box-shadow: 0 0 0 3px rgba(179, 38, 30, 0.15); }
textarea.input { resize: vertical; min-height: 72px; }
select.input {
    appearance: none;
    padding-inline-start: 38px;
    background: #FFFCF0 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%234B4535' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat 14px 50%;
}
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

.summary { margin-top: 16px; padding: 14px 16px; border-radius: 12px; border: 1.5px dashed rgba(27, 26, 23, 0.3); font-size: 15px; }
.summary div { display: flex; justify-content: space-between; gap: 10px; padding-block: 3px; color: var(--ink-soft); font-weight: 500; font-variant-numeric: tabular-nums; }
.summary .total { margin-top: 6px; padding-top: 10px; border-top: 1.5px dashed var(--paper-rule); font-size: 18px; font-weight: 700; color: var(--ink); }
.summary .total b { font-size: 20px; }

/* بطاقة الولاء داخل السلة: كرت أختام على لاصق ورقي */
.loyalty { margin: 14px 0 6px; padding: 12px 14px 14px; border-radius: 3px; background: var(--tape); box-shadow: 0 1px 0 var(--tape-deep) inset, 0 0 0 1px var(--paper-rule); color: var(--ink); font-size: 14px; font-weight: 600; }
.loyalty-head { display: flex; align-items: center; gap: 8px; line-height: 1.5; }
.loyalty-head .ic { flex: none; width: 20px; height: 20px; color: var(--honey); }
.loyalty-head b { font-family: var(--font-hand); font-size: 18px; font-weight: 700; }
.loyalty-head .loyalty-x { margin-inline-start: auto; flex: none; width: 32px; height: 32px; display: grid; place-items: center; border-radius: 9px; color: var(--ink-soft); }
.loyalty-head .loyalty-x .ic { width: 16px; height: 16px; color: inherit; }
.loyalty-sub { margin: 4px 0 0; color: var(--ink-soft); font-weight: 500; font-size: 13px; }
.stamps { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.stamps i { width: 22px; height: 22px; border-radius: 50%; border: 2px dashed rgba(27, 26, 23, 0.35); display: block; }
.stamps i.is-on { border: 2px solid var(--honey); background: var(--honey); box-shadow: 0 0 0 2px var(--tape) inset; }
.stamps i.is-gift { border: 2px solid var(--leaf); background: var(--leaf); }
.loyalty .bar { height: 8px; border-radius: 8px; background: var(--paper-deep); margin-top: 10px; overflow: hidden; box-shadow: 0 0 0 1px var(--paper-rule) inset; }
.loyalty .bar i { display: block; height: 100%; border-radius: 8px; background: var(--honey); transition: width 0.4s var(--ease-out); }
.loyalty select { margin-top: 8px; width: 100%; min-height: 40px; padding: 6px 10px; border-radius: 10px; border: 1.5px solid rgba(27, 26, 23, 0.22); background: var(--field); font: inherit; font-weight: 600; }
.loyalty .loyalty-use { margin-top: 8px; font-weight: 700; color: var(--leaf-deep); text-decoration: underline; text-underline-offset: 3px; }
.summary [hidden] { display: none; }
.summary .discount { color: var(--leaf-deep); font-weight: 700; }

.cart-empty { text-align: center; padding: 40px 12px; color: var(--ink-soft); }
.cart-empty b { display: block; font-family: var(--font-hand); font-weight: 700; font-size: 26px; color: var(--ink); margin-top: 18px; }
.cart-empty p { margin-block: 4px 20px; }
.ghost-jars { display: flex; justify-content: center; align-items: flex-end; gap: 12px; padding-bottom: 12px; background: linear-gradient(var(--wood-top) 0 2px, var(--wood) 2px) 0 100% / 100% 6px no-repeat; }
.ghost-jars i { width: 54px; height: 70px; border: 2px dashed rgba(27, 26, 23, 0.35); border-radius: 16px 16px 8px 8px; }
.ghost-jars i:nth-child(2) { height: 86px; }

/* النوافذ المنبثقة */
.modal { align-items: flex-end; justify-content: center; }
.modal-panel {
    position: relative;
    width: 100%;
    max-width: 900px;
    max-height: 92dvh;
    display: flex;
    flex-direction: column;
    color: var(--ink);
    background-color: var(--paper);
    background-image: var(--grain);
    border-radius: 22px 22px 0 0;
    overflow: hidden;
    transform: translateY(48px);
    opacity: 0;
    transition: transform 0.45s var(--ease-out), opacity 0.3s ease;
    box-shadow: 0 -12px 50px rgba(0, 0, 0, 0.4);
}
.overlay.is-open .modal-panel { transform: none; opacity: 1; }
.modal-scroll { overflow-y: auto; overscroll-behavior: contain; scrollbar-color: var(--tape-deep) transparent; }
.modal-close { position: absolute; top: 12px; inset-inline-start: 12px; z-index: 2; box-shadow: 0 4px 10px -4px rgba(0, 0, 0, 0.4); }

.pm { display: grid; }
.pm-media { background: var(--paper-deep); max-height: 320px; overflow: hidden; }
.pm-media img { width: 100%; height: 100%; max-height: 320px; object-fit: cover; }
.pm-info { padding: 20px 20px 10px; display: grid; gap: 18px; align-content: start; }
.pm-info h2 { font-family: var(--font-hand); font-weight: 700; font-size: 32px; color: var(--ink); line-height: 1.35; }
.pm-desc { color: var(--ink-soft); font-size: 15px; margin-top: 4px; }
.pm-label { display: flex; align-items: center; gap: 6px; font-weight: 700; font-size: 14.5px; color: var(--ink); margin-bottom: 10px; }
.pm-label .ic { color: var(--ink-soft); }
.pm .chip { color: var(--ink); padding-inline: 10px; border-color: rgba(27, 26, 23, 0.25); }
.pm .chip:hover { border-color: var(--ink); }
.pm .chip.is-active { background-color: var(--tape); border-color: transparent; }
.pm .chip.is-active::after { border-color: var(--ink); }

.serving-note { font-size: 12.5px; color: var(--ink-soft); font-weight: 400; margin-inline-start: auto; }
.cal-line { display: flex; align-items: baseline; gap: 8px; padding-bottom: 10px; border-bottom: 3px solid var(--ink); }
.cal-line b { font-size: 40px; font-weight: 700; line-height: 1.1; font-variant-numeric: tabular-nums; }
.cal-line span { font-weight: 600; color: var(--ink-soft); }
.nutri { display: grid; }
.nutri > div {
    display: grid;
    grid-template-columns: 7.5em 1fr;
    align-items: center;
    gap: 12px;
    padding-block: 9px;
    border-bottom: 1px solid var(--paper-rule);
}
.nutri dt { font-size: 14px; font-weight: 500; color: var(--ink-soft); }
.nutri dd { display: flex; align-items: center; gap: 10px; }
.nutri .bar {
    flex: 1;
    height: 10px;
    border-radius: 5px;
    background: linear-gradient(var(--leaf), var(--leaf)) 100% 0 / var(--w, 0%) 100% no-repeat, var(--paper-deep);
    box-shadow: 0 0 0 1px var(--paper-rule) inset;
    transition: background-size 0.6s var(--ease-out);
}
.nutri b { min-width: 3.4em; text-align: end; font-size: 15px; font-weight: 700; font-variant-numeric: tabular-nums; direction: ltr; }
.ingredients { padding: 12px 14px; border-radius: 12px; border: 1.5px dashed rgba(27, 26, 23, 0.25); font-size: 14.5px; color: var(--ink-soft); line-height: 1.95; }
.options { display: grid; gap: 8px; }
.option {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 48px;
    padding: 10px 14px;
    border-radius: 12px;
    border: 1.5px solid rgba(27, 26, 23, 0.22);
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    transition: border-color 0.15s ease, background-color 0.15s ease;
}
.option input { accent-color: var(--leaf); width: 18px; height: 18px; margin: 0; }
.option:has(input:checked) { border-color: var(--ink); background-color: var(--tape); }
.pm-foot {
    position: sticky;
    bottom: 0;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px calc(12px + env(safe-area-inset-bottom));
    background: var(--paper-deep);
    border-top: 1.5px dashed var(--paper-rule);
}
.pm-foot .price { font-size: 24px; color: var(--ink); }
.pm-foot .price small { color: var(--ink-soft); }
.pm-foot .btn { flex: 1; }

.modal-sm .modal-panel { max-width: 520px; }
.modal-body { padding: 18px; }
.upload { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 12px; border: 1.5px dashed rgba(27, 26, 23, 0.3); }
.upload img { width: 56px; height: 56px; border-radius: 10px; object-fit: cover; }
.upload input { font-size: 13.5px; min-width: 0; flex: 1; }
.upload input::file-selector-button { font: inherit; font-weight: 600; margin-inline-end: 10px; padding: 6px 12px; border: 0; border-radius: 10px; background: var(--tape); color: var(--ink); cursor: pointer; }
.rating { display: inline-flex; flex-direction: row-reverse; gap: 4px; }
.rating input { position: absolute; opacity: 0; pointer-events: none; }
.rating label .ic { width: 30px; height: 30px; }
.rating label { line-height: 1; color: rgba(27, 26, 23, 0.2); cursor: pointer; transition: color 0.15s ease; }
.rating label:hover,
.rating label:hover ~ label,
.rating input:checked ~ label { color: var(--ink); }
.rating input:focus-visible + label { outline: 3px solid var(--honey); outline-offset: 2px; border-radius: 4px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 16px; }
.modal-actions .btn-line { color: var(--ink); }

.lightbox { align-items: center; justify-content: center; padding: 16px; }
.lightbox .backdrop { background: rgba(5, 20, 20, 0.9); }
.lightbox figure {
    position: relative;
    width: 100%;
    max-width: 560px;
    max-height: 92dvh;
    display: flex;
    flex-direction: column;
    padding: 8px;
    background: var(--paper);
}
.lightbox img { min-height: 0; flex: 1 1 auto; max-width: 100%; object-fit: contain; margin-inline: auto; background: #111; width: 100%; }
.lightbox figcaption {
    flex: none;
    max-height: 34dvh;
    overflow-y: auto;
    padding: 12px 8px 6px;
    color: var(--ink-soft);
    text-align: start;
}
.lightbox figcaption b { display: block; color: var(--ink); font-size: 15px; }
.lightbox figcaption p { margin-top: 6px; font-size: 14.5px; line-height: 1.9; white-space: pre-line; }
.lightbox .icon-btn { position: absolute; top: -14px; inset-inline-start: -10px; }

/* ---------- التنبيهات وبانر التثبيت ---------- */
.toast {
    position: fixed;
    inset-inline: 16px;
    bottom: calc(var(--tabbar-h) + 14px + env(safe-area-inset-bottom));
    z-index: 80;
    max-width: 420px;
    margin-inline: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 16px;
    border-radius: 14px;
    background: var(--ink);
    color: var(--tape);
    font-weight: 600;
    font-size: 14.5px;
    box-shadow: 0 16px 30px -14px rgba(0, 0, 0, 0.7);
    transform: translateY(20px);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.35s var(--ease-out), opacity 0.25s ease;
}
.toast.is-open { transform: none; opacity: 1; pointer-events: auto; }
.toast.is-error { background: var(--danger); color: #fff; }
.toast button { color: var(--honey-hi); font-weight: 700; white-space: nowrap; }

.install {
    position: fixed;
    inset-inline: 12px;
    bottom: calc(var(--tabbar-h) + 12px + env(safe-area-inset-bottom));
    z-index: 44;
    max-width: 440px;
    margin-inline: auto;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border-radius: 14px;
    color: var(--ink);
    background-color: var(--paper);
    background-image: var(--grain);
    box-shadow: 0 16px 30px -14px rgba(0, 0, 0, 0.7);
}
.install img { width: 46px; height: 46px; border-radius: 12px; }
.install div { flex: 1; min-width: 0; font-size: 13px; color: var(--ink-soft); line-height: 1.5; }
.install b { display: block; color: var(--ink); font-size: 14.5px; }

/* ---------- الشاشات الأكبر ---------- */
@media (min-width: 560px) {
    :root { --jar-w: 230px; --jar-h: calc(var(--jar-w) * 1.25); }
    .slide-arrow { display: grid; }
    .proofs { grid-auto-columns: 34%; }
    .reviews-grid { grid-template-columns: repeat(2, 1fr); }
    .sheet { padding: 46px 40px 32px; }
}

@media (min-width: 900px) {
    :root { --header-h: 76px; --jar-w: 214px; --jar-h: calc(var(--jar-w) * 1.25); --gutter: 28px; }
    .main-nav { display: flex; }
    .tabbar { display: none; }
    .pantry { padding-top: 40px; }
    .hero-frame { height: min(68vh, 620px); padding: 10px; }
    .slide-note { padding: 0 48px 56px; }
    .slide-arrow { display: grid; }
    .shelf:first-child { margin-top: 36px; }
    .notes { font-size: 15px; margin-top: 26px; }
    .shelf { margin-top: 40px; }
    .shelf { text-align: center; }
    .shelf-tag { font-size: 26px; }
    .shelf-row {
        grid-auto-flow: row;
        grid-template-columns: repeat(auto-fit, var(--jar-w));
        justify-content: center;
        text-align: start;
        column-gap: 36px;
        row-gap: 40px;
        overflow: visible;
        padding-inline: max(var(--gutter), calc((100% - var(--wrap)) / 2 + var(--gutter)));
    }
    .label h3 { font-size: 21px; }
    .label .price { font-size: 17px; }
    .section { padding-block: 88px; }
    .notes { justify-content: center; }
    .story { grid-template-columns: 5fr 7fr; gap: 64px; }
    .proofs { display: flex; flex-wrap: wrap; justify-content: center; gap: 26px 22px; overflow: visible; margin-inline: 0; padding-inline: 0; }
    .proof { width: calc((100% - 4 * 22px) / 5); }
    .reviews-grid { display: flex; flex-wrap: wrap; justify-content: center; gap: 30px; }
    .review { width: calc((100% - 2 * 30px) / 3); }
    .footer-grid { grid-template-columns: 2fr 1fr 1fr; gap: 48px; }
    .site-footer { padding-bottom: 32px; }
    .toast { bottom: 24px; }
    /* على الديسكتوب يكفي زر التثبيت الموجود في شريط عنوان المتصفح */
    .install { display: none; }
    .modal { align-items: center; padding: 24px; }
    .modal-panel { border-radius: 8px; }
    .pm { grid-template-columns: 5fr 7fr; }
    .pm-media, .pm-media img { max-height: none; }
    .pm-media { min-height: 480px; }
    .pm-info { padding: 30px 30px 14px; }
    .pm-foot { padding-inline: 30px; }
}

@media (max-width: 380px) {
    .grid-2 { grid-template-columns: 1fr; }
    .cart-tag-label { display: none; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
    html { scroll-behavior: auto; }
}
