/* ═══════════════════════════════════════════
   PAGE PRODUITS — Styles additionnels
═══════════════════════════════════════════ */

.products-page {
    background: #f8f9fa;
    min-height: calc(100vh - 60px);
    margin-top: 60px;
    padding: 32px 60px 48px;
}

.products-page .section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.products-page .section-header h2 {
    font-family: 'Cairo', sans-serif;
    font-size: 24px;
    font-weight: 700;
    color: var(--text);
}

.products-count {
    font-size: 13px;
    color: var(--muted);
    font-weight: 500;
}

/* ══ FILTRES ══ */
.filters-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-bottom: 28px;
    flex-wrap: wrap;
}

.filter-search {
    position: relative;
    flex: 1;
    max-width: 320px;
}

.filter-search i {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--muted);
    font-size: 13px;
}

.filter-search input {
    width: 100%;
    height: 40px;
    padding: 0 14px 0 38px;
    border-radius: 10px;
    background: #fff;
    font-size: 13px;
    color: var(--text);
    outline: none;
    transition: border-color .15s;
    font-family: 'Cairo', sans-serif;
}

.filter-search input:focus {
    border-color: var(--teal);
}

.filter-group {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.filter-group select {
    height: 40px;
    padding: 0 32px 0 14px;
    border: 1.5px solid var(--border);
    border-radius: 10px;
    background: #fff;
    font-size: 13px;
    color: var(--text);
    outline: none;
    cursor: pointer;
    font-family: 'Cairo', sans-serif;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23999' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: left 12px center;
}

.filter-group select:focus {
    border-color: var(--teal);
}

/* ══ GRILLE ══ */
.products-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 40px;
}

.products-grid .prod-card {
    background: #fff;
    border-radius: 14px;
    padding: 16px;
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,.06);
    transition: box-shadow .15s, transform .15s;
}

.products-grid .prod-card:hover {
    box-shadow: 0 6px 20px rgba(0,0,0,.1);
    transform: translateY(-2px);
}

.products-grid .prod-img {
    width: 100%;
    height: 240px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 56px;
    color: #b0bec5;
    background: var(--bg);
    border-radius: 10px;
    position: relative;
    overflow: hidden;
}

.products-grid .prod-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.products-grid .prod-card:hover .prod-img img {
    transform: scale(1.05);
}

/* ══ BADGES (remise / rupture) ══ */
.products-grid .prod-badge,
.products-grid .prod-badge-out {
    position: absolute;
    top: 10px;
    z-index: 1;
    padding: 4px 9px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.3;
    font-family: 'Cairo', sans-serif;
    color: #fff;
    white-space: nowrap;
}

.products-grid .prod-badge {
    right: 10px;
    background: #e11d48;
}

.products-grid .prod-badge-out {
    left: 10px;
    background: #64748b;
}

.products-grid .prod-card-out .prod-img {
    opacity: 0.6;
}

.products-grid .prod-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    line-height: 1.4;
    min-height: 40px;
}

.products-grid .prod-price {
    font-size: 16px;
    font-weight: 700;
    color: var(--teal);
}

.products-grid .prod-old-price {
    font-size: 0.85rem;
    color: #9ca3af;
    text-decoration: line-through;
    margin-right: 6px;
    font-weight: 400;
}

.products-grid .prod-card-link {
    display: flex;
    flex-direction: column;
    gap: 8px;
    color: inherit;
    text-decoration: none;
    flex: 1;
}

.products-grid .prod-rating-new {
    font-size: 12px;
    color: var(--muted);
    font-weight: 500;
}

/* ══ ÉTAT VIDE ══ */
.products-empty {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    padding: 60px 20px;
    text-align: center;
}

.products-empty i {
    font-size: 64px;
    color: #cbd5e1;
}

.products-empty p {
    font-family: 'Cairo', sans-serif;
    font-size: 16px;
    color: var(--muted);
}

/* ══ PAGINATION ══ */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 20px;
}

.page-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 10px;
    border-radius: 8px;
    background: #fff;
    border: 1.5px solid var(--border);
    color: var(--text);
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all .15s;
}

.page-btn:hover:not(.disabled):not(.active) {
    border-color: var(--teal);
    color: var(--teal);
}

.page-btn.active {
    background: var(--teal);
    border-color: var(--teal);
    color: #fff;
}

.page-btn.disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* ══ PRODUIT CACHÉ (filtre JS) ══ */
.prod-card.hidden {
    display: none;
}

/* ══════════════════════════════════════════
   RESPONSIVE
══════════════════════════════════════════ */

@media (max-width: 1024px) {
    .products-page { padding: 28px 32px 40px; }
    .products-grid { grid-template-columns: repeat(3, 1fr); gap: 16px; }
}

@media (max-width: 768px) {
    .products-page { padding: 24px 20px 32px; margin-top: 54px; }
    .products-page .section-header h2 { font-size: 20px; }

    .filters-bar {
        flex-direction: column;
        align-items: stretch;
    }

    .filter-search { max-width: 100%; }
    .filter-group { width: 100%; }
    .filter-group select { flex: 1; }

    .products-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
    .products-grid .prod-img { height: 140px; }
}

@media (max-width: 480px) {
    .products-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .products-grid .prod-card { padding: 10px; gap: 6px; }
    .products-grid .prod-img { height: 120px; border-radius: 8px; }
    .products-grid .prod-name { font-size: 12.5px; min-height: 34px; }
    .products-grid .prod-price { font-size: 14px; }
    .products-grid .prod-stock,
    .products-grid .prod-rating { font-size: 11px; }
    .products-grid .prod-badge,
    .products-grid .prod-badge-out { font-size: 10px; padding: 3px 7px; top: 6px; }
    .products-grid .prod-badge { right: 6px; }
    .products-grid .prod-badge-out { left: 6px; }

    .filter-group { flex-direction: column; }
    .filter-group select { width: 100%; }

    .page-btn { min-width: 32px; height: 32px; font-size: 12px; }
}