:root {
  --bg: #fff; --ink: #14181f; --muted: #5d6673; --line: #e3e6ea; --soft: #f5f6f8;
  --brand: #1f6f5c; --brand-dark: #165346; --radius: 12px;
}
* { box-sizing: border-box; }
body { margin: 0; font-family: Inter, system-ui, -apple-system, "Segoe UI", sans-serif; color: var(--ink); background: var(--bg); line-height: 1.5; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
svg.i { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; vertical-align: middle; }

/* header */
.site-header { position: sticky; top: 0; z-index: 20; background: #fff; border-bottom: 1px solid var(--line); }
.site-header .container { display: flex; align-items: center; gap: 28px; height: 68px; }
.logo { font-weight: 800; font-size: 20px; letter-spacing: -.02em; display: flex; align-items: center; gap: 8px; }
.logo span { width: 26px; height: 26px; border-radius: 7px; background: var(--brand); display: inline-block; }
.nav { display: flex; gap: 22px; font-size: 15px; color: var(--muted); }
.nav a:hover, .nav a.on { color: var(--ink); }
.header-actions { margin-left: auto; display: flex; gap: 10px; align-items: center; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 11px 20px; border-radius: 999px; border: 1px solid var(--ink); background: #fff; color: var(--ink); font-weight: 600; font-size: 15px; }
.btn.primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn.primary:hover { background: var(--brand-dark); }
.btn.ghost { border-color: var(--line); }
.btn.ghost:hover { border-color: var(--ink); }
.btn.sm { padding: 8px 14px; font-size: 14px; }

/* hero */
.hero { background: var(--soft); padding: 64px 0 48px; }
.hero h1 { font-size: clamp(32px, 5vw, 52px); line-height: 1.1; letter-spacing: -.03em; margin: 0 0 14px; max-width: 700px; }
.hero p { font-size: 18px; color: var(--muted); max-width: 600px; margin: 0 0 26px; }
.search { display: flex; align-items: center; gap: 10px; background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 4px 6px 4px 18px; max-width: 480px; }
.search input { flex: 1; border: 0; outline: 0; font: inherit; padding: 10px 0; background: transparent; }

/* catalog */
.toolbar { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; justify-content: space-between; padding: 28px 0 18px; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 8px 16px; font-size: 14px; font-weight: 500; }
.chip:hover { border-color: var(--ink); }
.chip.on { background: var(--ink); color: #fff; border-color: var(--ink); }
select { font: inherit; padding: 9px 12px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.count { color: var(--muted); font-size: 14px; margin: 0 0 16px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 24px; padding-bottom: 64px; }
.card { display: flex; flex-direction: column; }
.card .thumb { position: relative; background: var(--soft); border-radius: var(--radius); aspect-ratio: 1; overflow: hidden; transition: transform .2s; }
.card:hover .thumb { transform: translateY(-3px); }
.card .thumb svg { width: 100%; height: 100%; }
.tag { position: absolute; top: 12px; left: 12px; background: #fff; border-radius: 999px; padding: 3px 10px; font-size: 12px; font-weight: 600; }
.card h3 { font-size: 16px; margin: 14px 0 2px; }
.card .price { color: var(--muted); font-size: 14px; }
.swatches { display: flex; gap: 6px; margin-top: 10px; }
.sw { width: 18px; height: 18px; border-radius: 50%; border: 1px solid rgba(0,0,0,.2); padding: 0; }
.sw.on { outline: 2px solid var(--ink); outline-offset: 2px; }
.card .btn { margin-top: 14px; }
.empty { grid-column: 1/-1; text-align: center; color: var(--muted); padding: 60px 0; }

/* value props + footer */
.props { background: var(--soft); padding: 56px 0; }
.props .container { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 28px; }
.props h4 { margin: 10px 0 4px; }
.props p { margin: 0; color: var(--muted); font-size: 15px; }
.cta { padding: 72px 0; text-align: center; }
.cta h2 { font-size: clamp(26px, 4vw, 38px); letter-spacing: -.02em; margin: 0 0 18px; }
footer { border-top: 1px solid var(--line); padding: 28px 0; color: var(--muted); font-size: 14px; }

/* editor */
.editor { display: grid; grid-template-columns: 1fr 360px; gap: 28px; padding: 28px 0 56px; align-items: start; }
.stage-wrap { background: var(--soft); border-radius: var(--radius); padding: 20px; }
.stage { position: relative; width: 100%; max-width: 640px; margin: 0 auto; aspect-ratio: 1; user-select: none; touch-action: none; }
.stage > svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.area { position: absolute; container-type: inline-size; outline: 1.5px dashed rgba(20,24,31,.45); overflow: hidden; }
.area.hide-guide { outline-color: transparent; }
.item { position: absolute; transform-origin: center; cursor: move; line-height: 1.1; white-space: nowrap; }
.item img { display: block; width: 100%; height: auto; pointer-events: none; }
.item.sel { outline: 1.5px solid var(--brand); }
.panel { border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.panel h1 { font-size: 22px; margin: 0 0 2px; letter-spacing: -.02em; }
.panel .price { font-size: 20px; font-weight: 700; margin: 0 0 16px; }
.field { margin: 0 0 18px; }
.field > label, .field > .lbl { display: block; font-size: 13px; font-weight: 600; margin-bottom: 8px; }
.row { display: flex; gap: 8px; flex-wrap: wrap; }
.panel input[type=text], .panel select { width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; font: inherit; }
.panel input[type=range] { width: 100%; accent-color: var(--brand); }
.panel input[type=color] { width: 44px; height: 38px; padding: 2px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.drop { border: 1.5px dashed var(--line); border-radius: 10px; padding: 18px; text-align: center; color: var(--muted); font-size: 14px; cursor: pointer; display: block; }
.drop:hover { border-color: var(--brand); color: var(--brand); }
.drop input { display: none; }
.selbox { border-top: 1px solid var(--line); padding-top: 16px; margin-top: 4px; }
.selbox[hidden] { display: none; }
.hint { font-size: 13px; color: var(--muted); margin: 8px 0 0; }
.toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 12px 20px; border-radius: 999px; font-size: 14px; opacity: 0; pointer-events: none; transition: opacity .2s; }
.toast.on { opacity: 1; }

@media (max-width: 860px) {
  .nav { display: none; }
  .editor { grid-template-columns: 1fr; }
  .hero { padding: 40px 0 32px; }
}
@media (max-width: 480px) {
  .container { padding: 0 16px; }
  .grid { grid-template-columns: repeat(2, 1fr); gap: 14px; }
  .header-actions .ghost { display: none; }
}

/* ficha de producto */
.detail { display: grid; grid-template-columns: 1.4fr 1fr; gap: 32px; align-items: start; }
.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.gallery img { width: 100%; border-radius: var(--radius); background: var(--soft); aspect-ratio: 1; object-fit: cover; }
.specs { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 10px 20px; font-size: 15px; }
.specs dt { color: var(--muted); }
.specs dd { margin: 0; font-weight: 500; }
@media (max-width: 860px) { .detail { grid-template-columns: 1fr; } }
