/* ==========================================================
   GlobPay - Sección: Botón y ofertas (Panel del Vendedor)
   button-offers-panel.css
   
   Composición visual fiel a la referencia oficial:
   - Controles a la izquierda, vistas previas interactivas a la derecha.
   - Tarjetas blancas, bordes sutiles (#E2E8F0), acentos turquesa #0BB6B5.
   - Tipografía oficial: Inter, -apple-system, sans-serif.
   - Responsive en desktop (1366px) y móvil (390px, 360px, 430px) sin overflow.
   ========================================================== */

/* RESET SEGURO PARA EL PANEL */
#view-boton,
#view-boton *,
#view-boton *::before,
#view-boton *::after {
  box-sizing: border-box;
}

#view-boton {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

/* 1. ENCABEZADO DE SECCIÓN */
.boton-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
}

.btn-save-boton {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background-color: #0BB6B5;
  color: #FFFFFF;
  border: none;
  border-radius: 8px;
  padding: 9px 20px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.15s ease, transform 0.1s ease, box-shadow 0.15s ease;
  box-shadow: 0 1px 3px rgba(11, 182, 181, 0.25);
  min-height: 40px;
}

.btn-save-boton:hover:not(:disabled) {
  background-color: #09A3A2;
  box-shadow: 0 2px 6px rgba(11, 182, 181, 0.35);
}

.btn-save-boton:active:not(:disabled) {
  transform: scale(0.99);
}

.btn-save-boton:disabled {
  background-color: #0BB6B5;
  color: #FFFFFF;
  cursor: not-allowed;
  box-shadow: none;
  opacity: 0.65;
}

/* 2. NOTIFICACIÓN TOAST / BANNER */
.boton-status-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 13.5px;
  margin-bottom: 20px;
  animation: fadeInBotonBanner 0.25s ease-out;
}

@keyframes fadeInBotonBanner {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

.boton-status-banner.is-success {
  background-color: #ECFDF5;
  border: 1px solid #A7F3D0;
  color: #065F46;
}

.boton-status-banner.is-error {
  background-color: #FEF2F2;
  border: 1px solid #FECACA;
  color: #991B1B;
}

.boton-toast-icon {
  font-size: 16px;
  font-weight: bold;
}

/* 3. GRID PRINCIPAL (2 COLUMNAS DESKTOP / 1 COLUMNA MÓVIL) */
.boton-layout-grid {
  display: grid;
  grid-template-columns: 1fr 400px;
  gap: 24px;
  align-items: start;
  width: 100%;
}

/* 4. COLUMNA IZQUIERDA: CONTROLES DEL COMERCIANTE */
.boton-controls-col {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.boton-config-card {
  background-color: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: 12px;
  padding: 22px 24px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.boton-config-card:hover {
  border-color: #CBD5E1;
}

.card-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 6px;
}

.card-main-title {
  font-size: 16px;
  font-weight: 700;
  color: #0F172A;
  margin: 0;
}

.card-main-subtitle {
  font-size: 13px;
  color: #64748B;
  margin: 0 0 18px 0;
  line-height: 1.4;
}

/* Grupos de formularios */
.boton-form-group {
  margin-bottom: 18px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.boton-form-group:last-child {
  margin-bottom: 0;
}

.boton-field-label {
  font-size: 13.5px;
  font-weight: 600;
  color: #1E293B;
  margin: 0;
}

.boton-field-helper {
  font-size: 12px;
  color: #64748B;
  line-height: 1.35;
  margin: 2px 0 0 0;
}

.boton-text-input {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid #CBD5E1;
  border-radius: 8px;
  font-size: 13.5px;
  color: #0F172A;
  background-color: #FFFFFF;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  min-height: 40px;
}

.boton-text-input:focus {
  outline: none;
  border-color: #0BB6B5;
  box-shadow: 0 0 0 3px rgba(11, 182, 181, 0.15);
}

.boton-select-input {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid #CBD5E1;
  border-radius: 8px;
  font-size: 13.5px;
  color: #0F172A;
  background-color: #FFFFFF;
  cursor: pointer;
  min-height: 40px;
  transition: border-color 0.15s ease;
}

.boton-select-input:focus {
  outline: none;
  border-color: #0BB6B5;
  box-shadow: 0 0 0 3px rgba(11, 182, 181, 0.15);
}

/* Selector de color */
.color-control-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.color-preview-box {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  border: 1.5px solid #CBD5E1;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  flex-shrink: 0;
}

.color-preview-box input[type="color"] {
  position: absolute;
  top: -10px;
  left: -10px;
  width: 60px;
  height: 60px;
  border: none;
  cursor: pointer;
  opacity: 0;
}

.hex-text-input {
  width: 110px;
  font-family: monospace;
  font-size: 13.5px;
  text-transform: uppercase;
  flex-shrink: 0;
}

.checkbox-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #334155;
  cursor: pointer;
  user-select: none;
  max-width: 100%;
}

.checkbox-label input[type="checkbox"] {
  accent-color: #0BB6B5;
  width: 16px;
  height: 16px;
  cursor: pointer;
}

.color-contrast-warning {
  font-size: 12px;
  color: #B45309;
  background-color: #FEF3C7;
  border: 1px solid #FDE68A;
  border-radius: 6px;
  padding: 6px 10px;
  margin-top: 6px;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Selector de forma del botón (3 opciones visuales) */
.shape-selector-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  width: 100%;
}

.shape-card-btn-panel {
  border: 1.5px solid #E2E8F0;
  border-radius: 8px;
  background: #FFFFFF;
  padding: 10px 8px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  transition: all 0.15s ease;
  min-width: 0;
  width: 100%;
}

.shape-card-btn-panel:hover {
  border-color: #CBD5E1;
  background-color: #F8FAFC;
}

.shape-card-btn-panel.active {
  border-color: #0BB6B5;
  background-color: #EEFBFB;
}

.shape-card-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 600;
  color: #1E293B;
  width: 100%;
  min-width: 0;
}

.shape-label-text {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.shape-radio-indicator {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 1.5px solid #94A3B8;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.shape-card-btn.active .shape-radio-indicator {
  border-color: #0BB6B5;
}

.shape-card-btn.active .shape-radio-indicator::after {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background-color: #0BB6B5;
}

/* Mini previsualizaciones de las formas */
.mini-btn-preview {
  width: 100%;
  height: 22px;
  background-color: #065F46;
  transition: border-radius 0.15s ease, background-color 0.2s ease;
  box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.mini-btn-preview.rounded {
  border-radius: 8px;
}

.mini-btn-preview.square {
  border-radius: 2px;
}

.mini-btn-preview.pill {
  border-radius: 9999px;
}

/* Dónde mostrarlo */
.radio-options-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.radio-pill-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border: 1px solid #E2E8F0;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  color: #334155;
  cursor: pointer;
  background-color: #FFFFFF;
  transition: all 0.15s ease;
  user-select: none;
}

.radio-pill-label:hover {
  border-color: #CBD5E1;
}

.radio-pill-label input[type="radio"] {
  accent-color: #0BB6B5;
  margin: 0;
}

.radio-pill-label.is-active {
  border-color: #0BB6B5;
  background-color: #EEFBFB;
  color: #087877;
  font-weight: 600;
}

.selected-products-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background-color: #F8FAFC;
  border: 1px dashed #CBD5E1;
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 13px;
  color: #334155;
  margin-top: 8px;
}

.btn-open-selector {
  border: 1px solid #CBD5E1;
  background: #FFFFFF;
  border-radius: 6px;
  padding: 5px 12px;
  font-size: 12.5px;
  font-weight: 600;
  color: #0F172A;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-open-selector:hover {
  background: #F1F5F9;
  border-color: #94A3B8;
}

/* Acordeón Más opciones */
.details-more-options {
  border: 1px solid #E2E8F0;
  border-radius: 8px;
  padding: 10px 14px;
  background-color: #F8FAFC;
}

.details-summary {
  font-size: 13px;
  font-weight: 600;
  color: #087877;
  cursor: pointer;
  user-select: none;
  outline: none;
}

.details-summary:hover {
  color: #09A3A2;
}

.more-options-body {
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-top: 10px;
  border-top: 1px solid #E2E8F0;
}

/* Llamado pendiente Shopify */
.shopify-pending-callout {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background-color: #F8FAFC;
  border: 1px solid #E2E8F0;
  border-radius: 8px;
  padding: 12px 14px;
  font-size: 12.5px;
  color: #475569;
  line-height: 1.4;
  margin-top: 16px;
}

.shopify-callout-icon {
  width: 18px;
  height: 18px;
  color: #64748B;
  flex-shrink: 0;
  margin-top: 1px;
}

/* ==========================================================
   TARJETA 2: OFERTAS POR CANTIDAD
   ========================================================== */
.toggle-switch-wrap {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
  cursor: pointer;
}

.toggle-switch-wrap input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: #CBD5E1;
  transition: 0.2s ease;
  border-radius: 24px;
}

.toggle-slider::before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: #FFFFFF;
  transition: 0.2s ease;
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.toggle-switch-wrap input:checked + .toggle-slider {
  background-color: #0BB6B5;
}

.toggle-switch-wrap input:checked + .toggle-slider::before {
  transform: translateX(20px);
}

/* Tabla de ofertas */
.offers-table-wrap {
  width: 100%;
  overflow-x: auto;
  border: 1px solid #E2E8F0;
  border-radius: 8px;
  background-color: #FFFFFF;
  margin-bottom: 12px;
}

.offers-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 13px;
}

.offers-table th {
  background-color: #F8FAFC;
  color: #475569;
  font-weight: 600;
  padding: 10px 12px;
  border-bottom: 1px solid #E2E8F0;
  white-space: nowrap;
}

.offers-table td {
  padding: 8px 12px;
  border-bottom: 1px solid #F1F5F9;
  vertical-align: middle;
}

.offers-table tr:last-child td {
  border-bottom: none;
}

.tier-units-input {
  width: 70px;
  padding: 6px 8px;
  border: 1px solid #CBD5E1;
  border-radius: 6px;
  font-size: 13px;
  color: #0F172A;
  text-align: center;
}

.input-discount-wrap {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.tier-discount-input {
  width: 65px;
  padding: 6px 8px;
  border: 1px solid #CBD5E1;
  border-radius: 6px;
  font-size: 13px;
  color: #0F172A;
  text-align: right;
}

.offer-total-calc {
  font-weight: 600;
  color: #0F172A;
  white-space: nowrap;
}

.btn-trash-tier {
  background: transparent;
  border: none;
  color: #94A3B8;
  cursor: pointer;
  padding: 6px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}

.btn-trash-tier:hover:not(:disabled) {
  color: #EF4444;
  background-color: #FEF2F2;
}

.btn-trash-tier:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

/* Botón Añadir Oferta */
.btn-add-offer {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background-color: #FFFFFF;
  border: 1.5px dashed #0BB6B5;
  color: #087877;
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  width: 100%;
  justify-content: center;
  margin-bottom: 14px;
}

.btn-add-offer:hover {
  background-color: #EEFBFB;
  border-color: #09A3A2;
}

/* Tarjeta explicativa de fórmulas */
.offers-formula-card {
  background-color: #F8FAFC;
  border: 1px solid #E2E8F0;
  border-radius: 8px;
  padding: 12px 14px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 10px;
}

.formula-icon {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background-color: #E2E8F0;
  color: #475569;
  font-weight: 700;
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 2px;
}

.formula-content h4 {
  font-size: 13px;
  font-weight: 600;
  color: #1E293B;
  margin: 0 0 4px 0;
}

.formula-content p {
  font-size: 12px;
  color: #64748B;
  line-height: 1.4;
  margin: 0 0 6px 0;
}

.formula-calc-highlight {
  font-size: 12px;
  font-weight: 600;
  color: #087877;
  background-color: #EEFBFB;
  padding: 4px 8px;
  border-radius: 4px;
  display: inline-block;
  white-space: normal;
  word-break: break-word;
  max-width: 100%;
}

.offers-footnote {
  font-size: 11.5px;
  color: #64748B;
  margin-top: 8px;
  line-height: 1.35;
}

/* ==========================================================
   5. COLUMNA DERECHA: VISTAS PREVIAS INTERACTIVAS
   ========================================================== */
.boton-preview-col {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.preview-main-title {
  font-size: 15px;
  font-weight: 700;
  color: #0F172A;
  margin: 0 0 4px 0;
}

/* Tarjeta A: Botón en tu tienda */
.preview-store-box {
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: 12px;
  padding: 18px 20px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
}

.preview-box-header {
  font-size: 14px;
  font-weight: 700;
  color: #0F172A;
  margin: 0 0 2px 0;
}

.preview-box-sub {
  font-size: 12px;
  color: #64748B;
  margin: 0 0 14px 0;
}

.store-product-mock {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  background-color: #F8FAFC;
  border: 1px solid #E2E8F0;
  border-radius: 10px;
  padding: 14px;
}

.product-img-wrap {
  width: 90px;
  height: 90px;
  border-radius: 8px;
  background-color: #FFFFFF;
  border: 1px solid #E2E8F0;
  overflow: hidden;
  flex-shrink: 0;
}

.product-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-info-mock {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.mock-product-title {
  font-size: 13.5px;
  font-weight: 700;
  color: #0F172A;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mock-product-price {
  font-size: 14px;
  font-weight: 700;
  color: #087877;
}

.mock-product-desc {
  font-size: 11px;
  color: #64748B;
  line-height: 1.35;
  margin: 2px 0 6px 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Botón de acción en la tienda (dinámico) */
.store-preview-action-btn {
  width: 100%;
  padding: 10px 14px;
  background-color: #065F46;
  color: #FFFFFF;
  border: none;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.15s, opacity 0.15s, border-radius 0.2s, background-color 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 4px;
  min-height: 42px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.12);
}

.store-preview-action-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 3px 8px rgba(0,0,0,0.18);
}

.preview-subtext-caption {
  font-size: 11px;
  color: #94A3B8;
  text-align: center;
  margin-top: 4px;
}

/* Tarjeta B: Ofertas en tu formulario */
.preview-form-box {
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

.form-mock-header {
  background-color: #065F46;
  color: #FFFFFF;
  padding: 12px 18px;
  font-size: 15px;
  font-weight: 700;
  transition: background-color 0.2s;
  text-align: center;
}

.form-mock-body {
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.form-section-title {
  font-size: 13px;
  font-weight: 700;
  color: #1E293B;
  margin-bottom: 8px;
}

/* Tarjetas de ofertas dinámicas */
.offer-cards-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.offer-tier-card {
  border: 1.5px solid #E2E8F0;
  border-radius: 8px;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  transition: border-color 0.2s, background-color 0.2s;
  background: #FFFFFF;
}

.offer-tier-card:hover {
  border-color: #CBD5E1;
}

.offer-tier-card.selected {
  border-color: #0BB6B5;
  background-color: #F0FDFA;
}

.offer-tier-radio {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 1.5px solid #94A3B8;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.offer-tier-card.selected .offer-tier-radio {
  border-color: #0BB6B5;
}

.offer-tier-card.selected .offer-tier-radio::after {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: #0BB6B5;
}

.offer-tier-thumb {
  width: 38px;
  height: 38px;
  border-radius: 6px;
  background: #F1F5F9;
  overflow: hidden;
  flex-shrink: 0;
}

.offer-tier-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.offer-tier-info {
  flex: 1;
  min-width: 0;
}

.offer-tier-units {
  font-size: 12.5px;
  color: #475569;
}

.offer-tier-price {
  font-size: 14px;
  font-weight: 700;
  color: #0F172A;
}

.badge-savings {
  background-color: #DCFCE7;
  color: #15803D;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 4px;
  white-space: nowrap;
}

.offer-status-caption {
  font-size: 11.5px;
  color: #64748B;
  text-align: center;
}

/* Opciones de pago dinámicas dentro del mock */
.payment-modalities-mock-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.payment-mock-card {
  border: 1px solid #E2E8F0;
  border-radius: 8px;
  padding: 8px 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  background-color: #FFFFFF;
  transition: all 0.15s ease;
}

.payment-mock-card:hover {
  border-color: #CBD5E1;
}

.payment-mock-card.selected {
  border-color: #0BB6B5;
  background-color: #F0FDFA;
}

.payment-mock-radio {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 1.5px solid #94A3B8;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.payment-mock-card.selected .payment-mock-radio {
  border-color: #0BB6B5;
}

.payment-mock-card.selected .payment-mock-radio::after {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: #0BB6B5;
}

.payment-mock-info {
  flex: 1;
  min-width: 0;
}

.payment-mock-title {
  font-size: 12.5px;
  font-weight: 600;
  color: #1E293B;
}

.payment-mock-desc {
  font-size: 11px;
  color: #64748B;
}

.highlight-green {
  color: #15803D;
  font-weight: 600;
}

.payment-abono-note {
  font-size: 11px;
  color: #64748B;
  font-style: italic;
  text-align: center;
}

/* Botón del comprador (dinámico) */
.buyer-action-btn {
  width: 100%;
  padding: 12px 16px;
  background-color: #065F46;
  color: #FFFFFF;
  border: none;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.15s, opacity 0.15s, border-radius 0.2s, background-color 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 44px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.buyer-action-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}

.btn-full-preview-trigger {
  width: 100%;
  padding: 9px 14px;
  background-color: #FFFFFF;
  border: 1.5px solid #0BB6B5;
  color: #087877;
  font-size: 13px;
  font-weight: 600;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 4px;
}

.btn-full-preview-trigger:hover {
  background-color: #EEFBFB;
  border-color: #09A3A2;
}

/* ==========================================================
   6. BARRA INFERIOR FIJA: CAMBIOS SIN GUARDAR (DIRTY BAR)
   ========================================================== */
.boton-dirty-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background-color: #0F172A;
  color: #FFFFFF;
  padding: 14px 24px;
  box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.2);
  z-index: 999;
  animation: slideUpBotonDirty 0.25s ease-out;
}

@keyframes slideUpBotonDirty {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

.boton-dirty-bar-content {
  max-width: 1060px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.boton-dirty-msg {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 500;
}

.boton-dirty-icon {
  width: 20px;
  height: 20px;
  color: #F59E0B;
  flex-shrink: 0;
}

.boton-dirty-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.btn-discard-boton {
  background-color: transparent;
  color: #E2E8F0;
  border: 1px solid #475569;
  border-radius: 8px;
  padding: 8px 16px;
  font-size: 13.5px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
  min-height: 38px;
}

.btn-discard-boton:hover {
  background-color: #1E293B;
  color: #FFFFFF;
  border-color: #64748B;
}

@media (min-width: 768px) {
  .boton-dirty-bar {
    left: 240px;
  }
}

/* ==========================================================
   7. MODALES (PRODUCTOS DEMO, CHECKOUT COMPLETO, DIRTY EXIT)
   ========================================================== */
.boton-modal-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: rgba(15, 23, 42, 0.65);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 16px;
  backdrop-filter: blur(2px);
}

.boton-modal-overlay.active {
  display: flex;
}

.boton-modal-dialog {
  background: #FFFFFF;
  border-radius: 12px;
  width: 100%;
  max-width: 480px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  overflow: hidden;
  animation: modalScaleIn 0.2s ease-out;
}

.boton-modal-dialog.large {
  max-width: 620px;
}

@keyframes modalScaleIn {
  from { opacity: 0; transform: scale(0.96); }
  to { opacity: 1; transform: scale(1); }
}

.boton-modal-header {
  padding: 16px 20px;
  border-bottom: 1px solid #E2E8F0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.boton-modal-title {
  font-size: 16px;
  font-weight: 700;
  color: #0F172A;
  margin: 0;
}

.boton-modal-close-btn {
  background: none;
  border: none;
  font-size: 20px;
  color: #64748B;
  cursor: pointer;
  padding: 4px;
  line-height: 1;
  border-radius: 4px;
}

.boton-modal-close-btn:hover {
  color: #0F172A;
  background: #F1F5F9;
}

.boton-modal-body {
  padding: 20px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.boton-modal-footer {
  padding: 14px 20px;
  border-top: 1px solid #E2E8F0;
  background: #F8FAFC;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.btn-modal-cancel {
  border: 1px solid #CBD5E1;
  background: #FFFFFF;
  border-radius: 8px;
  padding: 8px 16px;
  font-size: 13.5px;
  font-weight: 500;
  color: #475569;
  cursor: pointer;
  transition: all 0.15s;
}

.btn-modal-cancel:hover {
  background: #F1F5F9;
  color: #0F172A;
}

.btn-modal-primary {
  border: none;
  background-color: #0BB6B5;
  color: #FFFFFF;
  border-radius: 8px;
  padding: 8px 18px;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.15s;
}

.btn-modal-primary:hover {
  background-color: #09A3A2;
}

.btn-modal-discard {
  border: 1px solid #FECACA;
  background: #FEF2F2;
  color: #DC2626;
  border-radius: 8px;
  padding: 8px 16px;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
}

.btn-modal-discard:hover {
  background: #FEE2E2;
}

/* Modal Selector de Productos */
.demo-catalog-badge {
  background: #FEF3C7;
  color: #B45309;
  border: 1px solid #FDE68A;
  border-radius: 6px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
}

.product-search-input {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid #CBD5E1;
  border-radius: 8px;
  font-size: 13.5px;
}

.product-picker-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 240px;
  overflow-y: auto;
  border: 1px solid #E2E8F0;
  border-radius: 8px;
  padding: 8px;
}

.product-picker-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 6px;
  cursor: pointer;
  transition: background-color 0.15s;
}

.product-picker-item:hover {
  background-color: #F8FAFC;
}

.product-picker-item input[type="checkbox"] {
  accent-color: #0BB6B5;
  width: 16px;
  height: 16px;
}

.picker-item-info {
  flex: 1;
}

.picker-item-title {
  font-size: 13px;
  font-weight: 600;
  color: #1E293B;
}

.picker-item-price {
  font-size: 12px;
  color: #64748B;
}

/* ==========================================================
   8. RESPONSIVIDAD (TABLET Y MÓVIL: 360px, 390px, 430px)
   ========================================================== */
@media (max-width: 900px) {
  .boton-layout-grid {
    grid-template-columns: 1fr;
    gap: 20px;
    width: 100%;
    min-width: 0;
  }

  .boton-header {
    flex-direction: column;
    align-items: stretch;
  }

  .btn-save-boton {
    width: 100%;
  }

  .boton-dirty-bar-content {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }

  .boton-dirty-actions {
    width: 100%;
    justify-content: space-between;
  }

  .btn-discard-boton,
  .boton-dirty-actions .btn-save-boton {
    flex: 1;
    text-align: center;
  }
}

@media (max-width: 640px) {
  .dashboard-main-content {
    padding: 16px 10px 60px 10px !important;
  }

  .boton-controls-col,
  .boton-preview-col {
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }

  .boton-config-card,
  .preview-store-box,
  .preview-form-box {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
    padding: 16px 12px;
  }

  .shape-selector-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
    width: 100%;
  }

  .shape-card-btn-panel {
    padding: 8px 3px;
    min-width: 0;
    width: 100%;
  }

  .shape-card-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 3px;
    width: 100%;
    min-width: 0;
  }

  .shape-radio-indicator {
    width: 11px;
    height: 11px;
    flex-shrink: 0;
  }

  .shape-card-btn-panel.active .shape-radio-indicator::after {
    width: 5px;
    height: 5px;
  }

  .shape-label-text {
    font-size: 10px;
    letter-spacing: -0.2px;
    white-space: nowrap;
  }

  .offers-table-wrap {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .offers-table {
    min-width: 290px;
  }

  .offers-table th,
  .offers-table td {
    padding: 6px 6px;
    font-size: 12px;
  }

  .tier-units-input {
    width: 48px;
    padding: 4px;
  }

  .tier-discount-input {
    width: 44px;
    padding: 4px;
  }

  .color-control-row {
    flex-direction: row;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
  }

  .checkbox-label {
    width: 100%;
    margin-top: 4px;
  }

  .radio-options-row {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }

  .radio-pill-label {
    width: 100%;
    box-sizing: border-box;
    justify-content: flex-start;
  }

  .store-product-mock {
    flex-direction: column;
    align-items: stretch;
  }

  .product-img-wrap {
    width: 100%;
    height: 140px;
  }

  .product-img-wrap img {
    object-position: center;
  }

  .form-mock-body {
    padding: 12px;
  }

  .boton-modal-dialog {
    max-height: 94vh;
  }

  .boton-modal-dialog.large {
    max-width: 100%;
  }
}
