/* --- VARIABLES --- */
:root {
    --primary: #e11d48;
    --primary-dark: #be123c;
    --bg-body: #f8fafc;
    --bg-card: #ffffff;
    --text-main: #0f172a;
    --text-muted: #64748b;
    --border: #e2e8f0;
}

/* DARK MODE */
body.dark-mode {
    --bg-body: #0f172a;
    --bg-card: #1e293b;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --border: #334155;
}

/* BASE RESET */
body { font-family: 'Plus Jakarta Sans', sans-serif; background: var(--bg-body); color: var(--text-main); min-height: 100vh; display: flex; flex-direction: column; overflow-x: hidden; }
a { text-decoration: none; transition: 0.2s; }
.fw-extra-bold { font-weight: 800; }
ul { list-style: none; padding: 0; margin: 0; }

/* NAVBAR */
.navbar { background: var(--bg-card); border-bottom: 1px solid var(--border); padding: 0.8rem 0; z-index: 1000; }
.navbar-brand { font-weight: 800; font-size: 1.2rem; }

/* HERO SECTION */
.hero-section {
    background: linear-gradient(135deg, var(--primary) 0%, #be123c 100%);
    color: white; padding: 2.5rem 1rem 4rem 1rem; border-radius: 0 0 30px 30px;
    margin-bottom: -25px; text-align: center; position: relative;
}
.search-container { max-width: 600px; margin: 0 auto; position: relative; z-index: 2; }
.search-input { width: 100%; border: none; padding: 12px 20px; border-radius: 50px; box-shadow: 0 4px 15px rgba(0,0,0,0.1); font-size: 0.95rem; outline: none; }
.search-btn { position: absolute; right: 5px; top: 4px; bottom: 4px; border-radius: 50px; padding: 0 20px; border: none; background: var(--primary); color: white; }

/* --- PRODUCT CARD --- */
.card-product {
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: 12px; overflow: hidden; height: 100%;
    display: flex; flex-direction: column; position: relative;
    transition: transform 0.2s;
}
.card-product:hover { transform: translateY(-3px); box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1); border-color: var(--primary); }

.img-box { position: relative; padding-top: 60%; background: #fff; border-bottom: 1px solid var(--border); overflow: hidden; }
.prod-img { position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: contain; padding: 10px; }

/* Badges */
.badge-top-left { position: absolute; top: 6px; left: 6px; background: rgba(0,0,0,0.7); color: white; font-size: 0.6rem; font-weight: 700; padding: 2px 6px; border-radius: 4px; backdrop-filter: blur(2px); text-transform: uppercase; z-index: 2; }
.badge-top-right { position: absolute; top: 6px; right: 6px; font-size: 0.6rem; font-weight: 700; padding: 2px 6px; border-radius: 4px; text-transform: uppercase; z-index: 2; }
.stok-ready { background: #dcfce7; color: #166534; border: 1px solid #bbf7d0; }
.stok-habis { background: #f1f5f9; color: #64748b; border: 1px solid #e2e8f0; }

.card-body-custom { padding: 10px; display: flex; flex-direction: column; flex-grow: 1; }
.prod-title { font-size: 0.85rem; font-weight: 700; color: var(--text-main); line-height: 1.3; margin-bottom: 4px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.6em; }
.prod-meta { display: flex; align-items: center; justify-content: space-between; font-size: 0.7rem; color: var(--text-muted); margin-bottom: 8px; }

.price-box { margin-top: auto; }
.price-strike { font-size: 0.65rem; text-decoration: line-through; color: var(--text-muted); margin-bottom: -2px; }
.price-final { font-size: 0.95rem; font-weight: 800; color: var(--primary); }

.btn-buy { width: 100%; border: none; padding: 6px; border-radius: 6px; font-weight: 700; font-size: 0.8rem; margin-top: 8px; background: var(--primary); color: white; transition: 0.2s; }
.btn-buy:disabled { background: #e2e8f0; color: #94a3b8; }

.btn-detail { width: 100%; border: 1px solid var(--border); background: transparent; color: var(--text-muted); padding: 6px; border-radius: 6px; font-weight: 700; font-size: 0.8rem; margin-top: 6px; transition: 0.2s; display: flex; align-items: center; justify-content: center; gap: 6px; }
.btn-detail:hover { border-color: var(--primary); color: var(--primary); background: rgba(225, 29, 72, 0.05); }

/* --- REVIEW CARD --- */
.review-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 20px;
    height: 100%;
    display: flex;
    flex-direction: column;
}
.review-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 15px; padding-bottom: 10px; border-bottom: 1px solid var(--border); }
.review-name { font-weight: 700; font-size: 0.9rem; color: var(--text-main); }
.review-stars { font-size: 0.8rem; color: #fbbf24; }
.review-body { flex-grow: 1; font-size: 0.85rem; color: var(--text-muted); font-style: italic; line-height: 1.5; text-align: center; }

/* Review Stars Interaction */
.star-rating i { cursor: pointer; transition: 0.2s; font-size: 2rem; color: #e2e8f0; }
.star-rating i.active { color: #fbbf24; }
.star-rating i:hover { transform: scale(1.1); }

/* --- CHECKOUT & TRACK --- */
.checkout-box { background: var(--bg-card); border-radius: 16px; padding: 20px; border: 1px solid var(--border); margin-bottom: 15px; }
.checkout-item-preview { display: flex; align-items: center; gap: 12px; flex-wrap: nowrap; }
.checkout-img { width: 60px; height: 60px; flex-shrink: 0; background: #fff; border: 1px solid var(--border); border-radius: 8px; object-fit: contain; padding: 4px; }
.checkout-info { flex-grow: 1; min-width: 0; }
.checkout-title { font-weight: 700; font-size: 0.9rem; margin-bottom: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.checkout-price { font-weight: 700; color: var(--primary); font-size: 0.9rem; }

/* --- CREDENTIAL LIST STYLE (SEJAJAR, RAPI, NO COPY) --- */
.cred-box-container {
    background: #f8fafc; /* ABU TERANG */
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 0; 
    margin: 15px 0;
    text-align: left;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.dark-mode .cred-box-container { background: #0f172a; border-color: #334155; }

/* Baris Data: Flexbox agar Sejajar */
.cred-row {
    display: flex;
    align-items: flex-start; /* Alignment atas */
    background: #ffffff;
    border-bottom: 1px solid #f1f5f9;
    padding: 12px 15px;
    gap: 0;
}
.dark-mode .cred-row { background: #1e293b; border-color: #334155; }
.cred-row:last-child { border-bottom: none; }

/* Label (Kiri): Fixed Width agar sejajar */
.cred-label-col {
    display: flex;
    align-items: flex-start;
    justify-content: space-between; 
    width: 70px; /* Lebar label tetap */
    flex-shrink: 0;
    font-size: 0.7rem; 
    font-weight: 500; 
    color: var(--text-muted);
    text-transform: uppercase;
}

/* Titik Dua (Di dalam kolom label) */
.cred-sep {
    margin-right: 5px; 
}

/* Isi Data (Kanan): Fleksibel */
.cred-value {
    font-size: 0.75rem; /* Font Kecil */
    font-weight: 400;   /* Font Tipis */
    color: var(--text-main);
    flex-grow: 1;
    font-family: 'Consolas', 'Monaco', monospace; /* Font coding */
    word-break: break-all; /* Agar link/email panjang turun baris */
    overflow-wrap: anywhere;
    line-height: 1.4;
    padding-left: 10px; /* Jarak dari label */
}

/* --- STYLE S&K (STRIP) --- */
.snk-section {
    margin-top: 15px;
    padding-top: 10px;
    border-top: 2px dashed #e2e8f0;
}
.dark-mode .snk-section { border-color: #334155; }

.snk-header {
    font-size: 0.75rem;
    font-weight: 800; /* BOLD */
    color: var(--primary);
    text-transform: uppercase;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
    padding-left: 5px;
}

.snk-content {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.snk-item {
    display: flex;
    gap: 10px; /* Jarak strip ke teks */
    font-size: 0.75rem;
    font-weight: 400; /* Tipis */
    color: var(--text-muted);
    background: rgba(241, 245, 249, 0.5);
    padding: 8px 10px;
    border-radius: 6px;
    line-height: 1.4;
    text-align: left;
    align-items: flex-start;
    border-left: 3px solid #cbd5e1;
}
.dark-mode .snk-item { background: rgba(30, 41, 59, 0.5); border-color: #475569; }

/* Tombol Track Action */
.btn-track-action {
    padding: 10px 20px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 0.85rem;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: none;
}
.btn-help { background: #f1f5f9; color: #334155; border: 1px solid #e2e8f0; }
.btn-help:hover { background: #e2e8f0; color: #0f172a; }
.btn-review { background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%); color: #fff; box-shadow: 0 4px 6px -1px rgba(245, 158, 11, 0.3); }
.btn-review:hover { transform: translateY(-2px); box-shadow: 0 6px 10px -1px rgba(245, 158, 11, 0.4); color: #fff; }

/* Payment Options */
.form-label-custom { font-size: 0.75rem; font-weight: 700; color: var(--text-muted); text-transform: uppercase; margin-bottom: 5px; }
.form-control-custom { font-size: 0.9rem; padding: 10px; border-radius: 8px; border: 1px solid var(--border); background: var(--bg-body); color: var(--text-main); }
.form-control-custom:focus { border-color: var(--primary); box-shadow: none; }

.pay-item { 
    border: 1px solid var(--border); border-radius: 10px; padding: 12px; 
    display: flex; align-items: center; gap: 12px; cursor: pointer; 
    transition: 0.2s; position: relative; width: 100%;
}
.pay-item.disabled { opacity: 0.6; cursor: not-allowed; background: #f1f5f9; }
.btn-check:checked + .pay-item { border-color: var(--primary); background: rgba(225, 29, 72, 0.05); box-shadow: 0 0 0 1px var(--primary); }
.btn-check:checked + .pay-item::after { content: "\F26B"; font-family: "bootstrap-icons"; position: absolute; right: 15px; color: #198754; font-size: 1.2rem; }

.pay-icon { width: 36px; height: 36px; background: white; border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: 1.1rem; color: var(--primary); border: 1px solid var(--border); flex-shrink: 0; }
.pay-split { border: 1px solid var(--border); border-radius: 16px; overflow: hidden; }
.pay-head { background: linear-gradient(135deg, var(--primary) 0%, #be123c 100%); padding: 30px; color: white; text-align: center; }
.pay-body { background: var(--bg-card); padding: 30px; }

/* --- FOOTER DETAIL --- */
.footer-section { background: var(--bg-card); border-top: 1px solid var(--border); padding-top: 50px; padding-bottom: 20px; font-size: 0.9rem; }
.footer-brand { margin-bottom: 20px; }
.footer-logo { font-weight: 800; font-size: 1.3rem; color: var(--primary); display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.footer-desc { color: var(--text-muted); line-height: 1.6; font-size: 0.85rem; margin-bottom: 20px; max-width: 400px; }
.footer-head { font-weight: 700; color: var(--text-main); margin-bottom: 15px; text-transform: uppercase; font-size: 0.8rem; letter-spacing: 0.5px; }
.footer-links li { margin-bottom: 10px; }
.footer-links a { color: var(--text-muted); transition: 0.2s; }
.footer-links a:hover { color: var(--primary); padding-left: 5px; }
.footer-contact-item { display: flex; align-items: flex-start; gap: 10px; color: var(--text-muted); margin-bottom: 15px; }
.footer-contact-item i { color: var(--primary); font-size: 1.1rem; margin-top: 2px; }
.footer-copyright { border-top: 1px solid var(--border); margin-top: 40px; padding-top: 20px; text-align: center; color: var(--text-muted); font-size: 0.8rem; }

/* Modal Detail Styles */
.modal-badge-container { display: flex; justify-content: center; gap: 8px; margin-bottom: 20px; flex-wrap: wrap; }
.modal-badge { border: 1px solid var(--border); border-radius: 6px; padding: 5px 10px; font-size: 0.75rem; font-weight: 600; color: var(--text-muted); background: var(--bg-card); display: flex; align-items: center; gap: 5px; }
.desc-box { background: var(--bg-body); border-radius: 8px; padding: 15px; text-align: left; border-left: 4px solid var(--primary); margin-bottom: 15px; }
.info-box { background: #fffbeb; border: 1px solid #fcd34d; border-radius: 12px; padding: 15px; text-align: left; color: #92400e; font-size: 0.8rem; display: flex; gap: 10px; align-items: flex-start; }

@media (max-width: 768px) {
    .container { padding-left: 15px; padding-right: 15px; }
    .row.g-mobile-2 { --bs-gutter-x: 0.75rem; --bs-gutter-y: 0.75rem; }
    .card-body-custom { padding: 10px; }
    .prod-title { font-size: 0.8rem; }
    .footer-section { text-align: left; }
    .footer-desc { max-width: 100%; }
}
@media (max-width: 576px) {
    .btn-buy { font-size: 0.75rem; padding: 6px; }
    .checkout-box { padding: 15px; }
    .checkout-title { font-size: 0.85rem; white-space: normal; }
    .navbar-brand { font-size: 1.1rem; }
}