/* Single product page and WooCommerce purchase UI. */

.yonex-product,
.yonex-product *,
.yonex-product *::before,
.yonex-product *::after {
    box-sizing: border-box;
}

.yonex-product,
.yonex-product-gallery {
    overflow-x: hidden;
}

.yonex-product {
    padding: clamp(18px, 3vw, 44px) 0 var(--section-space-md);
    background:
        radial-gradient(circle at 12% 2%, rgba(0, 107, 182, .06), transparent 28%),
        linear-gradient(180deg, var(--color-surface-cool) 0%, var(--color-white) 440px),
        var(--color-white);
}

/* Layout */
.yonex-product-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(380px, .92fr);
    gap: clamp(34px, 5vw, 68px);
    align-items: start;
    max-width: 100%;
    margin: 0;
}

.yonex-product-info {
    position: sticky;
    top: calc(var(--header-height, 96px) + var(--space-lg));
    align-self: start;
    max-width: 620px;
    padding-right: 0;
}

.yonex-product-info .woocommerce-breadcrumb,
.product-breadcrumbs {
    max-width: 100%;
    margin: 0 0 var(--space-md);
    overflow-wrap: break-word;
    font-size: 13px;
    color: var(--color-text-subtle);
}

.yonex-product-info .woocommerce-breadcrumb a {
    color: var(--color-text-soft);
    text-decoration: none;
}

.yonex-product-info .woocommerce-breadcrumb a:hover {
    color: var(--color-action);
}

.yonex-product-eyebrow,
.yonex-purchase-kicker {
    margin: 0 0 var(--space-xs);
    color: var(--color-brand-blue);
    font-size: 12px;
    font-weight: var(--font-weight-bold);
    letter-spacing: .16em;
    line-height: 1.2;
    text-transform: uppercase;
}

.product-title {
    margin: 0 0 var(--space-sm);
    color: var(--color-text);
    font-size: clamp(30px, 3.6vw, 50px);
    font-weight: var(--font-weight-bold);
    line-height: 1;
    letter-spacing: -.045em;
}

.product-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-md);
    margin-bottom: var(--space-sm);
}

.yonex-product-summary {
    max-width: 560px;
    margin: 0 0 var(--space-lg);
    color: var(--color-text-soft);
    font-size: 17px;
    line-height: 1.58;
}

.yonex-product-summary p {
    margin: 0 0 12px;
}

.product-badge {
    padding: 6px 10px;
    border-radius: 4px;
    background: #2bb673;
    color: var(--color-white);
    font-size: 12px;
    font-weight: 600;
}

.yonex-product-purchase {
    position: relative;
    margin-top: var(--space-lg);
    padding: clamp(22px, 3vw, 32px);
    border: var(--border-default);
    border-radius: var(--radius-lg);
    background:
        radial-gradient(circle at 100% 0%, rgba(0, 107, 182, .06), transparent 34%),
        linear-gradient(180deg, rgba(255, 255, 255, .98), rgba(249, 251, 252, .98));
    box-shadow: var(--shadow-sm);
}

.yonex-product-purchase::before {
    content: '';
    position: absolute;
    top: 0;
    right: clamp(20px, 4vw, 42px);
    left: clamp(20px, 4vw, 42px);
    height: 4px;
    border-radius: 0 0 var(--radius-pill) var(--radius-pill);
    background: linear-gradient(90deg, var(--color-brand-blue), var(--color-brand-lime));
}

.yonex-product-purchase .price {
    margin: 0;
    color: var(--color-text-strong);
    font-size: clamp(30px, 3vw, 44px);
    font-weight: var(--font-weight-bold);
    line-height: .95;
    letter-spacing: -.045em;
}

.yonex-product-purchase .price del {
    display: inline-block;
    margin-right: var(--space-sm);
    color: var(--color-text-subtle);
    font-size: .58em;
    font-weight: var(--font-weight-semibold);
    opacity: 1;
}

.yonex-product-purchase .price ins {
    color: var(--color-text-strong);
    text-decoration: none;
}

.yonex-product-sku {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 30px;
    padding: 0 var(--space-sm);
    border: var(--border-default);
    border-radius: var(--radius-pill);
    background: var(--color-white);
    color: var(--color-text-soft);
    font-size: 12px;
    font-weight: var(--font-weight-bold);
    letter-spacing: .1em;
    text-transform: uppercase;
    white-space: nowrap;
}

.yonex-product-availability {
    margin: var(--space-xs) 0 var(--space-md);
}

.yonex-product-purchase .stock {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 var(--space-md);
    padding: 8px 12px;
    border: var(--border-default);
    border-radius: var(--radius-pill);
    background: var(--color-surface-soft);
    color: var(--color-success-dark);
    font-size: 15px;
    font-weight: var(--font-weight-bold);
    line-height: 1.2;
}

.yonex-product-purchase .woocommerce-variation-availability {
    display: block;
    margin-bottom: 0;
}

.yonex-product-purchase .woocommerce-variation-availability:empty {
    display: none;
}

.yonex-product-purchase .stock::before {
    content: '';
    flex: 0 0 10px;
    width: 10px;
    height: 10px;
    border-radius: var(--radius-pill);
    background: var(--color-success);
    box-shadow: 0 0 0 5px var(--color-success-soft);
}

.yonex-product-trust {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--space-sm);
    margin: var(--space-lg) 0 0;
    padding: var(--space-lg) 0 0;
    border-top: var(--border-default);
    list-style: none;
}

.yonex-product-trust li {
    position: relative;
    display: grid;
    gap: 4px;
    min-height: 100%;
    padding: var(--space-md) var(--space-md) var(--space-md) calc(var(--space-lg) + 10px);
    border: var(--border-default);
    border-radius: var(--radius-md);
    background: var(--color-surface-soft);
    color: var(--color-text-soft);
    font-size: 13px;
    font-weight: var(--font-weight-bold);
    line-height: 1.35;
}

.yonex-product-trust li::before {
    content: '';
    position: absolute;
    top: var(--space-md);
    left: var(--space-md);
    width: 12px;
    height: 12px;
    border-radius: var(--radius-pill);
    background: var(--color-success);
    box-shadow: 0 0 0 5px var(--color-success-soft);
}

.yonex-product-trust strong {
    color: var(--color-text);
    font-size: 14px;
    font-weight: var(--font-weight-bold);
    line-height: 1.2;
}

.yonex-product-trust span {
    color: var(--color-text-soft);
    font-size: 13px;
    font-weight: var(--font-weight-medium);
    line-height: 1.45;
}

/* Gallery */
.yonex-main-image {
    display: grid;
    aspect-ratio: 1 / 1;
    place-items: center;
    padding: clamp(18px, 3vw, 42px);
    overflow: hidden;
    border: 1px solid rgba(15, 23, 42, .06);
    border-radius: var(--radius-lg);
    background:
        radial-gradient(circle at 18% 10%, rgba(255, 255, 255, .9), transparent 34%),
        linear-gradient(145deg, rgba(255, 255, 255, .84), rgba(246, 249, 251, .98)),
        var(--color-surface-cool);
    box-shadow:
        inset 0 0 0 1px rgba(255, 255, 255, .56),
        0 18px 42px rgba(15, 23, 42, .06);
}

.yonex-main-image img {
    width: 100%;
    height: 100%;
    border-radius: var(--radius-md);
    background: transparent;
    object-fit: contain;
    transition: opacity .15s ease;
}

.yonex-thumbnails {
    display: flex;
    gap: 12px;
    max-width: 100%;
    margin: var(--space-md) 0 0;
    padding: 6px 2px;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-behavior: smooth;
    white-space: nowrap;
}

.yonex-thumbnails::-webkit-scrollbar {
    height: 6px;
}

.yonex-thumbnails::-webkit-scrollbar-thumb {
    border-radius: 4px;
    background: rgba(0, 0, 0, .2);
}

.yonex-thumb-button {
    flex: 0 0 auto;
    width: 82px;
    height: 82px;
    padding: 6px;
    overflow: hidden;
    border: 1px solid rgba(15, 23, 42, .08);
    border-radius: var(--radius-md);
    background:
        linear-gradient(145deg, rgba(255, 255, 255, .86), rgba(246, 249, 251, .96)),
        var(--color-surface-cool);
    cursor: pointer;
    opacity: .72;
    transition: opacity .2s ease, transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}

.yonex-thumb {
    display: block;
    width: 100%;
    max-width: 100%;
    height: 100%;
    border-radius: 8px;
    object-fit: contain;
}

.yonex-thumb-button:hover,
.yonex-thumb-button.active {
    opacity: 1;
    transform: translateY(-1px);
}

.yonex-thumb-button.active {
    border-color: var(--color-action);
    box-shadow: 0 0 0 3px rgba(0, 112, 243, .15);
}

/* Size guide modal */
.yonex-size-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 4px;
    padding: 0;
    border: 0;
    background: none;
    color: var(--color-action-hover);
    font-weight: var(--font-weight-bold);
    text-decoration: underline;
    text-underline-offset: 4px;
    cursor: pointer;
}

.yonex-size-btn::after {
    content: '->';
    font-size: 12px;
    text-decoration: none;
}

.yonex-size-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: none;
}

.yonex-size-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.yonex-size-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, .6);
}

.yonex-size-content {
    position: relative;
    z-index: 2;
    width: 90%;
    max-width: 900px;
    max-height: 85vh;
    padding: 24px;
    overflow-y: auto;
    border-radius: 8px;
    background: var(--color-white);
}

.yonex-size-content img {
    display: block;
    max-width: 100%;
    height: auto;
    margin: 0 auto;
}

.yonex-size-close {
    position: sticky;
    top: 0;
    float: right;
    border: 0;
    background: var(--color-white);
    font-size: 28px;
    cursor: pointer;
}

/* Variations and swatches */
.variations tr {
    display: flex;
    flex-direction: column;
    align-items: baseline;
}

.variations_form,
.single_add_to_cart_button {
    width: 100%;
}

.yonex-swatch-group {
    margin-bottom: 24px;
}

.yonex-swatch-group select {
    display: none;
}

.yonex-color-swatches .swatch {
    display: inline-block;
    width: 22px;
    height: 22px;
    margin-right: 8px;
    border: 2px solid var(--color-border-strong);
    border-radius: 4px;
    cursor: pointer;
}

.yonex-color-swatches .swatch.active,
.yonex-color-swatches .swatch:hover {
    border-color: var(--color-action);
}

.yonex-text-swatches .swatch {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 6px 6px 0 0;
    padding: 10px 14px;
    border: 1px solid var(--color-border-strong);
    border-radius: 4px;
    font-size: 13px;
    cursor: pointer;
}

.yonex-text-swatches .swatch.active,
.yonex-text-swatches .swatch:hover {
    border-color: var(--color-action);
    background: var(--color-action);
    color: var(--color-white);
}

/* Quantity and cart */
.yonex-product-purchase form.cart,
.woocommerce div.product form.cart,
.woocommerce-variation-add-to-cart {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 12px;
    align-items: center;
    margin-top: var(--space-md);
}

.yonex-product-purchase form.cart {
    margin-top: 16px;
}

.yonex-product-purchase form.cart .quantity {
    min-width: 132px;
}

.woocommerce .quantity,
.woocommerce-variation-add-to-cart .quantity {
    display: flex;
    align-items: center;
    height: 56px;
    overflow: hidden;
    border: var(--border-default);
    border-radius: var(--radius-md);
    background: var(--color-white);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .65);
}

.woocommerce .quantity button,
.qty-btn {
    width: 48px;
    height: 56px;
    border: 0;
    background: var(--color-surface-cool);
    color: var(--color-text);
    font-size: 18px;
    cursor: pointer;
    transition: background var(--duration-fast) var(--ease-standard);
}

.woocommerce .quantity button:hover,
.qty-btn:hover {
    background: var(--color-border);
}

.woocommerce .quantity input.qty,
.quantity input.qty {
    width: 48px;
    flex: 1;
    border: 0;
    font-size: 14px;
    font-weight: var(--font-weight-bold);
    text-align: center;
    -moz-appearance: textfield;
}

.woocommerce .quantity input::-webkit-outer-spin-button,
.woocommerce .quantity input::-webkit-inner-spin-button,
.quantity input::-webkit-outer-spin-button,
.quantity input::-webkit-inner-spin-button {
    margin: 0;
    -webkit-appearance: none;
}

.woocommerce .single_add_to_cart_button,
.woocommerce-variation-add-to-cart .single_add_to_cart_button {
    width: 100%;
    min-height: 56px;
    height: auto;
    border: 0;
    border-radius: var(--radius-md);
    background: var(--color-action);
    color: var(--color-white);
    font-weight: 800;
    letter-spacing: .1em;
    text-transform: uppercase;
    cursor: pointer;
    box-shadow: 0 12px 24px rgba(0, 107, 182, .18);
    transition:
        background var(--duration-base) var(--ease-standard),
        box-shadow var(--duration-base) var(--ease-standard),
        transform var(--duration-base) var(--ease-standard);
}

.woocommerce .single_add_to_cart_button:hover,
.woocommerce-variation-add-to-cart .single_add_to_cart_button:hover,
.woocommerce:where(body:not(.woocommerce-block-theme-has-button-styles)) #respond input#submit.alt,
.woocommerce:where(body:not(.woocommerce-block-theme-has-button-styles)) a.button.alt,
.woocommerce:where(body:not(.woocommerce-block-theme-has-button-styles)) button.button.alt,
.woocommerce:where(body:not(.woocommerce-block-theme-has-button-styles)) input.button.alt,
:where(body:not(.woocommerce-block-theme-has-button-styles)):where(:not(.edit-post-visual-editor)) .woocommerce #respond input#submit.alt,
:where(body:not(.woocommerce-block-theme-has-button-styles)):where(:not(.edit-post-visual-editor)) .woocommerce a.button.alt,
:where(body:not(.woocommerce-block-theme-has-button-styles)):where(:not(.edit-post-visual-editor)) .woocommerce button.button.alt,
:where(body:not(.woocommerce-block-theme-has-button-styles)):where(:not(.edit-post-visual-editor)) .woocommerce input.button.alt {
    background: var(--color-action);
    color: var(--color-white);
}

.woocommerce .single_add_to_cart_button:hover,
.woocommerce-variation-add-to-cart .single_add_to_cart_button:hover {
    background: var(--color-action-hover);
    box-shadow: 0 18px 32px rgba(0, 94, 184, .28);
    transform: translateY(-1px);
}

/* Product information accordion */
.yonex-product-details {
    width: min(100%, 1080px);
    margin: clamp(48px, 7vw, 96px) auto 0;
    padding-bottom: clamp(36px, 6vw, 72px);
}

.yonex-product-details-header {
    margin-bottom: 18px;
}

.yonex-product-details-header span {
    display: block;
    margin-bottom: 8px;
    color: var(--color-action);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .14em;
    text-transform: uppercase;
}

.yonex-product-details-header h2 {
    margin: 0;
    color: var(--color-text);
    font-size: clamp(26px, 3vw, 38px);
    line-height: 1.1;
    letter-spacing: -.03em;
}

.yonex-product-accordion {
    overflow: hidden;
    border: var(--border-default);
    border-radius: var(--radius-lg);
    background: linear-gradient(180deg, rgba(255, 255, 255, .98), rgba(250, 251, 252, .98));
    box-shadow: var(--shadow-sm);
}

.yonex-product-section {
    border-bottom: var(--border-default);
}

.yonex-product-section:last-child {
    border-bottom: 0;
}

.yonex-product-section summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: var(--space-lg) var(--space-xl);
    color: var(--color-text);
    font-size: 14px;
    font-weight: 800;
    letter-spacing: .1em;
    text-transform: uppercase;
    cursor: pointer;
    list-style: none;
    transition: background var(--duration-fast) var(--ease-standard);
}

.yonex-product-section summary:hover {
    background: var(--color-surface-soft);
}

.yonex-product-section summary:focus-visible {
    outline: 2px solid var(--color-action);
    outline-offset: -2px;
}

.yonex-product-section summary::-webkit-details-marker {
    display: none;
}

.yonex-section-icon {
    position: relative;
    flex: 0 0 18px;
    width: 18px;
    height: 18px;
}

.yonex-section-icon::before,
.yonex-section-icon::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 14px;
    height: 2px;
    border-radius: 999px;
    background: var(--color-text);
    transform: translate(-50%, -50%);
}

.yonex-section-icon::after {
    transform: translate(-50%, -50%) rotate(90deg);
    transition: opacity .2s ease;
}

.yonex-product-section[open] .yonex-section-icon::after {
    opacity: 0;
}

.yonex-product-section-content {
    max-width: 860px;
    padding: 0 var(--space-xl) var(--space-xl);
    color: var(--color-text-muted);
    font-size: 16px;
    line-height: 1.75;
}

.yonex-product-section-content > h2:first-child,
.yonex-product-section-content > h3:first-child {
    display: none;
}

.yonex-product-section-content p {
    margin: 0 0 16px;
}

.yonex-product-section-content h2,
.yonex-product-section-content h3,
.yonex-product-section-content h4 {
    margin: 26px 0 10px;
    color: var(--color-text);
    line-height: 1.25;
}

.yonex-product-section-content ul,
.yonex-product-section-content ol {
    margin: 0 0 18px;
    padding-left: 22px;
}

.yonex-product-section-content table {
    width: 100%;
    border-collapse: collapse;
    font-size: 15px;
}

.yonex-product-section-content th,
.yonex-product-section-content td {
    padding: 12px 0;
    border-bottom: 1px solid #edf1f5;
    text-align: left;
    vertical-align: top;
}

.yonex-product-section-content th {
    width: 34%;
    color: #606975;
    font-weight: 700;
}

.yonex-product-section-content :where(a) {
    color: var(--color-action-hover);
}

@media (max-width: 767px) {
    body {
        overflow-x: hidden;
    }

    .yonex-product-info {
        position: static;
        padding-right: 0;
    }

    .yonex-product-grid {
        grid-template-columns: 1fr;
        gap: 24px;
        margin: 0;
    }

    .yonex-product-info .woocommerce-breadcrumb,
    .product-breadcrumbs {
        margin-top: 16px;
        margin-bottom: 16px;
    }

    .product-title {
        font-size: clamp(30px, 10vw, 42px);
        line-height: .98;
    }

    .yonex-product-summary {
        font-size: 15px;
    }

    .yonex-product-purchase {
        margin-top: var(--space-md);
        padding: var(--space-lg);
        border-radius: 12px;
    }

    .product-meta {
        align-items: flex-start;
        flex-direction: column;
        gap: 8px;
    }

    .yonex-product-trust {
        grid-template-columns: 1fr;
    }

    .yonex-product-details {
        margin-top: 42px;
    }

    .yonex-product-section summary {
        padding: var(--space-md) var(--space-lg);
        font-size: 13px;
        letter-spacing: .08em;
    }

    .yonex-product-section-content {
        padding: 0 var(--space-lg) var(--space-lg);
        font-size: 15px;
    }

    .yonex-product-section-content table {
        font-size: 14px;
    }

    .yonex-thumbnails {
        gap: 12px;
        margin: var(--space-sm) 0 0;
        padding: 6px 4px;
    }

    .yonex-thumb {
        width: 100%;
        max-width: 100%;
    }

    .yonex-thumb-button {
        width: 74px;
        height: 74px;
    }

    .woocommerce div.product form.cart,
    .yonex-product-purchase form.cart,
    .woocommerce-variation-add-to-cart {
        grid-template-columns: 1fr;
    }

    .yonex-product-purchase form.cart .quantity {
        min-width: 0;
    }
}
