/* RABS STORE - Stylesheet (Versi Final yang Sudah Diperbaiki) */
/* Versi: 14.2 */

html { scroll-behavior: smooth; }
body {
    font-family: 'IBM Plex Mono', monospace;
    font-weight: 400;
    transition: background-color 0.3s ease, color 0.3s ease;
}
/* Mengunci scroll saat modal/menu terbuka */
body.overflow-hidden {
    overflow: hidden;
}

.logo-font {
    font-family: 'Lilita One', cursive;
    letter-spacing: 1px;
}
.modal-backdrop {
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
}
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: #2d3748; }
::-webkit-scrollbar-thumb { background: #4a5568; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #00A99D; }

.skeleton { animation: pulse 1.5s cubic-bezier(0.4, 0, 0.6, 1) infinite; }
@keyframes pulse { 50% { opacity: .5; } }

.neon-banner {
    font-family: 'Orbitron', sans-serif;
    text-shadow: 0 0 5px #00A99D, 0 0 10px #00A99D, 0 0 15px #00A99D;
}
.faq-arrow { transition: transform 0.3s ease; }
.faq-question[aria-expanded="true"] .faq-arrow { transform: rotate(180deg); }

/* Marquee untuk Pembeli Terbaru */
.marquee-container {
    overflow: hidden;
    position: relative;
    -webkit-mask-image: linear-gradient(to right, transparent, black 20%, black 80%, transparent);
    mask-image: linear-gradient(to right, transparent, black 20%, black 80%, transparent);
}
.marquee-content {
    display: inline-block;
    white-space: nowrap;
    animation: marquee 30s linear infinite;
    padding-left: 100%; /* Mulai dari luar layar */
}
@keyframes marquee {
    0% { transform: translateX(0%); }
    100% { transform: translateX(-100%); }
}

.dark .recent-buyers-content span {
    background-color: rgba(30, 41, 59, 0.8);
    color: #cbd5e1;
    border: 1px solid #475569;
}

/* --- GAYA ANIMASI BANNER (VERSI FINAL STABIL) --- */

#info-banner-content {
    overflow: hidden;
    position: relative;
    min-height: 2.5rem; /* Sesuaikan dengan tinggi font */
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Style dasar untuk setiap slot teks */
.banner-slot {
    position: absolute;
    width: 100%;
    left: 0;
    text-align: center;
    transition: transform 0.6s cubic-bezier(0.25, 1, 0.5, 1), opacity 0.6s ease;
}

/* Style khusus untuk teks !info */
.banner-slot.info-text {
    font-family: 'Roboto', sans-serif;
    font-weight: 700;
    color: #dc2626; /* Merah */
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.3);
    text-transform: uppercase;
}

/* Style khusus untuk teks pembeli */
.banner-slot.recent-buyer-text {
    font-family: 'IBM Plex Mono', monospace;
    font-weight: 400;
    text-transform: none;
}

.banner-slot.recent-buyer-text strong {
    font-weight: 700;
}

/* Posisi dan status slot untuk animasi */
.is-offscreen-bottom { transform: translateY(120%); }
.is-visible { transform: translateY(0); }
.is-offscreen-top { transform: translateY(-120%); }

/* Animasi fade in/out untuk teks !info */
.fade-in-out {
    animation: fadeInOutAnimation 3s ease-in-out forwards;
}
@keyframes fadeInOutAnimation {
    0%, 100% { opacity: 0; }
    20%, 80% { opacity: 1; }
}

/* Transisi Menu Mobile */
.mobile-menu {
    transition: transform 0.3s ease-in-out;
}

/* --- ATURAN BARU & PERBAIKAN --- */

/* 1. Perbaikan Posisi Badge Produk di Tampilan Mobile */
@media (max-width: 767px) {
    .product-card .sold-count-badge {
        /* Tetap di kanan atas */
        top: 0.5rem;
        right: 0.5rem;
    }
    .product-card .discount-badge {
        /* Pindah ke kiri bawah */
        top: auto;
        left: 0.5rem;
        bottom: 0.5rem;
    }
}

/* 2. Perbaikan Footer di Tampilan Mobile */
@media (max-width: 767px) {
    /*
    .footer-nav {
        display: none; 
    }
    */
    .footer-grid {
        grid-template-columns: 1fr; /* Buat jadi 1 kolom saja */
        gap: 2rem; /* Atur jarak antar item */
    }
}

/* Gaya untuk Tab Dashboard */
.dashboard-tab-btn.active {
    border-color: #0d9488; /* Warna teal-600 */
    color: #0d9488; /* Warna teal-600 */
}
.dark .dashboard-tab-btn.active {
    border-color: #2dd4bf; /* Warna teal-400 */
    color: #2dd4bf; /* Warna teal-400 */
}

/* Perbaikan Z-Index untuk Notifikasi Toast */
#toast {
    /* Nilai 100 ini lebih tinggi dari z-index modal (50),
       memastikan toast selalu muncul di lapisan paling atas. */
    z-index: 100;
}

/* Gaya untuk Carousel Produk Rekomendasi */
.scroll-container {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    gap: 1rem;
    padding-bottom: 1rem;
}
.scroll-container::-webkit-scrollbar {
    height: 8px;
}
.scroll-container::-webkit-scrollbar-track {
    background: #e2e8f0;
    border-radius: 4px;
}
.dark .scroll-container::-webkit-scrollbar-track {
    background: #1e293b;
}
.scroll-container::-webkit-scrollbar-thumb {
    background: #94a3b8;
    border-radius: 4px;
}
.dark .scroll-container::-webkit-scrollbar-thumb {
    background: #475569;
}
.scroll-container::-webkit-scrollbar-thumb:hover {
    background: #0d9488;
}

.hot-card {
    scroll-snap-align: start;
    flex: 0 0 280px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.hot-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}
.dark .hot-card:hover {
     box-shadow: 0 10px 20px rgba(0,0,0,0.3);
}
.hot-badge {
    background: linear-gradient(45deg, #38bdf8, #3b82f6);
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
}

.hot-card-border {
     border: 2px solid transparent;
     background: linear-gradient(#ffffff, #ffffff) padding-box, linear-gradient(45deg, #38bdf8, #3b82f6) border-box;
}
.dark .hot-card-border {
     background: linear-gradient(#1e293b, #1e293b) padding-box, linear-gradient(45deg, #38bdf8, #3b82f6) border-box;
}

/* --- Gaya untuk Fitur Ulasan --- */
.star-rating label {
    color: #cbd5e1; /* Warna bintang mati (abu-abu) */
    cursor: pointer;
    transition: color 0.2s;
}

/* Bintang akan berwarna saat di-hover atau setelah dipilih */
.star-rating input:checked ~ label,
.star-rating:not(:checked) > label:hover,
.star-rating:not(:checked) > label:hover ~ label {
    color: #f59e0b; /* Warna bintang aktif (kuning) */
}

/* Bintang yang sudah terpilih tetap berwarna */
.star-rating > input:checked + label:hover,
.star-rating > input:checked ~ label:hover,
.star-rating > label:hover ~ input:checked ~ label,
.star-rating > input:checked ~ label:hover ~ label {
    color: #f59e0b;
}
/* --- PERBAIKAN TAMPILAN MOBILE --- */

@media (max-width: 767px) {
    /* 1. Perkecil Kartu Produk Rekomendasi */
    .hot-card {
        /* Gunakan persentase agar lebih fleksibel */
        flex: 0 0 70%;
    }

    /* 2. Perkecil sedikit judul di kartu rekomendasi */
    .hot-card h3 {
        font-size: 1rem; /* Ukuran font lebih kecil */
        line-height: 1.25rem;
    }
}

/* --- EFEK INFO BANNER MEWAH (VERSI FINAL) --- */

/* 1. Styling untuk card pengumuman */
.info-banner-card {
    background: linear-gradient(145deg, #1e293b, #0f172a); /* Dark slate gradient */
    border: 1px solid #14b8a6; /* Teal border */
    box-shadow: 0 0 15px rgba(20, 184, 166, 0.2); /* Soft teal glow */
    position: relative;
    padding-top: 2.5rem;
    padding-bottom: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 4rem;
}

/* 2. Styling untuk badge "PENGUMUMAN" */
.info-banner-badge {
    position: absolute;
    top: 0;
    left: 1rem;
    background-color: #14b8a6;
    color: #0f172a;
    padding: 0.125rem 0.5rem;
    font-family: 'Orbitron', sans-serif;
    font-size: 0.75rem;
    font-weight: 700;
    border-radius: 0 0 0.375rem 0.375rem;
    letter-spacing: 1px;
}

/* 3. Styling untuk teks info (ganti .info-text yang lama) */
.info-text {
    font-family: 'Orbitron', sans-serif;
    font-weight: 700;
    font-size: 1.125rem;
    text-shadow: none; /* Hapus shadow lama agar bersih di light mode */
    white-space: nowrap;
    overflow: hidden;
    /* Kursor ditambahkan saat animasi aktif */
    border-right: 3px solid transparent; 
    
    /* PERBAIKAN WARNA: Hitam di light mode */
    color: #0f172a; 
}

/* PERBAIKAN WARNA: Putih di dark mode */
.dark .info-text {
    color: #f0fdfa;
    text-shadow: 0 0 5px rgba(45, 212, 191, 0.5);
}

/* 4. Keyframes untuk animasi mengetik dan kursor (tetap sama) */
@keyframes typing {
    from { width: 0; }
    to { width: 100%; }
}

@keyframes blink {
    50% { border-color: transparent; }
}

/* 5. Kelas pemicu animasi mengetik */
.typing-effect {
    /* Menggunakan variabel CSS agar durasi dinamis sesuai panjang teks */
    animation: typing calc(var(--char-count) * 0.08s) steps(var(--char-count)) forwards,
               blink 0.75s step-end infinite;
    /* Aktifkan kursor (warna menyesuaikan tema) */
    border-right-color: #14b8a6; 
}

/* PERMAK: Menengahkan Produk Rekomendasi di Desktop */
@media (min-width: 768px) {
    .scroll-container .hot-card:first-child {
        margin-left: auto;
    }

    .scroll-container .hot-card:last-child {
        margin-right: auto;
    }
}