/* Style global */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f9f9f9;
    color: #333;
}

h1, h2 {
    text-align: center;
    color: #222;
}

/* Section principale du produit */
.product-details {
    max-width: 1200px;
    margin: auto;
    padding: 20px;
    background-color: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.05);
}

/* Image principale */
.image-gallery {
    text-align: center;
    margin-bottom: 20px;
}

.image-gallery img {
    width: 100%;
    max-width: 400px;
    height: auto;
    border-radius: 10px;
}

/* Miniatures */
.thumbnail-gallery {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    margin: 10px 0;
}

.thumbnail {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border: 2px solid #ddd;
    border-radius: 6px;
    cursor: pointer;
    transition: transform 0.2s;
}

.thumbnail:hover {
    transform: scale(1.05);
    border-color: #007BFF;
}

/* Détails commande */
.product_orders {
    padding: 15px;
    background-color: #f4f4f4;
    border-radius: 8px;
    margin-top: 20px;
    text-align: center;
}

.price {
    font-size: 20px;
    font-weight: bold;
    color: #c0392b;
    margin: 10px 0;
}

.original-price {
    font-size: 15px;
    color: #999;
    text-decoration: line-through;
}

.views {
    font-size: 14px;
    color: #555;
}

/* Quantité + bouton panier */
.quantity-section {
    margin-top: 15px;
}

.quantity-label {
    margin-right: 10px;
}

.quantity-input {
    width: 60px;
    padding: 5px;
}

.add-to-cart-btn {
    margin-top: 15px;
    background-color: #28a745;
    color: white;
    padding: 10px 20px;
    font-size: 16px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
}

.add-to-cart-btn:hover {
    background-color: #218838;
}

/* Boutons de partage */
.share-buttons {
    text-align: center;
    margin-top: 30px;
    margin-bottom: 30px;
}

.share-buttons a {
    display: inline-block;
    margin: 4px 6px;
    color: white;
    background-color: #007bff;
    padding: 3px 7px;
    border-radius: 6px;
    text-decoration: none;
    transition: background-color 0.2s;
}

.share-buttons a:hover {
    background-color: #0056b3;
}

/* Fiche technique */
.product-specifications {
    margin-top: 40px;
}

.product-specifications table {
    width: 100%;
    border-collapse: collapse;
}

.product-specifications td {
    border: 1px solid #ccc;
    padding: 10px;
}

.tabllee {
    font-weight: bold;
    background-color: #f1f1f1;
}

/* Images supplémentaires */
.additional-images {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.additional-image {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: 5px;
    border: 1px solid #ccc;
}

/* Grille responsive pour les produits similaires */
.similar-products-grid {
    display: grid;
    gap: 20px;
    margin-top: 30px;
    padding: 20px;
}

.product-card {
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 10px;
    padding: 8px;
     margin: 3px;
    text-align: center;
    transition: transform 0.2s;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}


/* Section principale */
.product-reviews {
    max-width: 700px;
    margin: 40px auto;
    padding: 20px;
    background: #fefefe;
    border: 1px solid #ddd;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
    font-family: Arial, sans-serif;
}

/* Titre */
.product-reviews h2,
.product-reviews h3 {
    margin-bottom: 20px;
    color: #333;
    font-size: 22px;
}

/* Formulaire */
.product-reviews form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* Champs texte */
.product-reviews input[type="text"],
.product-reviews textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 16px;
}

/* Zone d'étoiles */
.star-rating {
    display: flex;
    flex-direction: row-reverse;
    justify-content: flex-start;
    gap: 5px;
}

.star-rating input[type="radio"] {
    display: none;
}

.star-rating .star {
    font-size: 24px;
    color: #ccc;
    cursor: pointer;
    transition: color 0.2s;
}

/* Étoiles colorées quand sélectionnées */
.star-rating input:checked ~ label.star,
.star-rating input:hover ~ label.star,
.star-rating label.star:hover,
.star-rating label.star:hover ~ label.star {
    color: #ffc107;
}

/* Commentaire */
.product-reviews textarea {
    resize: vertical;
}

/* Bouton */
.product-reviews button[type="submit"] {
    background-color: #28a745;
    color: white;
    border: none;
    padding: 6px;
    font-size: 16px;
    cursor: pointer;
    border-radius: 6px;
    transition: background-color 0.3s ease;
}

.product-reviews button[type="submit"]:hover {
    background-color: #218838;
}

/* Liste des avis */
.review-list {
    margin-top: 30px;
}

.review {
    margin-bottom: 20px;
    background: #f8f9fa;
    padding: 15px;
    border-radius: 6px;
    border-left: 4px solid #28a745;
}

.review p {
    margin: 5px 0;
    color: #444;
}

.review small {
    color: #777;
    font-size: 13px;
}

/* Responsive */
@media (max-width: 600px) {
    .product-reviews {
        padding: 15px;
    }

    .star-rating .star {
        font-size: 20px;
    }

    .product-reviews h2,
    .product-reviews h3 {
        font-size: 20px;
    }
}

.average-rating {
    margin-bottom: 20px;
    font-size: 18px;
    color: #444;
    text-align:center;
}

.average-rating .stars {
    display: inline-block;
    margin: 0 5px;
}

.average-rating .star {
    font-size: 20px;
    color: #ffc107;
}

.average-rating .star.empty {
    color: #ccc;
}

.average-rating .star.half::before {
    content: "\2605";
    position: absolute;
    overflow: hidden;
    color: #ffc107;
    width: 50%;
}


/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin: 30px auto;
    padding: 10px 0;
}

.pagination a {
    display: inline-block;
    padding: 10px 16px;
    border-radius: 6px;
    background-color: #f1f1f1;
    color: #333;
    text-decoration: none;
    font-weight: 500;
    transition: background-color 0.3s, color 0.3s;
    border: 1px solid #ccc;
    min-width: 40px;
    text-align: center;
}

.pagination a:hover {
    background-color: #007bff;
    color: #fff;
    border-color: #007bff;
}

.pagination a.active {
    background-color: #28a745;
    color: #fff;
    font-weight: bold;
    border-color: #28a745;
}

/* Boutons Précédent/Suivant */
.pagination a.prev,
.pagination a.next {
    font-weight: bold;
    background-color: #e9ecef;
}

.pagination a.prev:hover,
.pagination a.next:hover {
    background-color: #17a2b8;
    color: white;
    border-color: #17a2b8;
}

/* Responsive (centrer sur mobile) */
@media (max-width: 576px) {
    .pagination {
        gap: 6px;
    }

    .pagination a {
        padding: 8px 12px;
        font-size: 14px;
    }
}



/* Responsive grid */
@media (min-width: 1200px) {
    .similar-products-grid {
        grid-template-columns: repeat(5, 1fr);
    }
}

@media (max-width: 1199px) and (min-width: 992px) {
    .similar-products-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 991px) and (min-width: 768px) {
    .similar-products-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 767px) {
    .similar-products-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.variant-box {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    border: 1px solid #ddd;
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 15px;
    background-color: #f9f9f9;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.color-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    margin-right: 15px;
    border: 2px solid #ccc;
}

.variant-info p {
    margin: 5px 0;
    font-size: 15px;
    color: #333;
}

.variant-size {
    font-weight: bold;
    color: #444;
}

.variant-price {
    color: #444;
}

.variant-promo {
    color: #e60000;
    font-weight: bold;
    background-color: #ffe5e5;
    padding: 5px 10px;
    border-radius: 6px;
    display: inline-block;
}

.variant-stock {
    font-size: 14px;
    color: #888;
}

.countdown {
    margin-top: 10px;
    color: #0066cc;
    font-weight: bold;
}

@media screen and (max-width: 600px) {
    .variant-box {
        flex-direction: column;
        align-items: flex-start;
    }

    .color-circle {
        margin-bottom: 10px;
    }
}
.variant-box {
    display: flex;
    align-items: flex-start;
    padding: 1rem;
    margin-bottom: 1rem;
    border: 1px solid #ddd;
    border-radius: 12px;
    background-color: #fff;
    flex-wrap: wrap;
}

.color-circle {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 2px solid #ccc;
    margin-right: 1rem;
}

.variant-info {
    flex: 1;
}

.variant-size,
.variant-price,
.variant-promo,
.variant-stock {
    margin: 0.3rem 0;
    font-size: 16px;
}

.variant-promo {
    color: #e53935;
    font-weight: bold;
}

.promo-badge {
    background-color: #ff9800;
    color: #fff;
    padding: 2px 6px;
    margin-left: 10px;
    border-radius: 8px;
    font-size: 13px;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(255, 152, 0, 0.6); }
    70% { box-shadow: 0 0 0 10px rgba(255, 152, 0, 0); }
    100% { box-shadow: 0 0 0 0 rgba(255, 152, 0, 0); }
}

.countdown {
    font-size: 14px;
    margin-top: 5px;
    color: #555;
}

.timer {
    font-weight: bold;
    color: #000;
}





