/* ===== PRODUCT MINIATURE MERLIN MAGIE ===== */

/* Structure globale */
.mm-product-actions { margin-top: 10px; display: flex; flex-direction: column; gap: 8px; }

/* ===== CARTE PRODUIT ===== */
.product-miniature {
    border-radius: 16px !important;
    border: 1px solid #f0f0f0 !important;
    overflow: hidden !important;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06) !important;
    transition: transform 0.25s ease, box-shadow 0.25s ease !important;
    background: #ffffff !important;
}
.product-miniature:hover {
    transform: translateY(-5px) !important;
    box-shadow: 0 12px 35px rgba(184,149,95,0.2) !important;
    border-color: #d7b078 !important;
}

/* Image */
.product-miniature .thumbnail-top {
    background: #ffffff !important;
    padding: 15px !important;
}
.product-miniature .thumbnail-top img {
    border-radius: 8px !important;
    transition: transform 0.3s ease !important;
}
.product-miniature:hover .thumbnail-top img {
    transform: scale(1.04) !important;
}

/* Description */
.product-miniature .product-description {
    padding: 14px 14px 16px 14px !important;
    background: #ffffff !important;
    border-top: 1px solid #f5f5f5 !important;
}

/* Titre produit */
.product-title,
.product-miniature .product-title,
.product-miniature .product-title a {
    font-size: 14px !important;
    font-weight: 700 !important;
    color: #1a1a1a !important;
    white-space: normal !important;
    overflow: visible !important;
    text-overflow: unset !important;
    word-wrap: break-word !important;
    height: auto !important;
    max-height: none !important;
    line-height: 1.4 !important;
    min-height: 55px !important;
    display: block !important;
    text-decoration: none !important;
    letter-spacing: -0.01em !important;
}
.product-miniature .product-title a:hover {
    color: #b8955f !important;
}

/* Prix */
.product-miniature .product-price-and-shipping {
    font-size: 20px !important;
    font-weight: 900 !important;
    color: #1a1a1a !important;
    margin: 8px 0 !important;
    text-align: center !important;
    letter-spacing: -0.02em !important;
}

/* Avis */
.mm-reviews-wrapper, .product-miniature .product-list-reviews, .product-miniature .comments_note {
    position: static !important; display: block !important; margin: 4px 0 !important; opacity: 1 !important;
}
.mm-reviews-wrapper .material-icons { color: #f5a623 !important; font-size: 14px !important; }

/* Badge livraison & Stock */
.mm-product-badge { 
    font-size: 11px;
    font-weight: 600;
    color: #1a7340;
    background: #f0faf4;
    padding: 5px 10px;
    border-radius: 20px;
    display: block;
    text-align: center;
    border: 1px solid #c3e6cb;
}
.mm-product-badge.out-of-stock { color: #842029; background: #fff5f5; border-color: #fcc; }

/* Wrapper boutons */
.mm-buttons-wrapper { display: flex; gap: 6px; align-items: center; width: 100%; }

/* Boutons communs */
.mm-btn-view, .mm-btn-cart { transition: all 0.2s ease; }

/* Bouton Voir le tour */
.mm-btn-view { 
    flex: 1; 
    padding: 13px 8px; 
    background: linear-gradient(135deg, #b8955f, #d7b078);
    color: #fff !important; 
    text-align: center; 
    border-radius: 10px; 
    font-size: 12px; 
    font-weight: 700; 
    text-decoration: none !important; 
    white-space: nowrap;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    box-shadow: 0 3px 10px rgba(184,149,95,0.3);
}
.mm-btn-view:hover { 
    background: linear-gradient(135deg, #d7b078, #b8955f) !important;
    box-shadow: 0 5px 15px rgba(184,149,95,0.5) !important;
    transform: translateY(-1px);
}
.mm-btn-view:active { transform: scale(0.96); }

/* Bouton Panier */
.mm-btn-cart { 
    width: 42px; 
    height: 42px; 
    background: #fff; 
    border: 1.5px solid #d7b078; 
    border-radius: 10px; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    cursor: pointer; 
    flex-shrink: 0; 
    color: #b8955f;
    box-shadow: 0 2px 8px rgba(184,149,95,0.15);
}
.mm-btn-cart:hover:not([disabled]) { 
    background: linear-gradient(135deg, #b8955f, #d7b078) !important;
    color: #fff !important; 
    border-color: #b8955f !important;
    transform: translateY(-1px);
}
.mm-btn-cart:active:not([disabled]) { transform: scale(0.92); }
.mm-btn-cart i { font-size: 20px; }

/* ===== PC (3 colonnes) ===== */
@media (min-width: 769px) {
    .products.row {
        display: flex !important;
        flex-wrap: wrap !important;
        align-items: stretch !important;
        margin: 0 -8px !important;
    }
    .js-product.product {
        display: flex !important;
        flex-direction: column !important;
        padding: 8px !important;
    }
    .product-miniature {
        display: flex !important;
        flex-direction: column !important;
        flex: 1 !important;
        height: 100% !important;
        width: 100% !important;
    }
    .thumbnail-container {
        display: flex !important;
        flex-direction: column !important;
        flex: 1 !important;
        height: 100% !important;
    }
    .product-description {
        display: flex !important;
        flex-direction: column !important;
        flex: 1 !important;
    }
    .mm-product-actions {
        margin-top: auto !important;
    }
}

/* ===== MOBILE ===== */
@media (max-width: 768px) {

    .product-title,
    .product-miniature .product-title,
    .product-miniature .product-title a {
        white-space: normal !important;
        overflow: visible !important;
        text-overflow: unset !important;
        font-size: 13px !important;
        min-height: 55px !important;
    }

    .products.row {
        display: flex !important;
        flex-wrap: wrap !important;
        align-items: stretch !important;
        margin: 0 !important;
    }
    .js-product.product {
        display: flex !important;
        flex-direction: column !important;
        padding: 4px !important;
    }
    .product-miniature {
        display: flex !important;
        flex-direction: column !important;
        flex: 1 !important;
        width: 100% !important;
    }
    .thumbnail-container {
        display: flex !important;
        flex-direction: column !important;
        flex: 1 !important;
    }
    .product-description {
        display: flex !important;
        flex-direction: column !important;
        flex: 1 !important;
        background: #ffffff !important;
    }
    .mm-product-actions {
        margin-top: auto !important;
        padding-bottom: 6px !important;
    }
}

/* Mobile petit écran */
@media (max-width: 380px) {
    .mm-btn-view { font-size: 11px; padding: 10px 2px; }
}