@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;600;700&display=swap');

:root {
    --primary-color: #F8BBD0; /* Soft Pink / Background touches */
    --secondary-color: #F06292; /* Strong Pink / Buttons */
    --bg-color: #F4F8FA; /* Ice White */
    --text-color: #212121;
    --light-gray: #EEEEEE;
    --white: #ffffff;
    --font-heading: 'Montserrat', sans-serif;
    --font-body: 'Montserrat', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
}

/* Navbar */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.55rem 5%; /* Dikurangi sekitar 4px dari 0.8rem */
    background: #FAF3E0; /* Krem */
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 15px rgba(0,0,0,0.05);
}

.logo h2 {
    font-family: var(--font-heading);
    color: #000; /* Hitam */
    font-size: 1.25rem;
    font-weight: 700;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-links {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-links > a, .nav-links > .dropdown {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 600;
    font-size: 0.95rem;
    transition: color 0.3s;
    position: relative;
    cursor: pointer;
}

.nav-links a:hover, .dropdown:hover {
    color: var(--secondary-color);
}

/* Dropdown Menu CSS */
.dropdown {
    /* No padding, let flexbox align it naturally like other nav links */
}
.dropdown-content {
    display: none;
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    background-color: white;
    min-width: 180px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.1);
    border-radius: 10px;
    padding: 1rem 0;
    z-index: 1001;
    border: 1px solid #eee;
}
.dropdown-content::before {
    content: '';
    position: absolute;
    top: -15px; /* Bridge the gap upwards */
    left: 0;
    right: 0;
    height: 15px;
    background: transparent;
}
.dropdown:hover .dropdown-content {
    display: flex;
    flex-direction: column;
}
.dropdown-content a {
    color: #555;
    padding: 10px 20px;
    text-decoration: none;
    display: block;
    font-size: 0.9rem;
    transition: background 0.3s, color 0.3s;
}
.dropdown-content a:hover {
    background-color: var(--light-gray);
    color: var(--secondary-color);
}

.nav-actions {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.btn-icon {
    position: relative;
    color: var(--text-color);
    text-decoration: none;
    font-size: 1.2rem;
    transition: color 0.3s;
}
.btn-icon:hover {
    color: var(--secondary-color);
}

.profile-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    border: 2px solid #555555;
    color: #555555;
    transition: all 0.3s;
    text-decoration: none;
    margin-left: 10px;
}
.profile-icon i {
    color: inherit !important;
}
.profile-icon:hover {
    border-color: var(--secondary-color);
    color: var(--secondary-color) !important;
}

.cart-badge {
    position: absolute;
    top: -8px;
    right: -10px;
    background-color: #777777; /* Abu-abu */
    color: white;
    font-size: 0.7rem;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: bold;
}

/* Cart Icon Background */
.cart-icon {
    background-color: var(--secondary-color); /* Salted Egg Green */
    color: white !important;
    padding: 6px 12px;
    border-radius: 20px;
}
.cart-icon:hover {
    background-color: #d84b7a;
    color: white !important;
}
/* Sections & Typography */
.section-title {
    text-align: center;
    margin: 1rem 0;
    padding: 6px 0;
    background-color: #D4A373; /* Coklat Karamel */
}
.section-title h2 {
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 600;
    color: #FFFFFF;
}

/* Product Grid Daffi Style */
.main-container {
    padding: 0;
    display: flex;
    flex-direction: column;
}

.all-products-layout {
    display: flex;
    gap: 2rem;
    margin-top: 2rem;
    padding: 0 5%;
}

.category-sidebar {
    width: 200px;
    flex-shrink: 0;
}

.category-sidebar h3 {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    margin-bottom: 1rem;
    color: #212121;
    border-bottom: 1px solid #e0e0e0;
    padding-bottom: 12px;
}

.category-list {
    list-style: none;
}

.category-list li a {
    text-decoration: none;
    color: #555;
    display: block;
    padding: 8px 0;
    transition: color 0.3s;
    font-size: 0.95rem;
}

.category-list li a:hover, .category-list li a.active {
    color: var(--secondary-color);
    font-weight: 600;
}

.all-products-content {
    flex-grow: 1;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
}
.grid-3-cols {
    display: flex !important;
    flex-wrap: wrap;
    justify-content: center;
    gap: 35px !important; /* Memperbesar jarak antar produk */
    padding: 0 45px; /* Menambah jarak luar agar kotak produk ikut mengecil */
}
.grid-3-cols .product-card {
    margin: 15px; /* Sedikit mengecilkan ukuran murni tiap kotak dari segala sisi */
    flex: 0 0 auto;
    width: 280px; /* Ukuran statis agar selalu proporsional dan bisa muat 3 sejajar */
}

.product-card {
    position: relative;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    transition: transform 0.3s, box-shadow 0.3s;
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 15px rgba(0,0,0,0.1);
}

.product-image {
    width: 100%;
    height: auto;
    aspect-ratio: auto;
    object-fit: contain;
    display: block;
    background: #f8f9fa;
}

.sold-out-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background-color: #E57373; /* Merah yang lebih pudar */
    color: white;
    padding: 5px 12px;
    font-size: 0.8rem;
    font-weight: 800;
    border-radius: 4px;
    z-index: 10;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.discount-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: #81C784; /* Hijau yang lebih pudar */
    color: white;
    padding: 5px 12px;
    font-size: 0.8rem;
    font-weight: 800;
    border-radius: 4px;
    z-index: 10;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.original-price {
    color: #95a5a6;
    font-size: 0.85em;
    margin-right: 5px;
    font-weight: normal;
    text-decoration: line-through;
}

.product-info {
    padding: 15px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 12px;
}

.product-text {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.product-info h3 {
    font-family: var(--font-heading);
    font-size: 0.95rem;
    margin: 0;
    font-weight: 600;
    color: #1976D2; /* Blue */
    letter-spacing: 0.5px;
}

.price {
    font-size: 1.1rem;
    color: #000000; /* Black */
    font-weight: 700;
    margin-bottom: 0;
}

/* Button */
.btn-buy-card {
    background: var(--secondary-color);
    color: white;
    border: none;
    padding: 5px 12px;
    border-radius: 4px;
    text-align: center;
    font-size: 0.75rem;
    font-weight: 600;
    transition: 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    width: auto;
    align-self: flex-end;
}

.product-card:hover .btn-buy-card {
    background: white;
    color: #212121;
}

/* Badges */
.badge-discount {
    position: absolute;
    top: 10px;
    right: 10px;
    background: var(--secondary-color);
    color: white;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: bold;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    font-family: var(--font-heading);
}

.badge-soldout {
    position: absolute;
    top: 10px;
    left: 10px;
    background: #0D47A1;
    color: white;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: bold;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}



/* Floating Action Button (WhatsApp) */
.fab-whatsapp {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: #2E7D32;
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 2rem;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    z-index: 9999;
    text-decoration: none;
    transition: transform 0.3s;
}
.fab-whatsapp:hover {
    transform: scale(1.1);
}

/* Footer Daffi Style */
.footer {
    background: var(--secondary-color);
    color: #FFFFFF;
    padding: 3rem 5% 1rem 5%;
    margin-top: 4rem;
    border-top: 1px solid #EEEEEE;
}
.footer-content {
    display: flex;
    justify-content: space-between;
    max-width: 1200px;
    margin: 0 auto;
    flex-wrap: wrap;
    gap: 2rem;
}
.footer-col {
    flex: 1;
    min-width: 250px;
}
.footer-col h3 {
    margin-bottom: 1.5rem;
    font-family: var(--font-heading);
    font-size: 1.3rem;
    color: #FFFFFF;
}
.footer-col a, .footer-col p {
    color: #FFFFFF;
    text-decoration: none;
    display: block;
    margin-bottom: 0.8rem;
    font-size: 0.95rem;
    transition: opacity 0.3s;
}
.footer-col a:hover {
    opacity: 0.7;
}

/* Carousel/Banner */
.carousel-container {
    width: 100%;
    max-width: 100%;
    margin: 0;
    overflow: hidden;
    position: relative;
    background: var(--light-gray);
}
.carousel-slide {
    display: flex;
    width: 100%;
    transition: transform 0.5s ease-in-out;
}
.carousel-slide img {
    width: 100%;
    flex-shrink: 0;
    object-fit: cover;
    aspect-ratio: 16/9;
    display: block;
}
.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.7);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
    color: var(--secondary-color);
}
.carousel-prev { left: 10px; }
.carousel-next { right: 10px; }

/* Search and Sort Layout */
.search-sort-container {
    margin: 3rem auto;
    padding: 0 15px;
    max-width: 1200px;
}
.search-sort-form {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 20px;
    width: 100%;
}
.search-spacer {
    width: 100%;
}
.search-box {
    display: flex;
    align-items: center;
    background: #fff;
    border-radius: 30px;
    padding: 8px 15px 8px 25px;
    border: 1px solid #ddd;
    width: 100%;
    min-width: 300px;
    width: 500px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    margin: 0 auto;
}
.search-box input {
    border: none;
    background: transparent;
    outline: none;
    font-family: 'Poppins', sans-serif;
    font-size: 1rem;
    flex-grow: 1;
    color: var(--text-color);
    min-width: 200px;
}
.search-box button {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--primary-color);
    font-size: 1.2rem;
    padding: 0 5px;
}
.sort-box {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    width: 100%;
}
.sort-box span {
    font-weight: 600;
    color: #FFFFFF;
    font-size: 0.95rem;
    background-color: #D4A373; /* Coklat Karamel */
    border: 2px solid #D4A373;
    border-radius: 20px;
    padding: 5px 12px;
}
.sort-box select {
    border: 1px solid #ddd;
    background: #fff;
    padding: 8px 15px;
    border-radius: 30px;
    font-family: var(--font-body);
    font-size: 0.95rem;
    cursor: pointer;
    outline: none;
    color: #333;
    box-shadow: 0 2px 5px rgba(0,0,0,0.02);
}
}

@media (max-width: 1024px) {
    .product-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 768px) {
    .product-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .nav-right {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-links { display: none; } /* Hide links on mobile for simplicity */
    
    
        /* Fix Navbar on Mobile */
    .navbar {
        display: grid;
        grid-template-columns: 1fr auto auto;
        grid-template-rows: auto auto;
        gap: 10px 15px;
        align-items: center;
        padding: 10px 15px;
    }
    .nav-right, .nav-actions {
        display: contents !important;
    }
    

.logo {
        grid-column: 1 / 2;
        grid-row: 1 / 2;
    }
    .nav-actions .cart-icon {
        grid-column: 2 / 3;
        grid-row: 1 / 2;
        margin: 0 !important;
    }
    .nav-actions .profile-icon {
        grid-column: 3 / 4;
        grid-row: 1 / 2;
        margin: 0 !important;
    }
    .nav-actions form {
        grid-column: 1 / 4;
        grid-row: 2 / 3;
        width: 100%;
        margin: 0;
    }
    .nav-right {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-links {
        display: none;
    }

    /* Fix All Products Layout */
    .all-products-layout {
        flex-direction: column;
        padding: 0 15px;
        gap: 1rem;
    }
    .category-sidebar {
        width: 100%;
    }
    .category-list {
        display: flex;
        flex-wrap: wrap;
        gap: 12px;
    }
    .category-list li {
        margin-bottom: 0;
    }
    .category-list a {
        display: inline-block;
        background: #ffffff;
        border: 1px solid #e0e0e0;
        padding: 8px 18px;
        border-radius: 30px;
        font-size: 0.9rem;
        color: #555;
        box-shadow: 0 2px 5px rgba(0,0,0,0.02);
    }
    .category-list a.active {
        background: var(--primary-color);
        border-color: var(--primary-color);
        color: white;
    }
    .main-container {
        padding: 0 10px;
    }
    
    /* Search Sort Mobile */
    .search-sort-form {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    .search-spacer {
        display: none;
    }
    .search-box {
        width: 100%;
        min-width: 100%;
    }
    .sort-box {
        justify-content: space-between;
    }
}

@media (max-width: 480px) {
    .product-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
    .product-image { height: 160px; }
    .product-text h3 { font-size: 0.85rem; }
    .btn-buy-card { padding: 8px; font-size: 0.8rem; }
}



/* Floating Action Button WhatsApp */
.floating-btn-custom {
    position: fixed;
    bottom: 25px;
    right: 25px;
    background-color: #25d366;
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 35px;
    box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.3);
    z-index: 9999;
    text-decoration: none;
    transition: transform 0.3s, background-color 0.3s;
}

.floating-btn-custom:hover {
    background-color: #128c7e;
    transform: scale(1.1);
    color: white;
}




