/* ============================================================
   FEAST — Restaurant Pro store theme (theme code: feast-store)
   Appetite-first menu explorer · warm cream / charred brown /
   flame orange / fresh basil · Fraunces + Karla + Tajawal
   Mobile-first · RTL-safe (logical properties) · reduced-motion aware
   ============================================================ */

:root {
    --cream: var(--tk-bg, #FFF8EF);
    --cream-2: color-mix(in srgb, var(--tk-bg, #FFF8EF), #000 4%);
    --cream-3: color-mix(in srgb, var(--tk-bg, #FFF8EF), #000 9%);
    --char: var(--tk-text, #2B1D16);
    --char-2: color-mix(in srgb, var(--tk-text, #2B1D16), var(--tk-bg, #FFF8EF) 13%);
    --flame: var(--tk-primary, #E8590C);
    --flame-deep: color-mix(in srgb, var(--tk-primary, #E8590C), #000 18%);
    --flame-soft: color-mix(in srgb, var(--tk-primary, #E8590C), #fff 82%);
    --basil: var(--tk-secondary, #3E7C4A);
    --basil-soft: color-mix(in srgb, var(--tk-secondary, #3E7C4A), #fff 87%);
    --accent2: var(--tk-accent2, #FF7A2F);
    --success: var(--tk-success, #1f7a4d);
    --danger: var(--tk-danger, #B3261E);
    --card: #FFFFFF;
    --muted: color-mix(in srgb, var(--tk-text, #2B1D16), var(--tk-bg, #FFF8EF) 38%);
    --line: rgb(from var(--tk-text, #2B1D16) r g b / .12);
    --line-2: rgb(from var(--tk-text, #2B1D16) r g b / .22);
    --grad-flame: linear-gradient(135deg, var(--tk-accent2, #FF7A2F) 0%, var(--tk-primary, #E8590C) 60%, color-mix(in srgb, var(--tk-primary, #E8590C), #000 18%) 100%);
    --shadow-1: 0 2px 10px -4px rgb(from var(--tk-text, #2B1D16) r g b / .14);
    --shadow-2: 0 14px 34px -16px rgb(from var(--tk-text, #2B1D16) r g b / .28);
    --shadow-flame: 0 10px 26px -10px rgb(from var(--tk-primary, #E8590C) r g b / .55);
    --r-lg: 24px;
    --r-md: 16px;
    --r-sm: 10px;
    --r-pill: 999px;
    --font-d: var(--tk-font-header, 'Fraunces'), 'Tajawal', Georgia, serif;
    --font-b: var(--tk-font-content, 'Karla'), 'Tajawal', system-ui, sans-serif;
    --header-h: 62px;
    --dock-h: 68px;
}

/* ---------- Base ---------- */
html { background: var(--cream); scroll-behavior: smooth; }

body.feast {
    background: var(--cream);
    color: var(--char);
    font-family: var(--font-b);
    font-size: 16px;
    line-height: 1.6;
    letter-spacing: 0;
    -webkit-font-smoothing: antialiased;
    /* clip (not hidden): hidden promotes <body> to its own scroll
       container, which collapsed <html> to viewport height and broke
       window scroll + position:sticky on iOS. clip contains horizontal
       drift without becoming a scroller. Matches the global baseline. */
    overflow-x: clip;
    min-height: 100vh;
    padding-block-end: calc(var(--dock-h) + env(safe-area-inset-bottom, 0px));
}

/* Paper grain */
body.feast::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='p'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.82' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23p)' opacity='0.55'/%3E%3C/svg%3E");
    opacity: .05;
    mix-blend-mode: multiply;
}

body.feast ::selection { background: var(--flame); color: #fff; }
.feast a { text-decoration: none; }
.feast img { max-width: 100%; }

.feast h1, .feast h2, .feast h3, .feast .f-display {
    font-family: var(--font-d);
    color: var(--char);
    letter-spacing: -.01em;
}

.feast-wrap {
    max-width: 1140px;
    margin-inline: auto;
    padding-inline: 16px;
}

.feast-section { padding-block: 26px; }
.feast-section.tight { padding-block-end: 0; }

/* Squiggle divider (hand-drawn wave) */
.feast-squiggle {
    height: 12px;
    width: min(190px, 46vw);
    margin: 6px auto;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='12' viewBox='0 0 40 12'%3E%3Cpath d='M1 6 Q 6 1 11 6 T 21 6 T 31 6 T 41 6' fill='none' stroke='%23E8590C' stroke-width='2.2' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: repeat-x;
    background-position: center;
    opacity: .85;
}
.feast-squiggle.basil {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='12' viewBox='0 0 40 12'%3E%3Cpath d='M1 6 Q 6 1 11 6 T 21 6 T 31 6 T 41 6' fill='none' stroke='%233E7C4A' stroke-width='2.2' stroke-linecap='round'/%3E%3C/svg%3E");
}
.feast-squiggle.start { margin-inline-start: 0; }

/* Section heads */
.feast-sec-head { text-align: center; margin-block-end: 16px; }
.feast-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .18em;
    text-transform: uppercase;
    color: var(--basil);
}
.feast-sec-title {
    font-size: clamp(1.45rem, 5.4vw, 2rem);
    font-weight: 650;
    line-height: 1.12;
    margin: 4px 0 0;
}
.feast-sec-sub { color: var(--muted); font-size: 14.5px; margin: 6px auto 0; max-width: 52ch; }

/* ---------- Preloader ---------- */
.feast .preloader-wrapper {
    position: fixed;
    inset: 0;
    z-index: 3000;
    background: var(--cream);
    display: grid;
    place-items: center;
}
.feast .preloader-wrapper .spinner-border { color: var(--flame); width: 2.4rem; height: 2.4rem; }

/* ---------- Header ---------- */
.feast-header {
    position: sticky;
    inset-block-start: 0;
    z-index: 120;
    background: rgb(from var(--tk-bg, #FFF8EF) r g b / .86);
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
    border-block-end: 1px solid var(--line);
}
.feast-header-inner {
    max-width: 1140px;
    margin-inline: auto;
    padding: 9px 16px;
    min-height: var(--header-h);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}
.feast-logo { display: flex; align-items: center; gap: 10px; min-width: 0; }
.feast-logo img {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    object-fit: cover;
    border: 1.5px solid var(--line-2);
    background: var(--card);
}
.feast-logo-name {
    font-family: var(--font-d);
    font-weight: 650;
    font-size: 17px;
    color: var(--char);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 44vw;
}
.feast-header-actions { display: flex; align-items: center; gap: 8px; }
.feast .feast-header .form-select {
    background-color: var(--card);
    border: 1.5px solid var(--line);
    border-radius: var(--r-pill);
    color: var(--char);
    font-weight: 700;
    font-size: 13px;
    padding-block: 6px;
    box-shadow: none;
}
.feast-cart-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 14px;
    background: var(--char);
    color: var(--cream);
    font-size: 21px;
    cursor: pointer;
    transition: transform .2s ease, background-color .2s ease;
}
.feast-cart-btn:hover { background: var(--flame); color: #fff; transform: translateY(-1px); }
.feast-badge {
    position: absolute;
    inset-block-start: -6px;
    inset-inline-end: -6px;
    min-width: 19px;
    height: 19px;
    padding-inline: 5px;
    border-radius: var(--r-pill);
    background: var(--flame);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    line-height: 19px;
    text-align: center;
    border: 2px solid var(--cream);
}

/* ---------- Hero ---------- */
.feast-hero { padding-block: 22px 8px; }
.feast-hero-grid { display: grid; gap: 18px; }
.feast-hero-copy { text-align: start; }
.feast-hero-title {
    font-size: clamp(2rem, 8.6vw, 3.1rem);
    font-weight: 680;
    line-height: 1.06;
    margin: 10px 0 0;
}
.feast-hero-title em { font-style: italic; color: var(--flame); }
.feast-hero-sub { color: var(--char-2); font-size: 15.5px; margin: 10px 0 0; max-width: 56ch; }

.feast-chip-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-block-start: 14px; }
.feast-chip {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 7px 13px;
    border-radius: var(--r-pill);
    background: var(--card);
    border: 1.5px solid var(--line);
    font-size: 13px;
    font-weight: 700;
    color: var(--char-2);
}
.feast-chip i { font-size: 16px; color: var(--flame); }
.feast-chip.is-hidden { display: none; }
.feast-chip .feast-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); }
.feast-chip.is-open { border-color: rgb(from var(--tk-secondary, #3E7C4A) r g b / .45); background: var(--basil-soft); color: var(--basil); }
.feast-chip.is-open .feast-dot { background: var(--basil); box-shadow: 0 0 0 0 rgb(from var(--tk-secondary, #3E7C4A) r g b / .45); animation: feast-pulse 2.2s ease-out infinite; }
.feast-chip.is-closed { background: var(--cream-2); color: var(--muted); }
.feast-chip.is-closed .feast-dot { background: var(--flame-deep); }
@keyframes feast-pulse { 70% { box-shadow: 0 0 0 8px rgb(from var(--tk-secondary, #3E7C4A) r g b / 0); } 100% { box-shadow: 0 0 0 0 rgb(from var(--tk-secondary, #3E7C4A) r g b / 0); } }

.feast-hero-cta { display: flex; flex-wrap: wrap; gap: 10px; margin-block-start: 18px; }

/* Buttons */
.feast-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    padding: 13px 22px;
    border: 0;
    border-radius: var(--r-md);
    font-family: var(--font-b);
    font-weight: 700;
    font-size: 15px;
    cursor: pointer;
    transition: transform .2s ease, box-shadow .2s ease, background-color .2s ease;
}
.feast-btn:active { transform: scale(.98); }
.feast-btn-flame { background: var(--grad-flame); color: #fff !important; box-shadow: var(--shadow-flame); }
.feast-btn-flame:hover { transform: translateY(-2px); color: #fff; box-shadow: 0 14px 32px -10px rgb(from var(--tk-primary, #E8590C) r g b / .6); }
.feast-btn-ghost { background: var(--card); color: var(--char) !important; border: 1.5px solid var(--line-2); }
.feast-btn-ghost:hover { border-color: var(--char); color: var(--char); transform: translateY(-2px); }

/* Hero cover — CSS scroll-snap slides (single or JSON array) */
.feast-hero-media { position: relative; filter: drop-shadow(0 18px 22px rgb(from var(--tk-text, #2B1D16) r g b / .18)); }
.feast-cover-rail {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    border-radius: var(--r-lg);
    scrollbar-width: none;
}
.feast-cover-rail::-webkit-scrollbar { display: none; }
.feast-cover-slide {
    flex: 0 0 100%;
    scroll-snap-align: center;
    aspect-ratio: 16 / 10;
    border-radius: var(--r-lg);
    overflow: hidden;
    background: var(--cream-2);
    border: 1.5px solid var(--line);
}
.feast-cover-rail.has-multi .feast-cover-slide { flex-basis: 88%; }
.feast-cover-slide img { width: 100%; height: 100%; object-fit: cover; display: block; }
.feast-cover-hint {
    position: absolute;
    inset-block-end: 10px;
    inset-inline-end: 12px;
    padding: 4px 11px;
    border-radius: var(--r-pill);
    background: rgb(from var(--tk-text, #2B1D16) r g b / .65);
    color: var(--cream);
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: .04em;
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
    pointer-events: none;
}

/* Session alerts */
.feast .alert.feast-flash { border-radius: var(--r-md); font-size: 14.5px; margin-block: 12px; }

/* ---------- Trust strip ---------- */
.feast-trust {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px 14px;
    padding-block: 18px 6px;
}
.feast-trust-item { display: inline-flex; align-items: center; gap: 9px; font-size: 13.5px; font-weight: 700; color: var(--char-2); }
.feast-trust-item i {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--basil-soft);
    color: var(--basil);
    font-size: 17px;
}

/* ---------- Category tab rail (sticky under header) ---------- */
.feast-cat-rail-wrap {
    position: sticky;
    scroll-margin-block-start: calc(var(--header-h) + 4px);
    inset-block-start: var(--header-h);
    z-index: 110;
    background: rgb(from var(--tk-bg, #FFF8EF) r g b / .92);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    border-block-end: 1px solid var(--line);
}
.feast-cat-rail {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    scroll-snap-type: x proximity;
    padding-block: 10px;
    scrollbar-width: none;
}
.feast-cat-rail::-webkit-scrollbar { display: none; }
.feast-cat-rail > :first-child { margin-inline-start: auto; }
.feast-cat-rail > :last-child { margin-inline-end: auto; }
.feast-cat-tab {
    flex: 0 0 auto;
    scroll-snap-align: start;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    /* logical padding: tighter on the icon (start) side, mirrors in RTL */
    padding: 6px 14px;
    padding-inline-start: 7px;
    border-radius: var(--r-pill);
    background: var(--card);
    border: 1.5px solid var(--line);
    color: var(--char);
    font-size: 13.5px;
    font-weight: 700;
    white-space: nowrap;
    transition: border-color .2s ease, background-color .2s ease, color .2s ease, transform .2s ease;
}
.feast-cat-tab img { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; background: var(--cream-2); }
.feast-cat-tab .feast-cat-all {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--cream-2);
    color: var(--char-2);
    font-size: 15px;
}
.feast-cat-tab:hover { border-color: var(--flame); color: var(--flame-deep); transform: translateY(-1px); }
.feast-cat-tab.is-active { background: var(--char); border-color: var(--char); color: var(--cream); }
.feast-cat-tab.is-active:hover { color: var(--cream); }

/* ---------- Toolbar (search / price / sort) ---------- */
.feast-toolbar { display: grid; gap: 8px; padding-block: 14px 4px; }
.feast-toolbar form { display: contents; }
.feast-search-row { display: flex; gap: 8px; }
.feast-input {
    width: 100%;
    padding: 12px 14px;
    border-radius: var(--r-md);
    border: 1.5px solid var(--line);
    background: var(--card);
    color: var(--char);
    font-family: var(--font-b);
    font-size: 14.5px;
    outline: none;
    transition: border-color .2s ease, box-shadow .2s ease;
}
.feast-input:focus { border-color: var(--flame); box-shadow: 0 0 0 3px var(--flame-soft); }
.feast-input::placeholder { color: var(--muted); }
.feast-toolbar-btn {
    flex: 0 0 auto;
    padding: 11px 16px;
    border: 0;
    border-radius: var(--r-md);
    background: var(--char);
    color: var(--cream);
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
    transition: background-color .2s ease;
}
.feast-toolbar-btn:hover { background: var(--flame); }
.feast-filter-row { display: flex; gap: 8px; }
.feast-filter-row .feast-input { min-width: 0; }
.feast select.feast-input { appearance: auto; }

/* ---------- Rails (popular / related) ---------- */
.feast-rail {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    scroll-snap-type: x proximity;
    padding-block: 4px 14px;
    scrollbar-width: none;
}
.feast-rail::-webkit-scrollbar { display: none; }
.feast-rail > :first-child { margin-inline-start: auto; }
.feast-rail > :last-child { margin-inline-end: auto; }
.feast-rail .feast-dish-card { flex: 0 0 218px; scroll-snap-align: start; }

/* ---------- Dish card ---------- */
.feast-dish-card {
    position: relative;
    background: var(--card);
    border: 1.5px solid var(--line);
    border-radius: var(--r-lg);
    padding: 9px 9px 11px;
    box-shadow: var(--shadow-1);
    transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
    display: flex;
    flex-direction: column;
}
.feast-dish-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-2); border-color: var(--line-2); }
.feast-dish-link { display: block; color: inherit; min-width: 0; }
.feast-dish-media {
    position: relative;
    aspect-ratio: 4 / 3;
    border-radius: var(--r-md);
    overflow: hidden;
    background: var(--cream-2);
}
.feast-dish-media img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .45s ease, opacity .4s ease;
}
.feast-dish-media .img-alt { opacity: 0; }
.feast-dish-card:hover .img-main { transform: scale(1.05); }
.feast-dish-card:hover .img-alt { opacity: 1; }
.feast-dish-badge {
    position: absolute;
    inset-block-start: 8px;
    inset-inline-start: 8px;
    z-index: 2;
    padding: 3px 10px;
    border-radius: var(--r-pill);
    background: var(--basil);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .03em;
    box-shadow: var(--shadow-1);
}
.feast-dish-name {
    font-size: 15.5px;
    font-weight: 650;
    margin: 9px 2px 0;
    line-height: 1.25;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.feast-dish-sub {
    color: var(--muted);
    font-size: 12.5px;
    margin: 2px 2px 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.feast-dish-foot {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 8px;
    margin-block-start: 9px;
    padding-inline: 2px;
}

/* Menu-sticker price tag */
.feast-price-tag {
    position: relative;
    display: inline-flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 5px 11px;
    background: var(--flame);
    color: #fff;
    border-radius: 9px;
    transform: rotate(-2.5deg);
    box-shadow: 0 4px 12px -4px rgb(from var(--tk-primary, #E8590C) r g b / .5);
    line-height: 1.15;
}
.feast-price-tag::before {
    content: "";
    position: absolute;
    inset: 3px;
    border: 1.5px dashed rgba(255, 255, 255, .55);
    border-radius: 6px;
    pointer-events: none;
}
.feast-price-now { font-family: var(--font-d); font-weight: 650; font-size: 14.5px; }
.feast-price-was { font-size: 11px; opacity: .85; text-decoration-thickness: 1.5px; }

.feast-add-btn {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 14px;
    background: var(--char);
    color: var(--cream) !important;
    font-size: 20px;
    cursor: pointer;
    transition: background-color .2s ease, transform .2s ease;
}
.feast-add-btn:hover { background: var(--flame); transform: translateY(-2px) rotate(8deg); }
.feast-soldout {
    font-size: 11.5px;
    font-weight: 700;
    color: var(--muted);
    background: var(--cream-2);
    border-radius: var(--r-pill);
    padding: 6px 11px;
}

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

/* ---------- Empty states (pure CSS illustrations) ---------- */
.feast-empty { text-align: center; padding-block: 36px; }
.feast-empty-plate {
    position: relative;
    width: 96px;
    height: 96px;
    margin: 0 auto 16px;
    border-radius: 50%;
    background: var(--card);
    border: 2px solid var(--line-2);
    box-shadow: inset 0 0 0 14px var(--cream-2), var(--shadow-1);
}
.feast-empty-plate::before,
.feast-empty-plate::after {
    content: "";
    position: absolute;
    inset-block-start: 50%;
    width: 4px;
    height: 54px;
    border-radius: 4px;
    background: var(--line-2);
    transform: translateY(-50%);
}
.feast-empty-plate::before { inset-inline-start: -18px; }
.feast-empty-plate::after { inset-inline-end: -18px; }
.feast-empty-title { font-family: var(--font-d); font-size: 19px; font-weight: 650; margin: 0; }
.feast-empty-sub { color: var(--muted); font-size: 14px; margin: 6px 0 0; }

.feast-empty-bowl {
    position: relative;
    width: 86px;
    height: 44px;
    margin: 26px auto 14px;
    border-radius: 0 0 70px 70px;
    background: var(--card);
    border: 2px solid var(--line-2);
    border-block-start-width: 3px;
}
.feast-empty-bowl::before,
.feast-empty-bowl::after {
    content: "";
    position: absolute;
    inset-block-start: -22px;
    width: 3px;
    height: 16px;
    border-radius: 3px;
    background: var(--line-2);
    animation: feast-steam 2.6s ease-in-out infinite;
}
.feast-empty-bowl::before { inset-inline-start: 32%; }
.feast-empty-bowl::after { inset-inline-end: 32%; animation-delay: 1.2s; }
@keyframes feast-steam {
    0%, 100% { transform: translateY(0) scaleY(.8); opacity: .35; }
    50% { transform: translateY(-6px) scaleY(1.1); opacity: .9; }
}

/* ---------- Pagination ---------- */
.feast-pagination { display: flex; justify-content: center; padding-block: 18px 6px; }
.feast-pagination .pagination { gap: 6px; }
.feast-pagination .page-link {
    border: 1.5px solid var(--line);
    border-radius: var(--r-sm) !important;
    background: var(--card);
    color: var(--char);
    font-weight: 700;
    box-shadow: none;
}
.feast-pagination .page-item.active .page-link { background: var(--flame); border-color: var(--flame); color: #fff; }
.feast-pagination .page-item.disabled .page-link { background: transparent; color: var(--muted); }

/* ---------- Footer ---------- */
.feast-footer {
    position: relative;
    margin-block-start: 28px;
    background: var(--char);
    color: var(--cream);
    padding-block: 30px 26px;
}
.feast-footer::before {
    content: "";
    position: absolute;
    inset-block-start: -7px;
    inset-inline: 0;
    height: 14px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='14' viewBox='0 0 40 14'%3E%3Cpath d='M0 7 Q 5 1 10 7 T 20 7 T 30 7 T 40 7' fill='none' stroke='%23E8590C' stroke-width='3' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: repeat-x;
}
.feast-footer a { color: var(--cream); }
.feast-footer a:hover { color: var(--tk-accent2, #FFB68A); }
.feast-footer-grid { display: grid; gap: 18px; text-align: center; }
.feast-footer-brand { font-size: 13.5px; color: rgb(from var(--tk-bg, #FFF8EF) r g b / .82); line-height: 1.7; }
.feast-footer-brand .f-display { color: var(--cream); }
.feast-socials { display: flex; flex-wrap: wrap; justify-content: center; gap: 9px; }
.feast-social-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 12px;
    background: rgb(from var(--tk-bg, #FFF8EF) r g b / .08);
    border: 1px solid rgb(from var(--tk-bg, #FFF8EF) r g b / .16);
    font-size: 17px;
    transition: background-color .2s ease, transform .2s ease;
}
.feast-social-btn:hover { background: var(--flame); transform: translateY(-2px); }
.feast-policy-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px 16px;
    padding: 0;
    margin: 18px 0 0;
    list-style: none;
    font-size: 13px;
    border-block-start: 1px dashed rgb(from var(--tk-bg, #FFF8EF) r g b / .2);
    padding-block-start: 16px;
}
.feast-policy-links a { color: rgb(from var(--tk-bg, #FFF8EF) r g b / .75); }
.feast-policy-links a:hover { color: var(--cream); }

/* Wallet partial breathing room */
.feast .scaanme-wallet-buttons { margin-block: 20px 8px; }

/* ---------- Order dock (mobile) ---------- */
.feast-dock {
    position: fixed;
    inset-block-end: 0;
    inset-inline: 0;
    z-index: 130;
    background: rgb(from var(--tk-bg, #FFFCF7) r g b / .95);
    -webkit-backdrop-filter: blur(16px);
    backdrop-filter: blur(16px);
    border-block-start: 1px solid var(--line);
    padding: 8px 14px calc(8px + env(safe-area-inset-bottom, 0px));
    display: flex;
    align-items: center;
    gap: 6px;
    max-width: 1140px;
    margin-inline: auto;
}
.feast-dock-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1px;
    min-width: 50px;
    color: var(--char-2);
    font-size: 10.5px;
    font-weight: 700;
    cursor: pointer;
}
.feast-dock-link i { font-size: 21px; }
.feast-dock-link:hover, .feast-dock-link.is-active { color: var(--flame-deep); }
.feast-dock-cart { position: relative; }
.feast-dock-badge {
    position: absolute;
    inset-block-start: -5px;
    inset-inline-end: 2px;
    min-width: 17px;
    height: 17px;
    padding-inline: 4px;
    border-radius: var(--r-pill);
    background: var(--flame);
    color: #fff;
    font-size: 10px;
    line-height: 17px;
    text-align: center;
    font-weight: 700;
    display: none;
}
.feast-dock-cta {
    flex: 1;
    min-width: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 14px;
    border-radius: var(--r-md);
    background: var(--grad-flame);
    color: #fff !important;
    font-weight: 700;
    font-size: 13.5px;
    box-shadow: var(--shadow-flame);
    cursor: pointer;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: transform .2s ease, box-shadow .2s ease;
}
.feast-dock-cta:active { transform: scale(.985); }
.feast-dock-cta i { font-size: 19px; }

/* ---------- Cart offcanvas ---------- */
.feast .offcanvas {
    background: var(--cream);
    color: var(--char);
    border-inline-start: 1px solid var(--line);
}
.feast .offcanvas-body .row { display: block; margin: 0; } /* neutralize grid wrapper around #cart_items */
.feast .offcanvas-header { gap: 12px; padding: 16px; }
.feast .offcanvas-title { font-family: var(--font-d); font-weight: 650; font-size: 21px; color: var(--char); min-width: 0; }
.feast .offcanvas-header .btn-close { flex: 0 0 auto; margin: 0; } /* keep X off the long RTL title */
.feast .offcanvas-footer { border-block-start: 1.5px dashed var(--line-2); padding: 14px 16px calc(14px + env(safe-area-inset-bottom, 0px)); }
.feast-cart-item {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--card);
    border: 1.5px solid var(--line);
    border-radius: var(--r-md);
    padding: 10px;
    margin-block-end: 10px;
    box-shadow: var(--shadow-1);
}
.feast-cart-thumb {
    flex: 0 0 76px;
    width: 76px;
    height: 76px;
    border-radius: var(--r-sm);
    object-fit: cover;
    background: var(--cream-2);
}
.feast-cart-info { flex: 1; min-width: 0; }
.feast-cart-name { font-family: var(--font-d); font-size: 15px; font-weight: 650; margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.feast-cart-sub { display: block; color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.feast-cart-price { color: var(--flame-deep); font-weight: 700; font-size: 14.5px; margin: 3px 0 6px; }
.feast-qty { display: flex; align-items: center; gap: 4px; }
.feast-qty-btn, .feast-remove-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 9px;
    border: 1.5px solid var(--line);
    background: var(--cream);
    color: var(--char);
    cursor: pointer;
    padding: 0;
    transition: border-color .15s ease, background-color .15s ease, color .15s ease;
}
.feast-qty-btn svg, .feast-remove-btn svg { width: 15px; height: 15px; }
.feast-qty-btn:hover { border-color: var(--flame); color: var(--flame-deep); }
.feast-qty-num { min-width: 26px; text-align: center; font-weight: 700; font-size: 14px; }
.feast-remove-btn { margin-inline-start: 8px; color: var(--tk-danger, #B3261E); border-color: rgb(from var(--tk-danger, #B3261E) r g b / .25); }
.feast-remove-btn:hover { background: var(--tk-danger, #B3261E); border-color: var(--tk-danger, #B3261E); color: #fff; }
.feast-cart-total { display: flex; justify-content: space-between; align-items: baseline; font-family: var(--font-d); font-size: 18px; font-weight: 650; margin-block-end: 10px; }
.feast-cart-total b { color: var(--flame-deep); }
.feast #place-order {
    width: 100%;
    background: var(--grad-flame) !important;
    border: 0;
    border-radius: var(--r-md) !important;
    color: #fff !important;
    font-weight: 700;
    font-size: 15px;
    padding: 13px;
    justify-content: center;
    box-shadow: var(--shadow-flame);
}

/* Floating machinery alerts (fallback if app/css/store.css is absent) */
.feast .alert-float {
    display: none;
    position: fixed;
    inset-block-start: 14px;
    inset-inline: 0;
    z-index: 4000;
    margin-inline: auto;
    border-radius: var(--r-md);
    box-shadow: var(--shadow-2);
}
.feast #empty-cart .btn {
    background: var(--char);
    border: 0;
    border-radius: var(--r-md) !important;
    color: var(--cream) !important;
    font-weight: 700;
    justify-content: center;
    padding: 12px;
}

/* ---------- Modals ---------- */
.feast .modal-content {
    position: relative;
    background: var(--cream);
    border: 1.5px solid var(--line);
    border-radius: var(--r-lg);
    color: var(--char);
}
.feast .modal-header { border-block-end: 1.5px dashed var(--line-2); }
.feast .modal-title { font-family: var(--font-d); font-weight: 650; color: var(--char); }
.feast .modal-footer { border-block-start: 1.5px dashed var(--line-2); }
.feast .modal .form-control, .feast .modal textarea {
    border: 1.5px solid var(--line);
    border-radius: var(--r-sm) !important;
    background: var(--card);
    color: var(--char);
}
.feast .modal .form-control:focus { border-color: var(--flame); box-shadow: 0 0 0 3px var(--flame-soft); }
.feast .modal .form-check-input:checked { background-color: var(--flame); border-color: var(--flame); }
.feast .modal .btn { border-radius: var(--r-sm); font-weight: 700; }
.feast .modal .btn-warning { background: var(--grad-flame); border: 0; color: #fff; }
.feast .modal .btn-dark { background: var(--char); border: 0; color: var(--cream); }

/* ---------- Single product ---------- */
.feast-back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-block-start: 16px;
    color: var(--char-2);
    font-size: 13.5px;
    font-weight: 700;
}
.feast-back-link:hover { color: var(--flame-deep); }
.feast-product-grid { display: grid; gap: 20px; padding-block: 14px 8px; }
.feast-gallery-main {
    display: block;
    aspect-ratio: 4 / 3;
    border-radius: var(--r-lg);
    overflow: hidden;
    border: 1.5px solid var(--line);
    background: var(--cream-2);
    box-shadow: var(--shadow-2);
}
.feast-gallery-main img { width: 100%; height: 100%; object-fit: cover; }
.feast-thumb-rail {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    scroll-snap-type: x proximity;
    margin-block-start: 10px;
    padding-block-end: 4px;
    scrollbar-width: none;
}
.feast-thumb-rail::-webkit-scrollbar { display: none; }
.feast-thumb {
    flex: 0 0 76px;
    scroll-snap-align: start;
    width: 76px;
    height: 64px;
    border-radius: var(--r-sm);
    overflow: hidden;
    border: 1.5px solid var(--line);
    background: var(--cream-2);
    cursor: pointer;
    transition: border-color .2s ease, transform .2s ease;
    display: block;
}
.feast-thumb:hover { border-color: var(--flame); transform: translateY(-2px); }
.feast-thumb img { width: 100%; height: 100%; object-fit: cover; }
.feast-product-title { font-size: clamp(1.5rem, 6.4vw, 2.2rem); font-weight: 680; line-height: 1.12; margin: 0; }
.feast-product-sub { color: var(--char-2); font-size: 15px; margin: 8px 0 0; }
.feast-product-pricing { display: flex; align-items: center; gap: 12px; margin-block-start: 16px; }
.feast-product-pricing .feast-price-tag { padding: 8px 16px; }
.feast-product-pricing .feast-price-now { font-size: 20px; }
.feast-badge-row { display: flex; flex-wrap: wrap; gap: 8px; margin-block-start: 14px; }
.feast-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    border-radius: var(--r-pill);
    font-size: 12.5px;
    font-weight: 700;
    background: var(--cream-2);
    color: var(--char-2);
    border: 1px solid var(--line);
}
.feast-pill.basil { background: var(--basil-soft); color: var(--basil); border-color: rgb(from var(--tk-secondary, #3E7C4A) r g b / .3); }
.feast-pill.stone { background: var(--cream-2); color: var(--muted); }
.feast-product-cta { margin-block-start: 18px; }
.feast-product-cta .feast-btn { width: 100%; padding-block: 15px; font-size: 16px; }
.feast-product-desc { color: var(--char-2); font-size: 15px; margin-block-start: 18px; line-height: 1.75; }
.feast-product-desc img { border-radius: var(--r-md); }
.feast .product-share-card .share-title { font-family: var(--font-d); color: var(--char); }

/* ---------- Categories page (editorial tiles) ---------- */
.feast-cat-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-block-start: 18px; }
.feast-cat-tile {
    position: relative;
    display: block;
    aspect-ratio: 4 / 5;
    border-radius: var(--r-lg);
    overflow: hidden;
    border: 1.5px solid var(--line);
    box-shadow: var(--shadow-1);
    transition: transform .25s ease, box-shadow .25s ease;
}
.feast-cat-tile:hover { transform: translateY(-4px); box-shadow: var(--shadow-2); }
.feast-cat-tile img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.feast-cat-tile:hover img { transform: scale(1.06); }
.feast-cat-tile::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgb(from var(--tk-text, #2B1D16) r g b / 0) 38%, rgb(from var(--tk-text, #2B1D16) r g b / .82) 100%);
}
.feast-cat-tile-copy { position: absolute; inset-block-end: 0; inset-inline: 0; z-index: 2; padding: 14px; }
.feast-cat-tile-name {
    font-family: var(--font-d);
    color: var(--cream);
    font-size: 17.5px;
    font-weight: 650;
    line-height: 1.2;
    margin: 0;
}
.feast-cat-tile-hint {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin-block-start: 6px;
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--tk-accent2, #FFC59E);
}
.feast-cat-grid .feast-cat-tile:first-child { grid-column: 1 / -1; aspect-ratio: 16 / 9; }
.feast-cat-grid .feast-cat-tile:first-child .feast-cat-tile-name { font-size: 22px; }

/* ---------- Policy page ---------- */
.feast-policy { padding-block: 26px 10px; max-width: 760px; margin-inline: auto; }
.feast-policy-title {
    font-size: clamp(1.6rem, 6.4vw, 2.3rem);
    font-weight: 680;
    margin: 0 0 6px;
}
.feast-policy-body { color: var(--char-2); font-size: 15px; line-height: 1.8; margin-block-start: 18px; max-width: 68ch; }
.feast-policy-body h1, .feast-policy-body h2, .feast-policy-body h3 { margin-block: 1.2em .4em; }
.feast-policy-body img { border-radius: var(--r-md); }

/* ---------- Newsletter / info popups ---------- */
.feast .modal .feast-news-row { display: flex; gap: 8px; }
.feast .modal .feast-news-row .feast-input { flex: 1; }

/* ============================================================
   ≥760px layer
   ============================================================ */
@media (min-width: 760px) {
    :root { --header-h: 68px; }
    body.feast { padding-block-end: 0; }
    .feast-wrap { padding-inline: 24px; }
    .feast-section { padding-block: 36px; }

    .feast-hero { padding-block: 38px 14px; }
    .feast-hero-grid { grid-template-columns: 1fr 1.05fr; align-items: center; gap: 36px; }
    .feast-logo-name { max-width: none; font-size: 19px; }

    .feast-toolbar { grid-template-columns: 1.4fr 1fr .7fr; align-items: center; }
    .feast-toolbar form { display: flex; gap: 8px; grid-column: 1 / 3; }
    .feast-search-row { flex: 1.4; }
    .feast-filter-row { flex: 1; }

    .feast-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
    .feast-rail .feast-dish-card { flex-basis: 248px; }

    .feast-product-grid { grid-template-columns: 1.05fr 1fr; gap: 36px; padding-block: 26px 14px; }
    .feast-product-cta .feast-btn { width: auto; min-width: 280px; }

    .feast-cat-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
    .feast-cat-grid .feast-cat-tile:first-child { grid-column: span 2; aspect-ratio: auto; }

    .feast-footer-grid { grid-template-columns: 1fr auto; text-align: start; align-items: center; }
    .feast-socials { justify-content: flex-end; }
    .feast-policy-links { justify-content: flex-start; }

    .feast-dock { display: none; }
}

@media (min-width: 1060px) {
    .feast-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .feast-grid.is-filtered { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* ============================================================
   Reduced motion layer — kill ambient/auto motion
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .feast *, .feast *::before, .feast *::after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
    }
    .feast-chip.is-open .feast-dot { animation: none; box-shadow: none; }
    .feast-empty-bowl::before, .feast-empty-bowl::after { animation: none; opacity: .5; }
}


/* ============================================================
   Cart toast — bulletproof compact pill.
   Overrides the legacy inline showAlert() sizing (width:75% /
   inset-inline:0) that made the Tabler solid alert blow up to a
   half-screen green panel. Forces a centered top toast, auto height.
   ============================================================ */
.alert-float {
    position: fixed !important;
    inset-block-start: 16px !important;
    inset-block-end: auto !important;
    bottom: auto !important;
    inset-inline: 16px !important;
    z-index: 4000;
    width: auto !important;
    max-width: 420px !important;
    margin-inline: auto !important;
    height: auto !important;
    min-height: 0 !important;
    padding: 13px 20px !important;
    border: 0 !important;
    border-radius: 14px !important;
    text-align: center !important;
    font-weight: 600;
    font-size: 14.5px;
    line-height: 1.4;
    background: var(--tk-success, #1f7a4d) !important;
    color: #fff !important;
    box-shadow: 0 16px 38px -10px rgba(0, 0, 0, .42);
    opacity: 0;
    transform: translateY(-12px);
    transition: opacity .25s ease, transform .25s ease;
    pointer-events: none;
}
.alert-float.show {
    display: block !important;
    opacity: 1 !important;
    transform: none !important;
}
.alert-float .btn-close,
.alert-float .alert-icon { display: none !important; }
@media (prefers-reduced-motion: reduce) {
    .alert-float { transition: none; }
}


/* ============================================================
   GLOBAL CONTAINMENT BASELINE (founder remark: diagonal-scroll
   drift / horizontal "wiggle" on mobile + zoom-out).
   overflow-x:clip on html is sticky-safe (unlike hidden) and
   stops the horizontal pan; overscroll-behavior-x:none kills the
   rubber-band; max-width:100% + min-width:0 prevent any child
   from forcing the document wider than the viewport.
   ============================================================ */
html { overflow-x: clip; }
body { overflow-x: clip; overscroll-behavior-x: none; max-width: 100%; }
/* horizontal scrollers keep their swipe to themselves */
.car-track, .reel, .film-reel, .tm-track, .letters, .marquee, .marquee-track,
[class*="-track"], [class*="-rail"], [class*="-carousel"], [class*="-scroll"] {
    overscroll-behavior-x: contain;
    max-width: 100vw;
}
