/* ============================================================
   Setak Bamar - Catalog Page (archive-product.php)
   فایل مستقل، وابسته به کلاس‌های setak-product-card از setak-home.css
============================================================ */

.setak-catalog-page {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
    direction: rtl;
}

/* --- نوار ابزار بالای صفحه --- */
.setak-catalog-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    background: #F0EADC;
    border-radius: 16px;
    padding: 14px 20px;
    margin-bottom: 25px;
    flex-wrap: wrap;
}

.setak-filter-toggle-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #D3A16A;
    color: #fff;
    border: none;
    padding: 10px 20px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.3s;
}
.setak-filter-toggle-btn:hover {
    background: #c08d54;
}

.setak-catalog-count {
    font-size: 14px;
    font-weight: 600;
    color: #555;
    flex: 1;
    text-align: center;
}

.setak-catalog-sort {
    background: #fff;
    border: 1px solid #E3D4B7;
    border-radius: 12px;
    padding: 10px 15px;
    font-size: 14px;
    font-weight: 600;
    color: #333;
    cursor: pointer;
    outline: none;
}

/* --- گرید محصولات --- */
.setak-catalog-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 20px;
}

.setak-catalog-grid .setak-product-card {
    width: 100%;
    position: relative;
}

.setak-catalog-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    color: #999;
    font-size: 15px;
}

.setak-catalog-grid.setak-loading {
    opacity: 0.5;
    pointer-events: none;
    transition: opacity 0.2s;
}

/* --- دکمه نمایش بیشتر --- */
.setak-catalog-loadmore-wrap {
    display: flex;
    justify-content: center;
    margin-top: 35px;
}

.setak-load-more-btn {
    background: #7F8756;
    color: #fff;
    border: none;
    padding: 14px 40px;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
}
.setak-load-more-btn:hover {
    background: #6a7147;
    transform: translateY(-2px);
}
.setak-load-more-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* --- پس‌زمینه تیره پشت drawer --- */
.setak-filter-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.45);
    z-index: 9998;
    display: none;
}
.setak-filter-overlay.setak-active {
    display: block;
}

/* --- Drawer فیلتر (از راست باز می‌شود) --- */
.setak-filter-drawer {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: 340px;
    max-width: 90vw;
    background: #fff;
    z-index: 9999;
    transform: translateX(100%);
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    box-shadow: -10px 0 30px rgba(0,0,0,0.15);
}
.setak-filter-drawer.setak-open {
    transform: translateX(0);
}

.setak-filter-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px;
    background: #E1D4B4;
    flex-shrink: 0;
}
.setak-filter-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 800;
    color: #2c2c2c;
}
.setak-filter-close {
    background: none;
    border: none;
    cursor: pointer;
    color: #2c2c2c;
    padding: 4px;
    display: flex;
}

.setak-filter-body {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

.setak-filter-group {
    margin-bottom: 28px;
    padding-bottom: 20px;
    border-bottom: 1px solid #f0ebe0;
}
.setak-filter-group:last-of-type {
    border-bottom: none;
}
.setak-filter-group h4 {
    font-size: 14px;
    font-weight: 800;
    color: #2c2c2c;
    margin: 0 0 14px 0;
}

.setak-filter-checklist {
    list-style: none;
    margin: 0;
    padding: 0;
    max-height: 220px;
    overflow-y: auto;
}
.setak-filter-checklist li {
    margin-bottom: 10px;
}
.setak-filter-checklist label,
.setak-filter-checkbox-single {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #444;
    cursor: pointer;
}
.setak-filter-checklist input[type="checkbox"],
.setak-filter-checkbox-single input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: #D3A16A;
    cursor: pointer;
}
.setak-filter-count {
    color: #999;
    font-size: 11px;
}

/* --- اسلایدر قیمت دو طرفه --- */
.setak-price-slider {
    position: relative;
    height: 36px;
    margin-bottom: 10px;
}
.setak-price-slider-track {
    position: absolute;
    top: 50%;
    right: 0;
    left: 0;
    height: 4px;
    background: #eee;
    border-radius: 4px;
    transform: translateY(-50%);
}
.setak-price-slider-range {
    position: absolute;
    height: 100%;
    background: #D3A16A;
    border-radius: 4px;
}
.setak-range-input {
    position: absolute;
    top: 50%;
    right: 0;
    left: 0;
    width: 100%;
    transform: translateY(-50%);
    -webkit-appearance: none;
    appearance: none;
    background: none;
    pointer-events: none;
    margin: 0;
}
.setak-range-input::-webkit-slider-thumb {
    -webkit-appearance: none;
    pointer-events: all;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #D3A16A;
    border: 3px solid #fff;
    box-shadow: 0 2px 6px rgba(0,0,0,0.25);
    cursor: pointer;
}
.setak-range-input::-moz-range-thumb {
    pointer-events: all;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #D3A16A;
    border: 3px solid #fff;
    box-shadow: 0 2px 6px rgba(0,0,0,0.25);
    cursor: pointer;
}

.setak-price-values {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 12px;
    color: #666;
    font-weight: 600;
}

/* --- دکمه‌های اعمال / حذف فیلتر --- */
.setak-filter-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 10px;
}
.setak-filter-apply-btn {
    background: #7F8756;
    color: #fff;
    border: none;
    padding: 13px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.3s;
}
.setak-filter-apply-btn:hover {
    background: #6a7147;
}
.setak-filter-reset-btn {
    background: #f5f5f5;
    color: #666;
    border: none;
    padding: 13px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.3s;
}
.setak-filter-reset-btn:hover {
    background: #eee;
}

/* ============================================================
   ریسپانسیو
============================================================ */
@media (max-width: 1200px) {
    .setak-catalog-grid { grid-template-columns: repeat(4, 1fr); }
}

@media (max-width: 992px) {
    .setak-catalog-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 768px) {
    .setak-catalog-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
    .setak-catalog-toolbar { padding: 12px 15px; }
    .setak-catalog-count { order: 3; width: 100%; text-align: center; margin-top: 8px; }
    .setak-filter-drawer { width: 300px; }
}

@media (max-width: 480px) {
    .setak-catalog-page { padding: 12px; }
    .setak-catalog-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .setak-filter-toggle-btn { padding: 9px 14px; font-size: 13px; }
    .setak-catalog-sort { font-size: 13px; padding: 9px 10px; }
}
