/* _woocommerce.css — Single product template (built on ev- / sp- components)
   ============================================================================ */

.single--product {
    /* Page = the lighter burgundy (per design); the CTA band below is darker. */
    background: var(--color-primary-light);
    color: var(--color-white);
    /* Contain the Essentials carousel's full-bleed (50vw) so the page never
       gets a horizontal scrollbar, while the bleed still reaches the edge. */
    overflow-x: clip;
}

.wc-notices:empty { display: none; }

/* Reused sections render transparent so the page burgundy is uniform … */
.single--product .ev-testimonials,
.single--product .ev-faq { background: transparent; }

/* … except the bottom CTA, which is a distinctly darker band (per design). */
.single--product .wc-cta.alt-1 { background: var(--color-primary-dark); }

/* ── 1. Product: gallery | summary ──────────────────────────────────────── */
.wc-product__grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-16);
    align-items: start;
}

/* Gallery */
.wc-gallery__stage { position: relative; }

.wc-gallery__main {
    background: var(--color-white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    aspect-ratio: 1 / 1;
}

/* Images sit in a flex track that slides horizontally on change (thumbnail,
   arrow, or variation swap). The track is translated by JS. */
.wc-gallery__track {
    display: flex;
    height: 100%;
    transition: transform 0.45s cubic-bezier(0.4, 0, 0.2, 1);
}
@media (prefers-reduced-motion: reduce) {
    .wc-gallery__track { transition: none; }
}
.wc-gallery__img { flex: 0 0 100%; width: 100%; height: 100%; object-fit: contain; display: block; }

.wc-gallery__nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
    width: 44px;
    height: 44px;
    border: none;
    border-radius: 8px;
    background: var(--color-primary-dark);
    color: var(--color-white);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0.92;
    transition: opacity var(--transition-base);
}
.wc-gallery__nav:hover { opacity: 1; }
.wc-gallery__nav--prev { left: var(--space-4); }
.wc-gallery__nav--next { right: var(--space-4); }

.wc-gallery__thumbs { display: flex; justify-content: center; gap: var(--space-3); margin-top: var(--space-4); flex-wrap: wrap; }
.wc-gallery__thumb {
    width: 72px; height: 72px; padding: 0;
    border: 2px solid transparent; border-radius: 8px;
    overflow: hidden; background: var(--color-white); cursor: pointer;
}
.wc-gallery__thumb.is-active { border-color: var(--color-secondary); }
.wc-gallery__thumb img { width: 100%; height: 100%; object-fit: contain; }

/* Summary */
.wc-summary { display: flex; flex-direction: column; gap: var(--space-5); }

.wc-summary__breadcrumb {
    display: flex; gap: var(--space-2); align-items: center; flex-wrap: wrap;
    font-size: var(--text-sm);
    color: color-mix(in srgb, currentColor 65%, transparent);
}
.wc-summary__breadcrumb a { color: inherit; text-decoration: none; }
.wc-summary__breadcrumb a:hover { color: var(--color-white); }
.wc-summary__breadcrumb .is-current { color: var(--color-white); }

.wc-summary__title {
    font-family: var(--font-display);
    font-size: clamp(var(--text-3xl), 4vw, var(--text-5xl));
    font-weight: 400;
    line-height: 1.05;
    margin: 0;
}

.wc-summary__price-row { display: flex; align-items: center; gap: var(--space-4); flex-wrap: wrap; }
.wc-summary__price { font-family: var(--font-display); font-size: var(--text-2xl); }
.wc-summary__price .amount,
.wc-summary__price bdi { color: var(--color-white); }
.wc-summary__rating { display: inline-flex; align-items: center; gap: var(--space-2); }
/* Crisp SVG stars, identical to the reviews carousel (same 18px glyph + gap). */
.wc-summary__stars { display: inline-flex; }
.wc-summary__star { display: inline-flex; color: rgba(255, 255, 255, 0.25); }
.wc-summary__star.is-on { color: var(--color-white); }
.wc-summary__star svg { display: block; }
.wc-summary__rating-text { font-size: var(--text-sm); color: color-mix(in srgb, currentColor 70%, transparent); }

.wc-summary__excerpt { color: color-mix(in srgb, currentColor 82%, transparent); line-height: 1.7; }
.wc-summary__excerpt p { margin: 0 0 var(--space-3); }
.wc-summary__excerpt ul { list-style: disc; padding-left: 1.25rem; margin: var(--space-3) 0 0; display: flex; flex-direction: column; gap: var(--space-2); }

/* Variations + add to cart */
.wc-summary__form .variations { width: 100%; margin: 0; border: 0; }
.wc-summary__form .variations tr { display: block; margin-bottom: var(--space-4); }
.wc-summary__form .variations th.label {
    display: block; text-align: left; padding: 0 0 var(--space-2);
    font-weight: 400; color: color-mix(in srgb, currentColor 80%, transparent);
}
.wc-summary__form .variations td.value { display: block; }
.wc-summary__form .variations select,
.single--product .variations td.value select {
    width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    padding: var(--space-3) 2rem var(--space-3) 0 !important;
    background-color: transparent !important;
    color: var(--color-white) !important;
    border: 0 !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.3) !important;
    border-radius: 0 !important;
    font-size: var(--text-base) !important;
    line-height: 1.4 !important;
    cursor: pointer;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    appearance: none !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16' fill='none' stroke='%23ffffff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='4 6 8 10 12 6'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right center !important;
    background-size: 16px 16px !important;
}
.wc-summary__form .variations select:focus-visible { outline: none; border-bottom-color: var(--color-white) !important; }
.wc-summary__form .variations select option { color: #111; background: #fff; }
.wc-summary__form .reset_variations { display: none; }

/* Custom dropdown (JS-enhanced) — native <option> lists can't be styled
   cross-browser, so the select is hidden and mirrored by this listbox, which
   blends with the site colours and has real padding. The native select still
   drives WooCommerce's variation/cart logic. */
.wc-select { position: relative; }
.wc-select__toggle {
    width: 100%;
    display: flex; align-items: center; justify-content: space-between; gap: var(--space-3);
    padding: var(--space-3) 0;
    background: transparent; color: var(--color-white);
    border: 0; border-bottom: 1px solid rgba(255, 255, 255, 0.3); border-radius: 0;
    font: inherit; font-size: var(--text-base); line-height: 1.4;
    cursor: pointer; text-align: left;
}
.wc-select__toggle:focus-visible { outline: none; border-bottom-color: var(--color-white); }
.wc-select__chevron { flex-shrink: 0; display: inline-flex; transition: transform var(--transition-base); }
.wc-select.is-open .wc-select__chevron { transform: rotate(180deg); }
.wc-select__panel {
    position: absolute; left: 0; right: 0; top: calc(100% + var(--space-2)); z-index: 30;
    background: var(--color-primary-dark);
    border: 1px solid rgba(255, 255, 255, 0.15); border-radius: var(--radius-md);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
    padding: var(--space-2); margin: 0;
    max-height: 280px; overflow-y: auto;
    display: none;
}
.wc-select.is-open .wc-select__panel { display: block; }
.wc-select__option {
    display: block; width: 100%; text-align: left;
    padding: var(--space-3) var(--space-4);
    background: transparent; color: var(--color-white);
    border: 0; border-radius: var(--radius-sm);
    font: inherit; font-size: var(--text-base); cursor: pointer;
    transition: background var(--transition-fast);
}
.wc-select__option:hover,
.wc-select__option.is-focused { background: rgba(255, 255, 255, 0.12); }
.wc-select__option.is-selected { background: var(--color-white); color: var(--color-primary); }
.wc-select__option.is-unavailable { opacity: 0.35; cursor: not-allowed; text-decoration: none; }

.wc-swatches { display: flex; gap: var(--space-3); flex-wrap: wrap; }
.wc-swatch {
    padding: var(--space-2) var(--space-4);
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: var(--radius-sm);
    background: transparent; color: var(--color-white);
    cursor: pointer; font-size: var(--text-sm);
    transition: border-color var(--transition-base), background var(--transition-base);
}
/* Selected swatch = solid white fill with dark text (per design) */
.wc-swatch.is-active {
    border-color: var(--color-white);
    background: var(--color-white);
    color: var(--color-primary);
}
.wc-swatch.is-unavailable,
.wc-swatch[disabled] { opacity: 0.35; cursor: not-allowed; }

/* Qty = underline field (matches the Size select), not a boxed input */
.wc-summary__form .quantity { margin: var(--space-2) 0; }
.wc-summary__form .quantity input.qty {
    width: 64px; padding: var(--space-3) 0;
    background: transparent; color: var(--color-white);
    border: 0; border-bottom: 1px solid rgba(255, 255, 255, 0.3); border-radius: 0;
    -moz-appearance: textfield;
}
.wc-summary__form .quantity input.qty:focus-visible { outline: none; border-bottom-color: var(--color-white); }
.wc-summary__form .woocommerce-variation-add-to-cart,
.wc-summary__form form.cart { display: flex; flex-direction: column; gap: var(--space-3); }

.wc-summary__form .single_add_to_cart_button {
    width: 100%; padding: var(--space-4);
    background: var(--color-white) !important; color: var(--color-primary) !important;
    border: none !important; border-radius: var(--radius-md);
    font-weight: 500 !important; cursor: pointer; text-align: center;
}
.wc-summary__form .single_add_to_cart_button:hover { background: var(--color-bg-alt) !important; }
.wc-summary__form .jmr-buy-now { width: 100%; }
.wc-summary__note { text-align: center; font-size: var(--text-sm); color: color-mix(in srgb, currentColor 65%, transparent); margin: var(--space-1) 0 0; }

/* Policies */
.wc-summary__policies { display: flex; flex-direction: column; margin-top: var(--space-6); }
.wc-policy { padding: var(--space-6) 0; border-top: 1px solid rgba(255, 255, 255, 0.15); }
.wc-policy:last-child { border-bottom: 1px solid rgba(255, 255, 255, 0.15); }
.wc-policy__title { font-family: var(--font-body); font-size: var(--text-md); font-weight: 500; margin-bottom: var(--space-2); }
.wc-policy__body { color: color-mix(in srgb, currentColor 72%, transparent); line-height: 1.7; }

/* ── 2. Reviews (header + reused ev-testimonials slider) ────────────────── */
.wc-reviews__header { margin-bottom: var(--space-12); }
.wc-reviews__heading { font-family: var(--font-display); font-size: var(--font-size-section-heading); font-weight: 400; }
.wc-reviews__desc { color: color-mix(in srgb, currentColor 70%, transparent); margin-top: var(--space-3); }

/* Product reviews have no left-hand media (unlike the single-event
   testimonials), so let the review panel span the full width and show
   2 reviews per view on desktop, 1 on mobile. */
.wc-reviews .ev-testimonials__inner { min-height: 0; }
.wc-reviews .ev-testimonials__panel { grid-column: 1 / -1; }
.wc-reviews .ev-testimonials__slide { flex-basis: 50%; padding: var(--space-12) var(--space-10); }
@media (max-width: 768px) {
    .wc-reviews .ev-testimonials__slide { flex-basis: 100%; }
}

/* ── 3. FAQ — bordered cards ────────────────────────────────────────────── */
.wc-faq__items .layout-faq__item {
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: var(--radius-md);
    padding: var(--space-5) var(--space-6);
    margin-bottom: var(--space-4);
}

/* ── 4. Essentials (reused sp-gallery carousel + product cards) ─────────── */
.wc-essentials__header { margin-bottom: var(--space-10); }
.wc-essentials__heading { font-family: var(--font-display); font-size: var(--font-size-section-heading); font-weight: 400; }
.wc-essentials__desc { color: color-mix(in srgb, currentColor 70%, transparent); margin-top: var(--space-2); }

/* Mirror the Spaces gallery exactly — same full-bleed + peek + N-visible engine
   (drives slide width off --sp-gallery-visible). The only difference is a card
   instead of an image, so the slide is auto-height and un-rounded. Visible count
   is configurable per breakpoint from the Merchandise settings. */
.wc-essentials { --sp-gallery-visible: var(--ess-desktop, 3); padding-bottom: var(--space-10); }

@media (max-width: 768px) {
    .wc-essentials { --sp-gallery-visible: var(--ess-mobile, 1); }
}

.wc-essentials__track .sp-gallery__slide {
    aspect-ratio: auto;
    border-radius: 0;
}

/* THE fix: WooCommerce loop cards output a position:absolute .screen-reader-text.
   Without a positioned card it anchors to the page and widens it (horizontal
   scrollbar). A relative card keeps it inside the slide so the track clips it. */
.wc-card { position: relative; }

.wc-card { display: flex; flex-direction: column; gap: var(--space-3); }
.wc-card__media { display: block; border-radius: var(--radius-lg); overflow: hidden; aspect-ratio: 4 / 5; background: var(--color-white); }
.wc-card__media img { width: 100%; height: 100%; object-fit: cover; }
.wc-card__row { display: flex; justify-content: space-between; align-items: baseline; gap: var(--space-3); }
.wc-card__title { font-family: var(--font-body); font-size: var(--text-md); color: var(--color-white); text-decoration: none; font-weight: 500; }
.wc-card__sub { display: block; font-size: var(--text-sm); color: color-mix(in srgb, currentColor 65%, transparent); }
.wc-card__price { font-family: var(--font-body); font-size: var(--text-lg); white-space: nowrap; font-weight: 500; }
.wc-card .button, 
.wc-card .add_to_cart_button {
    display: block;
    width: 100%;
    text-align: center;
    padding: var(--space-4) !important;
    margin-top: var(--space-1) !important;
    border: 1px solid rgba(255, 255, 255, 0.4) !important;
    border-radius: var(--radius-md) !important;
    background: transparent !important;
    color: var(--color-white) !important;
    text-decoration: none;
    font-weight: normal !important;
}

.wc-card .button:hover,
.wc-card .add_to_cart_button:hover { background: rgba(255, 255, 255, 0.1) !important; }

/* ── Responsive ─────────────────────────────────────────────────────────── */
@media (max-width: 900px) {
    .wc-product__grid { grid-template-columns: 1fr; gap: var(--space-10); }
}

.woocommerce:where(body:not(.woocommerce-block-theme-has-button-styles)) button.button, 
.woocommerce:where(body:not(.woocommerce-block-theme-has-button-styles)) a.button.disabled {
    color: var(--c-teal-dark-900) !important;
    gap: var(--space-2);
    padding: var(--space-4) var(--space-6) !important;
    font-size: var(--text-base);
    border-radius: var(--radius-md);
    transition: background-color var(--transition-fast), border-color var(--transition-fast), color var(--transition-fast), box-shadow var(--transition-fast), transform var(--transition-fast);
    text-decoration: none;
}

.wc-summary__form label,
.wc-summary__form .label {
    color: var(--color-white) !important;
}