@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

:root {
    --primary-color: rgb(99, 205, 255);
    --primary-dark: rgb(70, 180, 240);
    --secondary-color: #3483fa;
    --background-gray: #f5f5f5;
    --white: #ffffff;
    --text-dark: #333333;
    --text-gray: #666666;
    --text-light: #999999;
    --border-color: #e6e6e6;
    --success-color: #00a650;
    --error-color: #f63939;
    --font-family: 'Inter', sans-serif;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 12px 0 rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 8px 24px 0 rgba(0, 0, 0, 0.08);
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
}

/* Base Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: var(--font-family);
    background-color: var(--background-gray);
    color: var(--text-dark);
    line-height: 1.5;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.2s ease;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

ul {
    list-style: none;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 16px;
}

.show-mobile-only {
    display: none;
}

/* Header Marketplace Style */
header {
    background-color: var(--primary-color);
    padding: 8px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.header-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 8px 0;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-dark);
    text-transform: uppercase;
    letter-spacing: -0.5px;
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.search-bar {
    flex: 1;
    max-width: 600px;
    position: relative;
    display: flex;
}

.search-bar input {
    width: 100%;
    padding: 10px 16px;
    padding-right: 45px;
    border: none;
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-sm);
    font-size: 0.95rem;
    outline: none;
}

.search-bar button {
    position: absolute;
    right: 0;
    top: 0;
    height: 100%;
    width: 45px;
    background: none;
    border: none;
    color: var(--text-gray);
    cursor: pointer;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-left: 1px solid var(--border-color);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 20px;
}

.action-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-dark);
    position: relative;
}

.action-link i {
    font-size: 1.3rem;
}

.cart-badge {
    position: absolute;
    top: -5px;
    right: -8px;
    background-color: var(--error-color);
    color: var(--white);
    font-size: 0.65rem;
    font-weight: 700;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Nav Bar */
.nav-bar {
    display: flex;
    align-items: center;
    gap: 24px;
    padding: 8px 0;
}

.nav-link {
    font-size: 0.85rem;
    font-weight: 500;
    color: rgba(51, 51, 51, 0.8);
}

.nav-link:hover {
    color: var(--text-dark);
}

/* Product Cards - Marketplace Look */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px;
    margin: 24px 0;
}

.product-card {
    background: var(--white);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: all 0.3s ease;
    border: 1px solid transparent;
    display: flex;
    flex-direction: column;
    cursor: pointer;
}

.product-card:hover {
    box-shadow: var(--shadow-lg);
    border-color: var(--border-color);
}

.product-image {
    width: 100%;
    aspect-ratio: 1/1;
    overflow: hidden;
    position: relative;
    border-bottom: 1px solid var(--background-gray);
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 16px;
    transition: transform 0.5s ease;
}

.product-card:hover .product-image img {
    transform: scale(1.05);
}

.product-info {
    padding: 16px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.product-price {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 4px;
}

.product-name {
    font-size: 0.9rem;
    color: var(--text-gray);
    font-weight: 400;
    margin-bottom: 8px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    min-height: 2.7em;
}

.product-offer {
    color: var(--success-color);
    font-size: 0.8rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 4px;
}

.product-action {
    margin-top: 12px;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 24px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    border: none;
    transition: all 0.2s ease;
    width: 100%;
}

.btn-primary {
    background-color: var(--secondary-color);
    color: var(--white);
}

.btn-primary:hover {
    background-color: var(--accent-dark);
    transform: translateY(-1px);
}

/* Section Titles */
.section-title {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--text-dark);
    margin: 32px 0 16px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.view-all {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--secondary-color);
}

/* Footer Marketplace Style */
footer {
    background-color: var(--white);
    padding: 48px 0 24px 0;
    margin-top: 64px;
    border-top: 1px solid var(--border-color);
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 32px;
    margin-bottom: 48px;
}

.footer-col h4 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--text-dark);
}

.footer-col ul li {
    margin-bottom: 12px;
}

.footer-col ul li a {
    color: var(--text-gray);
    font-size: 0.85rem;
}

.footer-col ul li a:hover {
    color: var(--text-dark);
}

.footer-bottom {
    padding-top: 24px;
    border-top: 1px solid var(--border-color);
    text-align: center;
    color: var(--text-light);
    font-size: 0.8rem;
}

/* WhatsApp Floating */
.wa-float {
    position: fixed;
    bottom: 32px;
    right: 32px;
    background-color: #25d366;
    color: var(--white);
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    box-shadow: var(--shadow-lg);
    z-index: 1000;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.wa-float:hover {
    transform: scale(1.1);
}

/* Banner Slider */
.banner-slider {
    border-radius: var(--radius-lg);
    overflow: hidden;
    margin: 24px 0;
    box-shadow: var(--shadow-md);
}

.swiper-slide img {
    width: 100%;
    max-height: 420px;
    object-fit: cover;
}

/* Mobile Adjustments */
@media (max-width: 768px) {
    .header-top {
        padding: 5px 0;
        gap: 10px;
    }

    .logo {
        font-size: 1.1rem;
        flex: 1;
    }

    .header-actions {
        gap: 12px;
    }

    .hide-mobile {
        display: none !important;
    }

    .show-mobile-only {
        display: block !important;
    }

    .header-search-mobile {
        padding: 10px 0;
        width: 100%;
    }

    .header-search-mobile .search-bar {
        max-width: 100%;
        margin-top: 0;
    }

    .nav-bar {
        display: none !important;
    }

    .product-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
        padding: 0 4px;
    }

    .product-price {
        font-size: 1.2rem;
    }

    .product-info {
        padding: 12px;
    }

    .section-title {
        font-size: 1.3rem;
        padding: 0 4px;
    }

    .banner-slider {
        margin: 12px 0;
        border-radius: 0;
    }
}

/* Mobile Drawer Menu */
.mobile-drawer {
    position: fixed;
    top: 0;
    left: -280px;
    width: 280px;
    height: 100%;
    background: var(--white);
    z-index: 2000;
    transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--shadow-lg);
    display: flex;
    flex-direction: column;
}

.mobile-drawer.active {
    left: 0;
}

.drawer-header {
    background-color: var(--primary-color);
    padding: 24px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.drawer-body {
    padding: 20px 0;
    overflow-y: auto;
}

.drawer-link {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 14px 24px;
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-dark);
}

.drawer-link i {
    width: 20px;
    font-size: 1.2rem;
    color: var(--text-gray);
}

.drawer-link:hover {
    background: rgba(0, 0, 0, 0.03);
}

.drawer-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.drawer-overlay.active {
    opacity: 1;
    visibility: visible;
}

.menu-toggle {
    display: none;
    font-size: 1.4rem;
    cursor: pointer;
    background: none;
    border: none;
    padding: 4px;
    color: var(--text-dark);
}

@media (max-width: 768px) {
    .menu-toggle {
        display: block;
    }
}