/* =====================================================================================================
   Descripción con bloques (plugin Misc.VivriProductContent) — el MISMO CSS en la ficha de la tienda y en
   el lienzo del admin. Todo cuelga de #vpc para ganarle al tema (custom.styles / modern-refresh pintan
   .full-description: color morado !important, márgenes de 5 %, viñetas y márgenes de <p> en móvil).
   Colores: cada bloque recibe --c-bg y --c-<pieza> (num, numbg, icon, iconbg, title, text, accent, card,
   btnbg, btntx, overlay, line) en su style. Sin pieza = automático (--d-*), que cambia solo con .vpc-dark.
   El acomodo responde al ancho del bloque (container query), así el celular del admin se ve igual que un
   celular de verdad.
   ===================================================================================================== */

.full-description:has(> #vpc) { margin-left: 0 !important; margin-right: 0 !important; }

#vpc {
    container: vpc / inline-size;
    font-family: var(--mr-font, 'Poppins', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif);
    font-size: 15px;
    line-height: 1.6;
    color: #241a3d;
    text-align: left;
}
#vpc, #vpc * { box-sizing: border-box; }
/* el tema le pone espaciado entre letras a b, p, span…: dentro de los bloques manda el de cada pieza */
#vpc { letter-spacing: normal; }
#vpc * { letter-spacing: inherit; }
#vpc h2, #vpc h3, #vpc p, #vpc figure, #vpc blockquote, #vpc ol, #vpc table { margin: 0; }
#vpc img { max-width: 100%; border-radius: 0; }
#vpc .vpc-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* --- bloque --- */
#vpc .vpc-b {
    --d-title: #3b237b; --d-text: #6b6380; --d-ink: #241a3d; --d-accent: #e0338f; --d-card: #ffffff; --d-soft: #f4f0fb; --d-line: #e6e0f3;
    padding: 44px 40px;
    background: var(--c-bg, #fff);
    color: var(--c-text, var(--d-ink));
}
#vpc .vpc-b.vpc-dark { --d-title: #ffffff; --d-text: rgba(255, 255, 255, .84); --d-ink: #ffffff; --d-card: rgba(255, 255, 255, .1); --d-soft: rgba(255, 255, 255, .14); --d-line: rgba(255, 255, 255, .3); }
#vpc .vpc-in { max-width: 860px; margin-inline: auto; }
#vpc .vpc-w-full { padding-inline: 0; }
#vpc .vpc-w-full .vpc-in { max-width: none; }
#vpc .vpc-pad-none { padding-block: 0; }
#vpc .vpc-pad-s { padding-block: 24px; }
#vpc .vpc-pad-l { padding-block: 72px; }
#vpc .vpc-al-center { text-align: center; }
#vpc .vpc-h { font-size: 26px; font-weight: 700; line-height: 1.2; color: var(--c-title, var(--d-title)); margin: 0 0 22px; letter-spacing: -.01em; text-wrap: balance; }
#vpc .vpc-p { color: var(--c-text, var(--d-text)); margin: 0; }
/* una palabra o una URL larguísima no saca el bloque del teléfono */
#vpc .vpc-h, #vpc .vpc-p, #vpc .vpc-it__t, #vpc .vpc-hero__t, #vpc .vpc-hero__p, #vpc .vpc-stat__l, #vpc .vpc-card__n, #vpc .vpc-step__t, #vpc .vpc-bn__t, #vpc .vpc-quote__t, #vpc .vpc-fq__q, #vpc .vpc-fq__a, #vpc .vpc-ba__cap, #vpc .vpc-nut__hd b { overflow-wrap: anywhere; }

/* --- portada --- */
#vpc .vpc-hero { position: relative; }
#vpc .vpc-hero img { width: 100%; display: block; height: auto; }
#vpc .vpc-hero.is-over img { aspect-ratio: 16 / 7; object-fit: cover; }
#vpc .vpc-hero.is-over::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, color-mix(in srgb, var(--c-overlay, #241252) 80%, transparent), transparent 65%); pointer-events: none; }
#vpc .vpc-hero__cap { position: absolute; z-index: 1; left: 6%; top: 50%; transform: translateY(-50%); max-width: 46%; display: grid; gap: 8px; text-align: left; }
#vpc .vpc-hero__t { font-size: clamp(22px, 4.2cqi, 40px); font-weight: 800; line-height: 1.05; color: var(--c-title, #fff); }
#vpc .vpc-hero__p { font-size: 15px; color: var(--c-text, rgba(255, 255, 255, .92)); }

/* --- imagen + texto --- */
#vpc .vpc-it { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 36px; align-items: center; }
#vpc .vpc-it.is-r .vpc-it__img { order: 2; }
#vpc .vpc-it.no-img { grid-template-columns: minmax(0, 1fr); }
#vpc .vpc-it__img img { width: 100%; border-radius: 18px; display: block; aspect-ratio: 1; object-fit: cover; }
#vpc .vpc-it__copy { display: grid; gap: 10px; justify-items: start; min-width: 0; }
#vpc .vpc-al-center .vpc-it__copy { justify-items: center; }
#vpc .vpc-dark .vpc-eye { color: var(--c-accent, #ff9ccd); }
#vpc .vpc-eye { font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--c-accent, var(--d-accent)); }
#vpc .vpc-it__t { font-size: 28px; line-height: 1.15; font-weight: 700; color: var(--c-title, var(--d-title)); letter-spacing: -.01em; }

/* --- botones --- */
#vpc .vpc-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 46px; gap: 8px; border-radius: 999px; padding: 12px 26px; font-weight: 600; text-decoration: none; font-size: 15px; line-height: 1.3; border: 0; }
#vpc .vpc-btn:hover { text-decoration: none; filter: brightness(1.08); }
#vpc .vpc-btn--vv { background: var(--c-btnbg, #3b237b); color: var(--c-btntx, #fff); }
#vpc .vpc-btn--pink { background: var(--c-btnbg, #cc2a7e); color: var(--c-btntx, #fff); }
#vpc .vpc-btn--line { border: 2px solid currentColor; color: var(--c-btnbg, var(--d-title)); background: transparent; padding: 9px 20px; }
#vpc .vpc-dark .vpc-btn--vv { background: var(--c-btnbg, #fff); color: var(--c-btntx, #3b237b); }
#vpc .vpc-cta { display: flex; justify-content: center; }
#vpc .vpc-al-left .vpc-cta { justify-content: flex-start; }

/* --- cifras --- */
#vpc .vpc-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 18px; }
#vpc .vpc-stat { display: grid; gap: 4px; align-content: start; }
#vpc .has-numbg .vpc-stat { background: var(--c-numbg); border-radius: 18px; padding: 20px 14px; }
#vpc .vpc-stat__n { font-size: 46px; line-height: 1; font-weight: 800; color: var(--c-num, var(--d-title)); font-variant-numeric: tabular-nums; }
#vpc .vpc-stat__l { font-size: 14px; color: var(--c-text, var(--d-text)); font-weight: 500; }

/* --- qué incluye --- */
#vpc .vpc-inc { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 16px; }
#vpc .vpc-card { display: grid; gap: 6px; align-content: start; text-align: left; text-decoration: none; color: inherit; }
#vpc .has-card .vpc-card { background: var(--c-card); border-radius: 18px; padding: 10px 10px 14px; }
#vpc .vpc-card__img { position: relative; display: block; border-radius: 16px; overflow: hidden; background: var(--d-soft); aspect-ratio: 1; }
#vpc .vpc-card__img img { width: 100%; height: 100%; display: block; object-fit: cover; }
#vpc .vpc-q { position: absolute; right: 10px; top: 10px; background: #fff; color: #3b237b; font-weight: 700; font-size: 13px; padding: 3px 9px; border-radius: 999px; box-shadow: 0 2px 6px rgba(0, 0, 0, .15); }
#vpc .vpc-card__n { font-size: 16px; color: var(--c-title, var(--d-title)); }
#vpc a.vpc-card:hover .vpc-card__n { text-decoration: underline; }
#vpc .vpc-card.is-empty .vpc-card__n { color: var(--d-text); font-weight: 500; font-style: italic; }

/* --- pasos --- */
#vpc .vpc-steps { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 18px; text-align: left; }
#vpc .vpc-steps .vpc-step { display: grid; grid-template-columns: auto 1fr; gap: 12px; align-items: start; background: var(--c-card, var(--d-card)); border: 1px solid var(--d-line); border-radius: 16px; padding: 18px; margin: 0; list-style: none; }
#vpc .vpc-n { width: 36px; height: 36px; border-radius: 50%; background: var(--c-accent, var(--d-accent)); color: #fff; display: grid; place-items: center; font-weight: 700; }
#vpc .vpc-step__t { display: block; color: var(--c-title, var(--d-title)); font-size: 16px; margin-bottom: 2px; }
#vpc .vpc-step .vpc-p { font-size: 14px; }

/* --- beneficios --- */
#vpc .vpc-ben { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 24px; }
#vpc .vpc-bn { display: grid; gap: 6px; justify-items: start; align-content: start; }
#vpc .vpc-al-center .vpc-bn { justify-items: center; }
#vpc .vpc-bi { width: 52px; height: 52px; border-radius: 16px; background: var(--c-iconbg, var(--d-soft)); color: var(--c-icon, var(--d-title)); display: grid; place-items: center; }
#vpc .vpc-bi svg { width: 24px; height: 24px; }
#vpc .vpc-bn__t { font-size: 16px; color: var(--c-title, var(--d-title)); }
#vpc .vpc-bn .vpc-p { font-size: 14px; }

/* --- testimonio --- */
#vpc .vpc-quote { display: grid; gap: 14px; justify-items: center; text-align: center; }
#vpc .vpc-al-left .vpc-quote { justify-items: start; text-align: left; }
#vpc .vpc-quote__m { width: 40px; height: 40px; color: var(--c-accent, var(--d-accent)); }
#vpc .vpc-quote__t { font-size: 24px; line-height: 1.4; font-weight: 600; max-width: 30ch; text-wrap: balance; color: var(--c-text, var(--d-ink)); border: 0; padding: 0; }
#vpc .vpc-quote__c { font-size: 14px; color: var(--c-text, var(--d-text)); }

/* --- tabla nutrimental --- */
#vpc .vpc-nut { --n-line: var(--c-line, #241a3d); max-width: 560px; border: 2px solid var(--n-line); border-radius: 14px; padding: 18px 20px; background: var(--c-card, #fff); color: var(--c-text, #241a3d); text-align: left; }
#vpc .vpc-al-center .vpc-nut { margin-inline: auto; }
#vpc .vpc-nut__hd { display: grid; gap: 2px; padding-bottom: 10px; border-bottom: 8px solid var(--n-line); }
#vpc .vpc-nut__hd b { font-size: 22px; font-weight: 800; line-height: 1.15; color: var(--n-line); }
#vpc .vpc-nut__hd span { font-size: 13.5px; opacity: .75; }
#vpc .vpc-nut__tb { width: 100%; border-collapse: collapse; font-size: 14px; font-variant-numeric: tabular-nums; background: transparent; }
#vpc .vpc-nut__tb th, #vpc .vpc-nut__tb td { color: inherit; background: transparent; }
#vpc .vpc-nut__tb thead th { font-size: 12px; font-weight: 700; text-align: right; padding: 8px 0 6px 10px; border: 0; border-bottom: 2px solid var(--n-line); white-space: nowrap; }
#vpc .vpc-nut__tb thead th:first-child { text-align: left; padding-left: 0; }
#vpc .vpc-nut__tb tbody th { text-align: left; font-weight: 600; padding: 7px 0; border: 0; border-bottom: 1px solid color-mix(in srgb, var(--n-line) 18%, transparent); }
#vpc .vpc-nut__tb tbody td { text-align: right; padding: 7px 0 7px 10px; border: 0; border-bottom: 1px solid color-mix(in srgb, var(--n-line) 18%, transparent); white-space: nowrap; }
#vpc .vpc-nut__tb tr.is-sub th { padding-left: 18px; font-weight: 400; }
#vpc .vpc-nut__ft { margin-top: 10px; font-size: 12px; opacity: .75; }

/* --- antes y después --- */
#vpc .vpc-ba { position: relative; max-width: 620px; margin-inline: auto; aspect-ratio: 1; border-radius: 18px; overflow: hidden; --p: 50%; user-select: none; }
#vpc .vpc-ba img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
#vpc .vpc-ba__b { position: absolute; inset: 0; clip-path: inset(0 0 0 var(--p)); }
#vpc .vpc-ba__h { position: absolute; top: 0; bottom: 0; left: var(--p); width: 3px; margin-left: -1.5px; background: #fff; box-shadow: 0 0 8px rgba(0, 0, 0, .3); pointer-events: none; }
#vpc .vpc-ba__h::after { content: "‹›"; position: absolute; left: 50%; top: 50%; width: 46px; height: 46px; margin: -23px 0 0 -23px; border-radius: 50%; background: #fff; color: #3b237b; display: grid; place-items: center; font: 700 24px/1 system-ui, -apple-system, 'Segoe UI', sans-serif; letter-spacing: 0; box-shadow: 0 6px 18px rgba(0, 0, 0, .25); }
#vpc .vpc-ba input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: ew-resize; }
#vpc .vpc-ba input:focus-visible + * , #vpc .vpc-ba:focus-within .vpc-ba__h::after { outline: 3px solid #e0338f; outline-offset: 2px; }
#vpc .vpc-ba__l { position: absolute; top: 14px; z-index: 1; background: var(--c-accent, rgba(36, 26, 61, .78)); color: #fff; font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; padding: 5px 10px; border-radius: 999px; pointer-events: none; }
#vpc .vpc-ba__l.l { left: 14px; }
#vpc .vpc-ba__l.r { right: 14px; }
#vpc .vpc-ba2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; max-width: 720px; margin-inline: auto; }
#vpc .vpc-ba2 figure { position: relative; border-radius: 18px; overflow: hidden; }
#vpc .vpc-ba2 img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; display: block; }
#vpc .vpc-ba__cap { margin: 14px auto 0; max-width: 62ch; font-size: 13px; color: var(--c-text, var(--d-text)); text-align: center; }

/* --- preguntas --- */
#vpc .vpc-faq { display: grid; gap: 10px; text-align: left; }
#vpc .vpc-fq { border: 1px solid var(--d-line); border-radius: 14px; background: var(--c-card, var(--d-card)); padding: 0 18px; }
#vpc .vpc-fq__q { list-style: none; display: flex; justify-content: space-between; gap: 12px; align-items: center; padding: 15px 0; font-weight: 600; color: var(--c-title, var(--d-title)); cursor: pointer; }
#vpc .vpc-fq__q::-webkit-details-marker { display: none; }
#vpc .vpc-plus { width: 22px; height: 22px; flex: none; position: relative; }
#vpc .vpc-plus::before, #vpc .vpc-plus::after { content: ""; position: absolute; left: 4px; right: 4px; top: 10px; height: 2px; background: var(--c-accent, var(--d-accent)); border-radius: 2px; transition: transform .2s; }
#vpc .vpc-plus::after { transform: rotate(90deg); }
#vpc .vpc-fq[open] .vpc-plus::after { transform: rotate(0); }
#vpc .vpc-fq__a { padding: 0 0 16px; color: var(--c-text, var(--d-text)); font-size: 14.5px; }

/* --- video --- */
#vpc .vpc-vid { position: relative; display: block; width: 100%; padding: 0; border: 0; border-radius: 18px; overflow: hidden; cursor: pointer; background: #000; }
#vpc .vpc-vid img { width: 100%; display: block; aspect-ratio: 16 / 9; object-fit: cover; opacity: .85; }
#vpc .vpc-play { position: absolute; left: 50%; top: 50%; width: 72px; height: 72px; margin: -36px 0 0 -36px; border-radius: 50%; background: #fff; color: var(--c-accent, var(--d-accent)); display: grid; place-items: center; box-shadow: 0 10px 30px rgba(0, 0, 0, .3); transition: transform .15s; }
#vpc .vpc-vid:hover .vpc-play { transform: scale(1.06); }
#vpc .vpc-play svg { width: 28px; height: 28px; margin-left: 4px; }
#vpc .vpc-vid__f { width: 100%; aspect-ratio: 16 / 9; border: 0; border-radius: 18px; display: block; }
#vpc .vpc-vid__t { margin-top: 12px; font-weight: 600; color: var(--c-title, var(--d-title)); }

/* --- espacio --- */
#vpc .vpc-sp { display: grid; align-items: center; }
#vpc .vpc-sp--s { height: 8px; }
#vpc .vpc-sp--m { height: 24px; }
#vpc .vpc-sp--l { height: 56px; }
#vpc .vpc-sp hr { width: 100%; border: 0; border-top: 1px solid var(--c-accent, var(--d-line)); margin: 0; }

/* --- HTML clásico: lo de siempre, con aire --- */
#vpc .vpc-classic img { max-width: 100%; height: auto; border-radius: 12px; }
#vpc .vpc-classic p { margin: 0 0 10px; }

/* --- avisos del editor (sólo salen en el admin) --- */
#vpc .vpc-ph { border: 2px dashed #cfc3ea; border-radius: 12px; padding: 26px 18px; text-align: center; color: #6b6380; font-size: 14px; background: rgba(244, 240, 251, .6); }
#vpc .vpc-fb { outline: 2px dotted #f0c24b; outline-offset: 2px; border-radius: 2px; }

/* --- celular: el ancho del bloque manda (también en el celular del admin) --- */
@container vpc (max-width: 600px) {
    #vpc .vpc-b { padding: 30px 18px; }
    #vpc .vpc-w-full { padding-inline: 0; }
    /* sin fondo propio: el texto empieza donde el título del producto (los de color siguen como tarjeta) */
    #vpc .vpc-plain { padding-inline: 0; }
    #vpc .vpc-pad-none { padding-block: 0; }
    #vpc .vpc-pad-s { padding-block: 16px; }
    #vpc .vpc-pad-l { padding-block: 44px; }
    #vpc .vpc-h { font-size: 21px; margin-bottom: 16px; }
    #vpc .vpc-it { grid-template-columns: 1fr; gap: 18px; }
    #vpc .vpc-it.is-r .vpc-it__img { order: 0; }
    #vpc .vpc-it__t { font-size: 22px; }
    #vpc .vpc-stats { grid-template-columns: 1fr 1fr; gap: 12px; }
    #vpc .vpc-stat__n { font-size: 36px; }
    #vpc .vpc-inc { grid-template-columns: 1fr 1fr; gap: 12px; }
    #vpc .vpc-steps { grid-template-columns: 1fr; }
    #vpc .vpc-ben { grid-template-columns: 1fr 1fr; gap: 18px 12px; }
    #vpc .vpc-quote__t { font-size: 19px; }
    #vpc .vpc-card__n { font-size: 14px; line-height: 1.3; }
    #vpc .vpc-nut__hd b { font-size: 18px; }
    #vpc .vpc-stat__l { font-size: 13px; }
    #vpc .vpc-nut { padding: 14px; }
    #vpc .vpc-nut__tb { font-size: 13px; table-layout: fixed; }
    /* valores largos ("380 kcal (1590 kJ)") parten en dos renglones en vez de salirse de la tarjeta */
    #vpc .vpc-nut__tb thead th, #vpc .vpc-nut__tb tbody td { white-space: normal; overflow-wrap: anywhere; }
    #vpc .vpc-nut__tb thead th:first-child { width: 36%; }
    /* el último de una cantidad impar no queda solo a la izquierda */
    #vpc .vpc-al-center .vpc-ben > .vpc-bn:last-child:nth-child(odd),
    #vpc .vpc-al-center .vpc-stats > .vpc-stat:last-child:nth-child(odd) { grid-column: 1 / -1; }
    #vpc .vpc-inc > .vpc-card:last-child:nth-child(odd) { grid-column: 1 / -1; justify-self: center; width: calc(50% - 6px); }
    #vpc .vpc-ba2 { gap: 8px; }
    #vpc .vpc-hero.is-over img { aspect-ratio: 4 / 5; }
    #vpc .vpc-hero.is-over::after { background: linear-gradient(0deg, color-mix(in srgb, var(--c-overlay, #241252) 85%, transparent), transparent 70%); }
    #vpc .vpc-hero__cap { top: auto; bottom: 16px; transform: none; max-width: 88%; }
    #vpc .vpc-hero__p { font-size: 13px; }
    #vpc .vpc-hide-m { display: none; }
}
@container vpc (min-width: 601px) {
    #vpc .vpc-hide-d { display: none; }
}

@media (prefers-reduced-motion: reduce) {
    #vpc *, #vpc *::before, #vpc *::after { transition: none !important; }
}
