/* ===== ANIMACIONES CUSTOM ===== */

[x-cloak] {
  display: none !important;
}

/* Animación de hojas cayendo en el hero */
.leaf-animation {
  background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><text y="50" font-size="40">🍃</text></svg>');
  background-size: 100px 100px;
  animation: fall 20s linear infinite;
  width: 100%;
  height: 100%;
}

@keyframes fall {
  0% {
    transform: translateY(-100px) rotate(0deg);
  }
  100% {
    transform: translateY(100vh) rotate(360deg);
  }
}

/* Patrón de árbol en sección Mapamave */
.tree-pattern {
  background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><text y="50" font-size="60">🌳</text></svg>');
  background-size: 200px 200px;
  width: 100%;
  height: 100%;
}

/* Pulse animation para logo Mapamave */
.pulse-animation {
  animation: pulse 3s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% {
    transform: scale(1);
    filter: drop-shadow(0 0 10px rgba(201, 169, 97, 0.5));
  }
  50% {
    transform: scale(1.05);
    filter: drop-shadow(0 0 20px rgba(201, 169, 97, 0.8));
  }
}

/* Smooth scroll */
html {
  scroll-behavior: smooth;
}

section[id] {
  scroll-margin-top: 7rem;
}

/* Transiciones suaves en botones */
button, a {
  transition: all 0.3s ease;
}

/* Hover effect en cards de productos */
.transform:hover {
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

/* Animación de entrada para el navbar */
header {
  animation: slideDown 0.5s ease-out;
}

@keyframes slideDown {
  from {
    transform: translateY(-100%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* Efecto parallax suave en hero */
#inicio {
  background-attachment: fixed;
  background-size: cover;
}

/* Animación de fade para elementos al hacer hover */
.hover\:scale-105:hover {
  transform: scale(1.05);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Glow effect en botones principales */
.bg-mapamave-gold:hover {
  box-shadow: 0 0 20px rgba(201, 169, 97, 0.6);
}

/* Animación de aparición gradual */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Responsive: ajustes para móvil */
@media (max-width: 768px) {
  h1 {
    font-size: 2.5rem;
  }
  
  h2 {
    font-size: 2rem;
  }
}

/* ===== ANIMACIONES CUSTOM ===== */

/* Animación de hojas cayendo en el hero */
.leaf-animation {
  background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><text y="50" font-size="40">🍃</text></svg>');
  background-size: 100px 100px;
  animation: fall 20s linear infinite;
  width: 100%;
  height: 100%;
}

@keyframes fall {
  0% {
    transform: translateY(-100px) rotate(0deg);
  }
  100% {
    transform: translateY(100vh) rotate(360deg);
  }
}

/* Patrón de árbol en sección Mapamave */
.tree-pattern {
  background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><text y="50" font-size="60">🌳</text></svg>');
  background-size: 200px 200px;
  width: 100%;
  height: 100%;
}

/* Pulse animation para logo Mapamave */
.pulse-animation {
  animation: pulse 3s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% {
    transform: scale(1);
    filter: drop-shadow(0 0 10px rgba(201, 169, 97, 0.5));
  }
  50% {
    transform: scale(1.05);
    filter: drop-shadow(0 0 20px rgba(201, 169, 97, 0.8));
  }
}

/* ===== HERO VIDEO ANIMATIONS ===== */

/* Video overlay que se difumina GRADUALMENTE */
#videoOverlay {
  backdrop-filter: blur(0px);
  opacity: 0; /* Empieza más oscuro */
  transition: all 2s ease-out; /* IMPORTANTE: transición suave */
}

#videoOverlay.blur-active {
  backdrop-filter: blur(5px); /* Menos blur */
  opacity: 0.3; /* Más transparente para que se vea el video */
}


/* Animación de letras desde abajo */
.hero-letter {
  display: inline-block;
  opacity: 0;
  transform: translateY(50px);
  animation: letterSlideUp 0.6s ease-out forwards;
}

@keyframes letterSlideUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Delay progresivo para cada letra */
.hero-letter:nth-child(1) { animation-delay: 0.1s; }
.hero-letter:nth-child(2) { animation-delay: 0.15s; }
.hero-letter:nth-child(3) { animation-delay: 0.2s; }
.hero-letter:nth-child(4) { animation-delay: 0.25s; }
.hero-letter:nth-child(5) { animation-delay: 0.3s; }
.hero-letter:nth-child(6) { animation-delay: 0.35s; }
.hero-letter:nth-child(7) { animation-delay: 0.4s; }
.hero-letter:nth-child(8) { animation-delay: 0.45s; }
.hero-letter:nth-child(9) { animation-delay: 0.5s; }
.hero-letter:nth-child(10) { animation-delay: 0.55s; }
.hero-letter:nth-child(11) { animation-delay: 0.6s; }
.hero-letter:nth-child(12) { animation-delay: 0.65s; }
.hero-letter:nth-child(13) { animation-delay: 0.7s; }
.hero-letter:nth-child(14) { animation-delay: 0.75s; }
.hero-letter:nth-child(15) { animation-delay: 0.8s; }

/* Animación del subtítulo */
.hero-subtitle {
  opacity: 0;
  animation: fadeInUp 0.8s ease-out 1.2s forwards;
}

/* Animación del botón */
.hero-button {
  opacity: 0;
  animation: fadeInUp 0.8s ease-out 1.6s forwards;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Smooth scroll */
html {
  scroll-behavior: smooth;
}

/* Transiciones suaves en botones */
button, a {
  transition: all 0.3s ease;
}

/* Hover effect en cards de productos */
.transform:hover {
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

/* Animación de entrada para el navbar */
header {
  animation: slideDown 0.5s ease-out;
}

@keyframes slideDown {
  from {
    transform: translateY(-100%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* Glow effect en botones principales */
.bg-mapamave-gold:hover {
  box-shadow: 0 0 20px rgba(201, 169, 97, 0.6);
}

/* Responsive: ajustes para móvil */
@media (max-width: 768px) {
  h1 {
    font-size: 2.5rem;
  }
  
  h2 {
    font-size: 2rem;
  }
}

/* ===== MODAL ANIMATION ===== */
.animate-modal {
  animation: modalSlideIn 0.35s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: translateY(-30px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* ===== SEGURIDAD CSS ===== */

/* Bloquear selección de texto en toda la página */
* {
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

/* Permitir selección SOLO en inputs y textareas */
input, textarea {
  -webkit-user-select: text;
  -moz-user-select: text;
  -ms-user-select: text;
  user-select: text;
}

/* Bloquear arrastre de imágenes */
img {
  -webkit-user-drag: none;
  -khtml-user-drag: none;
  -moz-user-drag: none;
  -o-user-drag: none;
  pointer-events: none;
}

/* Permitir clicks en imágenes que son botones/links */
a img, button img {
  pointer-events: auto;
}

/* Ocultar cursor en imágenes */
img {
  cursor: default;
}

/* Anti-screenshot overlay sutil (dificulta capturas en algunos navegadores) */
@media print {
  body {
    display: none !important;
  }
}

/* ===== HOME ENHANCEMENTS: BLUR + 3D ===== */
.hero-3d-shell {
  transform: perspective(1200px) rotateX(7deg) rotateY(-7deg) translateZ(0);
  transition: transform 700ms cubic-bezier(0.22, 1, 0.36, 1), box-shadow 700ms ease;
}

.hero-3d-shell:hover {
  transform: perspective(1200px) rotateX(2deg) rotateY(0deg) translateY(-6px);
}

.categoria-grid {
  perspective: 1300px;
}

.categoria-grid > * {
  border: 1px solid rgba(255, 255, 255, 0.65);
  backdrop-filter: blur(3px);
  transform: translateZ(0) scale(1);
  transition: transform 320ms cubic-bezier(0.22, 1, 0.36, 1), box-shadow 320ms ease;
}

.categoria-grid > *:hover {
  transform: translateY(-6px) scale(1.035);
  box-shadow: 0 22px 38px rgba(20, 40, 32, 0.16);
  z-index: 4;
}

@media (max-width: 768px) {
  .hero-3d-shell {
    transform: none;
  }

  .category-grid-wrap {
    padding: 0.7rem;
    border-radius: 1.6rem;
  }

  .category-grid-wrap::before,
  .category-grid-wrap::after {
    width: 6rem;
    height: 6rem;
    opacity: 0.62;
  }

  .hero-3d-shell:hover,
  .categoria-grid > *:hover {
    transform: translateY(-3px) scale(1.01);
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-3d-shell,
  .categoria-grid > *,
  .pulse-animation,
  .hero-letter,
  .hero-subtitle,
  .hero-button {
    animation: none !important;
    transition: none !important;
    transform: none !important;
  }

  .hero-content-fade {
    opacity: 1;
    filter: none;
  }
}

/* ===== SUCURSALES PREMIUM ===== */
.sucursales-premium .flex.justify-center.gap-6.mb-12 > div {
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.65);
  box-shadow: 0 12px 30px rgba(20, 40, 32, 0.12);
  transition: transform 350ms ease, box-shadow 350ms ease;
}

.sucursales-premium .flex.justify-center.gap-6.mb-12 > div:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 35px rgba(20, 40, 32, 0.18);
}

.sucursales-premium .bg-white.rounded-2xl.shadow-lg,
.sucursales-premium .bg-white.rounded-2xl.shadow-xl {
  border: 1px solid rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(6px);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(255, 255, 255, 0.86));
  transform: perspective(1200px) rotateX(0deg) rotateY(0deg);
  transition: transform 500ms cubic-bezier(0.22, 1, 0.36, 1), box-shadow 500ms ease;
}

.sucursales-premium .bg-white.rounded-2xl.shadow-lg:hover,
.sucursales-premium .bg-white.rounded-2xl.shadow-xl:hover {
  transform: perspective(1200px) translateY(-10px) rotateX(4deg) rotateY(-3deg);
  box-shadow: 0 28px 48px rgba(20, 40, 32, 0.2);
}

.sucursales-premium a[href*='google.com/maps/dir'],
.sucursales-premium a[href^='tel:'] {
  transition: transform 250ms ease, filter 250ms ease;
}

.sucursales-premium a[href*='google.com/maps/dir']:hover,
.sucursales-premium a[href^='tel:']:hover {
  transform: translateY(-1px);
  filter: saturate(1.1);
}

/* ===== NIGHT VARIANT ===== */
.theme-night {
  color: #e5e7eb;
  background: radial-gradient(circle at 20% 20%, rgba(18, 48, 38, 0.65), transparent 35%),
    radial-gradient(circle at 80% 80%, rgba(110, 84, 34, 0.35), transparent 35%),
    linear-gradient(180deg, #071913 0%, #0b221a 45%, #122820 100%) !important;
}

.theme-night header {
  background: rgba(8, 28, 22, 0.72) !important;
  border-color: rgba(126, 242, 180, 0.22);
  box-shadow: 0 14px 35px rgba(0, 0, 0, 0.28);
}

.theme-night header ul a {
  color: #d1fae5;
}

.theme-night header ul a:hover {
  color: #fcd34d;
}

.theme-night #loginBtn {
  color: #c7f9d8;
  border-color: rgba(126, 242, 180, 0.45);
  background: rgba(16, 56, 43, 0.45);
}

.theme-night #userBtn,
.theme-night #themeToggle {
  background: rgba(16, 56, 43, 0.58);
  border-color: rgba(126, 242, 180, 0.32);
  color: #d1fae5;
}

.theme-night #userNombre {
  color: #d1fae5;
}

.theme-night header div[class*='bg-white/90'] {
  background: rgba(8, 28, 22, 0.9);
  border-color: rgba(126, 242, 180, 0.22);
}

.theme-night header div[class*='bg-white/90'] a {
  color: #d1fae5;
}

.theme-night .hero-3d-shell {
  background: rgba(7, 24, 19, 0.42);
  border-color: rgba(167, 243, 208, 0.3);
  box-shadow: 0 25px 55px rgba(2, 8, 6, 0.42);
}

.theme-night #productos {
  background: linear-gradient(180deg, rgba(10, 34, 27, 0.86) 0%, rgba(12, 39, 31, 0.82) 55%, rgba(18, 37, 30, 0.88) 100%) !important;
}

.theme-night #sucursales {
  background: linear-gradient(180deg, rgba(10, 34, 27, 0.9) 0%, rgba(16, 39, 31, 0.9) 100%) !important;
}

.theme-night #productos h2,
.theme-night #sucursales h2,
.theme-night #mapamave h2,
.theme-night #contacto h2 {
  color: #d4f3dd;
}

.theme-night #productos > div > p,
.theme-night #sucursales > div > p {
  color: #bdd6cb;
}

.theme-night .categoria-grid > *,
.theme-night .sucursales-premium .bg-white.rounded-2xl.shadow-lg,
.theme-night .sucursales-premium .bg-white.rounded-2xl.shadow-xl {
  background: linear-gradient(140deg, rgba(16, 39, 32, 0.88), rgba(20, 48, 38, 0.8));
  border-color: rgba(134, 239, 172, 0.22);
  box-shadow: 0 22px 42px rgba(0, 0, 0, 0.3);
}

.theme-night .categoria-grid > * p,
.theme-night .sucursales-premium .bg-white p,
.theme-night .sucursales-premium .bg-white span {
  color: #dbe7e2;
}

.theme-night .categoria-grid > * [class*='bg-'][class*='50'],
.theme-night .sucursales-premium .bg-amber-50,
.theme-night .sucursales-premium .bg-green-50 {
  background: rgba(255, 255, 255, 0.08) !important;
  border-color: rgba(255, 255, 255, 0.15) !important;
}

.theme-night footer {
  background: #06120f;
}

/* ===== DYNAMIC SHOWCASES + LEAF RAIN ===== */
.has-leaf-rain {
  position: relative;
}

.leaf-drop {
  position: absolute;
  top: -10vh;
  display: inline-block;
  animation-name: leafFall;
  animation-timing-function: linear;
  animation-iteration-count: infinite;
  filter: drop-shadow(0 2px 4px rgba(18, 48, 38, 0.18));
}

@keyframes leafFall {
  0% {
    transform: translate3d(0, -8vh, 0) rotate(0deg);
  }
  50% {
    transform: translate3d(var(--leaf-drift, 22px), 52vh, 0) rotate(120deg);
  }
  100% {
    transform: translate3d(calc(var(--leaf-drift, 22px) * -0.35), 112vh, 0) rotate(240deg);
  }
}

.hero-video-cinematic {
  filter: saturate(1.12) contrast(1.06) brightness(0.92);
  transition: transform 6s ease, filter 1.4s ease;
}

.hero-video-ready {
  transform: scale(1.06);
  filter: saturate(1.16) contrast(1.08) brightness(0.95);
}

.marquee-shell-x,
.marquee-shell-y {
  position: relative;
  overflow: hidden;
  border-radius: 1.25rem;
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.85);
}

.marquee-shell-x {
  min-height: 250px;
}

.marquee-shell-y {
  height: 402px;
}

.marquee-track-x {
  display: flex;
  width: max-content;
  animation: marqueeX 34s linear infinite;
}

.marquee-strip {
  display: flex;
  gap: 14px;
  padding: 14px;
}

.marquee-track-y {
  display: flex;
  flex-direction: column;
  animation: marqueeY 28s linear infinite;
}

.marquee-column {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 12px;
}

.marquee-shell-x:hover .marquee-track-x,
.marquee-shell-y:hover .marquee-track-y {
  animation-play-state: paused;
}

@keyframes marqueeX {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

@keyframes marqueeY {
  0% { transform: translateY(-50%); }
  100% { transform: translateY(0%); }
}

.destacado-card {
  width: 230px;
  border-radius: 1rem;
  overflow: hidden;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.98), rgba(247, 255, 250, 0.9));
  border: 1px solid rgba(213, 241, 224, 0.9);
  box-shadow: 0 10px 28px rgba(17, 48, 36, 0.12);
}

.destacado-img-wrap {
  height: 132px;
  background: linear-gradient(140deg, #ecfdf5, #d1fae5);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.destacado-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.destacado-emoji {
  font-size: 2rem;
}

.mapamave-drop-card {
  border-radius: 0.9rem;
  padding: 0.75rem 0.85rem;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.98), rgba(255, 248, 230, 0.95));
  border: 1px solid rgba(226, 214, 177, 0.7);
  box-shadow: 0 8px 20px rgba(54, 42, 15, 0.12);
}

.brands-showcase-shell {
  border-radius: 1.6rem;
  border: 1px solid rgba(177, 226, 203, 0.9);
  background: linear-gradient(150deg, rgba(255, 255, 255, 0.9), rgba(232, 250, 239, 0.9));
  box-shadow: 0 20px 55px rgba(28, 88, 60, 0.14);
  padding: 0.8rem;
  display: grid;
  gap: 0.7rem;
  grid-template-columns: minmax(0, 1fr);
}

.brands-spotlight {
  min-height: 218px;
}

.brands-spotlight-card {
  border-radius: 1.2rem;
  border: 1px solid color-mix(in srgb, var(--brand-accent) 28%, white);
  background:
    radial-gradient(circle at 12% 18%, var(--brand-accent-soft), transparent 44%),
    radial-gradient(circle at 88% 82%, rgba(255, 255, 255, 0.8), transparent 46%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.96), rgba(240, 255, 247, 0.92));
  box-shadow: 0 16px 34px rgba(23, 78, 56, 0.16);
  padding: 1rem;
  display: grid;
  gap: 0.65rem;
  animation: brandsReveal 260ms ease;
}

@keyframes brandsReveal {
  from { opacity: 0; transform: translateY(4px) scale(0.995); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.brands-spotlight-badge {
  margin: 0;
  display: inline-flex;
  width: fit-content;
  border-radius: 999px;
  padding: 0.28rem 0.65rem;
  border: 1px solid color-mix(in srgb, var(--brand-accent) 34%, white);
  color: color-mix(in srgb, var(--brand-accent) 78%, #153f31);
  font-size: 0.66rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.brands-spotlight-head {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: 5rem minmax(0, 1fr);
  align-items: start;
}

.brand-hero-logo-shell {
  width: 5rem;
  height: 5rem;
  border-radius: 1rem;
  border: 1px solid color-mix(in srgb, var(--brand-accent) 24%, white);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.9), color-mix(in srgb, var(--brand-accent) 12%, white));
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.brand-hero-logo {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.brand-hero-logo-fallback {
  font-size: 2rem;
}

.brands-spotlight-title {
  margin: 0;
  color: #104833;
  font-size: 1.15rem;
  font-weight: 900;
  line-height: 1.2;
}

.brands-spotlight-copy {
  margin: 0.32rem 0 0;
  color: #4e7265;
  font-size: 0.79rem;
  line-height: 1.54;
}

.brands-spotlight-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.brands-spotlight-pill {
  border-radius: 999px;
  padding: 0.26rem 0.68rem;
  border: 1px solid color-mix(in srgb, var(--brand-accent) 20%, white);
  background: rgba(255, 255, 255, 0.66);
  color: color-mix(in srgb, var(--brand-accent) 66%, #174737);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.brands-spotlight-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.brands-compact-controls {
  display: grid;
  gap: 0.55rem;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
}

.brands-cycle-btn {
  border-radius: 999px;
  border: 1px solid rgba(144, 204, 175, 0.9);
  background: rgba(255, 255, 255, 0.78);
  color: #18684b;
  min-height: 2rem;
  padding: 0 0.78rem;
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.brands-dots {
  min-height: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.32rem;
  flex-wrap: wrap;
}

.brands-dot {
  width: 0.52rem;
  height: 0.52rem;
  border-radius: 999px;
  border: 1px solid rgba(38, 129, 92, 0.45);
  background: rgba(255, 255, 255, 0.7);
}

.brands-dot.is-active {
  width: 1.1rem;
  background: linear-gradient(135deg, #2b8a63, #39a87a);
  border-color: transparent;
}

.brands-wholesale-ribbon {
  border-radius: 0.95rem;
  border: 1px solid rgba(178, 228, 202, 0.92);
  background: linear-gradient(130deg, rgba(255, 255, 255, 0.84), rgba(231, 249, 240, 0.88));
  padding: 0.58rem 0.68rem;
  display: grid;
  gap: 0.38rem;
}

.brands-wholesale-title {
  margin: 0;
  color: #1d6c50;
  font-size: 0.62rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.brands-wholesale-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.brands-wholesale-chips span {
  border-radius: 999px;
  border: 1px solid rgba(147, 204, 177, 0.85);
  background: rgba(255, 255, 255, 0.82);
  color: #26775a;
  font-size: 0.63rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.18rem 0.5rem;
}

.brands-wholesale-link {
  color: #1f7c5c;
  font-size: 0.68rem;
  font-weight: 800;
}

.brands-wholesale-box {
  border-radius: 0.86rem;
  border: 1px solid color-mix(in srgb, var(--brand-accent) 24%, white);
  background: rgba(255, 255, 255, 0.62);
  padding: 0.5rem 0.58rem;
}

.brands-wholesale-box-title {
  margin: 0;
  color: color-mix(in srgb, var(--brand-accent) 72%, #184837);
  font-size: 0.63rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.brands-wholesale-box-grid {
  margin-top: 0.32rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.32rem;
}

.brands-wholesale-box-grid span {
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--brand-accent) 18%, white);
  background: rgba(255, 255, 255, 0.86);
  color: color-mix(in srgb, var(--brand-accent) 66%, #1d5d46);
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  padding: 0.16rem 0.44rem;
}

.brand-hero-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  min-height: 2.2rem;
  padding: 0 0.95rem;
  border: 1px solid transparent;
  background: linear-gradient(135deg, color-mix(in srgb, var(--brand-accent) 88%, #1e7f5a), color-mix(in srgb, var(--brand-accent) 70%, #31a37a));
  color: #fff;
  font-size: 0.73rem;
  font-weight: 900;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.brand-hero-btn--ghost {
  border-color: color-mix(in srgb, var(--brand-accent) 30%, white);
  background: rgba(255, 255, 255, 0.76);
  color: color-mix(in srgb, var(--brand-accent) 68%, #154534);
}

.brand-hero-btn.is-disabled {
  border-color: rgba(148, 163, 184, 0.35);
  background: linear-gradient(135deg, #d1d5db, #e5e7eb);
  color: #6b7280;
  pointer-events: none;
}

.brands-rail {
  display: grid;
  gap: 0.45rem;
}

.brands-rail-hint {
  margin: 0;
  border-radius: 0.9rem;
  border: 1px dashed rgba(97, 151, 123, 0.4);
  background: rgba(255, 255, 255, 0.75);
  padding: 0.75rem;
  color: #58796d;
  font-size: 0.78rem;
}

.brands-rail-item {
  width: 100%;
  border-radius: 0.95rem;
  border: 1px solid rgba(170, 221, 195, 0.8);
  background: rgba(255, 255, 255, 0.68);
  padding: 0.62rem 0.72rem;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.55rem;
  text-align: left;
  transition: border-color 180ms ease, background 180ms ease, transform 180ms ease;
}

.brands-rail-item:hover {
  border-color: rgba(43, 138, 99, 0.45);
  background: rgba(243, 255, 249, 0.9);
  transform: translateY(-1px);
}

.brands-rail-item.is-active {
  border-color: rgba(43, 138, 99, 0.55);
  background: linear-gradient(135deg, rgba(233, 254, 244, 0.96), rgba(224, 248, 255, 0.86));
}

.brands-rail-dot {
  width: 0.62rem;
  height: 0.62rem;
  border-radius: 999px;
  background: #2b8a63;
  box-shadow: 0 0 0 4px rgba(43, 138, 99, 0.14);
}

.brands-rail-copy {
  min-width: 0;
  display: grid;
  gap: 0.08rem;
}

.brands-rail-copy strong {
  color: #14553f;
  font-size: 0.79rem;
  font-weight: 800;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.brands-rail-copy small {
  color: #5a7d71;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.brands-rail-arrow {
  color: #2f7a5b;
  font-size: 0.86rem;
  font-weight: 800;
}

.destacados-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 120px;
  color: #6b7280;
  font-weight: 600;
  font-size: 0.9rem;
}

.theme-night #destacados-vivos {
  background: linear-gradient(180deg, rgba(10, 34, 27, 0.95), rgba(9, 28, 22, 0.88));
}

.theme-night #destacados-vivos h2,
.theme-night #destacados-vivos h3 {
  color: #d4f3dd;
}

.theme-night #destacados-vivos p,
.theme-night #destacados-vivos a,
.theme-night .destacados-fallback {
  color: #c6ded3;
}

.theme-night .marquee-shell-x,
.theme-night .marquee-shell-y,
.theme-night #destacados-vivos article {
  background: rgba(16, 39, 32, 0.72);
  border-color: rgba(134, 239, 172, 0.2);
}

.theme-night .destacado-card,
.theme-night .mapamave-drop-card {
  background: linear-gradient(145deg, rgba(18, 52, 41, 0.92), rgba(13, 35, 29, 0.92));
  border-color: rgba(134, 239, 172, 0.18);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.34);
}

.theme-night .brands-showcase-shell {
  background: rgba(16, 39, 32, 0.72);
  border-color: rgba(134, 239, 172, 0.2);
}

.theme-night .brands-spotlight-card {
  background:
    radial-gradient(circle at 10% 20%, rgba(48, 108, 84, 0.34), transparent 44%),
    linear-gradient(145deg, rgba(17, 47, 37, 0.92), rgba(11, 31, 24, 0.92));
  border-color: rgba(134, 239, 172, 0.22);
}

.theme-night .brands-spotlight-title,
.theme-night .brands-rail-copy strong {
  color: #dff5ea;
}

.theme-night .brands-spotlight-copy,
.theme-night .brands-wholesale-link {
  color: #b8d4c8;
}

.theme-night .brands-cycle-btn,
.theme-night .brands-dot,
.theme-night .brands-wholesale-ribbon,
.theme-night .brands-wholesale-box,
.theme-night .brands-wholesale-box-grid span {
  background: rgba(12, 39, 30, 0.74);
  border-color: rgba(134, 239, 172, 0.2);
}

.theme-night .brands-cycle-btn,
.theme-night .brands-wholesale-title,
.theme-night .brands-wholesale-chips span,
.theme-night .brands-wholesale-box-title,
.theme-night .brands-wholesale-box-grid span {
  color: #dff5ea;
}

.theme-night .destacado-img-wrap {
  background: linear-gradient(160deg, #12372d, #174b3b);
}

.theme-night .destacado-card h4,
.theme-night .mapamave-drop-card h4 {
  color: #e7f7ef;
}

.theme-night .destacado-card p,
.theme-night .mapamave-drop-card p {
  color: #b8d4c8;
}

/* ====================================================
   DESTACADOS GRUPO ROTATION
   ==================================================== */

.destacados-grupo-shell {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.destacados-grupo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 1rem;
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.destacado-grupo-card {
  border-radius: 1.1rem;
  overflow: hidden;
  background: linear-gradient(160deg, rgba(255,255,255,0.97), rgba(240,253,244,0.93));
  border: 1px solid rgba(187,232,207,0.8);
  box-shadow: 0 8px 24px rgba(22,78,52,0.13);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.destacado-grupo-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 36px rgba(22,78,52,0.18);
}

.destacado-grupo-img {
  height: 140px;
  background: linear-gradient(140deg, #ecfdf5, #d1fae5);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.destacado-grupo-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.destacado-grupo-img .destacado-emoji {
  font-size: 2.5rem;
}

.destacado-cart-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  background: linear-gradient(135deg, #4ade80, #22c55e);
  color: #fff;
  font-size: 0.85rem;
  border: none;
  cursor: pointer;
  flex-shrink: 0;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.destacado-cart-btn:hover {
  transform: scale(1.12);
  box-shadow: 0 4px 14px rgba(34,197,94,0.45);
}

.oferta-badge-mini {
  display: inline-block;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  font-size: 0.65rem;
  font-weight: 800;
  background: linear-gradient(90deg, #f97316, #ef4444);
  color: #fff;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.destacados-grupo-dots {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 1.5rem;
}

.destacados-grupo-dot {
  width: 0.6rem;
  height: 0.6rem;
  border-radius: 999px;
  background: rgba(45,122,62,0.25);
  border: none;
  cursor: pointer;
  transition: background 0.3s ease, transform 0.3s ease;
  padding: 0;
}

.destacados-grupo-dot.is-active {
  background: #2d7a3e;
  transform: scale(1.35);
}

/* ====================================================
   OFERTAS / PROMOCIONES SECTION
   ==================================================== */

.ofertas-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}

.oferta-card {
  border-radius: 1.4rem;
  overflow: hidden;
  background: linear-gradient(160deg, rgba(255,255,255,0.98), rgba(255,247,235,0.94));
  border: 1px solid rgba(253,186,116,0.55);
  box-shadow: 0 12px 32px rgba(154,58,18,0.13);
  transition: transform 0.28s ease, box-shadow 0.28s ease;
  display: flex;
  flex-direction: column;
}

.oferta-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 22px 50px rgba(154,58,18,0.22);
}

.oferta-card-img-wrap {
  position: relative;
  height: 200px;
  background: linear-gradient(140deg, #fff7ed, #ffedd5);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.oferta-card-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.oferta-card-img-wrap .destacado-emoji {
  font-size: 3.5rem;
}

.oferta-descuento-badge {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  padding: 0.3rem 0.75rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 900;
  background: linear-gradient(135deg, #ea580c, #ef4444);
  color: #fff;
  letter-spacing: 0.05em;
  box-shadow: 0 4px 12px rgba(234,88,12,0.45);
  animation: ofertaPulse 2.4s ease-in-out infinite;
}

@keyframes ofertaPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

.oferta-card-body {
  padding: 1.1rem 1.2rem 1.3rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.oferta-card-cat {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #ea580c;
}

.oferta-card-nombre {
  font-size: 1rem;
  font-weight: 800;
  color: #1c2a1f;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.oferta-card-desc {
  font-size: 0.8rem;
  color: #6b7280;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
}

.oferta-card-precios {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-top: 0.5rem;
}

.oferta-precio-actual {
  font-size: 1.25rem;
  font-weight: 900;
  color: #ea580c;
}

.oferta-precio-original {
  font-size: 0.85rem;
  font-weight: 600;
  color: #9ca3af;
  text-decoration: line-through;
}

.oferta-agregar-btn {
  margin-top: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  width: 100%;
  padding: 0.7rem 1rem;
  border-radius: 999px;
  background: linear-gradient(135deg, #ea580c, #f97316);
  color: #fff;
  font-size: 0.85rem;
  font-weight: 800;
  border: none;
  cursor: pointer;
  transition: transform 0.22s ease, box-shadow 0.22s ease;
  box-shadow: 0 6px 18px rgba(234,88,12,0.32);
}

.oferta-agregar-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(234,88,12,0.48);
}

.oferta-agregar-btn:active {
  transform: translateY(0);
}

/* Dark mode */
.theme-night .destacado-grupo-card {
  background: linear-gradient(160deg, rgba(30,50,40,0.96), rgba(24,42,32,0.9));
  border-color: rgba(72,160,100,0.3);
}

.theme-night .destacado-grupo-card h4 {
  color: #e2f5ea;
}

.theme-night .destacado-grupo-card p {
  color: #94b8a4;
}

.theme-night .oferta-card {
  background: linear-gradient(160deg, rgba(50,30,20,0.96), rgba(40,22,14,0.92));
  border-color: rgba(253,186,116,0.25);
}

.theme-night .oferta-card-nombre {
  color: #fde8c8;
}

.theme-night .oferta-card-desc {
  color: #bfa58a;
}


@media (max-width: 1024px) {
  .marquee-shell-y {
    height: 320px;
  }
}

@media (max-width: 768px) {
  .marquee-shell-x {
    min-height: 220px;
  }

  .destacado-card {
    width: 200px;
  }

  .brands-showcase-shell {
    padding: 0.75rem;
  }

  .brands-compact-controls {
    grid-template-columns: 1fr;
  }

  .brands-cycle-btn {
    min-height: 2.05rem;
  }

  .brands-dots {
    order: -1;
  }

  .brands-spotlight-head {
    grid-template-columns: 1fr;
  }

  .brand-hero-logo-shell {
    width: 4.4rem;
    height: 4.4rem;
  }

  .mapamave-drop-card {
    padding: 0.7rem;
  }

  .leaf-drop {
    filter: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .leaf-drop,
  .marquee-track-x,
  .marquee-track-y {
    animation: none !important;
  }

  body.js-ready [data-intro],
  body.js-ready.intro-animate [data-intro],
  .intro-pop-once {
    opacity: 1 !important;
    filter: none !important;
    transform: none !important;
    transition: none !important;
    animation: none !important;
  }

  .page-transition-overlay,
  body.page-entering main,
  button,
  .catalog-static-cta,
  .branch-cta-chip,
  .social-link-card,
  .contact-submit-btn,
  .sucursales-toggle-btn,
  .mx-map-control,
  .sucursal-state-chip,
  .sucursal-map-chip,
  .brands-cycle-btn,
  .brands-wholesale-link,
  .category-cta-btn {
    transition: none !important;
    animation: none !important;
  }
}

/* ===== HOME REDISEÑO 2026 ===== */
:root {
  --aero-emerald: #1f8a63;
  --aero-teal: #35b4a4;
  --aero-sky: #8cecff;
  --aero-lime: #c9f8ab;
  --aero-gold: #d7b567;
  --aero-ink: #16332c;
  --aero-shadow: 0 24px 60px rgba(29, 79, 57, 0.16);
}

body.aero-body {
  font-family: 'Lexend', sans-serif;
  background:
    radial-gradient(circle at 8% 12%, rgba(198, 255, 232, 0.92), transparent 22%),
    radial-gradient(circle at 86% 18%, rgba(172, 236, 255, 0.82), transparent 22%),
    radial-gradient(circle at 50% 100%, rgba(208, 255, 189, 0.78), transparent 28%),
    linear-gradient(180deg, #f8fffb 0%, #eefaf4 38%, #e5f7ef 100%);
}

.font-display {
  font-family: 'Marcellus', serif;
}

.aero-page-glow {
  position: fixed;
  z-index: 0;
  width: 34rem;
  height: 34rem;
  border-radius: 999px;
  filter: blur(72px);
  opacity: 0.5;
  pointer-events: none;
}

.aero-page-glow--left {
  top: 4rem;
  left: -10rem;
  background: radial-gradient(circle, rgba(143, 255, 196, 0.5) 0%, rgba(143, 255, 196, 0) 70%);
}

.aero-page-glow--right {
  top: 10rem;
  right: -9rem;
  background: radial-gradient(circle, rgba(139, 230, 255, 0.48) 0%, rgba(139, 230, 255, 0) 70%);
}

.nav-aero-link,
.mobile-aero-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.7rem 1rem;
  border-radius: 999px;
  transition: transform 240ms ease, background-color 240ms ease, color 240ms ease;
}

.nav-aero-link:hover,
.mobile-aero-link:hover {
  background: rgba(255, 255, 255, 0.7);
  color: var(--aero-emerald);
  transform: translateY(-1px);
}

.nav-aero-link--gold,
.mobile-aero-link--gold {
  color: #8a6927;
}

.utility-icon-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  min-height: 2.85rem;
  padding: 0 0.9rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.7);
  background: rgba(255, 255, 255, 0.72);
  color: var(--aero-ink);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
  transition: transform 220ms ease, background-color 220ms ease;
}

.utility-icon-btn:hover {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.9);
}

.utility-badge {
  position: absolute;
  top: 0.15rem;
  right: 0.1rem;
  min-width: 1.15rem;
  height: 1.15rem;
  padding: 0 0.2rem;
  border-radius: 999px;
  background: linear-gradient(135deg, #f7c24b, #ee8d37);
  color: white;
  font-size: 0.68rem;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.utility-close-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  background: rgba(12, 81, 57, 0.08);
  color: #215240;
}

.utility-close-btn:hover {
  background: rgba(12, 81, 57, 0.14);
}

.app-header-bar {
  position: relative;
}

.app-header-actions {
  display: flex;
  align-items: center;
}

.app-header-action-btn {
  flex-shrink: 0;
}

.app-header-account-btn,
.app-header-account-chip {
  flex-shrink: 0;
}

.app-home-main {
  padding-bottom: 0;
}

.mobile-home-hub,
.mobile-bottom-nav {
  display: none;
}

.mobile-home-surface {
  border-radius: 1.75rem;
  border: 1px solid rgba(255, 255, 255, 0.7);
  background:
    linear-gradient(165deg, rgba(255, 255, 255, 0.9), rgba(229, 249, 240, 0.78)),
    radial-gradient(circle at 15% 12%, rgba(139, 255, 210, 0.28), transparent 28%),
    radial-gradient(circle at 84% 12%, rgba(144, 226, 255, 0.26), transparent 26%);
  box-shadow: 0 22px 54px rgba(27, 79, 59, 0.16);
  backdrop-filter: blur(20px);
}

.mobile-home-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.85rem;
}

.mobile-home-kicker {
  font-size: 0.7rem;
  font-weight: 900;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: #1c7b57;
}

.mobile-home-title {
  margin-top: 0.35rem;
  font-size: clamp(1.45rem, 5vw, 1.85rem);
  line-height: 1.05;
  color: #16332c;
}

.mobile-home-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.65rem 0.95rem;
  border-radius: 999px;
  background: rgba(27, 122, 87, 0.08);
  color: #176949;
  font-size: 0.76rem;
  font-weight: 800;
  text-decoration: none;
  flex-shrink: 0;
}

.mobile-search-cta {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin-top: 1rem;
  padding: 0.95rem 1rem;
  border-radius: 1.25rem;
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid rgba(196, 237, 220, 0.9);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
  text-decoration: none;
}

.mobile-search-cta__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.8rem;
  height: 2.8rem;
  border-radius: 999px;
  color: #176949;
  background: linear-gradient(145deg, rgba(218, 255, 237, 0.96), rgba(203, 248, 255, 0.84));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.88);
  flex-shrink: 0;
}

.mobile-search-cta__icon svg {
  width: 1.15rem;
  height: 1.15rem;
}

.mobile-search-cta__copy {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.mobile-search-cta__copy strong {
  font-size: 0.92rem;
  line-height: 1.25;
  color: #16332c;
}

.mobile-search-cta__copy small {
  margin-top: 0.18rem;
  color: #5a776d;
  font-size: 0.76rem;
}

.mobile-quick-stack {
  margin-top: 0.95rem;
}

.mobile-quick-feature {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 0.9rem;
  min-height: 0;
  padding: 1.05rem 1rem;
}

.mobile-quick-feature__meta {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.15rem;
  padding: 0.5rem 0.8rem;
  border-radius: 999px;
  background: rgba(18, 110, 77, 0.1);
  color: #176949;
  font-size: 0.72rem;
  font-weight: 900;
  white-space: nowrap;
}

.mobile-quick-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.78rem;
  margin-top: 0.78rem;
}

.mobile-quick-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 0.28rem;
  min-height: 7.4rem;
  padding: 0.95rem;
  border-radius: 1.35rem;
  border: 1px solid rgba(198, 237, 217, 0.86);
  background: rgba(255, 255, 255, 0.82);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.88);
  color: #16332c;
  text-align: left;
  text-decoration: none;
}

.mobile-quick-card--accent {
  background: linear-gradient(155deg, rgba(29, 138, 97, 0.16), rgba(255, 255, 255, 0.92));
}

.mobile-quick-card--ghost {
  cursor: pointer;
}

.mobile-quick-card__eyebrow {
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #218160;
}

.mobile-quick-card strong {
  display: block;
  margin-top: 0.08rem;
  font-size: 1rem;
  line-height: 1.18;
}

.mobile-quick-card span {
  font-size: 0.76rem;
  line-height: 1.42;
  color: #5a776d;
}

.mobile-assist-cta {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  margin-top: 0.78rem;
  padding: 0.95rem 1rem;
  border-radius: 1.15rem;
  border: 1px solid rgba(198, 237, 217, 0.86);
  background: rgba(255, 255, 255, 0.68);
  text-align: left;
  color: #16332c;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.88);
}

.mobile-assist-cta__label {
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #218160;
}

.mobile-assist-cta strong {
  font-size: 0.92rem;
  line-height: 1.25;
}

.mobile-bottom-nav {
  position: fixed;
  left: 0.8rem;
  right: 0.8rem;
  bottom: calc(0.7rem + env(safe-area-inset-bottom));
  z-index: 85;
  align-items: stretch;
  gap: 0.35rem;
  padding: 0.55rem;
  border-radius: 1.55rem;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(7, 33, 25, 0.86);
  box-shadow: 0 26px 55px rgba(0, 0, 0, 0.26);
  backdrop-filter: blur(18px);
}

.mobile-bottom-nav__item {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.28rem;
  padding: 0.55rem 0.2rem;
  border-radius: 1rem;
  color: rgba(238, 255, 248, 0.72);
  text-decoration: none;
  transition: transform 180ms ease, background-color 180ms ease, color 180ms ease;
}

.mobile-bottom-nav__item svg {
  width: 1.15rem;
  height: 1.15rem;
}

.mobile-bottom-nav__item-label {
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.mobile-bottom-nav__item--premium {
  color: rgba(235, 213, 154, 0.92);
}

.mobile-bottom-nav__item.is-active {
  color: #143328;
  background: linear-gradient(145deg, rgba(220, 255, 236, 0.98), rgba(181, 241, 255, 0.9));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.94), 0 10px 18px rgba(84, 193, 156, 0.16);
  transform: translateY(-1px);
}

.mobile-bottom-nav__item--premium.is-active {
  color: #392714;
  background: linear-gradient(145deg, rgba(244, 220, 160, 0.98), rgba(255, 243, 204, 0.92));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.94), 0 10px 18px rgba(198, 149, 64, 0.18);
}

.hero-aero-overlay {
  background:
    linear-gradient(180deg, rgba(7, 41, 26, 0.55) 0%, rgba(10, 68, 43, 0.28) 38%, rgba(255, 255, 255, 0.06) 100%),
    radial-gradient(circle at 25% 20%, rgba(226, 255, 243, 0.28), transparent 18%),
    radial-gradient(circle at 82% 18%, rgba(111, 235, 255, 0.18), transparent 22%);
}

.hero-shell-card,
.hero-glass-panel,
.section-intro-shell,
.contact-form-shell {
  backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.58);
  box-shadow: var(--aero-shadow);
}

.hero-shell-card {
  background: linear-gradient(145deg, rgba(15, 74, 54, 0.54), rgba(14, 119, 96, 0.28));
}

.hero-content-fade {
  opacity: 0;
  transform: translateY(28px) scale(0.985);
  filter: blur(1.4px);
  transition: opacity 1000ms cubic-bezier(0.22, 1, 0.36, 1), transform 1000ms cubic-bezier(0.22, 1, 0.36, 1), filter 850ms ease;
}

.hero-content-fade.hero-content-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
  filter: blur(0);
}

body.js-ready [data-intro] {
  opacity: 0;
  filter: blur(5px);
  transform: translate3d(0, 18px, 0) scale(0.988);
  transition:
    opacity 760ms cubic-bezier(0.22, 1, 0.36, 1),
    transform 760ms cubic-bezier(0.22, 1, 0.36, 1),
    filter 680ms ease;
  transition-delay: var(--intro-delay, 0ms);
  will-change: opacity, transform, filter;
}

body.js-ready [data-intro='slide-down'] {
  transform: translate3d(0, -18px, 0) scale(0.992);
}

body.js-ready #mainHeader[data-intro='slide-down'] {
  transform: translate3d(0, -18px, 0) scale(0.992);
}

body.js-ready [data-intro='slide-left'] {
  transform: translate3d(26px, 0, 0) scale(0.992);
}

body.js-ready [data-intro='slide-right'] {
  transform: translate3d(-26px, 0, 0) scale(0.992);
}

body.js-ready [data-intro='slide-up'] {
  transform: translate3d(0, 20px, 0) scale(0.992);
}

body.js-ready.intro-animate [data-intro] {
  opacity: 1;
  filter: blur(0);
  transform: translate3d(0, 0, 0) scale(1);
}

body.js-ready.intro-animate #mainHeader[data-intro] {
  transform: translate3d(0, 0, 0) scale(1);
}

.page-transition-overlay {
  position: fixed;
  inset: 0;
  z-index: 130;
  pointer-events: none;
  opacity: 0;
  background:
    radial-gradient(circle at 20% 18%, rgba(121, 255, 196, 0.22), transparent 30%),
    radial-gradient(circle at 82% 75%, rgba(147, 214, 255, 0.2), transparent 34%),
    linear-gradient(180deg, rgba(8, 33, 27, 0.08), rgba(8, 33, 27, 0.32));
  backdrop-filter: blur(1.5px);
  transition: opacity 320ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

body.page-leaving .page-transition-overlay {
  opacity: 1;
}

body.page-entering main {
  animation: pageEnterSmooth 460ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes pageEnterSmooth {
  from {
    opacity: 0;
    transform: translateY(16px) scale(0.996);
    filter: blur(2px);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
  }
}

.intro-pop-once {
  animation: introPopFloat 760ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes introPopFloat {
  from {
    opacity: 0;
    transform: translate3d(26px, 12px, 0) scale(0.94);
    filter: blur(4px);
  }
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(1);
    filter: blur(0);
  }
}

.hero-glass-panel,
.section-intro-shell,
.contact-form-shell {
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.82), rgba(255, 255, 255, 0.62));
}

.hero-stat-card {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 0.95rem 1rem;
  border-radius: 1.25rem;
  background: rgba(255, 255, 255, 0.13);
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.hero-stat-value {
  font-size: 1.6rem;
  font-weight: 800;
}

.hero-stat-label {
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(236, 253, 245, 0.8);
}

.hero-side-emerald {
  background: linear-gradient(145deg, rgba(17, 117, 86, 0.72), rgba(39, 152, 115, 0.54));
}

.glass-pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0.55rem 0.9rem;
  font-size: 0.75rem;
  font-weight: 700;
  color: #27624d;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.78);
}

.section-intro-shell {
  padding: 2rem;
  border-radius: 1.8rem;
}

.section-kicker {
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: #14815c;
}

.section-kicker--center {
  text-align: center;
}

.section-kicker--gold {
  color: var(--aero-gold);
}

.section-kicker--soft-light {
  color: rgba(236, 253, 245, 0.82);
}

.section-title {
  margin-top: 0.7rem;
  font-family: 'Marcellus', serif;
  font-size: clamp(2.4rem, 5vw, 3.8rem);
  line-height: 1.02;
  color: #184031;
}

.section-copy {
  margin-top: 1rem;
  color: #53766a;
  font-size: 1.05rem;
  line-height: 1.92;
}

.section-copy--center {
  max-width: 48rem;
  margin-left: auto;
  margin-right: auto;
}

.category-grid-wrap {
  position: relative;
  overflow: hidden;
  border-radius: 2.2rem;
  padding: 0.95rem;
  border: 1px solid rgba(91, 158, 126, 0.28);
  background:
    linear-gradient(145deg, rgba(10, 36, 24, 0.38), rgba(9, 42, 26, 0.28)),
    radial-gradient(circle at 12% 16%, rgba(214, 255, 233, 0.28), transparent 30%),
    radial-gradient(circle at 86% 14%, rgba(184, 232, 255, 0.22), transparent 26%),
    url('/img/plantas-fondo.jpg') center / cover no-repeat;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.72),
    0 20px 45px rgba(24, 90, 64, 0.13);
}

.category-grid-wrap::before,
.category-grid-wrap::after {
  content: '';
  position: absolute;
  width: 8.5rem;
  height: 8.5rem;
  pointer-events: none;
  z-index: 2;
  opacity: 0.82;
}

.category-grid-wrap::before {
  top: -1.1rem;
  left: -1.05rem;
  background:
    radial-gradient(ellipse at 26% 36%, rgba(56, 134, 89, 0.26) 0 24%, transparent 28%),
    radial-gradient(ellipse at 58% 22%, rgba(79, 170, 113, 0.28) 0 20%, transparent 24%),
    radial-gradient(ellipse at 72% 58%, rgba(88, 164, 127, 0.24) 0 18%, transparent 22%);
  filter: blur(0.4px);
}

.category-grid-wrap::after {
  right: -0.95rem;
  bottom: -1rem;
  background:
    radial-gradient(ellipse at 70% 64%, rgba(56, 134, 89, 0.26) 0 22%, transparent 26%),
    radial-gradient(ellipse at 42% 76%, rgba(79, 170, 113, 0.27) 0 19%, transparent 23%),
    radial-gradient(ellipse at 30% 38%, rgba(88, 164, 127, 0.24) 0 17%, transparent 21%);
  filter: blur(0.4px);
}

.category-carousel-track {
  display: flex;
  align-items: stretch;
  gap: 1.25rem;
  width: max-content;
  position: relative;
  z-index: 3;
  animation: categoryRail var(--category-loop-duration, 120s) linear infinite;
  will-change: transform;
  --category-loop-distance: 50%;
  --category-loop-duration: 120s;
}

.category-grid-wrap:hover .category-carousel-track {
  animation-play-state: paused;
}

.category-aero-card:hover,
.category-aero-card:focus-within {
  z-index: 6;
}

.category-aero-card:hover .category-slide-track-inner,
.category-aero-card:focus-within .category-slide-track-inner {
  animation-play-state: paused;
}

@keyframes categoryRail {
  0% { transform: translateX(0); }
  100% { transform: translateX(calc(-1 * var(--category-loop-distance))); }
}

.catalog-static-cta {
  box-shadow: 0 16px 32px rgba(25, 93, 67, 0.25);
}

button,
.catalog-static-cta,
.branch-cta-chip,
.social-link-card,
.contact-submit-btn,
.sucursales-toggle-btn,
.mx-map-control,
.sucursal-state-chip,
.sucursal-map-chip,
.brands-cycle-btn,
.brands-wholesale-link,
.category-cta-btn {
  transition: transform 220ms ease, box-shadow 220ms ease, filter 220ms ease, background-color 220ms ease;
}

@media (hover: hover) {
  button:hover,
  .catalog-static-cta:hover,
  .branch-cta-chip:hover,
  .social-link-card:hover,
  .contact-submit-btn:hover,
  .sucursales-toggle-btn:hover,
  .mx-map-control:hover,
  .sucursal-state-chip:hover,
  .sucursal-map-chip:hover,
  .brands-cycle-btn:hover,
  .brands-wholesale-link:hover,
  .category-cta-btn:hover {
    transform: translateY(-2px);
    filter: saturate(1.03);
  }
}

button:active,
.catalog-static-cta:active,
.contact-submit-btn:active,
.category-cta-btn:active {
  transform: translateY(0) scale(0.985);
}

.category-aero-card {
  position: relative;
  overflow: hidden;
  flex: 0 0 clamp(20rem, 22vw, 24.5rem);
  border-radius: 1.9rem;
  border: 1px solid rgba(255, 255, 255, 0.74);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.95), rgba(252, 255, 253, 0.92));
  box-shadow: 0 22px 50px rgba(28, 78, 56, 0.14);
  transform-origin: center center;
}

.category-aero-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 12% 12%, rgba(255, 255, 255, 0.78), transparent 26%),
    radial-gradient(circle at 88% 8%, var(--category-accent-soft), transparent 24%);
  pointer-events: none;
}

.category-aero-card.is-loading {
  min-height: 23rem;
}

.category-slide-shell {
  position: relative;
  height: 8.9rem;
  padding: 0.8rem;
  background: linear-gradient(160deg, var(--category-accent-soft), var(--category-accent));
}

.category-slide-track {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  border-radius: 1.35rem;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.12);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.28);
}

.category-slide-loading,
.category-slide-fallback-wrap {
  display: flex;
  height: 100%;
  width: 100%;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 0.6rem;
  padding: 1rem;
  text-align: center;
  color: white;
  font-size: 0.82rem;
  font-weight: 700;
}

.category-body {
  position: relative;
  z-index: 1;
  padding: 1.75rem;
}

.category-title {
  font-size: 1.22rem;
  line-height: 1.3;
  font-weight: 800;
  color: var(--category-accent);
}

.category-description {
  margin-top: 0.95rem;
  font-size: 0.98rem;
  line-height: 1.78;
  color: #4f6f64;
}

.category-focus-box {
  margin-top: 1rem;
  border-radius: 1rem;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.76), var(--category-accent-soft));
  padding: 0.9rem 1rem;
}

.category-focus-label {
  margin: 0;
  font-size: 0.8rem;
  font-weight: 800;
  color: #33564a;
}

.category-focus-text {
  margin-top: 0.45rem;
  font-size: 0.88rem;
  line-height: 1.68;
  color: #3e6156;
}

.category-cta-btn {
  width: 100%;
  margin-top: 1.15rem;
  border: none;
  border-radius: 999px;
  padding: 0.95rem 1rem;
  color: white;
  font-weight: 800;
  background: linear-gradient(135deg, var(--category-accent), #1c5b46);
  box-shadow: 0 18px 30px rgba(28, 91, 70, 0.22);
}

.category-slide-track-inner {
  display: flex;
  gap: 0.7rem;
  width: max-content;
  padding: 0.75rem;
  animation: categorySlideX var(--slide-duration, 18s) linear infinite;
}

.category-aero-card:hover .category-slide-track-inner {
  animation-play-state: paused;
}

@keyframes categorySlideX {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

.category-slide-item {
  display: grid;
  grid-template-columns: 4rem minmax(0, 1fr);
  gap: 0.65rem;
  width: 15.2rem;
  min-width: 15.2rem;
  align-items: center;
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.18);
  padding: 0.5rem;
  backdrop-filter: blur(8px);
}

.category-slide-media {
  width: 4rem;
  height: 4rem;
  border-radius: 0.95rem;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.22);
  display: flex;
  align-items: center;
  justify-content: center;
}

.category-slide-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.category-slide-copy {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.category-slide-copy strong,
.category-slide-copy span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.category-slide-copy strong {
  color: white;
  font-size: 0.82rem;
  font-weight: 800;
}

.category-slide-copy span {
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.72rem;
}

.category-slide-fallback-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 4rem;
  height: 4rem;
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.18);
  font-size: 1.8rem;
}

.category-slide-fallback-text {
  max-width: 15rem;
  color: rgba(255, 255, 255, 0.88);
}

.notice-pill {
  border-radius: 1.2rem;
  padding: 1rem 1.08rem;
  border: 1px solid rgba(255, 255, 255, 0.58);
}

.notice-pill strong {
  display: block;
  margin-bottom: 0.25rem;
  color: #1d4236;
  font-size: 0.95rem;
}

.notice-pill p {
  line-height: 1.68;
}

.notice-pill--fresh {
  background: linear-gradient(145deg, rgba(218, 255, 234, 0.92), rgba(245, 255, 249, 0.86));
}

.notice-pill--gold {
  background: linear-gradient(145deg, rgba(255, 244, 207, 0.92), rgba(255, 252, 236, 0.88));
}

.notice-pill--soft {
  background: linear-gradient(145deg, rgba(235, 248, 255, 0.92), rgba(250, 254, 255, 0.88));
}

.mapamave-aurora {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 18% 30%, rgba(201, 169, 97, 0.22), transparent 24%),
    radial-gradient(circle at 84% 18%, rgba(255, 255, 255, 0.08), transparent 18%),
    radial-gradient(circle at 62% 85%, rgba(163, 132, 54, 0.22), transparent 20%);
  filter: blur(8px);
}

.mapamave-stage {
  position: relative;
  padding: 2rem;
  border-radius: 2rem;
  border: 1px solid rgba(215, 181, 103, 0.18);
  background: linear-gradient(145deg, rgba(8, 10, 14, 0.74), rgba(17, 18, 23, 0.52));
  box-shadow: 0 32px 80px rgba(0, 0, 0, 0.34);
}

.mapamave-metric-card,
.mapamave-logo-shell {
  border-radius: 1.4rem;
  border: 1px solid rgba(215, 181, 103, 0.16);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.03));
  backdrop-filter: blur(14px);
}

.mapamave-metric-card {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 1rem;
}

.mapamave-metric-value {
  color: var(--aero-gold);
  font-size: 1.28rem;
  font-weight: 900;
}

.mapamave-metric-label {
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.84rem;
  line-height: 1.5;
}

.mapamave-logo-shell {
  padding: 1.6rem;
  box-shadow: 0 24px 55px rgba(0, 0, 0, 0.28);
}

.mapamave-track-shell {
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.03));
  border-color: rgba(215, 181, 103, 0.16);
}

.branch-fallback-card {
  border-radius: 1.7rem;
  padding: 1.5rem;
  border: 1px solid rgba(255, 255, 255, 0.72);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.92), rgba(245, 255, 248, 0.86));
  box-shadow: 0 22px 44px rgba(28, 78, 56, 0.12);
}

.sucursales-map-shell {
  border-radius: 1.8rem;
  border: 1px solid rgba(255, 255, 255, 0.72);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.9), rgba(242, 255, 248, 0.84));
  box-shadow: 0 24px 52px rgba(28, 78, 56, 0.14);
  padding: 1rem;
}

.mx-map-3d {
  display: grid;
  gap: 0.7rem;
}

.mx-map-controls {
  display: inline-flex;
  gap: 0.45rem;
}

.mx-map-control {
  border: 1px solid rgba(16, 99, 71, 0.28);
  background: rgba(255, 255, 255, 0.88);
  color: #145a43;
  border-radius: 0.8rem;
  min-height: 2rem;
  padding: 0 0.75rem;
  font-size: 0.82rem;
  font-weight: 800;
}

.mx-map-stage {
  position: relative;
  border-radius: 1.25rem;
  overflow: hidden;
  border: 1px solid rgba(172, 230, 204, 0.65);
  min-height: 360px;
  background:
    radial-gradient(circle at 14% 16%, rgba(202, 255, 228, 0.86), transparent 24%),
    radial-gradient(circle at 82% 18%, rgba(179, 236, 255, 0.62), transparent 24%),
    linear-gradient(160deg, #dcfff1 0%, #b9f0dd 38%, #a6e2d9 100%);
}

.mx-map-canvas {
  width: 100%;
  height: 100%;
  min-height: 360px;
  transform: perspective(1200px) rotateX(22deg) rotateZ(-8deg) scale(1.02);
  transform-origin: center;
  transition: transform 280ms ease;
}

.mx-map-canvas.mx-map-canvas--leaflet {
  transform: none;
}

.mx-store-marker-wrap {
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.mx-store-marker {
  width: 1.95rem;
  height: 1.95rem;
  border-radius: 0.95rem 0.95rem 0.95rem 0;
  transform: rotate(-45deg);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 2px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 10px 20px rgba(22, 78, 57, 0.28);
  cursor: pointer;
}

.mx-store-marker-core {
  transform: rotate(45deg);
  color: #fff;
  font-size: 0.8rem;
  line-height: 1;
  font-weight: 900;
}

.mx-store-marker.is-matriz {
  background: linear-gradient(135deg, #f59e0b, #d97706);
}

.mx-store-marker.is-sucursal {
  background: linear-gradient(135deg, #16a34a, #0f766e);
}

.mx-store-marker-wrap.is-active .mx-store-marker {
  animation: mapDotPulse 1.2s ease-in-out infinite;
  box-shadow: 0 0 0 6px rgba(20, 126, 93, 0.24), 0 12px 26px rgba(22, 78, 57, 0.34);
}

.maplibregl-ctrl-bottom-right,
.maplibregl-ctrl-bottom-left,
.maplibregl-ctrl-top-right,
.maplibregl-ctrl-top-left {
  display: none;
}

.mx-map-canvas .leaflet-control-attribution {
  background: rgba(255, 255, 255, 0.82);
  border-top-left-radius: 0.45rem;
}

.mx-map-canvas .leaflet-popup-content-wrapper {
  border-radius: 0.8rem;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 14px 28px rgba(23, 63, 48, 0.2);
}

.mx-map-canvas .leaflet-popup-content {
  margin: 0.55rem 0.65rem;
}

.mx-map-canvas .leaflet-popup-tip {
  background: rgba(255, 255, 255, 0.95);
}

@keyframes mapDotPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.18); }
}

.mx-map-popup {
  min-width: 160px;
}

.mx-map-popup-title {
  margin: 0;
  font-size: 0.86rem;
  font-weight: 800;
  color: #0f4d3a;
}

.mx-map-popup-sub {
  margin: 0.12rem 0 0;
  font-size: 0.74rem;
  color: #4b6b61;
}

.sucursal-map-chip {
  border: 1px solid rgba(21, 107, 74, 0.18);
  background: rgba(255, 255, 255, 0.86);
  color: #1f6650;
  border-radius: 999px;
  padding: 0.45rem 0.9rem;
  font-size: 0.78rem;
  font-weight: 700;
}

.sucursal-map-chip.is-active {
  background: linear-gradient(135deg, #1f8a63, #35b4a4);
  border-color: transparent;
  color: #fff;
}

.sucursal-state-chip {
  border: 1px solid rgba(20, 86, 65, 0.2);
  background: rgba(255, 255, 255, 0.72);
  color: #155945;
  border-radius: 999px;
  padding: 0.36rem 0.82rem;
  font-size: 0.74rem;
  font-weight: 800;
}

.sucursal-state-chip.is-active {
  color: #fff;
  background: linear-gradient(135deg, #1f8a63, #287d92);
  border-color: transparent;
}

.sucursales-toggle-btn {
  width: 100%;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  background: linear-gradient(120deg, rgba(17, 117, 86, 0.88), rgba(29, 148, 107, 0.9));
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  min-height: 3.4rem;
  font-weight: 800;
  font-size: 1rem;
  letter-spacing: 0.02em;
  box-shadow: 0 18px 35px rgba(22, 94, 70, 0.24);
}

.sucursales-toggle-btn [data-toggle-symbol] {
  display: inline-flex;
  width: 1.6rem;
  height: 1.6rem;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.2);
  font-size: 1.15rem;
  line-height: 1;
}

.branch-fallback-card h3 {
  margin-top: 0.35rem;
  color: #1d4f3c;
  font-size: 1.3rem;
  font-weight: 800;
}

.branch-fallback-card p {
  margin-top: 0.6rem;
  color: #58766b;
  font-size: 0.98rem;
  line-height: 1.78;
}

.branch-fallback-state {
  margin: 0;
  color: #179268;
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.26em;
  text-transform: uppercase;
}

.branch-cta-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 0.85rem 1.15rem;
  background: linear-gradient(135deg, #1d8e60, #27a877);
  color: white;
  font-size: 0.88rem;
  font-weight: 800;
}

.contact-info-card {
  border-radius: 1.4rem;
  padding: 1.1rem 1.15rem;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.11);
  backdrop-filter: blur(10px);
}

.contact-info-card strong {
  display: block;
  color: white;
  font-size: 1rem;
}

.contact-info-card p {
  margin-top: 0.35rem;
  color: rgba(236, 253, 245, 0.82);
  font-size: 0.96rem;
  line-height: 1.78;
}

.social-links-stack {
  display: grid;
  gap: 0.7rem;
}

.social-link-card {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 0.75rem;
  border-radius: 1rem;
  padding: 0.72rem 0.82rem;
  border: 1px solid rgba(255, 255, 255, 0.26);
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  transition: transform 180ms ease, background 180ms ease;
}

.social-link-card:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.2);
}

.social-link-icon {
  width: 2.1rem;
  height: 2.1rem;
  border-radius: 0.8rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.2);
  font-size: 1rem;
}

.social-link-copy {
  min-width: 0;
  display: grid;
}

.social-link-copy strong {
  color: #fff;
  font-size: 0.82rem;
  font-weight: 800;
}

.social-link-copy small {
  color: rgba(236, 253, 245, 0.85);
  font-size: 0.74rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.social-link-card--whatsapp {
  background: linear-gradient(135deg, rgba(18, 176, 86, 0.42), rgba(10, 123, 64, 0.34));
}

.social-link-card--phone {
  background: linear-gradient(135deg, rgba(14, 164, 233, 0.38), rgba(8, 97, 137, 0.34));
}

.social-link-card--instagram {
  background: linear-gradient(135deg, rgba(236, 72, 153, 0.4), rgba(168, 85, 247, 0.34));
}

.social-link-card--facebook {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.42), rgba(29, 78, 216, 0.35));
}

.contact-form-shell {
  padding: 1.6rem;
  border-radius: 1.9rem;
}

.contact-label {
  display: block;
  margin-bottom: 0.4rem;
  color: rgba(236, 253, 245, 0.9);
  font-size: 0.84rem;
  font-weight: 700;
}

.contact-input {
  width: 100%;
  border-radius: 1.15rem;
  border: 1px solid rgba(255, 255, 255, 0.32);
  background: rgba(255, 255, 255, 0.88);
  color: #173329;
  padding: 0.95rem 1rem;
  outline: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.contact-input:focus {
  border-color: rgba(215, 181, 103, 0.86);
  box-shadow: 0 0 0 3px rgba(215, 181, 103, 0.18);
}

.contact-input--textarea {
  min-height: 8rem;
  resize: none;
}

.contact-submit-btn {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.7rem;
  border: none;
  border-radius: 999px;
  padding: 1rem 1.4rem;
  background: linear-gradient(135deg, #d7b567, #f0cb75);
  color: #173329;
  font-size: 1rem;
  font-weight: 900;
  box-shadow: 0 22px 42px rgba(215, 181, 103, 0.24);
}

.ai-fab {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 64;
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  border: 1px solid rgba(255, 255, 255, 0.68);
  border-radius: 999px;
  padding: 0.95rem 1.2rem;
  background: linear-gradient(135deg, rgba(255,255,255,0.86), rgba(222,255,243,0.76));
  color: #184031;
  font-weight: 900;
  box-shadow: 0 24px 48px rgba(28, 78, 56, 0.18);
  backdrop-filter: blur(16px);
}

.line-clamp-1,
.line-clamp-2 {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.line-clamp-1 {
  -webkit-line-clamp: 1;
}

.line-clamp-2 {
  -webkit-line-clamp: 2;
}

.theme-night .aero-body,
.theme-night.aero-body {
  background:
    radial-gradient(circle at 8% 12%, rgba(16, 58, 42, 0.78), transparent 22%),
    radial-gradient(circle at 86% 18%, rgba(20, 67, 82, 0.72), transparent 24%),
    linear-gradient(180deg, #06140f 0%, #0a1d17 40%, #10231d 100%);
}

.theme-night .hero-glass-panel,
.theme-night .section-intro-shell,
.theme-night .contact-form-shell,
.theme-night #notificationPanel,
.theme-night #aiPanel,
.theme-night .category-aero-card,
.theme-night .branch-fallback-card {
  background: linear-gradient(145deg, rgba(12, 34, 27, 0.88), rgba(16, 46, 36, 0.82));
  border-color: rgba(167, 243, 208, 0.18);
  box-shadow: 0 24px 50px rgba(0, 0, 0, 0.32);
}

.theme-night .section-title,
.theme-night .category-title,
.theme-night .branch-fallback-card h3,
.theme-night .notice-pill strong {
  color: #e5f8ee;
}

.theme-night .section-copy,
.theme-night .category-description,
.theme-night .category-focus-text,
.theme-night .branch-fallback-card p,
.theme-night .notice-pill p {
  color: #b7d3c8;
}

.theme-night .glass-pill,
.theme-night .utility-icon-btn,
.theme-night .mobile-aero-link,
.theme-night .nav-aero-link {
  background: rgba(15, 45, 35, 0.72);
  border-color: rgba(167, 243, 208, 0.16);
  color: #d7f6e6;
}

.theme-night .mobile-home-surface,
.theme-night .mobile-search-cta,
.theme-night .mobile-quick-card,
.theme-night .app-modal-card {
  background: linear-gradient(145deg, rgba(10, 30, 24, 0.94), rgba(15, 45, 35, 0.86));
  border-color: rgba(167, 243, 208, 0.14);
  box-shadow: 0 24px 50px rgba(0, 0, 0, 0.28);
}

.theme-night .mobile-home-title,
.theme-night .mobile-search-cta__copy strong,
.theme-night .mobile-quick-card strong,
.theme-night .mobile-assist-cta strong {
  color: #e5f8ee;
}

.theme-night .mobile-home-badge,
.theme-night .mobile-quick-feature__meta,
.theme-night .mobile-search-cta__icon {
  background: rgba(255, 255, 255, 0.08);
  color: #d7f6e6;
}

.theme-night .mobile-search-cta__copy small,
.theme-night .mobile-quick-card span,
.theme-night .mobile-assist-cta__label {
  color: #b7d3c8;
}

.theme-night .mobile-assist-cta {
  background: linear-gradient(145deg, rgba(10, 30, 24, 0.82), rgba(15, 45, 35, 0.72));
  border-color: rgba(167, 243, 208, 0.14);
  box-shadow: 0 24px 50px rgba(0, 0, 0, 0.22);
}

.theme-night .mobile-bottom-nav {
  background: rgba(3, 18, 13, 0.88);
  border-color: rgba(167, 243, 208, 0.14);
}

.theme-night .contact-input {
  background: rgba(12, 32, 26, 0.92);
  border-color: rgba(255, 255, 255, 0.12);
  color: #eaf7f0;
}

.theme-night .notice-pill--fresh,
.theme-night .notice-pill--gold,
.theme-night .notice-pill--soft,
.theme-night .category-focus-box {
  background: rgba(255, 255, 255, 0.05);
}

.theme-night .ai-fab {
  background: linear-gradient(135deg, rgba(16, 43, 34, 0.92), rgba(19, 61, 47, 0.86));
  color: #e8fbf1;
  border-color: rgba(167, 243, 208, 0.16);
}

@media (max-width: 768px) {
  .section-title {
    font-size: clamp(2rem, 9vw, 2.8rem);
  }

  .section-copy {
    font-size: 0.98rem;
    line-height: 1.82;
  }

  .category-slide-item {
    width: 13.6rem;
    min-width: 13.6rem;
  }

  .category-aero-card {
    flex-basis: min(21rem, calc(100vw - 2.2rem));
  }

  .category-carousel-track {
    animation-duration: 62s;
  }

  .mx-map-stage {
    min-height: 280px;
  }

  .mx-map-canvas {
    min-height: 280px;
    transform: perspective(1000px) rotateX(18deg) rotateZ(-6deg) scale(1.01);
  }

  .contact-form-shell,
  .section-intro-shell,
  .mapamave-stage {
    padding: 1.2rem;
  }
}

/* ============================================================
   MOBILE-FIRST ENHANCEMENTS
   Mejoras específicas para celulares (< 768px)
   ============================================================ */

/* Fix crítico: background-attachment:fixed rompe scroll en iOS Safari.
   Override las secciones con fondo paralaje en mobile. */
@media (max-width: 1023px) {
  #mainHeader {
    border-bottom-color: rgba(255, 255, 255, 0.72);
    box-shadow: 0 16px 36px rgba(35, 86, 62, 0.12);
  }

  .app-header-bar {
    max-width: none;
  }

  .app-header-actions {
    gap: 0.45rem;
  }

  .app-header-action-btn {
    min-width: 2.7rem;
    min-height: 2.7rem;
    padding: 0;
    border-radius: 1rem;
  }

  .app-header-account-btn {
    min-height: 2.7rem;
    padding: 0 0.78rem;
    border-radius: 1rem;
  }

  .app-header-account-chip {
    padding: 0.25rem;
    border-radius: 1rem;
  }

  .mobile-menu-toggle,
  .mobile-header-drawer {
    display: none !important;
  }

  section {
    background-attachment: scroll !important;
  }

  .mobile-home-hub {
    display: block;
    position: relative;
    z-index: 24;
    padding: 5.45rem 1rem 1rem;
  }

  .mobile-home-surface {
    padding: 1rem;
  }

  .mobile-bottom-nav {
    display: flex;
  }

  .app-home-main {
    padding-bottom: 6.7rem;
  }

  .hero-mobile-insights {
    display: flex;
    gap: 0.95rem;
    overflow-x: auto;
    padding-bottom: 0.35rem;
    scroll-snap-type: x proximity;
    -webkit-overflow-scrolling: touch;
  }

  .hero-mobile-insights > article {
    min-width: min(84vw, 22rem);
    flex: 0 0 auto;
    scroll-snap-align: start;
  }

  #notificationPanel {
    top: auto;
    right: 0.85rem;
    left: 0.85rem;
    bottom: calc(6rem + env(safe-area-inset-bottom));
    width: auto !important;
    max-width: none !important;
    border-radius: 1.65rem;
  }
}

/* Hero: ajustes de densidad visual en pantallas pequeñas */
@media (max-width: 639px) {
  #mainHeader {
    border-bottom-left-radius: 1.25rem;
    border-bottom-right-radius: 1.25rem;
  }

  #mainHeader nav {
    gap: 0.65rem;
    padding-top: 0.72rem;
    padding-bottom: 0.72rem;
  }

  .app-header-actions {
    gap: 0.35rem;
  }

  .app-header-action-btn {
    min-width: 2.5rem;
    min-height: 2.5rem;
    border-radius: 0.95rem;
  }

  .app-header-account-btn {
    min-height: 2.5rem;
    padding-left: 0.72rem;
    padding-right: 0.72rem;
    border-radius: 0.95rem;
  }

  .app-header-account-btn svg {
    width: 1rem;
    height: 1rem;
  }

  .app-header-account-chip {
    min-width: 2.5rem;
    min-height: 2.5rem;
    justify-content: center;
  }

  .app-header-account-chip img {
    width: 1.9rem;
    height: 1.9rem;
  }

  #notificationToggle .utility-badge {
    top: 0.05rem;
    right: 0.02rem;
  }

  /* Tarjeta principal del hero: padding más compacto */
  .hero-shell-card {
    padding: 1.1rem !important;
    border-radius: 1.4rem !important;
  }

  #leafRain,
  .aero-page-glow {
    display: none;
  }

  #inicio {
    min-height: auto;
  }

  #inicio > .relative.z-10 {
    min-height: auto;
    padding-top: 1.15rem !important;
    padding-bottom: 2rem !important;
  }

  .mobile-home-hub {
    padding-top: 5rem;
  }

  .mobile-home-title {
    max-width: 13.5rem;
  }

  .mobile-home-badge {
    padding-left: 0.85rem;
    padding-right: 0.85rem;
  }

  .mobile-quick-grid {
    grid-template-columns: 1fr;
  }

  .mobile-quick-feature {
    align-items: flex-start;
    flex-direction: column;
  }

  .mobile-quick-card {
    min-height: 0;
  }

  .mobile-bottom-nav {
    left: 0.65rem;
    right: 0.65rem;
    bottom: calc(0.55rem + env(safe-area-inset-bottom));
    padding: 0.45rem;
    gap: 0.2rem;
  }

  .mobile-bottom-nav__item {
    padding-top: 0.52rem;
    padding-bottom: 0.48rem;
  }

  .mobile-bottom-nav__item-label {
    font-size: 0.62rem;
  }

  /* Hero title: más pequeño para que no desborde en 320px */
  h1.font-display {
    font-size: clamp(2.1rem, 9vw, 3rem) !important;
    line-height: 1.05 !important;
  }

  /* Stat cards en hero: compactar */
  .hero-stat-card {
    padding: 0.55rem 0.45rem;
    border-radius: 1rem;
  }
  .hero-stat-value {
    font-size: 1.3rem;
  }
  .hero-stat-label {
    font-size: 0.65rem;
    letter-spacing: 0.04em;
  }

  /* Glass pills en hero: tamaño táctil cómodo */
  .glass-pill {
    font-size: 0.72rem;
    padding: 0.45rem 0.75rem;
  }

  /* Panel lateral del hero: padding reducido */
  .hero-glass-panel {
    padding: 1rem;
  }

  .hero-mobile-insights > article {
    min-width: min(88vw, 19rem);
  }

  /* Paneles flotantes (notificaciones, AI): full-width en pantallas muy pequeñas */
  #notificationPanel,
  #aiPanel {
    right: 0.5rem;
    left: 0.5rem;
    width: auto !important;
    max-width: none !important;
  }

  #notificationPanel {
    bottom: calc(5.8rem + env(safe-area-inset-bottom));
  }

  #loginModal,
  #registerModal,
  #recuperarModal,
  #verificacionModal,
  #brandsPdfModal {
    align-items: flex-end;
    padding: 0.5rem;
  }

  .app-modal-card {
    width: 100%;
    max-width: none !important;
    max-height: min(88dvh, 100vh);
    margin: 0;
    padding: 1.2rem !important;
    border-radius: 1.7rem 1.7rem 0 0 !important;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding-bottom: calc(1.2rem + env(safe-area-inset-bottom)) !important;
  }

  .app-modal-card--wide {
    min-height: 72vh;
  }

  /* Sección de sucursales: cards sin perspectiva 3D en táctil */
  .sucursales-premium .bg-white.rounded-2xl.shadow-lg,
  .sucursales-premium .bg-white.rounded-2xl.shadow-xl {
    transform: none !important;
  }

  /* Destacados group grid: 2 columnas ajustadas en xs */
  .destacados-grupo-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 0.75rem;
  }

  .destacado-grupo-img {
    height: 110px;
  }
}

/* Mejoras de área táctil (todos los tamaños de celular) */
@media (max-width: 767px) {
  /* Chips de categoría: altura mínima táctil */
  .filter-chip {
    min-height: 2.5rem;
    padding-left: 0.85rem;
    padding-right: 0.85rem;
  }

  /* Scroll suave en contenedores horizontales */
  .overflow-x-auto,
  [class*="overflow-x-auto"] {
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x proximity;
  }

  /* Cards de producto: feedback táctil en toque */
  .card-product:active {
    transform: scale(0.975) !important;
    transition: transform 120ms ease;
  }

  /* Perspectiva 3D en categorías: desactivar en táctil (causa jank en scroll) */
  .categoria-grid {
    perspective: none;
  }

  /* Scroll margin para navbar flotante en mobile */
  section[id] {
    scroll-margin-top: 5rem;
  }

  /* Botones de acción flotantes: asegurar que no se solapen */
  .ai-fab {
    bottom: 1.2rem;
    right: 1rem;
    padding: 0.75rem 1rem;
    font-size: 0.78rem;
    gap: 0.45rem;
  }

  /* Marquee en mobile: velocidad reducida para mejor legibilidad */
  .marquee-track-x {
    animation-duration: 48s;
  }
  .marquee-track-y {
    animation-duration: 38s;
  }

  /* Franja destacada: wrap más compacto */
  .franja-destacada-inner {
    padding: 1rem 1.2rem;
  }
}

/* ============================================
   CATALOG FLIP BOOK PREVIEW (marcas section)
   ============================================ */

.catalog-book-wrap {
  max-width: 600px;
  margin: 0 auto;
}

/* Scene: perspective container */
.catalog-flip-scene {
  position: relative;
  width: 100%;
  /* Portrait book ratio (A5/letter-ish) */
  aspect-ratio: 3 / 4;
  max-height: 78vh;
  border-radius: 6px 18px 18px 6px;
  /* Outer book shadow */
  box-shadow:
    -8px 0 20px rgba(0,0,0,0.08),
    8px 0 0 rgba(0,0,0,0.04),
    0 40px 80px rgba(0,0,0,0.22);
  background: #f8f6f0;
  overflow: hidden;
}

/* Spine — left edge gradient to simulate binding */
.catalog-book-spine {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 22px;
  z-index: 10;
  pointer-events: none;
  background: linear-gradient(
    to right,
    rgba(0,0,0,0.18) 0%,
    rgba(0,0,0,0.06) 55%,
    transparent 100%
  );
  border-right: 1px solid rgba(0,0,0,0.07);
}

/* Individual page leaf */
.catalog-leaf {
  position: absolute;
  inset: 0;
  background: #fff;
  transform-origin: left center;
  will-change: transform;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

/* The iframe fills the entire leaf */
.catalog-flip-iframe {
  width: 100%;
  height: 100%;
  border: none;
  /* Prevent user interaction — it's a preview */
  pointer-events: none;
  display: block;
  background: #fff;
}

/* Footer: prev · label · next */
.catalog-book-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.25rem;
  margin-top: 1.25rem;
}

.catalog-flip-nav-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 9999px;
  border: 1px solid rgba(45, 122, 62, 0.28);
  background: rgba(255, 255, 255, 0.85);
  color: #2d7a3e;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  flex-shrink: 0;
}

.catalog-flip-nav-btn:hover {
  background: #f0fdf4;
  transform: scale(1.08);
  box-shadow: 0 4px 12px rgba(45,122,62,0.18);
}

.catalog-flip-nav-btn:active {
  transform: scale(0.96);
}

.catalog-flip-label {
  font-size: 0.8rem;
  color: #6b7280;
  font-weight: 600;
  text-align: center;
  min-width: 11rem;
  line-height: 1.4;
}

/* Mobile tweaks */
@media (max-width: 639px) {
  .catalog-flip-scene {
    max-height: 65vh;
    border-radius: 4px 12px 12px 4px;
    box-shadow:
      -4px 0 12px rgba(0,0,0,0.08),
      0 20px 40px rgba(0,0,0,0.18);
  }

  .catalog-book-spine {
    width: 14px;
  }

  .catalog-flip-label {
    min-width: 8rem;
    font-size: 0.72rem;
  }

  .catalog-flip-nav-btn {
    width: 2.4rem;
    height: 2.4rem;
  }
}
