/* ==========================================================================
   Home page — status band, offer banner, category chips, reorder cards,
   menu sections, optional marketing hero
   ========================================================================== */

@layer pages {

/* ── Hero ──────────────────────────────────────────────────────────── */
.hero-section {
    width: min(100%, var(--content-width));
    margin-inline: auto;
    padding: 34px var(--space-6) 24px;
}

.hero-card {
    position: relative;
    overflow: hidden;
    min-height: 500px;
    border-radius: 34px;
    background:
        radial-gradient(circle at 78% 20%, rgba(var(--brand-rgb), 0.32), transparent 27%),
        radial-gradient(circle at 86% 92%, rgba(255, 255, 255, 0.12), transparent 24%),
        linear-gradient(135deg, #121212 0%, #1C1B19 48%, #2B211D 100%);
    box-shadow: var(--shadow-xl);
    color: #fff;
    display: grid;
    grid-template-columns: 1.03fr 0.97fr;
    align-items: center;
    gap: 20px;
    padding: 56px;
}

.hero-card.has-restaurant-image::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(135deg, rgba(18, 18, 18, 0.86), rgba(36, 25, 20, 0.72)),
        var(--hero-bg-image) center/cover no-repeat;
    opacity: 0.72;
}

.hero-copy,
.hero-plate {
    position: relative;
    z-index: 2;
}

.hero-text {
    max-width: 610px;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: #FFD8CA;
    background: rgba(var(--brand-rgb), 0.18);
    border: 1px solid rgba(var(--brand-rgb), 0.28);
    padding: 0.55rem 0.9rem;
    border-radius: var(--radius-full);
    font-size: var(--text-sm);
    font-weight: 800;
    margin-bottom: 1.5rem;
}

.hero-text h1 {
    font-size: var(--text-display);
    line-height: 0.96;
    font-weight: 900;
    color: #fff;
    margin-bottom: 1.35rem;
}

.hero-text h1 span {
    color: var(--brand);
}

.hero-text p {
    max-width: 500px;
    color: rgba(255, 255, 255, 0.74);
    font-size: var(--text-md);
    line-height: 1.75;
    margin-bottom: 1.85rem;
}

.hero-actions {
    display: flex;
    gap: 0.9rem;
    align-items: center;
    margin-bottom: 1.9rem;
}

.hero-stats {
    display: flex;
    gap: 2.5rem;
    max-width: 520px;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.hero-stat-value {
    font-size: 1.35rem;
    font-weight: 800;
    color: #fff;
}

.hero-stat-label {
    font-size: 0.72rem;
    color: rgba(255, 255, 255, 0.48);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-top: 0.25rem;
}

.hero-plate {
    min-height: 430px;
    display: grid;
    place-items: center;
}

.plate-glow {
    position: absolute;
    width: 440px;
    height: 440px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(var(--brand-rgb), 0.25), transparent 62%);
    filter: blur(2px);
}

.plate {
    width: min(410px, 90%);
    aspect-ratio: 1;
    border-radius: 50%;
    background: linear-gradient(145deg, #FFF7EF, #FFFFFF);
    box-shadow: 0 35px 80px rgba(0, 0, 0, 0.35), inset 0 0 0 20px #F3EEE8;
    display: grid;
    place-items: center;
    position: relative;
}

.plate-food {
    width: 74%;
    height: 74%;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-size: 6rem;
    background:
        radial-gradient(circle at 35% 35%, #D79F43 0 16%, transparent 17%),
        radial-gradient(circle at 60% 58%, #3F8F3D 0 13%, transparent 14%),
        radial-gradient(circle at 47% 68%, #9A3F2E 0 12%, transparent 13%),
        linear-gradient(145deg, #F0D8AA, #C7803F);
    box-shadow: inset 0 0 0 14px rgba(255, 255, 255, 0.22);
    overflow: hidden;
}

.plate-food img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.floating-chip {
    position: absolute;
    right: 26px;
    bottom: 34px;
    width: 190px;
    background: rgba(255, 255, 255, 0.92);
    color: var(--ink);
    border-radius: 20px;
    padding: 14px;
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.24);
}

.floating-chip strong,
.floating-chip span {
    display: block;
}

.floating-chip strong {
    font-size: var(--text-base);
}

.floating-chip span {
    margin-top: 4px;
    color: var(--text-muted);
    font-weight: 700;
    font-size: 0.8rem;
}

@media (max-width: 920px) {
    .hero-card {
        grid-template-columns: 1fr;
        min-height: auto;
        padding: 34px;
    }

    .hero-plate {
        min-height: 300px;
    }
}

@media (max-width: 640px) {
    .hero-section {
        padding: 14px var(--space-4) 20px;
    }

    .hero-card {
        border-radius: var(--radius-xl);
        padding: 26px 20px 20px;
    }

    .hero-actions {
        display: grid;
        grid-template-columns: 1fr;
    }

    .hero-actions .hero-btn-primary,
    .hero-actions .hero-btn-secondary {
        justify-content: center;
    }

    .hero-stats {
        gap: 10px;
        justify-content: space-between;
    }

    .hero-stat-value {
        font-size: 1.05rem;
    }

    .hero-stat-label {
        font-size: 0.62rem;
    }

    .plate {
        width: 255px;
    }

    .plate-food {
        font-size: 4rem;
    }

    .floating-chip {
        display: none;
    }
}

/* ── Status band: open state, delivery facts, service toggle ───────── */
.status-band {
    padding-block: var(--space-4);
}

.status-band-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-4);
    background: var(--surface-warm);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    padding: var(--space-4) var(--space-5);
}

.status-band-facts {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--space-2) var(--space-4);
    min-width: 0;
}

.open-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    font-weight: 800;
    font-size: var(--text-sm);
    white-space: nowrap;
}

.open-pill i {
    font-size: 0.6rem;
}

.open-pill--open {
    color: var(--success-text);
}

.open-pill--open i {
    color: var(--success);
}

.open-pill--closed {
    color: var(--error-text);
}

.open-pill--closed i {
    color: var(--error);
}

.status-band-fact {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--text-secondary);
    white-space: nowrap;
}

.status-band-fact i {
    color: var(--brand);
    font-size: 1.05rem;
}

@media (max-width: 640px) {
    .status-band-card {
        flex-direction: column;
        align-items: stretch;
        gap: var(--space-3);
    }

    .status-band-facts {
        justify-content: center;
    }

    .status-band-card .service-toggle-desktop {
        width: 100%;
    }
}

/* ── Offer banner (dismissible) ────────────────────────────────────── */
.offer-banner-section {
    padding-block: 0 var(--space-2);
}

.offer-banner {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    background: linear-gradient(120deg, var(--gray-900), var(--gray-800));
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.offer-banner-link {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    min-width: 0;
    padding: 0.8rem var(--space-4);
    color: #fff;
    font-size: var(--text-sm);
    text-decoration: none;
}

.offer-banner-link > i {
    color: var(--accent);
    font-size: 1.15rem;
    flex-shrink: 0;
}

.offer-banner-text {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: rgba(255, 255, 255, 0.85);
}

.offer-banner-text strong {
    color: #fff;
}

.offer-banner-cta {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-weight: 800;
    color: var(--accent);
    white-space: nowrap;
    margin-left: auto;
}

.offer-banner-dismiss {
    flex-shrink: 0;
    padding: 0.8rem var(--space-4);
    color: rgba(255, 255, 255, 0.55);
    font-size: 1rem;
    transition: color var(--transition);
}

.offer-banner-dismiss:hover {
    color: #fff;
}

/* ── Reorder cards ─────────────────────────────────────────────────── */
.reorder-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--space-4);
}

@media (max-width: 920px) {
    .reorder-grid {
        grid-template-columns: 1fr;
    }
}

.reorder-card {
    background: var(--surface);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: var(--space-5);
    box-shadow: var(--shadow-sm);
}

.reorder-card-head {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.reorder-card-icon {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: var(--brand-light);
    color: var(--brand);
    display: grid;
    place-items: center;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.reorder-card-number {
    font-weight: 800;
}

.reorder-card-date {
    color: var(--text-muted);
    font-size: var(--text-sm);
}

.reorder-card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    color: var(--text-secondary);
    font-size: var(--text-sm);
}

.reorder-card-total {
    color: var(--brand);
    font-size: var(--text-md);
    font-weight: 800;
}

/* ── Category chips (single unscoped full-menu CTA) ────────────────── */
#menu-section {
    scroll-margin-top: calc(var(--header-height) + 12px);
}

/* Homepage rhythm: roughly half the site-wide .section padding, and a
   compact single-colour section title instead of the two-tone
   heading + subtitle + arrow formula. */
.home-page .section {
    padding-block: clamp(1.25rem, 2.5vw, 2rem);
}

.home-page .chips-section {
    padding-block: var(--space-2) var(--space-4);
}

.section-title {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: var(--space-4);
    margin-bottom: var(--space-4);
}

.section-title h2 {
    font-size: var(--text-xl);
    font-weight: 900;
    line-height: 1.1;
}

.category-chip--all {
    color: var(--brand);
    border-color: rgba(var(--brand-rgb), 0.35);
    background: var(--brand-light);
}

.category-strip {
    display: flex;
    /* Desktop/tablet: enough room, so wrap all chips onto as many rows as needed. */
    flex-wrap: wrap;
    gap: 10px;
    padding-block: 4px;
}

/* Mobile: not enough width, fall back to a single horizontal-scroll strip. */
@media (max-width: 640px) {
    .category-strip {
        flex-wrap: nowrap;
        overflow-x: auto;
        scrollbar-width: none;
        scroll-snap-type: x proximity;
    }

    .category-strip::-webkit-scrollbar {
        display: none;
    }
}

.category-chip {
    scroll-snap-align: start;
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.7rem 1.1rem;
    background: var(--surface-warm);
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
    box-shadow: 0 8px 18px rgba(23, 19, 15, 0.04);
    font-weight: 800;
    font-size: var(--text-sm);
    white-space: nowrap;
    text-decoration: none;
    color: var(--text-secondary);
    transition: color var(--transition), border-color var(--transition);
}

.category-chip:hover {
    color: var(--brand);
    border-color: rgba(var(--brand-rgb), 0.35);
}

/* ── Order Again: food-first cards ─────────────────────────────────── */
.reorder-card-thumbs {
    display: flex;
}

.reorder-card-thumb {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-full);
    border: 2px solid var(--surface);
    background: var(--cream-mid);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
}

.reorder-card-thumb + .reorder-card-thumb {
    margin-left: -12px;
}

.reorder-card-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.reorder-card-thumb-icon {
    font-size: 1.3rem;
}

.reorder-card-dishes {
    font-weight: 800;
    font-size: var(--text-base);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ── Favourites discovery hint ─────────────────────────────────────── */
.favourites-hint {
    position: relative;
    display: flex;
    align-items: center;
    gap: var(--space-5);
    background: var(--surface-warm);
    border: 1px dashed var(--border);
    border-radius: var(--radius-xl);
    padding: var(--space-6);
}

.favourites-hint-icon {
    flex: 0 0 auto;
    width: 48px;
    height: 48px;
    border-radius: var(--radius-full);
    background: var(--brand-light);
    color: var(--brand);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
}

.favourites-hint-copy {
    flex: 1;
}

.favourites-hint-copy strong {
    display: block;
    font-size: var(--text-md);
}

.favourites-hint-copy p {
    margin: 0.15rem 0 0;
    color: var(--text-muted);
    font-size: var(--text-sm);
}

.favourites-hint-dismiss {
    position: absolute;
    top: 0.6rem;
    right: 0.6rem;
    border: 0;
    background: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0.35rem;
    border-radius: var(--radius-full);
}

.favourites-hint-dismiss:hover {
    color: var(--text);
    background: var(--gray-100);
}

@media (max-width: 640px) {
    .favourites-hint {
        flex-direction: column;
        text-align: center;
    }
}

/* ── Meal-deal spotlight ───────────────────────────────────────────── */
.deal-spotlight-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--space-6);
}

.deal-spotlight-card {
    display: grid;
    grid-template-columns: 132px 1fr;
    gap: var(--space-5);
    align-items: center;
    background: var(--surface);
    border: 1px solid var(--border);
    border-left: 5px solid var(--promo);
    border-radius: var(--radius-xl);
    padding: var(--space-5);
    box-shadow: var(--shadow-sm);
    text-decoration: none;
    color: inherit;
    transition: transform var(--transition), box-shadow var(--transition);
}

.deal-spotlight-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.deal-spotlight-media {
    width: 132px;
    height: 132px;
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: var(--cream-mid);
    display: flex;
    align-items: center;
    justify-content: center;
}

.deal-spotlight-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.deal-spotlight-icon {
    font-size: 3rem;
}

.deal-spotlight-body h3 {
    font-size: var(--text-lg);
    font-weight: 900;
    margin: 0.5rem 0 0.25rem;
}

.deal-spotlight-body p {
    font-size: var(--text-sm);
    color: var(--text-muted);
    margin: 0;
}

.deal-spotlight-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 0.75rem;
}

.deal-spotlight-price {
    font-size: var(--text-xl);
    font-weight: 900;
    color: var(--promo);
}

.deal-spotlight-cta {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-weight: 800;
    font-size: var(--text-sm);
    color: var(--brand);
}

@media (max-width: 640px) {
    .deal-spotlight-card {
        grid-template-columns: 92px 1fr;
    }

    .deal-spotlight-media {
        width: 92px;
        height: 92px;
    }
}

/* ── Popular strip: signature-style swipe carousel on phones ───────── */
@media (max-width: 640px) {
    .popular-strip {
        grid-template-columns: none;
        grid-auto-flow: column;
        grid-auto-columns: minmax(260px, 320px);
        gap: var(--space-5);
        overflow-x: auto;
        padding-bottom: var(--space-3);
        scrollbar-width: none;
        scroll-snap-type: x mandatory;
    }

    .popular-strip::-webkit-scrollbar {
        display: none;
    }

    /* Undo the ≤640px compact horizontal card from components.css;
       tall swipe-strip proportions instead */
    .popular-strip .menu-card {
        display: flex;
        flex-direction: column;
        scroll-snap-align: start;
        border-radius: var(--radius-xl);
        background: linear-gradient(160deg, var(--surface) 55%, var(--brand-light));
    }

    .popular-strip .menu-card-image {
        height: 170px;
        min-height: 0;
    }

    .popular-strip .menu-card-image .placeholder-icon {
        font-size: 3.4rem;
    }

    .popular-strip .menu-card-body {
        padding: var(--space-5);
    }

    .popular-strip .menu-card-desc {
        -webkit-line-clamp: 2;
    }
}

/* ── Scroll reveal + hero rotation motion ──────────────────────────── */
.js-reveal .section {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 0.55s var(--ease-out-quart), transform 0.55s var(--ease-out-quart);
}

.js-reveal .section.revealed {
    opacity: 1;
    transform: none;
}

.plate-food img,
.plate-food span {
    transition: opacity 0.45s ease;
}

.plate-food.is-fading img,
.plate-food.is-fading span {
    opacity: 0;
}

@media (prefers-reduced-motion: reduce) {
    .js-reveal .section {
        opacity: 1;
        transform: none;
        transition: none;
    }
}

} /* end @layer pages */
