/* ============================
   brand.css — صفحة الماركة
   نفس نهج category.css
   ============================ */

/* ============================
   Breadcrumb
   ============================ */
.breadcrumb-wrap {
    background: #f8f8f8;
    border-bottom: 1px solid #eee;
    padding: 10px 0;
    font-size: 13px;
}
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}
.breadcrumb a {
    color: #666;
    text-decoration: none;
}
.breadcrumb a:hover { color: #e63946; }
.breadcrumb .current { color: #333; font-weight: 600; }

/* ============================
   Brand Header
   ============================ */
.brand-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px 0 16px;
    border-bottom: 2px solid #f0f0f0;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 12px;
}
.brand-header-info {
    display: flex;
    align-items: center;
    gap: 16px;
}
.brand-logo-wrap {
    width: 72px;
    height: 72px;
    border-radius: 12px;
    border: 1px solid #eee;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    padding: 8px;
}
.brand-logo-wrap img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}
.brand-logo-placeholder {
    font-size: 32px;
    font-weight: 700;
    color: #e63946;
}
.brand-header-info h1 {
    font-size: 22px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 4px;
}
.brand-header-info p {
    color: #666;
    font-size: 14px;
    margin: 0;
    max-width: 500px;
}
.brand-header-count {
    font-size: 14px;
    color: #888;
    background: #f5f5f5;
    padding: 6px 14px;
    border-radius: 20px;
}

/* ============================
   Layout
   ============================ */
.category-layout {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 24px;
    align-items: start;
    padding-bottom: 40px;
}

/* ============================
   Sidebar
   ============================ */
.cat-sidebar {
    position: sticky;
    top: 80px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.filter-card {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 12px;
    overflow: hidden;
}
.filter-head {
    padding: 12px 16px;
    font-weight: 600;
    font-size: 14px;
    border-bottom: 1px solid #f0f0f0;
    background: #fafafa;
}
.filter-body {
    padding: 12px 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.filter-check,
.filter-radio {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #444;
    cursor: pointer;
}
.filter-check input,
.filter-radio input { accent-color: #e63946; }

/* ============================
   Price Range
   ============================ */
.price-range {
    display: flex;
    gap: 8px;
    margin-bottom: 10px;
}
.price-range .form-group {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 12px;
    color: #888;
}
.price-input {
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 6px 8px;
    font-size: 13px;
    width: 100%;
}
.btn-apply-filter {
    width: 100%;
    background: #e63946;
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}
.btn-apply-filter:hover { background: #c1121f; }

/* ============================
   Products Area
   ============================ */
.cat-products { min-width: 0; }
.results-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}
.results-count { font-size: 14px; color: #666; }
.view-toggle { display: flex; gap: 4px; }
.view-btn {
    width: 32px;
    height: 32px;
    border: 1px solid #ddd;
    border-radius: 6px;
    background: #fff;
    cursor: pointer;
    font-size: 16px;
}
.view-btn.active {
    background: #e63946;
    color: #fff;
    border-color: #e63946;
}

/* ============================
   Products Grid
   ============================ */
.products-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}
.products-grid.list-view {
    grid-template-columns: 1fr;
}

/* ============================
   Pagination
   ============================ */
.pagination-wrap {
    margin-top: 32px;
    display: flex;
    justify-content: center;
}

/* ============================
   Empty State
   ============================ */
.empty-products {
    text-align: center;
    padding: 60px 20px;
    color: #888;
}
.ep-icon { font-size: 48px; margin-bottom: 12px; }
.empty-products h3 { font-size: 18px; color: #444; margin-bottom: 8px; }
.empty-products p { font-size: 14px; margin-bottom: 20px; }
.btn-go-home {
    display: inline-block;
    background: #e63946;
    color: #fff;
    padding: 10px 24px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
}

/* ============================
   Mobile Filter Bar
   ============================ */
.mobile-filter-bar {
    display: none;
    gap: 8px;
    margin-bottom: 16px;
}
.mobile-filter-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background: #fff;
    font-size: 13px;
    cursor: pointer;
}
.mobile-sort-select {
    flex: 1;
    padding: 8px 10px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 13px;
}

/* ============================
   Bottom Sheet
   ============================ */
.filter-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);
    z-index: 100;
}
.filter-overlay.active { display: block; }
.filter-sheet {
    position: fixed;
    bottom: -100%;
    left: 0; right: 0;
    background: #fff;
    border-radius: 20px 20px 0 0;
    z-index: 101;
    transition: bottom 0.3s ease;
    max-height: 80vh;
    overflow-y: auto;
}
.filter-sheet.active { bottom: 0; }
.filter-sheet-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    border-bottom: 1px solid #eee;
}
.filter-sheet-head button {
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
}
.filter-sheet-body { padding: 16px; }
.filter-sheet-footer {
    display: flex;
    gap: 8px;
    padding: 16px;
    border-top: 1px solid #eee;
}
.btn-reset-filter {
    flex: 1;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background: #fff;
    font-size: 14px;
    cursor: pointer;
}
.filter-sheet-footer .btn-apply-filter { flex: 2; }

/* ============================
   Responsive
   ============================ */
@media (max-width: 768px) {
    .category-layout {
        grid-template-columns: 1fr;
    }
    .cat-sidebar { display: none; }
    .mobile-filter-bar { display: flex; }
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    .brand-header {
        flex-direction: column;
        align-items: flex-start;
    }
}
@media (max-width: 480px) {
    .products-grid { grid-template-columns: repeat(2, 1fr); }
}