/* Caso Casa Ocho (prefijo cco-). Se carga después de caso.css. */

/* Cabecera y selector compartidos de las mini interfaces */
.cco-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.cco-head b { font-weight: 600; }
.cco-seg { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; margin-top: 12px; padding: 4px; border-radius: 999px; background: var(--ui-line); }
.cco-seg span { display: flex; align-items: center; justify-content: center; gap: 7px; padding: 7px 6px; border-radius: 999px; font-weight: 500; color: var(--ui-soft); transition: background-color .3s ease, color .3s ease; }
.cco-seg span.is-on { background: var(--navy); color: #ffffff; font-weight: 600; }
.cco-seg svg { width: 16px; height: 16px; }

/* Cifras del proyecto */
.cco-proof .stat.t-navy { background: var(--navy); color: #f2f5f8; }
.cco-proof .stat.t-navy strong { color: var(--lime); }
.cco-proof .stat.t-navy .stat-l { color: #c8d1dc; }
.cco-cats { display: flex; flex-wrap: wrap; align-content: center; gap: 8px; margin: 0; padding: 0; list-style: none; }
.cco-cats li { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px 8px 9px; border-radius: 999px; background: rgba(255, 255, 255, .09); color: #f2f5f8; font-size: .9375rem; font-weight: 500; line-height: 1.2; }
.cco-cats svg { flex: none; width: 26px; height: 26px; padding: 5px; border-radius: 50%; background: var(--lime); color: var(--on-lime); }

/* El desafío: cada paso de la compra contado una sola vez */
.cco-dedupe { width: min(100%, 460px); padding: 20px 22px; font-size: 1rem; }
.cco-ev { display: grid; gap: 6px; margin: 12px 0 0; padding: 0; list-style: none; }
.cco-ev li { display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 8px 12px 8px 8px; border-radius: 12px; background: var(--ui-line); }
.cco-ev b { display: block; font-weight: 600; line-height: 1.2; }
.cco-ev small { display: block; font-size: .8125rem; color: var(--ui-soft); font-family: ui-monospace, SFMono-Regular, Consolas, monospace; }
.cco-ev-ico { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; background: var(--ui-bg); }
.cco-ev-ico svg { width: 18px; height: 18px; }
.cco-dup, .cco-one { grid-column: 3; grid-row: 1; display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: 999px; font-size: .875rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.cco-dup { background: #fde2df; color: #a02a22; }
.cco-one { background: var(--lime); color: var(--on-lime); }
.cco-one svg { width: 14px; height: 14px; }
.cco-dup { visibility: hidden; }
.cco-dedupe.is-old .cco-dup { visibility: visible; }
.cco-dedupe.is-old .cco-one:not(.is-fix) { visibility: hidden; }
.cco-dedupe.is-old .cco-foot { visibility: hidden; }
.cco-foot { display: flex; align-items: center; gap: 8px; margin-top: 12px; font-weight: 600; color: #11703a; }
.cco-foot svg { width: 20px; height: 20px; }

/* Qué hicimos */
.cco-flow .order svg { color: var(--brand); }
.cco-funnel { width: min(100%, 420px); padding: 16px 18px; font-size: .9375rem; }
.cco-funnel ol { display: grid; gap: 7px; margin: 14px 0 0; padding: 0; list-style: none; }
.cco-funnel li { display: grid; grid-template-columns: 26px minmax(0, 1fr); align-items: center; gap: 10px; }
.cco-fn-n { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--navy); color: var(--lime); font-size: .8125rem; font-weight: 600; }
.cco-fn-bar { display: flex; align-items: center; width: var(--w); min-width: 150px; height: 34px; padding: 0 12px; border-radius: 9px; background: var(--lime); color: var(--on-lime); font-weight: 600; white-space: nowrap; transform-origin: left center; }
.cco-fn-foot { display: flex; align-items: center; gap: 8px; margin-top: 12px; font-size: .875rem; color: var(--ui-soft); }
.cco-fn-foot svg { width: 17px; height: 17px; }

.cco-groups { width: min(100%, 400px); padding: 16px 18px; font-size: .9375rem; }
.cco-live { display: inline-flex; align-items: center; gap: 6px; padding: 2px 10px; border-radius: 999px; background: #dcf3e5; color: #11703a; font-size: .8125rem; font-weight: 600; }
.cco-dot { width: 8px; height: 8px; border-radius: 50%; background: #178a45; }
.cco-groups ul { display: grid; gap: 6px; margin: 12px 0 0; padding: 0; list-style: none; }
.cco-groups li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 10px 8px 14px; border-radius: 10px; background: var(--ui-line); font-weight: 500; }
.cco-sw { position: relative; flex: none; width: 38px; height: 22px; border-radius: 999px; background: #b9c2cd; transition: background-color .3s ease; }
.cco-sw::after { content: ''; position: absolute; left: 3px; top: 3px; width: 16px; height: 16px; border-radius: 50%; background: #ffffff; transition: translate .3s var(--ease-out); }
.cco-sw.is-on, .cco-groups .cco-sw { background: #178a45; }
.cco-sw.is-on::after, .cco-groups .cco-sw::after { translate: 16px 0; }
.cco-groups .cco-sw.is-off { background: #b9c2cd; }
.cco-groups .cco-sw.is-off::after { translate: 0 0; }
.cco-groups-foot { display: flex; align-items: center; gap: 10px; margin-top: 10px; padding: 9px 10px 9px 12px; border-radius: 10px; background: var(--navy); color: #f2f5f8; }
.cco-groups-foot svg { flex: none; width: 20px; height: 20px; color: var(--lime); }
.cco-groups-foot span:not(.cco-sw) { flex: 1; font-size: .8125rem; line-height: 1.2; color: #c8d1dc; }
.cco-groups-foot b { display: block; font-size: .9375rem; color: #ffffff; }

/* Checkout pensado para Chile */
.cco-doc { width: min(100%, 440px); padding: 16px 18px; font-size: .9375rem; }
.cco-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-top: 10px; }
.cco-field { display: grid; gap: 1px; padding: 7px 11px; border-radius: 10px; box-shadow: inset 0 0 0 1.5px var(--ui-line); font-weight: 500; line-height: 1.25; }
.cco-field small { font-size: .8125rem; color: var(--ui-soft); font-weight: 400; }
.cco-doc:not(.is-f) .cco-fields, .cco-doc:not(.is-f) .cco-saved { visibility: hidden; }
.cco-saved { display: flex; align-items: center; gap: 8px; margin-top: 10px; font-weight: 600; color: #11703a; }
.cco-saved svg { width: 19px; height: 19px; }

.cco-addr { position: relative; width: min(100%, 400px); padding: 16px 18px; font-size: .9375rem; }
.cco-sel { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; column-gap: 8px; margin-top: 10px; padding: 7px 12px; border-radius: 10px; box-shadow: inset 0 0 0 1.5px var(--ui-line); }
.cco-sel small { grid-column: 1 / -1; font-size: .8125rem; color: var(--ui-soft); }
.cco-sel-v { font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cco-sel svg { width: 16px; height: 16px; color: var(--ui-soft); }
.cco-sel.is-on { box-shadow: inset 0 0 0 2px var(--navy); }
.cco-dd { position: relative; }
.cco-opts { position: absolute; z-index: 2; left: 0; right: 0; top: calc(100% + 4px); display: grid; gap: 2px; margin: 0; padding: 4px; border-radius: 10px; background: var(--ui-bg); box-shadow: 0 0 0 1.5px var(--ui-line), 0 14px 30px rgba(20, 30, 50, .16); list-style: none; visibility: hidden; opacity: 0; }
.cco-opts li { padding: 5px 10px; border-radius: 7px; font-size: .875rem; color: var(--ui-soft); }
.cco-opts li.is-pick { background: var(--navy); color: #ffffff; font-weight: 600; }
.cco-ship-row { display: flex; align-items: center; gap: 8px; margin-top: 10px; padding: 8px 12px; border-radius: 10px; background: var(--lime); color: var(--on-lime); font-weight: 600; font-size: .875rem; }
.cco-ship-row svg { flex: none; width: 18px; height: 18px; }

.cco-size { width: min(100%, 400px); padding: 16px 18px; font-size: .9375rem; }
.cco-boxes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: end; gap: 6px; margin-top: 12px; }
.cco-box { display: grid; justify-items: center; gap: 4px; padding: 10px 4px 9px; border-radius: 12px; background: var(--ui-line); font-size: .8125rem; font-weight: 600; color: var(--ui-soft); transition: background-color .3s ease, color .3s ease; }
.cco-box svg { color: var(--ui-ink); }
.cco-box.is-s svg { width: 20px; height: 20px; }
.cco-box.is-m svg { width: 28px; height: 28px; }
.cco-box.is-l svg { width: 36px; height: 36px; }
.cco-box.is-on { background: var(--navy); color: #ffffff; }
.cco-box.is-on svg { color: var(--lime); }
.cco-sync { display: grid; gap: 4px; margin-top: 10px; }
.cco-sync p { display: grid; grid-template-columns: 18px minmax(0, 1fr) auto; align-items: center; gap: 8px; padding: 6px 10px; border-radius: 9px; background: var(--ui-line); font-size: .875rem; }
.cco-sync svg { width: 16px; height: 16px; color: var(--ui-soft); }
.cco-sync b { font-weight: 600; }
.cco-same { display: flex; align-items: center; gap: 8px; margin-top: 8px; font-size: .875rem; font-weight: 600; color: #11703a; }
.cco-same svg { width: 18px; height: 18px; }

.cco-cart-tile .tile-art { margin-top: 0; }
.cco-cart { width: 100%; padding: 0 6px 6px; border-radius: 14px; box-shadow: 0 20px 48px rgba(0, 0, 0, .28); }
.cco-cart-shot { position: relative; border-radius: 4px; overflow: hidden; background: #ffffff; }
.cco-cart .cco-cart-shot img { display: block; width: 100%; aspect-ratio: 1200 / 571; object-fit: cover; border-radius: 0; }
.cco-hl { position: absolute; left: 67.4%; top: 5.2%; width: 30.2%; height: 92.4%; border-radius: 10px; box-shadow: 0 0 0 3px var(--lime), 0 0 0 9999px rgba(16, 23, 34, .16); }
.cco-hl-tag { position: absolute; right: 8px; top: -13px; padding: 2px 10px; border-radius: 999px; background: var(--lime); color: var(--on-lime); font-size: .8125rem; font-weight: 600; white-space: nowrap; }

/* Capturas reales */
.cco-shots { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); grid-template-rows: auto 1fr; gap: var(--gap); align-items: start; }
.cco-shot { display: grid; gap: 12px; margin: 0; }
.cco-shot-co { grid-row: span 2; }
.cco-win { width: 100%; padding: 0 6px 6px; border-radius: 14px; box-shadow: 0 24px 60px rgba(0, 0, 0, .35); outline: 1px solid rgba(255, 255, 255, .08); }
.cco-win.mini-web img { aspect-ratio: 1200 / 660; }
.cco-pan { overflow: hidden; border-radius: 4px; aspect-ratio: 1200 / 820; background: #ffffff; }
.cco-win .cco-pan img { aspect-ratio: auto; height: auto; object-fit: initial; border-radius: 0; }
.cco-shot figcaption { display: flex; align-items: flex-start; gap: 10px; color: #c8d1dc; font-size: var(--t-small); line-height: 1.35; }
.cco-shot figcaption svg { flex: none; width: 20px; height: 20px; margin-top: 1px; color: var(--lime); }
.cco-pay { position: relative; align-self: stretch; display: flex; flex-direction: column; justify-content: flex-end; min-height: 170px; padding: 20px 22px; overflow: hidden; font-size: 1rem; }
.cco-pay-3d { width: clamp(72px, 6.6vw, 104px); right: 14px; top: 10px; }
.cco-pay-k { font-size: .875rem; font-weight: 600; color: var(--ui-soft); }
.cco-pay ul { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 0; padding: 0; list-style: none; }
.cco-pay li { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px 8px 9px; border-radius: 999px; background: var(--ui-line); font-weight: 600; }
.cco-pay li svg { width: 26px; height: 26px; padding: 5px; border-radius: 50%; background: var(--lime); color: var(--on-lime); }

/* Banners autogestionables */
.cco-ban.split { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.cco-ban-list { margin-top: 14px; }
.cco-ban-art { position: relative; display: flex; align-items: center; justify-content: center; min-height: 0; margin-top: 0; padding: 10px 0; }
.cco-panel { position: relative; z-index: 1; flex: 1 1 auto; max-width: 360px; padding: 16px 18px; font-size: .9375rem; }
.cco-panel ul { display: grid; gap: 6px; margin: 12px 0 0; padding: 0; list-style: none; }
.cco-panel li { display: grid; grid-template-columns: 34px minmax(0, 1fr) 20px; grid-template-rows: auto auto; align-items: center; column-gap: 10px; padding: 8px 10px 8px 8px; border-radius: 12px; background: var(--ui-line); }
.cco-pn-ico { grid-row: span 2; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: var(--ui-bg); }
.cco-pn-ico svg { width: 17px; height: 17px; }
.cco-panel li b { display: block; font-weight: 600; line-height: 1.2; }
.cco-panel li small { display: block; font-size: .8125rem; color: var(--ui-soft); }
.cco-up { grid-column: 2 / 4; grid-row: 2; height: 4px; margin-top: 6px; border-radius: 4px; background: var(--ui-bg); overflow: hidden; }
.cco-up span { display: block; width: 100%; height: 100%; border-radius: 4px; background: var(--lime); transform-origin: left center; }
.cco-ok { grid-column: 3; grid-row: 1; width: 20px; height: 20px; color: #178a45; }
.cco-auto { display: flex; align-items: center; gap: 8px; margin-top: 10px; font-weight: 600; }
.cco-auto svg { width: 18px; height: 18px; color: var(--ui-soft); }
.cco-auto span:not(.cco-sw) { flex: 1; }
.cco-phone { position: relative; z-index: 2; flex: none; width: clamp(150px, 14vw, 190px); aspect-ratio: 390 / 844; margin-left: clamp(12px, 1.6vw, 24px); padding: 6px; border-radius: 28px; background: #0d1219; box-shadow: 0 26px 60px rgba(20, 30, 50, .3); }
.cco-phone img { width: 100%; height: 100%; object-fit: cover; object-position: top; border-radius: 22px; }
.cco-dots { position: absolute; left: 0; right: 0; top: 52%; display: flex; justify-content: center; gap: 5px; }
.cco-dots b { width: 7px; height: 7px; border-radius: 50%; background: rgba(29, 42, 61, .35); transition: background-color .3s ease, width .3s ease; }
.cco-dots b.is-on { width: 18px; border-radius: 4px; background: var(--navy); }

/* El desafío: más ancho para el titular */
.cs-challenge.split { grid-template-columns: 7fr 5fr; }

/* Modo oscuro */
html.dark .t-white .cco-seg span.is-on, html.dark .t-white .cco-opts li.is-pick { background: var(--lime); color: var(--on-lime); }
html.dark .t-white .cco-sel.is-on { box-shadow: inset 0 0 0 2px var(--lime); }
html.dark .t-white .cco-foot, html.dark .t-white .cco-saved, html.dark .t-white .cco-ok { color: #7fe3ae; }
html.dark .t-white .cco-dup { background: rgba(255, 138, 128, .16); color: #ff8a80; }
html.dark .t-white .cco-box.is-on { background: var(--lime); color: var(--on-lime); }
html.dark .t-white .cco-box.is-on svg { color: var(--on-lime); }
html.dark .t-white .cco-flow .order svg { color: var(--lime); }
html.dark .cco-pay .cco-pay-k { color: var(--ui-soft); }

@media (max-width: 1023px) {
  .cco-shots { grid-template-columns: minmax(0, 1fr); grid-template-rows: none; }
  .cco-shot-co { grid-row: auto; }
  .cco-ban.split, .cs-challenge.split { grid-template-columns: minmax(0, 1fr); }
  .cco-ban-art { padding: 8px 0 18px; }
}
@media (max-width: 720px) {
  .cco-dedupe, .cco-doc { padding: 14px; }
  .cco-ev li { grid-template-columns: 32px minmax(0, 1fr) auto; gap: 10px; }
  .cco-ev-ico { width: 32px; height: 32px; }
  .cco-fields { font-size: .875rem; }
  .cco-cats li { font-size: .875rem; }
  .cco-fn-bar { min-width: 0; width: max(var(--w), 62%); }
  .cco-panel { padding: 12px; }
  .cco-flow { grid-template-columns: minmax(0, 1fr); }
  .cco-panel li { grid-template-columns: 30px minmax(0, 1fr) 18px; column-gap: 8px; }
  .cco-pn-ico { width: 30px; height: 30px; }
  .cco-panel li small { font-size: .8125rem; }
  .cco-phone { width: 34%; margin-left: 10px; border-radius: 20px; padding: 4px; }
  .cco-phone img { border-radius: 16px; }
  .cco-hl-tag { top: -11px; }
}
@media (prefers-reduced-motion: reduce) {
  .cco-sw, .cco-sw::after, .cco-seg span, .cco-box, .cco-dots b { transition: none; }
}
@media (max-width: 1023px) {
  .cco-pay { min-height: 0; padding-right: 130px; }
}
