/* ============================================================
   KrisAuto – shop.css  v11.0
   Horizontal filter bar + clean product grid
   ============================================================ */

/* ── Kill WC clearfix ghost grid items ── */
ul.products::before,
ul.products::after { display: none !important; }

/* ============================================================
   FILTER BAR  (sticky, clean white, horizontal)
   ============================================================ */

.shop-filter-bar {
  background: #fff;
  border-bottom: 2px solid #111;
  position: sticky;
  top: var(--header-h, 140px);
  z-index: 200;
  transition: top .3s ease;
}

/* Sheet header — mobile only, hidden on desktop */
.sfb-sheet-header { display: none; }

.sfb-container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ── Two-row filter layout ── */
.sfb-row {
  display: flex;
  align-items: center;
  padding: 0;
  gap: 0;
}

/* Row 1: filters */
.sfb-row--filters {
  padding: 14px 0 12px;
}

/* Row 2: toggles + sort + clear */
.sfb-row--actions {
  padding: 0 0 14px;
  border-top: 1px solid #f0f0ee;
  padding-top: 12px;
}

/* ── Group ── */
.sfb-group {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 20px 0 0;
  flex-shrink: 0;
}

/* Row 1: vehicle selects grow to fill full width */
.sfb-row--filters .sfb-group { flex: 1 1 0; min-width: 0; }
.sfb-row--filters .sfb-selects { flex: 1; min-width: 0; }
.sfb-row--filters .sfb-select-wrap { flex: 1; min-width: 0; }
.sfb-row--filters .cs-trigger { flex: 1; min-width: 0; }
.sfb-row--filters .sfb-select { flex: 1; min-width: 0; width: 0; }

/* Row 2: all groups grow to fill width */
.sfb-row--actions .sfb-group { flex: 1 1 0; min-width: 0; }
.sfb-row--actions .sfb-group--cat .sfb-select-wrap { flex: 1; min-width: 0; }
.sfb-row--actions .sfb-group--cat .cs-trigger { flex: 1; min-width: 0; }
.sfb-row--actions .sfb-group--cat .sfb-select { flex: 1; min-width: 0; width: 0; }
.sfb-row--actions .sfb-group--price { flex: 1.2 1 0; }
.sfb-row--actions .sfb-price { flex: 1; }
.sfb-row--actions .sfb-price__input { flex: 1; width: 0; min-width: 50px; }
.sfb-row--actions .sfb-group--toggles { flex: 0 0 auto; }
.sfb-row--actions .sfb-right { flex: 0 0 auto; }

/* Group label — visible on desktop */
.sfb-group__label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: .82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: #777;
  white-space: nowrap;
  flex-shrink: 0;
}
.sfb-group__label svg { opacity: .7; }

.sfb-selects {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ── Vehicle group red left accent ── */
.sfb-group--vehicle {
  padding-left: 0;
  border-left: 3px solid #dc2626;
  padding-left: 18px;
}

/* ── Vertical divider ── */
.sfb-divider {
  width: 1px;
  height: 36px;
  background: #e0e0de;
  flex: 0 0 1px;
  margin: 0 16px 0 6px;
}

/* ── Select wrapper + custom arrow ── */
.sfb-select-wrap {
  position: relative;
  display: flex;
  align-items: center;
}
/* Native-select arrow — hide when custom select is initialized */
.sfb-select-wrap::after {
  content: '';
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 0; height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 5px solid #999;
  pointer-events: none;
  transition: border-top-color .15s;
}
.sfb-select-wrap:hover::after { border-top-color: #555; }
.sfb-select-wrap.cs-initialized::after { display: none; }

/* ── Custom trigger arrow (on the button itself) ── */
.cs-trigger::after {
  content: '';
  position: absolute;
  right: 13px;
  top: 50%;
  transform: translateY(-50%);
  width: 0; height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 5px solid #888;
  pointer-events: none;
  transition: transform .18s, border-top-color .15s;
}
.cs-trigger:hover::after { border-top-color: #444; }
.sfb-select-wrap.cs-is-open .cs-trigger::after {
  transform: translateY(-50%) rotate(180deg);
  border-top-color: #dc2626;
}
.sfb-select-wrap--sort .cs-trigger::after { border-top-color: #888; }
.sfb-select-wrap--sort:hover .cs-trigger::after { border-top-color: #444; }
.sfb-select-wrap--sort.cs-is-open .cs-trigger::after { border-top-color: #dc2626; }

/* ── Hidden native select (kept in DOM for form values) ── */
.cs-native {
  display: none !important;
}

/* ── Custom Select Trigger button ── */
.cs-trigger {
  display: inline-flex;
  align-items: center;
  height: 48px;
  padding: 0 36px 0 16px;
  background: #f5f5f3;
  border: 1.5px solid #dedede;
  border-radius: 10px;
  font-size: 1rem;
  font-weight: 500;
  color: #1a1a1a;
  cursor: pointer;
  transition: background .15s, border-color .15s, box-shadow .15s;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-family: inherit;
  text-align: left;
  min-width: 120px;
  flex-shrink: 0;
  position: relative;
}
.cs-trigger:hover:not(.is-disabled) {
  background: #efefed;
  border-color: #bbb;
}
.cs-trigger.is-disabled {
  opacity: .35;
  cursor: not-allowed;
}
.sfb-select-wrap.cs-is-open .cs-trigger {
  border-color: #dc2626;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(220,38,38,.1);
}

/* Vehicle selects — min-width only when not in flex-grow row */
.sfb-group--vehicle .cs-trigger { min-width: 100px; }

/* Sort trigger — subtle, same family as other selects */
.sfb-select-wrap--sort .cs-trigger {
  background: #f5f5f3;
  border-color: #dedede;
  color: #1a1a1a;
  font-weight: 600;
  min-width: 160px;
}
.sfb-select-wrap--sort .cs-trigger:hover:not(.is-disabled) { background: #efefed; border-color: #bbb; }
.sfb-select-wrap--sort.cs-is-open .cs-trigger { border-color: #dc2626; background: #fff; box-shadow: 0 0 0 3px rgba(220,38,38,.1); }

/* ── Custom Select Panel ── */
/* Panels for shop selects live on <body> (fixed positioning) */
.cs-panel {
  display: none;
  flex-direction: column;
  background: #fff;
  border: 1.5px solid #e0e0e0;
  border-radius: 12px;
  box-shadow: 0 12px 40px rgba(0,0,0,.14), 0 2px 10px rgba(0,0,0,.06);
  overflow-y: auto;
  max-height: 300px;
  z-index: 99999;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}
.cs-panel.is-open { display: flex; }

/* ── Custom Select Option ── */
.cs-opt {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 16px;
  font-size: .95rem;
  font-weight: 500;
  color: #1a1a1a;
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: background .1s, color .1s;
  flex-shrink: 0;
  line-height: 1.4;
}
.cs-opt__text {
  overflow: hidden;
  text-overflow: ellipsis;
}
/* Brand logo in dropdown option */
.cs-opt__logo {
  width: 26px;
  height: 26px;
  object-fit: contain;
  flex-shrink: 0;
  border-radius: 4px;
}
/* Letter badge fallback (when no logo uploaded) */
.cs-opt__badge {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 6px;
  font-size: .7rem;
  font-weight: 800;
  color: #fff;
  flex-shrink: 0;
  letter-spacing: 0;
  text-transform: uppercase;
}
/* Brand logo in trigger button */
.cs-trigger__logo {
  width: 20px;
  height: 20px;
  object-fit: contain;
  flex-shrink: 0;
  margin-right: 8px;
  border-radius: 3px;
}
.cs-opt:hover { background: #f5f5f3; color: #111; }
.cs-opt.is-selected {
  color: #dc2626;
  font-weight: 700;
  background: rgba(220,38,38,.05);
}
.cs-opt:first-child { border-radius: 10px 10px 0 0; }
.cs-opt:last-child  { border-radius: 0 0 10px 10px; }

.sfb-select {
  -webkit-appearance: none;
  appearance: none;
  height: 48px;
  padding: 0 36px 0 16px;
  background: #f5f5f3;
  border: 1.5px solid #dedede;
  border-radius: 10px;
  font-size: 1rem;
  font-weight: 500;
  color: #1a1a1a;
  cursor: pointer;
  transition: background .15s, border-color .15s;
  white-space: nowrap;
  min-width: 0;
  font-family: inherit;
}
.sfb-select option { background: #fff; color: #1a1a1a; }
.sfb-select:hover {
  background: #efefed;
  border-color: #bbb;
}
.sfb-select:focus {
  border-color: #dc2626;
  background: #fff;
  outline: none;
  box-shadow: 0 0 0 3px rgba(220,38,38,.1);
}
.sfb-select:disabled { opacity: .35; cursor: not-allowed; }

/* Vehicle selects */
.sfb-group--vehicle .sfb-select { min-width: 100px; }

/* Sort select — matches other selects */
.sfb-select--sort {
  background: #f5f5f3;
  border-color: #dedede;
  color: #1a1a1a;
  min-width: 160px;
  font-weight: 600;
}
.sfb-select--sort option { background: #fff; color: #1a1a1a; }
.sfb-select--sort:hover { background: #efefed; border-color: #bbb; }
.sfb-select--sort:focus {
  border-color: #dc2626;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(220,38,38,.1);
}

/* ── Price inputs ── */
.sfb-price {
  display: flex;
  align-items: center;
  gap: 6px;
}
.sfb-price__input {
  width: 88px;
  height: 48px;
  padding: 0 12px;
  background: #f5f5f3;
  border: 1.5px solid #dedede;
  border-radius: 10px;
  font-size: 1rem;
  color: #1a1a1a;
  font-family: inherit;
  transition: background .15s, border-color .15s;
  outline: none;
  -moz-appearance: textfield;
}
.sfb-price__input::-webkit-outer-spin-button,
.sfb-price__input::-webkit-inner-spin-button { -webkit-appearance: none; }
.sfb-price__input::placeholder { color: #bbb; }
.sfb-price__input:focus {
  border-color: #dc2626;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(220,38,38,.1);
}
.sfb-price__sep { font-size: .95rem; color: #aaa; flex-shrink: 0; }
.sfb-price__unit { font-size: .88rem; color: #777; font-weight: 600; white-space: nowrap; padding-left: 4px; }

/* ── Toggle pills ── */
.sfb-group--toggles {
  padding: 0 20px 0 0;
  gap: 10px;
}
.sfb-check { cursor: pointer; flex-shrink: 0; }
.sfb-check input { display: none; }
.sfb-check__pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 0 20px;
  height: 44px;
  background: #f5f5f3;
  border: 1.5px solid #dedede;
  border-radius: 22px;
  font-size: .95rem;
  font-weight: 500;
  color: #555;
  transition: background .15s, border-color .15s, color .15s;
  white-space: nowrap;
  user-select: none;
}
.sfb-check__pill svg { flex-shrink: 0; }
.sfb-check:hover .sfb-check__pill {
  border-color: #999;
  background: #efefed;
  color: #333;
}
.sfb-check input:checked + .sfb-check__pill {
  background: #dc2626;
  border-color: #dc2626;
  color: #fff;
}

/* ── Right section ── */
.sfb-right {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: auto;
  flex-shrink: 0;
}

.sfb-clear {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: .92rem;
  font-weight: 600;
  color: #dc2626;
  text-decoration: none;
  border: 1.5px solid #f0c0c0;
  border-radius: 10px;
  padding: 0 18px;
  height: 44px;
  transition: background .15s, border-color .15s;
  white-space: nowrap;
  flex-shrink: 0;
}
.sfb-clear:hover { background: rgba(220,38,38,.05); border-color: #dc2626; }

/* Apply button — mobile only */
.sfb-apply-btn { display: none; }

/* ============================================================
   MOBILE COMPACT BAR
   ============================================================ */

.shop-mobile-bar {
  display: none;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  background: #fff;
  border-bottom: 1px solid #e8e8e6;
  position: sticky;
  top: 0;
  z-index: 190;
}

.shop-mobile-bar__btn {
  display: flex;
  align-items: center;
  gap: 7px;
  height: 40px;
  padding: 0 16px;
  background: #141414;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: .82rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  transition: background .15s;
  font-family: inherit;
}
.shop-mobile-bar__btn:hover { background: #dc2626; }

.shop-mobile-bar__badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  background: #dc2626;
  border-radius: 9px;
  font-size: .62rem;
  font-weight: 800;
}

.sfb-select-wrap--mobile-sort {
  flex: 1;
  min-width: 0;
}
.sfb-select-wrap--mobile-sort::after {
  border-top-color: #9a9a9a;
}
.sfb-select--mobile-sort {
  width: 100%;
  background: #f5f5f3;
  border: 1.5px solid #dedede;
  color: #1a1a1a;
  height: 40px;
  font-size: 16px;
  font-weight: 600;
  border-radius: 8px;
}
.sfb-select--mobile-sort:focus { border-color: #dc2626; outline: none; }

/* ============================================================
   MOBILE BACKDROP
   ============================================================ */

.sfb-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.55);
  z-index: 998;
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s;
}
.sfb-backdrop.is-visible {
  opacity: 1;
  pointer-events: auto;
}

/* ============================================================
   SHOP PRODUCT AREA
   ============================================================ */

.shop-area {
  padding: 20px 0 64px;
}
.shop-area--with-sidebar {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 28px;
  align-items: start;
}

/* ── Category Sidebar ── */
.shop-cat-sidebar {
  position: sticky;
  top: calc(var(--header-h, 140px) + 70px);
  background: #fff;
  border: 1.5px solid #e5e5e3;
  border-radius: 12px;
  padding: 20px;
  max-height: calc(100vh - var(--header-h, 140px) - 100px);
  overflow-y: auto;
}
.shop-cat-sidebar__title {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: .82rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: #111;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 2px solid #111;
}
.shop-cat-tree { list-style: none; padding: 0; margin: 0; }
.shop-cat-tree__item { margin-bottom: 2px; }
.shop-cat-tree__row {
  display: flex;
  align-items: center;
  gap: 4px;
}
.shop-cat-tree__link {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 7px 10px;
  border-radius: 6px;
  font-size: .82rem;
  font-weight: 600;
  color: #333;
  text-decoration: none;
  transition: all .15s;
}
.shop-cat-tree__link:hover {
  background: #f5f5f4;
  color: #dc2626;
}
.shop-cat-tree__row.is-active .shop-cat-tree__link,
.shop-cat-tree__child.is-active .shop-cat-tree__link {
  background: rgba(220,38,38,.08);
  color: #dc2626;
  font-weight: 700;
}
.shop-cat-tree__count {
  font-size: .7rem;
  font-weight: 500;
  color: #aaa;
  min-width: 20px;
  text-align: right;
}
.shop-cat-tree__toggle {
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  color: #888;
  flex-shrink: 0;
  transition: all .15s;
}
.shop-cat-tree__toggle:hover { background: #f5f5f4; color: #333; }
.shop-cat-tree__item.is-open > .shop-cat-tree__row .shop-cat-tree__toggle svg {
  transform: rotate(180deg);
}
.shop-cat-tree__children {
  list-style: none;
  padding: 0 0 0 12px;
  margin: 2px 0 6px;
  display: none;
  border-left: 2px solid #eee;
}
.shop-cat-tree__item.is-open > .shop-cat-tree__children { display: block; }
.shop-cat-tree__child { margin-bottom: 1px; }
.shop-cat-tree__child .shop-cat-tree__link {
  font-size: .78rem;
  font-weight: 500;
  padding: 5px 10px;
}
.shop-cat-sidebar__clear {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid #eee;
  font-size: .76rem;
  font-weight: 600;
  color: #dc2626;
  text-decoration: none;
  transition: opacity .15s;
}
.shop-cat-sidebar__clear:hover { opacity: .7; }

.shop-area-toprow {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 12px;
  min-height: 28px;
}
.shop-result-count { font-size: .88rem; color: #888; font-weight: 500; }
.shop-ajax-status  { font-size: .84rem; color: #888; }

/* ── Filter tags ── */
.shop-filter-tags {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  padding-bottom: 16px;
}
.sf-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 12px 6px 14px;
  background: #f4f4f2;
  border: 1.5px solid #e5e5e3;
  border-radius: 22px;
  font-size: .84rem;
  color: #444;
  text-decoration: none;
  cursor: pointer;
  transition: all .15s;
  white-space: nowrap;
}
.sf-tag:hover { border-color: #dc2626; background: rgba(220,38,38,.04); color: #dc2626; }
.sf-tag__label {
  font-weight: 700;
  font-size: .74rem;
  color: #9a9a9a;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.sf-tag__label::after { content: ':'; margin-right: 2px; }
.sf-tag svg { color: #bbb; flex-shrink: 0; }
.sf-tag:hover svg { color: #dc2626; }

/* ── Products wrap ── */
#shop-products-wrap { position: relative; }
#shop-products-wrap.is-loading { opacity: .4; pointer-events: none; }
#shop-products-wrap.is-loading::after {
  content: '';
  position: absolute;
  top: 60px;
  left: 50%;
  transform: translateX(-50%);
  width: 28px; height: 28px;
  border: 2.5px solid #e2e2e0;
  border-top-color: #dc2626;
  border-radius: 50%;
  animation: spin .7s linear infinite;
  z-index: 10;
}
@keyframes spin { to { transform: translateX(-50%) rotate(360deg); } }

/* ============================================================
   PRODUCT GRID
   ============================================================ */

ul.products {
  display: grid !important;
  grid-template-columns: repeat(4, 1fr) !important;
  gap: 20px !important;
  list-style: none !important;
  margin: 0 !important;
  padding: 0 !important;
  float: none !important;
  width: 100% !important;
  clear: both !important;
}
ul.products li.product {
  float: none !important;
  width: auto !important;
  margin: 0 !important;
  padding: 0 !important;
  clear: none !important;
}

/* ── Product Cards ── */
li.product {
  background: #fff !important;
  border: 1.5px solid #ebebeb !important;
  border-radius: 10px !important;
  overflow: hidden !important;
  display: flex !important;
  flex-direction: column !important;
  transition: box-shadow .22s, border-color .22s, transform .2s !important;
  position: relative !important;
}
li.product:hover {
  box-shadow: 0 4px 20px rgba(0,0,0,.1), 0 1px 4px rgba(0,0,0,.06) !important;
  border-color: #d8d8d8 !important;
  transform: translateY(-3px) !important;
}

li.product .woocommerce-loop-product__link { display: block !important; text-decoration: none !important; }
li.product .woocommerce-loop-product__link img,
li.product > a:first-child img {
  width: 100% !important;
  aspect-ratio: 1 !important;
  height: auto !important;
  object-fit: contain !important;
  padding: 14px !important;
  background: #f9f9f7 !important;
  display: block !important;
  transition: transform .3s ease !important;
}
li.product:hover .woocommerce-loop-product__link img,
li.product:hover > a:first-child img { transform: scale(1.04) !important; }

li.product h2,
li.product h2.woocommerce-loop-product__title {
  font-size: .83rem !important;
  font-weight: 600 !important;
  color: #1c1c1c !important;
  line-height: 1.45 !important;
  padding: 11px 14px 4px !important;
  margin: 0 !important;
  display: -webkit-box !important;
  -webkit-line-clamp: 2 !important;
  -webkit-box-orient: vertical !important;
  overflow: hidden !important;
  flex-grow: 1 !important;
}

li.product .price {
  padding: 4px 14px 10px !important;
  font-size: .9rem !important;
  font-weight: 800 !important;
  color: #1a1a1a !important;
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 5px !important;
  align-items: baseline !important;
  margin: 0 !important;
}
li.product .price del { font-size: .76rem !important; font-weight: 400 !important; color: #bbb !important; text-decoration: line-through !important; opacity: 1 !important; }
li.product .price ins { text-decoration: none !important; color: #dc2626 !important; font-weight: 800 !important; }

li.product .button,
li.product a.button,
li.product .add_to_cart_button {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 6px !important;
  margin: auto 14px 14px !important;
  padding: 10px 16px !important;
  background: #1a1a1a !important;
  color: #fff !important;
  border: none !important;
  border-radius: 7px !important;
  font-size: .78rem !important;
  font-weight: 700 !important;
  letter-spacing: .02em !important;
  cursor: pointer !important;
  transition: background .15s !important;
  text-decoration: none !important;
  font-family: inherit !important;
}
li.product .button:hover,
li.product a.button:hover,
li.product .add_to_cart_button:hover { background: #dc2626 !important; }
li.product .button.loading::after { display: none !important; }

li.product .added_to_cart {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  margin: 0 14px 14px !important;
  padding: 9px 16px !important;
  background: #f4f4f2 !important;
  color: #1c1c1c !important;
  border-radius: 7px !important;
  font-size: .76rem !important;
  font-weight: 600 !important;
  text-decoration: none !important;
}

li.product .onsale {
  position: absolute !important;
  top: 10px !important;
  left: 10px !important;
  background: #dc2626 !important;
  color: #fff !important;
  font-size: .65rem !important;
  font-weight: 800 !important;
  text-transform: uppercase !important;
  letter-spacing: .07em !important;
  padding: 3px 8px !important;
  border-radius: 4px !important;
  margin: 0 !important;
  min-height: auto !important;
  min-width: auto !important;
  line-height: 1.5 !important;
  z-index: 2 !important;
}

li.product .star-rating { padding: 0 14px 4px !important; margin: 0 !important; }

.woocommerce-info {
  padding: 48px 32px;
  text-align: center;
  color: #666;
  font-size: .9rem;
  background: #f9f9f7;
  border-radius: 10px;
  border: 1.5px solid #ebebeb;
  margin: 16px 0;
}

/* ============================================================
   RESPONSIVE: 1200px — 3 product cols
   ============================================================ */
@media (max-width: 1200px) {
  ul.products { grid-template-columns: repeat(3, 1fr) !important; }
}

/* ============================================================
   RESPONSIVE: 900px — mobile filters
   ============================================================ */
@media (max-width: 900px) {

  /* Show mobile bar */
  .shop-mobile-bar { display: flex; }

  /* Show backdrop */
  .sfb-backdrop { display: block; }

  /* Filter bar becomes a bottom sheet */
  .shop-filter-bar {
    position: fixed !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    top: auto !important;
    z-index: 999 !important;
    max-height: 88vh !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch;
    border-radius: 20px 20px 0 0 !important;
    border: none !important;
    border-top: 3px solid #dc2626 !important;
    background: #fff !important;
    box-shadow: 0 -8px 40px rgba(0,0,0,.2) !important;
    transform: translateY(calc(100%)) !important;
    transition: transform .3s cubic-bezier(.4,0,.2,1) !important;
  }
  .shop-filter-bar.is-open {
    transform: translateY(0) !important;
  }

  /* Sheet header */
  .sfb-sheet-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px 12px;
    border-bottom: 1px solid #ebebeb;
    position: sticky;
    top: 0;
    background: #fff;
    z-index: 2;
  }
  .sfb-sheet-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: .82rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .1em;
    color: #111;
  }
  .sfb-sheet-title svg { color: #dc2626; }
  .sfb-sheet-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    background: #dc2626;
    border-radius: 9px;
    font-size: .65rem;
    font-weight: 800;
    color: #fff;
  }
  .sfb-sheet-close {
    width: 34px; height: 34px;
    background: #f4f4f2;
    border: none;
    border-radius: 7px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #555;
    transition: background .15s, color .15s;
    flex-shrink: 0;
  }
  .sfb-sheet-close:hover { background: #e8e8e6; color: #111; }

  /* Both rows become vertical stack in mobile sheet */
  .sfb-row {
    height: auto !important;
    flex-direction: column !important;
    align-items: stretch !important;
    overflow: visible !important;
    padding: 8px 20px 0 !important;
    gap: 0 !important;
  }
  .sfb-row--actions {
    border-top: none !important;
    padding-top: 0 !important;
  }

  .sfb-divider {
    width: auto !important;
    height: 1px !important;
    background: #ebebeb !important;
    margin: 4px 0 !important;
  }

  /* Remove vehicle red accent in mobile sheet */
  .sfb-group--vehicle {
    border-left: none !important;
    padding-left: 0 !important;
  }

  .sfb-group {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 8px !important;
    padding: 12px 0 !important;
  }

  /* Labels in the mobile sheet */
  .sfb-group__label {
    display: flex !important;
    font-size: .72rem !important;
    color: #888 !important;
  }
  .sfb-group__label svg { color: #dc2626 !important; }

  .sfb-selects {
    flex-direction: column !important;
    width: 100% !important;
    gap: 8px !important;
  }

  /* Custom select — mobile sheet overrides */
  /* Stack trigger + panel vertically inside the wrap */
  .sfb-select-wrap {
    width: 100% !important;
    flex-direction: column !important;
    align-items: stretch !important;
  }
  /* Arrow is on cs-trigger::after, override right position */
  .cs-trigger::after { right: 16px !important; }

  /* Trigger: full-width, tall, 16px font (prevents iOS zoom) */
  .cs-trigger {
    width: 100% !important;
    height: 52px !important;
    font-size: 16px !important;
    padding: 0 44px 0 16px !important;
    border-radius: 10px !important;
    background: #f5f5f3 !important;
    border-color: #dedede !important;
    color: #1a1a1a !important;
    min-width: 0 !important;
  }
  .sfb-select-wrap--sort .cs-trigger {
    background: #f5f5f3 !important;
    border-color: #dedede !important;
    color: #1a1a1a !important;
  }

  /* Panel: static (inline inside sheet, no JS positioning) */
  .cs-panel {
    position: static !important;
    top: auto !important; left: auto !important; bottom: auto !important;
    min-width: 0 !important; max-width: none !important; width: 100% !important;
    max-height: 240px !important;
    border-radius: 10px !important;
    margin-top: 6px !important;
    border-color: #e0e0e0 !important;
    box-shadow: 0 4px 16px rgba(0,0,0,.1) !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
  }
  .cs-panel.is-open {
    display: flex !important;
  }

  /* Options: large touch targets, wrapping text, force visible color */
  .cs-opt {
    padding: 14px 16px !important;
    font-size: 16px !important;
    font-weight: 500 !important;
    color: #1a1a1a !important;
    white-space: normal !important;
    line-height: 1.35 !important;
    background: #fff !important;
  }
  .cs-opt.is-selected {
    color: #dc2626 !important;
    background: rgba(220,38,38,.05) !important;
    font-weight: 700 !important;
  }
  .cs-opt:hover { background: #f5f5f3 !important; }

  .sfb-price {
    width: 100% !important;
    gap: 8px !important;
  }
  .sfb-price__input {
    flex: 1 !important;
    width: auto !important;
    height: 52px !important;
    font-size: 16px !important;
    padding: 0 14px !important;
    border-radius: 10px !important;
    background: #f5f5f3 !important;
    border-color: #dedede !important;
    color: #1a1a1a !important;
  }
  .sfb-price__input:focus { box-shadow: none !important; }

  .sfb-group--toggles {
    flex-direction: row !important;
    flex-wrap: wrap !important;
    gap: 8px !important;
  }
  .sfb-check__pill {
    height: 44px !important;
    padding: 0 18px !important;
    font-size: 15px !important;
    border-radius: 22px !important;
    background: #f5f5f3 !important;
    border-color: #dedede !important;
    color: #555 !important;
  }

  .sfb-right {
    margin-left: 0 !important;
    padding: 12px 0 0 !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 8px !important;
  }

  .sfb-select-wrap--sort { width: 100% !important; }
  .sfb-select--sort {
    width: 100% !important;
    min-width: 0 !important;
    height: 52px !important;
    font-size: 16px !important;
    padding: 0 40px 0 16px !important;
    border-radius: 10px !important;
    background: #f5f5f3 !important;
    border-color: #dedede !important;
    color: #1a1a1a !important;
  }
  .sfb-select-wrap--sort::after { border-top-color: #999 !important; right: 16px !important; }

  .sfb-clear {
    justify-content: center !important;
    height: 44px !important;
    border-radius: 10px !important;
    font-size: 15px !important;
    border-color: #f0c0c0 !important;
    color: #dc2626 !important;
  }

  /* Apply button */
  .sfb-apply-btn {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    width: 100% !important;
    height: 54px !important;
    background: #dc2626 !important;
    color: #fff !important;
    border: none !important;
    border-radius: 12px !important;
    font-size: 16px !important;
    font-weight: 700 !important;
    cursor: pointer !important;
    transition: background .15s !important;
    font-family: inherit !important;
    margin-bottom: 28px !important;
  }
  .sfb-apply-btn:hover { background: #b91c1c !important; }

  /* Product grid */
  ul.products { grid-template-columns: repeat(2, 1fr) !important; gap: 12px !important; }
}

/* ============================================================
   RESPONSIVE: 500px — 1 column
   ============================================================ */
@media (max-width: 500px) {
  ul.products { grid-template-columns: repeat(2, 1fr) !important; gap: 10px !important; }
}

/* ============================================================
   SINGLE PRODUCT PAGE
   ============================================================ */

.ka-product { display: block; position: relative; }

/* ── Two-column inner layout ── */
.ka-product__inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(24px, 5vw, 56px);
  align-items: start;
}

/* ── Full-width below section ── */
.ka-product__below { margin-top: 48px; }

/* ── Badges ── */
.ka-badge {
  position: absolute;
  z-index: 3;
  font-size: .65rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .07em;
  padding: 4px 10px;
  border-radius: 5px;
}
.ka-badge--sale {
  top: 12px;
  left: 12px;
  background: #dc2626;
  color: #fff;
}

.ka-gallery { display: flex; flex-direction: column; gap: 10px; }
.ka-gallery__main { aspect-ratio: 1; background: #f5f5f4; border-radius: 12px; overflow: hidden; border: 1.5px solid #e2e2e0; display: flex; align-items: center; justify-content: center; }
#ka-main-img { width: 100%; height: 100%; object-fit: contain; padding: 16px; transition: opacity .2s; }
.ka-gallery__thumbs { display: flex; gap: 8px; flex-wrap: wrap; }
.ka-gallery__thumb {
  width: 72px; height: 72px;
  border-radius: 8px;
  overflow: hidden;
  border: 2px solid #e2e2e0;
  cursor: pointer;
  background: #f5f5f4;
  transition: border-color .15s;
  display: flex; align-items: center; justify-content: center;
}
.ka-gallery__thumb img { width: 100%; height: 100%; object-fit: contain; padding: 4px; }
.ka-gallery__thumb.is-active,
.ka-gallery__thumb:hover { border-color: #dc2626; }

/* ── Summary panel ── */
.ka-product__summary {
  display: flex;
  flex-direction: column;
  gap: 18px;
  position: sticky;
  top: 20px;
}

/* ── Category pills ── */
.ka-product__cats { display: flex; flex-wrap: wrap; gap: 6px; }
.ka-product__cat {
  display: inline-block;
  font-size: .7rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: #dc2626;
  padding: 4px 12px;
  border: 1.5px solid rgba(220,38,38,.3);
  border-radius: 20px;
  transition: background .15s, color .15s;
}
.ka-product__cat:hover { background: #dc2626; color: #fff; }

/* ── Title ── */
.ka-product__title {
  font-family: 'Barlow Condensed', system-ui, sans-serif;
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  font-weight: 800;
  color: #111;
  line-height: 1.1;
  text-transform: uppercase;
  letter-spacing: .01em;
}

/* ── SKU __ */
.ka-product__sku { display: flex; align-items: center; gap: 8px; }
.ka-product__sku-label { font-size: .75rem; color: #9a9a9a; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; }
.ka-product__sku-value { font-size: .8rem; color: #444; font-weight: 700; letter-spacing: .04em; }

/* ── Rating __ */
.ka-product__rating { display: flex; align-items: center; gap: 8px; }
.ka-product__rating-count { font-size: .78rem; color: #9a9a9a; text-decoration: underline; }

/* ── Price __ */
.ka-product__price-wrap {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 20px;
  background: linear-gradient(135deg, #f8f8f6 0%, #f2f2f0 100%);
  border-radius: 12px;
  border: 1px solid #e8e8e6;
}
.ka-product__price-wrap .price { font-size: 1.8rem; font-weight: 800; color: #1c1c1c; }
.ka-product__price-wrap .price del { font-size: 1.1rem; font-weight: 400; color: #bbb; text-decoration: line-through; margin-right: 4px; }
.ka-product__price-wrap .price ins { text-decoration: none; color: #dc2626; }
.ka-product__save {
  font-size: .72rem;
  background: #dc2626;
  color: #fff;
  padding: 4px 10px;
  border-radius: 5px;
  font-weight: 800;
  white-space: nowrap;
  letter-spacing: .04em;
}

/* ── Stock __ */
.ka-product__stock-wrap { display: flex; }
.ka-stock {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: .82rem;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: 20px;
}
.ka-stock__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
  flex-shrink: 0;
  animation: stockPulse 2s ease-in-out infinite;
}
.ka-stock--in { color: #16a34a; background: rgba(22,163,74,.1); }
.ka-stock--in .ka-stock__dot { background: #16a34a; }
.ka-stock--out { color: #dc2626; background: rgba(220,38,38,.08); }
.ka-stock--out .ka-stock__dot { background: #dc2626; animation: none; }
@keyframes stockPulse {
  0%, 100% { opacity: 1; } 50% { opacity: .4; }
}

/* __ Short description __ */
.ka-product__short-desc { font-size: .88rem; line-height: 1.75; color: #5a5a5a; }

/* __ Cart area __ */
.ka-product__cart { }
.ka-product__cart .quantity { display: inline-block; }
.ka-product__cart form.cart { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.ka-product__cart .single_add_to_cart_button {
  flex: 1;
  min-width: 160px;
}

/* __ Trust bar __ */
.ka-trust {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  padding: 16px 0;
  border-top: 1px solid #e8e8e6;
}
.ka-trust__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  text-align: center;
  font-size: .72rem;
  color: #666;
  padding: 12px 8px;
  border-radius: 8px;
  background: #f9f9f7;
  border: 1px solid #ebebeb;
}
.ka-trust__item svg { color: #dc2626; }

/* __ Product meta __ */
.ka-product__meta { font-size: .82rem; color: #9a9a9a; }
.ka-product__meta a { color: #666; transition: color .15s; }
.ka-product__meta a:hover { color: #dc2626; }

/* ── Legacy aliases (keep for compatibility) ── */
.ka-summary { display: flex; flex-direction: column; gap: 16px; }
.ka-summary__cats { font-size: .72rem; font-weight: 800; text-transform: uppercase; letter-spacing: .1em; color: #dc2626; }
.ka-summary__title { font-size: clamp(1.3rem, 2.5vw, 1.8rem); font-weight: 800; color: #1c1c1c; line-height: 1.2; }
.ka-summary__sku { font-size: .8rem; color: #9a9a9a; }
.ka-price-block { display: flex; align-items: center; gap: 12px; padding: 16px; background: #f5f5f4; border-radius: 10px; }
.ka-price-block .price { font-size: 1.5rem; font-weight: 800; color: #1c1c1c; }
.ka-price-block .price del { font-size: 1rem; font-weight: 400; color: #aaa; text-decoration: line-through; }
.ka-price-block .price ins { text-decoration: none; color: #dc2626; }
.ka-saving { font-size: .75rem; background: #dc2626; color: #fff; padding: 3px 8px; border-radius: 4px; font-weight: 700; white-space: nowrap; }

.ka-stock-old { display: flex; align-items: center; gap: 6px; font-size: .85rem; font-weight: 600; }
.ka-trust-bar { display: flex; gap: 16px; flex-wrap: wrap; }
.ka-trust-item { display: flex; align-items: center; gap: 6px; font-size: .78rem; color: #5a5a5a; }
.ka-trust-item svg { color: #dc2626; flex-shrink: 0; }

.ka-form { display: flex; flex-direction: column; gap: 12px; }
.ka-qty-row { display: flex; align-items: center; gap: 8px; }
.ka-qty { display: flex; align-items: center; border: 1.5px solid #e2e2e0; border-radius: 8px; overflow: hidden; }
.qty-btn {
  width: 36px; height: 42px;
  display: flex; align-items: center; justify-content: center;
  background: #f5f5f4;
  border: none;
  cursor: pointer;
  font-size: 1.1rem;
  color: #1c1c1c;
  transition: background .15s;
  font-family: inherit;
}
.qty-btn:hover { background: #e2e2e0; }
input.qty { width: 52px; height: 42px; text-align: center; border: none; border-left: 1px solid #e2e2e0; border-right: 1px solid #e2e2e0; font-size: .95rem; font-weight: 600; color: #1c1c1c; outline: none; background: #fff; }
.single_add_to_cart_button,
.ka-atc-btn {
  flex: 1;
  height: 50px;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  background: #dc2626 !important;
  color: #fff !important;
  border: none !important;
  border-radius: 9px !important;
  font-size: .95rem !important;
  font-weight: 700 !important;
  cursor: pointer !important;
  transition: background .15s !important;
}
.single_add_to_cart_button:hover { background: #b91c1c !important; }

.ka-trust-bar { display: flex; gap: 16px; flex-wrap: wrap; }
.ka-trust-item { display: flex; align-items: center; gap: 6px; font-size: .78rem; color: #5a5a5a; }
.ka-trust-item svg { color: #dc2626; flex-shrink: 0; }

.product-compatibility { margin-top: 8px; }
.product-compatibility__title { font-size: .82rem; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; color: #9a9a9a; margin-bottom: 8px; }
.product-compatibility__table { width: 100%; border-collapse: collapse; font-size: .82rem; }
.product-compatibility__table th { font-weight: 700; padding: 5px 8px; text-align: left; background: #f5f5f4; color: #5a5a5a; border: 1px solid #e2e2e0; white-space: nowrap; width: 90px; }
.product-compatibility__table td { padding: 5px 8px; border: 1px solid #e2e2e0; color: #1c1c1c; }

.woocommerce-tabs { margin-top: 32px; }
.woocommerce-tabs ul.tabs { display: flex; gap: 0; list-style: none; border-bottom: 2px solid #e2e2e0; padding: 0; }
.woocommerce-tabs ul.tabs li { margin: 0; }
.woocommerce-tabs ul.tabs li a { display: block; padding: 10px 20px; font-size: .85rem; font-weight: 700; color: #9a9a9a; text-decoration: none; border-bottom: 2px solid transparent; margin-bottom: -2px; transition: color .15s, border-color .15s; }
.woocommerce-tabs ul.tabs li.active a,
.woocommerce-tabs ul.tabs li a:hover { color: #1c1c1c; border-bottom-color: #dc2626; }
.woocommerce-tabs .panel { padding: 24px 0; font-size: .9rem; color: #5a5a5a; line-height: 1.8; }

/* ============================================================
   CART & CHECKOUT
   ============================================================ */
.woocommerce-cart table.cart,
.woocommerce-checkout table.shop_table { width: 100%; border-collapse: collapse; font-size: .9rem; margin-bottom: 24px; }
.woocommerce-cart table.cart th,
.woocommerce-checkout table.shop_table th { padding: 10px 12px; background: #f5f5f4; font-size: .72rem; font-weight: 800; text-transform: uppercase; letter-spacing: .07em; color: #9a9a9a; border-bottom: 1.5px solid #e2e2e0; text-align: left; }
.woocommerce-cart table.cart td,
.woocommerce-checkout table.shop_table td { padding: 14px 12px; border-bottom: 1px solid #e2e2e0; vertical-align: middle; }
.woocommerce-cart table.cart img { width: 64px; height: 64px; object-fit: contain; border-radius: 6px; border: 1px solid #e2e2e0; background: #f5f5f4; }
.woocommerce-cart .cart-collaterals { display: flex; justify-content: flex-end; }
.woocommerce-cart .cart_totals { min-width: 320px; }
.woocommerce-cart .cart_totals table { width: 100%; border-collapse: collapse; }
.woocommerce-cart .cart_totals td,
.woocommerce-cart .cart_totals th { padding: 10px 0; border-bottom: 1px solid #e2e2e0; font-size: .9rem; }
.woocommerce-cart .cart_totals .order-total td,
.woocommerce-cart .cart_totals .order-total th { font-weight: 800; font-size: 1rem; }
.checkout-button,
.wc-proceed-to-checkout a {
  display: flex !important; align-items: center !important; justify-content: center !important;
  width: 100% !important; padding: 14px 24px !important; background: #dc2626 !important;
  color: #fff !important; border-radius: 9px !important; font-size: .95rem !important;
  font-weight: 700 !important; margin-top: 16px !important; transition: background .15s !important;
}
.checkout-button:hover { background: #b91c1c !important; }

/* ============================================================
   PAGINATION
   ============================================================ */
.woocommerce-pagination { margin-top: 40px; text-align: center; }
.woocommerce-pagination ul.page-numbers {
  display: inline-flex !important; align-items: center !important; gap: 4px !important;
  list-style: none !important; padding: 0 !important; margin: 0 !important;
}
.woocommerce-pagination ul.page-numbers li { display: block !important; }
.woocommerce-pagination .page-numbers {
  display: flex !important; align-items: center !important; justify-content: center !important;
  min-width: 38px !important; height: 38px !important; padding: 0 6px !important;
  border: 1.5px solid #e2e2e0 !important; border-radius: 8px !important;
  font-size: .85rem !important; color: #1c1c1c !important; background: #fff !important;
  text-decoration: none !important; transition: all .15s !important;
}
.woocommerce-pagination .page-numbers.current { background: #dc2626 !important; border-color: #dc2626 !important; color: #fff !important; }
.woocommerce-pagination .page-numbers:hover:not(.current) { border-color: #1c1c1c !important; }
.woocommerce-pagination .page-numbers.dots { border: none !important; background: transparent !important; color: #9a9a9a !important; }

/* ── WC notices ── */
.woocommerce-message,
.woocommerce-error,
.woocommerce-info {
  padding: 14px 18px !important; border-radius: 8px !important; margin-bottom: 20px !important;
  font-size: .9rem !important; border-left: 3px solid #dc2626 !important;
  background: rgba(220,38,38,.04) !important; color: #1c1c1c !important;
}
.woocommerce-message { border-left-color: #16a34a !important; background: rgba(22,163,74,.04) !important; }

/* ── Single product mobile ── */
@media (max-width: 768px) {
  .ka-product__inner { grid-template-columns: 1fr; }
  .ka-gallery__main { max-height: 320px; }
  .ka-product__summary { position: static; }
  .ka-trust { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 500px) {
  .ka-trust { grid-template-columns: 1fr 1fr; }
}


/* ── Category sidebar responsive ── */
@media (max-width: 900px) {
  .shop-area--with-sidebar {
    grid-template-columns: 1fr;
  }
  .shop-cat-sidebar {
    position: static;
    max-height: none;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px 16px;
  }
  .shop-cat-sidebar__title {
    grid-column: 1 / -1;
  }
  .shop-cat-sidebar__clear {
    grid-column: 1 / -1;
  }
}
@media (max-width: 540px) {
  .shop-cat-sidebar {
    grid-template-columns: 1fr;
  }
}
