/* Page Produit - Styles Complets */

/* ==================== CLASSES GÉNÉRALES ==================== */

.product-title {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 1rem;
    color: var(--dark-color, #333);
}

.product-short-description {
    color: #666;
    line-height: 1.8;
    margin-bottom: 2rem;
}

.price-info {
    color: #666;
    font-size: 0.9rem;
    margin: 0;
}

.quantity-label {
    font-weight: 600;
}

.feature-text {
    font-size: 0.85rem;
}

.section-title {
    font-weight: 700;
    margin-bottom: 1.5rem;
}

.product-description {
    line-height: 1.8;
    color: #666;
}

.spec-label {
    font-weight: 600;
}

/* ==================== GALERIE D'IMAGES ==================== */

.main-image-wrapper {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    background: #f8f9fa;
    min-height: 500px;
}

.main-image-wrapper img {
    width: 100%;
    height: auto;
    object-fit: contain;
    max-height: 600px;
}

#product-thumbnails {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 10px;
    margin-top: 15px;
}

.thumbnail {
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    border: 3px solid transparent;
    transition: all 0.3s ease;
    position: relative;
}

.thumbnail:hover {
    border-color: #007bff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,123,255,0.2);
}

.thumbnail.active {
    border-color: #007bff;
    box-shadow: 0 0 0 2px rgba(0,123,255,0.1);
}

.thumbnail img {
    width: 100%;
    height: 80px;
    object-fit: cover;
    display: block;
}

/* ==================== VARIANTES ==================== */

.variant-options {
    margin: 20px 0;
}

.variant-group {
    margin-bottom: 20px;
}

.variant-group label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
    color: #333;
}

.color-options,
.size-options {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.color-btn,
.size-btn {
    min-width: 80px;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
}

.color-btn:hover,
.size-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.color-btn.active {
    background-color: #007bff;
    color: white;
    border-color: #007bff;
}

.size-btn.active {
    background-color: #6c757d;
    color: white;
    border-color: #6c757d;
}

.color-btn:disabled,
.size-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    text-decoration: line-through;
}

/* Badge "Sélectionné" */
.color-btn.active::after,
.size-btn.active::after {
    content: '✓';
    position: absolute;
    top: -5px;
    right: -5px;
    background: #28a745;
    color: white;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
}

/* ==================== STOCK INDICATOR ==================== */

.stock-indicator {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.stock-indicator i {
    font-size: 1.1rem;
}

.stock-indicator.in-stock {
    background: linear-gradient(135deg, rgba(40,167,69,0.15), rgba(40,167,69,0.05));
    color: #28a745;
    border: 2px solid rgba(40,167,69,0.3);
}

.stock-indicator.low-stock {
    background: linear-gradient(135deg, rgba(255,193,7,0.15), rgba(255,193,7,0.05));
    color: #ffc107;
    border: 2px solid rgba(255,193,7,0.3);
    animation: pulse 2s infinite;
}

.stock-indicator.out-of-stock {
    background: linear-gradient(135deg, rgba(220,53,69,0.15), rgba(220,53,69,0.05));
    color: #dc3545;
    border: 2px solid rgba(220,53,69,0.3);
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

/* ==================== PRIX ==================== */

.price-section {
    background: linear-gradient(135deg, rgba(255,179,0,0.1), rgba(255,152,0,0.05));
    padding: 25px;
    border-radius: 12px;
    margin: 25px 0;
    border: 2px solid rgba(255,179,0,0.2);
}

.price-current {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--primary-color, #007bff);
    display: inline-block;
}

.price-old {
    font-size: 1.5rem;
    color: #999;
    text-decoration: line-through;
    margin-left: 15px;
}

.badge-discount {
    background: var(--danger-color, #dc3545);
    color: white;
    padding: 8px 15px;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 700;
    margin-left: 10px;
}

/* ==================== QUANTITÉ ==================== */

.quantity-selector {
    display: flex;
    align-items: center;
    gap: 15px;
    margin: 20px 0;
}

.qty-btn {
    width: 40px;
    height: 40px;
    border: 2px solid #dee2e6;
    background: white;
    border-radius: 8px;
    font-size: 1.2rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.qty-btn:hover {
    background: #007bff;
    color: white;
    border-color: #007bff;
    transform: scale(1.1);
}

.qty-input {
    width: 80px;
    height: 40px;
    text-align: center;
    border: 2px solid #dee2e6;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
}

.qty-input:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0,123,255,0.1);
}

/* ==================== BOUTONS D'ACTION ==================== */

.action-buttons {
    display: flex;
    gap: 10px;
    margin: 20px 0;
}

.btn-add-cart {
    flex: 1;
    padding: 15px 30px;
    font-size: 1.1rem;
    font-weight: 700;
    border-radius: 12px;
    background: linear-gradient(135deg, #007bff, #0056b3);
    border: none;
    color: white;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0,123,255,0.3);
}

.btn-add-cart:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,123,255,0.4);
}

.btn-add-cart:active {
    transform: translateY(0);
}

.btn-add-cart:disabled {
    background: #6c757d;
    cursor: not-allowed;
    opacity: 0.6;
}

.btn-wishlist {
    width: 60px;
    height: 60px;
    border: 2px solid #dee2e6;
    background: white;
    border-radius: 12px;
    font-size: 1.5rem;
    color: #dc3545;
    transition: all 0.3s ease;
}

.btn-wishlist:hover {
    background: #dc3545;
    color: white;
    border-color: #dc3545;
    transform: scale(1.1);
}

/* ==================== LIVRAISON ==================== */

.shipping-method {
    padding: 15px;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.shipping-method:hover {
    background: #f8f9fa;
}

.shipping-method:last-child {
    border-bottom: none !important;
}

/* ==================== FEATURES ==================== */

.feature-icon-wrapper {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(0,123,255,0.1), rgba(0,123,255,0.05));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    color: #007bff;
}

/* ==================== TABS ==================== */

.tabs-modern {
    border-bottom: 2px solid #dee2e6;
    display: flex;
    gap: 30px;
    margin: 40px 0 30px 0;
}

.tab-modern {
    padding: 15px 0;
    border-bottom: 3px solid transparent;
    cursor: pointer;
    font-weight: 600;
    color: #6c757d;
    transition: all 0.3s ease;
    position: relative;
}

.tab-modern:hover {
    color: #007bff;
}

.tab-modern.active {
    color: #007bff;
    border-bottom-color: #007bff;
}

.tab-modern.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #007bff, #0056b3);
    border-radius: 3px 3px 0 0;
}

.tab-content-modern {
    display: none;
    padding: 30px 0;
    animation: fadeIn 0.3s ease;
}

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

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

/* ==================== RESPONSIVE ==================== */

@media (max-width: 768px) {
    .main-image-wrapper {
        min-height: 300px;
    }
    
    .main-image-wrapper img {
        max-height: 400px;
    }
    
    #product-thumbnails {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .price-current {
        font-size: 2rem;
    }
    
    .price-old {
        font-size: 1.2rem;
    }
    
    .tabs-modern {
        gap: 15px;
        overflow-x: auto;
    }
    
    .tab-modern {
        white-space: nowrap;
    }
    
    .action-buttons {
        flex-direction: column;
    }
    
    .btn-wishlist {
        width: 100%;
    }
}

/* ==================== ANIMATIONS ==================== */

.fade-in {
    animation: fadeIn 0.5s ease;
}

.slide-up {
    animation: slideUp 0.5s ease;
}

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

/* ==================== NOTIFICATIONS ==================== */

.notification-toast {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    min-width: 300px;
    animation: slideInRight 0.3s ease;
}

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

/* ==================== LOADING ==================== */

.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 0.8s linear infinite;
}

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

/* ==================== SLIDER D'IMAGES DESCRIPTION ==================== */

.description-image-slider {
    position: relative;
    width: 100%;
    max-width: 800px;
    margin: 2rem auto;
    overflow: hidden;
    border-radius: var(--border-radius, 12px);
    box-shadow: var(--shadow-md, 0 4px 16px rgba(0,0,0,0.12));
}

.slider-container {
    display: flex;
    transition: transform 0.5s ease-in-out;
}

.slider-container img {
    width: 100%;
    flex-shrink: 0;
    object-fit: contain;
    max-height: 500px;
}

.slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    padding: 1rem;
    cursor: pointer;
    font-size: 1.5rem;
    transition: background 0.3s;
    z-index: 10;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.slider-btn:hover {
    background: rgba(0, 0, 0, 0.8);
}

.slider-btn.prev {
    left: 10px;
}

.slider-btn.next {
    right: 10px;
}

.slider-indicators {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1rem;
}

.slider-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #ccc;
    cursor: pointer;
    transition: background 0.3s;
}

.slider-indicator.active {
    background: var(--primary-color, #ffb300);
    width: 30px;
    border-radius: 6px;
}

/* ==================== VARIANTES PRODUIT ==================== */

.variants-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 0.75rem;
}

.variant-option {
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    padding: 1rem;
    cursor: pointer;
    transition: all 0.3s;
    text-align: center;
}

.variant-option:hover {
    border-color: var(--primary-color, #ffb300);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 179, 0, 0.2);
}

.variant-name {
    font-weight: 600;
    color: #333;
    margin-bottom: 0.5rem;
}

.variant-price {
    font-size: 1.1rem;
    color: var(--primary-color, #ffb300);
    font-weight: 700;
}

.variant-stock-available {
    font-size: 0.85rem;
    color: #28a745;
    margin-top: 0.25rem;
}

.variant-stock-unavailable {
    font-size: 0.85rem;
    color: #dc3545;
    margin-top: 0.25rem;
}

/* ==================== TEXTES ET TITRES ==================== */

.product-description-text {
    line-height: 1.8;
    color: #666;
    margin-top: 2rem;
}

.subsection-title {
    font-weight: 600;
    margin-bottom: 1rem;
}

.link-see-more {
    color: var(--primary-color, #ffb300);
    font-weight: 600;
    text-decoration: none;
}

.link-see-more:hover {
    text-decoration: underline;
}

.product-material-text,
.product-brand-text {
    color: #666;
}

.spec-value {
    font-weight: 600;
}

.review-title {
    font-weight: 600;
    margin: 0.5rem 0;
}

.review-text {
    color: #666;
    line-height: 1.6;
}

.related-product-link {
    color: inherit;
    text-decoration: none;
}

/* ==================== AVIS ==================== */

.review-image {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 4px;
}

.review-images {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.no-reviews-icon {
    font-size: 3rem;
    color: #ccc;
    margin-bottom: 1rem;
}

.no-reviews-text {
    color: #666;
    font-size: 1.1rem;
}

.no-reviews-subtext {
    color: #999;
}

.average-rating-display {
    font-size: 3rem;
    font-weight: 800;
    color: var(--primary-color, #ffb300);
}

.no-rating-display {
    font-size: 2rem;
    font-weight: 600;
    color: #999;
    padding: 2rem 0;
}

/* ==================== PRODUITS SIMILAIRES ==================== */

.related-products-title {
    font-weight: 800;
    margin-bottom: 2rem;
}
