/* ============================================================
   Single product page — Clapley layout (2026-05 redesign)
   ============================================================ */

.product-page {
    background: var(--color-off-white);
}

/* ----------------------------------------------------------
   1. Breadcrumb
   ---------------------------------------------------------- */

.product-breadcrumb {
    padding: 24px 0;
    background: var(--color-off-white);
}

.product-breadcrumb .woocommerce-breadcrumb {
    font-family: var(--font-body);
    font-weight: 300;
    font-size: 14px;
    color: #3a3a3a;
    margin: 0;
}

.product-breadcrumb .woocommerce-breadcrumb a {
    color: #3a3a3a;
    text-decoration: none;
}

.product-breadcrumb .woocommerce-breadcrumb a:hover {
    color: #142809;
}

/* ----------------------------------------------------------
   2. Hero — gallery + summary
   ---------------------------------------------------------- */

.product-hero {
    background: var(--color-off-white);
    padding: 80px 0 60px;
}

.product-hero__inner {
    display: grid;
    grid-template-columns: 7fr 5fr;
    gap: 80px;
    align-items: start;
}

/* --- Gallery --- */

.product-gallery {
    display: grid;
    grid-template-columns: 1fr;
    align-items: start;
}

.product-gallery--has-thumbs {
    grid-template-columns: 96px 1fr;
    gap: 24px;
}

.product-gallery__thumbs {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.product-gallery__thumb {
    width: 80px;
    height: 80px;
    background: #d9d9d9;
    border: 2px solid transparent;
    padding: 0;
    cursor: pointer;
    overflow: hidden;
    transition: border-color 0.15s ease;
}

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

.product-gallery__thumb:hover {
    border-color: #142809;
}

.product-gallery__thumb.is-active {
    border-color: #142809;
}

.product-gallery__main {
    display: block;
    aspect-ratio: 1 / 1;
    background: #f5f5f5;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
    overflow: hidden;
    transition: transform 0.25s ease;
}

.product-gallery__main:hover {
    transform: scale(1.02);
}

.product-gallery__main img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 32px;
    display: block;
}

/* --- Summary --- */

.product-summary {
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding-top: 16px;
}

.product-summary__title {
    font-family: var(--font-heading);
    font-weight: 350;
    font-size: 48px;
    line-height: 1;
    text-transform: uppercase;
    color: #101010;
    margin: 0;
}

.product-summary__subline {
    font-family: var(--font-body);
    font-weight: 300;
    font-size: 16px;
    color: #6b6b6b;
    margin: 0;
}

.product-summary__price {
    font-family: var(--font-body);
    font-weight: 400;
    font-size: 24px;
    color: #101010;
    margin: 0;
}

.product-summary__price del {
    color: #6b6b6b;
    margin-right: 8px;
}

.product-summary__excerpt {
    font-family: var(--font-body);
    font-weight: 300;
    font-size: 16px;
    line-height: 1.6;
    color: #3a3a3a;
    max-width: 420px;
}

.product-summary__excerpt p {
    margin: 0 0 1em;
}

/* Variations + add-to-cart form */
.product-summary__form .variations {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
    border: none;
}

.product-summary__form .variations tbody,
.product-summary__form .variations tr,
.product-summary__form .variations td,
.product-summary__form .variations th {
    display: block;
    padding: 0;
    border: none;
}

.product-summary__form .variations label {
    font-family: var(--font-body);
    font-weight: 500;
    font-size: 12px;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: #101010;
    margin-bottom: 6px;
    display: block;
}

.product-summary__form .variations select {
    width: 100%;
    height: 52px;
    padding: 0 16px;
    border: 1px solid #d9d9d9;
    background: #fff;
    font-family: var(--font-body);
    font-weight: 300;
    font-size: 16px;
    color: #101010;
    cursor: pointer;
}

/* Hide the native select once swatches JS has rendered pills. We use
   .has-swatches added by JS so users without JS still see the select. */
.product-summary__form .variations.has-swatches select {
    display: none;
}

/* Pill swatches — replace the variation dropdown.
   Matches Figma "Shop now" button language at smaller scale. */
.product-summary__form .variation-swatches {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.product-summary__form .variation-swatch {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 56px;
    height: 40px;
    padding: 10px 18px;
    background: #fff;
    color: #101010;
    border: 1px solid #142809;
    border-radius: 0;
    font-family: var(--font-body);
    font-weight: 500;
    font-size: 14px;
    line-height: 1;
    letter-spacing: 0;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease, opacity 0.15s ease;
}

.product-summary__form .variation-swatch:hover {
    background: #f5f5f5;
}

.product-summary__form .variation-swatch.is-active {
    background: #142809;
    color: #fff;
}

.product-summary__form .variation-swatch.is-disabled {
    opacity: 0.4;
    text-decoration: line-through;
    cursor: not-allowed;
}

.product-summary__form .variation-swatch.is-disabled:hover {
    background: #fff;
}

/* Mobile — tighter gap, button-like pills span full row */
@media (max-width: 600px) {
    .product-summary__form .variation-swatches {
        gap: 6px;
    }
}

.product-summary__form .reset_variations {
    font-family: var(--font-body);
    font-size: 12px;
    color: #6b6b6b;
    text-decoration: underline;
}

.product-summary__form .single_variation_wrap .price {
    margin-bottom: 12px;
    font-family: var(--font-body);
    font-size: 20px;
}

/* Quantity stepper */
.product-summary__form .quantity {
    display: inline-flex;
    align-items: center;
    height: 52px;
    margin-right: 12px;
}

.product-summary__form .quantity .qty {
    width: 60px;
    height: 52px;
    border: 1px solid #d9d9d9;
    border-left: none;
    border-right: none;
    background: #fff;
    text-align: center;
    font-family: var(--font-body);
    font-weight: 400;
    font-size: 16px;
    color: #101010;
    appearance: textfield;
}

.product-summary__form .quantity .qty::-webkit-inner-spin-button,
.product-summary__form .quantity .qty::-webkit-outer-spin-button {
    appearance: none;
    margin: 0;
}

.product-summary__form .quantity .qty-btn {
    width: 44px;
    height: 52px;
    border: 1px solid #d9d9d9;
    background: #fff;
    font-family: var(--font-body);
    font-size: 18px;
    color: #101010;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
}

.product-summary__form .quantity .qty-btn:hover {
    background: #142809;
    color: #fff;
    border-color: #142809;
}

/* Add to cart button — matches Figma "Shop now" pattern (node 922:3314).
   White bg, deep green border, soft accent-green shadow, sentence case.
   The .woocommerce body prefix + button element selector brings specificity
   to (0,3,1), matching Woo's `body button.button.alt` so source order wins. */
.woocommerce .product-summary__form button.single_add_to_cart_button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 52px;
    margin-top: 20px;
    padding: 0 24px;
    background: #fff;
    color: #101010;
    border: 1px solid #142809;
    border-radius: 0;
    box-shadow: 6px 6px 6px 0 rgba(123, 178, 60, 0.5);
    font-family: var(--font-body);
    font-weight: 500;
    font-size: 16px;
    line-height: 1.4;
    letter-spacing: 0;
    text-transform: none;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.woocommerce .product-summary__form button.single_add_to_cart_button:hover {
    background: #142809;
    color: #fff;
    box-shadow: 3px 3px 4px 0 rgba(123, 178, 60, 0.5);
}

.woocommerce .product-summary__form button.single_add_to_cart_button:active {
    box-shadow: 1px 1px 2px 0 rgba(123, 178, 60, 0.5);
    transform: translate(1px, 1px);
}

.woocommerce .product-summary__form button.single_add_to_cart_button:disabled,
.woocommerce .product-summary__form button.single_add_to_cart_button.disabled {
    background: #fff;
    color: #6b6b6b;
    border-color: #d9d9d9;
    box-shadow: none;
    cursor: not-allowed;
}

/* Wishlist */
.product-summary__wishlist {
    margin-top: -8px;
}

.product-summary__wishlist .yith-wcwl-add-to-wishlist-button-block,
.product-summary__wishlist .yith-wcwl-add-button {
    display: flex;
}

.product-summary__wishlist a,
.product-summary__wishlist button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: transparent !important;
    color: #142809 !important;
    border: none !important;
    padding: 0 !important;
    font-family: var(--font-body) !important;
    font-weight: 300 !important;
    font-size: 14px !important;
    text-decoration: none !important;
    cursor: pointer;
}

.product-summary__wishlist a:hover,
.product-summary__wishlist button:hover {
    color: #0d520f !important;
}

/* Meta block */
.product-summary__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 16px;
    padding-top: 16px;
    border-top: 1px solid #e5e5e5;
    font-family: var(--font-body);
    font-weight: 300;
    font-size: 14px;
    color: #3a3a3a;
}

.product-summary__meta a {
    color: #142809;
    text-decoration: none;
}

.product-summary__meta a:hover {
    text-decoration: underline;
}

.product-summary__stock {
    margin: 0;
    font-family: var(--font-body);
    font-weight: 300;
    font-size: 14px;
}

.product-summary__stock--in {
    color: #0d520f;
}

.product-summary__stock--out {
    color: #b00020;
}

.product-summary__fulfilment {
    margin: 0;
    font-family: var(--font-body);
    font-weight: 300;
    font-size: 12px;
    color: #6b6b6b;
}

/* ----------------------------------------------------------
   3. Description
   ---------------------------------------------------------- */

.product-description {
    background: var(--color-off-white);
    padding: 80px 0;
}

.product-description .container {
    max-width: 800px;
}

.product-description__eyebrow {
    font-family: var(--font-body);
    font-weight: 500;
    font-size: 12px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #142809;
    margin: 0 0 16px;
}

.product-description__body {
    font-family: var(--font-body);
    font-weight: 300;
    font-size: 18px;
    line-height: 1.7;
    color: #1a1a1a;
}

.product-description__body p {
    margin: 0 0 1em;
}

.product-description__body img {
    max-width: 100%;
    height: auto;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

.product-description__body .alignfull {
    width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    max-width: none;
}

/* ----------------------------------------------------------
   4. Specs + Reviews accordion
   ---------------------------------------------------------- */

.product-accordion {
    background: #f9f9f9;
    padding: 60px 0;
}

.product-accordion__panel {
    border-bottom: 1px solid #d9d9d9;
}

.product-accordion__panel:first-child {
    border-top: 1px solid #d9d9d9;
}

.product-accordion__summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px 0;
    cursor: pointer;
    list-style: none;
    font-family: var(--font-heading);
    font-weight: 350;
    font-size: 24px;
    text-transform: uppercase;
    color: #142809;
}

.product-accordion__summary::-webkit-details-marker {
    display: none;
}

.product-accordion__icon {
    display: inline-block;
    font-family: var(--font-heading);
    font-size: 24px;
    color: #142809;
    transition: transform 0.25s ease;
}

.product-accordion__panel[open] .product-accordion__icon {
    transform: rotate(45deg);
}

.product-accordion__content {
    padding: 0 0 32px;
    font-family: var(--font-body);
    font-weight: 300;
    font-size: 16px;
    line-height: 1.6;
    color: #3a3a3a;
}

.product-accordion__content table.woocommerce-product-attributes {
    width: 100%;
    border-collapse: collapse;
}

.product-accordion__content table.woocommerce-product-attributes th,
.product-accordion__content table.woocommerce-product-attributes td {
    padding: 12px 0;
    border-bottom: 1px solid #e5e5e5;
    text-align: left;
    font-weight: 300;
}

.product-accordion__content table.woocommerce-product-attributes th {
    width: 30%;
    font-weight: 500;
    color: #101010;
}

/* ----------------------------------------------------------
   5. Related Products
   ---------------------------------------------------------- */

.product-related {
    background: var(--color-off-white);
    padding: 100px 0 60px;
}

.product-related__title {
    font-family: var(--font-heading);
    font-weight: 350;
    font-size: 36px;
    text-transform: uppercase;
    text-align: center;
    color: #101010;
    margin: 0 0 48px;
}

.product-related__grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

/* ----------------------------------------------------------
   6. Recently Viewed
   ---------------------------------------------------------- */

.product-recently {
    background: #f9f9f9;
    padding: 80px 0 100px;
}

.product-recently__title {
    font-family: var(--font-heading);
    font-weight: 350;
    font-size: 36px;
    text-transform: uppercase;
    text-align: center;
    color: #101010;
    margin: 0 0 48px;
}

.product-recently__grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

/* ----------------------------------------------------------
   Responsive
   ---------------------------------------------------------- */

@media (max-width: 1023px) {
    .product-hero__inner {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .product-gallery {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .product-gallery__thumbs {
        flex-direction: row;
        order: 2;
        overflow-x: auto;
        padding-bottom: 8px;
    }

    .product-gallery__thumb {
        flex: 0 0 auto;
    }

    .product-gallery__main {
        order: 1;
    }

    .product-summary__title {
        font-size: 32px;
    }

    .product-related__grid,
    .product-recently__grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .product-hero {
        padding: 40px 0 32px;
    }

    .product-breadcrumb .woocommerce-breadcrumb {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
        scrollbar-width: none;
    }

    .product-breadcrumb .woocommerce-breadcrumb::-webkit-scrollbar {
        display: none;
    }

    .product-summary__title {
        font-size: 24px;
        line-height: 1.08;
        max-width: 14ch;
        overflow-wrap: normal;
    }

    .product-summary__price {
        font-size: 20px;
    }

    .product-related,
    .product-recently {
        padding: 60px 0;
    }

    .product-related__title,
    .product-recently__title {
        font-size: 28px;
    }

    .product-related__grid,
    .product-recently__grid {
        grid-template-columns: 1fr;
    }
}

/* ==========================================================
   Shop archive (category / shop pages)
   ========================================================== */

.shop-page .container {
    padding: var(--spacing-lg) var(--container-padding);
}

/* ----------------------------------------------------------
   Breadcrumb (reuses single-product styling)
   ---------------------------------------------------------- */

.shop-breadcrumb {
    padding: 8px 0 24px;
}

.shop-breadcrumb .woocommerce-breadcrumb {
    font-family: var(--font-body);
    font-weight: 300;
    font-size: 14px;
    color: #3a3a3a;
    margin: 0;
}

.shop-breadcrumb .woocommerce-breadcrumb a {
    color: #3a3a3a;
    text-decoration: none;
}

.shop-breadcrumb .woocommerce-breadcrumb a:hover {
    color: #142809;
}

/* ----------------------------------------------------------
   Archive intro — centered title + optional description
   ---------------------------------------------------------- */

.shop-intro {
    text-align: center;
    padding: var(--spacing-md) 0 var(--spacing-lg);
}

.shop-intro__heading {
    font-family: var(--font-heading);
    font-weight: 300;
    font-size: clamp(1.75rem, 3vw, 2.375rem);
    line-height: 1.4;
    color: var(--color-black);
    text-transform: uppercase;
    margin: 0 0 var(--spacing-sm);
}

.shop-intro__heading::after {
    content: "";
    display: block;
    width: 48px;
    height: 2px;
    background: #142809;
    margin: var(--spacing-sm) auto 0;
}

.shop-intro__sub {
    font-family: var(--font-body);
    font-weight: 300;
    font-size: 1rem;
    line-height: 1.6;
    color: #3a3a3a;
    max-width: 640px;
    margin: var(--spacing-sm) auto 0;
}

/* ----------------------------------------------------------
   Toolbar — result count + ordering
   ---------------------------------------------------------- */

.shop-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--spacing-md);
    flex-wrap: wrap;
    padding: 0 0 var(--spacing-md);
    border-bottom: 1px solid #e9e9e9;
    margin-bottom: var(--spacing-md);
}

.shop-toolbar .woocommerce-result-count {
    font-family: var(--font-body);
    font-weight: 300;
    font-size: 14px;
    color: #6f6f6f;
    margin: 0;
}

.shop-toolbar .woocommerce-ordering {
    margin: 0;
}

.shop-toolbar .woocommerce-ordering select,
.shop-toolbar .orderby {
    font-family: var(--font-body);
    font-weight: 300;
    font-size: 14px;
    color: #142809;
    background: transparent;
    border: 1px solid #e9e9e9;
    padding: 8px 32px 8px 12px;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'><path fill='none' stroke='%23142809' stroke-width='1.2' d='M1 1l4 4 4-4'/></svg>");
    background-repeat: no-repeat;
    background-position: right 12px center;
}

.shop-empty {
    text-align: center;
    font-family: var(--font-body);
    font-weight: 300;
    color: #6f6f6f;
    padding: var(--spacing-lg) 0;
}

/* ----------------------------------------------------------
   WooCommerce pagination
   ---------------------------------------------------------- */

.woocommerce-pagination {
    margin-top: var(--spacing-lg);
    text-align: center;
}

.woocommerce-pagination ul {
    display: flex;
    justify-content: center;
    gap: var(--spacing-xs);
    list-style: none;
    padding: 0;
    margin: 0;
}

.woocommerce-pagination ul li a,
.woocommerce-pagination ul li span {
    display: inline-block;
    padding: 0.5rem 0.8rem;
    font-family: var(--font-body);
    font-size: 0.85rem;
    color: #142809;
    text-decoration: none;
    border: 1px solid #e9e9e9;
}

.woocommerce-pagination ul li a:hover {
    border-color: #142809;
}

.woocommerce-pagination ul li span.current {
    background: #142809;
    color: var(--color-white);
    border-color: #142809;
}

/* ----------------------------------------------------------
   Shop archive — mobile
   ---------------------------------------------------------- */

@media (max-width: 768px) {
    .shop-toolbar {
        flex-direction: column;
        align-items: flex-start;
    }
}
