/* The shop (btg-shop.php), on top of btg-rentals.css: the same head,
   chips, cards and product layout, with each product's own colour
   (--btg-accent, sampled from its photo; --btg-accent-ink for text on it)
   and wider, full-bleed photos. */

.btg-shop,
.btg-shop-product {
    --btg-accent: #0f0f0f;
    --btg-accent-ink: #fff;
}

/* Feature: the featured or newest product, in its colour */
.btg-shop__feature {
    display: grid;
    grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
    margin: 0 0 3rem;
    overflow: hidden;
    border-radius: 12px;
    background: var(--btg-accent);
    color: var(--btg-accent-ink);
}

.btg-shop__feature-image {
    display: flex;
    align-items: center;
    min-width: 0;
}

/* The photo whole, at its own shape, on its own colour */
.btg-shop__feature-image img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: var(--btg-ratio, 4 / 3);
    object-fit: contain;
}

.btg-shop__feature-body {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 3rem 2.75rem;
}

.btg-shop__feature-eyebrow {
    margin: 0 0 0.75rem;
    font-size: 0.72rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    opacity: 0.8;
}

.btg-shop__feature-title {
    margin: 0 0 1rem;
    font-size: clamp(1.8rem, 2.6vw, 2.4rem);
    line-height: 1;
    color: inherit;
}

.btg-shop__feature-title a {
    color: inherit;
    text-decoration: none;
}

.btg-shop__feature-text {
    max-width: 42ch;
    margin: 0 0 1.25rem;
    font-size: 0.95rem;
    line-height: 1.6;
    opacity: 0.92;
}

.btg-shop__feature-price {
    margin: 0 0 1.5rem;
}

.btg-shop__feature-price .btg-rentals__day {
    font-size: 1.6rem;
    font-weight: 600;
}

.btg-shop__feature-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1rem 1.5rem;
}

.btg-shop .btg-shop__buy,
.btg-shop .btg-shop__buy:hover,
.btg-shop .btg-shop__buy:focus {
    display: inline-block;
    padding: 0.9rem 1.5rem;
    border-radius: 6px;
    background: var(--btg-accent-ink);
    color: var(--btg-accent);
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-decoration: none;
    text-transform: uppercase;
    transition: transform 0.15s ease;
}

.btg-shop .btg-shop__buy:hover {
    transform: translateY(-1px);
}

.btg-shop .btg-shop__buy.loading {
    opacity: 0.6;
}

.btg-shop__details,
.btg-shop__feature .added_to_cart {
    color: inherit;
    font-size: 0.85rem;
    text-decoration: underline;
    text-underline-offset: 0.25em;
}

.btg-shop__feature :focus-visible {
    outline: 2px solid var(--btg-accent-ink);
    outline-offset: 3px;
}

/* Feature with a video: the video fills the left, tinted in the product's
   colour for legibility, the cover square on top */
.btg-shop__feature-media {
    position: relative;
    display: grid;
    place-items: center;
    min-height: 460px;
    overflow: hidden;
    isolation: isolate;
}

.btg-shop__feature-video {
    position: absolute;
    inset: 0;
    z-index: -2;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(1) contrast(1.15) brightness(0.95);
    transform: scale(1.12);
}

/* Homepage: the video in its own colours under the product's colour
   (multiply keeps the orange and pulls it to the panel's tone) */
.btg-shop__feature--video-only .btg-shop__feature-video {
    filter: none;
    transform: none;
}

.btg-shop__feature--video-only .btg-shop__feature-tint {
    mix-blend-mode: multiply;
    opacity: 0.55;
}

/* The panel's colour runs into the video from the right, so the two read
   as one surface */
.btg-shop__feature-blend {
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(to right, transparent 45%, var(--btg-accent) 100%);
    pointer-events: none;
}

/* Duotone, as the old shop banner: dark tones take the product's colour,
   light tones stay pale */
.btg-shop__feature-tint {
    position: absolute;
    inset: 0;
    z-index: -1;
    background: var(--btg-accent);
    mix-blend-mode: lighten;
}

.btg-shop__feature-cover {
    display: block;
    width: min(62%, 340px);
    aspect-ratio: 1;
    overflow: hidden;
    border-radius: 6px;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
}

.btg-shop__feature-cover img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Cards: wider, full-bleed photos; the button in the product's colour */
@media (min-width: 961px) {
    .btg-shop__grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 2.5rem 2rem;
    }
}

.btg-rentals__card--shop .btg-rentals__image {
    aspect-ratio: 4 / 3;
    border-radius: 10px;
    background: var(--btg-accent);
}

.btg-rentals__card--shop .btg-rentals__image img {
    padding: 0;
    object-fit: contain;
    mix-blend-mode: normal;
}

.btg-rentals__card--shop .btg-rentals__cta {
    border-color: var(--btg-accent);
}

.btg-rentals__card--shop > a:hover .btg-rentals__cta,
.btg-rentals__card--shop > a:focus-visible .btg-rentals__cta {
    background: var(--btg-accent);
    color: var(--btg-accent-ink);
}

/* Delivery strip at the foot of the listing */
.btg-shop__delivery {
    margin: 3rem 0 0;
}

.btg-shop__delivery strong::before {
    content: none;
}

/* ===== Shop product pages ===== */

.btg-product--shop .btg-product__layout {
    grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
    column-gap: 56px;
}

.btg-product--shop .btg-product__track {
    border-radius: 10px;
    background: var(--btg-accent);
}

.btg-product--shop .btg-product__slide {
    aspect-ratio: var(--btg-ratio, 4 / 3);
}

.btg-product--shop .btg-product__slide img {
    padding: 0;
    object-fit: contain;
    mix-blend-mode: normal;
}

.btg-shop-product .btg-product__summary .product_title {
    font-size: clamp(1.6rem, 2.2vw, 2rem);
}

.btg-product--shop .btg-product__thumbs button,
.btg-product--shop .btg-product__thumbs button:hover,
.btg-product--shop .btg-product__thumbs button:focus {
    padding: 0;
    overflow: hidden;
    background: var(--btg-accent);
}

.btg-product--shop .btg-product__thumbs img {
    object-fit: cover;
    mix-blend-mode: normal;
}

.btg-product--shop .btg-product__thumbs button[aria-current="true"] {
    border-color: #0f0f0f;
    box-shadow: 0 0 0 1px #0f0f0f;
}

.btg-shop-product .btg-product__summary p.price .btg-rentals__day {
    font-size: 1.6rem;
}

.btg-shop-product .woocommerce-product-details__short-description {
    color: #0f0f0f;
    font-size: 0.95rem;
    line-height: 1.6;
}

/* Stock line with a dot in the product's colour */
.btg-shop-product div.product p.stock {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0 0 0.75rem;
    font-size: 0.85rem;
    color: rgba(15, 15, 15, 0.7) !important;
}

.btg-shop-product div.product p.stock::before {
    content: "";
    width: 0.55rem;
    height: 0.55rem;
    border-radius: 50%;
    background: var(--btg-accent);
}

.btg-shop-product div.product p.stock.out-of-stock::before {
    background: rgba(15, 15, 15, 0.3);
}

/* Quantity and Add to basket */
.btg-shop-product div.product form.cart {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin: 0 0 1.5rem;
}

.btg-shop-product div.product form.cart .quantity {
    display: flex;
    margin: 0;
    overflow: hidden;
    border: 1px solid rgba(15, 15, 15, 0.12);
    border-radius: 6px;
}

.btg-shop-product div.product form.cart .quantity input.qty,
.btg-shop-product div.product form.cart .quantity a,
.btg-shop-product div.product form.cart .quantity .minus,
.btg-shop-product div.product form.cart .quantity .plus {
    width: 2.75rem;
    height: 100%;
    min-height: 3rem;
    padding: 0;
    border: 0;
    background: #fff;
    color: #0f0f0f;
    text-align: center;
}

.btg-shop-product div.product form.cart button.single_add_to_cart_button,
.btg-shop-product div.product form.cart button.single_add_to_cart_button:hover,
.btg-shop-product div.product form.cart button.single_add_to_cart_button:focus {
    flex: 1;
    min-height: 3rem;
    padding: 0.9rem 1.25rem;
    border: 0;
    border-radius: 6px;
    background: var(--btg-accent);
    color: var(--btg-accent-ink);
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    transition: filter 0.15s ease;
}

.btg-shop-product div.product form.cart button.single_add_to_cart_button:hover {
    filter: brightness(0.92);
}

.btg-shop-product div.product form.cart button.single_add_to_cart_button:focus-visible {
    outline: 2px solid #0f0f0f;
    outline-offset: 2px;
}

/* The About section can hold a video: full width of its column */
.btg-product--shop .btg-product__text {
    max-width: none;
}

.btg-product--shop .btg-product__text > p {
    max-width: 65ch;
}

/* YouTube links in descriptions (classic [embed]) come with a fixed
   height from oEmbed: give them the video's 16:9 at the column's width. */
.btg-product__text iframe[src*="youtube.com"],
.btg-product__text iframe[src*="youtu.be"] {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
}

@media (max-width: 900px) {
    .btg-shop__feature {
        grid-template-columns: 1fr;
    }

    .btg-shop__feature-image {
        min-height: 0;
        aspect-ratio: 4 / 3;
    }

    .btg-shop__feature-media {
        min-height: 0;
        aspect-ratio: 1;
    }

    .btg-shop__feature-blend {
        background: linear-gradient(to bottom, transparent 50%, var(--btg-accent) 100%);
    }

    .btg-shop__feature-body {
        padding: 1.75rem 1.5rem 2rem;
    }

    .btg-product--shop .btg-product__layout {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .btg-shop__feature {
        margin: 0 -20px 2rem;
        border-radius: 0;
    }

    .btg-shop__feature-title {
        font-size: 1.9rem;
    }

    .btg-shop__delivery {
        margin-top: 2rem;
    }
}
