:root {
  --bg: #ffffff;
  --surface: #f6f6f7;
  --border: #e5e5e7;
  --text: #1c1c1e;
  --text-muted: #6b6b70;
  --dark: #1c1c1e;
  --whatsapp: #25d366;
  --whatsapp-dark: #1ea952;
  --radius: 14px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
}

a { text-decoration: none; color: inherit; }
button { font-family: inherit; cursor: pointer; }
img { max-width: 100%; display: block; }
.hidden { display: none !important; }

.share-status {
  margin-top: 8px;
  font-size: 13px;
  color: var(--text-muted);
  text-align: center;
}

.product-description {
  margin: 16px 0;
  line-height: 1.5;
  color: var(--text);
}

.product-description-list {
  margin: 16px 0;
  padding-left: 20px;
  line-height: 1.6;
  color: var(--text);
}

.product-description-list li {
  margin-bottom: 6px;
}

/* ---------- Header ---------- */
#siteHeader {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.logo-link { display: flex; align-items: center; }
.logo-img { height: 40px; width: auto; }

#navToggle {
  display: none;
  flex-direction: column;
  gap: 4px;
  background: none;
  border: none;
  padding: 8px;
  margin-left: auto;
}
#navToggle span {
  width: 22px;
  height: 2px;
  background: var(--text);
  display: block;
}

#mainNav {
  display: flex;
  gap: 24px;
  margin-left: 32px;
  flex: 1;
}
#mainNav a {
  font-weight: 500;
  font-size: 15px;
  color: var(--text);
}
#mainNav a:hover { color: var(--whatsapp-dark); }

.btn {
  display: inline-block;
  padding: 10px 22px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 14px;
  border: none;
  text-align: center;
}
.btn-pill {
  background: var(--dark);
  color: #fff;
}
.btn-pill:hover { background: #333; }

.btn-whatsapp {
  background: var(--whatsapp);
  color: #fff;
}
.btn-whatsapp:hover { background: var(--whatsapp-dark); }

.btn-outline {
  background: transparent;
  color: var(--text);
  border: 1.5px solid var(--text);
}
.btn-outline:hover { background: var(--text); color: #fff; }

.btn-block { display: block; text-align: center; }

/* ---------- Avisos (carrusel de comunicación interna: saludo, lo más compartido, herramienta del día, mensaje de Ronal) ---------- */
#avisos {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 60vh;
  overflow: hidden;
  background: #111;
  text-align: center;
}

.aviso-media {
  position: absolute;
  inset: 0;
}
.aviso-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.45;
  filter: blur(1px) brightness(0.75);
  transition: opacity 0.4s ease;
}

.aviso-content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 40px 24px;
  color: #fff;
  background: linear-gradient(rgba(0,0,0,0.35), rgba(0,0,0,0.55));
  width: 100%;
  height: 100%;
  justify-content: center;
}

#avisoTitle {
  max-width: 640px;
  font-size: 32px;
  margin: 0 0 10px;
  font-weight: 700;
}
#avisoDesc {
  max-width: 560px;
  margin: 0 auto 20px;
  font-size: 17px;
  color: rgba(255,255,255,0.9);
}

#avisoCta.btn-pill {
  border: 1.5px solid #fff;
  color: #fff;
  background: transparent;
}
#avisoCta.btn-pill:hover { background: #fff; color: #111; }

.hero-dots {
  display: flex;
  gap: 8px;
  margin-top: 22px;
}
.hero-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255,255,255,0.4);
  cursor: pointer;
}
.hero-dot.active { background: #fff; }

/* ---------- Por qué Muebles y Colchones Imperial ---------- */
#porQue {
  max-width: 1200px;
  margin: 0 auto;
  padding: 48px 20px 0;
}

.why-card {
  background: var(--dark);
  color: #fff;
  border-radius: var(--radius);
  padding: 28px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.why-copy { flex: 1 1 auto; }

.why-title {
  margin: 0 0 10px;
  font-size: 20px;
  font-weight: 700;
}

.why-text {
  margin: 0;
  font-size: 15px;
  line-height: 1.6;
  color: rgba(255,255,255,0.88);
  max-width: 680px;
}

.why-logo-circle {
  flex: 0 0 auto;
  width: 96px;
  height: 96px;
  border-radius: 50%;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
  box-shadow: 0 6px 18px rgba(0,0,0,0.25);
}

.why-logo-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

@media (max-width: 640px) {
  .why-card { flex-direction: column; text-align: center; }
  .why-logo-circle { width: 72px; height: 72px; }
}

#metaVenta {
  max-width: 1200px;
  margin: 0 auto;
  padding: 48px 20px 0;
}

.goal-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  transition: background 0.4s ease, border-color 0.4s ease;
}

.goal-card--celebrate {
  background: linear-gradient(135deg, #fff7e0, #fff);
  border-color: #f0c94a;
}

.goal-heading {
  margin: 0 0 14px;
  font-size: 20px;
  font-weight: 700;
  color: #a9740a;
}

.goal-bar-track {
  width: 100%;
  height: 14px;
  border-radius: 999px;
  background: var(--surface);
  overflow: hidden;
}

.goal-bar-fill {
  height: 100%;
  border-radius: 999px;
  background: var(--whatsapp);
  transition: width 0.5s ease, background 0.4s ease;
  width: 0%;
}

.goal-bar-fill--celebrate {
  background: linear-gradient(90deg, #f0c94a, #f5a623);
}

.goal-bar-fill--team {
  background: var(--dark);
}

#metaEquipo {
  max-width: 1200px;
  margin: 0 auto;
  padding: 48px 20px 0;
}

.goal-text {
  margin: 12px 0 0;
  font-size: 14px;
  color: var(--text-muted);
}


/* ---------- Catalog ---------- */
#catalogo {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 20px 80px;
}

.section-title {
  font-size: 26px;
  font-weight: 700;
  margin: 0 0 20px;
}

.catalog-search {
  display: block;
  width: 100%;
  padding: 12px 16px;
  margin-bottom: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 15px;
  font-family: inherit;
  background: var(--surface);
  color: var(--text);
}
.catalog-search:focus {
  outline: none;
  border-color: var(--text-muted);
}

.search-empty {
  color: var(--text-muted);
  padding: 24px 0;
  text-align: center;
}

/* ---------- Pantalla de inicio de sesión ---------- */
.login-screen {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface);
  padding: 24px;
}

.login-box {
  width: 100%;
  max-width: 340px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  text-align: center;
}

.login-logo {
  width: 72px;
  height: 72px;
  object-fit: contain;
  margin: 0 auto 8px;
}

.login-title {
  font-size: 22px;
  font-weight: 700;
  margin: 0;
}

.login-subtitle {
  color: var(--text-muted);
  margin: 0 0 8px;
  font-size: 14px;
}

.login-input {
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 15px;
  font-family: inherit;
  background: #fff;
  color: var(--text);
}
.login-input:focus {
  outline: none;
  border-color: var(--text-muted);
}

.login-error {
  color: #c0392b;
  font-size: 13px;
  margin: 0;
}

#logoutLink { cursor: pointer; display: inline-flex; align-items: center; gap: 8px; }
#changeAvatarLink { cursor: pointer; }

.nav-avatar {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--border);
}

.avatar-preview {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  object-fit: cover;
  margin: 0 auto 8px;
  border: 1px solid var(--border);
}

.category-bar {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 8px;
  margin-bottom: 28px;
  scrollbar-width: none;
}
.category-bar::-webkit-scrollbar { display: none; }

.cat-chip {
  flex: 0 0 auto;
  padding: 9px 18px;
  border-radius: 999px;
  border: 1.5px solid var(--border);
  background: #fff;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-muted);
  white-space: nowrap;
}
.cat-chip.active {
  background: var(--dark);
  border-color: var(--dark);
  color: #fff;
}

.variant-picker {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.variant-chip {
  padding: 7px 16px;
  border-radius: 999px;
  border: 1.5px solid var(--border);
  background: #fff;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
}
.variant-chip.active {
  background: var(--dark);
  border-color: var(--dark);
  color: #fff;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

@media (min-width: 640px) {
  .product-grid { grid-template-columns: repeat(2, 1fr); gap: 28px; }
}
@media (min-width: 960px) {
  .product-grid { grid-template-columns: repeat(3, 1fr); gap: 32px; }
}

.product-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.product-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 24px rgba(0,0,0,0.08);
}

.product-thumb {
  aspect-ratio: 1 / 1;
  background: var(--surface);
  overflow: hidden;
}
.product-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.thumb-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 13px;
  text-align: center;
  padding: 12px;
}

.product-cat {
  font-size: 12px;
  color: var(--text-muted);
  margin: 12px 12px 2px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.product-name {
  font-size: 15px;
  font-weight: 700;
  margin: 0 12px 14px;
}

/* ---------- Product detail ---------- */
#productView {
  max-width: 900px;
  margin: 0 auto;
  padding: 32px 20px 80px;
}

.back-link {
  display: inline-block;
  margin-bottom: 20px;
  font-weight: 600;
  color: var(--text-muted);
}
.back-link:hover { color: var(--text); }

.product-title {
  font-size: 30px;
  font-weight: 700;
  margin: 4px 0 24px;
}

.gallery-main {
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
  margin-bottom: 12px;
}
.gallery-main img,
.gallery-main video {
  width: 100%;
  max-height: 560px;
  object-fit: contain;
  background: var(--surface);
}

.gallery-thumbs {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  margin-bottom: 28px;
}
.gallery-thumb {
  width: 84px;
  height: 84px;
  object-fit: cover;
  border-radius: 10px;
  border: 2px solid transparent;
  cursor: pointer;
  flex: 0 0 auto;
}
.gallery-thumb.active { border-color: var(--dark); }

.gallery-thumb-wrap {
  position: relative;
  flex: 0 0 auto;
}
.thumb-check {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 22px;
  height: 22px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.9);
  border: 2px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.thumb-check input {
  width: 16px;
  height: 16px;
  cursor: pointer;
}
.thumb-check.checked {
  background: var(--dark);
  border-color: var(--dark);
}

.thumb-delete {
  position: absolute;
  bottom: 4px;
  right: 4px;
  width: 24px;
  height: 24px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.9);
  border: 2px solid #e11d48;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 12px;
  padding: 0;
}

.gallery-thumb--video {
  position: relative;
  overflow: hidden;
  background: #000;
}
.gallery-thumb--video video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
}
.gallery-thumb-play {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 22px;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.6);
  background: rgba(0, 0, 0, 0.15);
  pointer-events: none;
}

.gallery-empty {
  padding: 80px 20px;
  text-align: center;
  background: var(--surface);
  border-radius: var(--radius);
  color: var(--text-muted);
  margin-bottom: 28px;
  font-size: 15px;
}

.not-found { padding: 60px 20px; text-align: center; }

/* ---------- Footer ---------- */
#siteFooter {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 48px 20px;
  text-align: center;
}
.footer-logo { height: 44px; margin: 0 auto 14px; }
.footer-tagline { color: var(--text-muted); font-size: 14px; margin: 0 0 18px; }
.footer-whatsapp {
  display: inline-block;
  font-weight: 700;
  color: var(--whatsapp-dark);
  margin-bottom: 18px;
}
.footer-copy { font-size: 12px; color: var(--text-muted); margin: 0; }

/* ---------- Mobile nav ---------- */
@media (max-width: 760px) {
  #navToggle { display: flex; }
  #mainNav {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: #fff;
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    gap: 0;
    margin: 0;
    padding: 8px 0;
  }
  #mainNav.open { display: flex; }
  #mainNav a { padding: 14px 20px; border-bottom: 1px solid var(--border); }
  .header-inner .btn-pill { display: none; }
  #avisoTitle { font-size: 26px; }
}



/* ---------- Barra de pestañas de abajo ---------- */
body { padding-bottom: calc(78px + env(safe-area-inset-bottom)); }

.bottom-nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 60;
  display: flex;
  background: rgba(255, 255, 255, 0.97);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-top: 1px solid var(--border);
  padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
}
.bottom-nav button {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 7px 2px 5px;
  background: none;
  border: none;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  -webkit-tap-highlight-color: transparent;
}
.bottom-nav button svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.bottom-nav button.active { color: var(--dark); }
.bottom-nav button.active span { text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 2px; }

@media (min-width: 761px) {
  .bottom-nav {
    left: 50%;
    right: auto;
    width: 520px;
    transform: translateX(-50%);
    bottom: 16px;
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 6px 12px;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.08);
  }
}


/* ---------- Agente Imperial ---------- */
body { padding-bottom: 0 !important; }
#requestProductNavBtn { display: none !important; }
.login-figure { width: 120px; height: auto; margin: 0 auto 6px; filter: drop-shadow(0 8px 14px rgba(0,0,0,.25)); }
.agent-hero { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0; padding: 36px 24px; background: linear-gradient(135deg, #0b1633 0%, #123a8c 100%); color: #fff; overflow: hidden; }
.agent-text { flex: 1 1 auto; max-width: 560px; }
.agent-kicker { font-size: 11px; letter-spacing: .22em; color: #8fb4ff; margin: 0 0 10px; }
.agent-hero h1 { font-size: clamp(28px, 6vw, 42px); margin: 0 0 8px; }
.agent-sub { font-size: 16px; color: #d6e2ff; margin: 0 0 22px; line-height: 1.45; }
.agent-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.agent-card { flex: 1 1 200px; text-align: left; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.28); color: #fff; border-radius: 14px; padding: 14px 16px; display: flex; flex-direction: column; gap: 4px; transition: background .15s; }
.agent-card:hover { background: rgba(255,255,255,.2); }
.agent-card strong { font-size: 17px; }
.agent-card span { font-size: 13px; color: #cfdcff; }
.agent-figure { flex: 0 0 auto; width: clamp(110px, 24vw, 230px); height: auto; filter: drop-shadow(0 14px 24px rgba(0,0,0,.45)); }
@media (max-width: 560px) { .agent-hero { flex-direction: column-reverse; text-align: left; padding: 24px 18px; } .agent-figure { width: 120px; align-self: flex-end; } }
#guionesPane { max-width: 720px; margin: 0 auto; padding: 24px 18px 60px; }
.gui-intro { color: var(--text-muted); line-height: 1.5; margin: 0 0 18px; }
.gui-form { display: grid; gap: 14px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; }
.gui-form label { display: grid; gap: 6px; font-size: 14px; font-weight: 600; }
.gui-form select, .gui-form textarea { font: inherit; font-weight: 400; padding: 11px 12px; border: 1px solid var(--border); border-radius: 10px; background: #fff; width: 100%; }
.gui-msg { margin: 0; font-size: 14px; color: #1a7f45; min-height: 18px; }
.gui-sub { margin: 28px 0 12px; font-size: 18px; }
.gui-empty { color: var(--text-muted); }
.gui-card { border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; margin-bottom: 12px; background: #fff; }
.gui-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.gui-card small { color: var(--text-muted); }
.gui-nota { font-size: 14px; color: var(--text-muted); margin: 8px 0 0; }
.gui-badge { font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 99px; }
.gui-badge.wait { background: #fff4d6; color: #8a6a00; }
.gui-badge.ok { background: #dcf5e6; color: #14703d; }
.gui-text { white-space: pre-wrap; font: inherit; line-height: 1.55; background: var(--surface); border-radius: 10px; padding: 12px 14px; margin: 12px 0; }
.gui-copy { width: auto; padding: 9px 18px; }


/* ---------- Inicio oscuro (tarjetas de entrada) ---------- */
body.is-home { background: #0a0a0c; }
body.is-home #siteHeader, body.is-home #siteFooter { display: none; }
.home-dark { font-family: 'Inter', -apple-system, sans-serif; background: #0a0a0c; color: #fff; min-height: 100vh; max-width: 520px; margin: 0 auto; padding: 0 24px 40px; }
.hd-top { position: relative; display: flex; justify-content: space-between; align-items: center; padding: 56px 0 18px; }
.hd-top small { display: block; font-size: 13px; color: rgba(255,255,255,.55); }
.hd-top h1 { margin: 2px 0 0; font-size: 24px; font-weight: 600; }
.hd-avatar { width: 44px; height: 44px; border-radius: 50%; border: 0; padding: 0; overflow: hidden; background: #1a1a1e; cursor: pointer; }
.hd-avatar img { width: 100%; height: 100%; object-fit: cover; }
.hd-menu { position: absolute; right: 0; top: 108px; z-index: 40; background: rgba(30,30,34,.96); border: 1px solid rgba(255,255,255,.1); border-radius: 14px; padding: 6px; display: flex; flex-direction: column; min-width: 190px; }
.hd-menu a, .hd-menu button { text-align: left; background: none; border: 0; color: #fff; font: 500 14px 'Inter', sans-serif; padding: 11px 14px; border-radius: 10px; cursor: pointer; }
.hd-menu a:hover, .hd-menu button:hover { background: rgba(255,255,255,.08); }
.hd-cards { display: flex; flex-direction: column; gap: 16px; }
.hd-card { position: relative; display: block; width: 100%; height: 200px; border-radius: 16px; overflow: hidden; border: 0; padding: 0; background: #1a1a1e; color: #fff; cursor: pointer; text-align: center; text-decoration: none; }
.hd-card img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hd-grad { position: absolute; inset: 0; background: linear-gradient(to top, rgba(0,0,0,.35), transparent); }
.hd-pill { position: absolute; top: 12px; left: 12px; border-radius: 999px; padding: 4px 12px; font: 400 12px 'Inter', sans-serif; color: rgba(255,255,255,.9); }
.hd-dot { position: absolute; top: 12px; right: 12px; width: 32px; height: 32px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 16px; color: rgba(255,255,255,.8); }
.hd-big { position: absolute; left: 0; right: 0; bottom: 0; height: 80px; overflow: hidden; font-weight: 700; letter-spacing: -.03em; line-height: 1; color: rgba(255,255,255,.55); font-family: 'Inter', sans-serif; }
.hd-card:active { transform: scale(.985); }
.hd-soon { opacity: .75; cursor: default; }
.lg { background: rgba(255,255,255,.01); background-blend-mode: luminosity; backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); box-shadow: inset 0 1px 1px rgba(255,255,255,.1); overflow: hidden; }
.lg::before { content: ''; position: absolute; inset: 0; border-radius: inherit; padding: 1.4px; background: linear-gradient(180deg, rgba(255,255,255,.45) 0%, rgba(255,255,255,.15) 20%, rgba(255,255,255,0) 40%, rgba(255,255,255,0) 60%, rgba(255,255,255,.15) 80%, rgba(255,255,255,.45) 100%); -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0); -webkit-mask-composite: xor; mask-composite: exclude; pointer-events: none; }


/* ---------- Diseño claro por dentro (catálogo, producto, guiones, panel) ---------- */
:root { --bg: #f6f3ec; --surface: #ffffff; --border: #e4dfd3; --text: #14213d; --text-muted: #6f7686; --dark: #123a8c; --radius: 16px; --imp-blue: #123a8c; }
html, body { background: #f6f3ec; color: #14213d; font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; }
body.is-home { background: #0a0a0c; }
#siteHeader { background: #f6f3ec; border-bottom: 1px solid #e4dfd3; box-shadow: none; }
#mainNav a { color: #123a8c; font-weight: 600; }
.section-title { font-size: 32px; font-weight: 800; letter-spacing: -.02em; color: #14213d; }
.catalog-search { background: #fff; border: 0; border-radius: 14px; padding: 13px 16px; box-shadow: 0 1px 2px rgba(20,33,61,.06); }
.cat-chips { display: flex; gap: 8px; flex-wrap: wrap; margin: 14px 0 18px; }
.cat-chip { border: 0; background: #fff; color: #14213d; padding: 8px 15px; border-radius: 999px; font: 600 13px 'Inter', sans-serif; box-shadow: 0 1px 2px rgba(20,33,61,.06); cursor: pointer; }
.cat-chip.on { background: #123a8c; color: #fff; }
.product-grid { display: grid !important; grid-template-columns: repeat(2, 1fr) !important; gap: 18px 14px !important; }
@media (min-width: 820px) { .product-grid { grid-template-columns: repeat(4, 1fr) !important; } }
.product-card { background: transparent !important; border: 0 !important; box-shadow: none !important; padding: 0 !important; cursor: pointer; }
.product-card .product-thumb { aspect-ratio: 1 / 1; border-radius: 16px; overflow: hidden; background: #e8e3d6; }
.product-card .product-thumb img { width: 100%; height: 100%; object-fit: cover; }
.product-card .product-name { font-size: 14px; font-weight: 700; margin: 8px 0 0; color: #14213d; }
.product-card .product-cat { font-size: 12px; color: #7b8190; margin: 2px 0 0; text-transform: none; letter-spacing: 0; }
/* producto */
#productView { padding: 0 0 120px; max-width: 640px; margin: 0 auto; }
#productView .back-link { display: inline-block; margin: 18px 20px 12px; color: #123a8c; font-weight: 600; text-decoration: none; }
#productView .product-cat { margin: 4px 22px 0; font-size: 11px; font-weight: 700; letter-spacing: .14em; color: #123a8c; text-transform: uppercase; }
#productView .product-title { margin: 2px 22px 14px; font-size: 32px; font-weight: 800; letter-spacing: -.02em; color: #14213d; }
#productView .gallery { margin: 0; }
#productView .gallery-main { border-radius: 0; overflow: hidden; background: #e8e3d6; max-height: 460px; }
#productView .gallery-main img, #productView .gallery-main video { width: 100%; max-height: 460px; object-fit: cover; display: block; }
#productView .gallery-thumbs { display: flex; gap: 8px; padding: 10px 20px; overflow-x: auto; }
#productView .product-description-list { list-style: none; padding: 0 22px; margin: 16px 0; }
#productView .product-description-list li { position: relative; padding: 0 0 0 32px; margin-bottom: 12px; font-size: 15px; line-height: 1.4; }
#productView .product-description-list li::before { content: '✓'; position: absolute; left: 0; top: 1px; width: 20px; height: 20px; border-radius: 50%; background: #123a8c; color: #fff; font-size: 12px; font-weight: 800; display: flex; align-items: center; justify-content: center; }
#productView #copyDescBtn { display: block; margin: 8px 22px 0; width: calc(100% - 44px); background: #fff; border: 0; box-shadow: inset 0 0 0 1.5px #d9d5ca; color: #14213d; border-radius: 14px; padding: 13px; font-weight: 700; }
#productView #shareWaBtn { position: fixed; left: 20px; right: 20px; bottom: 22px; z-index: 40; max-width: 600px; margin: 0 auto; background: #25a244; color: #fff; border: 0; border-radius: 16px; padding: 16px; font-size: 15px; font-weight: 700; box-shadow: 0 8px 24px rgba(20,33,61,.18); }
#productView .share-status { margin: 10px 22px; }
/* guiones */
#guionesPane { max-width: 640px; }
#guionesPane .section-title { margin-bottom: 8px; }
.gui-form { background: #fff; border: 0; box-shadow: 0 1px 2px rgba(20,33,61,.06); }
.gui-form .btn-pill { background: #123a8c; border-radius: 14px; }
.gui-card { border: 0; box-shadow: 0 1px 3px rgba(20,33,61,.08); padding: 16px; }
.gui-head strong { font-size: 18px; letter-spacing: -.01em; }
.gui-plano { background: #eaf0ff; color: #123a8c; border-radius: 12px; padding: 10px 12px; font-size: 13px; line-height: 1.4; margin-top: 12px; }
.gui-blk { background: #f6f3ec; border-radius: 14px; padding: 12px 14px; margin-top: 10px; }
.gui-blk em { font-style: normal; font-size: 11px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: #123a8c; }
.gui-blk.out em { color: #8a5a00; } .gui-blk.rec em { color: #6f7686; }
.gui-blk p { margin: 6px 0 0; font-size: 15px; line-height: 1.5; white-space: pre-line; }
.gui-copy { width: 100%; margin-top: 14px; padding: 14px; border-radius: 14px; background: #123a8c; color: #fff; border: 0; font-weight: 700; }
.gui-badge.ok { background: #e6f4ea; color: #177a3c; }
.product-card .product-cat, .product-card .product-name { line-height: 1.35 !important; overflow: visible !important; }


/* ---------- Chat con Geppetto ---------- */
body.chat-open { overflow: hidden; }
.chat-pane { position: fixed; inset: 0; z-index: 100; background: #0a0a0c; color: #fff; display: flex; flex-direction: column; font-family: 'Inter', -apple-system, sans-serif; max-width: 560px; margin: 0 auto; }
.chat-top { display: flex; align-items: center; gap: 12px; padding: 46px 16px 12px; border-bottom: 1px solid rgba(255,255,255,.07); background: rgba(10,10,12,.9); }
.chat-top button { background: none; border: 0; color: #8fb4ff; font-size: 34px; line-height: 1; padding: 0 6px 4px 0; cursor: pointer; }
.chat-top img { width: 38px; height: 38px; border-radius: 50%; object-fit: cover; background: #1a1a1e; }
.chat-top b { font-size: 16px; font-weight: 600; display: block; } .chat-top small { font-size: 12px; color: rgba(255,255,255,.5); }
.chat-list { flex: 1; overflow-y: auto; padding: 14px 16px; display: flex; flex-direction: column; gap: 12px; }
.cm { max-width: 86%; padding: 11px 14px; border-radius: 18px; font-size: 14.5px; line-height: 1.42; white-space: pre-line; word-break: break-word; }
.cm.me { align-self: flex-end; background: #123a8c; border-bottom-right-radius: 6px; }
.cm.ge { align-self: flex-start; background: rgba(255,255,255,.08); border-bottom-left-radius: 6px; box-shadow: inset 0 1px 1px rgba(255,255,255,.1); }
.cm.wait { color: rgba(255,255,255,.55); font-style: italic; }
.cm-note { font-size: 12px; color: rgba(255,255,255,.6); margin-top: 4px; }
.cm-plan { margin-top: 8px; background: rgba(0,0,0,.35); border-radius: 12px; padding: 10px 12px; font-size: 13.5px; line-height: 1.45; color: rgba(255,255,255,.9); }
.cm-plan strong { display: block; font-size: 14px; margin-bottom: 4px; }
.cm-plan em { display: block; font-style: normal; font-size: 10px; font-weight: 800; letter-spacing: .14em; color: #8fb4ff; margin-top: 8px; }
.cm-sub { font-size: 12.5px; color: rgba(255,255,255,.65); }
.cm-acts { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.cm-btn { border: 0; border-radius: 12px; padding: 9px 13px; font: 700 13px 'Inter', sans-serif; color: #fff; cursor: pointer; }
.cm-btn.ok { background: #25a244; } .cm-btn.no { background: rgba(255,255,255,.12); }
.cm-btn:disabled { opacity: .5; }
.chat-hint { margin: 0; text-align: center; font-size: 11px; color: rgba(255,255,255,.4); padding: 4px 16px; }
.chat-attach { margin: 0; text-align: center; font-size: 12px; color: #8fb4ff; padding: 0 16px 8px; }
.chat-bar { display: flex; align-items: center; gap: 8px; padding: 8px 14px 22px; }
.chat-bar input[type=text] { flex: 1; min-width: 0; background: rgba(255,255,255,.08); border: 0; border-radius: 999px; padding: 12px 16px; color: #fff; font: 15px 'Inter', sans-serif; outline: none; }
.chat-bar input::placeholder { color: rgba(255,255,255,.4); }
.chat-ic { width: 40px; height: 40px; border-radius: 50%; border: 0; background: rgba(255,255,255,.08); color: #fff; font-size: 18px; display: flex; align-items: center; justify-content: center; cursor: pointer; flex: none; }
.chat-ic.rec { background: #d33; animation: pulso 1s infinite; }
.chat-send { width: 42px; height: 42px; border-radius: 50%; border: 0; background: #123a8c; color: #fff; font-size: 18px; cursor: pointer; flex: none; }
.chat-send:disabled { opacity: .5; }
@keyframes pulso { 50% { opacity: .55; } }


/* ---------- Guiones en tarjetas + vista de computador ---------- */
.gui-grid { display: grid; grid-template-columns: 1fr; gap: 14px; }
.gui-tile { background: #fff; border-radius: 16px; padding: 14px 16px; box-shadow: 0 1px 3px rgba(20,33,61,.08); display: flex; flex-direction: column; gap: 8px; border: 2px solid transparent; transition: transform .12s, box-shadow .12s; }
.gui-tile.click { cursor: pointer; }
.gui-tile.click:hover { transform: translateY(-2px); box-shadow: 0 8px 22px rgba(20,33,61,.12); }
.gui-tile.done { background: #f2f7f3; border-color: #cfe8d6; }
.gui-kind { font-size: 11px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: #123a8c; }
.gui-tile-title { margin: 0; font-size: 17px; line-height: 1.25; letter-spacing: -.01em; color: #14213d; }
.gui-tile-intro { margin: 0; font-size: 13.5px; line-height: 1.4; color: #5b6272; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.gui-sw-row { display: flex; gap: 14px; flex-wrap: wrap; margin-top: auto; padding-top: 6px; }
.sw { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-size: 12.5px; font-weight: 700; color: #5b6272; user-select: none; }
.sw input { position: absolute; opacity: 0; pointer-events: none; }
.sw-track { width: 38px; height: 22px; border-radius: 999px; background: #cfd3dc; position: relative; transition: background .15s; flex: none; }
.sw-track::after { content: ''; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.25); transition: transform .15s; }
.sw input:checked + .sw-track { background: #123a8c; }
.sw.gr input:checked + .sw-track { background: #25a244; }
.sw input:checked + .sw-track::after { transform: translateX(16px); }
.sw input:checked ~ .sw-lab { color: #14213d; }
.gui-modal { position: fixed; inset: 0; z-index: 120; background: rgba(10,16,30,.6); display: flex; align-items: center; justify-content: center; padding: 20px; }
.gui-modal-box { position: relative; background: #f6f3ec; border-radius: 20px; width: 100%; max-width: 680px; max-height: 88vh; overflow-y: auto; padding: 24px 22px 22px; }
.gui-modal-box h3 { margin: 0 34px 12px 0; font-size: 21px; letter-spacing: -.01em; }
.gui-modal-x { position: absolute; right: 12px; top: 8px; border: 0; background: none; font-size: 30px; line-height: 1; cursor: pointer; color: #5b6272; }
.gui-modal .gui-blk { background: #fff; }
@media (min-width: 640px) { .gui-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 980px) {
  .gui-grid { grid-template-columns: repeat(3, 1fr); }
  #guionesPane { max-width: 1180px !important; padding: 32px 32px 80px !important; display: grid; grid-template-columns: 340px 1fr; column-gap: 32px; align-items: start; }
  #guionesPane > .section-title, #guionesPane > .gui-intro { grid-column: 1 / -1; }
  #guionesPane > .gui-form { grid-column: 1; position: sticky; top: 90px; }
  #guionesPane > .gui-sub, #guionesPane > #guionFiltro, #guionesPane > #guionList { grid-column: 2; }
  #guionesPane > .gui-sub { grid-row: 3; margin-top: 0; }
  #guionesPane > #guionFiltro { grid-row: 4; }
  #guionesPane > #guionList { grid-row: 5; }
  #guionesPane > .gui-form { grid-row: 3 / span 3; }
  .home-dark { max-width: 1040px; padding: 0 32px 60px; }
  .hd-top { padding-top: 40px; }
  .hd-cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
  .hd-card { height: 280px; }
  .hd-big { height: 108px; }
  .hd-big { font-size: 80px !important; }
  #hdChat .hd-big { font-size: 46px !important; }
  .chat-pane { max-width: 820px; }
  .chat-list { padding: 20px 28px; }
  .cm { max-width: 72%; }
  #siteHeader .header-inner { max-width: 1180px; }
}
