.product-card-modern.grid-item {
    display: block;
    height: 100%;
    min-width: 0;
}

.home-products-grid {
    overflow: visible;
}

.home-products-section .product-card-modern .product-card-visual {
    min-height: 0;
}

/* Neutralise les styles du thème .product sur nos cartes */
.product-card-modern .product-card-quick-actions .add-to-cart,
.product-card-modern .product-card-quick-actions .add-to-wishlist {
    position: static;
}

.product-card-modern .product-card-shell {
    display: flex;
    flex-direction: column;
    height: 100%;
    background: #fff;
    border: none;
    border-radius: 0;
    overflow: visible;
}

/* Image pleine largeur */
.product-card-modern .product-card-visual {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    background: #f5f5f5;
    overflow: hidden;
    flex-shrink: 0;
}

.product-card-modern .product-card-image-link {
    display: block;
    width: 100%;
    height: 100%;
    position: absolute;
    inset: 0;
    z-index: 1;
}

.product-card-modern .product-card-visual .card-img {
    width: 100% !important;
    height: 100% !important;
    max-width: none !important;
    position: absolute !important;
    inset: 0;
    background-size: cover !important;
    background-position: center center !important;
    background-repeat: no-repeat;
    background-color: #f5f5f5 !important;
    border-radius: 0;
    opacity: 1 !important;
    transition: transform 0.5s ease;
}

.product-card-modern .product-card-visual .card-img::before {
    display: none !important;
    content: none !important;
    padding: 0 !important;
}

.product-card-modern:hover .product-card-visual .card-img,
.product-card-modern .product-card-shell:hover .product-card-visual .card-img {
    transform: scale(1.04);
}

.product-card-modern .product-card-visual .hover-swap-layer {
    background-size: cover !important;
    background-position: center center !important;
}

/* Boutons ronds flottants à droite de l'image — visibles au survol */
.product-card-modern .product-card-quick-actions {
    position: absolute;
    top: 50%;
    right: 12px;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 8px;
    z-index: 5;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.product-card-modern:hover .product-card-quick-actions,
.product-card-modern .product-card-shell:hover .product-card-quick-actions {
    opacity: 1;
    visibility: visible;
}

.product-card-modern .product-quick-btn {
    display: flex !important;
    align-items: center;
    justify-content: center;
    width: 42px !important;
    height: 42px !important;
    border-radius: 50% !important;
    background: #fff !important;
    color: #222 !important;
    border: none !important;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.12) !important;
    font-size: 0.95rem;
    text-decoration: none !important;
    opacity: 0;
    transform: translateX(8px);
    visibility: hidden;
    transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s ease,
        background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease !important;
}

.product-card-modern:hover .product-quick-btn,
.product-card-modern .product-card-shell:hover .product-quick-btn {
    opacity: 1 !important;
    transform: translateX(0) !important;
    visibility: visible !important;
}

.product-card-modern:hover .product-quick-btn:nth-child(1),
.product-card-modern .product-card-shell:hover .product-quick-btn:nth-child(1) {
    transition-delay: 0.03s;
}

.product-card-modern:hover .product-quick-btn:nth-child(2),
.product-card-modern .product-card-shell:hover .product-quick-btn:nth-child(2) {
    transition-delay: 0.06s;
}

.product-card-modern:hover .product-quick-btn:nth-child(3),
.product-card-modern .product-card-shell:hover .product-quick-btn:nth-child(3) {
    transition-delay: 0.09s;
}

.product-card-modern .product-quick-btn:hover {
    background: #222 !important;
    color: #fff !important;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.18) !important;
}

.product-card-modern .favorite-btn.is-favorited .fa-heart,
.product-card-modern .favorite-btn .fa-heart.fas {
    color: #EE4D26 !important;
}

.product-card-modern .favorite-btn.is-favorited:hover,
.product-card-modern .favorite-btn.is-favorited:hover .fa-heart {
    color: #EE4D26 !important;
}

/* Infos sous l'image */
.product-card-modern .product-card-body {
    display: flex;
    flex-direction: column;
    padding: 14px 0 0;
    background: #fff;
}

.product-card-modern .product-card-titles {
    margin-bottom: 4px;
}

.product-card-modern .product-title {
    display: block;
    font-size: 1rem;
    font-weight: 700;
    color: #111;
    line-height: 1.3;
    margin-bottom: 2px;
    text-decoration: none !important;
    transition: color 0.2s ease;
}

.product-card-modern .product-title:hover {
    color: #444;
}

.product-card-modern .product-subtitle {
    font-size: 0.9rem;
    font-weight: 400;
    color: #555;
    line-height: 1.35;
    margin: 0 0 4px;
}

.product-card-modern .product-price {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-bottom: 0;
    font-weight: 700;
    color: #EE4D26;
    line-height: 1.2;
}

.product-card-modern .product-price-new {
    color: #EE4D26;
    font-weight: 700;
}

.product-card-modern .product-price.is-regular .product-price-new {
    font-size: 1.05rem;
}

.product-card-modern .product-price.is-promo .product-price-new {
    font-size: 1rem;
}

.product-card-modern .product-price-old {
    font-size: 0.8rem;
    font-weight: 400;
    color: #999 !important;
    text-decoration: line-through;
}

.product-card-modern .product-promo-badge {
    font-size: 0.65rem;
    font-weight: 600;
    background: #EE4D26;
    color: #fff;
    padding: 0.15rem 0.4rem;
    border-radius: 3px;
    line-height: 1.2;
}

.product-card-modern .product-swatch-list {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px;
    margin: 10px 0 0;
    padding: 0 0 0.65rem;
    list-style: none;
}

.product-card-modern .product-swatch-list .list-inline-item {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    margin: 0 !important;
    padding: 2px;
    border: 1px solid transparent;
    border-radius: 50% !important;
    line-height: 0;
    vertical-align: middle;
    box-sizing: border-box;
    transition: border-color 0.15s ease;
}

.product-card-modern .product-swatch-list .list-inline-item.selected,
.product-card-modern .product-swatch-list .list-inline-item:hover {
    border-color: #EE4D26;
}

.product-card-modern .product-color-swatch {
    display: block;
    width: 24px !important;
    height: 24px !important;
    min-width: 24px;
    min-height: 24px;
    padding: 0;
    margin: 0;
    border-radius: 50% !important;
    overflow: hidden;
    aspect-ratio: 1 / 1;
    border: 1px solid rgba(0, 0, 0, .18) !important;
    box-shadow: none !important;
    clip-path: circle(50%);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    box-sizing: border-box;
    transition: transform 0.15s ease;
}

.product-card-modern .product-color-swatch.is-light {
    border-color: rgba(0, 0, 0, .28) !important;
}

.product-card-modern .product-color-swatch:hover {
    transform: scale(1.06);
    border-color: rgba(0, 0, 0, .18) !important;
    box-shadow: none !important;
}

.product-card-modern .product-swatch-list .selected .product-color-swatch,
.product-card-modern .product-color-swatch.selected {
    border-color: rgba(0, 0, 0, .18) !important;
    box-shadow: none !important;
}

/* Pastilles globales — neutralise le thème (18px) */
.shop-swatch .swatches-item,
.product-detail-swatches .swatches-item {
    width: 40px !important;
    height: 40px !important;
    min-width: 40px;
    min-height: 40px;
    border-radius: 50% !important;
    overflow: hidden;
    aspect-ratio: 1 / 1;
    background-size: cover !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
    border: 1px solid rgba(0, 0, 0, .18) !important;
    box-shadow: none !important;
    clip-path: circle(50%);
}

.shop-swatch .swatches-item.is-light,
.product-detail-swatches .swatches-item.is-light {
    border-color: rgba(0, 0, 0, .28) !important;
}

.shop-swatch .list-inline-item,
.product-detail-swatches .list-inline-item {
    border-radius: 50% !important;
}

@media (max-width: 575.98px) {
    .product-card-modern .product-card-quick-actions {
        opacity: 1;
        visibility: visible;
        right: 8px;
        gap: 6px;
    }

    .product-card-modern .product-quick-btn {
        width: 38px !important;
        height: 38px !important;
        font-size: 0.85rem;
        opacity: 1 !important;
        transform: none !important;
        visibility: visible !important;
    }
}
