/* =====================================================================
   Storefront theme (header, footer, home, menu, item cards, item popup)
   Colours come from the store's settings via CSS variables set in
   _Layout.cshtml:  --sf-ground (header/footer), --sf-accent (highlights).
   ===================================================================== */

:root {
    --sf-ground: #24150F;
    --sf-ground-bg: #24150F;
    --sf-accent: #C9A46E;
    --sf-cream: #F8F2EA;
    --sf-paper: #FFFDF9;
    --sf-ink: #24150F;
    --sf-muted: #6E5A50;
    --sf-line: #E2D5C4;
    --sf-tile: #E4D3BE;
    --sf-on-ground: #F8F2EA;
    --sf-on-ground-muted: #CDBFAE;
    --sf-serif: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
    --sf-sans: 'Jost', system-ui, -apple-system, 'Segoe UI', sans-serif;
    --sf-radius: 16px;
    --sf-max: 1240px;
}

.sf, .sf-header, .sf-footer, .sf-drawer {
    font-family: var(--sf-sans);
    color: var(--sf-ink);
}

.sf { background: var(--sf-cream); font-size: 15px; line-height: 1.5; }
.sf *, .sf-header *, .sf-footer *, .sf-drawer * { box-sizing: border-box; }
.sf a { color: inherit; }
.sf img { max-width: 100%; }
.sf h1, .sf h2, .sf h3 { font-family: var(--sf-serif); font-weight: 600; color: var(--sf-ink); margin: 0; letter-spacing: 0; }
.sf p { margin: 0; }

.sf-wrap { max-width: var(--sf-max); margin: 0 auto; padding: 0 18px; }
@media (min-width: 768px) { .sf-wrap { padding: 0 32px; } }

.sf-eyebrow { font-size: 11px; letter-spacing: 3px; text-transform: uppercase; color: #8A6A43; }
.sf-muted { color: var(--sf-muted); }

/* Buttons */
.sf-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    min-height: 50px; padding: 0 26px; border-radius: 999px;
    font-family: var(--sf-sans); font-weight: 500; font-size: 15px;
    text-decoration: none !important; cursor: pointer; border: 1px solid transparent;
    transition: opacity .15s ease, transform .15s ease;
}
.sf-btn:hover { opacity: .9; }
.sf-btn:active { transform: scale(.98); }
.sf-btn-dark { background: var(--sf-ground-bg); color: var(--sf-on-ground) !important; }
.sf-btn-light { background: var(--sf-cream); color: var(--sf-ink) !important; }
.sf-btn-outline { border-color: var(--sf-ink); color: var(--sf-ink) !important; background: transparent; }
.sf-btn-outline-light { border-color: var(--sf-accent); color: var(--sf-on-ground) !important; background: transparent; }

/* ---------------------------------------------------------------------
   Header
   --------------------------------------------------------------------- */
.sf-header { background: var(--sf-ground-bg); color: var(--sf-on-ground); position: sticky; top: 0; z-index: 1030; }
.sf-header-inner { max-width: var(--sf-max); margin: 0 auto; padding: 10px 14px; display: flex; align-items: center; gap: 12px; }
@media (min-width: 992px) { .sf-header-inner { padding: 14px 32px; } }
.sf-header a { color: var(--sf-on-ground); text-decoration: none; }
.sf-logo { display: flex; align-items: center; min-height: 44px; }
.sf-logo img { max-height: 54px; width: auto; display: block; }
@media (min-width: 992px) { .sf-logo img { max-height: 64px; } }
.sf-logo-text { font-family: var(--sf-serif); font-size: 26px; font-weight: 600; letter-spacing: 5px; text-transform: uppercase; }
.sf-nav { display: none; gap: 26px; margin: 0 auto; font-size: 15px; }
.sf-nav a { padding: 10px 0; border-bottom: 1px solid transparent; }
.sf-nav a:hover, .sf-nav a.active { border-bottom-color: var(--sf-accent); }
@media (min-width: 992px) { .sf-nav { display: flex; } }
.sf-header-actions { display: flex; align-items: center; gap: 2px; margin-left: auto; }
@media (min-width: 992px) { .sf-header-actions { margin-left: 0; } }
.sf-icon-btn {
    width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center;
    border: 0; background: transparent; color: var(--sf-on-ground); position: relative; padding: 0; cursor: pointer;
}
.sf-icon-btn svg { width: 22px; height: 22px; }
.sf-cart-count {
    position: absolute; top: 4px; right: 2px; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 9px;
    background: var(--sf-accent); color: var(--sf-ink); font-size: 11px; font-weight: 600; line-height: 18px; text-align: center;
}
.sf-header .sf-order-now { display: none; margin-left: 10px; min-height: 44px; padding: 0 20px; }
@media (min-width: 992px) { .sf-header .sf-order-now { display: inline-flex; } }
.sf-burger { order: -1; }
@media (min-width: 992px) { .sf-burger { display: none; } }

/* Mobile drawer */
.sf-drawer { position: fixed; inset: 0; z-index: 1060; display: none; }
.sf-drawer.open { display: block; }
.sf-drawer-backdrop { position: absolute; inset: 0; background: rgba(20, 12, 8, .55); }
.sf-drawer-panel {
    position: absolute; top: 0; left: 0; bottom: 0; width: min(320px, 86vw); background: var(--sf-ground-bg); color: var(--sf-on-ground);
    padding: 16px 22px 28px; display: flex; flex-direction: column; gap: 6px; overflow-y: auto;
}
.sf-drawer-panel a { color: var(--sf-on-ground); text-decoration: none; font-family: var(--sf-serif); font-size: 24px; font-weight: 600; padding: 10px 0; border-bottom: 1px solid rgba(239, 228, 214, .15); }
.sf-drawer-panel a.active { color: var(--sf-accent); }
.sf-drawer-close { align-self: flex-end; }

/* Opening status bar sits above header */
.top-bar { position: relative; z-index: 1031; }

/* ---------------------------------------------------------------------
   Footer
   --------------------------------------------------------------------- */
.sf-footer { background: var(--sf-ground-bg); color: var(--sf-on-ground-muted); font-size: 15px; margin-top: 56px; }
.sf-footer a { color: var(--sf-on-ground); text-decoration: none; }
.sf-footer a:hover { color: var(--sf-accent); }
.sf-footer-inner { max-width: var(--sf-max); margin: 0 auto; padding: 44px 22px 26px; display: flex; flex-direction: column; gap: 32px; }
@media (min-width: 768px) { .sf-footer-inner { padding: 56px 32px 28px; } }
.sf-footer-cols { display: grid; grid-template-columns: 1fr; gap: 28px; }
@media (min-width: 768px) { .sf-footer-cols { grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 40px; } }
.sf-footer-brand { display: flex; flex-direction: column; gap: 14px; align-items: flex-start; }
.sf-footer-brand img { max-height: 84px; width: auto; }
.sf-footer-brand p { line-height: 1.6; max-width: 320px; margin: 0; }
.sf-footer h4 { font-family: var(--sf-sans); font-size: 11px; letter-spacing: 2px; text-transform: uppercase; color: var(--sf-accent); margin: 0 0 12px; font-weight: 500; }
.sf-footer ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.sf-social { display: flex; flex-wrap: wrap; gap: 10px; }
.sf-social a {
    width: 44px; height: 44px; border-radius: 22px; border: 1px solid rgba(239, 228, 214, .35);
    display: inline-flex; align-items: center; justify-content: center; font-size: 17px;
}
.sf-social a:hover { border-color: var(--sf-accent); }
.sf-footer-base { border-top: 1px solid rgba(239, 228, 214, .2); padding-top: 18px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; font-size: 13px; }

/* ---------------------------------------------------------------------
   Home
   --------------------------------------------------------------------- */
.sf-hero { background: var(--sf-ground-bg); color: var(--sf-on-ground); }
.sf-hero-inner { max-width: var(--sf-max); margin: 0 auto; display: flex; flex-direction: column; }
@media (min-width: 992px) { .sf-hero-inner { flex-direction: row; align-items: center; gap: 48px; padding: 48px 32px 56px; } }
.sf-hero-media { position: relative; height: 420px; overflow: hidden; }
.sf-hero-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.sf-hero-media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(36, 21, 15, 0) 35%, rgba(36, 21, 15, .85) 100%); }
@media (min-width: 992px) {
    .sf-hero-media { order: 2; flex: 1 1 52%; height: 480px; border-radius: 24px; }
    .sf-hero-media::after { display: none; }
}
.sf-hero-copy { position: relative; z-index: 1; padding: 0 22px 26px; margin-top: -150px; display: flex; flex-direction: column; gap: 12px; }
@media (min-width: 992px) { .sf-hero-copy { flex: 1 1 48%; margin-top: 0; padding: 0; gap: 18px; } }
.sf-hero .sf-eyebrow { color: var(--sf-accent); }
.sf-hero h1 { color: var(--sf-on-ground); font-size: 42px; line-height: 1.02; }
@media (min-width: 992px) { .sf-hero h1 { font-size: 68px; } }
.sf-hero p { color: #EFE4D6; font-size: 15px; max-width: 460px; }
@media (min-width: 992px) { .sf-hero p { font-size: 18px; } }
.sf-hero-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 6px; }
@media (min-width: 992px) { .sf-hero-actions { display: flex; gap: 14px; } }

.sf-section { padding-top: 40px; }
@media (min-width: 768px) { .sf-section { padding-top: 72px; } }
.sf-section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.sf-section-head h2 { font-size: 30px; line-height: 1.05; }
@media (min-width: 768px) { .sf-section-head h2 { font-size: 48px; } .sf-section-head { margin-bottom: 26px; } }
.sf-link { font-size: 14px; text-decoration: underline; text-underline-offset: 3px; color: var(--sf-ink) !important; min-height: 44px; display: inline-flex; align-items: center; }

/* Collection tiles (home + menu) */
.sf-tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
@media (min-width: 768px) { .sf-tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; } }
@media (min-width: 1200px) { .sf-tiles.sf-tiles-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.sf-tile {
    display: flex; flex-direction: column; text-decoration: none !important; color: var(--sf-ink) !important;
    background: var(--sf-paper); border: 1px solid #EADFD0; border-radius: 14px; overflow: hidden; cursor: pointer; text-align: left; padding: 0;
    font: inherit; transition: transform .15s ease, box-shadow .15s ease;
}
.sf-tile:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(36, 21, 15, .08); }
.sf-tile-img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; display: block; background: var(--sf-tile); }
.sf-tile-body { padding: 12px 12px 14px; display: flex; flex-direction: column; gap: 2px; }
@media (min-width: 768px) { .sf-tile-body { padding: 16px 18px 18px; } }
.sf-tile-name { font-family: var(--sf-serif); font-size: 21px; font-weight: 600; line-height: 1.1; }
@media (min-width: 768px) { .sf-tile-name { font-size: 27px; } }
.sf-tile-meta { font-size: 12px; color: var(--sf-muted); }
@media (min-width: 768px) { .sf-tile-meta { font-size: 14px; } }

/* Offers strip */
.sf-offers { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 4px; scroll-snap-type: x mandatory; }
.sf-offer {
    flex: 0 0 auto; min-width: 280px; scroll-snap-align: start; border: 1px solid #D9C7AE; border-radius: 14px; background: var(--sf-paper);
    padding: 16px 18px; display: flex; align-items: center; gap: 14px;
}
.sf-offer-amount { font-family: var(--sf-serif); font-size: 30px; font-weight: 600; line-height: 1; white-space: nowrap; }
.sf-offer-text { flex: 1; display: flex; flex-direction: column; gap: 2px; font-size: 13px; color: var(--sf-muted); }
.sf-offer-text strong { color: var(--sf-ink); font-size: 15px; font-weight: 500; }
.sf-offer-code {
    border: 1px dashed var(--sf-ink); border-radius: 8px; padding: 0 12px; min-height: 44px; background: transparent;
    font: 500 14px var(--sf-sans); letter-spacing: 1px; color: var(--sf-ink); cursor: pointer; white-space: nowrap;
}

/* Horizontal "most loved" row */
.sf-row-scroll { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 6px; scroll-snap-type: x mandatory; margin: 0 -18px; padding-left: 18px; padding-right: 18px; }
.sf-row-scroll > * { flex: 0 0 200px; scroll-snap-align: start; }
@media (min-width: 768px) {
    .sf-row-scroll { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; overflow: visible; margin: 0; padding: 0; }
}

/* Visit us */
.sf-visit { display: flex; flex-direction: column; gap: 18px; }
@media (min-width: 992px) { .sf-visit { flex-direction: row; align-items: center; gap: 48px; } }
.sf-visit-copy { display: flex; flex-direction: column; gap: 12px; }
@media (min-width: 992px) { .sf-visit-copy { flex: 1 1 360px; gap: 16px; } }
.sf-visit-copy h2 { font-size: 30px; }
@media (min-width: 768px) { .sf-visit-copy h2 { font-size: 48px; } }
.sf-visit-copy dl { margin: 6px 0 0; display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; font-size: 15px; }
.sf-visit-copy dt { font-size: 11px; letter-spacing: 2px; text-transform: uppercase; color: #8A6A43; font-weight: 500; padding-top: 3px; }
.sf-visit-copy dd { margin: 0; }
.sf-visit-media { display: grid; grid-template-columns: 3fr 2fr; gap: 10px; }
@media (min-width: 992px) { .sf-visit-media { flex: 2 1 560px; gap: 16px; } }
.sf-visit-media img { width: 100%; height: 260px; object-fit: cover; border-radius: 14px; display: block; background: var(--sf-tile); }
@media (min-width: 992px) { .sf-visit-media img { height: 420px; border-radius: 20px; } }
.sf-visit-media.single { grid-template-columns: 1fr; }

/* ---------------------------------------------------------------------
   Menu page
   --------------------------------------------------------------------- */
.sf-menu-top { padding: 18px 0 0; }
@media (min-width: 768px) { .sf-menu-top { padding: 36px 0 0; } }
.sf-crumbs { font-size: 12px; color: var(--sf-muted); display: flex; gap: 6px; flex-wrap: wrap; }
.sf-crumbs a, .sf-crumbs button { color: var(--sf-muted); text-decoration: underline; text-underline-offset: 2px; background: none; border: 0; padding: 0; font: inherit; cursor: pointer; }
.sf-page-title { font-size: 36px; line-height: 1.05; margin-top: 4px !important; }
@media (min-width: 768px) { .sf-page-title { font-size: 56px; } }
.sf-table-note { margin-top: 8px; display: inline-flex; padding: 6px 12px; border-radius: 999px; background: var(--sf-ground-bg); color: var(--sf-on-ground); font-size: 13px; }

.sf-search { margin-top: 14px; position: relative; }
.sf-search input {
    width: 100%; height: 48px; border-radius: 24px; border: 1px solid var(--sf-line); background: var(--sf-paper);
    padding: 0 48px 0 46px; font: 15px var(--sf-sans); color: var(--sf-ink); outline: none;
}
.sf-search input:focus { border-color: var(--sf-ink); }
.sf-search .sf-search-icon { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: var(--sf-muted); pointer-events: none; }
.sf-search .sf-search-clear { position: absolute; right: 2px; top: 2px; width: 44px; height: 44px; border: 0; background: transparent; color: var(--sf-muted); font-size: 22px; cursor: pointer; display: none; }
@media (min-width: 768px) { .sf-search { max-width: 520px; } }

.sf-chips-bar { position: sticky; top: 74px; z-index: 20; background: var(--sf-cream); margin-top: 12px; border-bottom: 1px solid var(--sf-line); }
@media (min-width: 992px) { .sf-chips-bar { top: 92px; } }
.sf-chips { display: flex; gap: 8px; overflow-x: auto; padding: 10px 0; scrollbar-width: none; }
.sf-chips::-webkit-scrollbar { display: none; }
.sf-chip {
    flex: 0 0 auto; min-height: 40px; padding: 0 16px; border-radius: 20px; display: inline-flex; align-items: center;
    background: var(--sf-paper); color: var(--sf-ink) !important; border: 1px solid var(--sf-line); font-size: 14px; white-space: nowrap; cursor: pointer; text-decoration: none !important; font-family: var(--sf-sans);
}
.sf-chip.active { background: var(--sf-ground-bg); color: var(--sf-on-ground) !important; border-color: transparent; }

.sf-view { padding-top: 20px; }
.sf-view[hidden] { display: none !important; }
.sf-collection-head { display: flex; flex-direction: column; gap: 6px; margin-bottom: 18px; }
.sf-sub-tiles { margin-bottom: 8px; }
.sf-sub-tiles .sf-tile-img { aspect-ratio: 1 / 1; }
.sf-sub-tiles .sf-tile { background: transparent; border: 0; }
.sf-sub-tiles .sf-tile-img { border-radius: 16px; }
.sf-sub-tiles .sf-tile-body { padding: 10px 2px 0; }

.sf-group { padding-top: 26px; scroll-margin-top: 130px; }
.sf-group-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; border-bottom: 1px solid var(--sf-line); padding-bottom: 8px; margin-bottom: 16px; }
.sf-group-head h2 { font-size: 26px; }
@media (min-width: 768px) { .sf-group-head h2 { font-size: 34px; } }
.sf-group-head span { font-size: 13px; color: var(--sf-muted); white-space: nowrap; }

.sf-empty { padding: 40px 0; text-align: center; color: var(--sf-muted); }

/* Item grid + card */
.sf-items { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 12px; }
@media (min-width: 768px) { .sf-items { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px 20px; } }
@media (min-width: 1200px) { .sf-items { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.sf-card { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.sf-card-media {
    display: block; position: relative; aspect-ratio: 1 / 1; border-radius: 16px; overflow: hidden; background: var(--sf-tile);
    border: 0; padding: 0; cursor: pointer; width: 100%;
}
.sf-card-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .3s ease; }
.sf-card-media:hover img { transform: scale(1.03); }
.sf-badge { position: absolute; top: 8px; left: 8px; font-size: 11px; font-weight: 500; color: var(--sf-ink); background: var(--sf-accent); padding: 3px 9px; border-radius: 10px; }
.sf-badge-soft { position: absolute; top: 8px; right: 8px; font-size: 11px; color: var(--sf-ink); background: rgba(248, 242, 234, .92); padding: 3px 9px; border-radius: 10px; }
.sf-soldout { position: absolute; inset: 0; background: rgba(36, 21, 15, .55); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 500; letter-spacing: 1px; font-size: 13px; text-transform: uppercase; }
.sf-card-name { background: none; border: 0; padding: 0; text-align: left; font: 500 15px/1.25 var(--sf-sans); color: var(--sf-ink); cursor: pointer; }
.sf-card-desc { font-size: 12px; color: var(--sf-muted); line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
@media (min-width: 768px) { .sf-card-desc { font-size: 13px; } }
.sf-card-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: auto; }
.sf-price { font-weight: 500; font-size: 15px; }
.sf-price del { font-weight: 400; color: #8A776C; font-size: 12px; margin-left: 4px; }
.sf-add {
    width: 44px; height: 44px; flex: 0 0 44px; border-radius: 22px; background: var(--sf-ground-bg); color: var(--sf-on-ground);
    display: inline-flex; align-items: center; justify-content: center; border: 0; cursor: pointer; padding: 0;
}
.sf-add svg { width: 18px; height: 18px; }
.sf-add:disabled { opacity: .45; cursor: not-allowed; }

/* Sticky basket button on phones */
.sf-basket-bar {
    position: fixed; left: 14px; right: 14px; bottom: 14px; z-index: 1020; min-height: 56px; border-radius: 28px;
    background: var(--sf-ground-bg); color: var(--sf-on-ground) !important; text-decoration: none !important;
    display: none; align-items: center; justify-content: space-between; padding: 0 22px; font-weight: 500; font-family: var(--sf-sans);
    box-shadow: 0 10px 30px rgba(36, 21, 15, .25);
}
.sf-basket-bar.show { display: flex; }
@media (min-width: 992px) { .sf-basket-bar { display: none !important; } }

/* ---------------------------------------------------------------------
   Item popup (#cartModal) — restyle only, markup comes from _CartModal
   --------------------------------------------------------------------- */
#cartModal .modal-content { border: 0; border-radius: 20px; overflow: hidden; background: var(--sf-cream); font-family: var(--sf-sans); color: var(--sf-ink); }
#cartModal .cart_popup_img img { aspect-ratio: 4 / 3; object-fit: cover; border-radius: 16px; }
#cartModal .cart_popup_text .title { font-family: var(--sf-serif); font-size: 30px; font-weight: 600; line-height: 1.1; color: var(--sf-ink); }
#cartModal .price { font-family: var(--sf-sans); font-weight: 500; color: var(--sf-ink); }
#cartModal .option-card { border: 1px solid var(--sf-line); border-radius: 14px; background: var(--sf-paper); }
#cartModal .option-title { font-weight: 500; }
#cartModal .option-item { min-height: 48px; }
#cartModal textarea { border-radius: 12px; border-color: var(--sf-line); background: var(--sf-paper); }
#cartModal .cart_buttons { background: var(--sf-ground-bg) !important; color: var(--sf-on-ground) !important; border-radius: 28px !important; min-height: 54px; border: 0; }
#cartModal .btn-close { width: 44px; height: 44px; border-radius: 22px; background: var(--sf-cream); opacity: 1; z-index: 3; }
