/* ============================
   Container
   ============================ */
.container { max-width: 1320px; margin: 0 auto; }

/* ============================
   Search Header
   ============================ */
.search-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 24px; gap: 20px; flex-wrap: wrap; }
.search-header-info h1 { font-size: 20px; font-weight: 900; color: var(--navy); }
.search-header-info h1 span { color: var(--orange); }
.search-header-info p { font-size: 13px; color: var(--text3); margin-top: 3px; }
.search-bar-form { display: flex; gap: 8px; flex: 1; max-width: 480px; }
.search-bar-input { flex: 1; padding: 10px 16px; border: 1.5px solid var(--gray); border-radius: var(--r); font-family: 'Tajawal', sans-serif; font-size: 14px; outline: none; transition: border-color .2s; }
.search-bar-input:focus { border-color: var(--orange); }
.search-bar-btn { background: var(--orange); color: #fff; padding: 10px 20px; border-radius: var(--r); font-size: 14px; font-weight: 700; border: none; cursor: pointer; transition: background .2s; font-family: 'Tajawal', sans-serif; white-space: nowrap; }
.search-bar-btn:hover { background: var(--navy); }

/* ============================
   Layout
   ============================ */
.search-layout { display: grid; grid-template-columns: 240px 1fr; gap: 24px; align-items: start; }

/* ============================
   Sidebar
   ============================ */
.search-sidebar { display: flex; flex-direction: column; gap: 16px; position: sticky; top: 80px; }
.filter-card { background: var(--white); border-radius: var(--rl); border: 1px solid var(--gray); overflow: hidden; }
.filter-head { padding: 12px 16px; font-size: 13.5px; font-weight: 800; color: var(--navy); border-bottom: 1px solid var(--gray); background: var(--off); }
.filter-body { padding: 12px 16px; display: flex; flex-direction: column; gap: 8px; max-height: 200px; overflow-y: auto; scrollbar-width: thin; }
.filter-radio { display: flex; align-items: center; gap: 8px; cursor: pointer; font-size: 13px; color: var(--text2); }
.filter-radio input { accent-color: var(--orange); width: 16px; height: 16px; flex-shrink: 0; }
.filter-radio:hover span { color: var(--orange); }
.price-range { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 10px; }
.pr-group { display: flex; flex-direction: column; gap: 4px; }
.pr-group label { font-size: 11.5px; color: var(--text3); font-weight: 600; }
.price-input { padding: 8px 10px; border: 1.5px solid var(--gray); border-radius: var(--r); font-family: 'Tajawal', sans-serif; font-size: 13px; outline: none; width: 100%; transition: border-color .2s; }
.price-input:focus { border-color: var(--orange); }
.btn-apply-filter { width: 100%; background: var(--navy); color: #fff; padding: 9px; border-radius: var(--r); font-size: 13px; font-weight: 700; border: none; cursor: pointer; transition: background .2s; font-family: 'Tajawal', sans-serif; }
.btn-apply-filter:hover { background: var(--orange); }
.btn-reset-filters { display: block; text-align: center; padding: 10px; background: rgba(220,38,38,0.08); color: var(--red); border-radius: var(--r); font-size: 13px; font-weight: 700; border: 1px solid rgba(220,38,38,0.2); transition: all .2s; }
.btn-reset-filters:hover { background: var(--red); color: #fff; }

/* ============================
   Results Bar
   ============================ */
.results-bar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.results-count { font-size: 14px; font-weight: 700; color: var(--text2); }
.view-toggle { display: flex; gap: 4px; }
.view-btn { width: 34px; height: 34px; border-radius: var(--r); border: 1.5px solid var(--gray); background: var(--white); cursor: pointer; font-size: 16px; transition: all .2s; }
.view-btn.active, .view-btn:hover { border-color: var(--orange); color: var(--orange); background: var(--orange-light); }

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

/* ============================
   Empty State
   ============================ */
.empty-search { text-align: center; padding: 60px 20px; background: var(--white); border-radius: var(--rl); border: 1px solid var(--gray); }
.es-icon { font-size: 56px; margin-bottom: 14px; }
.empty-search h3 { font-size: 18px; font-weight: 900; color: var(--navy); margin-bottom: 8px; }
.empty-search p { font-size: 14px; color: var(--text3); margin-bottom: 20px; }
.btn-go-home { background: var(--orange); color: #fff; padding: 11px 28px; border-radius: var(--r); font-size: 14px; font-weight: 700; display: inline-block; transition: all .2s; }
.btn-go-home:hover { background: var(--navy); }
/* ============================
   الروبي ستور — search.css
   Mobile Responsive — إضافة في نهاية الملف
   ============================ */

/* ============================
   Filter Bottom Sheet
   ============================ */
.filter-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 998;
}
.filter-overlay.active { display: block; }

.filter-sheet {
    position: fixed;
    bottom: -100%;
    left: 0;
    right: 0;
    background: var(--white);
    border-radius: 20px 20px 0 0;
    z-index: 999;
    transition: bottom .3s ease;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
}
.filter-sheet.active { bottom: 0; }

.filter-sheet-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--gray);
    flex-shrink: 0;
}
.filter-sheet-head strong { font-size: 16px; font-weight: 900; color: var(--navy); }
.filter-sheet-head button {
    background: var(--off);
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-size: 16px;
    cursor: pointer;
    color: var(--text2);
}

.filter-sheet-body {
    overflow-y: auto;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    flex: 1;
}

.filter-sheet-footer {
    padding: 16px;
    display: flex;
    gap: 10px;
    border-top: 1px solid var(--gray);
    flex-shrink: 0;
}
.filter-sheet-footer .btn-apply-filter { flex: 1; }
.btn-reset-filter {
    padding: 9px 16px;
    border-radius: var(--r);
    border: 1.5px solid var(--gray);
    background: var(--white);
    font-size: 13px;
    font-weight: 700;
    color: var(--text2);
    cursor: pointer;
    font-family: 'Tajawal', sans-serif;
}

/* Mobile Filter Bar */
.mobile-filter-bar {
    display: none;
}

/* ============================
   768px فأقل
   ============================ */
@media (max-width: 768px) {

    .container { padding: 0 12px !important; }

    /* Search Header */
    .search-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
        margin-bottom: 14px;
    }
    .search-header-info h1 { font-size: 17px; }
    .search-bar-form { max-width: 100%; width: 100%; }
    .search-bar-input { font-size: 13px; padding: 9px 12px; }
    .search-bar-btn { padding: 9px 14px; font-size: 13px; }

    /* Mobile Filter Bar */
    .mobile-filter-bar {
        display: flex;
        align-items: center;
        gap: 8px;
        margin-bottom: 12px;
        background: var(--white);
        padding: 10px 12px;
        border-radius: var(--r);
        border: 1px solid var(--gray);
    }

    .mobile-filter-btn {
        display: flex;
        align-items: center;
        gap: 6px;
        padding: 7px 14px;
        background: var(--navy);
        color: #fff;
        border: none;
        border-radius: var(--r);
        font-size: 13px;
        font-weight: 700;
        cursor: pointer;
        font-family: 'Tajawal', sans-serif;
        flex-shrink: 0;
    }

    .mobile-sort-wrap { flex: 1; }
    .mobile-sort-select {
        width: 100%;
        padding: 7px 10px;
        border: 1.5px solid var(--gray);
        border-radius: var(--r);
        font-family: 'Tajawal', sans-serif;
        font-size: 12.5px;
        color: var(--text);
        background: var(--off);
        outline: none;
    }

    /* Layout */
    .search-layout { grid-template-columns: 1fr; gap: 0; }
    .search-sidebar { display: none; }

    /* Products Grid */
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    /* Results Bar */
    .results-bar { margin-bottom: 10px; }
    .results-count { font-size: 13px; }

    /* Empty State */
    .empty-search { padding: 40px 16px; }
    .es-icon { font-size: 44px; }
    .empty-search h3 { font-size: 16px; }
}

@media (max-width: 480px) {
    .products-grid { gap: 8px; }
    .mobile-filter-btn { padding: 7px 10px; font-size: 12px; }
}
/* ============================
   Brand Links في الفلتر
   ============================ */
.filter-radio-link {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #444;
    text-decoration: none;
    padding: 4px 0;
}
.filter-radio-link:hover { color: #e63946; }
.filter-radio-link::before {
    content: '';
    width: 16px;
    height: 16px;
    border: 2px solid #ddd;
    border-radius: 50%;
    flex-shrink: 0;
}
.filter-radio-link:hover::before {
    border-color: #e63946;
}