/* ============================================
   PRODUCT PAGE STYLES
   ============================================ */

.breadcrumb-bar {
    position: relative;
}

.product-page-close {
    position: absolute;
    top: 50%;
    right: clamp(16px, 3vw, 42px);
    z-index: 1000;
    display: inline-grid;
    width: 38px;
    height: 38px;
    place-items: center;
    padding: 0 0 2px;
    border: 1px solid rgba(23, 52, 80, 0.2);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 5px 16px rgba(23, 52, 80, 0.18);
    color: var(--brand-navy, #173450);
    cursor: pointer;
    font-size: 25px;
    transform: translateY(-50%);
    font-weight: 500;
    line-height: 1;
}

.product-page-close:hover,
.product-page-close:focus-visible {
    border-color: var(--brand-green, #197b4a);
    background: var(--brand-navy, #173450);
    color: #fff;
    outline: none;
}

.breadcrumb-bar,
.product-section {
    background-color: var(--bg-cream);
    background-image:
        radial-gradient(ellipse at 14% 16%, rgba(47, 90, 69, 0.08) 0 1px, transparent 2px),
        radial-gradient(ellipse at 78% 68%, rgba(47, 90, 69, 0.06) 0 1px, transparent 2px),
        linear-gradient(118deg, rgba(251, 253, 251, 0.58), rgba(238, 245, 240, 0.22) 52%, rgba(225, 235, 229, 0.38)),
        repeating-linear-gradient(92deg, rgba(47, 90, 69, 0.055) 0 1px, transparent 1px 10px),
        repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.32) 0 1px, transparent 1px 7px);
    background-size: 180px 160px, 240px 220px, auto, 10px 100%, 100% 7px;
}

.breadcrumb-bar {
    padding: 16px 0;
    border-bottom: 1px solid var(--border-color);
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--text-gray);
}

.breadcrumb a {
    color: var(--text-gray);
}

.breadcrumb a:hover {
    color: var(--primary-dark);
}

.breadcrumb .current {
    color: var(--text-dark);
}

/* Product Section */
.product-section {
    padding: 48px 0 80px;
}

.product-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 64px;
    margin-bottom: 64px;
}

/* Gallery */
.product-gallery {
    position: sticky;
    top: 100px;
}

.gallery-main {
    aspect-ratio: 3/4;
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: var(--bg-cream);
    margin-bottom: 16px;
}

.gallery-main img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gallery-thumbs {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

.thumb {
    aspect-ratio: 1;
    border-radius: var(--radius-sm);
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    transition: var(--transition);
}

.thumb.active {
    border-color: var(--primary-dark);
}

.thumb:hover {
    border-color: var(--primary-light);
}

.thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Product Details */
.product-title {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 8px;
}

.product-price-main {
    font-size: 24px;
    font-weight: 600;
    color: var(--primary-dark);
    margin-bottom: 4px;
}

.price-note {
    font-size: 13px;
    color: var(--text-light);
    margin-bottom: 16px;
}

.product-rating {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 24px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--border-color);
}

.stars {
    display: flex;
    gap: 2px;
}

.stars svg {
    width: 16px;
    height: 16px;
}

.rating-text {
    font-size: 14px;
    color: var(--text-gray);
}

/* Product Options */
.product-option {
    margin-bottom: 24px;
}

.option-label {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 12px;
    display: block;
}

.selected-value {
    font-weight: 400;
    color: var(--text-gray);
}

.option-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.size-guide-link {
    font-size: 13px;
    color: var(--primary);
    text-decoration: underline;
}

.color-options {
    display: flex;
    gap: 10px;
}

.color-option {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 2px solid var(--border-color);
    cursor: pointer;
    transition: var(--transition);
    position: relative;
}

.color-option.active {
    border-color: var(--primary-dark);
}

.color-option.active::after {
    content: '';
    position: absolute;
    inset: 3px;
    border-radius: 50%;
    border: 2px solid white;
}

.color-option.more {
    background: var(--bg-cream);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-gray);
}

.product-combination-options {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(92px, 1fr));
    gap: 9px;
}

.product-combination-option {
    min-width: 0;
    padding: 6px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    background: #fff;
    color: var(--text-dark);
    cursor: pointer;
    text-align: left;
    text-decoration: none;
    transition: var(--transition);
}

.product-combination-option:hover,
.product-combination-option.active {
    border-color: var(--primary-dark);
    box-shadow: 0 0 0 1px var(--primary-dark);
}

.product-combination-image {
    display: block;
    width: 100%;
    height: 82px;
    object-fit: cover;
    border-radius: 3px;
    background: var(--bg-cream);
}

.product-combination-image--empty {
    background: linear-gradient(135deg, #eee, #cfcfcf);
}

.product-combination-swatches {
    display: flex;
    gap: 3px;
    margin-top: 5px;
}

.product-combination-swatches span {
    width: 12px;
    height: 12px;
    border: 1px solid rgba(0, 0, 0, .2);
    border-radius: 50%;
    background: var(--combination-color);
}

.product-combination-name,
.product-combination-price {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.product-combination-name {
    margin-top: 5px;
    font-size: 11px;
    font-weight: 600;
}

.product-combination-price {
    margin-top: 2px;
    color: var(--text-gray);
    font-size: 11px;
}

.size-options {
    display: flex;
    gap: 10px;
}

.size-option {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    background: white;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

.size-option:hover {
    border-color: var(--primary-dark);
}

.size-option.active {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
    color: white;
}

/* Product Actions */
.product-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 32px;
}

.product-secondary-actions {
    display: flex;
    gap: 12px;
}

.product-secondary-actions > * {
    flex: 1;
}

.btn-lg {
    padding: 16px 28px;
    font-size: 15px;
}

/* Shipping Info */
.shipping-info {
    background: var(--bg-cream);
    border-radius: var(--radius-md);
    padding: 20px;
}

.shipping-item {
    display: flex;
    align-items: center;
    gap: 12px;
}

.shipping-item + .shipping-item {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--border-color);
}

.shipping-item div {
    display: flex;
    flex-direction: column;
}

.shipping-item strong {
    font-size: 14px;
    font-weight: 600;
}

.shipping-item span {
    font-size: 13px;
    color: var(--text-gray);
}

/* Product Tabs */
.product-tabs {
    border-top: 1px solid var(--border-color);
    padding-top: 48px;
}

.tab-headers {
    display: flex;
    gap: 32px;
    margin-bottom: 32px;
    border-bottom: 1px solid var(--border-color);
}

.tab-header {
    padding: 12px 0;
    background: none;
    border: none;
    font-size: 15px;
    font-weight: 500;
    color: var(--text-gray);
    cursor: pointer;
    position: relative;
    transition: var(--transition);
}

.tab-header.active {
    color: var(--primary-dark);
}

.tab-header.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--primary-dark);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.tab-content p {
    color: var(--text-gray);
    margin-bottom: 16px;
    line-height: 1.8;
}

.feature-list {
    list-style: disc;
    padding-left: 20px;
}

.feature-list li {
    color: var(--text-gray);
    margin-bottom: 8px;
    line-height: 1.6;
}

/* Reviews */
.reviews-list {
    margin-bottom: 32px;
}

.review-item {
    padding: 20px 0;
    border-bottom: 1px solid var(--border-color);
}

.review-item:last-child {
    border-bottom: none;
}

.review-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
}

.review-stars {
    display: flex;
    gap: 2px;
}

.review-author {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-dark);
}

.review-date {
    font-size: 13px;
    color: var(--text-light);
    margin-left: auto;
}

.review-title {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 4px;
}

.review-body {
    font-size: 14px;
    color: var(--text-gray);
    line-height: 1.6;
}

.no-reviews,
.review-already-msg,
.review-login-prompt {
    font-size: 14px;
    color: var(--text-gray);
    padding: 16px 0;
}

.review-login-prompt a {
    color: var(--primary);
    text-decoration: underline;
}

.review-form-section {
    margin-top: 24px;
    padding: 24px;
    background: var(--bg-cream);
    border-radius: var(--radius-md);
}

.review-form-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 20px;
}

.review-form-section .form-field {
    margin-bottom: 16px;
}

.review-form-section .form-field label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 6px;
}

.review-form-section .form-field input,
.review-form-section .form-field select,
.review-form-section .form-field textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-family: inherit;
}

.review-form-section .form-field textarea {
    resize: vertical;
}

.review-form-section .form-field input:focus,
.review-form-section .form-field select:focus,
.review-form-section .form-field textarea:focus {
    outline: none;
    border-color: var(--primary-dark);
}

/* Responsive */
@media (max-width: 1024px) {
    .product-layout {
        gap: 40px;
    }
}

@media (max-width: 768px) {
    .product-layout {
        grid-template-columns: 1fr;
        gap: 32px;
    }
    
    .product-gallery {
        position: static;
    }
    
    .product-title {
        font-size: 24px;
    }
    
    .tab-headers {
        overflow-x: auto;
        gap: 24px;
    }
}

.product-section {
    padding: clamp(32px, 5vw, 64px) 0 88px;
}

.product-layout {
    grid-template-columns: minmax(0, 1.08fr) minmax(340px, 0.92fr);
    gap: clamp(36px, 5vw, 72px);
    margin-bottom: 72px;
}

.product-gallery {
    top: 88px;
}

.gallery-main {
    position: relative;
    /* aspect-ratio: 1 / 1; */
    margin-bottom: 10px;
    border: 1px solid var(--border-color);
    border-radius: 0;
    background: var(--bg-cream);
}

.gallery-main img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    mix-blend-mode: normal;
}

@media (min-width: 769px) {
    .product-layout {
        align-items: stretch;
    }

    .product-gallery {
        display: flex;
        min-height: 0;
        flex-direction: column;
    }

    .gallery-main {
        flex: 1 1 auto;
        min-height: 0;
        aspect-ratio: auto;
    }

    .gallery-thumbs {
        flex: 0 0 auto;
    }
}

.gallery-actions {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 2;
    display: flex;
    gap: 8px;
    align-items: center;
}

.gallery-wishlist-form {
    margin: 0;
}

.gallery-wishlist-btn,
.gallery-zoom {
    display: inline-flex;
    width: 30px;
    height: 30px;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 1px solid var(--border-color);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.88);
    color: var(--text-gray);
    line-height: 1;
    cursor: pointer;
    transition: var(--transition);
}

.gallery-wishlist-btn {
    text-decoration: none;
}

.gallery-wishlist-btn .ui-icon,
.gallery-wishlist-btn svg,
.product-wishlist-btn .ui-icon {
    width: 18px;
    height: 18px;
    object-fit: contain;
}

.gallery-wishlist-btn:hover,
.gallery-wishlist-btn:focus-visible,
.gallery-zoom:hover,
.gallery-zoom:focus-visible {
    border-color: var(--primary-dark);
    background: var(--bg-white);
    color: var(--primary-dark);
}

.gallery-wishlist-btn.active {
    border-color: var(--brand-green);
    background: #fff;
    color: var(--brand-navy);
}

.gallery-wishlist-btn.active svg {
    fill: currentColor;
}

.gallery-wishlist-form.is-loading {
    opacity: 0.65;
    pointer-events: none;
}

.gallery-zoom {
    position: absolute;
    right: 12px;
    bottom: 12px;
    z-index: 2;
    cursor: zoom-in;
}

.gallery-zoom img {
    display: block;
    width: 20px;
    height: 20px;
    object-fit: contain;
}

.gallery-lightbox {
    position: fixed;
    inset: 0;
    width: min(92vw, 1200px);
    height: fit-content;
    max-width: none;
    max-height: 92vh;
    margin: auto;
    padding: 0;
    border: 0;
    background: transparent;
    overflow: visible;
    z-index: 2000;
}

.gallery-lightbox::backdrop {
    background: rgba(24, 21, 17, 0.86);
}

.gallery-lightbox-content {
    position: relative;
    display: flex;
    width: 100%;
    box-sizing: border-box;
    align-items: center;
    justify-content: center;
    max-height: 92vh;
    padding: 24px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background: var(--bg-white);
}

.gallery-lightbox img {
    display: block;
    width: auto;
    max-width: 100%;
    max-height: calc(92vh - 48px);
    object-fit: contain;
}

.gallery-lightbox-close {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 1;
    display: inline-flex;
    width: 32px;
    height: 32px;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border-color);
    border-radius: 50%;
    background: var(--bg-white);
    color: var(--text-gray);
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    transition: var(--transition);
}

.gallery-lightbox-close:hover,
.gallery-lightbox-close:focus-visible {
    border-color: var(--primary-dark);
    background: var(--primary-dark);
    color: var(--bg-white);
}

.gallery-thumbs {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
}

.thumb {
    border: 1px solid transparent;
    border-radius: 0;
    background: var(--bg-cream);
}

.thumb.active {
    border: 2px solid var(--primary);
}

.product-details {
    max-width: 560px;
    padding-top: 4px;
}

.product-detail-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
}

.product-category-label {
    display: block;
    margin-bottom: 7px;
    color: var(--text-light);
    font-size: 11px;
    text-transform: uppercase;
}

.product-title {
    margin-bottom: 0;
    color: var(--text-dark);
    font-size: clamp(24px, 2.5vw, 34px);
    font-weight: 400;
    letter-spacing: 0.02em;
    line-height: 1.1;
}

.product-price-main {
    margin: 14px 0 2px;
    color: var(--primary-dark);
    font-size: 28px;
    font-weight: 700;
}

.price-note {
    margin-bottom: 18px;
}

.product-summary {
    max-width: 540px;
    margin: 0 0 22px;
    color: var(--text-gray);
    font-size: 14px;
    line-height: 1.7;
}

.product-rating.product-rating--compact {
    flex-shrink: 0;
    gap: 6px;
    margin: 2px 0 0;
    padding: 0;
    border: 0;
}

.product-rating--compact .stars svg {
    width: 14px;
    height: 14px;
}

.product-rating--compact .rating-text {
    font-size: 12px;
}

.product-option {
    margin-bottom: 20px;
}

.option-label {
    margin-bottom: 10px;
    font-size: 13px;
}

.color-options {
    gap: 9px;
}

.color-option {
    width: 24px;
    height: 24px;
    border-width: 1px;
}

.color-option.active::after {
    inset: 3px;
    border-width: 1px;
}

.size-options {
    gap: 7px;
}

.size-option {
    width: 38px;
    height: 34px;
    border-radius: 2px;
    background: var(--bg-white);
    color: var(--text-dark);
    font-size: 12px;
}

.size-option.active {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
    color: #fff;
}

.size-guide-link {
    font-size: 12px;
}

.product-actions {
    margin: 26px 0 22px;
    padding-top: 18px;
    border-top: 1px solid var(--border-color);
}

.purchase-row {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 10px;
    align-items: stretch;
}

.product-quantity {
    display: inline-flex;
    min-height: 48px;
    align-items: center;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    background: var(--bg-white);
}

.product-quantity-btn {
    width: 34px;
    height: 46px;
    border: 0;
    background: transparent;
    color: var(--text-gray);
    font-size: 18px;
}

.product-quantity-value {
    min-width: 28px;
    color: var(--text-dark);
    font-size: 14px;
    text-align: center;
}

.purchase-row .btn {
    min-height: 48px;
    padding: 12px 20px;
}

.product-secondary-actions {
    gap: 10px;
}

.product-secondary-actions .btn {
    min-height: 44px;
    padding: 10px 14px;
    font-size: 12px;
}

.product-wishlist-btn.active {
    border-color: var(--brand-green);
    background: #fff;
    color: var(--brand-navy);
}

.product-wishlist-btn.active svg {
    fill: currentColor;
}

.product-wishlist-form.is-loading {
    opacity: 0.65;
    pointer-events: none;
}

.shipping-info {
    padding: 18px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    background: var(--bg-cream);
}

.product-style-steps {
    margin-top: 8px;
    margin-bottom: clamp(40px, 4.8vw, 64px);
    padding: clamp(26px, 3.4vw, 40px);
    border: 1px solid rgba(47, 90, 69, 0.2);
    border-radius: var(--radius-md);
    background: rgba(225, 237, 229, 0.68);
    box-shadow: 0 12px 30px rgba(47, 90, 69, 0.1);
    backdrop-filter: blur(3px);
}

.product-style-steps-header {
    max-width: 700px;
    margin: 0 auto clamp(22px, 2.8vw, 30px);
    text-align: center;
}

.product-style-steps-kicker {
    display: block;
    margin-bottom: 8px;
    color: var(--brand-green, #197b4a);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.product-style-steps-header h2 {
    margin: 0;
    color: var(--brand-navy, #173450);
    font-size: clamp(21px, 2.7vw, 32px);
    font-weight: 800;
    letter-spacing: 0.025em;
    line-height: 1.1;
    text-transform: uppercase;
}

.product-style-steps-header p {
    margin: 10px 0 0;
    color: var(--text-gray);
    font-size: 13px;
    line-height: 1.5;
}

.product-style-steps-list {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.product-style-step {
    position: relative;
    display: flex;
    min-height: 96px;
    align-items: flex-start;
    gap: 13px;
    padding: 16px 16px 16px 18px;
    border: 1px solid rgba(47, 90, 69, 0.2);
    border-radius: var(--radius-sm);
    background: rgba(248, 251, 248, 0.72);
    box-shadow: 0 5px 14px rgba(47, 90, 69, 0.06);
}

.product-style-step::before {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    width: 3px;
    border-radius: var(--radius-sm) 0 0 var(--radius-sm);
    background: var(--brand-green, #197b4a);
    content: '';
}

.product-style-step-number {
    display: inline-grid;
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    place-items: center;
    border-radius: 50%;
    background: var(--brand-navy, #173450);
    color: #fff;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.04em;
}

.product-style-step div {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 7px;
}

.product-style-step strong {
    color: var(--brand-navy, #173450);
    font-size: 14px;
    line-height: 1.25;
}

.product-style-step span:not(.product-style-step-number) {
    color: var(--text-gray);
    font-size: 12px;
    line-height: 1.45;
}

@media (max-width: 768px) {
    .product-style-steps {
        padding: 24px 18px;
    }

    .product-style-steps-list {
        grid-template-columns: 1fr;
    }

    .product-style-step {
        min-height: 0;
    }
}

.product-tabs {
    padding-top: 36px;
}

.tab-headers {
    gap: 28px;
    margin-bottom: 24px;
}

.tab-header {
    padding: 12px 0;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.related-products {
    margin-top: 72px;
    padding-top: 34px;
    border-top: 1px solid var(--border-color);
}

.related-products-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 22px;
}

.related-products-header h2 {
    margin: 0;
    color: var(--text-dark);
    font-size: 22px;
}

.related-products-header a {
    color: var(--primary-dark);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
}

.related-products-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
}

.related-products .product-card {
    position: relative;
    min-width: 0;
}

.related-products .product-image {
    aspect-ratio: 1 / 1;
    margin-bottom: 10px;
    border-radius: var(--radius-sm);
    background: var(--bg-cream);
}

.related-products .product-image img {
    object-fit: contain;
    mix-blend-mode: multiply;
}

.related-products .product-info {
    padding: 0 3px;
}

.related-products .product-category {
    display: block;
    margin-bottom: 3px;
    color: var(--text-light);
    font-size: 9px;
    text-transform: capitalize;
}

.related-products .product-name {
    display: -webkit-box;
    min-height: 2.6em;
    margin-bottom: 4px;
    overflow: hidden;
    font-size: 12px;
    line-height: 1.3;
    -webkit-box-orient: vertical;
    line-clamp: 2;
    -webkit-line-clamp: 2;
}

.related-products .product-price {
    margin: 0;
    color: var(--primary-dark);
    font-size: 13px;
    font-weight: 700;
}

.related-products .wishlist-btn-form,
.related-products .wishlist-btn {
    opacity: 1;
    top: 8px;
    right: 8px;
    width: 30px;
    height: 30px;
}

.related-products .wishlist-btn-form button,
.related-products .wishlist-btn {
    width: 30px;
    height: 30px;
    background: rgba(255, 255, 255, 0.9);
}

.no-related-products {
    color: var(--text-gray);
}

@media (max-width: 1024px) {
    .product-layout {
        gap: 32px;
    }

    .related-products-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

@media (max-width: 768px) {
    .product-layout {
        grid-template-columns: minmax(0, 1fr);
        gap: 32px;
    }

    .product-gallery {
        position: static;
        width: 100%;
    }

    .product-details {
        width: 100%;
        max-width: none;
    }

    .gallery-main {
        width: 100%;
        /* aspect-ratio: 1 / 1; */
    }

    .gallery-main img {
        width: 100%;
        height: 100%;
    }

    .product-section {
        padding-top: 28px;
    }

    .product-detail-heading {
        gap: 12px;
    }

    .product-title {
        font-size: 24px;
    }

    .product-rating.product-rating--compact {
        align-items: flex-end;
        flex-direction: column;
    }

    .purchase-row {
        grid-template-columns: 1fr;
    }

    .product-quantity {
        justify-content: space-between;
    }

    .product-quantity-btn {
        flex: 1;
    }

    .related-products {
        margin-top: 48px;
    }

    .related-products-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 22px 10px;
    }

    .related-products-header h2 {
        font-size: 20px;
    }

    .breadcrumb-bar {
        padding: 10px 0;
    }

    .breadcrumb {
        gap: 6px;
        overflow: hidden;
        font-size: 11px;
        white-space: nowrap;
    }

    .breadcrumb .current {
        overflow: hidden;
        text-overflow: ellipsis;
    }
}

.product-gallery {
    display: grid;
    grid-template-columns: 72px minmax(0, 1fr);
    grid-template-rows: auto auto;
    align-items: start;
    column-gap: 12px;
    row-gap: 12px;
}

.gallery-main {
    grid-column: 2;
    grid-row: 1;
    width: 100%;
    aspect-ratio: 3 / 4;
    min-height: 0;
}

.gallery-thumbs {
    grid-column: 1;
    grid-row: 1;
    display: flex;
    min-width: 0;
    max-height: 100%;
    flex-direction: column;
    gap: 9px;
    overflow-y: auto;
}

.gallery-thumbs .thumb {
    width: 100%;
    flex: 0 0 auto;
    aspect-ratio: 1 / 1;
}

.product-gallery-caption {
    grid-column: 2;
    grid-row: 2;
    min-width: 0;
    padding: 0 2px;
}

.product-gallery-caption[hidden],
.product-gallery-caption p[hidden] {
    display: none;
}

.product-gallery-caption strong {
    display: block;
    overflow: hidden;
    color: var(--text-dark);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.02em;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.product-gallery-caption p {
    margin: 5px 0 0;
    color: var(--text-gray);
    font-size: 12px;
    line-height: 1.55;
}

.option-hint {
    color: var(--text-gray);
    font-size: 11px;
    font-weight: 400;
}

.product-option-label-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.product-option-label-row .option-label {
    margin-bottom: 10px;
}

.product-option-reset {
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--brand-green);
    cursor: pointer;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.product-option-reset:hover,
.product-option-reset:focus-visible {
    color: var(--brand-navy);
    outline: none;
    text-decoration: underline;
}

.product-option-reset:disabled {
    color: var(--text-light);
    cursor: default;
    opacity: 0.55;
    text-decoration: none;
}

.product-combination-options {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
}

.product-combination-option[hidden],
.product-trim-choice[hidden] {
    display: none;
}

.product-combination-option {
    position: relative;
    display: inline-grid;
    width: 32px;
    height: 32px;
    flex: 0 0 32px;
    place-items: center;
    padding: 2px;
    border: 1px solid #c8d1cd;
    border-radius: 50%;
    background: #fff;
    color: var(--text-dark);
    cursor: pointer;
    text-align: center;
}

.product-combination-option:hover,
.product-combination-option:focus-visible {
    border-color: var(--brand-green);
    box-shadow: 0 0 0 2px rgba(47, 90, 69, 0.2);
    outline: none;
}

.product-combination-option.active {
    border: 2px solid var(--brand-green);
    box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--brand-green);
}

.product-combination-swatch {
    display: block;
    width: 100%;
    height: 100%;
    border: 1px solid rgba(0, 0, 0, 0.16);
    border-radius: 50%;
    background: var(--combination-color);
}

.product-combination-name {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
}

.product-trim-option {
    padding: 10px 12px;
    border: 1px solid #dce6e0;
    border-radius: var(--radius-sm);
    background: rgba(235, 243, 238, 0.72);
}

.product-trim-accordion-toggle {
    display: flex;
    width: 100%;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 2px 0;
    border: 0;
    background: transparent;
    color: var(--text-dark);
    cursor: pointer;
    font: inherit;
    text-align: left;
}

.product-trim-accordion-toggle:focus-visible {
    outline: 2px solid var(--brand-green);
    outline-offset: 4px;
}

.product-trim-accordion-label {
    display: inline-flex;
    min-width: 0;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px;
    font-size: 13px;
    font-weight: 700;
}

.product-trim-accordion-label small {
    color: var(--text-gray);
    font-size: 11px;
    font-weight: 400;
}

.product-trim-accordion-current {
    margin-left: auto;
    overflow: hidden;
    color: var(--text-gray);
    font-size: 11px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.product-trim-accordion-icon {
    display: inline-grid;
    width: 22px;
    height: 22px;
    flex: 0 0 22px;
    place-items: center;
    border: 1px solid var(--brand-green);
    border-radius: 50%;
    color: var(--brand-green);
    font-size: 16px;
    line-height: 1;
}

.product-trim-options[hidden] {
    display: none;
}

.product-trim-option[hidden],
.product-availability-form[hidden],
.product-availability-message[hidden] {
    display: none;
}

.product-trim-option .option-label {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-bottom: 8px;
}

.product-trim-options {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.product-trim-choice {
    display: inline-flex;
    min-height: 34px;
    align-items: center;
    gap: 7px;
    padding: 5px 9px;
    border: 1px solid transparent;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.72);
    color: var(--text-dark);
    cursor: pointer;
    font: inherit;
    font-size: 11px;
}

.product-trim-choice:hover,
.product-trim-choice:focus-visible,
.product-trim-choice.active {
    border-color: var(--brand-green);
    background: #fff;
    outline: none;
}

.product-trim-info {
    display: inline-grid;
    width: 16px;
    height: 16px;
    place-items: center;
    border: 1px solid var(--primary-dark);
    border-radius: 50%;
    color: var(--primary-dark);
    cursor: help;
    font-size: 10px;
    font-weight: 800;
}

.product-trim-value {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--text-dark);
    font-size: 12px;
}

.product-trim-swatch {
    display: block;
    width: 22px;
    height: 22px;
    border: 1px solid rgba(0, 0, 0, 0.16);
    border-radius: 50%;
    background: var(--trim-color);
}

.product-variation-switch {
    display: flex;
    width: 100%;
    min-height: 38px;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 2px 0 14px;
    border: 1px solid rgba(47, 90, 69, 0.26);
    color: var(--brand-green);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-decoration: none;
    text-transform: uppercase;
}

.product-variation-switch:hover,
.product-variation-switch:focus-visible {
    border-color: var(--brand-green);
    background: rgba(47, 90, 69, 0.08);
    color: var(--brand-navy);
    outline: none;
}

.product-try-on {
    display: flex;
    width: 100%;
    min-height: 42px;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 2px 0 20px;
}

.product-try-on .ui-icon {
    width: 18px;
    height: 18px;
}

.product-secondary-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.product-secondary-actions > * {
    min-width: 0;
}

.product-secondary-actions .product-wishlist-form,
.product-secondary-actions .product-availability {
    display: flex;
}

.product-secondary-actions .btn {
    width: 100%;
}

.product-availability-form {
    margin-top: 10px;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    background: var(--bg-white);
}

.product-availability-form > label {
    display: block;
    margin-bottom: 7px;
    color: var(--text-gray);
    font-size: 11px;
    font-weight: 700;
}

.product-availability-input-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
}

.product-availability-input-row input {
    min-width: 0;
    padding: 10px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font: inherit;
    font-size: 13px;
}

.product-availability-input-row .btn {
    min-height: 40px;
    padding: 8px 14px;
}

.product-availability-message {
    margin: 8px 0 0;
    font-size: 11px;
    line-height: 1.4;
}

.product-availability-message.is-available {
    color: var(--brand-green);
}

.product-availability-message.is-unavailable {
    color: #9b3a31;
}

.shipping-info {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0;
}

.shipping-item {
    min-width: 0;
    flex-direction: column;
    justify-content: flex-start;
    gap: 8px;
    text-align: center;
}

.shipping-item + .shipping-item {
    margin-top: 0;
    padding-top: 0;
    padding-left: 10px;
    border-top: 0;
    border-left: 1px solid var(--border-color);
}

.shipping-item .ui-icon {
    width: 22px;
    height: 22px;
}

.shipping-item div {
    align-items: center;
}

.shipping-item strong {
    font-size: 11px;
}

.shipping-item span {
    font-size: 10px;
    line-height: 1.35;
}

@media (max-width: 768px) {
    .product-gallery {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
        grid-template-rows: auto auto auto;
        gap: 10px;
    }

    .gallery-main {
        grid-column: 1;
        grid-row: 1;
        aspect-ratio: 3 / 4;
    }

    .gallery-thumbs {
        grid-column: 1;
        grid-row: 2;
        display: grid;
        grid-template-columns: repeat(5, minmax(0, 1fr));
        max-height: none;
        overflow-x: auto;
        overflow-y: hidden;
    }

    .gallery-thumbs .thumb {
        width: auto;
    }

    .product-gallery-caption {
        grid-column: 1;
        grid-row: 3;
    }

    .shipping-info {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .shipping-item + .shipping-item {
        padding-top: 12px;
        padding-left: 0;
        border-top: 1px solid var(--border-color);
        border-left: 0;
    }
}

/* ============================================
   Immersive product flow
   ============================================ */

@view-transition {
    navigation: auto;
}

/* Keep the gallery in view while the steps scroll. A stretched grid item is as tall as the whole row,
   so sticky would have nowhere to travel; align it to the top and fit it to the viewport. */
@media (min-width: 769px) {
    .product-layout {
        align-items: start;
    }

    .product-gallery {
        position: sticky;
        top: 88px;
        align-self: start;
    }

    .gallery-main {
        max-height: calc(100vh - 88px - 56px);
    }
}

.product-gallery {
    view-transition-name: product-gallery;
}

.product-details {
    view-transition-name: product-details;
}

::view-transition-old(product-gallery),
::view-transition-new(product-gallery) {
    animation-duration: 0.35s;
}

/* Live progress strip */
.product-flow-steps {
    margin-bottom: clamp(28px, 3.4vw, 44px);
    padding: clamp(18px, 2.4vw, 26px);
}

.product-flow-steps .product-style-steps-header {
    margin-bottom: 16px;
}

.product-flow-steps .product-style-step {
    min-height: 0;
    padding: 0;
    transition: border-color 0.25s ease, background 0.25s ease;
}

.product-style-step-link {
    display: flex;
    width: 100%;
    align-items: flex-start;
    gap: 13px;
    padding: 14px 16px 14px 18px;
    color: inherit;
    text-decoration: none;
}

.product-style-step-link:focus-visible {
    outline: 2px solid var(--brand-green);
    outline-offset: 2px;
}

.product-style-step.is-done {
    border-color: rgba(105, 181, 20, 0.55);
    background: #fff;
}

.product-style-step.is-done .product-style-step-number {
    background: var(--brand-green);
    font-size: 0;
}

.product-style-step.is-done .product-style-step-number::after {
    content: '✓';
    font-size: 15px;
}

/* Live viewers */
.product-live-viewers {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 14px;
    color: var(--text-gray);
    font-size: 12px;
}

.product-live-dot,
.trending-live-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #e5484d;
    box-shadow: 0 0 0 0 rgba(229, 72, 77, 0.5);
    animation: flow-live-pulse 1.8s infinite;
}

@keyframes flow-live-pulse {
    0% { box-shadow: 0 0 0 0 rgba(229, 72, 77, 0.45); }
    70% { box-shadow: 0 0 0 8px rgba(229, 72, 77, 0); }
    100% { box-shadow: 0 0 0 0 rgba(229, 72, 77, 0); }
}

/* Style switcher */
.product-style-switcher {
    display: grid;
    gap: 12px;
    margin: 4px 0 18px;
    padding: 16px;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    background: var(--bg-cream);
    scroll-margin-top: calc(var(--site-header-height, 122px) + 16px);
}

.style-switcher-row {
    display: grid;
    grid-template-columns: 74px minmax(0, 1fr);
    align-items: center;
    gap: 10px;
}

.style-switcher-label {
    color: var(--text-gray);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.style-switcher-options {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.style-switcher-option {
    display: inline-flex;
    min-height: 34px;
    align-items: center;
    padding: 6px 14px;
    border: 1px solid var(--border-color);
    border-radius: 999px;
    background: #fff;
    color: var(--text-dark);
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
    transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

a.style-switcher-option:hover,
a.style-switcher-option:focus-visible {
    border-color: var(--primary-dark);
    color: var(--primary-dark);
    transform: translateY(-1px);
    outline: none;
}

.style-switcher-option.is-active {
    border-color: var(--primary-dark);
    background: var(--primary-dark);
    color: #fff;
}

.style-switcher-option.is-approx {
    border-style: dashed;
}

.style-switcher-hint {
    margin: 0;
    color: var(--text-light);
    font-size: 11px;
}

/* Try on + Find my size */
.product-fit-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin: 4px 0 18px;
}

.product-fit-action,
.product-try-on.product-fit-action {
    display: flex;
    width: 100%;
    min-height: 58px;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
    margin: 0;
    padding: 10px 14px;
    border: 1px solid rgba(47, 90, 69, 0.3);
    border-radius: var(--radius-md);
    background: #fff;
    color: var(--text-dark);
    font: inherit;
    text-align: left;
    text-decoration: none;
    cursor: pointer;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.product-fit-action:hover,
.product-fit-action:focus-visible {
    border-color: var(--primary-dark);
    box-shadow: var(--shadow-sm);
    transform: translateY(-1px);
    outline: none;
}

.product-fit-action strong {
    display: block;
    font-size: 12px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.product-fit-action small {
    display: block;
    color: var(--text-gray);
    font-size: 11px;
    line-height: 1.3;
}

.product-fit-action-icon {
    font-size: 18px;
}

.product-size-finder-trigger {
    background: rgba(105, 181, 20, 0.08);
}

/* Size section */
.product-size-section {
    scroll-margin-top: calc(var(--site-header-height, 122px) + 16px);
}

.product-size-section .option-header {
    flex-wrap: wrap;
    gap: 8px;
}

.size-header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.size-finder-link,
.product-size-section .size-guide-link {
    padding: 0;
    border: 0;
    background: none;
    font: inherit;
    font-size: 12px;
    cursor: pointer;
}

.size-finder-link {
    padding: 5px 10px;
    border: 1px solid rgba(105, 181, 20, 0.6);
    border-radius: 999px;
    background: rgba(105, 181, 20, 0.1);
    color: var(--primary-dark);
    font-weight: 700;
}

.size-finder-link:hover {
    background: rgba(105, 181, 20, 0.18);
}

.size-finder-hint {
    margin: -4px 0 10px;
    color: var(--text-light);
    font-size: 12px;
}

.size-recommendation {
    margin: 0 0 12px;
    padding: 14px 16px;
    border: 1px solid rgba(105, 181, 20, 0.5);
    border-radius: var(--radius-md);
    background: linear-gradient(135deg, rgba(105, 181, 20, 0.1), rgba(255, 255, 255, 0.9));
}

.size-recommendation.is-fresh {
    animation: flow-pop 0.45s ease;
}

@keyframes flow-pop {
    0% { transform: scale(0.98); opacity: 0.4; }
    100% { transform: scale(1); opacity: 1; }
}

.size-recommendation-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.size-recommendation-title {
    color: var(--text-dark);
    font-size: 14px;
}

.size-recommendation-title strong {
    color: var(--primary-dark);
    font-size: 18px;
}

.size-recommendation-change {
    border: 0;
    background: none;
    color: var(--primary-dark);
    font-size: 12px;
    text-decoration: underline;
    cursor: pointer;
}

.size-recommendation-sub {
    margin: 2px 0 10px;
    color: var(--text-gray);
    font-size: 12px;
}

.size-fit-chips {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
    margin: 0 0 8px;
}

.size-fit-chips div {
    padding: 6px 8px;
    border-radius: var(--radius-sm);
    background: #fff;
}

.size-fit-chips dt {
    color: var(--text-light);
    font-size: 10px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.size-fit-chips dd {
    margin: 0;
    color: var(--text-dark);
    font-size: 12px;
    font-weight: 700;
}

.size-recommendation-why summary {
    color: var(--primary-dark);
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
}

.size-recommendation-why p {
    margin: 6px 0 0;
    color: var(--text-gray);
    font-size: 12px;
    line-height: 1.5;
}

.size-option {
    position: relative;
}

.size-option-check {
    position: absolute;
    top: -7px;
    right: -7px;
    display: none;
    width: 18px;
    height: 18px;
    place-items: center;
    border-radius: 50%;
    background: var(--brand-green);
    color: #fff;
    font-size: 10px;
    line-height: 18px;
}

.size-option.is-recommended .size-option-check {
    display: grid;
}

.size-option.is-recommended:not(.active) {
    border-color: var(--brand-green);
}

.product-section .product-variation-switch {
    width: auto;
    min-height: 0;
    justify-content: flex-start;
    margin: 0 0 14px;
    border: 0;
    background: none;
    font-size: 11px;
}

/* Add to cart feedback + ensemble pill */
.btn.is-loading {
    opacity: 0.7;
    pointer-events: none;
}

.product-cart-feedback {
    margin: 8px 0 0;
    color: #b42318;
    font-size: 12px;
}

.product-ensemble-pill {
    display: flex;
    width: 100%;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 10px;
    padding: 10px 14px;
    border: 1px dashed var(--primary);
    border-radius: 999px;
    background: var(--bg-cream);
    color: var(--primary-dark);
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
}

.product-ensemble-pill[hidden] {
    display: none;
}

.product-ensemble-pill-swatches {
    display: inline-flex;
}

.product-ensemble-pill-swatches span {
    width: 16px;
    height: 16px;
    margin-left: -4px;
    border: 2px solid #fff;
    border-radius: 50%;
    background: var(--swatch);
}

.cart-count.is-bumped {
    animation: flow-pop 0.4s ease;
}

/* Sheets: side panel on desktop, bottom sheet on mobile */
body.flow-sheet-open {
    overflow: hidden;
}

dialog.flow-sheet {
    position: fixed;
    inset: 0 0 0 auto;
    width: min(460px, 100vw);
    max-width: 100vw;
    height: 100dvh;
    max-height: 100dvh;
    margin: 0;
    padding: 0;
    border: 0;
    background: #fff;
    color: var(--text-dark);
    box-shadow: -18px 0 50px rgba(17, 33, 25, 0.2);
}

dialog.flow-sheet[open] {
    animation: flow-sheet-in-side 0.3s ease;
}

dialog.flow-sheet::backdrop {
    background: rgba(10, 20, 15, 0.45);
}

@keyframes flow-sheet-in-side {
    from { transform: translateX(40px); opacity: 0; }
    to { transform: none; opacity: 1; }
}

@keyframes flow-sheet-in-up {
    from { transform: translateY(40px); opacity: 0; }
    to { transform: none; opacity: 1; }
}

.flow-sheet-inner {
    display: flex;
    height: 100%;
    flex-direction: column;
}

.flow-sheet-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding: 22px 22px 14px;
    border-bottom: 1px solid var(--border-light);
}

.flow-sheet-head h2 {
    margin: 4px 0 4px;
    font-size: 22px;
    letter-spacing: 0.02em;
}

.flow-sheet-head p {
    margin: 0;
    color: var(--text-gray);
    font-size: 12px;
}

.flow-sheet-kicker {
    color: var(--primary);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.flow-sheet-close {
    border: 0;
    background: none;
    color: var(--text-dark);
    font-size: 30px;
    line-height: 1;
    cursor: pointer;
}

.flow-sheet-body {
    flex: 1;
    overflow-y: auto;
    padding: 18px 22px;
}

.flow-sheet-foot {
    padding: 14px 22px calc(14px + env(safe-area-inset-bottom));
    border-top: 1px solid var(--border-light);
    background: #fff;
}

.flow-sheet-note {
    margin: 8px 0 0;
    color: var(--text-light);
    font-size: 11px;
    text-align: center;
}

/* Size finder questions */
.size-finder-question {
    margin: 0 0 20px;
    padding: 0;
    border: 0;
}

.size-finder-question legend {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    font-size: 14px;
    font-weight: 700;
}

.size-finder-question legend span {
    display: inline-grid;
    width: 22px;
    height: 22px;
    place-items: center;
    border-radius: 50%;
    background: var(--primary-dark);
    color: #fff;
    font-size: 11px;
}

.flow-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.flow-chip input,
.flow-segmented input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.flow-chip span {
    display: inline-flex;
    min-height: 38px;
    align-items: center;
    padding: 8px 14px;
    border: 1px solid var(--border-color);
    border-radius: 999px;
    background: #fff;
    font-size: 13px;
    cursor: pointer;
    transition: var(--transition);
}

.flow-chip input:checked + span,
.flow-segmented input:checked + span {
    border-color: var(--primary-dark);
    background: var(--primary-dark);
    color: #fff;
}

.flow-chip input:focus-visible + span,
.flow-segmented input:focus-visible + span {
    outline: 2px solid var(--brand-green);
    outline-offset: 2px;
}

.size-finder-inline {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
    color: var(--text-gray);
    font-size: 12px;
}

.size-finder-inline input,
.size-finder-weight input {
    width: 96px;
    padding: 8px 10px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 14px;
}

.size-finder-weight {
    display: flex;
    align-items: center;
    gap: 10px;
}

.flow-segmented {
    display: inline-flex;
    padding: 3px;
    border: 1px solid var(--border-color);
    border-radius: 999px;
    background: var(--bg-cream);
}

.flow-segmented label {
    position: relative;
}

.flow-segmented span {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
}

.size-finder-error {
    margin: 0;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    background: #fdecea;
    color: #b42318;
    font-size: 12px;
}

/* Size chart */
.size-chart-toggle {
    margin-bottom: 14px;
}

.size-chart-scroll {
    overflow-x: auto;
}

.size-chart .size-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.size-chart .size-table th,
.size-chart .size-table td {
    padding: 10px 8px;
    border-bottom: 1px solid var(--border-light);
    text-align: center;
}

.size-chart .size-table thead th {
    color: var(--text-gray);
    font-size: 11px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.size-chart .size-table tbody th {
    font-weight: 700;
    text-align: left;
}

.size-chart .size-table tr.is-recommended {
    background: rgba(105, 181, 20, 0.12);
}

.size-chart-note {
    margin: 10px 0 0;
    color: var(--text-light);
    font-size: 11px;
}

.size-guide-sheet .size-guide-fit {
    margin: 0 0 10px;
    color: var(--text-gray);
    font-size: 12px;
}

.size-guide-measure {
    display: grid;
    grid-template-columns: 96px minmax(0, 1fr);
    align-items: center;
    gap: 14px;
    margin-top: 20px;
    color: var(--primary);
}

.size-guide-measure ul {
    margin: 0;
    padding: 0;
    color: var(--text-gray);
    font-size: 12px;
    line-height: 1.5;
    list-style: none;
}

.size-guide-measure li + li {
    margin-top: 6px;
}

/* Ensemble drawer */
.ensemble-lines {
    display: grid;
    gap: 12px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.ensemble-line {
    display: grid;
    grid-template-columns: 64px minmax(0, 1fr) auto 32px;
    align-items: center;
    gap: 12px;
    animation: flow-pop 0.3s ease;
}

.ensemble-line.is-removing {
    opacity: 0.5;
}

.ensemble-line-remove {
    width: 32px;
    height: 32px;
    border: 0;
    border-radius: 50%;
    background: var(--bg-light);
    color: var(--text-dark);
    font-size: 16px;
    line-height: 1;
    cursor: pointer;
}

.ensemble-line-remove:hover {
    background: var(--border-light);
}

.ensemble-line-remove:focus-visible {
    outline: 2px solid var(--primary-dark);
    outline-offset: 2px;
}

.ensemble-line-remove:disabled {
    cursor: progress;
}

.ensemble-line-image {
    display: block;
    width: 64px;
    height: 76px;
    overflow: hidden;
    border-radius: var(--radius-sm);
    background: var(--bg-cream);
}

.ensemble-line-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ensemble-line-info a {
    display: block;
    color: var(--text-dark);
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
}

.ensemble-line-info span {
    color: var(--text-gray);
    font-size: 12px;
}

.ensemble-empty {
    color: var(--text-gray);
    font-size: 13px;
}

.ensemble-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.ensemble-actions [hidden] {
    display: none;
}

.ensemble-cart-link {
    grid-column: 1 / -1;
    color: var(--text-gray);
    font-size: 12px;
    text-align: center;
}

@media (max-width: 768px) {
    dialog.flow-sheet {
        inset: auto 0 0 0;
        width: 100vw;
        height: auto;
        max-height: 88dvh;
        border-radius: 18px 18px 0 0;
        box-shadow: 0 -16px 50px rgba(17, 33, 25, 0.22);
    }

    dialog.flow-sheet[open] {
        animation: flow-sheet-in-up 0.3s ease;
    }

    .flow-sheet-inner {
        max-height: 88dvh;
    }

    .flow-sheet-head {
        padding: 18px 18px 12px;
    }

    .flow-sheet-body {
        padding: 16px 18px;
    }

    .style-switcher-row {
        grid-template-columns: 1fr;
        gap: 6px;
    }

    .product-fit-actions {
        grid-template-columns: 1fr 1fr;
    }

    .product-fit-action {
        min-height: 54px;
        padding: 8px 10px;
    }

    .product-fit-action small {
        display: none;
    }

    .product-flow-steps .product-style-steps-list {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 6px;
    }

    .product-flow-steps .product-style-step-link {
        flex-direction: column;
        gap: 6px;
        padding: 10px;
    }

    .product-flow-steps .product-style-step span[data-flow-step-status],
    .product-flow-steps .product-style-steps-header h2 {
        display: none;
    }

    .product-flow-steps .product-style-step strong {
        font-size: 11px;
    }
}

@media (prefers-reduced-motion: reduce) {
    @view-transition {
        navigation: none;
    }

    .size-recommendation.is-fresh,
    dialog.flow-sheet[open],
    .ensemble-line,
    .product-live-dot,
    .trending-live-dot {
        animation: none;
    }
}
