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

:root {
    --primary: #2D5A27;
    --primary-light: #4A8A3F;
    --secondary: #7CB342;
    --accent: #F1F8E9;
    --dark: #111111;
    --text: #2C3E2B;
    --light: #FFFFFF;
    --gray: #F5F5F5;
    --border: #E0E0E0;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    --glass: rgba(255, 255, 255, 0.85);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--light);
    color: var(--text);
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: var(--glass);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    transition: var(--transition);
}

.header.scrolled {
    padding: 10px 0;
    box-shadow: var(--shadow);
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100px;
}

.logo {
    display: flex;
    align-items: center;
    height: 100px;
    overflow: hidden; /* Mencegah warna putih meluber keluar batas header */
}

.logo img {
    height: 220px; /* Diperbesar agar teks terbaca jelas */
    object-fit: contain;
    mix-blend-mode: multiply;
    margin-left: -15px; /* Menyejajarkan logo ke tepi kiri */
}

.nav-links {
    display: flex;
    gap: 30px;
}

.nav-links a {
    font-weight: 500;
    color: var(--dark);
    position: relative;
    padding: 5px 0;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: var(--transition);
}

.nav-links a:hover::after {
    width: 100%;
}

.cart-icon-wrapper {
    position: relative;
    cursor: pointer;
    font-size: 1.5rem;
    color: var(--primary);
}

.cart-count {
    position: absolute;
    top: -8px;
    right: -10px;
    background: var(--secondary);
    color: white;
    font-size: 0.7rem;
    padding: 2px 6px;
    border-radius: 50%;
    font-weight: 700;
}

/* Hero Section */
.hero {
    padding-top: 150px;
    padding-bottom: 80px;
    background: linear-gradient(135deg, #F1F8E9 0%, #FFFFFF 100%);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -10%;
    right: -5%;
    width: 40%;
    height: 50%;
    background: radial-gradient(circle, rgba(124, 179, 66, 0.1) 0%, transparent 70%);
    z-index: 0;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    align-items: center;
    gap: 50px;
}

.hero-content h1 {
    font-size: 4rem;
    font-weight: 700;
    line-height: 1.1;
    color: var(--dark);
    margin-bottom: 20px;
}

.hero-content h1 span {
    color: var(--primary);
}

.hero-content p {
    font-size: 1.2rem;
    color: var(--text);
    margin-bottom: 40px;
    max-width: 500px;
    opacity: 0.8;
}

.hero-btns {
    display: flex;
    gap: 20px;
}

.btn {
    display: inline-block;
    padding: 15px 35px;
    border-radius: 50px;
    font-weight: 600;
    transition: var(--transition);
    cursor: pointer;
    border: none;
    font-size: 1rem;
}

.btn-primary {
    background: var(--primary);
    color: white;
    box-shadow: 0 4px 15px rgba(45, 90, 39, 0.3);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(45, 90, 39, 0.4);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
}

.btn-outline:hover {
    background: var(--primary);
    color: white;
}

.hero-image img {
    border-radius: 30px;
    box-shadow: 20px 20px 60px rgba(0, 0, 0, 0.1);
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
}

/* Image Collage Styles */
.hero-image-collage {
    position: relative;
    width: 100%;
    height: 450px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-image-collage .main-img {
    width: 90%;
    height: 100%;
    object-fit: cover;
    border-radius: 30px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.15);
    z-index: 1;
}

.hero-image-collage .float-img-1 {
    position: absolute;
    bottom: -30px;
    left: -20px;
    width: 220px;
    height: 220px;
    object-fit: cover;
    border-radius: 50%;
    border: 8px solid white;
    box-shadow: 0 15px 35px rgba(0,0,0,0.2);
    z-index: 2;
    animation: float 5s ease-in-out infinite;
}

.hero-image-collage .float-img-2 {
    position: absolute;
    top: -20px;
    right: -20px;
    width: 180px;
    height: 180px;
    object-fit: cover;
    border-radius: 20px;
    border: 8px solid white;
    box-shadow: 0 15px 35px rgba(0,0,0,0.2);
    z-index: 2;
    animation: float 7s ease-in-out infinite reverse;
}



/* Categories Section */
.section {
    padding: 100px 0;
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-header h2 {
    font-size: 2.5rem;
    color: var(--dark);
    margin-bottom: 15px;
}

.section-header p {
    color: var(--text);
    opacity: 0.7;
}

.category-tabs {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.tab-btn {
    padding: 10px 25px;
    border-radius: 30px;
    background: var(--gray);
    color: var(--text);
    border: none;
    cursor: pointer;
    font-weight: 500;
    transition: var(--transition);
}

.tab-btn.active {
    background: var(--primary);
    color: white;
}

/* Product Cards */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
}

.product-card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    border: 1px solid rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.product-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12);
}

.product-img {
    height: 250px;
    position: relative;
    overflow: hidden;
}

.product-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.product-card:hover .product-img img {
    transform: scale(1.1);
}

.product-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    background: var(--secondary);
    color: white;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

.product-content {
    padding: 25px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.product-category {
    font-size: 0.8rem;
    color: var(--secondary);
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 8px;
}

.product-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 10px;
}

.product-price {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 20px;
}

.product-btn {
    margin-top: auto;
    width: 100%;
}

/* Swiper custom styles for product cards */
.product-swiper {
    --swiper-theme-color: var(--primary);
    --swiper-pagination-bullet-inactive-color: #fff;
    --swiper-pagination-bullet-inactive-opacity: 0.7;
}
.swiper-pagination-bullet {
    box-shadow: 0 1px 3px rgba(0,0,0,0.5);
}

/* Cart Sidebar */
.cart-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.cart-overlay.active {
    opacity: 1;
    visibility: visible;
}

.cart-sidebar {
    position: fixed;
    top: 0;
    right: -450px;
    width: 400px;
    height: 100%;
    background: white;
    z-index: 2001;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.1);
}

@media (max-width: 480px) {
    .cart-sidebar {
        width: 100%;
        right: -100%;
    }
}

.cart-sidebar.active {
    right: 0;
}

.cart-header {
    padding: 30px;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cart-header h2 {
    font-size: 1.5rem;
    color: var(--dark);
}

.close-cart {
    cursor: pointer;
    font-size: 1.5rem;
    color: var(--text);
}

.cart-items {
    padding: 20px;
    overflow-y: auto;
    flex-grow: 1;
}

.cart-item {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--gray);
}

.cart-item-img {
    width: 80px;
    height: 80px;
    border-radius: 10px;
    object-fit: cover;
}

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

.cart-item-info h4 {
    font-size: 1rem;
    margin-bottom: 5px;
}

.cart-item-info p {
    color: var(--primary);
    font-weight: 600;
}

.quantity-controls {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 10px;
}

.quantity-controls button {
    width: 25px;
    height: 25px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cart-footer {
    padding: 30px;
    background: var(--gray);
}

.cart-total {
    display: flex;
    justify-content: space-between;
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 20px;
}

.checkout-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.checkout-form input, .checkout-form textarea {
    padding: 12px 15px;
    border-radius: 10px;
    border: 1px solid var(--border);
    font-family: inherit;
}

/* Footer */
.footer {
    background: var(--dark);
    color: white;
    padding: 80px 0 40px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1.5fr;
    gap: 40px;
    margin-bottom: 50px;
}

.footer-col h3 {
    font-size: 1.2rem;
    margin-bottom: 25px;
    color: var(--secondary);
}

.footer-col p {
    opacity: 0.7;
    font-size: 0.9rem;
    margin-bottom: 15px;
}

.social-links {
    display: flex;
    gap: 15px;
}

.social-links a {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.social-links a:hover {
    background: var(--primary);
}

.footer-bottom {
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
    font-size: 0.8rem;
    opacity: 0.5;
}

/* Loading */
.loading-spinner {
    text-align: center;
    padding: 50px;
    display: none;
}

.loading-spinner div {
    width: 40px;
    height: 40px;
    border: 4px solid var(--accent);
    border-top: 4px solid var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 15px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive */
@media (max-width: 992px) {
    .hero-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }
    .hero-content h1 {
        font-size: 3rem;
    }
    .hero-content p {
        margin: 0 auto 40px;
    }
    .hero-btns {
        justify-content: center;
    }
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
    }
    .hero-content h1 {
        font-size: 2.5rem;
    }
}
