/* General Styling & Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif; /* Using Inter font */
    background-color: #f8f8f8;
    line-height: 1.6;
    color: #333;
    touch-action: pan-x pan-y;
    /* Tambahkan ini jika konten di bawah navbar utama tertutup saat navbar menempel */
    /* padding-top: 70px; /* Sesuaikan dengan tinggi navbar Anda */
}

/* Utility Classes */
.container {
    width: 95%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 0;
}

.section-title {
    font-size: 28px;
    font-weight: bold;
    color: #2b2b2b;
    margin-bottom: 25px;
    text-align: left;
}

/* ============================ */
/* NAVIGASI BAR STYLING */
/* ============================ */
.navbar-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background-color: #fff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    gap: 15px;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar-left {
    display: flex;
    align-items: center;
}

.navbar-left .logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: inherit;
}

.navbar-left .logo img {
    height: 40px;
    margin-right: 10px;
    vertical-align: middle;
    border-radius: 8px; /* Rounded corners for logo */
}

.navbar-left .logo span {
    font-size: 24px;
    font-weight: bold;
    color: #4CAF50;
    white-space: nowrap;
}

.navbar-center {
    flex-grow: 1;
    max-width: 600px;
    margin: 0 auto;
}

.search-bar {
    display: flex;
    border: 1px solid #ddd;
    border-radius: 8px; /* Rounded corners for search bar */
    overflow: hidden;
    height: 40px;
}

.search-bar input[type="text"] {
    flex-grow: 1;
    border: none;
    padding: 0 15px;
    font-size: 16px;
    outline: none;
    border-top-left-radius: 8px;
    border-bottom-left-radius: 8px;
}

.search-bar input[type="text"]::placeholder {
    color: #aaa;
}

.search-bar button {
    background-color: #4CAF50;
    color: white;
    border: none;
    padding: 0 15px;
    cursor: pointer;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s ease;
    border-top-right-radius: 8px;
    border-bottom-right-radius: 8px;
}

.search-bar button:hover {
    background-color: #45a049;
}

.navbar-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.icon-link {
    font-size: 22px;
    color: #555;
    text-decoration: none;
    position: relative;
    transition: color 0.3s ease;
}

.icon-link:hover {
    color: #4CAF50;
}

.cart-icon .cart-count {
    position: absolute;
    top: -8px;
    right: -10px;
    background-color: #e74c3c;
    color: white;
    font-size: 12px;
    font-weight: bold;
    border-radius: 50%;
    padding: 3px 7px;
    line-height: 1;
    min-width: 20px;
    text-align: center;
}

/* ============================ */
/* SLIDER BANNER STYLING */
/* ============================ */
.content-container {
    display: flex;
    flex-direction: column; /* Allow sections to stack */
    justify-content: center;
    align-items: center;
    padding: 20px 0;
}

.slider-container {
    width: 95%;
    max-width: 1200px;
    overflow: hidden;
    position: relative;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    margin-bottom: 40px; /* Space after banner slider */
}

.slider-wrapper {
    display: flex;
    transition: transform 0.5s ease-in-out;
    gap: 20px;
}

.slider-item {
    flex: 0 0 calc(50% - 10px);
    box-sizing: border-box;
    height: 350px;
    overflow: hidden;
}

.slider-item img {
    width: 100%;
    height: 100%;
    display: block;
    border-radius: 8px;
    object-fit: cover;
    object-position: center;
}

.slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(76, 175, 80, 0.7); /* Changed color to match other sliders */
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.5); /* Subtle white border */
    padding: 10px 14px; /* Adjusted padding to match product slider buttons */
    cursor: pointer;
    border-radius: 50%; /* Make it perfectly round */
    font-size: 20px; /* Adjusted font size to match product slider buttons */
    z-index: 10;
    transition: background-color 0.3s, transform 0.2s, box-shadow 0.3s;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2); /* Added shadow */
}

.slider-btn:hover {
    background-color: #4CAF50; /* Solid green on hover */
    transform: translateY(-50%) scale(1.1); /* More pronounced scale up */
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3); /* Enhanced shadow */
}

.prev-btn {
    left: 10px; /* Adjusted from 10px to allow more space */
}

.next-btn {
    right: 10px; /* Adjusted from 10px to allow more space */
}

.pagination {
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
}

.dot {
    width: 12px;
    height: 12px;
    background-color: rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    cursor: pointer;
    transition: background-color 0.3s;
}

.dot.active {
    background-color: rgb(0, 223, 37);
}

/* ============================ */
/* PRODUCT SLIDER STYLING (Flash Sale, Best Seller) */
/* ============================ */
.product-slider-section {
    width: 95%;
    max-width: 1200px;
    margin-bottom: 20px;
    position: relative;
}

.product-slider-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 0 10px;
}

.product-slider-header h2 {
    font-size: 32px; /* Ditingkatkan sedikit untuk dampak */
    font-weight: bold;
    color: #388E3C; /* Warna hijau yang sedikit lebih gelap */
    position: relative; /* Diperlukan untuk pseudo-elements */
    padding-bottom: 8px; /* Ruang untuk garis bawah yang lebih tebal */
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2); /* Efek bayangan teks */
    padding-left: 5px; /* Tambahkan ruang untuk ikon petir */
    display: inline-block; /* Agar padding-left bekerja dengan baik dan untuk positioning icon */
}

/* Styling for the underline effect */
.product-slider-header h2::after {
    content: '';
    position: absolute;
    left: 0; /* Mulai dari kiri ikon */
    bottom: 0;
    width: 40%; /* Garis awal yang lebih pendek */
    height: 4px; /* Garis yang sedikit lebih tebal */
    background: linear-gradient(to right, #e74c3c, #ff7f50); /* Gradient merah ke oranye */
    border-radius: 2px;
    transition: width 0.4s ease-out; /* Transisi yang lebih halus */
}

.product-slider-header h2:hover::after {
    width: 100%; /* Garis memanjang penuh saat hover */
}


.product-slider-header .timer {
    font-family: 'Gill Sans', 'Gill Sans MT', Calibri, 'Trebuchet MS', sans-serif;
    font-size: 23px;
    color: #e74c3c;
    font-weight: bold;
    background-color: #d7d7d7;
    padding: 2px 4px;
    border-radius: 5px;
}

.product-slider-wrapper {
    display: flex;
    overflow-x: hidden; /* Hide scrollbar */
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch; /* Smooth scrolling on iOS */
    padding-bottom: 10px; /* Space for potential scrollbar */
    gap: 20px; /* Space between items */
}

.product-card {
    flex: 0 0 240px; /* Fixed width for each card */
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    text-align: center;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    cursor: pointer;
    position: relative;
    padding-bottom: 15px; /* Space for content */
    display: flex; /* Added flexbox */
    flex-direction: column; /* Stack content vertically */
    justify-content: space-between; /* Distribute space */
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.product-card-image-container {
    width: 100%;
    height: 180px;
    overflow: hidden;
    position: relative;
}

.product-card-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-top-left-radius: 10px;
    border-top-right-radius: 10px;
}

.product-card .discount-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background-color: #e74c3c;
    color: white;
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 14px;
    font-weight: bold;
}

.product-card-content {
    padding: 15px;
    flex-grow: 1; /* Allow content to take available space */
    display: flex;
    flex-direction: column;
    justify-content: space-between; /* Distribute space for price and button */
    align-items: flex-start; /* Align text elements to left */
    text-align: left; /* Ensure text is left-aligned */
}

.product-card-title {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 5px;
    color: #333;
    height: 45px; /* Fixed height for title */
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2; /* Limit to 2 lines */
    -webkit-box-orient: vertical;
    text-align: left; /* Left align title */
    width: 100%; /* Ensure title takes full width */
}

.product-card-category {
    font-size: 14px;
    color: #777;
    margin-bottom: 10px;
}

.product-card-price-old {
    font-size: 13px;
    color: #999;
    text-decoration: line-through;
    margin-bottom: 5px;
    text-align: left; /* Left align price */
    width: 100%; /* Ensure price takes full width */
}

.product-card-price-new {
    font-size: 20px;
    font-weight: bold;
    color: #ff4c10;
    margin-bottom: 15px;
    text-align: left; /* Left align price */
    width: 100%; /* Ensure price takes full width */
}

.product-card-price-start { /* New style for "Harga Mulai" */
    font-size: 18px;
    color: #555;
    margin-bottom: 5px;
    font-weight: 600;
    text-align: left; /* Left align text */
    width: 100%; /* Ensure text takes full width */
}

.product-card-button {
    background-color: #4CAF50;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s ease;
    text-decoration: none; /* For anchor tags */
    display: inline-block;
    width: 100%; /* Make button take full width */
    margin-top: auto; /* Push button to the bottom */
}

.product-card-button:hover {
    background-color: #45a049;
}

.slider-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(76, 175, 80, 0.7); /* Changed to match main slider */
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3); /* Subtle white border */
    padding: 10px 14px; /* Adjusted padding */
    cursor: pointer;
    border-radius: 50%; /* Make it perfectly round */
    font-size: 20px;
    z-index: 10;
    transition: background-color 0.3s, transform 0.2s, box-shadow 0.3s;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2); /* Added shadow */
}

.slider-nav-btn:hover {
    background-color: #4CAF50; /* Solid green on hover */
    transform: translateY(-50%) scale(1.1); /* More pronounced scale up */
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3); /* Enhanced shadow */
}

.slider-nav-btn.left {
    left: -20px;
}

.slider-nav-btn.right {
    right: -20px;
}

/* ============================ */
/* OUR CATEGORIES STYLING */
/* ============================ */
.categories-section {
    width: 95%;
    max-width: 1200px;
    margin-bottom: 30px;
    /* Pastikan tidak ada overflow: hidden; atau fixed height di sini jika ada */
}

/* New styles for the main category list */
.category-list {
    display: flex;
    flex-direction: column;
    gap: 20px; /* Space between main category items */
    padding: 0 10px;
    /* Pastikan tidak ada overflow: hidden; atau fixed height di sini jika ada */
}

.main-category-item {
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    /* Hapus 'overflow: hidden;' dari sini. Ini membatasi perilaku sticky pada anak-anaknya. */
    /* overflow: hidden; */
    transition: box-shadow 0.2s ease;
}

.main-category-item:hover {
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.main-category-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 20px;
    background-color: #4CAF50;
    color: white;
    font-size: 22px;
    font-weight: bold;
    cursor: pointer;
    border-top-left-radius: 10px;
    border-top-right-radius: 10px;
    transition: background-color 0.3s ease;

    position: sticky; /* Pastikan ini ada */
    /* Sesuaikan nilai 'top' ini. Navbar Anda memiliki tinggi sekitar 70px (padding 15px + 15px + elemen internal). */
    /* Jadi, agar menempel tepat di bawah navbar, kita set 'top' ke tinggi navbar. */
    top: 70px; /* Nilai ini mungkin perlu sedikit disesuaikan tergantung tinggi navbar aktual */
    z-index: 990; /* Lebih rendah dari navbar (1000) tapi lebih tinggi dari konten lain */
}

.main-category-header:hover {
    background-color: #45a049;
}

.main-category-header .category-icon {
    margin-right: 15px;
    font-size: 24px;
}

.main-category-header .arrow-icon {
    transition: transform 0.3s ease;
}

.main-category-header .arrow-icon.fa-chevron-up {
    transform: rotate(180deg);
}

.subcategory-grid {
    /* Hapus 'position: sticky;' dari sini. */
    /* Elemen ini adalah konten subkategori yang seharusnya digulirkan, bukan yang menempel. */
    /* Hapus baris di bawah ini: */
    /* position: sticky; */
    display: grid;
    /* Default for smaller screens, will be overridden by media queries */
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    padding: 0 20px; /* Adjusted padding to 0 when closed */
    max-height: 0; /* Initially hidden */
    overflow: hidden;
    transition: max-height 0.5s ease-out, padding 0.5s ease-out;
    background-color: #fdfdfd;
    border-bottom-left-radius: 10px;
    border-bottom-right-radius: 10px;
    box-sizing: border-box; /* Include padding in element's total width and height */
}

.subcategory-grid.show-subcategories {
    max-height: 4500px; /* Increased max-height to ensure all cards are visible */
    padding: 20px; /* Padding when open */
}

/* Reusing category-card styles for subcategories */
.category-card {
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    text-align: center;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    cursor: pointer;
    padding-bottom: 15px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    /* Ensure consistent card size with product-card */
    flex: 0 0 240px; /* Fixed width for each card */
    box-sizing: border-box; /* Include padding and border in the element's total width and height */
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.category-card img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-top-left-radius: 10px;
    border-top-right-radius: 10px;
    margin-bottom: 10px;
}

.category-card-title {
    font-size: 18px;
    font-weight: bold;
    color: #333;
    margin-top: 10px;
}

/* ============================ */
/* OUR PRODUCT STYLING */
/* ============================ */
.our-product-section {
    width: 95%;
    max-width: 1200px;
    margin-bottom: 40px;
}

/* This is the product grid that will be used for both "Our Product" and "Category" pages */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); /* Responsive columns */
    gap: 20px;
    padding: 0 10px;
}

/* Ensure 4 columns on larger screens for product-grid */
@media (min-width: 1024px) {
    .product-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    /* ========== PERBAIKAN PENTING DI SINI ========== */
    /* Pastikan kartu di subcategory-grid memiliki lebar 240px pada desktop */
    .subcategory-grid {
        grid-template-columns: repeat(auto-fit, 240px); /* Memaksa lebar kolom 240px */
        justify-content: center; /* Pusatkan item grid jika ada ruang kosong */
    }
    .subcategory-grid .product-card {
        /* Ini menjadi kurang krusial jika grid-template-columns sudah fixed, tapi tetap jaga untuk konsistensi */
        flex: 0 0 240px;
    }
    /* ============================================== */
}

/* Reusing product-card styles for individual products */

/* ============================ */
/* PRODUCT DETAIL PAGE STYLING */
/* ============================ */
.product-detail-page {
    padding: 40px 20px;
    max-width: 1000px;
    margin: 20px auto;
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.product-detail-breadcrumb {
    font-size: 14px;
    color: #777;
    margin-bottom: 20px;
}

.product-detail-breadcrumb a {
    color: #4CAF50;
    text-decoration: none;
}

.product-detail-breadcrumb a:hover {
    text-decoration: underline;
}

.product-detail-main {
    display: flex;
    gap: 40px;
    flex-wrap: wrap; /* Allow wrapping on smaller screens */
}

.product-detail-image-gallery {
    flex: 1;
    min-width: 300px;
    max-width: 500px;
}

.product-detail-main-image {
    width: 100%;
    height: 400px;
    object-fit: cover;
    border-radius: 10px;
    margin-bottom: 15px;
}

.product-detail-thumbnail-wrapper {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding-bottom: 5px;
}

.product-detail-thumbnail {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 8px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: border-color 0.2s ease;
}

.product-detail-thumbnail.active {
    border-color: #4CAF50;
}

.product-detail-info {
    flex: 1.5;
    min-width: 300px;
}

.product-detail-info h1 {
    font-size: 32px;
    font-weight: bold;
    margin-bottom: 10px;
    color: #333;
    text-align: left; /* Left align title */
}

.product-detail-info .price-section {
    margin-bottom: 25px;
    text-align: left; /* Left align price section */
}

.product-detail-info .price-section .original-price { /* Moved above price-label */
    font-size: 16px;
    color: #999;
    text-decoration: line-through;
    margin-bottom: 5px; /* Space below it */
}

.product-detail-info .price-section .price-label {
    font-size: 20px;
    color: #555;
    margin-bottom: 5px;
    font-weight: 600;
}

.product-detail-info .price-section .current-price {
    font-size: 36px;
    font-weight: bold;
    color: #4CAF50;
    margin-bottom: 5px;
}

.product-detail-options {
    margin-bottom: 25px;
}

.product-detail-options label {
    display: block;
    font-weight: bold;
    margin-bottom: 8px;
    color: #555;
}

/* Style for custom size input */
.product-detail-options input[type="text"] {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
    outline: none;
}

.product-detail-options input[type="text"]:focus {
    border-color: #4CAF50;
}

.product-detail-options select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
    appearance: none; /* Remove default arrow */
    background-image: url('data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%23000000%22%20d%3D%22M287%2C114.1L159.2%2C21.4c-3.1-3.1-8.2-3.1-11.3,0l-127.8,92.7c-3.1,3.1-3.1,8.2,0,11.3l11.3,11.3c3.1,3.1,8.2,3.1,11.3,0l116.4-84.3c3.1-3.1,8.2-3.1,11.3,0l116.4,84.3c3.1,3.1,8.2,3.1,11.3,0l11.3-11.3C290.1,122.3,290.1,117.2,287,114.1z%22%2F%3E%3C%2Fsvg%3E');
    background-repeat: no-repeat;
    background-position: right 10px top 50%;
    background-size: 12px auto;
    cursor: pointer;
}

.product-detail-options select:focus {
    border-color: #4CAF50;
    outline: none;
}

.product-detail-final-price-container { /* New container for final price */
    background-color: #e8f5e9; /* Light green background */
    border: 1px solid #4CAF50;
    border-radius: 8px;
    padding: 15px 20px;
    margin-top: 20px;
    text-align: right;
    display: flex; /* Use flexbox for alignment */
    justify-content: space-between; /* Space between label and price */
    align-items: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.product-detail-final-price-container .label {
    font-size: 18px;
    font-weight: bold;
    color: #333;
}

.product-detail-final-price-container .price {
    font-size: 28px;
    font-weight: bold;
    color: #2e7d32; /* Darker green for emphasis */
}


.product-detail-actions {
    display: flex;
    gap: 15px;
    margin-top: 30px;
    flex-wrap: wrap;
    justify-content: center; /* Center align buttons */
}

.product-detail-actions button {
    flex: 1;
    padding: 15px 20px;
    border: none;
    border-radius: 8px;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.1s ease;
    min-width: 180px;
}

.product-detail-actions button:active {
    transform: translateY(1px);
}

.product-detail-actions .buy-now-btn {
    background-color: #4CAF50;
    color: white;
}

.product-detail-actions .buy-now-btn:hover {
    background-color: #45a049;
}

.product-detail-actions .add-to-cart-btn {
    background-color: #f0f0f0;
    color: #4CAF50;
    border: 1px solid #4CAF50;
}

.product-detail-actions .add-to-cart-btn:hover {
    background-color: #e6e6e6;
}

.product-detail-tabs {
    margin-top: 40px;
    border-bottom: 1px solid #eee;
}

.product-detail-tab-buttons {
    display: flex;
    gap: 10px;
    justify-content: left; /* Center align tab buttons */
}

.product-detail-tab-button {
    padding: 12px 20px;
    background-color: #f0f0f0;
    border: none;
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    color: #777;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.product-detail-tab-button.active {
    background-color: #4CAF50;
    color: white;
}

.product-detail-tab-content {
    padding: 20px;
    background-color: #fdfdfd;
    border-bottom-left-radius: 8px;
    border-bottom-right-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    min-height: 150px;
    overflow-x: auto; /* Allow horizontal scroll if content is too wide */
}

.product-detail-tab-content h3 {
    font-size: 20px;
    margin-bottom: 10px;
    color: #333;
}

.product-detail-tab-content p, .product-detail-tab-content ul {
    font-size: 16px;
    color: #666;
}

.product-detail-tab-content ul {
    list-style: none;
    padding: 0;
}

.product-detail-tab-content ul li {
    margin-bottom: 5px;
}

.product-detail-tab-content ul li strong {
    color: #333;
}

/* ============================ */
/* CART PAGE STYLING */
/* ============================ */
.cart-page {
    padding: 40px 20px;
    max-width: 1000px;
    margin: 20px auto;
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.cart-page h1 {
    font-size: 32px;
    font-weight: bold;
    color: #4CAF50;
    margin-bottom: 30px;
    text-align: center;
}

.cart-content {
    display: flex;
    gap: 30px;
    flex-wrap: wrap;
}

.cart-items-container {
    flex: 2;
    min-width: 300px;
}

.cart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
    margin-bottom: 20px;
}

.cart-header label {
    font-weight: bold;
    color: #555;
}

.cart-header .delete-all-btn {
    color: #e74c3c;
    text-decoration: none;
    font-weight: bold;
    transition: color 0.2s ease;
}

.cart-header .delete-all-btn:hover {
    color: #c0392b;
}

.cart-item {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 20px 0;
    border-bottom: 1px solid #eee;
}

.cart-item:last-child {
    border-bottom: none;
}

.cart-item-checkbox {
    transform: scale(1.2);
}

.cart-item-image {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: 8px;
}

.cart-item-details {
    flex-grow: 1;
}

.cart-item-details h3 {
    font-size: 18px;
    margin-bottom: 5px;
    color: #333;
}

.cart-item-details .category {
    font-size: 14px;
    color: #777;
    margin-bottom: 10px;
}

.cart-item-details .options { /* Style for options line */
    font-size: 14px;
    color: #666;
    margin-bottom: 5px;
}

.cart-item-details .price {
    font-size: 18px;
    font-weight: bold;
    color: #4CAF50;
}

.cart-item-details .original-price {
    font-size: 14px;
    color: #999;
    text-decoration: line-through;
    margin-left: 10px;
}

.cart-item-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.cart-item-actions .delete-item-btn {
    background: none;
    border: none;
    font-size: 20px;
    color: #e74c3c;
    cursor: pointer;
    transition: color 0.2s ease;
    order: 2; /* Move delete button to the right of quantity control */
}

.cart-item-actions .delete-item-btn:hover {
    color: #c0392b;
}

.quantity-control {
    display: flex;
    align-items: center;
    border: 1px solid #ddd;
    border-radius: 5px;
    overflow: hidden;
    order: 1; /* Keep quantity control to the left */
}

.quantity-control button {
    background-color: #f0f0f0;
    border: none;
    padding: 8px 12px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.2s ease;
}

.quantity-control button:hover {
    background-color: #e6e6e6;
}

.quantity-control span {
    padding: 8px 15px;
    font-size: 16px;
    min-width: 40px;
    text-align: center;
}

.cart-summary {
    flex: 1;
    min-width: 280px;
    background-color: #f9f9f9;
    border-radius: 10px;
    padding: 25px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.cart-summary h2 {
    font-size: 22px;
    font-weight: bold;
    margin-bottom: 20px;
    color: #333;
}

.cart-summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    font-size: 16px;
}

.cart-summary-row.total {
    font-size: 20px;
    font-weight: bold;
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

.cart-summary-row .label {
    color: #666;
}

.cart-summary-row .value {
    color: #333;
}

.cart-summary-row .value.discount {
    color: #e74c3c;
}

.cart-summary .checkout-btn {
    width: 100%;
    padding: 15px;
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    margin-top: 25px;
    transition: background-color 0.3s ease, transform 0.1s ease;
}

.cart-summary .checkout-btn:hover {
    background-color: #45a049;
}

.cart-summary .checkout-btn:active {
    transform: translateY(1px);
}

.empty-cart-message {
    text-align: center;
    font-size: 20px;
    color: #777;
    padding: 50px 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 200px;
    border: 2px dashed #ccc; /* Added dashed border */
    border-radius: 10px;
    background-color: #fcfcfc; /* Slightly different background */
}

.empty-cart-message .fas.fa-shopping-cart {
    font-size: 60px;
    color: #ccc;
    margin-bottom: 20px;
    animation: bounceIn 0.8s ease-out; /* Added animation */
}

@keyframes bounceIn {
    0% { transform: scale(0.5); opacity: 0; }
    50% { transform: scale(1.1); opacity: 1; }
    100% { transform: scale(1); }
}

.empty-cart-message h2 { /* Added for better message structure */
    font-size: 24px;
    color: #555;
    margin-bottom: 10px;
}

.empty-cart-message p {
    font-size: 18px;
    color: #777;
    margin-bottom: 20px;
}

.empty-cart-message a {
    color: #4CAF50;
    text-decoration: none;
    font-weight: bold;
    padding: 10px 20px;
    background-color: #e8f5e9;
    border-radius: 8px;
    transition: background-color 0.3s ease, transform 0.2s ease;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.empty-cart-message a:hover {
    background-color: #d4edda;
    transform: translateY(-2px);
    text-decoration: none;
}

/* ============================ */
/* FOOTER STYLING */
/* ============================ */
.footer-container {
    background-color: #f8f8f8;
    color: #333;
    padding: 40px 20px;
    font-size: 14px;
    border-top: 1px solid #eee;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* 3 columns for first row */
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
}

.footer-grid-second-row { /* New class for the second row of footer columns */
    grid-column: 1 / -1; /* Span all columns */
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* 3 columns for second row */
    gap: 30px;
    margin-top: 30px; /* Space between rows */
}

.footer-column h3 {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 15px;
    color: #4CAF50;
}

.footer-column ul {
    list-style: none;
    padding: 0;
}

.footer-column ul li {
    margin-bottom: 8px;
    text-decoration: none;
}

.footer-column ul li a {
    color: #333;
    text-decoration: none;
    transition: color 0.2s ease;
}

.footer-column ul li a:hover {
    color: #4CAF50;
}

.footer-column .social-icons a {
    color: #333;
    font-size: 20px;
    margin-right: 15px;
    transition: color 0.2s ease;
}

.footer-column .social-icons a:hover {
    color: #4CAF50;
}

.footer-column p {
    margin-bottom: 8px;
}

.footer-column .contact-info i {
    margin-right: 8px;
    color: #4CAF50;
}

.footer-column .contact-info i {
    margin-right: 8px;
    color: #4CAF50;
}

.footer-column .contact-info a {
    text-decoration: none;
    color: #333;
}

.footer-bottom {
    text-align: center;
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid #eee;
    font-size: 12px;
    color: #777;
}

/* New styles for payment and shipping logos */
.payment-shipping-logos {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
    justify-content: flex-start;
}

.payment-shipping-logos img {
    height: 25px;
    object-fit: contain;
    border-radius: 4px;
}

/* Message Box Styling */
.message-box {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background-color: #4CAF50;
    color: white;
    padding: 15px 25px;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    font-size: 16px;
}

.message-box.show {
    opacity: 1;
    visibility: visible;
}

/* Confirmation Dialog Styling */
.confirmation-dialog {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: #fff;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    z-index: 10001;
    text-align: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    max-width: 90%;
    width: 350px;
}

.confirmation-dialog.show {
    opacity: 1;
    visibility: visible;
}

.confirmation-dialog p {
    font-size: 18px;
    color: #333;
    margin-bottom: 25px;
}

.confirmation-dialog-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
}

.confirmation-dialog-buttons button {
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.confirmation-dialog-buttons .confirm-yes {
    background-color: #4CAF50;
    color: white;
}

.confirmation-dialog-buttons .confirm-yes:hover {
    background-color: #45a049;
}

.confirmation-dialog-buttons .confirm-no {
    background-color: #e0e0e0;
    color: #333;
}

.confirmation-dialog-buttons .confirm-no:hover {
    background-color: #d5d5d5;
}


/* ============================ */
/* LOADING ANIMATION STYLING (Lottie) */
/* ============================ */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.95); /* Slightly transparent white */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    overflow: hidden;
}

.loading-overlay.show {
    opacity: 1;
    visibility: visible;
}

#lottie-animation-container {
    width: 200px; /* Adjust size as needed */
    height: 200px;
    margin-bottom: 20px;
}

.loading-text {
    font-size: 24px;
    font-weight: bold;
    color: #4CAF50;
    animation: pulse 1.5s infinite alternate;
}

@keyframes pulse {
    0% { transform: scale(1); opacity: 1; }
    100% { transform: scale(1.05); opacity: 0.8; }
}

/* ==================================== */
/* RESPONSIVE DESIGN (Media Queries)  */
/* ==================================== */

/* Navbar Responsif */
@media (max-width: 768px) {
    .navbar-container {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: space-between;
        align-items: center;
        padding: 10px 15px;
        gap: 0;
    }
    .navbar-left {
        order: 1;
        flex-grow: 0;
        flex-basis: auto;
    }
    .navbar-right {
        order: 2;
        margin-left: auto;
        flex-grow: 0;
        flex-basis: auto;
    }
    .navbar-center {
        order: 3;
        width: 100%;
        max-width: none;
        margin: 10px 0 0 0;
        flex-grow: 1;
    }
    .navbar-left .logo img {
        height: 35px;
    }
    .navbar-left .logo span {
        font-size: 20px;
    }
    .icon-link {
        font-size: 20px;
    }
    .cart-icon .cart-count {
        font-size: 10px;
        padding: 2px 6px;
        top: -6px;
        right: -8px;
    }

    /* Slider Responsif */
    .slider-wrapper {
        gap: 10px;
    }
    .slider-item {
        flex: 0 0 calc(100% - 5px);
        height: 220px;
    }
    /* Adjusted slider buttons for main banner */
    .slider-btn {
        padding: 6px 10px; /* Smaller padding */
        font-size: 16px; /* Smaller icon font size */
    }
    .prev-btn {
        left: 15px; /* Position further from edge */
    }
    .next-btn {
        right: 15px; /* Position further from edge */
    }
    .pagination {
        bottom: 10px;
        gap: 8px;
    }
    .dot {
        width: 10px;
        height: 10px;
    }

    /* Product Slider Responsif */
    /* On smaller screens, product cards will flow and wrap */
    .product-card {
        flex: 0 0 calc(50% - 10px); /* Two cards per row for tablets */
    }
    .product-slider-wrapper {
        overflow-x: scroll; /* Enable scroll on small screens for sliders */
        padding-bottom: 15px;
    }
    .slider-nav-btn {
        display: none; /* Hide buttons on mobile if scroll is enabled */
    }
    .product-slider-header h2 {
        font-size: 24px;
    }
    .product-slider-header .timer {
        font-size: 16px;
    }

    /* Categories Responsif */
    .category-grid {
        grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); /* Adjust for smaller screens */
    }
    .category-card img {
        height: 120px; /* Adjusted height for category images */
    }
    .category-card-title {
        font-size: 16px; /* Adjusted font size for category title */
    }
    /* New responsive styles for main categories */
    .main-category-header {
        font-size: 18px;
        padding: 12px 15px;
        /* Sesuaikan nilai 'top' untuk layar yang lebih kecil jika navbar berubah tinggi */
        top: 100px; /* Contoh, jika navbar lebih kecil di mobile */
    }
    .main-category-header .category-icon {
        font-size: 20px;
        margin-right: 10px;
    }
    .subcategory-grid {
        grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); /* Adjust for smaller screens */
        padding: 15px;
        gap: 15px;
    }


    /* Product Detail Responsif */
    .product-detail-main {
        flex-direction: column;
        gap: 20px;
    }
    .product-detail-image-gallery, .product-detail-info {
        max-width: 100%;
        min-width: unset;
    }
    .product-detail-main-image {
        height: 300px;
    }
    .product-detail-actions button {
        min-width: unset;
    }

    /* Cart Page Responsif */
    .cart-content {
        flex-direction: column;
    }
    .cart-items-container, .cart-summary {
        min-width: unset;
        width: 100%;
    }

    /* Footer Responsive */
    .footer-grid, .footer-grid-second-row {
        grid-template-columns: 1fr; /* Stack columns on small screens */
        text-align: center;
    }
    .footer-column {
        margin-bottom: 20px;
        text-align: left;
    }
    .payment-shipping-logos {
        justify-content: left; /* Center logos on mobile */
    }
    /* .slider-nav-btn.left {
        left: -5px;
    }

    .slider-nav-btn.right {
        right: -5px;
    } */
}

@media (max-width: 476px) {
    .navbar-left .logo span {
        font-size: 18px;
    }
    .navbar-left .logo img {
        height: 30px;
    }
    .search-bar input[type="text"] {
        font-size: 14px;
        padding: 0 10px;
    }
    .search-bar button {
        padding: 0 10px;
        font-size: 16px;
    }
    .icon-link {
        font-size: 18px;
    }
    .slider-btn {
        font-size: 18px;
    }
    .product-detail-final-price-container .label {
        font-size: 17px;
        font-weight: bold;
        color: #333;
    }

    .product-detail-final-price-container .price {
        font-size: 20px; /* Smaller label for final price */
    }


    /* Product Card adjustments for very small screens */
    .product-card {
        width: 90%; /* Changed from flex: 0 0 100% to a percentage width */
        margin: 0 auto; /* Center the card */
        padding-bottom: 10px; /* Reduced padding-bottom */
    }
    .product-slider-wrapper {
        padding: 0 10px; /* Adjust padding for full width cards */
    }
    .product-card-image-container {
        height: 160px; /* Smaller image height */
    }
    .product-card-content {
        padding: 10px; /* Smaller padding inside the card content */
    }
    .product-card-title {
        font-size: 16px; /* Smaller title for very small screens */
        height: auto; /* Allow title to take natural height */
        -webkit-line-clamp: unset; /* Remove line clamp for smaller titles */
    }
    .product-card-price-old {
        font-size: 12px; /* Slightly smaller old price */
    }
    .product-card-price-new {
        font-size: 18px; /* Slightly smaller price */
    }
    .product-card-button {
        font-size: 14px; /* Smaller button text */
        padding: 6px 12px; /* Smaller button padding */
    }

    /* slider */
    .slider-nav-btn.left {
        left: -4px;
        font-size: 15px;
    }

    .slider-nav-btn.right {
        right: -6px;
        font-size: 15px;
    }


    /* Product Detail adjustments */
    .product-detail-page {
        padding: 20px 10px; /* Reduced padding for the whole page */
        margin: 10px auto; /* Reduced margin */
    }
    .product-detail-info h1 {
        font-size: 24px; /* Smaller heading */
        text-align: left; /* Left align title */
    }
    .product-detail-info .price-section {
        text-align: left; /* Left align price section */
    }
    .product-detail-info .price-section .current-price {
        font-size: 28px; /* Smaller current price */
    }
    .product-detail-actions {
        flex-direction: column;
        align-items: center; /* Center align buttons */
        gap: 10px; /* Reduced gap between buttons */
    }
    .product-detail-actions button {
        min-width: 90%; /* Make buttons take more width */
        font-size: 16px; /* Smaller button text */
        padding: 12px 15px; /* Smaller button padding */
    }
    .product-detail-main-image {
        height: 360px; /* Even smaller main image height */
    }
    .product-detail-thumbnail {
        width: 60px; /* Even smaller thumbnails */
        height: 60px;
    }
    .product-detail-tab-buttons {
        justify-content: center; /* Center align tab buttons */
        flex-wrap: wrap; /* Allow tab buttons to wrap */
        gap: 5px; /* Reduced gap between tab buttons */
    }
    .product-detail-tab-button {
        font-size: 14px; /* Smaller tab button font size */
        padding: 8px 12px; /* Smaller tab button padding */
    }
    .product-detail-tab-content {
        padding: 15px; /* Reduced tab content padding */
        overflow-x: auto; /* Ensure content can scroll if too wide */
    }


    /* Cart Page adjustments */
    .cart-page {
        padding: 20px 10px; /* Reduced padding for the whole page */
        margin: 10px auto; /* Reduced margin */
    }
    .cart-page h1 {
        font-size: 28px; /* Smaller heading */
    }
    .cart-item {
        flex-direction: column; /* Stack items vertically */
        align-items: flex-start; /* Align items to start */
        gap: 10px; /* Reduced gap */
        padding: 15px 0; /* Reduced padding */
    }
    .cart-item-image {
        width: 10px; /* Keep image size reasonable */
        height: 100px;
    }
    .cart-item-details {
        width: 100%; /* Take full width */
        text-align: left; /* Align text to left */
    }
    .cart-item-details h3 {
        font-size: 16px; /* Smaller cart item title */
    }
    .cart-item-details .price {
        font-size: 16px; /* Smaller cart item price */
    }
    .cart-item-actions {
        width: 100%; /* Take full width */
        justify-content: space-between; /* Distribute actions */
        margin-top: 10px; /* Space from details */
    }
    .cart-item-actions .delete-item-btn {
        font-size: 18px; /* Slightly smaller delete button */
    }
    .quantity-control {
        width: auto; /* Allow quantity control to size naturally */
    }
    .quantity-control button {
        padding: 6px 10px; /* Smaller quantity button padding */
    }
    .quantity-control span {
        padding: 6px 12px; /* Smaller quantity span padding */
        font-size: 14px;
    }
    .cart-summary {
        padding: 20px; /* Reduced summary padding */
    }
    .cart-summary h2 {
        font-size: 20px; /* Smaller summary title */
    }
    .cart-summary-row {
        font-size: 14px; /* Smaller summary text */
    }
    .cart-summary-row.total {
        font-size: 18px; /* Smaller total price */
    }
    .cart-summary .checkout-btn {
        font-size: 16px; /* Smaller checkout button */
        padding: 12px;
    }
    .cart-header {
        flex-direction: column; /* Stack header items */
        align-items: flex-start; /* Align header items to start */
        gap: 10px; /* Gap between header items */
    }
    .cart-header .delete-all-btn {
        margin-top: 5px; /* Space below checkbox */
    }
}

/* Category Page Specific Styling */
.category-page-header {
    width: 95%;
    max-width: 1200px;
    margin: 0 auto 25px auto;
    padding: 0 10px;
    text-align: left; /* Align to left */
}
.category-page-header .section-title {
    text-align: left; /* Ensure title is left-aligned */
    margin-bottom: 0; /* Remove bottom margin if needed */
}
.subcategory-grid {
    /* Hapus 'position: sticky;' dari sini. */
    /* Elemen ini adalah konten subkategori yang seharusnya digulirkan, bukan yang menempel. */
    /* Hapus baris di bawah ini: */
    /* position: sticky; */
    display: grid;
    /* Default for smaller screens, will be overridden by media queries */
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    padding: 0 20px; /* Adjusted padding to 0 when closed */
    max-height: 0; /* Initially hidden */
    overflow: hidden;
    transition: max-height 0.5s ease-out, padding 0.5s ease-out;
    background-color: #fdfdfd;
    border-bottom-left-radius: 10px;
    border-bottom-right-radius: 10px;
    box-sizing: border-box; /* Include padding in element's total width and height */
}
