/* =============================================================
   sidebar.css — Sitewide left sidebar nav + site-layout wrapper
   ============================================================= */

/* ── Two-column wrapper ─────────────────────────────────── */
.site-layout {
    display: flex;
    align-items: flex-start;
    min-height: calc(100vh - 60px);
}

.site-main-content {
    flex: 1;
    min-width: 0;
}

/* catalog-main already used by CategoryPage/ManufacturerPage */
.catalog-main {
    flex: 1;
    min-width: 0;
}

/* ── Sidebar shell ──────────────────────────────────────── */
.sidenav {
    width: 220px;
    flex-shrink: 0;
    background: #ffffff;
    border-right: 1px solid #e5e9f0;
    position: sticky;
    top: 88px;
    max-height: calc(100vh - 88px);
    overflow-y: auto;
    z-index: 10;
}

/* ── Section headers ────────────────────────────────────── */
.sidenav__section-head {
    background: #1a2d4e;
    color: #ffffff;
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* ── Search form ────────────────────────────────────────── */
.sidenav__search {
    padding: 10px;
    background: #f5f7fa;
    border-bottom: 1px solid #e5e9f0;
}

.sidenav__search-row {
    display: flex;
}

.sidenav__search-input {
    flex: 1;
    min-width: 0;
    height: 32px;
    padding: 0 8px;
    border: 1px solid #d1d5db;
    border-right: none;
    border-radius: 4px 0 0 4px;
    font-size: 13px;
    font-family: inherit;
    background: #fff;
    color: #1a2d4e;
    appearance: none;
    -webkit-appearance: none;
}

.sidenav__search-input:focus {
    outline: none;
    border-color: #1a2d4e;
}

.sidenav__search-btn {
    height: 32px;
    padding: 0 10px;
    background: #1a2d4e;
    color: #ffffff;
    border: 1px solid #1a2d4e;
    border-radius: 0 4px 4px 0;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: background 0.15s;
    white-space: nowrap;
}

.sidenav__search-btn:hover {
    background: #2F6DAE;
    border-color: #2F6DAE;
}

/* ── Category links ─────────────────────────────────────── */
.sidenav__nav {
    display: flex;
    flex-direction: column;
}

.sidenav__link {
    display: block;
    font-size: 13px;
    color: #1a2d4e;
    padding: 6px 16px;
    border-bottom: 1px solid #eee;
    text-decoration: none;
    line-height: 1.4;
    transition: background 0.12s, color 0.12s;
}

.sidenav__link:hover {
    background: #f0f4f8;
    color: #2F6DAE;
    text-decoration: none;
}

.sidenav__link--active {
    font-weight: 600;
    color: #1a2d4e;
    background: #eef2f7;
    border-left: 3px solid #2F6DAE;
    padding-left: 13px;
}

/* ── Group dividers ─────────────────────────────────────── */
.sidenav__group-header {
    font-size: 11px;
    color: #666;
    padding: 8px 16px 4px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    background: #f5f7fa;
    border-bottom: 1px solid #eee;
    font-weight: 600;
}

/* ── Search results page ────────────────────────────────── */
.search-main {
    padding: 24px 32px 48px;
    max-width: 1100px;
}

.search-header {
    margin-bottom: 20px;
}

.search-title {
    font-size: 26px;
    font-weight: 700;
    color: #1F3A5F;
    margin-bottom: 6px;
}

.search-meta {
    font-size: 14px;
    color: #6B7280;
}

.search-form-inline {
    display: flex;
    gap: 0;
    margin-bottom: 28px;
    max-width: 480px;
}

.search-form-input {
    flex: 1;
    height: 40px;
    padding: 0 12px;
    border: 2px solid #d1d5db;
    border-right: none;
    border-radius: 6px 0 0 6px;
    font-size: 14px;
    font-family: inherit;
    color: #1a2d4e;
}

.search-form-input:focus {
    outline: none;
    border-color: #1a2d4e;
}

.search-form-btn {
    height: 40px;
    padding: 0 20px;
    background: #1a2d4e;
    color: #fff;
    border: 2px solid #1a2d4e;
    border-radius: 0 6px 6px 0;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: background 0.15s;
}

.search-form-btn:hover {
    background: #2F6DAE;
    border-color: #2F6DAE;
}

.search-empty {
    padding: 40px 0;
    font-size: 15px;
    color: #6B7280;
}

/* ── Mobile sidebar toggle button ───────────────────────── */
.sidebar-toggle {
    display: none; /* hidden on desktop */
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 10px 16px;
    background: #1a2d4e;
    color: #fff;
    border: none;
    font-size: 14px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    text-align: left;
}
.sidebar-toggle:hover { background: #2F6DAE; }

/* ── Backdrop overlay ───────────────────────────────────── */
.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);
    z-index: 490;
}
.sidebar-overlay.is-open { display: block; }

/* ── Responsive ─────────────────────────────────────────── */
@media (max-width: 900px) {
    .sidebar-toggle {
        display: flex;
    }
    .site-layout {
        display: block;
    }
    .sidenav {
        position: fixed;
        left: -260px;
        top: 0;
        width: 240px;
        max-height: 100vh;
        height: 100%;
        z-index: 500;
        transition: left 0.25s ease;
        box-shadow: none;
    }
    .sidenav.is-open {
        left: 0;
        box-shadow: 4px 0 24px rgba(0,0,0,0.18);
    }
}
