
/* ============================================
   PRODUCT CATALOG
   ============================================ */

.catalog {
  padding: 40px 0 80px;
  min-height: 60vh;
}

.catalog__container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 24px;
}

.catalog__header {
  margin-bottom: 32px;
}

.catalog__title {
  font-size: 2rem;
  font-weight: 700;
  color: #1a1a2e;
  margin: 0 0 8px;
}

.catalog__subtitle {
  color: #6b7280;
  margin: 0;
  font-size: 1rem;
}

/* Top bar */
.catalog__topbar {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.catalog__search {
  position: relative;
  flex: 1;
  min-width: 200px;
  max-width: 400px;
}

.catalog__search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: #9ca3af;
  pointer-events: none;
}

.catalog__search-input {
  width: 100%;
  padding: 10px 16px 10px 42px;
  border: 1.5px solid #e5e7eb;
  border-radius: 8px;
  font-size: 0.95rem;
  background: #fff;
  transition: border-color 0.2s;
}

.catalog__search-input:focus {
  outline: none;
  border-color: #1a1a2e;
}

.catalog__topbar-right {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-left: auto;
}

.catalog__count {
  color: #6b7280;
  font-size: 0.9rem;
  white-space: nowrap;
}

.catalog__sort-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
}
.catalog__sort {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  padding: 10px 38px 10px 14px;
  border: 1.5px solid #e5e7eb;
  border-radius: 10px;
  font-size: 0.9rem;
  font-weight: 600;
  font-family: inherit;
  color: #18163B;
  line-height: 1.2;
  background: #fff;
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.catalog__sort:hover { border-color: #5ED6A0; }
.catalog__sort:focus-visible {
  outline: none;
  border-color: #18163B;
  box-shadow: 0 0 0 3px rgba(94, 214, 160, 0.25);
}
.catalog__sort-caret {
  position: absolute;
  right: 12px;
  display: inline-flex;
  color: #6b7280;
  pointer-events: none;
}
@media (max-width: 560px) {
  .catalog__topbar-right { flex-wrap: wrap; gap: 10px; }
  .catalog__sort-wrap { flex: 1 1 auto; }
  .catalog__sort { width: 100%; }
}

/* Layout */
.catalog__layout {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 32px;
  align-items: start;
}

/* Sidebar */
.catalog__sidebar {
  position: sticky;
  top: 100px;
  background: #fff;
  border: 1.5px solid #e5e7eb;
  border-radius: 12px;
  padding: 20px;
}

.catalog__filter-close {
  display: none;
  position: absolute;
  top: 12px;
  right: 16px;
  background: none;
  border: none;
  font-size: 1.8rem;
  cursor: pointer;
  color: #6b7280;
}

.catalog__filter-group {
  margin-bottom: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid #f3f4f6;
}

.catalog__filter-group:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.catalog__filter-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #374151;
  margin: 0 0 12px;
  cursor: pointer;
  user-select: none;
}

.catalog__filter-title svg {
  transition: transform 0.2s;
}

.catalog__filter-title.collapsed svg {
  transform: rotate(-90deg);
}

.catalog__filter-options {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 280px;
  overflow-y: auto;
  transition: max-height 0.3s, opacity 0.2s;
}

.catalog__filter-options.collapsed {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
}

.catalog__checkbox {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 0;
  font-size: 0.9rem;
  color: #374151;
  cursor: pointer;
  transition: color 0.15s;
}

.catalog__checkbox:hover {
  color: #1a1a2e;
}

.catalog__checkbox--child {
  padding-left: 20px;
  font-size: 0.85rem;
}

.catalog__checkbox input[type="checkbox"],
.catalog__checkbox input[type="radio"] {
  accent-color: #1a1a2e;
  width: 16px;
  height: 16px;
  cursor: pointer;
}

.catalog__filter-count {
  color: #9ca3af;
  font-size: 0.8rem;
}

/* Active filters */
.catalog__active-filters {
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid #f3f4f6;
}

.catalog__active-filters-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #6b7280;
}

.catalog__clear-all {
  background: none;
  border: none;
  color: #dc2626;
  font-size: 0.8rem;
  cursor: pointer;
  text-decoration: underline;
}

.catalog__active-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.catalog__tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  background: #f0f0f5;
  border-radius: 20px;
  font-size: 0.8rem;
  color: #374151;
}

.catalog__tag button {
  background: none;
  border: none;
  cursor: pointer;
  color: #9ca3af;
  font-size: 1rem;
  padding: 0;
  line-height: 1;
}

.catalog__tag button:hover {
  color: #dc2626;
}

/* Product Grid */
.catalog__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 20px;
}

/* Product Card */
.catalog__card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1.5px solid #f3f4f6;
  border-radius: 12px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.15s;
}

.catalog__card:hover {
  border-color: #e5e7eb;
  box-shadow: 0 4px 20px rgba(0,0,0,0.06);
  transform: translateY(-2px);
}

.catalog__card-img {
  aspect-ratio: 3/4;
  overflow: hidden;
  border-radius: 12px 12px 0 0; /* #303: umar ulanurk, et hover-scale ei murraks kaardi nurki */
  background: #fff; /* #469: valge taust (oli hall #f9fafb; contain-pildi taust paistis halli) */
  display: flex;
  align-items: center;
  justify-content: center;
}

.catalog__card-img img {
  width: 100%;
  height: 100%;
  object-fit: contain; /* #421: ära lõika pildi ääri (nt jalatsid); ühtib hover-pildiga (img2 contain) */
  padding: 6px;
  transition: transform 0.3s;
}

.catalog__card:hover .catalog__card-img img {
  transform: scale(1.05);
}

.catalog__card-info {
  padding: 14px 16px 16px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.catalog__card-brand {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #9ca3af;
  margin-bottom: 4px;
}

.catalog__card-title {
  font-size: 0.95rem;
  font-weight: 500;
  color: #1a1a2e;
  margin: 0 0 auto;
  line-height: 1.4;
}

.catalog__card-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 10px;
}

.catalog__card-stock {
  font-size: 0.8rem;
  font-weight: 500;
}

.catalog__card-stock.stock--in {
  color: #059669;
}

.catalog__card-stock.stock--order {
  color: #d97706;
}

.catalog__card-price {
  font-size: 0.95rem;
  font-weight: 600;
  color: #1a1a2e;
}

/* Loading */
.catalog__loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 48px 0;
  color: #6b7280;
}

.catalog__spinner {
  width: 24px;
  height: 24px;
  border: 3px solid #e5e7eb;
  border-top-color: #1a1a2e;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Empty state */
.catalog__empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 64px 24px;
  text-align: center;
  color: #6b7280;
  gap: 12px;
}

/* Load more */
.catalog__loadmore {
  display: flex;
  justify-content: center;
  padding: 32px 0;
}

.catalog__loadmore-btn {
  padding: 12px 32px;
}

/* Mobile filter toggle */
.catalog__filter-toggle {
  display: none;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  background: #fff;
  border: 1.5px solid #e5e7eb;
  border-radius: 8px;
  font-size: 0.9rem;
  cursor: pointer;
  margin-bottom: 16px;
}

/* Responsive */
@media (max-width: 900px) {
  .catalog__layout {
    grid-template-columns: 1fr;
  }

  .catalog__sidebar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1000;
    border-radius: 0;
    overflow-y: auto;
    transform: translateX(-100%);
    transition: transform 0.3s;
    padding: 60px 24px 24px;
  }

  .catalog__sidebar.open {
    transform: translateX(0);
  }

  .catalog__filter-close {
    display: block;
  }

  .catalog__filter-toggle {
    display: inline-flex;
  }

  .catalog__grid {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 12px;
  }

  .catalog__topbar {
    flex-direction: column;
    align-items: stretch;
  }

  .catalog__search {
    max-width: 100%;
  }

  .catalog__topbar-right {
    margin-left: 0;
    justify-content: space-between;
  }
}

/* Color swatches */
.catalog__color-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 4px 0;
}
.catalog__color-swatch {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid transparent;
  cursor: pointer;
  transition: all 0.15s;
  outline: none;
  padding: 0;
}
.catalog__color-swatch:hover {
  transform: scale(1.15);
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}
.catalog__color-swatch.active {
  border-color: #1e3a5f;
  box-shadow: 0 0 0 2px #fff, 0 0 0 4px #1e3a5f;
}

/* Card actions */
.catalog__card { position: relative; }
.catalog__card-actions {
  display: flex;
  gap: 6px;
  padding: 0 12px 12px;
}
.catalog__card-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 8px 10px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  border: none;
  text-decoration: none;
  transition: all 0.15s;
}
/* #194 — logo-värv (#302B6E) */
.catalog__card-btn--view {
  background: #302B6E;
  color: #fff;
}
.catalog__card-btn--view:hover {
  background: #3D3786;
}
.catalog__card-btn--qv {
  background: #f3f4f6;
  color: #374151;
}
.catalog__card-btn--qv:hover {
  background: #e5e7eb;
}
.catalog__card-title-link {
  text-decoration: none;
  color: inherit;
}
.catalog__card-title-link:hover {
  color: #c8758a;
}
.catalog__card-img {
  display: block;
}

/* Pagination */
.catalog__pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  padding: 32px 0 16px;
}
.catalog__page-btn {
  min-width: 40px;
  height: 40px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #fff;
  color: #18163B;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: 0.2s;
  font-family: inherit;
}
.catalog__page-btn:hover {
  background: #f3f4f6;
  border-color: #d1d5db;
}
.catalog__page-btn--active {
  background: #18163B;
  color: #fff;
  border-color: #18163B;
}
.catalog__page-dots {
  padding: 0 4px;
  color: #9ca3af;
}

/* Catalog card hover image swap */
.catalog__card-img { position: relative; overflow: hidden; }
.catalog__card-img2 {
  position: absolute; top: 0; left: 0; width: 100%; height: 100%;
  object-fit: contain; opacity: 0; transition: opacity 0.3s;
}
.catalog__card:hover .catalog__card-img2 { opacity: 1; }

/* Category description — multi-line support */
.catalog__subtitle {
  max-width: 720px; color: var(--text-light, #5a6a8a);
  font-size: 0.9375rem; line-height: 1.6;
}
.catalog__subtitle p { margin: 0 0 8px; }
.catalog__subtitle p:last-child { margin-bottom: 0; }

/* #181: Suurus-filter chip-id (S, M, L, XL...) */
.catalog__size-options {
  display: flex; flex-wrap: wrap; gap: 6px;
}
.catalog__size-chip {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 38px; height: 32px;
  padding: 0 8px;
  border: 1.5px solid #e5e7eb;
  border-radius: 6px;
  background: #fff;
  color: #18163B;
  font-size: 0.8125rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
}
.catalog__size-chip:hover {
  border-color: #18163B;
}
.catalog__size-chip.active {
  background: #18163B;
  border-color: #18163B;
  color: #fff;
}


/* #198 — (sis. KM) suffix catalog-kaardi hinna järel — väike halli tekstiga */
.catalog__card-price {
  display: inline-flex !important;
  align-items: baseline !important;
  gap: 4px !important;
  flex-wrap: nowrap !important;
}
.catalog__card-price-vat {
  font-size: 0.6875rem !important;
  font-weight: 500 !important;
  color: #9ca3af !important;
  white-space: nowrap !important;
  display: inline-block !important;
}

/* ============================================
   #237 (Kaja, 15.05.2026): Värvi-swatchid horisontaalselt mahuvad
   ============================================ */
.catalog__filter-options.catalog__color-options,
#filterColors {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: wrap !important;
  gap: 10px !important;
  padding: 4px 0 !important;
  align-items: center !important;
  width: 100% !important;
  max-width: 100% !important;
}
.catalog__color-swatch {
  width: 30px !important;
  height: 30px !important;
  flex: 0 0 auto !important;
  display: inline-block !important;
}
@media (max-width: 900px) {
  .catalog__color-swatch {
    width: 34px !important;
    height: 34px !important;
  }
}

/* ============================================
   #221 v2 (Indrek, 15.05.2026): Catalog kaardi nupud mahuvad mobiilis
   ============================================ */
@media (max-width: 768px) {
  .catalog__card-actions {
    gap: 4px !important;
    padding: 0 8px 10px !important;
  }
  .catalog__card-btn {
    padding: 7px 6px !important;
    font-size: 11px !important;
    gap: 3px !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    min-width: 0 !important;
  }
  .catalog__card-btn svg {
    width: 12px !important;
    height: 12px !important;
    flex-shrink: 0 !important;
  }
}
@media (max-width: 380px) {
  .catalog__card-btn {
    font-size: 10.5px !important;
    padding: 6px 4px !important;
  }
}


/* ============================================
   #203 (Indrek, 15.05.2026): Sidebar iseseisev hover-scroll
   - Filtrid sidebar'is scroll'ivad eraldi (ei mojuta lehe scroll'i)
   - overscroll-behavior: contain - kui joud serva, ei lekki lehe scrolli
   ============================================ */
@media (min-width: 901px) {
  .catalog__sidebar {
    max-height: calc(100vh - 120px) !important;
    overflow-y: auto !important;
    overscroll-behavior: contain !important;
    scrollbar-width: thin;
  }
  .catalog__sidebar::-webkit-scrollbar {
    width: 6px;
  }
  .catalog__sidebar::-webkit-scrollbar-track {
    background: #f9fafb;
  }
  .catalog__sidebar::-webkit-scrollbar-thumb {
    background: #d1d5db;
    border-radius: 3px;
  }
  .catalog__sidebar::-webkit-scrollbar-thumb:hover {
    background: #9ca3af;
  }
}

/* ============================================
   #205 v2 (Indrek, 15.05.2026): Filter sidebar polish — vähem dramatic, tighter, better UX
   ============================================ */
.catalog__filter-group {
  margin-bottom: 14px !important;
  padding-bottom: 14px !important;
  border-bottom: 1px solid #f3f4f6 !important;
}
.catalog__filter-group:last-child {
  border-bottom: none !important;
}
.catalog__filter-title {
  font-size: 0.8125rem !important;
  font-weight: 600 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.06em !important;
  color: #18163B !important;
  margin: 0 !important;
  padding: 6px 0 !important;
  border-radius: 6px !important;
  transition: color 0.15s !important;
}
.catalog__filter-title:hover {
  color: #4BBF8C !important;
}
.catalog__filter-title svg {
  width: 12px !important;
  height: 12px !important;
  stroke-width: 2 !important;
  color: #6b7280 !important;
}
.catalog__filter-title.collapsed:hover svg {
  color: #4BBF8C !important;
}
/* Avatud filtri (mitte-collapsed) options-blokk saab top-padding */
.catalog__filter-options:not(.collapsed) {
  padding-top: 12px !important;
}
/* Checkbox/radio väiksemad, ilusamad */
.catalog__checkbox {
  font-size: 0.875rem !important;
  padding: 5px 0 !important;
  color: #4b5563 !important;
  cursor: pointer !important;
  transition: color 0.1s !important;
}
.catalog__checkbox:hover {
  color: #18163B !important;
}

/* ============================================
   #205 v5 collapsible (Kaja, 18.05.2026): Kategooria parent+laps dropdown nagu live
   ============================================ */
.catalog__cat-group {
  margin-bottom: 2px;
}
.catalog__cat-parent {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}
.catalog__cat-parent .catalog__checkbox {
  flex: 1;
  margin: 0;
}
.catalog__cat-toggle {
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #9ca3af;
  border-radius: 50%;
  width: 26px;
  height: 26px;
  flex-shrink: 0;
  transition: background 0.15s, color 0.15s;
}
.catalog__cat-toggle:hover {
  background: #f3f4f6;
  color: #18163B;
}
.catalog__cat-toggle svg {
  transition: transform 0.2s ease;
}
.catalog__cat-group.is-open .catalog__cat-toggle svg {
  transform: rotate(180deg);
}
.catalog__cat-children {
  padding-left: 16px;
  margin-top: 2px;
  border-left: 1.5px solid #f3f4f6;
  margin-left: 6px;
}
.catalog__cat-children[hidden] {
  display: none !important;
}
.catalog__checkbox--child {
  font-size: 0.8125rem !important;
  color: #6b7280 !important;
  padding: 4px 0 !important;
}
.catalog__checkbox--child:hover {
  color: #18163B !important;
}


/* ============================================================
   #246 (Indrek, 18.05.2026): Kentaur-stiilis filter-drawer
   ============================================================ */

/* Trigger nupp toolbar'is */
.catalog__filter-trigger {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  background: #18163B;
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 0.9375rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.15s, transform 0.15s;
  position: relative;
}
.catalog__filter-trigger:hover { background: #221f52; transform: translateY(-1px); }
.catalog__filter-trigger-badge {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 20px; height: 20px; padding: 0 6px;
  background: #5ED6A0; color: #18163B;
  border-radius: 999px; font-size: 0.75rem; font-weight: 800;
}
.catalog__topbar-right { display: flex; align-items: center; gap: 16px; }

/* Active filter chips bar */
.catalog__active-bar {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  margin: 0 0 20px;
}
.catalog__active-tags { display: flex; gap: 8px; flex-wrap: wrap; }
.cat-tag {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 8px 6px 14px;
  background: #f3f4f6; border-radius: 999px;
  font-size: 0.8125rem; font-weight: 600; color: #18163B;
}
.cat-tag button {
  display: inline-flex; align-items: center; justify-content: center;
  width: 18px; height: 18px; border: none; border-radius: 50%;
  background: #18163B; color: #fff; cursor: pointer;
  font-size: 14px; line-height: 1; padding: 0;
}
.cat-tag button:hover { background: #dc2626; }
.catalog__clear-all {
  background: none; border: none; cursor: pointer;
  color: #4BBF8C; font-weight: 600; font-size: 0.8125rem;
  text-decoration: underline; font-family: inherit;
}

/* ---- DRAWER ---- */
.cat-drawer__backdrop {
  position: fixed; inset: 0; z-index: 9998;
  background: rgba(24, 22, 59, 0.45);
  opacity: 0; visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px);
}
.cat-drawer__backdrop.is-open { opacity: 1; visibility: visible; }

.cat-drawer {
  position: fixed; top: 0; left: -480px;
  width: 440px; max-width: 92vw; height: 100vh;
  z-index: 9999; background: #fff;
  display: flex; flex-direction: column;
  box-shadow: 16px 0 48px rgba(24, 22, 59, 0.18);
  transition: left 0.34s cubic-bezier(0.22, 1, 0.36, 1);
}
.cat-drawer.is-open { left: 0; }

.cat-drawer__head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 22px 26px; border-bottom: 1.5px solid #f3f4f6; flex-shrink: 0;
}
.cat-drawer__title { font-size: 1.25rem; font-weight: 800; color: #18163B; margin: 0; }
.cat-drawer__close {
  display: flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; border: none; border-radius: 50%;
  background: #f3f4f6; color: #18163B; cursor: pointer; transition: background 0.15s;
}
.cat-drawer__close:hover { background: #e5e7eb; }

.cat-drawer__body {
  flex: 1; overflow-y: auto; padding: 18px 26px;
  overscroll-behavior: contain;
}
.cat-drawer__body::-webkit-scrollbar { width: 6px; }
.cat-drawer__body::-webkit-scrollbar-thumb { background: #d1d5db; border-radius: 3px; }

/* Quick sort chips */
.cat-drawer__quick {
  display: flex; flex-wrap: wrap; gap: 8px;
  padding-bottom: 18px; margin-bottom: 6px;
  border-bottom: 1.5px solid #f3f4f6;
}

/* Sections accordion */
.cat-sec { border-bottom: 1.5px solid #f3f4f6; }
.cat-sec:last-child { border-bottom: none; }
.cat-sec__head {
  display: flex; align-items: center; justify-content: space-between;
  width: 100%; padding: 16px 0; background: none; border: none;
  cursor: pointer; font-family: inherit;
  font-size: 0.9375rem; font-weight: 700; color: #18163B;
  text-transform: uppercase; letter-spacing: 0.03em;
}
.cat-sec__head svg { transition: transform 0.2s ease; color: #6b7280; }
.cat-sec__head[aria-expanded="false"] svg { transform: rotate(-90deg); }
.cat-sec__body {
  padding: 4px 0 18px;
  max-height: 1200px; overflow: hidden;
  transition: max-height 0.3s ease, opacity 0.2s ease, padding 0.2s ease;
}
.cat-sec__body--collapsed {
  max-height: 0 !important; padding: 0 !important; opacity: 0;
}

/* Chips (brand / sort / size) */
.cat-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 9px 16px; border: 1.5px solid #e5e7eb; border-radius: 999px;
  background: #fff; color: #18163B;
  font-size: 0.875rem; font-weight: 600; font-family: inherit;
  cursor: pointer; transition: all 0.15s;
}
.cat-chip em { font-style: normal; color: #9ca3af; font-size: 0.8125rem; }
.cat-chip:hover { border-color: #5ED6A0; }
.cat-chip.is-active {
  background: #18163B; color: #fff; border-color: #18163B;
}
.cat-chip.is-active em { color: rgba(255,255,255,0.6); }
.cat-chip--outlet {
  background: linear-gradient(135deg, #5ED6A0 0%, #4BBF8C 100%);
  color: #18163B; border-color: transparent; font-weight: 700;
}
.cat-chip--outlet:hover { background: linear-gradient(135deg, #4BBF8C 0%, #3ba37a 100%); }
#filterBrands, #filterSizes { display: flex; flex-wrap: wrap; gap: 8px; }
.cat-chip--size { min-width: 48px; justify-content: center; padding: 9px 12px; }

/* Color swatches */
#filterColors { display: flex; flex-wrap: wrap; gap: 10px; }
.cat-swatch {
  width: 32px; height: 32px; border-radius: 50%;
  border: 2px solid #fff; cursor: pointer; padding: 0;
  box-shadow: 0 0 0 1px #e5e7eb; /* peen aaris, et hele varv oleks nahtav */
  transition: transform 0.15s, box-shadow 0.15s;
}
.cat-swatch:hover {
  transform: scale(1.1);
  box-shadow: 0 0 0 2px #5ED6A0; /* #296: ohuke brandi-roheline ring hoveril */
}
.cat-swatch.is-active {
  border-color: #fff;
  box-shadow: 0 0 0 2px #5ED6A0; /* #296: ohuke brandi-roheline ring aktiivsel */
}

/* Checkboxes / radios */
.cat-check {
  display: flex; align-items: center; gap: 10px;
  padding: 7px 0; cursor: pointer;
  font-size: 0.875rem; color: #4b5563; transition: color 0.1s;
}
.cat-check:hover { color: #18163B; }
.cat-check input { accent-color: #4BBF8C; width: 16px; height: 16px; flex-shrink: 0; }
.cat-check span { flex: 1; }
.cat-check em { font-style: normal; color: #9ca3af; font-size: 0.8125rem; }
.cat-check--child span { font-size: 0.8125rem; color: #6b7280; }

/* Category tree */
.cat-tree__grp { margin-bottom: 2px; }
.cat-tree__row { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.cat-tree__row .cat-check { flex: 1; margin: 0; }
.cat-tree__tog {
  background: none; border: none; cursor: pointer; padding: 4px;
  display: flex; align-items: center; justify-content: center;
  width: 24px; height: 24px; border-radius: 50%;
  color: #9ca3af; flex-shrink: 0; transition: background 0.15s, color 0.15s;
}
.cat-tree__tog:hover { background: #f3f4f6; color: #18163B; }
.cat-tree__tog svg { transition: transform 0.2s ease; }
.cat-tree__grp.is-open .cat-tree__tog svg { transform: rotate(180deg); }
.cat-tree__kids {
  padding-left: 16px; margin: 2px 0 2px 6px;
  border-left: 1.5px solid #f3f4f6;
}
.cat-tree__kids[hidden] { display: none !important; }

/* Price dual-slider */
.cat-price { padding: 8px 0; }
.cat-price__slider { position: relative; height: 32px; margin: 0 8px; }
.cat-price__track {
  position: absolute; top: 14px; left: 0; right: 0; height: 4px;
  background: #e5e7eb; border-radius: 2px;
}
.cat-price__range {
  position: absolute; top: 14px; height: 4px;
  background: #5ED6A0; border-radius: 2px;
}
.cat-price__slider input[type="range"] {
  position: absolute; top: 0; left: 0; width: 100%; height: 32px;
  margin: 0; background: none; pointer-events: none;
  -webkit-appearance: none; appearance: none;
}
.cat-price__slider input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 20px; height: 20px; border-radius: 50%;
  background: #18163B; border: 3px solid #fff;
  box-shadow: 0 1px 6px rgba(24,22,59,0.3);
  cursor: pointer; pointer-events: auto; margin-top: 0;
}
.cat-price__slider input[type="range"]::-moz-range-thumb {
  width: 20px; height: 20px; border-radius: 50%;
  background: #18163B; border: 3px solid #fff;
  box-shadow: 0 1px 6px rgba(24,22,59,0.3);
  cursor: pointer; pointer-events: auto;
}
.cat-price__slider input[type="range"]::-webkit-slider-runnable-track { background: none; }
.cat-price__inputs {
  display: flex; align-items: flex-end; gap: 12px; margin-top: 18px;
}
.cat-price__field { flex: 1; }
.cat-price__field label {
  display: block; font-size: 0.75rem; color: #9ca3af;
  font-weight: 600; margin-bottom: 4px;
}
.cat-price__inwrap {
  display: flex; align-items: center;
  border: 1.5px solid #e5e7eb; border-radius: 8px; padding: 8px 12px;
}
.cat-price__inwrap input {
  border: none; outline: none; width: 100%;
  font-size: 0.9375rem; font-family: inherit; color: #18163B;
  background: none; -moz-appearance: textfield;
}
.cat-price__inwrap input::-webkit-outer-spin-button,
.cat-price__inwrap input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.cat-price__inwrap span { color: #9ca3af; font-size: 0.875rem; }
.cat-price__sep { color: #9ca3af; padding-bottom: 10px; }

/* Footer */
.cat-drawer__foot {
  display: flex; gap: 12px; padding: 18px 26px;
  border-top: 1.5px solid #f3f4f6; flex-shrink: 0;
  background: #fff;
}
.cat-drawer__clear {
  flex: 0 0 auto; padding: 14px 22px;
  background: #f3f4f6; color: #18163B; border: none; border-radius: 12px;
  font-weight: 600; font-size: 0.9375rem; cursor: pointer; font-family: inherit;
  transition: background 0.15s;
}
.cat-drawer__clear:hover { background: #e5e7eb; }
.cat-drawer__apply {
  flex: 1; padding: 14px 22px;
  background: #18163B; color: #fff; border: none; border-radius: 12px;
  font-weight: 700; font-size: 0.9375rem; cursor: pointer; font-family: inherit;
  transition: background 0.15s, transform 0.15s;
}
.cat-drawer__apply:hover { background: #221f52; transform: translateY(-1px); }

/* Catalog layout — eemaldame vana sidebar-grid'i, grid täislaiuses */
.catalog__products { width: 100%; }
.catalog__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
@media (max-width: 1100px) { .catalog__grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 768px)  { .catalog__grid { grid-template-columns: repeat(2, 1fr); gap: 12px; } }
@media (max-width: 460px) {
  .cat-drawer { width: 100vw; max-width: 100vw; left: -100vw; }
  .cat-drawer__body { padding: 16px 18px; }
  .cat-drawer__head, .cat-drawer__foot { padding: 16px 18px; }
}
