/* ============================================================
   CSB Product Filter — sidebar styling, matched to the site theme
   Palette: Ink #1f1b16 · Brand Green #1e6b34 · Muted #5f6b5a
            Card Border #e7ddc9 · Wash #eaf2e0 · Surface #fff
   Fonts:  Bricolage Grotesque (headings) · Hanken Grotesk (body)
   ============================================================ */

.csb-filter{
  font-family:'Hanken Grotesk',sans-serif;
  background:#fff;
  border:1px solid #e7ddc9;
  border-radius:14px;
  padding:24px 22px;
  color:#1f1b16;
  max-width:340px;
}
.csb-filter *{ box-sizing:border-box; }

/* Two titled sections — "Buscar" and "Filtros" — each with its own H3 */
.csb-filter__title{ font-family:'Bricolage Grotesque',sans-serif; font-weight:600; font-size:24px; line-height:1.1; margin:0 0 14px; color:#1f1b16; }
.csb-block{ margin:0; }
.csb-block--search{ margin-bottom:22px; padding-bottom:24px; border-bottom:1px solid #efe7d6; }
.csb-block--filters .csb-filter__title{ margin-bottom:16px; }
/* Prominent "clear filters / show all products" button */
.csb-clear-all{
  display:block; width:100%; text-align:center; margin:2px 0 20px;
  padding:11px 16px; border:1.5px solid #1f1b16; border-radius:3px;
  background:#fff; color:#1f1b16; font-family:'Hanken Grotesk',sans-serif; font-weight:600;
  font-size:12px; text-transform:uppercase; letter-spacing:1.4px; text-decoration:none; cursor:pointer;
  transition:background .15s, color .15s;
}
.csb-clear-all:hover{ background:#1f1b16; color:#f6faf1; }
.csb-clear-all.is-hidden{ display:none; }

/* In-panel search — bordered field with icon + input + clear + green button */
.csb-search{
  display:flex; align-items:stretch; border:1.5px solid #e0d7c3; border-radius:10px; background:#fff;
  overflow:hidden; transition:border-color .15s, box-shadow .15s;
}
.csb-search:focus-within{ border-color:#1e6b34; box-shadow:0 0 0 3px rgba(30,107,52,.12); }
.csb-search__icon{
  flex:0 0 auto; align-self:center; margin-left:12px; width:16px; height:16px; pointer-events:none;
  fill:none; stroke:#6f7d64; stroke-width:2.2; stroke-linecap:round;
}
.csb-search__input{
  flex:1 1 auto; min-width:0; width:100%; margin:0; padding:11px 6px 11px 10px !important;
  border:0 !important; border-radius:0 !important; background:transparent !important; box-shadow:none !important; outline:none !important;
  color:#1f1b16; font-family:'Hanken Grotesk',sans-serif; font-size:14px !important; line-height:1.3; -webkit-appearance:none; appearance:none;
}
.csb-search__input::placeholder{ color:#9aa392; }
.csb-search__input::-webkit-search-decoration,
.csb-search__input::-webkit-search-cancel-button,
.csb-search__input::-webkit-search-results-button{ -webkit-appearance:none; display:none; }
.csb-search__clear{
  flex:0 0 auto; align-self:center; position:relative; width:22px; height:22px; margin:0 6px 0 0; padding:0 !important;
  border:0 !important; background:transparent !important; box-shadow:none !important; cursor:pointer;
  color:#1f1b16 !important; min-width:0 !important; border-radius:50% !important;
}
.csb-search__clear::before, .csb-search__clear::after{
  content:''; position:absolute; left:50%; top:50%; width:12px; height:2px; background:currentColor; border-radius:2px;
}
.csb-search__clear::before{ transform:translate(-50%,-50%) rotate(45deg); }
.csb-search__clear::after{ transform:translate(-50%,-50%) rotate(-45deg); }
.csb-search__clear:hover{ color:#1e6b34 !important; }
.csb-search__clear.is-hidden{ display:none; }
/* Green submit button attached on the right */
.csb-search__btn{
  flex:0 0 44px; display:flex !important; align-items:center !important; justify-content:center !important;
  align-self:stretch; width:44px; margin:0; padding:0 !important; border:0 !important; line-height:0;
  background:#1e6b34 !important; box-shadow:none !important; cursor:pointer; color:#fff; min-width:0 !important; border-radius:0 !important;
}
.csb-search__mag{ flex:0 0 auto; width:17px; height:17px; display:block; fill:none; stroke:currentColor; stroke-width:2.3; stroke-linecap:round; }
.csb-search__btn:hover{ background:#17512a !important; }

/* Groups + eyebrow labels */
.csb-group{ padding:18px 0 0; border-top:1px solid #efe7d6; margin-top:18px; }
.csb-group:first-of-type{ border-top:0; margin-top:10px; padding-top:8px; }
.csb-eyebrow{
  display:block; margin:0 0 12px;
  font-size:12px; font-weight:600; text-transform:uppercase; letter-spacing:2.4px; color:#5f6b5a;
}

/* Category lists */
.csb-cats{ list-style:none; margin:0; padding:0; }
.csb-cats--sub{ margin:6px 0 4px; padding-left:26px; }
.csb-cat{ margin:0; }
.csb-cat__row{ display:flex; align-items:center; gap:6px; }
.csb-cat__children{ display:none; }
.csb-cat.is-open > .csb-cat__children{ display:block; }

/* Checkbox rows */
.csb-check{ display:flex; align-items:center; gap:10px; flex:1 1 auto; cursor:pointer; padding:5px 0; min-width:0; }
.csb-check input{ position:absolute; opacity:0; width:0; height:0; }
.csb-check__box{
  flex:0 0 auto; width:18px; height:18px; border:1.5px solid #cdbfa3; border-radius:4px; background:#fff;
  transition:border-color .15s, background .15s; position:relative;
}
.csb-check__box::after{
  content:''; position:absolute; left:5px; top:2px; width:5px; height:9px;
  border:solid #fff; border-width:0 2px 2px 0; transform:rotate(45deg) scale(0); transition:transform .15s;
}
.csb-check input:checked + .csb-check__box{ background:#1e6b34; border-color:#1e6b34; }
.csb-check input:checked + .csb-check__box::after{ transform:rotate(45deg) scale(1); }
.csb-check input:focus-visible + .csb-check__box{ outline:2px solid #8fc99a; outline-offset:2px; }
.csb-check__label{ font-size:15px; line-height:1.3; color:#1f1b16; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.csb-check:hover .csb-check__label{ color:#1e6b34; }
.csb-check__count{ margin-left:auto; font-size:12px; color:#93a189; padding-left:8px; }

/* Expand / collapse chevron */
.csb-toggle{
  flex:0 0 auto; width:24px; height:24px; padding:0 !important; border:0 !important; background:transparent !important; cursor:pointer;
  position:relative; color:#5f6b5a; box-shadow:none !important; min-width:0 !important; border-radius:0 !important;
}
.csb-toggle:hover, .csb-toggle:focus{ background:transparent !important; box-shadow:none !important; }
.csb-toggle::before{
  content:''; position:absolute; left:7px; top:8px; width:7px; height:7px;
  border:solid currentColor; border-width:0 1.5px 1.5px 0; transform:rotate(45deg); transition:transform .18s;
}
.csb-cat.is-open > .csb-cat__row .csb-toggle::before{ transform:rotate(-135deg); top:11px; }
.csb-toggle:hover{ color:#1e6b34; }

/* Pills */
.csb-pills{ display:flex; flex-wrap:wrap; gap:8px; }
.csb-pill{ cursor:pointer; }
.csb-pill input{ position:absolute; opacity:0; width:0; height:0; }
.csb-pill span{
  display:inline-block; padding:7px 14px; border:1.5px solid #e0d7c3; border-radius:999px;
  font-size:13px; line-height:1; color:#3f4a3c; background:#fff; transition:all .15s;
}
.csb-pill:hover span{ border-color:#8fc99a; color:#1e6b34; }
.csb-pill.is-checked span,
.csb-pill input:checked + span{ background:#1e6b34; border-color:#1e6b34; color:#fff; }
.csb-pill input:focus-visible + span{ outline:2px solid #8fc99a; outline-offset:2px; }

/* Taxonomy dropdown (style = "Desplegable") */
.csb-select{
  width:100%; padding:11px 40px 11px 14px; border:1.5px solid #e0d7c3; border-radius:8px;
  background-color:#fff; color:#1f1b16; font-family:'Hanken Grotesk',sans-serif; font-size:14px; line-height:1.3;
  -webkit-appearance:none; appearance:none; cursor:pointer; outline:none; transition:border-color .15s, box-shadow .15s;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%235f6b5a' stroke-width='2.4' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat:no-repeat; background-position:right 13px center;
}
.csb-select:focus{ border-color:#1e6b34; box-shadow:0 0 0 3px rgba(30,107,52,.12); }

/* Price range */
.csb-price__vals{ display:flex; align-items:center; gap:8px; font-size:15px; font-weight:600; color:#1f1b16; margin-bottom:14px; }
.csb-price__dash{ color:#93a189; font-weight:400; }
.csb-range{ position:relative; height:26px; margin-top:4px; }
.csb-range__track{ position:absolute; left:0; right:0; top:11px; height:4px; background:#e7ddc9; border-radius:4px; z-index:0; pointer-events:none; }
.csb-range__fill{ position:absolute; top:0; height:100%; background:#1e6b34; border-radius:4px; pointer-events:none; }
.csb-range input[type=range]{
  -webkit-appearance:none !important; appearance:none !important; position:absolute; left:0; width:100%; top:0; height:26px;
  margin:0 !important; padding:0 !important; background:transparent !important; border:0 !important; box-shadow:none !important; outline:none !important; pointer-events:auto; cursor:pointer;
}
.csb-range input[type=range]:focus{ outline:none !important; box-shadow:none !important; border:0 !important; }
.csb-range input[type=range]::-webkit-slider-thumb{
  -webkit-appearance:none; appearance:none; pointer-events:auto; width:18px; height:18px; margin-top:0;
  border-radius:50%; background:#fff; border:2px solid #1e6b34; box-shadow:0 1px 4px rgba(31,27,22,.25); cursor:pointer;
}
.csb-range input[type=range]::-moz-range-thumb{
  pointer-events:auto; width:18px; height:18px; border-radius:50%; background:#fff; border:2px solid #1e6b34;
  box-shadow:0 1px 4px rgba(31,27,22,.25); cursor:pointer;
}
.csb-range input[type=range]::-webkit-slider-runnable-track{ background:transparent; height:26px; }
.csb-range input[type=range]::-moz-range-track{ background:transparent; height:26px; }

/* No-JS submit */
.csb-submit{
  margin-top:18px; width:100%; padding:12px; border:0; border-radius:3px; cursor:pointer;
  background:#1f1b16; color:#f6faf1; font-family:'Hanken Grotesk',sans-serif; font-weight:600;
  text-transform:uppercase; letter-spacing:1.4px; font-size:13px;
}
.csb-submit:hover{ background:#8fc99a; color:#153a22; }

/* Loading state on the results region (class added by filter.js) */
.csb-loading{ position:relative; opacity:.45; transition:opacity .15s; pointer-events:none; }
.csb-loading::after{
  content:''; position:absolute; left:50%; top:80px; width:34px; height:34px; margin-left:-17px;
  border:3px solid #cfe0b8; border-top-color:#1e6b34; border-radius:50%; animation:csbf-spin .7s linear infinite;
}
@keyframes csbf-spin{ to{ transform:rotate(360deg); } }

/* Small screens: filter reads full-width above the grid */
@media (max-width:768px){ .csb-filter{ max-width:none; } }

/* ============================================================
   Header search widget ([csb_search] / "CSB Search")
   Standalone pill search field for the site header/menu.
   ============================================================ */
.csb-headsearch{
  position:relative; display:flex; align-items:center; width:100%; max-width:100%;
  background:#fff; border:1.5px solid #e0d7c3; border-radius:999px;
  font-family:'Hanken Grotesk',sans-serif; transition:border-color .15s, box-shadow .15s;
}
.csb-headsearch:focus-within{ border-color:#1e6b34; box-shadow:0 0 0 3px rgba(30,107,52,.12); }
.csb-headsearch__input{
  flex:1 1 auto; min-width:0; margin:0; border:0 !important; outline:none !important;
  background:transparent !important; box-shadow:none !important;
  padding:11px 4px 11px 20px !important; font-size:14px; line-height:1.3; color:#1f1b16;
  -webkit-appearance:none; appearance:none;
}
.csb-headsearch__input::placeholder{ color:#9aa392; }
.csb-headsearch__input::-webkit-search-decoration,
.csb-headsearch__input::-webkit-search-cancel-button{ -webkit-appearance:none; appearance:none; }
.csb-headsearch__clear{
  flex:0 0 auto; width:22px; height:22px; margin-right:2px; padding:0 !important; border:0 !important;
  background:transparent !important; box-shadow:none !important; cursor:pointer; color:#1f1b16 !important;
  position:relative; min-width:0 !important; border-radius:50% !important;
}
.csb-headsearch__clear::before, .csb-headsearch__clear::after{
  content:''; position:absolute; left:50%; top:50%; width:11px; height:1.6px; background:currentColor; border-radius:2px;
}
.csb-headsearch__clear::before{ transform:translate(-50%,-50%) rotate(45deg); }
.csb-headsearch__clear::after{ transform:translate(-50%,-50%) rotate(-45deg); }
.csb-headsearch__clear:hover{ color:#1e6b34 !important; }
.csb-headsearch__clear.is-hidden{ display:none; }
/* Kill the browser's native search "✕" so it can't double up with our icons */
.csb-headsearch__input::-webkit-search-cancel-button,
.csb-headsearch__input::-webkit-search-results-button{ -webkit-appearance:none; display:none; }
/* Solid, obvious circular search button (fixed box so flex can't squash it) */
.csb-headsearch__submit{
  flex:0 0 38px; align-self:center; display:flex !important; align-items:center !important; justify-content:center !important;
  width:38px; height:38px; margin:3px 4px 3px 2px; padding:0 !important; border:0 !important; line-height:0;
  background:#1e6b34 !important; box-shadow:none !important; cursor:pointer; overflow:hidden;
  color:#fff; min-width:0 !important; aspect-ratio:1 !important; border-radius:50% !important;
}
.csb-headsearch__mag{ flex:0 0 auto; width:18px; height:18px; display:block; margin:auto; fill:none; stroke:currentColor; stroke-width:2.3; stroke-linecap:round; }
.csb-headsearch__submit:hover{ background:#17512a !important; opacity:1; }

/* Live suggestions dropdown */
.csb-suggest{
  position:absolute; left:0; right:0; top:calc(100% + 6px); z-index:9999; display:none;
  background:#fff; border:1px solid #e7ddc9; border-radius:12px; overflow:hidden;
  box-shadow:0 18px 40px -18px rgba(31,27,22,.45);
}
.csb-suggest.is-open{ display:block; }
.csb-suggest__item{
  display:flex; align-items:center; justify-content:space-between; gap:12px; padding:10px 14px;
  text-decoration:none; color:#1f1b16; border-bottom:1px solid #f1ece0; font-family:'Hanken Grotesk',sans-serif;
}
.csb-suggest__item:last-child{ border-bottom:0; }
.csb-suggest__item:hover, .csb-suggest__item.is-active{ background:#eaf2e0; }
.csb-suggest__title{ font-size:14px; line-height:1.25; }
.csb-suggest__price{ font-size:13px; font-weight:600; color:#1e6b34; white-space:nowrap; }
/* "Show all results" final row */
.csb-suggest__all{ justify-content:center; background:#f6faf1; color:#1e6b34; font-weight:600;
  font-size:12.5px; text-transform:uppercase; letter-spacing:1px; }
.csb-suggest__all:hover, .csb-suggest__all.is-active{ background:#1e6b34; color:#fff; }

/* Admin preview floating panel (?csbf_preview=1) — not used in normal placement */
.csb-filter-preview{ position:fixed; left:24px; top:120px; width:320px; max-height:78vh; overflow:auto; z-index:99990; box-shadow:0 24px 60px -24px rgba(31,27,22,.55); }
@media (max-width:900px){ .csb-filter-preview{ position:static; width:auto; max-height:none; box-shadow:none; margin:20px 0; } }
