/* ============================================
   VARIABLES Y CONFIGURACIÓN GLOBAL
   ============================================ */
:root {
  --primary-color: #212c55;
  --secondary-color: #212c55;
  --secondary-light: #3a4a7f;
  --secondary-dark: #1a2142;
  --bg-light: #f8f9fa;
  --bg-white: #ffffff;
  --border-color: #e0e0e0;
  --text-dark: #333;
  --text-muted: #999;
  --text-light: #666;
  --success-color: #10b981;
  --success-bg: #ecfdf5;
  --warning-color: #f59e0b;
  --warning-bg: #fffbeb;
  --error-color: #ef4444;
  --error-bg: #fef2f2;
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 15px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 8px 32px rgba(33, 44, 85, 0.12);
}

/* ============================================
   RESET Y ESTILOS BASE
   ============================================ */
* {
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* ============================================
   CONTENEDOR PRINCIPAL
   ============================================ */
.cotizador-container {
  background: linear-gradient(135deg, var(--bg-light) 0%, var(--bg-white) 100%);
  border-radius: 16px;
  padding: 40px;
  max-width: 1200px;
  margin: 30px auto;
  box-shadow: var(--shadow-lg);
}

/* ============================================
   TÍTULOS
   ============================================ */
.titulo {
  text-align: center;
  color: var(--primary-color);
  margin-bottom: 10px;
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -0.5px;
}

.titulo::after {
  content: '';
  display: block;
  width: 60px;
  height: 4px;
  background: linear-gradient(90deg, var(--secondary-color), var(--secondary-light));
  margin: 15px auto 0;
  border-radius: 2px;
}

/* ============================================
   FORMULARIOS
   ============================================ */
.form-row {
  display: flex;
  justify-content: space-between;
  gap: 15px;
  margin-bottom: 10px;
}

.form-group {
  flex: 1;
  display: flex;
  flex-direction: column;
  position: relative;
}

.form-group.full-width {
  flex: 1 0 100%;
}

.form-group label {
  font-weight: 600;
  color: var(--primary-color);
  margin-bottom: 8px;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.form-group input,
.form-group select {
  border: 2px solid var(--border-color);
  border-radius: 8px;
  padding: 12px 14px;
  font-size: 14px;
  font-family: inherit;
  transition: all 0.3s ease;
  background: var(--bg-white);
  color: var(--text-dark);
}

.form-group input:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--secondary-color);
  background-color: #f5f7fd;
  box-shadow: 0 0 0 3px rgba(33, 44, 85, 0.1);
}

.form-group input::placeholder {
  color: var(--text-muted);
}

.form-group input.error {
  border-color: var(--error-color) !important;
  background-color: #fffbfb !important;
}

.form-group input:invalid {
  border-color: var(--error-color);
}

#tipo-mercaderia-container {
  margin-top: 15px;
  transition: all 0.3s ease;
}

.full-width {
  width: 100%;
}

/* ============================================
   BOTONES
   ============================================ */
.btn-calcular {
  width: 100%;
  background: linear-gradient(135deg, #212c55 0%, #1a2142 100%);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 14px 24px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: 0 4px 15px rgba(33, 44, 85, 0.3);
}

.btn-calcular:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(33, 44, 85, 0.4);
  background: linear-gradient(135deg, #1a2142 0%, #141829 100%);
}

.btn-calcular:active {
  transform: translateY(0);
  box-shadow: 0 2px 10px rgba(33, 44, 85, 0.3);
}

.btn-contacto {
  background: linear-gradient(135deg, #212c55 0%, #1a2142 100%);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 16px 32px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: 0 6px 20px rgba(33, 44, 85, 0.3);
  display: inline-block;
  min-width: 300px;
}

.btn-contacto:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(33, 44, 85, 0.4);
  background: linear-gradient(135deg, #1a2142 0%, #141829 100%);
}

.btn-contacto:active {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(33, 44, 85, 0.3);
}

.btn-contacto-container {
  margin-top: 30px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  width: 100%;
}

.btn-crear-casilla,
.btn-whatsapp {
  background: #212c55;
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 14px 24px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: 0 4px 15px rgba(33, 44, 85, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-crear-casilla:hover,
.btn-whatsapp:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(33, 44, 85, 0.4);
  background: #212c55;
}

.btn-crear-casilla:active,
.btn-whatsapp:active {
  transform: translateY(0);
  box-shadow: 0 2px 10px rgba(33, 44, 85, 0.3);
}

.btn-crear-casilla i,
.btn-whatsapp i {
  font-size: 16px;
}

.btn-whatsapp {
  background: linear-gradient(135deg, #25d366 0%, #1ea754 100%);
  box-shadow: 0 4px 15px rgba(37, 211, 102, 0.3);
}

.btn-whatsapp:hover {
  box-shadow: 0 6px 20px rgba(37, 211, 102, 0.4);
  background: linear-gradient(135deg, #1ea754 0%, #16a944 100%);
}

.btn-whatsapp:active {
  box-shadow: 0 2px 10px rgba(37, 211, 102, 0.3);
}

/* ============================================
   ANIMACIONES
   ============================================ */
@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ============================================
   RESULTADOS
   ============================================ 
    
   */
.resultado {
  margin-top: 35px;
  display: none;
  animation: slideIn 0.4s ease;
}

.tabla-resultados {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 25px;
  margin-bottom: 25px;
}

.col {
  background: #ececec;
  padding: 20px;
  border-radius: 12px;
  border-left: 5px solid var(--primary-color);
  box-shadow: var(--shadow-sm);
}

.col h3 {
  text-align: left;
  margin-bottom: 20px;
  color: var(--primary-color);
  border-bottom: 2px solid var(--primary-color);
  padding-bottom: 12px;
  font-size: 16px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 10px;
}

.col h3 i {
  color: var(--primary-color);
  font-size: 20px;
}

.fila {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 0px 0;
  padding: 5px 0;
  font-size: 14px;
  color: #303030;
}

.fila span:first-child {
  display: flex;
  align-items: center;
  gap: 0px;
  font-weight: 500;
}

.fila span:last-child {
  font-weight: 600;
  color: var(--primary-color);
  min-width: 0px;
  text-align: right;
  transition: all 0.3s ease;
}

.fila.total {
  border-top: 2px solid var(--border-color);
  border-bottom: 2px solid var(--border-color);
  margin-top: 12px;
  padding-top: 12px;
  padding-left: 20px;
  padding-right: 20px;
  padding-bottom: 12px;
  /*background: rgba(0, 72, 255, 0.05);*/
  background: #ffffff;
  border-radius: 6px;
  font-size: 15px;
}

.fila.total span:last-child {
  color: var(--primary-color);
  font-size: 16px;
  font-weight: 700;
}

.totales-generales {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin-bottom: 15px;
  margin-top: 20px;
}

.total-general {
  background: linear-gradient(135deg, #212c55 0%, #1a2142 100%);
  color: #fff;
  padding: 12px 16px;
  border-radius: 10px;
  text-align: center;
  font-size: 18px;
  box-shadow: 0 4px 12px rgba(33, 44, 85, 0.2);
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  border: 2px solid transparent;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: row;
  gap: 8px;
  min-height: 50px;
}

.total-general::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0) 100%);
  opacity: 0;
  transition: opacity 0.35s ease;
  z-index: 0;
}

.total-general:hover {
  transform: translateY(-4px) scale(1.02);
  box-shadow: 0 15px 40px rgba(33, 44, 85, 0.4);
  border-color: rgba(255, 255, 255, 0.3);
}

.total-general:hover::before {
  opacity: 1;
}

.total-general.importacion {
  background: linear-gradient(135deg, #f18a00 0%, #e07900 100%);
  color: #fff;
  box-shadow: 0 10px 30px rgba(241, 138, 0, 0.3);
}

.total-general.importacion:hover {
  box-shadow: 0 15px 40px rgba(241, 138, 0, 0.4);
  border-color: rgba(255, 255, 255, 0.3);
}

.total-general .label {
  display: inline;
  font-weight: 600;
  font-size: 15px;
  margin-bottom: 0;
  opacity: 0.95;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  position: relative;
  z-index: 1;
  white-space: nowrap;
}

.total-general strong {
  display: inline;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.5px;
  position: relative;
  z-index: 1;
  white-space: nowrap;
}

/* Tooltips para totales generales */
.total-general {
  position: relative;
  cursor: pointer;
}

.total-general::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: 110%;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.85);
  color: #fff;
  padding: 10px 14px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  white-space: normal;
  width: 220px;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  z-index: 1000;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
  line-height: 1.4;
}

.total-general::before {
  content: '';
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 7px solid transparent;
  border-top-color: rgba(0, 0, 0, 0.85);
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 1000;
  display: none;
}

.total-general:hover::after,
.total-general:hover::before {
  opacity: 1;
}

/* ============================================
   TOOLTIPS
   ============================================ */
.tooltip-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  background-color: transparent;
  color: var(--secondary-color);
  border-radius: 50%;
  font-size: 14px;
  font-weight: bold;
  cursor: help;
  position: relative;
  margin-left: 6px;
  transition: all 0.3s ease;
}

.tooltip-icon i {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #6666665e;
}

.tooltip-icon:hover {
  color: var(--secondary-dark);
  transform: scale(1.2);
}

.tooltip-icon::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: 125%;
  left: 50%;
  transform: translateX(-50%);
  background: var(--primary-color);
  color: white;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  z-index: 1000;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.tooltip-icon::before {
  content: '';
  position: absolute;
  bottom: 115%;
  left: 50%;
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-top-color: var(--primary-color);
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 1000;
}

.tooltip-icon:hover::after,
.tooltip-icon:hover::before {
  opacity: 1;
}

/* ============================================
   MENSAJES DE VALIDACIÓN E INFORMACIÓN
   ============================================ */
.error-mensaje {
  background: linear-gradient(135deg, var(--error-bg) 0%, #ffe0e0 100%);
  color: var(--error-color);
  padding: 14px 16px;
  margin: 5px 0;
  border-radius: 8px;
  border-left: 4px solid var(--error-color);
  display: none;
  font-weight: 500;
  font-size: 14px;
  box-shadow: 0 2px 8px rgba(198, 40, 40, 0.15);
  animation: slideDown 0.3s ease;
}

.info-message {
  background-color: var(--success-bg);
  color: var(--success-color);
  padding: 15px;
  margin: 5px 0;
  border-radius: 8px;
  border-left: 4px solid var(--success-color);
  font-size: 0.95em;
  line-height: 1.5;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  display: none;
}

.info-message ul {
  margin: 10px 0;
  padding-left: 20px;
}

.info-message li {
  margin: 5px 0;
}

.info-message i {
  font-size: 16px;
  margin-right: 10px;
  vertical-align: middle;
}

.info-message h4 {
  display: inline-block;
  margin: 0 0 8px 0;
  font-size: 14px;
  font-weight: 600;
  vertical-align: middle;
}

.info-message .info-content {
  margin-top: 8px;
  line-height: 1.6;
}

/* ============================================
   CATEGORÍAS
   ============================================ */
.categorias-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 16px;
  margin: 35px auto;
  max-width: 1200px;
  padding: 25px;
  overflow-x: auto;
  background: linear-gradient(135deg, rgba(33, 44, 85, 0.05) 0%, rgba(33, 44, 85, 0.05) 100%);
  border-radius: 12px;
}

.categorias-grid::-webkit-scrollbar {
  display: none;
}

.categorias-grid {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.categoria-card {
  width: 100%;
  aspect-ratio: 1;
  min-width: 130px;
  border-radius: 12px;
  border: 2px solid var(--border-color);
  padding: 18px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  background: linear-gradient(135deg, var(--bg-white) 0%, #f8f9fa 100%);
  position: relative;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.categoria-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 8px 24px rgba(33, 44, 85, 0.25);
  border-color: var(--secondary-color);
  background: linear-gradient(135deg, #f5f7fd 0%, var(--bg-white) 100%);
}

.categoria-card.selected {
  border-color: var(--secondary-color);
  background: #eef2ff;
  box-shadow: 0 8px 24px rgba(33, 44, 85, 0.3);
  position: relative;
}

.categoria-card.selected::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(33, 44, 85, 0.1) 0%, rgba(33, 44, 85, 0.05) 100%);
  border-radius: 12px;
  pointer-events: none;
}

.categoria-icon {
  font-size: 42px;
  margin: 0 auto 12px auto;
  color: var(--secondary-color);
  transition: all 0.3s ease;
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(33, 44, 85, 0.1);
  border-radius: 10px;
  line-height: 1;
}

.categoria-icon i {
  display: flex;
  align-items: center;
  justify-self: center;
}

.categoria-icon.disabled {
  opacity: 0.4;
  color: #999;
}

.categoria-card:hover .categoria-icon {
  background: rgba(33, 44, 85, 0.2);
  transform: scale(1.1);
}

.categoria-card:hover .categoria-icon.disabled {
  background: rgba(33, 44, 85, 0.1);
  transform: scale(1);
}

.categoria-card.selected .categoria-icon {
  background: linear-gradient(135deg, rgba(33, 44, 85, 0.2) 0%, rgba(33, 44, 85, 0.1) 100%);
}

.categoria-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--primary-color);
  text-align: center;
  margin-bottom: 6px;
  letter-spacing: -0.3px;
}

.categoria-subtitle {
  font-size: 12px;
  color: var(--text-muted);
  text-align: center;
  line-height: 1.4;
  font-weight: 500;
}

/* Campos dinámicos */
.campos-dinamicos {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease-out;
}

.campos-dinamicos.visible {
  max-height: 1000px;
  transition: max-height 0.5s ease-in;
}

.campos-categoria {
  display: none;
  background: linear-gradient(135deg, #f8f9fa 0%, var(--bg-white) 100%);
  padding: 20px;
  border-radius: 10px;
  margin-top: 20px;
}

.campos-categoria.visible {
  display: block;
  animation: slideDown 0.3s ease-out;
}

/* Contenedor de información */
.info-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 15px 0;
}

.info-message#info-general {
  display: none;
}

.info-message#info-excepciones {
  background-color: var(--warning-bg);
  border-left-color: var(--warning-color);
  color: #78350f;
}

.info-message#info-excepciones i {
  color: var(--warning-color);
}

.info-message#info-restricciones {
  background-color: var(--error-bg);
  border-left-color: var(--error-color);
  color: #7f1d1d;
}

.info-message#info-restricciones i {
  color: var(--error-color);
}

/* ============================================
   RESTRICCIONES EN RESULTADO
   ============================================ */
.restricciones-resultado {
  background-color: var(--error-bg);
  color: #7f1d1d;
  padding: 15px;
  margin: 15px 0 20px 0;
  border-radius: 8px;
  border-left: 4px solid var(--error-color);
  font-size: 0.95em;
  line-height: 1.6;
  box-shadow: 0 2px 8px rgba(198, 40, 40, 0.15);
  animation: slideDown 0.3s ease;
}

.restricciones-resultado i {
  font-size: 16px;
  margin-right: 10px;
  vertical-align: middle;
  color: var(--error-color);
}

.restricciones-resultado h4 {
  display: inline-block;
  margin: 0 0 8px 0;
  font-size: 14px;
  font-weight: 600;
  vertical-align: middle;
  color: #7f1d1d;
}

.restricciones-contenido {
  margin-top: 8px;
  line-height: 1.6;
  color: #7f1d1d;
}

.proximamente-mensaje {
  text-align: center;
  padding: 30px;
  background: #f8f9ff;
  border-radius: 10px;
  margin: 20px 0;
  border: 2px dashed #007bff;
}

.proximamente-mensaje i {
  font-size: 48px;
  color: #007bff;
  margin-bottom: 15px;
}

.proximamente-mensaje h3 {
  color: #007bff;
  font-size: 24px;
  margin-bottom: 10px;
}

.proximamente-mensaje p {
  color: var(--text-light);
  font-size: 16px;
  line-height: 1.5;
}

/* ============================================
   MODAL
   ============================================ */
.modal {
  display: none;
  position: fixed;
  z-index: 2000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  animation: fadeIn 0.3s ease;
}

.modal.active {
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-content {
  background: linear-gradient(135deg, var(--bg-white) 0%, var(--bg-light) 100%);
  padding: 40px;
  border-radius: 16px;
  max-width: 450px;
  width: 90%;
  box-shadow: 0 12px 48px rgba(33, 44, 85, 0.25);
  animation: slideUp 0.3s ease;
}

.modal-header {
  margin-bottom: 25px;
}

.modal-close {
  float: right;
  font-size: 28px;
  font-weight: bold;
  color: var(--text-muted);
  cursor: pointer;
  border: none;
  background: none;
  padding: 0;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.modal-close:hover {
  color: var(--primary-color);
  transform: scale(1.2);
}

.modal h2 {
  color: var(--primary-color);
  margin-bottom: 10px;
  font-size: 24px;
  font-weight: 700;
}

.modal p {
  color: var(--text-light);
  font-size: 14px;
  margin-bottom: 20px;
}

.modal-form {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.modal-form-group {
  display: flex;
  flex-direction: column;
}

.modal-form-group label {
  font-weight: 600;
  color: var(--primary-color);
  margin-bottom: 6px;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.modal-form-group input {
  border: 2px solid var(--border-color);
  border-radius: 8px;
  padding: 11px 12px;
  font-size: 14px;
  font-family: inherit;
  transition: all 0.3s ease;
  background: var(--bg-white);
}

.modal-form-group input:focus {
  outline: none;
  border-color: var(--secondary-color);
  background-color: #f5f7fd;
  box-shadow: 0 0 0 3px rgba(33, 44, 85, 0.1);
}

.btn-enviar-solicitud {
  background: linear-gradient(135deg, #212c55 0%, #1a2142 100%);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 13px 24px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: 10px;
  box-shadow: 0 4px 15px rgba(33, 44, 85, 0.3);
}

.btn-enviar-solicitud:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(33, 44, 85, 0.4);
  background: linear-gradient(135deg, #1a2142 0%, #141829 100%);
}

.btn-enviar-solicitud:active {
  transform: translateY(0);
  box-shadow: 0 2px 10px rgba(33, 44, 85, 0.3);
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */
@media (max-width: 1200px) {
  .categorias-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (max-width: 1024px) {
  .categorias-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (max-width: 768px) {
  .cotizador-container {
    padding: 30px 20px;
    margin: 20px 10px;
  }

  .titulo {
    font-size: 26px;
  }

  .form-row {
    flex-direction: column;
    gap: 15px;
    margin-bottom: 15px;
  }

  .form-row:last-of-type {
    margin-bottom: 0;
  }

  .tabla-resultados {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .categorias-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    padding: 15px;
    margin: 25px auto;
  }

  .categoria-card {
    min-width: unset;
  }

  .btn-contacto-container {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .btn-crear-casilla,
  .btn-whatsapp {
    padding: 12px 16px;
    font-size: 13px;
  }

  .tooltip-icon::after {
    white-space: normal;
    width: 150px;
    bottom: 130%;
  }

  .form-row .btn-calcular {
    width: 100%;
    margin-top: 0;
  }

  .totales-generales {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .total-general {
    padding: 10px 12px;
    min-height: 45px;
    flex-direction: row;
    gap: 6px;
  }

  .total-general strong {
    font-size: 16px;
  }

  .total-general .label {
    font-size: 10px;
    margin-bottom: 0;
  }

  .total-general::after {
    width: 200px;
    font-size: 12px;
  }
}

@media (max-width: 480px) {
  .cotizador-container {
    padding: 20px 15px;
    margin: 10px;
  }

  .titulo {
    font-size: 22px;
    margin-bottom: 20px;
  }

  .titulo::after {
    width: 50px;
  }

  .form-row {
    gap: 12px;
  }

  .form-group label {
    font-size: 12px;
  }

  .form-group input,
  .form-group select {
    padding: 10px 12px;
    font-size: 14px;
  }

  .btn-calcular {
    padding: 12px 20px;
    font-size: 14px;
  }

  .categorias-grid {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    gap: 10px;
    padding: 10px;
    margin: 20px -10px;
  }

  .categoria-card {
    flex: 0 0 130px;
    width: 130px;
    height: 130px;
    scroll-snap-align: center;
    min-width: 130px;
    padding: 15px;
  }

  .categoria-icon {
    font-size: 36px;
    width: 48px;
    height: 48px;
    margin-bottom: 6px;
  }

  .categoria-title {
    font-size: 14px;
  }

  .categoria-subtitle {
    font-size: 11px;
  }

  .tabla-resultados {
    grid-template-columns: 1fr;
  }

  .col {
    padding: 18px;
  }

  .col h3 {
    font-size: 14px;
    margin-bottom: 15px;
  }

  .fila {
    font-size: 13px;
    margin: 10px 0;
  }

  .tooltip-icon {
    width: 16px;
    height: 16px;
    font-size: 10px;
  }

  .tooltip-icon::after {
    font-size: 11px;
    padding: 6px 10px;
    bottom: 120%;
    width: 140px;
  }

  .tooltip-icon::before {
    bottom: 110%;
    border: 5px solid transparent;
    border-top-color: var(--primary-color);
  }

  .totales-generales {
    grid-template-columns: 1fr;
    gap: 8px;
    margin-top: 15px;
    margin-bottom: 10px;
  }

  .total-general {
    font-size: 14px;
    padding: 8px 10px;
    min-height: 40px;
    margin-bottom: 0;
    flex-direction: row;
    gap: 4px;
  }

  .total-general strong {
    font-size: 14px;
  }

  .total-general .label {
    font-size: 9px;
    margin-bottom: 0;
  }

  .total-general span {
    font-size: 12px;
  }

  .total-general::after {
    width: 180px;
    font-size: 11px;
  }

  .btn-contacto-container {
    grid-template-columns: 1fr;
    gap: 12px;
    margin-top: 20px;
  }

  .btn-crear-casilla,
  .btn-whatsapp {
    padding: 12px 18px;
    font-size: 13px;
    width: 100%;
  }

  .btn-crear-casilla i,
  .btn-whatsapp i {
    font-size: 14px;
  }
}

@media (max-width: 360px) {
  .categorias-grid {
    gap: 8px;
    padding: 8px;
  }

  .categoria-card {
    flex: 0 0 120px;
    width: 120px;
    height: 120px;
  }

  .categoria-icon {
    font-size: 32px;
  }
}
