/* ===== WooCommerce Filtros Dinámicos - Diseño moderno Inter ===== */
/* Solo estilos del FILTRO. Los productos usan el estilo nativo de WooCommerce. */

.wcfd-filter-panel,
.wcfd-filter-panel * {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif !important;
  box-sizing: border-box !important;
}

.wcfd-filter-panel {
  width: 100%;
  max-width: 300px;
  margin: 0;
  padding: 28px;
  background: linear-gradient(160deg, #0d0d10 0%, #15151a 50%, #0f0f14 100%);
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.04);
  box-shadow: 
    0 25px 50px -12px rgba(0, 0, 0, 0.5),
    0 0 0 1px rgba(191, 4, 18, 0.03),
    inset 0 1px 0 rgba(255, 255, 255, 0.02);
}

.wcfd-form {
  display: flex;
  flex-direction: column;
  gap: 26px;
}

.wcfd-title {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.45);
  margin: 0 0 14px 0;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.wcfd-section {
  margin: 0;
}

/* Precio */
.wcfd-section-price .wcfd-price-range {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.wcfd-price-inputs {
  display: flex;
  align-items: center;
  gap: 12px;
}

.wcfd-input {
  flex: 1;
  min-width: 0;
  padding: 14px 16px;
  font-size: 14px;
  font-weight: 500;
  color: #fff;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  font-family: 'Inter', sans-serif !important;
  transition: all 0.25s ease;
}

.wcfd-input:focus {
  outline: none;
  border-color: rgba(191, 4, 18, 0.5);
  background: rgba(191, 4, 18, 0.06);
  box-shadow: 0 0 0 3px rgba(191, 4, 18, 0.1);
}

.wcfd-input::placeholder {
  color: rgba(255, 255, 255, 0.3);
}

.wcfd-sep {
  color: rgba(255, 255, 255, 0.35);
  font-weight: 600;
  flex-shrink: 0;
}

.wcfd-price-slider {
  position: relative;
  height: 8px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 4px;
}

.wcfd-price-slider input[type="range"] {
  position: absolute;
  width: 100%;
  height: 8px;
  margin: 0;
  background: transparent;
  pointer-events: none;
  -webkit-appearance: none;
  appearance: none;
}

.wcfd-price-slider input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #bf0412;
  cursor: pointer;
  pointer-events: all;
  box-shadow: 0 2px 12px rgba(191, 4, 18, 0.5);
  border: 3px solid rgba(255, 255, 255, 0.95);
}

.wcfd-price-slider input[type="range"]::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #bf0412;
  cursor: pointer;
  pointer-events: all;
  box-shadow: 0 2px 12px rgba(191, 4, 18, 0.5);
  border: 3px solid rgba(255, 255, 255, 0.95);
}

.wcfd-price-slider input[type="range"]:last-of-type {
  pointer-events: none;
}

.wcfd-price-slider input[type="range"]:last-of-type::-webkit-slider-thumb {
  pointer-events: all;
}

.wcfd-price-slider input[type="range"]:last-of-type::-moz-range-thumb {
  pointer-events: all;
}

.wcfd-price-hint {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.38);
  margin: 0;
}

/* Scroll para listas */
.wcfd-scroll {
  max-height: 220px;
  overflow-y: auto;
  padding-right: 6px;
}

.wcfd-scroll::-webkit-scrollbar {
  width: 5px;
}

.wcfd-scroll::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.03);
  border-radius: 3px;
}

.wcfd-scroll::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 3px;
}

.wcfd-scroll::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.25);
}

/* Checkboxes */
.wcfd-check {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  margin-bottom: 4px;
  border-radius: 10px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.92);
  transition: all 0.2s ease;
}

.wcfd-check:hover {
  background: rgba(255, 255, 255, 0.04);
}

.wcfd-check input {
  width: 18px;
  height: 18px;
  accent-color: #bf0412;
  cursor: pointer;
  flex-shrink: 0;
}

.wcfd-check span {
  flex: 1;
}

/* Botones */
.wcfd-actions {
  display: flex;
  gap: 12px;
  margin-top: 10px;
  padding-top: 22px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.wcfd-btn {
  flex: 1;
  padding: 14px 22px;
  font-size: 14px;
  font-weight: 600;
  font-family: 'Inter', sans-serif !important;
  border-radius: 12px;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
  transition: all 0.25s ease;
  border: none;
}

.wcfd-btn-primary {
  background: #bf0412;
  color: #fff;
  box-shadow: 0 4px 16px rgba(191, 4, 18, 0.35);
}

.wcfd-btn-primary:hover {
  background: #9a0310;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(191, 4, 18, 0.45);
}

.wcfd-btn-secondary {
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.wcfd-btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.15);
}

/* Layout tienda (solo cuando se usa en shop/category) */
.wcfd-shop-layout {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 32px;
  align-items: start;
  width: 100%;
  margin-bottom: 32px;
}

.wcfd-shop-layout .wcfd-filter-panel {
  grid-column: 1;
  grid-row: 1 / -1;
  position: sticky;
  top: 24px;
}

.wcfd-shop-layout .woocommerce-result-count,
.wcfd-shop-layout .woocommerce-ordering,
.wcfd-shop-layout .woocommerce-products {
  grid-column: 2;
}

.wcfd-shop-layout .woocommerce-products {
  grid-column: 2;
  width: 100%;
}

@media (max-width: 900px) {
  .wcfd-shop-layout {
    grid-template-columns: 1fr;
  }

  .wcfd-shop-layout .wcfd-filter-panel {
    grid-row: auto;
    position: static;
    max-width: 100%;
    margin-left: auto;
    margin-right: auto;
  }

  .wcfd-shop-layout .woocommerce-result-count,
  .wcfd-shop-layout .woocommerce-ordering,
  .wcfd-shop-layout .woocommerce-products {
    grid-column: 1;
  }
}

/* Loading state AJAX */
.wcfd-products-wrapper.wcfd-loading {
  position: relative;
  min-height: 120px;
}

.wcfd-products-wrapper.wcfd-loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 36px;
  height: 36px;
  margin: -18px 0 0 -18px;
  border: 3px solid rgba(191, 4, 18, 0.2);
  border-top-color: #bf0412;
  border-radius: 50%;
  animation: wcfd-spin 0.8s linear infinite;
}

@keyframes wcfd-spin {
  to { transform: rotate(360deg); }
}

.wcfd-products-wrapper.wcfd-loading > * {
  opacity: 0.4;
  pointer-events: none;
}

@media (max-width: 768px) {
  .wcfd-filter-panel {
    max-width: 100%;
    padding: 22px;
  }

  .wcfd-actions {
    flex-direction: column;
  }

  .wcfd-btn {
    width: 100%;
  }
}
