/* ================================================================
   shop.css  —  Product listing page styles
   ================================================================ */

/* ── Color Swatches ─────────────────────────────────────────── */
.filter-color-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 4px 0 8px;
}

.color-swatch-label {
  position: relative;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.color-swatch-label input[type="radio"] {
  display: none;
}

.color-dot {
  display: block;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2.5px solid transparent;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.15);
  transition: transform .18s, box-shadow .18s, border-color .18s;
  position: relative;
}

/* Checkmark */
.color-dot::after {
  content: '✓';
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  color: transparent;
  transition: color .15s;
}

.color-swatch-label:hover .color-dot {
  transform: scale(1.18);
  box-shadow: 0 0 0 2px rgba(0, 0, 0, .25);
}

.color-swatch-label.checked .color-dot {
  border-color: #c8a96e;
  box-shadow: 0 0 0 2.5px #c8a96e;
  transform: scale(1.1);
}

.color-swatch-label.checked .color-dot::after {
  color: rgba(255, 255, 255, .9);
}

/* Tooltip */
.color-tooltip {
  position: absolute;
  bottom: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  background: #1a1a1a;
  color: #fff;
  font-size: 10px;
  font-weight: 600;
  padding: 3px 7px;
  border-radius: 5px;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity .18s;
  z-index: 20;
}

.color-tooltip::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 4px solid transparent;
  border-top-color: #1a1a1a;
}

.color-swatch-label:hover .color-tooltip {
  opacity: 1;
}

/* Active color tag */
.filter-active-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #faf5ee;
  border: 1px solid #e8d9b8;
  border-radius: 20px;
  padding: 3px 10px 3px 12px;
  font-size: 12px;
  font-weight: 600;
  color: #a07840;
  margin-top: 4px;
}

.filter-active-tag a {
  color: #c8a96e;
  text-decoration: none;
  font-size: 13px;
}

.filter-active-tag a:hover {
  color: #e74c3c;
}

/* ── Size Chips ─────────────────────────────────────────────── */
.filter-size-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 4px 0 8px;
}

.size-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  height: 38px;
  padding: 0 10px;
  border: 1.5px solid #ddd;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 700;
  color: #666;
  cursor: pointer;
  transition: all .2s;
  user-select: none;
}

.size-label input {
  display: none;
}

.size-label:hover {
  border-color: #c8a96e;
  color: #c8a96e;
}

.size-label.checked {
  background: #1a1a1a;
  border-color: #1a1a1a;
  color: #fff;
}

.filter-clear-link {
  display: inline-block;
  margin-top: 2px;
  font-size: 11px;
  color: #e74c3c;
  text-decoration: none;
  font-weight: 600;
}

.filter-clear-link:hover {
  text-decoration: underline;
}

/* ── Category List ──────────────────────────────────────────── */
.filter-category-ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.filter-category-ul li {
  margin-bottom: 1px;
}

.topcoat-radio-button__label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 7px 10px;
  border-radius: 8px;
  font-size: 14px;
  color: #555;
  cursor: pointer;
  transition: background .15s, color .15s;
}

.topcoat-radio-button__label:hover {
  background: #faf5ee;
  color: #c8a96e;
}

.topcoat-radio-button__label.checked {
  background: #faf5ee;
  color: #c8a96e;
  font-weight: 700;
}

.topcoat-radio-button__label input {
  display: none;
}

.topcoat-radio-button {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid #ddd;
  position: relative;
  flex-shrink: 0;
  transition: border-color .15s;
}

.topcoat-radio-button__label.checked .topcoat-radio-button {
  border-color: #c8a96e;
}

.topcoat-radio-button__label.checked .topcoat-radio-button::after {
  content: '';
  position: absolute;
  inset: 3px;
  border-radius: 50%;
  background: #c8a96e;
}

/* ── Price Slider ───────────────────────────────────────────── */
.price-values {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  font-weight: 700;
  color: #555;
  margin-bottom: 14px;
}

.slider-container {
  position: relative;
  height: 30px;
}

.slider-container input[type="range"] {
  position: absolute;
  width: 100%;
  height: 4px;
  background: transparent;
  -webkit-appearance: none;
  pointer-events: none;
  top: 50%;
  transform: translateY(-50%);
  outline: none;
}

.slider-container input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid #c8a96e;
  box-shadow: 0 2px 6px rgba(0, 0, 0, .15);
  cursor: pointer;
  pointer-events: all;
  transition: transform .15s;
}

.slider-container input[type="range"]::-webkit-slider-thumb:hover {
  transform: scale(1.2);
}

.slider-container input[type="range"]::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid #c8a96e;
  cursor: pointer;
  pointer-events: all;
}

#sliderTrack {
  position: absolute;
  height: 4px;
  border-radius: 2px;
  background: #eee;
  left: 0;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
}

/* ── Filter Action Buttons ──────────────────────────────────── */
.btn-filter-submit {
  display: block;
  width: 100%;
  padding: 12px;
  background: #1a1a1a;
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .6px;
  text-transform: uppercase;
  cursor: pointer;
  transition: background .2s;
  margin-bottom: 10px;
}

.btn-filter-submit:hover {
  background: #c8a96e;
}

.btn-filter-reset {
  display: block;
  text-align: center;
  padding: 10px;
  border: 1.5px solid #ddd;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  color: #888;
  text-decoration: none;
  transition: all .2s;
}

.btn-filter-reset:hover {
  border-color: #e74c3c;
  color: #e74c3c;
}

/* ── Infinite Scroll ────────────────────────────────────────── */
.spinner {
  display: inline-block;
  width: 36px;
  height: 36px;
  border: 3px solid #eee;
  border-top-color: #c8a96e;
  border-radius: 50%;
  animation: spin .7s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Fade-in animation for newly loaded cards */
.product-single-item.fade-in {
  animation: fadeUp .35s ease forwards;
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(16px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}