body {
    font-family: 'Montserrat', sans-serif;
}

/* Cartes grisées si stock à 0 */
.grise {
    opacity: 0.5;
    filter: grayscale(1);
}

.boutique-content {
    display: flex;
    flex-wrap: wrap;
    flex-direction: column;
    gap: 20px;
    padding: 20px;
}

.boutique-content h1 {
    text-align: center;
    margin-top: 40px;
    margin-bottom: 20px;
    margin-left: 50px;
    font-size: 2rem;
    color: #333;
}


.boutique-content h2 {
    text-align: center;
    margin-top: 20px;
    margin-bottom: 10px;
    margin-left: 50px;
    font-size: 1.5rem;
    color: #333;
}

.boutique-content p {
    text-align: center;
    font-size: 1.2rem;
    color: #555;
    margin-bottom: 20px;
}

.cartes-produits {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 100px;
    justify-content: center;
}

.carte-produit {
    display: flex;
    flex-direction: column;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 10);
    padding: 1rem;
    width: 220px;
    text-align: center;
}

.marque-produit {
    text-align: right;
    color: #222;
    border-radius: 12px;
    font-size: 0.75em;
    font-weight: bold;
    z-index: 2;
}


.carte-produit img {
    width: 120px;
    /* largeur fixe */
    height: 120px;
    object-fit: contain;
    border-radius: 8px;
    display: block;
    margin: 0 auto;
}

.bottom-card {
    display: flex;
    align-items: center;
    margin-top: 10px;
    width: 100%;
}

.carte-produit .prix {
    width: 80%;
    font-weight: bold;
    color: black;
    font-size: 1.2rem;
    text-align: left;
}

.fa-shopping-cart {
    width: 40px;
    font-size: 1rem;
    background-color: #ffaa00;
    color: #333;
    cursor: pointer;
    border: none;
    border-radius: 8px;
    padding: 8px 0;
    transition: background 0.2s, color 0.2s;
    outline: none;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
    display: inline-block;
    margin: 0 auto;
}

.fa-shopping-cart:active,
.fa-shopping-cart:focus {
    background-color: #ffd700;
    color: #222;
}




/* Modal moderne et propre */
.modal-produit {
    position: fixed;
    inset: 0;
    background: rgba(10, 15, 20, 0.6);
    backdrop-filter: blur(4px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-content {
    background: #ffffff;
    border-radius: 12px;
    padding: 16px;
    width: 100%;
    max-width: 920px;
    box-shadow: 0 10px 30px rgba(8, 12, 20, 0.28);
    position: relative;
    display: grid;
    grid-template-columns: 1fr 1.25fr;
    gap: 20px;
    align-items: start;
    /* align items to top so right column starts at same height */
    overflow: hidden;
}

.close-modal {
    position: absolute;
    top: 14px;
    right: 14px;
    font-size: 1.4rem;
    cursor: pointer;
    color: #333;
    background: #f5f5f5;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.modal-flex {
    display: contents;
}

.modal-left {
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: center;
    justify-content: center;
    /* center the image within the left column */
    min-height: 0;
    /* allow the grid row to control height */
}

.modal-carousel {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: center;
}

.modal-carousel .carousel-img {
    width: 100%;
    max-width: 520px;
    max-height: 480px;
    height: auto;
    border-radius: 10px;
    object-fit: contain;
    display: block;
    margin: 0 auto;
}

.modal-left .couleurs-disponibles {
    margin-top: 6px;
}

.modal-right {
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-height: 220px;
    /* ensure content starts at top/left */
}

.modal-right h2 {
    margin: 0;
    font-size: 1.35rem;
    color: #111;
}

/* Center only the product name inside the modal while keeping other
   description lines left-aligned. */
.modal-right #modal-nom {
    text-align: center !important;
    width: 100%;
}

.modal-description-item {
    padding: 8px 0;
    margin: 0;
    color: #333;
    line-height: 1.45;
    border-bottom: 1px dashed #f5f5f5;
}

.modal-description,
.modal-description-item {
    text-align: left;
}

/* Ensure modal text (paragraphs/spans) are left-aligned even if higher-level rules
   (like .boutique-content p { text-align: center }) exist. Use a more specific
   selector and !important to override other styles reliably. */
.modal-content .modal-description,
.modal-content .modal-description-item,
.modal-content .modal-description p,
.modal-content .modal-description span,
.modal-content .modal-right h2,
.modal-content .modal-right .muted-text {
    text-align: left !important;
}

.modal-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 10px;
    padding-top: 8px;
    border-top: 1px solid #f8f8f8;
    width: 100%;
}

.modal-prix {
    font-size: 1.6rem;
    font-weight: 700;
    color: #111;
}

.modal-commander-btn {
    background: linear-gradient(180deg, #ffb347, #ff9f00);
    color: #fff;
    border: none;
    padding: 12px 20px;
    border-radius: 10px;
    font-size: 1rem;
    cursor: pointer;
    box-shadow: 0 8px 20px rgba(255, 160, 0, 0.18);
    transition: transform 180ms ease, box-shadow 180ms ease;
}

.modal-commander-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 14px 30px rgba(255, 150, 0, 0.18);
}

.modal-prix-container {
    display: none;
}

/* Small open animation */
.modal-content {
    transform: translateY(6px) scale(0.995);
    opacity: 0;
    transition: transform 220ms cubic-bezier(.2, .9, .3, 1), opacity 220ms ease;
}

.modal-produit[style*="display: flex"] .modal-content {
    transform: translateY(0) scale(1);
    opacity: 1;
}

/* Pastilles de couleurs */
.couleurs-disponibles {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin: 10px 0;
    padding: 0 10px;
}

.pastille-couleur {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2px solid #ddd;
    cursor: pointer;
    transition: transform 0.2s ease, border-color 0.2s ease;
    display: inline-block;
}

.pastille-couleur:hover {
    transform: scale(1.1);
    border-color: #585757;
}

/* Couleurs spécifiques */
.pastille-couleur[data-couleur="noir"] {
    background-color: #000000;
}

.pastille-couleur[data-couleur="blanc"] {
    background-color: #ffffff;
    border-color: #ccc;
}

.pastille-couleur[data-couleur="rouge"] {
    background-color: #dc3545;
}

.pastille-couleur[data-couleur="bleu"] {
    background-color: #007bff;
}

.pastille-couleur[data-couleur="bleu-clair"] {
    background-color: #92c9ff;
}

.pastille-couleur[data-couleur="bleu-fonce"] {
    background-color: #004085;
}

.pastille-couleur[data-couleur="vert-pomme"] {
    background-color: #b8ffde;
}

.pastille-couleur[data-couleur="vert-fonce"] {
    background-color: #155724;
}

.pastille-couleur[data-couleur="rose"] {
    background-color: #ffade8;
}

.pastille-couleur[data-couleur="rose-fuchsia"] {
    background-color: #ffc8e2;
}

.pastille-couleur[data-couleur="violet"] {
    background-color: #6f42c1;
}

.pastille-couleur[data-couleur="orange"] {
    background-color: #fd7e14;
}

.pastille-couleur[data-couleur="jaune"] {
    background-color: #ffc107;
}

.pastille-couleur[data-couleur="gris"] {
    background-color: #6c757d;
}



/* ...existing code... */

/* Responsive amélioré */
@media (max-width: 1200px) {
    .cartes-produits {
        gap: 50px;
    }
}

@media (max-width: 768px) {
    .boutique-content {
        padding: 10px;
    }

    .boutique-content h1 {
        font-size: 1.5rem;
        margin-left: 0;
        text-align: center;
    }

    .cartes-produits {
        gap: 20px;
        justify-content: center;
    }

    .carte-produit {
        width: 180px;
        padding: 0.8rem;
    }

    .carte-produit img {
        width: 100px;
        height: 100px;
    }

    .carte-produit h3 {
        font-size: 1rem;
    }

    .prix {
        font-size: 1rem !important;
    }

    .modal-content {
        min-width: 90vw;
        height: 90vh;
        padding: 20px;
        margin: 20px 10px;
    }

    .modal-flex {
        flex-direction: column;
        gap: 20px;
    }

    .modal-left,
    .modal-right {
        max-width: 100%;
        margin-left: 0;
    }

    .modal-left img {
        max-width: 200px !important;
        margin-left: 0 !important;
        margin-top: 0 !important;
    }

    .modal-bottom {
        flex-direction: column;
        gap: 15px;
        margin-top: 20px;
    }

    .modal-prix {
        font-size: 1.5em;
    }

    .modal-commander-btn {
        width: 100%;
        padding: 15px;
    }
}

@media (max-width: 480px) {
    .carte-produit {
        width: 160px;
    }

    .carte-produit img {
        width: 80px;
        height: 80px;
    }

    .modal-content {
        padding: 15px;
    }

    .close-modal {
        font-size: 1.5em;
        top: 10px;
        right: 15px;
    }
}