/* =========================================
   1. RESET & GLOBAL
   ========================================= */
:root {
    --pcolor: #ffaa00; /* Warna Default (Akan ditimpa PHP) */
}

* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Segoe UI', sans-serif; }
body { background-color: #121212; color: #ffffff; overflow-x: hidden; }

/* =========================================
   2. NAVBAR
   ========================================= */
.navbar {
    display: flex; justify-content: space-between; align-items: center;
    padding: 15px 5%; background-color: #1e1e1e; border-bottom: 2px solid var(--pcolor);
    position: relative; z-index: 1000;
}
.logo img { height: 40px; vertical-align: middle; }
.logo { font-size: 20px; font-weight: bold; color: #fff; text-decoration: none; }

.search-box { display: flex; flex: 1; max-width: 400px; margin: 0 20px; }
.search-box input { width: 100%; padding: 10px; border-radius: 5px 0 0 5px; border: none; outline: none; }
.search-box button { padding: 10px 15px; border-radius: 0 5px 5px 0; border: none; background: var(--pcolor); color:#000; font-weight: bold; cursor: pointer; }

.menu-links { display: flex; align-items: center; gap: 15px; }
.menu-links a { text-decoration: none; color: #ccc; font-weight: 500; transition: 0.3s; font-size: 14px; white-space: nowrap; }
.menu-links a:hover { color: var(--pcolor); }

.hamburger, .close-btn { display: none !important; }

/* =========================================
   3. KONTEN UTAMA
   ========================================= */
.hero-container { margin: 20px auto; max-width: 1200px; width: 95%; }
.swiper { border-radius: 10px; border: 1px solid #333; }
.swiper-slide img { width: 100%; height: auto; max-height: 400px; object-fit: cover; display: block; }

.categories, .products { padding: 40px 5%; text-align: center; }
.category-grid { display: flex; justify-content: center; gap: 15px; flex-wrap: wrap; margin-top: 20px; }

.cat-card { 
    background: #2c2c2c; padding: 15px 30px; border-radius: 10px; border: 1px solid #444; 
    cursor: pointer; transition: 0.3s; text-decoration: none; color: white; 
    display: flex; flex-direction: column; align-items: center; 
}
.cat-card:hover { border-color: var(--pcolor); transform: translateY(-5px); }
.cat-card img { width: 40px; height: 40px; object-fit: contain; margin-bottom: 5px; }

/* =========================================
   4. LAYOUT PRODUK (GRID SYSTEM)
   ========================================= */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 20px;
    align-items: stretch;
}

.product-card { 
    background: #1e1e1e; border-radius: 10px; padding: 15px; text-align: left; 
    border: 1px solid #333; 
    display: flex; flex-direction: column; justify-content: space-between;
    transition: 0.3s; position: relative; overflow: hidden;
    height: 100%; 
}
.product-card:hover { border-color: var(--pcolor); transform: translateY(-5px); }

/* GAMBAR PRODUK */
.product-card img { 
    width: 100%; height: 180px; 
    object-fit: cover; object-position: top center; 
    border-radius: 8px; margin-bottom: 10px; background-color: #222; 
}

/* HARGA & DISKON */
.price-container { margin-bottom: 10px; }
.coret { text-decoration: line-through; color: #888; font-size: 12px; display: block; margin-bottom: 2px; }
.price { font-size: 1.2rem; color: var(--pcolor); font-weight: bold; margin: 0; }

.buy-btn { width: 100%; padding: 10px; background: transparent; border: 2px solid var(--pcolor); color: var(--pcolor); border-radius: 5px; cursor: pointer; font-weight: bold; transition:0.3s; }
.buy-btn:hover { background: var(--pcolor); color: #000; }

.badge { position: absolute; top: 10px; left: 10px; background: var(--pcolor); color: #000; padding: 2px 8px; border-radius: 4px; font-size: 10px; font-weight: bold; z-index: 2; }
.discount-badge { position: absolute; top: 10px; right: 10px; background: red; color: white; padding: 2px 8px; border-radius: 4px; font-size: 10px; font-weight: bold; z-index: 2; }

/* =========================================
   5. FOOTER
   ========================================= */
.main-footer { background-color: #050505; padding-top: 50px; border-top: 2px solid #1e1e1e; margin-top: 50px; text-align: left; }
.footer-content { display: flex; flex-wrap: wrap; justify-content: space-between; max-width: 1200px; margin: 0 auto; padding: 0 5%; gap: 30px; }
.footer-section { flex: 1; min-width: 250px; }
.footer-section h3 { color: var(--pcolor); font-size: 1.2rem; margin-bottom: 20px; text-transform: uppercase; }
.footer-links { list-style: none; padding: 0; }
.footer-links li { margin-bottom: 10px; }
.footer-links a { color: #ccc; text-decoration: none; transition: 0.3s; }
.footer-links a:hover { color: var(--pcolor); padding-left: 5px; }
.payment-list { display: flex; gap: 10px; flex-wrap: wrap; }
.pay-icon { background: #fff; padding: 5px; border-radius: 4px; height: 25px; width: auto; }
.footer-bottom { background: #000; text-align: center; padding: 20px; color: #555; font-size: 13px; border-top: 1px solid #111; margin-top: 30px; }

/* =========================================
   6. RESPONSIVE
   ========================================= */
@media (max-width: 768px) {
    .hamburger { display: block !important; cursor: pointer; color: #fff; font-size: 24px; }
    .search-box { display: none; }
    .menu-links { position: fixed; top: 0; right: -100%; width: 250px; height: 100vh; background: #000; flex-direction: column; align-items: flex-start; padding-top: 60px; transition: 0.4s; z-index: 999; }
    .menu-links.active { right: 0; }
    .menu-links a { display: block; width: 100%; padding: 15px 30px; border-bottom: 1px solid #333; }
    .close-btn { display: block !important; position: absolute; top: 20px; left: 20px; color: red; font-size: 24px; cursor: pointer; }
    .footer-content { flex-direction: column; gap: 40px; }
}