/* Paleta del Kit de Marca Crear-Tex */
:root {
  --navy: #0B1E45;
  --navy-logo: #081C3E;   /* fondo exacto del logo, para que se funda */
  --card: #142B5E;
  --ice: #F4F6FA;
  --white: #FFFFFF;
  --accent: #3DA9FC;
  --muted-dark: #A9B8D6;  /* texto secundario sobre azul */
  --muted-light: #4A5B7D; /* texto secundario sobre claro */
  --wa: #25D366;
  --radius: 20px;
  --shadow: 0 10px 30px rgba(11, 30, 69, .12);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }
body {
  margin: 0;
  font-family: "Red Hat Display", system-ui, sans-serif;
  font-weight: 500;
  color: var(--white);
  background: var(--navy);
  line-height: 1.55;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3 { letter-spacing: -0.03em; line-height: 1.08; margin: 0 0 .5em; }
h1 { font-size: clamp(2.3rem, 5.5vw, 4rem); font-weight: 900; }
h2 { font-size: clamp(1.9rem, 4vw, 3rem); font-weight: 900; }
h3 { font-size: 1.2rem; font-weight: 800; }
em { font-style: normal; color: var(--accent); }

.wrap { width: min(1160px, 100% - 32px); margin-inline: auto; }

.tag {
  font-family: "Red Hat Mono", monospace;
  font-size: .8rem; letter-spacing: .17em; text-transform: uppercase;
  color: var(--accent); margin: 0 0 1rem;
}
.tag--dark { color: var(--navy); }

.pill {
  display: inline-block;
  font-family: "Red Hat Mono", monospace; text-transform: uppercase;
  font-size: .75rem; letter-spacing: .14em;
  padding: .4em .9em; border-radius: 999px;
  background: var(--card); color: var(--white);
}

/* Botones */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  padding: .85em 1.5em; border-radius: 999px;
  font-weight: 800; text-decoration: none; border: 2px solid transparent;
  transition: transform .15s, filter .15s;
}
.btn:hover { transform: translateY(-2px); filter: brightness(1.05); }
.btn--sm { padding: .55em 1.1em; font-size: .95rem; }
.btn--lg { padding: 1em 2em; font-size: 1.2rem; }
.btn--block { width: 100%; }
.btn--accent { background: var(--accent); color: var(--navy); }
.btn--ghost { border-color: rgba(255,255,255,.4); color: var(--white); }
.btn--navy { background: var(--navy); color: var(--white); }
.btn--wa { background: var(--wa); color: #08361a; }

/* Navegación */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(8, 28, 62, .96); backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.nav__inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; height: 68px; }
.nav__brand { display: flex; align-items: center; gap: .6rem; text-decoration: none; font-weight: 800; letter-spacing: .18em; }
.nav__brand img { width: 40px; height: 40px; object-fit: contain; }
.nav__links { display: flex; align-items: center; gap: 1.6rem; }
.nav__links a:not(.btn) { text-decoration: none; color: var(--muted-dark); font-weight: 600; }
.nav__links a:not(.btn):hover { color: var(--white); }
.nav__toggle { display: none; background: none; border: 0; color: var(--white); font-size: 1.6rem; cursor: pointer; padding: .2rem .4rem; }
.nav__actions { display: flex; align-items: center; gap: .6rem; }
.nav__cart {
  position: relative; display: inline-flex; align-items: center; gap: .45rem;
  font: inherit; font-weight: 800; font-size: .95rem; cursor: pointer;
  padding: .55em 1.1em; border-radius: 999px; border: 0;
  background: var(--accent); color: var(--navy);
}
.nav__cart:hover { filter: brightness(1.05); }
.nav__cart-count {
  min-width: 1.5rem; height: 1.5rem; padding: 0 .35rem; border-radius: 999px;
  background: var(--navy); color: var(--white); font-size: .78rem;
  display: inline-grid; place-items: center;
}

/* Hero */
.hero { background: var(--navy-logo); padding: clamp(3rem, 8vw, 6rem) 0; }
.hero__grid { display: grid; grid-template-columns: 1.15fr 1fr; gap: 3rem; align-items: center; }
.hero__lead { color: var(--muted-dark); font-size: 1.15rem; max-width: 34em; }
.hero__cta { display: flex; flex-wrap: wrap; gap: .8rem; margin: 2rem 0; }
.hero__facts { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 2rem; }
.hero__facts strong { display: block; font-size: 2.2rem; font-weight: 900; letter-spacing: -.03em; color: var(--accent); }
.hero__facts span { font-family: "Red Hat Mono", monospace; font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted-dark); }
.hero__logo img { width: 100%; max-width: 520px; margin-inline: auto; }

/* Rubros */
.rubros { background: var(--card); padding: 1.1rem 0; }
.rubros__inner { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; }
.rubros__label { font-weight: 800; margin-right: .4rem; }
.rubros .pill { background: var(--navy); }

/* Secciones */
.section { padding: clamp(3.5rem, 8vw, 6rem) 0; }
.section--light { background: var(--ice); color: var(--navy); }
.section__lead { color: var(--muted-light); font-size: 1.1rem; max-width: 40em; margin-bottom: 2rem; }

/* Filtros */
.filters { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 2rem; }
.filter {
  font: inherit; font-weight: 700; cursor: pointer;
  padding: .55em 1.1em; border-radius: 999px;
  border: 2px solid var(--navy); background: transparent; color: var(--navy);
}
.filter.is-active, .filter:hover { background: var(--navy); color: var(--white); }

/* Tarjetas de producto */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 1.4rem; }
.card { background: var(--white); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); display: flex; flex-direction: column; }
.card__media { position: relative; aspect-ratio: 4 / 3; background: linear-gradient(160deg, #e7ecf5, #d7dfee); display: grid; place-items: center; }
.card__media { overflow: hidden; }
.slides {
  position: absolute; inset: 0; display: flex;
  overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none;
}
.slides::-webkit-scrollbar { display: none; }
.slides img { flex: 0 0 100%; width: 100%; height: 100%; object-fit: cover; scroll-snap-align: start; cursor: zoom-in; }
.slide-btn {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 34px; height: 34px; border-radius: 50%; border: 0; cursor: pointer;
  background: rgba(255,255,255,.9); color: var(--navy); font-size: 1.4rem; line-height: 1;
  box-shadow: 0 2px 8px rgba(0,0,0,.2);
}
.slide-btn--prev { left: 10px; }
.slide-btn--next { right: 10px; }
.dots { position: absolute; bottom: 10px; left: 0; right: 0; display: flex; justify-content: center; gap: 6px; pointer-events: none; }
.dot { width: 7px; height: 7px; border-radius: 50%; background: rgba(255,255,255,.6); box-shadow: 0 0 3px rgba(0,0,0,.3); }
.dot.is-active { background: var(--white); width: 18px; border-radius: 4px; }
.pill--code { z-index: 2; }

/* Galería grande */
.lightbox {
  position: fixed; inset: 0; z-index: 100; background: rgba(6, 16, 38, .94);
  display: grid; place-items: center; padding: 56px 16px;
}
.lightbox[hidden] { display: none; }
.lightbox img { max-width: min(1000px, 100%); max-height: 82vh; object-fit: contain; border-radius: 12px; }
.lightbox button { position: absolute; border: 0; cursor: pointer; background: rgba(255,255,255,.12); color: var(--white); border-radius: 50%; }
.lightbox__close { top: 14px; right: 14px; width: 44px; height: 44px; font-size: 1.8rem; }
.lightbox__nav { top: 50%; transform: translateY(-50%); width: 48px; height: 48px; font-size: 2rem; }
.lightbox__nav[hidden] { display: none; }
.lightbox__nav--prev { left: 14px; }
.lightbox__nav--next { right: 14px; }
.lightbox__count { position: absolute; bottom: 14px; margin: 0; font-family: "Red Hat Mono", monospace; color: var(--muted-dark); }
.card__icon { width: 55%; fill: var(--navy); stroke: var(--navy); stroke-width: 0; }
.card__icon .d { fill: none; stroke: var(--accent); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.card__icon .f { fill: var(--accent); }
.pill--code { position: absolute; top: 14px; left: 14px; background: var(--navy); }
.card__body { padding: 1.3rem; display: flex; flex-direction: column; flex: 1; }
.card__body p { color: var(--muted-light); margin: 0 0 1.2rem; flex: 1; }
.card__cat { font-family: "Red Hat Mono", monospace; font-size: .7rem; letter-spacing: .16em; text-transform: uppercase; color: var(--muted-light); margin-bottom: .4rem; }

/* Quiénes somos */
.about { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: start; }
.about p { color: var(--muted-dark); font-size: 1.08rem; }
.about strong { color: var(--white); }
.about__quote { font-size: 1.5rem !important; font-weight: 900; letter-spacing: -.03em; color: var(--accent) !important; }
.values { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.value { background: var(--card); border-radius: var(--radius); padding: 1.4rem; }
.value h3 { color: var(--accent); }
.value p { margin: 0; font-size: .98rem; }

/* Pasos */
.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.4rem; }
.steps li { background: var(--white); border-radius: var(--radius); padding: 1.8rem; box-shadow: var(--shadow); }
.steps__n { font-family: "Red Hat Mono", monospace; font-size: 2rem; color: var(--accent); display: block; margin-bottom: .6rem; }
.steps p { color: var(--muted-light); margin: 0; }

/* Reseñas */
.reviews { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.4rem; }
.review { margin: 0; background: var(--card); border-radius: var(--radius); padding: 1.8rem; display: flex; flex-direction: column; }
.review__mark { font-size: 4rem; line-height: .8; font-weight: 900; color: var(--accent); height: 2.2rem; }
.review blockquote { margin: 0 0 1.4rem; font-size: 1.05rem; flex: 1; }
.review figcaption strong { display: block; }
.review figcaption span { font-family: "Red Hat Mono", monospace; font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted-dark); }

/* CTA */
.cta { background: var(--accent); color: var(--navy); padding: clamp(3.5rem, 8vw, 5rem) 0; text-align: center; }
.cta p { font-size: 1.2rem; font-weight: 600; margin: 0 0 1.8rem; }

/* Footer */
.footer { background: var(--navy-logo); padding: 3rem 0; }
.footer__inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 2rem; }
.footer__logo { width: 260px; }
.footer__info p { margin: .3rem 0; color: var(--muted-dark); }
.footer__info strong { color: var(--white); }
.footer__copy { font-size: .85rem; margin-top: 1rem !important; }

/* Botón flotante de WhatsApp */
.wa-float {
  position: fixed; right: 20px; bottom: 20px; z-index: 60;
  width: 60px; height: 60px; border-radius: 50%;
  background: var(--wa); color: var(--white);
  display: grid; place-items: center;
  box-shadow: 0 8px 24px rgba(0,0,0,.3);
  transition: transform .15s;
}
.wa-float:hover { transform: scale(1.08); }

/* Responsive */
@media (max-width: 900px) {
  .hero__grid, .about { grid-template-columns: 1fr; }
  .hero__logo { order: -1; }
  .hero__logo img { max-width: 320px; }
  .steps, .reviews { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .nav__toggle { display: block; }
  .nav__links {
    display: none; position: absolute; top: 68px; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--navy-logo); padding: .5rem 16px 1rem;
    border-bottom: 1px solid rgba(255,255,255,.08);
  }
  .nav__links.is-open { display: flex; }
  .nav__links a:not(.btn) { padding: .8rem 0; }
}
@media (max-width: 760px) {
  .values { grid-template-columns: 1fr; }
}
@media (max-width: 420px) {
  .nav__cart-label { display: none; }
  .nav__brand span { letter-spacing: .1em; }
}

/* Clientes */
.clients { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(160px, 100%), 1fr)); gap: 1rem; }
.client {
  margin: 0; background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow);
  aspect-ratio: 3 / 2; padding: 1rem; min-width: 0; overflow: hidden;
}
.client img { width: 100%; height: 100%; object-fit: contain; transition: transform .2s; }
.client:hover img { transform: scale(1.05); }
@media (min-width: 1000px) { .clients { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
@media (max-width: 480px) { .clients { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .7rem; } .client { padding: .7rem; } }

/* Detalles del catálogo */
.rubros__ship { margin-left: auto; font-family: "Red Hat Mono", monospace; font-size: .75rem; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); }
.card__media { cursor: pointer; }
.slides img { cursor: pointer; }
.card__title { text-decoration: none; }
.card__title:hover { color: #1d5fa8; }
.card__swatches { display: flex; align-items: center; gap: 5px; margin: -.4rem 0 1.1rem; }
.swatch-mini, .swatch {
  background: linear-gradient(135deg, var(--c1) 50%, var(--c2) 50%);
  border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(11,30,69,.22);
}
.swatch-mini { width: 16px; height: 16px; }
.swatch-more { font-size: .78rem; font-weight: 700; color: var(--muted-light); margin-left: 2px; }

/* Página de producto */
.product { background: var(--white); color: var(--navy); }
.product > .wrap { padding: 1.5rem 0 4rem; }
.crumbs { display: flex; flex-wrap: wrap; gap: .5rem; font-size: .9rem; color: var(--muted-light); margin-bottom: 1.5rem; }
.crumbs a { color: var(--muted-light); }
.crumbs a:hover { color: var(--navy); }
.product__grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 3rem; align-items: start; }
.gallery { position: sticky; top: 88px; min-width: 0; }
.gallery__main { position: relative; border-radius: var(--radius); overflow: hidden; aspect-ratio: 4 / 3; background: #e9ecf2; }
.gallery__main img { width: 100%; height: 100%; object-fit: cover; cursor: zoom-in; }
.gallery__main--icon { display: grid; place-items: center; }
.gallery__thumbs { display: flex; gap: .6rem; margin-top: .8rem; overflow-x: auto; padding-bottom: .3rem; scrollbar-width: thin; }
.thumb { flex: 0 0 84px; padding: 0; border: 2px solid transparent; border-radius: 12px; overflow: hidden; cursor: pointer; background: none; opacity: .7; }
.thumb img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.thumb.is-active, .thumb:hover { border-color: var(--navy); opacity: 1; }
.product__info { min-width: 0; }
.product__info h1 { font-size: clamp(2rem, 4vw, 3rem); margin-top: .4rem; }
.product__lead { color: var(--muted-light); font-size: 1.08rem; }
.opt { margin: 1.4rem 0; }
.opt__label { display: block; font-weight: 700; margin: 0 0 .6rem; }
.opt__hint { font-size: .85rem; color: var(--muted-light); margin: .5rem 0 0; }
.swatches { display: flex; flex-wrap: wrap; gap: .6rem; }
.swatch { width: 38px; height: 38px; border: 0; cursor: pointer; position: relative; }
.swatch::after { content: ""; position: absolute; inset: -5px; border-radius: 50%; border: 2px solid transparent; }
.swatch.is-active::after, .swatch:focus-visible::after { border-color: var(--navy); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.qty { display: inline-flex; align-items: center; border: 2px solid #d5dbe7; border-radius: 999px; overflow: hidden; background: var(--white); }
.qty input { width: 4.2rem; border: 0; text-align: center; font: inherit; font-weight: 800; font-size: 1.1rem; color: var(--navy); background: transparent; -moz-appearance: textfield; }
.qty input::-webkit-outer-spin-button, .qty input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.qty__btn { width: 44px; height: 44px; border: 0; background: none; font-size: 1.3rem; font-weight: 700; cursor: pointer; color: var(--navy); }
.qty__btn:hover { background: var(--ice); }
.qty--sm .qty__btn { width: 32px; height: 32px; font-size: 1.05rem; }
.qty--sm input { width: 3rem; font-size: .95rem; }
.field { display: block; margin: 1rem 0; }
.field span { display: block; font-weight: 700; font-size: .92rem; margin-bottom: .4rem; }
.field input, .field textarea {
  width: 100%; font: inherit; color: var(--navy); background: var(--white);
  border: 2px solid #d5dbe7; border-radius: 14px; padding: .7rem .9rem; resize: vertical;
}
.field input:focus, .field textarea:focus, .qty input:focus { outline: none; border-color: var(--accent); }
.product__actions { display: grid; gap: .7rem; margin-top: 1.2rem; }
.product__actions .btn { font-size: 1.05rem; padding: 1em 1.5em; cursor: pointer; }
button.btn { font: inherit; font-weight: 800; cursor: pointer; }
.product__facts { list-style: none; padding: 0; margin: 1.6rem 0 0; display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; }
.product__facts li { background: var(--ice); border-radius: 12px; padding: .7rem .9rem; font-weight: 700; font-size: .92rem; }
.product__facts li::before { content: "✓ "; color: #1d8a4a; }
.product__details { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; margin-top: 4rem; padding-top: 3rem; border-top: 1px solid #e3e7ef; }
.product__details h2 { font-size: 1.6rem; }
.checklist { list-style: none; padding: 0; margin: 0; display: grid; gap: .6rem; }
.checklist li { padding-left: 1.7rem; position: relative; color: var(--muted-light); }
.checklist li::before { content: ""; position: absolute; left: 0; top: .35em; width: 1rem; height: 1rem; border-radius: 50%; background: var(--accent); box-shadow: inset 0 0 0 4px #d9eefe; }
.specs { display: grid; grid-template-columns: auto 1fr; gap: .7rem 1.4rem; margin: 0; }
.specs dt { font-weight: 800; }
.specs dd { margin: 0; color: var(--muted-light); }
.related h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); margin-bottom: 1.5rem; }
.notfound { background: var(--navy); padding: 6rem 0; min-height: 50vh; }
.notfound p:not(.tag) { color: var(--muted-dark); font-size: 1.1rem; margin-bottom: 2rem; }

/* Panel "Mi cotización" */
.cart-backdrop { position: fixed; inset: 0; z-index: 80; background: rgba(6, 16, 38, .55); opacity: 0; transition: opacity .25s; }
.cart-backdrop.is-open { opacity: 1; }
.cart {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 90;
  width: min(420px, 100%); background: var(--white); color: var(--navy);
  display: flex; flex-direction: column; box-shadow: -10px 0 40px rgba(0,0,0,.25);
  transform: translateX(100%); transition: transform .25s ease;
}
.cart.is-open { transform: none; }
.cart__head { display: flex; align-items: center; justify-content: space-between; padding: 1.1rem 1.3rem; border-bottom: 1px solid #e3e7ef; }
.cart__head h2 { font-size: 1.5rem; margin: 0; }
.cart__close { width: 40px; height: 40px; border-radius: 50%; border: 0; background: var(--ice); font-size: 1.6rem; cursor: pointer; color: var(--navy); }
.cart__body { flex: 1; overflow-y: auto; padding: 1rem 1.3rem; }
.cart__empty { color: var(--muted-light); }
.cart__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 1rem; }
.cart-item { display: grid; grid-template-columns: 72px 1fr auto; gap: .8rem; align-items: start; padding-bottom: 1rem; border-bottom: 1px solid #eef1f6; }
.cart-item img, .cart-item__ph { width: 72px; height: 54px; object-fit: cover; border-radius: 10px; background: var(--ice); }
.cart-item__info { display: grid; gap: .25rem; min-width: 0; }
.cart-item__name { font-weight: 800; text-decoration: none; }
.cart-item__meta { font-size: .85rem; color: var(--muted-light); }
.cart-item__note { font-size: .82rem; color: var(--muted-light); font-style: italic; overflow-wrap: anywhere; }
.cart-item__warn { font-size: .78rem; color: #b45309; font-weight: 700; }
.cart-item .qty { justify-self: start; margin-top: .2rem; }
.cart-item__remove { width: 30px; height: 30px; border-radius: 50%; border: 0; background: none; color: var(--muted-light); font-size: 1.3rem; cursor: pointer; }
.cart-item__remove:hover { background: var(--ice); color: var(--navy); }
.cart__foot { padding: 1rem 1.3rem 1.3rem; border-top: 1px solid #e3e7ef; background: #fafbfd; }
.cart__foot .field { margin: .6rem 0; }
.cart__foot .field input { padding: .55rem .8rem; }
.cart__total { font-weight: 800; margin: 0 0 .4rem; }
.cart__foot .btn { margin-top: .5rem; padding: .95em 1.4em; }
.cart__hint { font-size: .8rem; color: var(--muted-light); margin: .6rem 0 0; }
.cart__clear { border: 0; background: none; color: var(--muted-light); text-decoration: underline; font: inherit; font-size: .85rem; cursor: pointer; padding: .4rem 0 0; }

/* Aviso al agregar */
.toast {
  position: fixed; left: 50%; bottom: 24px; z-index: 70; transform: translate(-50%, 20px);
  width: max-content; max-width: calc(100% - 32px);
  background: var(--navy); color: var(--white); border-radius: 16px; padding: .8rem 1rem;
  box-shadow: 0 10px 30px rgba(0,0,0,.3); opacity: 0; transition: opacity .25s, transform .25s;
  display: flex; flex-wrap: wrap; align-items: center; gap: .4rem .8rem;
}
.toast.is-open { opacity: 1; transform: translate(-50%, 0); }
.toast__btn { border: 0; border-radius: 999px; background: var(--accent); color: var(--navy); font: inherit; font-weight: 800; padding: .4rem .9rem; cursor: pointer; }

@media (max-width: 900px) {
  .product__grid, .product__details { grid-template-columns: 1fr; gap: 2rem; }
  .gallery { position: static; }
  .product__details { margin-top: 2.5rem; padding-top: 2rem; }
}
@media (max-width: 480px) {
  .product__facts { grid-template-columns: 1fr; }
  .thumb { flex-basis: 68px; }
  .rubros__ship { margin-left: 0; }
}
