/*!
 * Rovnek Shop — archive-product.php styles
 * Cubre: tienda, categorías WooCommerce
 */

/* ── DIVI NEUTRALIZACIÓN ─────────────────────────────────────────────────────── */
/* Divi 5 inyecta padding-top en múltiples wrappers; los anulamos todos */
body.woocommerce #page-container,
body.woocommerce #main-content,
body.woocommerce #et-main-area,
body.woocommerce-page #page-container,
body.woocommerce-page #main-content,
body.woocommerce-page #et-main-area {
  padding: 0 !important;
  margin-top: 0 !important;
  max-width: 100% !important;
}
body.woocommerce .container,
body.woocommerce-page .container { max-width: 100%; padding: 0; }

/* ── MAIN ────────────────────────────────────────────────────────────────────── */
/* body.rovnek-custom-header ya aplica padding-top = --rvk-hdr-h; no duplicar */
.rvk-arch-main {
  min-height: 60vh;
}

/* ── HERO ────────────────────────────────────────────────────────────────────── */
.rvk-arch-hero {
  position: relative;
  display: flex;
  align-items: flex-end;
  min-height: 320px;
  overflow: hidden;
  background: #111110;
}

.rvk-arch-hero.has-image { min-height: 440px; }

/* Vídeo YouTube de fondo del hero */
.rvk-arch-hero-video {
  position: absolute;
  inset: 0;
  overflow: hidden;
  filter: brightness(0.45) saturate(0.85);
}

/* Iframe de YouTube — centrado y a pantalla completa dentro del hero */
.rvk-arch-hero-video iframe {
  position: absolute !important;
  top: 50% !important;
  left: 50% !important;
  width: 177.78vh !important;
  height: 100% !important;
  min-width: 100% !important;
  min-height: 56.25vw !important;
  transform: translate(-50%, -50%) !important;
  pointer-events: none !important;
  border: 0 !important;
}

/* Imagen de fondo del hero */
.rvk-arch-hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center 30%;
  filter: brightness(0.45) saturate(0.85);
}

/* Gradiente overlay */
.rvk-arch-hero.has-image::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to right,
    rgba(0,0,0,0.65) 0%,
    rgba(0,0,0,0.3) 55%,
    rgba(0,0,0,0.1) 100%
  );
  z-index: 1;
}

.rvk-arch-hero-inner {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: var(--rvk-max, 1400px);
  margin: 0 auto;
  padding: 56px 40px 52px;
}

.rvk-arch-hero-content { max-width: 600px; }

/* Breadcrumb en hero */
.rvk-arch-bc {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 20px;
  font-family: var(--rvk-font-b);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.rvk-arch-bc a,
.rvk-arch-bc span { color: rgba(255,255,255,0.55); text-decoration: none; }
.rvk-arch-bc a:hover { color: rgba(255,255,255,0.85); }
.rvk-arch-bc .breadcrumb_last { color: rgba(255,255,255,0.85); }
/* Separador Yoast */
.rvk-arch-bc .breadcrumb-separator { color: rgba(255,255,255,0.3); }

/* El hero siempre tiene fondo oscuro (#111110); el texto siempre es claro */

/* Título H1 */
.rvk-arch-title {
  font-family: var(--rvk-font-d);
  font-size: clamp(2.2rem, 5vw, 4rem);
  font-weight: 300;
  line-height: 1.05;
  letter-spacing: -0.01em;
  color: #fff;
  margin-bottom: 12px;
}

.rvk-arch-desc {
  font-family: var(--rvk-font-b);
  font-size: 0.9rem;
  line-height: 1.6;
  color: rgba(255,255,255,0.7);
  max-width: 480px;
  margin-bottom: 10px;
}

.rvk-arch-count {
  font-family: var(--rvk-font-b);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.45);
  margin-top: 8px;
}

/* ── STRIP CATEGORÍAS ────────────────────────────────────────────────────────── */
.rvk-arch-cats {
  border-bottom: 1px solid var(--rvk-border);
  background: #fff;
}

.rvk-arch-cats-inner {
  max-width: var(--rvk-max, 1400px);
  margin: 0 auto;
  padding: 0 40px;
  position: relative;
}

/* Fade derecho para indicar scroll */
.rvk-arch-cats-inner::after {
  content: '';
  position: absolute;
  top: 0; right: 40px; bottom: 0;
  width: 60px;
  background: linear-gradient(to right, transparent, #fff);
  pointer-events: none;
  z-index: 2;
}

.rvk-arch-cats-track {
  display: flex;
  gap: 0;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding: 24px 0;
}
.rvk-arch-cats-track::-webkit-scrollbar { display: none; }

.rvk-arch-cat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  min-width: 120px;
  padding: 0 20px;
  text-decoration: none;
  flex-shrink: 0;
  scroll-snap-align: start;
  transition: opacity 0.2s;
}
@media (hover: hover) {
  .rvk-arch-cat-item:hover { opacity: 0.7; }
}

.rvk-arch-cat-img {
  display: block;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  overflow: hidden;
  border: 1px solid var(--rvk-border);
  transition: border-color 0.2s;
  flex-shrink: 0;
}
.rvk-arch-cat-item.is-current .rvk-arch-cat-img {
  border-color: var(--rvk-text);
  border-width: 2px;
}
.rvk-arch-cat-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.rvk-arch-cat-name {
  font-family: var(--rvk-font-b);
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--rvk-text);
  text-align: center;
  line-height: 1.3;
  max-width: 90px;
}
.rvk-arch-cat-item.is-current .rvk-arch-cat-name { font-weight: 500; }

/* ── TOOLBAR ─────────────────────────────────────────────────────────────────── */
.rvk-arch-toolbar {
  border-bottom: 1px solid var(--rvk-border);
  background: #fff;
  position: sticky;
  top: var(--rvk-hdr-h, 72px);
  z-index: 40;
}

.rvk-arch-toolbar-inner {
  max-width: var(--rvk-max, 1400px);
  margin: 0 auto;
  padding: 0 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 52px;
  gap: 20px;
}

/* WooCommerce result count */
.rvk-arch-toolbar .woocommerce-result-count {
  font-family: var(--rvk-font-b);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  color: var(--rvk-muted);
  margin: 0;
  white-space: nowrap;
}

/* WooCommerce catalog ordering */
.rvk-arch-toolbar .woocommerce-ordering { margin: 0; }
.rvk-arch-toolbar .woocommerce-ordering select {
  font-family: var(--rvk-font-b);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  color: var(--rvk-text);
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--rvk-border);
  padding: 4px 20px 4px 0;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%237A7570' stroke-width='1.2' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 4px center;
  cursor: pointer;
}
.rvk-arch-toolbar .woocommerce-ordering select:focus {
  outline: none;
  border-color: var(--rvk-text);
}

/* ── DROPDOWN CUSTOM ORDERING ────────────────────────────────────────────────── */
/* JS crea el dropdown; el select nativo queda oculto como mecanismo de submit */
.rvk-order-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.rvk-order-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: none;
  border: none;
  padding: 4px 0;
  font-family: var(--rvk-font-b);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  color: var(--rvk-text);
  cursor: pointer;
  line-height: 1;
  white-space: nowrap;
  transition: opacity 0.15s;
  -webkit-tap-highlight-color: transparent;
}
.rvk-order-btn:focus-visible {
  outline: 2px solid var(--rvk-text);
  outline-offset: 3px;
}
@media (hover: hover) {
  .rvk-order-btn:hover { opacity: 0.6; }
}

.rvk-order-chevron {
  flex-shrink: 0;
  color: var(--rvk-muted, #7A7570);
  transition: transform 0.2s ease-out;
}
.rvk-order-wrap[aria-expanded="true"] .rvk-order-chevron {
  transform: rotate(180deg);
}

.rvk-order-panel {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  min-width: 224px;
  background: #fff;
  border: 1px solid var(--rvk-border);
  box-shadow: 0 8px 28px rgba(26,25,23,0.08), 0 1px 4px rgba(26,25,23,0.04);
  padding: 6px 0;
  list-style: none;
  margin: 0;
  z-index: 200;
  animation: rvkDropIn 0.16s ease-out;
}
@keyframes rvkDropIn {
  from { opacity: 0; transform: translateY(-5px); }
  to   { opacity: 1; transform: translateY(0); }
}

.rvk-order-option {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  font-family: var(--rvk-font-b);
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  color: var(--rvk-text);
  cursor: pointer;
  line-height: 1.3;
  list-style: none;
  user-select: none;
  transition: background 0.1s;
}
.rvk-order-option::before {
  content: '';
  display: block;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  flex-shrink: 0;
  background: transparent;
  transition: background 0.15s;
}
.rvk-order-option.is-selected { font-weight: 500; }
.rvk-order-option.is-selected::before { background: var(--rvk-text); }
.rvk-order-option.is-focused,
.rvk-order-option:hover { background: #F7F5F2; }

/* ── CONTENT ─────────────────────────────────────────────────────────────────── */
.rvk-arch-content {
  max-width: var(--rvk-max, 1400px);
  margin: 0 auto;
  padding: 48px 40px 80px;
}

/* ── GRID DE PRODUCTOS ───────────────────────────────────────────────────────── */
#rvkProductGrid ul.products {
  display: grid !important;
  grid-template-columns: repeat(3, 1fr) !important;
  gap: 32px 24px !important;
  margin: 0 !important;
  padding: 0 !important;
  list-style: none !important;
  float: none !important;
  clear: both !important;
}

/* Imagen cuadrada 1:1 */
#rvkProductGrid .woocommerce-LoopProduct-link img,
#rvkProductGrid .attachment-woocommerce_thumbnail {
  aspect-ratio: 1 / 1;
  object-fit: cover;
  width: 100%;
  display: block;
}

/* ── TARJETAS DE PRODUCTO (FASE 5) ──────────────────────────────────────────── */

/* Contenedor tarjeta */
#rvkProductGrid .rvk-card {
  margin: 0 !important;
  float: none !important;
  width: auto !important;
  display: flex;
  flex-direction: column;
}

/* Bloque imagen — posición relativa para el overlay y badges */
.rvk-card-img {
  position: relative;
  overflow: hidden;
  margin-bottom: 14px;
  background: #F7F5F2; /* placeholder mientras carga la imagen */
}

/* Link imagen — contenedor cuadrado 1:1 */
.rvk-card-img-link {
  display: block;
  overflow: hidden;
  position: relative;
  aspect-ratio: 1 / 1;
}

/* Imagen principal */
.rvk-card-img-primary {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.65s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
@media (hover: hover) {
  .rvk-card:hover .rvk-card-img-primary { transform: scale(1.04); }
}

/* Segunda imagen — crossfade en hover desktop, invisible en touch */
.rvk-card-img-secondary {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.55s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
@media (hover: hover) {
  .rvk-card:hover .rvk-card-img-secondary { opacity: 1; }
}

/* ── Badge OFERTA — sobrescribe el bubble rojo de WC ─────────────────────── */
#rvkProductGrid .onsale {
  position: absolute !important;
  top: 12px !important;
  right: 12px !important;
  left: auto !important;
  bottom: auto !important;
  width: auto !important;
  height: auto !important;
  min-height: auto !important;
  min-width: auto !important;
  background: var(--rvk-text) !important;
  color: #fff !important;
  border-radius: 0 !important;
  font-family: var(--rvk-font-b) !important;
  font-size: 0.58rem !important;
  letter-spacing: 0.16em !important;
  font-weight: 500 !important;
  text-transform: uppercase !important;
  padding: 4px 9px !important;
  line-height: 1.5 !important;
  z-index: 5;
  margin: 0 !important;
}

/* ── Badge SIN STOCK ─────────────────────────────────────────────────────── */
.rvk-card-oos {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 5;
  background: rgba(26,25,23,0.68);
  color: rgba(255,255,255,0.82);
  font-family: var(--rvk-font-b);
  font-size: 0.6rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-align: center;
  padding: 11px 12px;
}

/* ── Overlay CTA (hover desktop) ─────────────────────────────────────────── */
.rvk-card-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  padding: 0 0 22px 20px;
  text-decoration: none;
  background: linear-gradient(
    to top,
    rgba(26,25,23,0.52) 0%,
    rgba(26,25,23,0.06) 50%,
    transparent 75%
  );
  opacity: 0;
  transition: opacity 0.28s ease;
}
@media (hover: hover) {
  .rvk-card:hover .rvk-card-overlay { opacity: 1; }
}

.rvk-card-overlay-text {
  font-family: var(--rvk-font-b);
  font-size: 0.65rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.92);
  border-bottom: 1px solid rgba(255,255,255,0.45);
  padding-bottom: 2px;
  transform: translateY(5px);
  transition: transform 0.28s ease;
}
@media (hover: hover) {
  .rvk-card:hover .rvk-card-overlay-text { transform: translateY(0); }
}

/* ── Bloque info (debajo de la imagen) ───────────────────────────────────── */
.rvk-card-info {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

/* Etiqueta de categoría — solo visible en la página Tienda (catálogo mixto) */
.rvk-card-cat {
  font-family: var(--rvk-font-b);
  font-size: 0.6rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--rvk-muted, #7A7570);
  line-height: 1;
}

/* Título */
#rvkProductGrid .woocommerce-loop-product__title {
  font-family: var(--rvk-font-b) !important;
  font-size: 0.85rem !important;
  font-weight: 400 !important;
  color: var(--rvk-text) !important;
  letter-spacing: 0.01em;
  line-height: 1.35;
  margin: 0 !important;
  padding: 0 !important;
}
#rvkProductGrid .woocommerce-loop-product__title a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s;
}
@media (hover: hover) {
  #rvkProductGrid .woocommerce-loop-product__title a:hover {
    color: var(--rvk-muted, #7A7570);
  }
}

/* Precio */
#rvkProductGrid .price {
  font-family: var(--rvk-font-b) !important;
  font-size: 0.78rem !important;
  color: var(--rvk-text) !important;
  margin: 0 !important;
}
#rvkProductGrid .price ins { text-decoration: none; color: var(--rvk-text) !important; }
#rvkProductGrid .price del { color: var(--rvk-border) !important; font-size: 0.7rem !important; }

/* Valoraciones en loop — ocultas (marca premium, no marketplace) */
#rvkProductGrid .star-rating { display: none !important; }

/* Botón añadir al carrito — oculto (la compra se inicia en la ficha de producto) */
#rvkProductGrid .button.add_to_cart_button { display: none !important; }

/* ── CTA TÁCTIL ──────────────────────────────────────────────────────────────── */
/* Visible solo en dispositivos sin hover (touch). En desktop el overlay lo cubre */
.rvk-card-cta {
  display: none;
  font-family: var(--rvk-font-b);
  font-size: 0.62rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--rvk-muted);
  text-decoration: none;
  margin-top: 6px;
  align-items: center;
  gap: 5px;
  transition: color 0.2s;
}
.rvk-card-cta::after { content: ' →'; }
@media (hover: none) {
  .rvk-card-cta { display: inline-flex; }
}

/* ── LOAD MORE ───────────────────────────────────────────────────────────────── */
.rvk-loadmore {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  padding-top: 56px;
  border-top: 1px solid var(--rvk-border);
  margin-top: 56px;
}

.rvk-loadmore-counter {
  font-family: var(--rvk-font-b);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  color: var(--rvk-muted);
}
.rvk-loadmore-counter strong { color: var(--rvk-text); font-weight: 500; }

/* Barra de progreso */
.rvk-loadmore-counter::after {
  content: '';
  display: block;
  margin: 10px auto 0;
  width: 120px;
  height: 1px;
  background: var(--rvk-border);
  position: relative;
}

.rvk-loadmore-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 40px;
  background: transparent;
  border: 1px solid var(--rvk-text);
  font-family: var(--rvk-font-b);
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--rvk-text);
  cursor: pointer;
  transition: background 0.25s, color 0.25s;
}
@media (hover: hover) {
  .rvk-loadmore-btn:hover {
    background: var(--rvk-text);
    color: #fff;
  }
}
.rvk-loadmore-btn:disabled {
  opacity: 0.4;
  cursor: default;
}

/* Spinner animación */
.rvk-loadmore-spin {
  animation: rvkSpin 0.8s linear infinite;
}
@keyframes rvkSpin {
  to { transform: rotate(360deg); }
}

/* ── RESPONSIVE ──────────────────────────────────────────────────────────────── */
@media (max-width: 1024px) {
  #rvkProductGrid ul.products {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 24px 16px !important;
  }
}

@media (max-width: 767px) {
  .rvk-arch-hero { min-height: 240px; }
  .rvk-arch-hero.has-image { min-height: 300px; }

  .rvk-arch-hero-inner { padding: 40px 20px 36px; }

  .rvk-arch-title { font-size: clamp(1.8rem, 8vw, 2.8rem); }

  .rvk-arch-cats-inner { padding: 0 20px; }
  .rvk-arch-cats-inner::after { right: 20px; }

  .rvk-arch-cat-item { min-width: 88px; padding: 0 12px; }
  .rvk-arch-cat-img  { width: 56px; height: 56px; }

  .rvk-arch-toolbar-inner { padding: 0 20px; height: 48px; }

  .rvk-arch-content { padding: 32px 20px 60px; }

  #rvkProductGrid ul.products {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 20px 12px !important;
  }

  .rvk-loadmore-btn { width: 100%; justify-content: center; }
}

@media (max-width: 375px) {
  .rvk-arch-cat-item { min-width: 76px; padding: 0 8px; }
}

/* ── NOTIFICACIONES WOOCOMMERCE ──────────────────────────────────────────────── */
/* Anulan el estilo por defecto de WC en el contexto de la tienda Rovnek */
.rvk-arch-content .woocommerce-message,
.rvk-arch-content .woocommerce-error {
  font-family: var(--rvk-font-b);
  font-size: 0.82rem;
  letter-spacing: 0.01em;
  line-height: 1.6;
  list-style: none;
  padding: 14px 18px;
  margin: 0 0 28px;
  border: none;
  border-left: 2px solid var(--rvk-text);
  border-radius: 0;
  box-shadow: none;
  background: #F7F5F2;
  color: var(--rvk-text);
}
.rvk-arch-content .woocommerce-error {
  border-left-color: #B85C38;
  color: #6B2D16;
  background: #FBF4F1;
}
.rvk-arch-content .woocommerce-message a,
.rvk-arch-content .woocommerce-error a {
  color: inherit;
  font-weight: 500;
  text-decoration: underline;
}
.rvk-arch-content .woocommerce-message li,
.rvk-arch-content .woocommerce-error li {
  list-style: none;
  margin: 0;
  padding: 0;
}

/* ── SIN PRODUCTOS ───────────────────────────────────────────────────────────── */
.rvk-arch-content .woocommerce-info {
  font-family: var(--rvk-font-b);
  font-size: 0.9rem;
  color: var(--rvk-muted);
  border-top: 1px solid var(--rvk-border);
  padding: 48px 0;
  background: none;
  text-align: center;
}

/* ── REDUCED MOTION ──────────────────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .rvk-arch-hero-bg,
  .rvk-card-img-primary,
  .rvk-card-img-secondary,
  .rvk-card-overlay,
  .rvk-card-overlay-text { transition: none !important; }
  .rvk-loadmore-spin { animation: none; }
}

/* ═══════════════════════════════════════════════════════════════════════════════
   FASE 4 — FILTROS WooCommerce
   ═══════════════════════════════════════════════════════════════════════════════ */

/* ── TOOLBAR — reorganización con botón filtrar ──────────────────────────────── */
.rvk-toolbar-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

/* ── BOTÓN FILTRAR ───────────────────────────────────────────────────────────── */
.rvk-filter-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: none;
  border: 1px solid var(--rvk-border);
  padding: 7px 14px;
  font-family: var(--rvk-font-b);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--rvk-text);
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s, color 0.2s;
  white-space: nowrap;
  -webkit-tap-highlight-color: transparent;
  line-height: 1;
}
@media (hover: hover) {
  .rvk-filter-btn:hover { border-color: var(--rvk-text); }
}
.rvk-filter-btn:focus-visible {
  outline: 2px solid var(--rvk-text);
  outline-offset: 3px;
}
.rvk-filter-btn[data-active] {
  background: var(--rvk-text);
  color: #fff;
  border-color: var(--rvk-text);
}

.rvk-filter-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  background: rgba(255,255,255,0.2);
  border-radius: 9px;
  font-size: 0.6rem;
  font-weight: 600;
  line-height: 1;
}
.rvk-filter-btn:not([data-active]) .rvk-filter-count {
  background: var(--rvk-text);
  color: #fff;
}

/* ── FILTROS ACTIVOS — STRIP ─────────────────────────────────────────────────── */
.rvk-active-filters {
  border-bottom: 1px solid var(--rvk-border);
  background: #F7F5F2;
}
.rvk-active-filters-inner {
  max-width: var(--rvk-max, 1400px);
  margin: 0 auto;
  padding: 10px 40px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}
.rvk-af-label {
  font-family: var(--rvk-font-b);
  font-size: 0.62rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--rvk-muted);
  white-space: nowrap;
  margin-right: 4px;
}
.rvk-af-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 8px 5px 12px;
  border: 1px solid var(--rvk-border);
  background: #fff;
  font-family: var(--rvk-font-b);
  font-size: 0.7rem;
  color: var(--rvk-text);
  line-height: 1.3;
}
.rvk-af-chip-label { line-height: 1; }
.rvk-af-remove {
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  cursor: pointer;
  padding: 2px;
  color: var(--rvk-muted);
  line-height: 1;
  transition: color 0.15s;
  -webkit-tap-highlight-color: transparent;
}
@media (hover: hover) {
  .rvk-af-remove:hover { color: var(--rvk-text); }
}
.rvk-af-clear {
  font-family: var(--rvk-font-b);
  font-size: 0.65rem;
  letter-spacing: 0.06em;
  color: var(--rvk-muted);
  text-decoration: underline;
  text-underline-offset: 2px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 5px 4px;
  margin-left: 4px;
  transition: color 0.15s;
}
@media (hover: hover) {
  .rvk-af-clear:hover { color: var(--rvk-text); }
}

/* ── OVERLAY ─────────────────────────────────────────────────────────────────── */
.rvk-filter-overlay {
  position: fixed;
  inset: 0;
  background: rgba(26,25,23,0.4);
  z-index: 300;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.28s ease;
}
.rvk-filter-overlay.is-open {
  opacity: 1;
  pointer-events: all;
  z-index: 10000; /* por encima del header (9999) al abrir */
}

/* ── DRAWER ──────────────────────────────────────────────────────────────────── */
.rvk-filter-drawer {
  position: fixed;
  left: 0;
  top: 0;
  bottom: 0;
  width: min(380px, 90vw);
  background: #fff;
  z-index: 301;
  display: flex;
  flex-direction: column;
  transform: translateX(-100%);
  transition: transform 0.32s cubic-bezier(0.32, 0, 0, 1);
  overflow: hidden;
  box-shadow: 4px 0 32px rgba(26,25,23,0.12);
}
.rvk-filter-drawer.is-open {
  transform: translateX(0);
  z-index: 10001; /* por encima del overlay y del header al abrir */
}

/* Header del drawer */
.rvk-fd-hdr {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 32px 24px 24px; /* margen superior generoso */
  border-bottom: 1px solid var(--rvk-border);
  flex-shrink: 0;
}
.rvk-fd-title {
  font-family: var(--rvk-font-d); /* Cormorant Garamond */
  font-size: 1.6rem;
  font-weight: 300;
  letter-spacing: 0.04em;
  color: var(--rvk-text);
  text-transform: none;
  line-height: 1;
}
.rvk-fd-close {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--rvk-muted);
  padding: 4px;
  display: flex;
  align-items: center;
  transition: color 0.15s;
  -webkit-tap-highlight-color: transparent;
}
.rvk-fd-close:focus-visible {
  outline: 2px solid var(--rvk-text);
  outline-offset: 3px;
}
@media (hover: hover) {
  .rvk-fd-close:hover { color: var(--rvk-text); }
}

/* Cuerpo scrollable */
.rvk-fd-body {
  flex: 1;
  overflow-y: auto;
  overscroll-behavior: contain;
}

/* Grupo de filtro (acordeón) */
.rvk-fg { border-top: 1px solid var(--rvk-border); }
.rvk-fg:first-child { border-top: none; }

.rvk-fg-hdr {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 16px 24px;
  background: none;
  border: none;
  font-family: var(--rvk-font-b);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--rvk-text);
  cursor: pointer;
  text-align: left;
  -webkit-tap-highlight-color: transparent;
}
.rvk-fg-hdr:focus-visible {
  outline: 2px solid var(--rvk-text);
  outline-offset: -2px;
}
.rvk-fg-chevron {
  flex-shrink: 0;
  color: var(--rvk-muted);
  transition: transform 0.22s ease;
}
.rvk-fg-hdr[aria-expanded="true"] .rvk-fg-chevron {
  transform: rotate(180deg);
}

.rvk-fg-opts {
  padding: 4px 24px 18px;
  display: flex;
  flex-direction: column;
}
.rvk-fg-opts[hidden] { display: none; }

/* Checkbox personalizado */
.rvk-fc {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 8px 0;
  cursor: pointer;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}
.rvk-fc-inp {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  pointer-events: none;
}
.rvk-fc-box {
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  border: 1.5px solid var(--rvk-border);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.15s, background 0.15s;
  position: relative;
}
.rvk-fc-inp:checked ~ .rvk-fc-box {
  background: var(--rvk-text);
  border-color: var(--rvk-text);
}
.rvk-fc-inp:checked ~ .rvk-fc-box::after {
  content: '';
  position: absolute;
  width: 8px;
  height: 4px;
  border-left: 1.5px solid #fff;
  border-bottom: 1.5px solid #fff;
  transform: rotate(-45deg) translate(1px, -1px);
}
.rvk-fc-inp:focus-visible ~ .rvk-fc-box {
  outline: 2px solid var(--rvk-text);
  outline-offset: 2px;
}
.rvk-fc-lbl {
  font-family: var(--rvk-font-b);
  font-size: 0.82rem;
  color: var(--rvk-text);
  line-height: 1.4;
}

/* Footer del drawer */
.rvk-fd-ftr {
  flex-shrink: 0;
  padding: 16px 24px;
  border-top: 1px solid var(--rvk-border);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.rvk-fd-apply {
  width: 100%;
  padding: 14px;
  background: var(--rvk-text);
  color: #fff;
  border: none;
  font-family: var(--rvk-font-b);
  font-size: 0.68rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  cursor: pointer;
  transition: opacity 0.2s;
  -webkit-tap-highlight-color: transparent;
}
.rvk-fd-apply:focus-visible {
  outline: 2px solid var(--rvk-text);
  outline-offset: 3px;
}
@media (hover: hover) {
  .rvk-fd-apply:hover { opacity: 0.82; }
}
.rvk-fd-reset {
  width: 100%;
  padding: 12px;
  background: none;
  border: 1px solid var(--rvk-border);
  font-family: var(--rvk-font-b);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--rvk-muted);
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s;
  -webkit-tap-highlight-color: transparent;
}
.rvk-fd-reset:focus-visible {
  outline: 2px solid var(--rvk-text);
  outline-offset: 3px;
}
@media (hover: hover) {
  .rvk-fd-reset:hover { border-color: var(--rvk-text); color: var(--rvk-text); }
}

/* ── RESPONSIVE FILTROS ──────────────────────────────────────────────────────── */
@media (max-width: 767px) {
  .rvk-active-filters-inner { padding: 8px 20px; }
  .rvk-filter-btn-text { display: none; }
  .rvk-filter-btn { padding: 8px 12px; }
}

/* ── REDUCED MOTION — filtros ────────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .rvk-filter-overlay,
  .rvk-filter-drawer,
  .rvk-fg-chevron { transition: none !important; }
}

/* ═══════════════════════════════════════════════════════════════════════════════
   YITH WCAN — INTEGRACIÓN EN DRAWER ROVNEK
   ═══════════════════════════════════════════════════════════════════════════════ */

/* ── Reset envoltorios YITH ─────────────────────────────────────────────────── */
.rvk-fd-yith .yith-wcan-filters {
  display: block !important;
  background: none !important;
  border: none !important;
  padding: 0 !important;
  margin: 0 !important;
  box-shadow: none !important;
  float: none !important;
  width: auto !important;
}

.rvk-fd-yith .yith-wcan-filter {
  display: block !important;
  padding: 0 !important;
  margin: 0 !important;
  background: none !important;
  border: none !important;
  box-shadow: none !important;
}

/* Ocultar botones de reset propios de YITH */
.rvk-fd-yith .filter-reset,
.rvk-fd-yith .yith-wcan-filter .filter-reset { display: none !important; }

/* ── Contenido del filtro ─────────────────────────────────────────────────── */
.rvk-fd-yith .filter-content { padding: 4px 24px 18px !important; }

/* ── Lista de términos ───────────────────────────────────────────────────── */
.rvk-fd-yith .terms.list-terms {
  list-style: none !important;
  margin: 0 !important;
  padding: 0 !important;
  display: flex !important;
  flex-direction: column !important;
}

.rvk-fd-yith .terms.list-terms .term {
  list-style: none !important;
  margin: 0 !important;
  padding: 0 !important;
  border: none !important;
  background: none !important;
  float: none !important;
  width: auto !important;
}

/* ── Label de cada término ─────────────────────────────────────────────────── */
.rvk-fd-yith .terms .term-label,
.rvk-fd-yith .terms .term > label {
  display: flex !important;
  align-items: center !important;
  gap: 11px !important;
  padding: 8px 0 !important;
  cursor: pointer !important;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  background: none !important;
  border: none !important;
  width: 100%;
  margin: 0 !important;
}

/* ── Checkbox estilo Rovnek ─────────────────────────────────────────────────── */
.rvk-fd-yith .term-filter,
.rvk-fd-yith .terms input[type="checkbox"] {
  -webkit-appearance: none !important;
  appearance: none !important;
  flex-shrink: 0;
  display: block !important;
  width: 16px !important;
  height: 16px !important;
  min-width: 16px;
  min-height: 16px;
  border: 1.5px solid var(--rvk-border) !important;
  background: transparent !important;
  cursor: pointer;
  position: relative;
  transition: border-color 0.15s, background 0.15s !important;
  border-radius: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  box-shadow: none !important;
  outline: none;
}

.rvk-fd-yith .term-filter:checked,
.rvk-fd-yith .terms input[type="checkbox"]:checked {
  background: var(--rvk-text) !important;
  border-color: var(--rvk-text) !important;
}

/* Checkmark */
.rvk-fd-yith .term-filter:checked::after,
.rvk-fd-yith .terms input[type="checkbox"]:checked::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 8px;
  height: 4px;
  border-left: 1.5px solid #fff;
  border-bottom: 1.5px solid #fff;
  transform: translate(-50%, -58%) rotate(-45deg);
}

.rvk-fd-yith .term-filter:focus-visible,
.rvk-fd-yith .terms input[type="checkbox"]:focus-visible {
  outline: 2px solid var(--rvk-text) !important;
  outline-offset: 2px;
}

/* ── Texto del término ────────────────────────────────────────────────────── */
.rvk-fd-yith .terms .term .label,
.rvk-fd-yith .terms .term > label > span:not(.term-filter) {
  font-family: var(--rvk-font-b) !important;
  font-size: 0.82rem !important;
  color: var(--rvk-text) !important;
  line-height: 1.4 !important;
  font-weight: 400 !important;
  background: none !important;
  padding: 0 !important;
  margin: 0 !important;
  display: inline !important;
}

/* ── Título inyectado por JS ─────────────────────────────────────────────── */
.rvk-yith-filter-title {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 18px 24px 14px;
  font-family: var(--rvk-font-b);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--rvk-text);
  font-weight: 500;
  margin: 0;
  border-top: 1px solid var(--rvk-border);
}

.rvk-yith-filter-title:first-child { border-top: none; }

/* Línea dorada a la izquierda del título */
.rvk-yith-filter-title::before {
  content: '';
  display: block;
  width: 18px;
  height: 1px;
  background: var(--rvk-gold);
  flex-shrink: 0;
}

/* Separador visual si hay filtros custom además de YITH */
.rvk-fd-yith + .rvk-fg { border-top: 1px solid var(--rvk-border); }

/* ── Reduced motion ─────────────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .rvk-fd-yith .term-filter,
  .rvk-fd-yith .terms input[type="checkbox"] { transition: none !important; }
}
