/* Product page styles */
:root {
    --product-gap: clamp(1rem, 2vw, 1.5rem);
    --product-radius: 16px;
    --touch-target: 48px;
}

.product-ecommerce-page {
    padding: clamp(5.5rem, 10vw, 7rem) 1rem 2rem;
}

.product-page-container {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--product-gap);
}

.product-gallery-column {
    position: relative;
    min-width: 0;
}

.product-badge-sale {
    position: absolute;
    top: 1rem;
    left: 1rem;
    z-index: 20;
    padding: 0.4rem 0.75rem;
    border-radius: 8px;
    background: var(--or-rose, #d4a5a5);
    color: var(--fond-sombre, #0a0a0f);
    font-weight: 700;
}

.product-gallery-main {
    width: 100%;
    height: clamp(280px, 68vw, 640px);
    border-radius: var(--product-radius);
    overflow: hidden;
    background: rgba(255, 255, 255, 0.04);
    margin-bottom: 0.75rem;
}

.product-gallery-main .swiper-wrapper,
.product-gallery-main .swiper-slide {
    height: 100%;
}

.product-gallery-main .swiper-slide {
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-main-image {
    display: block;
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    object-position: center;
    background: rgba(255, 255, 255, 0.01);
    cursor: zoom-in;
}

.image-zoom-icon {
    position: absolute;
    right: 1rem;
    bottom: 1rem;
    z-index: 6;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.55);
    color: #fff;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
}

.product-gallery-main:hover .image-zoom-icon {
    opacity: 1;
}

.product-gallery-thumbs {
    width: 100%;
    height: 82px;
}

.product-gallery-thumbs .swiper-slide {
    width: 82px;
    height: 82px;
    border-radius: 10px;
    overflow: hidden;
    border: 2px solid transparent;
    opacity: 0.55;
    transition: opacity 0.2s ease, border-color 0.2s ease;
}

.product-gallery-thumbs .swiper-slide-thumb-active {
    opacity: 1;
    border-color: var(--or-rose, #d4a5a5);
}

.product-gallery-thumbs img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: rgba(255, 255, 255, 0.03);
}

.product-placeholder-image {
    width: 100%;
    height: clamp(280px, 68vw, 640px);
    border-radius: var(--product-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 1rem;
    background: linear-gradient(135deg, var(--violet-profond, #6b5b95), var(--bleu-glacier, #a8c5da));
}

.product-info-column {
    min-width: 0;
}

.product-title {
    font-size: clamp(1.8rem, 4vw, 3rem);
    margin-bottom: 0.8rem;
}

.product-subtitle {
    color: var(--bleu-acier, #4a5f7f);
    margin-bottom: 1.2rem;
}

.product-price-block {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.2rem;
}

.product-price-current {
    font-size: 2rem;
    font-weight: 700;
    color: var(--or-rose, #d4a5a5);
}

.product-price-regular {
    opacity: 0.7;
}

.product-option-group {
    margin: 1.25rem 0;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.product-option-label {
    display: block;
    margin-bottom: 0.75rem;
    font-weight: 600;
}

.selected-color-name,
.selected-size-name {
    color: var(--bleu-glacier, #a8c5da);
}

.product-colors-selector,
.product-sizes-selector {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
}

.color-option {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 3px solid transparent;
    position: relative;
    cursor: pointer;
}

.color-option.selected {
    border-color: var(--bleu-glacier, #a8c5da);
}

.color-check {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    opacity: 0;
    color: #fff;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

.color-option.selected .color-check {
    opacity: 1;
}

.size-option {
    min-width: 56px;
    min-height: 44px;
    padding: 0.65rem 0.95rem;
    border: 2px solid rgba(255, 255, 255, 0.25);
    border-radius: 8px;
    background: transparent;
    color: var(--blanc-opalescent, #e8f4f8);
    font-weight: 600;
    cursor: pointer;
}

.size-option.selected {
    border-color: var(--bleu-glacier, #a8c5da);
    background: var(--bleu-glacier, #a8c5da);
    color: var(--fond-sombre, #0a0a0f);
}

.size-option.out-of-stock,
.size-option:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

.product-stock-status {
    margin: 1.25rem 0;
    padding: 0.9rem;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.03);
}

.stock-in-stock { color: #6ecb5a; font-weight: 600; }
.stock-low-stock { color: #f5b041; font-weight: 600; }
.stock-out-of-stock { color: #ff6b6b; font-weight: 600; }

.product-actions {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    margin: 1.25rem 0;
}

.btn-add-to-cart,
.btn-add-to-wishlist {
    width: 100%;
    min-height: var(--touch-target);
    border-radius: 12px;
    font-weight: 700;
    border: 0;
    padding: 0.95rem 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    text-align: center;
    cursor: pointer;
}

.btn-add-to-cart {
    background: var(--bleu-glacier, #a8c5da);
    color: var(--fond-sombre, #0a0a0f);
}

.btn-add-to-cart.disabled,
.btn-add-to-cart:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.btn-add-to-wishlist {
    background: transparent;
    color: var(--blanc-opalescent, #e8f4f8);
    border: 2px solid rgba(255, 255, 255, 0.25);
}

.product-info-accordion {
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.product-info-accordion summary {
    list-style: none;
    cursor: pointer;
    padding: 1rem 0;
    font-weight: 600;
}

.product-info-accordion summary::-webkit-details-marker {
    display: none;
}

.accordion-content {
    padding-bottom: 1rem;
    color: var(--bleu-acier, #4a5f7f);
}

.accordion-content img,
.product-description img,
.similar-product-card img {
    max-width: 100%;
    height: auto;
}

.similar-products-section {
    margin-top: 3.5rem;
}

.similar-products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
}

.similar-product-card {
    border-radius: 12px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.03);
}

.similar-product-card img {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: contain;
}

.similar-product-card h3,
.similar-product-card .similar-price {
    padding: 0.7rem 0.85rem;
}

.product-lightbox {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(0, 0, 0, 0.94);
    align-items: center;
    justify-content: center;
    padding: clamp(1rem, 3vw, 2rem);
}

.product-lightbox.active {
    display: flex;
}

.lightbox-image {
    display: block;
    max-width: min(92vw, 1400px);
    max-height: 90vh;
    width: auto;
    height: auto;
    object-fit: contain;
}

.lightbox-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.18);
    color: #fff;
    font-size: 1.7rem;
    line-height: 1;
    cursor: pointer;
}

@media (min-width: 1024px) {
    .product-page-container {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
        gap: 2rem;
    }

    .product-gallery-column {
        position: sticky;
        top: 6rem;
        align-self: start;
    }
}

@media (max-width: 768px) {
    .product-gallery-main {
        height: 280px;
    }

    .product-gallery-thumbs {
        height: 68px;
    }

    .product-gallery-thumbs .swiper-slide {
        width: 68px;
        height: 68px;
    }
}
