/* WRAPPER */
.entiva-rekomendasi-wrapper {
    margin: 1.5rem 0;
    padding: 0 0.75rem 1rem;
    box-sizing: border-box;
}

/* kalau ada summary sticky, kasih ruang di bawah biar konten ga ketutupan */
.entiva-rekomendasi-wrapper[data-show-budget="yes"] {
    padding-bottom: 5rem;
}

/* GRID – gaya Shopee, 2 kolom */
.entiva-rekomendasi-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

/* di layar lebar boleh 3 kolom biar lebih enak */
@media (min-width: 1024px) {
    .entiva-rekomendasi-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 14px;
    }
}

/* CARD */
.entiva-card {
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    background: #ffffff;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    min-height: 100%;
    transition:
        background 0.2s ease,
        border-color 0.2s ease,
        box-shadow 0.2s ease,
        transform 0.1s ease;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
}

.entiva-card:hover {
    box-shadow: 0 3px 8px rgba(15, 23, 42, 0.12);
    transform: translateY(-1px);
}

/* Gambar produk */
.entiva-card-image {
    width: 100%;
    aspect-ratio: 1 / 1; /* kotak, ala Shopee */
    background: #f9fafb;
    overflow: hidden;
}

.entiva-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* BODY CARD */
.entiva-card-body {
    padding: 8px 9px 9px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1 1 auto;
}

/* Judul */
.entiva-card-title {
    font-size: 13px;
    font-weight: 500;
    margin: 0;
    color: #111827;
    line-height: 1.3;
    min-height: 2.6em; /* kira-kira 2 baris, biar rata */
}

/* Harga */
.entiva-card-price {
    font-size: 13px;
    font-weight: 700;
    color: #16a34a;
    margin: 0;
}

/* Catatan – dibatasi 3 baris biar tinggi card mirip */
.entiva-card-note {
    font-size: 12px;
    color: #4b5563;
    margin: 0;
    line-height: 1.4;

    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    max-height: 4.2em;
}

/* Tombol kecil "Lihat catatan" */
.entiva-card-detail-btn {
    margin-top: 2px;
    padding: 0;
    border: none;
    background: none;
    color: #2563eb;
    font-size: 11px;
    font-weight: 500;
    cursor: pointer;
    align-self: flex-start;
}

/* Checkbox */
.entiva-card-check {
    margin-top: auto;
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    color: #374151;
    cursor: pointer;
}

.entiva-card-check input[type="checkbox"] {
    width: 13px;
    height: 13px;
    cursor: pointer;
}

/* Tombol link produk */
.entiva-card-button {
    margin-top: 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 5px 8px;
    font-size: 12px;
    font-weight: 500;
    border-radius: 999px;
    text-decoration: none;
    border: 1px solid #0ea5e9;
    background: #0ea5e9;
    color: #ffffff;
    transition:
        background 0.15s ease,
        border-color 0.15s ease,
        box-shadow 0.15s ease;
}

.entiva-card-button:hover {
    background: #0284c7;
    border-color: #0284c7;
    box-shadow: 0 2px 5px rgba(56, 189, 248, 0.4);
}

/* CARD KETIKA SUDAH DICHECKLIST */
.entiva-card.entiva-checked {
    background: #e8ffe6;
    border-color: #22c55e;
    box-shadow: 0 0 0 1px rgba(34, 197, 94, 0.2);
}

.entiva-card.entiva-checked .entiva-card-button {
    opacity: 0.85;
}

/* SUMMARY – bar total, nempel di bawah layar (viewport) */
.entiva-summary {
    padding: 8px 14px 10px;
    border-radius: 12px 12px 0 0;
    background: #020617;
    border-top: 1px solid #0f172a;
    font-size: 13px;
    line-height: 1.5;
    color: #e5e7eb;
    box-shadow: 0 -3px 12px rgba(15, 23, 42, 0.4);
}

/* SELALU fixed di bawah layar */
.entiva-summary-sticky {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 999;
}

/* Isi summary – 2 baris: label lalu value */
.entiva-summary-line {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 1px;
    margin-bottom: 4px;
}

.entiva-summary-line:last-child {
    margin-bottom: 0;
}

.entiva-summary-label {
    font-size: 11px;
    opacity: 0.85;
}

.entiva-summary-value {
    font-size: 13px;
    font-weight: 600;
}

/* highlight sisa biaya */
.entiva-summary-line-remaining .entiva-summary-value {
    color: #fbbf24;
}

/* ========== MODAL DETAIL CATATAN ========== */

.entiva-modal {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: none;
    pointer-events: none;
}

.entiva-modal.is-open {
    display: block;
    pointer-events: auto;
}

.entiva-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.65);
}

.entiva-modal-dialog {
    position: relative;
    margin: 40px auto;
    max-width: 480px;
    width: calc(100% - 32px);
    background: #ffffff;
    border-radius: 16px;
    padding: 14px 16px 16px;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.35);
    max-height: calc(100vh - 80px);
    overflow-y: auto;
    box-sizing: border-box;
}

/* HP kecil */
@media (max-width: 480px) {
    .entiva-modal-dialog {
        margin: 30px auto;
        width: calc(100% - 24px);
        padding: 12px 14px 14px;
    }
}

.entiva-modal-close {
    position: absolute;
    top: 8px;
    right: 10px;
    border: none;
    background: none;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    color: #6b7280;
}

.entiva-modal-title {
    font-size: 15px;
    font-weight: 600;
    margin: 0 24px 4px 0;
    color: #111827;
}

.entiva-modal-price {
    font-size: 13px;
    font-weight: 600;
    color: #16a34a;
    margin: 0 0 6px 0;
}

.entiva-modal-note {
    font-size: 13px;
    color: #374151;
    line-height: 1.5;
    white-space: pre-line;
}

/* Tabs filter */
.entiva-tabs {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 6px 2px 10px;
    margin-bottom: 6px;
    -webkit-overflow-scrolling: touch;
}

.entiva-tab {
    border: 1px solid #e5e7eb;
    background: #ffffff;
    color: #111827;
    border-radius: 999px;
    padding: 6px 10px;
    font-size: 12px;
    cursor: pointer;
    white-space: nowrap;
}

.entiva-tab.is-active {
    border-color: #0ea5e9;
    background: #e0f2fe;
    color: #075985;
}

/* Hide card saat filter */
.entiva-card.entiva-hidden {
    display: none;
}

