/* =================================================================
   shop.css — Tienda / Categoría (archive-product.php)
   Scoped under .cf-shop. Loaded automatically by functions.php.
================================================================= */

/* ----------------------------------------------------------------
   HERO DE CATEGORÍA
---------------------------------------------------------------- */
.cf-shop-hero {
  position: relative;
  border-bottom: 1px solid var(--line-1);
  overflow: hidden;
}

/* Malla de fondo (igual que la home pero solo esquina sup-izq) */
.cf-shop-hero-mesh {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--line-0) 1px, transparent 1px),
    linear-gradient(90deg, var(--line-0) 1px, transparent 1px);
  background-size: 26px 26px;
  -webkit-mask-image: radial-gradient(70% 120% at 20% 0%, #000, transparent 75%);
  mask-image: radial-gradient(70% 120% at 20% 0%, #000, transparent 75%);
  pointer-events: none;
}

/* Blob violeta decorativo */
.cf-shop-hero-blob {
  position: absolute;
  width: 360px;
  height: 360px;
  right: -60px;
  top: -120px;
  background: radial-gradient(circle, #7c5cff33, transparent 70%);
  filter: blur(20px);
  pointer-events: none;
}

.cf-shop-hero-inner {
  position: relative;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 38px var(--pad) 34px;
}

.cf-shop-hero-body {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  margin-top: 14px;
}

/* H1 del término */
.cf-shop-hero-title {
  font-family: var(--f-head);
  font-weight: 700;
  font-size: clamp(34px, 5vw, 46px);
  line-height: 1;
  letter-spacing: -.01em;
  margin: 0 0 12px;
}

/* Descripción del término */
.cf-shop-hero-desc {
  font-size: 16px;
  color: var(--text-2);
  line-height: 1.55;
  max-width: 540px;
  margin: 0;
}

.cf-shop-hero-desc .cf-shop-count-inline {
  color: var(--accent);
}

/* Stat cards (nº diseños + valoración) */
.cf-shop-stats {
  display: flex;
  gap: 10px;
  flex: none;
}

.cf-shop-stat {
  text-align: center;
  background: var(--surface);
  border: 1px solid var(--line-2);
  border-radius: var(--r-12);
  padding: 14px 20px;
  min-width: 70px;
}

.cf-shop-stat-val {
  font-family: var(--f-head);
  font-weight: 700;
  font-size: 24px;
  color: var(--accent);
  line-height: 1;
}

.cf-shop-stat-lbl {
  font-family: var(--f-head);
  font-size: 11px;
  color: var(--muted);
  letter-spacing: .08em;
  text-transform: uppercase;
  margin-top: 5px;
}

/* ----------------------------------------------------------------
   BODY LAYOUT: sidebar + main
---------------------------------------------------------------- */
.cf-shop-layout {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 30px var(--pad) 60px;
  display: grid;
  grid-template-columns: 248px 1fr;
  gap: 34px;
  align-items: start;
}

/* ----------------------------------------------------------------
   SIDEBAR
---------------------------------------------------------------- */
.cf-shop-sidebar {
  position: sticky;
  top: 96px; /* debajo del header sticky */
}

.cf-shop-filter {
  background: var(--surface);
  border: 1px solid var(--line-2);
  border-radius: var(--r-16);
  padding: 22px 20px;
  margin-bottom: 18px;
}

.cf-shop-filter-title {
  font-family: var(--f-head);
  font-weight: 600;
  font-size: 12px;
  letter-spacing: .14em;
  color: var(--accent);
  text-transform: uppercase;
  margin: 0 0 16px;
}

/* Temática: lista de checkboxes como links */
.cf-shop-cat-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.cf-shop-cat-item {
  margin-bottom: 12px;
}

.cf-shop-cat-item:last-child {
  margin-bottom: 0;
}

.cf-shop-cat-link {
  display: flex;
  align-items: center;
  gap: 11px;
  text-decoration: none;
  cursor: pointer;
  color: inherit;
}

/* Checkbox visual */
.cf-shop-cat-check {
  width: 17px;
  height: 17px;
  border-radius: 5px;
  border: 1.5px solid var(--line-4);
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
  transition: border-color .15s, background .15s;
  font-size: 11px;
  font-weight: 700;
  color: var(--accent-ink);
}

.cf-shop-cat-link.is-active .cf-shop-cat-check,
.cf-shop-cat-link[aria-current="page"] .cf-shop-cat-check {
  border-color: var(--accent);
  background: var(--accent);
}

.cf-shop-cat-link.is-active .cf-shop-cat-check::after,
.cf-shop-cat-link[aria-current="page"] .cf-shop-cat-check::after {
  content: "✓";
}

.cf-shop-cat-name {
  font-size: 14px;
  color: var(--text-2);
  flex: 1;
  transition: color .15s;
}

.cf-shop-cat-link:hover .cf-shop-cat-name {
  color: var(--text);
}

.cf-shop-cat-link.is-active .cf-shop-cat-name,
.cf-shop-cat-link[aria-current="page"] .cf-shop-cat-name {
  color: var(--text);
}

.cf-shop-cat-count {
  font-size: 12px;
  color: var(--muted);
}

/* Talla: chips */
.cf-shop-size-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.cf-shop-size-chip {
  font-family: var(--f-head);
  font-size: 13px;
  color: var(--text-2);
  background: transparent;
  border: 1px solid var(--line-3);
  border-radius: var(--r-8);
  padding: 7px 12px;
  cursor: pointer;
  text-decoration: none;
  transition: border-color .15s, color .15s;
  display: inline-block;
}

.cf-shop-size-chip:hover,
.cf-shop-size-chip.is-active {
  border-color: var(--neon-3);
  color: var(--accent);
}

/* Precio: slider estático estilado */
.cf-shop-price-track {
  height: 4px;
  background: var(--line-3);
  border-radius: var(--pill);
  position: relative;
  margin: 0 4px 14px;
}

.cf-shop-price-range {
  position: absolute;
  left: 8%;
  right: 32%;
  top: 0;
  bottom: 0;
  background: var(--accent);
  border-radius: var(--pill);
}

.cf-shop-price-thumb {
  position: absolute;
  top: 50%;
  width: 14px;
  height: 14px;
  background: var(--accent);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--accent);
  cursor: pointer;
}

.cf-shop-price-thumb--min {
  left: 8%;
  transform: translate(-50%, -50%);
}

.cf-shop-price-thumb--max {
  right: 32%;
  transform: translate(50%, -50%);
}

.cf-shop-price-labels {
  display: flex;
  justify-content: space-between;
  font-family: var(--f-head);
  font-size: 13px;
  color: var(--text-2);
}

/* WooCommerce price filter widget — estilar si se activa */
.cf-shop-filter .price_slider_wrapper .price_slider {
  height: 4px;
  background: var(--line-3);
  border-radius: var(--pill);
  margin: 10px 6px 14px;
}

.cf-shop-filter .price_slider_wrapper .ui-slider-range {
  background: var(--accent);
  border-radius: var(--pill);
}

.cf-shop-filter .price_slider_wrapper .ui-slider-handle {
  width: 14px;
  height: 14px;
  background: var(--accent);
  border: none;
  border-radius: 50%;
  box-shadow: 0 0 10px var(--accent);
  top: -.45em;
  cursor: pointer;
}

.cf-shop-filter .price_slider_amount {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 10px;
}

.cf-shop-filter .price_slider_amount .button {
  font-family: var(--f-head);
  font-size: 12px;
  font-weight: 600;
  background: var(--accent);
  color: var(--accent-ink);
  border: none;
  border-radius: var(--r-8);
  padding: 7px 13px;
  cursor: pointer;
  transition: opacity .15s;
}

.cf-shop-filter .price_slider_amount .button:hover {
  opacity: .85;
}

.cf-shop-filter .price_slider_amount .price_label {
  font-family: var(--f-head);
  font-size: 13px;
  color: var(--text-2);
}

/* ----------------------------------------------------------------
   TOOLBAR
---------------------------------------------------------------- */
.cf-shop-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
  flex-wrap: wrap;
}

.cf-shop-toolbar-left {
  display: flex;
  align-items: center;
  gap: 9px;
  flex-wrap: wrap;
}

.cf-shop-toolbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Etiqueta "Filtros:" */
.cf-shop-filter-label {
  font-family: var(--f-head);
  font-size: 12.5px;
  color: var(--muted);
}

/* Chip de filtro activo */
.cf-shop-active-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: var(--f-head);
  font-size: 12.5px;
  background: #43f5b012;
  border: 1px solid var(--neon-2);
  color: var(--accent);
  border-radius: var(--r-8);
  padding: 6px 11px;
  text-decoration: none;
  transition: background .15s, border-color .15s;
}

.cf-shop-active-chip:hover {
  background: #43f5b01f;
}

/* woocommerce_result_count */
.cf-shop .woocommerce-result-count {
  font-family: var(--f-head);
  font-size: 12.5px;
  color: var(--muted);
  margin: 0;
}

/* woocommerce_catalog_ordering — contenedor */
.cf-shop .woocommerce-ordering {
  margin: 0;
}

.cf-shop .woocommerce-ordering select,
.cf-shop-ordering-wrap select {
  appearance: none;
  -webkit-appearance: none;
  background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%237c83a0'/%3E%3C/svg%3E") no-repeat right 12px center;
  background-size: 10px 6px;
  border: 1px solid var(--line-3);
  border-radius: var(--r-9);
  padding: 9px 32px 9px 14px;
  font-family: var(--f-head);
  font-size: 13px;
  color: var(--text);
  cursor: pointer;
  transition: border-color .15s;
  min-width: 150px;
}

.cf-shop .woocommerce-ordering select:focus,
.cf-shop-ordering-wrap select:focus {
  outline: none;
  border-color: var(--neon-3);
  box-shadow: 0 0 0 3px #43f5b01f;
}

.cf-shop-ordering-label {
  font-size: 13px;
  color: var(--muted);
  white-space: nowrap;
}

/* ----------------------------------------------------------------
   GRILLA DE PRODUCTOS — override de 4-col global a 3-col en tienda
---------------------------------------------------------------- */
.cf-shop ul.products {
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

@media (max-width: 1024px) {
  .cf-shop ul.products {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 560px) {
  .cf-shop ul.products {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }
}

/* Vista rápida al hover (aparece sobre la imagen) */
.cf-quick {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 12px;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity .25s, transform .25s;
  text-align: center;
  font-family: var(--f-head);
  font-weight: 600;
  font-size: 12.5px;
  color: var(--accent-ink);
  background: var(--accent);
  border-radius: var(--r-9);
  padding: 9px;
  pointer-events: none;
}

.cf-prod:hover .cf-quick {
  opacity: 1;
  transform: translateY(0);
}

/* ----------------------------------------------------------------
   PAGINACIÓN
---------------------------------------------------------------- */
.cf-shop .woocommerce-pagination {
  margin-top: 42px;
}

.cf-shop .woocommerce-pagination ul {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.cf-shop .woocommerce-pagination ul::before,
.cf-shop .woocommerce-pagination ul::after {
  display: none !important;
}

.cf-shop .woocommerce-pagination ul li {
  margin: 0;
  padding: 0;
  float: none;
}

.cf-shop .woocommerce-pagination ul li a,
.cf-shop .woocommerce-pagination ul li span {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: var(--r-9);
  font-family: var(--f-head);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: border-color .15s, background .15s, color .15s;
}

/* Página inactiva */
.cf-shop .woocommerce-pagination ul li a {
  border: 1px solid var(--line-3);
  color: var(--text-2);
  background: transparent;
}

.cf-shop .woocommerce-pagination ul li a:hover {
  border-color: var(--neon-3);
  color: var(--accent);
}

/* Página activa */
.cf-shop .woocommerce-pagination ul li span.current {
  background: var(--accent);
  color: var(--accent-ink);
  border: 1px solid var(--accent);
  font-weight: 700;
}

/* Puntos suspensivos */
.cf-shop .woocommerce-pagination ul li span.dots {
  width: auto;
  padding: 0 6px;
  color: var(--muted);
  background: transparent;
  border: none;
}

/* ----------------------------------------------------------------
   MENSAJES / ESTADOS VACÍOS
---------------------------------------------------------------- */
.cf-shop .woocommerce-no-products-found {
  text-align: center;
  padding: 60px 20px;
  color: var(--muted);
}

.cf-shop .woocommerce-no-products-found h2 {
  font-family: var(--f-head);
  font-size: 22px;
  margin-bottom: 10px;
  color: var(--text-2);
}

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

  .cf-shop-sidebar {
    position: static;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
  }

  .cf-shop-filter {
    margin-bottom: 0;
  }
}

@media (max-width: 600px) {
  .cf-shop-sidebar {
    grid-template-columns: 1fr;
  }

  .cf-shop-hero-body {
    flex-direction: column;
    align-items: flex-start;
  }

  .cf-shop-stats {
    align-self: stretch;
    justify-content: flex-start;
  }

  .cf-shop-toolbar {
    flex-direction: column;
    align-items: flex-start;
  }
}
