/* ============================================================
   SPF - Special Food : site theme
   Loaded from _Layout.cshtml. Page specific rules live in
   MenuPagev3.css, ViewCart.css, OrderCheckout.css, ContactUs.css
   and DateTimeModal.css.
   ============================================================ */

/* ============ TOKENS ============ */
:root {
    --spf-orange: #ff7a00;
    --spf-orange-dark: #c75a00;
    --spf-orange-soft: #ffd9b0;
    --spf-olive: #1f2a06;
    --spf-olive-2: #46521f;
    --spf-sand: #f6f3ec;
    --spf-line: #e8e3d8;
    --spf-muted: #6a6f5a;
    --spf-white: #ffffff;
    --spf-radius-sm: 10px;
    --spf-radius: 18px;
    --spf-radius-lg: 22px;
    --spf-shadow: 0 14px 40px rgba(31,42,6,.16);
    --spf-wrap: 1160px;
    --font-head: "Bricolage Grotesque", system-ui, sans-serif;
    --font-body: "DM Sans", system-ui, -apple-system, sans-serif;
    --font-body-bold: "DM Sans", system-ui, -apple-system, sans-serif;
    /* legacy names still referenced by shared partials */
    --red: var(--spf-orange);
    --red-dark: var(--spf-orange-dark);
    --tomato: var(--spf-orange);
    --tomato-deep: var(--spf-orange-dark);
    --gold: var(--spf-orange);
    --ink: var(--spf-olive);
    --cream: var(--spf-sand);
    --shadow: var(--spf-shadow);
}

/* ============ BASE ============ */
* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 90px;
}

body {
    margin: 0;
    margin-bottom: 0;
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.5;
    color: var(--spf-olive);
    background: var(--spf-white);
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5 {
    font-family: var(--font-head);
    letter-spacing: -.01em;
}

img {
    max-width: 100%;
}

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

    a:hover {
        color: inherit;
    }

:focus-visible {
    outline: 3px solid var(--spf-orange);
    outline-offset: 2px;
}

.spf-wrap {
    max-width: var(--spf-wrap);
    margin: 0 auto;
    padding: 0 20px;
}

@media (min-width: 1200px) {
    .container {
        max-width: var(--spf-wrap);
    }
}

.text-green, .text-pink {
    color: var(--spf-olive) !important;
}

.bg-green, .bg-orange {
    background-color: var(--spf-orange) !important;
}

/* ============ PILLS / BUTTONS ============ */
.spf-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 44px;
    padding: 0 16px;
    border: 0;
    border-radius: 99px;
    font-weight: 700;
    font-size: 15px;
    white-space: nowrap;
    text-decoration: none;
    cursor: pointer;
    transition: background .15s ease, color .15s ease;
}

.spf-pill--ghost {
    background: rgba(255,255,255,.16);
    color: #fff;
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
}

    .spf-pill--ghost:hover,
    .spf-pill--ghost.active {
        background: rgba(255,255,255,.28);
        color: #fff;
    }

.spf-pill--cart {
    background: var(--spf-orange);
    color: #fff;
}

    .spf-pill--cart:hover {
        background: var(--spf-orange-dark);
        color: #fff;
    }

    .spf-pill--cart b {
        background: #fff;
        color: var(--spf-orange-dark);
        border-radius: 99px;
        min-width: 22px;
        height: 22px;
        padding: 0 6px;
        display: grid;
        place-items: center;
        font-size: 12px;
    }

.spf-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 13px 24px;
    border-radius: 99px;
    font-weight: 700;
    text-decoration: none;
    border: 2px solid transparent;
    transition: background .15s ease, border-color .15s ease;
}

.spf-btn--primary {
    background: var(--spf-orange);
    color: #fff;
}

    .spf-btn--primary:hover {
        background: var(--spf-orange-dark);
        color: #fff;
    }

.spf-btn--outline {
    border-color: rgba(255,255,255,.7);
    color: #fff;
}

    .spf-btn--outline:hover {
        background: rgba(255,255,255,.12);
        color: #fff;
    }

/* ============ HEADER (_MasterPageHeader.cshtml) ============ */
.spf-top {
    position: relative;
}

.spf-nav {
    position: absolute;
    z-index: 20;
    top: 0;
    left: 0;
    right: 0;
    padding-top: env(safe-area-inset-top, 0px);
}

.spf-nav__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    height: 92px;
}

.spf-logo {
    display: block;
    flex: none;
    background: #fff;
    border-radius: var(--spf-radius);
    padding: 6px 12px;
    box-shadow: 0 6px 20px rgba(0,0,0,.25);
}

    .spf-logo img {
        display: block;
        height: 56px;
        width: auto;
    }

.spf-nav__right {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* ============ HERO (_HomePageSlider2.cshtml) ============ */
.spf-hero {
    position: relative;
    height: 460px;
    background: var(--spf-olive);
    overflow: hidden;
}

    .spf-hero::after {
        content: "";
        position: absolute;
        inset: 0;
        background: linear-gradient(90deg, rgba(20,28,4,.88) 0%, rgba(20,28,4,.55) 55%, rgba(20,28,4,.15) 100%);
        pointer-events: none;
    }

.spf-hero__track {
    display: flex;
    height: 100%;
    transition: transform .7s ease;
}

    .spf-hero__track img {
        flex: 0 0 100%;
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

.spf-hero__copy {
    position: absolute;
    z-index: 2;
    left: 0;
    right: 0;
    bottom: 90px;
}

    .spf-hero__copy h1 {
        color: #fff;
        font-size: clamp(2.3rem, 7vw, 4.4rem);
        font-weight: 800;
        line-height: 1;
        max-width: 11em;
        margin: 0;
    }

    .spf-hero__copy p {
        color: #f3ecd9;
        margin: 14px 0 22px;
        font-size: 1.05rem;
        max-width: 30em;
    }

.spf-hero__cta {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.spf-hero__ctl {
    position: absolute;
    z-index: 3;
    left: 0;
    right: 0;
    bottom: 78px;
    pointer-events: none;
}

    .spf-hero__ctl .spf-wrap {
        display: flex;
        justify-content: flex-end;
        align-items: center;
        gap: 8px;
    }

    .spf-hero__ctl button {
        pointer-events: auto;
        width: 40px;
        height: 40px;
        border-radius: 50%;
        border: 0;
        background: rgba(255,255,255,.9);
        color: var(--spf-olive);
        font-size: 20px;
        line-height: 1;
    }

.spf-hero__dots {
    display: flex;
    gap: 6px;
    margin-right: 6px;
}

    .spf-hero__dots button {
        width: 8px;
        height: 8px;
        padding: 0;
        background: rgba(255,255,255,.55);
        border-radius: 6px;
        transition: width .2s ease;
    }

        .spf-hero__dots button[aria-current="true"] {
            width: 22px;
            background: var(--spf-orange);
        }

/* inner page banner (contact, checkout, ...) */
.spf-banner {
    position: relative;
    height: 200px;
    overflow: hidden;
    background: var(--spf-olive);
}

    .spf-banner img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

    .spf-banner::after {
        content: "";
        position: absolute;
        inset: 0;
        background: linear-gradient(180deg, rgba(20,28,4,.85) 0%, rgba(20,28,4,.6) 100%);
    }

/* ============ INFO CARD + OFFER ============ */
.spf-info {
    position: relative;
    z-index: 4;
    margin-top: -52px;
}

.spf-info__card {
    display: grid;
    grid-template-columns: 1fr;
    background: #fff;
    border-radius: var(--spf-radius-lg);
    box-shadow: var(--spf-shadow);
}

    .spf-info__card > div {
        display: flex;
        align-items: center;
        gap: 14px;
        padding: 16px 22px;
    }

        .spf-info__card > div + div {
            border-top: 1px solid var(--spf-line);
        }

    .spf-info__card small {
        display: block;
        color: var(--spf-muted);
        font-size: 13px;
    }

    .spf-info__card strong {
        font-weight: 700;
    }

.spf-info__icon {
    flex: none;
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border-radius: 14px;
    background: var(--spf-sand);
    color: var(--spf-orange-dark);
}

.spf-open {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: 700;
}

    .spf-open i {
        width: 9px;
        height: 9px;
        border-radius: 50%;
        background: #2f9e44;
    }

    .spf-open.is-closed i {
        background: #c92a2a;
    }

.spf-offer {
    position: relative;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px 20px;
    margin-top: 22px;
    padding: 16px 20px;
    background: var(--spf-olive);
    color: #fff;
    border-radius: var(--spf-radius);
}

.spf-offer__tag {
    flex: none;
    background: var(--spf-orange);
    font-weight: 700;
    font-size: 14px;
    border-radius: var(--spf-radius-sm);
    padding: 4px 12px;
}

.spf-offer__viewport {
    flex: 1 1 0;
    min-width: 0;
    overflow: hidden;
}

.spf-offer__track {
    display: flex;
    transition: transform .5s ease;
}

.spf-offer__slide {
    flex: 0 0 100%;
    min-width: 0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px 20px;
}

.spf-offer__text {
    flex: 1;
    min-width: 200px;
    margin: 0;
    font-size: 15px;
}

.spf-offer__code {
    flex: none;
    padding: 8px 14px;
    border: 2px dashed #ffb366;
    border-radius: var(--spf-radius-sm);
    background: transparent;
    color: var(--spf-orange-soft);
    font-weight: 700;
    letter-spacing: .04em;
    cursor: pointer;
}

    .spf-offer__code:hover {
        background: rgba(255,179,102,.12);
    }

.spf-offer__dots {
    display: flex;
    gap: 6px;
    flex-basis: 100%;
    justify-content: center;
}

    .spf-offer__dots button {
        width: 8px;
        height: 8px;
        padding: 0;
        border: 0;
        border-radius: 6px;
        background: rgba(255,255,255,.35);
        transition: width .2s ease;
    }

        .spf-offer__dots button[aria-current="true"] {
            width: 22px;
            background: var(--spf-orange);
        }

/* ============ FOOTER (_MasterPageFooter.cshtml) ============ */
.spf-footer {
    margin-top: 56px;
    background: var(--spf-olive);
    color: #fff;
}

.spf-footer__grid {
    display: grid;
    gap: 30px;
    padding-top: 52px;
    padding-bottom: 40px;
}

.spf-footer h3 {
    color: var(--spf-orange);
    font-size: 1.3rem;
    font-weight: 700;
    margin: 0 0 10px;
}

.spf-footer p {
    margin: 0;
}

.spf-footer p, .spf-footer a {
    opacity: .92;
    text-decoration: none;
}

    .spf-footer a:hover {
        opacity: 1;
        color: #fff;
    }

.spf-footer__social {
    display: flex;
    gap: 10px;
    margin-bottom: 22px;
}

    .spf-footer__social a {
        display: grid;
        place-items: center;
        width: 40px;
        height: 40px;
        border-radius: 50%;
        background: rgba(255,255,255,.12);
        font-weight: 700;
    }

.spf-footer__legal {
    border-top: 1px solid rgba(255,255,255,.14);
    font-size: 13px;
}

    .spf-footer__legal .spf-wrap {
        display: flex;
        flex-wrap: wrap;
        justify-content: space-between;
        gap: 6px 24px;
        padding-top: 16px;
        padding-bottom: calc(16px + env(safe-area-inset-bottom, 0px));
        opacity: .85;
    }

#logoutButton {
    background: none;
    border: 0;
    padding: 0;
    color: inherit;
    font: inherit;
}

/* ============ BACK TO TOP ============ */
.back-to-top {
    position: fixed;
    right: 16px;
    bottom: 20px;
    z-index: 15;
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: #fff;
    color: var(--spf-olive);
    font-size: 20px;
    font-weight: 700;
    box-shadow: 0 4px 16px rgba(0,0,0,.25);
    opacity: 0;
    visibility: hidden;
    transition: opacity .2s ease, visibility .2s ease;
}

    .back-to-top.is-visible {
        opacity: 1;
        visibility: visible;
    }

    .back-to-top:hover {
        color: var(--spf-orange-dark);
    }

/* ============ MOBILE ORDER BAR ============ */
.spf-bottombar {
    position: fixed;
    z-index: 30;
    left: 14px;
    right: 14px;
    bottom: calc(14px + env(safe-area-inset-bottom, 0px));
    display: none;
    justify-content: space-between;
    padding: 14px 18px;
    border: 0;
    border-radius: 16px;
    background: var(--spf-olive);
    color: #fff;
    font-weight: 700;
    box-shadow: 0 10px 30px rgba(0,0,0,.3);
}

/* ============ CART COUNT (shared .cart-item-number hook) ============ */
.cart-item-number {
    position: static;
}

/* ============ PAGE LOADER / TOASTS ============ */
#cartToast.bg-orange {
    background-color: var(--spf-olive) !important;
    border-radius: 99px;
}

#toast-container .custom-toast {
    border-bottom-color: var(--spf-orange) !important;
}

/* ============ RESPONSIVE ============ */
@media (min-width: 800px) {
    .spf-info__card {
        grid-template-columns: 1.1fr 1.4fr 1fr;
    }

        .spf-info__card > div + div {
            border-top: 0;
            border-left: 1px solid var(--spf-line);
        }

    .spf-footer__grid {
        grid-template-columns: 1fr 1fr 1fr;
    }
}

@media (max-width: 799px) {
    .spf-hero {
        height: 520px;
    }

    .spf-hero__copy {
        bottom: 118px;
    }

    .spf-hero__ctl {
        bottom: 62px;
    }

        .spf-hero__ctl .spf-wrap {
            justify-content: center;
        }

    .spf-nav__link {
        display: none;
    }

    .spf-pill--phone span {
        display: none;
    }

    .spf-pill--phone {
        padding: 0 13px;
    }

    .spf-banner {
        height: 150px;
    }

    .spf-bottombar.has-items {
        display: flex;
    }

    body.spf-has-items .back-to-top {
        bottom: 84px;
    }

    body.spf-has-items .spf-footer__legal .spf-wrap {
        padding-bottom: 84px;
    }
}

@media (max-width: 420px) {
    .spf-logo img {
        height: 44px;
    }

    .spf-pill--cart .spf-cart-subtotal {
        display: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    * {
        transition: none !important;
        scroll-behavior: auto !important;
    }
}
