/**
 * Custom Single Product Page Styles
 * Theme: Hello Elementor Child
 * Version: 3.2.0 - Mobile fixes
 */

/* ==========================================
   HIDE DEFAULT WOOCOMMERCE ELEMENTS
   ========================================== */
.woocommerce-breadcrumb,
.woocommerce div.product div.images,
.woocommerce div.product div.summary,
.woocommerce-tabs,
.related.products,
.upsells.products {
    display: none !important;
}

/* ==========================================
   RESET & BASE
   ========================================== */
* {
    box-sizing: border-box;
    /* Supprimer le highlight rose/bleu sur iOS/Android */
    -webkit-tap-highlight-color: transparent !important;
    -webkit-touch-callout: none;
}

html, body {
    -webkit-tap-highlight-color: transparent !important;
}

a {
    text-decoration: none;
    color: inherit;
    -webkit-tap-highlight-color: transparent !important;
}

button {
    font-family: inherit;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent !important;
    -webkit-appearance: none;
    outline: none !important;
}

button:focus,
button:active {
    outline: none !important;
    -webkit-tap-highlight-color: transparent !important;
}

/* WordPress/WooCommerce Overrides for Accordion */
.csp-accordion-header,
.csp-accordion-header:hover,
.csp-accordion-header:focus,
.csp-accordion-header:active,
.csp-accordion-header:visited,
.csp-accordion-header:focus-visible {
    background: none !important;
    background-color: transparent !important;
    border: none !important;
    box-shadow: none !important;
    outline: none !important;
}

.csp-accordion-item,
.csp-accordion-item:hover,
.csp-accordion-item:focus {
    background: transparent !important;
    background-color: transparent !important;
}

/* ==========================================
   BREADCRUMB
   ========================================== */
.csp-breadcrumb {
    max-width: 1400px;
    margin: 0 auto;
    padding: 15px 40px;
    font-size: 13px;
    color: #666;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.csp-breadcrumb a {
    color: #666;
    transition: color 0.2s;
}

.csp-breadcrumb a:hover {
    color: #c1a35f;
}

.csp-breadcrumb-sep {
    color: #ccc;
    font-size: 11px;
}

.csp-breadcrumb-current {
    color: #1a1a1a;
    font-weight: 500;
}

/* ==========================================
   MAIN CONTAINER
   ========================================== */
.csp-product-container {
    max-width: 1400px;
    margin: 0 auto 40px;
    padding: 0 40px;
    display: grid;
    grid-template-columns: 55% 45%;
    gap: 40px;
    align-items: start;
}

/* ==========================================
   CAROUSEL / GALLERY - MOBILE OPTIMIZED
   ========================================== */
.csp-gallery-section {
    position: sticky;
    top: 20px;
}

.csp-carousel {
    position: relative;
    background: #f8f8f8;
    border-radius: 12px;
    overflow: hidden;
    height: 600px;
    -webkit-overflow-scrolling: touch;
}

.csp-carousel-track {
    display: flex;
    height: 100%;
    transition: transform 0.4s ease-out;
    width: 100%;
    will-change: transform;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
}

.csp-carousel-slide {
    min-width: 100%;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    -webkit-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;
}

.csp-carousel-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    -webkit-user-drag: none;
    user-drag: none;
    pointer-events: none;
}

.csp-carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.95);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: all 0.2s;
    z-index: 10;
    -webkit-tap-highlight-color: transparent !important;
    -webkit-appearance: none;
    outline: none !important;
    user-select: none;
}

.csp-carousel-btn:hover {
    background: #fff;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

.csp-carousel-btn:focus,
.csp-carousel-btn:active {
    outline: none !important;
    -webkit-tap-highlight-color: transparent !important;
    background: rgba(255, 255, 255, 0.95);
}

.csp-carousel-btn:active {
    transform: translateY(-50%) scale(0.95);
}

.csp-carousel-btn svg {
    color: #1a1a1a;
}

.csp-carousel-prev { left: 15px; }
.csp-carousel-next { right: 15px; }

.csp-discount-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    background: #c1a35f;
    color: #fff;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    z-index: 10;
}

.csp-carousel-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    padding: 15px 0;
}

.csp-carousel-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #ddd;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    padding: 0;
    -webkit-tap-highlight-color: transparent !important;
    -webkit-appearance: none;
    outline: none !important;
}

.csp-carousel-dot:focus,
.csp-carousel-dot:active {
    outline: none !important;
    -webkit-tap-highlight-color: transparent !important;
}

.csp-carousel-dot.active,
.csp-carousel-dot:hover {
    background: #c1a35f;
    transform: scale(1.2);
}

/* ==========================================
   PRODUCT INFO
   ========================================== */
.csp-info-section {
    padding-top: 10px;
}

.csp-product-title {
    font-size: 22px !important;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0 0 8px 0 !important;
    line-height: 1.3;
}

.csp-rating {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}

.csp-stars {
    display: flex;
    gap: 1px;
}

.csp-star {
    color: #ddd;
    font-size: 13px;
}

.csp-star.filled {
    color: #c1a35f;
}

.csp-rating-count {
    font-size: 12px;
    color: #888;
}

.csp-price-block {
    display: flex;
    align-items: baseline;
    gap: 10px;
    margin-bottom: 15px;
}

.csp-price-current {
    font-size: 22px !important;
    font-weight: 700;
    color: #1a1a1a;
}

.csp-price-old {
    font-size: 15px !important;
    color: #999;
    text-decoration: line-through;
}

/* ==========================================
   FLOA PAY & PAYPAL
   ========================================== */
.csp-floa-compact {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 15px;
    background: #f8f8f8;
    border-radius: 8px;
    margin-bottom: 10px;
}

.csp-floa-badge {
    background: #0096d6;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    padding: 4px 8px;
    border-radius: 4px;
    letter-spacing: 0.5px;
}

.csp-floa-compact .csp-floa-text {
    font-size: 13px;
    color: #666;
}

.csp-floa-compact .csp-floa-text strong {
    color: #1a1a1a;
}

.csp-paypal-option {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 15px;
    background: #f8f8f8;
    border-radius: 8px;
    font-size: 13px;
    color: #666;
    margin-bottom: 15px;
}

.csp-paypal-icon {
    width: 60px;
    height: 20px;
}

/* ==========================================
   DIMENSIONS
   ========================================== */
.csp-dimensions-display {
    display: flex;
    gap: 20px;
    padding: 15px 0;
    border-top: 1px solid #eee;
    border-bottom: 1px solid #eee;
    margin-bottom: 20px;
}

.csp-dim-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.csp-dim-icon {
    color: #666;
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.csp-dim-text {
    display: flex;
    flex-direction: column;
}

.csp-dim-label {
    font-size: 11px;
    color: #999;
    text-transform: uppercase;
}

.csp-dim-value {
    font-size: 14px;
    font-weight: 600;
    color: #1a1a1a;
}

/* ==========================================
   VARIATIONS - TOUCH OPTIMIZED
   ========================================== */
.csp-variations-section {
    margin-bottom: 20px;
}

.csp-variation-group {
    margin-bottom: 18px;
}

.csp-variation-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}

.csp-variation-label {
    font-size: 14px;
    font-weight: 600;
    color: #1a1a1a;
}

.csp-variation-selected {
    font-size: 14px;
    color: #666;
}

.csp-variation-count {
    font-size: 12px;
    color: #999;
    margin-left: auto;
}

/* Swatches - Touch friendly */
.csp-color-swatches {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.csp-color-swatch,
.csp-swatch {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    border: 2px solid #e5e5e5;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
    padding: 0;
    -webkit-tap-highlight-color: transparent !important;
    -webkit-appearance: none;
    touch-action: manipulation;
    outline: none !important;
    user-select: none;
}

.csp-color-swatch:focus,
.csp-swatch:focus,
.csp-color-swatch:active,
.csp-swatch:active {
    outline: none !important;
    -webkit-tap-highlight-color: transparent !important;
}

.csp-color-swatch:hover,
.csp-swatch:hover {
    border-color: #c1a35f;
    transform: scale(1.05);
}

.csp-color-swatch:active,
.csp-swatch:active {
    transform: scale(0.95);
}

.csp-color-swatch.active,
.csp-swatch.active {
    border-color: #1a1a1a;
    box-shadow: 0 0 0 2px #1a1a1a;
}

.csp-swatch-check {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    opacity: 0;
    text-shadow: 0 1px 2px rgba(0,0,0,0.5);
}

.csp-swatch.active .csp-swatch-check {
    opacity: 1;
}

/* Angle Buttons */
.csp-angle-group {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.csp-angle-group .csp-variation-label {
    font-size: 14px;
    font-weight: 600;
    color: #1a1a1a;
}

.csp-angle-buttons {
    display: flex;
    gap: 8px;
}

.csp-angle-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 10px 18px;
    background: #fff;
    border: 2px solid #e5e5e5;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    color: #1a1a1a;
    cursor: pointer;
    transition: all 0.2s;
    -webkit-tap-highlight-color: transparent !important;
    -webkit-appearance: none;
    touch-action: manipulation;
    outline: none !important;
    user-select: none;
}

.csp-angle-btn:focus,
.csp-angle-btn:active {
    outline: none !important;
    -webkit-tap-highlight-color: transparent !important;
}

.csp-angle-btn:hover {
    border-color: #c1a35f;
}

.csp-angle-btn:active {
    transform: scale(0.95);
}

.csp-angle-btn.active {
    border-color: #1a1a1a;
    background: #f8f8f8;
}

.csp-angle-arrow {
    font-size: 11px;
}

.csp-angle-hint {
    font-size: 13px;
    color: #999;
    font-style: italic;
}

/* ==========================================
   SHORT DESCRIPTION & DELIVERY
   ========================================== */
.csp-short-description {
    font-size: 14px !important;
    line-height: 1.6;
    color: #666;
    margin-bottom: 20px;
    padding: 15px;
    background: #f8f8f8;
    border-radius: 8px;
}

.csp-delivery-estimate {
    background: #f8f8f8;
    border-radius: 8px;
    padding: 12px 15px;
    margin-bottom: 15px;
    font-size: 13px;
    line-height: 1.6;
}

.csp-delivery-estimate p {
    margin: 0;
    color: #444;
}

.csp-delivery-estimate p + p {
    margin-top: 6px;
}

.csp-delivery-estimate strong {
    color: #1a1a1a;
}

.csp-delivery-idf strong:not(:first-child) {
    color: #c1a35f;
}

.csp-delivery-hors strong:not(:first-child) {
    color: #666;
}

/* ==========================================
   ADD TO CART
   ========================================== */
.csp-cart {
    margin-bottom: 15px;
}

.csp-quantity-row {
    display: flex;
    gap: 12px;
    align-items: stretch;
}

.csp-quantity-selector {
    display: flex;
    align-items: center;
    border: 2px solid #e5e5e5;
    border-radius: 8px;
    overflow: hidden;
}

.csp-qty-btn {
    width: 44px;
    height: 44px;
    background: #fff;
    border: none;
    font-size: 18px;
    color: #1a1a1a;
    cursor: pointer;
    transition: background 0.2s;
    -webkit-tap-highlight-color: transparent !important;
    -webkit-appearance: none;
    outline: none !important;
}

.csp-qty-btn:focus,
.csp-qty-btn:active {
    outline: none !important;
    -webkit-tap-highlight-color: transparent !important;
}

.csp-qty-btn:hover {
    background: #f5f5f5;
}

.csp-qty-btn:active {
    background: #eee;
}

.csp-qty-input {
    width: 50px;
    height: 44px;
    border: none;
    text-align: center;
    font-size: 15px !important;
    font-weight: 600;
    color: #1a1a1a;
    -moz-appearance: textfield;
}

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

.csp-add-to-cart-btn {
    flex: 1;
    background: #1a1a1a;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 15px !important;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    padding: 0 30px;
    -webkit-tap-highlight-color: transparent !important;
    -webkit-appearance: none;
    outline: none !important;
}

.csp-add-to-cart-btn:focus,
.csp-add-to-cart-btn:active {
    outline: none !important;
    -webkit-tap-highlight-color: transparent !important;
}

.csp-add-to-cart-btn:hover {
    background: #c1a35f;
}

.csp-add-to-cart-btn:active {
    transform: scale(0.98);
}

/* ==========================================
   PRODUCT META
   ========================================== */
.csp-product-meta {
    padding-top: 15px;
    border-top: 1px solid #eee;
}

.csp-meta-item {
    display: flex;
    gap: 8px;
    margin-bottom: 8px;
    font-size: 13px;
}

.csp-meta-label {
    color: #666;
}

.csp-meta-value {
    color: #1a1a1a;
}

.csp-meta-value.in-stock {
    color: #28a745;
    font-weight: 500;
}

/* ==========================================
   ACCORDION
   ========================================== */
.csp-accordion-wrapper {
    margin-top: 20px;
}

.csp-accordion-item {
    border-bottom: 1px solid #e5e5e5 !important;
    background: transparent !important;
}

.csp-accordion-item:first-child {
    border-top: 1px solid #e5e5e5 !important;
}

.csp-accordion-header {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 0 !important;
    background: none !important;
    border: none !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    color: #1a1a1a !important;
    cursor: pointer;
    text-align: left;
    -webkit-tap-highlight-color: transparent !important;
    -webkit-appearance: none;
    outline: none !important;
}

.csp-accordion-header:focus,
.csp-accordion-header:active {
    outline: none !important;
    -webkit-tap-highlight-color: transparent !important;
    background: none !important;
}

.csp-accordion-header:hover {
    color: #c1a35f !important;
}

.csp-accordion-icon {
    font-size: 18px;
    font-weight: 300;
    color: #666 !important;
}

.csp-accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
    background: transparent !important;
}

.csp-accordion-content.open {
    max-height: 2000px;
    padding-bottom: 16px;
}

.csp-specs-table {
    width: 100%;
    border-collapse: collapse;
}

.csp-specs-table tr {
    border-bottom: 1px solid #f0f0f0;
}

.csp-specs-table tr:last-child {
    border-bottom: none;
}

.csp-specs-table td {
    padding: 12px 0;
    font-size: 14px;
}

.csp-spec-name {
    color: #666;
    width: 40%;
}

.csp-spec-value {
    color: #1a1a1a;
    font-weight: 500;
}

.csp-description-content {
    font-size: 14px;
    line-height: 1.7;
    color: #444;
}

.csp-shipping-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.csp-shipping-option {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background: #f8f8f8;
    border-radius: 8px;
    border: 1px solid #e5e5e5;
}

.csp-shipping-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.csp-shipping-name {
    font-size: 14px;
    font-weight: 600;
    color: #1a1a1a;
}

.csp-shipping-desc {
    font-size: 12px;
    color: #666;
}

.csp-shipping-price {
    font-size: 14px;
    font-weight: 600;
    color: #1a1a1a;
}

.csp-shipping-price.csp-free {
    color: #28a745;
}

.csp-shipping-note {
    font-size: 13px;
    color: #28a745;
    margin: 15px 0 0 0;
    font-weight: 500;
}

/* ==========================================
   RELATED PRODUCTS
   ========================================== */
.csp-related-section {
    max-width: 1400px;
    margin: 0 auto 60px;
    padding: 0 40px;
}

.csp-section-title {
    font-size: 24px;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 25px;
}

.csp-related-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.csp-related-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    text-decoration: none;
    border: 1px solid #f0f0f0;
    transition: all 0.3s;
    display: block;
}

.csp-related-card:hover {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transform: translateY(-5px);
}

.csp-related-image {
    aspect-ratio: 1;
    background: #f8f8f8;
    overflow: hidden;
}

.csp-related-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.csp-related-info {
    padding: 15px;
}

.csp-related-name {
    font-size: 14px;
    font-weight: 500;
    color: #1a1a1a;
    margin: 0 0 8px 0;
    line-height: 1.4;
}

.csp-related-price {
    font-size: 16px !important;
    font-weight: 700;
    color: #c1a35f;
}

/* ==========================================
   TOAST
   ========================================== */
.csp-toast {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #1a1a1a;
    color: #fff;
    padding: 15px 25px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    transform: translateX(120%);
    transition: transform 0.4s ease;
    z-index: 9999;
}

.csp-toast.show {
    transform: translateX(0);
}

.csp-toast-icon {
    width: 24px;
    height: 24px;
    background: #c1a35f;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
}

.csp-toast-message {
    font-size: 14px;
    font-weight: 500;
}

/* ==========================================
   RESPONSIVE - TABLET
   ========================================== */
@media (max-width: 1024px) {
    .csp-product-container {
        grid-template-columns: 1fr;
        gap: 30px;
        padding: 0 20px;
    }

    .csp-gallery-section {
        position: static;
    }

    .csp-carousel {
        height: 450px;
    }

    .csp-related-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .csp-dimensions-display {
        flex-wrap: wrap;
    }

    .csp-breadcrumb,
    .csp-related-section {
        padding: 0 20px;
    }
}

/* ==========================================
   RESPONSIVE - MOBILE
   ========================================== */
@media (max-width: 640px) {
    .csp-breadcrumb {
        font-size: 12px;
        padding: 10px 15px;
    }

    .csp-product-container {
        padding: 0 15px;
    }

    .csp-carousel {
        height: 350px;
        border-radius: 8px;
    }

    /* Flèches plus grandes sur mobile */
    .csp-carousel-btn {
        width: 56px;
        height: 56px;
        background: rgba(255, 255, 255, 0.98);
        box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
    }

    .csp-carousel-btn svg {
        width: 32px;
        height: 32px;
    }

    .csp-carousel-prev { left: 10px; }
    .csp-carousel-next { right: 10px; }

    .csp-product-title {
        font-size: 20px !important;
    }

    .csp-price-current {
        font-size: 20px !important;
    }

    .csp-dimensions-display {
        gap: 15px;
    }

    .csp-dim-item {
        flex: 1 1 calc(50% - 10px);
    }

    /* Swatches plus grands pour le touch */
    .csp-color-swatch,
    .csp-swatch {
        width: 48px;
        height: 48px;
    }

    .csp-angle-buttons {
        flex-direction: column;
        width: 100%;
    }

    .csp-angle-btn {
        width: 100%;
        justify-content: center;
        padding: 14px 18px;
    }

    .csp-quantity-row {
        flex-direction: column;
    }

    .csp-quantity-selector {
        justify-content: center;
    }

    .csp-add-to-cart-btn {
        padding: 15px;
    }

    .csp-related-section {
        padding: 0 15px;
    }

    .csp-related-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }

    .csp-section-title {
        font-size: 20px;
    }

    /* Toast en bas sur mobile */
    .csp-toast {
        top: auto;
        bottom: 20px;
        right: 15px;
        left: 15px;
        transform: translateY(120%);
    }

    .csp-toast.show {
        transform: translateY(0);
    }
}