/* Desk: catálogo de productos con precio fijo (ownelsalvador.com, intersectionlegal.com, amcapitalelsalvador.com).
   Un solo componente, tres temas. Sin estilos inline: la CSP de A&M es style-src 'self'.
   Solo se animan transform, opacity y clip-path. */

.desk--ownsv {
  --ink: #10121D; --ink-2: #1B1E2C; --accent: #E85A2A; --accent-ink: #FFFFFF; --accent-text: #C9481C;
  --alt: #0014C3; --bg: #FFFFFF; --surface: #F7F5F2; --line: rgba(16,18,29,.10); --muted: #5B5F6E;
  --display: 'DM Serif Display', Georgia, serif; --display-weight: 400; --display-track: -0.01em;
}
.desk--il {
  --ink: #1B2A4A; --ink-2: #22355C; --accent: #C9A961; --accent-ink: #1B2A4A; --accent-text: #8A6F2E;
  --alt: #1B2A4A; --bg: #F7F5F2; --surface: #FFFFFF; --line: rgba(27,42,74,.12); --muted: #5A6478;
  --display: 'Playfair Display', Georgia, serif; --display-weight: 600; --display-track: -0.01em;
}
.desk--am {
  --ink: #101318; --ink-2: #1A1F26; --accent: #17999E; --accent-ink: #FFFFFF; --accent-text: #0D6B6E;
  --alt: #7B8FB0; --bg: #F3F5F8; --surface: #FFFFFF; --line: rgba(16,19,24,.10); --muted: #575F6B;
  --display: 'Archivo', 'Helvetica Neue', Helvetica, Arial, sans-serif; --display-weight: 700; --display-track: -0.02em;
}

.desk {
  --radius: 16px; --ease: cubic-bezier(.2,.8,.2,1); --ease-out: cubic-bezier(.16,1,.3,1);
  --t-fast: 180ms; --t-med: 380ms; --t-slow: 620ms;
  --pad: clamp(16px, 4vw, 40px); --max: 1240px;
  color-scheme: light;
  accent-color: var(--accent);
  scrollbar-color: color-mix(in srgb, var(--ink) 35%, transparent) transparent;
}
.desk *, .desk *::before, .desk *::after { box-sizing: border-box; }
.desk body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 400 16px/1.6 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
.desk ::selection { background: var(--accent); color: var(--accent-ink); }
.desk input, .desk textarea { caret-color: var(--accent); }
.desk a { color: inherit; text-underline-offset: .2em; }
.desk :focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
.desk img { max-width: 100%; display: block; }
.dk-skip { position: absolute; left: 12px; top: -60px; background: var(--ink); color: #fff; padding: 10px 14px; border-radius: 8px; z-index: 50; }
.dk-skip:focus { top: 12px; }
.dk-wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--pad); }

/* ─── Barra superior ─── */
.dk-top { position: absolute; inset: 0 0 auto 0; z-index: 20; color: #fff; }
.dk-top .dk-wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 76px; }
.dk-brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: #fff; }
.dk-brand img { height: 30px; width: auto; }
.desk--am .dk-brand img { height: 26px; }
.dk-brand span { font: 700 13px/1 'Inter', sans-serif; letter-spacing: .14em; }
.dk-links { display: flex; align-items: center; gap: 6px; list-style: none; margin: 0; padding: 0; }
.dk-links a { display: inline-block; padding: 8px 12px; border-radius: 999px; text-decoration: none; font-size: 14px; color: rgba(255,255,255,.82); transition: color var(--t-fast) var(--ease), background-color var(--t-fast) var(--ease); }
.dk-links a:hover { color: #fff; background: rgba(255,255,255,.08); }
.dk-links .dk-lang { border: 1px solid rgba(255,255,255,.25); font-weight: 600; font-size: 12px; letter-spacing: .08em; }
.dk-links .dk-hide-sm { display: none; }
@media (min-width: 760px) { .dk-links .dk-hide-sm { display: inline-block; } }

/* ─── Hero ─── */
.dk-hero { position: relative; overflow: hidden; background: var(--ink); color: #fff; padding: 132px 0 72px; isolation: isolate; }
.dk-hero::before { content: ""; position: absolute; inset: -20% -10% auto auto; width: 70vw; height: 70vw; max-width: 900px; max-height: 900px; border-radius: 50%; background: radial-gradient(closest-side, color-mix(in srgb, var(--accent) 34%, transparent), transparent 70%); z-index: -1; opacity: .55; transform: translate3d(0,0,0); animation: dk-drift 18s ease-in-out infinite alternate; }
.dk-hero::after { content: ""; position: absolute; inset: auto auto -30% -15%; width: 55vw; height: 55vw; max-width: 700px; max-height: 700px; border-radius: 50%; background: radial-gradient(closest-side, color-mix(in srgb, var(--alt) 40%, transparent), transparent 70%); z-index: -1; opacity: .35; }
@keyframes dk-drift { to { transform: translate3d(-6%, 8%, 0) scale(1.08); } }
.dk-hero h1 { font-family: var(--display); font-weight: var(--display-weight); letter-spacing: var(--display-track); font-size: clamp(44px, 8vw, 96px); line-height: 1; margin: 0 0 22px; }
.dk-hero p.dk-lede { font-size: clamp(17px, 2vw, 20px); line-height: 1.55; max-width: 58ch; color: rgba(255,255,255,.82); margin: 0 0 34px; }
.dk-trust { display: flex; flex-wrap: wrap; gap: 10px 22px; list-style: none; margin: 0; padding: 0; font-size: 14px; color: rgba(255,255,255,.72); }
.dk-trust li { display: inline-flex; align-items: center; gap: 8px; }
.dk-trust li::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.dk-hero .dk-stats { display: flex; gap: clamp(24px, 5vw, 64px); margin-top: 44px; padding-top: 28px; border-top: 1px solid rgba(255,255,255,.12); }
.dk-stats b { display: block; font-family: var(--display); font-weight: var(--display-weight); font-size: clamp(30px, 4vw, 44px); line-height: 1; font-variant-numeric: lining-nums tabular-nums; }
.dk-stats span { font-size: 13px; color: rgba(255,255,255,.62); }

/* ─── Filtros ─── */
.dk-filters { position: sticky; top: 0; z-index: 15; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px); border-bottom: 1px solid var(--line); }
.dk-filters .dk-wrap { overflow-x: auto; scrollbar-width: none; }
.dk-filters .dk-wrap::-webkit-scrollbar { display: none; }
.dk-chips { position: relative; display: inline-flex; gap: 4px; padding: 14px 0; }
.dk-chip { position: relative; z-index: 1; appearance: none; border: 0; background: transparent; color: var(--muted); font: 500 14px/1 'Inter', sans-serif; padding: 11px 16px; border-radius: 999px; cursor: pointer; white-space: nowrap; transition: color var(--t-med) var(--ease); }
.dk-chip:hover { color: var(--ink); }
.dk-chip[aria-pressed="true"] { color: var(--accent-ink); }
.dk-chip small { font-size: 12px; opacity: .6; margin-left: 4px; font-variant-numeric: tabular-nums; }
.dk-pill { position: absolute; z-index: 0; top: 14px; left: 0; height: calc(100% - 28px); width: 100px; border-radius: 999px; background: var(--ink); transform-origin: 0 50%; transition: transform var(--t-med) var(--ease-out), opacity var(--t-fast); }
.desk--il .dk-chip[aria-pressed="true"] { color: #fff; }

/* ─── Grid de productos ─── */
.dk-main { padding: 40px 0 96px; }
.dk-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: clamp(16px, 2.4vw, 28px); list-style: none; margin: 0; padding: 0; }
.dk-card { position: relative; }
.dk-card[hidden] { display: none; }
.dk-card__hit { position: relative; display: flex; flex-direction: column; width: 100%; height: 100%; text-align: left; font: inherit; color: inherit; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 0; cursor: pointer; overflow: hidden; transition: transform var(--t-med) var(--ease-out); }
.dk-card__hit::after { content: ""; position: absolute; inset: 0; border-radius: inherit; box-shadow: 0 24px 48px -24px rgba(16,18,29,.35), 0 8px 18px -10px rgba(16,18,29,.18); opacity: 0; transition: opacity var(--t-med) var(--ease); pointer-events: none; }
.dk-card__hit:hover { transform: translateY(-4px); }
.dk-card__hit:hover::after { opacity: 1; }
.dk-card__hit:active { transform: translateY(-1px) scale(.995); }
.dk-card__fig { margin: 0; aspect-ratio: 4 / 3; overflow: hidden; background: color-mix(in srgb, var(--ink) 8%, var(--surface)); }
.dk-card__fig img { width: 100%; height: 100%; object-fit: cover; }
.dk-card__body { display: flex; flex-direction: column; gap: 8px; padding: 20px 20px 22px; flex: 1; }
.dk-cat { font: 600 11px/1 'Inter', sans-serif; letter-spacing: .14em; text-transform: uppercase; color: var(--accent-text); }
.dk-card h3 { font-family: var(--display); font-weight: var(--display-weight); letter-spacing: var(--display-track); font-size: 23px; line-height: 1.15; margin: 4px 0 0; }
.dk-card p { margin: 0; color: var(--muted); font-size: 15px; line-height: 1.5; }
.dk-meta { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-top: auto; padding-top: 14px; border-top: 1px solid var(--line); }
.dk-price { font: 700 18px/1 'Inter', sans-serif; font-variant-numeric: tabular-nums; }
.dk-price small { display: block; font-weight: 500; font-size: 12px; color: var(--muted); margin-top: 5px; }
.dk-time { font-size: 13px; color: var(--muted); text-align: right; max-width: 55%; }
.dk-go { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: 14px; color: var(--ink); }
.dk-go svg { transition: transform var(--t-med) var(--ease-out); }
.dk-card__hit:hover .dk-go svg { transform: translateX(4px); }

/* Entrada escalonada (la pone el JS; sin JS todo queda visible) */
.js .dk-card.is-pre { opacity: 0; transform: translateY(18px); }
.js .dk-card.is-in { opacity: 1; transform: none; transition: opacity var(--t-slow) var(--ease), transform var(--t-slow) var(--ease-out); }

/* ─── Cómo se compra ─── */
.dk-how { padding: 0 0 96px; }
.dk-how h2, .dk-faq h2 { font-family: var(--display); font-weight: var(--display-weight); letter-spacing: var(--display-track); font-size: clamp(30px, 4vw, 44px); line-height: 1.1; margin: 0 0 32px; max-width: 22ch; }
.dk-steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 0; counter-reset: dk; list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.dk-steps li { counter-increment: dk; padding: 26px 24px 8px 0; }
.dk-steps li::before { content: "0" counter(dk); display: block; font: 600 13px/1 'Inter', sans-serif; letter-spacing: .1em; color: var(--accent-text); margin-bottom: 14px; }
.dk-steps b { display: block; font-size: 18px; margin-bottom: 6px; }
.dk-steps span { color: var(--muted); font-size: 15px; max-width: 34ch; display: block; }

/* ─── Preguntas ─── */
.dk-faq { padding: 0 0 110px; }
.dk-faq details { border-top: 1px solid var(--line); }
.dk-faq details:last-of-type { border-bottom: 1px solid var(--line); }
.dk-faq summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 20px 0; font-weight: 600; font-size: 17px; }
.dk-faq summary::-webkit-details-marker { display: none; }
.dk-faq summary::after { content: ""; width: 12px; height: 12px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg) translateY(-3px); transition: transform var(--t-med) var(--ease-out); flex: none; }
.dk-faq details[open] summary::after { transform: rotate(-135deg) translateY(-3px); }
.dk-faq details p { margin: 0 0 22px; color: var(--muted); max-width: 65ch; }

/* ─── Pie ─── */
.dk-foot { background: var(--ink); color: rgba(255,255,255,.72); padding: 44px 0 52px; font-size: 13.5px; line-height: 1.6; }
.dk-foot .dk-wrap { display: grid; gap: 14px; }
.dk-foot p { margin: 0; max-width: 90ch; }
.dk-foot a { color: #fff; }
.dk-foot nav { display: flex; flex-wrap: wrap; gap: 8px 20px; }

/* ─── Hoja de detalle ─── */
.dk-sheet { position: fixed; inset: 0; z-index: 60; visibility: hidden; }
.dk-sheet.is-open { visibility: visible; }
.dk-scrim { position: absolute; inset: 0; background: rgba(10,12,18,.52); opacity: 0; transition: opacity var(--t-med) var(--ease); }
.dk-sheet.is-open .dk-scrim { opacity: 1; }
.dk-panel { position: absolute; inset: auto 0 0 0; max-height: 92vh; display: flex; flex-direction: column; background: var(--bg); border-radius: 22px 22px 0 0; overflow: hidden; transform: translateY(102%); transition: transform 520ms var(--ease-out); box-shadow: 0 -20px 60px -30px rgba(0,0,0,.45); }
.dk-sheet.is-open .dk-panel { transform: none; }
@media (min-width: 900px) {
  .dk-panel { inset: 0 0 0 auto; width: min(600px, 100vw); max-height: none; border-radius: 0; transform: translateX(102%); }
}
.dk-panel__scroll { overflow-y: auto; overscroll-behavior: contain; flex: 1; }
.dk-close { position: absolute; top: 14px; right: 14px; z-index: 3; width: 42px; height: 42px; border-radius: 50%; border: 0; background: rgba(255,255,255,.92); color: var(--ink); cursor: pointer; display: grid; place-items: center; transition: transform var(--t-fast) var(--ease); }
.dk-close:hover { transform: rotate(90deg); }
.dk-grab { position: absolute; top: 8px; left: 50%; width: 40px; height: 4px; margin-left: -20px; border-radius: 4px; background: rgba(255,255,255,.7); z-index: 3; }
@media (min-width: 900px) { .dk-grab { display: none; } }
.dk-d__fig { margin: 0; aspect-ratio: 16 / 10; overflow: hidden; background: var(--ink); }
.dk-d__fig img { width: 100%; height: 100%; object-fit: cover; }
.dk-d { padding: 26px clamp(20px, 4vw, 36px) 36px; }
.dk-d h2 { font-family: var(--display); font-weight: var(--display-weight); letter-spacing: var(--display-track); font-size: clamp(30px, 4vw, 40px); line-height: 1.08; margin: 10px 0 12px; }
.dk-d .dk-hook { font-size: 18px; color: var(--muted); margin: 0 0 22px; max-width: 46ch; }
.dk-d__price { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 14px; padding: 18px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin-bottom: 26px; }
.dk-d__price b { font: 700 30px/1 'Inter', sans-serif; font-variant-numeric: lining-nums tabular-nums; }
.dk-d__price b small { font-size: 16px; font-weight: 600; color: var(--muted); }
.dk-d__price span { color: var(--muted); font-size: 14px; }
.dk-d__price em { font-style: normal; flex-basis: 100%; color: var(--muted); font-size: 14px; }
.dk-d h3 { font: 600 12px/1 'Inter', sans-serif; letter-spacing: .14em; text-transform: uppercase; color: var(--accent-text); margin: 28px 0 14px; }
.dk-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.dk-list li { position: relative; padding-left: 28px; }
.dk-list li::before { content: ""; position: absolute; left: 2px; top: .45em; width: 14px; height: 8px; border-left: 2px solid var(--accent-text); border-bottom: 2px solid var(--accent-text); transform: rotate(-45deg); }
.dk-ol { list-style: none; margin: 0; padding: 0; counter-reset: s; display: grid; gap: 12px; }
.dk-ol li { counter-increment: s; display: grid; grid-template-columns: 30px 1fr; align-items: start; }
.dk-ol li::before { content: counter(s); width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font: 600 12px/1 'Inter', sans-serif; background: var(--ink); color: #fff; }
.dk-d p.dk-small { font-size: 13.5px; color: var(--muted); margin: 26px 0 0; max-width: 60ch; }
.dk-buy { position: sticky; bottom: 0; display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 14px clamp(20px, 4vw, 36px) calc(14px + env(safe-area-inset-bottom)); background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-top: 1px solid var(--line); }
.dk-buy__p { font: 700 18px/1.1 'Inter', sans-serif; font-variant-numeric: tabular-nums; }
.dk-buy__p small { display: block; font-weight: 500; font-size: 12px; color: var(--muted); }
.dk-btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 50px; padding: 0 24px; border-radius: 999px; border: 0; background: var(--ink); color: #fff; font: 600 15px/1 'Inter', sans-serif; text-decoration: none; cursor: pointer; transition: transform var(--t-fast) var(--ease); }
.dk-btn:hover { transform: translateY(-2px); }
.dk-btn:active { transform: translateY(0) scale(.98); }
.dk-btn--accent { background: var(--accent); color: var(--accent-ink); }
.dk-btn--ghost { background: transparent; color: var(--ink); border: 1px solid var(--line); }
.dk-actions { display: flex; flex-wrap: wrap; gap: 10px; }
html.dk-lock, html.dk-lock body { overflow: hidden; }

/* ─── Gracias ─── */
.dk-thanks { min-height: 100vh; display: grid; place-items: center; padding: 120px var(--pad) 80px; background: var(--ink); color: #fff; text-align: center; }
.dk-thanks .dk-check { width: 84px; height: 84px; margin: 0 auto 28px; }
.dk-thanks .dk-check circle { fill: none; stroke: var(--accent); stroke-width: 3; stroke-dasharray: 260; stroke-dashoffset: 260; animation: dk-draw 900ms var(--ease-out) forwards; }
.dk-thanks .dk-check path { fill: none; stroke: #fff; stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 60; stroke-dashoffset: 60; animation: dk-draw 600ms 500ms var(--ease-out) forwards; }
@keyframes dk-draw { to { stroke-dashoffset: 0; } }
.dk-thanks h1 { font-family: var(--display); font-weight: var(--display-weight); font-size: clamp(36px, 6vw, 64px); line-height: 1.05; margin: 0 0 16px; }
.dk-thanks p { color: rgba(255,255,255,.78); max-width: 52ch; margin: 0 auto 14px; font-size: 18px; }
.dk-thanks .dk-actions { justify-content: center; margin-top: 30px; }
.dk-thanks .dk-btn--ghost { color: #fff; border-color: rgba(255,255,255,.3); }
.dk-thanks [data-lang][hidden] { display: none; }

/* Movimiento reducido: se acorta, no se apaga (doctrina de la casa) */
@media (prefers-reduced-motion: reduce) {
  .desk { --t-fast: 90ms; --t-med: 160ms; --t-slow: 220ms; }
  .dk-hero::before { animation: none; }
  .dk-panel { transition-duration: 220ms; }
  .js .dk-card.is-pre { transform: translateY(6px); }
}
.dk-buybar-inner { display: contents; }
