:root {
  --bg-main: #f7f1ea;
  --bg-card: #ffffff;
  --primary: #8b5a2b;
  --primary-dark: #5b3a1a;
  --primary-light: #d8b38a;
  --accent: #c89656;
  --text-main: #2f2924;
  --text-muted: #7a6a5a;
  --border-soft: #e0d2c3;
  --shadow-soft: 0 14px 30px rgba(0,0,0,0.06);
  --radius-lg: 20px;
  --radius-md: 14px;
  --radius-pill: 999px;
  --transition-fast: 0.2s ease;
  --font-main: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    Roboto, sans-serif;
  --sh-primary: #8b5a2b;
  --sh-primary-dark: #5b3a1a;
  --sh-bg: #ffffff;
  --sh-bg-alt: #faf3eb;
  --sh-text: #2f2924;
  --sh-muted: #7a6a5a;
  --sh-border: #e0d2c3;
  --sh-radius-lg: 18px;
  --sh-radius-pill: 999px;
  --sh-shadow: 0 16px 40px rgba(0, 0, 0, 0.15);
  --sh-transition: 0.25s ease;
  --sh-font: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    Roboto, sans-serif;
}

/* === CHATBOT WIDGET – STYLES === */

#sh-chatbot-widget * {
  box-sizing: border-box;
  font-family: var(--sh-font);
}

/* Contenedor fijo en la esquina */
#sh-chatbot-widget {
  position: fixed;
  inset-inline-end: 16px; /* right en LTR */
  inset-block-end: 16px;  /* bottom */
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
}

/* Botón flotante */
#sh-chatbot-toggle {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at 30% 20%, #ffe3b5 0, #b77a3c 35%, #5b3a1a 100%);
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.25);
  color: #fff;
  padding: 0;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

#sh-chatbot-toggle:hover {
  transform: translateY(-2px) scale(1.03);
  box-shadow: 0 22px 50px rgba(0, 0, 0, 0.28);
}

#sh-chatbot-toggle svg {
  width: 26px;
  height: 26px;
}

/* Ventana del chat */
#sh-chatbot-window {
  width: min(340px, 92vw);
  max-height: min(520px, 70vh);
  background: var(--sh-bg);
  border-radius: 20px;
  box-shadow: var(--sh-shadow);
  border: 1px solid rgba(207, 189, 165, 0.7);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  opacity: 0;
  transform: translateY(16px) scale(0.96);
  transform-origin: bottom right;
  pointer-events: none;
  transition:
    opacity var(--sh-transition),
    transform var(--sh-transition);
}

/* Estado abierto */
#sh-chatbot-widget.sh-open #sh-chatbot-window {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

/* Header */
.sh-header {
  padding: 10px 12px;
  background: linear-gradient(135deg, #f3e3cf, #f7efe6);
  border-bottom: 1px solid rgba(222, 203, 178, 0.9);
  display: flex;
  align-items: center;
  gap: 10px;
}

.sh-header-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 20%, #ffe3b5 0, #b77a3c 35%, #5b3a1a 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 600;
  font-size: 0.9rem;
  flex-shrink: 0;
}

.sh-header-main {
  flex: 1;
  min-width: 0;
}

.sh-header-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--sh-primary-dark);
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sh-header-subtitle {
  font-size: 0.74rem;
  color: var(--sh-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sh-header-status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #3bb273;
  margin-inline-end: 3px;
}

.sh-header-close {
  border: none;
  background: transparent;
  cursor: pointer;
  font-size: 16px;
  color: var(--sh-muted);
  padding: 4px;
}

/* Área de mensajes */
.sh-messages {
  flex: 1;
  padding: 10px 10px 4px;
  background: radial-gradient(circle at top, #fffaf3 0, #f7efe6 60%, #f2e4d4 100%);
  overflow-y: auto;
  scroll-behavior: smooth;
}

/* Cada fila de mensaje ocupa todo el ancho */
.sh-message-row {
  display: flex;
  align-items: flex-end;
  margin-bottom: 6px;
}

/* Usuario a la derecha, bot a la izquierda */
.sh-message-row.sh-user {
  justify-content: flex-end;
}

.sh-message-row.sh-bot {
  justify-content: flex-start;
}

/* Contenedor directo de la burbuja y el meta, limitado al 80% */
.sh-message-row > * {
  max-width: 80%;
}

/* Burbuja del mensaje */
.sh-message-bubble {
  display: inline-block;       /* evita que se estire raro en flex */
  max-width: 100%;             /* respeta el 80% del contenedor padre */
  padding: 8px 11px;
  border-radius: 14px;
  font-size: 0.83rem;
  line-height: 1.4;
  word-wrap: break-word;
  white-space: pre-wrap;       /* respeta saltos de línea, pero permite wrap */
}

.sh-user .sh-message-bubble {
  background: #8b5a2b;
  color: #fff;
  border-bottom-right-radius: 4px;
}

.sh-bot .sh-message-bubble {
  background: rgba(255, 255, 255, 0.9);
  color: var(--sh-text);
  border: 1px solid rgba(222, 203, 178, 0.9);
  border-bottom-left-radius: 4px;
}

.sh-message-meta {
  font-size: 0.7rem;
  color: var(--sh-muted);
  margin-top: 1px;
}

/* Input */
.sh-input-area {
  padding: 8px 8px 8px;
  background: var(--sh-bg);
  border-top: 1px solid rgba(222, 203, 178, 0.9);
  display: flex;
  align-items: flex-end;
  gap: 6px;
}

.sh-input {
  flex: 1;
  border-radius: 16px;
  border: 1px solid var(--sh-border);
  padding: 6px 9px;
  font-size: 0.82rem;
  resize: none;
  max-height: 80px;
  min-height: 32px;
  outline: none;
}

.sh-input:focus {
  border-color: #b77a3c;
  box-shadow: 0 0 0 1px rgba(183, 122, 60, 0.25);
}

.sh-send-btn {
  border-radius: 999px;
  border: none;
  background: linear-gradient(120deg, #8b5a2b, #b77a3c);
  color: #fff;
  padding: 7px 11px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  box-shadow: 0 8px 18px rgba(140, 90, 43, 0.35);
  transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
  flex-shrink: 0;
}

.sh-send-btn:disabled {
  opacity: 0.5;
  cursor: default;
  box-shadow: none;
  transform: none;
}

.sh-send-btn:not(:disabled):hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 24px rgba(140, 90, 43, 0.4);
}

.sh-typing {
  font-size: 0.75rem;
  color: var(--sh-muted);
  padding-inline: 10px;
  padding-block-end: 4px;
}

.sh-hidden {
  display: none !important;
}

@media (max-width: 480px) {
  #sh-chatbot-widget {
    inset-inline-end: 10px;
    inset-block-end: 10px;
  }
  #sh-chatbot-window {
    width: min(100vw - 20px, 360px);
    max-height: min(75vh, 540px);
  }
}

/*////////////////////////////////////////////*/
* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  font-family: var(--font-main);
  background: radial-gradient(circle at top left, #fff7ec 0, #f7f1ea 40%, #f3ebe2 100%);
  color: var(--text-main);
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--primary-dark);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.page {
  max-width: 1120px;
  margin: 0 auto;
  padding: 18px 16px 40px;
}

@media (min-width: 768px) {
  .page {
    padding: 20px 20px 56px;
  }
}

/* HEADER (banner más pequeño) */

.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 8px 14px;
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: blur(12px);
  border-radius: 999px;
  border: 1px solid rgba(207, 189, 165, 0.5);
  box-shadow: var(--shadow-soft);
  position: sticky;
  top: 10px;
  z-index: 50;
}

@media (min-width: 768px) {
  .header {
    padding: 10px 18px;
    gap: 18px;
  }
}

.header-main {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.logo-wrap {
  width: 95px;          /* antes 120px */
  max-width: 26vw;
}

.brand-text {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.brand-name {
  font-size: 0.98rem;   /* más pequeño */
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--primary-dark);
  font-weight: 600;
}

.brand-tagline {
  font-size: 0.72rem;   /* más pequeño */
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.header-contact {
  display: none;
  text-align: right;
  font-size: 0.78rem;   /* más pequeño */
  color: var(--text-muted);
  line-height: 1.35;
}

.header-contact span {
  display: block;
}

@media (min-width: 768px) {
  .header-contact {
    display: block;
  }
}

/* HERO */

.hero {
  display: grid;
  grid-template-columns: minmax(0, 3fr);
  gap: 24px;
  margin-top: 18px;    /* antes 28px: acerca más el hero al banner */
  margin-bottom: 28px;
  align-items: center;
}

@media (min-width: 900px) {
  .hero {
    grid-template-columns: minmax(0, 3fr) minmax(0, 2.2fr);
  }
}

.hero-main {
  padding-right: 4px;
}

.hero-pretitle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 3px 9px;
  border-radius: var(--radius-pill);
  background: rgba(139, 90, 43, 0.08);
  border: 1px solid rgba(139, 90, 43, 0.18);
  font-size: 0.76rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--primary-dark);
  margin-bottom: 8px;
}

.hero-pretitle-badge {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, #ffd59e 0, #c47b2a 45%, #7b4612 100%);
}

.hero-title {
  font-size: clamp(1.8rem, 2.2vw + 1.1rem, 2.6rem);
  line-height: 1.1;
  margin: 0 0 10px;
  color: var(--primary-dark);
}

.hero-highlight {
  color: var(--accent);
  font-weight: 700;
}

.hero-text {
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--text-muted);
  max-width: 560px;
  margin-bottom: 16px;
}

.hero-bullets {
  list-style: none;
  padding: 0;
  margin: 0 0 18px;
  display: grid;
  gap: 6px;
  font-size: 0.88rem;
  color: var(--text-main);
}

.hero-bullets li::before {
  content: "•";
  color: var(--accent);
  margin-right: 6px;
  font-weight: 700;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-bottom: 6px;
}

.btn {
  border-radius: var(--radius-pill);
  border: none;
  padding: 9px 16px;
  font-size: 0.88rem;
  cursor: pointer;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast),
              background var(--transition-fast), color var(--transition-fast);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.btn-primary {
  background: linear-gradient(120deg, #8b5a2b, #b77a3c);
  color: #fff;
  box-shadow: 0 12px 25px rgba(140, 90, 43, 0.35);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 32px rgba(140, 90, 43, 0.4);
}

.btn-outline {
  background: transparent;
  border: 1px solid rgba(91, 58, 26, 0.4);
  color: var(--primary-dark);
}

.btn-outline:hover {
  background: rgba(91, 58, 26, 0.08);
  transform: translateY(-1px);
}

.hero-note {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* HERO SIDE CARD */

.hero-side-card {
  border-radius: var(--radius-lg);
  background: radial-gradient(circle at top, #fff8f0 0, #f7f1ea 55%, #e9dccb 100%);
  border: 1px solid rgba(196, 150, 86, 0.38);
  box-shadow: 0 18px 40px rgba(123, 84, 44, 0.26);
  padding: 16px 16px 14px;
  position: relative;
  overflow: hidden;
}

.hero-side-card::before {
  content: "";
  position: absolute;
  inset: -30%;
  background: radial-gradient(circle at top right, rgba(255,255,255,0.36), transparent 55%);
  opacity: 0.9;
  pointer-events: none;
}

.hero-side-inner {
  position: relative;
  z-index: 1;
}

.hero-side-title {
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--primary-dark);
  margin-bottom: 8px;
}

.hero-side-sub {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.hero-side-list {
  list-style: none;
  padding: 8px 0 0;
  margin: 0;
  display: grid;
  gap: 6px;
  font-size: 0.82rem;
  color: var(--text-main);
}

.hero-side-list li {
  display: flex;
  justify-content: space-between;
  gap: 8px;
}

.hero-side-label {
  font-weight: 500;
}

.hero-side-value {
  font-weight: 600;
  color: var(--primary-dark);
}

.hero-side-footer {
  margin-top: 8px;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.hero-side-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 9px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.65);
  border: 1px solid rgba(196, 150, 86, 0.4);
  margin-bottom: 6px;
  font-size: 0.78rem;
}

.hero-side-chip-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: radial-gradient(circle at 40% 30%, #ffffff 0, #ffcf8a 35%, #b86f26 100%);
}

/* PLANS SECTION */

.section-title {
  font-size: 1.1rem;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: var(--text-muted);
  margin: 10px 0 8px;
}

.section-subtitle {
  font-size: 0.94rem;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.plans-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 18px;
  margin-top: 8px;
}

@media (min-width: 768px) {
  .plans-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1080px) {
  .plans-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.plan-card {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-soft);
  box-shadow: var(--shadow-soft);
  padding: 14px 12px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  position: relative;
  overflow: hidden;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast), border-color var(--transition-fast);
}

.plan-card::before {
  content: "";
  position: absolute;
  inset: -30%;
  background: radial-gradient(circle at top center, rgba(255,255,255,0.7), transparent 50%);
  opacity: 0;
  transition: opacity var(--transition-fast);
  pointer-events: none;
}

.plan-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 34px rgba(0,0,0,0.08);
  border-color: rgba(196, 150, 86, 0.6);
}

.plan-card:hover::before {
  opacity: 1;
}

.plan-header-line {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 6px;
}

.plan-name {
  font-size: 1.0rem;
  font-weight: 600;
  color: var(--primary-dark);
}

.plan-days {
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--accent);
}

.plan-price {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--primary-dark);
}

.plan-note {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.plan-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
}

.pill {
  font-size: 0.72rem;
  padding: 4px 9px;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(140, 90, 43, 0.26);
  color: var(--text-main);
  background: rgba(247, 241, 234, 0.7);
  white-space: nowrap;
}

.pill-strong {
  background: linear-gradient(120deg, #8b5a2b, #b77a3c);
  color: #fff;
  border: none;
}

.plan-details {
  margin-top: 8px;
  font-size: 0.82rem;
  color: var(--text-muted);
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.25s ease, opacity 0.25s ease;
  opacity: 0;
}

.plan-details.open {
  opacity: 1;
}

.plan-details ul {
  padding-left: 17px;
  margin: 4px 0 0;
}

.plan-details li {
  margin-bottom: 3px;
}

/* Pie de la tarjeta: permite envolver cuando no hay espacio */
.plan-footer {
  margin-top: 8px;
  display: flex;
  flex-wrap: wrap;            /* IMPORTANTE: que pueda pasar a 2 líneas */
  gap: 8px;
  font-size: 0.78rem;
  color: var(--text-muted);
  align-items: center;
}

/* Texto de depósito */
.plan-footer-text {
  flex: 1 1 180px;            /* ocupa el espacio que pueda, pero es flexible */
  min-width: 160px;
}

/* Contenedor de botones */
.plan-actions {
  display: flex;
  flex-wrap: wrap;            /* botones pueden saltar de línea si hace falta */
  gap: 6px;
  justify-content: flex-end;
  flex: 0 0 auto;
}

.btn-sm {
  padding: 6px 10px;
  font-size: 0.78rem;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(139, 90, 43, 0.4);
  background: rgba(247, 241, 234, 0.9);
  color: var(--primary-dark);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: background var(--transition-fast), transform var(--transition-fast), box-shadow var(--transition-fast);
  white-space: nowrap;
}

.btn-sm:hover {
  background: rgba(139, 90, 43, 0.08);
  transform: translateY(-1px);
  box-shadow: 0 6px 14px rgba(0,0,0,0.08);
}

.btn-sm-primary {
  background: linear-gradient(120deg, #8b5a2b, #b77a3c);
  color: #fff;
  border: none;
}

.btn-sm-primary:hover {
  box-shadow: 0 10px 18px rgba(140, 90, 43, 0.35);
}

/* CONTACT SECTION */

.contact-section {
  margin-top: 30px;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, #f3e6d5, #f7f1ea);
  border: 1px solid rgba(196, 150, 86, 0.5);
  box-shadow: 0 18px 40px rgba(0,0,0,0.06);
  padding: 16px 16px 14px;
  display: grid;
  grid-template-columns: minmax(0, 1.3fr);
  gap: 18px;
}

@media (min-width: 780px) {
  .contact-section {
    grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
    align-items: center;
  }
}

.contact-title {
  font-size: 1.02rem;
  font-weight: 600;
  color: var(--primary-dark);
  margin-bottom: 6px;
}

.contact-text {
  font-size: 0.9rem;
  color: var(--text-main);
  margin-bottom: 12px;
}

.contact-block {
  display: grid;
  gap: 4px;
  font-size: 0.86rem;
  color: var(--text-main);
}

.contact-label {
  font-weight: 600;
  color: var(--primary-dark);
}

.contact-socials {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin-top: 8px;
  font-size: 0.86rem;
}

.contact-socials span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--primary-dark);
}

.contact-side {
  padding: 10px 12px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(196, 150, 86, 0.5);
  font-size: 0.84rem;
  color: var(--text-muted);
  display: grid;
  gap: 6px;
}

.contact-side strong {
  color: var(--primary-dark);
}

.footer {
  margin-top: 24px;
  font-size: 0.78rem;
  color: var(--text-muted);
  text-align: center;
}
@media (max-width: 640px) {
  .plan-footer {
    flex-direction: column;
    align-items: stretch;
  }

  .plan-footer-text {
    flex: 1 1 auto;
  }

  .plan-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .plan-actions .btn-sm {
    flex: 1 1 auto;           /* botones ocupan el ancho disponible y no se salen */
  }
}