/* Microtech · pago, envíos y agente IA de CreeIA */
:root { --wa-bg: #0b141a; --wa-panel: #202c33; --wa-me: #005c4b; --wa-green: #25d366; --cree: #12B3A6; --cree-spark: #B6F35C; }

/* ---------- carrito: envío gratis + medios de pago */
.freeship { padding: 12px 14px; border-radius: 14px; background: rgb(255 255 255 / .04); border: 1px solid var(--line); font-size: 13px; color: var(--muted); }
.freeship b { color: var(--ink); }
.freeship__bar { height: 6px; border-radius: 99px; background: rgb(255 255 255 / .08); margin-top: 8px; overflow: hidden; }
.freeship__bar i { display: block; height: 100%; width: 0; border-radius: inherit; background: linear-gradient(90deg, var(--red), #ff8a3d); transition: width .6s var(--ease); }
.freeship.is-done .freeship__bar i { background: var(--green); }
.freeship.is-done b { color: var(--green); }
.paylogos { display: flex; justify-content: center; gap: 6px; flex-wrap: wrap; }
.paylogos span { font: 800 10px/1 var(--text); letter-spacing: .04em; padding: 6px 8px; border-radius: 6px; border: 1px solid var(--line-2); color: var(--muted); }

/* ---------- checkout */
.checkout .modal__box.co { width: min(1120px, 100%); grid-template-columns: minmax(0, 1.35fr) minmax(0, .65fr); align-items: stretch; }
.co__main { position: relative; padding: 36px 40px; min-width: 0; }
.co__side { background: var(--panel); border-left: 1px solid var(--line); padding: 36px 28px; display: flex; flex-direction: column; gap: 18px; }
.co__side h3 { font-size: 18px; }
.co__steps { list-style: none; margin: 0 0 28px; padding: 0; display: flex; gap: 8px; align-items: center; }
.co__steps li { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 14px; color: var(--dim); }
.co__steps li + li::before { content: ""; width: 28px; height: 2px; background: var(--line-2); margin-right: 4px; }
.co__steps i { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-style: normal; font-size: 13px; border: 2px solid var(--line-2); transition: .3s var(--ease); }
.co__steps li.is-on { color: var(--ink); } .co__steps li.is-on i { border-color: var(--red); background: var(--red); color: #fff; }
.co__steps li.is-done { color: var(--ink); } .co__steps li.is-done i { border-color: var(--green); background: var(--green); color: #04130c; }
.co__pane { display: none; }
.co__pane.is-on { display: block; animation: cardIn .45s var(--ease); }
.co__pane h3 { font-size: clamp(22px, 2.4vw, 30px); margin-bottom: 20px; }
.co__methods { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 24px; }
.co__method { text-align: left; padding: 16px 18px; border-radius: 16px; border: 1.5px solid var(--line-2); background: var(--panel); display: grid; gap: 4px; position: relative; transition: .2s var(--ease); }
.co__method:hover { border-color: rgb(255 255 255 / .3); }
.co__method[aria-checked="true"] { border-color: var(--red); background: rgb(255 45 55 / .08); }
.co__method[aria-checked="true"]::after { content: "✓"; position: absolute; top: 14px; right: 14px; width: 22px; height: 22px; border-radius: 50%; background: var(--red); color: #fff; font: 800 12px/22px var(--text); text-align: center; }
.co__method b { font-size: 15px; } .co__method span { font-size: 13px; color: var(--muted); }
.co__method em { font-style: normal; font-weight: 800; font-size: 13px; color: var(--green); margin-top: 4px; }
.co__form { margin-bottom: 18px; }
.co__form .field { margin: 0; }
.co__addr { display: none; }
.checkout.is-delivery .co__addr { display: block; }
.co__eta { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: 14px; background: rgb(46 229 157 / .08); border: 1px solid rgb(46 229 157 / .25); font-size: 14px; color: #c9f5e2; margin-bottom: 20px; }
.co__eta svg { width: 22px; height: 22px; flex: none; color: var(--green); }
.co__eta b { color: #fff; }
.co__tabs { display: flex; gap: 6px; padding: 6px; border-radius: 999px; background: var(--panel); border: 1px solid var(--line); margin-bottom: 22px; }
.co__tabs button { flex: 1; height: 42px; border: 0; border-radius: 999px; background: none; font-weight: 700; font-size: 14px; color: var(--muted); transition: .2s; }
.co__tabs button[aria-selected="true"] { background: var(--ink); color: var(--bg); }
.co__tabs button[hidden] { display: none; }
.co__pay { display: none; } .co__pay.is-on { display: block; animation: cardIn .35s var(--ease); }
.co__note { color: var(--muted); font-size: 14px; margin-bottom: 18px; }
.co__note--big { font-size: 16px; color: #d6d6de; padding: 18px; border-radius: 14px; background: var(--panel); border: 1px solid var(--line); }
.co__demo { display: flex; gap: 10px; align-items: flex-start; font-size: 12.5px; color: var(--dim); margin: 4px 0 20px; }
.co__demo svg { width: 16px; height: 16px; flex: none; margin-top: 1px; }
.co__nav { display: flex; gap: 10px; flex-wrap: wrap; }
.co__nav .btn:last-child { flex: 1; }
.co__nav .btn { min-width: 120px; }

/* tarjeta 3D */
.ccard { perspective: 1000px; width: min(360px, 100%); aspect-ratio: 1.586; margin: 0 auto 24px; }
.ccard__in { position: relative; width: 100%; height: 100%; transform-style: preserve-3d; transition: transform .7s var(--ease); }
.ccard.is-back .ccard__in { transform: rotateY(180deg); }
.ccard__front, .ccard__back { position: absolute; inset: 0; border-radius: 18px; backface-visibility: hidden; -webkit-backface-visibility: hidden; padding: 22px; color: #fff; overflow: hidden;
  background: radial-gradient(120% 90% at 0% 0%, #3a3a48, #15151c 60%); box-shadow: 0 24px 50px -20px #000, inset 0 0 0 1px rgb(255 255 255 / .1); transition: background .5s; }
.ccard[data-brand="visa"] :is(.ccard__front, .ccard__back) { background: radial-gradient(120% 90% at 0% 0%, #3d5bff, #14205e 65%); }
.ccard[data-brand="mastercard"] :is(.ccard__front, .ccard__back) { background: radial-gradient(120% 90% at 0% 0%, #ff7a3d, #6b0f14 65%); }
.ccard[data-brand="amex"] :is(.ccard__front, .ccard__back) { background: radial-gradient(120% 90% at 0% 0%, #2ec4b6, #0b3b44 65%); }
.ccard[data-brand="diners"] :is(.ccard__front, .ccard__back) { background: radial-gradient(120% 90% at 0% 0%, #9aa3b5, #23262e 65%); }
.ccard__front::after { content: ""; position: absolute; inset: 0; background: linear-gradient(115deg, transparent 40%, rgb(255 255 255 / .14) 50%, transparent 60%); }
.ccard__back { transform: rotateY(180deg); padding: 0; }
.ccard__top { display: flex; justify-content: space-between; align-items: center; }
.ccard__top b { font: 800 italic 18px/1 var(--display); letter-spacing: .02em; }
.ccard__chip { width: 44px; height: 32px; border-radius: 7px; background: linear-gradient(135deg, #f3d27a, #b88a2c); box-shadow: inset 0 0 0 1px rgb(0 0 0 / .2); }
.ccard__num { font: 600 clamp(17px, 2.4vw, 22px)/1 ui-monospace, Menlo, Consolas, monospace; letter-spacing: .08em; margin: 30px 0 22px; white-space: nowrap; }
.ccard__bot { display: flex; justify-content: space-between; gap: 12px; }
.ccard__bot small, .ccard__cvv small { display: block; font-size: 10px; opacity: .7; letter-spacing: .08em; text-transform: uppercase; }
.ccard__bot b { font-size: 14px; letter-spacing: .04em; display: block; max-width: 210px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ccard__strip { display: block; height: 44px; background: #0a0a0f; margin-top: 26px; }
.ccard__cvv { margin: 18px 22px; padding: 8px 12px; background: #f4f4f4; color: #111; border-radius: 6px; text-align: right; }
.ccard__cvv small { color: #555; opacity: 1; }

/* procesando y listo */
.co__processing { position: absolute; inset: 0; z-index: 5; display: grid; place-content: center; justify-items: center; gap: 18px; background: rgb(13 13 18 / .94); backdrop-filter: blur(6px); text-align: center; font-weight: 700; padding: 24px; }
.co__processing[hidden] { display: none; }
.spinner { width: 56px; height: 56px; border-radius: 50%; border: 4px solid rgb(255 255 255 / .12); border-top-color: var(--red); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(1turn); } }
.co__done { text-align: center; padding-top: 10px; outline: 0; }
.co__done .lead { margin: 10px auto 24px; }
.co__check svg { width: 88px; height: 88px; margin: 0 auto 18px; }
.co__check circle { fill: none; stroke: var(--green); stroke-width: 3; stroke-dasharray: 151; stroke-dashoffset: 151; animation: draw .6s var(--ease) forwards; }
.co__check path { fill: none; stroke: var(--green); stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 40; stroke-dashoffset: 40; animation: draw .4s .5s var(--ease) forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.co__receipt { display: grid; grid-template-columns: auto 1fr; gap: 10px 20px; text-align: left; margin: 0 auto 28px; max-width: 460px; padding: 20px; border-radius: 16px; background: var(--panel); border: 1px solid var(--line); font-size: 14px; }
.co__receipt dt { color: var(--muted); } .co__receipt dd { margin: 0; font-weight: 700; text-align: right; }
.co__done .co__nav { justify-content: center; }
.confetti { position: absolute; top: 34%; width: 8px; height: 12px; border-radius: 2px; pointer-events: none; z-index: 6; animation: conf 1.6s cubic-bezier(.2, .7, .4, 1) forwards; }
@keyframes conf { 0% { transform: translate(0, 0) rotate(0); opacity: 1; } 60% { opacity: 1; } 100% { transform: translate(var(--dx), calc(var(--dy) * -1.6)) rotate(var(--r)); opacity: 0; } }

/* resumen */
.co__items { display: grid; gap: 12px; max-height: 280px; overflow-y: auto; }
.co__item { display: grid; grid-template-columns: 56px 1fr auto; gap: 12px; align-items: center; font-size: 13px; }
.co__item b { font-weight: 600; line-height: 1.35; }
.co__item > span:last-child { font-weight: 700; white-space: nowrap; }
.co__thumb { position: relative; }
.co__thumb img { width: 56px; height: 56px; border-radius: 12px; object-fit: cover; }
.co__thumb i { position: absolute; top: -6px; right: -6px; min-width: 20px; height: 20px; border-radius: 99px; background: var(--ink); color: var(--bg); font: 800 11px/20px var(--text); text-align: center; font-style: normal; }
.co__sum { display: grid; grid-template-columns: 1fr auto; gap: 10px; margin: 0; padding-top: 16px; border-top: 1px solid var(--line); font-size: 14px; }
.co__sum dt { color: var(--muted); } .co__sum dd { margin: 0; font-weight: 700; text-align: right; }
.co__sum .co__total { font: 700 22px/1 var(--display); letter-spacing: -.03em; color: var(--ink); padding-top: 10px; }
.co__free { color: var(--green); }
.co__secure { margin-top: auto; font-size: 12px; color: var(--dim); }
@media (max-width: 900px) {
  .checkout .modal__box.co { grid-template-columns: 1fr; }
  .co__side { order: -1; border-left: 0; border-bottom: 1px solid var(--line); padding: 20px 24px; gap: 12px; }
  .co__items { display: none; }
  .co__side h3, .co__secure { display: none; }
  .co__main { padding: 24px; }
}
@media (max-width: 560px) { .co__methods { grid-template-columns: 1fr; } .co__tabs button { font-size: 13px; } .co__steps li + li::before { width: 14px; } }

/* ---------- sección asistente */
.ai { overflow: hidden; }
.ai::before { content: ""; position: absolute; width: 640px; height: 640px; right: -160px; top: 10%; border-radius: 50%; background: rgb(18 179 166 / .16); filter: blur(100px); pointer-events: none; }
.ai__grid { position: relative; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: 56px; align-items: center; }
.ai__eyebrow::before { background: var(--cree); box-shadow: 0 0 0 4px rgb(18 179 166 / .2); }
.ai__list { list-style: none; padding: 0; margin: 32px 0 8px; display: grid; grid-template-columns: 1fr 1fr; gap: 20px 24px; }
.ai__list li { display: grid; grid-template-columns: 44px 1fr; gap: 14px; }
.ai__list li > span { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; background: rgb(18 179 166 / .14); color: var(--cree); font: 800 15px/1 var(--display); }
.ai__list b { display: block; margin-bottom: 4px; }
.ai__list p { color: var(--muted); font-size: 14px; }
.phone { position: relative; width: min(380px, 100%); margin-inline: auto; aspect-ratio: 9 / 18.5; border-radius: 48px; padding: 12px; background: linear-gradient(160deg, #2a2a33, #0d0d12); box-shadow: 0 60px 100px -40px #000, inset 0 0 0 1.5px rgb(255 255 255 / .12); }
.phone__notch { position: absolute; top: 20px; left: 50%; translate: -50% 0; width: 110px; height: 28px; border-radius: 99px; background: #000; z-index: 3; }
.phone .chat { height: 100%; border-radius: 38px; }
.phone .chat__head { padding-top: 54px; }
@media (max-width: 960px) { .ai__grid { grid-template-columns: 1fr; } }
@media (max-width: 560px) { .ai__list { grid-template-columns: 1fr; } .phone { width: min(330px, 100%); } }

/* ---------- chat (WhatsApp-like, con marca Microtech) */
.chat { display: flex; flex-direction: column; overflow: hidden; background: var(--wa-bg); color: #e9edef; font-family: var(--text); }
.chat__head { display: flex; align-items: center; gap: 12px; padding: 14px 14px 12px; background: var(--wa-panel); }
.chat__av { width: 40px; height: 40px; border-radius: 50%; object-fit: contain; background: #fff; padding: 4px; flex: none; }
.chat__head b { display: block; font-size: 15px; }
.chat__head small { font-size: 12px; color: #8696a0; }
.chat__close { margin-left: auto; width: 40px; height: 40px; border-color: transparent; }
.chat__body { flex: 1; overflow-y: auto; padding: 16px 12px; display: flex; flex-direction: column; gap: 6px; scroll-behavior: smooth;
  background-color: var(--wa-bg); background-image: radial-gradient(rgb(255 255 255 / .035) 1px, transparent 1px); background-size: 18px 18px; }
.msg { display: flex; animation: msgIn .3s var(--ease); }
@keyframes msgIn { from { opacity: 0; transform: translateY(6px) scale(.98); } }
.msg--me { justify-content: flex-end; }
.msg__b { max-width: 84%; padding: 7px 10px 6px; border-radius: 10px; font-size: 14.2px; line-height: 1.45; white-space: pre-line; position: relative; box-shadow: 0 1px 1px rgb(0 0 0 / .2); }
.msg--bot .msg__b { background: var(--wa-panel); border-top-left-radius: 2px; }
.msg--me .msg__b { background: var(--wa-me); border-top-right-radius: 2px; }
.msg__t { float: right; margin: 6px 0 -2px 10px; font-size: 10.5px; color: rgb(233 237 239 / .55); white-space: nowrap; }
.msg__ticks { font-style: normal; color: #53bdeb; letter-spacing: -2px; }
.typing { display: inline-flex; gap: 4px; padding: 4px 2px; }
.typing i { width: 7px; height: 7px; border-radius: 50%; background: #8696a0; animation: tdot 1.2s infinite; }
.typing i:nth-child(2) { animation-delay: .15s; } .typing i:nth-child(3) { animation-delay: .3s; }
@keyframes tdot { 0%, 60%, 100% { transform: none; opacity: .5; } 30% { transform: translateY(-4px); opacity: 1; } }
.msg__link { display: block; width: 100%; margin-top: 8px; padding: 10px; border-radius: 8px; border: 0; background: rgb(255 255 255 / .06); color: #53bdeb; font: 700 14px/1.2 var(--text); text-align: center; clear: both; cursor: pointer; }
.msg__link:hover { background: rgb(255 255 255 / .1); }
.pcards { display: flex; gap: 8px; overflow-x: auto; max-width: 100%; padding-bottom: 4px; scrollbar-width: thin; }
.pcard { flex: 0 0 150px; background: var(--wa-panel); border-radius: 12px; padding: 8px; display: flex; flex-direction: column; gap: 6px; font-size: 12.5px; }
.pcard__img { padding: 0; border: 0; border-radius: 8px; overflow: hidden; background: #000; display: block; cursor: zoom-in; }
.pcard__img img { width: 100%; aspect-ratio: 1; object-fit: cover; }
.pcard b { font-weight: 600; line-height: 1.3; min-height: 3.9em; }
.pcard > span { font: 700 14px/1 var(--display); letter-spacing: -.02em; }
.pcard__add { display: block; text-align: center; margin-top: 2px; padding: 8px; border: 0; border-radius: 8px; background: var(--wa-green); color: #062a14; font: 800 12px/1.1 var(--text); cursor: pointer; }
.pcard__add.is-in { background: #1f5f3a; color: #c9f5d8; }
.paylink { display: grid; gap: 4px; padding: 10px; margin-bottom: 4px; border-radius: 8px; background: rgb(255 255 255 / .06); border-left: 3px solid var(--wa-green); }
.paylink span { font-size: 12.5px; color: #8696a0; }
.paylink em { font-style: normal; color: #53bdeb; font-weight: 700; }
.chat__chips { display: flex; gap: 6px; padding: 0 12px 8px; overflow-x: auto; scrollbar-width: none; background: var(--wa-bg); }
.chat__chips:empty { display: none; }
.qchip { flex: none; padding: 8px 12px; border-radius: 99px; border: 1px solid rgb(37 211 102 / .45); background: rgb(37 211 102 / .08); color: #7ee2a8; font: 600 13px/1 var(--text); white-space: nowrap; transition: background .2s; }
.qchip:hover { background: rgb(37 211 102 / .18); }
.chat__form, .chat__foot { display: flex; gap: 8px; align-items: center; padding: 8px 10px; background: var(--wa-panel); }
.chat__form input { flex: 1; min-width: 0; height: 44px; padding: 0 16px; border-radius: 99px; border: 0; background: #2a3942; color: #e9edef; outline: 0; font-size: 15px; }
.chat__form input::placeholder { color: #8696a0; }
.chat__fake { flex: 1; height: 40px; padding: 0 16px; border-radius: 99px; background: #2a3942; color: #8696a0; display: flex; align-items: center; font-size: 14px; }
.chat__send { width: 44px; height: 44px; flex: none; border-radius: 50%; border: 0; background: var(--wa-green); color: #062a14; display: grid; place-items: center; }
.chat__send svg { width: 20px; height: 20px; }
.chat__foot .chat__send { width: 40px; height: 40px; }
.chat__brand { display: flex; align-items: center; justify-content: center; gap: 6px; padding: 7px; background: #111b21; color: #8696a0; font-size: 11.5px; }
.chat__brand b { color: var(--cree); }
.chat__brand img { width: 16px; height: auto; }

/* ---------- ventana flotante del agente */
.agent { position: fixed; right: 22px; bottom: 96px; z-index: 70; width: min(400px, calc(100vw - 32px)); height: min(640px, calc(100svh - 130px)); border-radius: 22px; overflow: hidden;
  box-shadow: 0 40px 90px -20px rgb(0 0 0 / .8), 0 0 0 1px rgb(255 255 255 / .08); transform: translateY(16px) scale(.96); transform-origin: bottom right; opacity: 0; transition: transform .35s var(--ease), opacity .25s; }
.agent.is-on { transform: none; opacity: 1; }
.agent .chat { height: 100%; }
.fab-wrap { position: fixed; right: 22px; bottom: 22px; z-index: 71; display: flex; align-items: flex-end; gap: 12px; }
.fab-wrap .fab { position: relative; right: auto; bottom: auto; border: 0; }
.fab.is-open { background: #1f2c33; box-shadow: 0 14px 30px -8px rgb(0 0 0 / .6); }
.fab__dot { position: absolute; top: -2px; right: -2px; width: 20px; height: 20px; border-radius: 50%; background: var(--red); color: #fff; font: 800 11px/20px var(--text); text-align: center; animation: bump 2s 3s infinite; }
.fab__dot[hidden] { display: none; }
.fab-hint { position: relative; max-width: 250px; margin: 0 0 8px; padding: 12px 30px 12px 14px; border-radius: 16px 16px 4px 16px; background: #fff; color: #0a0a0f; font-size: 13.5px; line-height: 1.4; box-shadow: 0 20px 40px -12px rgb(0 0 0 / .6); cursor: pointer; animation: msgIn .4s var(--ease); }
.fab-hint b { display: block; margin-bottom: 2px; }
.fab-hint[hidden] { display: none; }
.fab-hint__x { position: absolute; top: 4px; right: 4px; width: 28px; height: 28px; border: 0; background: none; color: #666; font-size: 18px; border-radius: 50%; }
@media (max-width: 560px) {
  .agent { inset: 0; width: 100%; height: 100svh; border-radius: 0; transform-origin: bottom center; }
  .agent-open .fab-wrap { display: none; }
  .fab-wrap { right: 16px; bottom: 16px; }
  .fab-hint { max-width: 210px; }
}

.nav__links a { white-space: nowrap; }
.ai__list li:first-child > span { font-size: 11px; letter-spacing: -.02em; }
@media (max-width: 900px) { .checkout .modal__box.co { grid-template-columns: minmax(0, 1fr); } .co__side { min-width: 0; } }
@media (max-width: 560px) { .co__steps { flex-wrap: wrap; row-gap: 8px; } .co__main { padding: 20px 16px 24px; } .co__side { padding: 16px 16px 14px; } .ccard__num { font-size: 16px; letter-spacing: .04em; } }
@media (max-width: 900px) { .co__side { padding-top: 64px !important; } }
