/* ===== PRODUCT DETAILS ===== */
.product-details {
    padding: var(--space-12) 0;
    max-width: 100%;
    overflow-x: hidden;
}

.product-details .container {
    max-width: 100%;
    overflow-x: hidden;
}

.product-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-12);
    align-items: start;
    max-width: 100%;
    overflow-x: hidden;
}

/* ===== PRODUCT GALLERY ===== */
.product-gallery {
    position: sticky;
    top: 100px;
    max-width: 100%;
    overflow-x: hidden;
}

.gallery-main {
    position: relative;
    border-radius: var(--radius-xl);
    overflow: hidden;
    margin-bottom: var(--space-6);
    background-color: var(--gray-50);
}

.main-image-container {
    position: relative;
    width: 100%;
    height: 500px;
    overflow: hidden;
}

.product-image-badges {
    position: absolute;
    top: var(--space-4);
    left: var(--space-4);
    z-index: 3;
    display: flex;
    gap: var(--space-2);
}

.main-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-normal);
}

.image-zoom {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-size: 200%;
    background-position: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition-fast);
}

.main-image-container:hover .image-zoom {
    opacity: 1;
}

.gallery-controls {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 100%;
    display: flex;
    justify-content: space-between;
    padding: 0 var(--space-4);
    pointer-events: none;
}

.gallery-nav {
    width: 48px;
    height: 48px;
    background-color: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--transition-fast);
    pointer-events: all;
    box-shadow: var(--shadow-md);
}

.gallery-nav:hover {
    background-color: var(--white);
    transform: scale(1.1);
}

.gallery-nav i {
    color: var(--gray-700);
    font-size: var(--text-lg);
}

.gallery-thumbnails {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-3);
}

.thumbnail {
    position: relative;
    height: 80px;
    border-radius: var(--radius-lg);
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all var(--transition-fast);
}

.thumbnail:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.thumbnail.active {
    border-color: var(--primary-color);
}

.thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ===== PRODUCT INFO ===== */
.product-info {
    padding: var(--space-6) 0;
    max-width: 100%;
    overflow-x: hidden;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.product-header {
    margin-bottom: var(--space-8);
    max-width: 100%;
    overflow-x: hidden;
}

.product-badges {
    display: flex;
    gap: var(--space-2);
    margin-bottom: var(--space-4);
    flex-wrap: wrap;
    max-width: 100%;
}

.badge {
    padding: var(--space-1) var(--space-3);
    border-radius: var(--radius-full);
    font-size: var(--text-xs);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background-color: var(--gray-500);
    color: var(--white);
}

/* Couleurs spécifiques pour chaque badge */
.badge-premium {
    background-color: #f59e0b;
    color: var(--white);
}

.badge-personnalisable {
    background-color: #10b981;
    color: var(--white);
}

.badge-category {
    background-color: #10b981;
    color: var(--white);
}

.badge-certifie {
    background-color: #059669;
    color: var(--white);
}

.badge-alimentaire {
    background-color: #3b82f6;
    color: var(--white);
}

.badge-hygiene {
    background-color: #06b6d4;
    color: var(--white);
}

.badge-securite {
    background-color: #ef4444;
    color: var(--white);
}

.badge-ecologique {
    background-color: #10b981;
    color: var(--white);
}

.badge-professionnel {
    background-color: #6366f1;
    color: var(--white);
}

.badge-antiseptique {
    background-color: #8b5cf6;
    color: var(--white);
}

.badge-emballage {
    background-color: #f97316;
    color: var(--white);
}

.badge-aluminium {
    background-color: #64748b;
    color: var(--white);
}

.badge-impression {
    background-color: #ec4899;
    color: var(--white);
}

.badge-couverts {
    background-color: #14b8a6;
    color: var(--white);
}

.badge-accessoire {
    background-color: #0ea5e9;
    color: var(--white);
}

.badge-plastique {
    background-color: #06b6d4;
    color: var(--white);
}

.badge-sac {
    background-color: #84cc16;
    color: var(--white);
}

.badge-transport {
    background-color: #a855f7;
    color: var(--white);
}

.badge-scelle {
    background-color: #dc2626;
    color: var(--white);
}

.badge-plomb {
    background-color: #7c3aed;
    color: var(--white);
}

.product-title {
    font-size: var(--text-4xl);
    font-weight: 700;
    margin-bottom: var(--space-4);
    color: var(--gray-900);
    line-height: 1.2;
    word-wrap: break-word;
    overflow-wrap: break-word;
    max-width: 100%;
}

.product-rating {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    margin-bottom: var(--space-6);
    flex-wrap: wrap;
    max-width: 100%;
}

.stars {
    display: flex;
    gap: var(--space-1);
}

.stars i {
    color: var(--accent-color);
    font-size: var(--text-lg);
}

.rating-text {
    color: var(--gray-600);
    font-size: var(--text-sm);
}

.product-price {
    display: flex;
    align-items: baseline;
    gap: var(--space-2);
    margin-bottom: var(--space-6);
    flex-wrap: wrap;
    max-width: 100%;
}

.price-label {
    color: var(--gray-600);
    font-size: var(--text-sm);
}

.price-amount {
    font-size: var(--text-3xl);
    font-weight: 700;
    color: var(--primary-color);
}

.price-unit {
    color: var(--gray-600);
    font-size: var(--text-lg);
}

.product-description {
    margin-bottom: var(--space-8);
}

.product-description p {
    font-size: var(--text-lg);
    line-height: 1.7;
    color: var(--gray-700);
    word-wrap: break-word;
    overflow-wrap: break-word;
    max-width: 100%;
}

/* ===== PRODUCT VARIATIONS ===== */
.product-variations {
    margin-bottom: var(--space-8);
    max-width: 100%;
    overflow-x: hidden;
}

.variation-group {
    margin-bottom: var(--space-6);
}

.variation-group:last-child {
    margin-bottom: 0;
}

.variation-label {
    display: block;
    font-size: var(--text-base);
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: var(--space-4);
}

.quantity-options,
.fragrance-options,
.format-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: var(--space-3);
    max-width: 100%;
    overflow-x: hidden;
}

.quantity-option,
.fragrance-option,
.format-option {
    position: relative;
    cursor: pointer;
}

.quantity-option input,
.fragrance-option input,
.format-option input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.option-content {
    display: block;
    padding: var(--space-4);
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-lg);
    background-color: var(--white);
    transition: all var(--transition-fast);
    text-align: center;
    word-wrap: break-word;
    overflow-wrap: break-word;
    max-width: 100%;
}

.quantity-option input:checked + .option-content,
.fragrance-option input:checked + .option-content,
.format-option input:checked + .option-content {
    border-color: var(--primary-color);
    background-color: var(--primary-color);
    color: var(--white);
}

.quantity-option:hover .option-content,
.fragrance-option:hover .option-content,
.format-option:hover .option-content {
    border-color: var(--primary-light);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.option-title {
    display: block;
    font-weight: 600;
    margin-bottom: var(--space-1);
}

.option-desc {
    display: block;
    font-size: var(--text-sm);
    opacity: 0.8;
}

/* Customization Options */
.customization-options {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
}

.customization-option {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    cursor: pointer;
    padding: var(--space-3);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    background-color: var(--white);
    transition: all var(--transition-fast);
}

.customization-option:hover {
    border-color: var(--primary-light);
    background-color: var(--gray-50);
}

.customization-option input[type="checkbox"] {
    width: 20px;
    height: 20px;
    accent-color: var(--primary-color);
}

.option-content {
    flex: 1;
}

/* ===== PRODUCT ACTIONS ===== */
.product-actions {
    margin-bottom: var(--space-8);
    max-width: 100%;
    overflow-x: hidden;
}

.btn-order {
    width: 100%;
    margin-bottom: var(--space-4);
    font-size: var(--text-lg);
    padding: var(--space-4) var(--space-8);
    max-width: 100%;
    box-sizing: border-box;
}

.secondary-actions {
    display: flex;
    gap: var(--space-3);
    max-width: 100%;
    flex-wrap: wrap;
}

.btn-question,
.btn-wishlist {
    flex: 1;
    justify-content: center;
}

/* ===== PRODUCT TRUST ===== */
.product-trust {
    display: flex;
    justify-content: space-around;
    padding: var(--space-6);
    background-color: var(--gray-50);
    border-radius: var(--radius-xl);
    margin-bottom: var(--space-8);
    max-width: 100%;
    flex-wrap: wrap;
    gap: var(--space-4);
}

.trust-item {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    color: var(--gray-600);
    font-size: var(--text-sm);
}

.trust-item i {
    color: var(--primary-color);
    font-size: var(--text-lg);
}

/* ===== PRODUCT SPECIFICATIONS ===== */
.product-specs {
    padding: var(--space-16) 0;
    background-color: var(--gray-50);
}

.specs-tabs {
    max-width: 800px;
    margin: 0 auto;
}

.tabs-header {
    display: flex;
    border-bottom: 2px solid var(--gray-200);
    margin-bottom: var(--space-8);
    overflow-x: auto;
}

.tab-btn {
    padding: var(--space-4) var(--space-6);
    background: none;
    border: none;
    color: var(--gray-600);
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-fast);
    white-space: nowrap;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
}

.tab-btn:hover {
    color: var(--primary-color);
}

.tab-btn.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

.tabs-content {
    position: relative;
}

.tab-content {
    display: none;
    animation: fadeIn 0.3s ease-in-out;
}

.tab-content.active {
    display: block;
}

/* Specifications Tab */
.specs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--space-6);
}

.spec-item {
    padding: var(--space-6);
    background-color: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

.spec-item h4 {
    font-size: var(--text-lg);
    margin-bottom: var(--space-3);
    color: var(--gray-900);
}

.spec-item p {
    color: var(--gray-600);
    line-height: 1.6;
    margin-bottom: 0;
}

/* Usage Tab */
.usage-content {
    background-color: var(--white);
    padding: var(--space-8);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-sm);
}

.usage-content h3 {
    font-size: var(--text-xl);
    margin-bottom: var(--space-4);
    color: var(--gray-900);
}

.usage-content ol,
.usage-content ul {
    margin-bottom: var(--space-6);
}

.usage-content li {
    margin-bottom: var(--space-2);
    color: var(--gray-700);
    line-height: 1.6;
}

.usage-content ol {
    counter-reset: step-counter;
}

.usage-content ol li {
    counter-increment: step-counter;
    position: relative;
    padding-left: var(--space-8);
}

.usage-content ol li::before {
    content: counter(step-counter);
    position: absolute;
    left: 0;
    top: 0;
    width: 24px;
    height: 24px;
    background-color: var(--primary-color);
    color: var(--white);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--text-sm);
    font-weight: 600;
}

/* Certifications Tab */
.certifications-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--space-6);
}

.certification-item {
    text-align: center;
    padding: var(--space-6);
    background-color: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

.certification-item img {
    width: 80px;
    height: 80px;
    margin: 0 auto var(--space-4);
    object-fit: contain;
}

.certification-item h4 {
    font-size: var(--text-lg);
    margin-bottom: var(--space-2);
    color: var(--gray-900);
}

.certification-item p {
    color: var(--gray-600);
    margin-bottom: 0;
}

/* Reviews Tab */
.reviews-content {
    background-color: var(--white);
    padding: var(--space-8);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-sm);
}

.reviews-summary {
    margin-bottom: var(--space-8);
    padding-bottom: var(--space-6);
    border-bottom: 1px solid var(--gray-200);
}

.rating-overview {
    text-align: center;
}

.overall-rating {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-2);
}

.rating-number {
    font-size: var(--text-4xl);
    font-weight: 700;
    color: var(--primary-color);
}

.total-reviews {
    color: var(--gray-600);
    font-size: var(--text-sm);
}

.reviews-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-6);
}

.review-item {
    padding: var(--space-6);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    background-color: var(--gray-50);
}

.review-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: var(--space-4);
}

.reviewer-info {
    display: flex;
    align-items: center;
    gap: var(--space-3);
}

.reviewer-info img {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-full);
    object-fit: cover;
}

.reviewer-info h4 {
    font-size: var(--text-base);
    margin-bottom: var(--space-1);
    color: var(--gray-900);
}

.review-date {
    color: var(--gray-500);
    font-size: var(--text-sm);
}

.review-item p {
    color: var(--gray-700);
    line-height: 1.6;
    margin-bottom: 0;
    font-style: italic;
}

/* ===== RELATED PRODUCTS ===== */
.related-products {
    padding: var(--space-16) 0;
    background-color: var(--white);
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 1024px) {
    .product-layout {
        grid-template-columns: 1fr;
        gap: var(--space-8);
        max-width: 100%;
    }
    
    .product-gallery {
        position: static;
        max-width: 100%;
    }
    
    .product-info {
        max-width: 100%;
    }
    
    .main-image-container {
        height: 400px;
    }
    
    .gallery-thumbnails {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 768px) {
    .product-title {
        font-size: var(--text-3xl);
    }
    
    .price-amount {
        font-size: var(--text-2xl);
    }
    
    .main-image-container {
        height: 300px;
    }
    
    .gallery-thumbnails {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .quantity-options,
    .fragrance-options,
    .format-options {
        grid-template-columns: 1fr;
    }
    
    .secondary-actions {
        flex-direction: column;
    }
    
    .product-trust {
        flex-direction: column;
        gap: var(--space-4);
        text-align: center;
    }
    
    .tabs-header {
        flex-wrap: wrap;
    }
    
    .tab-btn {
        flex: 1;
        min-width: 120px;
    }
    
    .specs-grid {
        grid-template-columns: 1fr;
    }
    
    .certifications-content {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .gallery-thumbnails {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .gallery-controls {
        padding: 0 var(--space-2);
    }
    
    .gallery-nav {
        width: 40px;
        height: 40px;
    }
    
    .product-badges {
        flex-wrap: wrap;
    }
    
    .review-header {
        flex-direction: column;
        gap: var(--space-3);
    }
}

/* ===== ANIMATIONS ===== */
.product-gallery {
    animation: slideUp 0.5s ease-out;
}

.product-info {
    animation: slideUp 0.5s ease-out 0.1s both;
}

.product-variations {
    animation: slideUp 0.5s ease-out 0.2s both;
}

.product-actions {
    animation: slideUp 0.5s ease-out 0.3s both;
}

/* ===== ACCESSIBILITY ===== */
.gallery-nav:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgb(21 88 44 / 0.1);
}

.tab-btn:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgb(21 88 44 / 0.1);
}

.quantity-option input:focus + .option-content,
.fragrance-option input:focus + .option-content,
.format-option input:focus + .option-content {
    box-shadow: 0 0 0 3px rgb(21 88 44 / 0.1);
}

/* ===== ZOOM FUNCTIONALITY ===== */
.main-image-container:hover .main-image {
    transform: scale(1.05);
}

.image-zoom {
    background-image: var(--zoom-image);
    background-repeat: no-repeat;
    background-size: 300%;
} 