@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@300;400;500;600&family=Playfair+Display:ital,wght@0,400;0,600;1,400&display=swap');

:root {
    --primary-color: #f5f5f5; /* Light gray background touches */
    --secondary-color: #6B3FA0; /* Royal Purple */
    --bg-color: #F4F8FA; /* Ice White */
    --text-color: #111111;
    --light-gray: #f9f9f9;
    --white: #ffffff;
    --font-heading: 'Playfair Display', serif;
    --font-body: 'Montserrat', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body, html {
    font-family: var(--font-body);
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    overflow-x: hidden;
    width: 100%;
}

/* Navbar */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 5%; 
    background: #ffffff; 
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 1px 10px rgba(0,0,0,0.05);
    border-bottom: 1px solid #eaeaea;
}

.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: 4px;
    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: 4px;
}
.cart-icon:hover {
    background-color: #d84b7a;
    color: white !important;
}
/* Sections & Typography */
.section-title {
    text-align: center;
    margin: 3rem 0 1.5rem 0;
    padding: 0;
    background-color: transparent;
}
.section-title h2 {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 400;
    color: #111111;
    letter-spacing: 2px;
}

/* 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: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
}
.product-grid .product-card {
    flex: 0 0 calc(20% - 12px);
    max-width: calc(20% - 12px);
}
.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 {
    background: #f2f2f2; /* Lighter gray (abu-abu sangat muda/pudar) */
    overflow: hidden;
    transition: transform 0.3s ease;
    text-decoration: none;
    color: var(--text-color);
    display: flex;
    flex-direction: column;
    position: relative;
    border: 1px solid #ebebeb; /* Visually thinner border (lighter gray) */
    border-radius: 12px; /* Rounded corners */
    text-align: center;
}

.product-card:hover {
    transform: translateY(-5px);
}

.product-image {
    width: 100%;
    height: auto;
    aspect-ratio: auto;
    object-fit: contain;
    display: block;
    padding: 15px;
    box-sizing: border-box;
    background: transparent;
}

.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: 1rem 0.5rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    flex-grow: 1;
    text-align: center;
}
.product-text {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.product-info h3 {
    font-family: var(--font-heading);
    font-size: 0.95rem;
    margin: 0;
    transform: translateY(-9px);
    font-weight: 600;
    color: #6B3FA0; /* Match vibrant logo color */
    letter-spacing: 0.5px;
}

.price {
    font-size: 0.95rem;
    color: #796675; /* Slightly lighter muted purple for price */
    font-weight: 700;
    margin-bottom: 0;
    transform: translateY(-5px);
}

/* Button */
.btn-buy-card {
    background: #3A1E43;
    color: white;
    border: none;
    padding: 10px 25px;
    border-radius: 30px;
    text-align: center;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    margin: auto auto 0 auto;
    width: max-content;
    display: inline-block;
}

.product-card:hover .btn-buy-card {
    background: #2D1535;
    color: white;
}

.btn-buy-card:hover {
    background: #4A2855 !important;
    box-shadow: 0 5px 15px rgba(58, 30, 67, 0.5), inset 0 2px 5px rgba(255, 255, 255, 0.4);
    transform: translateY(-2px);
}

/* Badges */
.badge-discount {
    position: absolute;
    top: 10px;
    right: 10px;
    background: var(--secondary-color);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    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: 4px;
    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: 4px;
    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: 4px;
    padding: 5px 12px;
}
.sort-box select {
    border: 1px solid #ddd;
    background: #fff;
    padding: 8px 15px;
    border-radius: 4px;
    font-family: var(--font-body);
    font-size: 0.95rem;
    cursor: pointer;
    outline: none;
    color: #111;
    box-shadow: 0 2px 5px rgba(0,0,0,0.02);
}
}

@media (max-width: 1024px) {
    .product-grid .product-card { flex: 0 0 calc(33.333% - 10px); max-width: calc(33.333% - 10px); }
}
@media (max-width: 768px) { 
    .search-sort-container { margin: 1.5rem auto; } 
    .sold-out-badge, .discount-badge { font-size: 0.55rem; padding: 3px 5px; letter-spacing: 0; }
    .product-grid { gap: 10px; }
    .product-grid .product-card { flex: 0 0 calc(50% - 5px); max-width: calc(50% - 5px); }
    
    /* Override grid-3-cols untuk mobile agar menjadi 2x2 dan center elemen ganjil */
    .grid-3-cols {
        display: flex !important;
        flex-wrap: wrap !important;
        justify-content: center !important;
        padding: 0 15px !important;
        gap: 10px !important;
    }
    .grid-3-cols .product-card {
        margin: 0 !important;
        width: calc(50% - 5px) !important;
    }

    .nav-right {
    display: flex;
    align-items: center;
    gap: 2rem;
}

    /* Fix Navbar on Mobile */
    .navbar-top-row {
        flex-wrap: wrap !important;
        padding: 1rem 5% !important;
    }
    .nav-logo-container {
        flex: 1 !important;
        justify-content: flex-start !important;
        order: 1;
    }
    .nav-actions-container {
        flex: 1 !important;
        justify-content: flex-end !important;
        order: 2;
        font-size: 0.85rem !important;
        gap: 12px !important;
    }
    .nav-search-container {
        width: 100% !important;
        flex: 100% !important;
        order: 3;
        margin-top: 15px;
    }
    .nav-search-btn {
        width: 100% !important;
        min-width: 100% !important;
        justify-content: center !important;
    }
    
    /* Make Mega Menu horizontally scrollable on mobile */
    .nav-categories {
        flex-wrap: nowrap !important;
        overflow-x: auto !important;
        justify-content: flex-start !important;
        padding-bottom: 10px !important;
        padding-left: 5% !important;
        padding-right: 5% !important;
        -webkit-overflow-scrolling: touch;
        white-space: nowrap;
    }
    .nav-categories::-webkit-scrollbar {
        display: none;
    }
    .mega-dropdown {
        flex: 0 0 auto;
    }
    
    .navbar .nav-links {
        flex-wrap: wrap !important;
        gap: 10px !important;
        width: 100%;
    }
    
    .navbar .nav-actions {
        width: 100%;
        justify-content: center !important;
    }

    /* Fix All Products Layout */
    .all-products-layout {
        flex-direction: column;
        padding: 0 15px;
        gap: 1rem;
    }
    .category-sidebar {
        width: 100%;
    }
    .category-list {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    .category-list li {
        margin-bottom: 0;
    }
    .category-list li a { 
        display: block; 
        width: 100%; 
        box-sizing: border-box; 
        text-align: center;
        background: #ffffff; 
        border: 1px solid #e0e0e0; 
        padding: 8px 2px !important;
        border-radius: 4px;
        font-size: 0.8rem;
        color: #555;
        box-shadow: 0 2px 5px rgba(0,0,0,0.02);
    }
    .category-list li 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: flex-start; }
}

@media (max-width: 480px) {
    .banner-content { padding: 10px; }
    .banner-content h1 { font-size: 1.5rem; letter-spacing: 2px; }
    .banner-content p { font-size: 0.8rem; }
    .btn-shop { padding: 8px 20px; font-size: 0.8rem; }
    .product-grid { gap: 8px; }
    .product-grid .product-card { flex: 0 0 calc(50% - 4px); max-width: calc(50% - 4px); }
    .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: #917066; /* Muted brown-taupe */
    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;
    opacity: 0.8;
    transition: transform 0.3s, background-color 0.3s, opacity 0.3s;
}

.floating-btn-custom:hover {
    background-color: #7B5C52; /* Darker taupe on hover */
    transform: scale(1.1);
    opacity: 1;
    color: white;
}














