﻿/* ===========================================================
       PROMO & PAKET — SCROLL HORIZONTAL
       =========================================================== */
    .promo-toolbar {
      position: relative;
      z-index: 99;
      margin-bottom: 16px;
    }

    .promo-search-wrap {
      position: relative;
      margin-bottom: 10px;
    }

    .promo-search-wrap i {
      position: absolute;
      left: 13px;
      top: 50%;
      transform: translateY(-50%);
      color: #9aa0a6;
      font-size: 13px;
    }

    .promo-search-input {
      width: 100%;
      padding: 12px 14px 12px 36px;
      border-radius: 10px;
      border: 1px solid var(--border-color, #dee2e6);
      font-size: 13px;
      background: #fff;
      outline: none;
      box-sizing: border-box;
    }

    .promo-search-input:focus {
      border-color: var(--primary-blue, #0f3057);
    }

    /* Filter Container (Hanya Paket) */
    .promo-filter-container {
      display: flex;
      flex-direction: row;
      gap: 8px;
      width: 100%;
    }

    .promo-filter-select {
      flex: 1;
      padding: 10px 12px;
      border-radius: 8px;
      border: 1px solid var(--border-color, #dee2e6);
      font-size: 9px;
      background: #fff;
      outline: none;
      box-sizing: border-box;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }

    .promo-reset-btn {
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 6px;
      padding: 10px 12px;
      border-radius: 8px;
      flex-shrink: 0;
      border: 1px solid #fadbdc;
      background: #fff;
      color: var(--primary-red, #d32f2f);
      font-size: 13px;
      font-weight: 600;
      cursor: pointer;
    }

    #promo-container {
      display: flex !important;
      flex-direction: column !important;
      gap: 20px !important;
      width: 100%;
    }

    .car-section {
      display: flex !important;
      flex-direction: column !important;
      width: 100%;
    }

    .car-title-header {
      display: block !important;
      width: 100%;
      font-size: 15px;
      font-weight: 800;
      color: #212529;
      border-bottom: 2px solid var(--primary-red, #d32f2f);
      padding-bottom: 6px;
      margin-bottom: 12px;
    }

    /* Scroll Horizontal Card Paket */
    .promo-paket-grid {
      display: flex !important;
      flex-direction: row !important;
      overflow-x: auto !important;
      scroll-snap-type: x mandatory;
      gap: 12px;
      width: 100%;
      padding-bottom: 10px;
      box-sizing: border-box;
      -webkit-overflow-scrolling: touch;
      align-items: stretch !important;
      /* MEMAKSA SEMUA KARTU DALAM 1 BARIS PUNYA TINGGI YANG SAMA */
    }

    .promo-paket-grid::-webkit-scrollbar {
      height: 3px;
    }

    .promo-paket-grid::-webkit-scrollbar-thumb {
      background: #d1d5db;
      border-radius: 4px;
    }

    .promo-card {
      flex: 0 0 85%;
      scroll-snap-align: start;
      border: 1px solid #eef2f6;
      border-radius: 10px;
      overflow: hidden;
      box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
      box-sizing: border-box;
      background: #fff;
      display: flex;
      flex-direction: column;
    }

    .promo-section-header {
      display: flex;
      justify-content: space-between;
      align-items: baseline;
      margin-bottom: 12px;
    }

    .section-title {
      font-size: 14px;
      font-weight: 700;
      color: var(--text-dark, #212529);
      margin: 0;
    }

    .promo-total {
      font-size: 11px;
      font-weight: 600;
      color: var(--text-muted, #6c757d);
    }

    .promo-loading,
    .promo-empty {
      text-align: center;
      padding: 30px 20px;
      color: var(--text-muted, #6c757d);
      font-size: 12px;
      width: 100%;
    }

    .main-tenor-preview {
      background: #fff;
      padding: 12px;
      text-align: center;
      border-bottom: 1px dashed #eef2f6;
      flex: 1;
      /* MENDORONG TOMBOL AGAR SELALU KE BAWAH */
      display: flex;
      flex-direction: column;
      justify-content: center;
    }

    .main-tenor-title {
      font-size: 10px;
      color: #888;
      text-transform: uppercase;
      letter-spacing: 0.5px;
    }

    .main-tenor-price {
      font-size: 16px;
      font-weight: 800;
      color: var(--green-success, #2ecc71);
      margin: 4px 0;
    }

    .main-tenor-sub {
      font-size: 11px;
      color: #495057;
      font-weight: 600;
    }

    .btn-detail-promo {
      width: 100%;
      padding: 12px;
      border: none;
      background: var(--primary-blue, #0f3057);
      color: #fff;
      font-weight: 600;
      font-size: 12px;
      cursor: pointer;
      outline: none;
      transition: 0.2s;
      margin-top: auto;
      /* MENGUNCI TOMBOL DI DASAR KARTU */
    }

    .btn-detail-promo:active {
      background: #0a223f;
    }

    .btn-detail-promo * {
      pointer-events: none;
    }

    /* ===========================================================
       BOTTOM NAV — Samakan dengan halaman lain (hilangkan gradasi promo)
       =========================================================== */
    .promo-page .bottom-nav {
      background: rgba(15, 48, 87, 0.85) !important;
    }

    .promo-page .nav-item.active {
      color: var(--primary-red, #c8102e) !important;
      background: white !important;
    }

    /* ===========================================================
       POP-UP MODAL TENGAH (DENGAN SISTEM PAKSA !IMPORTANT)
       =========================================================== */

    .promo-modal-overlay {

      display: none !important;
      position: fixed !important;
      z-index: 9999999 !important;
      left: 0 !important;
      top: 0 !important;
      width: 100vw !important;
      height: 100vh !important;
      background-color: rgba(0, 0, 0, 0.65) !important;
      backdrop-filter: blur(4px) !important;
      align-items: center !important;
      justify-content: center !important;
      padding: 20px !important;
      box-sizing: border-box !important;
    }


    .promo-modal-overlay.show-modal {
      display: flex !important;
    }

    .modal-center-box {
      background-color: #fff !important;
      width: 100% !important;
      max-width: 400px !important;
      max-height: 85vh !important;
      border-radius: 16px !important;
      display: flex !important;
      flex-direction: column !important;
      animation: popZoom 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
      box-sizing: border-box !important;
      box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2) !important;
    }

    .promo-modal-skema {
      background: #f0f4f8;
      padding: 10px 12px;
      border-radius: 10px;
      font-size: 11px;
      margin-bottom: 14px;
      display: flex;
      justify-content: space-between;
      align-items: center;
      gap: 10px;
    }

    .promo-modal-skema span {
      color: #4b5563;
      font-weight: 700;
    }

    .promo-modal-skema strong {
      color: var(--primary-blue, #0f3057);
      background: #e2e8f0;
      padding: 4px 8px;
      border-radius: 6px;
      font-weight: 900;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
      max-width: 60%;
    }

    .promo-modal-simulasi-title {
      font-size: 13px;
      font-weight: 800;
      color: #111827;
      margin-bottom: 10px;
    }


    @keyframes popZoom {
      0% {
        transform: scale(0.85);
        opacity: 0;
      }

      100% {
        transform: scale(1);
        opacity: 1;
      }
    }

    .modal-header {
      padding: 14px 16px;
      border-bottom: 1px solid #eef2f6;
      display: flex;
      justify-content: space-between;
      align-items: center;
    }

    .modal-title {
      font-size: 15px;
      font-weight: 800;
      color: #212529;
      margin: 0;
    }

    .modal-close {
      background: none;
      border: none;
      font-size: 26px;
      color: #9aa0a6;
      cursor: pointer;
      padding: 0 4px;
      line-height: 1;
    }

    .modal-body {
      padding: 14px 16px;
      overflow-y: auto;
      flex: 1;
      box-sizing: border-box;
    }

    .modal-promo-img {
      width: 100%;
      height: auto;
      border-radius: 8px;
      margin-bottom: 14px;
      object-fit: cover;
      box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
      background: #f8f9fa;
      display: block;
      max-height: 150px;
    }

    .modal-tenor-card {
      background: #f8f9fa;
      border: 1px solid #eef2f6;
      border-radius: 8px;
      padding: 12px;
      margin-bottom: 10px;
    }

    .modal-tenor-row {
      display: flex;
      justify-content: space-between;
      align-items: center;
      margin-bottom: 6px;
    }

    .modal-tenor-row .t-bulan {
      font-weight: 700;
      color: var(--primary-blue, #0f3057);
      font-size: 13px;
    }

    .modal-tenor-row .t-cicilan {
      font-weight: 800;
      color: #2ecc71;
      font-size: 14px;
    }

    .modal-grid-info {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 6px;
      font-size: 11px;
      border-top: 1px dashed #dee2e6;
      padding-top: 8px;
      margin-top: 6px;
    }

    .modal-grid-info span {
      color: #777;
      display: block;
      font-size: 10px;
      margin-bottom: 2px;
    }

    .modal-grid-info strong {
      color: #212529;
      font-size: 12px;
    }

    .modal-footer {
      padding: 12px 16px 16px 16px;
      border-top: 1px solid #eef2f6;
      background: #fff;
      border-bottom-left-radius: 16px;
      border-bottom-right-radius: 16px;
    }

    .btn-modal-wa {
      width: 100%;
      padding: 12px;
      border: none;
      background: #2ecc71;
      color: #fff;
      border-radius: 8px;
      font-weight: 700;
      font-size: 13px;
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 6px;
      box-sizing: border-box;
      outline: none;
    }

    /* ===== SEARCHABLE DROPDOWN ===== */
    .custom-select-container {
      position: relative;
      flex: 1;
      z-index: 10;
    }

    .custom-select-container.open {
      z-index: 1000;
    }

    .custom-select-trigger {
      display: flex;
      justify-content: space-between;
      align-items: center;
      padding: 12px 16px;
      border-radius: 12px;
      border: 1.5px solid var(--border-color, #dee2e6);
      font-size: 13px;
      font-weight: 700;
      color: var(--text-dark, #212529);
      background: #fff;
      cursor: pointer;
      transition: all 0.2s ease;
    }

    .custom-select-trigger:hover {
      border-color: var(--primary-blue, #0f3057);
    }

    .custom-select-trigger i {
      font-size: 11px;
      color: var(--text-muted, #6c757d);
      transition: transform 0.2s ease;
    }

    .custom-select-container.open .custom-select-trigger i {
      transform: rotate(180deg);
    }

    .custom-select-dropdown {
      position: absolute;
      top: calc(100% + 6px);
      left: 0;
      right: 0;
      background: white;
      border-radius: 14px;
      border: 1.5px solid var(--border-color, #dee2e6);
      box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
      z-index: 100;
      display: none;
      flex-direction: column;
      max-height: 280px;
      overflow: hidden;
      animation: fadeIn 0.2s ease;
    }

    @keyframes fadeIn {
      from {
        opacity: 0;
        transform: translateY(-5px);
      }

      to {
        opacity: 1;
        transform: translateY(0);
      }
    }

    .custom-select-container.open .custom-select-dropdown {
      display: flex;
    }

    .dropdown-search-wrap {
      position: relative;
      padding: 10px;
      border-bottom: 1px solid #f1f5f9;
      background: #f8fafc;
    }

    .dropdown-search-wrap i {
      position: absolute;
      left: 20px;
      top: 50%;
      transform: translateY(-50%);
      color: var(--text-muted, #9aa0a6);
      font-size: 12px;
    }

    .dropdown-search-input {
      width: 100%;
      padding: 10px 12px 10px 32px;
      border-radius: 8px;
      border: 1.5px solid var(--border-color, #dee2e6);
      font-size: 12px;
      font-weight: 500;
      outline: none;
      box-sizing: border-box;
      background: white;
    }

    .dropdown-search-input:focus {
      border-color: var(--primary-blue, #0f3057);
    }

    .dropdown-options-list {
      overflow-y: auto;
      flex: 1;
      max-height: 200px;
    }

    .dropdown-option {
      padding: 11px 16px;
      font-size: 13px;
      font-weight: 600;
      color: var(--text-dark, #495057);
      cursor: pointer;
      display: flex;
      align-items: center;
      gap: 10px;
      transition: background 0.15s ease;
    }

    .dropdown-option:hover {
      background: #f1f5f9;
    }

    .dropdown-option.active {
      background: rgba(15, 48, 87, 0.08);
      color: var(--primary-blue, #0f3057);
    }

    .dropdown-option i {
      font-size: 12px;
      color: var(--text-muted, #9aa0a6);
    }

    .dropdown-option.active i {
      color: var(--primary-blue, #0f3057);
    }

    /* Selectable tenor cards */
    .modal-tenor-card {
      background: #f8f9fa;
      border: 1.5px solid #eef2f6;
      border-radius: 12px;
      padding: 12px 14px;
      margin-bottom: 10px;
      cursor: pointer;
      transition: all 0.2s ease;
      position: relative;
    }
    .modal-tenor-card:hover {
      border-color: #cbd5e1;
      background: #f1f5f9;
    }
    .modal-tenor-card.selected {
      background: #f0fdf4 !important;
      border-color: #10b981 !important;
      box-shadow: 0 4px 12px rgba(16, 185, 129, 0.08);
    }
