/* ===========================================================================
 * vw-product-engagements — single-product-1col.css
 *
 * Wave 31a — catalogue-wide single-column product layout.
 *
 * Mobile-first: stacked image / content / gallery.
 * Desktop: same stacked layout, just wider container.
 *
 * Brutalist concrete monochrome — palette inherited from engagement.css via
 * the --vwpe-* tokens (re-declared here as fallbacks so the file works even
 * if engagement.css fails to load).
 * ========================================================================*/

:root {
    --vwpe-1col-max:        980px;
    --vwpe-1col-reading:    760px;
    --vwpe-1col-gutter:     24px;
    --vwpe-1col-gutter-m:   16px;
}

/* ---- Kill the default WC two-column layout on every product page -------- */
/* Hide the legacy 2-col gallery + summary wrappers that bleed in when      */
/* another plugin or the theme re-renders them outside our template.        */
body.single-product .product .woocommerce-product-gallery:not(.vwpe-product-gallery),
body.single-product .product > .summary.entry-summary,
body.single-product .product > .images,
body.single-product .product .onsale {
    /* The .vwpe-product-gallery sibling is our bottom strip — keep it.     */
}

/* When our wrapper is present, force the article block layout so any       */
/* lingering flex/grid columns collapse to a single stack.                  */
.vwpe-single-product--1col,
.vwpe-single-product--1col .vwpe-single-product__article,
body.single-product .product.vwpe-single-product__article {
    display: block !important;
    float: none !important;
    width: 100% !important;
    max-width: var(--vwpe-1col-max);
    margin-inline: auto;
}

/* Strip any leaked WC artefacts when our wrapper is present.               */
.vwpe-single-product--1col .woocommerce-product-gallery:not(.vwpe-product-gallery),
.vwpe-single-product--1col .summary.entry-summary > .price,
.vwpe-single-product--1col .summary.entry-summary > .cart,
.vwpe-single-product--1col .product_meta {
    display: none !important;
}

/* ---- Outer wrapper ------------------------------------------------------ */
.vwpe-single-product--1col {
    padding: 24px var(--vwpe-1col-gutter-m);
    color: var(--vwpe-text, #0d0d0d);
    background: var(--vwpe-bg, #f5f5f0);
}

@media (min-width: 768px) {
    .vwpe-single-product--1col {
        padding: 32px var(--vwpe-1col-gutter);
    }
}

/* ---- Hero featured image ----------------------------------------------- */
.vwpe-product-hero {
    margin: 0 0 32px;
    padding: 0;
}

.vwpe-product-hero-image {
    display: block;
    width: 100%;
    aspect-ratio: 3 / 2;
    object-fit: cover;
    border: var(--vwpe-bw, 2px) solid var(--global-palette7, var(--vwpe-border, #3a3a3a));
    background: var(--vwpe-bg-alt, #ebebe4);
}

@media (max-width: 600px) {
    .vwpe-product-hero-image {
        /* Slightly taller on phone so portrait reads well even at landscape ratio. */
        aspect-ratio: 4 / 3;
    }
}

/* ---- Content reading column -------------------------------------------- */
.vwpe-product-content {
    max-width: var(--vwpe-1col-reading);
    margin: 0 auto;
    padding: 0;
}

/* Section overrides — inside the 1col wrapper, drop the section bottom     */
/* borders that engagement.css adds. The reading-column rhythm is provided  */
/* by intrinsic section padding instead.                                    */
.vwpe-single-product--1col .vwpe-section {
    border-bottom: 0;
    padding-block: 32px;
}

.vwpe-single-product--1col .vwpe-section:first-child {
    padding-top: 0;
}

/* ---- Bottom gallery strip ---------------------------------------------- */
.vwpe-product-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, 96px);
    gap: 12px;
    justify-content: center;
    margin: 48px auto 16px;
    padding: 24px 0 0;
    border-top: var(--vwpe-bw, 2px) solid var(--global-palette7, var(--vwpe-border, #3a3a3a));
    max-width: var(--vwpe-1col-max);
}

.vwpe-product-gallery__item {
    margin: 0;
    padding: 0;
    width: 96px;
    height: 96px;
}

.vwpe-product-gallery__link {
    display: block;
    width: 96px;
    height: 96px;
    border: 1px solid var(--global-palette7, var(--vwpe-border, #3a3a3a));
    transition: border-color 120ms ease-out;
}

.vwpe-product-gallery__link:hover,
.vwpe-product-gallery__link:focus {
    border-color: var(--vwpe-accent, #b5281c);
    outline: 0;
}

.vwpe-product-gallery__img {
    width: 96px;
    height: 96px;
    object-fit: cover;
    display: block;
}

@media (max-width: 600px) {
    .vwpe-product-gallery {
        grid-template-columns: repeat(auto-fit, 72px);
        gap: 8px;
        margin-top: 32px;
    }
    .vwpe-product-gallery__item,
    .vwpe-product-gallery__link,
    .vwpe-product-gallery__img {
        width: 72px;
        height: 72px;
    }
}

/* ---- Hero video (rendered above featured image when meta is set) ------- */
.vwpe-hero-video {
    margin-bottom: 24px;
    border: 1px solid var(--global-palette7, #3a3a3a);
    aspect-ratio: 16 / 9;
    overflow: hidden;
}

.vwpe-hero-video video {
    object-fit: cover;
    width: 100%;
    height: 100%;
}

/* ---- Hide upsells/related, engagement pages stay focused --------------- */
.vwpe-single-product--1col + .related,
.vwpe-single-product--1col + .upsells,
.vwpe-single-product--1col ~ .related,
.vwpe-single-product--1col ~ .upsells {
    display: none !important;
}
