/* SE-F 12 S 9 (#36749) — branch storefront styles. Mobile-first; WCAG-AA contrast (dark text on
   light surfaces). Uses tenant design tokens (var(--primary-color, …)) with neutral fallbacks so a
   tenant stylesheet can override without these hard-coding a brand. */

/* Pin the canvas. Nothing on these pages sets a page background, so a dark-mode browser
   (or Android WebView force-dark) renders the transparent canvas dark and the dark-on-light
   design becomes unreadable. color-scheme: light also opts out of force-dark heuristics. */
html {
    background: var(--surface-color, #fff);
    color-scheme: light;
}

.storefront {
    max-width: 64rem;
    margin: 0 auto;
    padding: 1rem;
    color: var(--on-surface-color, #1a1a1a); /* AA: ~16:1 on white */
    font-family: var(--base-font, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif);
    line-height: 1.5;
}

.storefront h1,
.storefront h2,
.storefront h3 {
    color: var(--on-surface-color, #111);
    line-height: 1.2;
}

/* ---------- Header ---------- */
/* Cap the brand logo: an uncapped <img> renders at the asset's natural size (often huge). */
.location-header {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border-color, #e7e7e7);
}

.location-header img {
    max-height: 2.5rem;
    width: auto;
}

/* ---------- Hero ---------- */
.storefront-hero {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 2rem;
}

.storefront-hero__media {
    border-radius: 0.75rem;
    overflow: hidden;
    background: #f1f1f1;
}

.storefront-hero__image {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    object-fit: cover;
}

.storefront-hero__title {
    margin: 0 0 0.25rem;
    font-size: 1.75rem;
}

.storefront-hero__status {
    margin: 0 0 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.badge {
    display: inline-block;
    padding: 0.15rem 0.6rem;
    border-radius: 1rem;
    font-size: 0.8rem;
    font-weight: 700;
}

.badge--open {
    /* Semantic success token (overridable per tenant); green fallback so "open" never reads as a
       brand colour that could connote error (e.g. a red-branded tenant). */
    background: var(--success-color, #0a5c2b);
    color: #fff; /* AA on green */
}

.badge--closed {
    background: #6b6b6b;
    color: #fff;
}

.storefront-hero__close {
    color: #333;
    font-size: 0.9rem;
}

.storefront-hero__nap {
    font-style: normal;
    margin: 0 0 1rem;
    color: #222;
}

.storefront-hero__address {
    display: block;
}

.storefront-hero__phone {
    color: var(--primary-color, #b3001b);
    font-weight: 600;
    text-decoration: none;
}

.storefront-hero__phone:hover {
    text-decoration: underline;
}

/* ---------- Occasion chooser ---------- */
.occasion {
    display: flex;
    gap: 0.75rem;
    margin: 0 0 1rem;
}

.occasion__option {
    flex: 1 1 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.15rem;
    padding: 0.6rem 0.5rem;
    border: 2px solid #c8c8c8;
    border-radius: 0.6rem;
    text-decoration: none;
    color: #1a1a1a;
    background: #fff;
}

.occasion__option.is-selected {
    border-color: var(--primary-color, #b3001b);
    background: var(--primary-color, #b3001b);
    color: #fff;
}

.occasion__label {
    font-weight: 700;
}

.occasion__eta {
    font-size: 0.85rem;
}

/* ---------- Delivery facts ---------- */
.facts {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem 1.5rem;
    margin: 0 0 1rem;
    padding: 0;
}

.facts__item {
    margin: 0;
}

.facts dt {
    font-size: 0.8rem;
    color: #555;
}

.facts dd {
    margin: 0;
    font-weight: 700;
    color: #111;
}

/* ---------- Postcode check ---------- */
.postcode {
    margin: 0 0 1rem;
}

.postcode__label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.35rem;
}

.postcode__row {
    display: flex;
    gap: 0.5rem;
}

.postcode__input {
    flex: 1 1 auto;
    padding: 0.55rem 0.7rem;
    border: 2px solid #999;
    border-radius: 0.5rem;
    font-size: 1rem;
    min-width: 0;
}

.postcode__result {
    margin: 0.6rem 0 0;
    padding: 0.55rem 0.75rem;
    border-radius: 0.5rem;
    font-weight: 600;
}

.postcode__result--yes {
    background: var(--success-surface, #e3f4e9);
    color: var(--success-color, #0a5c2b);
}

.postcode__result--no {
    background: var(--error-surface, #fdecea);
    color: var(--error-color, #8a1b10);
}

.postcode__collection-link {
    margin-left: 0.4rem;
    color: inherit;
}

/* ---------- Buttons ---------- */
.btn {
    display: inline-block;
    padding: 0.6rem 1.1rem;
    border-radius: 0.5rem;
    font-weight: 700;
    text-decoration: none;
    text-align: center;
    cursor: pointer;
    border: 2px solid transparent;
}

.btn--primary {
    background: var(--primary-color, #b3001b);
    color: #fff;
}

.btn--primary:hover {
    filter: brightness(0.93);
}

.btn--secondary {
    background: #fff;
    color: #1a1a1a;
    border-color: #1a1a1a;
}

.btn--add {
    background: var(--primary-color, #b3001b);
    color: #fff;
    padding: 0.45rem 0.9rem;
    font-size: 0.9rem;
}

.storefront-hero__cta .btn--primary {
    display: block;
    width: 100%;
    font-size: 1.05rem;
}

/* ---------- Deals / popular rows ---------- */
.row {
    margin: 0 0 2rem;
}

.row__heading {
    font-size: 1.3rem;
    margin: 0 0 0.75rem;
}

.cards {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

.card {
    border: 1px solid var(--border-color, #ddd);
    border-radius: 0.6rem;
    overflow: hidden;
    background: #fff;
    display: flex;
    flex-direction: column;
}

.card__image {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    background: #f1f1f1;
}

.card__body {
    padding: 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.card__name {
    margin: 0;
    font-size: 1rem;
}

.card__price {
    margin: 0;
    font-weight: 700;
    color: #111;
}

/* ---------- Rewards band ---------- */
.rewards {
    margin: 0 0 2rem;
    padding: 1.25rem;
    border-radius: 0.75rem;
    background: #111;
    color: #fff;
    text-align: center;
}

.rewards__heading {
    color: #fff;
    margin: 0 0 0.5rem;
}

.rewards__copy {
    margin: 0 0 1rem;
    color: #f0f0f0;
}

/* ---------- Store info ---------- */
.store-info {
    margin: 0 0 2rem;
    color: #1a1a1a;
}

.store-info__heading {
    font-size: 1.3rem;
    margin: 0 0 0.75rem;
}

.store-info__subheading {
    margin: 0 0 0.5rem;
    font-size: 1.05rem;
}

.store-info__grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.25rem;
}

.store-info__map {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 0.6rem;
}

.store-info table {
    border-collapse: collapse;
    width: 100%;
}

.store-info th,
.store-info td {
    text-align: left;
    padding: 0.25rem 0.5rem;
    color: #222; /* AA contrast — fixes the faint hours text from the old page */
}

.store-info tr.today th,
.store-info tr.today td {
    font-weight: 700;
    color: #111;
}

.store-info__actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

/* ---------- Local copy ---------- */
.local-copy {
    color: #222;
    margin-bottom: 2rem;
}

/* ---------- Desktop ---------- */
@media (min-width: 48rem) {
    .storefront-hero {
        flex-direction: row;
        align-items: flex-start;
    }

    .storefront-hero__media,
    .storefront-hero__body {
        flex: 1 1 50%;
    }

    .storefront-hero__cta .btn--primary {
        display: inline-block;
        width: auto;
    }

    .cards {
        grid-template-columns: repeat(3, 1fr);
    }

    .store-info__grid {
        grid-template-columns: 1fr 1fr;
    }
}
