/* assets/style.css */

/* ================== GLOBAL STYLES & RESET ================== */
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f4f7f6;
    color: #333;
    line-height: 1.6;
    padding-bottom: 70px; /* Ruang untuk Footer Nav */
}

.container {
    width: 95%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 10px;
}

a {
    text-decoration: none;
    color: #ff3399;
}

h2.section-title {
    font-size: 20px;
    font-weight: bold;
    color: #333;
    border-bottom: 2px solid #ddd;
    padding-bottom: 5px;
    margin-top: 25px;
    margin-bottom: 15px;
}

/* ================== HEADER (Top Bar) ================== */
.header {
    background-color: #ff3399; /* Warna utama Tokoku */
    padding: 10px 0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo a {
    font-size: 24px;
    font-weight: 900;
    color: white;
}

.search-bar {
    flex-grow: 1;
    margin: 0 20px;
    max-width: 600px;
}

.search-bar input {
    width: 100%;
    padding: 8px 15px;
    border: none;
    border-radius: 20px;
    font-size: 14px;
}

.icons a {
    color: white;
    font-size: 20px;
    margin-left: 15px;
}


/* ================== KATEGORI GRID ================== */
.categories-grid {
    display: flex;
    overflow-x: auto;
    gap: 10px;
    padding-bottom: 15px;
    /* Menyembunyikan scrollbar di browser WebKit (Chrome, Safari) */
    -ms-overflow-style: none; /* IE and Edge */
    scrollbar-width: none; /* Firefox */
}

.categories-grid::-webkit-scrollbar {
    display: none;
}

.category-item {
    flex: 0 0 auto; /* Mencegah item meregang atau menyusut */
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 10px 5px;
    width: 70px; /* Ukuran tetap untuk item */
    color: #333;
    font-size: 12px;
}

.category-icon {
    font-size: 20px;
    background-color: white;
    padding: 10px;
    border-radius: 50%;
    margin-bottom: 5px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* ================== PRODUCTS GRID ================== */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
}

.product-card {
    background-color: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s;
}

.product-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

/* Modifikasi untuk gambar full */
.product-image {
    /* PENTING untuk tampilan gambar full */
    height: 150px; 
    background-size: cover; /* Membuat gambar menutupi seluruh area */
    background-position: center; /* Memusatkan gambar */
    background-repeat: no-repeat;
    background-color: #f5f5f5; /* Warna cadangan */
    
    border-radius: 8px 8px 0 0;
    position: relative; 
    display: flex; 
    justify-content: center;
    align-items: center;
}

.discount-tag {
    position: absolute;
    top: 5px;
    right: 5px;
    background-color: red;
    color: white;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: bold;
}

.product-info {
    padding: 10px;
}

/* ================== FORM STYLES (Login, Register) ================== */
.auth-container {
    max-width: 400px;
    margin: 50px auto;
    padding: 30px;
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    font-size: 14px;
}

.form-group input[type="text"],
.form-group input[type="password"],
.form-group input[type="email"],
.form-group input[type="number"] {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    box-sizing: border-box;
}

.form-button {
    width: 100%;
    padding: 12px;
    background-color: #ff3399;
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s;
}

.form-button:hover {
    background-color: #e62e8a;
}

/* ================== FOOTER NAV (Mobile Bottom Bar) ================== */
.footer-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: white;
    box-shadow: 0 -2px 5px rgba(0, 0, 0, 0.1);
    z-index: 1000;
}

.nav-items {
    display: flex;
    justify-content: space-around;
    padding: 5px 0;
}

.nav-item {
    text-align: center;
    color: #666;
    font-size: 10px;
    padding: 5px;
    transition: color 0.3s;
}

.nav-item-active {
    color: #ff3399;
    font-weight: bold;
}

/* Bottom bar dummy (simulasi Android navigation) */
.bottom-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 10px;
    background-color: #ddd;
    z-index: 999;
    visibility: hidden; /* Sembunyikan jika tidak ingin simulasi */
}

/* ================== MEDIA QUERIES (Responsiveness) ================== */
@media (min-width: 768px) {
    /* Di desktop, sembunyikan footer nav dan tampilkan bottom bar */
    .footer-nav {
        display: none;
    }
    
    body {
        padding-bottom: 0; /* Hapus padding bawah di desktop */
    }
}