/* ============================================================
   CATALOG TOOLBAR (sticky)
   ============================================================ */
.catalog-toolbar {
    position: sticky;
    top: var(--nav-height, 68px);
    z-index: 100;
    background: rgba(255,255,255,.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid #deedf9;
    padding: .75rem 0;
}
.catalog-toolbar__inner {
    display: flex;
    align-items: center;
    gap: .6rem;
}

/* Search */
.catalog-search {
    flex: 1;
    position: relative;
    min-width: 0;
}
.catalog-search__icon {
    position: absolute;
    left: .9rem; top: 50%;
    transform: translateY(-50%);
    color: #8aabb8; font-size: 1rem;
    pointer-events: none;
}
.catalog-search__input {
    width: 100%; height: 42px;
    padding: 0 2.4rem 0 2.6rem;
    border: 1.5px solid #deedf9;
    border-radius: 12px;
    font-size: .9rem; color: #1a2a3a;
    background: #f5faff;
    transition: border-color .18s, box-shadow .18s;
    outline: none;
}
.catalog-search__input:focus {
    border-color: #90caf9;
    box-shadow: 0 0 0 3px rgba(144,202,249,.2);
    background: #fff;
}
.catalog-search__input::placeholder { color: #b0c9d8; }
.catalog-search__clear {
    position: absolute;
    right: .65rem; top: 50%;
    transform: translateY(-50%);
    width: 24px; height: 24px;
    border: none; background: none;
    display: flex; align-items: center; justify-content: center;
    color: #8aabb8; border-radius: 6px; cursor: pointer;
    transition: background .15s, color .15s;
}
.catalog-search__clear:hover { background: #e3f2fd; color: #1565c0; }

/* Sort select */
.catalog-sort {
    height: 42px;
    padding: 0 2rem 0 .85rem;
    border: 1.5px solid #deedf9;
    border-radius: 12px;
    font-size: .875rem; font-weight: 500; color: #1a2a3a;
    background: #f5faff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%238aabb8' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat right .75rem center;
    -webkit-appearance: none; appearance: none;
    cursor: pointer; outline: none;
    transition: border-color .18s; white-space: nowrap;
}
.catalog-sort:focus { border-color: #90caf9; }

/* Filter toggle button (mobile) */
.catalog-filter-btn {
    display: flex; align-items: center; gap: .4rem;
    height: 42px; padding: 0 1rem;
    background: #f5faff;
    border: 1.5px solid #deedf9;
    border-radius: 12px;
    font-size: .875rem; font-weight: 600; color: #1a2a3a;
    white-space: nowrap; cursor: pointer; flex-shrink: 0;
    transition: background .18s, border-color .18s;
}
.catalog-filter-btn:hover { background: #e3f2fd; border-color: #90caf9; }
.catalog-filter-badge {
    min-width: 18px; height: 18px;
    background: #1565c0; color: #fff;
    font-size: .65rem; font-weight: 700;
    border-radius: 100px;
    display: flex; align-items: center; justify-content: center; padding: 0 4px;
}

/* ============================================================
   ACTIVE FILTERS STRIP
   ============================================================ */
.active-filters-strip {
    background: #fff;
    border-bottom: 1px solid #eef4f9;
    padding: .6rem 0;
}
.active-filters {
    display: flex; align-items: center; gap: .5rem;
    overflow-x: auto; scrollbar-width: none; -ms-overflow-style: none;
    padding-bottom: 2px;
}
.active-filters::-webkit-scrollbar { display: none; }
.filter-chip {
    display: inline-flex; align-items: center; gap: .35rem;
    background: #e3f2fd; color: #1565c0;
    border: 1px solid #90caf9; border-radius: 100px;
    padding: .28rem .75rem;
    font-size: .78rem; font-weight: 600;
    text-decoration: none; white-space: nowrap; flex-shrink: 0;
    transition: background .18s, transform .18s;
}
.filter-chip:hover { background: #bbdefb; color: #0d47a1; transform: translateY(-1px); }
.filter-chip i { font-size: .75rem; }
.filter-chip--clear { background: #fff; color: #607d8b; border-color: #cfd8dc; }
.filter-chip--clear:hover { background: #eceff1; color: #455a64; }

/* ============================================================
   CATALOG LAYOUT
   ============================================================ */
.catalog-layout {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 1.75rem;
    align-items: start;
}
@media (max-width: 991px) {
    .catalog-layout { grid-template-columns: 1fr; }
}

/* ============================================================
   FILTER SIDEBAR
   ============================================================ */
.filter-sidebar {
    position: sticky;
    top: calc(var(--nav-height, 68px) + 62px);
    max-height: calc(100vh - var(--nav-height, 68px) - 80px);
    overflow-y: auto;
    scrollbar-width: thin; scrollbar-color: #deedf9 transparent;
    border-radius: 16px;
    border: 1.5px solid #deedf9;
    background: #fff;
    padding: 1.25rem;
}
.filter-sidebar::-webkit-scrollbar { width: 4px; }
.filter-sidebar::-webkit-scrollbar-thumb { background: #deedf9; border-radius: 4px; }
.filter-sidebar__title {
    font-size: .72rem; font-weight: 700;
    letter-spacing: .08em; text-transform: uppercase;
    color: #8aabb8; margin-bottom: 1rem;
}

/* Filter group */
.filter-group { margin-bottom: 1.35rem; }
.filter-group:last-of-type { margin-bottom: .75rem; }
.filter-group__head {
    display: flex; align-items: center; justify-content: space-between;
    font-size: .85rem; font-weight: 700; color: #1a2a3a;
    margin-bottom: .6rem;
    cursor: pointer; user-select: none;
}
.filter-group__toggle {
    font-size: .75rem; color: #8aabb8;
    transition: transform .22s;
}
.filter-group__body { display: flex; flex-direction: column; gap: .3rem; }
.filter-group__body.collapsed { display: none; }

/* Category links */
.filter-cat {
    display: flex; align-items: center; gap: .6rem;
    padding: .42rem .7rem;
    border-radius: 10px;
    font-size: .875rem; color: #3a5a7a;
    text-decoration: none; font-weight: 500;
    transition: background .18s, color .18s;
}
.filter-cat:hover { background: #f0f7ff; color: #1565c0; }
.filter-cat.active { background: #e3f2fd; color: #1565c0; font-weight: 700; }

/* Price inputs */
.price-inputs {
    display: grid; grid-template-columns: 1fr auto 1fr;
    align-items: center; gap: .4rem;
}
.price-input {
    width: 100%; height: 38px; padding: 0 .65rem;
    border: 1.5px solid #deedf9; border-radius: 10px;
    font-size: .875rem; color: #1a2a3a; background: #f5faff;
    outline: none; transition: border-color .18s;
}
.price-input:focus { border-color: #90caf9; }
.price-sep { color: #b0c9d8; font-size: .85rem; }

/* Attribute option */
.filter-option {
    display: flex; align-items: center; gap: .55rem;
    padding: .28rem .5rem;
    border-radius: 8px; cursor: pointer;
    transition: background .15s;
    font-size: .875rem; color: #3a5a7a; user-select: none;
}
.filter-option:hover { background: #f0f7ff; }
.filter-option input[type="radio"],
.filter-option input[type="checkbox"] { accent-color: #1565c0; width: 15px; height: 15px; flex-shrink: 0; }
.filter-option.checked { color: #1565c0; font-weight: 600; }

/* Apply button */
.btn-filter-apply {
    width: 100%;
    background: linear-gradient(135deg, #1565c0, #0288d1);
    color: #fff; border: none; border-radius: 12px;
    padding: .7rem; font-size: .9rem; font-weight: 700;
    cursor: pointer; margin-top: .5rem;
    transition: opacity .18s, transform .18s;
}
.btn-filter-apply:hover { opacity: .9; transform: translateY(-1px); }
.filter-reset {
    display: block; text-align: center;
    font-size: .8rem; color: #8aabb8; text-decoration: none;
    margin-top: .5rem; transition: color .15s;
}
.filter-reset:hover { color: #607d8b; }

/* ============================================================
   RESULTS HEADER
   ============================================================ */
.results-header {
    display: flex; align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem; gap: .75rem;
}
.results-count { font-size: .875rem; color: #8aabb8; font-weight: 500; white-space: nowrap; }
.results-count strong { color: #1a2a3a; }

/* ============================================================
   PRODUCT GRID
   ============================================================ */
.prod-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: .85rem;
}
@media (min-width: 768px) { .prod-grid { grid-template-columns: repeat(3, 1fr); gap: 1rem; } }
@media (min-width: 1200px) { .prod-grid { gap: 1.1rem; } }

/* Product card */
.pcard {
    background: #fff; border: 1.5px solid #deedf9;
    border-radius: 18px; overflow: hidden;
    display: flex; flex-direction: column;
    transition: transform .3s cubic-bezier(.34,1.56,.64,1), box-shadow .28s, border-color .25s;
    box-shadow: 0 2px 8px rgba(11,37,69,.05);
}
.pcard:hover { transform: translateY(-5px); box-shadow: 0 14px 40px rgba(11,37,69,.12); border-color: #90caf9; }
.pcard__img {
    position: relative; aspect-ratio: 1;
    background: #f0f7ff; overflow: hidden; flex-shrink: 0;
}
.pcard__img img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.pcard:hover .pcard__img img { transform: scale(1.07); }
.pcard__img-empty {
    width: 100%; height: 100%;
    display: flex; align-items: center; justify-content: center;
    font-size: 2.5rem; color: #b8d4e8;
}
.pcard__badge-sale {
    position: absolute; top: .55rem; left: .55rem;
    background: linear-gradient(135deg, #e53935, #d81b60);
    color: #fff; font-size: .66rem; font-weight: 700;
    padding: .2rem .5rem; border-radius: 100px;
}
.pcard__wish {
    position: absolute; top: .55rem; right: .55rem;
    width: 28px; height: 28px;
    background: #fff; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    color: #b0bec5; font-size: .8rem;
    box-shadow: 0 2px 6px rgba(0,0,0,.1);
    border: none; cursor: pointer;
    opacity: 0; transform: scale(.75);
    transition: opacity .2s, transform .2s, color .2s;
}
.pcard:hover .pcard__wish { opacity: 1; transform: scale(1); }
.pcard__wish:hover { color: #e53935; }
.pcard__body { padding: .85rem .9rem .5rem; flex: 1; display: flex; flex-direction: column; }
.pcard__cat { font-size: .65rem; font-weight: 700; color: #1565c0; text-transform: uppercase; letter-spacing: .07em; margin-bottom: .25rem; }
.pcard__name {
    font-size: .875rem; font-weight: 700; color: #1a2a3a; line-height: 1.35;
    margin-bottom: .5rem;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.pcard__prices { margin-top: auto; display: flex; align-items: baseline; gap: .4rem; flex-wrap: wrap; }
.pcard__price { font-size: 1.05rem; font-weight: 800; color: #0b2545; }
.pcard__price-old { font-size: .78rem; color: #b0bec5; text-decoration: line-through; }
.pcard__footer { padding: .5rem .9rem .9rem; }
.pcard__btn {
    display: flex; align-items: center; justify-content: center; gap: .4rem;
    width: 100%;
    background: linear-gradient(135deg, #1565c0, #0288d1);
    color: #fff; border: none; border-radius: 10px;
    padding: .58rem .75rem;
    font-size: .82rem; font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: background .2s, transform .18s, box-shadow .18s;
}
.pcard__btn:hover { color: #fff; background: linear-gradient(135deg,#0d47a1,#0277bd); transform: translateY(-1px); box-shadow: 0 4px 14px rgba(13,71,161,.28); }

/* ============================================================
   EMPTY STATE
   ============================================================ */
.catalog-empty {
    grid-column: 1 / -1;
    text-align: center; padding: 4rem 1rem;
}
.catalog-empty__icon { font-size: 3.5rem; color: #b0c9d8; display: block; margin-bottom: 1rem; }
.catalog-empty h3 { font-size: 1.25rem; font-weight: 700; color: #1a2a3a; margin-bottom: .5rem; }
.catalog-empty p { color: #8aabb8; margin-bottom: 1.5rem; }

/* ============================================================
   PAGINATION
   ============================================================ */
.catalog-pagination {
    display: flex; justify-content: center; align-items: center;
    gap: .35rem; margin-top: 2rem; flex-wrap: wrap;
}
.catalog-pagination a,
.catalog-pagination span {
    display: flex; align-items: center; justify-content: center;
    min-width: 38px; height: 38px;
    border-radius: 10px; font-size: .875rem; font-weight: 600; text-decoration: none;
    transition: background .18s, color .18s, transform .18s;
}
.catalog-pagination a { background: #f5faff; border: 1.5px solid #deedf9; color: #1a2a3a; }
.catalog-pagination a:hover { background: #e3f2fd; border-color: #90caf9; color: #1565c0; transform: translateY(-1px); }
.catalog-pagination a.active { background: linear-gradient(135deg,#1565c0,#0288d1); border-color: transparent; color: #fff; box-shadow: 0 4px 14px rgba(21,101,192,.3); }
.catalog-pagination span { color: #b0c9d8; background: none; border: none; }

/* Mobile offcanvas */
.filter-offcanvas { --bs-offcanvas-width: 300px; }
.filter-offcanvas .offcanvas-header { border-bottom: 1px solid #deedf9; padding: 1rem 1.25rem; }
.filter-offcanvas .offcanvas-body { padding: 1.25rem; overflow-y: auto; }

/* Category page hero */
.catalog-hero {
    background: linear-gradient(135deg, #071d38, #1565c0);
    padding: 2.5rem 0 2rem; color: #fff;
}
.catalog-hero__badge {
    display: inline-block;
    background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.2);
    color: rgba(255,255,255,.8);
    font-size: .7rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
    padding: .25rem .75rem; border-radius: 100px; margin-bottom: .75rem;
}
.catalog-hero__title { font-size: clamp(1.5rem, 4vw, 2.25rem); font-weight: 800; margin-bottom: .4rem; letter-spacing: -.02em; }
.catalog-hero__sub { color: rgba(255,255,255,.6); font-size: .95rem; }

@media (max-width: 575px) {
    .pcard__name { font-size: .8rem; }
    .pcard__price { font-size: .95rem; }
}
