/* Styles spécifiques à la page de détails produit */

.product-details-page {
    padding-top: 76px;
}

@media (max-width: 768px) {
    .product-details-page {
        padding-top: 60px;
    }
}

/* Galerie d'images */
.product-gallery {
    position: sticky;
    top: 100px;
}

.main-image {
    border: 1px solid #e9ecef;
    border-radius: 10px;
    overflow: hidden;
}

.main-image img {
    width: 100%;
    height: 400px;
    object-fit: cover;
}

.image-thumbnails {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding: 10px 0;
}

.thumbnail {
    width: 80px;
    height: 80px;
    border: 2px solid transparent;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.thumbnail.active {
    border-color: #007bff;
}

.thumbnail:hover {
    border-color: #007bff;
}

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

/* Informations produit */
.product-info {
    padding: 0 20px;
}

@media (max-width: 991px) {
    .product-info {
        padding: 20px 0 0 0;
    }
}

.product-title {
    font-weight: 700;
    color: #212529;
    font-size: 2rem;
    line-height: 1.2;
}

.category-badge .badge {
    font-size: 0.8rem;
    font-weight: 500;
}

.product-rating {
    display: flex;
    align-items: center;
}

.rating-text {
    color: #6c757d;
    font-size: 0.9rem;
}

/* Prix et stock */
.price-stock-section {
    padding: 20px;
    background: #f8f9fa;
    border-radius: 10px;
}

.current-price {
    font-size: 2.5rem;
    font-weight: 700;
    color: #28a745;
}

.stock-info {
    font-size: 1rem;
}

/* Sections */
.section-title {
    font-weight: 600;
    color: #212529;
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.description-text {
    line-height: 1.6;
    color: #495057;
}

/* Caractéristiques */
.features-list {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
}

.feature-item {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #e9ecef;
}

.feature-item:last-child {
    border-bottom: none;
}

.feature-item strong {
    color: #495057;
}

/* Actions produit */
.quantity-selector .form-label {
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.action-buttons .btn {
    padding: 12px 20px;
}

/* Informations artisan */
.artisan-section {
    border-top: 1px solid #e9ecef;
    border-bottom: 1px solid #e9ecef;
}

.artisan-avatar img,
.avatar-placeholder {
    width: 120px;
    height: 120px;
    object-fit: cover;
}

.avatar-placeholder {
    background: #e9ecef;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    color: #6c757d;
}

.artisan-name {
    font-weight: 700;
    color: #212529;
    margin-bottom: 0.5rem;
}

.artisan-bio {
    line-height: 1.6;
    color: #495057;
}

.artisan-stats .badge {
    font-size: 0.9rem;
    padding: 8px 12px;
}

/* Avis et notes */
.rating-summary {
    background: #f8f9fa;
    padding: 30px;
    border-radius: 10px;
}

.average-rating h2 {
    font-weight: 700;
}

.rating-bars {
    max-width: 300px;
}

.rating-bar-item {
    display: flex;
    align-items: center;
    gap: 10px;
}

.star-label {
    width: 50px;
    font-weight: 500;
    color: #495057;
}

.count-label {
    width: 30px;
    text-align: right;
    font-size: 0.9rem;
    color: #6c757d;
}

.progress {
    flex: 1;
    background: #e9ecef;
}

/* Liste des avis */
.review-item:last-child {
    border-bottom: none !important;
    margin-bottom: 0;
    padding-bottom: 0;
}

.review-header {
    margin-bottom: 0.5rem;
}

.review-author {
    color: #212529;
}

.review-comment {
    line-height: 1.6;
    color: #495057;
}

/* Notation dans le modal */
.rating-input {
    display: flex;
    gap: 5px;
    direction: rtl;
}

.rating-input input {
    display: none;
}

.rating-input label {
    cursor: pointer;
    font-size: 2rem;
    color: #e9ecef;
    transition: color 0.3s ease;
}

.rating-input label:hover,
.rating-input label:hover ~ label,
.rating-input input:checked ~ label {
    color: #ffc107;
}

.rating-input input:checked + label {
    color: #ffc107;
}

/* Produits similaires */
.related-products-section {
    border-top: 1px solid #e9ecef;
}

/* Responsive */
@media (max-width: 768px) {
    .product-title {
        font-size: 1.5rem;
    }
    
    .current-price {
        font-size: 2rem;
    }
    
    .main-image img {
        height: 300px;
    }
    
    .artisan-section .row {
        text-align: center;
    }
    
    .artisan-stats {
        justify-content: center;
        margin-top: 1rem;
    }
    
    .rating-summary .row {
        text-align: center;
    }
    
    .rating-bars {
        margin: 0 auto;
    }
}

/* Animations */
.product-gallery,
.product-info {
    animation: fadeInUp 0.6s ease;
}

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

/* Accessibilité */
@media (prefers-reduced-motion: reduce) {
    .product-gallery,
    .product-info {
        animation: none;
    }
}

/* Badges de statut */
.stock-badge {
    font-size: 0.8rem;
    padding: 4px 8px;
}

/* Amélioration de l'accessibilité */
.btn:focus,
.form-select:focus,
.thumbnail:focus {
    outline: 2px solid #007bff;
    outline-offset: 2px;
}

/* Mode sombre (optionnel) */
@media (prefers-color-scheme: dark) {
    .product-details-page {
        background: #1a1d23;
        color: #e9ecef;
    }
    
    .product-title,
    .section-title,
    .review-author {
        color: #f8f9fa;
    }
    
    .description-text,
    .review-comment {
        color: #adb5bd;
    }
    
    .features-list,
    .price-stock-section,
    .rating-summary {
        background: #2d3748;
    }
}