/* ──────────────────────────────────────────────
   Dhaari Sutra — Catalog Filter Sidebar + Layout
   Matches evara.css theme (copper + cream)
 ────────────────────────────────────────────── */

 /* Two-column layout: sidebar + grid */
 .catalog-layout {
   display: grid;
   grid-template-columns: 264px 1fr;
   gap: 32px;
   align-items: start;
 }
 .catalog-main { min-width: 0; }

 /* Toolbar row (count + sort + mobile toggle) */
 .catalog-toolbar {
   display: flex;
   align-items: center;
   justify-content: space-between;
   gap: 16px;
   flex-wrap: wrap;
   margin-bottom: 20px;
 }
 .catalog-count { font-size: 14px; color: var(--muted); }
 .catalog-count strong { color: var(--brown-dark); }

 .cf-toolbar-right { display: flex; align-items: center; gap: 12px; }
 .cf-mobile-toggle {
   display: none;
   align-items: center;
   gap: 8px;
   border: 1.5px solid var(--muted-light);
   border-radius: var(--radius-sm);
   padding: 9px 14px;
   font-size: 13px;
   font-weight: 600;
   color: var(--brown-dark);
   background: var(--white);
   cursor: pointer;
 }
 .cf-mobile-toggle:hover {
   border-color: var(--copper);
   color: var(--copper);
 }

 /* ── Sidebar ── */
 .catalog-sidebar {
   position: sticky;
   top: 90px;
   background: var(--white);
   border: 1px solid rgba(181,98,42,0.12);
   border-radius: var(--radius-md);
   padding: 0;
   box-shadow: var(--shadow-sm);
   overflow: hidden;
 }

 /* Active Filters */
 .cf-active-filters {
   display: flex;
   align-items: center;
   flex-wrap: wrap;
   gap: 8px;
   padding: 14px 20px;
   background: var(--off-white);
   border-bottom: 1px solid rgba(181,98,42,0.1);
 }
 .cf-active-label {
   font-size: 11px;
   font-weight: 700;
   text-transform: uppercase;
   letter-spacing: 0.08em;
   color: var(--copper);
   margin-right: 4px;
 }
 .cf-active-tag {
   display: inline-flex;
   align-items: center;
   gap: 6px;
   background: var(--white);
   border: 1px solid rgba(181,98,42,0.2);
   border-radius: 999px;
   padding: 4px 10px;
   font-size: 12px;
   color: var(--brown-dark);
   font-weight: 500;
 }
 .cf-active-tag .cf-swatch-inline {
   display: inline-block;
   width: 10px;
   height: 10px;
   border-radius: 50%;
   margin-right: 2px;
   vertical-align: middle;
   border: 1px solid rgba(0,0,0,0.1);
 }
 .cf-active-remove {
   background: none;
   border: none;
   color: var(--muted);
   font-size: 15px;
   line-height: 1;
   cursor: pointer;
   padding: 0;
   display: flex;
   align-items: center;
   transition: color 0.2s;
 }
 .cf-active-remove:hover { color: var(--copper); }
 .cf-clear-all {
   background: none;
   border: none;
   color: var(--copper);
   font-size: 12px;
   font-weight: 600;
   text-decoration: underline;
   cursor: pointer;
   padding: 4px 8px;
   margin-left: auto;
 }
 .cf-clear-all:hover {
   color: var(--copper-dark);
 }

 /* Sidebar Header */
 .cf-head {
   display: flex;
   align-items: center;
   justify-content: space-between;
   padding: 16px 20px;
   border-bottom: 1px solid rgba(181,98,42,0.1);
 }
 .cf-head b {
   font-size: 14px;
   font-weight: 700;
   color: var(--brown-dark);
   letter-spacing: 0.02em;
 }
 .cf-head b i {
   color: var(--copper);
   margin-right: 6px;
   font-size: 13px;
 }
 .cf-clear {
   font-size: 12px;
   color: var(--copper);
   font-weight: 500;
   cursor: pointer;
   background: none;
   border: none;
   padding: 4px 8px;
   border-radius: var(--radius-sm);
   transition: all 0.2s;
 }
 .cf-clear:hover {
   background: rgba(181,98,42,0.08);
 }

 /* Filter Groups */
 .cf-group {
   border-bottom: 1px solid rgba(181,98,42,0.08);
 }
 .cf-group:last-child {
   border-bottom: none;
 }

 /* Collapsible Section Header */
 .cf-section-header {
   display: flex;
   align-items: center;
   justify-content: space-between;
   padding: 14px 20px;
   cursor: pointer;
   user-select: none;
   transition: background 0.2s;
 }
 .cf-section-header:hover {
   background: rgba(181,98,42,0.03);
 }
 .cf-section-title {
   font-size: 12px;
   font-weight: 700;
   text-transform: uppercase;
   letter-spacing: 0.08em;
   color: var(--brown-mid);
 }
 .cf-section-toggle {
   font-size: 11px;
   color: var(--muted);
   transition: transform 0.3s ease;
 }

 /* Section Body */
 .cf-section-body {
   padding: 0 20px 16px;
   overflow: hidden;
 }

 /* Category Chips */
 .cf-chips { display: flex; flex-wrap: wrap; gap: 8px; }
 .cf-chip {
   font-size: 12.5px;
   padding: 6px 14px;
   border: 1.5px solid var(--muted-light);
   border-radius: 999px;
   color: var(--brown-dark);
   cursor: pointer;
   background: var(--white);
   transition: all var(--transition);
   font-weight: 500;
 }
 .cf-chip:hover {
   border-color: var(--copper);
   color: var(--copper);
 }
 .cf-chip.active {
   background: var(--copper);
   border-color: var(--copper);
   color: #fff;
 }

 /* Custom Checkbox */
 .cf-check {
   display: flex;
   align-items: center;
   gap: 10px;
   font-size: 13px;
   color: var(--brown-dark);
   cursor: pointer;
   margin-bottom: 10px;
   padding: 4px 0;
   transition: color 0.2s;
 }
 .cf-check:hover {
   color: var(--copper);
 }
 .cf-check input[type="checkbox"] {
   appearance: none;
   -webkit-appearance: none;
   width: 16px;
   height: 16px;
   border: 1.5px solid var(--muted-light);
   border-radius: 4px;
   cursor: pointer;
   position: relative;
   flex-shrink: 0;
   transition: all 0.2s ease;
   background: var(--white);
 }
 .cf-check input[type="checkbox"]:checked {
   background: var(--copper);
   border-color: var(--copper);
 }
 .cf-check input[type="checkbox"]:checked::after {
   content: '';
   position: absolute;
   left: 4.5px;
   top: 1.5px;
   width: 4px;
   height: 9px;
   border: solid #fff;
   border-width: 0 2px 2px 0;
   transform: rotate(45deg);
 }
 .cf-check input[type="checkbox"]:hover {
   border-color: var(--copper);
 }
 .cf-check-label {
   flex: 1;
   font-weight: 400;
 }
 .cf-count {
   color: var(--muted);
   font-size: 11px;
   font-weight: 400;
   margin-left: auto;
 }

 /* Color Dot for Attributes */
 .cf-color-dot {
   width: 14px;
   height: 14px;
   border-radius: 50%;
   flex-shrink: 0;
   box-shadow: 0 0 0 1px rgba(0,0,0,0.08);
 }

 /* Show More / Show Less */
 .cf-show-more {
   display: inline-block;
   font-size: 12px;
   font-weight: 600;
   color: var(--copper);
   cursor: pointer;
   background: none;
   border: none;
   padding: 6px 0;
   margin-top: 4px;
   transition: color 0.2s;
 }
 .cf-show-more:hover {
   color: var(--copper-dark);
   text-decoration: underline;
 }
 .cf-hidden-values {
   margin-top: 4px;
 }

 /* Color Grid */
 .cf-color-grid {
   display: flex;
   flex-wrap: wrap;
   gap: 10px;
   margin-top: 4px;
 }
 .cf-color-swatch {
   position: relative;
   cursor: pointer;
   display: flex;
   align-items: center;
   justify-content: center;
   width: 32px;
   height: 32px;
 }
 .cf-color-swatch input {
   position: absolute;
   opacity: 0;
   width: 0;
   height: 0;
   cursor: pointer;
 }
 .cf-swatch {
   width: 28px;
   height: 28px;
   border-radius: 50%;
   border: 2px solid transparent;
   box-shadow: 0 0 0 1px rgba(0,0,0,0.08);
   transition: all 0.2s ease;
 }
 .cf-color-swatch:hover .cf-swatch {
   transform: scale(1.1);
 }
 .cf-color-swatch input:checked + .cf-swatch {
   border-color: var(--copper);
   box-shadow: 0 0 0 2px var(--copper);
   transform: scale(1.15);
 }
 .cf-swatch-inline {
   display: inline-block;
   width: 10px;
   height: 10px;
   border-radius: 50%;
   margin-right: 4px;
   vertical-align: middle;
   border: 1px solid rgba(0,0,0,0.1);
   flex-shrink: 0;
 }

 /* Price Range Display */
 .cf-price-range-display {
   display: flex;
   justify-content: space-between;
   font-size: 12px;
   color: var(--muted);
   margin-bottom: 10px;
   font-weight: 500;
 }

 /* Price Range Slider */
 .cf-range {
   width: 100%;
   accent-color: var(--copper);
   cursor: pointer;
   height: 6px;
 }
 .cf-range-labels {
   display: flex;
   justify-content: space-between;
   font-size: 12px;
   color: var(--muted);
   margin-top: 8px;
   font-weight: 500;
 }

 /* Price Inputs */
 .cf-price-inputs {
   display: flex;
   align-items: center;
   gap: 8px;
   margin-top: 12px;
 }
 .cf-price-input-wrap {
   display: flex;
   align-items: center;
   border: 1.5px solid var(--muted-light);
   border-radius: var(--radius-sm);
   padding: 8px 10px;
   background: var(--white);
   flex: 1;
   transition: border-color 0.2s;
 }
 .cf-price-input-wrap:focus-within {
   border-color: var(--copper);
 }
 .cf-price-input-wrap span {
   color: var(--muted);
   font-size: 13px;
   font-weight: 500;
   margin-right: 4px;
 }
 .cf-price-input-wrap input {
   border: none;
   outline: none;
   width: 100%;
   font-size: 13px;
   color: var(--brown-dark);
   background: transparent;
   font-weight: 500;
 }
 .cf-price-sep {
   color: var(--muted);
   font-size: 13px;
   font-weight: 500;
 }

 /* Price Error */
 .cf-price-error {
   font-size: 11px;
   color: #c53030;
   margin-top: 8px;
   font-weight: 500;
 }

 /* No results */
 .catalog-no-results {
   text-align: center;
   padding: 60px 20px;
   color: var(--muted);
 }
 .catalog-no-results i { font-size: 42px; color: var(--muted-light); }
 .catalog-no-results p { margin-top: 14px; font-size: 15px; }

 /* Clickable cards */
 #catalogGrid .product-thumb-img,
 #catalogGrid .product-thumb-name { cursor: pointer; }

 /* ── Mobile Filter Drawer ── */
 .cf-mobile-actions {
   display: none;
   padding: 16px 20px;
   gap: 10px;
   border-top: 1px solid rgba(181,98,42,0.1);
   background: var(--white);
 }
 .cf-mobile-actions .btn {
   flex: 1;
   padding: 12px 16px;
   border-radius: var(--radius-sm);
   font-size: 13px;
   font-weight: 600;
   cursor: pointer;
   text-align: center;
   border: none;
   transition: all 0.2s;
 }
 .cf-btn-apply {
   background: var(--copper);
   color: #fff;
 }
 .cf-btn-apply:hover {
   background: var(--copper-dark);
 }
 .cf-btn-clear {
   background: var(--off-white);
   color: var(--brown-dark);
   border: 1.5px solid var(--muted-light) !important;
 }
 .cf-btn-clear:hover {
   background: var(--cream-dark);
 }

 /* ── Responsive ── */
 @media (max-width: 900px) {
   .catalog-layout { grid-template-columns: 1fr; gap: 0; }
   .cf-mobile-toggle { display: inline-flex; }
   .catalog-sidebar {
     position: fixed;
     top: 0;
     left: 0;
     bottom: 0;
     width: 300px;
     max-width: 86vw;
     z-index: 1200;
     border-radius: 0;
     overflow-y: auto;
     transform: translateX(-105%);
     transition: transform var(--transition);
     padding-bottom: 70px;
   }
   .catalog-sidebar.open {
     transform: translateX(0);
     box-shadow: var(--shadow-lg);
   }
   .cf-mobile-actions {
     display: flex;
     position: fixed;
     bottom: 0;
     left: 0;
     right: 0;
     z-index: 1201;
     background: var(--white);
     border-top: 1px solid rgba(181,98,42,0.15);
     box-shadow: 0 -4px 20px rgba(45, 24, 16, 0.08);
   }
   .catalog-sidebar.open ~ .cf-mobile-actions {
     display: flex;
   }
 }

 /* Overlay for mobile */
 .cf-overlay {
   display: none;
   position: fixed;
   inset: 0;
   background: rgba(0,0,0,0.4);
   z-index: 1199;
   opacity: 0;
   transition: opacity 0.3s ease;
 }
 .cf-overlay.active {
   display: block;
   opacity: 1;
 }
