/* =========================================================
   SIMAGE CORE — portada (tarjetas VENDER/COMPRAR), chat,
   catálogo, modal y panel. Usa los tokens del tema SIMAGE
   (--navy, --green, --blue, --orange, --radius, --shadow…).
   Mobile-first.
   ========================================================= */

/* Blindaje: [hidden] SIEMPRE gana, aunque otra regla ponga display:flex/grid
   con la misma especificidad (esto es lo que hacía que el modal de
   "Contactar" se viera siempre encima de todo). */
.sc-home [hidden]{ display:none !important; }

.sc-home{ width:100%; max-width:680px; margin:0 auto; box-sizing:border-box; }

/* Red de seguridad anti-desbordamiento: nada dentro de estos bloques puede
   ser más ancho que su contenedor, pase lo que pase (inputs, selects,
   botones con texto largo, imágenes, etc). Imprescindible en dispositivos
   pequeños donde un solo elemento desbordado empuja toda la página. */
.sc-home, .sc-home *{ box-sizing:border-box; }
.sc-chat, .sc-chat *,
.sc-catalogo, .sc-catalogo *,
.sc-modal__box, .sc-modal__box *,
.sc-panel, .sc-panel *{
  max-width:100%;
}

/* ---------- Tarjetas VENDER / COMPRAR ----------
   Siempre en 2 columnas, incluso en el móvil más pequeño: así solo
   ocupan UNA fila de alto y caben junto al header sin hacer scroll.
   El tamaño crece progresivamente en pantallas más grandes. */
.sc-cards{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:10px;
}
@media (min-width:400px){ .sc-cards{ gap:14px; } }
@media (min-width:640px){ .sc-cards{ gap:22px; } }
@media (min-width:900px){ .sc-cards{ gap:26px; } }

.sc-card{
  position:relative;
  display:flex;
  flex-direction:column;
  align-items:center;
  text-align:center;
  gap:6px;
  padding:16px 10px 14px;
  border-radius:16px;
  border:1px solid rgba(255,255,255,.09);
  background:linear-gradient(160deg, rgba(255,255,255,.05), rgba(255,255,255,0) 60%), var(--navy-deep,#12271b);
  color:#fff;
  cursor:pointer;
  font-family:inherit;
  width:100%;
  overflow:hidden;
  -webkit-tap-highlight-color:transparent;
  transition:transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
@media (min-width:400px){ .sc-card{ padding:20px 14px 18px; border-radius:18px; gap:8px; } }
@media (min-width:640px){ .sc-card{ padding:32px 20px 28px; border-radius:20px; gap:10px; } }
@media (min-width:900px){ .sc-card{ padding:44px 28px 36px; gap:12px; } }

.sc-card::before{
  content:"";
  position:absolute; inset:0 auto auto 0; width:100%; height:4px;
}
.sc-card:hover,
.sc-card:focus-visible{
  transform:translateY(-6px);
  box-shadow:0 22px 40px -18px rgba(10,26,61,.6);
}
.sc-card:active{ transform:translateY(-2px); }

.sc-card__icon{
  width:34px; height:34px; border-radius:11px; flex:none;
  display:flex; align-items:center; justify-content:center;
  font-size:1rem;
  box-shadow:0 10px 20px -8px rgba(0,0,0,.45);
}
@media (min-width:400px){ .sc-card__icon{ width:44px; height:44px; border-radius:13px; font-size:1.3rem; } }
@media (min-width:640px){ .sc-card__icon{ width:56px; height:56px; border-radius:16px; font-size:1.6rem; } }
@media (min-width:900px){ .sc-card__icon{ width:64px; height:64px; border-radius:18px; font-size:1.85rem; } }

.sc-card__title{
  font-family:var(--font-display,inherit);
  font-weight:700; font-size:.86rem; letter-spacing:.02em;
  color:#fff;
  margin-top:2px;
}
@media (min-width:400px){ .sc-card__title{ font-size:1.02rem; } }
@media (min-width:640px){ .sc-card__title{ font-size:1.2rem; margin-top:4px; } }
@media (min-width:900px){ .sc-card__title{ font-size:1.35rem; } }

.sc-card__desc{
  color:#cfe0cf; font-size:.68rem; line-height:1.35; margin:0; max-width:280px;
  display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden;
}
@media (min-width:400px){ .sc-card__desc{ font-size:.76rem; -webkit-line-clamp:3; } }
@media (min-width:640px){ .sc-card__desc{ font-size:.88rem; line-height:1.5; -webkit-line-clamp:unset; overflow:visible; } }

.sc-card__go{
  margin-top:4px; display:inline-flex; align-items:center; gap:4px;
  font-family:var(--font-mono,monospace); font-size:.58rem; letter-spacing:.06em; text-transform:uppercase;
  padding:5px 9px; border-radius:999px; background:rgba(255,255,255,.06);
  white-space:nowrap;
}
@media (min-width:400px){ .sc-card__go{ font-size:.66rem; padding:6px 12px; margin-top:6px; } }
@media (min-width:640px){ .sc-card__go{ font-size:.72rem; padding:8px 16px; margin-top:10px; gap:6px; } }

.sc-card--vender::before{ background:var(--green,#1f8f4e); }
.sc-card--vender .sc-card__icon{ background:var(--green,#1f8f4e); color:#fff; }
.sc-card--vender .sc-card__go{ color:var(--green,#3fd07f); }
.sc-card--vender:hover{ border-color:rgba(31,143,78,.55); }

.sc-card--comprar::before{ background:var(--blue,#c2811f); }
.sc-card--comprar .sc-card__icon{ background:var(--blue,#c2811f); color:#fff; }
.sc-card--comprar .sc-card__go{ color:#e8b45a; }
.sc-card--comprar:hover{ border-color:rgba(28,111,212,.55); }

.sc-card__go::after{ content:"→"; transition:transform .15s ease; }
.sc-card:hover .sc-card__go::after{ transform:translateX(3px); }

/* ---------- Chat de VENDER (dentro de .sc-modal / .sc-chat-modal) ---------- */
.sc-chat-modal{ align-items:center; padding:14px; }
.sc-chat-modal .sc-modal__box{
  padding:0; width:100%; max-width:360px;
  border-radius:18px;
  display:flex; flex-direction:column;
  max-height:min(560px, 80dvh);
  overflow:hidden;
}
.sc-chat__header{
  flex:none; display:flex; align-items:center; gap:10px;
  padding:12px 14px; background:var(--navy,#1d3b2c); color:#fff;
}
.sc-chat__avatar{
  width:34px; height:34px; border-radius:50%; flex:none;
  display:flex; align-items:center; justify-content:center;
  background:linear-gradient(135deg,var(--green,#1f8f4e),var(--blue,#c2811f));
  font-family:var(--font-display,inherit); font-weight:700; font-size:.95rem;
}
.sc-chat__headtext{ display:flex; flex-direction:column; line-height:1.25; flex:1; min-width:0; }
.sc-chat__headtext strong{ font-size:.92rem; font-weight:700; }
.sc-chat__headtext em{ font-style:normal; font-size:.72rem; color:#b7c9b6; display:flex; align-items:center; gap:5px; }
.sc-chat__dot{ width:6px; height:6px; border-radius:50%; background:#3fd07f; display:inline-block; }
.sc-chat__close{
  border:0; background:rgba(255,255,255,.1); color:#fff; width:26px; height:26px; border-radius:50%;
  font-size:1.15rem; line-height:1; cursor:pointer; flex:none; padding:0;
}
.sc-chat{ display:flex; flex-direction:column; flex:1; min-height:0; color:var(--ink,#10182b); background:#fafbfc; }
.sc-chat__log{
  flex:1; min-height:0; overflow-y:auto;
  display:flex; flex-direction:column; gap:6px;
  padding:14px; -webkit-overflow-scrolling:touch;
}
.sc-chat__msg{ padding:.5rem .75rem; border-radius:14px; max-width:82%; font-size:.87rem; line-height:1.38; word-break:break-word; }
.sc-chat__msg--simage{ background:#eef0f3; color:#1c2333; align-self:flex-start; border-bottom-left-radius:4px; }
.sc-chat__msg--usuario{ background:var(--green,#1f8f4e); color:#fff; align-self:flex-end; border-bottom-right-radius:4px; }
.sc-chat__form{ display:flex; align-items:center; gap:6px; padding:10px; border-top:1px solid rgba(0,0,0,.07); flex:none; background:#fff; }
.sc-chat__input{
  flex:1 1 auto; min-width:0; padding:9px 14px; border:1px solid rgba(0,0,0,.13);
  border-radius:999px; font-size:16px; color:var(--ink,#10182b); background:#f4f5f7;
}
.sc-chat__file-btn, .sc-chat__send{
  border:0; cursor:pointer; flex:none;
  width:38px; height:38px; border-radius:50%; padding:0;
  display:flex; align-items:center; justify-content:center; font-size:1rem;
}
.sc-chat__send{ background:var(--green,#1f8f4e); color:#fff; font-size:1rem; transform:translateX(1px); }
.sc-chat__file-btn{ background:#eef0f3; }
.sc-chat__ver-catalogo{
  align-self:flex-start; margin-top:2px; border:0; background:var(--blue,#c2811f); color:#fff;
  border-radius:999px; padding:.5rem .95rem; cursor:pointer; font-weight:600; font-size:.82rem;
}
.sc-chat__skip{
  flex:none; border:1px solid rgba(0,0,0,.15); background:#fff; color:var(--ink,#10182b);
  border-radius:999px; padding:0 12px; height:38px; font-size:.8rem; cursor:pointer;
}

/* ---------- Catálogo ---------- */
.sc-catalogo{ max-width:960px; margin:0 auto; }
.sc-back{
  border:0; background:none; padding:10px 4px; cursor:pointer;
  font-size:.9rem; opacity:.7; display:inline-flex; align-items:center; gap:6px;
  margin-bottom:12px;
}
.sc-back:hover{ opacity:1; }
.sc-catalogo__buscar-wrap{
  display:flex; justify-content:flex-end; margin:0 0 12px;
}
.sc-catalogo__buscar{
  width:44px; height:44px; border:1px solid rgba(0,0,0,.12); border-radius:50%;
  background:#fff; color:var(--navy,#1d3b2c); display:inline-flex; align-items:center; justify-content:center;
  cursor:pointer; box-shadow:var(--shadow-sm,0 4px 12px -8px rgba(10,26,61,.35));
  transition:transform .15s ease, box-shadow .15s ease, background .15s ease;
}
.sc-catalogo__buscar:hover{ transform:translateY(-1px); box-shadow:0 7px 16px -10px rgba(10,26,61,.45); }
.sc-catalogo__buscar:focus-visible{ outline:2px solid var(--green,#1f8f4e); outline-offset:3px; }
.sc-catalogo__buscar svg{ width:21px; height:21px; fill:none; stroke:currentColor; stroke-width:2; stroke-linecap:round; stroke-linejoin:round; }
.sc-catalogo__filtros{
  display:grid; grid-template-columns:1fr; gap:10px; margin:0 0 20px; padding:12px;
  border:1px solid rgba(0,0,0,.08); border-radius:14px; background:rgba(255,255,255,.7);
}
.sc-catalogo__filtros[hidden]{ display:none; }
@media (min-width:560px){
  .sc-catalogo__filtros{ grid-template-columns:1fr 1fr; }
}
@media (min-width:860px){
  .sc-catalogo__filtros{ grid-template-columns:2fr 1.3fr 1fr 1fr auto; align-items:center; }
}
.sc-catalogo__filtros input, .sc-catalogo__filtros select{
  padding:.7rem .8rem; border:1px solid rgba(0,0,0,.15); border-radius:10px; width:100%; font-size:.95rem;
}
.sc-catalogo__filtros button{
  border:0; background:var(--blue,#c2811f); color:#fff; border-radius:10px; padding:.7rem 1.2rem; cursor:pointer; font-weight:600;
}
.sc-catalogo__grid{
  display:grid; grid-template-columns:repeat(2,1fr); gap:14px;
}
@media (min-width:560px){
  .sc-catalogo__grid{ grid-template-columns:repeat(auto-fill, minmax(200px,1fr)); }
}
.sc-catalogo__cargando, .sc-catalogo__vacio{ grid-column:1/-1; text-align:center; opacity:.6; padding:2rem 0; }
.sc-catalogo__mas{
  display:block; margin:1.5rem auto 0; border:1px solid rgba(0,0,0,.15); background:#fff;
  border-radius:10px; padding:.7rem 1.5rem; cursor:pointer; font-weight:600;
}

.sc-producto{
  border:1px solid rgba(0,0,0,.08); border-radius:14px; overflow:hidden; background:#fff;
  display:flex; flex-direction:column; box-shadow:var(--shadow-sm,0 6px 16px -10px rgba(10,26,61,.3));
}
.sc-producto__foto{ height:120px; background:#f1f3f5 center/cover no-repeat; display:flex; align-items:center; justify-content:center; font-size:2rem; }
@media (min-width:560px){ .sc-producto__foto{ height:140px; } }
.sc-producto__body{ padding:.85rem; display:flex; flex-direction:column; gap:.25rem; }
.sc-producto__body h4{ margin:0; font-size:.95rem; }
.sc-producto__meta{ font-size:.78rem; opacity:.65; margin:0; }
.sc-producto__precio{ font-weight:700; margin:.25rem 0; color:var(--navy,#1d3b2c); }
.sc-producto__contactar{
  margin-top:.5rem; border:0; background:var(--green,#1f8f4e); color:#fff; border-radius:8px;
  padding:.65rem; cursor:pointer; font-weight:600; font-size:.9rem;
}

/* ---------- Modal contactar ---------- */
.sc-modal{
  position:fixed; inset:0; background:rgba(7,18,41,.6);
  display:flex; align-items:flex-end; justify-content:center; z-index:1000; padding:0;
}
@media (min-width:560px){
  .sc-modal{ align-items:center; padding:1rem; }
}
.sc-modal__box{
  background:#fff; border-radius:18px 18px 0 0; padding:1.5rem; max-width:420px; width:100%;
  position:relative; max-height:90dvh; overflow-y:auto;
  color:var(--ink,#10182b); /* si no, hereda el blanco del fondo del hero y el texto queda invisible */
}
@media (min-width:560px){
  .sc-modal__box{ border-radius:16px; }
}
.sc-modal__box p{ color:var(--ink-soft,#4b5468); font-size:.92rem; }
.sc-modal__cerrar{ position:absolute; top:.6rem; right:.75rem; border:0; background:none; font-size:1.6rem; cursor:pointer; line-height:1; padding:6px; color:var(--ink,#10182b); }
.sc-modal__box h3{ padding-right:24px; color:var(--navy,#1d3b2c); }
.sc-modal__box form{ display:flex; flex-direction:column; gap:.7rem; margin-top:1rem; }
.sc-modal__box input, .sc-modal__box textarea{ padding:.7rem .8rem; border:1px solid rgba(0,0,0,.15); border-radius:10px; font-family:inherit; font-size:1rem; color:var(--ink,#10182b); background:#fff; }
.sc-modal__box button[type="submit"]{ border:0; background:var(--green,#1f8f4e); color:#fff; border-radius:10px; padding:.75rem; cursor:pointer; font-weight:600; }
.sc-modal__estado{ margin-top:.75rem; font-size:.9rem; }

/* ---------- Panel del comerciante (cuenta) ---------- */
.sc-panel{ max-width:440px; margin:0 auto; }
.sc-panel__tabs{ display:flex; gap:.5rem; margin-bottom:1rem; }
.sc-panel__tabs button{ flex:1; padding:.7rem; border:1px solid rgba(0,0,0,.15); background:#fff; border-radius:10px; cursor:pointer; font-weight:600; }
.sc-panel__tabs button.is-active{ background:var(--green,#1f8f4e); color:#fff; border-color:var(--green,#1f8f4e); }
.sc-panel__form, #sc-panel-publicar{ display:flex; flex-direction:column; gap:.7rem; }
.sc-panel__form input, #sc-panel-publicar input{ padding:.7rem .8rem; border:1px solid rgba(0,0,0,.15); border-radius:10px; font-size:1rem; }
.sc-panel__form button, #sc-panel-publicar button{ border:0; background:var(--green,#1f8f4e); color:#fff; border-radius:10px; padding:.75rem; cursor:pointer; font-weight:600; }
.sc-panel__producto{ display:flex; justify-content:space-between; align-items:center; padding:.6rem 0; border-bottom:1px solid rgba(0,0,0,.06); gap:10px; }

/* ---------- Compra conversacional ---------- */
#sc-modal-comprar .sc-chat-modal__box{max-height:min(680px,88dvh);}
#sc-compra-chat{min-height:0;}
.sc-chat__choices{display:flex;flex-wrap:wrap;gap:8px;padding:0 14px 10px;}
.sc-chat__choice,.sc-chat__confirmar{border:0;border-radius:999px;padding:10px 14px;cursor:pointer;font-weight:700;font-size:.82rem;}
.sc-chat__choice--seguir{background:#e9f5ed;color:#16753e;}
.sc-chat__choice--finalizar,.sc-chat__confirmar{background:var(--blue,#c2811f);color:#fff;}
.sc-chat__confirmar{display:block;margin:0 14px 10px;width:calc(100% - 28px);}
.sc-compra-resumen{margin:0 14px 10px;padding:12px;border:1px solid rgba(0,0,0,.1);border-radius:12px;background:#f7f8f8;color:#1c2333;font-size:.82rem;line-height:1.45;}
.sc-compra-resumen h4{margin:0 0 8px;color:var(--navy,#1d3b2c);font-size:1rem;}
.sc-compra-resumen__item{padding:6px 0;border-bottom:1px solid rgba(0,0,0,.07);}
.sc-compra-resumen__contacto{margin:9px 0 4px;}
.sc-compra-resumen__total{display:block;margin-top:7px;font-size:1rem;color:var(--navy,#1d3b2c);}
@media(max-width:480px){
 #sc-modal-comprar .sc-chat-modal__box{max-width:100%;max-height:92dvh;border-radius:16px 16px 0 0;}
 #sc-modal-comprar .sc-chat__msg{font-size:.84rem;max-width:88%;}
 .sc-chat__choices{flex-direction:column;}
 .sc-chat__choice{width:100%;}
}

/* ==========================================================
   MAQUÎT 1.8.4 — CHAT INMERSIVO A PANTALLA COMPLETA
   Inspirado en la claridad de las apps modernas de mensajería.
   ========================================================== */
body.sc-chat-open{overflow:hidden!important;touch-action:none;}
.sc-chat-modal{
  position:fixed!important;
  inset:0!important;
  z-index:99999!important;
  width:100vw!important;
  height:100dvh!important;
  min-height:100svh!important;
  padding:0!important;
  margin:0!important;
  align-items:stretch!important;
  justify-content:stretch!important;
  background:#efeae2!important;
  backdrop-filter:none!important;
}
.sc-chat-modal[hidden]{display:none!important;}
.sc-chat-modal .sc-modal__box,
#sc-modal-comprar .sc-chat-modal__box{
  width:100%!important;
  max-width:none!important;
  height:100%!important;
  min-height:100%!important;
  max-height:none!important;
  margin:0!important;
  padding:0!important;
  border:0!important;
  border-radius:0!important;
  box-shadow:none!important;
  overflow:hidden!important;
  display:flex!important;
  flex-direction:column!important;
  background:#efeae2!important;
}
.sc-chat__header{
  min-height:64px!important;
  padding:calc(8px + env(safe-area-inset-top)) max(14px,env(safe-area-inset-right)) 8px max(14px,env(safe-area-inset-left))!important;
  background:#075e54!important;
  color:#fff!important;
  box-shadow:0 1px 0 rgba(0,0,0,.15)!important;
  gap:11px!important;
  z-index:4;
}
.sc-chat__avatar{
  width:42px!important;height:42px!important;
  background:#25d366!important;
  color:#053f37!important;
  font-size:1.05rem!important;
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.2)!important;
}
.sc-chat__headtext strong{font-size:1rem!important;letter-spacing:.01em;}
.sc-chat__headtext em{font-size:.76rem!important;color:#d6f1eb!important;}
.sc-chat__dot{background:#52e27d!important;box-shadow:0 0 0 2px rgba(82,226,125,.15);}
.sc-chat__close{
  width:40px!important;height:40px!important;
  background:transparent!important;
  border-radius:50%!important;
  font-size:1.7rem!important;
  transition:background .15s ease,transform .15s ease;
}
.sc-chat__close:hover,.sc-chat__close:focus-visible{background:rgba(255,255,255,.13)!important;outline:none;}
.sc-chat__close:active{transform:scale(.94);}
.sc-chat{
  flex:1 1 auto!important;
  min-height:0!important;
  height:auto!important;
  background-color:#efeae2!important;
  background-image:
    radial-gradient(circle at 20% 20%,rgba(255,255,255,.35) 0 1px,transparent 1.5px),
    radial-gradient(circle at 80% 60%,rgba(7,94,84,.055) 0 1px,transparent 1.5px)!important;
  background-size:28px 28px,34px 34px!important;
}
.sc-chat__log{
  flex:1 1 auto!important;
  min-height:0!important;
  overflow-y:auto!important;
  overscroll-behavior:contain;
  gap:7px!important;
  padding:18px max(12px,calc((100vw - 920px)/2)) 14px!important;
  scrollbar-width:thin;
}
.sc-chat__msg{
  position:relative;
  max-width:min(78%,680px)!important;
  padding:8px 11px!important;
  border-radius:9px!important;
  font-size:clamp(.88rem,1.7vw,.98rem)!important;
  line-height:1.42!important;
  box-shadow:0 1px 1px rgba(0,0,0,.10)!important;
}
.sc-chat__msg--simage{
  align-self:flex-start!important;
  background:#fff!important;
  color:#202c33!important;
  border-top-left-radius:2px!important;
}
.sc-chat__msg--usuario{
  align-self:flex-end!important;
  background:#d9fdd3!important;
  color:#202c33!important;
  border-top-right-radius:2px!important;
}
.sc-chat__form{
  flex:none!important;
  width:100%!important;
  margin:0!important;
  padding:8px max(10px,env(safe-area-inset-right)) calc(8px + env(safe-area-inset-bottom)) max(10px,env(safe-area-inset-left))!important;
  border:0!important;
  background:#f0f2f5!important;
  gap:8px!important;
  box-shadow:0 -1px 0 rgba(0,0,0,.07)!important;
}
.sc-chat__input{
  height:46px!important;
  padding:0 17px!important;
  border:0!important;
  border-radius:23px!important;
  background:#fff!important;
  color:#202c33!important;
  box-shadow:none!important;
  font-size:16px!important;
  outline:none!important;
}
.sc-chat__input:focus{box-shadow:inset 0 0 0 2px rgba(37,211,102,.22)!important;}
.sc-chat__send,.sc-chat__file-btn{
  width:46px!important;height:46px!important;
  border-radius:50%!important;
  box-shadow:0 2px 7px rgba(0,0,0,.12)!important;
}
.sc-chat__send{background:#00a884!important;color:#fff!important;font-size:1.15rem!important;}
.sc-chat__file-btn{background:#fff!important;color:#54656f!important;}
.sc-chat__skip{height:42px!important;background:#fff!important;border:0!important;box-shadow:0 1px 3px rgba(0,0,0,.08)!important;}
.sc-chat__choices{
  width:min(100%,920px)!important;
  margin:0 auto!important;
  padding:8px 12px 12px!important;
  background:transparent!important;
}
.sc-chat__choice,.sc-chat__confirmar{
  min-height:44px!important;
  border-radius:12px!important;
  font-size:.9rem!important;
}
.sc-chat__choice--seguir{background:#fff!important;color:#087d68!important;box-shadow:0 1px 3px rgba(0,0,0,.1)!important;}
.sc-chat__choice--finalizar,.sc-chat__confirmar{background:#00a884!important;color:#fff!important;}
.sc-chat__confirmar{
  width:min(calc(100% - 24px),896px)!important;
  margin:0 auto 10px!important;
}
.sc-compra-resumen{
  width:min(calc(100% - 24px),896px)!important;
  margin:0 auto 10px!important;
  padding:14px!important;
  border:0!important;
  border-radius:12px!important;
  background:#fff!important;
  box-shadow:0 1px 3px rgba(0,0,0,.1)!important;
}
#sc-compra-estado{width:min(calc(100% - 24px),896px);margin:0 auto 6px;color:#45535b;}
@media (min-width:900px){
  .sc-chat__header{padding-left:max(24px,calc((100vw - 920px)/2))!important;padding-right:max(24px,calc((100vw - 920px)/2))!important;}
  .sc-chat__msg{max-width:64%!important;}
}
@media (max-width:480px){
  .sc-chat__header{min-height:58px!important;}
  .sc-chat__avatar{width:38px!important;height:38px!important;}
  .sc-chat__log{padding-top:12px!important;}
  .sc-chat__msg{max-width:88%!important;font-size:.9rem!important;}
  .sc-chat__choices{flex-direction:column!important;}
  .sc-chat__choice{width:100%!important;}
}

/* MAQUÎT Core 1.8.5 — protección del compositor frente a barras fijas/teclado. */
body.sc-chat-open .sc-chat-modal{
  height:var(--makit-chat-vv-height,100dvh)!important;
  min-height:0!important;
  max-height:var(--makit-chat-vv-height,100dvh)!important;
  top:var(--makit-chat-vv-top,0px)!important;
  bottom:auto!important;
}
body.sc-chat-open .sc-chat-modal .sc-modal__box{height:100%!important;min-height:0!important;max-height:100%!important;}
body.sc-chat-open .sc-chat{min-height:0!important;overflow:hidden!important;}
body.sc-chat-open .sc-chat__log{min-height:0!important;}
body.sc-chat-open .sc-chat__form{position:relative!important;z-index:20!important;flex:0 0 auto!important;}


/* MAQUÎT Core 1.9.3 — mercado de hortalizas como identidad visual común. */
.sc-chat-modal .sc-modal__box,.sc-flow-modal .sc-modal__box{
  background:linear-gradient(rgba(247,252,248,.92),rgba(247,252,248,.92)),url('../images/market-vegetables.jpg') center/cover no-repeat!important;
}
.sc-chat{background:linear-gradient(rgba(246,250,247,.88),rgba(246,250,247,.88)),url('../images/market-vegetables.jpg') center/cover no-repeat!important;}
.sc-catalogo{background:linear-gradient(rgba(255,255,255,.90),rgba(255,255,255,.90)),url('../images/market-vegetables.jpg') center/cover no-repeat;border-radius:18px;padding:12px;}


/* MAQUÎT Core 1.9.4 — chat visible completo desde la primera pregunta. */
body.sc-chat-open .sc-chat-modal{overflow:hidden!important;}
body.sc-chat-open .sc-chat-modal .sc-modal__box{display:flex!important;flex-direction:column!important;}
body.sc-chat-open .sc-chat__header{flex:0 0 auto!important;position:relative!important;top:auto!important;}
body.sc-chat-open .sc-chat{display:flex!important;flex-direction:column!important;flex:1 1 auto!important;min-height:0!important;}
body.sc-chat-open .sc-chat__log{
  flex:1 1 auto!important;
  min-height:0!important;
  overflow-y:auto!important;
  scroll-padding-top:16px!important;
  scroll-padding-bottom:16px!important;
  -webkit-overflow-scrolling:touch;
}
body.sc-chat-open .sc-chat__form{flex:0 0 auto!important;position:relative!important;bottom:auto!important;}
@media (max-width:1024px), (pointer:coarse){
  body.sc-chat-open .sc-chat__log{padding-top:12px!important;}
  body.sc-chat-open .sc-chat__form{padding-bottom:max(8px,env(safe-area-inset-bottom))!important;}
}

/* ==========================================================
   MAQUÎT Core 1.9.6 — el teclado nunca cubre el compositor.
   El modal sigue exactamente el Visual Viewport real.
   ========================================================== */
body.sc-chat-open{position:fixed!important;inset:0!important;width:100%!important;overflow:hidden!important;}
body.sc-chat-open .sc-chat-modal{
  position:fixed!important;
  top:0!important;
  left:0!important;
  right:auto!important;
  bottom:auto!important;
  width:var(--makit-chat-vv-width,100vw)!important;
  height:var(--makit-chat-vv-height,100dvh)!important;
  min-height:0!important;
  max-height:var(--makit-chat-vv-height,100dvh)!important;
  transform:translate3d(var(--makit-chat-vv-left,0px),var(--makit-chat-vv-top,0px),0)!important;
  overflow:hidden!important;
}
body.sc-chat-open .sc-chat-modal .sc-modal__box{
  height:100%!important;min-height:0!important;max-height:100%!important;overflow:hidden!important;
}
body.sc-chat-open .sc-chat{height:100%!important;min-height:0!important;display:flex!important;flex-direction:column!important;overflow:hidden!important;}
body.sc-chat-open .sc-chat__header{flex:0 0 auto!important;}
body.sc-chat-open .sc-chat__log{flex:1 1 0%!important;min-height:0!important;overflow-y:auto!important;}
body.sc-chat-open .sc-chat__form{
  flex:0 0 auto!important;
  position:sticky!important;
  bottom:0!important;
  z-index:50!important;
  margin:0!important;
  padding-bottom:max(8px,env(safe-area-inset-bottom))!important;
  background:#f0f2f5!important;
}
@media (max-width:1024px),(pointer:coarse){
  body.sc-chat-open .sc-chat__input{font-size:16px!important;}
  body.sc-chat-open .sc-chat__form{min-height:62px!important;}
}
