/* Reset dan Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Outfit", -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: #333;
    line-height: 1.6;
    font-weight: 300;
}

/* Font Classes */
.italiana-regular {
    font-family: "Italiana", sans-serif;
    font-weight: 400;
    font-style: normal;
}

/* Header Styles */
header {
    background-color: #ffffff;
    border-bottom: 1px solid #eee;
    padding: 0 40px;
    width: 100%;
}

nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 70px;
    width: 100%;
}

/* Logo */
.logo {
    flex-shrink: 0;
}

.logo a {
    display: flex;
    align-items: center;
    text-decoration: none;
    font-family: "Italiana", serif;
    font-weight: 400;
}

.logo img {
    height: 40px;
    width: auto;
}

/* Hamburger Menu - Hidden by default */
.hamburger-menu {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    z-index: 100;
}

.hamburger-line {
    display: block;
    width: 25px;
    height: 2px;
    background-color: #333;
    margin: 5px 0;
    transition: all 0.3s ease;
}

/* Right Navigation Group */
.nav-right {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-left: auto;
}

/* Navigation Menu */
.nav-menu {
    display: flex;
    list-style: none;
    gap: 25px;
    align-items: center;
    margin: 0;
    padding: 0;
    margin-left: auto;
    padding-right: 50px;
}

.nav-menu li a {
    color: #333;
    text-decoration: none;
    font-size: 18px;
    font-weight: bold;
    font-family: "Italiana", sans-serif;
    letter-spacing: 0.5px;
    transition: color 0.3s ease;
}

.nav-menu li a:hover {
    color: #000;
    opacity: 0.9;
}

/* Cart Icon */
.cart-icon {
    position: relative;
}

.cart-icon a {
    display: flex;
    align-items: center;
    color: #333;
    text-decoration: none;
    position: relative;
}

.cart-icon svg {
    width: 24px;
    height: 24px;
    transition: all 0.3s ease;
}

.cart-icon a:hover svg {
    opacity: 0.7;
    transform: translateY(-1px);
}

.cart-count {
    position: absolute;
    top: -8px;
    right: -8px;
    background-color: #333;
    color: #fff;
    font-size: 12px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 400;
    font-family: "Outfit", sans-serif;
}

/* Media Query untuk Desktop Besar */
@media screen and (min-width: 1200px) {
    header {
        padding: 0 60px;
    }
}

/* Media Query untuk Tablet dan Mobile */
@media screen and (max-width: 768px) {
    header {
        padding: 0 20px;
    }
    
    nav {
        height: 60px;
    }
    
    /* Show Hamburger Menu */
    .hamburger-menu {
        display: block;
        margin-left: auto;
    }
    
    /* Hide right navigation group */
    .nav-right {
        position: fixed;
        top: 60px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 60px);
        background-color: #fff;
        flex-direction: column;
        padding-top: 50px;
        transition: left 0.3s ease;
        box-shadow: 2px 0 5px rgba(0,0,0,0.1);
    }
    
    /* Nav menu in mobile */
    .nav-menu {
        flex-direction: column;
        gap: 25px;
        align-items: center;
    }
    
    /* Cart icon in mobile */
    .cart-icon {
        display: flex;
        justify-content: center;
    }
    
    /* Active state */
    .nav-right.active {
        left: 0;
    }
    
    .nav-menu li a {
        font-size: 17px;
        font-weight: 400;
        letter-spacing: 0.5px;
        font-family: "Italiana", sans-serif;
    }
    
    /* Hamburger Animation */
    .hamburger-menu.active .hamburger-line:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }
    
    .hamburger-menu.active .hamburger-line:nth-child(2) {
        opacity: 0;
    }
    
    .hamburger-menu.active .hamburger-line:nth-child(3) {
        transform: rotate(-45deg) translate(5px, -5px);
    }
}

/* Media Query untuk Mobile Kecil */
@media screen and (max-width: 480px) {
    header {
        padding: 0 15px;
    }
    
    .logo img {
        height: 20px;
    }
    
    nav {
        height: 55px;
    }
    
    .nav-right {
        top: 55px;
        height: calc(100vh - 55px);
    }
    
    .cart-icon svg {
        width: 22px;
        height: 22px;
    }
    
    .cart-count {
        width: 18px;
        height: 18px;
        font-size: 11px;
        top: -6px;
        right: -6px;
    }
}

/* Mobile Controls Group */
.mobile-controls {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-left: auto;
}

/* Update untuk desktop - sembunyikan mobile-controls */
@media screen and (min-width: 769px) {
    .mobile-controls {
        display: contents; /* Membuat container transparan di desktop */
    }
    
    /* Atur ulang posisi cart di desktop */
    .cart-icon {
        order: 2; /* Cart di paling kanan */
    }
    
    .hamburger-menu {
        display: none;
    }
    
    .nav-right {
        order: 1; /* Menu di tengah */
    }
}

/* Update CSS mobile */
@media screen and (max-width: 768px) {
    /* Mobile controls tetap terlihat */
    .mobile-controls {
        display: flex;
        align-items: center;
        gap: 10px;
    }
    
    /* Cart icon di mobile tetap terlihat */
    .cart-icon {
        position: relative;
        display: block !important;
    }
    
    /* Nav menu only (tanpa cart) */
    .nav-right {
        position: fixed;
        top: 60px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 60px);
        background-color: #fff;
        display: flex;
        justify-content: center;
        align-items: flex-start;
        padding-top: 50px;
        transition: left 0.3s ease;
        box-shadow: 2px 0 5px rgba(0,0,0,0.1);
    }
    
    /* Remove cart-icon styles from nav-right in mobile */
    .nav-right .cart-icon {
        display: none;
    }
}

/* Update bagian mobile nav-right */
@media screen and (max-width: 768px) {
    .nav-right {
        position: fixed;
        top: 54px;
        left: 0;
        width: 100%;
        height: 200px;
        background-color: #fff;
        display: flex;
        justify-content: center;
        align-items: flex-start;
        padding-top: 50px;
        box-shadow: 0 2px 10px rgba(0,0,0,0.1);
        
        /* Animasi properties */
        opacity: 0;
        visibility: hidden;
        transform: translateY(-20px);
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        box-shadow: rgba(100, 100, 111, 0.2) 0px 7px 29px 0px;
        border-radius: 0px 0px 20px 20px;
    }
    
    /* Active state dengan animasi */
    .nav-right.active {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
        padding: 0;
        z-index: 99;
    }
    
    /* Animasi untuk setiap menu item */
    .nav-menu li {
        opacity: 0;
        transform: translateY(-10px);
        transition: all 0.3s ease;
    }
    
    .nav-right.active .nav-menu li {
        opacity: 1;
        transform: translateY(0);
    }
    
    /* Delay untuk efek cascade */
    .nav-right.active .nav-menu li:nth-child(1) {
        transition-delay: 0.1s;
    }
    
    .nav-right.active .nav-menu li:nth-child(2) {
        transition-delay: 0.15s;
    }
    
    /* Optional: Background overlay */
    .nav-right::before {
        content: '';
        position: fixed;
        top: 60px;
        left: 0;
        width: 100%;
        background: white;
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
        z-index: -1;
    }
    
    .nav-right.active::before {
        opacity: 1;
        visibility: visible;
    }
}

/* Update Cart Icon - Green theme */
.cart-icon {
    position: relative;
}

.cart-icon a {
    display: flex;
    align-items: center;
    color: #4a5d4a; /* Green color */
    text-decoration: none;
    position: relative;
    padding: 8px;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.cart-icon a:hover {
    background-color: rgba(74, 93, 74, 0.1);
}

.cart-icon svg {
    width: 22px;
    height: 22px;
    transition: all 0.3s ease;
    stroke: #4a5d4a;
}

.cart-count {
    position: absolute;
    top: 0;
    right: 0;
    background-color: #4a5d4a;
    color: #fff;
    font-size: 11px;
    min-width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 500;
    font-family: "Outfit", sans-serif;
}

/* Cart Dropdown */
.cart-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: 360px;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.12);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1000;
    max-height: 480px;
    display: flex;
    flex-direction: column;
}

.cart-dropdown.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Cart Header */
.cart-header {
    padding: 20px;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cart-header h3 {
    font-size: 18px;
    font-weight: 600;
    margin: 0;
    color: #2c3e2c;
}

.close-cart {
    background: none;
    border: none;
    font-size: 20px;
    color: #999;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.close-cart:hover {
    background: #f5f5f5;
    color: #333;
}

/* Cart Items */
.cart-items {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    max-height: 280px;
}

.cart-items::-webkit-scrollbar {
    width: 4px;
}

.cart-items::-webkit-scrollbar-track {
    background: #f0f0f0;
    border-radius: 2px;
}

.cart-items::-webkit-scrollbar-thumb {
    background: #ddd;
    border-radius: 2px;
}

.cart-empty {
    text-align: center;
    padding: 40px 20px;
    color: #999;
}

/* Cart Item */
.cart-item {
    display: flex;
    gap: 12px;
    padding: 12px;
    background: #fafafa;
    border-radius: 12px;
    margin-bottom: 12px;
}

.cart-item-info {
    flex: 1;
}

.cart-item-name {
    font-size: 14px;
    font-weight: 500;
    color: #333;
    margin-bottom: 4px;
}

.cart-item-price {
    font-size: 16px;
    font-weight: 600;
    color: #4a5d4a;
}

/* Quantity Controls */
.quantity-controls {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #fff;
    border-radius: 8px;
    padding: 4px;
    border: 1px solid #e0e0e0;
}

.quantity-btn {
    width: 28px;
    height: 28px;
    border: none;
    background: none;
    color: #4a5d4a;
    cursor: pointer;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    transition: all 0.2s ease;
}

.quantity-btn:hover {
    background: #f0f0f0;
}

.quantity-btn:active {
    transform: scale(0.95);
}

.quantity-value {
    min-width: 30px;
    text-align: center;
    font-size: 14px;
    font-weight: 500;
    color: #333;
}

/* Remove Item Button */
.remove-item {
    position: absolute;
    top: 8px;
    right: 8px;
    background: none;
    border: none;
    color: #999;
    cursor: pointer;
    font-size: 14px;
    padding: 4px;
    opacity: 0;
    transition: all 0.2s ease;
}

.cart-item {
    position: relative;
}

.cart-item:hover .remove-item {
    opacity: 1;
}

.remove-item:hover {
    color: #c67e61;
}

/* Cart Footer */
.cart-footer {
    padding: 20px;
    border-top: 1px solid #f0f0f0;
}

.cart-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    font-size: 18px;
}

.cart-total span:first-child {
    color: #666;
}

.total-price {
    font-weight: 700;
    color: #2c3e2c;
}

.checkout-btn {
    width: 100%;
    padding: 14px 24px;
    background: #4a5d4a;
    color: #fff;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.checkout-btn:hover {
    background: #3d4f3d;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(74, 93, 74, 0.3);
}

/* Mobile Responsive */
@media (max-width: 480px) {
    .cart-dropdown {
        width: 320px;
        right: -10px;
    }
    
    .cart-header {
        padding: 16px;
    }
    
    .cart-items {
        padding: 12px;
    }
}

/* Prevent body scroll when cart open on mobile */
body.cart-open {
    overflow: hidden;
}


