
/* Layout: builder (left) + sticky live quote (right); stacks on phones. Quote document overlay mirrors D's PDF template. */
.ddcot {
  --bg: #0C0C12; --surface: #1A1B24; --surface-2: #20212C; --line: #2A2C38; --line-2: #363847;
  --text: #F8F9FB; --muted: #C9CCD6; --muted-2: #A0A4B2;
  --accent: #7C3AED; --accent-ink: #A78BFA; --accent2: #67D3EC; --ok: #4ADE80; --warn: #FBBF24;
  --doc-green: #4E8459; --doc-green-soft: #9CC3A3; --doc-ink: #111111; --doc-line: #9A9A9A; --paper: #FFFFFF;
  --display: 'Bricolage Grotesque', 'Arial Black', system-ui, sans-serif;
  --body: 'DM Sans', system-ui, -apple-system, sans-serif;
  --docfont: 'Montserrat', Arial, sans-serif;
  color-scheme: dark;
}
.ddcot, .ddcot * { box-sizing: border-box; }
.ddcot { background: var(--bg); color: var(--text); font-family: var(--body); font-size: 16px; line-height: 1.5;
   }
.ddcot .wrap { max-width: 1200px; margin: 0 auto; padding-block: 28px 64px; }


.ddcot .head { display: flex; flex-direction: column; gap: 10px; margin-bottom: 28px; }
.ddcot .eyebrow { margin: 0; font-size: 13px; letter-spacing: 3px; text-transform: uppercase; font-weight: 700; color: var(--accent2); }
.ddcot h1 { margin: 0; font-family: var(--display); font-weight: 800; font-size: clamp(34px, 5vw, 60px); line-height: 1; letter-spacing: -1.5px; text-wrap: balance; }
.ddcot h1 span { color: var(--accent-ink); }
.ddcot .lead { margin: 0; color: var(--muted); max-width: 620px; font-size: 17px; }

.ddcot .grid { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 24px; align-items: start; }
@media (max-width: 960px) { .ddcot .grid { grid-template-columns: minmax(0, 1fr); } }

.ddcot .card { background: var(--surface); border: 1px solid var(--line); border-radius: 22px; padding: 22px; }
.ddcot .step { display: flex; flex-direction: column; gap: 16px; }
.ddcot .builder { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.ddcot .step h2 { margin: 0; font-family: var(--display); font-weight: 800; font-size: 22px; display: flex; align-items: center; gap: 10px; }
.ddcot .step h2 i { font-style: normal; width: 28px; height: 28px; border-radius: 50%; background: var(--accent); color: #fff; font-size: 14px; display: inline-flex; align-items: center; justify-content: center; flex: none; }
.ddcot .group-title { margin: 6px 0 0; font-size: 13px; font-weight: 700; color: var(--accent2); letter-spacing: 2px; text-transform: uppercase; }

.ddcot .fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
@media (max-width: 560px) { .ddcot .fields { grid-template-columns: minmax(0, 1fr); } }
.ddcot .field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.ddcot .field.full { grid-column: 1 / -1; }
.ddcot label, .ddcot .lbl { font-size: 13px; font-weight: 700; color: var(--muted-2); letter-spacing: .5px; text-transform: uppercase; }
.ddcot input[type=text], .ddcot input[type=date], .ddcot select {
  width: 100%; background: var(--bg); color: var(--text); border: 1px solid var(--line-2); border-radius: 12px;
  padding: 12px 14px; font: inherit; font-size: 16px; }
.ddcot input:focus-visible, .ddcot select:focus-visible, .ddcot button:focus-visible { outline: 3px solid var(--accent2); outline-offset: 2px; }
.ddcot .hint { font-size: 13px; color: var(--muted-2); }
.ddcot .hint.good { color: var(--ok); }

.ddcot .guests { display: flex; align-items: center; gap: 14px; }
.ddcot .guests input[type=range] { flex: 1; accent-color: var(--accent); }
.ddcot .guests output { font-family: var(--display); font-weight: 800; font-size: 28px; min-width: 70px; text-align: right; font-variant-numeric: tabular-nums; }

.ddcot .tabs { display: inline-flex; background: var(--bg); border: 1px solid var(--line-2); border-radius: 999px; padding: 4px; gap: 4px; align-self: flex-start; }
.ddcot .tabs button { border: 0; background: transparent; color: var(--muted); font: inherit; font-weight: 700; padding: 9px 18px; border-radius: 999px; cursor: pointer; }
.ddcot .tabs button[aria-selected="true"] { background: var(--accent); color: #fff; }

.ddcot .pkgs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 720px) { .ddcot .pkgs { grid-template-columns: minmax(0, 1fr); } }
.ddcot .pkg { text-align: left; background: var(--bg); border: 1.5px solid var(--line-2); border-radius: 18px; padding: 18px; color: var(--text); font: inherit; cursor: pointer; display: flex; flex-direction: column; gap: 8px; position: relative; }
.ddcot .pkg[aria-pressed="true"] { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(124,58,237,.35); }
.ddcot .pkg:disabled { opacity: .45; cursor: not-allowed; }
.ddcot .pkg b { font-family: var(--display); font-size: 22px; }
.ddcot .pkg .price { font-family: var(--display); font-weight: 800; font-size: 28px; font-variant-numeric: tabular-nums; }
.ddcot .pkg .cap { font-size: 13px; color: var(--muted-2); }
.ddcot .pkg ul { margin: 4px 0 0; padding-left: 18px; font-size: 13px; color: var(--muted); display: flex; flex-direction: column; gap: 2px; }
.ddcot .badge { position: absolute; top: -10px; right: 14px; background: var(--accent2); color: var(--bg); font-size: 12px; font-weight: 800; padding: 4px 10px; border-radius: 999px; }

.ddcot .items { display: flex; flex-direction: column; }
.ddcot .item { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); }
.ddcot .item:last-child { border-bottom: 0; }
.ddcot .ico { width: 44px; height: 44px; border-radius: 12px; background: var(--surface-2); display: flex; align-items: center; justify-content: center; color: var(--accent-ink); }
.ddcot .item .name { font-weight: 700; }
.ddcot .item .meta { font-size: 13px; color: var(--muted-2); }
.ddcot .item select { width: auto; max-width: 240px; padding: 9px 12px; font-size: 15px; }
@media (max-width: 560px) { .ddcot .item { grid-template-columns: 44px minmax(0, 1fr); } .ddcot .item > :last-child { grid-column: 2; justify-self: start; } }
.ddcot .qty { display: inline-flex; align-items: center; border: 1px solid var(--line-2); border-radius: 999px; overflow: hidden; }
.ddcot .qty button { width: 40px; height: 40px; border: 0; background: transparent; color: var(--text); font-size: 20px; cursor: pointer; }
.ddcot .qty button:hover { background: var(--surface-2); }
.ddcot .qty span { min-width: 30px; text-align: center; font-weight: 700; font-variant-numeric: tabular-nums; }
.ddcot .toggle { width: 52px; height: 30px; border-radius: 999px; border: 0; background: var(--line-2); position: relative; cursor: pointer; }
.ddcot .toggle::after { content: ""; position: absolute; top: 4px; left: 4px; width: 22px; height: 22px; border-radius: 50%; background: #fff; transition: transform .15s ease; }
.ddcot .toggle[aria-pressed="true"] { background: var(--accent); }
.ddcot .toggle[aria-pressed="true"]::after { transform: translateX(22px); }
.ddcot .nudge { border: 1px solid var(--accent); background: rgba(124,58,237,.12); border-radius: 14px; padding: 12px 14px; font-size: 14px; display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; }
.ddcot .nudge button { border: 0; background: var(--accent); color: #fff; font: inherit; font-weight: 700; padding: 8px 14px; border-radius: 999px; cursor: pointer; }

.ddcot .quote { position: sticky; top: calc(env(safe-area-inset-top, 0px) + 16px); display: flex; flex-direction: column; gap: 14px; }
.ddcot .quote h2 { margin: 0; font-family: var(--display); font-weight: 800; font-size: 24px; }
.ddcot .quote .who { font-size: 14px; color: var(--muted-2); }
.ddcot .lines { display: flex; flex-direction: column; gap: 8px; font-size: 15px; border-top: 1px solid var(--line); padding-top: 14px; }
.ddcot .line { display: flex; justify-content: space-between; gap: 12px; }
.ddcot .line span:first-child { color: var(--muted); min-width: 0; }
.ddcot .line span:last-child { font-variant-numeric: tabular-nums; white-space: nowrap; }
.ddcot .line.disc span { color: var(--ok); }
.ddcot .line.sub { border-top: 1px dashed var(--line-2); padding-top: 8px; font-weight: 700; }
.ddcot .total { display: flex; justify-content: space-between; align-items: baseline; border-top: 1px solid var(--line); padding-top: 14px; }
.ddcot .total span { font-weight: 700; color: var(--muted); }
.ddcot .total b { font-family: var(--display); font-weight: 800; font-size: 40px; font-variant-numeric: tabular-nums; }
.ddcot .fine { font-size: 12px; color: var(--muted-2); margin: 0; }
.ddcot .btn { display: inline-flex; justify-content: center; align-items: center; gap: 8px; text-decoration: none; border: 0; border-radius: 999px; padding: 15px 20px; font: inherit; font-weight: 700; font-size: 16px; cursor: pointer; }
.ddcot .btn-main { background: var(--accent); color: #fff; }
.ddcot .btn-wa { background: #25D366; color: #0C0C12; }
.ddcot .btn-ghost { background: transparent; color: var(--text); border: 1.5px solid var(--line-2); }

/* ---------- Quote document (overlay) ---------- */
.ddcot .paper { max-width: 816px; margin: 0 auto; background: var(--paper); color: var(--doc-ink); font-family: var(--docfont); aspect-ratio: 8.5 / 11; min-height: min-content; padding: 5% 6.5% 0; display: flex; flex-direction: column; font-size: 13px; box-shadow: 0 20px 60px rgba(0,0,0,.5); }
.ddcot .d-head { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.ddcot .d-head img { width: 46%; max-width: 360px; height: auto; display: block; }
.ddcot .d-head .tag { font-weight: 700; font-size: 11.5px; line-height: 1.35; }
.ddcot .d-title { margin: 28px 0 2px; font-weight: 500; font-size: clamp(22px, 4.2vw, 38px); letter-spacing: .5px; padding-left: 7%; }
.ddcot .d-meta { padding-left: 7%; font-size: 12.5px; display: flex; flex-wrap: wrap; gap: 4px 28px; }
.ddcot .d-info { margin: 18px 13% 20px 7%; border: 1.5px solid var(--doc-ink); display: grid; grid-template-columns: 26% 1fr; font-size: 12.5px; }
.ddcot .d-info div { padding: 1px 5px; }
.ddcot .d-info div:nth-child(odd) { border-right: 1.5px solid var(--doc-ink); }
.ddcot .d-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.ddcot .d-table th { background: var(--doc-green); color: #fff; text-align: left; font-weight: 600; font-size: 13px; padding: 2px 8px; letter-spacing: .3px; }
.ddcot .d-table th:last-child, .ddcot .d-table td:last-child { text-align: center; width: 13%; }
.ddcot .d-table td { border: 1px solid var(--doc-line); padding: 10px 8px; vertical-align: top; line-height: 1.4; }
.ddcot .d-table td:first-child { width: 25%; }
.ddcot .d-table tr.disc td { color: #2E6B3A; }
.ddcot .d-table tr.sum td { background: var(--doc-green-soft); padding: 2px 8px; border-color: var(--doc-green); font-size: 13px; }
.ddcot .d-cond { margin: 22px 0 0 7%; font-size: 12px; line-height: 1.5; }
.ddcot .d-cond b { font-size: 12.5px; }
.ddcot .d-foot { margin-top: auto; margin-bottom: 4.5%; border-top: 1px solid var(--doc-green-soft); background: linear-gradient(#fff, #DDE3DE); display: grid; grid-template-columns: 34% 1fr auto; gap: 14px; align-items: center; padding: 12px 14px; font-size: 11px; font-weight: 700; }
.ddcot .d-foot img { width: 100%; height: auto; display: block; }
.ddcot .d-foot .contact { display: grid; grid-template-columns: auto auto; gap: 0 14px; }
@media (max-width: 560px) { .ddcot .paper { aspect-ratio: auto; font-size: 11px; padding-bottom: 12px; } .ddcot .d-foot { grid-template-columns: 1fr; } .ddcot .d-info { margin-right: 0; } .ddcot .d-title, .ddcot .d-meta, .ddcot .d-cond { padding-left: 0; margin-left: 0; } .ddcot .d-info { margin-left: 0; } }
@media (prefers-reduced-motion: reduce) { .ddcot .toggle::after { transition: none; } }


/* v3 additions */
.ddcot .topbar { display: flex; flex-wrap: wrap; gap: 10px; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.ddcot .lang { display: inline-flex; background: var(--surface); border: 1px solid var(--line-2); border-radius: 999px; padding: 4px; gap: 4px; }
.ddcot .lang button { border: 0; background: transparent; color: var(--muted); font: inherit; font-weight: 700; padding: 7px 14px; border-radius: 999px; cursor: pointer; }
.ddcot .lang button[aria-pressed="true"] { background: var(--accent2); color: var(--bg); }
.ddcot .req { color: #F87171; }
.ddcot .err { font-size: 13px; color: #F87171; min-height: 0; }
.ddcot .err:empty { display: none; }
.ddcot input.bad, .ddcot select.bad { border-color: #F87171; }
.ddcot .phone { display: grid; grid-template-columns: minmax(120px, 40%) minmax(0, 1fr); gap: 8px; }
.ddcot .switch { display: flex; align-items: center; justify-content: space-between; gap: 14px; background: var(--bg); border: 1px solid var(--line-2); border-radius: 14px; padding: 12px 14px; }
.ddcot .switch b { display: block; }
.ddcot .switch span { font-size: 13px; color: var(--muted-2); }
.ddcot .included { font-size: 13px; color: var(--ok); font-weight: 700; }
.ddcot .autotruss { font-size: 13px; color: var(--accent2); }
.ddcot .btn:disabled { opacity: .5; cursor: not-allowed; }
.ddcot .panel-info { background: var(--bg); border: 1px solid var(--line-2); border-radius: 14px; padding: 12px 14px; font-size: 14px; color: var(--muted); }

/* Fake browser for the quote page / admin panel */

/* v4 */
.ddcot .flead { margin: 0; color: var(--muted); font-size: 15px; }
.ddcot .flabel { font-size: 14px; font-weight: 700; color: var(--muted); }
.ddcot .choices { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
@media (max-width: 420px) { .ddcot .choices { grid-template-columns: minmax(0, 1fr); } }
.ddcot .choice { text-align: left; background: var(--bg); color: var(--text); border: 1px solid var(--line-2); border-radius: 14px; padding: 12px 14px; font: inherit; cursor: pointer; display: flex; flex-direction: column; gap: 3px; }
.ddcot .choice span { font-size: 13px; color: var(--muted-2); }
.ddcot .choice[aria-checked="true"] { border-color: var(--accent2); box-shadow: inset 0 0 0 1px var(--accent2); background: rgba(103,211,236,.08); }
.ddcot .choices.bad .choice { border-color: #F87171; }
.ddcot .flead { margin: -4px 0 0; }
.ddcot #eForm { color: var(--muted); }


/* Plugin additions */
.ddcot { text-align: left; }
.ddcot .wrap { max-width: 1200px; margin: 0 auto; padding: 28px max(16px, env(safe-area-inset-right, 0px)) 64px max(16px, env(safe-area-inset-left, 0px)); }
.ddcot .lang a { color: var(--muted); text-decoration: none; font-weight: 700; padding: 7px 14px; border-radius: 999px; }
.ddcot .lang a[aria-current="true"] { background: var(--accent2); color: var(--bg); }
.ddcot .hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.ddcot .btn-main:disabled { background: var(--line-2); color: var(--muted-2); cursor: not-allowed; }
.ddcot .btn.is-busy { opacity: .7; cursor: progress; }
.ddcot ul { list-style: disc; }
.ddcot button { font-family: inherit; }
.ddcot input[type=text]::placeholder { color: var(--muted-2); }
.ddcot-toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 9999; background: #4ADE80; color: #0C0C12; font: 700 15px/1.3 'DM Sans', system-ui, sans-serif; padding: 12px 18px; border-radius: 999px; max-width: calc(100vw - 32px); text-align: center; }
.ddcot-toast.err { background: #F87171; }

/* Página de la cotización */
.ddcot .qpage { max-width: 900px; margin: 0 auto; padding: 32px max(16px, env(safe-area-inset-right, 0px)) 64px max(16px, env(safe-area-inset-left, 0px)); display: flex; flex-direction: column; gap: 20px; }
.ddcot .qhead { display: flex; flex-direction: column; gap: 8px; }
.ddcot .qhead h1 { font-size: clamp(32px, 5vw, 52px); }
.ddcot .qsub { color: var(--muted); font-size: 16px; margin: 0; }
.ddcot .qactions { display: flex; flex-wrap: wrap; gap: 12px; }
.ddcot .bigdl { font-size: 19px; padding: 20px 30px; }
.ddcot .qactions .btn-ghost { padding: 20px 24px; }
.ddcot .qnote { margin: 0; font-size: 14px; color: var(--muted-2); }
.ddcot .paper { width: 100%; }
/* Modo PDF: tamaño carta fijo, sin sombra */
.ddcot.ddcot-pdf { width: 816px; background: #fff; color: #111; }
.ddcot.ddcot-pdf .paper { width: 816px; min-height: 1056px; height: auto; max-width: none; aspect-ratio: auto; box-shadow: none; font-size: 13px; padding: 40px 53px 0; }
.ddcot.ddcot-pdf .d-foot { grid-template-columns: 34% 1fr auto; }
.ddcot.ddcot-pdf .d-info { margin: 18px 13% 20px 7%; }
.ddcot.ddcot-pdf .d-title, .ddcot.ddcot-pdf .d-meta { padding-left: 7%; }
.ddcot.ddcot-pdf .d-cond { margin-left: 7%; }
/* Foto y "¿Qué es?" de cada producto */
.ddcot.ddcot-portal { background: none; }
.ddcot .ico-btn { border: 0; padding: 0; cursor: pointer; overflow: hidden; position: relative; font: inherit; }
.ddcot .ico-btn:hover { box-shadow: 0 0 0 2px var(--accent2); }
.ddcot .ico-btn.has-photo { width: 64px; height: 64px; border-radius: 14px; }
.ddcot .ico-btn.has-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ddcot .ico-btn .zoom { position: absolute; right: 3px; bottom: 3px; width: 20px; height: 20px; border-radius: 50%; background: rgba(12,12,18,.8); color: #fff; display: flex; align-items: center; justify-content: center; }
.ddcot .item { grid-template-columns: auto minmax(0, 1fr) auto; }
@media (max-width: 560px) { .ddcot .item { grid-template-columns: auto minmax(0, 1fr); } }
.ddcot .infolink { border: 0; background: none; padding: 2px 0 0; color: var(--accent2); font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.ddcot .pkg-photo { display: block; margin: -18px -18px 4px; border-radius: 16px 16px 0 0; overflow: hidden; aspect-ratio: 16 / 9; background: var(--surface-2); }
.ddcot .pkg-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ddcot .ddcot-lb { position: fixed; inset: 0; z-index: 99999; background: rgba(8,8,12,.88); display: flex; align-items: center; justify-content: center; padding: max(16px, env(safe-area-inset-top, 0px)) 16px max(16px, env(safe-area-inset-bottom, 0px)); }
.ddcot .ddcot-lb[hidden] { display: none; }
.ddcot .lb-card { position: relative; width: 100%; max-width: 560px; max-height: 100%; overflow: auto; background: var(--surface); border: 1px solid var(--line-2); border-radius: 20px; }
.ddcot .lb-card img { display: block; width: 100%; max-height: 60vh; object-fit: contain; background: #000; }
.ddcot .lb-body { padding: 18px 20px 22px; }
.ddcot .lb-body h3 { margin: 0 40px 6px 0; font-family: var(--display); font-weight: 800; font-size: 22px; line-height: 1.15; }
.ddcot .lb-body p { margin: 0; color: var(--muted); font-size: 16px; }
.ddcot .lb-x { position: absolute; top: 10px; right: 10px; z-index: 2; width: 40px; height: 40px; border-radius: 50%; border: 0; background: rgba(12,12,18,.75); color: #fff; font-size: 18px; cursor: pointer; }
.ddcot .pickhint { margin: 0; font-size: 14px; color: var(--accent2); font-weight: 700; }
.ddcot .pickhint[hidden] { display: none; }
.ddcot .tabs.bad { border-color: #F87171; box-shadow: 0 0 0 3px rgba(248,113,113,.25); }
.ddcot .pickhint.bad { color: #F87171; }
.ddcot .choices.bad .choice { box-shadow: 0 0 0 1px #F87171; }
.ddcot #eForm { color: #F87171; font-weight: 700; }
.ddcot .special { margin: 4px 0 0; font-size: 13px; color: var(--muted-2); text-align: center; }
.ddcot .special a { color: var(--accent2); font-weight: 700; }
.ddcot .lb-ref { margin: 10px 0 0; font-size: 12px; color: var(--muted-2); font-style: italic; }
@media print {
  body * { visibility: hidden !important; }
  #ddqPaper, #ddqPaper * { visibility: visible !important; }
  #ddqPaper { position: absolute; left: 0; top: 0; width: 100%; box-shadow: none; }
}
.ddcot.ddcot-pdf .d-title { font-size: 34px; margin-top: 20px; }
.ddcot.ddcot-pdf .d-table td { padding: 7px 8px; }
.ddcot.ddcot-pdf .d-cond { margin-top: 16px; }

/* Foto del paquete en la cotización (va arriba de la tabla) */
.ddcot .d-photo { margin: 0 0 16px; break-inside: avoid; }
.ddcot .d-photo img { width: 100%; height: auto; aspect-ratio: 16 / 7; object-fit: cover; border-radius: 6px; display: block; }
.ddcot .d-photo figcaption { font-size: 11px; color: #555; margin-top: 4px; text-align: right; }
.ddcot.ddcot-pdf .d-photo img { height: 300px; aspect-ratio: auto; }
