/* Recepta · Mi tienda online (sitio.js): el asistente paso a paso y el editor de la página */

/* ---- Asistente ---- */
.st-asis { display: grid; gap: 22px; }
.st-asis-arriba { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.st-pasos { display: flex; gap: 6px; list-style: none; margin: 0; padding: 0; flex-wrap: wrap; }
.st-pasos li { display: flex; align-items: center; gap: 8px; padding: 6px 12px 6px 6px; border-radius: 999px; background: var(--hoja); border: 1px solid var(--perla); color: var(--pizarra); font-weight: 600; font-size: 0.88rem; }
.st-pasos li span { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: var(--perla-suave); font-size: 0.8rem; }
.st-pasos li.actual { color: var(--tinta); border-color: var(--cobalto); }
.st-pasos li.actual span { background: var(--cobalto); color: #fff; }
.st-pasos li.hecho span { background: var(--menta); color: #fff; }
.st-titulo { margin-bottom: 22px; }
.st-titulo h2 { font-size: clamp(1.6rem, 3.2vw, 2.4rem); font-weight: 300; margin: 0 0 6px; letter-spacing: -0.01em; }
.st-titulo h2 span { color: var(--cobalto); font-weight: 700; }
.st-titulo p { color: var(--pizarra); margin: 0; }
.st-pie { display: flex; justify-content: space-between; gap: 12px; margin-top: 26px; grid-column: 1 / -1; }
.st-pie .primario { min-width: 160px; }

/* Paso 1: la ficha del negocio a la izquierda; a la derecha la tienda en vivo y las fotos de internet */
.st-negocio { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 28px; align-items: start; }
.st-ficha { background: var(--hoja); border: 1px solid var(--perla); border-radius: 20px; padding: 24px 24px 12px; box-shadow: var(--sombra); }
.st-ficha-cab { margin-bottom: 18px; }
.st-ficha-cab h2 { margin: 0 0 4px; font-size: 1.45rem; letter-spacing: -0.01em; }
.st-ficha-cab p { margin: 0; color: var(--pizarra); font-size: 0.92rem; }
.st-ficha [hidden] { display: none !important; }
.st-atajos, .st-enfoques { display: flex; flex-wrap: wrap; gap: 6px; }
.st-atajos { margin-top: 2px; }
.st-atajo, .st-enfoque { font: inherit; font-size: 0.82rem; font-weight: 600; padding: 5px 11px; border-radius: 999px; border: 1px solid var(--perla); background: var(--perla-suave); color: var(--tinta); cursor: pointer; display: inline-flex; align-items: center; gap: 6px; min-height: 0; width: auto; }
.st-atajo:hover, .st-enfoque:hover { border-color: var(--cobalto); }
.st-enfoque.elegido { background: var(--cobalto); border-color: var(--cobalto); color: #fff; }
.st-subir-logo { display: flex; align-items: center; gap: 14px; padding: 12px; border: 1.5px dashed var(--perla); border-radius: 14px; cursor: pointer; margin-bottom: 8px; }
.st-subir-logo:hover { border-color: var(--cobalto); }
.st-subir-logo .st-logo-vista { width: 64px; height: 64px; font-size: 1.6rem; }
.st-subir-logo b { display: block; }
.st-subir-logo small { display: block; font-size: 0.82rem; }
.st-campo { display: grid; gap: 6px; font-weight: 600; font-size: 0.9rem; margin-bottom: 14px; }
.st-campo small { font-weight: 400; }
.st-campo input, .st-campo textarea, .st-campo select { font-weight: 400; width: 100%; }
.st-logo { display: flex; gap: 16px; align-items: center; padding: 14px; border: 1px dashed var(--perla); border-radius: 14px; margin-top: 10px; }
.st-logo p { margin: 4px 0 8px; font-size: 0.88rem; }
.st-logo-vista { width: 86px; height: 86px; flex: none; border-radius: 12px; background: #fff; border: 1px solid var(--perla); display: grid; place-items: center; overflow: hidden; color: #8a90a2; font-size: 0.8rem; }
.st-logo-vista img { max-width: 90%; max-height: 90%; object-fit: contain; }
.st-logo-chico { margin: 0; }
.st-logo-chico .st-logo-vista { width: 64px; height: 64px; }

.st-vivo { display: grid; gap: 18px; position: sticky; top: 12px; min-width: 0; }
.st-vivo-marco { border-radius: 16px; overflow: hidden; background: var(--v-fondo, #fff); color: var(--v-texto, #111); box-shadow: 0 24px 60px -24px rgba(15, 23, 42, 0.45), 0 0 0 1px var(--perla); }
.st-vivo-barra { display: flex; align-items: center; gap: 6px; padding: 9px 12px; background: #1f2330; color: #aab0c0; font-size: 0.72rem; }
.st-vivo-barra i { width: 9px; height: 9px; border-radius: 50%; background: #474d5e; }
.st-vivo-barra span { margin-left: 10px; background: #2c3141; border-radius: 6px; padding: 3px 10px; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.st-vivo-enc { display: flex; align-items: center; gap: 14px; padding: 12px 18px; font-size: 0.78rem; }
.st-vivo-enc b { font-size: 0.95rem; margin-right: auto; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.st-vivo-enc img { max-height: 28px; max-width: 120px; object-fit: contain; margin-right: auto; }
.st-vivo-enc em { font-style: normal; background: var(--v-pri); color: var(--v-sobre); padding: 3px 9px; border-radius: 999px; }
.st-vivo-portada { min-height: 210px; padding: 30px 26px; display: grid; align-content: center; justify-items: start; gap: 8px; color: #fff; background: linear-gradient(135deg, var(--v-pri), var(--v-noche)); background-size: cover; background-position: center; transition: background-image 0.3s; }
.st-vivo-portada h3 { margin: 0; font-size: clamp(1.3rem, 2.4vw, 1.9rem); line-height: 1.15; max-width: 85%; }
.st-vivo-portada p { margin: 0; opacity: 0.9; font-size: 0.88rem; }
.st-vivo-portada span { margin-top: 6px; background: var(--v-pri); color: var(--v-sobre); font-weight: 700; font-size: 0.8rem; padding: 7px 14px; border-radius: 8px; }
.st-vivo-prods { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; padding: 16px 18px 20px; }
.st-vivo-prods i { display: grid; gap: 5px; }
.st-vivo-prods u { aspect-ratio: 1; border-radius: 8px; background: color-mix(in srgb, var(--v-texto) 8%, transparent); }
.st-vivo-prods s { height: 6px; border-radius: 3px; background: color-mix(in srgb, var(--v-texto) 14%, transparent); }
.st-vivo-prods s + s { width: 55%; background: var(--v-pri); opacity: 0.7; }
.st-elige { background: var(--hoja); border: 1px solid var(--perla); border-radius: 20px; padding: 16px; display: grid; gap: 12px; }
.st-elige-cab { display: grid; gap: 2px; }
.st-elige-cab small { font-size: 0.82rem; }
.st-elige-buscar { display: flex; gap: 8px; }
.st-elige-buscar input { flex: 1; min-width: 0; }
.st-elige-grilla { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; min-height: 90px; transition: opacity 0.2s; }
.st-elige-grilla.cargando { opacity: 0.45; }
.st-elige-foto { position: relative; padding: 0; border: 0; border-radius: 10px; overflow: hidden; aspect-ratio: 4 / 3; cursor: pointer; background: var(--perla-suave); width: 100%; min-height: 0; }
.st-elige-foto img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.25s; }
.st-elige-foto:hover img { transform: scale(1.06); }
.st-elige-foto.elegida { box-shadow: 0 0 0 3px var(--cobalto); }
.st-elige-foto.elegida::after { content: '✓'; position: absolute; top: 6px; right: 6px; width: 22px; height: 22px; border-radius: 50%; background: var(--cobalto); color: #fff; display: grid; place-items: center; font-size: 0.75rem; font-weight: 800; }
.st-elige-vacio { grid-column: 1 / -1; margin: 18px 0; text-align: center; }

/* Paso 2: contacto y ventas */
.st-grilla { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.st-grilla fieldset { border: 1px solid var(--perla); border-radius: 14px; padding: 16px 18px 6px; margin: 0; min-width: 0; background: var(--hoja); }
.st-grilla legend { font-weight: 700; padding: 0 6px; }
.st-ancho { grid-column: 1 / -1; }
.st-dos { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.st-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 10px; }
.st-chip { cursor: pointer; }
.st-chip { position: relative; }
.st-chip input { position: absolute; left: 0; top: 0; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.st-chip span { display: inline-block; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--perla); background: var(--niebla); font-weight: 500; font-size: 0.88rem; }
.st-chip input:checked + span { background: var(--cobalto-suave); border-color: var(--cobalto); color: var(--cobalto-hondo); }
.st-chip input:focus-visible + span { box-shadow: var(--foco); }
.segmentos label { cursor: pointer; padding: 7px 12px; border-radius: 8px; font-weight: 600; font-size: 0.88rem; color: var(--pizarra); }
.segmentos label.activo { background: var(--hoja); color: var(--tinta); box-shadow: 0 1px 3px rgba(20, 26, 51, 0.12); }

/* Paso 3: paletas */
.st-paletas { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; }
.st-paleta { display: flex; align-items: center; gap: 6px; padding: 14px 16px; border-radius: 8px; border: 2px solid transparent; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15); position: relative; font-weight: 600; text-align: left; justify-content: flex-start; }
.st-paleta span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.st-paleta i { width: 34px; height: 26px; border-radius: 5px; flex: none; }
.st-paleta.elegida { border-color: var(--cobalto); }
.st-paleta.elegida::after { content: '✓'; position: absolute; top: -9px; right: -9px; width: 20px; height: 20px; border-radius: 50%; background: var(--menta); color: #fff; font-size: 0.72rem; display: grid; place-items: center; }
.st-paletas-chicas { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; max-height: 280px; overflow: auto; padding: 10px 10px 4px 2px; }
.st-paletas-chicas .st-paleta { padding: 9px 10px; font-size: 0.82rem; }
.st-paletas-chicas .st-paleta i { width: 18px; height: 18px; }

/* Paso 4: diseños (miniaturas de la página de verdad, achicadas) */
.st-disenos { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; }
.st-diseno { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; width: 100%; justify-items: stretch; padding: 0; background: none; border: 0; text-align: left; font-weight: 600; color: var(--tinta); }
.st-mini { position: relative; width: 100%; aspect-ratio: 16 / 10; overflow: hidden; border-radius: 10px; border: 1px solid var(--perla); background: #fff; box-shadow: var(--sombra); transition: transform 0.2s, box-shadow 0.2s; }
.st-diseno:hover .st-mini { transform: translateY(-3px); box-shadow: 0 0 0 3px var(--cobalto), var(--sombra); }
.st-mini iframe, .st-creando-vista iframe { position: absolute; top: 0; left: 0; width: 1280px; height: 800px; border: 0; transform-origin: 0 0; transform: scale(var(--k, 0.25)); pointer-events: none; }

/* Paso 5: creando */
.st-creando { display: grid; grid-template-columns: minmax(260px, 380px) 1fr; min-height: 520px; border-radius: 16px; overflow: hidden; border: 1px solid var(--perla); }
.st-creando-lado { background: #1f1f24; color: #fff; padding: 34px; display: flex; flex-direction: column; }
.st-creando-lado ul { list-style: none; padding: 0; margin: 18px 0; display: grid; gap: 14px; }
.st-creando-lado li { opacity: 0.4; padding-left: 28px; position: relative; transition: opacity 0.3s; }
.st-creando-lado li.actual { opacity: 1; }
.st-creando-lado li.hecho { opacity: 1; }
.st-creando-lado li.hecho::before { content: '✓'; position: absolute; left: 0; color: #2fd27e; font-weight: 800; }
.st-creando-lado li.actual::before { content: ''; position: absolute; left: 2px; top: 5px; width: 12px; height: 12px; border-radius: 50%; border: 2px solid #fff; border-top-color: transparent; animation: st-girar 0.8s linear infinite; }
.st-barra { margin-top: auto; height: 6px; border-radius: 9px; background: rgba(255, 255, 255, 0.12); overflow: hidden; }
.st-barra span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #c06ad6, #e48ab9); transition: width 0.6s; }
.st-creando-vista { background: #111827; position: relative; display: grid; place-items: center; overflow: hidden; }
.st-rueda { width: 70px; height: 70px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, 0.2); border-bottom-color: #fff; animation: st-girar 1.2s linear infinite; }
@keyframes st-girar { to { transform: rotate(360deg); } }

/* ---- Editor ---- */
.st-editor { display: grid; gap: 12px; }
.st-barra-ed { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 8px 10px; border: 1px solid var(--perla); border-radius: 14px; background: var(--hoja); }
.st-nombre { flex: 1; min-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.st-estado { font-size: 0.85rem; min-width: 120px; text-align: right; }
.st-barra-ed [data-deshacer], .st-barra-ed [data-rehacer] { width: 38px; padding: 0; font-size: 1.1rem; }
.st-cuerpo-ed { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 12px; align-items: start; }
.st-lienzo { background: var(--perla-suave); border-radius: 14px; border: 1px solid var(--perla); overflow: hidden; height: calc(100vh - 190px); min-height: 520px; display: flex; justify-content: center; }
.st-lienzo iframe { width: 100%; height: 100%; border: 0; background: #fff; transition: width 0.3s; }
.st-lienzo.achicado { display: block; }
.st-lienzo.achicado iframe { width: 1180px; height: var(--alto); transform: scale(var(--k)); transform-origin: 0 0; transition: none; }
.st-lienzo.cel { padding: 16px 0; }
.st-lienzo.cel iframe { width: 390px; max-width: 100%; border-radius: 22px; box-shadow: 0 0 0 10px #1b1d26, var(--sombra); }
.st-panel { border: 1px solid var(--perla); border-radius: 14px; background: var(--hoja); position: sticky; top: 76px; max-height: calc(100vh - 190px); min-height: 520px; display: flex; flex-direction: column; overflow: hidden; }
.st-tabs { margin: 10px; display: grid !important; grid-template-columns: repeat(4, 1fr); }
.st-tabs button { padding: 7px 4px; font-size: 0.85rem; }
.st-panel-cuerpo { padding: 4px 14px 16px; overflow: auto; flex: 1; }
.st-secciones { list-style: none; padding: 0; margin: 10px 0 14px; display: grid; gap: 6px; }
.st-secciones li { display: flex; align-items: center; gap: 4px; border: 1px solid var(--perla); border-radius: 10px; background: var(--niebla); padding-right: 4px; }
.st-secciones li.elegida { border-color: var(--cobalto); box-shadow: 0 0 0 2px var(--cobalto-suave); }
.st-secciones li.oculta { opacity: 0.55; }
.st-secciones li.arrastrando { opacity: 0.4; }
.st-sec-nombre { flex: 1; min-width: 0; display: flex; gap: 10px; align-items: center; background: none; border: 0; text-align: left; padding: 8px 10px; justify-content: flex-start; cursor: grab; }
.st-sec-nombre > span:last-child { display: grid; min-width: 0; }
.st-sec-nombre small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 400; }
.st-sec-acc { display: flex; gap: 2px; flex: none; }
.st-sec-acc button { width: 30px; height: 30px; padding: 0; font-size: 0.9rem; background: transparent; border-color: transparent; }
.st-ancho-btn { width: 100%; margin-top: 8px; }
.st-galeria-sec { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; }
.st-galeria-sec button { display: grid; gap: 4px; justify-items: start; text-align: left; padding: 14px; height: auto; white-space: normal; }
.st-galeria-sec button > span { font-size: 1.5rem; }
.st-galeria-sec small { font-weight: 400; }
.st-ed-cab { display: flex; align-items: center; gap: 8px; margin: 6px 0 12px; font-size: 1.02rem; }
.st-ed-cab .st-sec-acc { margin-left: auto; }
.st-nota { background: var(--ambar-suave); border-radius: 10px; padding: 10px 12px; font-size: 0.86rem; margin: 0 0 12px; }
.st-variantes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.st-variantes button { display: grid; gap: 6px; justify-items: center; padding: 8px 4px; height: auto; font-size: 0.72rem; font-weight: 600; white-space: normal; line-height: 1.2; }
.st-variantes button.activo { border-color: var(--cobalto); background: var(--cobalto-suave); }
.st-ico-p { width: 54px; height: 34px; border-radius: 4px; background: var(--perla); position: relative; overflow: hidden; display: block; }
.st-ico-p::before, .st-ico-p::after { content: ''; position: absolute; background: var(--pizarra); border-radius: 2px; }
.st-ico-cine { background: #39405a; } .st-ico-cine::before { left: 14px; right: 14px; top: 13px; height: 4px; background: #fff; } .st-ico-cine::after { left: 21px; right: 21px; top: 21px; height: 3px; background: #fff; }
.st-ico-dividida::before { left: 5px; top: 12px; width: 20px; height: 4px; } .st-ico-dividida::after { right: 5px; top: 5px; width: 20px; height: 24px; border-radius: 50%; background: var(--cobalto); }
.st-ico-editorial::before { left: 5px; top: 5px; width: 26px; height: 5px; } .st-ico-editorial::after { left: 5px; right: 5px; bottom: 4px; height: 13px; background: var(--cobalto); }
.st-ico-collage { background: #1f2333; } .st-ico-collage::before { left: 0; top: 0; width: 17px; height: 34px; background: var(--cobalto); } .st-ico-collage::after { right: 0; bottom: 0; width: 15px; height: 20px; background: var(--menta); }
.st-ico-degradado { background: linear-gradient(var(--perla-suave), var(--hoja)); } .st-ico-degradado::before { left: 16px; right: 16px; top: 7px; height: 4px; } .st-ico-degradado::after { left: 6px; right: 6px; bottom: 0; height: 12px; background: repeating-linear-gradient(90deg, var(--cobalto) 0 7px, transparent 7px 10px); }
.st-ico-tarjeta { background: #39405a; } .st-ico-tarjeta::before { left: 5px; top: 9px; width: 24px; height: 17px; background: var(--cobalto); border-radius: 3px; } .st-ico-tarjeta::after { display: none; }
.st-fotos { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.st-foto { position: relative; padding: 0; height: auto; aspect-ratio: 4 / 3; overflow: hidden; border-radius: 8px; }
.st-foto img { width: 100%; height: 100%; object-fit: cover; }
.st-foto span { position: absolute; inset: auto 0 0; background: rgba(0, 0, 0, 0.55); color: #fff; font-size: 0.72rem; padding: 3px; opacity: 0; transition: opacity 0.15s; }
.st-foto:hover span, .st-foto:focus-visible span { opacity: 1; }
.st-foto-mas { display: grid; place-items: center; font-size: 0.85rem; }
.st-items { display: grid; gap: 10px; margin-top: 6px; }
.st-item { border: 1px solid var(--perla); border-radius: 10px; padding: 10px 10px 0; background: var(--niebla); }
.st-item-cab { display: flex; justify-content: space-between; margin-bottom: 6px; font-size: 0.88rem; }
.st-fuentes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.st-fuentes button { display: grid; gap: 2px; justify-items: start; text-align: left; padding: 8px 10px; height: auto; white-space: normal; }
.st-fuentes button span { font-size: 1.05rem; }
.st-fuentes button small { font-size: 0.7rem; font-weight: 400; }
.st-fuentes button.activo { border-color: var(--cobalto); background: var(--cobalto-suave); }
.st-form-panel .st-titulo { display: none; }
.st-form-panel .st-grilla { grid-template-columns: 1fr; gap: 12px; }
.st-form-panel .st-grilla fieldset { padding: 12px 12px 2px; }
.st-dir { display: flex; align-items: center; gap: 4px; min-width: 0; }
.st-dir span { font-weight: 400; font-size: 0.82rem; white-space: nowrap; }
.st-dir input { min-width: 0; }
.st-url { word-break: break-all; font-weight: 600; background: var(--niebla); border: 1px solid var(--perla); border-radius: 10px; padding: 10px 12px; }
.st-tabs-foto { margin-bottom: 14px; display: flex; flex-wrap: wrap; }
.st-buscar-foto { display: flex; gap: 8px; }
.st-buscar-foto input { flex: 1; min-width: 0; }
.st-banco { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; max-height: 52vh; overflow: auto; }
.st-banco button { padding: 0; height: auto; display: grid; overflow: hidden; border-radius: 8px; position: relative; }
.st-banco img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.st-banco small { position: absolute; left: 0; right: 0; bottom: 0; background: rgba(0, 0, 0, 0.55); color: #fff; font-size: 0.66rem; padding: 2px 5px; font-weight: 400; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.st-soltar { display: grid; gap: 6px; place-items: center; text-align: center; padding: 46px 20px; border: 2px dashed var(--perla); border-radius: 14px; cursor: pointer; }
.st-soltar:hover { border-color: var(--cobalto); }
.ec-contacto { background: var(--niebla); border-radius: 10px; padding: 10px 12px; }

@media (max-width: 1100px) {
  .st-cuerpo-ed { grid-template-columns: 1fr; }
  .st-panel { position: static; max-height: none; min-height: 0; }
  .st-lienzo { height: 70vh; min-height: 420px; }
  .st-negocio { grid-template-columns: 1fr; }
  .st-vivo { position: static; }
}
@media (max-width: 760px) {
  .st-negocio, .st-grilla, .st-creando { grid-template-columns: 1fr; }
  .st-vivo { position: static; }
  .st-elige-grilla { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .st-vivo-enc span { display: none; }
  .st-dos { grid-template-columns: 1fr; }
  .st-disenos { grid-template-columns: 1fr; }
  .st-creando-vista { min-height: 260px; }
  .st-estado { min-width: 0; text-align: left; flex-basis: 100%; order: 9; }
  .st-pasos li { font-size: 0.78rem; padding-right: 10px; }
  .st-paletas { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
}
