/* ════════════════════════════════════════════════════════════════
   SUFFAYA — product-card.css
   Fichier 4/14 — Carte Produit & Grilles
   Contenu : Carte produit · Grille produits · Catégories ·
             Cards boutiques · Sections accueil (headings)
   Utilisé sur : home · catalog · category · search · store · product
   ════════════════════════════════════════════════════════════════ */

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   1. GRILLE PRODUITS
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.products-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}
@media (min-width: 640px)  { .products-grid { grid-template-columns: repeat(3, 1fr); gap: 14px; } }
@media (min-width: 1024px) { .products-grid { grid-template-columns: repeat(4, 1fr); gap: 16px; } }
@media (min-width: 1400px) { .products-grid { grid-template-columns: repeat(5, 1fr); } }

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   2. CARTE PRODUIT
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.product-card {
    background: var(--card);
    border: 1px solid var(--brd);
    border-radius: var(--radius-lg);
    overflow: hidden;
    text-decoration: none;
    display: flex;
    flex-direction: column;
    transition: all .25s var(--trans);
    position: relative;
}
.product-card:hover {
    border-color: var(--brd-h);
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0,0,0,.4);
}

/* Image */
.pc-img-wrap {
    position: relative;
    aspect-ratio: 1;
    overflow: hidden;
    background: #0a1020;
}
.pc-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .4s var(--trans);
}
.product-card:hover .pc-img { transform: scale(1.06); }

/* Overlay "Voir le produit" */
.pc-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,.4);
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding-bottom: 12px;
    opacity: 0;
    transition: opacity .25s var(--trans);
}
.product-card:hover .pc-overlay { opacity: 1; }
.pc-quick-add {
    background: #fff;
    color: #0a0a0a;
    border: none;
    border-radius: 9px;
    padding: 9px 16px;
    font-size: .76rem;
    font-weight: 800;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: all .2s;
    transform: translateY(6px);
    text-decoration: none;
    font-family: var(--font);
}
.product-card:hover .pc-quick-add { transform: translateY(0); }
.pc-quick-add:hover { background: var(--acc); color: #fff; }

/* Bouton wishlist */
.pc-wishlist {
    position: absolute;
    top: 9px;
    right: 9px;
    width: 30px;
    height: 30px;
    background: rgba(7,9,15,.75);
    border: none;
    border-radius: 7px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all .2s var(--trans);
    color: var(--mu);
    text-decoration: none;
    backdrop-filter: blur(8px);
}
.product-card:hover .pc-wishlist, .pc-wishlist.active { opacity: 1; }
.pc-wishlist:hover     { color: var(--err); background: rgba(239,68,68,.15); }
.pc-wishlist.active    { color: var(--err); background: rgba(239,68,68,.1); }
.pc-wishlist svg       { width: 14px; height: 14px; stroke: currentColor; fill: none; }

/* Badges */
.pc-badge {
    position: absolute;
    top: 9px;
    left: 9px;
    background: var(--gold);
    color: #000;
    font-size: .62rem;
    font-weight: 800;
    padding: 3px 8px;
    border-radius: 5px;
    text-transform: uppercase;
    letter-spacing: .04em;
}
.pc-badge-sale { background: var(--err); color: #fff; }

/* Rupture de stock */
.pc-out {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0,0,0,.78);
    color: var(--mu);
    font-size: .7rem;
    text-align: center;
    padding: 6px;
    font-weight: 600;
}

/* Infos produit */
.pc-info {
    padding: 12px 13px 14px;
    display: flex;
    flex-direction: column;
    flex: 1;
}
.pc-store {
    font-size: .68rem;
    color: var(--mu);
    margin-bottom: 5px;
    font-weight: 500;
}
.pc-name {
    font-size: .85rem;
    font-weight: 700;
    color: var(--tx);
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 7px;
}
.pc-stars {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-bottom: 8px;
    font-size: .7rem;
    color: var(--mu);
}
.pc-price-row {
    display: flex;
    align-items: baseline;
    gap: 6px;
    flex-wrap: wrap;
    margin-top: auto;
}
.pc-price {
    font-size: .95rem;
    font-weight: 900;
    color: var(--tx);
    font-family: 'Poppins', var(--font);
}
.pc-old {
    font-size: .73rem;
    color: var(--mu);
    text-decoration: line-through;
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   3. CATÉGORIES — DÉFILEMENT HORIZONTAL MOBILE
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.cats-hint {
    display: flex; align-items: center; gap: 6px;
    padding: 0 0 6px; margin-bottom: 6px;
}
.cats-dots { display: flex; gap: 4px; }
.cats-dot {
    width: 18px; height: 3px; border-radius: 2px;
    background: #6366f1; transition: width .2s, opacity .2s; opacity: .3;
}
.cats-dot.active { width: 28px; opacity: 1; }
.cats-hint-txt {
    font-size: .62rem; color: var(--mu); font-weight: 600;
    display: flex; align-items: center; gap: 4px; margin-left: auto;
}

/* ── Scroll row ── */
.cats-scroll {
    display: flex; gap: 10px;
    padding: 4px 16px 4px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}
.cats-scroll::-webkit-scrollbar { display: none; }

/* ── Carte — IDENTIQUE au mockup ── */
.cat-scroll-card {
    display: flex; flex-direction: column;
    align-items: center; gap: 0;
    text-decoration: none;
    border-radius: 18px; overflow: hidden;
    border: 1px solid rgba(255,255,255,.06);
    background: var(--card);
    flex: 0 0 calc(32vw);
    max-width: 140px; min-width: 105px;
    scroll-snap-align: start;
    transition: transform .22s;
}
.cat-scroll-card:active { transform: scale(.96); }

/* ── Zone icône — carré parfait ── */
.csc-top {
    width: 100%; aspect-ratio: 1;
    display: flex; align-items: center; justify-content: center;
    position: relative; overflow: hidden;
}
.csc-top::after {
    content: ''; position: absolute; inset: 0;
    background: linear-gradient(180deg, transparent 45%, rgba(0,0,0,.55) 100%);
    pointer-events: none;
}

/* ── Cercle ── */
.csc-circle {
    width: 64px; height: 64px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    background: rgba(255,255,255,.18);
    border: 2.5px solid rgba(255,255,255,.75);
    position: relative; z-index: 1;
    box-shadow: 0 0 0 4px rgba(255,255,255,.08), inset 0 1px 0 rgba(255,255,255,.3);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}
.csc-circle svg { display:block !important; flex-shrink:0; width:26px !important; height:26px !important; max-width:26px !important; }
.csc-photo { width: 100%; height: 100%; object-fit: cover; display: block; }

/* ── Infos sous la photo ── */
.csc-info {
    width: 100%; padding: 8px 8px 9px;
    display: flex; flex-direction: column; align-items: center; gap: 3px;
}
.csc-name {
    font-size: .65rem; font-weight: 800; color: var(--tx);
    text-align: center; line-height: 1.25;
    overflow: hidden; display: -webkit-box;
    -webkit-line-clamp: 2; -webkit-box-orient: vertical; width: 100%;
}
.csc-count { font-size: .58rem; font-weight: 700; color: var(--acc2); }

/* ── Desktop ── */
@media (min-width: 768px) {
    .cats-scroll { display: grid; grid-template-columns: repeat(6,1fr); gap: 12px; overflow-x: visible; padding: 4px 0 16px; }
    .cat-scroll-card { flex: none; max-width: none; }
    .cats-hint { display: none; }
}
@media (min-width: 1100px) { .cats-scroll { grid-template-columns: repeat(8,1fr); } }

.categories-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}
@media (min-width: 480px)  { .categories-grid { grid-template-columns: repeat(4, 1fr); } }
@media (min-width: 600px)  { .categories-grid { grid-template-columns: repeat(6, 1fr); } }
@media (min-width: 900px)  { .categories-grid { grid-template-columns: repeat(8, 1fr); } }
@media (min-width: 1200px) { .categories-grid { grid-template-columns: repeat(10, 1fr); } }

.cat-card {
    text-decoration: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 7px;
    padding: 14px 8px 12px;
    border-radius: var(--radius);
    border: 1px solid var(--brd);
    background: var(--card);
    transition: all .22s var(--trans);
    text-align: center;
}
.cat-card:hover {
    border-color: var(--acc);
    transform: translateY(-3px);
    background: var(--card-h);
    box-shadow: 0 8px 24px rgba(0,0,0,.3);
}
.cat-icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.cat-img {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    object-fit: cover;
    max-width: none !important;
}
.cat-icon img { max-width: none !important; width: 22px; height: 22px; }
.cat-name  { font-size: .7rem;  font-weight: 700; color: var(--tx2); line-height: 1.3; }
.cat-count { font-size: .63rem; color: var(--mu); }

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   4. CARTES BOUTIQUES
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.stores-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}
@media (min-width: 480px)  { .stores-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 768px)  { .stores-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1200px) { .stores-grid { grid-template-columns: repeat(4, 1fr); } }

.store-card {
    background: var(--card);
    border: 1px solid var(--brd);
    border-radius: var(--radius-lg);
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 14px;
    text-decoration: none;
    transition: all .22s var(--trans);
}
.store-card:hover {
    border-color: var(--brd-h);
    background: var(--card-h);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}
.sc-logo-wrap { flex-shrink: 0; }
.sc-logo {
    width: 52px;
    height: 52px;
    border-radius: 12px;
    object-fit: cover;
    max-width: none !important;
}
.sc-logo-fallback {
    width: 52px;
    height: 52px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--brd), #1e3050);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    font-weight: 900;
    color: var(--acc2);
}
.sc-info { flex: 1; min-width: 0; }
.sc-name {
    font-size: .88rem;
    font-weight: 700;
    color: var(--tx);
    margin-bottom: 6px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.sc-meta { display: flex; gap: 10px; flex-wrap: wrap; }
.sc-meta span {
    font-size: .71rem;
    color: var(--mu);
    display: flex;
    align-items: center;
    gap: 4px;
}
.sc-verified {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: rgba(34,197,94,.1);
    color: var(--ok);
    font-size: .64rem;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 100px;
    margin-top: 4px;
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   5. ENTÊTES DE SECTIONS (partagés par home, catalog, etc.)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.home-section      { padding: 36px 0; }
.home-section-dark { background: var(--sur); padding: 36px 0; }
@media (min-width: 768px) {
    .home-section      { padding: 52px 0; }
    .home-section-dark { padding: 52px 0; }
}

.section-header {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    margin-bottom: 10px;
    gap: 4px 8px;
}
.hs-inner { max-width: var(--container); margin: 0 auto; padding: 0 20px; }

.section-heading {
    font-size: clamp(1.1rem, 3vw, 1.4rem);
    font-weight: 900;
    color: var(--tx);
    letter-spacing: -.025em;
    flex: 1 1 auto;
    min-width: 0;
    line-height: 1.15;
    order: 1;
}
.section-heading-icon img { width: 22px; height: 22px; max-width: none !important; }

.section-more {
    font-size: .79rem;
    color: var(--acc2);
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 4px;
    transition: all .2s;
    padding: 6px 12px;
    border-radius: 8px;
    border: 1px solid transparent;
    order: 2;
    margin-left: auto;
    padding: 4px 0;
.section-more:hover { border-color: var(--brd); background: var(--card); color: var(--tx); }

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   6. PAGINATION GLOBALE
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.pagination {
    display: flex;
    gap: 6px;
    justify-content: center;
    padding: 28px 0 14px;
    flex-wrap: wrap;
}
.page-btn {
    background: var(--card);
    border: 1px solid var(--brd);
    border-radius: 9px;
    padding: 7px 13px;
    font-size: .81rem;
    color: var(--mu);
    text-decoration: none;
    transition: all .2s;
}
.page-btn:hover, .page-btn.active {
    border-color: var(--acc);
    color: var(--acc2);
    background: var(--acc-glow);
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   7. RESPONSIVE
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
@media (max-width: 767px) {
    .home-section, .home-section-dark { padding: 36px 0; }
}
@media (max-width: 400px) {
    .products-grid  { gap: 9px; }
    .categories-grid { gap: 8px; }
    .cat-icon { width: 36px; height: 36px; }
}
