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

html { overflow-x: clip; scroll-behavior: smooth; }
body.promo-flyer-page { margin: 0; overflow-x: clip; background: var(--pf-bg); color: var(--pf-text); font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
.promo-flyer-page *, .promo-flyer-page *::before, .promo-flyer-page *::after { box-sizing: border-box; }
.pf-container { width: min(1180px, calc(100% - 40px)); margin-inline: auto; }
.pf-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

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

.pf-answer { background: #fefce8; color: #422006; border-block: 1px solid #fde68a; }
.pf-answer p { margin: 0; padding: 18px 0; line-height: 1.65; }

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

/* Herramienta */
.pf-workspace { display: grid; grid-template-columns: minmax(0, 1fr) minmax(340px, .95fr); gap: 26px; align-items: start; }
.pf-editor, .pf-preview { min-width: 0; border: 1px solid var(--pf-border); border-radius: 22px; background: var(--pf-panel); }
.pf-editor { padding: 24px; }
.pf-editor fieldset { min-width: 0; margin: 0; padding: 0 0 24px; border: 0; }
.pf-editor fieldset + fieldset { padding-top: 22px; border-top: 1px solid var(--pf-border); }
.pf-editor legend { padding: 0; color: #fff; font-size: 1.12rem; font-weight: 800; }
.pf-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 16px; }
.pf-editor label, .pf-file > label { display: grid; gap: 6px; color: #f5f5f4; font-size: .85rem; font-weight: 700; }
.pf-editor label small, .pf-file small, .pf-help { color: #d6d3d1; font-size: .78rem; font-weight: 500; line-height: 1.5; }
.pf-help { margin: 8px 0 0; }
.pf-editor input:not([type="color"]):not([type="file"]):not([type="checkbox"]):not([type="radio"]):not([type="range"]), .pf-editor textarea { width: 100%; min-height: 46px; padding: 10px 12px; border: 1px solid #62564d; border-radius: 10px; background: #fff; color: #1c1917; font: inherit; font-weight: 500; }
.pf-editor textarea { min-height: 70px; resize: vertical; line-height: 1.5; }
.pf-editor input::placeholder, .pf-editor textarea::placeholder { color: #6b625b; }
.pf-wide { grid-column: 1 / -1; }
.promo-flyer-page input:focus-visible, .promo-flyer-page textarea:focus-visible, .promo-flyer-page .pf-btn:focus-visible, .pf-link-btn:focus-visible, .pf-chip:focus-within, .pf-layout:focus-within, .pf-swatch:focus-within, .pf-format label:focus-within, .pf-check:focus-within { outline: 3px solid #ffd60a; outline-offset: 2px; }

.pf-chip-list { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.pf-chip { position: relative; display: inline-flex !important; cursor: pointer; border-radius: 999px; }
.pf-chip input, .pf-layout input, .pf-swatch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.pf-chip span { display: inline-flex; align-items: center; min-height: 40px; padding: 8px 14px; border: 1px solid #62564d; border-radius: 999px; background: #211d1a; color: #f5f5f4; font-size: .84rem; font-weight: 700; }
.pf-chip input:checked + span { border-color: #ffd60a; background: #ffd60a; color: #1c1917; }

.pf-layouts { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; margin-top: 14px; }
.pf-layout { position: relative; display: grid !important; gap: 4px !important; align-content: start; padding: 10px; border: 1px solid #4b423b; border-radius: 12px; background: #211d1a; cursor: pointer; text-align: center; }
.pf-layout:has(input:checked) { border-color: #ffd60a; background: #2e2610; }
.pf-layout strong { color: #fff; font-size: .8rem; }
.pf-layout small { color: #d6d3d1; font-size: .7rem; font-weight: 500; line-height: 1.35; }
.pf-layout__icon { display: block; width: 44px; height: 54px; margin: 0 auto 4px; border-radius: 6px; background: #3b332d; position: relative; overflow: hidden; }
.pf-layout__icon::before, .pf-layout__icon::after { content: ""; position: absolute; background: #ffd60a; }
.pf-layout__icon--impacto::before { left: 10px; right: 10px; top: 16px; height: 14px; border-radius: 3px; }
.pf-layout__icon--impacto::after { left: 14px; right: 14px; top: 35px; height: 4px; background: #e7e5e4; }
.pf-layout__icon--foto-arriba::before { left: 0; right: 0; top: 0; height: 24px; background: #a8a29e; }
.pf-layout__icon--foto-arriba::after { left: 6px; width: 24px; top: 32px; height: 5px; background: #e7e5e4; }
.pf-layout__icon--foto-fondo { background: linear-gradient(#a8a29e, #3b332d 70%); }
.pf-layout__icon--foto-fondo::before { left: 6px; width: 22px; bottom: 14px; height: 8px; border-radius: 2px; }
.pf-layout__icon--sello::before { left: 12px; top: 8px; width: 20px; height: 20px; border-radius: 50%; }
.pf-layout__icon--sello::after { left: 8px; right: 8px; top: 36px; height: 4px; background: #e7e5e4; }
.pf-layout__icon--cupon::before { inset: 7px; background: transparent; border: 2px dashed #ffd60a; border-radius: 4px; }

.pf-colors { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 16px; }
.pf-color-title { margin: 0 0 8px; color: #f5f5f4; font-size: .85rem; font-weight: 700; }
.pf-swatches { display: flex; flex-wrap: wrap; gap: 7px; }
.pf-swatch { position: relative; display: block !important; width: 34px; height: 34px; border-radius: 50%; background: var(--sw); border: 2px solid #78716c; cursor: pointer; }
.pf-swatch:has(input:checked) { box-shadow: 0 0 0 3px #0c0a09, 0 0 0 5px #ffd60a; }
.pf-swatch--custom { background: conic-gradient(#ef4444, #f59e0b, #22c55e, #3b82f6, #a855f7, #ef4444); }
.pf-custom { display: flex !important; align-items: center; gap: 10px !important; margin-top: 10px; font-size: .78rem !important; font-weight: 600 !important; color: #d6d3d1 !important; }
.pf-custom input { width: 46px; height: 32px; padding: 0; border: 1px solid #62564d; border-radius: 8px; background: #fff; cursor: pointer; }

.pf-file { display: grid; gap: 6px; align-content: start; padding: 12px; border: 1px dashed #74675d; border-radius: 12px; background: #211d1a; min-width: 0; }
.pf-file input { max-width: 100%; color: #f5f5f4; font-size: .8rem; }
.pf-link-btn { justify-self: start; min-height: 32px; padding: 4px 2px; border: 0; background: transparent; color: #fca5a5; font: inherit; font-size: .8rem; font-weight: 800; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.pf-focus { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 14px; }
.pf-focus input { width: 100%; accent-color: #ffd60a; }

.promo-flyer-page .pf-btn { display: inline-flex; flex-direction: column; 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; }
.promo-flyer-page .pf-btn small { font-size: .72rem; font-weight: 600; opacity: .9; }
.promo-flyer-page .pf-btn:hover { transform: translateY(-1px); }
.promo-flyer-page .pf-btn:disabled { opacity: .6; cursor: wait; transform: none; }
.promo-flyer-page .pf-btn--primary { background: #ffd60a; color: #1c1600; border-color: #ffd60a; }
.promo-flyer-page .pf-btn--secondary { background: #292524; color: #fff; border-color: #786b61; }
.promo-flyer-page .pf-btn--quiet { background: transparent; color: #e7e5e4; border-color: #51463d; }
.promo-flyer-page .pf-btn--publish { background: #10b981; color: #052e1f; border-color: #10b981; }
.promo-flyer-page .pf-btn--publish:hover { background: #34d399; }
.promo-flyer-page .pf-btn--wa { background: #25d366; color: #052e16; border-color: #25d366; }
.pf-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.pf-privacy { margin: 12px 0 0; color: #d6d3d1; font-size: .78rem; line-height: 1.6; }

/* Vista previa */
.pf-preview { position: sticky; top: 88px; padding: 16px; }
.pf-preview__title { margin: 0 0 10px; color: #fff; font-size: 1.05rem; }
.pf-format { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 0 0 12px; padding: 0; border: 0; min-width: 0; }
.pf-format legend { margin-bottom: 8px; padding: 0; color: #f5f5f4; font-size: .85rem; font-weight: 700; }
.pf-format label { position: relative; display: block; padding: 8px; border: 1px solid #4b423b; border-radius: 10px; background: #211d1a; color: #f5f5f4; font-size: .8rem; font-weight: 800; text-align: center; cursor: pointer; }
.pf-format input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.pf-format small { display: block; color: #d6d3d1; font-size: .7rem; font-weight: 600; }
.pf-format label:has(input:checked) { border-color: #ffd60a; background: #2e2610; }
.pf-stage { display: flex; align-items: center; justify-content: center; padding: 14px; border-radius: 14px; background: repeating-conic-gradient(#2a2420 0% 25%, #221d1a 0% 50%) 50% / 24px 24px; }
.pf-stage canvas { display: block; width: auto; height: auto; max-width: 100%; max-height: min(66vh, 620px); border-radius: 6px; box-shadow: 0 10px 30px rgba(0, 0, 0, .45); }
.pf-preview__meta { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; margin-top: 10px; color: #e7e5e4; font-size: .8rem; font-weight: 700; }
.pf-check { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; border-radius: 6px; }
.pf-check input { width: 18px; height: 18px; accent-color: #ffd60a; }
.pf-note { margin: 8px 0 0; color: #d6d3d1; font-size: .78rem; line-height: 1.55; }
.pf-warn { margin: 8px 0 0; padding: 8px 10px; border-radius: 8px; background: #3b2a06; color: #fde68a; font-size: .8rem; font-weight: 600; line-height: 1.5; }
.pf-downloads { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 14px; }
.pf-btn--wide { grid-column: 1 / -1; }
.pf-downloads .pf-btn--secondary { padding: 9px 6px; font-size: .8rem; }
.pf-status { min-height: 1.4em; margin: 12px 0 0; color: #ffd60a; font-size: .86rem; font-weight: 700; line-height: 1.5; }
.pf-status.is-error { color: #fca5a5; }
.pf-publish-box { margin-top: 12px; padding: 16px; border: 1px solid #065f46; border-radius: 14px; background: #062a1f; }
.pf-publish-box p { margin: 0 0 12px; color: #d1fae5; font-size: .88rem; line-height: 1.6; }
.pf-publish-box .pf-btn { width: 100%; }

/* Contenido */
.pf-steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.pf-steps article, .pf-cards article { padding: 22px; border: 1px solid #403832; border-radius: 16px; background: #1d1917; }
.pf-steps span { color: #ffd60a; font-size: .75rem; font-weight: 900; }
.pf-steps h3, .pf-cards h3 { margin: 10px 0 8px; color: #fff; font-size: 1.04rem; }
.pf-steps p, .pf-cards p { margin: 0; color: #d6d3d1; font-size: .9rem; line-height: 1.65; }
.pf-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.pf-copy-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
.pf-copy ul { padding-left: 20px; }
.pf-table-wrap { overflow-x: auto; border: 1px solid #403832; border-radius: 12px; }
.pf-table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.pf-table caption { padding: 10px 12px; color: #f5f5f4; font-weight: 800; text-align: left; background: #211d1a; }
.pf-table th, .pf-table td { padding: 10px 12px; border-top: 1px solid #332c27; color: #e7e5e4; text-align: left; vertical-align: top; }
.pf-table th { color: #fff; background: #1d1917; }
.pf-faq { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.pf-faq details { padding: 16px 18px; border: 1px solid #4b423b; border-radius: 12px; background: #211d1a; }
.pf-faq summary { color: #fff; font-weight: 800; cursor: pointer; }
.pf-faq p { color: #d6d3d1; line-height: 1.65; }
.pf-related { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 0; padding: 0; list-style: none; }
.pf-related li { padding: 16px; border: 1px solid #403832; border-radius: 12px; background: #1d1917; color: #d6d3d1; font-size: .88rem; line-height: 1.55; }
.pf-related a { display: block; margin-bottom: 4px; font-weight: 800; }
.pf-final { padding: 44px; border: 1px solid #665a50; border-radius: 24px; background: linear-gradient(135deg, #211d1a, #151210); text-align: center; }
.pf-final > div { display: flex; justify-content: center; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.promo-flyer-page .footer { background: #0a0a0a; color: #f5f5f4; }
.promo-flyer-page .footer h3 { color: #fff; }
.promo-flyer-page .footer a, .promo-flyer-page .footer p { color: #a8a29e; }

@media (max-width: 980px) {
  .pf-workspace, .pf-copy-grid { grid-template-columns: 1fr; }
  .pf-preview { position: static; }
  .pf-steps, .pf-cards, .pf-related { grid-template-columns: 1fr 1fr; }
  .pf-layouts { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 640px) {
  .pf-container { width: min(100% - 24px, 1180px); }
  .pf-hero { padding: 92px 0 44px; }
  .pf-tool-section, .pf-section { padding: 52px 0; }
  .pf-editor, .pf-preview { padding: 14px; border-radius: 16px; }
  .pf-fields, .pf-faq, .pf-steps, .pf-cards, .pf-related, .pf-colors, .pf-focus { grid-template-columns: 1fr; }
  .pf-layouts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pf-stage { padding: 8px; }
  .pf-stage canvas { max-height: 58vh; }
  .pf-hero__actions .pf-btn, .pf-final .pf-btn { width: 100%; }
  .pf-final { padding: 28px 18px; }
}
