/**
 * Custom WooCommerce Single Product Layout
 */

.custom-single-product {
    width: 100%;
}

.custom-single-product *,
.custom-single-product *::before,
.custom-single-product *::after {
    box-sizing: border-box;
}

/* Layout desktop */
.csp-layout {
    display: grid;
    grid-template-columns: minmax(0, 58%) minmax(360px, 42%);
    gap: clamp(32px, 5vw, 80px);
    align-items: start;
    width: 100%;
    max-width: 1600px;
    margin: 0 auto;
    padding: 0px 24px;
}

/* Colonne gauche : images verticales */
.csp-gallery--desktop {
    display: flex;
    flex-direction: column;
    gap: clamp(24px, 4vw, 56px);
}

.csp-gallery__item {
    width: 100%;
    min-height: calc(100vh - 120px);
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f7f7f7;
    overflow: hidden;
}

.csp-gallery__image {
    display: block;
    width: 100%;
    height: calc(100vh - 140px);
    object-fit: contain;
}

/* Colonne droite sticky */
.csp-summary {
    position: sticky;
    top: 96px;
    align-self: start;
}

.csp-summary__inner {
    max-width: 520px;
    margin-left: auto;
    margin-right: auto;
}

/* Nettoyage WooCommerce dans notre layout */
.csp-summary .product_title {
    margin-top: 0;
    margin-bottom: 16px;
    font-size: clamp(28px, 3vw, 48px);
    line-height: 1.05;
}

.csp-summary .price {
    margin-bottom: 24px;
    font-size: 22px;
}

.csp-summary .woocommerce-product-details__short-description {
    margin-bottom: 28px;
    font-size: 16px;
    line-height: 1.7;
}

.csp-summary form.cart {
    margin-top: 28px;
    margin-bottom: 28px;
}

.csp-summary .quantity {
    margin-right: 12px;
}

.csp-summary button.single_add_to_cart_button,
.csp-summary .single_add_to_cart_button {
    min-height: 52px;
    padding-left: 28px;
    padding-right: 28px;
    border-radius: 0;
}

.csp-summary .product_meta {
    margin-top: 28px;
    font-size: 14px;
    opacity: 0.75;
}

/* Contenu après produit */
.csp-after-product {
    font-family: 'SweetSansPro-Regular', sans-serif;
    max-width: 1400px;
    margin: 0 auto;
    padding: 78px clamp(24px, 4vw, 64px) clamp(48px, 6vw, 96px);
}

.csp-after-product h2 {
  font-family: 'SweetSansPro-Regular', sans-serif !important;
}

/* Galerie mobile cachée sur desktop */
.csp-mobile-gallery {
    display: none;
}

/* Tablette */
@media (max-width: 1024px) {
    .csp-layout {
        grid-template-columns: minmax(0, 52%) minmax(320px, 48%);
        gap: 32px;
        padding: 32px 24px;
    }

    .csp-summary {
        top: 80px;
    }

    .csp-gallery__item {
        min-height: calc(100vh - 160px);
    }

    .csp-gallery__image {
        height: calc(100vh - 180px);
    }
}

/* Mobile */
@media (max-width: 767px) {
    .csp-layout {
        display: block;
        padding: 0;
    }

    .csp-gallery--desktop {
        display: none;
    }

    .csp-mobile-gallery {
        display: block;
        width: 100%;
        margin-bottom: 28px;
        background: #f7f7f7;
    }

    .csp-mobile-gallery__viewport {
        position: relative;
        width: 100%;
        overflow: hidden;
    }

    .csp-mobile-gallery__track {
        display: flex;
        transition: transform 280ms ease;
        will-change: transform;
    }

    .csp-mobile-gallery__slide {
        flex: 0 0 100%;
        width: 100%;
        height: min(78vh, 680px);
        min-height: 420px;
        margin: 0;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 20px;
    }

    .csp-mobile-gallery__image {
        display: block;
        width: 100%;
        height: 100%;
        object-fit: contain;
    }

    .csp-mobile-gallery__button {
        position: absolute;
        top: 50%;
        z-index: 3;
        width: 44px;
        height: 44px;
        transform: translateY(-50%);
        border: none;
        border-radius: 999px;
        background: rgba(255, 255, 255, 0.88);
        color: #111;
        font-size: 34px;
        line-height: 1;
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    }

    .csp-mobile-gallery__button--prev {
        left: 14px;
    }

    .csp-mobile-gallery__button--next {
        right: 14px;
    }

    .csp-mobile-gallery__counter {
        position: absolute;
        right: 14px;
        bottom: 14px;
        z-index: 3;
        padding: 6px 10px;
        border-radius: 999px;
        background: rgba(255, 255, 255, 0.9);
        color: #111;
        font-size: 13px;
        line-height: 1;
    }

    .csp-summary {
        position: static;
        padding: 0 20px 36px;
    }

    .csp-summary__inner {
        max-width: none;
    }

    .csp-summary .product_title {
        font-size: 30px;
    }

    .csp-summary .price {
        font-size: 20px;
    }

    .csp-summary form.cart {
        display: flex;
        flex-wrap: wrap;
        gap: 12px;
    }

    .csp-summary .quantity {
        margin-right: 0;
    }

    .csp-summary button.single_add_to_cart_button,
    .csp-summary .single_add_to_cart_button {
        width: 100%;
    }

    .csp-after-product {
        padding: 0 20px 48px;
    }
}

/* Très petits écrans */
@media (max-width: 420px) {
    .csp-mobile-gallery__slide {
        height: 70vh;
        min-height: 360px;
        padding: 16px;
    }

    .csp-mobile-gallery__button {
        width: 40px;
        height: 40px;
        font-size: 30px;
    }
}

/* Cache le breadcrumb WooCommerce */
.woocommerce-breadcrumb {
    display: none !important;
}

/* Wrapper infos produit */
.csp-summary__inner {
    width: 100%;
    max-width: 520px;
}

/* Ligne titre + prix */
.csp-product-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
    width: 100%;
    margin-bottom: 18px;
}

/* Titre */
.csp-product-title {
    margin: 0;
    font-size: 14px;
    line-height: 1.3;
    font-weight: 400;
    text-transform: none;
}

/* Prix */
.csp-product-price {
    margin: 0;
    font-size: 14px;
    line-height: 1.3;
    font-weight: 400;
    text-align: right;
    white-space: nowrap;
}

.csp-product-price .price,
.csp-product-price span,
.csp-product-price bdi {
    font-size: 14px;
    line-height: 1.3;
}

/* Description */
.csp-product-description {
    margin-bottom: 24px;
    font-size: 12px;
    line-height: 1.6;
}

.csp-product-description,
.csp-product-description p,
.csp-product-description li {
    font-size: 12px;
    line-height: 1.6;
}

/* Boutons */
.csp-product-actions {
    margin-top: 24px;
}

/* Meta produit */
.csp-product-meta {
    margin-top: 24px;
    font-size: 12px;
    line-height: 1.5;
    opacity: 0.7;
}

/* On évite les anciens styles trop gros */
.csp-summary .product_title,
.csp-summary .price {
    font-size: 14px;
}

/* Make out of stock variation swatches clickable */
.vi-wpvs-option-wrap.vi-wpvs-option-disabled,
.variable-item.disabled,
.variable-item.out-of-stock,
.swatch.disabled,
.swatch-element.disabled,
.woo-variation-swatches .variable-items-wrapper .variable-item.disabled,
.woo-variation-swatches .variable-items-wrapper .variable-item.out-of-stock,
.tawcvs-swatches .swatch.disabled,
.tawcvs-swatches .swatch.out-of-stock,
.cfvsw-swatches-option.cfvsw-swatches-disabled,
.cfvsw-swatches-option.cfvsw-swatches-blur-disable,
.cfvsw-swatches-option.cfvsw-swatches-out-of-stock {
    pointer-events: auto !important;
    cursor: pointer !important;
    opacity: 0.65 !important;
}



/* Custom Product Accordions Styling */
.csp-product-accordions {
    margin-top: 32px;
    border-top: 1px solid #eaeaea;
}

.csp-accordion {
    border-bottom: 1px solid #eaeaea;
}

.csp-accordion__button {
    width: 100% !important;
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    padding: 18px 0 !important;
    background: transparent !important;
    border: none !important;
    font-family: inherit !important;
    font-size: 11px !important;
    font-weight: 600 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.1em !important;
    color: #111111 !important;
    cursor: pointer !important;
    outline: none !important;
    text-align: left !important;
    box-shadow: none !important;
    transition: color 0.2s ease !important;
}

.csp-accordion__button:hover {
    color: #555555 !important;
}

.csp-accordion__icon {
    font-size: 16px !important;
    font-weight: 300 !important;
    line-height: 1 !important;
}

.csp-accordion__content {
    padding-bottom: 20px !important;
}

.csp-accordion__content-inner {
    font-size: 13px !important;
    line-height: 1.6 !important;
    color: #555555 !important;
}

.csp-accordion__content-inner p {
    margin-bottom: 12px !important;
    font-size: 13px !important;
    line-height: 1.6 !important;
    color: #555555 !important;
}

.csp-accordion__content-inner p:last-child {
    margin-bottom: 0 !important;
}






/* Stock Availability Styles */
.stock {
    font-size: 13px !important;
    font-weight: 500 !important;
    margin-top: 10px !important;
    margin-bottom: 10px !important;
}

.stock.out-of-stock {
    color: #cc0000 !important;
}

.stock.low-stock {
    color: #d97706 !important;
}