/**
 * Shop / taxonomy archive — toolbar + mobile filter drawer skin.
 * Filter logic stays ThemeSky / BeRocket; we only present it.
 */

/* ---- Toolbar ---- */
.before-loop-wrapper {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--gv-space-3);
  margin-bottom: var(--gv-space-4);
  padding-bottom: var(--gv-space-3);
  border-bottom: 1px solid var(--gv-color-border);
}

.before-loop-wrapper .woocommerce-result-count {
  margin: 0;
  font-size: var(--gv-text-sm);
  color: var(--gv-color-text-secondary);
  flex: 1 1 auto;
  order: 2;
}

.before-loop-wrapper .filter-widget-area-button {
  order: 1;
  margin: 0;
}

.before-loop-wrapper .filter-widget-area-button a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--gv-space-2);
  min-height: var(--gv-touch);
  padding: 0 var(--gv-space-4);
  border: 1px solid var(--gv-color-border-strong);
  border-radius: var(--gv-radius-sm);
  background: var(--gv-color-bg);
  color: var(--gv-color-navy);
  font-size: var(--gv-text-sm);
  font-weight: var(--gv-font-weight-medium);
  text-decoration: none;
  text-transform: none;
  letter-spacing: 0;
}

.before-loop-wrapper .filter-widget-area-button a:hover,
.before-loop-wrapper .filter-widget-area-button a:focus-visible {
  border-color: var(--gv-color-blue);
  color: var(--gv-color-blue);
  outline: 2px solid var(--gv-color-blue);
  outline-offset: 2px;
}

.before-loop-wrapper .woocommerce-ordering,
.before-loop-wrapper .product-on-sale-form,
.before-loop-wrapper .gridlist-toggle {
  order: 3;
  margin: 0;
}

/* Grid / list toggle — force Giovision navy (theme uses a brighter primary) */
.before-loop-wrapper .gridlist-toggle,
.gridlist-toggle {
  display: inline-flex;
  align-items: center;
  gap: var(--gv-space-2);
}

.before-loop-wrapper .gridlist-toggle a,
.before-loop-wrapper .gridlist-toggle > span,
.gridlist-toggle a,
.gridlist-toggle > span,
.gridlist-toggle .grid,
.gridlist-toggle .list {
  color: var(--gv-color-text, #1a1a1a) !important;
  fill: var(--gv-color-text, #1a1a1a) !important;
  stroke: var(--gv-color-text, #1a1a1a) !important;
  opacity: 1 !important;
}

.before-loop-wrapper .gridlist-toggle a:hover,
.before-loop-wrapper .gridlist-toggle a:focus-visible,
.gridlist-toggle a:hover,
.gridlist-toggle a:focus-visible,
.gridlist-toggle .grid:hover,
.gridlist-toggle .list:hover {
  color: var(--gv-color-blue, #1f2a7c) !important;
  fill: var(--gv-color-blue, #1f2a7c) !important;
  stroke: var(--gv-color-blue, #1f2a7c) !important;
}

.before-loop-wrapper .gridlist-toggle a.active,
.before-loop-wrapper .gridlist-toggle a.current,
.before-loop-wrapper .gridlist-toggle .active,
.gridlist-toggle a.active,
.gridlist-toggle a.current,
.gridlist-toggle .active,
.gridlist-toggle .grid.active,
.gridlist-toggle .list.active {
  color: var(--gv-color-blue, #1f2a7c) !important;
  fill: var(--gv-color-blue, #1f2a7c) !important;
  stroke: var(--gv-color-blue, #1f2a7c) !important;
}

.before-loop-wrapper .gridlist-toggle a svg,
.before-loop-wrapper .gridlist-toggle a svg *,
.gridlist-toggle a svg,
.gridlist-toggle a svg *,
.gridlist-toggle .grid svg,
.gridlist-toggle .list svg,
.gridlist-toggle .grid svg *,
.gridlist-toggle .list svg * {
  fill: currentColor !important;
  stroke: currentColor !important;
  color: inherit !important;
}

.before-loop-wrapper .gridlist-toggle a::before,
.before-loop-wrapper .gridlist-toggle a::after,
.gridlist-toggle a::before,
.gridlist-toggle a::after,
.gridlist-toggle .grid::before,
.gridlist-toggle .list::before {
  color: inherit !important;
}

.before-loop-wrapper .woocommerce-ordering select.orderby {
  min-height: var(--gv-touch);
  border-radius: var(--gv-radius-sm);
  border-color: var(--gv-color-border);
  font-size: var(--gv-text-sm);
}

/*
 * Sort by / Show — theme dropdown uses --ts-primary-opacity (#0068c8 wash).
 * Force Giovision blue/white chrome on trigger + menu items.
 * One panel border only — theme padding + nested border read as a double frame.
 */
.woocommerce .woocommerce-ordering .orderby-current,
.product-per-page-form ul.perpage .perpage-current {
  color: var(--gv-color-blue) !important;
}

.woocommerce .woocommerce-ordering .orderby-label {
  color: var(--gv-color-text-muted) !important;
}

/* Outer list is the trigger row — no second card chrome */
.woocommerce .woocommerce-ordering ul.orderby,
.product-per-page-form ul.perpage {
  border: none !important;
  background: transparent !important;
  box-shadow: none !important;
  outline: none !important;
}

.woocommerce .woocommerce-ordering .orderby > li > ul,
.woocommerce .woocommerce-ordering ul.orderby > li > ul,
.product-per-page-form ul.perpage > li > ul,
.woocommerce .woocommerce-ordering .orderby ul,
.product-per-page-form ul.perpage ul {
  background: #fff !important;
  background-color: #fff !important;
  border: 1px solid var(--gv-color-border) !important;
  border-radius: var(--gv-radius-md, 6px) !important;
  box-shadow: 0 8px 24px rgba(31, 42, 124, 0.12) !important;
  padding: 0 !important;
  margin: 0 !important;
  overflow: hidden !important;
  outline: none !important;
}

.woocommerce .woocommerce-ordering .orderby > li > ul::before,
.woocommerce .woocommerce-ordering .orderby > li > ul::after,
.product-per-page-form ul.perpage > li > ul::before,
.product-per-page-form ul.perpage > li > ul::after {
  content: none !important;
  display: none !important;
}

.woocommerce .woocommerce-ordering .orderby > li > ul > li,
.product-per-page-form ul.perpage > li > ul > li,
.woocommerce .woocommerce-ordering ul li,
.product-per-page-form ul.perpage ul li {
  border: none !important;
  margin: 0 !important;
  padding: 0 !important;
  background: transparent !important;
}

.woocommerce .woocommerce-ordering ul li a,
.product-per-page-form ul.perpage ul li a {
  color: var(--gv-color-text) !important;
  background: transparent !important;
  border: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  outline: none !important;
}

.woocommerce .woocommerce-ordering ul li a:hover,
.product-per-page-form ul.perpage ul li a:hover,
.woocommerce .woocommerce-ordering ul li a.current,
.product-per-page-form ul.perpage ul li a.current {
  background: rgba(31, 42, 124, 0.1) !important;
  background-color: rgba(31, 42, 124, 0.1) !important;
  color: var(--gv-color-blue) !important;
}

.before-loop-wrapper .product-on-sale-form label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: var(--gv-touch);
  position: relative;
  font-size: var(--gv-text-sm);
  color: var(--gv-color-blue);
  cursor: pointer;
}

/*
 * Theme: :before = in-flow 17px box; :after = absolute tick at top:2px/left:1px.
 * Our min-height:44px + align-items:center moves the box to vertical middle while
 * the tick stays at the label top → check floats above the square (shop toolbar).
 */
.before-loop-wrapper .product-on-sale-form > label:before,
.woocommerce .product-on-sale-form > label:before {
  content: '' !important;
  box-sizing: border-box !important;
  flex-shrink: 0 !important;
  width: 15px !important;
  height: 15px !important;
  border: 1.5px solid var(--gv-color-blue) !important;
  border-radius: 3px !important;
  background: #fff !important;
  background-color: #fff !important;
  display: block !important;
  position: relative !important;
  top: auto !important;
  left: auto !important;
  margin: 0 !important;
  padding: 0 !important;
  box-shadow: none !important;
}

.before-loop-wrapper .product-on-sale-form > label:after,
.woocommerce .product-on-sale-form > label:after {
  content: '' !important;
  box-sizing: border-box !important;
  position: absolute !important;
  left: 5.5px !important;
  top: 50% !important;
  width: 4px !important;
  height: 8px !important;
  margin: -5px 0 0 0 !important;
  padding: 0 !important;
  border: solid #fff !important;
  border-width: 0 2px 2px 0 !important;
  background: transparent !important;
  font-size: 0 !important;
  line-height: 0 !important;
  color: transparent !important;
  opacity: 0 !important;
  visibility: hidden !important;
  transform: rotate(45deg) !important;
  transition: opacity 120ms ease, visibility 120ms ease !important;
  z-index: 1;
}

.before-loop-wrapper .product-on-sale-form.checked > label:before,
.woocommerce .product-on-sale-form.checked > label:before,
.before-loop-wrapper .product-on-sale-form > label:has(input:checked):before,
.woocommerce .product-on-sale-form > label:has(input:checked):before {
  border-color: var(--gv-color-blue) !important;
  background: var(--gv-color-blue) !important;
  background-color: var(--gv-color-blue) !important;
}

.before-loop-wrapper .product-on-sale-form.checked > label:after,
.woocommerce .product-on-sale-form.checked > label:after,
.before-loop-wrapper .product-on-sale-form > label:has(input:checked):after,
.woocommerce .product-on-sale-form > label:has(input:checked):after {
  opacity: 1 !important;
  visibility: visible !important;
  border-color: #fff !important;
}

/* Do not show a floating tick on hover unless actually checked */
.before-loop-wrapper .product-on-sale-form > label:hover:after,
.woocommerce .product-on-sale-form > label:hover:after {
  opacity: 0 !important;
  visibility: hidden !important;
}

.before-loop-wrapper .product-on-sale-form.checked > label:hover:after,
.woocommerce .product-on-sale-form.checked > label:hover:after,
.before-loop-wrapper .product-on-sale-form > label:has(input:checked):hover:after,
.woocommerce .product-on-sale-form > label:has(input:checked):hover:after {
  opacity: 1 !important;
  visibility: visible !important;
}

/* ---- Desktop sidebar polish ---- */
#left-sidebar.ts-sidebar .widget,
#left-sidebar .widget {
  margin: 0 0 var(--gv-space-2);
  padding: 0 0 var(--gv-space-2);
  border-bottom: 1px solid var(--gv-color-border);
}

#left-sidebar.ts-sidebar .widget:last-child,
#left-sidebar .widget:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: 0;
}

#left-sidebar.ts-sidebar .widget-title,
#left-sidebar .widget-title {
  font-size: var(--gv-text-sm);
  font-weight: var(--gv-font-weight-bold);
  color: var(--gv-color-navy);
  margin: 0 0 var(--gv-space-2);
  padding: 0;
  border: 0;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

#left-sidebar .product-filter-by-brand-wrapper ul,
#left-sidebar .berocket_aapf_widget ul {
  max-height: none;
  margin: 0;
  padding: 0;
  list-style: none;
}

#left-sidebar .product-filter-by-brand-wrapper li label,
#left-sidebar .product-filter-by-brand ul li label,
#left-sidebar .berocket_aapf_widget li label,
#left-sidebar .woocommerce-widget-layered-nav-list a,
#left-sidebar .widget_layered_nav li a {
  display: flex;
  align-items: center;
  gap: 0;
  width: 100%;
  box-sizing: border-box;
  /* Theme hides native input and draws :before in the left gutter — keep ~28px */
  min-height: 28px;
  font-size: var(--gv-text-sm);
  color: var(--gv-color-blue);
  cursor: pointer;
  line-height: 1.35;
  margin: 0;
  padding: 4px 8px 4px 28px;
  border-radius: var(--gv-radius-sm);
  position: relative;
  text-transform: none;
  transition: background-color var(--gv-transition), color var(--gv-transition);
}

#left-sidebar .product-filter-by-brand-wrapper li label:hover,
#left-sidebar .product-filter-by-brand ul li label:hover,
#left-sidebar .berocket_aapf_widget li label:hover,
#left-sidebar .woocommerce-widget-layered-nav-list a:hover,
#left-sidebar .widget_layered_nav li a:hover {
  background: rgba(31, 42, 124, 0.06);
  color: var(--gv-color-blue);
}

#left-sidebar .product-filter-by-brand-wrapper li,
#left-sidebar .product-filter-by-brand ul li,
#left-sidebar .berocket_aapf_widget ul li {
  margin: 0 !important;
  margin-bottom: 0 !important;
  padding: 0 !important;
}

/* Brand filter: native checkbox stays hidden (theme custom box via label:before) */
#left-sidebar .product-filter-by-brand-wrapper li input[type='checkbox'],
#left-sidebar .product-filter-by-brand ul li input[type='checkbox'] {
  display: none !important;
}

/*
 * Theme: :before = box, :after = icon tick (\e909) at top/left for a 21px box.
 * 1.0.171 shrunk the box + filled it blue but left :after as a blue icon →
 * tiny/misaligned or invisible tick. Draw our own white CSS check instead.
 */
#left-sidebar .product-filter-by-brand-wrapper li label:before,
#left-sidebar .product-filter-by-brand ul li label:before {
  content: '' !important;
  box-sizing: border-box !important;
  border: 1.5px solid var(--gv-color-blue) !important;
  border-color: var(--gv-color-blue) !important;
  border-radius: 3px !important;
  width: 15px !important;
  height: 15px !important;
  position: absolute !important;
  top: 50% !important;
  left: 6px !important;
  right: auto !important;
  bottom: auto !important;
  margin: -7.5px 0 0 0 !important;
  padding: 0 !important;
  background: #fff !important;
  background-color: #fff !important;
  box-shadow: none !important;
  transform: none !important;
}

/* Hide theme font-icon tick; replace with CSS chevron when checked */
#left-sidebar .product-filter-by-brand-wrapper li label:after,
#left-sidebar .product-filter-by-brand ul li label:after {
  content: '' !important;
  display: block !important;
  box-sizing: border-box !important;
  position: absolute !important;
  left: 11px !important;
  top: 50% !important;
  width: 4px !important;
  height: 8px !important;
  margin: -5px 0 0 0 !important;
  padding: 0 !important;
  border: solid #fff !important;
  border-width: 0 2px 2px 0 !important;
  background: transparent !important;
  background-color: transparent !important;
  box-shadow: none !important;
  font-size: 0 !important;
  line-height: 0 !important;
  color: transparent !important;
  opacity: 0 !important;
  visibility: hidden !important;
  transform: rotate(45deg) !important;
  transition: opacity 120ms ease, visibility 120ms ease !important;
  z-index: 1;
}

/* Checked / selected — solid blue box + white tick */
#left-sidebar .product-filter-by-brand-wrapper li input:checked + label:before,
#left-sidebar .product-filter-by-brand ul li input:checked + label:before,
#left-sidebar .product-filter-by-brand-wrapper li.chosen label:before,
#left-sidebar .product-filter-by-brand ul li.chosen label:before,
#left-sidebar .product-filter-by-brand-wrapper li.selected label:before,
#left-sidebar .product-filter-by-brand ul li.selected label:before {
  border-color: var(--gv-color-blue) !important;
  background: var(--gv-color-blue) !important;
  background-color: var(--gv-color-blue) !important;
  box-shadow: none !important;
}

#left-sidebar .product-filter-by-brand-wrapper li input:checked + label:after,
#left-sidebar .product-filter-by-brand ul li input:checked + label:after,
#left-sidebar .product-filter-by-brand-wrapper li.chosen label:after,
#left-sidebar .product-filter-by-brand ul li.chosen label:after,
#left-sidebar .product-filter-by-brand-wrapper li.selected label:after,
#left-sidebar .product-filter-by-brand ul li.selected label:after {
  opacity: 1 !important;
  visibility: visible !important;
  border-color: #fff !important;
}

/* Selected row tint (clear selected vs idle) */
#left-sidebar .product-filter-by-brand-wrapper li input:checked + label,
#left-sidebar .product-filter-by-brand ul li input:checked + label,
#left-sidebar .product-filter-by-brand-wrapper li.chosen label,
#left-sidebar .product-filter-by-brand ul li.chosen label,
#left-sidebar .product-filter-by-brand-wrapper li.selected label,
#left-sidebar .product-filter-by-brand ul li.selected label {
  background: rgba(31, 42, 124, 0.08);
  color: var(--gv-color-blue);
}

#left-sidebar .berocket_aapf_widget li input[type='checkbox'],
#left-sidebar .woocommerce-widget-layered-nav-list input[type='checkbox'],
#left-sidebar .widget_layered_nav input[type='checkbox'] {
  width: 15px;
  height: 15px;
  margin: 0;
  flex-shrink: 0;
  align-self: center;
  vertical-align: middle;
  accent-color: var(--gv-color-blue);
  border: 1.5px solid var(--gv-color-blue);
  background: #fff;
}

#left-sidebar .product-filter-by-brand-wrapper .count,
#left-sidebar .berocket_aapf_widget .count {
  color: var(--gv-color-text-muted);
  font-size: var(--gv-text-xs);
  font-variant-numeric: tabular-nums;
  margin-left: auto;
  line-height: 1;
  padding: 2px 6px;
  border-radius: 999px;
  background: var(--gv-color-bg-subtle);
}

/* Brand search — match header main search (blue border, white fill, grey placeholder) */
#left-sidebar .gv-brand-filter-search,
.product-filter-by-brand-wrapper .gv-brand-filter-search,
.gv-brand-filter-search {
  display: block !important;
  width: 100% !important;
  height: var(--gio-h, 44px) !important;
  min-height: var(--gio-h, 44px) !important;
  margin: 0 0 var(--gv-space-2) !important;
  padding: 0 12px !important;
  border: 1px solid var(--gio-blue, var(--gv-color-blue, #1f2a7c)) !important;
  border-radius: var(--gio-radius, var(--gv-radius-md, 6px)) !important;
  font-family: inherit !important;
  font-size: var(--gio-ui-font, 13px) !important;
  font-weight: var(--gio-ui-weight, 600) !important;
  letter-spacing: 0 !important;
  text-transform: none !important;
  line-height: calc(var(--gio-h, 44px) - 2px) !important;
  color: var(--gio-blue, var(--gv-color-blue, #1f2a7c)) !important;
  background: #fff !important;
  background-color: #fff !important;
  box-sizing: border-box !important;
  box-shadow: none !important;
  outline: none !important;
  -webkit-appearance: none !important;
  appearance: none !important;
  transition: border-color var(--gv-transition), box-shadow var(--gv-transition);
}

#left-sidebar .gv-brand-filter-search::placeholder,
.product-filter-by-brand-wrapper .gv-brand-filter-search::placeholder,
.gv-brand-filter-search::placeholder {
  font-size: var(--gio-ui-font, 13px) !important;
  font-weight: var(--gio-ui-weight, 600) !important;
  letter-spacing: 0 !important;
  line-height: calc(var(--gio-h, 44px) - 2px) !important;
  color: #9ca3af !important;
  opacity: 1 !important;
}

#left-sidebar .gv-brand-filter-search:hover,
.product-filter-by-brand-wrapper .gv-brand-filter-search:hover,
.gv-brand-filter-search:hover {
  border-color: var(--gio-blue, var(--gv-color-blue, #1f2a7c)) !important;
  background: #fff !important;
}

#left-sidebar .gv-brand-filter-search:focus,
.product-filter-by-brand-wrapper .gv-brand-filter-search:focus,
.gv-brand-filter-search:focus {
  outline: none !important;
  border-color: var(--gio-blue, var(--gv-color-blue, #1f2a7c)) !important;
  background: #fff !important;
  box-shadow: 0 0 0 3px rgba(31, 42, 124, 0.12) !important;
}

/* Selected filters panel — compact status + chips */
#left-sidebar .gv-sf2,
.gv-sf2 {
  margin: 0;
  padding: var(--gv-space-2);
  border: 1px solid var(--gv-color-border);
  border-radius: var(--gv-radius-md);
  background: var(--gv-color-bg-subtle);
  font-size: var(--gv-text-sm);
  box-sizing: border-box;
}

.gv-sf2 .gv-sf2-block {
  margin: 0;
  padding: 0;
}

.gv-sf2 .gv-sf2-block + .gv-sf2-block {
  margin-top: 6px;
  padding-top: 6px;
  border-top: 1px solid var(--gv-color-border);
}

.gv-sf2 .gv-label {
  font-size: var(--gv-text-xs);
  font-weight: var(--gv-font-weight-bold);
  margin: 0 0 2px;
  padding: 0;
  color: var(--gv-color-text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.gv-sf2 .gv-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
  padding: 0;
}

/* Brand + category chips share one roomy pad (short labels looked cramped at 3px) */
.gv-sf2 .gv-pill,
#left-sidebar .gv-sf2 .gv-pill {
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px !important;
  min-height: 28px !important;
  padding: 6px 12px !important;
  box-sizing: border-box !important;
  border-radius: var(--gv-radius-sm) !important;
  background: var(--gv-color-blue, #1f2a7c) !important;
  color: #fff !important;
  font-size: var(--gv-text-xs) !important;
  font-weight: var(--gv-font-weight-medium) !important;
  line-height: 1.35 !important;
  text-transform: none !important;
  letter-spacing: 0 !important;
}

.gv-sf2 .gv-pill a,
#left-sidebar .gv-sf2 .gv-pill a {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  color: #fff !important;
  text-decoration: none !important;
  font-weight: var(--gv-font-weight-bold) !important;
  opacity: 0.9 !important;
  line-height: 1 !important;
  margin: 0 !important;
  padding: 0 0 0 2px !important;
  min-width: 1em;
}

.gv-sf2 .gv-pill a:hover,
.gv-sf2 .gv-pill a:focus-visible,
#left-sidebar .gv-sf2 .gv-pill a:hover,
#left-sidebar .gv-sf2 .gv-pill a:focus-visible {
  opacity: 1 !important;
}

.gv-sf2 .gv-list {
  list-style: none;
  margin: 4px 0 0;
  padding: 4px 0 0;
  border-top: 1px solid var(--gv-color-border);
}

.gv-sf2 .gv-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 6px;
  padding: 1px 0;
  margin: 0;
  line-height: 1.25;
}

.gv-sf2 .gv-list a {
  text-decoration: none;
  color: var(--gv-color-blue);
  text-transform: none;
  font-weight: var(--gv-font-weight-medium);
  line-height: 1.25;
}

.gv-sf2 .gv-list a:hover,
.gv-sf2 .gv-list a:focus-visible {
  text-decoration: underline;
}

.gv-sf2 .gv-count {
  color: var(--gv-color-text-muted);
  font-size: var(--gv-text-xs);
  font-variant-numeric: tabular-nums;
  line-height: 1.25;
}

.gv-sf2 .gv-subtle {
  font-size: var(--gv-text-xs);
  margin: 0;
  padding: 0;
  color: var(--gv-color-text-muted);
  line-height: 1.25;
}

.gv-sf2 .gv-pills + .gv-subtle,
.gv-sf2 .gv-subtle + .gv-subtle,
.gv-sf2 .gv-subtle + .gv-list {
  margin-top: 4px;
}

/* Price widget — track, handles, Filter CTA */
#left-sidebar .price_slider_wrapper,
#left-sidebar .price_label,
#left-sidebar .price_slider_amount {
  margin-left: 0;
  padding-left: 0;
}

#left-sidebar .widget_price_filter .price_slider_wrapper,
#left-sidebar .woocommerce .widget_price_filter .price_slider_wrapper {
  margin-bottom: var(--gv-space-3);
}

#left-sidebar .widget_price_filter .ui-slider,
#left-sidebar .woocommerce .widget_price_filter .ui-slider,
#left-sidebar .price_slider.ui-slider {
  position: relative;
  height: 6px;
  margin: 18px 10px 14px;
  border: 0;
  border-radius: 999px;
  background: rgba(31, 42, 124, 0.12);
}

#left-sidebar .widget_price_filter .ui-slider-range,
#left-sidebar .woocommerce .widget_price_filter .ui-slider-range,
#left-sidebar .price_slider .ui-slider-range {
  height: 6px;
  border: 0;
  border-radius: 999px;
  background: var(--gv-color-blue, #1f2a7c) !important;
}

#left-sidebar .widget_price_filter .ui-slider-handle,
#left-sidebar .woocommerce .widget_price_filter .ui-slider-handle,
#left-sidebar .price_slider .ui-slider-handle {
  top: 50%;
  width: 18px;
  height: 18px;
  margin-top: -9px;
  margin-left: -9px;
  border: 2px solid var(--gv-color-blue, #1f2a7c) !important;
  border-radius: 50%;
  background: #fff !important;
  box-shadow: var(--gv-shadow-sm);
  cursor: grab;
  outline: none;
  z-index: 2;
}

#left-sidebar .widget_price_filter .ui-slider-handle:hover,
#left-sidebar .widget_price_filter .ui-slider-handle:focus,
#left-sidebar .widget_price_filter .ui-slider-handle.ui-state-active,
#left-sidebar .woocommerce .widget_price_filter .ui-slider-handle:hover,
#left-sidebar .woocommerce .widget_price_filter .ui-slider-handle:focus,
#left-sidebar .price_slider .ui-slider-handle:hover,
#left-sidebar .price_slider .ui-slider-handle:focus {
  border-color: var(--gv-color-blue, #1f2a7c) !important;
  background: var(--gv-color-blue, #1f2a7c) !important;
  box-shadow: 0 0 0 4px rgba(31, 42, 124, 0.16);
  cursor: grabbing;
}

#left-sidebar .widget_price_filter .price_slider_amount,
#left-sidebar .woocommerce .widget_price_filter .price_slider_amount {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--gv-space-3);
  margin-top: var(--gv-space-2);
  line-height: 1.3;
}

#left-sidebar .widget_price_filter .price_label,
#left-sidebar .woocommerce .widget_price_filter .price_label {
  flex: 1 1 auto;
  margin: 0;
  font-size: var(--gv-text-sm);
  font-weight: var(--gv-font-weight-medium);
  color: var(--gv-color-text);
}

#left-sidebar .widget_price_filter .button,
#left-sidebar .woocommerce .widget_price_filter .button,
#left-sidebar .widget_price_filter button[type='submit'],
#left-sidebar .widget_price_filter input[type='submit'] {
  flex: 0 0 auto;
  min-height: 36px;
  margin: 0;
  padding: 0 var(--gv-space-4);
  border: 1px solid var(--gv-color-blue) !important;
  border-radius: var(--gv-radius-sm) !important;
  background: var(--gv-color-blue) !important;
  color: #fff !important;
  font-size: var(--gv-text-sm) !important;
  font-weight: var(--gv-font-weight-medium) !important;
  text-transform: none !important;
  letter-spacing: 0 !important;
  line-height: 1 !important;
  cursor: pointer;
  box-shadow: none !important;
  transition: background-color var(--gv-transition), color var(--gv-transition),
    border-color var(--gv-transition);
}

#left-sidebar .widget_price_filter .button:hover,
#left-sidebar .widget_price_filter .button:focus-visible,
#left-sidebar .woocommerce .widget_price_filter .button:hover,
#left-sidebar .widget_price_filter button[type='submit']:hover,
#left-sidebar .widget_price_filter input[type='submit']:hover {
  background: #fff !important;
  color: var(--gv-color-blue) !important;
  border-color: var(--gv-color-blue) !important;
}

/* Show more — same height/font as header Search button */
#left-sidebar .gv-brand-filter-more,
.product-filter-by-brand-wrapper .gv-brand-filter-more,
.gv-brand-filter-more {
  display: block !important;
  width: 100% !important;
  height: var(--gio-h, 44px) !important;
  min-height: var(--gio-h, 44px) !important;
  margin-top: var(--gv-space-3) !important;
  padding: 0 18px !important;
  border: 1px solid var(--gio-blue, var(--gv-color-blue, #1f2a7c)) !important;
  border-radius: var(--gio-radius, var(--gv-radius-md, 6px)) !important;
  background: var(--gio-blue, var(--gv-color-blue, #1f2a7c)) !important;
  background-color: var(--gio-blue, var(--gv-color-blue, #1f2a7c)) !important;
  color: #fff !important;
  font-family: inherit !important;
  font-size: var(--gio-ui-font, 13px) !important;
  font-weight: var(--gio-ui-weight, 600) !important;
  line-height: calc(var(--gio-h, 44px) - 2px) !important;
  text-align: center !important;
  cursor: pointer !important;
  box-shadow: none !important;
  outline: none !important;
  text-transform: none !important;
  letter-spacing: 0 !important;
  -webkit-appearance: none !important;
  appearance: none !important;
  transition: background-color var(--gv-transition), color var(--gv-transition),
    border-color var(--gv-transition);
}

#left-sidebar .gv-brand-filter-more:hover,
#left-sidebar .gv-brand-filter-more:focus-visible,
.product-filter-by-brand-wrapper .gv-brand-filter-more:hover,
.product-filter-by-brand-wrapper .gv-brand-filter-more:focus-visible,
.gv-brand-filter-more:hover,
.gv-brand-filter-more:focus-visible {
  background: #fff !important;
  background-color: #fff !important;
  color: var(--gio-blue, var(--gv-color-blue, #1f2a7c)) !important;
  border-color: var(--gio-blue, var(--gv-color-blue, #1f2a7c)) !important;
  box-shadow: none !important;
  outline: none !important;
}

.product-filter-by-brand-wrapper li.gv-brand-hidden {
  display: none !important;
}

/* ---- Mobile filter drawer (skin #left-sidebar) ---- */
@media (max-width: 991px) {
  .before-loop-wrapper .filter-widget-area-button {
    display: block;
  }

  #left-sidebar.ts-sidebar {
    position: fixed !important;
    top: 0;
    left: 0;
    bottom: 0;
    width: min(100vw - 48px, 360px);
    max-width: 100%;
    z-index: var(--gv-z-drawer);
    margin: 0 !important;
    padding: 0;
    background: var(--gv-color-bg);
    box-shadow: var(--gv-shadow-md);
    transform: translateX(-105%);
    transition: transform var(--gv-transition);
    overflow: hidden;
    display: flex;
    flex-direction: column;
  }

  body.admin-bar #left-sidebar.ts-sidebar {
    top: var(--wp-admin--admin-bar--height, 46px);
  }

  body.gv-filter-open #left-sidebar.ts-sidebar,
  body.show-filter-sidebar #left-sidebar.ts-sidebar,
  #left-sidebar.ts-sidebar.active,
  #left-sidebar.ts-sidebar.show {
    transform: translateX(0);
  }

  #left-sidebar .sidebar-header {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--gv-space-3);
    min-height: 56px;
    padding: var(--gv-space-3) var(--gv-space-4);
    border-bottom: 1px solid var(--gv-color-border);
    background: var(--gv-color-bg-subtle);
  }

  #left-sidebar .sidebar-header::before {
    content: 'Filters';
    font-size: var(--gv-text-lg);
    font-weight: var(--gv-font-weight-bold);
    color: var(--gv-color-navy);
  }

  #left-sidebar .sidebar-header .close {
    width: var(--gv-touch);
    height: var(--gv-touch);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border-radius: var(--gv-radius-sm);
  }

  #left-sidebar aside,
  #left-sidebar > aside {
    flex: 1 1 auto;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: var(--gv-space-4);
    overscroll-behavior: contain;
  }

  /* Theme overlay behind drawer */
  .before-loop-wrapper > .overlay,
  #main-content > .overlay,
  .page-container > .overlay,
  .filter-widget-area-button + .overlay {
    z-index: var(--gv-z-overlay);
    background: var(--gv-color-overlay);
  }

  body.gv-filter-open .before-loop-wrapper > .overlay,
  body.gv-filter-open .filter-widget-area-button + .overlay,
  body.show-filter-sidebar .before-loop-wrapper > .overlay {
    display: block;
    opacity: 1;
    pointer-events: auto;
  }
}

@media (max-width: 991px) {
  .before-loop-wrapper {
    gap: var(--gv-space-2);
    margin-bottom: var(--gv-space-3);
    padding-bottom: var(--gv-space-2);
  }

  .before-loop-wrapper .filter-widget-area-button,
  .before-loop-wrapper .woocommerce-ordering {
    flex: 1 1 calc(50% - 6px);
  }

  .before-loop-wrapper .filter-widget-area-button a,
  .before-loop-wrapper .woocommerce-ordering .orderby-current,
  .before-loop-wrapper .woocommerce-ordering select.orderby {
    width: 100%;
    min-height: 40px;
  }

  .before-loop-wrapper .woocommerce-result-count,
  .before-loop-wrapper .gridlist-toggle,
  .before-loop-wrapper .product-on-sale-form {
    display: none;
  }
}

@media (min-width: 992px) {
  .before-loop-wrapper .filter-widget-area-button {
    display: none;
  }
}

/* ---- Pagination — theme hardcodes #000; brand blue/white ---- */
.woocommerce nav.woocommerce-pagination ul li a,
.woocommerce nav.woocommerce-pagination ul li span,
.ts-pagination ul li a,
.ts-pagination ul li span,
.pagination-wrap ul.pagination > li > a,
.pagination-wrap ul.pagination > li > span,
.post-nav-links > a,
.post-nav-links > span {
  color: var(--gv-color-blue) !important;
  border-color: var(--gv-color-border) !important;
  background: var(--gv-color-bg) !important;
}

.woocommerce nav.woocommerce-pagination ul li a:hover,
.woocommerce nav.woocommerce-pagination ul li a:focus-visible,
.woocommerce nav.woocommerce-pagination ul li span.current,
.ts-pagination ul li a:hover,
.ts-pagination ul li span.current,
.pagination-wrap ul.pagination > li > a:hover,
.pagination-wrap ul.pagination > li > span.current,
.post-nav-links > .current,
.post-nav-links > a:hover,
.post-nav-links > a:focus {
  background: var(--gv-color-blue) !important;
  color: #fff !important;
  border-color: var(--gv-color-blue) !important;
}

.woocommerce nav.woocommerce-pagination ul li span.dots,
.ts-pagination ul li span.dots,
.pagination-wrap ul.pagination > li > span.dots {
  color: var(--gv-color-text-muted) !important;
  background: transparent !important;
  border-color: transparent !important;
}

.woocommerce nav.woocommerce-pagination ul li a.next:before,
.woocommerce nav.woocommerce-pagination ul li a.prev:before,
.ts-pagination ul li a.next:before,
.ts-pagination ul li a.prev:before {
  color: inherit !important;
}
