/* ==========================================================================
   StockExpress — Catalogue (complète home.css : se-pcard, se-flag, etc.)
   ========================================================================== */

.se-catalog { --se-primary: #0F766E; --se-border: #E2E8F0; }

/* ---------- Sidebar filtres ---------------------------------------------- */
.se-filters .se-filter-card {
    background: #fff; border: 1px solid var(--se-border); border-radius: 16px; padding: 1.1rem;
}
@media (min-width: 992px) {
    .se-filters { position: sticky; top: 84px; }   /* sous la navbar sticky */
    .se-filters.offcanvas-lg { visibility: visible !important; }
}
.se-filters .form-label { color: #334155; }
.se-cat-list { display: flex; flex-direction: column; max-height: 260px; overflow-y: auto; }
.se-cat-link { text-decoration: none; color: #64748b; padding: .28rem .35rem; border-radius: 8px; }
.se-cat-link:hover { background: #f1f5f9; color: #0f172a; }
.se-cat-link.active { color: var(--se-primary); font-weight: 700; background: #ecfdf5; }
.se-cat-cnt { background: #f1f5f9; color: #64748b; border-radius: 999px; font-size: .72rem; padding: 0 .45rem; line-height: 1.4; align-self: center; }

/* ---------- Toolbar ------------------------------------------------------ */
.se-toolbar { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem; }
.se-toolbar-actions { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.se-sort { width: auto; min-width: 160px; }

/* ---------- Filtres rapides (chips) -------------------------------------- */
.se-quick { display: flex; flex-wrap: wrap; gap: .5rem; }
.se-chip {
    text-decoration: none; font-size: .85rem; font-weight: 600; color: #334155;
    background: #fff; border: 1px solid var(--se-border); border-radius: 999px; padding: .35rem .8rem;
    transition: all .15s;
}
.se-chip:hover { border-color: var(--se-primary); color: var(--se-primary); }
.se-chip.on { background: var(--se-primary); border-color: var(--se-primary); color: #fff; }

/* ---------- Chips filtres actifs ----------------------------------------- */
.se-active-chips { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; }
.se-active-chip {
    text-decoration: none; font-size: .8rem; color: #134e4a; background: #ecfdf5;
    border: 1px solid #a7f3d0; border-radius: 999px; padding: .2rem .65rem;
}
.se-active-chip:hover { background: #d1fae5; color: #134e4a; }
.se-active-chip i { font-size: .72rem; opacity: .7; }
.se-active-clear { font-size: .8rem; text-decoration: none; color: #dc2626; }
.se-active-clear:hover { text-decoration: underline; }

/* ---------- Carte produit : overlay favori ------------------------------- */
.se-pcard-wrap { position: relative; height: 100%; }
.se-fav {
    position: absolute; top: .5rem; inset-inline-end: .5rem; z-index: 3;
    width: 34px; height: 34px; border-radius: 50%; border: none; cursor: pointer;
    background: rgba(255,255,255,.92); box-shadow: 0 2px 6px rgba(2,6,23,.15);
    color: #94a3b8; font-size: 15px; line-height: 1; transition: transform .15s, color .15s;
}
.se-fav:hover { transform: scale(1.12); color: #dc2626; }
.se-fav.btn-danger, .se-fav.is-fav { color: #dc2626; }

/* La remise se décale à gauche quand le bouton favori occupe le coin droit */
.se-pcard-wrap .se-flag.discount { inset-inline-end: auto; inset-inline-start: .5rem; top: 2.6rem; }

/* ---------- Pagination --------------------------------------------------- */
.se-catalog .pagination .page-link { color: var(--se-primary); border-radius: 8px; margin: 0 2px; border-color: var(--se-border); }
.se-catalog .pagination .page-item.active .page-link { background: var(--se-primary); border-color: var(--se-primary); color: #fff; }

/* ---------- RTL ---------------------------------------------------------- */
[dir="rtl"] .se-cat-link.d-flex { text-align: right; }
