/* ------------------------ */
/* GLOBAL STYLES */
/* ------------------------ */
body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #fff5f8;
}

/* ------------------------ */
/* HEADER */
/* ------------------------ */
header {
    background: linear-gradient(to right, #e91e63, #ff4081);
    padding: 15px;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    width: 120px;
}

/* LOGO HEADER */
.logo img {
    width: 120px;
    height: auto;
}

/* Jika gambar tidak ditemukan, gunakan teks */
.logo-text {
    font-size: 1.5em;
    font-weight: bold;
    color: white;
    display: inline-block;
    padding: 10px;
}

/* ------------------------ */
/* MENU & CART */
/* ------------------------ */
.header-right {
    display: flex;
    align-items: center;
}

.menu-button, .cart-button {
    background: none;
    border: none;
    font-size: 24px;
    color: white;
    cursor: pointer;
    margin-left: 15px;
}

.cart-button {
    position: relative;
}

#cart-count {
    background: red;
    color: white;
    font-size: 12px;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: -5px;
    right: -5px;
}

/* ------------------------ */
/* MENU NAVIGASI */
/* ------------------------ */
nav {
    position: fixed;
    top: 0;
    left: -250px; /* Default hide */
    width: 250px;
    height: 100%;
    background: #e91e63;
    transition: left 0.3s ease-in-out;
    padding-top: 50px;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.2);
    z-index: 1100; /* Tetap di atas elemen lain */
}

nav.show {
    left: 0;
}

nav ul {
    list-style: none;
    padding: 0;
}

nav ul li {
    padding: 15px;
}

nav ul li a {
    color: white;
    text-decoration: none;
    font-size: 18px;
}

/* ------------------------ */
/* POPUP KERANJANG BELANJA */
/* ------------------------ */
.cart-container {
    position: fixed;
    top: 0;
    right: -350px; /* Sembunyikan awal */
    width: 350px;
    height: 100%;
    background: white;
    padding: 20px;
    box-shadow: -4px 0 10px rgba(0, 0, 0, 0.2);
    transition: right 0.3s ease-in-out;
    z-index: 1100; /* Pastikan lebih tinggi dari elemen lain */
    display: flex;
    flex-direction: column;
}

.cart-container.show {
    right: 0;
}

/* HEADER POPUP KERANJANG */
.cart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid #e91e63;
    padding-bottom: 10px;
}

.cart-header h3 {
    margin: 0;
    color: #e91e63;
    font-size: 1.4em;
}

.cart-header .close-cart {
    background: none;
    border: none;
    font-size: 20px;
    color: #e91e63;
    cursor: pointer;
    position: absolute;
    top: 10px;
    right: 15px;
}

/* LIST PRODUK DALAM KERANJANG */
.cart-items {
    flex-grow: 1;
    overflow-y: auto;
    margin-top: 15px;
    padding-right: 5px;
}

.cart-items::-webkit-scrollbar {
    width: 5px;
}

.cart-items::-webkit-scrollbar-thumb {
    background: #e91e63;
    border-radius: 5px;
}

.cart-items li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px;
    border-bottom: 1px solid #eee;
    font-size: 1em;
}

/* TOMBOL HAPUS PRODUK */
.cart-items li .remove-item {
    background: red;
    color: white;
    border: none;
    padding: 5px 8px;
    border-radius: 5px;
    cursor: pointer;
}

/* TOTAL HARGA & CHECKOUT */
.cart-footer {
    padding-top: 15px;
    border-top: 2px solid #e91e63;
}

.cart-footer .total-price {
    font-size: 1.2em;
    font-weight: bold;
    color: #e91e63;
    text-align: center;
    margin-bottom: 10px;
}

.btn-checkout {
    display: block;
    width: 100%;
    background: #4CAF50;
    color: white;
    text-align: center;
    padding: 12px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1.1em;
}

.btn-checkout:hover {
    background: #388E3C;
}

/* ------------------------ */
/* PRODUK CONTAINER & GRID */
/* ------------------------ */
.produk-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
}

/* KARTU PRODUK */
.produk-card {
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    padding: 15px;
    width: 220px;
    text-align: center;
    transition: transform 0.2s;
}

.produk-card:hover {
    transform: scale(1.05);
}

.produk-card img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: 8px;
}

/* ------------------------ */
/* HARGA PRODUK */
/* ------------------------ */
.harga {
    margin-top: 10px;
}

.harga-asli {
    text-decoration: line-through;
    color: #999;
    font-size: 0.9em;
}

.harga-diskon {
    font-size: 1.2em;
    color: #e91e63;
    font-weight: bold;
}

/* ------------------------ */
/* RATING BINTANG */
/* ------------------------ */
.rating {
    margin: 8px 0;
}

.bintang {
    font-size: 20px;
    color: #ccc;
}

.bintang-aktif {
    color: #FFD700;
}

/* ------------------------ */
/* TOMBOL */
/* ------------------------ */
.button-group {
    margin-top: 10px;
    display: flex;
    justify-content: center;
    gap: 10px;
}

.btn-detail, .btn-beli {
    display: inline-block;
    padding: 8px 12px;
    text-decoration: none;
    border-radius: 5px;
    font-weight: bold;
    cursor: pointer;
    border: none;
    font-size: 1em;
}

.btn-detail {
    background: #ff4081;
    color: white;
}

.btn-beli {
    background: #4CAF50;
    color: white;
}

.btn-detail:hover {
    background: #c2185b;
}

.btn-beli:hover {
    background: #388E3C;
}

/* ------------------------ */
/* TOMBOL "LIHAT LAINNYA" */
/* ------------------------ */
.btn-show-more {
    display: block;
    width: 100%;
    background: #ff4081;
    color: white;
    text-align: center;
    padding: 10px;
    border: none;
    margin-top: 10px;
    cursor: pointer;
}

.btn-show-more:hover {
    background: #c2185b;
}

/* === STYLING POPUP DETAIL PRODUK === */
.popup {
    position: fixed;
    top: 50%;
    left: 50%;
    width: 90%;
    max-width: 400px;
    transform: translate(-50%, -50%);
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.3s ease-in-out, visibility 0.3s ease-in-out;
    z-index: 1000;
}

.popup.show {
    visibility: visible;
    opacity: 1;
}

.popup-content {
    text-align: center;
    max-height: 80vh; /* Maksimal 80% dari tinggi layar */
    overflow-y: auto; /* Scroll jika kontennya terlalu panjang */
}

.popup-img {
    width: 90%;
    max-height: 250px;
    object-fit: cover;
    border-radius: 8px;
}

/* Tombol Tutup */
.close-popup {
    position: absolute;
    top: 10px;
    right: 15px;
    background: red;
    color: white;
    padding: 8px 15px;
    border: none;
    cursor: pointer;
}

/* RESPONSIVE */
@media screen and (max-width: 400px) {
    .popup {
        width: 80%;
        max-width: 80%;
    }

    .popup-img {
        max-height: 200px;
    }
}


/* ------------------------ */
/* PRODUK SLIDER */
/* ------------------------ */
.produk-slider-container {
    display: flex;
    align-items: center;
    overflow: hidden;
    position: relative;
}

.produk-slider {
    display: flex;
    overflow-x: auto;
    scroll-behavior: smooth;
    padding: 10px 0;
    gap: 15px;
    white-space: nowrap;
    width: 100%;
}

.produk-card-slider {
    width: 200px;
    flex: 0 0 auto;
    background: white;
    padding: 10px;
    border-radius: 10px;
    text-align: center;
    transition: transform 0.2s;
}

.produk-card-slider img {
    width: 100%;
    height: 120px;
    object-fit: cover;
    border-radius: 8px;
}

/* Tombol Slide */
.slide-btn {
    background: rgba(255, 255, 255, 0.8);
    border: none;
    padding: 10px;
    font-size: 20px;
    cursor: pointer;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
}

.prev {
    left: 0;
}

.next {
    right: 0;
}

/* ------------------------ */
/* RESPONSIVE */
/* ------------------------ */
@media screen and (max-width: 600px) {
    .cart-container {
        width: 300px;
    }

    nav {
        width: 220px;
    }

    .popup {
        width: 95%;
    }

    .produk-container {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }

    .produk-card {
        width: 100%;
    }

    .filter-section {
        flex-direction: column;
        align-items: center;
    }

    .filter-group {
        width: 100%;
    }

    .filter-buttons {
        width: 100%;
        justify-content: space-around;
    }
}

/* ------------------------ */
/* FOOTER MINIMALIS */
/* ------------------------ */
footer {
    background: linear-gradient(to right, #e91e63, #ff4081);
    color: white;
    text-align: center;
    padding: 10px;
    width: 100%;
    position: relative;
    font-size: 0.8em; /* Ukuran teks lebih kecil */
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
}

@media screen and (max-width: 600px) {
    footer {
        padding: 8px;
        font-size: 0.75em;
    }
}

/* ------------------------ */
/* KATEGORI */
/* ------------------------ */
.kategori {
    margin: 30px auto;
    padding: 20px;
    width: 90%;
    max-width: 1200px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.kategori h2 {
    border-bottom: 3px solid #e91e63;
    padding-bottom: 5px;
    color: #e91e63;
}

/* ------------------------ */
/* STYLING FILTER DATA */
/* ------------------------ */
.filter-section {
    width: 90%;
    max-width: 1200px;
    margin: 20px auto;
    padding: 20px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
}

/* Mengatur agar form tetap sejajar dalam satu baris */
.filter-section form {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 15px;
    width: 100%;
}

/* Style untuk setiap grup input */
.filter-group {
    flex: 1;
    min-width: 180px; /* Supaya tidak terlalu kecil di layar kecil */
    display: flex;
    flex-direction: column;
}

/* Label kategori & warung */
.filter-group label {
    font-weight: bold;
    margin-bottom: 5px;
    color: #e91e63;
}

/* Dropdown & Input */
.filter-group select,
.filter-group input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1em;
}

/* Container tombol filter */
.filter-buttons {
    display: flex;
    gap: 10px;
    justify-content: center;
}

/* Tombol filter dan reset */
.btn-filter, .btn-reset {
    display: inline-block;
    padding: 10px 15px;
    border-radius: 5px;
    font-weight: bold;
    cursor: pointer;
    border: none;
    font-size: 1em;
}

/* Tombol "Filter" hijau */
.btn-filter {
    background: #4CAF50;
    color: white;
}

.btn-filter:hover {
    background: #388E3C;
}

/* Tombol "Reset" merah muda */
.btn-reset {
    background: #ff4081;
    color: white;
}

.btn-reset:hover {
    background: #c2185b;
}

/* RESPONSIVE untuk layar kecil */
@media screen and (max-width: 768px) {
    .filter-section form {
        flex-direction: column;
        align-items: center;
    }

    .filter-group {
        width: 100%;
    }

    .filter-buttons {
        width: 100%;
        justify-content: space-around;
    }
}
/* ------------------------ */
/* LOKASI PENGGUNA */
/* ------------------------ */
.lokasi-section {
    width: 90%;
    max-width: 1200px;
    margin: 20px auto;
    padding: 15px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    text-align: center;
}

.lokasi-section p {
    font-size: 1em;
    color: #333;
    margin-bottom: 10px;
}

.btn-lokasi {
    background: #ff4081;
    color: white;
    padding: 10px 15px;
    border: none;
    border-radius: 5px;
    font-size: 1em;
    cursor: pointer;
    font-weight: bold;
}

.btn-lokasi:hover {
    background: #c2185b;
}
/* ------------------------ */
/* HALAMAN KONTAK */
/* ------------------------ */
.kontak-section {
    width: 90%;
    max-width: 800px;
    margin: 30px auto;
    padding: 20px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.kontak-form label {
    font-weight: bold;
    display: block;
    margin: 10px 0 5px;
}

.kontak-form input,
.kontak-form textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1em;
}

.btn-kirim {
    display: block;
    width: 100%;
    background: #4CAF50;
    color: white;
    text-align: center;
    padding: 12px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

.btn-kirim:hover {
    background: #388E3C;
}

/* ------------------------ */
/* HALAMAN TENTANG */
/* ------------------------ */
.tentang-section {
    width: 90%;
    max-width: 800px;
    margin: 30px auto;
    padding: 20px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.tentang-section ul {
    padding-left: 20px;
}

/* ------------------------ */
/* HALAMAN DAFTAR WARUNG */
/* ------------------------ */
.daftar-warung-section {
    width: 90%;
    max-width: 1000px;
    margin: 30px auto;
    padding: 20px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.warung-container {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    justify-content: center;
}

.warung-card {
    width: 300px;
    padding: 15px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    text-align: center;
}

.btn-lihat {
    background: #ff4081;
    color: white;
    border: none;
    padding: 10px;
    border-radius: 5px;
    cursor: pointer;
}

.btn-lihat:hover {
    background: #c2185b;
}
.warung-container {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    justify-content: center;
}

.warung-card {
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    padding: 15px;
    width: 250px;
    text-align: center;
    transition: transform 0.2s;
}

.warung-card:hover {
    transform: scale(1.05);
}

.warung-logo img {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: 50%;
    margin-bottom: 10px;
}

.btn-lihat {
    background: #ff4081;
    color: white;
    padding: 8px 12px;
    border-radius: 5px;
    font-weight: bold;
    cursor: pointer;
    border: none;
    display: inline-block;
    margin-top: 10px;
}

.btn-lihat:hover {
    background: #c2185b;
}
/* Layout horizontal untuk warung-card */
.warung-card.horizontal-layout {
    display: flex;
    align-items: center;
    cursor: pointer;
    text-align: left;
    transition: background-color 0.3s;
    width: 100%;          /* Full width parent container */
    max-width: 650px;     /* Batas maks, agar tidak terlalu lebar di desktop */
    margin: 0 auto 15px;  /* Center + jarak bawah */
}

.warung-card.horizontal-layout:hover {
    background-color: #f8f8f8;
}

/* Logo warung di kiri */
.warung-card.horizontal-layout .warung-logo {
    margin-right: 15px;
}

.warung-card.horizontal-layout .warung-logo img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 50%;
}

/* Bagian teks (info warung) di kanan */
.warung-card.horizontal-layout .warung-info {
    display: flex;
    flex-direction: column;
    align-items: flex-start; /* teks rata kiri */
    width: 100%;
    gap: 5px;
}

/* Badge jumlah produk */
.produk-badge {
    margin-top: 5px;
    font-weight: normal; /* Atau bold, sesuai selera */
}

.produk-badge span {
    background: #ff4081;
    color: #fff;
    padding: 5px 8px;
    border-radius: 6px;
    font-weight: bold;
    margin-left: 5px; 
}

/* Tombol “Lihat Produk” */
.btn-lihat {
    background: #ff4081;
    color: white;
    padding: 8px 12px;
    border-radius: 5px;
    font-weight: bold;
    cursor: pointer;
    border: none;
    margin-top: 8px;
}
.btn-lihat:hover {
    background: #c2185b;
}

/* Responsif untuk layar kecil */
@media screen and (max-width: 600px) {
    .warung-card.horizontal-layout {
        flex-direction: row;  
        /* Atau bisa column jika ingin logo di atas teks
           flex-direction: column;
           align-items: center;
        */
        max-width: 100%; /* Hilangkan batas 650px agar full di ponsel */
    }
    .warung-card.horizontal-layout .warung-logo img {
        width: 50px;
        height: 50px;
    }
}
