*,
    *::before,
    *::after {
      box-sizing: border-box;
      margin: 0;
      padding: 0;
    }

    :root {
      --brand: #437755;
      --brand-light: #033602;
      --accent: #e8c547;
      --accent-hover: #d4b030;
      --text: #1a1a1a;
      --text-muted: #6b7280;
      --bg: #f9f8f6;
      --white: #ffffff;
      --border: #e5e3de;
      --radius: 12px;
      --radius-lg: 18px;
      --success: #16a34a;
      --error: #dc2626;
    }

    body {
      font-family: 'Inter', sans-serif;
      background: var(--bg);
      color: var(--text);
      line-height: 1.6;
      min-height: 100vh;
    }

    /* HEADER */
    header {
      background: white;
      padding: 0 2rem;
      display: flex;
      align-items: center;
      justify-content: space-between;
      height: 64px;
      position: sticky;
      top: 0;
      z-index: 100;
    }

    .logo {
      font-family: 'Playfair Display', serif;
      font-size: 1.4rem;
      font-weight: 600;
      letter-spacing: -0.02em;
      color: var(--accent);
    }

    .logo span {
      color: white;
    }

    nav {
      display: flex;
      gap: 2rem;
    }

    nav a {
      color: var(--brand);
      text-decoration: none;
      font-size: 0.875rem;
      transition: color .2s;
    }

    nav a:hover {
      color: var(--text);
    }

    /* HERO BANNER */
    .hero {
      background: linear-gradient(135deg, var(--brand) 0%, var(--brand-light) 100%);
      color: white;
      text-align: center;
      padding: 4rem 2rem 3rem;
    }

    .hero-eyebrow {
      display: inline-block;
      background: rgba(232, 197, 71, 0.15);
      color: var(--accent);
      border: 1px solid rgba(232, 197, 71, 0.3);
      font-size: 0.75rem;
      font-weight: 500;
      letter-spacing: 0.12em;
      text-transform: uppercase;
      padding: 0.35rem 1rem;
      border-radius: 100px;
      margin-bottom: 1.25rem;
    }

    .hero h1 {
      font-family: 'Playfair Display', serif;
      font-size: clamp(1.8rem, 4vw, 2.8rem);
      font-weight: 500;
      line-height: 1.25;
      margin-bottom: 1rem;
    }

    .hero p {
      color: rgba(255, 255, 255, 0.65);
      font-size: 1rem;
      max-width: 480px;
      margin: 0 auto;
      margin-bottom: 1.5rem;
    }

    /* ===== HERO BUTTONS ROW ===== */
.hero-buttons-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

/* Grupo común (icono + botón) */
.button-volver-group,
.button-ir-group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Flecha común */
.button-volver-arrow,
.button-ir-arrow {
  font-size: 1.25rem;
  color: rgba(232, 197, 71, 0.7);
  opacity: 0.7;
  line-height: 1;
  vertical-align: middle;
  display: inline-block;
  transition: all 0.3s ease;
}

/* Botón común */
.button-volver,
.button-ir {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: white;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius);
  font-size: 0.95rem;
  font-weight: 400;
  cursor: pointer;
  backdrop-filter: blur(10px);
  transition: all 0.3s ease;
}

.button-volver:hover,
.button-ir:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.3);
  transform: translateY(-2px);
}

/* Animación de flecha al hacer hover (direcciones distintas) */
.button-volver-group:hover .button-volver-arrow {
  opacity: 1;
  transform: translateX(-4px);
}

.button-ir-group:hover .button-ir-arrow {
  opacity: 1;
  transform: translateX(4px);
}

/* ===== RESPONSIVE: MÓVIL ===== */
@media (max-width: 600px) {
  .hero-buttons-row {
    flex-direction: column;
    align-items: center;  
    gap: 0.75rem;
    max-width: 200px;  
    margin: 0 auto;  }

  .button-volver-group,
  .button-ir-group {
    justify-content: center;
    width: 100%;
  }

  .button-volver,
  .button-ir {
    width: 100%;
    text-align: center;
  }
}

    /* PROGRESS STEPS */
    .steps-wrap {
      background: var(--white);
      border-bottom: 1px solid var(--border);
      padding: 1.25rem 2rem;
    }

    .steps {
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 0;
      max-width: 600px;
      margin: 0 auto;
    }

    .step {
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 4px;
      flex: 1;
      position: relative;
    }

    .step::after {
      content: '';
      position: absolute;
      top: 16px;
      left: 50%;
      width: 100%;
      height: 2px;
      background: var(--border);
    }

    .step:last-child::after {
      display: none;
    }

    .step-circle {
      width: 32px;
      height: 32px;
      border-radius: 50%;
      background: var(--border);
      color: var(--text-muted);
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 0.8rem;
      font-weight: 500;
      position: relative;
      z-index: 1;
      transition: all .3s;
    }

    .step.active .step-circle {
      background: var(--brand);
      color: white;
    }

    .step.done .step-circle {
      background: var(--accent);
      color: var(--brand);
    }

    .step-label {
      font-size: 0.7rem;
      color: var(--text-muted);
      white-space: nowrap;
    }

    .step.active .step-label {
      color: var(--brand);
      font-weight: 500;
    }

    /* MAIN CONTENT */
    main {
      max-width: 960px;
      margin: 0 auto;
      padding: 3rem 1.5rem 5rem;
    }

    /* SECTION */
    .summary-link-btn {
      display: flex;
      align-items: center;
      justify-content: center;
      width: 100%;
      max-width: 680px;
      margin: 0 auto 2rem;
      padding: 0.95rem 1.2rem;
      border: 1px solid var(--border);
      border-radius: 999px;
      background: var(--white);
      color: var(--brand);
      font-weight: 600;
      text-decoration: none;
      box-shadow: 0 8px 24px rgba(0, 0, 0, 0.04);
      transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
    }

    .summary-link-btn:hover {
      transform: translateY(-1px);
      box-shadow: 0 12px 28px rgba(0, 0, 0, 0.08);
      border-color: var(--brand);
      color: var(--brand-light);
    }

    .section {
      margin-bottom: 3rem;
    }

    .section-header {
      display: flex;
      align-items: baseline;
      gap: 0.75rem;
      margin-bottom: 1.5rem;
    }

    .section-num {
      width: 28px;
      height: 28px;
      background: var(--brand);
      color: white;
      border-radius: 50%;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 0.75rem;
      font-weight: 500;
      flex-shrink: 0;
    }

    .section-title {
      font-size: 1.1rem;
      font-weight: 500;
      color: var(--text);
    }

    .section-subtitle {
      font-size: 0.95rem;
      color: var(--text-muted);
    }

    /* BRAND SELECTOR */
    .brands-row {
      display: flex;
      gap: 12px;
      overflow-x: auto;
      padding-bottom: 4px;
      -webkit-overflow-scrolling: touch;
      scrollbar-width: none;
    }

    .brands-row::-webkit-scrollbar {
      display: none;
    }

    .brand-btn {
      flex-shrink: 0;
      width: 96px;
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 8px;
      cursor: pointer;
      background: none;
      border: none;
      padding: 0;
      -webkit-tap-highlight-color: transparent;
    }

    .brand-logo-wrap {
      width: 80px;
      height: 80px;
      border-radius: 20px;
      border: 2.5px solid var(--border);
      background: var(--white);
      display: flex;
      align-items: center;
      justify-content: center;
      overflow: hidden;
      transition: border-color .2s, box-shadow .2s;
      position: relative;
    }

    .brand-btn:hover .brand-logo-wrap {
      border-color: #c9b8a8;
    }

    .brand-btn.selected .brand-logo-wrap {
      border-color: var(--brand);
      box-shadow: 0 0 0 3px rgba(26, 26, 46, 0.12);
    }

    .brand-btn.selected .brand-logo-wrap::after {
      content: '✓';
      position: absolute;
      top: 4px;
      right: 4px;
      width: 18px;
      height: 18px;
      background: var(--brand);
      color: white;
      border-radius: 50%;
      font-size: 0.6rem;
      display: flex;
      align-items: center;
      justify-content: center;
    }

    .brand-logo-img {
      width: 100%;
      height: 100%;
      object-fit: contain;
      padding: 0px;
    }

    .brand-logo-placeholder {
      width: 100%;
      height: 100%;
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      gap: 3px;
      font-size: 0.6rem;
      color: var(--text-muted);
      padding: 8px;
      text-align: center;
    }

    .brand-label {
      font-size: 0.75rem;
      font-weight: 500;
      color: var(--text-muted);
      text-align: center;
      transition: color .2s;
    }

    .brand-btn.selected .brand-label {
      color: var(--brand);
    }

    /* PRODUCT LIST (desplegable bajo marca) */
    .product-list-wrap {
      max-height: 80vh; /* O la altura que desees, por ejemplo el 80% de la pantalla */
    overflow-y: auto;  /* ¡CLAVE! Activa el scroll vertical solo si es necesario */
    -webkit-overflow-scrolling: touch; /* Suaviza el scroll en iPhones/iOS */
    }

    .product-list-wrap.open {
      max-height: 1200px;
    }

    .product-list-inner {
      display: flex;
      flex-direction: column;
      gap: 10px;
      padding-top: 2px;
    }

    .product-row {
      background: var(--white);
      border: 2px solid var(--border);
      border-radius: var(--radius);
      display: flex;
      align-items: center;
      gap: 14px;
      cursor: pointer;
      padding: 12px;
      transition: border-color .2s;
      user-select: none;
      -webkit-tap-highlight-color: transparent;
      position: relative;
    }

    .product-row:hover {
      border-color: #c9b8a8;
    }

    .product-row.selected {
      border-color: var(--brand);
      background: #fafaf8;
    }

    .product-row-check {
      width: 22px;
      height: 22px;
      border-radius: 50%;
      border: 2px solid var(--border);
      flex-shrink: 0;
      display: flex;
      align-items: center;
      justify-content: center;
      transition: border-color .2s, background .2s;
      font-size: 0.65rem;
      color: transparent;
    }

    .product-row.selected .product-row-check {
      border-color: var(--brand);
      background: var(--brand);
      color: white;
    }

    .product-row-img {
      width: 64px;
      height: 64px;
      border-radius: 10px;
      object-fit: cover;
      flex-shrink: 0;
      background: #f0ede8;
      display: flex;
      align-items: center;
      justify-content: center;
      overflow: hidden;
    }

    .product-row-img img {
      width: 100%;
      height: 100%;
      object-fit: cover;
      border-radius: 10px;
    }

    .product-row-info {
      flex: 1;
      min-width: 0;
    }

    .product-row-badge {
      display: inline-block;
      background: #f3f0e8;
      color: #8a7a55;
      font-size: 0.65rem;
      font-weight: 500;
      letter-spacing: 0.07em;
      text-transform: uppercase;
      padding: 0.15rem 0.5rem;
      border-radius: 100px;
      margin-bottom: 3px;
    }

    .product-row-name {
      font-weight: 500;
      font-size: 0.95rem;
      color: var(--text);
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }

    .product-row-id {
      font-size: 0.85rem;
      color: var(--text-muted);
      margin-top: 2px;
    }

    .product-row-desc {
      font-size: 0.78rem;
      color: var(--text-muted);
      margin-top: 2px;
      display: -webkit-box;
      -webkit-line-clamp: 2;
      line-clamp: 2;
      -webkit-box-orient: vertical;
      overflow: hidden;
    }

    .product-row-price {
      font-size: 0.95rem;
      font-weight: 600;
      color: var(--brand);
      flex-shrink: 0;
      text-align: right;
      white-space: nowrap;
    }

    .product-row-price small {
      display: block;
      font-size: 0.65rem;
      color: var(--text-muted);
      font-weight: 400;
    }

    /* QUANTITY */
    .qty-wrap {
      display: flex;
      align-items: center;
      gap: 0;
      background: var(--white);
      border: 1.5px solid var(--border);
      border-radius: 8px;
      width: fit-content;
    }

    .qty-btn {
      width: 44px;
      height: 44px;
      border: none;
      background: transparent;
      cursor: pointer;
      font-size: 1.2rem;
      color: var(--text-muted);
      display: flex;
      align-items: center;
      justify-content: center;
      transition: background .15s, color .15s;
      border-radius: 6px;
    }

    .qty-btn:hover {
      background: var(--bg);
      color: var(--text);
    }

    #qty-display {
      width: 56px;
      text-align: center;
      font-size: 1rem;
      font-weight: 500;
      border: none;
      background: transparent;
      outline: none;
      color: var(--text);
    }

    .qty-info {
      font-size: 0.8rem;
      color: var(--text-muted);
      margin-top: 0.6rem;
    }

    /* DURATION PILLS */
    .duration-options {
      display: flex;
      gap: 1rem;
      flex-wrap: wrap;
    }

    .duration-card {
      flex: 1;
      min-width: 140px;
      border: 2px solid var(--border);
      border-radius: var(--radius);
      padding: 1.25rem 1rem;
      cursor: pointer;
      text-align: center;
      background: var(--white);
      transition: border-color .2s, background .2s;
      position: relative;
    }

    .duration-card:hover {
      border-color: #c9b8a8;
    }

    .duration-card.selected {
      border-color: var(--brand);
      background: #f8f7f5;
    }

    .duration-popular {
      position: absolute;
      top: -11px;
      left: 50%;
      transform: translateX(-50%);
      background: var(--accent);
      color: var(--brand);
      font-size: 0.65rem;
      font-weight: 600;
      letter-spacing: 0.08em;
      text-transform: uppercase;
      padding: 0.2rem 0.65rem;
      border-radius: 100px;
      white-space: nowrap;
    }

    .duration-months {
      font-size: 1.5rem;
      font-weight: 600;
      color: var(--brand);
    }

    .duration-label {
      font-size: 0.75rem;
      color: var(--text-muted);
      margin-bottom: 0.5rem;
    }

    .duration-savings {
      display: inline-block;
      font-size: 0.7rem;
      background: #e8f5e9;
      color: #2d7a3e;
      padding: 0.15rem 0.5rem;
      border-radius: 100px;
      margin-top: 0.35rem;
    }

    .duration-card:not([data-savings]) .duration-savings {
      display: none;
    }

    /* CONTACT FORM */
    .form-grid {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 1rem;
    }

    .form-group {
      display: flex;
      flex-direction: column;
      gap: 6px;
    }

    .form-group.full {
      grid-column: 1 / -1;
    }

    label {
      font-size: 0.82rem;
      font-weight: 500;
      color: var(--text);
    }

    input[type=text],
    input[type=email],
    input[type=tel],
    select,
    textarea {
      font-family: 'Inter', sans-serif;
      font-size: 0.9rem;
      padding: 0.65rem 0.9rem;
      border: 1.5px solid var(--border);
      border-radius: 8px;
      background: var(--white);
      color: var(--text);
      outline: none;
      transition: border-color .2s;
      width: 100%;
    }

    input:focus,
    select:focus,
    textarea:focus {
      border-color: var(--brand);
    }

    textarea {
      resize: vertical;
      min-height: 80px;
    }

    /* SUMMARY CARD */
    .summary-card {
      background: var(--brand);
      color: white;
      border-radius: var(--radius-lg);
      padding: 1.75rem;
      margin-bottom: 1.5rem;
    }

    .summary-title {
      font-family: 'Playfair Display', serif;
      font-size: 1rem;
      color: var(--accent);
      margin-bottom: 1rem;
      letter-spacing: 0.02em;
    }

    .summary-row {
      display: flex;
      justify-content: space-between;
      align-items: center;
      padding: 0.45rem 0;
      border-bottom: 1px solid rgba(255, 255, 255, 0.08);
      font-size: 0.875rem;
    }

    .summary-row:last-child {
      border-bottom: none;
    }

    .summary-row .label {
      color: rgba(255, 255, 255, 0.6);
    }

    .summary-row .value {
      font-weight: 500;
    }

    .summary-row.total {
      margin-top: 0.5rem;
      padding-top: 0.75rem;
      border-top: 1px solid rgba(255, 255, 255, 0.2);
    }

    .summary-row.total .label {
      color: white;
      font-size: 0.9rem;
    }

    .summary-row.total .value {
      font-size: 1.1rem;
      color: var(--accent);
    }

    /* CTA BUTTON */
    .cta-btn {
      width: 100%;
      padding: 1rem;
      background: var(--accent);
      color: var(--brand);
      border: none;
      border-radius: 8px;
      font-family: 'Inter', sans-serif;
      font-size: 0.95rem;
      font-weight: 600;
      cursor: pointer;
      transition: background .2s, transform .1s;
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 8px;
    }

    .cta-btn:hover {
      background: var(--accent-hover);
    }

    .cta-btn:active {
      transform: scale(0.99);
    }

    .cta-btn:disabled {
      background: var(--border);
      color: var(--text-muted);
      cursor: not-allowed;
    }

    .cta-legal {
      font-size: 0.75rem;
      color: var(--text-muted);
      text-align: center;
      margin-top: 0.75rem;
    }

    /* VALIDATION MSG */
    .validation-msg {
      font-size: 0.8rem;
      color: var(--error);
      margin-top: 0.35rem;
      display: none;
    }

    .validation-msg.show {
      display: block;
    }

    /* SUCCESS SCREEN */
    #success-screen {
      display: none;
      text-align: center;
      padding: 4rem 2rem;
    }

    .success-icon {
      width: 72px;
      height: 72px;
      background: #ecfdf5;
      border-radius: 50%;
      margin: 0 auto 1.5rem;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 2rem;
    }

    .success-title {
      font-family: 'Playfair Display', serif;
      font-size: 1.6rem;
      font-weight: 500;
      margin-bottom: 0.75rem;
    }

    .success-sub {
      color: var(--text-muted);
      max-width: 400px;
      margin: 0 auto 2rem;
    }

    .success-ref {
      display: inline-block;
      background: var(--white);
      border: 1.5px solid var(--border);
      border-radius: 8px;
      padding: 0.5rem 1.25rem;
      font-size: 0.875rem;
      font-weight: 500;
      color: var(--brand);
    }

    /* SHEET CONFIG PANEL */
    .config-panel {
      background: #fffbeb;
      border: 1.5px solid #fde68a;
      border-radius: var(--radius);
      padding: 1.25rem;
      margin-bottom: 2rem;
    }

    .config-panel summary {
      cursor: pointer;
      font-size: 0.875rem;
      font-weight: 500;
      color: #92400e;
      list-style: none;
      display: flex;
      align-items: center;
      gap: 6px;
    }

    .config-panel summary::-webkit-details-marker {
      display: none;
    }

    .config-body {
      margin-top: 1rem;
    }

    .config-body p {
      font-size: 0.8rem;
      color: #78350f;
      margin-bottom: 0.75rem;
      line-height: 1.6;
    }

    .config-body ol {
      font-size: 0.8rem;
      color: #78350f;
      padding-left: 1.25rem;
      line-height: 2;
    }

    .config-body code {
      background: #fef3c7;
      padding: 0.1rem 0.35rem;
      border-radius: 4px;
      font-family: monospace;
      font-size: 0.78rem;
    }

    .config-input-wrap {
      display: flex;
      gap: 8px;
      margin-top: 1rem;
      align-items: flex-end;
    }

    .config-input-wrap input {
      flex: 1;
    }

    .config-save-btn {
      padding: 0.65rem 1rem;
      background: #92400e;
      color: white;
      border: none;
      border-radius: 6px;
      font-size: 0.8rem;
      font-weight: 500;
      cursor: pointer;
      white-space: nowrap;
    }

    .config-save-btn:hover {
      background: #7c3209;
    }

    .config-status {
      font-size: 0.75rem;
      margin-top: 0.5rem;
    }

    /* LOADING SPINNER */
    .spinner {
      width: 18px;
      height: 18px;
      border: 2px solid rgba(26, 26, 46, 0.2);
      border-top-color: var(--brand);
      border-radius: 50%;
      animation: spin .6s linear infinite;
      display: none;
    }

    @keyframes spin {
      to {
        transform: rotate(360deg);
      }
    }

    /* DIVIDER */
    .divider {
      height: 1px;
      background: var(--border);
      margin: 2.5rem 0;
    }

    /* QTY INLINE EN PRODUCTO */
    .product-row-qty {
      display: flex;
      align-items: center;
      gap: 0;
      border: 1.5px solid var(--border);
      border-radius: 8px;
      overflow: hidden;
      flex-shrink: 0;
    }

    .pqty-btn {
      width: 34px;
      height: 34px;
      border: none;
      background: var(--bg);
      cursor: pointer;
      font-size: 1.1rem;
      color: var(--text-muted);
      display: flex;
      align-items: center;
      justify-content: center;
      transition: background .15s;
      flex-shrink: 0;
    }

    .pqty-btn:hover {
      background: var(--border);
      color: var(--text);
    }

    .pqty-val {
      width: 32px;
      text-align: center;
      font-size: 0.9rem;
      font-weight: 600;
      color: var(--text);
      border: none;
      background: white;
      pointer-events: none;
    }

    .product-row.has-qty {
      border-color: var(--brand);
      background: #fafaf8;
    }

    /* TABLA DE DESCUENTOS */
    .discount-table-wrap {
      background: var(--white);
      border: 1.5px solid var(--border);
      border-radius: var(--radius);
      padding: 1.25rem;
      margin: 1.5rem 0 0;
    }

    .discount-table-title {
      font-size: 0.82rem;
      font-weight: 600;
      color: var(--text);
      margin-bottom: 0.85rem;
      text-transform: uppercase;
      letter-spacing: 0.06em;
    }

    .discount-table {
      width: 100%;
      border-collapse: collapse;
      font-size: 0.8rem;
      display: grid;
      grid-template-columns: 1fr;
      gap: 2px;
    }

    .dt-head,
    .dt-row {
      display: grid;
      grid-template-columns: 1.4fr 1fr 1fr 1fr;
      gap: 2px;
    }

    .dt-head>div {
      background: var(--brand);
      color: white;
      padding: 6px 8px;
      text-align: center;
      font-size: 0.72rem;
      font-weight: 500;
      border-radius: 4px;
    }

    .dt-head>div:first-child {
      background: transparent;
    }

    .dt-head span {
      display: block;
      font-size: 0.68rem;
      color: var(--accent);
      font-weight: 600;
    }

    .dt-label {
      padding: 8px;
      font-size: 0.75rem;
      font-weight: 500;
      color: var(--text);
      display: flex;
      flex-direction: column;
      justify-content: center;
    }

    .dt-label span {
      font-size: 0.68rem;
      color: var(--text-muted);
      font-weight: 400;
    }

    .dt-cell {
      background: #f5f4f0;
      text-align: center;
      padding: 8px 4px;
      border-radius: 4px;
      font-weight: 500;
      font-size: 0.8rem;
      color: var(--text);
      display: flex;
      align-items: center;
      justify-content: center;
    }

    .dt-cell.active-cell {
      background: rgba(67, 119, 85, 0.15);
      color: var(--brand);
      font-weight: 700;
      outline: 2px solid var(--brand);
    }

    .dt-row-best .dt-cell {
      background: #eaf2ec;
      color: var(--brand);
    }

    .best-cell {
      background: var(--brand) !important;
      color: white !important;
      font-size: 0.9rem !important;
    }

    .best-cell.active-cell {
      outline: 3px solid var(--accent);
    }

    .dt-note {
      font-size: 0.7rem;
      color: var(--text-muted);
      margin-top: 0.75rem;
      line-height: 1.5;
    }

    /* RESUMEN SUM PRODUCTS */
    .sum-prod-row {
      display: flex;
      justify-content: space-between;
      align-items: center;
      padding: 0.3rem 0;
      border-bottom: 1px solid rgba(255, 255, 255, 0.08);
      font-size: 0.82rem;
    }

    .sum-prod-row .label {
      color: rgba(255, 255, 255, 0.55);
    }

    .sum-prod-row .value {
      font-weight: 500;
    }

    /* MÉTODO DE PAGO */
    .pay-options {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 12px;
      margin-bottom: 1.25rem;
    }

    .pay-card {
      background: var(--white);
      border: 2px solid var(--border);
      border-radius: var(--radius);
      padding: 1.25rem;
      cursor: pointer;
      transition: border-color .15s;
    }

    .pay-card:hover {
      border-color: #c9b8a8;
    }

    .pay-card.active {
      border-color: var(--brand);
      background: #f6faf7;
    }

    .pay-icon {
      font-size: 1.4rem;
      margin-bottom: 8px;
    }

    .pay-title {
      font-size: 0.95rem;
      font-weight: 500;
      color: var(--text);
      margin-bottom: 4px;
    }

    .pay-card.active .pay-title {
      color: var(--brand);
    }

    .pay-sub {
      font-size: 0.8rem;
      color: var(--text-muted);
    }

    .pay-info-box {
      background: #eff6ff;
      border: 1px solid #bfdbfe;
      border-radius: 8px;
      padding: 10px 14px;
      margin-bottom: 12px;
      font-size: 0.82rem;
      color: #1e40af;
      display: flex;
      gap: 8px;
      align-items: flex-start;
      line-height: 1.5;
    }

    .pay-warning-box {
      background: #fffbeb;
      border: 1px solid #fde68a;
      border-radius: 8px;
      padding: 10px 14px;
      margin-top: 10px;
      font-size: 0.82rem;
      color: #92400e;
      display: flex;
      gap: 8px;
      align-items: flex-start;
      line-height: 1.5;
    }

    .pay-info-icon {
      flex-shrink: 0;
      font-style: normal;
    }

    .pay-amount-card {
      background: var(--white);
      border: 1.5px solid var(--border);
      border-radius: var(--radius);
      padding: 1rem 1.25rem;
      margin-bottom: 8px;
    }

    .pay-amount-label {
      font-size: 0.7rem;
      font-weight: 600;
      color: var(--text-muted);
      text-transform: uppercase;
      letter-spacing: 0.07em;
      margin-bottom: 10px;
    }

    .pay-amount-row {
      display: flex;
      justify-content: space-between;
      align-items: center;
      gap: 12px;
      padding: 8px 0;
      border-bottom: 1px solid var(--border);
    }

    .pay-amount-desc {
      font-size: 0.85rem;
      color: var(--text-muted);
      line-height: 1.5;
    }

    .pay-amount-desc strong {
      display: block;
      font-size: 0.9rem;
      font-weight: 500;
      color: var(--text);
    }

    .pay-amount-val {
      font-size: 1.2rem;
      font-weight: 600;
      color: var(--brand);
      text-align: right;
      white-space: nowrap;
    }

    .pay-amount-note {
      font-size: 0.7rem;
      color: var(--text-muted);
      text-align: right;
    }

    /* MODAL */
    #modal-overlay {
      position: fixed;
      inset: 0;
      background: rgba(0, 0, 0, 0.5);
      z-index: 999;
      display: flex;
      align-items: center;
      justify-content: center;
      padding: 1rem;
    }

    .modal-box {
      background: var(--white);
      border-radius: var(--radius-lg);
      padding: 2.5rem 2rem;
      max-width: 380px;
      width: 100%;
      text-align: center;
    }

    .modal-icon-wrap {
      width: 60px;
      height: 60px;
      background: #ecfdf5;
      border-radius: 50%;
      margin: 0 auto 1.25rem;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 1.5rem;
      color: var(--success);
    }

    .modal-title {
      font-family: 'Playfair Display', serif;
      font-size: 1.4rem;
      font-weight: 500;
      margin-bottom: 0.75rem;
      color: var(--text);
    }

    .modal-body {
      font-size: 0.9rem;
      color: var(--text-muted);
      line-height: 1.7;
      margin-bottom: 1.25rem;
    }

    .modal-ref {
      display: inline-block;
      background: var(--bg);
      border: 1.5px solid var(--border);
      border-radius: 8px;
      padding: 0.45rem 1.25rem;
      font-size: 0.85rem;
      font-weight: 500;
      color: var(--brand);
      margin-bottom: 1.5rem;
    }

    .modal-close-btn {
      background: none;
      border: 1.5px solid var(--border);
      padding: 0.6rem 1.5rem;
      border-radius: 8px;
      cursor: pointer;
      font-size: 0.875rem;
      color: var(--text-muted);
      font-family: 'Inter', sans-serif;
      transition: border-color .15s, color .15s;
    }

    .modal-close-btn:hover {
      border-color: var(--brand);
      color: var(--brand);
    }

    @media (max-width: 640px) {
      .pay-options {
        grid-template-columns: 1fr;
      }
    }

    nav {
      display: none;
    }

    .form-grid {
      grid-template-columns: 1fr;
    }

    .form-group.full {
      grid-column: 1;
    }

    .duration-options {
      flex-direction: column;
    }

    main {
      padding: 2rem 1rem 4rem;
    }

    .hero {
      padding: 2.5rem 1.25rem 2rem;
    }

    .dt-head>div,
    .dt-cell {
      font-size: 0.68rem;
      padding: 5px 3px;
    }

    .dt-label {
      font-size: 0.7rem;
    }



    /* Página CONSULA DE SUSCRIOCIONES */

    .lookup-wrap {
      max-width: 480px;
      margin: 0 auto 3rem;
    }

    .lookup-card {
      background: var(--white);
      border: 1.5px solid var(--border);
      border-radius: var(--radius-lg);
      padding: 2rem;
    }

    .lookup-title {
      font-family: 'Playfair Display', serif;
      font-size: 1.2rem;
      font-weight: 500;
      color: var(--text);
      margin-bottom: 0.4rem;
    }

    .lookup-sub {
      font-size: 0.85rem;
      color: var(--text-muted);
      margin-bottom: 1.5rem;
    }

    .lookup-input-row {
      display: flex;
      gap: 10px;
    }

    .lookup-input-row input {
      flex: 1;
      font-family: 'Inter', sans-serif;
      font-size: 0.95rem;
      padding: 0.7rem 1rem;
      border: 1.5px solid var(--border);
      border-radius: 8px;
      outline: none;
      color: var(--text);
      text-transform: uppercase;
      letter-spacing: 0.04em;
      transition: border-color .2s;
    }

    .lookup-input-row input:focus {
      border-color: var(--brand);
    }

    .lookup-input-row input::placeholder {
      text-transform: none;
      letter-spacing: 0;
      color: #aaa;
    }

    .lookup-btn {
      padding: 0.7rem 1.25rem;
      background: var(--brand);
      color: white;
      border: none;
      border-radius: 8px;
      font-family: 'Inter', sans-serif;
      font-size: 0.9rem;
      font-weight: 500;
      cursor: pointer;
      transition: background .15s;
      white-space: nowrap;
      display: flex;
      align-items: center;
      gap: 6px;
    }

    .lookup-btn:hover {
      background: var(--brand-light);
    }

    .lookup-btn:disabled {
      background: var(--border);
      color: var(--text-muted);
      cursor: not-allowed;
    }

    .lookup-error {
      margin-top: 0.75rem;
      font-size: 0.82rem;
      color: var(--error);
      display: none;
    }

    .lookup-error.show {
      display: block;
    }

    /* ── RESULTADO ── */
    #result-area {
      display: none;
    }

    .result-header {
      background: var(--brand);
      color: white;
      border-radius: var(--radius-lg);
      padding: 1.5rem 1.75rem;
      margin-bottom: 1.5rem;
      display: flex;
      align-items: center;
      justify-content: space-between;
      flex-wrap: wrap;
      gap: 1rem;
    }

    .result-ref {
      font-family: '', serif;
      font-size: 1.1rem;
      color: var(--accent);
    }

    .result-stats {
      display: flex;
      gap: 1.5rem;
    }

    .result-stat {
      text-align: right;
    }

    .result-stat .num {
      font-size: 1.4rem;
      font-weight: 600;
      line-height: 1;
    }

    .result-stat .lbl {
      font-size: 0.72rem;
      color: rgba(255, 255, 255, 0.6);
      margin-top: 2px;
    }

    .result-stat.pagado .num {
      color: #86efac;
    }

    .result-stat.pendiente .num {
      color: #fca5a5;
    }

    /* ── GRID DE MESES ── */
    .months-grid {
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
      gap: 12px;
      margin-bottom: 2rem;
    }

    .month-card {
      background: var(--white);
      border: 1.5px solid var(--border);
      border-radius: var(--radius);
      padding: 1rem;
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 8px;
      position: relative;
      overflow: hidden;
    }

    .month-card::before {
      content: '';
      position: absolute;
      top: 0;
      left: 0;
      right: 0;
      height: 4px;
    }

    .month-card.pagado {
      border-color: #bbf7d0;
    }

    .month-card.pagado::before {
      background: #22c55e;
    }

    .month-card.pendiente {
      border-color: #fecaca;
    }

    .month-card.pendiente::before {
      background: #ef4444;
    }

    .month-name {
      font-size: 0.9rem;
      font-weight: 500;
      color: var(--text);
      text-align: center;
    }

    .month-badge {
      display: inline-flex;
      align-items: center;
      gap: 4px;
      font-size: 0.72rem;
      font-weight: 500;
      padding: 0.25rem 0.6rem;
      border-radius: 100px;
    }

    .month-badge.pagado {
      background: #dcfce7;
      color: #15803d;
    }

    .month-badge.pendiente {
      background: #fee2e2;
      color: #b91c1c;
    }

    .month-badge .dot {
      width: 6px;
      height: 6px;
      border-radius: 50%;
      flex-shrink: 0;
    }

    .month-badge.pagado .dot {
      background: #22c55e;
    }

    .month-badge.pendiente .dot {
      background: #ef4444;
    }

    /* ── LEYENDA ── */
    .legend {
      display: flex;
      gap: 1.5rem;
      font-size: 0.8rem;
      color: var(--text-muted);
      margin-bottom: 2rem;
    }

    .legend-item {
      display: flex;
      align-items: center;
      gap: 6px;
    }

    .legend-dot {
      width: 10px;
      height: 10px;
      border-radius: 50%;
      flex-shrink: 0;
    }

    /* ── BOTÓN NUEVA CONSULTA ── */
    .new-lookup-btn {
      background: none;
      border: 1.5px solid var(--border);
      padding: 0.6rem 1.25rem;
      border-radius: 8px;
      cursor: pointer;
      font-size: 0.875rem;
      color: var(--text-muted);
      font-family: 'Inter', sans-serif;
      transition: border-color .15s, color .15s;
    }

    .new-lookup-btn:hover {
      border-color: var(--brand);
      color: var(--brand);
    }

    /* ── SPINNER ── */
    .btn-spinner {
      width: 16px;
      height: 16px;
      border: 2px solid rgba(255, 255, 255, 0.3);
      border-top-color: white;
      border-radius: 50%;
      animation: spin .6s linear infinite;
      display: none;
    }

    @keyframes spin {
      to {
        transform: rotate(360deg);
      }
    }

    /* ── PRODUCTOS CONTRATADOS ── */
    .productos-section {
      margin-bottom: 2rem;
    }

    .productos-title {
      font-size: 0.75rem;
      font-weight: 600;
      color: var(--text-muted);
      text-transform: uppercase;
      letter-spacing: 0.07em;
      margin-bottom: 1rem;
    }

    .producto-item {
      background: var(--white);
      border: 1.5px solid var(--border);
      border-radius: var(--radius);
      display: flex;
      align-items: center;
      gap: 14px;
      padding: 12px;
      margin-bottom: 8px;
    }

    .producto-item-img {
      width: 64px;
      height: 64px;
      border-radius: 8px;
      object-fit: cover;
      flex-shrink: 0;
      background: #f0ede8;
    }

    .producto-item-img-placeholder {
      width: 64px;
      height: 64px;
      border-radius: 8px;
      background: #f0ede8;
      flex-shrink: 0;
      display: flex;
      align-items: center;
      justify-content: center;
      color: var(--text-muted);
      font-size: 1.2rem;
    }

    .producto-item-info {
      flex: 1;
      min-width: 0;
    }

    .producto-item-id {
      font-size: 0.7rem;
      font-weight: 600;
      color: var(--text-muted);
      letter-spacing: 0.05em;
      margin-bottom: 3px;
    }

    .producto-item-nombre {
      font-size: 0.85rem;
      font-weight: 500;
      color: var(--text);
      line-height: 1.4;
      display: -webkit-box;
      -webkit-line-clamp: 2;
      line-clamp: 2;
      -webkit-box-orient: vertical;
      overflow: hidden;
    }

    .producto-item-qty {
      flex-shrink: 0;
      background: var(--brand);
      color: white;
      font-size: 0.8rem;
      font-weight: 600;
      padding: 0.3rem 0.7rem;
      border-radius: 100px;
      white-space: nowrap;
    }

    @media (max-width: 480px) {
      .lookup-input-row {
        flex-direction: column;
      }

      .months-grid {
        grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
      }

      .result-header {
        flex-direction: column;
      }

      .result-stats {
        justify-content: flex-start;
      }

      .result-stat {
        text-align: left;
      }
    }