/* ================================================
   PRODUCT PAGES - UNIFIED STYLESHEET 2025
   Design moderne aligné avec le site principal
   ================================================ */

/* ================================================
   DESIGN TOKENS - Variables
   ================================================ */
:root {
    /* Brand Colors */
    --brand-primary: #1a3a5c;
    --brand-primary-light: #2d5a8c;
    --brand-secondary: #0EA0E6;
    --brand-accent: #56c2e2;
    
    /* Text Colors */
    --text-dark: #2a2a33;
    --text-gray: #888;
    --text-light: #fff;
    
    /* Background Colors */
    --bg-white: #fff;
    --bg-light: #f5f5f5;
    --bg-gray: #fafafa;
    
    /* Borders */
    --border-light: #e0e0e0;
    --border-gray: #d1d8e3;
    
    /* Fonts */
    --font-primary: "Circular Std", -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-book: "Circular Std Book", -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-mono: 'Courier New', monospace;
    
    /* Spacing */
    --space-xs: 10px;
    --space-sm: 15px;
    --space-md: 20px;
    --space-lg: 30px;
    --space-xl: 40px;
    --space-2xl: 50px;
    --space-3xl: 60px;
    --space-4xl: 80px;
    
    /* Transitions */
    --transition: all 0.3s ease-in-out;
}

/* ================================================
   PREVENT HORIZONTAL SCROLLING (Critical Fix)
   ================================================ */
html,
body {
    overflow-x: hidden !important;
    max-width: 100vw !important;
    position: relative;
    width: 100%;
}

/* Ensure all containers don't exceed viewport width */
.product-page-container,
.product-hero-section,
.product-main-section,
.product-layout,
.product-image-wrapper,
.product-info-wrapper {
    max-width: 100% !important;
    overflow-x: hidden !important;
    width: 100%;
}

/* Prevent any element from causing horizontal scroll */
.product-page-container * {
    max-width: 100%;
    box-sizing: border-box;
}

/* Fix for Bootstrap container */
.product-page-container .container {
    max-width: 100% !important;
    padding-left: 15px;
    padding-right: 15px;
    overflow-x: hidden;
}

/* Ensure images don't overflow */
.product-page-container img {
    max-width: 100%;
    height: auto;
    display: block;
    visibility: visible;
    opacity: 1;
}

/* ================================================
   BASE STYLES - Background & Typography
   ================================================ */
.product-page-container {
    background: linear-gradient(135deg, #e8f4f8 0%, #ddeef5 50%, #e8f4f8 100%);
    background-size: 200% 200%;
    animation: gradientShift 15s ease infinite;
    position: relative;
    overflow-x: hidden;
    font-family: var(--font-primary);
    letter-spacing: 1.5px;
    color: var(--text-gray);
    line-height: 30px;
    min-height: 100vh;
}

@keyframes gradientShift {
    0%, 100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}

.product-page-container.initialized {
    opacity: 1;
}

/* ================================================
   HERO SECTION
   ================================================ */
.product-hero-section {
    position: relative;
    padding: 50px 0;
    background: linear-gradient(135deg, rgba(26, 58, 92, 0.95) 0%, rgba(0, 27, 77, 0.95) 100%);
    color: #fff;
}

.hero-content {
    position: relative;
    padding: 250px 0 150px;
    text-align: center;
}

.hero-title {
    font-size: 60px;
    line-height: 70px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 0;
}

.hero-subtitle {
    font-size: 36px;
    padding-top: 15px;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 0;
}

.breadcrumb-custom {
    margin-top: 50px;
}

.breadcrumb-custom .breadcrumb {
    position: relative;
    margin-bottom: 0;
    list-style: none;
    background: none;
    padding: 0;
    justify-content: center;
}

.breadcrumb-custom .breadcrumb-item {
    font-size: 18px;
    color: #fff !important;
}

.breadcrumb-custom .breadcrumb-item a {
    font-size: 18px;
    color: #fff !important;
    text-decoration: none;
    transition: opacity 0.3s ease;
}

.breadcrumb-custom .breadcrumb-item a:hover {
    opacity: 0.8;
    color: #fff !important;
}

.breadcrumb-custom .breadcrumb-item.active {
    color: rgba(255, 255, 255, 0.9) !important;
}

.breadcrumb-custom .breadcrumb-item + .breadcrumb-item::before {
    content: "/";
    padding: 0 10px;
    color: rgba(255, 255, 255, 0.7) !important;
}

/* ================================================
   MAIN PRODUCT SECTION
   ================================================ */
.product-main-section {
    position: relative;
    padding: var(--space-3xl) 0;
    background: transparent;
}

/* Réduire l'espace entre les sections adjacentes - IMPROVED */
.product-main-section + .product-main-section {
    padding-top: var(--space-md);
    margin-top: 0;
}

/* Première section - garder un peu plus d'espace en haut */
.product-main-section:first-of-type {
    padding-top: var(--space-3xl);
}

/* Dernière section - garder un peu plus d'espace en bas */
.product-main-section:last-of-type {
    padding-bottom: var(--space-3xl);
}

/* Product Viewer Container - Grande carte blanche centrée */
.product-viewer-container {
    max-width: 1400px;
    margin: 0 auto;
    background: var(--bg-white);
    border-radius: 24px;
    box-shadow: 0 20px 60px rgba(26, 58, 92, 0.08), 0 0 0 1px rgba(0, 0, 0, 0.02);
    padding: var(--space-4xl) var(--space-3xl);
    margin-top: var(--space-2xl);
    margin-bottom: var(--space-2xl);
    position: relative;
    overflow: hidden;
    animation: fadeInUp 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.product-viewer-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--brand-primary), var(--brand-secondary), var(--brand-accent));
    border-radius: 24px 24px 0 0;
}

/* ================================================
   PRODUCT LAYOUT - Grid
   ================================================ */
.product-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-4xl);
    align-items: start;
    max-width: 100%;
    margin: 0;
    padding: 0;
}

/* ================================================
   PRODUCT IMAGE SECTION
   ================================================ */
.product-image-wrapper {
    position: sticky;
    top: 120px;
    z-index: 10;
    background: var(--bg-white);
    border-radius: 16px;
    padding: var(--space-lg);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    will-change: transform;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.product-image-container {
    background: linear-gradient(135deg, #fafbfc 0%, #f5f7fa 100%);
    border: 1px solid var(--border-light);
    border-radius: 12px;
    padding: var(--space-3xl);
    margin-bottom: var(--space-lg);
    margin-top: 0;
    position: relative;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    will-change: transform, box-shadow, border-color;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 0;
    font-size: 0;
}

.product-image-container::before {
    content: '';
    position: absolute;
    top: -4px;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--brand-primary), var(--brand-secondary));
    transform: scaleX(0);
    transform-origin: left;
    transition: var(--transition);
    z-index: 10;
    border-radius: 12px 12px 0 0;
}

.product-image-container:hover {
    border-color: var(--brand-primary);
    box-shadow: 0 10px 40px rgba(26, 58, 92, 0.12);
    transform: translateY(-2px);
}

.product-image-container:hover::before {
    transform: scaleX(1);
}

.main-product-image {
    width: 100%;
    max-width: 500px;
    height: 320px;
    max-height: 450px;
    object-fit: contain;
    border-radius: 12px;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), filter 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: block;
    margin: 0 auto;
    padding: 0;
    vertical-align: bottom;
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.08));
    will-change: transform, filter;
    animation: fadeInUp 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.product-image-container:hover .main-product-image {
    transform: scale(1.05);
    filter: drop-shadow(0 8px 20px rgba(26, 58, 92, 0.15));
}

/* ================================================
   VARIANT THUMBNAILS
   ================================================ */
.variant-section {
    margin-top: var(--space-lg);
    padding-top: var(--space-lg);
    border-top: 1px solid var(--border-light);
    margin-bottom: 0;
}

.variant-label {
    font-family: var(--font-primary);
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--brand-primary);
    letter-spacing: 2px;
    margin-bottom: var(--space-md);
    display: block;
    position: relative;
    padding-left: var(--space-md);
    margin-top: 0;
}

.variant-label::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 16px;
    background: linear-gradient(180deg, var(--brand-primary), var(--brand-secondary));
    border-radius: 2px;
}

.variant-thumbnails-container {
    background: linear-gradient(135deg, #f8f9fa 0%, #f0f2f5 100%);
    border: 1px solid var(--border-light);
    border-radius: 14px;
    padding: var(--space-md);
    display: flex;
    gap: var(--space-md);
    flex-wrap: wrap;
    justify-content: center;
    transition: var(--transition);
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.04);
    max-width: 100%;
    overflow-x: hidden;
    width: 100%;
}

.variant-thumbnail {
    width: 80px;
    height: 80px;
    min-width: 80px;
    border: 2px solid var(--border-gray);
    border-radius: 12px;
    padding: 8px;
    background: var(--bg-white);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    will-change: transform, box-shadow, border-color;
    animation: scaleIn 0.4s cubic-bezier(0.4, 0, 0.2, 1) backwards;
    flex-shrink: 0;
    object-fit: contain;
}

.variant-thumbnail:nth-child(1) { animation-delay: 0.1s; }
.variant-thumbnail:nth-child(2) { animation-delay: 0.2s; }
.variant-thumbnail:nth-child(3) { animation-delay: 0.3s; }
.variant-thumbnail:nth-child(4) { animation-delay: 0.4s; }
.variant-thumbnail:nth-child(5) { animation-delay: 0.5s; }

.variant-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 6px;
    transition: var(--transition);
}

.variant-thumbnail:hover {
    border-color: var(--brand-primary);
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 8px 20px rgba(26, 58, 92, 0.25);
}

.variant-thumbnail:active {
    transform: translateY(-2px) scale(0.98);
}

.variant-thumbnail.active {
    border-color: var(--brand-primary);
    border-width: 3px;
    background: linear-gradient(135deg, rgba(26, 58, 92, 0.08) 0%, rgba(14, 160, 230, 0.05) 100%);
    box-shadow: 0 8px 24px rgba(26, 58, 92, 0.3), 0 0 0 3px rgba(26, 58, 92, 0.15);
    transform: translateY(-4px) scale(1.08);
}

.variant-thumbnail.active::after {
    content: '✓';
    position: absolute;
    top: -8px;
    right: -8px;
    width: 24px;
    height: 24px;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
    animation: scaleIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ================================================
   PRODUCT BADGES
   ================================================ */
.product-badge {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 20px;
    font-family: var(--font-primary);
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-right: 8px;
    margin-bottom: 8px;
    animation: fadeInUp 0.5s cubic-bezier(0.4, 0, 0.2, 1) 0.3s backwards;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.product-badge:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.product-badge.badge-new {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: #fff;
}

.product-badge.badge-popular {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: #fff;
}

.product-badge.badge-eco {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: #fff;
}

.product-badge.badge-professional {
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
    color: #fff;
}

.product-badge-container {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: var(--space-lg);
}

/* ================================================
   PRODUCT INFO SECTION
   ================================================ */
.product-info-wrapper {
    display: flex;
    flex-direction: column;
    gap: var(--space-2xl);
    padding-top: 0;
    position: relative;
}

.product-title {
    font-family: var(--font-primary);
    font-size: 52px;
    font-weight: 700;
    color: var(--brand-primary);
    margin: 0 0 var(--space-md) 0;
    letter-spacing: -1.5px;
    line-height: 1.15;
    text-transform: uppercase;
    position: relative;
    padding-bottom: 0;
    text-align: left;
    text-shadow: 0 1px 2px rgba(26, 58, 92, 0.05);
    animation: fadeInUp 0.5s cubic-bezier(0.4, 0, 0.2, 1) 0.2s backwards;
}

.product-variant-info {
    font-family: var(--font-book);
    font-size: 16px;
    font-weight: normal;
    color: var(--text-dark);
    margin: 0 0 var(--space-xl) 0;
    line-height: 28px;
    letter-spacing: 0;
    padding: var(--space-md) var(--space-lg);
    background: linear-gradient(135deg, rgba(26, 58, 92, 0.05) 0%, rgba(14, 160, 230, 0.03) 100%);
    border-left: 4px solid var(--brand-primary);
    border-radius: 10px;
    display: inline-block;
    width: fit-content;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.03);
}

.product-variant-info strong {
    font-family: var(--font-primary);
    color: var(--brand-primary);
    font-weight: 500;
    margin-right: var(--space-xs);
}

/* ================================================
   VOLUMES SECTION
   ================================================ */
.volumes-section {
    margin: 0;
}

.volumes-title {
    font-family: var(--font-primary);
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--brand-primary);
    letter-spacing: 2px;
    margin-bottom: var(--space-lg);
    display: block;
    position: relative;
    padding-left: var(--space-md);
}

.volumes-title::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 16px;
    background: linear-gradient(180deg, var(--brand-primary), var(--brand-secondary));
    border-radius: 2px;
}

.volumes-grid {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: var(--space-md);
    margin: 0;
    padding-top: 4px;
    max-width: 100%;
    overflow-x: hidden;
    width: 100%;
    box-sizing: border-box;
}

.volume-card {
    background: #ffffff;
    border: 2px solid #e0e5eb;
    border-radius: 14px;
    padding: var(--space-lg) var(--space-md);
    text-align: left;
    transition: all 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    position: relative;
    overflow: hidden;
    cursor: pointer;
    margin-top: 4px;
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    animation: slideInRight 0.5s cubic-bezier(0.4, 0, 0.2, 1) backwards;
    flex: 1;
    min-width: 180px;
    max-width: 250px;
}

.volume-card:nth-child(1) { animation-delay: 0.1s; }
.volume-card:nth-child(2) { animation-delay: 0.2s; }
.volume-card:nth-child(3) { animation-delay: 0.3s; }

/* Barre supérieure animée */
.volume-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--brand-primary), var(--brand-secondary));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    z-index: 10;
    border-radius: 14px 14px 0 0;
}

/* Hover state - Subtil et professionnel */
.volume-card:hover {
    border-color: var(--brand-primary);
    box-shadow: 0 8px 24px rgba(26, 58, 92, 0.15);
    transform: translateY(-4px);
}

.volume-card:active {
    transform: translateY(-2px);
}

.volume-card:hover::before {
    transform: scaleX(1);
}

/* Background overlay au hover - Plus subtil */
.volume-card::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(26, 58, 92, 0.02) 0%, rgba(14, 160, 230, 0.03) 100%);
    opacity: 0;
    transition: opacity 0.35s ease;
    border-radius: 14px;
    pointer-events: none;
}

.volume-card:hover::after {
    opacity: 1;
}

.volume-label {
    font-family: var(--font-primary);
    font-size: 10px;
    text-transform: uppercase;
    color: var(--text-gray);
    letter-spacing: 1.5px;
    margin-bottom: var(--space-xs);
    font-weight: 500;
}

.volume-amount {
    font-family: var(--font-primary);
    font-size: 28px;
    font-weight: 700;
    color: var(--brand-primary);
    margin-bottom: var(--space-xs);
    line-height: 1.2;
    letter-spacing: 0;
}

.volume-qty {
    font-family: var(--font-book);
    font-size: 12px;
    color: var(--text-dark);
    margin-bottom: var(--space-sm);
    padding-bottom: var(--space-sm);
    border-bottom: 1px solid var(--border-light);
    line-height: 20px;
    letter-spacing: 0;
}

.volume-qty strong {
    font-family: var(--font-primary);
    color: var(--text-dark);
    font-weight: 500;
}

/* ================================================
   BARCODE SECTION
   ================================================ */
.barcode-section {
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border: 1px solid var(--border-light);
    border-radius: 10px;
    padding: var(--space-sm);
    text-align: center;
    transition: var(--transition);
    margin-top: var(--space-xs);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.barcode-section:hover {
    border-color: var(--brand-primary);
    box-shadow: 0 4px 12px rgba(26, 58, 92, 0.12);
    background: var(--bg-white);
    transform: translateY(-2px);
}

.barcode-label {
    font-family: var(--font-primary);
    font-size: 10px;
    text-transform: uppercase;
    color: var(--text-gray);
    letter-spacing: 1.5px;
    margin-bottom: var(--space-sm);
    font-weight: 500;
}

.barcode-svg {
    display: block !important;
    width: 100% !important;
    height: 40px !important;
    margin: var(--space-xs) auto !important;
    background: transparent !important;
    padding: var(--space-xs) !important;
}

.barcode-svg > rect:first-child {
    display: none !important;
}

.barcode-svg rect,
.barcode-svg g rect {
    fill: var(--text-dark) !important;
    stroke: none !important;
}

.barcode-code {
    font-family: var(--font-mono);
    font-size: 10px;
    color: var(--brand-primary);
    font-weight: 500;
    letter-spacing: 1px;
    margin-top: var(--space-xs);
    word-break: break-all;
}

/* ================================================
   PRODUCT TABS
   ================================================ */
.product-tabs-section {
    margin: var(--space-2xl) 0 0 0;
    margin-bottom: 0;
    border-bottom: 1px solid var(--border-light);
    position: relative;
}

.tabs-buttons {
    display: flex;
    gap: 0;
    margin-bottom: 0;
    flex-wrap: wrap;
    padding-bottom: 0;
    border-bottom: 1px solid var(--border-light);
    max-width: 100%;
    overflow-x: hidden;
    width: 100%;
    box-sizing: border-box;
}

.tab-button {
    font-family: var(--font-primary);
    background: transparent;
    border: none;
    padding: var(--space-md) var(--space-xl);
    font-size: 13px;
    font-weight: 500;
    text-transform: uppercase;
    color: var(--text-gray);
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    letter-spacing: 1.5px;
    position: relative;
    border-radius: 8px 8px 0 0;
    margin-bottom: -1px;
    will-change: transform, background-color, color;
    overflow: hidden;
}

.tab-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--brand-primary) 0%, var(--brand-accent) 100%);
    transform: scaleX(0);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    transform-origin: left;
}

.tab-button:hover {
    color: var(--brand-primary);
    background: linear-gradient(135deg, rgba(26, 58, 92, 0.05) 0%, rgba(14, 160, 230, 0.03) 100%);
    transform: translateY(-2px);
}

.tab-button:hover::before {
    transform: scaleX(1);
}

.tab-button:active {
    transform: translateY(0);
}

.tab-button.active {
    color: var(--text-light);
    background: linear-gradient(135deg, var(--brand-primary) 0%, var(--brand-primary-light) 100%);
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(26, 58, 92, 0.25);
    transform: translateY(-1px);
    border-bottom-color: var(--brand-primary);
}

.tabs-content {
    margin-top: 0;
    padding: var(--space-lg);
    min-height: 120px;
    background: linear-gradient(135deg, #fafbfc 0%, #ffffff 100%);
    border-radius: 0 0 12px 12px;
    border: 1px solid var(--border-light);
    border-top: 2px solid var(--brand-primary);
}

.tab-pane {
    display: none;
    font-family: var(--font-book);
    font-size: 16px;
    line-height: 32px;
    color: var(--text-dark);
    letter-spacing: 0;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1), transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    animation: fadeIn 0.3s ease;
}

.tab-pane.active {
    display: block;
    opacity: 1;
    transform: translateY(0);
    animation: fadeInUp 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.tab-pane p {
    margin-bottom: var(--space-md);
    font-weight: normal;
    font-size: 15px;
    line-height: 1.8;
}

.tab-pane p:last-child {
    margin-bottom: 0;
}

.tab-pane ul {
    list-style: none;
    padding-left: 0;
    padding: 0;
    margin: 0;
}

.tab-pane li {
    font-family: var(--font-book);
    padding: var(--space-md) 0 var(--space-md) var(--space-3xl);
    position: relative;
    font-size: 15px;
    line-height: 1.8;
    color: var(--text-dark);
    margin-bottom: var(--space-sm);
    letter-spacing: 0;
    transition: all 0.3s ease;
    border-radius: 8px;
}

.tab-pane li:hover {
    padding-left: calc(var(--space-3xl) + 5px);
    background: rgba(26, 58, 92, 0.03);
}

.tab-pane li:last-child {
    margin-bottom: 0;
}

.tab-pane li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: #fff;
    font-family: var(--font-primary);
    font-weight: 700;
    font-size: 16px;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(26, 58, 92, 0.1);
    border-radius: 50%;
    font-size: 12px;
}

/* ================================================
   RELATED CATEGORIES SECTION
   ================================================ */
.related-categories-section {
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    position: relative;
    padding: var(--space-4xl) 0;
    overflow: hidden;
    border-top: 1px solid var(--border-light);
}

.related-categories-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--border-light), transparent);
}

.related-categories-title {
    font-family: var(--font-primary);
    font-size: 42px;
    font-weight: 700;
    color: var(--text-dark);
    text-align: center;
    margin: 0 0 var(--space-4xl) 0;
    text-transform: none;
    letter-spacing: -0.5px;
    line-height: 1.2;
    position: relative;
    padding-bottom: 0;
}

.related-categories-title::after {
    content: '';
    position: absolute;
    bottom: -20px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, var(--brand-primary), var(--brand-secondary));
    border-radius: 2px;
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: var(--space-xl);
    margin: 0;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

.category-card {
    background: var(--bg-white);
    border-radius: 20px;
    border: 2px solid var(--border-light);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: var(--space-3xl) var(--space-lg);
    position: relative;
    overflow: hidden;
    will-change: transform, box-shadow, border-color;
    animation: fadeInUp 0.6s cubic-bezier(0.4, 0, 0.2, 1) backwards;
    box-shadow: 0 2px 12px rgba(26, 58, 92, 0.06);
    line-height: 0;
    height: 100%;
}

.category-card:nth-child(1) { animation-delay: 0.1s; }
.category-card:nth-child(2) { animation-delay: 0.2s; }
.category-card:nth-child(3) { animation-delay: 0.3s; }
.category-card:nth-child(4) { animation-delay: 0.4s; }
.category-card:nth-child(5) { animation-delay: 0.5s; }

.category-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--brand-primary), var(--brand-secondary));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 2;
    border-radius: 20px 20px 0 0;
}

.category-card:hover {
    border-color: var(--brand-primary);
    box-shadow: 0 20px 60px rgba(26, 58, 92, 0.2);
    transform: translateY(-12px) scale(1.02);
    background: linear-gradient(135deg, #ffffff 0%, #fafbfc 100%);
}

.category-card:active {
    transform: translateY(-6px) scale(1.01);
}

.category-card:hover::before {
    transform: scaleX(1);
}

.category-card::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 20px;
    background: linear-gradient(135deg, rgba(26, 58, 92, 0.03) 0%, rgba(14, 160, 230, 0.02) 100%);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.category-card:hover::after {
    opacity: 1;
}

/* Category Icon Container */
.category-icon-wrapper {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: var(--space-lg);
    position: relative;
}

.category-icon {
    width: 72px;
    height: 72px;
    border-radius: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    background: linear-gradient(135deg, #1a3a5c 0%, #2c5282 100%);
    box-shadow: 0 12px 28px rgba(26, 58, 92, 0.25);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    z-index: 1;
}

.category-icon::before {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: 22px;
    background: linear-gradient(135deg, var(--brand-primary), var(--brand-secondary));
    opacity: 0;
    transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: -1;
}

.category-icon i {
    font-size: 28px;
    line-height: 1;
    position: relative;
    z-index: 1;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.category-card:hover .category-icon {
    transform: translateY(-4px) scale(1.1) rotate(-5deg);
    box-shadow: 0 20px 48px rgba(26, 58, 92, 0.35);
    background: linear-gradient(135deg, var(--brand-accent) 0%, var(--brand-secondary) 100%);
}

.category-card:hover .category-icon::before {
    opacity: 1;
}

.category-card:hover .category-icon i {
    transform: scale(1.1) rotate(5deg);
}

/* Hide old category-image */
.category-image {
    width: 100%;
    height: 140px;
    object-fit: cover;
    transition: transform 0.3s ease;
    background: linear-gradient(135deg, #f8f9fa 0%, #eef1f5 100%);
    display: block;
    margin: 0;
    padding: 0;
    vertical-align: bottom;
}

.category-card:hover .category-image {
    transform: scale(1.05);
}

.category-name {
    font-family: var(--font-primary);
    text-align: center;
    font-size: 15px;
    font-weight: 600;
    color: var(--text-dark);
    text-transform: none;
    letter-spacing: 0;
    line-height: 1.4;
    transition: color 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    margin: 0;
    padding: 20px 15px;
    position: relative;
    z-index: 1;
}

.category-card:hover .category-name {
    color: var(--brand-primary);
}

/* ================================================
   RESPONSIVE DESIGN
   ================================================ */
@media (max-width: 1200px) {
    .product-layout {
        gap: var(--space-2xl);
    }
    
    .product-title {
        font-size: 42px;
        line-height: 1.2;
    }
}

@media (max-width: 1024px) {
    .product-viewer-container {
        padding: var(--space-3xl) var(--space-2xl);
        border-radius: 20px;
    }
    
    .product-layout {
        grid-template-columns: 1fr;
        gap: var(--space-3xl);
    }
    
    .product-image-wrapper {
        position: relative;
        top: auto;
    }
    
    .product-image-container {
        padding: 25px;
    }
    
    .main-product-image {
        height: 280px;
        max-height: 280px;
    }
    
    .product-title {
        font-size: 36px;
        text-align: center;
    }
    
    .volumes-grid {
        gap: var(--space-md);
    }
    
    .hero-title {
        font-size: 42px;
    }
}

@media (max-width: 768px) {
    /* Ensure no horizontal scroll on mobile */
    html, body {
        overflow-x: hidden !important;
        max-width: 100vw !important;
        width: 100%;
    }
    
    .product-main-section {
        padding: var(--space-xl) 0;
        overflow-x: hidden;
        max-width: 100%;
    }
    
    /* Réduire l'espace entre sections sur tablette */
    .product-main-section + .product-main-section {
        padding-top: var(--space-md);
        margin-top: 0;
    }
    
    .product-viewer-container {
        padding: var(--space-2xl) var(--space-lg);
        margin-top: var(--space-lg);
        margin-bottom: var(--space-lg);
        border-radius: 16px;
    }
    
    .product-layout {
        gap: var(--space-2xl);
        overflow-x: hidden;
        max-width: 100%;
    }
    
    .product-image-container {
        padding: 20px;
        margin-bottom: 25px;
        border-radius: 12px;
    }
    
    .main-product-image {
        height: 250px;
        max-height: 250px;
        max-width: 100%;
    }
    
    .product-badge {
        font-size: 10px;
        padding: 5px 12px;
        margin-right: 6px;
        margin-bottom: 6px;
    }
    
    .product-badge-container {
        justify-content: center;
        margin-bottom: var(--space-md);
    }
    
    .product-title {
        font-size: 28px;
        margin-bottom: 20px;
        text-align: center;
    }
    
    .product-variant-info {
        text-align: center;
        margin: 0 auto var(--space-lg) auto;
        font-size: 14px;
        padding: var(--space-xs) var(--space-sm);
    }
    
    .variant-thumbnails-container {
        gap: 10px;
        margin-top: 20px;
        margin-bottom: 25px;
    }
    
    .variant-thumbnail {
        width: 60px;
        height: 60px;
    }
    
    .variant-section {
        margin-top: 25px;
    }
    
    .volumes-section {
        margin-bottom: 30px;
    }
    
    .volumes-grid {
        flex-direction: row;
        flex-wrap: wrap;
        gap: var(--space-sm);
        margin-bottom: 25px;
    }
    
    .volume-card {
        margin-bottom: 0;
        min-width: 150px;
        max-width: 200px;
    }
    
    .product-tabs-section {
        margin-top: 30px;
        margin-bottom: 20px;
    }
    
    .tabs-buttons {
        gap: 4px;
        margin-bottom: 20px;
    }
    
    .tab-button {
        padding: 12px 15px;
        font-size: 11px;
        margin-bottom: 0;
        letter-spacing: 1px;
        flex: 1;
        min-width: 0;
    }
    
    .tabs-content {
        margin-top: 20px;
        padding: var(--space-md);
    }
    
    .tab-pane {
        font-size: 14px;
        line-height: 24px;
    }
    
    .tab-pane li {
        font-size: 14px;
        line-height: 24px;
        padding: var(--space-sm) 0 var(--space-sm) var(--space-2xl);
    }
    
    .categories-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-lg);
    }
    
    .related-categories-section {
        padding: var(--space-3xl) 0;
    }
    
    .related-categories-title {
        font-size: 28px;
        margin-bottom: var(--space-3xl);
    }
    
    .related-categories-title::after {
        width: 50px;
        height: 3px;
        bottom: -15px;
    }
    
    .category-card {
        padding: var(--space-2xl) var(--space-md);
    }
    
    .category-icon {
        width: 64px;
        height: 64px;
    }
    
    .category-icon i {
        font-size: 24px;
    }
    
    .category-name {
        font-size: 14px;
    }
    
    .product-info-wrapper {
        padding-top: 0;
    }
    
    .hero-content {
        padding: 150px 0px 100px;
    }
    
    .hero-title {
        font-size: 42px;
        line-height: 52px;
    }
    
    .hero-subtitle {
        font-size: 24px;
        padding-top: 10px;
    }
    
    .breadcrumb-custom .breadcrumb-item,
    .breadcrumb-custom .breadcrumb-item a {
        font-size: 16px;
    }
}

@media (max-width: 576px) {
    /* Ensure no horizontal scroll on small screens */
    html, body {
        overflow-x: hidden !important;
        max-width: 100vw !important;
        width: 100%;
    }
    
    .hero-content {
        padding: 100px 0px 80px;
    }
    
    .hero-title {
        font-size: 32px;
        line-height: 42px;
    }
    
    .hero-subtitle {
        font-size: 18px;
        padding-top: 8px;
    }
    
    .breadcrumb-custom .breadcrumb-item,
    .breadcrumb-custom .breadcrumb-item a {
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .product-hero-section {
        padding: 40px 0;
    }
    
    .hero-content {
        padding: 80px 0px 60px;
    }
    
    .hero-title {
        font-size: 28px;
        line-height: 36px;
    }
    
    .hero-subtitle {
        font-size: 18px;
        padding-top: 8px;
    }
    
    .product-main-section {
        padding: var(--space-xl) 0;
    }
    
    /* Réduire encore plus l'espace entre sections sur desktop */
    .product-main-section + .product-main-section {
        padding-top: var(--space-md);
        margin-top: 0;
    }
    
    .product-image-container {
        padding: 15px;
        border-radius: 10px;
    }
    
    .main-product-image {
        height: 220px;
        max-height: 220px;
        max-width: 100%;
    }
    
    .product-title {
        font-size: 22px;
    }
    
    .variant-thumbnail {
        width: 50px;
        height: 50px;
    }
    
    .volume-card {
        padding: var(--space-md) var(--space-sm);
        min-width: 140px;
        max-width: 180px;
    }
    
    .volume-amount {
        font-size: 22px;
    }
    
    .volumes-grid {
        flex-direction: row;
        flex-wrap: wrap;
        gap: var(--space-sm);
    }
    
    .tab-button {
        padding: 10px 12px;
        font-size: 10px;
    }
    
    .categories-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-sm);
    }
    
    .category-card {
        padding: var(--space-lg) var(--space-xs);
    }
    
    .category-icon {
        width: 52px;
        height: 52px;
        border-radius: 14px;
    }
    
    .category-icon i {
        font-size: 20px;
    }
    
    .category-name {
        font-size: 12px;
    }
    
    .related-categories-title {
        font-size: 24px;
        margin-bottom: var(--space-xl);
    }
    
    .related-categories-title::after {
        width: 35px;
        height: 3px;
        bottom: -10px;
    }
}

/* ================================================
   ANIMATIONS - Optimized
   ================================================ */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ================================================
   ACCESSIBILITY
   ================================================ */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .product-page-container {
        animation: none !important;
        background: #e8f4f8 !important;
    }
    
    .main-product-image,
    .variant-thumbnail,
    .volume-card,
    .category-card,
    .product-title,
    .product-viewer-container {
        animation: none !important;
    }
}

.tab-button:focus-visible,
.variant-thumbnail:focus-visible,
.volume-card:focus-visible,
.category-card:focus-visible {
    outline: 2px solid var(--brand-primary);
    outline-offset: 2px;
}

/* ================================================
   PRINT STYLES
   ================================================ */
@media print {
    .product-image-container,
    .variant-section,
    .tabs-buttons,
    .related-categories-section {
        display: none;
    }
    
    .product-title {
        color: #000;
    }
    
    .tab-pane {
        display: block !important;
    }
}
