:root {
  --bg: #FFF4F7; /* fondo rosa muy suave */
  --text: #222;
  --muted: #666;
  --card: #fff;
  --shadow: 0 4px 12px rgba(135,125,211,0.12);
  --primary: #877DD3; /* acentos y precios (cards) */
  --brand: #5578B8;   /* botones y controles */
  --accent: #84BBD0;  /* badges/elementos informativos */
  --radius: 12px;
  /* Colores del degradado de fondo (paleta) */
  --brand-50: #FEDEEB;  /* rosa suave */
  /* Paleta y variables base */
  :root {
  --bg: #FFF4F7; /* fondo rosa muy suave */
    --text: #222;
    --muted: #666;
    --card: #fff;
    --shadow: 0 4px 12px rgba(135,125,211,0.12);
    --primary: #877DD3; /* acentos y precios (cards) */
    --brand: #5578B8;   /* botones y controles */
    --accent: #84BBD0;  /* badges/elementos informativos */
    --radius: 12px;
    --brand-50: #FEDEEB;  /* rosa suave */
    --brand-100: #C9B0E7; /* lila claro */
    --brand-200: #84BBD0; /* teal suave */
  }

  * { box-sizing: border-box; }
  html, body {
    margin: 0; padding: 0; color: var(--text);
    background: var(--bg);
    font-family: "Outfit", system-ui, -apple-system, "Segoe UI", Roboto, Ubuntu, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  }

  .site-header h1, .details h2 { font-family: "Outfit", system-ui, -apple-system, "Segoe UI", Roboto, Ubuntu, "Helvetica Neue", Arial, "Noto Sans", sans-serif; letter-spacing: .04em; font-weight: 800; }
  .card-title { font-family: "Outfit", sans-serif; }

  .site-header { padding: 16px 6px 16px; border-bottom: 1px solid #efefef; text-align: center; }
  .site-header h1 { margin: 0; font-size: 1.54rem; font-weight: 400; letter-spacing: .02em; color: #323232; }
  @media (min-width: 1024px) { .site-header h1 { font-size: 2.8rem; } }

    /* Top Nav */
    .top-nav { position: relative; z-index: 20; background: rgba(255,255,255,.25); backdrop-filter: blur(6px); border-bottom: 1px solid rgba(85,120,184,.12); }
    .nav-inner { max-width: 1320px; margin: 0 auto; padding: 8px 16px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 8px; }
    .nav-left, .nav-right { display: inline-flex; align-items: center; gap: 10px; }
    .nav-left { justify-content: flex-start; }
    .nav-right { justify-content: flex-end; }
    .nav-logo { display: inline-flex; justify-content: center; align-items: center; }
    .nav-logo img { height: 64px; width: auto; filter: drop-shadow(0 1px 2px rgba(0,0,0,.06)); }
  .nav-icon { display: inline-flex; color: #333; background: #fff; border: 1px solid rgba(85,120,184,.16); border-radius: 999px; padding: 6px; box-shadow: 0 1px 2px rgba(0,0,0,.04); transition: transform .12s ease, filter .2s ease; align-items: center; justify-content: center; }
    /* Tamaño base (móvil/tablet): +15% aprox. vs 17px → 20px */
    .nav-icon img { width: 20px; height: 20px; display: block; }
    /* Desktop: al doble del original (34px) */
    @media (min-width: 1024px) {
      .nav-icon img { width: 34px; height: 34px; }
    }
    .nav-icon:hover { transform: translateY(-1px); filter: brightness(1.05); }
  .nav-cta { padding: 10px 14px; white-space: nowrap; }
    @media (max-width: 640px) {
      .nav-inner { grid-template-columns: auto 1fr auto; }
      .nav-left { gap: 6px; }
      .nav-logo img { height: 28px; }
      .nav-cta { padding: 8px 12px; font-size: .95rem; }
    }

  .container { max-width: 1320px; margin: 0 auto; padding: 24px 16px 56px; }

  /* Filters (chips) - móvil primero */
  .filters { position: sticky; top: 0; z-index: 10; margin-bottom: 12px; }
  .filters-inner {
    display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; align-items: center;
    /* background: linear-gradient(135deg, rgba(135,125,211,0.18) 0%, rgba(85,120,184,0.18) 100%); */
    /* backdrop-filter: blur(6px) saturate(120%);
    -webkit-backdrop-filter: blur(6px) saturate(120%); */
    /* border: 1px solid rgba(85,120,184,.18); */
    /* border-radius: 12px; */
    /* padding: 10px 12px; */
    /* box-shadow: 0 4px 12px rgba(85,120,184,.10); */
  }
  .filter-group {
    display: inline-flex; flex-wrap: nowrap; align-items: center; gap: 10px;
    /* Igualar degradado al botón Contacto (intensidad móvil) */
    background: linear-gradient(135deg, rgba(135,125,211,0.70) 0%, rgba(85,120,184,0.70) 100%);
    border-radius: 16px; padding: 10px 12px;
    border: 1px solid rgba(85,120,184,.18);
    box-shadow: 0 6px 14px rgba(85,120,184,.18);
  }
  .filter-label { font-weight: 700; color: #fff; margin-right: 0; }
  .chip-row { display: inline-flex; flex-wrap: nowrap; overflow-x: auto; gap: 6px; padding-bottom: 0; background: transparent; border: 0; box-shadow: none; }
  .chip-row::-webkit-scrollbar { height: 6px; }
  .chip-row::-webkit-scrollbar-thumb { background: #ddd; border-radius: 999px; }
  .chip { flex: 0 0 auto; border: 1px solid #e1e1e1; border-radius: 999px; padding: 6px 12px; background: #fff; color: #333; cursor: pointer; font-weight: 500; font-size: 0.7rem; box-shadow: 0 1px 2px rgba(0,0,0,.04); transition: background .15s ease, color .15s ease, border-color .15s ease; }
  .chip[aria-selected="true"], .chip.active { background: #fff; color: var(--brand); border-color: var(--brand); }
  .chip:disabled, .chip[aria-disabled="true"] { opacity: .45; cursor: not-allowed; }
  .btn-clear { display: none; }

  /* Ajustes de la barra de filtros en desktop: 50% centrada; pastillas con degradado y chips en caja blanca */
  @media (min-width: 1024px) {
    .chip-row::-webkit-scrollbar { height: 8px; }
    .filters-inner {
      width: 100%;
      margin: 0 auto;
      display: flex;
      flex-wrap: nowrap; /* mantener las dos pastillas lado a lado */
      gap: 24px;
      justify-content: center;
      align-items: center;
      padding: 12px 16px;
    }
  .filters { top: 8px; }
    /* Cada grupo se convierte en pastilla con degradado */
    .filter-group {
      /* Igualar degradado al botón Contacto (intensidad desktop) */
      background: linear-gradient(135deg, rgba(135,125,211,0.78) 0%, rgba(85,120,184,0.78) 100%);
      border-radius: 16px; /* evitar curvatura excesiva */
      padding: 13px 16px; /* +30% aprox */
      box-shadow: 0 8px 18px rgba(85,120,184,.22);
      gap: 16px; /* +33% aprox */
      border: 1px solid rgba(85,120,184,.18);
    }
    .filter-label { color: #fff; margin-right: 0; font-size: 1.3rem; }
    /* Chips directamente sobre la pastilla (sin fondo/caja extra) */
    .chip-row {
      background: transparent;
      border-radius: 999px;
      padding: 2px; /* leve separación */
      border: 0;
      box-shadow: none;
      max-width: 468px; /* +30% */
    }
  .chip { padding: 6px 13px; /* +30% */ border-radius: 999px; background: #fff; color: #333; border-color: #ddd; box-shadow: none; font-size: 0.91rem; font-weight: 500; }
    .chip[aria-selected="true"], .chip.active { background: #fff; color: var(--brand); border-color: var(--brand); }
    /* Ocultar botón limpiar en este layout simplificado */
    .btn-clear { display: none; }
  }

  /* Desktop: filtros lado a lado y sticky arriba */
  @media (min-width: 1024px) {
    .filters-inner { justify-content: center; gap: 20px; }
  }

  /* Compactación en móviles estrechos: evitar 3ra fila del botón Ofertas */
  @media (max-width: 380px) {
    .filters-inner { gap: 8px; }
    .filter-group { padding: 8px 10px; gap: 8px; border-radius: 14px; }
    .filter-label { font-size: .95rem; }
    .chip { padding: 5px 10px; font-size: .65rem; }
    .btn.btn-offers { font-size: .95rem; padding: 8px 12px; }
  }

  /* Layout específico de dos filas: (1) Tipo a lo ancho (2) Estilo + Ofertas lado a lado */
  @media (max-width: 480px) {
    /* Reforzar flex-wrap y distribución en dos filas */
    .filters-inner { display: flex; flex-wrap: wrap; column-gap: 10px; row-gap: 10px; }
    /* Fila 1: Tipo ocupa 100% */
    .filters-inner .filter-group:nth-of-type(1) { flex: 1 1 100%; }
    /* Fila 2: Estilo (ancho flexible) + Ofertas (ancho fijo) */
    .filters-inner .filter-group:nth-of-type(2) { flex: 1 1 calc(100% - var(--offers-w, 148px)); min-width: 0; }
    .btn.btn-offers { flex: 0 0 var(--offers-w, 148px); align-self: stretch; }
  }

  /* Afinar cuando el ancho disponible es intermedio y casi cabe en 2 filas sin recortes */
  @media (min-width: 381px) and (max-width: 520px) {
    :root { --offers-w: 120px; }
    .filters-inner { gap: 10px; }
    /* Ancho útil ligeramente mayor para la pastilla */
    .filters-inner { --pill-w: clamp(240px, calc(100vw - 28px - var(--offers-w) - 12px), 580px); }
    .filter-group { padding: 9px 12px; }
    .filter-label { font-size: .95rem; }
    .chip { padding: 5px 10px; font-size: .64rem; }
    .btn.btn-offers { font-size: .96rem; padding: 9px 12px; }
  }

  /* Solución robusta: usar Grid en móviles para forzar 2 filas (Tipo) y (Estilo + Ofertas) */
  @media (max-width: 560px) {
    /* Dos columnas auto; alinear a la izquierda y reducir el gap para ganar ancho efectivo */
    .filters-inner { display: grid; grid-template-columns: auto auto; grid-template-rows: auto auto; column-gap: 12px; row-gap: 10px; align-items: stretch; justify-content: start; }
    /* Ajustar ancho del botón para más espacio de pastillas y recalcular ancho común */
  .filters-inner { --offers-w: 118px; --pill-w: clamp(220px, calc(100vw - 28px - var(--offers-w) - 12px), 560px); }
    .filters-inner .filter-group { min-width: 0; width: var(--pill-w); padding: 8px 10px; }
    /* Permitir scroll horizontal de chips en casos límite, ocultando scrollbar visualmente */
    .filters-inner .filter-group .chip-row { min-width: 0; max-width: 100%; overflow-x: auto; overflow-y: hidden; }
    .filters-inner .filter-group .chip-row::-webkit-scrollbar { display: none; height: 0; }
    .filters-inner .filter-group .chip-row { scrollbar-width: none; }
  /* Fila 1: Tipo solo en la columna izquierda */
  .filters-inner .filter-group:nth-of-type(1) { grid-column: 1 / 2; justify-self: start; }
    /* Fila 2: Estilo en col 1, Ofertas en col 2 */
    .filters-inner .filter-group:nth-of-type(2) { grid-column: 1 / 2; justify-self: start; }
    /* Colocar el botón Ofertas centrado entre las dos filas y un poco más a la derecha */
  .filters-inner #btn-ofertas { grid-column: 2 / 3; grid-row: 1 / span 2; align-self: center; justify-self: end; transform: translate(14px, 2px); }
    .btn.btn-offers { white-space: nowrap; }
  }

  /* Reducción adicional de tipografías (≈20%) en celulares pequeños */
  @media (max-width: 400px) {
    .filter-label { font-size: 0.8rem !important; }
    .chip { font-size: 0.56rem !important; padding: 4px 9px; }
    .btn.btn-offers { font-size: 0.88rem !important; padding: 8px 12px; }
  }

  /* Overrides adicionales para pantallas muy pequeñas (<= 340px) */
  @media (max-width: 340px) {
    :root { --offers-w: 128px; }
    .filter-group { padding: 7px 9px; }
    .filter-label { font-size: .9rem; }
    .chip { padding: 4px 9px; font-size: .62rem; }
    .btn.btn-offers { font-size: .9rem; padding: 7px 10px; }
  }

  /* Gallery */
  .gallery { display: grid; grid-template-columns: 1fr; gap: 16px; }
  @media (min-width: 640px) { .gallery { grid-template-columns: repeat(2, 1fr); } }
  @media (min-width: 1024px) { .gallery { grid-template-columns: repeat(3, 1fr); gap: 24px; } }

  /* Cards */
  .card { background: var(--card); border-radius: var(--radius); box-shadow: 0 4px 14px rgba(135,125,211,.18), 0 1px 3px rgba(85,120,184,.16); overflow: hidden; border: 1px solid rgba(85,120,184,.18); transition: box-shadow .28s ease, transform .28s ease, border-color .28s ease; }
  .card:hover, .card:focus-within { box-shadow: 0 14px 34px rgba(85,120,184,.34), 0 10px 22px rgba(132,187,208,.28), 0 0 0 2px rgba(135,125,211,.22) inset; border-color: rgba(85,120,184,.38); }
  .image-wrap { position: relative; width: 100%; aspect-ratio: 600 / 884; overflow: hidden; background: #f8f8f8; border-radius: var(--radius) var(--radius) 0 0; }
  .image-wrap { cursor: pointer; }
  .image-wrap img { width: 100%; height: 100%; object-fit: contain; object-position: center; display: block; border-radius: 0; transition: transform .32s ease; will-change: transform; }
  .card:hover .image-wrap img, .card:focus-within .image-wrap img { transform: scale(1.02); }
  .image-wrap img.main { position: absolute; inset: 0; opacity: 1; }
  .image-wrap img.alt { position: absolute; inset: 0; opacity: 0; }
  .card-body { padding: 12px 12px 16px; display: grid; gap: 8px; }
  .card-title { margin: 0; font-size: 1.05rem; font-weight: 400; line-height: 1.3; text-align: center; }
  .prices { display: grid; gap: 4px; text-align: center; }
  .price-unit { margin: 0; color: #111; font-weight: 600; }
  .card-price { margin: 0; color: var(--primary); font-weight: 700; text-align: center; }
  .price-label { color: var(--muted); font-weight: 600; margin-right: 4px; font-size: .9rem; }

  /* Buttons */
  .btn { appearance: none; border: 0; border-radius: 999px; padding: 10px 14px; cursor: pointer; background: linear-gradient(90deg, var(--primary) 0%, var(--brand) 100%); color: #fff; font-weight: 700; transition: transform .12s ease, box-shadow .12s ease, background .2s ease; box-shadow: 0 6px 14px rgba(135,125,211,.24); }
  .btn:hover { transform: translateY(-1px); filter: brightness(1.05); }
  .btn:active { transform: translateY(0); box-shadow: 0 2px 6px rgba(85,120,184,.32); }
  /* Botón Ubicaciones en el menú (look del botón Ofertas) */
  .btn.nav-ubicaciones {
    border: 1px solid var(--primary);
    background: #fff;
    color: var(--primary);
    font-weight: 800;
    position: relative;
    box-shadow:
      0 0 0 1px rgba(135,125,211,0.35),
      0 0 10px rgba(135,125,211,0.45),
      0 6px 14px rgba(0,0,0,0.10);
    animation: offersShakeCycle 3s ease-in-out infinite;
    padding-left: 56px; /* espacio para el icono (icono al doble) */
  }
  .btn.nav-ubicaciones::after {
    content: "";
    position: absolute; left: 12px; top: 50%; transform: translateY(-50%);
    width: 36px; height: 36px; background: url('img/ubicaciones.png') center/contain no-repeat;
    filter: none;
  }
  .btn.nav-ubicaciones::before {
    content: "";
    position: absolute; inset: -3px; border-radius: 999px;
    background: linear-gradient(90deg, var(--primary) 0%, var(--brand) 100%);
    background-size: 200% 200%;
    filter: blur(10px); opacity: 0; transition: opacity .12s ease, transform .12s ease; z-index: -1; pointer-events: none;
  }
  .btn.nav-ubicaciones:hover {
    filter: none;
    transform: translateY(-1px);
    box-shadow:
      0 0 0 1px rgba(135,125,211,0.45),
      0 0 12px rgba(135,125,211,0.55),
      0 10px 18px rgba(0,0,0,0.12);
  }
  .btn.nav-ubicaciones:focus { outline: none; }
  .btn.nav-ubicaciones:focus-visible { outline: none; box-shadow: 0 0 0 3px rgba(255,255,255,0.6), 0 0 0 6px rgba(85,120,184,0.55); }
  .btn.nav-ubicaciones:active { outline: none; transform: translateY(2px) scale(0.985); box-shadow: 0 6px 14px rgba(135,125,211,.32), 0 12px 24px rgba(85,120,184,.28); }
  /* Pausar animación en interacción */
  .btn.nav-ubicaciones:hover,
  .btn.nav-ubicaciones:focus,
  .btn.nav-ubicaciones:active { animation: none !important; }

  /* Estado activo para página actual */
  .btn.nav-ubicaciones[aria-current="page"] {
    background: linear-gradient(135deg, rgba(135,125,211,0.10) 0%, rgba(85,120,184,0.10) 100%);
    border-width: 2px;
    box-shadow:
      0 0 0 1px rgba(135,125,211,0.45),
      0 0 12px rgba(135,125,211,0.55),
      0 10px 18px rgba(0,0,0,0.12);
    animation: none !important;
  }
  /* Igualar estilos del botón Contáctanos con las pastillas de filtros */
  .btn.nav-cta {
    background: linear-gradient(135deg, rgba(135,125,211,0.70) 0%, rgba(85,120,184,0.70) 100%);
    border: 1px solid rgba(85,120,184,.18);
    box-shadow: 0 6px 14px rgba(85,120,184,.18);
    border-radius: 16px;
    backdrop-filter: blur(8px) saturate(140%);
    -webkit-backdrop-filter: blur(8px) saturate(140%);
    color: #fff;
  }

  /* Lazy reveal genérico para cards */
  .card, .catalog-card { will-change: opacity, transform; }
  .reveal { opacity: 0; transform: translateY(10px); }
  .reveal.revealed { opacity: 1; transform: translateY(0); transition: opacity .7s ease, transform .7s ease; }
  @media (min-width: 1024px) {
    .btn.nav-cta {
      background: linear-gradient(135deg, rgba(135,125,211,0.78) 0%, rgba(85,120,184,0.78) 100%);
      padding: 13px 16px;
      box-shadow: 0 8px 18px rgba(85,120,184,.22);
    }
  }

  /* Modal */
  .modal { position: fixed; inset: 0; display: none; align-items: center; justify-content: center; background: rgba(0,0,0,.45); padding: 24px; z-index: 1000; backdrop-filter: none; transition: background .2s ease, backdrop-filter .2s ease; }
  .modal[aria-hidden="false"] { display: flex; background: rgba(0,0,0,.62); backdrop-filter: blur(2px); }
  .modal-content { background: #fff; border-radius: 16px; max-width: 900px; width: 100%; box-shadow: 0 10px 28px rgba(85,120,184,.22), 0 2px 8px rgba(135,125,211,.18); max-height: 92vh; overflow: auto; }
  .modal-close { position: absolute; margin: 0; padding: 0; top: 18px; right: 26px; font-size: 28px; line-height: 1; background: transparent; border: 0; cursor: pointer; color: #333; }
  .modal-body { display: grid; grid-template-columns: 1.2fr 1fr; gap: 16px; padding: 20px; }
  @media (max-width: 768px) { .modal { padding: 8px; } .modal-body { grid-template-columns: 1fr; } .slides { aspect-ratio: auto; height: 60vh; } }

  /* Slider */
  .slider { position: relative; width: 100%; overflow: hidden; background: #f6f6f6; border-radius: 12px; }
  .slides { position: relative; width: 100%; /* altura dinámica por JS */ }
  .slide { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; object-position: center; opacity: 0; transition: opacity .45s ease-in-out; }
  .slide.active { opacity: 1; }
  .slider-btn { position: absolute; top: 50%; transform: translateY(-50%); border: 0; background: #25D366; color: white; width: 36px; height: 36px; border-radius: 50%; cursor: pointer; box-shadow: 0 6px 14px rgba(37,211,102,.28); transition: filter .15s ease, transform .15s ease, box-shadow .15s ease; }
  .slider-btn:hover { filter: brightness(1.06); box-shadow: 0 8px 18px rgba(37,211,102,.35); transform: translateY(-50%) translateY(-1px); }
  .slider-btn.prev { left: 8px; }
  .slider-btn.next { right: 8px; }

  /* Badges superpuestas en el slider */
  .slider .badge { position: absolute; backdrop-filter: saturate(1.1) blur(1px); }
  .slider .status.badge { top: 10px; right: 10px; }

  /* Botón Ofertas (toggle) */
  .btn.btn-offers {
    /* Estado inicial: como en la imagen (blanco con borde/glow morado) */
    border: 1px solid var(--primary);
    background: #fff;
    color: var(--primary);
    font-weight: 800;
    font-size: 1.1rem; /* tipografía un poco más grande */
    transition: transform .15s ease, filter .15s ease, box-shadow .2s ease, background-color .2s ease, color .2s ease, border-color .2s ease;
    box-shadow:
      0 0 0 1px rgba(135,125,211,0.35),
      0 0 10px rgba(135,125,211,0.45),
      0 6px 14px rgba(0,0,0,0.10);
    will-change: box-shadow, filter, transform;
    text-shadow: none;
    position: relative; z-index: 0;
    -webkit-tap-highlight-color: transparent;
  }
  /* halo degradado con colores de marca para efecto de click */
  .btn.btn-offers::before {
    content: "";
    position: absolute;
    inset: -3px;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--primary) 0%, var(--brand) 100%);
    background-size: 200% 200%;
    filter: blur(10px);
    opacity: 0;
    transition: opacity .12s ease, transform .12s ease;
    z-index: -1;
    pointer-events: none;
  }
  .btn.btn-offers:hover {
    filter: none;
    transform: translateY(-1px);
    box-shadow:
      0 0 0 1px rgba(135,125,211,0.45),
      0 0 12px rgba(135,125,211,0.55),
      0 10px 18px rgba(0,0,0,0.12);
  }
  /* remover borde/outline negro por defecto y dar efecto de click con movimiento y halo */
  .btn.btn-offers:focus { outline: none; }
  .btn.btn-offers:focus-visible { outline: none; box-shadow: 0 0 0 3px rgba(255,255,255,0.6), 0 0 0 6px rgba(85,120,184,0.55); }
  .btn.btn-offers:active { outline: none; transform: translateY(2px) scale(0.985); box-shadow: 0 6px 14px rgba(135,125,211,.32), 0 12px 24px rgba(85,120,184,.28); }
  .btn.btn-offers:active::before { opacity: 1; transform: scale(1.03); }
  .btn.btn-offers.active,
  .btn.btn-offers[aria-pressed="true"] {
    /* Estado activo: fondo verde con texto blanco y glow verde */
    background: #00e676 !important;
    background-color: #00e676 !important;
    color: #fff !important;
    border-color: #00e676 !important;
    border-width: 2px !important;
    filter: none !important;
    text-shadow: 0 1px 1px rgba(0,0,0,0.25);
    box-shadow:
      0 0 0 1px rgba(0, 230, 118, 0.35),
      0 0 10px rgba(0, 230, 118, 0.60),
      0 0 20px rgba(0, 230, 118, 0.42),
      0 6px 14px rgba(0, 0, 0, 0.12);
    animation: none !important;
  }
  /* Hover neutral cuando está activo (sin oscurecer ni mover) */
  .btn.btn-offers.active:hover,
  .btn.btn-offers[aria-pressed="true"]:hover {
    background: #00e676 !important;
    filter: brightness(1.03) !important;
    transform: translateY(-1px) !important;
    box-shadow:
      0 0 0 1px rgba(0, 230, 118, 0.45),
      0 0 12px rgba(0, 230, 118, 0.70),
      0 10px 18px rgba(0,0,0,0.12) !important;
  }
  /* Desactivar halo degradado cuando está activo para igualar al badge */
  .btn.btn-offers.active::before,
  .btn.btn-offers[aria-pressed="true"]::before {
    opacity: 0;
    animation: none;
    transform: none;
  }
  @keyframes neonPulse {
    0% {
      text-shadow:
        0 0 2px rgba(0,0,0,0.25),
        0 0 6px rgba(0,230,118,0.4),
        0 0 10px rgba(0,230,118,0.25);
      box-shadow:
        0 0 10px rgba(0,230,118,0.55),
        0 0 18px rgba(0,230,118,0.28);
    }
    100% {
      text-shadow:
        0 0 3px rgba(0,0,0,0.3),
        0 0 12px rgba(0,230,118,0.75),
        0 0 22px rgba(0,230,118,0.45);
      box-shadow:
        0 0 16px rgba(0,230,118,0.9),
        0 0 32px rgba(0,230,118,0.55);
    }
  }
  /* Animaciones para halo y tinte del botón Ofertas activo */
  @keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
  }
  @keyframes tintSweep {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
  }
  /* Details */
  .details { display: grid; gap: 6px; align-content: start; justify-items: center; }
  .title-row { display: flex; align-items: center; gap: 10px; width: 100%; }
  .title-row { justify-content: center; }
  .details h2 { margin: 0; font-size: 2.86rem; font-weight: 400; letter-spacing: .04em; text-align: center; color: #323232; }
  .details .price { margin: 0; font-size: 1.05rem; font-weight: 600; color: #111; text-align: center; width: 100%; }
  .details .price-wholesale { margin: 0; font-weight: 600; color: #111; font-family: "Outfit", sans-serif; text-align: center; width: 100%; }
  .details .status { margin: 0; color: #2e7d32; }
  .details .description { margin-top: 8px; color: #333; text-align: center; }
  .details .shipping { margin: 6px 0; color: var(--accent); font-weight: 700; }
  .details .price .price-label, .details .price-wholesale .price-label { color: #000; font-weight: 700; }
  .details .price .price-value, .details .price-wholesale .price-value { color: #2e7d32; font-weight: 800; }
  .details .price .price-suffix, .details .price-wholesale .price-suffix { color: #111; font-weight: 700; margin-left: 4px; letter-spacing: .02em; }
  .details .price-wholesale:empty { display: none; }
  .details .description:empty { display: none; }

  /* Badges */
  .badge { display: inline-flex; align-items: center; padding: 8px 12px; border: 1px solid #ccc; border-radius: 999px; font-size: .9rem; line-height: 1; width: fit-content; margin: 2px auto; text-align: center; }
  .details .status.badge { white-space: nowrap; margin-top: 2px; }
  .status.badge { color: #fff; border-color: #2e7d32; background: #2e7d32; box-shadow: 0 2px 8px rgba(46,125,50,.25); }
  .shipping.badge { color: var(--accent); border-color: var(--accent); background: #e8f4f8; }

  /* Asegurar ancho correcto de secciones inferiores dentro del grid */
  .details .description,
  .details .size-section,
  .details .cta-row,
  .details .payment-row { justify-self: stretch; }

  /* Size table */
  .size-section { display: grid; gap: 8px; align-content: start; margin-top: 8px; }
  .size-section label { font-weight: 600; }
  .size-section select { padding: 8px 10px; border-radius: 10px; border: 1px solid #ddd; font: inherit; }
  .size-table-wrap { overflow: auto; border-radius: 12px; border: 1px solid #eee; }
  .size-table { width: 100%; border-collapse: collapse; font-size: .95rem; }
  .size-table th, .size-table td { padding: 10px 12px; border-bottom: 1px solid #f0f0f0; text-align: left; }
  .size-table thead th { background: #faf7ff; font-weight: 700; }
  .size-table tbody th { background: #fcfcfc; font-weight: 700; }

  /* CTA */
  .cta-row { display: flex; gap: 12px; align-items: center; margin-top: 8px; width: 100%; justify-content: center; }
  /* Reducir espacio entre descripción y botón en el modal */
  .modal .details .description + .cta-row { margin-top: 4px; }
  .whatsapp-btn { background: #25D366; box-shadow: 0 6px 14px rgba(37,211,102,.24); width: 100%; max-width: 420px; display: inline-flex; justify-content: center; align-items: center; }
  .whatsapp-btn:hover { filter: brightness(1.05); }
  .whatsapp-btn::before {
    content: "";
    display: inline-block;
    width: 36px;
    height: 36px;
    margin-right: 10px;
    vertical-align: -6px;
    background: url('img/wsp-icon.png') no-repeat center/contain;
  }

  /* Botón flotante de WhatsApp */
  .wa-floating { position: fixed; right: 14px; bottom: 16px; z-index: 40; width: 56px; height: 56px; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; background: #25D366; box-shadow: 0 10px 22px rgba(37,211,102,.36); border: 1px solid rgba(0,0,0,.06); transition: transform .18s ease, box-shadow .18s ease, filter .18s ease; }
  .wa-floating:hover { transform: translateY(-1px); filter: brightness(1.05); box-shadow: 0 14px 28px rgba(37,211,102,.4); }
  .wa-floating img { width: 28px; height: 28px; filter: drop-shadow(0 1px 1px rgba(0,0,0,.18)); }
  /* +40% en móviles */
  @media (max-width: 480px) {
    .wa-floating { width: 70px; height: 70px; right: 12px; bottom: 12px; }
    .wa-floating img { width: 34px; height: 34px; }
  }

  /* Botón flotante de Ubicaciones (solo móvil) */
  .loc-floating { position: fixed; right: 14px; bottom: 84px; z-index: 40; width: 50px; height: 50px; display: none; align-items: center; justify-content: center; border-radius: 50%; background: #fff; border: 1px solid var(--primary); box-shadow: 0 0 0 1px rgba(135,125,211,0.35), 0 0 10px rgba(135,125,211,0.45), 0 6px 14px rgba(0,0,0,0.10); }
  .loc-floating:hover { transform: translateY(-1px); filter: brightness(1.03); box-shadow: 0 0 0 1px rgba(135,125,211,0.45), 0 0 12px rgba(135,125,211,0.55), 0 10px 18px rgba(0,0,0,0.12); }
  .loc-floating img { width: 24px; height: 24px; display: block; }
  /* +40% en móviles y mayor separación con WhatsApp */
  @media (max-width: 480px) { .loc-floating { display: inline-flex; right: 12px; bottom: 100px; width: 64px; height: 64px; } .loc-floating img { width: 31px; height: 31px; } }

  /* Ocultar botón de Ubicaciones del menú en móviles para evitar overflow */
  @media (max-width: 640px) {
    .nav-right .nav-ubicaciones { display: none !important; }
  }

  /* Métodos de pago */
  .payment-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; align-items: center; width: 100%; margin: 10px 0 0; }
  .payment-row img { width: 100%; aspect-ratio: 1 / 1; height: auto; object-fit: contain; border-radius: 12px; padding: 6px; background: #fff; box-shadow: 0 1px 2px rgba(135,125,211,.08); border: 1px solid #e7e3f8; }
  @media (min-width: 1024px) { .payment-row { gap: 14px; } .payment-row img { padding: 8px; border-radius: 14px; } }

  /* Focus */
  :focus { outline: 2px solid #111; outline-offset: 2px; }
}

/* Badges sobre las imágenes de las cards (p.ej., Liquidación) */
.image-wrap .badge { position: absolute; z-index: 2; top: 10px; left: 10px; }
.badge.liquidation {
  background: #00E676; /* verde llamativo */
  border-color: #00E676;
  color: #fff;
  /* glow verde para resaltar */
  box-shadow:
    0 0 0 1px rgba(0, 230, 118, 0.35),
    0 0 10px rgba(0, 230, 118, 0.65),
    0 0 20px rgba(0, 230, 118, 0.45),
    0 6px 14px rgba(0, 0, 0, 0.12);
  /* resaltar el texto */
  text-shadow: 0 1px 2px rgba(0,0,0,.28);
  font-size: 110%;
}

/* Animación sutil para el botón Ofertas: pulso suave cada 4s */
@keyframes offersSoftPulse {
  0% {
    box-shadow: 0 6px 14px rgba(0,230,118,0.25);
    filter: brightness(1);
  }
  50% {
    box-shadow: 0 10px 24px rgba(0,230,118,0.35), 0 0 12px rgba(0,230,118,0.35);
    filter: brightness(1.04);
  }
  100% {
    box-shadow: 0 6px 14px rgba(0,230,118,0.25);
    filter: brightness(1);
  }
}

/* Sacudida breve al inicio del ciclo y reposo el resto para que ocurra cada ~3s */
@keyframes offersShakeCycle {
  0% { transform: translateX(0) rotate(0); }
  2% { transform: translateX(-1.5px) rotate(-0.4deg); }
  4% { transform: translateX(1.5px) rotate(0.4deg); }
  6% { transform: translateX(-1.5px) rotate(-0.4deg); }
  8% { transform: translateX(0) rotate(0); }
  9%, 100% { transform: translateX(0) rotate(0); }
}

/* Aplicar pulso por defecto, pero no cuando está activo o en interacción */
.btn.btn-offers {
  animation: offersShakeCycle 3s ease-in-out infinite;
}

/* Pausar la animación en hover, focus, active o cuando está activado */
.btn.btn-offers:hover,
.btn.btn-offers:focus,
.btn.btn-offers:active,
.btn.btn-offers[aria-pressed="true"],
.btn.btn-offers.active {
  animation: none !important;
}

/* Respeto a usuarios con reducción de movimiento */
@media (prefers-reduced-motion: reduce) {
  .btn.btn-offers { animation: none !important; }
}
