/* Rediseño interactivo de "Todos los equipos". Se carga después de tienda.css y sólo sobreescribe. */

body.tienda-page {
  --pro-violet: #7b3fe4;
  --pro-fuchsia: #d946ef;
  --pro-pink: #f472b6;
  --pro-indigo: #4f46e5;
  --pro-ink: #2e1065;
  --c1: #8b5cf6;
  --c2: #d946ef;
}

/* El header es fijo: se reserva exactamente su alto (lo mide tienda-fx.js). Con el valor fijo
   de main.css (72px) quedaba una franja del fondo oscuro del body entre el header y el contenido. */
body.tienda-page { padding-top: var(--topbar-h, 72px); }

body.tienda-page .shop-main {
  background:
    radial-gradient(900px 500px at 8% 520px, rgba(217, 70, 239, 0.14), transparent 60%),
    radial-gradient(800px 480px at 95% 900px, rgba(99, 102, 241, 0.14), transparent 60%),
    radial-gradient(700px 400px at 50% 1500px, rgba(244, 114, 182, 0.12), transparent 60%),
    linear-gradient(180deg, #f3eaff 0%, #ece4fb 40%, #f6eefc 100%);
}

/* ---------- Hero ---------- */
body.tienda-page .shop-hero {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  padding: 0;
  margin-bottom: 0;
  height: clamp(420px, 44vw, 620px);
  background: linear-gradient(120deg, #2e1065 0%, #5b21b6 35%, #a21caf 70%, #db2777 100%);
  background-size: 200% 200%;
  animation: heroShift 14s ease-in-out infinite alternate;
}

body.tienda-page .shop-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image: radial-gradient(rgba(255, 255, 255, 0.18) 1.2px, transparent 1.4px);
  background-size: 26px 26px;
  mask-image: linear-gradient(180deg, #000 0%, transparent 85%);
  -webkit-mask-image: linear-gradient(180deg, #000 0%, transparent 85%);
}

body.tienda-page .shop-hero::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 56px;
  background: #f3eaff;
  clip-path: ellipse(60% 100% at 50% 100%);
  z-index: 2;
  pointer-events: none;
}

/* ---------- Carrusel de la cabecera ---------- */
.hero-slide {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 32px 72px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.7s ease, visibility 0s linear 0.7s;
}

.hero-slide.is-active {
  opacity: 1;
  visibility: visible;
  transition: opacity 0.7s ease;
  z-index: 1;
}

.hero-slide.hero-slide-img { padding: 0; background: #2e1065; }

.hero-slide-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 60%;
  transform: scale(1.06);
  transition: transform 2.6s ease-out;
}

.hero-slide-img.is-active img { transform: scale(1); }

/* La foto del banner (3:1) llena el marco */

/* Sobre una foto: sin curva inferior (taparía las ruedas) y puntos arriba */
body.tienda-page .shop-hero.on-image::after { height: 0; }
.shop-hero.on-image .hero-dots { bottom: auto; top: 12px; }

/* Degradado inferior para que se lean los puntos del carrusel */
.hero-slide-img::after {
  content: '';
  position: absolute;
  inset: auto 0 0 0;
  height: 40%;
  background: linear-gradient(180deg, transparent, rgba(46, 16, 101, 0.45));
  pointer-events: none;
}

.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 3;
  width: 46px;
  height: 46px;
  margin-top: -32px;
  display: grid;
  place-items: center;
  padding: 0 0 4px;
  font-size: 1.9rem;
  line-height: 1;
  color: #fff;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 50%;
  cursor: pointer;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  opacity: 0;
  transition: opacity 0.25s, background 0.25s, transform 0.25s;
}
.hero-arrow-prev { left: 20px; }
.hero-arrow-next { right: 20px; }
.shop-hero:hover .hero-arrow, .hero-arrow:focus-visible { opacity: 1; }
.hero-arrow:hover { background: rgba(255, 255, 255, 0.32); transform: scale(1.08); }

.hero-dots {
  position: absolute;
  left: 50%;
  bottom: 64px;
  z-index: 3;
  display: flex;
  gap: 8px;
  padding: 7px 12px;
  transform: translateX(-50%);
  background: rgba(30, 12, 60, 0.35);
  border-radius: 999px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.hero-dot {
  width: 8px;
  height: 8px;
  padding: 0;
  border: none;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.55);
  cursor: pointer;
  transition: width 0.3s, background 0.3s;
}
.hero-dot:hover { background: #fff; }
.hero-dot[aria-selected="true"] { width: 26px; background: #fff; }

@keyframes heroShift {
  from { background-position: 0% 50%; }
  to { background-position: 100% 50%; }
}

.hero-orb {
  position: absolute;
  z-index: -1;
  border-radius: 50%;
  filter: blur(46px);
  opacity: 0.55;
  animation: orbFloat 11s ease-in-out infinite;
  pointer-events: none;
}
.hero-orb-1 { width: 320px; height: 320px; background: #f0abfc; top: -90px; left: 6%; }
.hero-orb-2 { width: 260px; height: 260px; background: #818cf8; bottom: -80px; right: 10%; animation-delay: -4s; }
.hero-orb-3 { width: 180px; height: 180px; background: #fb7185; top: 30%; right: 32%; animation-delay: -7s; opacity: 0.4; }

@keyframes orbFloat {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(28px, 22px) scale(1.12); }
}

.hero-eyebrow {
  display: inline-block;
  padding: 7px 16px;
  margin-bottom: 18px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  color: #fff;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 999px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

body.tienda-page .shop-hero-content h1 {
  font-size: clamp(2rem, 5vw, 3.4rem);
  line-height: 1.1;
  letter-spacing: -0.5px;
  text-shadow: 0 6px 30px rgba(46, 16, 101, 0.35);
}

.hero-gradient-text {
  background: linear-gradient(90deg, #fde68a, #fbcfe8 45%, #c7d2fe);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: none;
}

body.tienda-page .shop-hero-content p {
  font-size: 1.2rem;
  margin-top: 4px;
}

.hero-perks {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin: 28px 0 0;
  padding: 0;
}

.hero-perks li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 18px;
  font-size: 0.92rem;
  font-weight: 600;
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: transform 0.25s, background 0.25s;
}

.hero-perks li:hover {
  transform: translateY(-3px);
  background: rgba(255, 255, 255, 0.24);
}

.hero-perks li span { color: #fde68a; }

/* ---------- Chips de categoría ---------- */
body.tienda-page .shop-content { min-width: 0; }

body.tienda-page .shop-container { padding-top: 20px; }

.category-chips {
  max-width: 100%;
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 4px 2px 8px;
  scrollbar-width: none;
}
.category-chips::-webkit-scrollbar { display: none; }

.cat-chip {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--pro-ink);
  background: rgba(255, 255, 255, 0.85);
  border: 1.5px solid rgba(139, 92, 246, 0.22);
  border-radius: 999px;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s, background 0.2s, color 0.2s, border-color 0.2s;
}

.cat-chip-icon {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  font-size: 0.8rem;
  color: #fff;
  background: linear-gradient(135deg, var(--pro-violet), var(--pro-fuchsia));
  border-radius: 50%;
}

.cat-chip:hover {
  transform: translateY(-2px);
  border-color: var(--pro-fuchsia);
  box-shadow: 0 8px 20px rgba(139, 92, 246, 0.22);
}

.cat-chip.is-active {
  color: #fff;
  background: linear-gradient(135deg, var(--pro-violet), var(--pro-fuchsia));
  border-color: transparent;
  box-shadow: 0 10px 24px rgba(123, 63, 228, 0.35);
}

.cat-chip.is-active .cat-chip-icon {
  background: rgba(255, 255, 255, 0.25);
}

.cat-chip:focus-visible,
.btn-view-details:focus-visible,
.btn-add-cart:focus-visible {
  outline: 3px solid rgba(217, 70, 239, 0.5);
  outline-offset: 2px;
}

/* ---------- Sidebar ---------- */
body.tienda-page .shop-sidebar {
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 18px 50px rgba(91, 33, 182, 0.14);
  position: sticky;
}

body.tienda-page .shop-sidebar::before {
  content: '';
  display: block;
  height: 5px;
  margin: -28px -28px 22px;
  border-radius: 16px 16px 0 0;
  background: linear-gradient(90deg, var(--pro-violet), var(--pro-fuchsia), var(--pro-pink));
}

body.tienda-page .filter-title {
  border-bottom: none;
  padding-bottom: 4px;
  color: var(--pro-ink);
}

body.tienda-page .filter-title::before {
  content: '';
  width: 36px;
  height: 36px;
  border-radius: 12px;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2.2' stroke-linecap='round'%3E%3Cline x1='4' y1='7' x2='20' y2='7'/%3E%3Cline x1='4' y1='17' x2='20' y2='17'/%3E%3Ccircle cx='9' cy='7' r='2.4' fill='white'/%3E%3Ccircle cx='15' cy='17' r='2.4' fill='white'/%3E%3C/svg%3E") center / 20px no-repeat,
    linear-gradient(135deg, var(--pro-violet), var(--pro-fuchsia));
  box-shadow: 0 6px 16px rgba(123, 63, 228, 0.35);
}

body.tienda-page .btn-clear-filters {
  background: linear-gradient(135deg, var(--pro-violet), var(--pro-fuchsia));
  box-shadow: 0 8px 20px rgba(123, 63, 228, 0.3);
}

body.tienda-page .filter-label::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--pro-violet), var(--pro-fuchsia));
}

body.tienda-page .filter-search,
body.tienda-page .price-input {
  border: 1.5px solid rgba(139, 92, 246, 0.2);
  background: rgba(255, 255, 255, 0.95);
}

body.tienda-page .filter-search:focus,
body.tienda-page .price-input:focus {
  border-color: var(--pro-fuchsia);
  box-shadow: 0 0 0 4px rgba(217, 70, 239, 0.14);
}

body.tienda-page .filter-checkbox {
  position: relative;
  border: 1.5px solid transparent;
  transition: background 0.2s, border-color 0.2s, transform 0.2s;
}

body.tienda-page .filter-checkbox:hover {
  background: rgba(139, 92, 246, 0.09);
  transform: translateX(3px);
}

body.tienda-page .filter-checkbox:has(input:checked) {
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.14), rgba(217, 70, 239, 0.14));
  border-color: rgba(139, 92, 246, 0.35);
}

body.tienda-page .filter-checkbox:has(input:checked) span {
  color: var(--pro-violet);
  font-weight: 700;
}

body.tienda-page .filter-checkbox input[type="checkbox"] {
  accent-color: var(--pro-violet);
}

body.tienda-page .price-range { background: linear-gradient(to right, var(--pro-violet) 0%, var(--pro-fuchsia) var(--range-progress, 100%), #e4d4f7 var(--range-progress, 100%), #e4d4f7 100%); }
body.tienda-page .price-range-container { overflow: visible; padding: 0 10px; }
body.tienda-page .price-range::-webkit-slider-thumb { border-color: var(--pro-fuchsia); }
body.tienda-page .price-range::-moz-range-thumb { border-color: var(--pro-fuchsia); }

/* ---------- Toolbar ---------- */
body.tienda-page .shop-toolbar {
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 10px 30px rgba(91, 33, 182, 0.1);
}

body.tienda-page .results-count {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  color: var(--pro-violet);
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.14), rgba(217, 70, 239, 0.14));
}

body.tienda-page .results-count::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.6);
  animation: livePulse 2s infinite;
}

@keyframes livePulse {
  70% { box-shadow: 0 0 0 8px rgba(34, 197, 94, 0); }
  100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); }
}

body.tienda-page .sort-select:hover,
body.tienda-page .sort-select:focus {
  border-color: var(--pro-fuchsia);
}

body.tienda-page .view-btn.active {
  color: #fff;
  background: linear-gradient(135deg, var(--pro-violet), var(--pro-fuchsia));
  box-shadow: 0 4px 12px rgba(123, 63, 228, 0.35);
}

/* ---------- Tarjetas ---------- */
.shop-product-card {
  --mx: 50%;
  --my: 0px;
  position: relative;
  isolation: isolate;
  border: 1px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 10px 30px rgba(91, 33, 182, 0.1);
  animation: cardIn 0.55s cubic-bezier(0.22, 1, 0.36, 1) both;
  animation-delay: calc(var(--i, 0) * 45ms);
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.35s;
}

@keyframes cardIn {
  from { opacity: 0; transform: translateY(26px) scale(0.97); }
  to { opacity: 1; transform: none; }
}

/* Franja de color superior, propia de cada categoría */
.shop-product-card::before {
  content: '';
  position: absolute;
  inset: 0 0 auto 0;
  height: 5px;
  z-index: 4;
  border-radius: var(--radius) var(--radius) 0 0;
  background: linear-gradient(90deg, var(--c1), var(--c2));
}

/* Luz que sigue al cursor */
.shop-product-card::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 3;
  border-radius: inherit;
  pointer-events: none;
  opacity: 0;
  background: radial-gradient(260px circle at var(--mx) var(--my), color-mix(in srgb, var(--c2) 22%, transparent), transparent 70%);
  transition: opacity 0.3s;
}

.shop-product-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 24px 50px color-mix(in srgb, var(--c1) 30%, transparent);
}

.shop-product-card:hover::after { opacity: 1; }

.products-grid.list-view .shop-product-card:hover { transform: translateY(-4px); }

.shop-product-card[data-cat="depilacion"], .shop-product-card[data-cat="laser"] { --c1: #c026d3; --c2: #f472b6; }
.shop-product-card[data-cat="hifu"] { --c1: #4f46e5; --c2: #818cf8; }
.shop-product-card[data-cat="criolipolisis"], .shop-product-card[data-cat="vacum"] { --c1: #0891b2; --c2: #67e8f9; }
.shop-product-card[data-cat="hiemt"], .shop-product-card[data-cat="presoterapia"] { --c1: #ea580c; --c2: #fbbf24; }
.shop-product-card[data-cat="radiofrecuencia"] { --c1: #e11d48; --c2: #fb7185; }
.shop-product-card[data-cat="cavitacion"], .shop-product-card[data-cat="lipolaser"] { --c1: #2563eb; --c2: #38bdf8; }
.shop-product-card[data-cat="equipos faciales"], .shop-product-card[data-cat="estetica"] { --c1: #db2777; --c2: #f9a8d4; }
.shop-product-card[data-cat="equipos corporales"] { --c1: #059669; --c2: #6ee7b7; }
.shop-product-card[data-cat="packs promocionales"] { --c1: #d97706; --c2: #fde047; }

.shop-product-image {
  border-radius: var(--radius) var(--radius) 0 0;
  background:
    radial-gradient(circle at 50% 38%, #fff 0%, color-mix(in srgb, var(--c2) 16%, #fff) 70%, color-mix(in srgb, var(--c1) 14%, #fff) 100%);
}

.shop-product-image img {
  background: transparent;
  mix-blend-mode: multiply;
  transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.3s;
}

.shop-product-card:hover .shop-product-image img.active {
  transform: scale(1.08) translateY(-3px);
}

.img-nav {
  background: rgba(255, 255, 255, 0.9);
  color: var(--c1);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
}
.img-nav:hover { background: var(--c1); color: #fff; }

.image-indicators { background: rgba(30, 12, 60, 0.55); }

/* Badges */
.product-badge {
  padding: 6px 13px;
  border-radius: 999px;
  font-size: 0.7rem;
  letter-spacing: 0.8px;
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.18);
}
.product-badge.nuevo { background: linear-gradient(135deg, #10b981, #34d399); }
.product-badge.oferta { background: linear-gradient(135deg, #f43f5e, #fb923c); animation: badgePulse 2.4s ease-in-out infinite; }
.product-badge.destacado { background: linear-gradient(135deg, #f59e0b, #fde047); color: #5b3a00; }
.product-badge.agotado { background: linear-gradient(135deg, #6b7280, #9ca3af); }

@keyframes badgePulse {
  50% { transform: scale(1.07); }
}

/* Contenido */
.shop-product-content {
  height: auto;
  min-height: 215px;
}
.shop-product-content > * { flex-shrink: 0; }

.shop-product-category {
  display: inline-block;
  width: fit-content;
  max-width: 100%;
  height: auto;
  padding: 3px 10px;
  font-size: 0.7rem;
  color: var(--c1);
  background: color-mix(in srgb, var(--c1) 11%, #fff);
  border-radius: 999px;
}

.shop-product-name {
  color: var(--pro-ink);
  transition: color 0.2s;
}
.shop-product-card:hover .shop-product-name { color: var(--c1); }

/* Siempre 3 etiquetas (las elige tienda.js). Si no caben en una fila pasan a la siguiente; las
   muy largas se acortan con "…" y el texto completo queda en el tooltip (atributo title). */
.shop-product-specs {
  flex-wrap: wrap;
  align-content: flex-start;
  gap: 6px;
  margin-top: 8px;
}

.spec-tag {
  flex: 0 1 auto;
  min-width: 0;
  max-width: 100%;
  padding: 4px 9px;
  font-size: 0.72rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--c1);
  background: color-mix(in srgb, var(--c1) 9%, #fff);
  border: 1px solid color-mix(in srgb, var(--c1) 22%, transparent);
  border-radius: 999px;
}

.shop-product-footer {
  border-radius: 0 0 var(--radius) var(--radius);
  border-top: 1px dashed color-mix(in srgb, var(--c1) 30%, transparent);
  background: linear-gradient(180deg, transparent, color-mix(in srgb, var(--c2) 8%, #fff));
}

.shop-product-price {
  background: linear-gradient(90deg, var(--c1), var(--c2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.shop-product-price.oferta {
  background: linear-gradient(135deg, #f43f5e, #fb923c);
  -webkit-background-clip: border-box;
  background-clip: border-box;
  color: #fff;
  border: none;
  border-radius: 999px;
  padding: 5px 14px;
  box-shadow: 0 6px 16px rgba(244, 63, 94, 0.35);
  text-shadow: none;
}

/* Botones */
.btn-view-details {
  color: var(--c1);
  border: 2px solid var(--c1);
  background: transparent;
  border-radius: 999px;
}

.btn-view-details:hover:not(:disabled) {
  background: var(--c1);
  color: #fff;
  box-shadow: 0 8px 20px color-mix(in srgb, var(--c1) 40%, transparent);
}

.btn-add-cart {
  position: relative;
  overflow: hidden;
  border-radius: 999px;
  border: 2px solid transparent;
  background: linear-gradient(135deg, var(--c1), var(--c2));
  box-shadow: 0 8px 18px color-mix(in srgb, var(--c1) 35%, transparent);
}

.btn-add-cart::after {
  content: '';
  position: absolute;
  top: 0;
  left: -120%;
  width: 60%;
  height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.45), transparent);
  transform: skewX(-20deg);
  transition: left 0.6s;
}

.btn-add-cart:hover:not(:disabled) {
  background: linear-gradient(135deg, var(--c1), var(--c2));
  border-color: transparent;
  filter: saturate(1.15);
  box-shadow: 0 12px 26px color-mix(in srgb, var(--c1) 45%, transparent);
}

.btn-add-cart:hover:not(:disabled)::after { left: 140%; }
.btn-add-cart:active:not(:disabled) { transform: scale(0.96); }

.btn-add-cart:disabled {
  background: #d4c8e6;
  box-shadow: none;
}

/* ---------- Paginación ---------- */
body.tienda-page .pagination-number.active {
  background: linear-gradient(135deg, var(--pro-violet), var(--pro-fuchsia));
  border-color: transparent;
  box-shadow: 0 8px 18px rgba(123, 63, 228, 0.35);
}

body.tienda-page .pagination-number:hover,
body.tienda-page .pagination-btn:not(.disabled):hover {
  transform: translateY(-2px);
}

/* ---------- Responsive ---------- */

/* Tablet y móvil: la barra lateral deja de ser sticky y se despliega en el flujo */
@media (max-width: 1023px) {
  body.tienda-page .shop-sidebar {
    position: relative;
    top: auto;
    width: 100%;
    max-height: none;
  }

  body.tienda-page .mobile-filter-toggle {
    color: #fff;
    background: linear-gradient(135deg, var(--pro-violet), var(--pro-fuchsia));
    border: none;
    border-radius: 14px;
    box-shadow: 0 10px 24px rgba(123, 63, 228, 0.32);
  }

  body.tienda-page .mobile-filter-toggle:hover,
  body.tienda-page .mobile-filter-toggle:active {
    color: #fff;
    background: linear-gradient(135deg, var(--pro-violet), var(--pro-fuchsia));
    filter: brightness(1.08);
  }
}

/* Tablet y PC: el banner tiene el mismo ancho que el contenido (de los filtros a la última
   columna de productos): mismo máximo (1400px) y mismos márgenes que .shop-container. */
@media (min-width: 520px) {
  body.tienda-page .shop-main { padding-top: 20px; }
  body.tienda-page .shop-hero {
    width: min(calc(100% - 32px), 1368px);
    height: auto;
    aspect-ratio: 3 / 2;
    margin: 0 auto;
    border-radius: 24px;
    box-shadow: 0 24px 60px rgba(91, 33, 182, 0.28);
  }
  body.tienda-page .shop-hero::after { display: none; }
  .hero-slide.hero-slide-img { background: transparent; }
  .hero-slide-img img { object-position: center; }
  .hero-slide-img::after { display: none; }
  .hero-slide { padding: 32px 32px 64px; }
  .hero-dots { bottom: 16px; }
  .shop-hero.on-image .hero-dots { top: 14px; bottom: auto; }
  body.tienda-page .shop-container { padding-top: 32px; }
}

@media (min-width: 768px) {
  body.tienda-page .shop-hero { width: min(calc(100% - 60px), 1340px); }
}

/* PC: mismo ancho que el contenido (filtros → última columna) y 3:1 de proporción. La foto
   panorámica (3:1) llena todo el ancho del banner sin recortes. */
@media (min-width: 1024px) {
  body.tienda-page .shop-hero { width: min(calc(100% - 80px), 1320px); aspect-ratio: 3 / 1; }
  .hero-slide-img img { object-position: center; }
  .hero-slide { padding: 24px 32px 48px; }
  .hero-slide .hero-perks { margin-top: 16px; }
}

/* Tablet */
@media (min-width: 768px) and (max-width: 1023px) {
  .hero-perks li { font-size: 0.85rem; padding: 8px 14px; }
}

/* Móvil */
@media (max-width: 519px) {
  body.tienda-page .shop-hero { height: clamp(300px, 86vw, 380px); }
}

/* Tablet: con la foto panorámica (3:1) el banner toma su proporción y se ve entera, sin
   recortes ni franjas; con la diapositiva de texto conserva su altura. En celular (<768px)
   la foto usa el mismo marco que el texto, con una imagen de formato casi cuadrado. */
@media (min-width: 768px) and (max-width: 1023px) {
  body.tienda-page .shop-hero.on-image { height: auto; min-height: 0; aspect-ratio: 3 / 1; }
}

@media (max-width: 767px) {
  /* Cabecera compacta: logo, carrito y menú en una fila; buscador debajo */
  body.tienda-page { padding-top: var(--topbar-h, 112px); }
  body.tienda-page header.topbar { padding: 8px 14px; gap: 8px; }
  body.tienda-page .logo { margin-right: auto; }
  body.tienda-page .logo-img { height: 32px; }
  body.tienda-page .hamburger-btn { order: 3; padding: 6px; }
  body.tienda-page .actions { order: 2; }
  body.tienda-page .cart-btn { padding: 8px 12px; }
  body.tienda-page .search-input { padding: 8px 12px; }

  /* Hero / carrusel: todas las diapositivas miden lo mismo (proporcional al ancho) */
  body.tienda-page .shop-hero { min-height: 0; }
  .hero-slide { padding: 16px 16px 40px; }
  body.tienda-page .shop-hero-content h1,
  body.tienda-page .shop-hero-content p { display: block; }
  body.tienda-page .shop-hero-content h1 { font-size: clamp(1.4rem, 6.6vw, 1.8rem); margin-bottom: 6px; }
  body.tienda-page .shop-hero-content p { font-size: 0.92rem; margin: 0; }
  .hero-eyebrow { margin-bottom: 8px; padding: 5px 11px; font-size: 0.62rem; letter-spacing: 1px; }
  .hero-perks { flex-direction: row; flex-wrap: wrap; justify-content: center; gap: 6px; margin-top: 12px; }
  .hero-perks li { font-size: 0.72rem; padding: 5px 10px; gap: 5px; }

  /* Foto: llena el mismo marco que la diapositiva de texto */
  .hero-slide.hero-slide-img { padding: 0; }
  .hero-slide-img img { object-fit: cover; object-position: center; transform: none; }
  .hero-slide-img picture { display: block; width: 100%; height: 100%; }
  .hero-slide-img::after { display: none; }
  .hero-arrow { display: none; }
  .hero-dots { bottom: 46px; transition: bottom 0.3s, top 0.3s; }
  body.tienda-page .shop-hero::after { height: 32px; transition: height 0.5s ease; }

  /* Sobre una foto: sin curva inferior y puntos arriba, para no tapar las máquinas */
  body.tienda-page .shop-hero.on-image::after { height: 0; }
  .shop-hero.on-image .hero-dots { bottom: auto; top: 10px; }

  /* Contenido */
  body.tienda-page .shop-container { padding: 16px 16px 0; }
  .category-chips { max-width: none; margin-inline: -16px; padding-inline: 16px; }
  .cat-chip { padding: 9px 15px; font-size: 0.85rem; }
  body.tienda-page .shop-sidebar::before { margin: -16px -16px 16px; }
  body.tienda-page .view-toggle { display: none; }
  body.tienda-page .results-count { align-self: flex-start; }

  /* Tarjetas: altura según contenido en una sola columna */
  body.tienda-page .products-grid,
  body.tienda-page .products-grid.list-view { grid-template-columns: minmax(0, 1fr); }
  body.tienda-page .footer-legal { flex-wrap: wrap; }
  .shop-product-content { height: auto; min-height: 0; }
  .shop-product-name { min-height: 0; }
  .shop-product-card:hover { transform: none; }
  .shop-product-image { height: auto; aspect-ratio: 4 / 3; }
  .products-grid.list-view .shop-product-image { aspect-ratio: 4 / 3; height: auto; padding-top: 0; }
  .img-nav { opacity: 1; width: 30px; height: 30px; }
  .product-badges { flex-direction: row; flex-wrap: wrap; gap: 6px; right: 12px; }
  .product-badge { padding: 4px 10px; font-size: 0.65rem; }

  /* Botón de WhatsApp: que no tape los botones de las tarjetas */
  body.tienda-page .shop-product-actions { padding-right: 0; }
}

/* Móviles anchos / tablet vertical: 2 columnas */
@media (min-width: 520px) and (max-width: 767px) {
  body.tienda-page .products-grid,
  body.tienda-page .products-grid.list-view { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .products-grid.list-view .shop-product-card { flex-direction: column; }
  .shop-product-actions { flex-direction: column; }
  .shop-product-actions .btn-view-details,
  .shop-product-actions .btn-add-cart { width: 100%; flex: none; }
}

/* Móviles muy angostos */
@media (max-width: 400px) {
  body.tienda-page .cart-label { display: none; }
  .shop-product-actions { flex-direction: column; }
  .shop-product-actions .btn-view-details,
  .shop-product-actions .btn-add-cart { width: 100%; flex: none; }
}

@media (max-width: 360px) {
  body.tienda-page header.topbar { padding: 8px 10px; }
  body.tienda-page .logo-img { height: 26px; }
  body.tienda-page .cart-btn { padding: 6px 8px; }
  body.tienda-page .hamburger-btn { padding: 4px; }
  body.tienda-page .shop-container { padding-inline: 12px; }
  .category-chips { margin-inline: -12px; padding-inline: 12px; }
}

/* Pantallas táctiles: sin efectos hover que se queden "pegados" tras tocar */
@media (hover: none) {
  .shop-product-card:hover { transform: none; box-shadow: 0 10px 30px rgba(91, 33, 182, 0.1); }
  .shop-product-card:hover::after { opacity: 0; }
  .shop-product-card:hover .shop-product-name { color: var(--pro-ink); }
  .shop-product-card:hover .shop-product-image img.active { transform: none; }
  .hero-arrow { display: none; }
}

/* ---------- Accesibilidad ---------- */
@media (prefers-reduced-motion: reduce) {
  .hero-orb,
  .hero-slide-img img { transition: none; transform: none; }
  body.tienda-page .shop-hero,
  .hero-orb,
  .shop-product-card,
  .product-badge.oferta,
  body.tienda-page .results-count::before {
    animation: none;
  }
  .shop-product-card:hover { transform: none; }
}
