/* ==========================================================================
   RESET & WARNA DASAR (Tema Rezandroid Red & Black)
   ========================================================================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

:root {
    --bg-main: #0a0a0a;           /* Hitam lebih pekat */
    --bg-card: #161616;           /* Abu-abu sangat tua untuk kartu */
    --bg-card-hover: #1f1f1f;     /* Saat kartu di-hover */
    --accent-red: #e60000;        /* Merah Utama (Solid Red) */
    --accent-dark-red: #800000;   /* Merah Tua untuk gradasi */
    --text-white: #ffffff;
    --text-gray: #b0b0b0;
}

body {
    background-color: var(--bg-main);
    color: var(--text-white);
    min-height: 100vh;
}

/* ==========================================================================
   HEADER
   ========================================================================== */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 5%;
    background-color: #0f0f0f;
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 2px solid var(--accent-red); /* Garis bawah merah gahar */
    gap: 20px;
    flex-wrap: wrap;
}

.logo h1 {
    color: var(--accent-red);
    text-shadow: 0 0 10px rgba(230, 0, 0, 0.3); /* Efek glow tipis pada logo */
}

nav ul {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 25px;
}

nav a {
    color: var(--text-gray);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: color 0.2s;
    display: flex;
    align-items: center;
    gap: 5px;
}

nav a:hover {
    color: var(--accent-red);
}

/* ==========================================================================
   SEARCH BAR
   ========================================================================== */
#wadah-pencarian { 
    display: flex; 
    flex: 1; 
    max-width: 400px; 
    position: relative; 
}
#input-pencarian {
    width: 100%; 
    padding: 12px 20px; 
    border-radius: 8px 0 0 8px;
    border: 1px solid #222; 
    background: #1a1a1a; 
    color: #fff; 
    outline: none;
}
.btn-search {
    background: var(--accent-red); 
    border: none; 
    padding: 0 20px;
    border-radius: 0 8px 8px 0; 
    cursor: pointer; 
    font-size: 16px; 
    margin: 0;
    transition: background 0.3s;
}
.btn-search:hover {
    background: var(--accent-dark-red);
}

#list-pencarian {
    position: absolute; 
    top: 100%; 
    left: 0; 
    width: 100%;
    background: #1a1a1a; 
    border: 1px solid var(--accent-red);
    border-radius: 0 0 8px 8px; 
    z-index: 10; 
    display: none; 
    box-shadow: 0 5px 15px rgba(0,0,0,0.5);
}
.item-pencarian { padding: 12px 20px; border-bottom: 1px solid #333; cursor: pointer; color: #fff; }
.item-pencarian:hover { background: var(--bg-card-hover); color: var(--accent-red); }

/* ==========================================================================
   LAYOUT SECTIONS
   ========================================================================== */
section { width: 90%; max-width: 1200px; margin: 30px auto; }

/* ==========================================================================
   BANNER SLIDER
   ========================================================================== */
.slider-container {
    position: relative; width: 100%; border-radius: 12px; overflow: hidden;
    border: 1px solid #222;
}
.slide-promo { display: none; }
.slide-promo img { width: 100%; display: block; object-fit: cover; border-radius: 12px; }
.fade { animation-name: fade; animation-duration: 1.5s; }
@keyframes fade { from {opacity: .4} to {opacity: 1} }

.prev-btn, .next-btn {
    cursor: pointer; position: absolute; top: 50%; width: auto;
    padding: 16px; margin-top: -22px; color: white; font-weight: bold; font-size: 18px;
    transition: 0.6s ease; border-radius: 0 8px 8px 0; user-select: none;
    background-color: rgba(0,0,0,0.6);
}
.next-btn { right: 0; border-radius: 8px 0 0 8px; }
.prev-btn:hover, .next-btn:hover { background-color: var(--accent-red); color: #fff; }

.dot, .dot-testi {
    cursor: pointer; height: 8px; width: 8px; margin: 0 4px;
    background-color: #333; border-radius: 50%; display: inline-block;
    transition: background-color 0.6s ease;
}
.active-dot, .dot:hover, .dot-testi:hover { 
    background-color: var(--accent-red) !important; 
    width: 20px !important; 
    border-radius: 10px !important; 
}

/* ==========================================================================
   KATEGORI PILL
   ========================================================================== */
.kategori-pill {
    display: flex; 
    gap: 12px; 
    flex-wrap: wrap; 
    justify-content: center; 
    padding-bottom: 10px;
}
.kategori-pill button {
    background: var(--bg-card); border: 1px solid #333; padding: 10px 20px;
    border-radius: 20px; color: var(--text-white); font-size: 14px;
    cursor: pointer; white-space: nowrap; transition: all 0.3s;
}
.kategori-pill button.active, .kategori-pill button:hover {
    background: var(--accent-red); color: #fff;
    border-color: var(--accent-red); font-weight: bold;
    box-shadow: 0 0 15px rgba(230, 0, 0, 0.2);
}

/* ==========================================================================
   CARD HORIZONTAL (Logo Persegi)
   ========================================================================== */
#grid-horizontal-showcase, #grid-vertical-terlaris, .grid-subkategori-style {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 15px;
}
.card-horizontal {
    background: var(--bg-card); border-radius: 12px; padding: 12px;
    display: flex; align-items: center; cursor: pointer;
    border: 1px solid #222; transition: all 0.2s;
}
.card-horizontal:hover {
    background: var(--bg-card-hover); border-color: var(--accent-red); transform: translateY(-3px);
}
.bungkus-logo {
    width: 65px; height: 65px; flex-shrink: 0; margin-right: 15px;
    border-radius: 12px; background-color: #fff; padding: 2px; border: 1px solid #333;
}
.logo-persegi { 
    width: 100%; 
    height: 100%; 
    object-fit: cover; 
    border-radius: 10px; 
    display: block;
}
.card-info { display: flex; flex-direction: column; justify-content: center; }
.kategori-teks {
    font-size: 11px; color: var(--accent-red); text-transform: uppercase;
    font-weight: bold; margin-bottom: 3px; letter-spacing: 0.5px;
}
.card-info h4 { font-size: 16px; color: #fff; margin: 0; }

/* ==========================================================================
   SLIDER TESTIMONI (CHAT BOX STYLE)
   ========================================================================== */
.testi-container {
    position: relative; width: 100%; max-width: 600px; margin: 0 auto; padding: 20px;
}
.slide-testi { display: none; text-align: left; }
.chat-bubble {
    background: #1a1a1a; border-left: 5px solid var(--accent-red);
    padding: 20px; border-radius: 0 15px 15px 15px; position: relative;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}
.chat-bubble::before {
    content: ""; position: absolute; top: 0; left: -15px;
    border-width: 0 15px 15px 0; border-style: solid;
    border-color: transparent #1a1a1a transparent transparent;
}
.testi-user { font-weight: bold; color: var(--accent-red); font-size: 16px; margin-bottom: 5px; }
.testi-stars { color: #ffcc00; font-size: 13px; margin-bottom: 10px; }
.testi-text { color: #ddd; font-style: italic; line-height: 1.5; }

.prev-testi, .next-testi {
    cursor: pointer; position: absolute; top: 50%; transform: translateY(-50%);
    padding: 10px; color: #555; font-weight: bold; font-size: 20px; transition: 0.3s;
}
.prev-testi { left: -40px; }
.next-testi { right: -40px; }
.prev-testi:hover, .next-testi:hover { color: var(--accent-red); }

/* ==========================================================================
   LOADING & FOOTER
   ========================================================================== */
#loading-screen {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: var(--bg-main); display: flex; justify-content: center; align-items: center;
    z-index: 9999; color: var(--accent-red); font-weight: bold; font-size: 24px;
}

footer {
    text-align: center;
    padding: 30px 20px;
    background: #050505; 
    border-top: 1px solid var(--accent-dark-red);
    margin-top: 60px;
}

.footer-info { margin-bottom: 15px; }
.footer-info p { color: #888; font-size: 13px; margin-bottom: 5px; }
.footer-info strong { color: var(--accent-red); }
.copyright p { color: #444; font-size: 11px; letter-spacing: 1px; text-transform: uppercase; }

/* ==========================================================================
   RESPONSIF KHUSUS HP
   ========================================================================== */
@media screen and (max-width: 768px) {
    header { 
        padding: 15px; 
        gap: 15px;
        flex-direction: row; 
        align-items: center;
    }
    .logo h1 { font-size: 18px !important; } 
    #wadah-pencarian { max-width: 150px; margin: 0; order: 2; }
    #input-pencarian { padding: 8px 10px; font-size: 12px; }
    .btn-search { padding: 0 10px; }
    #list-pencarian { right: 0; left: auto; min-width: 250px; border: 1px solid var(--accent-red); }
    nav { width: 100%; order: 3; border-top: 1px solid #333; padding-top: 15px; }
    nav ul { justify-content: space-evenly; gap: 10px; }
    nav a { font-size: 13px; }
    .kategori-pill { gap: 8px; }
    .kategori-pill button { padding: 8px 15px; font-size: 13px; }
    .prev-btn, .next-btn { padding: 10px; font-size: 14px; }
    .testi-container { max-width: 100%; padding: 10px; }
    .prev-testi, .next-testi { display: none; }
}

/* ==========================================================================
   FIX UNTUK TITIK TESTIMONI AGAR BISA MERAH LONJONG SAAT AKTIF
   ========================================================================== */
.dot-testi.active-dot {
    background-color: var(--accent-red) !important;
    width: 20px !important;
    border-radius: 10px !important;
}