/* ==========================================================================
   Store Page & Cyber Sidebar Filters - Zynox Store
   ========================================================================== */

.store-layout {
  display: grid;
  grid-template-columns: 290px 1fr;
  gap: 32px;
  align-items: start;
  margin-top: 24px;
}

html[dir="rtl"] .store-layout {
  grid-template-columns: 290px 1fr;
}

@media (max-width: 992px) {
  .store-layout {
    grid-template-columns: 1fr;
    gap: 20px;
  }
}

/* ---------------- Sidebar Filters ---------------- */
.store-sidebar {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 24px 20px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
  position: sticky;
  top: 90px;
  max-height: calc(100vh - 110px);
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--color-border) transparent;
}

.store-sidebar::-webkit-scrollbar {
  width: 5px;
}

.store-sidebar::-webkit-scrollbar-thumb {
  background: var(--color-border);
  border-radius: 999px;
}

.store-sidebar::-webkit-scrollbar-thumb:hover {
  background: var(--color-primary);
}

/* Sidebar Header */
.sidebar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--color-border);
  margin-bottom: 20px;
}

.sidebar-title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 900;
  color: #fff;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 8px;
}

.sidebar-clear-btn {
  background: none;
  border: none;
  color: var(--color-text-muted);
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  transition: all 0.2s ease;
}

.sidebar-clear-btn:hover {
  color: #ff6b2b;
  background: rgba(255, 107, 43, 0.1);
}

/* Custom Filter Pill Banner */
.custom-filter-pill {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.15), rgba(255, 107, 43, 0.15));
  border: 1px solid rgba(168, 85, 247, 0.35);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  margin-bottom: 22px;
  cursor: pointer;
  transition: all 0.25s ease;
}

.custom-filter-pill:hover {
  border-color: rgba(255, 107, 43, 0.6);
  box-shadow: 0 0 16px rgba(168, 85, 247, 0.25);
  transform: translateY(-1px);
}

.custom-filter-pill__left {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.86rem;
  font-weight: 800;
  color: #fff;
}

.custom-filter-pill__badge {
  font-size: 0.72rem;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.1);
  color: #d8b4fe;
  padding: 3px 8px;
  border-radius: 999px;
}

/* Filter Sections */
.filter-section {
  margin-bottom: 24px;
}

.filter-section:last-child {
  margin-bottom: 0;
}

.filter-section__title {
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: #94a3b8;
  margin-bottom: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Checkbox List */
.filter-checkbox-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 240px;
  overflow-y: auto;
  padding-right: 4px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.1) transparent;
}

html[dir="rtl"] .filter-checkbox-list {
  padding-right: 0;
  padding-left: 4px;
}

.filter-checkbox-list::-webkit-scrollbar {
  width: 4px;
}

.filter-checkbox-list::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 4px;
}

/* Checkbox Item Label */
.filter-checkbox-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-text-muted);
  cursor: pointer;
  padding: 5px 8px;
  border-radius: 6px;
  transition: all 0.18s ease;
  user-select: none;
}

.filter-checkbox-item:hover {
  background: var(--color-surface-hover);
  color: #fff;
}

.filter-checkbox-item input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 17px;
  height: 17px;
  border: 1.5px solid rgba(255, 255, 255, 0.25);
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.3);
  cursor: pointer;
  display: grid;
  place-content: center;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  flex-shrink: 0;
  margin: 0;
}

.filter-checkbox-item input[type="checkbox"]::before {
  content: "";
  width: 9px;
  height: 9px;
  background: var(--color-primary);
  transform: scale(0);
  transition: transform 0.15s ease-in-out;
  border-radius: 2px;
  box-shadow: 0 0 8px var(--color-primary-glow);
}

.filter-checkbox-item input[type="checkbox"]:checked {
  border-color: var(--color-primary);
  background: rgba(255, 107, 43, 0.15);
}

.filter-checkbox-item input[type="checkbox"]:checked::before {
  transform: scale(1);
}

.filter-checkbox-item input[type="checkbox"]:checked ~ .filter-checkbox-label {
  color: #fff;
  font-weight: 700;
}

.filter-checkbox-label {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.filter-checkbox-count {
  font-size: 0.72rem;
  color: var(--color-text-muted);
  background: rgba(255, 255, 255, 0.05);
  padding: 1px 6px;
  border-radius: 999px;
}

/* Price Range Slider */
.price-slider-wrap {
  padding: 4px 2px;
}

.price-slider-inputs {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
}

.price-input-box {
  background: var(--color-surface-alt);
  border: 1px solid var(--color-border);
  border-radius: 6px;
  padding: 6px 10px;
  font-size: 0.8rem;
  font-weight: 700;
  color: #fff;
  width: 100%;
  text-align: center;
}

.price-range-slider {
  width: 100%;
  accent-color: var(--color-primary);
  cursor: pointer;
}

/* Quick Filter Badges in Main Area */
.active-filters-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.active-filter-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 107, 43, 0.12);
  border: 1px solid rgba(255, 107, 43, 0.35);
  color: #ff8c5a;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.active-filter-badge:hover {
  background: rgba(239, 68, 68, 0.15);
  border-color: rgba(239, 68, 68, 0.4);
  color: #f87171;
}

/* Mobile Filter Drawer Overlay */
@media (max-width: 992px) {
  .store-sidebar {
    position: fixed;
    top: 0;
    bottom: 0;
    left: -100%;
    width: 320px;
    max-width: 85vw;
    height: 100vh;
    max-height: 100vh;
    z-index: 1050;
    border-radius: 0;
    border-left: none;
    border-right: 1px solid var(--color-border);
    transition: left 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  }

  html[dir="rtl"] .store-sidebar {
    left: auto;
    right: -100%;
    border-right: none;
    border-left: 1px solid var(--color-border);
    transition: right 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  }

  .store-sidebar.open {
    left: 0;
  }

  html[dir="rtl"] .store-sidebar.open {
    right: 0;
  }

  .mobile-filter-btn {
    display: inline-flex !important;
  }
}

.mobile-filter-btn {
  display: none;
}
