/*
 Theme Name:   Bricks Child Theme
 Theme URI:    https://bricksbuilder.io/
 Description:  Use this child theme to extend Bricks.
 Author:       Bricks
 Author URI:   https://bricksbuilder.io/
 Template:     bricks
 Version:      1.1
 Text Domain:  bricks
*/

/* ================================================================
   Product filters
================================================================ */

.sl-product-filters,
.sl-filter-block {
  font-family: "DM Sans", "Segoe UI", sans-serif;
}

/* ---------- Panel (desktop: visible inline; mobile: popup) ---------- */
.sl-filter-panel {
  border: 1px solid #e9ebef;
  border-radius: 16px;
  padding: 16px;
  background: #fff;
}

/* ---------- Mobile toggle button ---------- */
.sl-filter-mobile-toggle {
  display: none;
  align-items: center;
  gap: 6px;
  border: 1px solid #c89a18;
  border-radius: 999px;
  background: #fff7df;
  color: #7a5600;
  font-weight: 700;
  font-size: 14px;
  padding: 10px 18px;
  cursor: pointer;
  line-height: 1;
}

/* ---------- Mobile close button ---------- */
.sl-filter-mobile-close {
  display: none;
  margin-left: auto;
  margin-bottom: 14px;
  border: none;
  background: transparent;
  color: #6b7280;
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  padding: 0;
}

/* ---------- Block spacing ---------- */
.sl-filter-block + .sl-filter-block {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid #f3f4f6;
}

/* ---------- Section titles (Categorias / Rango de Precio) ---------- */
.sl-filter-section-title {
  margin: 0 0 12px;
  color: #111827;
  font-size: 14px;
  font-weight: 700;
}

/* ---------- Search ---------- */
.sl-filter-search-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.sl-filter-search-input {
  width: 100%;
  border: 1px solid #d1d5db;
  border-radius: 12px;
  background: #fff;
  height: 44px;
  padding: 0 46px 0 14px;
  font-size: 14px;
  color: #111827;
  -webkit-appearance: none;
  appearance: none;
}

/* hide native clear X in search inputs */
.sl-filter-search-input::-webkit-search-cancel-button {
  display: none;
}

.sl-filter-search-input:focus {
  outline: none;
  border-color: #c49214;
  box-shadow: 0 0 0 3px rgba(196, 146, 20, 0.15);
}

.sl-filter-search-btn {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  color: #9ca3af;
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.sl-filter-search-btn:hover {
  color: #c49214;
}

/* ---------- Categories ---------- */
.sl-filter-categories-list {
  display: grid;
  gap: 0;
}

.sl-filter-category-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 0;
  border-bottom: 1px solid #f3f4f6;
  font-size: 14px;
  color: #374151;
  cursor: pointer;
  user-select: none;
}

.sl-filter-category-item:last-child {
  border-bottom: none;
}

.sl-cat-name {
  flex: 1;
}

.sl-cat-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.sl-cat-count {
  color: #9ca3af;
  font-size: 13px;
}

.sl-filter-category-checkbox {
  accent-color: #c49214;
  width: 16px;
  height: 16px;
  cursor: pointer;
}

.sl-filter-empty {
  margin: 0;
  color: #9ca3af;
  font-size: 13px;
}

/* ---------- Price range ---------- */
.sl-filter-price-display {
  margin: 0 0 14px;
  font-size: 13px;
  color: #6b7280;
}

.sl-price-display-text {
  color: #374151;
  font-weight: 500;
}

/* dual range slider wrapper */
.sl-range-wrap {
  position: relative;
  height: 20px;
  display: flex;
  align-items: center;
}

/* grey background track */
.sl-range-track {
  position: absolute;
  left: 0;
  right: 0;
  height: 4px;
  background: #e5e7eb;
  border-radius: 4px;
  overflow: visible;
}

/* gold filled portion between the two thumbs */
.sl-range-fill {
  position: absolute;
  top: 0;
  height: 100%;
  background: #c49214;
  border-radius: 4px;
}

/* both range inputs stacked on top of each other */
.sl-range-wrap input[type="range"] {
  position: absolute;
  width: 100%;
  height: 4px;
  background: transparent;
  pointer-events: none;
  -webkit-appearance: none;
  appearance: none;
  border: none;
  outline: none;
  margin: 0;
  padding: 0;
}

.sl-range-low {
  z-index: 2;
}

.sl-range-high {
  z-index: 3;
}

/* webkit thumb */
.sl-range-wrap input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #c49214;
  border: 2px solid #fff;
  box-shadow: 0 1px 5px rgba(0, 0, 0, 0.25);
  pointer-events: auto;
  cursor: pointer;
  position: relative;
  z-index: 2;
}

/* moz thumb */
.sl-range-wrap input[type="range"]::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #c49214;
  border: 2px solid #fff;
  box-shadow: 0 1px 5px rgba(0, 0, 0, 0.25);
  pointer-events: auto;
  cursor: pointer;
}

/* ---------- Apply button ---------- */
.sl-filter-apply {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  margin-top: 20px;
  padding: 0 6px 0 20px;
  border: none;
  border-radius: 999px;
  background: linear-gradient(180deg, #d4a21f 0%, #be8d0e 100%);
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  height: 46px;
  cursor: pointer;
  gap: 8px;
}

.sl-apply-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  flex-shrink: 0;
}

/* ---------- Mobile backdrop ---------- */
.sl-filter-mobile-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.4);
  z-index: 998;
}

.sl-filters-lock {
  overflow: hidden;
}

/* ================================================================
   Mobile popup (≤ 767px)
================================================================ */
@media (max-width: 767px) {
  .sl-filter-mobile-toggle {
    display: inline-flex;
  }

  .sl-filter-mobile-close {
    display: flex;
  }

  .sl-filter-panel {
    position: fixed;
    left: 12px;
    right: 12px;
    top: 50%;
    transform: translateY(-44%);
    z-index: 999;
    max-height: 85vh;
    overflow-y: auto;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: transform 0.25s ease, opacity 0.25s ease;
  }

  .sl-filter-panel.is-open {
    transform: translateY(-50%);
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }
}
