/* =============================================================
   CARTE PRODUIT - source unique partagée
   Utilisée par :
   - components/product-card.php (listing / catégories produits)
   - index.php (Nos nouveautés, Nos vitrines phares, aperçu catégorie)
   La wishlist garde son propre markup (.wishlist-card) mais suit
   la même DA. Toute évolution de la carte produit se fait ICI.
   ============================================================= */

.product-card {
    background: white;
    border: 1px solid #f0f0ee;
    border-radius: var(--radius-card, 18px);
    overflow: hidden;
    box-shadow: var(--shadow, 0 8px 24px rgba(30,30,35,0.06));
    transition: transform 0.28s ease, box-shadow 0.28s ease, border-color 0.28s ease;
    cursor: pointer;
    position: relative;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover, 0 18px 40px rgba(30,30,35,0.10));
    border-color: #ececea;
}

.product-card-image {
    width: 100%;
    height: 195px;
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
}

.product-card-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.4s ease;
}

.product-card:hover .product-card-image img {
    transform: scale(1.04);
}

.product-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    padding: 5px 12px;
    border-radius: var(--radius-pill, 999px);
    font-family: 'Jura', sans-serif;
    font-size: 0.63rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    z-index: 2;
}

.product-badge-order {
    background: #f0f0ee;
    color: #3a393d;
    left: auto;
    right: 10px;
}

/* Pile de badges « état / pièce unique » en haut à gauche */
.product-badges {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 2;
    display: flex;
    flex-direction: column;
    gap: 6px;
    align-items: flex-start;
}

.product-badges .product-badge {
    position: static;
    top: auto;
    left: auto;
}

.product-badge-condition.is-new {
    background: #eef4ea;
    color: #4f8129;
}

.product-badge-condition.is-occasion {
    background: var(--accent, #5c924e);
    color: #fff;
}

.product-badge-unique {
    background: #4b4b4b;
    color: #fff;
}

/* Référence (SKU) sous le nom du produit */
.product-ref {
    font-family: 'Jura', sans-serif;
    font-size: 0.72rem;
    letter-spacing: 0.04em;
    color: #9a9a98;
    margin-bottom: 8px;
}

.product-wishlist-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: rgba(255,255,255,0.92);
    backdrop-filter: blur(4px);
    border: 1px solid #e7e7e5;
    color: #707173;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
    transition: border-color 0.25s ease, color 0.25s ease, box-shadow 0.25s ease;
    z-index: 10;
}

.product-wishlist-btn.has-stock-badge {
    top: 46px;
}

.product-wishlist-btn:hover,
.product-wishlist-btn.active {
    border-color: var(--accent, #5c924e);
    color: var(--accent, #5c924e);
    box-shadow: var(--shadow-sm, 0 2px 8px rgba(30,30,35,0.05));
}

.product-wishlist-btn.active i {
    font-weight: 900;
}

.product-card-content {
    padding: 15px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.product-brand {
    font-family: 'Jura', sans-serif;
    font-size: 0.66rem;
    font-weight: 600;
    text-transform: uppercase;
    color: #3a393d;
    margin-bottom: 6px;
    letter-spacing: 0.13em;
}

.product-name {
    font-size: 0.88rem;
    font-weight: 600;
    margin: 0 0 8px;
    line-height: 1.4;
    min-height: 38px;
    color: #3a393d;
}

.product-name a {
    color: inherit;
    text-decoration: none;
    transition: color 0.25s ease;
}

.product-name a:hover {
    color: var(--accent, #5c924e);
}

.product-category {
    font-size: 0.78rem;
    color: #707173;
    margin-bottom: 8px;
}

.product-category i {
    color: var(--accent, #5c924e);
    margin-right: 5px;
}

.product-card-footer {
    margin-top: auto;
    padding-top: 11px;
    border-top: 1px solid #f1f1ef;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
}

/* Prix + ancien prix + remise sur une seule ligne compacte */
.product-price-container {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 7px;
    width: 100%;
}

.product-price {
    font-family: 'Inter', sans-serif;
    font-size: 1.2rem;
    font-weight: 700;
    color: #3a393d;
    letter-spacing: -0.01em;
    line-height: 1.1;
}

.product-price-old {
    font-family: 'Inter', sans-serif;
    font-size: 0.82rem;
    font-weight: 500;
    color: #a5a6a9;
    text-decoration: line-through;
}

.product-price-promo {
    color: var(--red-italian, #5c924e);
    font-size: 1.2rem;
}

.product-discount-badge {
    align-self: center;
    background: var(--red-italian, #5c924e);
    color: white;
    padding: 3px 8px;
    border-radius: var(--radius-pill, 999px);
    font-family: 'Inter', sans-serif;
    font-size: 0.66rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}

/* Statut : ligne discrète sous le prix */
.product-stock {
    font-size: 0.72rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.product-stock i {
    font-size: 0.7rem;
}

.product-stock.in-stock {
    color: var(--accent, #5c924e);
}

.product-stock.out-of-stock {
    color: var(--red-italian, #5c924e);
}

.product-stock.on-order {
    color: #8a8a8d;
}

.product-stock.contact-us {
    color: #3a393d;
    font-weight: 600;
}

@media (max-width: 768px) {
    .product-card-image {
        height: 170px;
    }

    .product-price {
        font-size: 1.05rem;
    }

    .product-card-content {
        padding: 13px;
    }

    .product-card-footer {
        flex-wrap: wrap;
    }
}

@media (max-width: 480px) {
    .product-card-image {
        height: 150px;
    }

    .product-card-content {
        padding: 12px;
    }

    .product-name {
        font-size: 0.84rem;
    }

    .product-price {
        font-size: 1rem;
    }
}
