/* ═══ Category Page — GFP 2027 Premium ═══ */

/* ── Header override: sticky + glass on category ── */
.page-category .site-header {
  position: sticky !important;
  top: 0;
  background: rgba(18, 20, 24, 0.85) !important;
  backdrop-filter: blur(20px) saturate(1.4) !important;
  -webkit-backdrop-filter: blur(20px) saturate(1.4) !important;
  border-bottom: 1px solid var(--border) !important;
  box-shadow: 0 1px 24px rgba(0,0,0,0.3) !important;
}
html:not(.dark) .page-category .site-header {
  background: rgba(248, 250, 252, 0.92) !important;
  border-bottom: 1px solid var(--border) !important;
  box-shadow: 0 1px 12px rgba(0,0,0,0.06) !important;
}
.page-category .site-header .nav-link-c { color: var(--text-secondary); }
.page-category .site-header .nav-link-c:hover { color: var(--text); }
.page-category .site-header .hdr-btn {
  border-color: var(--border) !important;
  background: var(--surface-2) !important;
  color: var(--text-muted) !important;
}
.page-category .site-header .hdr-btn:hover {
  color: var(--blue) !important;
  border-color: rgba(var(--blue-rgb), 0.35) !important;
  background: rgba(var(--blue-rgb), 0.12) !important;
}
.page-category .site-header .hdr-signin-btn {
  border-color: var(--border) !important;
  background: var(--surface-2) !important;
  color: var(--text-secondary) !important;
}
.page-category .site-header .hdr-logo img { filter: none !important; }

/* ═══ PAGE HERO ═══ */
.cat-hero {
  position: relative;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 28px 0 0;
  overflow: hidden;
}
/* Subtle glow orb behind title */
.cat-hero::before {
  content: '';
  position: absolute;
  top: -60px;
  left: 15%;
  width: 400px;
  height: 200px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(var(--blue-rgb), 0.05) 0%, transparent 70%);
  pointer-events: none;
}
.cat-hero__inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
}

/* Breadcrumb */
.cat-breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 18px;
}
.cat-breadcrumb a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.15s;
}
.cat-breadcrumb a:hover { color: var(--blue); }
.cat-breadcrumb svg { flex-shrink: 0; }

/* Title row */
.cat-hero__row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 0;
}
.cat-hero__title {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 900;
  letter-spacing: -0.04em;
  color: var(--text);
  margin-bottom: 6px;
  line-height: 1.1;
}
.cat-hero__count {
  font-size: 13px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 8px;
}
.cat-hero__count strong {
  color: var(--text);
  font-weight: 800;
  font-size: 15px;
}
.cat-hero__count-dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--text-muted);
  opacity: 0.5;
}

/* Accent line: a short brand-coloured stub on a neutral rule */
.cat-hero__line {
  height: 1px;
  background: var(--border);
  margin-top: 20px;
  position: relative;
}
.cat-hero__line::before {
  content: '';
  position: absolute;
  left: 0;
  top: -1px;
  width: 56px;
  height: 3px;
  border-radius: 2px;
  background: var(--blue);
}

/* ═══ SUBCATEGORY TABS ═══ */
.cat-tabs {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.cat-tab {
  padding: 7px 16px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.2s ease;
  text-decoration: none;
  white-space: nowrap;
}
.cat-tab:hover {
  border-color: rgba(var(--blue-rgb), 0.4);
  color: var(--blue);
  background: rgba(var(--blue-rgb), 0.05);
  transform: translateY(-1px);
}
.cat-tab.is-active {
  background: var(--blue);
  border-color: var(--blue);
  color: var(--btn-text);
  font-weight: 700;
  box-shadow: 0 2px 12px rgba(var(--blue-rgb), 0.35);
}

/* ═══ MAIN LAYOUT ═══ */
.cat-main {
  max-width: 1400px;
  margin: 0 auto;
  padding: 28px 24px 80px;
  display: flex;
  gap: 24px;
  align-items: flex-start;
}

/* ═══ SIDEBAR ═══ */
.cat-sidebar {
  width: 260px;
  flex-shrink: 0;
  position: sticky;
  top: 84px;
}
.cat-sidebar__inner {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 22px;
  max-height: calc(100vh - 100px);
  overflow-y: auto;
  box-shadow: 0 4px 24px rgba(0,0,0,0.08);
}
.dark .cat-sidebar__inner {
  box-shadow: 0 4px 32px rgba(0,0,0,0.3);
}
.cat-sidebar__inner::-webkit-scrollbar { width: 3px; }
.cat-sidebar__inner::-webkit-scrollbar-track { background: transparent; }
.cat-sidebar__inner::-webkit-scrollbar-thumb { background: rgba(var(--blue-rgb), 0.2); border-radius: 2px; }
.cat-sidebar__inner::-webkit-scrollbar-thumb:hover { background: rgba(var(--blue-rgb), 0.4); }

.cat-sidebar__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}
.cat-sidebar__title {
  font-size: 15px;
  font-weight: 800;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 8px;
}
.cat-sidebar__title svg { color: var(--blue); opacity: 0.7; }
.cat-sidebar__clear {
  font-size: 11px;
  font-weight: 600;
  color: var(--red);
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
  padding: 3px 8px;
  border-radius: 6px;
  transition: all 0.15s;
  text-decoration: none;
}
.cat-sidebar__clear:hover { background: rgba(239, 68, 68, 0.08); }

@media (max-width: 960px) {
  .cat-sidebar { display: none !important; }
}

/* ═══ FILTER GROUPS ═══ */
.cat-filter { margin-bottom: 20px; }
.cat-filter__title {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.cat-filter__title svg { width: 12px; height: 12px; opacity: 0.5; }

.cat-filter__list {
  max-height: 195px;
  overflow-y: auto;
  overflow-x: hidden;
}
.cat-filter__list::-webkit-scrollbar { width: 3px; }
.cat-filter__list::-webkit-scrollbar-track { background: transparent; }
.cat-filter__list::-webkit-scrollbar-thumb { background: rgba(var(--blue-rgb), 0.15); border-radius: 2px; }

.cat-filter__divider {
  height: 1px;
  background: var(--border);
  margin: 16px 0;
}

/* Filter option */
.cat-filter__opt {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 8px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s;
  margin-bottom: 1px;
}
.cat-filter__opt:hover { background: var(--surface-2); }

.cat-filter__opt input[type="checkbox"],
.cat-filter__opt input[type="radio"] {
  width: 16px;
  height: 16px;
  border-radius: 5px;
  border: 1.5px solid var(--border-hover);
  accent-color: var(--blue);
  cursor: pointer;
  flex-shrink: 0;
  transition: border-color 0.15s;
}
.cat-filter__opt:hover input[type="checkbox"],
.cat-filter__opt:hover input[type="radio"] {
  border-color: var(--blue);
}
.cat-filter__opt input[type="radio"] { border-radius: 50%; }

.cat-filter__label {
  font-size: 13px;
  color: var(--text-secondary);
  cursor: pointer;
  flex: 1;
  user-select: none;
  transition: color 0.15s;
}
.cat-filter__opt:hover .cat-filter__label { color: var(--text); }

.cat-filter__count {
  font-size: 10px;
  color: var(--text-muted);
  font-weight: 700;
  background: var(--surface-2);
  padding: 1px 6px;
  border-radius: 4px;
}

/* ═══ PRODUCT AREA ═══ */
.cat-products { flex: 1; min-width: 0; }

/* ═══ ACTIVE FILTER PILLS ═══ */
.cat-pills {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  flex-wrap: wrap;
  gap: 10px;
}
.cat-pills__list {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
}
.cat-pills__label {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.cat-pill {
  display: inline-flex !important;
  align-items: center !important;
  gap: 5px;
  background: rgba(var(--blue-rgb), 0.1) !important;
  border: 1px solid rgba(var(--blue-rgb), 0.25) !important;
  color: var(--blue) !important;
  font-size: 11px !important;
  font-weight: 700 !important;
  padding: 5px 12px !important;
  border-radius: 20px !important;
  cursor: pointer !important;
  transition: all 0.2s !important;
  font-family: inherit;
  backdrop-filter: blur(4px);
  position: relative !important;
  overflow: visible !important;
  text-transform: none !important;
}
.cat-pill::before {
  display: none !important;
}
.cat-pill:hover {
  background: rgba(var(--red), 0.12) !important;
  border-color: rgba(239, 68, 68, 0.4) !important;
  color: var(--red) !important;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(239, 68, 68, 0.15);
}
.cat-pill svg {
  opacity: 0.5;
  transition: opacity 0.15s;
}
.cat-pill:hover svg {
  opacity: 1;
}

/* ═══ MOBILE FILTER BUTTON ═══ */
.cat-mobile-filter-btn {
  display: none;
  align-items: center;
  gap: 7px;
  padding: 10px 18px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface);
  font-size: 13px;
  font-weight: 700;
  color: var(--text-secondary);
  cursor: pointer;
  font-family: inherit;
  transition: all 0.2s;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
.cat-mobile-filter-btn:hover {
  border-color: var(--blue);
  color: var(--blue);
}
.cat-mobile-filter-btn .cat-filter-badge {
  background: var(--blue);
  color: var(--btn-text);
  font-size: 10px;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 6px;
}
@media (max-width: 960px) {
  .cat-mobile-filter-btn { display: flex !important; }
}

/* ═══ SORT BAR ═══ */
.cat-sort {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 20px;
  padding: 12px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  flex-wrap: wrap;
}
.cat-sort__info {
  font-size: 13px;
  color: var(--text-muted);
}
.cat-sort__info strong {
  color: var(--text);
  font-weight: 800;
}
.cat-sort__actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.cat-sort__select {
  height: 36px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 9px;
  padding: 0 12px;
  font-size: 13px;
  color: var(--text);
  outline: none;
  cursor: pointer;
  font-family: inherit;
  transition: border-color 0.15s;
}
.cat-sort__select:focus { border-color: var(--blue); }

.cat-view-btn {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-muted);
  transition: all 0.15s;
}
.cat-view-btn.is-active,
.cat-view-btn:hover {
  border-color: var(--blue);
  background: rgba(var(--blue-rgb), 0.1);
  color: var(--blue);
}

/* ═══ PRODUCT GRID ═══ */
.cat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
@media (max-width: 1200px) { .cat-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 700px)  { .cat-grid { grid-template-columns: repeat(2, 1fr); } }

/* ═══ EMPTY STATE ═══ */
.cat-empty {
  text-align: center;
  padding: 80px 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
}
.cat-empty__icon {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: rgba(var(--blue-rgb), 0.08);
  border: 1px solid rgba(var(--blue-rgb), 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  color: var(--blue);
}
.cat-empty__title {
  font-size: 18px;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 8px;
}
.cat-empty__desc {
  font-size: 13px;
  color: var(--text-muted);
  max-width: 320px;
  margin: 0 auto;
}

/* ═══ PAGINATION ═══ */
.cat-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  margin-top: 40px;
  padding: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
}
.cat-pagination .pagination {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
  padding: 0;
  margin: 0;
}
.cat-pagination .pagination li { list-style: none; }
.cat-pagination .pagination li a,
.cat-pagination .pagination li span {
  min-width: 38px;
  height: 38px;
  padding: 0 10px;
  border-radius: 10px;
  border: 1px solid transparent;
  background: transparent;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  font-family: inherit;
  text-decoration: none;
}
.cat-pagination .pagination li a:hover {
  background: var(--surface-2);
  color: var(--blue);
}
.cat-pagination .pagination li.active span,
.cat-pagination .pagination li.active a {
  background: var(--blue);
  color: var(--btn-text);
  font-weight: 800;
  box-shadow: 0 2px 12px rgba(var(--blue-rgb), 0.35);
}

/* ═══ MOBILE FILTER DRAWER ═══ */
.cat-mobile-drawer {
  position: fixed;
  inset: 0;
  z-index: 9999;
}
.cat-mobile-drawer__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  opacity: 0;
  transition: opacity 0.25s ease;
}
.cat-mobile-drawer.is-open .cat-mobile-drawer__overlay {
  opacity: 1;
}
.cat-mobile-drawer__panel {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  max-height: 88vh;
  transform: translateY(100%);
  transition: transform 0.25s ease;
  background: var(--surface);
  border-radius: 24px 24px 0 0;
  border-top: 1px solid rgba(var(--blue-rgb), 0.15);
  overflow-y: auto;
  padding: 0 0 32px;
  box-shadow: 0 -8px 40px rgba(0,0,0,0.3);
}
.cat-mobile-drawer.is-open .cat-mobile-drawer__panel {
  transform: translateY(0);
}
.cat-mobile-drawer__handle {
  display: flex;
  justify-content: center;
  padding: 14px;
}
.cat-mobile-drawer__bar {
  width: 40px;
  height: 4px;
  border-radius: 2px;
  background: var(--border-hover);
}
.cat-mobile-drawer__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px 16px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 16px;
}
.cat-mobile-drawer__title {
  font-size: 17px;
  font-weight: 800;
  color: var(--text);
}
.cat-mobile-drawer__close {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-muted);
  transition: all 0.15s;
}
.cat-mobile-drawer__close:hover {
  border-color: var(--red);
  color: var(--red);
}
.cat-mobile-drawer__body { padding: 0 20px; }
.cat-mobile-drawer__apply {
  margin: 24px 20px 0;
  width: calc(100% - 40px);
  height: 52px;
  border-radius: 14px;
  border: none;
  background: var(--btn-bg);
  color: var(--btn-text);
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
  font-family: inherit;
  box-shadow: 0 4px 16px rgba(var(--btn-rgb), 0.3);
  transition: all 0.2s;
}
.cat-mobile-drawer__apply:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 24px rgba(var(--btn-rgb), 0.4);
}

/* ═══ PRICE SLIDER ═══ */
.cat-price-slider {
  width: 100%;
  height: 4px;
  border-radius: 2px;
  background: var(--border);
  outline: none;
  -webkit-appearance: none;
  cursor: pointer;
  margin: 12px 0 8px;
}
.cat-price-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--blue);
  border: 3px solid var(--surface);
  box-shadow: 0 0 0 2px rgba(var(--blue-rgb), 0.4), 0 2px 6px rgba(0,0,0,0.2);
  cursor: pointer;
  transition: box-shadow 0.15s;
}
.cat-price-slider::-webkit-slider-thumb:hover {
  box-shadow: 0 0 0 3px rgba(var(--blue-rgb), 0.5), 0 2px 8px rgba(0,0,0,0.3);
}
.cat-price-inputs { display: flex; gap: 8px; }
.cat-price-input {
  flex: 1;
  height: 34px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0 10px;
  font-size: 12px;
  color: var(--text);
  outline: none;
  font-family: inherit;
  text-align: center;
  font-weight: 600;
}
.cat-price-input:focus { border-color: var(--blue); }
