/* ============================================
   CSS Variables & Base Styles
   ============================================ */
:root {
    --primary-color: #42b549;
    --secondary-color: #ff5722;
    --text-dark: #2d3436;
    --text-gray: #636e72;
    --bg-light: #f8f9fa;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #fff;
}

/* ============================================
   Header Styles
   ============================================ */
.header-top {
    background-color: var(--primary-color);
    color: white;
    padding: 8px 0;
    font-size: 13px;
}

.main-header {
    background-color: white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.search-box {
    position: relative;
}

.search-box input {
    border-radius: 20px;
    border: 2px solid var(--primary-color);
    padding: 10px 50px 10px 20px;
}

.search-box button {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    border: none;
    background: var(--primary-color);
    color: white;
    border-radius: 20px;
    padding: 8px 20px;
}

/* New Search Box Design */
.search-box-new {
    position: relative;
    display: flex;
    align-items: center;
}

.search-box-new .search-icon {
    position: absolute;
    left: 15px;
    color: #999;
    font-size: 18px;
    z-index: 1;
}

.search-box-new input {
    width: 100%;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 10px 15px 10px 45px;
    font-size: 14px;
    transition: all 0.3s ease;
}

.search-box-new input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(66, 181, 73, 0.1);
}

/* Category Menu */
.category-menu-wrapper {
    position: relative;
}

.btn-category {
    background: none;
    border: none;
    color: var(--text-dark);
    font-size: 14px;
    font-weight: 500;
    padding: 8px 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 5px;
}

.btn-category:hover {
    color: var(--primary-color);
}

.category-dropdown {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border-radius: 0;
    display: none;
    z-index: 9999;
    margin-top: 0;
    width: 100%;
    max-height: calc(100vh - 150px);
    overflow: hidden;
    border-top: 1px solid #e0e0e0;
    /* Posisi akan diatur oleh JavaScript untuk konsistensi */
}

.category-menu-wrapper:hover .category-dropdown,
.category-dropdown:hover {
    display: flex !important;
}

.category-menu-wrapper {
    position: static;
}

.category-sidebar {
    width: 280px;
    background: white;
    color: #2d3436;
    max-height: calc(100vh - 150px);
    overflow-y: auto;
    padding: 0;
    flex-shrink: 0;
    border-right: 1px solid #e0e0e0;
}

.category-item {
    display: block;
    padding: 14px 20px;
    color: #2d3436;
    text-decoration: none;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
    cursor: pointer;
    font-size: 14px;
}

.category-item:hover,
.category-item.active {
    background: #f8f9fa;
    border-left-color: var(--primary-color);
    color: #2d3436;
}

.category-content {
    flex: 1;
    padding: 30px;
    max-height: calc(100vh - 150px);
    overflow-y: auto;
    background: #f8f9fa;
}

.category-content-inner {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
}

.category-subcategory {
    margin-bottom: 0;
}

.category-subcategory h6 {
    font-weight: 600;
    margin-bottom: 15px;
    color: #2d3436;
    font-size: 15px;
    padding-bottom: 8px;
    border-bottom: 2px solid #e0e0e0;
}

.category-subcategory ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.category-subcategory ul li {
    margin-bottom: 10px;
}

.category-subcategory ul li a {
    color: #495057;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s ease;
    display: block;
    padding: 4px 0;
}

.category-subcategory ul li a:hover {
    color: var(--primary-color);
    padding-left: 15px;
}

.cart-icon {
    position: relative;
    font-size: 24px;
    color: var(--text-dark);
}

.cart-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background: var(--secondary-color);
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* User Dropdown */
.dropdown {
    position: relative;
}

.dropdown-toggle {
    cursor: pointer;
    transition: all 0.3s;
    font-size: inherit;
}

.dropdown-toggle:hover {
    color: var(--primary-color) !important;
}

.dropdown-toggle::after {
    margin-left: 5px;
    vertical-align: 0.2em;
}

.dropdown-menu {
    border: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border-radius: 8px;
    padding: 8px 0;
    margin-top: 8px;
    min-width: 200px;
}

.dropdown .btn-link {
    text-decoration: none;
}

.dropdown .btn-link:focus {
    box-shadow: none;
    outline: none;
}

.dropdown-item {
    padding: 10px 20px;
    transition: all 0.2s;
    display: flex;
    align-items: center;
}

.dropdown-item:hover {
    background-color: var(--bg-light);
    color: var(--primary-color);
}

.dropdown-item i {
    width: 20px;
}

.dropdown-item.text-danger:hover {
    background-color: #fee;
    color: #dc3545 !important;
}

.dropdown-divider {
    margin: 8px 0;
}

/* ============================================
   Carousel Styles
   ============================================ */
.carousel-section {
    margin: 20px 0;
    padding: 0;
    width: 100vw;
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
}

#carouselBanner {
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
}

.carousel-inner {
    width: 100%;
}

.carousel-control-prev,
.carousel-control-next {
    z-index: 10;
    width: 50px !important;
    height: 50px !important;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(0, 0, 0, 0.3) !important;
    border-radius: 50% !important;
    opacity: 0.8;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    border: none !important;
    padding: 0 !important;
    margin: 0 !important;
    transition: all 0.3s ease;
    pointer-events: auto;
    cursor: pointer;
}

/* Hide controls if only one carousel item */
#carouselBanner:has(.carousel-item:only-child) .carousel-control-prev,
#carouselBanner:has(.carousel-item:only-child) .carousel-control-next,
#carouselBanner:has(.carousel-item:only-child) .carousel-indicators {
    display: none !important;
}

.carousel-control-prev:hover,
.carousel-control-next:hover {
    opacity: 1 !important;
    background-color: rgba(0, 0, 0, 0.5) !important;
}

.carousel-control-prev {
    left: 20px;
}

.carousel-control-next {
    right: 20px;
}

.carousel-control-prev-icon,
.carousel-control-next-icon {
    width: 20px !important;
    height: 20px !important;
    background-size: 20px 20px !important;
    filter: brightness(0) invert(1);
}

.carousel-indicators {
    margin-bottom: 1rem;
    z-index: 10;
}

.carousel-indicators button {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.5);
    border: none;
    margin: 0 5px;
    cursor: pointer;
}

.carousel-indicators button.active {
    background-color: rgba(255, 255, 255, 1);
}

.carousel-item {
    position: relative;
    width: 100%;
    padding-bottom: 25%;
    overflow: hidden;
    touch-action: pan-y;
}

.carousel-item img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    pointer-events: none;
}

.carousel-item a {
    display: block;
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1;
}

/* ============================================
   Category Styles
   ============================================ */
.category-section {
    background-color: white;
    padding: 20px 0;
    margin: 20px 0;
}

.category-scroll-container {
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: #ddd transparent;
    padding: 10px 0;
}

.category-scroll-container::-webkit-scrollbar {
    height: 6px;
}

.category-scroll-container::-webkit-scrollbar-track {
    background: transparent;
}

.category-scroll-container::-webkit-scrollbar-thumb {
    background: #ddd;
    border-radius: 3px;
}

.category-list {
    display: flex;
    gap: 12px;
    min-width: max-content;
    padding: 0 15px;
}

.category-card {
    text-align: center;
    padding: 12px 16px;
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    transition: all 0.3s;
    cursor: pointer;
    text-decoration: none;
    color: var(--text-dark);
    min-width: 110px;
    max-width: 110px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.category-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    border-color: var(--primary-color);
    color: var(--primary-color);
    text-decoration: none;
}

.category-icon {
    font-size: 32px;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    overflow: hidden;
    border-radius: 8px;
}

.category-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
}

.category-name {
    font-size: 12px;
    font-weight: 500;
    line-height: 1.3;
    text-align: center;
    word-wrap: break-word;
}

/* Category Sidebar */
.category-sidebar {
    background: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    margin-bottom: 30px;
}

.category-sidebar h5 {
    color: var(--text-dark);
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--primary-color);
}

.category-sidebar .category-item {
    padding: 10px 0;
    border-bottom: 1px solid #eee;
}

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

.category-sidebar .category-checkbox {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    margin: 0;
}

.category-sidebar .category-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--primary-color);
}

.category-sidebar .category-checkbox label {
    margin: 0;
    cursor: pointer;
    flex: 1;
    color: var(--text-dark);
}

.category-sidebar .category-checkbox:hover label {
    color: var(--primary-color);
}

.category-sidebar .category-checkbox input[type="checkbox"]:checked + label {
    color: var(--primary-color);
    font-weight: bold;
}

.category-sidebar .category-child {
    padding-left: 30px;
}

.category-sidebar .filter-btn {
    margin-top: 15px;
    width: 100%;
}

/* ============================================
   Product Styles
   ============================================ */
.product-card {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
    cursor: pointer;
    text-decoration: none;
    color: var(--text-dark);
    height: 100%;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
    text-decoration: none;
    color: var(--text-dark);
}

.product-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.product-image-default {
    width: 100%;
    height: 200px;
    background: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-image-default svg {
    width: 100%;
    height: 100%;
}

.product-image-default-main {
    width: 100%;
    height: 500px;
    background: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-image-default-main svg {
    width: 100%;
    height: 100%;
}

.product-image-default-thumb {
    width: 100%;
    height: 100px;
    background: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-image-default-thumb svg {
    width: 100%;
    height: 100%;
}

/* Featured Products Scroll */
.featured-products-scroll {
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: #ddd transparent;
    padding: 10px 0;
}

.featured-products-scroll::-webkit-scrollbar {
    height: 6px;
}

.featured-products-scroll::-webkit-scrollbar-track {
    background: transparent;
}

.featured-products-scroll::-webkit-scrollbar-thumb {
    background: #ddd;
    border-radius: 3px;
}

.featured-products-list {
    display: flex;
    gap: 16px;
    min-width: max-content;
    padding: 0 15px;
}

.featured-product-item {
    flex: 0 0 220px;
    min-width: 220px;
    max-width: 220px;
}

.view-all-card {
    background: linear-gradient(135deg, var(--primary-color) 0%, #35a03c 100%);
    color: white;
    border: none;
}

.view-all-card:hover {
    color: white;
    transform: translateY(-5px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
}

.view-all-card i {
    color: white !important;
}

.view-all-card h5,
.view-all-card p {
    color: white !important;
}

.product-price {
    color: var(--secondary-color);
    font-weight: bold;
    font-size: 18px;
}

.product-best-price {
    color: var(--text-gray);
    font-size: 14px;
    text-decoration: line-through;
}

.product-discount {
    background: var(--secondary-color);
    color: white;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 12px;
}

/* Product Image Wrapper for Badge Positioning */
.product-image-wrapper {
    position: relative;
    overflow: hidden;
}

/* Discount Badge on Image (Top Left) */
.product-discount-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: var(--secondary-color);
    color: white;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 700;
    z-index: 10;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* ============================================
   Product Responsive (Mobile)
   ============================================ */
@media (max-width: 767.98px) {
    .product-image {
        height: 150px;
    }

    .product-card .p-3 {
        padding: 10px !important;
    }

    .product-card h6 {
        font-size: 13px;
        min-height: 34px;
    }

    .product-price {
        font-size: 15px;
    }

    .product-best-price {
        font-size: 12px;
    }

    .product-discount {
        font-size: 11px;
        padding: 1px 6px;
    }

    .product-discount-badge {
        font-size: 12px;
        padding: 4px 8px;
        top: 8px;
        left: 8px;
    }

    .product-card .text-muted.small {
        font-size: 11px;
    }
}

/* Product Detail */
.product-detail-section {
    padding: 20px 0;
}

.product-image-main {
    width: 100%;
    height: 500px;
    object-fit: contain;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
    background: #f8f9fa;
}

.product-image-thumb {
    width: 100%;
    height: 100px;
    object-fit: cover;
    border-radius: 4px;
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.3s;
}

.product-image-thumb:hover,
.product-image-thumb.active {
    border-color: var(--primary-color);
}

.variant-option {
    margin-bottom: 20px;
}

.variant-option label {
    font-weight: 600;
    margin-bottom: 10px;
    display: block;
    color: var(--text-dark);
}

.variant-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.variant-btn {
    padding: 8px 16px;
    border: 2px solid #e0e0e0;
    background: white;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 14px;
}

.variant-btn:hover {
    border-color: var(--primary-color);
}

.variant-btn.selected {
    border-color: var(--primary-color);
    background: #e8f5e9;
    color: var(--primary-color);
    font-weight: 600;
}

.quantity-selector {
    display: flex;
    align-items: center;
    gap: 10px;
}

.quantity-btn {
    width: 35px;
    height: 35px;
    border: 1px solid #e0e0e0;
    background: white;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 18px;
}

.quantity-btn:hover {
    background: var(--bg-light);
}

.quantity-input {
    width: 60px;
    text-align: center;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    padding: 6px;
    font-size: 16px;
}

.checkout-card {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
    position: sticky;
    top: 100px;
}

.nav-tabs .nav-link {
    border: none;
    color: var(--text-gray);
}

.nav-tabs .nav-link.active {
    color: var(--primary-color);
    border-bottom: 2px solid var(--primary-color);
    background: transparent;
}

/* ============================================
   Cart Styles
   ============================================ */
.cart-header {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 15px 20px;
    margin-bottom: 15px;
}

.cart-item {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 15px 20px;
    margin-bottom: 15px;
}

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

.cart-item-image-default {
    width: 80px;
    height: 80px;
    background: #f0f0f0;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ccc;
}

.product-image-default-cart {
    width: 100%;
    height: 100%;
    color: #ccc;
}

.discount-badge {
    position: absolute;
    top: 5px;
    left: 5px;
    background: var(--secondary-color);
    color: white;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: bold;
}

.quantity-control {
    display: flex;
    align-items: center;
    gap: 5px;
}

.quantity-control .quantity-btn {
    width: 28px;
    height: 28px;
    border: 1px solid #e0e0e0;
    background: white;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 14px;
}

.quantity-control .quantity-btn:hover {
    background: var(--bg-light);
    border-color: var(--primary-color);
}

.quantity-control .quantity-input {
    width: 50px;
    text-align: center;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    padding: 4px;
    font-size: 14px;
}

.action-icons {
    display: flex;
    gap: 15px;
    align-items: center;
}

.action-icons a {
    color: var(--text-gray);
    font-size: 18px;
    text-decoration: none;
}

.action-icons a:hover {
    color: var(--secondary-color);
}

.summary-card {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
    position: sticky;
    top: 100px;
}

.promo-banner {
    background: #e8f5e9;
    border: 1px solid var(--primary-color);
    border-radius: 8px;
    padding: 15px;
    margin: 20px 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.promo-banner i {
    font-size: 24px;
    color: #ffc107;
}

/* ============================================
   Breadcrumb Styles
   ============================================ */
.breadcrumb-section {
    background-color: var(--bg-light);
    padding: 15px 0;
}

.breadcrumb {
    margin: 0;
    background: transparent;
}

.breadcrumb-item a {
    color: var(--primary-color);
    text-decoration: none;
}

/* Category Title */
.category-title-section {
    padding: 30px 0;
    background-color: white;
}

/* ============================================
   Profile Styles
   ============================================ */
body.profile-page {
    background-color: #f5f5f5;
    min-height: 100vh;
}

.profile-container {
    max-width: 900px;
    margin: 0 auto;
}

.profile-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, #35a03d 100%);
    color: white;
    padding: 40px 30px;
    border-radius: 15px 15px 0 0;
    text-align: center;
}

.profile-avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 48px;
    color: var(--primary-color);
    border: 5px solid rgba(255, 255, 255, 0.3);
}

.profile-card {
    background: white;
    border-radius: 15px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    margin-bottom: 30px;
}

.profile-body {
    padding: 30px;
}

.form-section {
    margin-bottom: 30px;
}

.form-section-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--bg-light);
    display: flex;
    align-items: center;
    gap: 10px;
}

.form-section-title i {
    color: var(--primary-color);
}

.form-label {
    font-weight: 500;
    color: var(--text-dark);
    margin-bottom: 8px;
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(66, 181, 73, 0.25);
}

.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    padding: 10px 30px;
    font-weight: 500;
    transition: all 0.3s;
}

.btn-primary:hover {
    background-color: #35a03d;
    border-color: #35a03d;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(66, 181, 73, 0.3);
}

.btn-outline-secondary {
    border-color: #dee2e6;
    color: var(--text-gray);
}

.btn-outline-secondary:hover {
    background-color: var(--bg-light);
    border-color: #dee2e6;
    color: var(--text-dark);
}

.alert {
    border-radius: 10px;
    border: none;
}

.password-toggle {
    position: relative;
}

.password-toggle-btn {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-gray);
    cursor: pointer;
    padding: 5px;
}

.password-toggle-btn:hover {
    color: var(--primary-color);
}

.info-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 12px;
    background: var(--bg-light);
    border-radius: 20px;
    font-size: 13px;
    color: var(--text-gray);
    margin-top: 5px;
}

/* ============================================
   Add Ons Styles
   ============================================ */
.add-ons-section {
    margin-top: 20px;
}

.add-on-item {
    background: #f8f9fa;
    transition: all 0.3s ease;
}

.add-on-item:hover {
    background: #e9ecef;
    border-color: var(--primary-color) !important;
}

.add-on-item input[type="checkbox"]:checked ~ label {
    color: var(--primary-color);
}

.add-on-item:has(input[type="checkbox"]:checked) {
    background: #e8f5e9;
    border-color: var(--primary-color) !important;
}

/* ============================================
   Footer Styles
   ============================================ */
.footer {
    background-color: var(--text-dark);
    color: white;
    padding: 40px 0 20px;
    margin-top: 50px;
}

/* ============================================
   Header User Avatar
   ============================================ */
.user-avatar-circle {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--primary-color);
    color: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.user-name-text {
    font-weight: 500;
    color: var(--text-dark);
}

/* ============================================
   Header Responsive (Mobile)
   ============================================ */
@media (max-width: 767.98px) {
    /* Header top: di-hide agar ruang lebih lega */
    .header-top {
        display: none;
    }

    /* Beri jarak sedikit dari atas layar */
    .main-header {
        padding-top: 10px;
    }

    .header-top .row > div {
        text-align: center !important;
        margin-bottom: 2px;
    }

    /* Main header: susun ulang supaya mirip aplikasi e-commerce */
    .main-header .container {
        padding-top: 8px !important;
        padding-bottom: 8px !important;
    }

    .main-header .row {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
    }

    /* Logo & user/cart di baris pertama */
    .main-header .col-md-2,
    .main-header .col-md-4 {
        flex: 0 0 50%;
        max-width: 50%;
    }

    .main-header .col-md-2 {
        order: 1;
        display: flex;
        align-items: center;
    }

    /* Perkecil logo di mobile */
    .main-header .col-md-2 img {
        max-height: 36px !important;
    }

    .main-header .col-md-4 {
        order: 2;
        display: flex;
        justify-content: flex-end;
        margin-top: 0;
    }

    /* Search full width, kategori disembunyikan di mobile */
    .main-header .col-md-5 {
        flex: 0 0 100%;
        max-width: 100%;
    }

    .main-header .col-md-1 {
        display: none;
    }

    .main-header .col-md-5 {
        order: 3;
        margin-top: 6px;
    }

    .search-box-new {
        width: 100%;
    }

    .search-box-new input {
        font-size: 13px;
        padding-top: 9px;
        padding-bottom: 9px;
    }

    /* Perkecil sedikit jarak antar icon di kanan */
    .main-header .d-flex.align-items-center.justify-content-end.gap-4 {
        gap: 12px;
    }

    .cart-icon {
        font-size: 22px;
    }

    /* Di mobile, hanya tampilkan avatar bulat tanpa nama */
    .user-name-text {
        display: none;
    }

    .user-avatar-circle {
        width: 32px;
        height: 32px;
        font-size: 16px;
    }

    /* Dropdown kategori jangan terlalu tinggi di mobile */
    .category-dropdown {
        top: 120px;
        max-height: calc(100vh - 160px);
    }
}

