:root {
  --bg: #006ba1;
  --panel: #ffffff;
  --panel-soft: #eef7ff;
  --line: #d8ebff;
  --text: #0e2e4c;
  --muted: #4f6f90;
  --primary: #006ba1;
  --primary-dark: #004c73;
  --accent: #f5c94a;
  --accent-strong: #f28f2d;
  --highlight: #edf7ff;
  --shadow: 0 18px 38px rgba(0, 73, 111, 0.15);
  --danger: #d84040;
  --whatsapp: #1ebc59;
  --radius-xl: 28px;
  --radius-lg: 20px;
  --radius-md: 14px;
  --radius-sm: 10px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Inter", sans-serif;
  background: var(--bg);
  color: var(--text);
}

button,
input,
a {
  font: inherit;
}

.page-shell {
  max-width: 1180px;
  margin: 0 auto;
  padding: 32px 20px 56px;
}

.topbar {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 26px 0 18px;
}

.brand-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 220px;
}

.brand-logo {
  width: 100%;
  max-width: 210px;
  height: auto;
  object-fit: contain;
  display: block;
}

.cotizador {
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: var(--radius-xl);
  padding: 24px;
  box-shadow: var(--shadow);
}

.progress {
  margin-bottom: 22px;
}

.steps {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  padding: 0;
  margin: 0;
}

.step-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.55);
  transition: all 0.2s ease;
}

.step-item.active {
  background: linear-gradient(135deg, var(--highlight) 0%, #f8fbff 100%);
  border-color: rgba(0, 107, 161, 0.2);
  transform: translateY(-1px);
}

.step-item.complete {
  background: rgba(0, 107, 161, 0.06);
  border-color: rgba(0, 107, 161, 0.18);
}

.step-number {
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #dfece8;
  color: var(--text);
  font-weight: 700;
}

.step-item.active .step-number,
.step-item.complete .step-number {
  background: linear-gradient(135deg, var(--primary) 0%, #0d8dcb 100%);
  color: #fff;
}

.step-text {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.step-text small {
  font-size: 0.7rem;
  color: var(--muted);
}

.step-text strong {
  font-size: 1rem;
}

.step-panel {
  display: none;
  animation: fadeIn 0.25s ease;
}

.step-panel.active {
  display: block;
}

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

.section-header {
  margin-bottom: 20px;
}

.eyebrow {
  margin: 0 0 8px;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--primary);
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1,
h2 {
  font-size: clamp(1.85rem, 2vw + 1rem, 2.5rem);
  line-height: 1.2;
}

.catalog-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.product-card {
  position: relative;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 18px 16px 16px;
  box-shadow: 0 10px 28px rgba(18, 49, 47, 0.04);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 260px;
}

.product-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 30px rgba(18, 49, 47, 0.08);
}

.product-card.selected {
  border-color: rgba(0, 107, 161, 0.4);
  background: linear-gradient(180deg, #fff 0%, #edf7ff 100%);
  box-shadow: 0 16px 30px rgba(0, 107, 161, 0.12);
}

.product-badge {
  position: absolute;
  right: 16px;
  top: 16px;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 6px 10px;
  background: rgba(0, 107, 161, 0.08);
  border-radius: 999px;
  color: var(--primary-dark);
}

.product-card h3 {
  font-size: 1.1rem;
  line-height: 1.4;
  margin-top: 10px;
  margin-bottom: 8px;
}

.product-visual {
  width: 100%;
  min-height: 170px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, #f5faf8 0%, #edf7f2 100%);
  border: 1px solid rgba(15, 139, 102, 0.08);
  border-radius: 16px;
  margin-bottom: 12px;
  overflow: hidden;
}

.product-visual img {
  width: 100%;
  height: 170px;
  object-fit: contain;
  padding: 10px;
}

.product-meta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--panel-soft);
  border-radius: 999px;
  padding: 8px 12px;
  margin-bottom: 16px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--primary-dark);
}

.product-price {
  font-size: 1.4rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  margin-bottom: 8px;
}

.product-iva {
  color: var(--muted);
  font-size: 0.82rem;
  margin-bottom: 18px;
}

.select-button,
.button,
.whatsapp {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 12px;
  padding: 14px 18px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.2s ease, opacity 0.2s ease, box-shadow 0.2s ease;
}

.select-button {
  width: 100%;
  background: var(--text);
  color: #fff;
}

.product-card.selected .select-button {
  background: linear-gradient(135deg, var(--primary) 0%, #0d8dcb 100%);
  box-shadow: 0 12px 24px rgba(0, 107, 161, 0.18);
}

.button.primary {
  background: linear-gradient(135deg, var(--primary) 0%, #0d8dcb 100%);
  color: #fff;
  box-shadow: 0 12px 24px rgba(0, 107, 161, 0.2);
}

.button.secondary {
  background: #eef2f1;
  color: var(--text);
  border: 1px solid var(--line);
}

.button.whatsapp {
  background: linear-gradient(135deg, var(--whatsapp) 0%, #19a851 100%);
  color: #fff;
  border-radius: 14px;
  width: 100%;
  box-shadow: 0 12px 24px rgba(30, 188, 89, 0.2);
}

.select-button:hover,
.button:hover,
.whatsapp:hover {
  transform: translateY(-1px);
}

.distance-card,
.summary-card,
.details-panel,
.notice-box {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  box-shadow: 0 12px 26px rgba(16, 55, 49, 0.04);
}

.distance-card {
  padding: 24px;
}

.distance-copy {
  color: var(--muted);
  line-height: 1.7;
  margin-bottom: 18px;
}

.field-label {
  display: block;
  margin-bottom: 12px;
  font-weight: 700;
}

.input-with-unit {
  display: flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel-soft);
  width: min(100%, 320px);
  overflow: hidden;
}

.input-with-unit input {
  flex: 1;
  border: none;
  background: transparent;
  color: var(--text);
  font-size: 1.1rem;
  padding: 16px 16px 16px 18px;
  outline: none;
}

.unit {
  background: rgba(15, 139, 102, 0.08);
  color: var(--primary-dark);
  font-weight: 700;
  padding: 16px 16px;
}

.error-message {
  min-height: 22px;
  margin-top: 12px;
  color: var(--danger);
  font-size: 0.9rem;
  font-weight: 600;
}

.actions {
  display: flex;
  gap: 14px;
  margin-top: 24px;
}

.justify-end {
  justify-content: flex-end;
}

.two-buttons {
  justify-content: space-between;
}

.two-buttons > * {
  flex: 1;
}

.single-action {
  margin-top: 18px;
}

.summary-card {
  padding: 24px;
}

.summary-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 18px;
}

.summary-label {
  color: var(--muted);
  font-size: 0.82rem;
  margin-bottom: 8px;
}

.summary-head h3 {
  font-size: clamp(1.3rem, 2vw, 1.8rem);
}

.summary-chip {
  background: rgba(0, 107, 161, 0.08);
  color: var(--primary-dark);
  font-weight: 700;
  padding: 8px 12px;
  border-radius: 999px;
}

.summary-list {
  display: grid;
  gap: 12px;
  margin-top: 10px;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.summary-row:last-child {
  border-bottom: none;
}

.summary-row span {
  color: var(--muted);
}

.summary-row strong {
  font-size: 1rem;
}

.subtotal-row {
  margin-top: 8px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.iva-row {
  color: var(--muted);
}

.total-row {
  padding-bottom: 0;
}

.total-row strong {
  font-size: clamp(1.55rem, 2vw, 2.1rem);
  color: var(--primary-dark);
}

.details-panel {
  margin-top: 22px;
  padding: 22px 24px;
}

.details-panel h3 {
  margin-bottom: 16px;
}

.detail-list {
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 12px;
  color: var(--text);
  line-height: 1.65;
}

.notice-box {
  margin-top: 22px;
  padding: 22px 24px;
  background: linear-gradient(180deg, rgba(233, 250, 244, 0.7), rgba(255, 255, 255, 1));
}

.notice-box p + p {
  margin-top: 10px;
}

@media (max-width: 900px) {
  .catalog-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .page-shell {
    padding-left: 12px;
    padding-right: 12px;
    padding-top: 18px;
  }

  .topbar {
    padding-top: 12px;
  }

  .brand-wrap {
    max-width: 170px;
  }

  .cotizador {
    padding: 16px;
  }

  .steps {
    grid-template-columns: 1fr;
  }

  .catalog-grid {
    grid-template-columns: 1fr;
  }

  .two-buttons,
  .actions {
    flex-direction: column;
  }

  .button,
  .select-button,
  .whatsapp {
    width: 100%;
  }

  .summary-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .distance-card,
  .summary-card,
  .details-panel,
  .notice-box {
    border-radius: 20px;
  }
}
