/* ==========================================================================
   CSS Variables & Resets
   ========================================================================== */
   :root {
    --primary-color: #111111;
    --secondary-color: #f7f7f7;
    --accent-color: #ff3366;
    --text-main: #333333;
    --text-light: #666666;
    --bg-light: #f9f9f9;
    --white: #ffffff;
    --border-color: #ececec;
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 15px rgba(0,0,0,0.08);
    --shadow-lg: 0 10px 25px rgba(0,0,0,0.1);
    --transition: all 0.3s ease;
    --container-width: 1200px;
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: var(--text-main);
    line-height: 1.6;
    background-color: var(--white);
    -webkit-font-smoothing: antialiased;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--text-light);
}

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

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
}

.section-padding {
    padding: 60px 0;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.section-header.center {
    justify-content: center;
    flex-direction: column;
}

.section-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary-color);
}

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

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn {
    display: inline-block;
    padding: 12px 28px;
    font-weight: 600;
    border-radius: 4px;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    border: none;
}

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

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

.view-all {
    display: flex;
    align-items: center;
    font-weight: 600;
    font-size: 0.95rem;
}

.view-all svg {
    margin-left: 5px;
}

/* ==========================================================================
   Top Bar & Header
   ========================================================================== */
.top-bar {
    background-color: var(--primary-color);
    color: var(--white);
    font-size: 0.85rem;
    padding: 8px 0;
}

.top-bar-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.top-bar .social-links a {
    color: var(--white);
    margin-left: 15px;
    opacity: 0.8;
}

.top-bar .social-links a:hover {
    opacity: 1;
}

.site-header {
    background-color: var(--white);
    border-bottom: 1px solid var(--border-color);
    position: relative;
    z-index: 100;
    transition: var(--transition);
}

.sticky-header.scrolled {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    box-shadow: var(--shadow-sm);
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from { transform: translateY(-100%); }
    to { transform: translateY(0); }
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
    gap: 20px;
}

.site-branding {
    flex-shrink: 0;
}

.site-branding .site-title {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    margin: 0;
    white-space: nowrap;
}

.site-branding .site-title a {
    white-space: nowrap;
}

.main-navigation {
    flex-grow: 1;
}

/* Target both UL and WordPress default wrapper DIV */
.main-navigation div,
.main-navigation ul {
    list-style: none;
    display: flex;
    flex-wrap: wrap; /* allow wrapping if it somehow overflows */
    gap: 30px;
    margin: 0;
    padding: 0;
}

.main-navigation li {
    display: inline-block;
    position: relative;
}

.main-navigation a {
    font-weight: 500;
    font-size: 0.95rem;
    color: var(--text-main);
    display: flex;
    align-items: center;
}

.main-navigation a:hover {
    color: var(--accent-color);
}

/* Dropdown Sub-menu CSS */
.main-navigation .sub-menu {
    display: none !important;
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--white);
    min-width: 220px;
    box-shadow: var(--shadow-md);
    padding: 10px 0;
    z-index: 999;
    flex-direction: column !important;
    border-radius: 4px;
    gap: 0 !important;
    margin-top: 20px; /* Bridge gap for hover */
}

/* Invisible bridge so mouse doesn't lose hover */
.main-navigation li:after {
    content: '';
    position: absolute;
    bottom: -20px;
    left: 0;
    right: 0;
    height: 20px;
}

.main-navigation li:hover > .sub-menu {
    display: flex !important;
}

/* Mobile Active Dropdown */
.main-navigation li.active-dropdown > .sub-menu {
    display: flex !important;
    position: static;
    box-shadow: none;
    margin-top: 10px;
    padding-left: 15px;
    background: transparent;
}

.main-navigation li.active-dropdown > a svg {
    transform: rotate(180deg);
}

.main-navigation a svg {
    transition: transform 0.3s ease;
}

.main-navigation .sub-menu li {
    display: block;
    width: 100%;
}

.main-navigation .sub-menu a {
    padding: 10px 20px;
    color: var(--text-main);
    display: block;
    width: 100%;
    white-space: normal !important; /* Allow wrapping if text is long */
    border-bottom: 1px solid #f9f9f9;
}

.main-navigation .sub-menu a:hover {
    background: var(--bg-light);
    color: var(--accent-color);
    padding-left: 25px; /* Slight indent hover animation */
    transition: var(--transition);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 20px;
}

.action-icon {
    position: relative;
    color: var(--primary-color);
    display: flex;
}

.action-icon:hover {
    color: var(--accent-color);
}

.cart-count {
    position: absolute;
    top: -8px;
    right: -8px;
    background-color: var(--accent-color);
    color: white;
    font-size: 0.7rem;
    font-weight: 700;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--primary-color);
}

/* ==========================================================================
   Hero Slider
   ========================================================================== */
.hero-slider .swiper-slide {
    min-height: 480px;
    display: flex;
    align-items: center;
}

.hero-slider .swiper-pagination-bullet-active {
    background: var(--primary-color);
}

.hero-slider .swiper-button-next,
.hero-slider .swiper-button-prev {
    color: var(--primary-color);
    background: rgba(255,255,255,0.8);
    width: 40px;
    height: 40px;
    border-radius: 50%;
}

.hero-slider .swiper-button-next:after,
.hero-slider .swiper-button-prev:after {
    font-size: 1.2rem;
    font-weight: bold;
}

/* ==========================================================================
   Categories
   ========================================================================== */
.category-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-top: 30px;
}

.cat-item {
    text-align: center;
}

.cat-item .cat-img {
    border-radius: 50%;
    overflow: hidden;
    margin-bottom: 15px;
    aspect-ratio: 1;
    background-color: var(--secondary-color);
    transition: var(--transition);
}

.cat-item:hover .cat-img {
    box-shadow: var(--shadow-md);
    transform: translateY(-5px);
}

.cat-item h3 {
    font-size: 1.1rem;
    font-weight: 600;
}

/* ==========================================================================
   WooCommerce Products Layout
   ========================================================================== */
.wc-products .products {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 25px;
    margin: 0;
    padding: 0;
}

.wc-products .product {
    background: var(--white);
    border-radius: 8px;
    padding: 15px;
    transition: var(--transition);
    position: relative;
    border: 1px solid transparent;
}

.wc-products .product:hover {
    box-shadow: var(--shadow-lg);
    border-color: #333;
    transform: translateY(-3px);
}

.wc-products .product img {
    border-radius: 6px;
    margin-bottom: 15px;
    width: 100%;
}

.woocommerce-loop-product__title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-main);
}

.price {
    display: block;
    font-weight: 700;
    color: var(--primary-color);
    font-size: 1.1rem;
    margin-bottom: 15px;
}

.wc-products .button {
    display: block;
    width: 100%;
    text-align: center;
    background-color: var(--secondary-color);
    color: var(--primary-color);
    padding: 10px;
    border-radius: 4px;
    font-size: 0.9rem;
    font-weight: 600;
}

.wc-products .product:hover .button {
    background-color: var(--primary-color);
    color: var(--white);
}

/* Sale Badge */
.onsale {
    position: absolute;
    top: 25px;
    left: 25px;
    background-color: var(--accent-color);
    color: white;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 4px;
    z-index: 9;
}

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
    background-color: #1a1a1a;
    color: #b3b3b3;
    padding-top: 60px;
}

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

.widget-title {
    color: var(--white);
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 20px;
}

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

.footer-widget ul li {
    margin-bottom: 12px;
}

.footer-widget a {
    color: #b3b3b3;
}

.footer-widget a:hover {
    color: var(--white);
}

.social-icons {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.social-icons a {
    color: var(--white);
}

.marketplace-links {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.mp-btn {
    display: block;
    padding: 10px 15px;
    background-color: #2a2a2a;
    color: var(--white) !important;
    border-radius: 4px;
    text-align: center;
    font-weight: 600;
}

.mp-btn.shopee:hover { background-color: #ee4d2d; }
.mp-btn.tokopedia:hover { background-color: #03ac0e; }
.mp-btn.tiktok:hover { background-color: #000; box-shadow: inset 0 0 0 1px #fff; }

.site-info {
    border-top: 1px solid #333;
    padding: 20px 0;
    text-align: center;
    font-size: 0.9rem;
}

/* ==========================================================================
   Floating WhatsApp Button
   ========================================================================== */
.floating-wa {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background-color: #25d366;
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-lg);
    z-index: 999;
    transition: var(--transition);
}

.floating-wa:hover {
    transform: scale(1.1);
    color: white;
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 992px) {
    .category-grid,
    .wc-products .products {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .footer-widgets {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .menu-toggle {
        display: block;
    }
    
    .main-navigation {
        display: none;
        position: absolute;
        top: 80px;
        left: 0;
        width: 100%;
        background: var(--white);
        box-shadow: var(--shadow-md);
        padding: 20px;
        overflow-y: auto;
        max-height: 80vh;
    }

    .main-navigation.toggled {
        display: block;
    }

    .main-navigation ul {
        flex-direction: column;
        gap: 15px;
    }
    
    .category-grid,
    .wc-products .products {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .hero-slider .swiper-slide {
        min-height: 350px;
    }
}

@media (max-width: 576px) {
    .category-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .wc-products .products {
        grid-template-columns: 1fr;
    }
    
    .footer-widgets {
        grid-template-columns: 1fr;
    }
    
    .top-bar-content {
        flex-direction: column;
        text-align: center;
        gap: 5px;
    }
}
