/* ==========================================================================
   PRODUCT CARD — composant partagé (SOURCE UNIQUE)
   Importé par MagMarket (main.css) ET par le moteur de vitrine (symlink).
   Toutes les couleurs ont un fallback inline → le composant est portable :
   il reprend simplement le --primary du contexte (couleur du marchand côté vitrine).
   N'AJOUTE PAS de markup spécifique ici ; garde-le purement visuel et tokenisé.
   ========================================================================== */

/* Grid */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
    gap: 1.25rem;
    transition: opacity .15s;
}
.products-grid.loading-dim { opacity: .45; pointer-events: none; }

/* ── Product cards ───────────────────────────────────────────────── */

.product-card {
    display: flex;
    flex-direction: column;
    background: #fff;
    border-radius: 14px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    box-shadow: 0 1px 3px rgba(0,0,0,.07), 0 1px 2px rgba(0,0,0,.05);
    transition: box-shadow .2s, transform .2s;
}
.product-card:hover {
    box-shadow: 0 10px 28px rgba(0,0,0,.12), 0 4px 10px rgba(0,0,0,.07);
    transform: translateY(-3px);
}

/* Image area — white so product photos blend naturally */
.product-card-img {
    position: relative;
    aspect-ratio: 1 / 1;
    background: #fff;
    overflow: hidden;
    border-bottom: 1px solid var(--border, #f0f0f0);
}
.product-card-img img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 1rem;
    transition: transform .3s ease;
}
.product-card:hover .product-card-img img { transform: scale(1.04); }
.product-card-no-img {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gray-300, #d1d5db);
}

/* Condition badge — top-left */
.product-card-badge {
    position: absolute;
    top: .6rem;
    left: .6rem;
    font-size: .7rem;
    font-weight: 600;
    padding: .2rem .5rem;
    border-radius: 4px;
    background: rgba(255,255,255,.9);
    color: var(--gray-700, #374151);
    border: 1px solid var(--border, #e5e7eb);
    backdrop-filter: blur(4px);
}

/* Discount badge — top-right */
.product-card-discount {
    position: absolute;
    top: .6rem;
    right: .6rem;
    font-size: .7rem;
    font-weight: 700;
    padding: .2rem .45rem;
    border-radius: 4px;
    background: #ef4444;
    color: #fff;
}

/* Body */
.product-card-body {
    padding: .875rem 1rem 1rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: .25rem;
}
.product-card-brand {
    font-size: .7rem;
    color: var(--primary, #2563eb);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
}
.product-card-title {
    font-size: .875rem;
    font-weight: 500;
    line-height: 1.4;
    margin: 0;
    color: var(--gray-800, #1f2937);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.product-card-category {
    font-size: .7rem;
    color: var(--text-muted, #9ca3af);
    background: var(--gray-100, #f3f4f6);
    border-radius: 4px;
    padding: .15rem .4rem;
    align-self: flex-start;
    margin-top: .1rem;
}

/* Price row */
.product-card-price {
    display: flex;
    align-items: baseline;
    gap: .5rem;
    margin-top: .625rem;
}
.product-card-price strong {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--gray-900, #111827);
}
.product-card-compare {
    font-size: .8rem;
    color: var(--text-muted, #9ca3af);
    text-decoration: line-through;
}
