/* Single Product Page Styling */

body.single-product {
    overflow-x: hidden !important;
}

body.single-product #page,
body.single-product #content {
    overflow-x: hidden !important;
    width: 100% !important;
    max-width: 100% !important;
}

body.single-product #content > .col-full {
    max-width: 1320px !important;
    width: 100% !important;
    margin-left: auto !important;
    margin-right: auto !important;
    padding-left: 24px !important;
    padding-right: 24px !important;
    box-sizing: border-box !important;
    float: none !important;
}

.single-product-page-area,
.custom-product-page-container {
    padding: 24px 0 60px 0;
    max-width: 1280px;
    width: 100%;
    margin: 0 auto;
    box-sizing: border-box;
}

.product-page-grid {
    display: grid;
    grid-template-columns: minmax(340px, 460px) minmax(0, 1fr);
    gap: 48px;
    align-items: start;
    width: 100%;
    box-sizing: border-box;
}

.product-info-column {
    min-width: 0;
    max-width: 100%;
    width: 100%;
    box-sizing: border-box;
}

/* Left Column - Product Gallery Slider (Compact Single Image Viewer) */
.product-gallery-column {
    position: sticky;
    top: 24px;
    width: 100%;
    max-width: 460px;
    margin: 0 auto;
}

.product-gallery-viewport {
    position: relative;
    width: 100%;
    max-width: 460px;
    height: 420px;
    margin: 0 auto;
    border-radius: 14px;
    overflow: hidden;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 20px -4px rgba(0, 0, 0, 0.05);
    outline: none;
}

.product-gallery-viewport.has-loupe {
    cursor: crosshair;
}

.product-gallery-track {
    display: flex;
    flex-wrap: nowrap;
    width: 100%;
    height: 100%;
    transition: transform 0.35s cubic-bezier(0.25, 1, 0.5, 1);
    will-change: transform;
    user-select: none;
}

.product-gallery-viewport.is-dragging .product-gallery-track {
    cursor: grabbing;
}

.product-gallery-slide {
    flex: 0 0 100%;
    width: 100%;
    min-width: 100%;
    max-width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #ffffff;
    box-sizing: border-box;
}

.product-gallery-img-box {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    box-sizing: border-box;
    background: #fbfcfd;
}

.product-gallery-slide img {
    max-width: 100% !important;
    max-height: 100% !important;
    width: auto !important;
    height: auto !important;
    object-fit: contain !important;
    display: block !important;
    margin: 0 auto !important;
    pointer-events: none;
    user-select: none;
}

/* Navigation Arrow Buttons */
.gallery-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    border: 1.5px solid #e2e8f0;
    color: #1e293b;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 35;
    padding: 0;
}

.gallery-nav-btn:hover {
    background: #ffffff;
    border-color: #cbd5e1;
    color: #d32f2f;
    transform: translateY(-50%) scale(1.06);
    box-shadow: 0 5px 14px rgba(0, 0, 0, 0.14);
}

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

.gallery-nav-btn.prev-btn {
    left: 10px;
}

.gallery-nav-btn.next-btn {
    right: 10px;
}

/* Counter Badge (ex: 1 / 4) */
.gallery-counter-badge {
    position: absolute;
    bottom: 12px;
    right: 12px;
    background: rgba(15, 23, 42, 0.72);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    color: #ffffff;
    font-size: 11px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 16px;
    letter-spacing: 0.5px;
    pointer-events: none;
    z-index: 35;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.18);
}

/* Interactive Magnifying Loupe ("Effet Loupe") */
.product-gallery-loupe {
    position: absolute;
    width: 180px;
    height: 180px;
    border-radius: 50%;
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    transform: translate(-50%, -50%) scale(0.65);
    transition: opacity 0.18s ease-out, transform 0.22s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.18s;
    border: 3px solid #ffffff;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.28), 0 2px 6px rgba(0, 0, 0, 0.12), inset 0 0 16px rgba(0, 0, 0, 0.08);
    background-repeat: no-repeat;
    background-color: #fbfcfd;
    z-index: 25;
    will-change: left, top, background-position;
}

.product-gallery-loupe.is-active {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, -50%) scale(1);
}

/* Glass reflection shine on the lens */
.product-gallery-loupe::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: radial-gradient(circle at 32% 28%, rgba(255, 255, 255, 0.48) 0%, rgba(255, 255, 255, 0.1) 42%, rgba(0, 0, 0, 0.15) 100%);
    box-shadow: inset 0 0 12px rgba(0, 0, 0, 0.14);
    pointer-events: none;
}

/* Precision optical reticle dot */
.product-gallery-loupe::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 8px;
    height: 8px;
    margin-top: -4px;
    margin-left: -4px;
    border-radius: 50%;
    border: 1.5px solid rgba(211, 47, 47, 0.85);
    background: rgba(255, 255, 255, 0.65);
    pointer-events: none;
    z-index: 2;
    box-shadow: 0 0 3px rgba(0, 0, 0, 0.35);
}

/* Subtle Zoom Guidance Badge */
.gallery-zoom-badge {
    position: absolute;
    bottom: 12px;
    left: 12px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 11px;
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    color: #475569;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.3px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    pointer-events: none;
    z-index: 15;
    transition: opacity 0.22s ease, transform 0.22s ease;
}

.gallery-zoom-badge svg {
    color: #d32f2f;
    flex-shrink: 0;
}

.gallery-zoom-badge.is-hidden {
    opacity: 0;
    transform: translateY(4px);
    pointer-events: none;
}

.zoom-badge-text-mobile {
    display: none;
}

@media (max-width: 768px), (pointer: coarse) {
    .zoom-badge-text-desktop {
        display: none !important;
    }
    .zoom-badge-text-mobile {
        display: inline !important;
    }
}

/* Thumbnails Strip */
.product-gallery-thumbs-wrap {
    margin-top: 12px;
    width: 100%;
    max-width: 460px;
    margin-left: auto;
    margin-right: auto;
}

.product-gallery-thumbs {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 3px 2px 6px 2px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: #cbd5e1 transparent;
}

.product-gallery-thumbs::-webkit-scrollbar {
    height: 4px;
}

.product-gallery-thumbs::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

.gallery-thumb-item {
    flex: 0 0 62px;
    width: 62px;
    height: 62px;
    border-radius: 10px;
    border: 2px solid #e2e8f0;
    background: #ffffff;
    padding: 2px;
    cursor: pointer;
    overflow: hidden;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
}

.gallery-thumb-item img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 6px;
    display: block;
    pointer-events: none;
}

.gallery-thumb-item:hover {
    border-color: #94a3b8;
    transform: translateY(-1px);
}

.gallery-thumb-item.is-active {
    border-color: #d32f2f;
    box-shadow: 0 0 0 1px #d32f2f, 0 3px 10px rgba(211, 47, 47, 0.2);
    transform: translateY(-1px);
}

/* Right Column - Product Details */
.product-info-column {
    display: flex;
    flex-direction: column;
}

/* Breadcrumb */
.intex-product-breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.88rem;
    color: #4b5563;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.intex-product-breadcrumb a {
    color: #374151;
    text-decoration: none;
    font-weight: 500;
}

.intex-product-breadcrumb a:hover {
    text-decoration: underline;
    color: #111827;
}

.intex-product-breadcrumb .sep {
    color: #9ca3af;
    font-size: 0.8rem;
}

.intex-product-breadcrumb .current {
    color: #111827;
    font-weight: 600;
}

/* Title */
.intex-product-title,
.single-product .product_title {
    font-size: 2.25rem !important;
    font-weight: 800 !important;
    color: #111827 !important;
    line-height: 1.25 !important;
    margin: 0 0 8px 0 !important;
    letter-spacing: -0.02em !important;
}

/* SKU Reference */
.intex-product-ref {
    font-size: 0.9rem;
    color: #4b5563;
    margin-bottom: 16px;
    font-weight: 500;
}

.intex-product-ref span {
    color: #111827;
    font-weight: 600;
}

/* Feature Tag Pills */
.intex-product-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
}

.pill-tag.cyan-pill {
    background: #e6f4f1;
    color: #d32f2f;
    font-weight: 600;
    font-size: 0.85rem;
    padding: 6px 14px;
    border-radius: 20px;
    display: inline-flex;
    align-items: center;
}

/* Stock & Shipping Block */
.intex-stock-shipping-block {
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.stock-status-green {
    color: #008a00;
    font-weight: 600;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.stock-status-green .dot {
    width: 8px;
    height: 8px;
    background: #008a00;
    border-radius: 50%;
    display: inline-block;
}

.shipping-notice {
    color: #004e64;
    font-weight: 500;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 8px;
    border-top: 1px solid #f3f4f6;
    padding-top: 10px;
    margin-top: 4px;
}

/* Included Accessories Banner */
.intex-accessories-banner {
    background: #f4f5f7;
    border-radius: 12px;
    padding: 14px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
}

.acc-info {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.95rem;
    color: #111827;
}

.acc-link {
    color: #111827;
    font-weight: 600;
    text-decoration: underline;
    font-size: 0.9rem;
    transition: color 0.2s;
}

.acc-link:hover {
    color: #000000;
}

/* Price Section */
.intex-price-section {
    margin-bottom: 16px;
}

.price-label {
    font-size: 0.9rem;
    font-weight: 600;
    color: #111827;
    margin-bottom: 4px;
}

.price-row {
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.price-display {
    font-size: 2.3rem;
    font-weight: 800;
    color: #111827;
    line-height: 1;
}

.tax-suffix {
    font-size: 0.9rem;
    font-weight: 600;
    color: #6b7280;
}

.eco-tax-subtext {
    font-size: 0.82rem;
    color: #6b7280;
    margin-top: 6px;
}

/* Installment Payment Notice */
.intex-installment-box {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.95rem;
    color: #111827;
    margin-bottom: 24px;
}

.oney-pills {
    display: flex;
    align-items: center;
    gap: 4px;
}

.oney-chip {
    background: #e5e7eb;
    color: #374151;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 4px;
}

.oney-text {
    font-weight: 800;
    color: #111827;
    font-size: 0.95rem;
    margin-left: 2px;
}

/* Add to Cart & Wishlist Actions */
.intex-cart-action-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 10px;
}

.custom-intex-cart-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
}

.custom-intex-cart-primary-row {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    width: 100%;
}

.custom-intex-buttons-column {
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex: 1;
    min-width: 0;
}

.custom-main-cart-btn {
    width: 100% !important;
    background: #d32f2f !important;
    background-color: #d32f2f !important;
    color: #ffffff !important;
    font-weight: 700 !important;
    font-size: 0.95rem !important;
    letter-spacing: 0.5px !important;
    text-transform: uppercase !important;
    border-radius: 50px !important;
    padding: 16px 24px !important;
    border: none !important;
    cursor: pointer !important;
    text-align: center !important;
    transition: background-color 0.2s ease, transform 0.2s ease !important;
    height: 54px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-shadow: none !important;
    text-decoration: none !important;
    box-sizing: border-box !important;
}

.custom-main-cart-btn:hover {
    background: #b71c1c !important;
    background-color: #b71c1c !important;
    color: #ffffff !important;
}

/* Bouton 'Commander maintenant' en noir - strictement sous Ajouter au panier avec la même largeur */
.custom-buy-now-btn,
.woocommerce button.button.custom-buy-now-btn,
.woocommerce button.button#intexBuyNowBtn,
.woocommerce a.button.custom-buy-now-btn,
button#intexBuyNowBtn {
    width: 100% !important;
    background: #000000 !important;
    background-color: #000000 !important;
    color: #ffffff !important;
    font-weight: 700 !important;
    font-size: 0.95rem !important;
    letter-spacing: 0.5px !important;
    text-transform: uppercase !important;
    border-radius: 50px !important;
    padding: 16px 24px !important;
    border: none !important;
    cursor: pointer !important;
    text-align: center !important;
    transition: background-color 0.2s ease, transform 0.2s ease !important;
    height: 54px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-shadow: none !important;
    text-decoration: none !important;
    box-sizing: border-box !important;
}

.custom-buy-now-btn:hover,
.woocommerce button.button.custom-buy-now-btn:hover,
.woocommerce button.button#intexBuyNowBtn:hover,
.woocommerce a.button.custom-buy-now-btn:hover,
button#intexBuyNowBtn:hover {
    background: #1f2937 !important;
    background-color: #1f2937 !important;
    color: #ffffff !important;
}

.wishlist-icon-btn {
    width: 54px;
    height: 54px;
    min-width: 54px;
    border-radius: 50%;
    border: 1.5px solid #d1d5db;
    background: #ffffff;
    color: #111827;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 0;
}

.wishlist-icon-btn:hover {
    border-color: #111827;
    color: #e11d48;
}

/* Responsive Product Page */
@media (max-width: 992px) {
    .product-page-grid {
        grid-template-columns: 100% !important;
        gap: 28px !important;
    }

    .product-gallery-column {
        position: static !important;
        width: 100% !important;
        max-width: 520px !important;
        margin: 0 auto !important;
    }
    
    .intex-product-title {
        font-size: 1.7rem !important;
    }
}

@media (max-width: 768px) {
    body.single-product #content > .col-full {
        padding-left: 14px !important;
        padding-right: 14px !important;
        margin-left: auto !important;
        margin-right: auto !important;
    }

    .single-product-page-area,
    .custom-product-page-container {
        padding: 12px 0 36px 0 !important;
        width: 100% !important;
    }

    .product-page-grid {
        grid-template-columns: 100% !important;
        gap: 18px !important;
        width: 100% !important;
    }

    .product-gallery-column {
        position: static !important;
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
    }

    .product-gallery-viewport {
        max-width: 100% !important;
        width: 100% !important;
        height: 380px !important;
        border-radius: 12px !important;
        overflow: hidden !important;
        position: relative !important;
    }

    .product-gallery-loupe {
        width: 180px !important;
        height: 180px !important;
    }

    .product-gallery-track {
        display: flex !important;
        flex-wrap: nowrap !important;
        width: 100% !important;
        height: 100% !important;
    }

    .product-gallery-slide {
        flex: 0 0 100% !important;
        width: 100% !important;
        min-width: 100% !important;
        max-width: 100% !important;
        height: 100% !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }

    .product-gallery-img-box {
        width: 100% !important;
        height: 100% !important;
        padding: 12px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }

    .product-gallery-slide img {
        max-width: 100% !important;
        max-height: 100% !important;
        width: auto !important;
        height: auto !important;
        object-fit: contain !important;
        display: block !important;
        margin: 0 auto !important;
    }

    .gallery-nav-btn {
        width: 36px !important;
        height: 36px !important;
    }

    .gallery-nav-btn.prev-btn {
        left: 8px !important;
    }

    .gallery-nav-btn.next-btn {
        right: 8px !important;
    }

    .gallery-counter-badge {
        bottom: 8px !important;
        right: 8px !important;
        font-size: 11px !important;
        padding: 3px 9px !important;
    }

    .product-gallery-thumbs-wrap {
        margin-top: 10px !important;
        max-width: 100% !important;
    }

    .product-gallery-thumbs {
        gap: 6px !important;
        padding: 2px 0 6px 0 !important;
        scroll-snap-type: x mandatory !important;
    }

    .gallery-thumb-item {
        flex: 0 0 52px !important;
        width: 52px !important;
        height: 52px !important;
        border-radius: 8px !important;
        padding: 2px !important;
        scroll-snap-align: center !important;
    }
    
    /* Product Info on Mobile */
    .intex-product-breadcrumb {
        font-size: 0.8rem !important;
        margin-bottom: 8px !important;
        flex-wrap: wrap !important;
        gap: 4px !important;
        line-height: 1.3 !important;
    }

    .intex-product-title {
        font-size: 1.32rem !important;
        line-height: 1.28 !important;
        margin: 0 0 10px 0 !important;
        word-break: break-word !important;
    }

    .intex-product-ref {
        font-size: 0.8rem !important;
        margin-bottom: 12px !important;
    }

    .intex-shipping-badge-row {
        gap: 8px !important;
        margin-bottom: 12px !important;
        flex-wrap: wrap !important;
    }

    .pill-tag {
        font-size: 0.75rem !important;
        padding: 4px 10px !important;
    }

    .stock-status-green {
        font-size: 0.82rem !important;
    }

    .shipping-notice {
        font-size: 0.82rem !important;
        margin-bottom: 12px !important;
    }

    .intex-price-section {
        margin: 14px 0 !important;
        padding: 14px 16px !important;
    }

    .price-display {
        font-size: 1.65rem !important;
    }

    .tax-suffix {
        font-size: 0.82rem !important;
    }

    .intex-product-short-description {
        font-size: 14px !important;
        line-height: 1.5 !important;
        margin: 14px 0 !important;
    }

    /* Cart Action Row on Mobile */
    .intex-cart-action-row {
        margin-top: 14px !important;
    }

    .custom-intex-cart-form {
        display: flex !important;
        flex-direction: column !important;
        gap: 10px !important;
        width: 100% !important;
    }

    .custom-intex-cart-primary-row {
        display: flex !important;
        align-items: flex-start !important;
        gap: 8px !important;
        width: 100% !important;
    }

    .custom-intex-buttons-column {
        display: flex !important;
        flex-direction: column !important;
        gap: 8px !important;
        flex: 1 !important;
        min-width: 0 !important;
    }

    .custom-intex-cart-form .quantity {
        display: inline-flex !important;
        align-items: center !important;
        margin: 0 !important;
        float: none !important;
    }

    .custom-intex-cart-form .quantity .qty {
        width: 48px !important;
        height: 48px !important;
        border-radius: 10px !important;
        font-size: 0.95rem !important;
        padding: 0 4px !important;
        border: 1.5px solid #d1d5db !important;
        text-align: center !important;
    }

    .custom-main-cart-btn {
        width: 100% !important;
        font-size: 0.85rem !important;
        padding: 12px 14px !important;
        height: 48px !important;
        letter-spacing: 0.2px !important;
        white-space: nowrap !important;
        box-sizing: border-box !important;
    }

    .custom-buy-now-btn {
        width: 100% !important;
        font-size: 0.88rem !important;
        padding: 12px 14px !important;
        height: 48px !important;
        letter-spacing: 0.2px !important;
        white-space: nowrap !important;
        box-sizing: border-box !important;
    }

    .wishlist-icon-btn {
        width: 48px !important;
        height: 48px !important;
        min-width: 48px !important;
        border-radius: 50% !important;
    }

    .intex-product-full-description {
        margin-top: 32px !important;
        padding-top: 20px !important;
    }

    .intex-product-full-description h2 {
        font-size: 1.25rem !important;
        margin-bottom: 14px !important;
    }
}

@media (max-width: 420px) {
    .product-gallery-viewport {
        height: 280px !important;
    }

    .gallery-thumb-item {
        flex: 0 0 46px !important;
        width: 46px !important;
        height: 46px !important;
    }

    .custom-main-cart-btn {
        font-size: 0.78rem !important;
        padding: 10px 8px !important;
        height: 46px !important;
    }

    .custom-buy-now-btn {
        font-size: 0.80rem !important;
        padding: 10px 8px !important;
        height: 46px !important;
    }
}
