:root {
  --pl-bg: #0c0a09;
  --pl-panel: #171412;
  --pl-panel-2: #211d1a;
  --pl-border: #3b332d;
  --pl-text: #fafaf9;
  --pl-muted: #d6d3d1;
  --pl-accent: #f2c94c;
  --pl-green: #10b981;
  --pl-danger: #fca5a5;
}

html { overflow-x: clip; scroll-behavior: smooth; }
body.pricelist-page { margin: 0; overflow-x: clip; background: var(--pl-bg); color: var(--pl-text); font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
.pricelist-page *, .pricelist-page *::before, .pricelist-page *::after { box-sizing: border-box; }
.pl-container { width: min(1180px, calc(100% - 40px)); margin-inline: auto; }
.pl-print { display: none; }

/* Hero */
.pl-hero { padding: 112px 0 56px; background: radial-gradient(circle at 85% 10%, rgba(16, 185, 129, .14), transparent 34%), #0c0a09; border-bottom: 1px solid #29231f; }
.pl-breadcrumb { display: flex; flex-wrap: wrap; gap: 8px; color: #d6d3d1; font-size: .86rem; margin-bottom: 24px; }
.pl-breadcrumb a { color: #f2c94c; text-decoration: underline; text-underline-offset: 3px; }
.pl-eyebrow, .pl-kicker { margin: 0; color: #f2c94c; font-size: .78rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.pl-hero h1 { margin: 12px 0 18px; max-width: 900px; font-family: "Space Grotesk", Inter, sans-serif; font-size: clamp(2.3rem, 5vw, 4.6rem); line-height: 1; letter-spacing: -.05em; color: #fff; }
.pl-hero h1 span { color: #34d399; }
.pl-lead { max-width: 720px; margin: 0 0 22px; color: #e7e5e4; font-size: clamp(1rem, 1.5vw, 1.16rem); line-height: 1.7; }
.pl-proof { display: flex; flex-wrap: wrap; gap: 10px; margin: 0 0 26px; padding: 0; list-style: none; }
.pl-proof li { padding: 8px 11px; border: 1px solid #51463d; border-radius: 999px; background: #171412; color: #f5f5f4; font-size: .82rem; font-weight: 700; }
.pl-hero__actions { display: flex; flex-wrap: wrap; gap: 10px; }

.pl-answer { background: #ecfdf5; color: #064e3b; border-block: 1px solid #a7f3d0; }
.pl-answer p { margin: 0; padding: 18px 0; line-height: 1.65; }
.pl-answer a { color: #064e3b; font-weight: 700; }

.pl-tool-section, .pl-section { padding: 72px 0; }
.pl-section--soft { background: #151210; border-block: 1px solid #2f2925; }
.pl-heading { max-width: 780px; margin: 0 auto 32px; text-align: center; }
.pl-heading h2, .pl-copy h2, .pl-final h2 { margin: 8px 0 12px; color: #fff; font-family: "Space Grotesk", Inter, sans-serif; font-size: clamp(1.8rem, 3.4vw, 2.8rem); line-height: 1.1; letter-spacing: -.035em; }
.pl-heading p:last-child, .pl-copy p, .pl-copy li, .pl-final p { color: #d6d3d1; line-height: 1.75; }
.pl-copy a, .pl-faq a, .pl-related a, .pl-note a { color: #f2c94c; text-decoration: underline; text-underline-offset: 3px; }

/* Herramienta */
.pl-workspace { display: grid; grid-template-columns: minmax(0, 1fr) minmax(340px, .9fr); gap: 26px; align-items: start; }
.pl-editor, .pl-preview { min-width: 0; border: 1px solid var(--pl-border); border-radius: 22px; background: var(--pl-panel); }
.pl-editor { padding: 24px; }
.pl-editor fieldset { min-width: 0; margin: 0; padding: 0 0 24px; border: 0; }
.pl-editor fieldset + fieldset { padding-top: 22px; border-top: 1px solid var(--pl-border); }
.pl-editor legend { padding: 0; color: #fff; font-size: 1.12rem; font-weight: 800; }
.pl-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 16px; }
.pl-editor label { display: grid; gap: 6px; color: #f5f5f4; font-size: .85rem; font-weight: 700; }
.pl-editor label small, .pl-help { color: #d6d3d1; font-size: .78rem; font-weight: 500; line-height: 1.5; }
.pl-editor input:not([type="color"]):not([type="file"]):not([type="checkbox"]):not([type="radio"]), .pl-editor textarea, .pl-editor select { width: 100%; min-height: 46px; padding: 10px 12px; border: 1px solid #62564d; border-radius: 10px; background: #fff; color: #1c1917; font: inherit; font-weight: 500; }
.pl-editor input::placeholder, .pl-editor textarea::placeholder { color: #6b625b; }
.pl-editor textarea { min-height: 150px; resize: vertical; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: .86rem; line-height: 1.55; }
.pl-editor input[aria-invalid="true"] { border-color: #b91c1c; box-shadow: 0 0 0 2px #fca5a5; }
.pl-editor input:focus-visible, .pl-editor textarea:focus-visible, .pl-editor select:focus-visible, .pricelist-page .pl-btn:focus-visible, .pl-link-btn:focus-visible, .pl-row__remove:focus-visible, .pl-format label:focus-within, .pl-check:focus-within { outline: 3px solid #f2c94c; outline-offset: 2px; }
.pl-color { display: flex; min-height: 46px; align-items: center; gap: 12px; padding: 6px 10px; border: 1px solid #62564d; border-radius: 10px; background: #fff; color: #292524; }
.pl-color input { width: 52px; height: 32px; padding: 0; border: 0; background: transparent; }
.pl-file { padding: 12px; border: 1px dashed #74675d; border-radius: 12px; background: #211d1a; }
.pl-file input { max-width: 100%; color: #f5f5f4; font-weight: 500; }
.pl-wide { grid-column: 1 / -1; }
.pl-check { display: flex !important; align-items: center; gap: 10px !important; padding: 12px; border: 1px solid #4b423b; border-radius: 12px; background: #211d1a; cursor: pointer; }
.pl-check input { width: 20px; height: 20px; accent-color: #10b981; flex: none; }

.pl-paste { margin-top: 16px; padding: 16px; border: 1px solid #4b423b; border-radius: 14px; background: #211d1a; }
.pl-paste__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 10px; }

.pl-legend-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 12px; }
.pl-rows { display: grid; gap: 12px; }
.pl-row { padding: 14px; border: 1px solid #4b423b; border-radius: 14px; background: #211d1a; }
.pl-row.is-example { border-style: dashed; }
.pl-row__head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 10px; }
.pl-row__head strong { display: flex; align-items: center; gap: 8px; color: #fff; font-size: .9rem; }
.pl-badge { padding: 2px 8px; border-radius: 999px; background: #3b332d; color: #f5f5f4; font-size: .7rem; font-weight: 800; }
.pl-row__remove { min-height: 32px; padding: 4px 6px; border: 0; background: transparent; color: #fca5a5; font: inherit; font-size: .8rem; font-weight: 800; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.pl-row__grid { display: grid; grid-template-columns: 1.4fr 1.2fr .8fr; gap: 10px; }
.pl-row__grid .pl-field--name { grid-column: 1; }
.pl-row__grid .pl-field--price2 { display: none !important; }
.has-wholesale .pl-row__grid { grid-template-columns: 1.3fr 1.1fr .8fr .8fr; }
.has-wholesale .pl-row__grid .pl-field--price2 { display: grid !important; }
.pl-row__grid .pl-field--category { grid-column: 1 / -1; }
.pl-row__grid label { font-size: .78rem; }

.pricelist-page .pl-btn { display: inline-flex; min-height: 46px; align-items: center; justify-content: center; padding: 11px 18px; border: 1px solid transparent; border-radius: 11px; font: inherit; font-size: .9rem; font-weight: 800; line-height: 1.25; text-align: center; text-decoration: none; cursor: pointer; transition: transform .18s ease, background .18s ease; }
.pricelist-page .pl-btn:hover { transform: translateY(-1px); }
.pricelist-page .pl-btn--primary { background: #f2c94c; color: #241900; border-color: #f2c94c; }
.pricelist-page .pl-btn--secondary { background: #292524; color: #fff; border-color: #786b61; }
.pricelist-page .pl-btn--quiet { background: transparent; color: #e7e5e4; border-color: #51463d; }
.pricelist-page .pl-btn--publish { background: #10b981; color: #052e1f; border-color: #10b981; }
.pricelist-page .pl-btn--publish:hover { background: #34d399; }
.pricelist-page .pl-btn--wa { background: #25d366; color: #052e16; border-color: #25d366; }
.pricelist-page .pl-btn--small { min-height: 38px; padding: 7px 12px; background: #332d28; color: #fff; border-color: #74675d; font-size: .8rem; }
.pl-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.pl-status { min-height: 1.4em; margin: 14px 0 0; color: #f2c94c; font-size: .86rem; font-weight: 700; line-height: 1.5; }
.pl-status.is-error { color: #fca5a5; }
.pl-privacy { margin: 10px 0 0; color: #d6d3d1; font-size: .78rem; line-height: 1.6; }
.pl-publish-box { margin-top: 18px; padding: 16px; border: 1px solid #065f46; border-radius: 14px; background: #062a1f; }
.pl-publish-box p { margin: 0 0 12px; color: #d1fae5; font-size: .88rem; line-height: 1.6; }

/* Vista previa */
.pl-preview { position: sticky; top: 88px; padding: 16px; }
.pl-preview__bar { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px; padding: 2px 2px 12px; color: #e7e5e4; font-size: .8rem; font-weight: 800; }
.pl-format { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 0 0 12px; padding: 0; border: 0; min-width: 0; }
.pl-format legend { margin-bottom: 8px; padding: 0; color: #fff; font-size: .9rem; font-weight: 800; }
.pl-format label { display: flex; align-items: center; gap: 8px; padding: 10px; border: 1px solid #4b423b; border-radius: 10px; background: #211d1a; color: #f5f5f4; font-size: .8rem; font-weight: 700; cursor: pointer; }
.pl-format label:has(input:checked) { border-color: #10b981; background: #062a1f; }
.pl-format input { accent-color: #10b981; }
.pl-pages { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; max-height: 640px; overflow: auto; padding: 12px; border-radius: 12px; background: #e7e5e4; }
.pl-page { margin: 0; }
.pl-page canvas { display: block; width: 100%; height: auto; border-radius: 6px; background: #fff; box-shadow: 0 6px 18px rgba(0,0,0,.18); }
.pl-page figcaption { display: flex; justify-content: space-between; align-items: center; gap: 6px; padding-top: 6px; color: #292524; font-size: .74rem; font-weight: 700; }
.pl-link-btn { min-height: 32px; padding: 4px 2px; border: 0; background: transparent; color: #7c2d12; font: inherit; font-weight: 800; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.pl-overflow { margin: 10px 0 0; color: #fca5a5; font-size: .8rem; font-weight: 700; }
.pl-preview__actions { display: grid; gap: 10px; margin-top: 14px; }
.pl-wa { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--pl-border); }
.pl-wa label { display: grid; gap: 6px; color: #fff; font-size: .9rem; font-weight: 800; }
.pl-wa textarea { width: 100%; min-height: 200px; padding: 12px; border: 1px solid #62564d; border-radius: 10px; background: #fff; color: #1c1917; font: .84rem/1.55 ui-monospace, SFMono-Regular, Consolas, monospace; resize: vertical; }
.pl-wa textarea:focus-visible { outline: 3px solid #f2c94c; outline-offset: 2px; }
.pl-wa .pl-actions { margin-top: 10px; }
.pl-note { margin: 8px 0 0; color: #d6d3d1; font-size: .78rem; line-height: 1.55; }

/* Contenido */
.pl-steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.pl-steps article, .pl-cards article { padding: 22px; border: 1px solid #403832; border-radius: 16px; background: #1d1917; }
.pl-steps span { color: #f2c94c; font-size: .75rem; font-weight: 900; }
.pl-steps h3, .pl-cards h3 { margin: 10px 0 8px; color: #fff; font-size: 1.04rem; }
.pl-steps p, .pl-cards p, .pl-cards li { margin: 0; color: #d6d3d1; font-size: .9rem; line-height: 1.65; }
.pl-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.pl-cards ul { margin: 10px 0 0; padding-left: 18px; }
.pl-copy-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
.pl-copy ul { padding-left: 20px; }
.pl-example { margin: 16px 0 0; padding: 16px; border: 1px solid #4b423b; border-radius: 12px; background: #211d1a; color: #f5f5f4; font: .85rem/1.6 ui-monospace, SFMono-Regular, Consolas, monospace; white-space: pre-wrap; overflow-wrap: anywhere; }
.pl-faq { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.pl-faq details { padding: 16px 18px; border: 1px solid #4b423b; border-radius: 12px; background: #211d1a; }
.pl-faq summary { color: #fff; font-weight: 800; cursor: pointer; }
.pl-faq p { color: #d6d3d1; line-height: 1.65; }
.pl-related { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 0; padding: 0; list-style: none; }
.pl-related li { padding: 16px; border: 1px solid #403832; border-radius: 12px; background: #1d1917; color: #d6d3d1; font-size: .88rem; line-height: 1.55; }
.pl-related a { display: block; margin-bottom: 4px; font-weight: 800; }
.pl-final { padding: 44px; border: 1px solid #665a50; border-radius: 24px; background: linear-gradient(135deg, #211d1a, #151210); text-align: center; }
.pl-final > div { display: flex; justify-content: center; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.pricelist-page .footer { background: #0a0a0a; color: #f5f5f4; }
.pricelist-page .footer h3 { color: #fff; }
.pricelist-page .footer a, .pricelist-page .footer p { color: #a8a29e; }

@media (max-width: 980px) {
  .pl-workspace, .pl-copy-grid { grid-template-columns: 1fr; }
  .pl-preview { position: static; }
  .pl-pages { max-height: none; }
  .pl-steps, .pl-cards, .pl-related { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 640px) {
  .pl-container { width: min(100% - 24px, 1180px); }
  .pl-hero { padding: 92px 0 44px; }
  .pl-tool-section, .pl-section { padding: 52px 0; }
  .pl-editor, .pl-preview { padding: 14px; border-radius: 16px; }
  .pl-fields, .pl-faq, .pl-steps, .pl-cards, .pl-related { grid-template-columns: 1fr; }
  .pl-row__grid, .has-wholesale .pl-row__grid { grid-template-columns: 1fr 1fr; }
  .pl-row__grid .pl-field--name, .pl-row__grid .pl-field--variant { grid-column: 1 / -1; }
  .pl-actions .pl-btn, .pl-hero__actions .pl-btn { width: 100%; }
  .pl-pages { grid-template-columns: 1fr 1fr; padding: 8px; gap: 8px; }
  .pl-final { padding: 28px 18px; }
}

/* PDF */
@page { size: A4; margin: 12mm; }
@media print {
  html, body.pricelist-page { background: #fff !important; color: #1c1917 !important; }
  body.pricelist-page > :not(#pl-print) { display: none !important; }
  .pl-print { display: block !important; font-family: Inter, "Segoe UI", Arial, sans-serif; color: #1c1917; print-color-adjust: exact; -webkit-print-color-adjust: exact; }
  .pl-print__header { display: flex; align-items: center; gap: 6mm; padding: 7mm 8mm; border-radius: 3mm; background: var(--pl-accent, #15803d); color: var(--pl-on-accent, #fff); }
  .pl-print__header img { width: 22mm; height: 22mm; object-fit: contain; padding: 1.5mm; border-radius: 2mm; background: #fff; }
  .pl-print__brand { margin: 0; font-size: 22pt; font-weight: 800; line-height: 1.1; }
  .pl-print__subtitle { margin: 2mm 0 0; font-size: 12pt; }
  .pl-print__table { width: 100%; margin-top: 7mm; border-collapse: collapse; font-size: 10.5pt; }
  .pl-print__table caption { padding: 2mm 3mm; border-left: 2mm solid var(--pl-accent, #15803d); background: #f5f5f4; text-align: left; font-size: 11pt; font-weight: 800; text-transform: uppercase; }
  .pl-print__table th { padding: 2.5mm 3mm; border-bottom: .4mm solid #a8a29e; color: #57534e; font-size: 8.5pt; text-align: left; text-transform: uppercase; }
  .pl-print__table td { padding: 2.5mm 3mm; border-bottom: .2mm solid #e7e5e4; vertical-align: top; }
  .pl-print__table tr { break-inside: avoid; }
  .pl-print__table td strong { display: block; }
  .pl-print__table td span { display: block; color: #57534e; font-size: 9pt; }
  .pl-print__table .pl-num { width: 32mm; text-align: right; white-space: nowrap; font-weight: 800; }
  .pl-print__table th.pl-num { font-weight: 700; }
  .pl-print__table td small { display: block; color: #047857; font-size: 8.5pt; font-weight: 600; }
  .pl-print__footer { margin-top: 8mm; padding-top: 4mm; border-top: .4mm solid #d6d3d1; font-size: 10pt; break-inside: avoid; }
  .pl-print__footer p { margin: 0 0 1.5mm; }
  .pl-print__phone { font-weight: 800; }
}
