:root {
  --blue: #1f4e9e;
  --blue-dark: #163a78;
  --navy: #102244;
  --cream: #f8eac8;
  --cream-soft: #fcf6e9;
  --paper: #fffdf8;
  --terra: #c14a33;
  --terra-dark: #a33c28;
  --ink: #1d1e20;
  --muted: #6b6458;
  --line: #e7dcc2;
  --ok: #2e7d4f;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(16, 34, 68, .10);
  --serif: "Bodoni Moda", Georgia, serif;
  --sans: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--cream-soft);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
main:focus { outline: none; }

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

h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.15; margin: 0 0 .5em; color: var(--navy); }
h1 { font-size: clamp(2rem, 5vw, 3.4rem); }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.4rem); }
h3 { font-size: 1.2rem; }
.eyebrow { font-size: .78rem; letter-spacing: .18em; text-transform: uppercase; color: var(--terra); font-weight: 700; margin: 0 0 .6em; }
.muted { color: var(--muted); }

/* ---------- Barra demo + header ---------- */
.demo-bar { background: var(--terra); color: #fff; text-align: center; font-size: .78rem; padding: 6px 12px; letter-spacing: .02em; }
.site-header { position: sticky; top: 0; z-index: 40; background: var(--blue); color: #fff; box-shadow: 0 2px 12px rgba(0,0,0,.12); }
.header-inner { display: flex; align-items: center; gap: 24px; height: 68px; }
.logo img { height: 38px; width: auto; }
.main-nav { display: flex; gap: 28px; margin-left: auto; }
.main-nav a { font-weight: 600; font-size: .95rem; opacity: .85; padding: 6px 0; border-bottom: 2px solid transparent; }
.main-nav a:hover, .main-nav a.active { opacity: 1; border-color: var(--cream); }
.header-actions { display: flex; align-items: center; gap: 8px; }
.cart-btn { position: relative; display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; }
.cart-btn:hover { background: rgba(255,255,255,.12); }
.cart-count { position: absolute; top: 2px; right: 0; min-width: 19px; height: 19px; padding: 0 5px; border-radius: 10px; background: var(--terra); color: #fff; font-size: .72rem; font-weight: 700; display: grid; place-items: center; }
.cart-count[hidden] { display: none; }
.menu-btn { display: none; background: none; border: 0; color: #fff; width: 42px; height: 42px; cursor: pointer; }

@media (max-width: 760px) {
  .menu-btn { display: grid; place-items: center; }
  .header-inner { gap: 8px; }
  .header-actions { margin-left: auto; }
  .main-nav { position: absolute; top: 68px; left: 0; right: 0; flex-direction: column; gap: 0; background: var(--blue-dark); padding: 8px 16px 16px; display: none; }
  .main-nav.open { display: flex; }
  .main-nav a { padding: 12px 0; border-bottom: 1px solid rgba(255,255,255,.1); }
}

/* ---------- Botones ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; cursor: pointer; border-radius: 999px; padding: 14px 26px; font-weight: 700; font-size: .95rem; transition: transform .15s, background .15s, box-shadow .15s; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--terra); color: #fff; }
.btn-primary:hover { background: var(--terra-dark); }
.btn-blue { background: var(--blue); color: #fff; }
.btn-blue:hover { background: var(--blue-dark); }
.btn-ghost { background: transparent; border: 1.5px solid currentColor; }
.btn-light { background: var(--cream); color: var(--navy); }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }

/* ---------- Hero ---------- */
.hero { background: var(--blue); color: #fff; overflow: hidden; }
.hero-inner { display: grid; grid-template-columns: 1.1fr 1fr; align-items: center; gap: 48px; min-height: min(78vh, 620px); }
.hero-content { padding: 56px 0; }
.hero h1 { color: #fff; }
.hero p { font-size: 1.1rem; opacity: .92; margin: 0 0 28px; max-width: 520px; }
.hero .eyebrow { color: var(--cream); }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-art { align-self: stretch; position: relative; display: grid; grid-template-columns: 1fr 1fr; gap: 14px; padding: 36px 0; }
.hero-art img { width: 100%; height: 100%; object-fit: cover; border-radius: 16px; box-shadow: 0 18px 40px rgba(0,0,0,.25); }
.hero-art img:nth-child(2) { margin-top: 48px; height: calc(100% - 48px); }
@media (max-width: 860px) {
  .hero-inner { grid-template-columns: 1fr; gap: 0; min-height: 0; }
  .hero-content { padding: 44px 0 8px; }
  .hero-art { height: 340px; padding: 24px 0 32px; }
}

/* ---------- Barra de confianza ---------- */
.trust { background: var(--navy); color: var(--cream); }
.trust-inner { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; padding: 18px 0; }
.trust-item { display: flex; align-items: center; gap: 10px; font-size: .9rem; font-weight: 600; }
.trust-item svg { flex: none; }
@media (max-width: 860px) { .trust-inner { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 420px) { .trust-item { font-size: .8rem; } }

/* ---------- Secciones ---------- */
.section { padding: 72px 0; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 32px; flex-wrap: wrap; }
.section-head h2 { margin: 0; }
.link-arrow { font-weight: 700; color: var(--blue); }
.link-arrow:hover { text-decoration: underline; }

/* Categorías */
.cat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.cat-card { position: relative; border-radius: var(--radius); overflow: hidden; aspect-ratio: 4/3; background: var(--navy); }
.cat-card img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.cat-card:hover img { transform: scale(1.05); }
.cat-card::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 40%, rgba(16,34,68,.8)); }
.cat-card .cat-label { position: absolute; left: 20px; bottom: 18px; z-index: 1; color: #fff; }
.cat-label strong { display: block; font-family: var(--serif); font-size: 1.5rem; font-weight: 600; }
.cat-label span { font-size: .85rem; opacity: .85; }
@media (max-width: 860px) { .cat-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .cat-grid { grid-template-columns: 1fr; } }

/* Productos */
.grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
@media (max-width: 1000px) { .grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 720px) { .grid { grid-template-columns: repeat(2, 1fr); gap: 14px; } }
.card { background: var(--paper); border-radius: var(--radius); overflow: hidden; box-shadow: 0 1px 0 var(--line); transition: box-shadow .2s, transform .2s; display: flex; flex-direction: column; }
.card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.card-img { aspect-ratio: 4/5; overflow: hidden; background: var(--cream); }
.card-img img { width: 100%; height: 100%; object-fit: cover; }
.card-body { padding: 14px 16px 18px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.card-code { font-size: .72rem; font-weight: 700; letter-spacing: .1em; color: var(--terra); }
.card-title { font-weight: 600; font-size: .95rem; line-height: 1.3; }
.card-price { margin-top: auto; padding-top: 8px; font-weight: 700; color: var(--navy); }
.card-price small { font-weight: 500; color: var(--muted); }

/* Banner personalizados */
.custom-banner { background: var(--blue); color: #fff; border-radius: 22px; overflow: hidden; display: grid; grid-template-columns: 1.1fr 1fr; }
.custom-banner .cb-text { padding: 48px; }
.custom-banner h2 { color: #fff; }
.custom-banner p { opacity: .9; margin: 0 0 24px; }
.custom-banner .cb-img { min-height: 280px; }
.custom-banner .cb-img img { width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 760px) { .custom-banner { grid-template-columns: 1fr; } .custom-banner .cb-text { padding: 32px 24px; } }

/* Pasos */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; counter-reset: step; }
.step { background: var(--paper); border-radius: var(--radius); padding: 24px; border: 1px solid var(--line); }
.step::before { counter-increment: step; content: counter(step); display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--cream); color: var(--terra); font-weight: 800; margin-bottom: 12px; }
.step h3 { font-size: 1.05rem; }
.step p { margin: 0; color: var(--muted); font-size: .92rem; }
@media (max-width: 860px) { .steps { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .steps { grid-template-columns: 1fr; } }

/* ---------- Galería ---------- */
.page-head { background: var(--cream); padding: 48px 0 36px; }
.page-head p { margin: 0; color: var(--muted); max-width: 620px; }
.toolbar { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; margin: 28px 0; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { border: 1.5px solid var(--line); background: var(--paper); border-radius: 999px; padding: 8px 16px; font-size: .88rem; font-weight: 600; cursor: pointer; }
.chip:hover { border-color: var(--blue); }
.chip.active { background: var(--blue); border-color: var(--blue); color: #fff; }
.select { border: 1.5px solid var(--line); background: var(--paper); border-radius: 10px; padding: 9px 12px; font-size: .9rem; }
.search { border: 1.5px solid var(--line); background: var(--paper); border-radius: 999px; padding: 9px 16px; font-size: .9rem; min-width: 220px; }
.toolbar-right { display: flex; gap: 10px; flex-wrap: wrap; }
@media (max-width: 520px) { .search { min-width: 0; flex: 1; } .toolbar-right { width: 100%; } }

/* ---------- Producto ---------- */
.crumbs { font-size: .85rem; color: var(--muted); padding: 22px 0 8px; }
.crumbs a:hover { color: var(--blue); }
.product { display: grid; grid-template-columns: 1.15fr 1fr; gap: 48px; padding-bottom: 64px; }
@media (max-width: 860px) { .product { grid-template-columns: 1fr; gap: 24px; } }
.gallery-main { border-radius: var(--radius); overflow: hidden; background: var(--cream); height: min(72vh, 640px); }
@media (max-width: 860px) { .gallery-main { height: auto; aspect-ratio: 4/5; } }
.gallery-main img { width: 100%; height: 100%; object-fit: cover; }
.thumbs { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; margin-top: 10px; }
.thumbs button { padding: 0; border: 2px solid transparent; border-radius: 8px; overflow: hidden; cursor: pointer; aspect-ratio: 1; background: var(--cream); }
.thumbs button.active { border-color: var(--blue); }
.thumbs img { width: 100%; height: 100%; object-fit: cover; }
.p-info h1 { font-size: clamp(1.7rem, 3.6vw, 2.5rem); }
.p-sub { color: var(--muted); margin: -4px 0 18px; }
.p-price { font-size: 1.9rem; font-weight: 800; color: var(--navy); margin-bottom: 4px; }
.p-msi { font-size: .9rem; color: var(--ok); font-weight: 600; margin-bottom: 22px; }
.label { font-size: .82rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-bottom: 8px; display: block; }
.sizes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 20px; }
.size { border: 1.5px solid var(--line); background: var(--paper); border-radius: 12px; padding: 12px 8px; cursor: pointer; text-align: center; }
.size strong { display: block; font-size: 1rem; }
.size span { font-size: .82rem; color: var(--muted); }
.size.active { border-color: var(--blue); background: #eef3fc; box-shadow: inset 0 0 0 1px var(--blue); }
.buy-row { display: flex; gap: 12px; margin-bottom: 18px; }
.qty { display: flex; align-items: center; border: 1.5px solid var(--line); border-radius: 999px; background: var(--paper); }
.qty button { width: 42px; height: 48px; border: 0; background: none; font-size: 1.2rem; cursor: pointer; }
.qty span { min-width: 24px; text-align: center; font-weight: 700; }
.buy-row .btn { flex: 1; }
.ship-note { background: var(--cream); border-radius: 12px; padding: 14px 16px; font-size: .9rem; display: grid; gap: 6px; margin-bottom: 22px; }
.ship-note div { display: flex; gap: 8px; align-items: center; }
.p-desc { color: #3c3a36; }
.specs { list-style: none; padding: 0; margin: 18px 0 0; display: grid; gap: 8px; font-size: .92rem; }
.specs li { display: flex; gap: 10px; }
.specs li::before { content: "✓"; color: var(--terra); font-weight: 800; }

/* ---------- Personalizados ---------- */
.custom { display: grid; grid-template-columns: 1.2fr 1fr; gap: 40px; padding: 40px 0 72px; }
@media (max-width: 860px) { .custom { grid-template-columns: 1fr; } }
.wall { position: relative; border-radius: var(--radius); overflow: hidden; aspect-ratio: 4/3; background: linear-gradient(180deg, #e9e2d3 0%, #ddd3bf 78%, #b89a76 78%, #a8896a 100%); display: grid; place-items: center; }
.wall .sofa { position: absolute; bottom: 14%; left: 50%; transform: translateX(-50%); width: 62%; height: 18%; background: #5c6f86; border-radius: 18px 18px 6px 6px; box-shadow: 0 8px 0 #4a5b70; }
.frame { position: relative; z-index: 1; margin-bottom: 18%; background: #f3efe6; box-shadow: 0 12px 24px rgba(0,0,0,.28), 4px 4px 0 rgba(0,0,0,.08); transition: width .3s, aspect-ratio .3s; display: grid; place-items: center; overflow: hidden; }
.frame img { width: 100%; height: 100%; object-fit: cover; }
.frame .ph { color: var(--muted); font-size: .85rem; text-align: center; padding: 12px; }
.wall-caption { position: absolute; top: 12px; left: 12px; background: rgba(255,255,255,.85); border-radius: 999px; padding: 4px 12px; font-size: .78rem; font-weight: 700; color: var(--navy); }
.drop { display: block; border: 2px dashed var(--line); border-radius: var(--radius); padding: 28px; text-align: center; background: var(--paper); cursor: pointer; margin-bottom: 20px; transition: border-color .2s, background .2s; }
.drop:hover, .drop.drag { border-color: var(--blue); background: #f2f6fd; }
.drop input { display: none; }
.seg { display: inline-flex; border: 1.5px solid var(--line); border-radius: 999px; overflow: hidden; margin-bottom: 20px; background: var(--paper); }
.seg button { border: 0; background: none; padding: 9px 18px; cursor: pointer; font-weight: 600; font-size: .9rem; }
.seg button.active { background: var(--blue); color: #fff; }
.textarea { width: 100%; border: 1.5px solid var(--line); border-radius: 12px; padding: 12px; min-height: 80px; resize: vertical; background: var(--paper); margin-bottom: 18px; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: .92rem; margin-bottom: 18px; cursor: pointer; }
.check input { margin-top: 4px; accent-color: var(--blue); }

/* ---------- Carrito ---------- */
.cart { display: grid; grid-template-columns: 1.5fr 1fr; gap: 36px; padding: 32px 0 72px; align-items: start; }
@media (max-width: 860px) { .cart { grid-template-columns: 1fr; } }
.cart-line { display: grid; grid-template-columns: 96px 1fr auto; gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--line); align-items: center; }
.cart-line img { width: 96px; height: 72px; object-fit: cover; border-radius: 8px; background: var(--cream); }
.cart-line .cl-title { font-weight: 600; }
.cart-line .cl-meta { font-size: .85rem; color: var(--muted); }
.cart-line .cl-right { text-align: right; display: grid; gap: 6px; justify-items: end; }
.cart-line .qty button { width: 32px; height: 34px; font-size: 1rem; }
.link-remove { background: none; border: 0; color: var(--muted); font-size: .8rem; cursor: pointer; text-decoration: underline; padding: 0; }
@media (max-width: 520px) {
  .cart-line { grid-template-columns: 72px 1fr; }
  .cart-line img { width: 72px; height: 56px; }
  .cart-line .cl-right { grid-column: 1 / -1; grid-template-columns: auto auto auto; align-items: center; justify-content: space-between; text-align: left; }
}
.summary { background: var(--paper); border-radius: 18px; padding: 24px; box-shadow: var(--shadow); position: sticky; top: 90px; }
.summary h3 { margin-bottom: 16px; }
.sum-row { display: flex; justify-content: space-between; padding: 6px 0; font-size: .95rem; }
.sum-row.total { border-top: 1px solid var(--line); margin-top: 8px; padding-top: 14px; font-size: 1.2rem; font-weight: 800; color: var(--navy); }
.free-ship { background: var(--cream); border-radius: 10px; padding: 10px 12px; font-size: .85rem; margin: 12px 0; }
.bar { height: 6px; background: #fff; border-radius: 6px; margin-top: 8px; overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--ok); border-radius: 6px; transition: width .3s; }
.field { display: grid; gap: 6px; margin: 14px 0; }
.input { border: 1.5px solid var(--line); border-radius: 10px; padding: 11px 12px; background: #fff; width: 100%; }
.mp-btn { background: #009ee3; color: #fff; margin-top: 8px; }
.mp-btn:hover { background: #0087c2; }
.pay-methods { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; margin-top: 12px; }
.pay-methods span, .pay-icons span { font-size: .72rem; font-weight: 700; border: 1px solid var(--line); border-radius: 6px; padding: 3px 8px; color: var(--muted); background: #fff; }
.empty { text-align: center; padding: 80px 0; }
.empty p { color: var(--muted); }

/* ---------- Texto largo ---------- */
.prose { max-width: 760px; padding: 48px 0 80px; }
.prose h2 { margin-top: 1.4em; }
.prose p, .prose li { color: #3c3a36; }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy); color: rgba(255,255,255,.8); padding: 56px 0 24px; margin-top: 0; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 32px; }
.footer-grid h4 { color: #fff; font-size: .85rem; letter-spacing: .12em; text-transform: uppercase; margin: 0 0 12px; }
.footer-grid a { display: block; padding: 3px 0; font-size: .92rem; }
.footer-grid a:hover { color: #fff; }
.footer-grid p { font-size: .92rem; max-width: 280px; }
.footer-logo { height: 36px; width: auto; margin-bottom: 12px; }
.pay-icons { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 12px; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.12); margin-top: 36px; padding-top: 18px; font-size: .82rem; color: rgba(255,255,255,.55); }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 420px) { .footer-grid { grid-template-columns: 1fr; } }

/* ---------- WhatsApp, modal, toast ---------- */
.wa-float { position: fixed; right: 18px; bottom: 18px; z-index: 50; width: 56px; height: 56px; border-radius: 50%; background: #25d366; color: #fff; display: grid; place-items: center; box-shadow: 0 6px 18px rgba(0,0,0,.25); }
.modal { position: fixed; inset: 0; z-index: 60; background: rgba(16,34,68,.55); display: grid; place-items: center; padding: 16px; }
.modal[hidden] { display: none; }
.modal-card { position: relative; background: var(--paper); border-radius: 20px; padding: 32px; width: min(480px, 100%); max-height: 90vh; overflow: auto; box-shadow: 0 24px 60px rgba(0,0,0,.3); }
.modal-close { position: absolute; top: 10px; right: 14px; border: 0; background: none; font-size: 1.8rem; cursor: pointer; color: var(--muted); }
.modal-card ul { padding-left: 20px; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 120px); background: var(--navy); color: #fff; padding: 12px 20px; border-radius: 999px; font-weight: 600; font-size: .92rem; z-index: 70; transition: transform .3s; box-shadow: var(--shadow); max-width: calc(100% - 32px); }
.toast.show { transform: translate(-50%, 0); }
