
/* ========================================
   1. KONFIGURASI UTAMA
======================================== */

.aa-selector {
    --aa-yellow: #ffd52a;
    --aa-ink: #171717;
    --aa-muted: #6b7280;

    color: var(--aa-ink);
    font-family: inherit;
    max-width: 1200px;
    margin: 0 auto;
    padding: clamp(18px, 3vw, 36px);
    background: #fff;
    border: 1px solid #ececec;
    border-radius: 10px;
}

.aa-selector * {
    box-sizing: border-box;
}


/* ========================================
   2. JUDUL DAN INTRO
======================================== */

.aa-selector__intro {
    margin-bottom: 24px;
}

.aa-eyebrow {
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.13em;
    color: #7b6500;
}

.aa-selector h2 {
    font-size: clamp(25px, 3vw, 38px);
    line-height: 1.12;
    margin: 8px 0 10px;
    font-weight: 850;
    letter-spacing: -0.035em;
}

.aa-selector__intro p {
    color: var(--aa-muted);
    margin: 0;
}


/* ========================================
   3. TOMBOL MEREK MOBIL
======================================== */

.aa-brand-tabs {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 4px 0 18px;
    scrollbar-width: thin;
}

.aa-brand-tab {
    flex: 0 0 auto;
    border: 1px solid #e6e6e6;
    background: #ffffff;
    color: #000000;
    border-radius: 10px;
    padding: 10px 20px;
    font: inherit;
    font-size: 13px;
    font-weight: 750;
    cursor: pointer;
    transition: 0.18s;
}

.aa-brand-tab:hover {
    background: #ffffff;
    border-color: #e6e6e6;
    color: #000000;
}

.aa-brand-tab.is-active {
    background: #ffcc00;
    border-color: #ffcc00;
    color: #000000;
}


/* ========================================
   4. LAYOUT UTAMA PEMILIHAN MOBIL
======================================== */

.aa-selector__layout {
    display: grid;
    grid-template-columns: 190px minmax(0, 1fr);
    gap: 22px;
    border-top: 1px solid #eee;
    padding-top: 20px;
}


/* ========================================
   5. PANEL TIPE / MODEL MOBIL
======================================== */

.aa-model-panel {
    background: #ffffff;
    border: 1px solid #eee;
    border-radius: 10px;
    padding: 14px;
    height: max-content;
}

.aa-model-panel h3 {
    font-size: 14px;
    margin: 2px 8px 12px;
}

.aa-model-list {
    display: grid;
    gap: 5px;
}

.aa-model-button {
    border: 0;
    background: #ffffff;
    color: #000000;
    text-align: left;
    padding: 10px 11px;
    border-radius: 8px;
    font: inherit;
    font-size: 13px;
    cursor: pointer;
}

.aa-model-button:hover {
    background: #ffffff;
    color: #000000;
}

.aa-model-button.is-active {
    background: #ffcc00;
    color: #000000;
    font-weight: 800;
}


/* ========================================
   6. PANEL DETAIL MOBIL
======================================== */

.aa-detail-panel {
    min-width: 0;
}

.aa-detail-heading {
    margin: 2px 0 16px;
}

.aa-detail-heading h3 {
    font-size: 23px;
    line-height: 1.2;
    margin: 0 0 6px;
}

.aa-detail-heading p {
    font-size: 13px;
    color: var(--aa-muted);
    margin: 0;
}

.aa-detail-grid {
    display: grid;
    grid-template-columns: minmax(180px, 0.82fr) minmax(0, 1.7fr);
    gap: 20px;
    align-items: start;
}


/* ========================================
   7. GAMBAR MOBIL
======================================== */

.aa-vehicle-visual {
    background: linear-gradient(145deg, #fafafa, #f2f2f2);
    border-radius: 16px;
    min-height: 220px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px;
}

.aa-vehicle-visual img {
    display: block;
    width: 100%;
    max-height: 245px;
    object-fit: contain;
}

.aa-vehicle-placeholder {
    font-size: 14px;
    color: #777;
    text-align: center;
    padding: 30px 12px;
}


/* ========================================
   8. GRID PRODUK AKI
======================================== */

.aa-battery-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.aa-battery-card {
    border: 1px solid #e8e8e8;
    border-radius: 13px;
    padding: 12px;
    display: flex;
    flex-direction: column;
    min-width: 0;
    background: #fff;
}

.aa-battery-image {
    height: 112px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
    background: #fafafa;
    border-radius: 9px;
}

.aa-battery-image img {
    max-width: 100%;
    max-height: 105px;
    object-fit: contain;
}

.aa-battery-card h4 {
    font-size: 14px;
    line-height: 1.3;
    margin: 0 0 6px;
}

.aa-battery-code {
    font-size: 12px;
    font-weight: 800;
    margin-bottom: 6px;
}

.aa-battery-spec,
.aa-battery-warranty {
    font-size: 11px;
    color: var(--aa-muted);
    line-height: 1.45;
    margin: 0 0 5px;
}


/* ========================================
   9. TOMBOL WHATSAPP
======================================== */

.aa-wa-button {
    margin-top: auto;
    display: flex;
    gap: 7px;
    align-items: center;
    justify-content: center;
    background: var(--aa-yellow);
    color: #171717;
    text-decoration: none;
    font-weight: 850;
    font-size: 12px;
    line-height: 1.25;
    padding: 11px 8px;
    border-radius: 8px;
    text-align: center;
    transition: transform 0.15s, background 0.15s;
}

.aa-wa-button:hover {
    background: #f2c500;
    color: #171717;
    transform: translateY(-1px);
}

.aa-wa-button svg {
    width: 17px;
    height: 17px;
    flex: 0 0 auto;
}


/* ========================================
   10. PESAN DAN KONDISI KOSONG
======================================== */

.aa-empty {
    border: 1px dashed #ddd;
    padding: 35px;
    border-radius: 12px;
    text-align: center;
    color: #777;
}

.aa-selector__disclaimer {
    font-size: 11px;
    color: #777;
    margin: 18px 0 0;
}

.aa-no-batteries {
    grid-column: 1 / -1;
    padding: 22px;
    border-radius: 12px;
    background: #fafafa;
    color: #666;
    font-size: 13px;
}

.aa-model-empty {
    font-size: 12px;
    color: #777;
    padding: 8px;
}


/* ========================================
   11. RESPONSIVE TABLET
======================================== */

@media (max-width: 850px) {
    .aa-selector__layout {
        grid-template-columns: 155px minmax(0, 1fr);
        gap: 14px;
    }

    .aa-detail-grid {
        grid-template-columns: 1fr;
    }

    .aa-vehicle-visual {
        min-height: 170px;
    }

    .aa-vehicle-visual img {
        max-height: 190px;
    }

    .aa-battery-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}


/* ========================================
   12. RESPONSIVE MOBILE
======================================== */

@media (max-width: 560px) {
    .aa-selector {
        padding: 16px;
        border-radius: 15px;
    }

    .aa-selector__layout {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .aa-model-panel {
        padding: 12px;
    }

    .aa-model-list {
        display: flex;
        overflow-x: auto;
        padding-bottom: 4px;
    }

    .aa-model-button {
        white-space: nowrap;
        flex: 0 0 auto;
        background: #ffffff;
        border: 1px solid #eee;
    }

    .aa-model-panel h3 {
        margin-bottom: 9px;
    }

    .aa-detail-heading h3 {
        font-size: 20px;
    }

    .aa-battery-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 9px;
    }

    .aa-battery-card {
        padding: 9px;
    }

    .aa-battery-image {
        height: 90px;
    }

    .aa-battery-image img {
        max-height: 84px;
    }

    .aa-wa-button {
        font-size: 11px;
        padding: 10px 6px;
    }

    .aa-detail-grid {
        gap: 13px;
    }
}



/* FORCE WARNA TOMBOL MEREK */
.aa-selector .aa-brand-tabs .aa-brand-tab,
.aa-selector .aa-brand-tabs .aa-brand-tab:focus {
    background: #ffffff !important;
    background-color: #ffffff !important;
    color: #000000 !important;
    border-color: #e6e6e6 !important;
    padding: 10px 20px !important;
}

/* TOMBOL MEREK AKTIF */
.aa-selector .aa-brand-tabs .aa-brand-tab.is-active,
.aa-selector .aa-brand-tabs .aa-brand-tab.is-active:hover {
    background: #ffcc00 !important;
    background-color: #ffcc00 !important;
    color: #000000 !important;
    border-color: #ffcc00 !important;
}

/* FORCE WARNA TOMBOL TIPE MOBIL */
.aa-selector .aa-model-panel .aa-model-button {
    background: #ffffff !important;
    background-color: #ffffff !important;
    color: #000000 !important;
    padding: 10px 14px !important;
}

/* TOMBOL TIPE MOBIL AKTIF */
.aa-selector .aa-model-panel .aa-model-button.is-active {
    background: #ffcc00 !important;
    background-color: #ffcc00 !important;
    color: #000000 !important;
    font-weight: 800 !important;
}

================================================================

/* ANTERAKI: scroll tipe mobil di HP */
@media (max-width: 560px) {
  .aa-selector,
  .aa-selector__layout,
  .aa-model-panel {
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
  }

  .aa-model-panel {
    width: 100%;
    overflow: hidden;
  }

  .aa-model-list {
    display: flex !important;
    flex-direction: row;
    flex-wrap: nowrap !important;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    gap: 5px;
    overflow-x: auto !important;
    overflow-y: hidden;
    padding: 0 0 10px;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
    touch-action: pan-x;
    scrollbar-width: thin;
    box-sizing: border-box;
  }

  .aa-model-button {
    flex: 0 0 auto !important;
    white-space: nowrap !important;
    width: auto;
    max-width: none;
  }
}
