:root {
  --uxsm-primary: #5B5BF0;
  --uxsm-bg-left: #F6F5FF;
  --uxsm-border: rgba(67, 56, 202, 0.08);
}

.uxsm-module {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: #111827;
  max-width: 1180px;
  margin: 0 auto;
  box-sizing: border-box;
}

.uxsm-module * {
  box-sizing: border-box;
}

/* =========================================
   GRID PRINCIPAL (ESCRITORIO)
   ========================================= */
.uxsm-grid {
  display: grid;
  /* 3 columnas: Lista (340px) | Contenido (Flexible) | Visual (380px) */
  grid-template-columns: 340px minmax(0, 1fr) 380px;
  gap: 24px;
  align-items: stretch; /* Estirar para que todas tengan la misma altura */
  
  /* FIX: Altura mínima para que no se vea vacío si hay pocos servicios */
  min-height: 550px; 
}

/* Paneles generales */
.uxsm-panel {
  background: transparent;
}

/* ---------------- LEFT (LISTA) ---------------- */
.uxsm-panel-left {
  background: var(--uxsm-bg-left);
  border: 1px solid var(--uxsm-border);
  border-radius: 22px;
  padding: 22px;
  display: flex;
  flex-direction: column;
}

.uxsm-panel-title {
  font-size: 12px;
  letter-spacing: .1em;
  font-weight: 800;
  text-transform: uppercase;
  color: #6B7280;
  margin-bottom: 16px;
  padding-left: 4px;
}

.uxsm-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* ITEM DE LISTA (Botón) */
.uxsm-item {
  position: relative;
  background: #fff;
  border: 1px solid transparent;
  padding: 14px 18px;
  border-radius: 16px;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 1px 2px rgba(0,0,0,0.02);
  user-select: none;
}

.uxsm-item:hover {
  border-color: #dbeafe;
  transform: translateY(-1px);
}

/* Estado Activo */
.uxsm-item.is-active {
  background: var(--uxsm-primary);
  color: #fff;
  box-shadow: 0 8px 16px -4px rgba(91, 91, 240, 0.3);
  border-color: var(--uxsm-primary);
}

/* Contenido del Item */
.uxsm-item-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
}

.uxsm-item-title {
  font-weight: 700;
  font-size: 15px;
  line-height: 1.3;
}

.uxsm-item-arrow {
  opacity: 0;
  transform: translateX(-5px);
  transition: all 0.2s;
  font-size: 16px;
}

.uxsm-item.is-active .uxsm-item-arrow {
  opacity: 1;
  transform: translateX(0);
}

.uxsm-item-meta {
  font-size: 13px;
  opacity: 0.7;
  display: flex;
  justify-content: space-between;
}

/* Ocultar elementos en activo si es necesario, o cambiar color */
.uxsm-item.is-active .uxsm-item-meta {
  opacity: 0.9;
  color: #e0e7ff;
}

/* ---------------- CENTER (DETALLE) ---------------- */
.uxsm-panel-center {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 22px;
  padding: 32px;
  display: flex;
  flex-direction: column;
}

.uxsm-header { margin-bottom: 24px; }

.uxsm-badge {
  display: inline-block;
  background: #EEF2FF;
  color: var(--uxsm-primary);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 6px;
  margin-bottom: 12px;
}

.uxsm-header h2 {
  font-size: 26px;
  line-height: 1.2;
  font-weight: 800;
  margin: 0 0 10px 0;
  color: #111827;
}

.uxsm-details {
  display: flex;
  gap: 16px;
  font-size: 13px;
  color: #6B7280;
  font-weight: 500;
  margin-bottom: 20px;
}
.uxsm-detail-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.uxsm-content {
  color: #4B5563;
  font-size: 15px;
  line-height: 1.7;
  margin-bottom: 24px;
  flex-grow: 1; 
}
.uxsm-content p { margin-bottom: 1em; }

/* Lista "Qué incluye" */
.uxsm-includes-box {
  background: #F9FAFB;
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 24px;
}
.uxsm-includes-title {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  color: #9CA3AF;
  margin-bottom: 12px;
  display: block;
}
.uxsm-includes-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}
.uxsm-includes-list li {
  font-size: 14px;
  color: #374151;
  display: flex;
  align-items: start;
  gap: 8px;
}
.uxsm-check {
  display: inline-block;
  width: 18px; 
  height: 18px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%2310B981'%3E%3Cpath fill-rule='evenodd' d='M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z' clip-rule='evenodd'/%3E%3C/svg%3E") center/contain no-repeat;
  flex-shrink: 0;
  margin-top: 2px;
}

/* Acciones (Precio + Botón) */
.uxsm-actions {
  margin-top: auto;
  padding-top: 20px;
  border-top: 1px solid #f3f4f6;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.uxsm-price-box {
  display: flex;
  flex-direction: column;
}
.uxsm-price-label {
  font-size: 12px;
  color: #9CA3AF;
  font-weight: 600;
  text-transform: uppercase;
}
.uxsm-price-val {
  font-size: 22px;
  font-weight: 800;
  color: #111827;
}

.uxsm-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--uxsm-primary);
  color: #fff !important;
  text-decoration: none;
  font-weight: 700;
  padding: 14px 28px;
  border-radius: 12px;
  transition: all 0.2s;
  text-align: center;
  box-shadow: 0 4px 6px -1px rgba(91, 91, 240, 0.4);
}
.uxsm-cta:hover {
  filter: brightness(1.1);
  transform: translateY(-1px);
  box-shadow: 0 6px 10px -2px rgba(91, 91, 240, 0.5);
}

/* ---------------- RIGHT (VISUAL) ---------------- */
.uxsm-panel-right {
  position: relative;
  border-radius: 22px;
  overflow: hidden;
  background: #E5E7EB;
}

.uxsm-visual {
  width: 100%;
  height: 100%;
  position: relative;
}

.uxsm-visual-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: opacity 0.4s ease;
}

/* MODAL (Booking Shortcode) */
.uxsm-modal {
  display: none;
  position: fixed;
  z-index: 99999;
  top: 0; left: 0;
  width: 100%; height: 100%;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}
.uxsm-modal.is-open {
  display: flex;
  opacity: 1;
}

.uxsm-modal-backdrop {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(4px);
}

.uxsm-modal-card {
  position: relative;
  background: #fff;
  width: 90%;
  max-width: 600px;
  max-height: 90vh;
  overflow-y: auto;
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
  animation: uxsmModalUp 0.3s ease-out forwards;
}
@keyframes uxsmModalUp {
  from { transform: translateY(20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.uxsm-modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  border: none;
  background: #f3f4f6;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #4b5563;
}
.uxsm-modal-close:hover { background: #e5e7eb; }

.uxsm-modal-title {
  font-size: 20px;
  font-weight: 800;
  margin-bottom: 16px;
  padding-right: 30px;
}

/* =========================================
   RESPONSIVE & MOBILE (APP STYLE)
   ========================================= */

@media (max-width: 1024px) {
  
  /* GRID: Una sola columna */
  .uxsm-grid {
    display: flex;
    flex-direction: column;
    min-height: auto;
    gap: 0;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    overflow: hidden; /* Para redondear todo el conjunto */
  }

  /* 1. NAVEGACIÓN SUPERIOR (CARRUSEL HORIZONTAL) */
  .uxsm-panel-left {
    order: 1;
    width: 100%;
    border-radius: 0;
    border: none;
    border-bottom: 1px solid #eee;
    background: #fff;
    padding: 12px 0 12px 16px; /* Padding izquierdo inicial */
    
    /* Scroll Horizontal */
    flex-direction: row; /* Elementos en fila */
    overflow-x: auto;
    gap: 0; /* Manejamos gap con margen en items o padding */
    
    /* UX Pro: Scroll Snap */
    scroll-snap-type: x mandatory; 
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    
    /* Ocultar barra scroll */
    scrollbar-width: none;
  }
  .uxsm-panel-left::-webkit-scrollbar { display: none; }

  /* Título del panel "Nuestros servicios" oculto en móvil para ahorrar espacio */
  .uxsm-panel-title { display: none; }
  
  /* Contenedor lista */
  .uxsm-list {
    flex-direction: row;
    gap: 8px;
    padding-right: 16px; /* Padding final para poder ver el ultimo item */
  }

  /* ITEMS (PÍLDORAS / TABS) */
  .uxsm-item {
    flex: 0 0 auto; /* No encoger, tamaño según contenido */
    width: auto;
    margin: 0;
    padding: 8px 16px;
    border-radius: 50px; /* Redondos */
    background: #f3f4f6;
    border: 1px solid transparent;
    text-align: center;
    
    /* Snap alignment */
    scroll-snap-align: center;
  }

  /* Item Activo en Móvil */
  .uxsm-item.is-active {
    background: var(--uxsm-primary);
    color: #fff;
    transform: none; /* Evitar saltos */
  }

  /* Simplificar contenido interno del botón */
  .uxsm-item-header {
    margin: 0;
    justify-content: center;
  }
  .uxsm-item-title {
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap; /* Una sola línea obligatoria */
  }
  
  /* Ocultar flechas y precios en el menú superior */
  .uxsm-item-arrow, 
  .uxsm-item-meta {
    display: none !important; 
  }

  /* 2. PANEL CENTRAL (DETALLES) */
  .uxsm-panel-center {
    order: 2;
    border: none;
    border-radius: 0;
    padding: 24px 20px;
  }
  
  /* Ajustar tamaño de fuentes en móvil */
  .uxsm-header h2 { font-size: 22px; }
  .uxsm-price-val { font-size: 20px; }
  
  /* Botón CTA full width en móvil */
  .uxsm-actions {
    flex-direction: column;
    align-items: stretch;
    gap: 16px;
  }
  .uxsm-price-box { align-items: center; }
  .uxsm-cta { width: 100%; }

  /* 3. PANEL DERECHO (IMAGEN) */
  .uxsm-panel-right {
    order: 3;
    border-radius: 0;
    height: 200px; /* Altura fija para que no ocupe toda la pantalla */
    min-height: 200px;
  }
}