/* Ciri Comercializadora — paleta y estilo según el Manual de Marca (pág. 1 y 4) */
:root {
  --amarillo: #F3D44E;
  --azul: #0D63F3;
  --azul-oscuro: #0A4FC4;
  --marino: #0B1454;
  --neutro: #F5F7FF;
  --celeste: #DCE8FF; /* tinte del azul para fondos de tarjetas y pills */
  --texto: #0B1454;
  --texto-suave: #3D4677;
  --borde: #E1E7F7;
  --blanco: #fff;

  --radio: 20px;
  --radio-sm: 12px;
  --sombra: 0 10px 30px -12px rgba(11, 20, 84, .18);
  --sombra-lg: 0 24px 60px -20px rgba(11, 20, 84, .28);
  --header-h: 72px;
  --font: "Outfit", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 12px); }
body {
  margin: 0; font-family: var(--font); color: var(--texto); background: var(--blanco);
  font-size: 1.0625rem; line-height: 1.6; -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--azul); }
h1, h2, h3 { line-height: 1.12; margin: 0 0 .5em; font-weight: 700; letter-spacing: -.015em; }
p { margin: 0 0 1em; }
:focus-visible { outline: 3px solid var(--azul); outline-offset: 3px; border-radius: 6px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; z-index: 100; background: var(--marino); color: #fff; padding: .6em 1em; border-radius: 8px; }
.skip:focus { left: 8px; }

.wrap { width: min(1160px, 100% - 2.5rem); margin-inline: auto; }
.wrap--narrow { width: min(820px, 100% - 2.5rem); }

/* Íconos (sprite en index.html) */
.ico { width: 28px; height: 28px; fill: none; stroke: var(--azul); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.ico--sm { width: 20px; height: 20px; }
.ico--lg { width: 52px; height: 52px; }
.ico--xl { width: 72px; height: 72px; }

/* Botones (manual: botón principal relleno y secundario de contorno, ambos tipo píldora) */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  font: 600 1rem/1 var(--font); padding: .95em 1.6em; border-radius: 999px; border: 2px solid transparent;
  text-decoration: none; cursor: pointer; transition: transform .15s ease, background-color .15s, box-shadow .15s;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn--primary { background: var(--azul); color: #fff; box-shadow: 0 8px 20px -8px rgba(13, 99, 243, .6); }
.btn--primary:hover { background: var(--azul-oscuro); }
.btn--primary .ico { stroke: #fff; }
.btn--ghost { border-color: var(--azul); color: var(--azul); background: #fff; }
.btn--ghost:hover { background: var(--celeste); }
.btn--yellow { background: var(--amarillo); color: var(--marino); }
.btn--yellow:hover { background: #F7DE6E; }
.btn--lg { font-size: 1.125rem; padding: 1.05em 2em; }
.btn--block { width: 100%; }

.pill {
  display: inline-block; background: var(--celeste); color: var(--marino); font-weight: 600; font-size: .9rem;
  padding: .4em 1em; border-radius: 999px; margin-bottom: 1.1rem;
}
.pill--light { background: rgba(255, 255, 255, .14); color: #fff; }

/* Aviso de vista preliminar (se oculta solo cuando la configuración está completa) */
.preview-banner { background: var(--marino); color: #fff; font-size: .875rem; text-align: center; padding: .55em 1rem; }
.preview-banner strong { color: var(--amarillo); }

/* HEADER */
.header { position: sticky; top: 0; z-index: 40; background: rgba(255, 255, 255, .92); backdrop-filter: blur(10px); border-bottom: 1px solid transparent; transition: border-color .2s, box-shadow .2s; }
.header.is-scrolled { border-color: var(--borde); box-shadow: 0 6px 20px -14px rgba(11, 20, 84, .3); }
.header__in { height: var(--header-h); display: flex; align-items: center; gap: 1.5rem; }
.header__logo img { height: 48px; width: auto; }
.nav { display: none; gap: 1.75rem; margin-left: auto; }
.nav a { color: var(--marino); text-decoration: none; font-weight: 500; position: relative; }
.nav a::after { content: ""; position: absolute; left: 0; right: 100%; bottom: -6px; height: 3px; background: var(--amarillo); border-radius: 3px; transition: right .2s; }
.nav a:hover::after { right: 0; }
.cart-btn {
  margin-left: auto; display: inline-flex; align-items: center; gap: .5rem; background: var(--neutro);
  border: 1.5px solid var(--borde); color: var(--marino); font: 600 .95rem var(--font); padding: .5rem .8rem .5rem .7rem;
  border-radius: 999px; cursor: pointer; transition: border-color .15s;
}
.cart-btn:hover { border-color: var(--azul); }
.cart-btn__txt { display: none; }
.cart-btn__n { min-width: 1.6em; height: 1.6em; display: grid; place-items: center; background: var(--amarillo); color: var(--marino); border-radius: 999px; font-size: .85rem; font-weight: 700; padding: 0 .35em; }
.cart-btn.bump { animation: bump .4s ease; }
@keyframes bump { 40% { transform: scale(1.12); } }

/* HERO */
.hero { position: relative; overflow: hidden; padding: 3rem 0 4rem; background: linear-gradient(180deg, #fff 0%, var(--neutro) 100%); }
.hero__blob { position: absolute; right: -120px; top: -150px; width: 240px; height: 240px; border-radius: 50%; background: var(--azul); opacity: .95; }
.hero__blob::after { content: ""; position: absolute; left: -40px; top: 150px; width: 120px; height: 120px; border-radius: 50%; background: var(--amarillo); z-index: -1; }
.hero__in { position: relative; display: grid; gap: 2.5rem; align-items: center; }
.hero h1 { font-size: clamp(2.3rem, 6.2vw, 4rem); font-weight: 800; color: var(--marino); }
.hero h1 .u { color: var(--azul); background: linear-gradient(transparent 72%, var(--amarillo) 72% 92%, transparent 92%); }
.lead { font-size: 1.15rem; color: var(--texto-suave); max-width: 34em; }
.hero__cta { display: flex; flex-wrap: wrap; gap: .8rem; margin: 1.8rem 0 1.6rem; }
.hero__trust { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: .6rem 1.6rem; color: var(--texto-suave); font-weight: 500; }
.hero__trust li { display: flex; align-items: center; gap: .5rem; }
.hero__trust .ico { width: 26px; height: 26px; }

.hero__art { position: relative; aspect-ratio: 1; width: min(440px, 88%); margin-inline: auto; }
.hero__circle { position: absolute; inset: 6%; border-radius: 50%; background: #fff; box-shadow: var(--sombra-lg); display: grid; place-items: center; }
.hero__iso { width: 72%; height: 72%; animation: tap 3.2s ease-in-out infinite; transform-origin: 40% 40%; }
@keyframes tap { 0%, 70%, 100% { transform: scale(1); } 78% { transform: scale(.94); } 86% { transform: scale(1.02); } }
.float { position: absolute; width: 76px; height: 76px; border-radius: 22px; background: #fff; box-shadow: var(--sombra); display: grid; place-items: center; animation: flotar 5s ease-in-out infinite; }
.float .ico { width: 44px; height: 44px; }
.float--1 { top: 2%; left: 0; }
.float--2 { top: 8%; right: -2%; animation-delay: -1.2s; }
.float--3 { bottom: 4%; left: 4%; animation-delay: -2.4s; }
.float--4 { bottom: 0; right: 6%; animation-delay: -3.6s; }
@keyframes flotar { 50% { transform: translateY(-12px); } }

/* SECCIONES (encabezado tipo pestaña + línea amarilla, como en el manual) */
.section { padding: 4.5rem 0; }
.section--tint { background: var(--neutro); }
.head { display: flex; align-items: center; gap: 1.2rem; margin-bottom: 1rem; }
.tab { margin: 0; background: var(--azul); color: #fff; font-size: clamp(1.35rem, 3vw, 1.75rem); padding: .4em 1.1em; border-radius: 0 999px 999px 0; margin-left: -1.25rem; padding-left: 1.25rem; }
.rule { flex: 1; height: 3px; background: var(--amarillo); border-radius: 3px; }
.sub { color: var(--texto-suave); margin-bottom: 2rem; }

/* Categorías */
.cats { display: grid; gap: 1rem; grid-template-columns: 1fr; }
.cat {
  display: flex; flex-direction: column; text-align: left; gap: .4rem; padding: 0; overflow: hidden;
  background: #fff; border: 1.5px solid var(--borde); border-radius: var(--radio); cursor: pointer; font: inherit; color: inherit;
  transition: transform .2s, box-shadow .2s, border-color .2s;
}
.cat:hover { transform: translateY(-4px); box-shadow: var(--sombra); border-color: var(--celeste); }
.cat__top { background: var(--celeste); padding: .75rem 1.1rem; font-weight: 700; font-size: 1.05rem; color: var(--marino); }
.cat__body { display: flex; gap: 1rem; align-items: center; padding: 1rem 1.1rem 1.2rem; }
.cat__body .ico { width: 56px; height: 56px; }
.cat__txt { margin: 0; color: var(--texto-suave); font-size: .97rem; }

/* Filtros + grilla de productos */
.filters { display: flex; flex-wrap: wrap; gap: .5rem; margin: 1.5rem 0; }
.chip { font: 600 .92rem var(--font); padding: .55em 1.1em; border-radius: 999px; border: 1.5px solid var(--azul); background: #fff; color: var(--azul); cursor: pointer; }
.chip[aria-pressed="true"] { background: var(--azul); color: #fff; }
.aviso-ejemplo { background: #FFF7D1; border: 1px dashed #D9B92A; color: #5C4A00; padding: .6em 1em; border-radius: var(--radio-sm); font-size: .92rem; }
.grid { display: grid; gap: 1rem; grid-template-columns: repeat(2, 1fr); }
.card { background: #fff; border: 1.5px solid var(--borde); border-radius: var(--radio); overflow: hidden; display: flex; flex-direction: column; transition: box-shadow .2s, transform .2s; }
.card:hover { box-shadow: var(--sombra); transform: translateY(-3px); }
.card__img { aspect-ratio: 1; background: radial-gradient(circle at 56% 44%, var(--amarillo) 0 21%, transparent 21.5%), var(--neutro); display: grid; place-items: center; position: relative; }
.card__img img { width: 100%; height: 100%; object-fit: cover; }
.card__img .ico { width: 42%; height: 42%; filter: drop-shadow(0 6px 10px rgba(11,20,84,.12)); }
.card__badge { position: absolute; top: .6rem; left: .6rem; background: var(--amarillo); color: var(--marino); font-size: .72rem; font-weight: 700; padding: .2em .6em; border-radius: 999px; }
.card__body { padding: .9rem 1rem 1rem; display: flex; flex-direction: column; gap: .35rem; flex: 1; }
.card__cat { font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; color: var(--texto-suave); font-weight: 600; }
.card__name { font-size: 1.02rem; font-weight: 600; margin: 0; }
.card__price { font-size: 1.2rem; font-weight: 800; color: var(--marino); margin-top: auto; }
.card .btn { padding: .7em 1em; font-size: .92rem; margin-top: .4rem; }
.card .btn.is-added { background: var(--amarillo); color: var(--marino); box-shadow: none; }

/* Pasos */
.steps { list-style: none; padding: 0; margin: 2rem 0 0; display: grid; gap: 1.2rem; counter-reset: s; }
.step { position: relative; background: #fff; border: 1.5px solid var(--borde); border-radius: var(--radio); padding: 1.8rem 1.5rem 1.5rem; }
.step__n { position: absolute; top: -16px; left: 1.5rem; width: 36px; height: 36px; border-radius: 50%; background: var(--amarillo); color: var(--marino); display: grid; place-items: center; font-weight: 800; }
.step h3 { font-size: 1.25rem; margin-top: .8rem; }
.step p { color: var(--texto-suave); margin: 0; }

/* Mayoristas */
.b2b { background: var(--marino); color: #fff; border-radius: 28px; padding: 2.5rem 1.6rem; display: grid; gap: 2rem; position: relative; overflow: hidden; }
.b2b::before { content: ""; position: absolute; right: -80px; bottom: -110px; width: 280px; height: 280px; border-radius: 50%; background: var(--azul); }
.b2b::after { content: ""; position: absolute; right: 90px; bottom: -150px; width: 200px; height: 200px; border-radius: 50%; background: var(--amarillo); }
.b2b > * { position: relative; z-index: 1; }
.b2b h2 { font-size: clamp(1.7rem, 4vw, 2.4rem); }
.b2b p { color: #C9D2F5; max-width: 32em; }
.b2b__icons { display: grid; grid-template-columns: repeat(2, 88px); gap: 1rem; justify-content: center; align-content: center; }
.b2b__icons span { width: 88px; height: 88px; background: #fff; border-radius: 24px; display: grid; place-items: center; }

/* FAQ */
.faq { margin-top: 2rem; display: grid; gap: .75rem; }
.faq details { background: #fff; border: 1.5px solid var(--borde); border-radius: var(--radio-sm); padding: 0 1.2rem; }
.faq summary { cursor: pointer; list-style: none; font-weight: 600; padding: 1.05rem 0; display: flex; justify-content: space-between; gap: 1rem; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--azul); font-size: 1.5rem; line-height: 1; transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { color: var(--texto-suave); padding-bottom: 1rem; margin: 0; }

/* Cierre */
.cta-final { background: var(--azul); color: #fff; text-align: center; padding: 4.5rem 0; position: relative; overflow: hidden; }
.cta-final::before { content: ""; position: absolute; left: -110px; bottom: -150px; width: 240px; height: 240px; border-radius: 50%; background: var(--amarillo); opacity: .9; }
.cta-final__in { position: relative; }
.cta-final__iso { width: 96px; height: 96px; margin: 0 auto 1rem; display: block; background: #fff; border-radius: 50%; padding: 10px; }
.cta-final h2 { font-size: clamp(1.8rem, 4.5vw, 2.6rem); }
.cta-final p { color: #E0EAFF; margin-bottom: 1.8rem; }

/* Footer */
.footer { background: var(--neutro); padding: 3.5rem 0 5.5rem; }
.footer__in { display: grid; gap: 2rem; }
.footer__logo { width: 150px; }
.footer__cols { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
.footer h3 { font-size: 1rem; margin-bottom: .8rem; }
.footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .45rem; }
.footer a { color: var(--texto-suave); text-decoration: none; }
.footer a:hover { color: var(--azul); }
.footer__legal { margin-top: 2.5rem; padding-top: 1.2rem; border-top: 1px solid var(--borde); color: var(--texto-suave); font-size: .875rem; }

/* WhatsApp flotante */
.wa-float { position: fixed; right: 1rem; bottom: calc(1rem + env(safe-area-inset-bottom)); z-index: 35; width: 60px; height: 60px; border-radius: 50%; background: var(--amarillo); display: grid; place-items: center; box-shadow: var(--sombra-lg); transition: transform .15s; }
.wa-float:hover { transform: scale(1.06); }
.wa-float .ico { width: 34px; height: 34px; }

/* Carro (drawer) */
.overlay { position: fixed; inset: 0; background: rgba(11, 20, 84, .45); z-index: 60; }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: min(420px, 100%); background: #fff; z-index: 61;
  display: flex; flex-direction: column; box-shadow: var(--sombra-lg); animation: entrar .25s ease;
}
@keyframes entrar { from { transform: translateX(100%); } }
.drawer__head { display: flex; justify-content: space-between; align-items: center; padding: 1.1rem 1.3rem; border-bottom: 1px solid var(--borde); }
.drawer__head h2 { margin: 0; font-size: 1.4rem; }
.icon-btn { width: 40px; height: 40px; border-radius: 50%; border: 0; background: var(--neutro); display: grid; place-items: center; cursor: pointer; }
.drawer__body { flex: 1; overflow-y: auto; padding: 1rem 1.3rem; }
.lines { list-style: none; margin: 0; padding: 0; display: grid; gap: .8rem; }
.line { display: grid; grid-template-columns: 56px 1fr auto; gap: .8rem; align-items: center; }
.line__img { width: 56px; height: 56px; border-radius: 14px; background: var(--celeste); display: grid; place-items: center; overflow: hidden; }
.line__img img { width: 100%; height: 100%; object-fit: cover; }
.line__img .ico { width: 30px; height: 30px; }
.line__name { font-weight: 600; font-size: .95rem; line-height: 1.3; }
.line__price { color: var(--texto-suave); font-size: .88rem; }
.qty { display: inline-flex; align-items: center; border: 1.5px solid var(--borde); border-radius: 999px; }
.qty button { width: 32px; height: 32px; border: 0; background: none; font: 700 1.1rem var(--font); color: var(--azul); cursor: pointer; border-radius: 50%; }
.qty span { min-width: 1.6em; text-align: center; font-weight: 600; }
.empty { text-align: center; padding: 3rem 1rem; color: var(--texto-suave); }
.empty .ico { margin: 0 auto 1rem; }
.drawer__foot { border-top: 1px solid var(--borde); padding: 1rem 1.3rem calc(1rem + env(safe-area-inset-bottom)); display: grid; gap: .7rem; background: var(--neutro); }
.total { display: flex; justify-content: space-between; align-items: baseline; font-weight: 600; }
.total strong { font-size: 1.5rem; color: var(--marino); }
.field { display: grid; gap: .3rem; font-weight: 600; font-size: .9rem; }
.field .opt { font-weight: 400; color: var(--texto-suave); }
.field input { font: 400 1rem var(--font); padding: .7em .9em; border: 1.5px solid var(--borde); border-radius: var(--radio-sm); background: #fff; color: var(--texto); }
.field input:focus { outline: none; border-color: var(--azul); box-shadow: 0 0 0 3px var(--celeste); }
.field input[aria-invalid="true"] { border-color: #D93025; }
.check { display: flex; align-items: center; gap: .5rem; font-size: .95rem; cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--azul); }
.form-error { color: #B3261E; font-size: .88rem; margin: 0; min-height: 0; }
.form-error:empty { display: none; }
.fine { font-size: .8rem; color: var(--texto-suave); text-align: center; margin: 0; }

.toast { visibility: hidden; width: max-content; max-width: calc(100% - 2rem); text-align: center; position: fixed; left: 50%; bottom: 1.5rem; transform: translate(-50%, 150%); background: var(--marino); color: #fff; padding: .75em 1.3em; border-radius: 999px; font-weight: 500; z-index: 70; transition: transform .3s ease; pointer-events: none; }
.toast.show { visibility: visible; transform: translate(-50%, 0); }

body.no-scroll { overflow: hidden; }

/* ≥ 640px */
@media (min-width: 640px) {
  .cats { grid-template-columns: repeat(2, 1fr); }
  .grid { grid-template-columns: repeat(3, 1fr); }
  .steps { grid-template-columns: repeat(3, 1fr); }
  .cart-btn__txt { display: inline; }
  .footer__cols { grid-template-columns: repeat(2, 200px); }
}
/* ≥ 960px */
@media (min-width: 960px) {
  .nav { display: flex; }
  .cart-btn { margin-left: 0; }
  .header__logo img { height: 54px; }
  .hero { padding: 4.5rem 0 6rem; }
  .hero__in { grid-template-columns: 1.1fr .9fr; }
  .hero__blob { width: 560px; height: 560px; right: -200px; top: -240px; }
  .hero__blob::after { left: -70px; top: 120px; width: 260px; height: 260px; }
  .cta-final::before { width: 360px; height: 360px; left: -120px; bottom: -160px; }
  .footer { padding-bottom: 1.5rem; }
  .cats { grid-template-columns: repeat(4, 1fr); }
  .cat__body { flex-direction: column; align-items: flex-start; }
  .grid { grid-template-columns: repeat(4, 1fr); gap: 1.3rem; }
  .b2b { grid-template-columns: 1.4fr 1fr; padding: 3.5rem; }
  .footer__in { grid-template-columns: auto 1fr; justify-items: start; }
  .footer__cols { justify-self: end; }
  .tab { margin-left: 0; padding-left: 1.1em; border-radius: 999px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}
