/* ===================================================================
   PERSONALIZAR EVENTO - ALGODON TODO EVENTO
   Rediseno completo alineado al sistema de diseno del sitio
   =================================================================== */

:root {
  --color-primary: #0071E3;
  --color-primary-light: #0077ED;
  --color-primary-dark: #0051BA;
  --color-secondary: #00D4FF;
  --color-success: #30D158;
  --color-warning: #FF9F0A;
  --color-error: #FF375F;

  --white: #FFFFFF;
  --gray-25: #FCFCFD;
  --gray-50: #F9F9FB;
  --gray-100: #F5F5F7;
  --gray-200: #E8E8ED;
  --gray-300: #D2D2D7;
  --gray-400: #AEAEB2;
  --gray-500: #8E8E93;
  --gray-600: #636366;
  --gray-700: #48484A;
  --gray-800: #3A3A3C;
  --gray-900: #1C1C1E;

  --gradient-primary: linear-gradient(135deg, #0071E3 0%, #00D4FF 100%);
  --gradient-success: linear-gradient(135deg, #30D158 0%, #34C759 100%);

  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.04), 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 4px 8px rgba(0, 0, 0, 0.04), 0 2px 4px rgba(0, 0, 0, 0.04);
  --shadow-lg: 0 8px 16px rgba(0, 0, 0, 0.06), 0 4px 8px rgba(0, 0, 0, 0.04);
  --shadow-xl: 0 16px 32px rgba(0, 0, 0, 0.08), 0 8px 16px rgba(0, 0, 0, 0.04);
  --shadow-2xl: 0 24px 48px rgba(0, 0, 0, 0.12), 0 12px 24px rgba(0, 0, 0, 0.06);

  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-display: 'Poppins', -apple-system, sans-serif;

  --text-xs: clamp(0.625rem, 0.75vw + 0.5rem, 0.75rem);
  --text-sm: clamp(0.75rem, 0.875vw + 0.625rem, 0.875rem);
  --text-base: clamp(0.875rem, 1vw + 0.75rem, 1rem);
  --text-lg: clamp(1rem, 1.125vw + 0.875rem, 1.125rem);
  --text-xl: clamp(1.125rem, 1.25vw + 1rem, 1.25rem);
  --text-2xl: clamp(1.25rem, 1.5vw + 1.125rem, 1.5rem);
  --text-3xl: clamp(1.5rem, 1.875vw + 1.25rem, 1.875rem);
  --text-4xl: clamp(1.875rem, 2.25vw + 1.5rem, 2.25rem);

  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-2xl: 20px;
  --radius-3xl: 24px;
  --radius-full: 9999px;

  --duration-fast: 150ms;
  --duration-base: 300ms;
  --duration-slow: 500ms;
  --ease-out: cubic-bezier(0, 0, 0.2, 1);
  --ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ==================== SECCION PRINCIPAL ==================== */
.personalizar-section {
  max-width: 900px;
  margin: 0 auto;
  padding: clamp(1.5rem, 5vw, 3rem) clamp(1rem, 3vw, 1.5rem);
  font-family: var(--font-sans);
  color: var(--gray-900);
  min-height: calc(100vh - 200px);
}

/* ==================== HEADER ==================== */
.personalizar-header {
  text-align: center;
  margin-bottom: clamp(1.5rem, 5vw, 3rem);
  animation: fadeInDown 0.6s var(--ease-out);
}

.personalizar-header h1 {
  font-family: var(--font-display);
  font-size: var(--text-4xl);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.03em;
  color: var(--gray-900);
  margin: 0.75rem 0 0.5rem;
}

.personalizar-header p {
  color: var(--gray-600);
  font-size: var(--text-lg);
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.6;
}

.confianza-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 16px;
  background: rgba(0, 113, 227, 0.08);
  border: 1px solid rgba(0, 113, 227, 0.15);
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--color-primary);
}

/* ==================== PROGRESS BAR ==================== */
.progress-container {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: clamp(1.5rem, 4vw, 2rem);
  padding: 0 1rem;
  gap: 0;
}

.progress-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  z-index: 2;
}

.step-circle {
  width: clamp(40px, 6vw, 48px);
  height: clamp(40px, 6vw, 48px);
  border-radius: 50%;
  background: var(--white);
  border: 2px solid var(--gray-300);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--text-base);
  color: var(--gray-400);
  transition: all var(--duration-base) var(--ease-spring);
}

.progress-step.active .step-circle {
  background: var(--gradient-primary);
  border-color: var(--color-primary);
  color: var(--white);
  box-shadow: 0 4px 15px rgba(0, 113, 227, 0.3);
  transform: scale(1.1);
}

.progress-step.completed .step-circle {
  background: var(--color-success);
  border-color: var(--color-success);
  color: var(--white);
}

.step-label {
  margin-top: 6px;
  font-size: var(--text-xs);
  color: var(--gray-500);
  font-weight: 600;
  white-space: nowrap;
  transition: color var(--duration-base) var(--ease-out);
}

.progress-step.active .step-label {
  color: var(--color-primary);
}

.progress-step.completed .step-label {
  color: var(--color-success);
}

.progress-line {
  height: 3px;
  flex: 1;
  max-width: 80px;
  background: var(--gray-200);
  border-radius: var(--radius-full);
  position: relative;
  overflow: hidden;
  margin: 0 4px;
  align-self: center;
  margin-bottom: 20px;
}

.progress-fill {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 0;
  background: var(--color-success);
  border-radius: var(--radius-full);
  transition: width var(--duration-slow) var(--ease-out);
}

.progress-step.completed + .progress-line .progress-fill {
  width: 100%;
}

/* ==================== FORM STEPS ==================== */
.form-step {
  background: var(--white);
  padding: clamp(1.25rem, 3vw, 2rem);
  border-radius: var(--radius-3xl);
  border: 1px solid var(--gray-200);
  box-shadow: var(--shadow-xl);
  margin-bottom: 1.5rem;
  animation: fadeInUp 0.5s var(--ease-out);
}

.step-header {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1.5rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--gray-100);
}

.step-icon {
  width: 52px;
  height: 52px;
  background: var(--gradient-primary);
  border-radius: var(--radius-xl);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-size: var(--text-xl);
  flex-shrink: 0;
  box-shadow: var(--shadow-md);
}

.step-header h2 {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  color: var(--gray-900);
  margin: 0;
  font-weight: 700;
  line-height: 1.2;
}

.step-subtitle {
  font-size: var(--text-sm);
  color: var(--gray-500);
  margin: 4px 0 0;
  line-height: 1.4;
}

.section-subtitle {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  color: var(--gray-900);
  font-weight: 700;
  margin: 1.5rem 0 1rem;
  display: flex;
  align-items: center;
  gap: 8px;
}

.section-subtitle i {
  color: var(--color-primary);
}

.highlight {
  color: var(--color-primary);
  font-weight: 700;
}

/* ==================== FORM ELEMENTS ==================== */
.form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.25rem;
  margin-bottom: 1rem;
}

.form-group {
  margin-bottom: 1rem;
}

.form-group label {
  display: block;
  font-weight: 600;
  color: var(--gray-800);
  margin-bottom: 8px;
  font-size: var(--text-sm);
}

.form-group label i {
  color: var(--color-primary);
  margin-right: 6px;
  width: 16px;
  text-align: center;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 12px 16px;
  font-size: var(--text-base);
  font-family: inherit;
  color: var(--gray-900);
  background: var(--gray-50);
  border: 2px solid var(--gray-200);
  border-radius: var(--radius-lg);
  transition: all var(--duration-base) var(--ease-out);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  background: var(--white);
  border-color: var(--color-primary);
  box-shadow: 0 0 0 4px rgba(0, 113, 227, 0.1);
  transform: translateY(-1px);
}

.form-group input:hover:not(:disabled):not(:focus),
.form-group select:hover:not(:disabled):not(:focus),
.form-group textarea:hover:not(:disabled):not(:focus) {
  border-color: var(--gray-400);
}

.form-group input.error,
.form-group select.error,
.form-group textarea.error {
  border-color: var(--color-error);
  box-shadow: 0 0 0 4px rgba(255, 55, 95, 0.1);
}

.form-group select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%230071E3' d='M6 8.825L.35 3.175l.825-.825L6 7.175l4.825-4.825.825.825z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  padding-right: 44px;
}

.form-group textarea {
  resize: vertical;
  min-height: 100px;
}

.helper-text {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: var(--text-xs);
  color: var(--gray-500);
  margin-top: 6px;
}

.error-message {
  display: none;
  color: var(--color-error);
  font-size: var(--text-xs);
  margin-top: 6px;
  font-weight: 500;
}

.error-message.show {
  display: block;
  animation: shake 0.5s;
}

/* ==================== UBICACION OPTIONS ==================== */
.ubicacion-options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-bottom: 1rem;
}

.ubicacion-option {
  padding: 1.25rem;
  border: 2px solid var(--gray-200);
  border-radius: var(--radius-xl);
  cursor: pointer;
  transition: all var(--duration-base) var(--ease-out);
  text-align: center;
  background: var(--white);
  position: relative;
}

.ubicacion-option:hover {
  border-color: var(--color-primary);
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}

.ubicacion-option.selected {
  border-color: var(--color-primary);
  background: linear-gradient(135deg, #f0f7ff, var(--white));
  box-shadow: 0 4px 15px rgba(0, 113, 227, 0.15);
}

.ubicacion-option.selected::after {
  content: '\f00c';
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
  position: absolute;
  top: 8px;
  right: 8px;
  color: var(--white);
  background: var(--color-primary);
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
}

.ubicacion-option i {
  font-size: 2rem;
  color: var(--color-primary);
  margin-bottom: 10px;
  display: block;
  transition: transform var(--duration-base) var(--ease-spring);
}

.ubicacion-option:hover i {
  transform: scale(1.1);
}

.ubicacion-option h4 {
  margin: 0 0 4px;
  color: var(--gray-900);
  font-weight: 700;
  font-size: var(--text-base);
}

.ubicacion-option p {
  margin: 0;
  color: var(--gray-500);
  font-size: var(--text-xs);
}

/* ==================== SMART SUGGESTION BANNER ==================== */
.smart-suggestion-banner {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: linear-gradient(135deg, #eff6ff, #dbeafe);
  border: 1px solid rgba(0, 113, 227, 0.2);
  border-radius: var(--radius-xl);
  padding: 1rem 1.25rem;
  margin-bottom: 1.5rem;
  animation: fadeIn 0.5s var(--ease-out);
}

.smart-banner-icon {
  width: 40px;
  height: 40px;
  background: var(--gradient-primary);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-size: var(--text-lg);
  flex-shrink: 0;
}

.smart-banner-text {
  flex: 1;
  font-size: var(--text-sm);
  color: var(--gray-700);
  line-height: 1.4;
}

.smart-banner-text strong {
  display: block;
  color: var(--gray-900);
  margin-bottom: 2px;
}

.smart-banner-btn {
  padding: 8px 16px;
  background: var(--color-primary);
  color: var(--white);
  border: none;
  border-radius: var(--radius-full);
  font-size: var(--text-sm);
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all var(--duration-base) var(--ease-spring);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
}

.smart-banner-btn:hover {
  background: var(--color-primary-dark);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

/* ==================== PRODUCTOS GRID ==================== */
.productos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
}

.producto-card {
  background: var(--white);
  border: 2px solid var(--gray-200);
  border-radius: var(--radius-2xl);
  padding: 1.25rem;
  transition: all var(--duration-base) var(--ease-out);
  position: relative;
}

.producto-card:hover {
  border-color: var(--gray-300);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.producto-card.selected {
  border-color: var(--color-primary);
  background: linear-gradient(135deg, #f0f7ff, var(--white));
  box-shadow: 0 4px 20px rgba(0, 113, 227, 0.12);
}

.producto-card-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}

.producto-icon-wrap {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--text-xl);
  flex-shrink: 0;
}

.icon-algodon { background: linear-gradient(135deg, #e3f2fd, #bbdefb); color: #0071E3; }
.icon-poporopos { background: linear-gradient(135deg, #fff8e1, #ffecb3); color: #f57f17; }
.icon-granizadas { background: linear-gradient(135deg, #e3f2fd, #bbdefb); color: #1565c0; }
.icon-churros { background: linear-gradient(135deg, #efebe9, #d7ccc8); color: #5d4037; }
.icon-manzanas { background: linear-gradient(135deg, #ffebee, #ffcdd2); color: #c62828; }
.icon-obleas { background: linear-gradient(135deg, #fff3e0, #ffe0b2); color: #e65100; }

.producto-info {
  flex: 1;
  min-width: 0;
}

.producto-info label {
  display: block;
  font-weight: 700;
  font-size: var(--text-base);
  color: var(--gray-900);
  cursor: pointer;
  margin: 0;
  line-height: 1.2;
}

.producto-price-tag {
  display: block;
  font-size: var(--text-xs);
  font-weight: 700;
  color: var(--color-primary);
  margin-top: 2px;
}

.producto-card-header input[type="checkbox"] {
  width: 22px;
  height: 22px;
  cursor: pointer;
  accent-color: var(--color-primary);
  flex-shrink: 0;
}

.producto-descripcion {
  font-size: var(--text-xs);
  color: var(--gray-500);
  line-height: 1.4;
  margin: 0 0 8px;
}

.producto-suggestion {
  display: flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(135deg, #fffbeb, #fef3c7);
  border: 1px solid #fbbf24;
  border-radius: var(--radius-md);
  padding: 6px 10px;
  font-size: var(--text-xs);
  color: #92400e;
  margin-bottom: 10px;
}

.producto-suggestion i {
  color: #f59e0b;
}

.producto-cantidad {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.producto-minimo-badge {
  font-size: var(--text-xs);
  color: var(--gray-500);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}

.quantity-input {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 1;
}

.qty-btn {
  width: 44px;
  height: 44px;
  border: 2px solid var(--gray-200);
  background: var(--white);
  border-radius: var(--radius-md);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--duration-fast) var(--ease-out);
  color: var(--gray-700);
  flex-shrink: 0;
}

.qty-btn:hover:not(:disabled) {
  border-color: var(--color-primary);
  background: var(--color-primary);
  color: var(--white);
}

.qty-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.quantity-input input {
  flex: 1;
  min-width: 50px;
  max-width: 80px;
  text-align: center;
  padding: 8px 4px;
  font-weight: 700;
  font-size: var(--text-base);
  border: 2px solid var(--gray-200);
  border-radius: var(--radius-md);
  background: var(--gray-50);
  color: var(--gray-900);
}

.quantity-input input:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(0, 113, 227, 0.1);
}

.quantity-input input:disabled {
  opacity: 0.4;
}

.producto-subtotal {
  font-size: var(--text-base);
  font-weight: 700;
  color: var(--color-primary);
  text-align: right;
  white-space: nowrap;
  min-width: 70px;
}

/* ==================== PRICE ESTIMATE BAR ==================== */
.price-estimate-bar {
  background: var(--gray-900);
  color: var(--white);
  border-radius: var(--radius-xl);
  padding: 1.25rem 1.5rem;
  margin-top: 1.5rem;
  text-align: center;
}

.estimate-info {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 6px;
}

.estimate-label {
  font-size: var(--text-base);
  font-weight: 600;
  color: var(--gray-300);
}

.estimate-amount {
  font-family: var(--font-display);
  font-size: var(--text-3xl);
  font-weight: 800;
  color: var(--white);
}

.estimate-note {
  font-size: var(--text-xs);
  color: var(--gray-400);
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

/* ==================== RESUMEN CARD ==================== */
.resumen-card {
  border-radius: var(--radius-2xl);
  overflow: hidden;
  border: 1px solid var(--gray-200);
  box-shadow: var(--shadow-lg);
}

.resumen-section {
  border-bottom: 1px solid var(--gray-100);
}

.resumen-section:last-of-type {
  border-bottom: none;
}

.resumen-section-header {
  background: var(--gradient-primary);
  color: var(--white);
  padding: 10px 20px;
  font-weight: 700;
  font-size: var(--text-sm);
  display: flex;
  align-items: center;
  gap: 8px;
}

.resumen-section-body {
  padding: 4px 0;
}

.resumen-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 20px;
  border-bottom: 1px solid var(--gray-50);
}

.resumen-row:last-child {
  border-bottom: none;
}

.resumen-label {
  font-size: var(--text-sm);
  color: var(--gray-500);
  font-weight: 500;
}

.resumen-value {
  font-size: var(--text-sm);
  color: var(--gray-900);
  font-weight: 600;
  text-align: right;
}

.resumen-producto-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 20px;
  border-bottom: 1px solid var(--gray-50);
}

.resumen-producto-row:last-child {
  border-bottom: none;
}

.resumen-producto-info {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: var(--text-sm);
}

.resumen-producto-info i {
  color: var(--color-primary);
  width: 18px;
  text-align: center;
}

.resumen-producto-name {
  font-weight: 600;
  color: var(--gray-900);
}

.resumen-producto-qty {
  color: var(--gray-500);
  font-weight: 500;
}

.resumen-producto-price {
  font-weight: 700;
  color: var(--color-primary);
  font-size: var(--text-sm);
}

.resumen-total-row {
  background: var(--gray-50);
  padding: 14px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.resumen-total-label {
  font-size: var(--text-base);
  font-weight: 700;
  color: var(--gray-900);
}

.resumen-total-amount {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 800;
  color: var(--color-primary);
}

.resumen-disclaimer {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 14px 20px;
  background: var(--gray-25);
  font-size: var(--text-xs);
  color: var(--gray-500);
  border-top: 1px solid var(--gray-100);
}

.resumen-disclaimer i {
  color: var(--color-primary);
  margin-top: 2px;
  flex-shrink: 0;
}

.resumen-disclaimer p {
  margin: 0;
  line-height: 1.4;
}

.resumen-empty {
  padding: 16px 20px;
  color: var(--gray-400);
  font-size: var(--text-sm);
  text-align: center;
  font-style: italic;
}

/* ==================== NAVEGACION ==================== */
.form-navigation {
  display: flex;
  gap: 12px;
  justify-content: space-between;
  align-items: center;
  margin-top: 1.5rem;
  flex-wrap: wrap;
}

.submit-buttons {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  flex: 1;
  justify-content: flex-end;
}

/* ==================== BOTONES ==================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  font-size: var(--text-base);
  font-weight: 600;
  font-family: inherit;
  border: none;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all var(--duration-base) var(--ease-spring);
  min-height: 48px;
  text-decoration: none;
  line-height: 1;
}

.btn-primary {
  background: var(--gray-900);
  color: var(--white);
  box-shadow: var(--shadow-lg);
}

.btn-primary:hover {
  background: var(--color-primary);
  transform: translateY(-2px);
  box-shadow: var(--shadow-xl);
}

.btn-secondary {
  background: var(--white);
  color: var(--gray-700);
  border: 2px solid var(--gray-200);
}

.btn-secondary:hover {
  background: var(--gray-50);
  border-color: var(--gray-300);
  transform: translateY(-2px);
}

.btn-whatsapp {
  background: #25D366;
  color: white;
  box-shadow: 0 4px 15px rgba(37, 211, 102, 0.3);
}

.btn-whatsapp:hover {
  background: #1da851;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(37, 211, 102, 0.4);
}

.btn-email {
  background: var(--color-primary);
  color: white;
  box-shadow: 0 4px 15px rgba(0, 113, 227, 0.3);
}

.btn-email:hover {
  background: var(--color-primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 113, 227, 0.4);
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
}

.btn:active:not(:disabled) {
  transform: scale(0.97);
  transition-duration: 0.05s;
}

/* ==================== MENSAJE DE CONFIANZA ==================== */
.mensaje-confianza {
  margin-top: 2rem;
  padding: 1.5rem;
  background: var(--gray-50);
  border-radius: var(--radius-2xl);
  border: 1px solid var(--gray-200);
}

.confianza-items {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.25rem;
}

.confianza-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.confianza-item > i {
  width: 36px;
  height: 36px;
  background: var(--gradient-primary);
  color: var(--white);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--text-sm);
  flex-shrink: 0;
}

.confianza-item > div {
  display: flex;
  flex-direction: column;
}

.confianza-item strong {
  font-size: var(--text-sm);
  color: var(--gray-900);
  font-weight: 700;
}

.confianza-item span {
  font-size: var(--text-xs);
  color: var(--gray-500);
  line-height: 1.3;
}

/* ==================== LOADING OVERLAY ==================== */
.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  backdrop-filter: blur(5px);
}

.loading-overlay.show {
  display: flex;
  animation: fadeIn 0.3s;
}

.loading-spinner {
  background: var(--white);
  padding: 2.5rem;
  border-radius: var(--radius-2xl);
  text-align: center;
  box-shadow: var(--shadow-2xl);
}

.loading-spinner i {
  font-size: 2.5rem;
  color: var(--color-primary);
  margin-bottom: 12px;
}

.loading-spinner p {
  margin: 0;
  color: var(--gray-900);
  font-weight: 600;
  font-size: var(--text-base);
}

/* ==================== ANIMATIONS (moved from JS) ==================== */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-20px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
  20%, 40%, 60%, 80% { transform: translateX(5px); }
}

@keyframes slideInRight {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

@keyframes slideOutRight {
  from { transform: translateX(0); opacity: 1; }
  to { transform: translateX(100%); opacity: 0; }
}

.fade-in {
  animation: fadeInUp 0.5s var(--ease-out);
}

.pulse-effect {
  animation: pulseEffect 0.3s var(--ease-out);
}

@keyframes pulseEffect {
  0% { transform: scale(1); }
  50% { transform: scale(1.03); }
  100% { transform: scale(1); }
}

/* Notification close btn */
.notification-close {
  background: none;
  border: none;
  color: white;
  font-size: 1.2rem;
  cursor: pointer;
  margin-left: 10px;
  opacity: 0.8;
  transition: opacity var(--duration-fast);
}

.notification-close:hover {
  opacity: 1;
}

/* Success state for validated inputs */
input.success,
select.success,
textarea.success {
  border-color: var(--color-success) !important;
}

input.success:focus,
select.success:focus,
textarea.success:focus {
  box-shadow: 0 0 0 4px rgba(48, 209, 88, 0.1) !important;
}

/* ==================== ACCESSIBILITY ==================== */
:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 767px) {
  .personalizar-section {
    padding: 1rem 0.75rem;
  }

  .personalizar-header {
    margin-bottom: 1rem;
  }

  .personalizar-header p {
    font-size: 0.85rem;
  }

  .progress-container {
    gap: 0;
    padding: 0 0.25rem;
    margin-bottom: 1rem;
  }

  .step-circle {
    width: 36px;
    height: 36px;
    font-size: 0.8rem;
  }

  .step-label {
    font-size: 0.65rem;
  }

  .progress-line {
    max-width: 32px;
    margin-bottom: 16px;
  }

  .form-step {
    padding: 1rem 0.75rem;
    border-radius: var(--radius-2xl);
  }

  .step-header {
    flex-direction: column;
    gap: 8px;
    padding-bottom: 0.75rem;
  }

  .step-header h2 {
    font-size: 1.1rem;
  }

  .step-icon {
    width: 40px;
    height: 40px;
    font-size: 0.9rem;
  }

  .section-subtitle {
    font-size: 0.85rem;
    margin-bottom: 0.75rem;
  }

  .form-row {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }

  .form-group label {
    font-size: 0.85rem;
  }

  .productos-grid {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }

  .ubicacion-options {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }

  .form-navigation {
    flex-direction: column;
    gap: 0.5rem;
  }

  .submit-buttons {
    width: 100%;
    flex-direction: column;
  }

  .btn {
    width: 100%;
    justify-content: center;
    padding: 0.75rem 1rem;
    font-size: 0.9rem;
  }

  .smart-suggestion-banner {
    flex-direction: column;
    text-align: center;
    gap: 10px;
    padding: 0.75rem;
    font-size: 0.85rem;
  }

  .producto-cantidad {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }

  .producto-subtotal {
    text-align: center;
    font-size: var(--text-lg);
  }

  .confianza-items {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }

  .resumen-producto-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }

  .resumen-producto-price {
    align-self: flex-end;
  }
}

@media (max-width: 479px) {
  .personalizar-header h1 {
    font-size: clamp(1.25rem, 5.5vw, 1.6rem);
  }

  .personalizar-header p {
    font-size: 0.8rem;
  }

  .step-circle {
    width: 32px;
    height: 32px;
    font-size: 0.75rem;
  }

  .step-label {
    display: none;
  }

  .progress-line {
    max-width: 28px;
    margin-bottom: 0;
  }

  .form-step {
    padding: 0.75rem 0.6rem;
  }

  .step-header h2 {
    font-size: 1rem;
  }

  .step-icon {
    width: 36px;
    height: 36px;
    font-size: 0.85rem;
  }
}

/* Touch targets for mobile */
@media (pointer: coarse) {
  .qty-btn,
  .btn,
  .ubicacion-option,
  .smart-banner-btn,
  .producto-card-header input[type="checkbox"] {
    min-height: 44px;
    min-width: 44px;
  }
}

/* ==================== PRINT ==================== */
@media print {
  .top-bar,
  .main-header,
  .main-nav,
  .mobile-sidebar,
  .whatsapp-float,
  .form-navigation,
  .mensaje-confianza,
  .smart-suggestion-banner,
  .footer {
    display: none !important;
  }

  .personalizar-section {
    padding: 20px;
  }

  .form-step {
    page-break-inside: avoid;
    box-shadow: none;
    border: 1px solid #ddd;
  }
}
