/* =============================================================================
   shop.css — Becca's Cakes and Bakes
   Page-specific styles for shop.html.
   Shared styles live in shared.css.
   ============================================================================= */




/* ── Order window closed banner ──────────────────────────────────────────── */
#shop-window-banner {
    background: linear-gradient(135deg, var(--pink) 0%, #7c1457 100%);
    color: #fff;
    padding: 0;
    margin: 0;
}

.shop-window-banner__inner {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 18px 24px;
    font-family: 'Lato', sans-serif;
    font-size: 0.95rem;
    line-height: 1.55;
}

.shop-window-banner__inner i {
    font-size: 1.2rem;
    margin-top: 2px;
    flex-shrink: 0;
    opacity: 0.85;
}

/* ── Window closed — grey out all cards ──────────────────────────────────── */
.shop-window-closed .shop-product-card {
    opacity: 0.5;
    pointer-events: none;
    cursor: default;
    filter: grayscale(40%);
}

/* ── Sold-out card ───────────────────────────────────────────────────────── */
.shop-product-card--sold-out {
    opacity: 0.55;
    pointer-events: none;
    cursor: default;
    filter: grayscale(60%);
}

.shop-product-card--sold-out:hover {
    transform: none;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
    border-color: transparent;
}

.shop-sold-out-badge {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 4px 10px;
    border-radius: 20px;
    white-space: nowrap;
    pointer-events: none;
}


/* Deep link (?product=) — product not available */
.shop-deep-link-notice {
    max-width: 700px;
    margin: 0 auto 1.5rem;
    padding: 14px 20px;
    border-radius: 12px;
    font-size: 0.88rem;
    font-family: 'Lato', sans-serif;
    color: #6b5000;
    text-align: center;
    line-height: 1.6;
    background: #fff8e7;
    border: 1px solid #f0dfa0;
}


/* ── Shop section ── */
.shop-section {
    background: var(--cream);
    padding: 80px 0 100px;
}

.shop-section--intro {
    padding-bottom: 0;
}

#shop-sections-container .section-heading {
    text-transform: capitalize;
}

.shop-section--cupcakes {
    background: #fff;
    border-top: 1px solid var(--pink-light, #e2c4f9);
}


/* ── Product grid ── */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
}


/* ── Product card ── */
.shop-product-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
    border: 2px solid transparent;
    transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
    display: flex;
    flex-direction: column;
    cursor: pointer;
}

.shop-product-card:focus {
    outline: none;
}

.shop-product-card:focus-visible {
    outline: 2px solid var(--pink);
    outline-offset: 2px;
}

.shop-product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 28px rgba(171, 29, 121, 0.12);
    border-color: var(--pink-light);
}

.shop-product-card__img-wrap {
    position: relative;
    width: 100%;
    height: 200px;
    overflow: hidden;
    background: var(--pink-light);
}

.shop-product-card__img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}

.shop-product-card:hover .shop-product-card__img-wrap img {
    transform: scale(1.04);
}

/* ── Unavailable card ── */
.shop-product-card--unavailable {
    cursor: default;
    opacity: 0.55;
    filter: grayscale(60%);
}

.shop-product-card--unavailable:hover {
    transform: none;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
    border-color: transparent;
}

.shop-product-card--unavailable:hover .shop-product-card__img-wrap img {
    transform: none;
}

.shop-product-card__unavailable-badge {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 4px 10px;
    border-radius: 20px;
    white-space: nowrap;
    pointer-events: none;
}

.shop-img-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: var(--pink);
    font-family: 'Lato', sans-serif;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.shop-img-placeholder i {
    font-size: 1.8rem;
    opacity: 0.5;
}

.shop-product-card__body {
    padding: 1.25rem 1.5rem 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.shop-product-card__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 2px;
}

.shop-product-card__header-text {
    min-width: 0;
    flex: 1;
}

.shop-product-card__name {
    font-family: 'Playfair Display', serif;
    font-size: 1.1rem;
    color: var(--deep);
    margin-bottom: 4px;
    line-height: 1.3;
}

.shop-product-card__serves {
    font-family: 'Lato', sans-serif;
    font-size: 0.8rem;
    font-weight: 300;
    color: var(--muted);
    margin-bottom: 10px;
}

.shop-product-card__serves i {
    margin-right: 4px;
}

.shop-product-card__expand-icon {
    color: var(--pink);
    font-size: 0.85rem;
    flex-shrink: 0;
    margin-top: 4px;
    transition: transform 0.2s ease;
}

/* ── Allergen pills (card + modal) ── */
.shop-product-card .allergen-pills,
#shop-product-modal-content .allergen-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.shop-product-card .allergen-pills { margin-top: 2px; margin-bottom: 4px; }
#shop-product-modal-content .allergen-pills { margin-top: 4px; }

.shop-product-card .pill,
#shop-product-modal-content .pill {
    font-size: 0.75rem;
    font-family: 'Lato', sans-serif;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 50px;
    letter-spacing: 0.04em;
}

.shop-product-card .pill-free,
#shop-product-modal-content .pill-free {
    background: #edf7f0;
    color: #1a7a3a;
    border: 1px solid #b5e2c4;
}

.shop-product-card .pill-contains,
#shop-product-modal-content .pill-contains {
    background: #fff3f0;
    color: #b33a1a;
    border: 1px solid #f5c2b4;
}

.shop-product-card .pill-may,
#shop-product-modal-content .pill-may {
    background: #fffbec;
    color: #8a6400;
    border: 1px solid #f0dfa0;
}

.shop-product-card__price {
    font-family: 'Lato', sans-serif;
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--pink);
    margin-bottom: 16px;
    margin-top: auto;
}

/* ── Qty stepper (stop card click; keep default cursor) ── */
.shop-product-card__qty {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: default;
}

.modal-add-to-basket-btn {
    width: 100%;
    background: var(--pink);
    color: white;
    border: none;
    border-radius: 50px;
    font-family: 'Lato', sans-serif;
    font-size: 1rem;
    font-weight: 700;
    padding: 0.75rem 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.modal-add-to-basket-btn:hover {
    background: var(--pink-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(171, 29, 121, 0.3);
}

.shop-product-modal-qty {
    align-items: center;
    justify-content: center;
    gap: 16px;
}

/* ── Shop product detail modal (description only — matches allergen-advice modal) ── */
#shop-product-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9998;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    padding: 20px;
}

#shop-product-overlay.is-visible {
    display: flex;
}

#shop-product-overlay.is-open {
    opacity: 1;
}

#shop-product-modal {
    background: white;
    border-radius: 16px;
    max-width: 560px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.28);
    transform: translateY(16px);
    transition: transform 0.35s ease;
}

#shop-product-overlay.is-open #shop-product-modal {
    transform: translateY(0);
}

#shop-product-modal.shop-product-modal--no-image .shop-product-modal-body {
    padding-top: 2.75rem;
    border-radius: 16px 16px 0 0;
}

#shop-product-modal-close {
    position: absolute;
    top: 14px;
    right: 16px;
    background: none;
    border: none;
    font-size: 1.6rem;
    line-height: 1;
    color: #888;
    cursor: pointer;
    padding: 0 4px;
    z-index: 1;
}

#shop-product-modal-close:hover {
    color: #333;
}

.shop-product-modal-img-wrap {
    width: 100%;
    overflow: hidden;
    border-radius: 16px 16px 0 0;
    background: var(--pink-light);
}

.shop-product-modal-img-wrap img {
    width: 100%;
    height: auto;
    display: block;
}

.shop-product-modal-body {
    padding: 1.5rem 1.75rem 2rem;
}

.shop-product-modal-name {
    font-family: 'Playfair Display', serif;
    font-size: 1.5rem;
    color: var(--deep);
    margin: 4px 0 10px;
    line-height: 1.2;
}

.shop-product-modal-meta {
    font-family: 'Lato', sans-serif;
    font-size: 1rem;
    font-weight: 700;
    color: var(--pink);
    margin-bottom: 2px;
}

/* Same row as product cards: icon + servings text from sheet (e.g. “9 slices”) */
#shop-product-modal-content .shop-product-modal-serves-line {
    margin-top: 2px;
    margin-bottom: 10px;
}

.shop-product-modal-basket {
    margin-top: 1.25rem;
    padding-top: 1.1rem;
    border-top: 1px solid #f0e4f8;
}

.shop-product-modal-basket .shop-product-modal-qty {
    justify-content: center;
}

.shop-product-modal-body .detail-label {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--pink);
    font-family: 'Lato', sans-serif;
    margin-bottom: 6px;
    margin-top: 1.15rem;
}

#shop-product-modal-content>.shop-product-modal-meta+.detail-label,
#shop-product-modal-content>.shop-product-card__serves+.detail-label {
    margin-top: 0.75rem;
}

.shop-product-modal-plain {
    font-size: 0.95rem;
    font-weight: 300;
    color: var(--body-text);
    line-height: 1.65;
    font-family: 'Lato', sans-serif;
    margin: 0 0 0.25rem;
    white-space: pre-wrap;
}

.shop-product-modal-ingredients-details {
    margin-top: 1.15rem;
}

.shop-product-modal-ingredients-summary {
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--pink);
    font-family: 'Lato', sans-serif;
    list-style: none;
    user-select: none;
}

.shop-product-modal-ingredients-summary::-webkit-details-marker {
    display: none;
}

.shop-product-modal-ingredients-chevron {
    font-size: 0.7rem;
    color: var(--pink);
    transition: transform 0.22s ease;
    flex-shrink: 0;
}

.shop-product-modal-ingredients-details[open] .shop-product-modal-ingredients-chevron {
    transform: rotate(180deg);
}

.shop-product-modal-ingredients-details .shop-product-modal-ingredients {
    font-size: 0.9rem;
    font-weight: 300;
    color: var(--body-text);
    line-height: 1.6;
    font-family: 'Lato', sans-serif;
    margin: 10px 0 0;
    white-space: pre-wrap;
}

/* =============================================================================
   CTA BANNER — pink gradient, matches homepage section-cta
   (index.css scopes these to the homepage only, so we redeclare here)
   ============================================================================= */

.section-cta {
    background: linear-gradient(135deg, var(--pink) 0%, var(--pink-dark, #7c1457) 100%);
    padding: 96px 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.section-cta::before {
    content: '';
    position: absolute;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    top: -220px;
    left: -180px;
    pointer-events: none;
}

.section-cta::after {
    content: '';
    position: absolute;
    width: 420px;
    height: 420px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    bottom: -160px;
    right: -100px;
    pointer-events: none;
}

.section-cta__inner {
    position: relative;
    z-index: 2;
}

.section-cta .section-label {
    color: #f9d4ec;
}

.section-cta__heading {
    color: white !important;
    max-width: 520px;
    margin-left: auto;
    margin-right: auto;
}

.section-cta__heading em {
    font-style: italic;
    color: var(--pink-light);
}

.section-cta__body {
    font-family: 'Lato', sans-serif;
    font-size: 1.05rem;
    font-weight: 300;
    color: rgba(255, 255, 255, 0.88);
    max-width: 560px;
    margin: 0 auto 2.2rem;
    line-height: 1.8;
}

.section-cta__actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    align-items: center;
}

.section-cta__ghost-btn {
    font-family: 'Lato', sans-serif;
    font-weight: 700;
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.88);
    text-decoration: none;
    border: 2px solid rgba(255, 255, 255, 0.4);
    border-radius: 50px;
    padding: 0.65rem 1.8rem;
    transition: background 0.25s ease, border-color 0.25s ease, color 0.25s ease;
    display: inline-block;
}

.section-cta__ghost-btn:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: white;
    color: white;
}

/* ── Category filter banner ── */
.shop-category-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    background: #fdf5ff;
    border: 2px solid var(--pink-light);
    border-radius: 14px;
    padding: 12px 18px;
    margin-bottom: 24px;
    font-family: 'Lato', sans-serif;
    font-size: 0.9rem;
    color: var(--deep);
}

.shop-category-banner__clear {
    background: none;
    border: 2px solid var(--pink-light);
    border-radius: 50px;
    padding: 4px 14px;
    font-family: 'Lato', sans-serif;
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--muted);
    cursor: pointer;
    white-space: nowrap;
    transition: border-color 0.2s, color 0.2s;
}

/* ── Modal unavailable message ───────────────────────────────────────────── */
.shop-modal-unavailable-msg {
    margin: 0;
    padding: 10px 16px;
    background: var(--cream);
    border: 1.5px solid var(--pink-light);
    border-radius: 8px;
    font-family: 'Lato', sans-serif;
    font-size: 0.9rem;
    color: var(--muted);
    text-align: center;
    width: 100%;
}

/* ── Product availability badges ─────────────────────────────────────────── */
.shop-stock-badge,
.shop-sold-out-badge {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    white-space: nowrap;
    font-family: 'Lato', sans-serif;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    border-radius: 50px;
    padding: 4px 12px;
    pointer-events: none;
}

.shop-stock-badge {
    background: var(--pink);
    color: #fff;
}

.shop-sold-out-badge {
    background: rgba(42, 26, 46, 0.82);
    color: #fff;
}

.shop-category-banner__clear:hover {
    border-color: var(--pink);
    color: var(--pink);
}