/* Searchable select — same component as backend dashboard (class "select-search") */
.ss-field { width: 100%; }
.ss { position: relative; width: 100%; }
.ss > select.select-search { display: none; }
.ss-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  text-align: left;
  cursor: pointer;
  font-family: inherit !important;
  font-size: 13.5px !important;
  font-weight: 600 !important;
  line-height: 1.4 !important;
  color: #1F2937;
  background: #FFFFFF;
  border: 1px solid #D1D5DB;
  border-radius: 8px;
  height: 42px;
  padding: 0 10px 0 12px;
  transition: border-color .16s ease, box-shadow .16s ease;
}
.ss-trigger:hover { border-color: #9CA3AF; }
.ss-trigger:focus-visible,
.ss.open .ss-trigger,
.shop-dd.open .ss-trigger {
  outline: none;
  border-color: #D92534;
  box-shadow: 0 0 0 3px rgba(217, 37, 52, 0.12);
}
.ss-icon {
  flex-shrink: 0;
  font-size: 16px;
  line-height: 1;
  color: #374151;
}
.ss-value {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: inherit !important;
  font-weight: inherit !important;
  line-height: inherit !important;
  color: #111827;
}
.ss-value.placeholder {
  color: #1F2937 !important;
  font-weight: 600 !important;
  opacity: 1;
}
.ss-chevron { flex-shrink: 0; color: #6B7280; transition: transform .16s ease; }
.ss.open .ss-chevron,
.shop-dd.open .ss-chevron { transform: rotate(180deg); }
.ss-panel {
  position: absolute;
  left: 0;
  right: auto;
  top: calc(100% + 6px);
  z-index: 50;
  min-width: 220px;
  width: max(100%, 220px);
  background: #FFFFFF;
  border: 1px solid #E5E7EB;
  border-radius: 12px;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.12);
  padding: 6px;
}
.ss-panel[hidden] { display: none; }
.ss-search {
  width: 100%;
  height: 36px;
  padding: 0 12px 0 34px;
  border: 1px solid #E5E7EB;
  border-radius: 9px;
  font-size: 13.5px;
  font-weight: 500;
  color: #111827;
  background: #F9FAFB url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='15' height='15' viewBox='0 0 24 24' fill='none' stroke='%236B7280' stroke-width='2'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m21 21-4.3-4.3'/%3E%3C/svg%3E") no-repeat 11px center;
  box-sizing: border-box;
}
.ss-search::placeholder { color: #9CA3AF; font-weight: 400; }
.ss-search:focus,
.ss-search:focus-visible {
  outline: none;
  border-color: #D92534;
  background-color: #FFFFFF;
}
.ss-list { max-height: 240px; overflow-y: auto; margin-top: 6px; }
.ss-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 9px 10px;
  border-radius: 8px;
  font-size: 13.5px;
  font-weight: 500;
  color: #111827;
  cursor: pointer;
}
.ss-option.active { background: #F3F4F6; }
.ss-option.selected { color: #D92534; font-weight: 600; }
.ss-option.selected::after {
  content: "";
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  background: 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='%23D92534' stroke-width='3'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") no-repeat center;
}
.ss-option.ss-check-option { justify-content: flex-start; gap: 10px; }
.ss-option.ss-check-option::after { display: none; }
.ss-option.ss-check-option .ss-option-label { flex: 1; min-width: 0; }
.ss-check {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  border: 1.5px solid #D1D5DB;
  border-radius: 5px;
  background: #FFFFFF;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: border-color .12s ease, background .12s ease;
}
.ss-option.ss-check-option.selected .ss-check {
  border-color: #D92534;
  background: #D92534 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='3.2'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") no-repeat center;
}
.ss-swatch {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  border-radius: 999px;
  border: 1px solid rgba(15, 23, 42, 0.12);
}
.ss-option.disabled { opacity: .45; cursor: not-allowed; }
.ss-empty { padding: 12px 10px; font-size: 13px; color: #6B7280; text-align: center; }
.ss-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.ss-chips[hidden] { display: none; }
.shop-toolbar .ss-chips { display: none !important; }
.ss-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  max-width: 100%;
  padding: 5px 8px 5px 9px;
  border: 1px solid #E5E7EB;
  border-radius: 999px;
  background: #F9FAFB;
  color: #111827;
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1.2;
}
.ss-chip-label { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ss-chip-remove {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  margin-left: 1px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #9CA3AF;
  cursor: pointer;
}
.ss-chip-remove:hover { background: #FEE2E2; color: #D92534; }

/* Active filter tags (above product cards) */
.shop-active-tags {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.shop-active-tags[hidden] { display: none !important; }
.shop-active-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: 100%;
  min-height: 30px;
  padding: 5px 12px 5px 14px;
  border: 0;
  border-radius: 999px;
  background: #D92534;
  color: #FFFFFF;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  line-height: 1.2;
  cursor: pointer;
  transition: background .15s ease, opacity .15s ease;
}
.shop-active-tag:hover { background: #b91c1c; }
.shop-active-tag span:first-child {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.shop-active-tag-x {
  flex-shrink: 0;
  font-size: 15px;
  font-weight: 500;
  line-height: 1;
  opacity: 0.9;
}

/* Mobile FILTER button badge */
.shop-filter-badge {
  display: none;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border-radius: 999px;
  background: #FFFFFF;
  color: #1E293B;
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
}
.shop-filter-badge.inline-flex { display: inline-flex; }

/* Shop filter bar */
.shop-toolbar { overflow: visible; }
.shop-filter-bar { overflow: visible; }
.shop-filter-item {
  width: 136px;
  flex: 0 0 auto;
  position: relative;
  z-index: 1;
}
.shop-filter-item--size { width: 118px; }
.shop-filter-item--sort { width: 156px; }
.shop-filter-item .ss.open,
.shop-filter-item.shop-dd.open { z-index: 60; }
.shop-filter-item:nth-last-child(-n+2) .ss-panel,
.shop-filter-item:nth-last-child(-n+2) .shop-dd-panel {
  left: auto;
  right: 0;
}

/* Mobile drawer: stack filters full-width + in-flow accordion panels */
.shop-filter-drawer-body .shop-filter-bar {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 12px;
  overflow: visible;
}
.shop-filter-drawer-body .shop-filter-item,
.shop-filter-drawer-body .shop-filter-item--size,
.shop-filter-drawer-body .shop-filter-item--sort {
  width: 100%;
  z-index: auto;
  overflow: visible;
}
.shop-filter-drawer-body .ss,
.shop-filter-drawer-body .shop-dd {
  overflow: visible;
}
.shop-filter-drawer-body .ss-panel,
.shop-filter-drawer-body .shop-dd-panel {
  position: static !important;
  left: auto !important;
  right: auto !important;
  top: auto !important;
  width: 100% !important;
  min-width: 0 !important;
  margin-top: 8px;
  box-shadow: none;
  z-index: auto;
}
.shop-filter-drawer-body .shop-price-panel {
  width: 100%;
}
.shop-filter-drawer-body .shop-filter-item:has(.ss.open),
.shop-filter-drawer-body .shop-filter-item.shop-dd.open {
  z-index: 5;
}

/* Custom shop dropdown panels (price / sort) */
.shop-dd-panel {
  position: absolute;
  left: 0;
  top: calc(100% + 6px);
  z-index: 50;
  background: #FFFFFF;
  border: 1px solid #E5E7EB;
  border-radius: 12px;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.12);
}
.shop-dd-panel.hidden,
.shop-dd-panel[hidden] { display: none !important; }

/* Price range panel */
.shop-price-panel {
  width: 260px;
  padding: 14px 14px 12px;
}
.shop-price-heading {
  margin: 0 0 12px;
  font-size: 12.5px;
  font-weight: 500;
  color: #9CA3AF;
}
.shop-price-slider {
  position: relative;
  height: 28px;
  margin-bottom: 12px;
}
.shop-price-track {
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 3px;
  margin-top: -1.5px;
  background: #E5E7EB;
  border-radius: 999px;
}
.shop-price-range {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 100%;
  background: #1E293B;
  border-radius: 999px;
}
.shop-price-thumb {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 28px;
  margin: 0;
  background: none;
  pointer-events: none;
  appearance: none;
  -webkit-appearance: none;
  z-index: 2;
}
.shop-price-thumb:last-of-type { z-index: 3; }
.shop-price-thumb::-webkit-slider-runnable-track {
  height: 28px;
  background: transparent;
}
.shop-price-thumb::-webkit-slider-thumb {
  appearance: none;
  -webkit-appearance: none;
  pointer-events: auto;
  width: 14px;
  height: 14px;
  margin-top: 7px;
  border: 0;
  border-radius: 2px;
  background: #1E293B;
  cursor: pointer;
  box-shadow: 0 0 0 2px #fff;
}
.shop-price-thumb::-moz-range-track { height: 28px; background: transparent; border: 0; }
.shop-price-thumb::-moz-range-thumb {
  pointer-events: auto;
  width: 14px;
  height: 14px;
  border: 0;
  border-radius: 2px;
  background: #1E293B;
  cursor: pointer;
  box-shadow: 0 0 0 2px #fff;
}
.shop-price-inputs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 12px;
}
.shop-price-input {
  width: 100%;
  height: 40px;
  padding: 0 10px;
  border: 1px solid #D1D5DB;
  border-radius: 8px;
  background: #FFFFFF;
  color: #111827;
  font-size: 14px;
  font-weight: 600;
  text-align: center;
  box-sizing: border-box;
}
.shop-price-input:focus {
  outline: none;
  border-color: #D92534;
  box-shadow: 0 0 0 3px rgba(217, 37, 52, 0.12);
}
.shop-price-apply {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 44px;
  border: 0;
  border-radius: 8px;
  background: #1E293B;
  color: #FFFFFF;
  font-family: "Playfair Display", Georgia, serif;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: background .15s ease;
}
.shop-price-apply:hover { background: #0F172A; }

/* Sort panel */
.shop-sort-panel {
  min-width: 200px;
  width: max(100%, 200px);
  padding: 6px;
}
.shop-sort-option {
  display: block;
  width: 100%;
  border: 0;
  background: transparent;
  border-radius: 8px;
  padding: 10px 12px;
  text-align: left;
  font-size: 14px;
  font-weight: 500;
  color: #1E293B;
  cursor: pointer;
}
.shop-sort-option:hover { background: #F3F4F6; }
.shop-sort-option.is-active {
  color: #D92534;
  font-weight: 700;
}

@media (max-width: 639px) {
  .shop-filter-item { width: calc(50% - 4px); }
  .shop-filter-item--sort { width: 100%; }
  .ss-trigger { height: 40px; font-size: 13px !important; }
  .shop-price-panel { width: min(260px, calc(100vw - 32px)); }
}
