/* ═══════════════════════════════════════════════════════════════════════════
   Joyería 24 — Estilos de catálogo
   Archivo: css/catalogo.css
   Responsabilidad: Sub-nav, filtros, tarjetas, carrusel, modal, badges
   Se usa en: catalogo.html, nuevos.html, ofertas.html
   Requiere: global.css (cargado antes)
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── Sub-nav (Todo / Nuevos / Ofertas) ─────────────────────────────────── */
.sub-nav {
  display: flex;
  justify-content: center;
  gap: 0;
  background: #111;
  border-top: 1px solid #222;
  padding-top: 8px;
}
.sub-nav-link {
  color: #888;
  text-decoration: none;
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  padding: 10px 20px;
  transition:
    color 0.2s,
    border-bottom 0.2s;
  border-bottom: 2px solid transparent;
}
.sub-nav-link:hover {
  color: #ddd;
}
.sub-nav-link.activo {
  color: white;
  border-bottom-color: white;
}

/* ── Panel de filtros (drawer derecho) ─────────────────────────────────── */
.filtros-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 900;
  backdrop-filter: blur(2px);
}
.filtros-overlay.abierto {
  display: block;
}
.filtros-panel {
  position: fixed;
  top: 0;
  right: -100%;
  width: 85%;
  max-width: 400px;
  height: 100%;
  background: white;
  z-index: 901;
  transition: right 0.3s ease;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.filtros-panel.abierto {
  right: 0;
}
.filtros-panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  border-bottom: 1px solid #eee;
}
.filtros-panel-header h3 {
  font-size: 1.1rem;
  font-weight: 500;
  letter-spacing: 0.3px;
}
.filtros-panel-cerrar {
  background: none;
  border: none;
  font-size: 1.4rem;
  cursor: pointer;
  color: #333;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.filtros-panel-body {
  flex: 1;
  overflow-y: auto;
  padding: 0;
}

/* Acordeón */
.filtro-acordeon {
  border-bottom: 1px solid #eee;
}
.filtro-acordeon-titulo {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  padding: 18px 24px;
  background: none;
  border: none;
  cursor: pointer;
  font-family: "Montserrat", sans-serif;
  font-size: 0.92rem;
  font-weight: 500;
  color: #222;
  letter-spacing: 0.3px;
}
.filtro-acordeon-titulo .chevron {
  font-size: 0.8rem;
  transition: transform 0.3s;
  color: #999;
}
.filtro-acordeon-titulo.abierto .chevron {
  transform: rotate(180deg);
}
.filtro-acordeon-opciones {
  display: none;
  padding: 0 24px 16px;
}
.filtro-acordeon-opciones.abierto {
  display: block;
}
.filtro-opcion {
  display: flex;
  align-items: center;
  width: 100%;
  padding: 10px 0;
  background: none;
  border: none;
  cursor: pointer;
  font-family: "Montserrat", sans-serif;
  font-size: 0.85rem;
  color: #555;
  letter-spacing: 0.2px;
  transition: color 0.2s;
}
.filtro-opcion:hover {
  color: #111;
}
.filtro-opcion.activo {
  color: #111;
  font-weight: 600;
}
.filtro-opcion .check {
  width: 18px;
  height: 18px;
  border: 1.5px solid #ccc;
  border-radius: 50%;
  margin-right: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.2s;
}
.filtro-opcion.activo .check {
  background: black;
  border-color: black;
}
.filtro-opcion.activo .check::after {
  content: "✓";
  color: white;
  font-size: 0.65rem;
}

/* Badge de conteo en acordeón */
.filtro-badge {
  background: #222;
  color: white;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 50px;
  margin-left: 8px;
  min-width: 20px;
  text-align: center;
}
/* Botón limpiar filtro */
.filtro-limpiar {
  display: block;
  background: none;
  border: none;
  cursor: pointer;
  font-family: "Montserrat", sans-serif;
  font-size: 0.75rem;
  color: #999;
  text-decoration: underline;
  padding: 8px 0 4px;
  transition: color 0.2s;
}
.filtro-limpiar:hover {
  color: #333;
}

/* Botón mostrar resultados */
.filtros-panel-footer {
  padding: 16px 24px 24px;
  border-top: 1px solid #eee;
}
.btn-mostrar-resultados {
  width: 100%;
  padding: 14px;
  background: #222;
  color: white;
  border: none;
  border-radius: 8px;
  font-family: "Montserrat", sans-serif;
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.3s;
}
.btn-mostrar-resultados:hover {
  background: #000;
}

/* Botón abrir filtros (junto al select) */
.btn-filtros {
  background: none;
  border: 1px solid #ccc;
  padding: 6px 14px;
  border-radius: 6px;
  cursor: pointer;
  font-family: "Montserrat", sans-serif;
  font-size: 0.75rem;
  color: #333;
  letter-spacing: 0.3px;
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  transition: all 0.2s;
}
.btn-filtros:hover {
  border-color: #333;
  background: #f5f5f5;
}
.btn-filtros i {
  font-size: 0.85rem;
}

/* ── Catalog header + controles ────────────────────────────────────────── */
.header-catalog {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  padding: 20px 20px 8px;
  flex-wrap: wrap;
  gap: 10px;
}
.header-catalog hgroup h3 {
  font-weight: 200;
}
.header-catalog hgroup h2 {
  font-weight: 400;
}
.catalog-controles {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
}
.ordenar-select {
  font-family: "Montserrat", sans-serif;
  font-size: 0.75rem;
  padding: 8px 10px;
  border: 1px solid #ccc;
  border-radius: 6px;
  background: white;
  color: #333;
  cursor: pointer;
  outline: none;
  flex: 1;
}
.ordenar-select:focus {
  border-color: #999;
}
.contador {
  font-size: 0.8rem;
  color: #777;
  font-weight: 300;
  padding-bottom: 4px;
}

/* ── Loading ───────────────────────────────────────────────────────────── */
.loading {
  text-align: center;
  padding: 60px 20px;
  color: #999;
  font-weight: 300;
  font-size: 0.9rem;
  letter-spacing: 1px;
}
.loading::after {
  content: "";
  display: block;
  width: 32px;
  height: 32px;
  border: 2px solid #ddd;
  border-top-color: black;
  border-radius: 50%;
  margin: 16px auto 0;
  animation: spin 0.8s linear infinite;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ── Tarjetas (articles) ───────────────────────────────────────────────── */
.articles {
  padding: 0 20px;
}
article {
  margin: 2rem 0;
  width: 100%;
  padding-bottom: 2rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.15);
}
article img {
  width: 100%;
  aspect-ratio: 1/1;
  object-fit: cover;
  display: block;
}
.img-placeholder {
  width: 100%;
  aspect-ratio: 1/1;
  background: #f0f0f0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
}
article hgroup {
  padding: 15px 4px 0;
}
article h4 {
  font-weight: 200;
  font-size: 0.85rem;
  color: #777;
  letter-spacing: 1px;
  text-transform: uppercase;
  user-select: none;
}
article h2 {
  font-weight: 350;
  min-height: 5rem;
  display: flex;
  padding: 0.5rem 0 0 0;
  user-select: none;
}
article h3 {
  font-weight: 400;
  font-size: 1.4rem;
  padding: 0.5rem 0;
  user-select: none;
}

/* ── Tags (Nuevo / Oferta) ─────────────────────────────────────────────── */
.card-tags {
  position: absolute;
  top: 10px;
  left: 10px;
  display: flex;
  gap: 6px;
  z-index: 3;
}
.tag-nuevo {
  background: #111;
  color: white;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 4px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}
.tag-oferta {
  background: #e53935;
  color: white;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 4px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

/* ── Precio tachado ────────────────────────────────────────────────────── */
.precio-tachado {
  text-decoration: line-through;
  color: #aaa;
  font-weight: 400;
  font-size: 0.85em;
  margin-right: 6px;
}

/* ── Lupa sobre imagen ─────────────────────────────────────────────────── */
article .img-wrap {
  cursor: pointer;
  position: relative;
  overflow: hidden;
}
article .img-wrap .lupa {
  position: absolute;
  bottom: 10px;
  right: 10px;
  background: rgba(0, 0, 0, 0.55);
  color: white;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  opacity: 0;
  transition: opacity 0.2s;
  pointer-events: none;
}
article .img-wrap:hover .lupa {
  opacity: 1;
}

/* ── Carrusel tarjeta ──────────────────────────────────────────────────── */
.card-carousel {
  position: relative;
  overflow: hidden;
}
.card-carousel-track {
  display: flex;
  transition: transform 0.3s ease;
}
.card-carousel-track img {
  flex: 0 0 100%;
  width: 100%;
  aspect-ratio: 1/1;
  object-fit: cover;
  display: block;
}
.card-dots {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 6px;
  z-index: 2;
}
.card-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  border: none;
  padding: 0;
  cursor: pointer;
  transition: background 0.2s;
}
.card-dot.activo {
  background: white;
  box-shadow: 0 0 4px rgba(0, 0, 0, 0.4);
}
.card-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.4);
  color: white;
  border: none;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  font-size: 0.8rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  opacity: 0;
  transition: opacity 0.2s;
}
.card-carousel:hover .card-arrow {
  opacity: 1;
}
.card-arrow.izq {
  left: 8px;
}
.card-arrow.der {
  right: 8px;
}
.card-arrow:hover {
  background: rgba(0, 0, 0, 0.7);
}

/* ── Botón WhatsApp ────────────────────────────────────────────────────── */
.btn-wa {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: #1faf5a;
  color: white;
  font-family: "Montserrat", sans-serif;
  font-size: 0.9rem;
  padding: 10px;
  border-radius: 1rem;
  text-decoration: none;
  margin-top: 12px;
  letter-spacing: 0.3px;
  transition: background 0.4s ease;
}
.btn-wa:hover {
  background: #22d068;
}
.btn-wa svg {
  width: 17px;
  height: 17px;
  fill: white;
  flex-shrink: 0;
}

/* ── Badge stock ───────────────────────────────────────────────────────── */
.badge-stock {
  display: inline-block;
  font-size: 0.7rem;
  padding: 2px 10px;
  border-radius: 50px;
  margin-top: 6px;
  font-weight: 500;
  letter-spacing: 0.3px;
}
.stock-ok {
  background: #e6f9ee;
  color: #1a7a3a;
}
.stock-bajo {
  background: #fff8e1;
  color: #8a6000;
}
.stock-no {
  background: #fde8e8;
  color: #a00;
}

/* ── Sin resultados ────────────────────────────────────────────────────── */
.sin-resultados {
  text-align: center;
  padding: 60px 20px;
  color: #999;
  font-weight: 300;
}

/* ══════════════════════════════════════════════════════════════════════════
   MODAL
   ══════════════════════════════════════════════════════════════════════════ */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.88);
  z-index: 999;
  align-items: center;
  justify-content: center;
  padding: 16px;
  backdrop-filter: blur(6px);
}
.modal-overlay.abierto {
  display: flex;
  animation: fadeIn 0.2s ease;
}
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.modal {
  background: #463a3a;
  border-radius: 20px;
  width: 100%;
  max-width: 520px;
  max-height: 92vh;
  overflow-y: auto;
  position: relative;
  animation: slideUp 0.25s ease;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
}
@keyframes slideUp {
  from {
    transform: translateY(40px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.modal-cerrar {
  position: absolute;
  top: 12px;
  right: 12px;
  background: rgba(0, 0, 0, 0.45);
  border: none;
  color: white;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  transition: background 0.2s;
}
.modal-cerrar:hover {
  background: rgba(0, 0, 0, 0.7);
}

/* Modal carrusel */
.modal-carousel {
  width: 100%;
  position: relative;
  overflow: hidden;
  border-radius: 20px 20px 0 0;
  background: #d11616;
}
.modal-carousel-track {
  display: flex;
  transition: transform 0.3s ease;
}
.modal-carousel-track img {
  flex: 0 0 100%;
  width: 100%;
  aspect-ratio: 1/1;
  object-fit: cover;
  display: block;
}
.modal-carousel .placeholder-emoji {
  font-size: 6rem;
  width: 100%;
  aspect-ratio: 1/1;
  display: flex;
  align-items: center;
  justify-content: center;
}
.modal-dots {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 6px;
  z-index: 2;
}
.modal-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  border: 2px solid rgba(255, 255, 255, 0.8);
  padding: 0;
  cursor: pointer;
  transition: background 0.2s;
}
.modal-dot.activo {
  background: white;
}
.modal-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.45);
  color: white;
  border: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  transition: background 0.2s;
}
.modal-arrow:hover {
  background: rgba(0, 0, 0, 0.7);
}
.modal-arrow.izq {
  left: 10px;
}
.modal-arrow.der {
  right: 10px;
}

/* Modal tags */
.modal-tags {
  display: flex;
  gap: 6px;
  margin-bottom: 8px;
}

/* Modal body */
.modal-body {
  padding: 22px 24px 28px;
}
.modal-cat {
  font-size: 0.9rem;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: #999;

  margin-bottom: 6px;
}
.modal-nombre {
  font-size: 1.35rem;
  font-weight: 700;
  color: #111;
  line-height: 1.25;
  margin-bottom: 6px;
}
.modal-precio {
  font-size: 1.6rem;

  color: #111;
  margin-bottom: 10px;
}
.modal-badge {
  display: inline-block;
  font-size: 0.72rem;
  padding: 3px 12px;
  border-radius: 50px;
  margin-bottom: 14px;
  font-weight: 600;
}
.modal-sep {
  border: none;
  border-top: 1px solid #eee;
  margin: 14px 0;
}
.modal-desc-label,
.modal-detalles-label {
  font-size: 0.7rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: #ffffff;
  font-weight: 600;
  margin-bottom: 5px;
}
.modal-desc,
.modal-detalles {
  font-size: 0.88rem;
  color: #555;
  font-weight: 300;
  line-height: 1.6;
  margin-bottom: 12px;
}
.modal-detalles {
  line-height: 1.7;
  white-space: pre-line;
  margin-bottom: 20px;
}
.modal-btn-wa {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: #1faf5a;
  color: white;
  font-family: "Montserrat", sans-serif;
  font-size: 0.92rem;
  font-weight: 700;
  padding: 14px;
  border-radius: 10px;
  text-decoration: none;
  transition: background 0.4s ease;
  letter-spacing: 0.3px;
}
.modal-btn-wa:hover {
  background: #22d068;
}
.modal-btn-wa svg {
  width: 20px;
  height: 20px;
  fill: white;
  flex-shrink: 0;
}

/* ── Favoritos (corazón) ──────────────────────────────────────────────── */
.btn-fav {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(0, 0, 0, 0.45);
  border: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 4;
  transition: background 0.2s, transform 0.2s;
}
.btn-fav:hover {
  background: rgba(0, 0, 0, 0.65);
  transform: scale(1.1);
}
.btn-fav i {
  font-size: 1.1rem;
  color: white;
  transition: color 0.2s;
}
.btn-fav.activo i {
  color: #e53935;
}
.btn-fav.activo {
  background: rgba(255, 255, 255, 0.9);
}

/* Corazón en modal */
.modal-fav-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}
.modal-btn-fav {
  background: none;
  border: 1.5px solid #ccc;
  padding: 8px 16px;
  border-radius: 8px;
  cursor: pointer;
  font-family: "Montserrat", sans-serif;
  font-size: 0.82rem;
  color: #555;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s;
}
.modal-btn-fav:hover {
  border-color: #e53935;
  color: #e53935;
}
.modal-btn-fav.activo {
  background: #fde8e8;
  border-color: #e53935;
  color: #e53935;
}
.modal-btn-fav i {
  font-size: 1rem;
}

/* Contador favoritos en nav */
.fav-counter {
  position: relative;
}
.fav-counter .fav-num {
  position: absolute;
  top: -6px;
  right: -8px;
  background: #e53935;
  color: white;
  font-size: 0.55rem;
  font-weight: 700;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ══════════════════════════════════════════════════════════════════════════
   FAVORITOS — Página tipo checkout / pasarela de pago
   ══════════════════════════════════════════════════════════════════════════ */

/* Tarjeta compacta horizontal */
.fav-card {
  display: flex;
  gap: 14px;
  padding: 18px 0;
  border-bottom: 1px solid #eee;
  align-items: flex-start;
  position: relative;
  animation: favSlideIn 0.35s ease both;
}
@keyframes favSlideIn {
  from { opacity: 0; transform: translateX(-12px); }
  to   { opacity: 1; transform: translateX(0); }
}
.fav-card:last-child { border-bottom: none; }

.fav-card-img {
  width: 88px;
  height: 88px;
  border-radius: 14px;
  object-fit: cover;
  flex-shrink: 0;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}
.fav-card-img:hover {
  transform: scale(1.03);
  box-shadow: 0 4px 16px rgba(0,0,0,0.12);
}
.fav-card-img-placeholder {
  width: 88px;
  height: 88px;
  border-radius: 14px;
  background: linear-gradient(135deg, #f5f5f5, #e8e8e8);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  flex-shrink: 0;
}
.fav-card-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding-right: 28px;
}
.fav-card-cat {
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 1.8px;
  color: #aaa;
  font-weight: 500;
}
.fav-card-nombre {
  font-size: 0.88rem;
  font-weight: 600;
  color: #222;
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.fav-card-material {
  font-size: 0.7rem;
  color: #bbb;
  font-weight: 400;
}
.fav-card-precio {
  font-size: 1rem;
  font-weight: 700;
  color: #111;
  margin-top: 4px;
}
.fav-card-precio .precio-tachado {
  font-size: 0.78rem;
  font-weight: 400;
}
.fav-card-tags {
  display: flex;
  gap: 4px;
  margin-top: 3px;
}
.fav-card-tags .tag-nuevo,
.fav-card-tags .tag-oferta {
  font-size: 0.52rem;
  padding: 2px 7px;
  border-radius: 3px;
}
.fav-card-quitar {
  position: absolute;
  top: 18px;
  right: 0;
  background: none;
  border: none;
  cursor: pointer;
  color: #ccc;
  font-size: 1rem;
  padding: 4px;
  transition: color 0.2s, transform 0.2s;
  line-height: 1;
}
.fav-card-quitar:hover {
  color: #e53935;
  transform: scale(1.2);
}

/* Lista */
.fav-lista { padding: 0 20px; }

/* Barra de acciones (conteo + limpiar) */
.fav-acciones {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 20px 2px;
}
.fav-conteo {
  font-size: 0.76rem;
  color: #999;
  font-weight: 400;
  letter-spacing: 0.2px;
}
.fav-btn-limpiar {
  background: none;
  border: 1px solid #f0d0d0;
  cursor: pointer;
  font-family: "Montserrat", sans-serif;
  font-size: 0.7rem;
  color: #e53935;
  font-weight: 500;
  padding: 5px 14px;
  border-radius: 50px;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 4px;
}
.fav-btn-limpiar:hover {
  background: #fde8e8;
  border-color: #e53935;
}
.fav-btn-limpiar i { font-size: 0.75rem; }

/* ══════════════════════════════════════════════════════════════════════════
   CHECKOUT — Resumen tipo pasarela de pago
   ══════════════════════════════════════════════════════════════════════════ */
.fav-checkout {
  margin: 28px 20px 48px;
  background: white;
  border: 1px solid #e0e0e0;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 4px 24px rgba(0,0,0,0.06);
}
.fav-checkout-header {
  padding: 20px 22px 16px;
  border-bottom: 1px solid #eee;
  display: flex;
  align-items: center;
  gap: 10px;
}
.fav-checkout-header i {
  font-size: 1.1rem;
  color: #bbb;
}
.fav-checkout-header h3 {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 2.5px;
  color: #888;
  font-weight: 600;
  margin: 0;
}
.fav-checkout-items {
  padding: 4px 22px;
  max-height: 260px;
  overflow-y: auto;
}
.fav-checkout-items::-webkit-scrollbar { width: 3px; }
.fav-checkout-items::-webkit-scrollbar-thumb { background: #ddd; border-radius: 3px; }

.fav-checkout-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 11px 0;
  border-bottom: 1px solid #f5f5f5;
  font-size: 0.82rem;
}
.fav-checkout-row:last-child { border-bottom: none; }
.fav-checkout-row-num {
  color: #ccc;
  font-size: 0.72rem;
  font-weight: 500;
  min-width: 22px;
}
.fav-checkout-row-nombre {
  color: #555;
  font-weight: 400;
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding: 0 10px;
}
.fav-checkout-row-precio {
  color: #222;
  font-weight: 600;
  white-space: nowrap;
  font-size: 0.82rem;
}

.fav-checkout-sep {
  border: none;
  margin: 0 22px;
  height: 0;
  border-top: 1.5px dashed #ddd;
}
.fav-checkout-subtotales {
  padding: 14px 22px 4px;
}
.fav-checkout-sub-row {
  display: flex;
  justify-content: space-between;
  padding: 5px 0;
}
.fav-checkout-sub-label {
  font-size: 0.76rem;
  color: #999;
  font-weight: 400;
}
.fav-checkout-sub-valor {
  font-size: 0.82rem;
  color: #555;
  font-weight: 500;
}

.fav-checkout-total-wrap {
  margin: 0 22px;
  padding: 16px 0;
  border-top: 2px solid #111;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}
.fav-checkout-total-label {
  font-size: 0.9rem;
  font-weight: 700;
  color: #111;
  text-transform: uppercase;
  letter-spacing: 1.5px;
}
.fav-checkout-total-monto {
  font-size: 1.6rem;
  font-weight: 800;
  color: #111;
  letter-spacing: 0.5px;
}

.fav-checkout-footer {
  padding: 6px 22px 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.fav-checkout-wa {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: #1faf5a;
  color: white;
  font-family: "Montserrat", sans-serif;
  font-size: 0.92rem;
  font-weight: 700;
  padding: 16px;
  border-radius: 14px;
  text-decoration: none;
  transition: background 0.3s, transform 0.15s, box-shadow 0.3s;
  letter-spacing: 0.3px;
  box-shadow: 0 4px 16px rgba(31, 175, 90, 0.25);
}
.fav-checkout-wa:hover {
  background: #22d068;
  transform: translateY(-1px);
  box-shadow: 0 6px 24px rgba(31, 175, 90, 0.35);
}
.fav-checkout-wa:active { transform: translateY(0); }
.fav-checkout-wa svg {
  width: 20px;
  height: 20px;
  fill: white;
  flex-shrink: 0;
}
.fav-checkout-nota {
  text-align: center;
  font-size: 0.66rem;
  color: #bbb;
  font-weight: 400;
  letter-spacing: 0.2px;
  line-height: 1.5;
}
.fav-checkout-nota i { margin-right: 2px; }

/* Vacío elegante */
.fav-vacio {
  text-align: center;
  padding: 80px 30px 60px;
}
.fav-vacio-icono {
  font-size: 4rem;
  color: #e0e0e0;
  margin-bottom: 18px;
  line-height: 1;
}
.fav-vacio h3 {
  font-size: 1.15rem;
  font-weight: 600;
  color: #444;
  margin-bottom: 8px;
}
.fav-vacio p {
  font-size: 0.85rem;
  color: #999;
  font-weight: 300;
  margin-bottom: 24px;
  line-height: 1.5;
}
.fav-vacio-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #111;
  color: white;
  font-family: "Montserrat", sans-serif;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 14px 32px;
  border-radius: 50px;
  text-decoration: none;
  letter-spacing: 0.5px;
  transition: background 0.3s, transform 0.15s;
}
.fav-vacio-btn:hover {
  background: #333;
  transform: translateY(-1px);
}

/* ══════════════════════════════════════════════════════════════════════════
   RESPONSIVE — Catálogo
   ══════════════════════════════════════════════════════════════════════════ */
@media (min-width: 767px) {
  .sub-nav-link {
    padding: 10px 28px;
    font-size: 0.8rem;
  }
  .catalog-controles {
    width: auto;
  }
  .ordenar-select {
    flex: none;
    width: auto;
  }
  .header-catalog {
    padding: 1rem 5% 2rem;
    max-width: 100%;
  }

  .articles {
    max-width: 90%;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
    padding: 0;
  }
  article {
    border-bottom: none;
    overflow: hidden;
    margin: 0;
  }
  article img {
    transition: transform 0.5s ease;
  }
  article img:hover {
    transform: scale(1.05);
  }

  /* Favoritos desktop: dos columnas */
  .fav-split {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 32px;
    padding: 0 5%;
    align-items: flex-start;
  }
  .fav-split-items {
    min-width: 0;
  }
  .fav-split-checkout {
    position: sticky;
    top: 20px;
  }
  .fav-lista {
    padding: 0;
  }
  .fav-acciones {
    padding: 0 0 4px;
  }
  .fav-checkout {
    margin: 0;
  }
  .fav-card-img {
    width: 100px;
    height: 100px;
  }
  .fav-card-img-placeholder {
    width: 100px;
    height: 100px;
  }
}

@media (min-width: 1200px) {
  .articles {
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  }
}

/* ══════════════════════════════════════════════════════════════════════════
   DARK MODE — Catálogo
   ══════════════════════════════════════════════════════════════════════════ */
@media (prefers-color-scheme: dark) {
  .sub-nav {
    background: #0a0a0a;
    border-top-color: #1a1a1a;
  }
  .filtros-panel {
    background: #1a1a1a;
  }
  .filtros-panel-header {
    border-bottom-color: #333;
  }
  .filtros-panel-header h3 {
    color: #eee;
  }
  .filtros-panel-cerrar {
    color: #ccc;
  }
  .filtro-acordeon {
    border-bottom-color: #333;
  }
  .filtro-acordeon-titulo {
    color: #ddd;
  }
  .filtro-opcion {
    color: #aaa;
  }
  .filtro-opcion:hover {
    color: #eee;
  }
  .filtro-opcion.activo {
    color: #fff;
  }
  .filtro-opcion .check {
    border-color: #555;
  }
  .filtro-opcion.activo .check {
    background: white;
    border-color: white;
  }
  .filtro-opcion.activo .check::after {
    color: black;
  }
  .filtros-panel-footer {
    border-top-color: #333;
  }
  .btn-mostrar-resultados {
    background: white;
    color: black;
  }
  .btn-filtros {
    border-color: #444;
    color: #ccc;
  }
  .btn-filtros:hover {
    border-color: #888;
    background: #222;
  }
  .ordenar-select {
    background: #1a1a1a;
    color: #ccc;
    border-color: #333;
  }
  article {
    border-bottom-color: rgba(255, 255, 255, 0.1);
  }
  article h4 {
    color: #aaa;
  }
  article p.desc {
    color: #aaa;
  }
  .img-placeholder {
    background: #222;
  }
  .contador {
    color: #aaa;
  }

  .modal {
    background: #1c1c1c;
  }
  .modal-nombre {
    color: #f0f0f0;
  }
  .modal-precio {
    color: #f0f0f0;
  }
  .modal-desc {
    color: #aaa;
  }
  .modal-detalles {
    color: #aaa;
  }
  .modal-sep {
    border-top-color: #333;
  }
  .modal-carousel {
    background: #2a2a2a;
  }
  .filtro-badge {
    background: white;
    color: black;
  }
  .filtro-limpiar {
    color: #777;
  }
  .filtro-limpiar:hover {
    color: #ddd;
  }
  .btn-fav.activo {
    background: rgba(40, 40, 40, 0.9);
  }
  .modal-btn-fav {
    border-color: #555;
    color: #aaa;
  }
  .modal-btn-fav:hover {
    border-color: #e53935;
    color: #e53935;
  }
  .modal-btn-fav.activo {
    background: #3a1a1a;
    border-color: #e53935;
    color: #e53935;
  }
  /* Favoritos dark */
  .fav-card { border-bottom-color: #2a2a2a; }
  .fav-card-nombre { color: #eee; }
  .fav-card-precio { color: #f0f0f0; }
  .fav-card-cat { color: #777; }
  .fav-card-material { color: #666; }
  .fav-card-img-placeholder { background: linear-gradient(135deg, #2a2a2a, #222); }
  .fav-card-quitar { color: #555; }
  .fav-card-quitar:hover { color: #e53935; }
  .fav-btn-limpiar { border-color: #3a2020; }
  .fav-btn-limpiar:hover { background: #2a1515; }
  .fav-conteo { color: #777; }
  .fav-checkout {
    background: #1a1a1a;
    border-color: #2a2a2a;
    box-shadow: 0 4px 24px rgba(0,0,0,0.3);
  }
  .fav-checkout-header { border-bottom-color: #2a2a2a; }
  .fav-checkout-header h3 { color: #777; }
  .fav-checkout-header i { color: #555; }
  .fav-checkout-row { border-bottom-color: #222; }
  .fav-checkout-row-num { color: #555; }
  .fav-checkout-row-nombre { color: #aaa; }
  .fav-checkout-row-precio { color: #eee; }
  .fav-checkout-sep { border-top-color: #333; }
  .fav-checkout-sub-label { color: #666; }
  .fav-checkout-sub-valor { color: #aaa; }
  .fav-checkout-total-wrap { border-top-color: white; }
  .fav-checkout-total-label { color: #f0f0f0; }
  .fav-checkout-total-monto { color: white; }
  .fav-checkout-nota { color: #555; }
  .fav-vacio-icono { color: #333; }
  .fav-vacio h3 { color: #ccc; }
  .fav-vacio p { color: #777; }
  .fav-vacio-btn { background: white; color: black; }
}
