/* Fuentes locales: la página conserva su diseño sin conexiones a terceros. */
@font-face {
  font-family: 'DM Sans';
  font-style: normal;
  font-weight: 100 1000;
  font-display: swap;
  src: url('../fonts/dm-sans-latin-wght-normal.woff2') format('woff2');
}
@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url('../fonts/manrope-latin-wght-normal.woff2') format('woff2');
}

/* Bunna Shoes: rosa y lima, cristal translúcido y nubes suaves. */
:root {
  color-scheme: light;
  --ink: #111827;
  --rose: #ffbfe0;
  --lime: #e8f9a2;
  --line: rgb(17 24 39 / 13%);
  --glass-sheen: linear-gradient(135deg, rgb(255 255 255 / 38%), rgb(255 255 255 / 7%) 46%, rgb(255 255 255 / 20%));
  --glass-shadow: 0 10px 30px rgb(42 39 49 / 9%), inset 1px 1px 0 rgb(255 255 255 / 72%), inset -1px -1px 0 rgb(255 255 255 / 24%), inset 0 0 16px rgb(255 255 255 / 18%);
  --glass-hover-shadow: 0 14px 32px rgb(42 39 49 / 13%), inset 1px 1px 0 rgb(255 255 255 / 88%), inset -1px -1px 0 rgb(255 255 255 / 34%);
}

html {
  min-height: 100%;
  overflow-x: clip;
  background: #efdedf;
  scroll-behavior: smooth;
  scroll-padding-top: 7rem;
}

body {
  position: relative;
  isolation: isolate;
  min-height: 100vh;
  overflow-x: clip;
  background: transparent;
  color: var(--ink);
  font-family: 'DM Sans', system-ui, sans-serif;
}

/* Dos capas fijas: se desplazan con transform, sin animar el desenfoque. */
body::before,
body::after {
  position: fixed;
  z-index: -1;
  inset: -16vmax;
  pointer-events: none;
  content: "";
}

body::before {
  background:
    radial-gradient(ellipse at 12% 30%, rgb(255 191 224 / 98%) 8%, rgb(255 191 224 / 78%) 27%, transparent 53%),
    radial-gradient(ellipse at 86% 26%, rgb(232 249 162 / 98%) 8%, rgb(232 249 162 / 84%) 28%, transparent 56%),
    radial-gradient(ellipse at 72% 84%, rgb(255 191 224 / 92%) 8%, transparent 52%),
    radial-gradient(ellipse at 14% 84%, rgb(232 249 162 / 90%) 8%, transparent 52%);
  filter: blur(40px);
  animation: page-cloud-drift 18s ease-in-out -9s infinite alternate;
}

body::after {
  background:
    radial-gradient(ellipse at 32% 60%, rgb(255 174 215 / 76%), transparent 43%),
    radial-gradient(ellipse at 70% 44%, rgb(218 241 134 / 72%), transparent 44%),
    radial-gradient(ellipse at 48% 10%, rgb(255 191 224 / 58%), transparent 40%);
  opacity: .72;
  filter: blur(32px);
  animation: page-cloud-haze 24s ease-in-out -6s infinite alternate;
}

/* Nubes CSS siempre animadas; Vanta suma el humo cuando WebGL está disponible. */
#fondo-fog {
  position: fixed;
  inset: -6vmax;
  z-index: -2;
  overflow: hidden;
  pointer-events: none;
  opacity: 0;
  transition: opacity 600ms ease;
  animation: fog-drift 20s ease-in-out -10s infinite alternate;
}
#fondo-fog canvas { display: block; pointer-events: none; }
body::before,
body::after { transition: opacity 600ms ease; }
body.fog-activo #fondo-fog { opacity: 1; }
body.fog-activo::before { opacity: .55; }
body.fog-activo::after { opacity: .42; }

@keyframes fog-drift {
  from { transform: translate3d(-2%, -1%, 0) scale(1.02); }
  to { transform: translate3d(2%, 1%, 0) scale(1.06); }
}

@keyframes page-cloud-drift {
  from { transform: translate3d(-10%, -5%, 0) scale(1.06) rotate(-3deg); }
  to { transform: translate3d(10%, 6%, 0) scale(1.12) rotate(3deg); }
}

@keyframes page-cloud-haze {
  from { transform: translate3d(9%, -6%, 0) scale(1.08) rotate(3deg); }
  to { transform: translate3d(-9%, 7%, 0) scale(1.04) rotate(-4deg); }
}

@keyframes hero-entrance {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes bunna-logo-float {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(var(--bunna-float-y, -12px)) rotate(-.65deg); }
}

::selection { background: var(--rose); color: var(--ink); }
[hidden] { display: none !important; }
body :is(.text-gray-500, .text-gray-600) { color: #414b57; }
.skip-link {
  position: fixed;
  z-index: 100;
  top: .75rem;
  left: .75rem;
  transform: translateY(-200%);
  border-radius: .75rem;
  padding: .75rem 1rem;
  background: var(--ink);
  color: #fff;
}
.skip-link:focus { transform: none; }

/* Un mismo material para paneles, marca y controles. */
:is(
  #encabezado .brand-glass,
  #encabezado .efecto-vidrio,
  #grid article,
  #beneficios > div > div,
  #cotizador > div > div,
  main > section ol li,
  footer > div > div,
  #no-disponible,
  .modal-caja,
  .glass-action,
  #tabs button,
  #filtros button,
  #grid article > div > button,
  #pedido-lista button,
  #vaciar,
  #m-cerrar,
  #f-tel,
  #f-ig,
  #f-fb
) {
  border: 1px var(--surface-border-style, solid) rgb(255 255 255 / 64%);
  border-top-color: rgb(255 255 255 / 92%);
  border-bottom-color: rgb(255 255 255 / 34%);
  background: var(--glass-sheen) var(--surface-tint, rgb(255 255 255 / 12%));
  color: var(--ink);
  box-shadow: var(--surface-shadow, var(--glass-shadow));
  backdrop-filter: blur(18px) saturate(150%);
  -webkit-backdrop-filter: blur(18px) saturate(150%);
}

/* Encabezado y logo pequeño. */
#encabezado { background: transparent; border: 0; }
#encabezado > div { row-gap: .65rem; }

#encabezado .brand-glass {
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  min-height: 3.6rem;
  border-radius: 1.25rem;
  padding: .35rem .75rem;
  transition: transform .2s ease, box-shadow .2s ease;
}

#encabezado .brand-glass img { display: block; height: 2.75rem; width: auto; }

#encabezado .efecto-vidrio {
  min-width: 0;
  gap: .15rem;
  border-radius: 1.25rem;
  padding: .3rem;
  overflow-x: auto;
  scrollbar-width: thin;
  scrollbar-color: rgb(17 24 39 / 28%) transparent;
}

#encabezado .efecto-vidrio a {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  min-height: 2.75rem;
  border-radius: .95rem;
  padding: .5rem .75rem;
  color: var(--ink);
  white-space: nowrap;
  text-decoration: none;
  transition: background-color .2s ease;
}

#encabezado .efecto-vidrio a:hover,
#encabezado .efecto-vidrio a:focus-visible { background: rgb(255 255 255 / 32%); }
#encabezado .efecto-vidrio a:focus-visible { outline-offset: -3px; }
#encabezado #nav-count { color: var(--ink); }
#encabezado .glass-whatsapp { white-space: nowrap; --control-padding: .7rem 1rem; }

/* Controles: el tinte identifica la acción y el cristal deja pasar el fondo. */
:is(
  .glass-action,
  #tabs button,
  #filtros button,
  #grid article > div > button,
  #pedido-lista button,
  #vaciar,
  #m-cerrar,
  #f-tel,
  #f-ig,
  #f-fb
) {
  --surface-tint: var(--control-tint, rgb(255 255 255 / 14%));
  --surface-shadow: var(--control-shadow, var(--glass-shadow));
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  min-height: var(--control-height, 3rem);
  border-radius: var(--control-radius, 1.1rem);
  padding: var(--control-padding, .75rem 1.25rem);
  font-weight: 700;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}

.glass-action svg { flex-shrink: 0; }
.glass-action[data-wa] { --control-tint: rgb(232 249 162 / 28%); }
.glass-primary { --control-tint: rgb(232 249 162 / 78%); }
#inicio .glass-action { --control-height: 3.3rem; --control-padding: .9rem 1.45rem; }
#enviar-pedido { width: 100%; --control-height: 3.3rem; }
#m-wa { width: 100%; --control-tint: rgb(232 249 162 / 90%); }
#m-add { width: 100%; --control-tint: rgb(255 191 224 / 62%); }

#tabs button,
#filtros button { --control-height: 2.75rem; --control-padding: .65rem 1.1rem; }

#tabs button[aria-selected="true"],
#filtros button[aria-pressed="true"] {
  --control-tint: rgb(232 249 162 / 84%);
  border-color: rgb(17 24 39 / 28%);
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: .3rem;
}

#grid article > div > button { width: 100%; --control-tint: rgb(232 249 162 / 76%); }
#pedido-lista button,
#m-cerrar { width: 2.75rem; height: 2.75rem; --control-height: 2.75rem; --control-padding: 0; --control-radius: 999px; }
#vaciar { --control-height: 2.5rem; --control-padding: .45rem .8rem; --control-radius: 999px; }

#f-tel,
#f-ig,
#f-fb { --control-height: 2.5rem; --control-padding: .4rem .85rem; --control-radius: 999px; }

#whatsapp-flotante {
  width: 3.5rem;
  height: 3.5rem;
  --control-height: 3.5rem;
  --control-padding: 0;
  --control-radius: 999px;
  --control-tint: rgb(232 249 162 / 45%);
}

@media (hover: hover) {
  :is(.glass-action, #tabs button, #filtros button, #grid article > div > button, #pedido-lista button, #vaciar, #m-cerrar, #f-tel, #f-ig, #f-fb):not([aria-disabled="true"]):not(:disabled):hover {
    --control-shadow: var(--glass-hover-shadow);
    border-color: rgb(255 255 255 / 96%);
    transform: translateY(-2px);
  }
  #encabezado .brand-glass:hover { --surface-shadow: var(--glass-hover-shadow); transform: translateY(-1px); }
}

:is(.glass-action, #tabs button, #filtros button, #grid article > div > button, #pedido-lista button, #vaciar, #m-cerrar):not([aria-disabled="true"]):not(:disabled):active { transform: translateY(0) scale(.985); }
a[aria-disabled="true"], button:disabled { opacity: .5; pointer-events: none; }
#enviar-pedido[aria-disabled="true"] { --control-shadow: none; }

/* Portada. */
#inicio {
  position: relative;
  max-width: none;
  padding: clamp(3.5rem, 8vw, 7rem) max(1rem, calc((100% - 72rem) / 2));
  animation: hero-entrance .75s ease-out both;
}

#inicio h1 { max-width: 13ch; letter-spacing: -.045em; }
#inicio > div:first-child > p { line-height: 1.75; }
#inicio .hero-logo { display: grid; min-width: 0; place-items: center; }
#inicio .hero-logo img {
  display: block;
  width: min(100%, 44rem);
  height: auto;
  transform-origin: center;
  animation: bunna-logo-float 6s ease-in-out infinite;
}

/* Las franjas conservan el color; el desenfoque se aplica a sus tarjetas. */
#beneficios {
  border-color: rgb(255 255 255 / 45%);
  background: linear-gradient(110deg, rgb(255 191 224 / 28%), rgb(255 255 255 / 4%), rgb(232 249 162 / 30%));
}

#beneficios > div > div { min-height: 6rem; align-items: flex-start; border-radius: 1.2rem; padding: 1.1rem; }
#beneficios svg { background: rgb(255 191 224 / 78%); color: var(--ink); }
#beneficios h3 { margin: .15rem 0 .25rem; }
#beneficios p { line-height: 1.55; }

#catalogo {
  margin-block: 2rem;
  padding-block: clamp(3rem, 7vw, 5.5rem);
  border: 1px solid rgb(255 255 255 / 48%);
  border-radius: 2rem;
  background: linear-gradient(135deg, rgb(255 255 255 / 16%), rgb(255 255 255 / 4%));
  box-shadow: 0 18px 44px rgb(42 39 49 / 7%);
}

main section h2 { letter-spacing: -.035em; }
#catalogo > p { max-width: 42rem; line-height: 1.7; }
#grid { gap: 1.35rem; }
#grid article { position: relative; overflow: hidden; border-radius: 1.4rem; --surface-tint: rgb(255 255 255 / 13%); transition: transform 500ms ease, box-shadow 500ms ease; }
#grid .producto-imagen { transform: scale(1); transition: transform 500ms ease; }
#grid .producto-foto:focus-visible { outline-offset: -4px; }
#grid article > div { padding: 1.15rem; }
#grid article h3 { font-family: 'Manrope', sans-serif; font-size: 1.2rem; }
#grid article p { line-height: 1.55; }
#grid article p.font-bold { color: var(--ink); font-size: 1.1rem; }
#grid article > button:first-child { background: rgb(255 255 255 / 72%); }
#grid article > button:first-child > span:first-of-type { background: var(--rose); color: var(--ink); }
#grid article > button:first-child > div,
.modal-caja > .relative > div { color: #414b57; }

/* Superficie neutra en las fotografías para respetar el color del producto. */
#grid img,
#m-foto,
#m-minis img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background-color: #fff; }

#no-disponible { --surface-border-style: dashed; border-radius: 1.4rem; --surface-tint: rgb(255 191 224 / 22%); }
#cotizador { background: linear-gradient(110deg, rgb(232 249 162 / 30%), rgb(255 255 255 / 3%), rgb(255 191 224 / 28%)); }
#cotizador > div > div { border-radius: 1.5rem; --surface-tint: rgb(255 255 255 / 13%); }
#total-precio { font-variant-numeric: tabular-nums; }
main > section ol li { border-radius: 1.4rem; --surface-tint: rgb(255 255 255 / 12%); transition: transform .22s ease; }
main > section ol li > span { background: rgb(255 191 224 / 82%); color: var(--ink); }

@media (hover: hover) {
  /* Equivale a -translate-y-2 / shadow-2xl; la imagen usa scale-110. */
  #grid article:hover { z-index: 1; --surface-shadow: 0 25px 50px -12px rgb(0 0 0 / 25%); transform: translateY(-.5rem); }
  #grid article:hover .producto-imagen { transform: scale(1.1); }
  main > section ol li:hover { transform: translateY(-3px); }
}

#preguntas { border-color: var(--line); background: rgb(255 191 224 / 12%); }
details { border-color: var(--line); }
details > summary { list-style: none; cursor: pointer; gap: 1rem; min-height: 2.75rem; }
details > summary::-webkit-details-marker { display: none; }
details[open] .faq-plus { transform: rotate(45deg); }
details p { color: #374151; line-height: 1.7; }
#contacto { border-top: 1px solid rgb(255 255 255 / 50%); background: linear-gradient(110deg, rgb(232 249 162 / 44%), rgb(255 191 224 / 24%)); }
footer > div > div { border-radius: 1.4rem; padding: 1.25rem; --surface-tint: rgb(255 255 255 / 12%); }

/* Vista rápida centrada en todos los tamaños de pantalla. */
.modal {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 200ms ease, visibility 200ms;
}
.modal.abierto { opacity: 1; visibility: visible; pointer-events: auto; }
.modal-fondo {
  position: absolute;
  inset: 0;
  background: rgb(17 24 39 / 62%);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.modal-caja {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  width: 100%;
  max-width: 30rem;
  max-height: calc(100vh - 2rem);
  max-height: calc(100dvh - 2rem);
  overflow-y: auto;
  overscroll-behavior: contain;
  border-radius: 1.5rem;
  --surface-tint: rgb(244 247 239 / 96%);
  transform: translateY(16px) scale(.98);
  transition: transform 250ms ease;
}
.modal.abierto .modal-caja { transform: none; }
.modal-producto-foto { overflow: hidden; border-radius: 1.5rem 1.5rem 0 0; }
.modal-producto-info { min-width: 0; }
#modal #m-wa { border-color: rgb(17 24 39 / 18%); }
#m-minis { display: flex; gap: .6rem; padding: 1rem; overflow-x: auto; }
#m-minis button { flex: 0 0 4rem; width: 4rem; border: 1px solid rgb(17 24 39 / 12%); box-shadow: 0 0 0 2px transparent; }
#m-minis button[aria-current="true"] { box-shadow: 0 0 0 2px var(--ink); }

@media (min-width: 768px) {
  .modal-caja {
    max-width: 58rem;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
    grid-template-areas: "foto info" "miniaturas info";
    align-items: start;
  }
  .modal-producto-foto { grid-area: foto; border-radius: 1.5rem 0 0 0; }
  #m-minis { grid-area: miniaturas; }
  .modal-producto-info { grid-area: info; align-self: center; }
}

/* Foco visible y adaptación a pantallas pequeñas. Animaciones siempre activas. */
a:focus-visible,
button:focus-visible,
summary:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }

.dot::after { display: inline-block; width: .26em; height: .26em; margin-left: .08em; border-radius: 50%; background: var(--rose); box-shadow: 0 0 0 1px var(--ink); content: ""; }

@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  :root { --glass-sheen: linear-gradient(135deg, rgb(255 255 255 / 78%), rgb(255 255 255 / 66%)); }
}

@media (max-width: 1023px) { html { scroll-padding-top: 9.75rem; } }

@media (max-width: 639px) {
  body::before { filter: blur(26px); }
  body::after { filter: blur(22px); opacity: .6; }
  #encabezado .brand-glass { min-height: 3.15rem; padding: .3rem .65rem; }
  #encabezado .brand-glass img { height: 2.4rem; }
  #encabezado .efecto-vidrio { justify-content: safe center; gap: .1rem; font-size: clamp(.7rem, 3vw, .8rem); }
  #encabezado .efecto-vidrio a { padding-inline: clamp(.25rem, 1.1vw, .5rem); }
  #encabezado .glass-whatsapp { --control-height: 2.85rem; --control-padding: .65rem .9rem; }
  #inicio { padding-block: 2.75rem; }
  #inicio .hero-logo img { width: min(100%, 32rem); --bunna-float-y: -8px; }
  #inicio .glass-action { width: 100%; --control-height: 3rem; }
  #grid { gap: 1rem; }
  #whatsapp-flotante { bottom: 1rem; right: 1rem; }
}


