@font-face {
  font-family: "Pacifico";
  src: url("../fonts/pacifico.woff2") format("woff2");
  font-display: swap;
}
:root {
  --bg: #fbf7ef;       /* crema */
  --ink: #3a1428;      /* granate oscuro */
  --muted: #7a6470;
  --line: #eadfd2;
  --card: #ffffff;
  --brand: #6a1543;    /* granate del logo */
  --sage: #d7d699;     /* verde salvia del logo */
  --pink: #f6d9dc;
  --radius: 18px;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--ink);
  background: var(--bg);
}
* { box-sizing: border-box; }
body { margin: 0; line-height: 1.55; }
a { color: var(--brand); }
h1, h2, h3 { line-height: 1.15; margin: 0 0 .6em; color: var(--brand); }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.2rem); }
.script, .brand { font-family: "Pacifico", cursive; font-weight: 400; }
.muted { color: var(--muted); }
.small { font-size: .8rem; }
.center { text-align: center; margin-top: 2rem; }
.fine { font-size: .8rem; color: var(--muted); margin: .4rem 0 1.2rem; }
.note { background: var(--pink); padding: .6rem .9rem; border-radius: 10px; }

.site-header {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: .7rem clamp(1rem, 4vw, 3rem); background: rgba(251, 247, 239, .92); backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 5;
}
.brand { font-size: 1.9rem; text-decoration: none; color: var(--brand); line-height: 1.2; }
.site-header nav { display: flex; gap: 1.3rem; align-items: center; flex-wrap: wrap; }
.site-header nav a:not(.btn) { text-decoration: none; color: var(--muted); }
.site-header nav a:not(.btn):hover { color: var(--brand); }
.site-footer {
  display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; padding: 2rem clamp(1rem, 4vw, 3rem);
  background: var(--sage); color: var(--brand); font-size: .9rem;
}

.btn {
  display: inline-block; border: 0; cursor: pointer; text-decoration: none; font: inherit; font-weight: 600;
  background: var(--brand); color: #fff !important; padding: .8rem 1.5rem; border-radius: 999px;
  transition: transform .1s ease, filter .15s ease;
}
.btn:hover { filter: brightness(1.12); }
.btn:active { transform: translateY(1px); }
.btn.small { padding: .45rem 1.1rem; }
.btn.ghost { background: transparent; color: var(--brand) !important; border: 1.5px solid var(--brand); }

main > section { padding: 4rem clamp(1rem, 4vw, 3rem); max-width: 1200px; margin: 0 auto; }

.hero { display: grid; grid-template-columns: 1.1fr 1fr; gap: 3rem; align-items: center; min-height: 70vh; }
.eyebrow { text-transform: uppercase; letter-spacing: .12em; font-size: .8rem; color: var(--muted); margin: 0 0 .8rem; }
.hero h1 { font-size: clamp(2.3rem, 5.5vw, 4rem); }
.hero h1 .script { display: block; color: #c2456f; font-size: 1.05em; margin-top: .1em; }
.lead { font-size: 1.15rem; color: var(--muted); max-width: 46ch; margin-bottom: 1.8rem; }
.hero-cta { display: flex; gap: .8rem; flex-wrap: wrap; }
.hero-art { position: relative; aspect-ratio: 1; }
.hero-art img { position: absolute; width: 58%; border-radius: var(--radius); box-shadow: 0 18px 40px rgba(58, 20, 40, .18); object-fit: cover; aspect-ratio: 1; }
.hero-art img:nth-child(1) { top: 0; left: 0; transform: rotate(-4deg); }
.hero-art img:nth-child(2) { top: 12%; right: 0; transform: rotate(5deg); }
.hero-art img:nth-child(3) { bottom: 0; left: 22%; transform: rotate(-1deg); }

.steps ol { list-style: none; padding: 0; display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); counter-reset: s; }
.steps li { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.3rem; counter-increment: s; display: grid; gap: .35rem; align-content: start; }
.steps li::before { content: "0" counter(s); font-weight: 800; color: #c2456f; background: var(--pink); width: 2.4rem; height: 2.4rem; display: grid; place-items: center; border-radius: 10px; }
.steps strong { color: var(--brand); }
.steps span { color: var(--muted); font-size: .95rem; }

.gallery { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.gallery figure { margin: 0; background: var(--card); border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); }
.gallery img { width: 100%; aspect-ratio: 1; object-fit: cover; display: block; transition: transform .3s ease; }
.gallery figure:hover img { transform: scale(1.04); }
.gallery figcaption { padding: .6rem .9rem; font-size: .92rem; color: var(--brand); }

.story { background: var(--sage); border-radius: var(--radius); max-width: 1100px !important; }
.story > div { max-width: 62ch; }
.story p { color: var(--ink); }
.contact { text-align: center; }

.prose { max-width: 70ch; margin: 0 auto; padding: 3rem 1.2rem; }

/* configurador */
.configurator { display: grid; grid-template-columns: minmax(0, 1fr) 420px; min-height: calc(100vh - 106px); }
.configurator[hidden], .picker[hidden], .crumbs[hidden] { display: none; }
.viewer-wrap { padding: 0 !important; max-width: none !important; margin: 0 !important; min-width: 0; display: flex; flex-direction: column; }
.viewer { flex: 1; min-height: 380px; cursor: grab; }
.viewer:active { cursor: grabbing; }
.viewer canvas { width: 100% !important; height: 100% !important; display: block; touch-action: none; }
.viewer-meta { display: flex; justify-content: space-between; gap: 1rem; padding: .6rem 1rem; font-size: .88rem; border-top: 1px solid var(--line); }
.panel { border-left: 1px solid var(--line); padding: 1.4rem; overflow-y: auto; background: var(--card); max-height: calc(100vh - 106px); position: sticky; top: 66px; }
.tabs { display: flex; gap: .4rem; flex-wrap: wrap; margin-bottom: .7rem; }
.tab { font: inherit; font-size: .92rem; border: 1px solid var(--line); background: var(--bg); color: var(--ink); padding: .45rem .9rem; border-radius: 999px; cursor: pointer; }
.tab.active { background: var(--brand); color: #fff; border-color: var(--brand); }
.param { display: grid; grid-template-columns: 1fr auto; gap: .35rem .5rem; margin: 1.1rem 0; }
.param-name { font-weight: 600; font-size: .95rem; }
.param output { color: var(--muted); font-size: .88rem; font-variant-numeric: tabular-nums; }
.param input, .param select, .param .swatches { grid-column: 1 / -1; }
.param input[type=range] { width: 100%; accent-color: var(--brand); }
.param input[type=file] { font-size: .85rem; }
input[type=text], input[type=email], input[type=number], select, textarea {
  font: inherit; width: 100%; padding: .6rem .75rem; border: 1px solid var(--line); border-radius: 10px; background: #fff; color: var(--ink);
}
input:focus-visible, select:focus-visible, textarea:focus-visible, button:focus-visible { outline: 2px solid #c2456f; outline-offset: 2px; }
.swatches { display: flex; gap: .4rem; flex-wrap: wrap; }
.swatch { width: 28px; height: 28px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 0 1px var(--line); cursor: pointer; padding: 0; }
.swatch.metal { background-image: linear-gradient(135deg, rgba(255,255,255,.6), transparent 55%) !important; background-blend-mode: screen; }
.swatch.active { box-shadow: 0 0 0 2px var(--brand); }
.estimate { display: flex; justify-content: space-between; align-items: end; background: var(--pink); border-radius: var(--radius); padding: 1rem 1.1rem; margin-top: 1.2rem; }
.estimate div { display: grid; }
.estimate .right { text-align: right; }
.estimate strong { font-size: 1.7rem; color: var(--brand); }
.request { display: grid; gap: .6rem; border-top: 1px solid var(--line); padding-top: 1.2rem; }
.request h3 { margin: 0; }
.consent { font-size: .85rem; color: var(--muted); display: flex; gap: .5rem; align-items: flex-start; }

/* pasos: categoría -> producto */
.crumbs { padding: .7rem clamp(1rem, 4vw, 3rem); font-size: .9rem; color: var(--muted); border-bottom: 1px solid var(--line); }
.crumbs a { text-decoration: none; }
.picker { padding: 3rem clamp(1rem, 4vw, 3rem); max-width: 1200px; margin: 0 auto; }
.picker h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); }
.pick-grid { display: grid; gap: 1.1rem; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); margin-top: 1.6rem; }
.pick-card { display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; text-decoration: none; color: var(--ink); transition: transform .15s ease, box-shadow .15s ease; }
.pick-card:hover { transform: translateY(-3px); box-shadow: 0 12px 28px rgba(58, 20, 40, .12); }
.pick-card img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; display: block; }
.pick-body { padding: .9rem 1rem 1.1rem; display: grid; gap: .25rem; }
.pick-body strong { color: var(--brand); font-size: 1.08rem; }
.pick-body span { color: var(--muted); font-size: .92rem; }
.pick-body em { font-style: normal; font-size: .85rem; color: #c2456f; font-weight: 600; margin-top: .2rem; }
.panel h2 { margin-bottom: .3rem; font-size: 1.5rem; }
.size { font-size: .85rem; background: var(--bg); border-radius: 8px; padding: .4rem .6rem; display: inline-block; }
.static-view { flex: 1; margin: 0; display: grid; place-items: center; align-content: center; gap: .8rem; padding: 2rem; min-height: 380px; }
.static-view[hidden] { display: none; }
.static-view img { max-width: min(100%, 720px); max-height: 60vh; border-radius: var(--radius); box-shadow: 0 14px 36px rgba(58, 20, 40, .14); object-fit: contain; }
.viewer[hidden] { display: none; }
.shape-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: .4rem; }
.shape-btn { font: inherit; font-size: .88rem; padding: .5rem .4rem; border: 1px solid var(--line); background: var(--bg); color: var(--ink); border-radius: 10px; cursor: pointer; }
.shape-btn.active { background: var(--brand); color: #fff; border-color: var(--brand); }
.extras { grid-column: 1 / -1; display: grid; gap: .3rem; font-size: .92rem; }
.photo-box input[type=file] { font-size: .85rem; }
.photo-editor { grid-column: 1 / -1; display: grid; gap: .4rem; }
.photo-editor[hidden] { display: none; }
.photo-editor canvas { width: 100%; border-radius: 10px; background: #eee; cursor: move; touch-action: none; border: 1px solid var(--line); }
.photo-tools { display: grid; grid-template-columns: auto 1fr auto; gap: .6rem; align-items: center; font-size: .88rem; }
.photo-tools input { accent-color: var(--brand); }
.link { background: none; border: 0; color: var(--brand); text-decoration: underline; cursor: pointer; font: inherit; }
.btn.whatsapp { background: #25d366; color: #0b3d1e !important; display: inline-flex; gap: .5rem; align-items: center; justify-content: center; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; min-height: 0; }
  .hero-art { max-width: 460px; width: 100%; margin: 0 auto; }
  .configurator { grid-template-columns: 1fr; }
  .viewer { min-height: 50vh; }
  .panel { border-left: 0; border-top: 1px solid var(--line); max-height: none; position: static; }
  .site-header nav a:not(.btn) { display: none; }
}

.care { background: #dbe9f4; border-radius: var(--radius); max-width: 1100px !important; margin-bottom: 3rem !important; }
.care p { max-width: 70ch; }

.brand { display: flex; align-items: center; }
.brand-logo { height: 44px; width: auto; display: block; }
.faq { max-width: 820px; margin: 0 auto; padding: 3rem 1.2rem 4rem; }
.faq h1 { font-size: clamp(1.9rem, 4vw, 2.6rem); }
.faq h2 { font-size: 1.35rem; margin-top: 2.2rem; }
.faq details { background: var(--card); border: 1px solid var(--line); border-radius: 14px; margin: .6rem 0; padding: 0 1.1rem; }
.faq summary { cursor: pointer; padding: .95rem 0; font-weight: 600; color: var(--brand); list-style: none; display: flex; justify-content: space-between; gap: 1rem; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 1.3rem; line-height: 1; color: #c2456f; }
.faq details[open] summary::after { content: "–"; }
.faq details p { margin: 0 0 1rem; color: var(--ink); }
#cuidados ~ details { background: #eef5fb; border-color: #d3e4f1; }
.site-header nav a[aria-current="page"] { color: var(--brand); font-weight: 600; }

/* ---------- móvil ---------- */
.menu-btn { display: none; }
.order-bar { display: none; }
.order-bar[hidden] { display: none !important; }

@media (max-width: 900px) {
  :root { --header-h: 58px; }
  .site-header { padding: .5rem 1rem; height: var(--header-h); }
  .brand { font-size: 1.7rem; }
  .brand-logo { height: 34px; }
  .menu-btn { display: grid; gap: 5px; align-content: center; width: 44px; height: 44px; margin-left: auto; padding: 0 10px; background: none; border: 0; cursor: pointer; }
  .menu-btn span { display: block; height: 2px; background: var(--brand); border-radius: 2px; transition: transform .2s ease, opacity .2s ease; }
  .menu-open .menu-btn span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .menu-open .menu-btn span:nth-child(2) { opacity: 0; }
  .menu-open .menu-btn span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
  .site-header nav {
    display: none; position: absolute; top: var(--header-h); left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 0;
    background: var(--bg); border-bottom: 1px solid var(--line); box-shadow: 0 12px 24px rgba(58, 20, 40, .12); padding: .4rem 1rem 1rem;
  }
  .menu-open nav { display: flex; }
  .site-header nav a:not(.btn) { display: block; padding: .85rem .2rem; border-bottom: 1px solid var(--line); font-size: 1.05rem; color: var(--ink); }
  .site-header nav .btn { margin-top: .8rem; text-align: center; }

  /* inputs at 16px so iOS doesn't zoom in when typing */
  input[type=text], input[type=email], input[type=number], select, textarea { font-size: 16px; padding: .7rem .8rem; }

  main > section { padding: 2.4rem 1rem; }
  .hero { gap: 2rem; }
  .hero-art { max-width: 340px; }

  /* category + product pickers: two columns of compact cards */
  .picker { padding: 1.6rem 1rem 2.4rem; }
  .pick-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .7rem; margin-top: 1rem; }
  .pick-card img { aspect-ratio: 1; }
  .pick-body { padding: .6rem .7rem .8rem; gap: .15rem; }
  .pick-body strong { font-size: .98rem; line-height: 1.2; }
  .pick-body span { font-size: .8rem; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
  .pick-body em { font-size: .76rem; }
  .crumbs { padding: .55rem 1rem; font-size: .85rem; white-space: nowrap; overflow-x: auto; }

  /* configurator: the 3D view stays on screen while you edit below it */
  .configurator { display: block; min-height: 0; }
  .viewer-wrap { position: sticky; top: var(--header-h); z-index: 3; height: 40vh; min-height: 250px; background: #f7f2e8; border-bottom: 1px solid var(--line); box-shadow: 0 6px 14px rgba(58, 20, 40, .06); }
  .viewer { min-height: 0; flex: 1; }
  .viewer-meta { padding: .35rem .8rem; font-size: .78rem; }
  #viewer-hint { display: none; }
  .static-view { min-height: 0; padding: .8rem; flex: 1; overflow: hidden; }
  .static-view img { max-height: calc(40vh - 4.5rem); }
  .static-view figcaption { font-size: .78rem; text-align: center; }
  .panel { border: 0; padding: 1.1rem 1rem 6.5rem; max-height: none; position: static; overflow: visible; }
  .panel h2 { font-size: 1.35rem; }
  .param { margin: 1rem 0; }
  .swatches { gap: .55rem; }
  .swatch { width: 36px; height: 36px; }
  .shape-grid { grid-template-columns: repeat(3, 1fr); }
  .shape-btn { padding: .65rem .3rem; }
  .estimate { display: none; }
  .request h3 { font-size: 1.1rem; }
  #req-whatsapp { display: none; }

  /* price + WhatsApp always at hand */
  .order-bar {
    display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 10; align-items: center; justify-content: space-between; gap: .8rem;
    padding: .7rem 1rem calc(.7rem + env(safe-area-inset-bottom)); background: rgba(255, 255, 255, .96); backdrop-filter: blur(8px);
    border-top: 1px solid var(--line); box-shadow: 0 -8px 20px rgba(58, 20, 40, .08);
  }
  .order-bar div { display: grid; line-height: 1.15; }
  .order-bar .muted { font-size: .75rem; }
  .order-bar strong { font-size: 1.3rem; color: var(--brand); }
  .order-bar .btn { padding: .8rem 1.1rem; font-size: .98rem; }
  body.configuring .site-footer { display: none; }

  .faq { padding: 2rem 1rem 3rem; }
  .site-footer { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 360px) {
  .pick-grid { grid-template-columns: 1fr; }
  .order-bar .btn { padding: .75rem .8rem; font-size: .9rem; }
}
