:root {
    /* Color Palette */
    --primary: #4F46E5;
    /* Indigo */
    --primary-light: #818CF8;
    --primary-dark: #3730A3;

    /* Affiliate Brand Colors */
    --shopee: #ee4d2d;
    --shopee-hover: #d73d20;
    --ml-yellow: #ffe600;
    --ml-blue: #2d3277;
    --ml-hover: #f0d800;

    /* Neutrals */
    --bg-main: #FAFAFA;
    --bg-light: #F3F4F6;
    --bg-card: #FFFFFF;

    --text-main: #111827;
    --text-muted: #6B7280;
    --border: #E5E7EB;

    /* Typo & Sizing */
    --font-family: 'Outfit', sans-serif;
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-float: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    background-color: var(--bg-main);
    color: var(--text-main);
    line-height: 1.5;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.2s ease;
}

/* Base Classes */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.section {
    padding: 5rem 0;
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-header h2 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--text-main);
}

.section-header p {
    color: var(--text-muted);
    font-size: 1.1rem;
}

.bg-light {
    background-color: var(--bg-light);
}

/* Navbar */
.navbar {
    background-color: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    padding: 1rem 0;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-links a {
    font-weight: 500;
    color: var(--text-muted);
}

.nav-links a:hover {
    color: var(--primary);
}

/* Hero Section */
.hero {
    padding-top: 8rem;
    padding-bottom: 5rem;
    background: linear-gradient(135deg, #fdfbfb 0%, #ebedee 100%);
    overflow: hidden;
}

.hero-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.badge {
    display: inline-block;
    padding: 0.5rem 1rem;
    background-color: rgba(79, 70, 229, 0.1);
    color: var(--primary);
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.875rem;
    margin-bottom: 1.5rem;
}

.hero-content h1 {
    font-size: 4rem;
    line-height: 1.1;
    font-weight: 800;
    margin-bottom: 1.5rem;
}

.hero-content h1 span {
    color: var(--primary);
    position: relative;
    display: inline-block;
}

.hero-content h1 span::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 8px;
    bottom: 8px;
    left: 0;
    background-color: var(--primary-light);
    opacity: 0.3;
    z-index: -1;
}

.hero-content p {
    font-size: 1.25rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
    max-width: 500px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.875rem 1.5rem;
    border-radius: var(--radius-sm);
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1rem;
}

.btn i {
    font-size: 1.25rem;
}

.btn-primary {
    background-color: var(--primary);
    color: white;
    box-shadow: 0 4px 14px 0 rgba(79, 70, 229, 0.39);
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(79, 70, 229, 0.23);
}

.hero-image {
    position: relative;
    display: flex;
    justify-content: center;
}

.glass-card {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: var(--radius-lg);
    padding: 1rem;
    box-shadow: var(--shadow-float);
    max-width: 350px;
    width: 100%;
}

.glass-card img {
    border-radius: var(--radius-md);
    width: 100%;
    height: auto;
    object-fit: contain;
    margin-bottom: 1rem;
}

.glass-card-info {
    text-align: center;
}

.glass-card-info .tag {
    display: inline-block;
    background: var(--primary-light);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.glass-card-info h4 {
    font-size: 1.25rem;
    font-weight: 700;
}

.floating {
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-20px);
    }

    100% {
        transform: translateY(0px);
    }
}

/* Categories Section */
.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1.5rem;
}

.category-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 2rem 1rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-sm);
}

.category-card:hover,
.category-card.active {
    border-color: var(--primary);
    box-shadow: var(--shadow-md);
    transform: translateY(-5px);
}

.category-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    display: block;
}

.category-name {
    font-weight: 600;
    color: var(--text-main);
}

/* Filters */
.filters {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.filter-btn {
    background: transparent;
    border: 1px solid var(--border);
    padding: 0.5rem 1.25rem;
    border-radius: 50px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    color: var(--text-muted);
    font-family: var(--font-family);
    font-size: 0.95rem;
}

.filter-btn:hover,
.filter-btn.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

/* Search Bar */
.search-container {
    max-width: 600px;
    margin: 0 auto 2rem;
    position: relative;
    display: flex;
    align-items: center;
}

.search-container i {
    position: absolute;
    left: 1.25rem;
    font-size: 1.25rem;
    color: var(--text-muted);
}

.search-container input {
    width: 100%;
    padding: 1rem 1rem 1rem 3.5rem;
    border: 1px solid var(--border);
    border-radius: 50px;
    font-size: 1rem;
    font-family: var(--font-family);
    outline: none;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-sm);
    background: var(--bg-card);
}

.search-container input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

/* Subcategory Filters */
.subcategory-filters {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
    animation: fadeIn 0.3s ease;
}

.subcategory-btn {
    background: transparent;
    border: 1px dashed var(--border);
    padding: 0.4rem 1rem;
    border-radius: 50px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    color: var(--text-muted);
    font-family: var(--font-family);
    font-size: 0.85rem;
}

.subcategory-btn:hover,
.subcategory-btn.active {
    background: var(--primary-light);
    color: white;
    border-color: var(--primary-light);
    border-style: solid;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Product Grid */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
}

.product-card {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
    border: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.product-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-8px);
}

.product-img-wrapper {
    position: relative;
    padding-top: 100%;
    /* 1:1 Aspect Ratio */
    overflow: hidden;
    background-color: #f8f9fa;
}

.product-card img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

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

.product-content {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.product-title {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-price {
    margin-bottom: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}

.price-main {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-main);
}

.price-old {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-muted);
}

.sales-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: #ff4757;
    color: white;
    padding: 5px 10px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 700;
    z-index: 2;
    box-shadow: 0 4px 6px rgba(0,0,0,0.15);
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.views-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.65);
    color: white;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    z-index: 2;
    backdrop-filter: blur(4px);
    transition: all 0.3s ease;
}

.product-stats {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    font-weight: 600;
}

.product-actions {
    margin-top: auto;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

/* Affiliate Buttons */
.btn-shopee {
    background-color: var(--shopee);
    color: white;
}

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

.btn-ml {
    background-color: var(--ml-yellow);
    color: var(--ml-blue);
}

.btn-ml:hover {
    background-color: var(--ml-hover);
}

.store-icon {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 0.75rem;
}

.btn-ml .store-icon {
    background: rgba(0, 0, 0, 0.1);
}

/* Footer */
.footer {
    background-color: var(--text-main);
    color: white;
    padding: 4rem 0 2rem;
    margin-top: 4rem;
}

.footer-container {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-brand .logo {
    color: white;
    margin-bottom: 1rem;
}

.footer-brand p {
    color: #9ca3af;
    max-width: 300px;
}

.footer h3 {
    font-size: 1.125rem;
    margin-bottom: 1.5rem;
    font-weight: 600;
}

.footer-links ul {
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.75rem;
}

.footer-links a {
    color: #9ca3af;
}

.footer-links a:hover {
    color: white;
}

.social-icons {
    display: flex;
    gap: 1rem;
}

.social-icons a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.1);
    color: white;
    font-size: 1.25rem;
    transition: all 0.3s ease;
}

.social-icons a:hover {
    background-color: var(--primary);
    transform: translateY(-3px);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: #9ca3af;
    font-size: 0.875rem;
}

/* Responsiveness */
@media (max-width: 900px) {
    .hero-container {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-content h1 {
        font-size: 3rem;
    }

    .hero-content p {
        margin: 0 auto 2rem;
    }

    .hero-image {
        display: none;
        /* Hide floating card on mobile for cleaner look */
    }

    .footer-container {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .footer-brand p,
    .social-icons {
        margin: 0 auto;
        justify-content: center;
    }
}

@media (max-width: 600px) {
    .nav-links {
        display: none;
    }

    .section {
        padding: 3rem 0;
    }

    .hero-content h1 {
        font-size: 2.5rem;
    }

    .product-grid {
        grid-template-columns: 1fr;
    }
}