/* ==========================================================================
   Base & Variables
   ========================================================================== */
:root {
    --primary: #22c55e;
    --primary-dark: #16a34a;
    --secondary: #0ea5e9;
    --dark: #1e293b;
    --light: #f8fafc;
    --white: #ffffff;
    --gray-100: #f1f5f9;
    --gray-200: #e2e8f0;
    --gray-500: #64748b;
    --gray-800: #1e293b;
    
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    
    --radius-md: 0.5rem;
    --radius-lg: 1rem;
    --radius-xl: 1.5rem;
    
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Plus Jakarta Sans', sans-serif;
    background-color: var(--light);
    color: var(--dark);
    line-height: 1.5;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

/* ==========================================================================
   Navbar
   ========================================================================== */
.navbar {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(12px);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid var(--gray-200);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary);
}

.nav-logo span {
    color: var(--dark);
}

.nav-search {
    flex: 1;
    max-width: 500px;
}

.search-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.search-wrapper input {
    width: 100%;
    padding: 0.75rem 1rem 0.75rem 3rem;
    border: 1px solid var(--gray-200);
    border-radius: 999px;
    font-size: 0.95rem;
    outline: none;
    transition: var(--transition);
    font-family: inherit;
}

.search-wrapper input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.2);
}

.search-wrapper .search-icon {
    position: absolute;
    left: 1rem;
    color: var(--gray-500);
    width: 20px;
    height: 20px;
}

.nav-menu {
    display: flex;
    gap: 1.5rem;
}

.nav-link {
    font-weight: 500;
    color: var(--gray-500);
    transition: var(--transition);
}

.nav-link:hover, .nav-link.active {
    color: var(--primary);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.action-btn {
    font-weight: 600;
    cursor: pointer;
}

.cart-btn {
    position: relative;
    color: var(--dark);
    display: flex;
    align-items: center;
}

.cart-btn .badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background: var(--primary);
    color: white;
    font-size: 0.75rem;
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.login-btn {
    background: var(--primary);
    color: white;
    padding: 0.5rem 1.25rem;
    border-radius: 999px;
    transition: var(--transition);
}

.login-btn:hover {
    background: var(--primary-dark);
}

.mobile-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--dark);
}

/* ==========================================================================
   Main Content & Hero
   ========================================================================== */
.main-content {
    min-height: calc(100vh - 80px);
}

.hero-section {
    background: linear-gradient(rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.6)), url('../images/hero_bg.png') center/cover no-repeat;
    padding: 6rem 1rem;
    text-align: center;
    color: white;
    border-radius: 0 0 var(--radius-xl) var(--radius-xl);
    margin-bottom: 3rem;
    position: relative;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
}

.hero-content h1 {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.hero-content p {
    font-size: 1.1rem;
    opacity: 0.9;
    margin-bottom: 2rem;
}

.hero-search-mobile {
    display: none;
    max-width: 500px;
    margin: 0 auto;
}

.hero-search-mobile .search-wrapper input {
    padding-right: 6rem;
    border: none;
    color: var(--dark);
}

.hero-search-mobile .btn-primary {
    position: absolute;
    right: 0.25rem;
    top: 0.25rem;
    bottom: 0.25rem;
    border-radius: 999px;
    padding: 0 1.5rem;
    margin: 0;
}

/* ==========================================================================
   Sections & Grid
   ========================================================================== */
.section {
    max-width: 1200px;
    margin: 0 auto 4rem;
    padding: 0 1rem;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 2rem;
}

.section-header h2 {
    font-size: 1.75rem;
    font-weight: 700;
}

.section-header .subtitle {
    color: var(--gray-500);
    margin-top: 0.25rem;
}

.see-all {
    color: var(--primary);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    transition: var(--transition);
}

.see-all:hover {
    gap: 0.5rem;
}

/* Categories */
.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
}

.category-card {
    background: white;
    padding: 1.5rem;
    border-radius: var(--radius-lg);
    text-align: center;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    border: 1px solid var(--gray-100);
}

.category-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-5px);
    border-color: var(--primary);
}

.category-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    color: white;
}

.bg-orange { background: #f97316; }
.bg-green { background: #22c55e; }
.bg-blue { background: #3b82f6; }
.bg-purple { background: #a855f7; }
.bg-red { background: #ef4444; }
.bg-gray { background: #64748b; }

.category-card span {
    font-weight: 600;
    color: var(--dark);
}

/* UMKM Cards */
.umkm-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
}

.umkm-card {
    background: white;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    border: 1px solid var(--gray-100);
    display: flex;
    flex-direction: column;
}

.umkm-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-5px);
}

.umkm-img-container {
    position: relative;
    height: 200px;
    overflow: hidden;
}

.umkm-img-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.umkm-card:hover .umkm-img-container img {
    transform: scale(1.05);
}

.status-badge {
    position: absolute;
    top: 1rem;
    left: 1rem;
    padding: 0.25rem 0.75rem;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 700;
    color: white;
    box-shadow: var(--shadow-sm);
}

.status-open { background: var(--primary); }
.status-closed { background: #ef4444; }

.umkm-info {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.umkm-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.5rem;
}

.umkm-header h3 {
    font-size: 1.25rem;
    font-weight: 700;
}

.rating {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-weight: 700;
    color: #f59e0b;
}

.star-icon {
    width: 16px;
    height: 16px;
    fill: currentColor;
}

.umkm-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.875rem;
    color: var(--gray-500);
    margin-bottom: 1rem;
}

.umkm-meta span {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.umkm-meta i {
    width: 14px;
    height: 14px;
}

.umkm-desc {
    color: var(--gray-500);
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 1;
}

/* Products */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
}

.product-card {
    background: white;
    border-radius: var(--radius-lg);
    padding: 1rem;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    border: 1px solid var(--gray-100);
}

.product-card:hover {
    box-shadow: var(--shadow-lg);
}

.product-img {
    height: 200px;
    border-radius: var(--radius-md);
    overflow: hidden;
    margin-bottom: 1rem;
    position: relative;
}

.product-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.wishlist-btn {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--gray-500);
    transition: var(--transition);
}

.wishlist-btn:hover {
    color: #ef4444;
}

.product-info {
    display: flex;
    flex-direction: column;
}

.product-store {
    font-size: 0.8rem;
    color: var(--gray-500);
    display: flex;
    align-items: center;
    gap: 0.25rem;
    margin-bottom: 0.25rem;
}

.product-store i {
    width: 12px;
    height: 12px;
}

.product-name {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.product-price {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 1rem;
}

/* Buttons */
.btn-primary {
    background: var(--primary);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-md);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-family: inherit;
}

.btn-primary:hover {
    background: var(--primary-dark);
}

.btn-outline {
    background: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-md);
    font-weight: 600;
    text-align: center;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-outline:hover {
    background: var(--primary);
    color: white;
}

.btn-block {
    width: 100%;
}

/* ==========================================================================
   Footer
   ========================================================================== */
.footer {
    background: white;
    border-top: 1px solid var(--gray-200);
    padding: 4rem 1rem 1rem;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-brand p {
    color: var(--gray-500);
    margin-top: 1rem;
    max-width: 400px;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary);
}

.footer-logo span {
    color: var(--dark);
}

.footer-links h3 {
    margin-bottom: 1.5rem;
}

.footer-links a {
    display: block;
    color: var(--gray-500);
    margin-bottom: 0.75rem;
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--primary);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid var(--gray-200);
    color: var(--gray-500);
}

/* ==========================================================================
   Responsive Design
   ========================================================================== */
@media (max-width: 992px) {
    .nav-search {
        display: none;
    }

    .hero-search-mobile {
        display: block;
    }

    .footer-container {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .umkm-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    }
}

@media (max-width: 768px) {
    /* Navbar */
    .nav-container {
        padding: 0.75rem 1rem;
        gap: 0.75rem;
        flex-wrap: nowrap;
    }

    .nav-logo {
        font-size: 1rem;
        flex-shrink: 0;
    }

    .nav-logo span {
        font-size: 0.75rem;
        display: block;
        line-height: 1.1;
    }

    .mobile-toggle {
        display: block;
        flex-shrink: 0;
    }

    .nav-actions {
        gap: 0.5rem;
    }

    .login-btn {
        padding: 0.4rem 0.85rem;
        font-size: 0.85rem;
    }

    .nav-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: white;
        flex-direction: column;
        padding: 0.75rem 1rem;
        border-bottom: 1px solid var(--gray-200);
        box-shadow: var(--shadow-md);
        z-index: 999;
        gap: 0;
    }

    .nav-menu.active {
        display: flex;
    }

    .nav-menu .nav-link {
        padding: 0.75rem 0;
        border-bottom: 1px solid var(--gray-100);
        font-size: 1rem;
    }

    .nav-menu .nav-link:last-child {
        border-bottom: none;
    }

    /* Hero */
    .hero-section {
        padding: 3.5rem 1rem;
        border-radius: 0 0 var(--radius-lg) var(--radius-lg);
        margin-bottom: 2rem;
    }

    .hero-content h1 {
        font-size: 1.6rem;
    }

    .hero-content p {
        font-size: 0.95rem;
    }

    /* Section */
    .section {
        margin-bottom: 2.5rem;
        padding: 0 0.75rem;
    }

    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
        margin-bottom: 1.25rem;
    }

    .section-header h2 {
        font-size: 1.35rem;
    }

    /* Grids */
    .umkm-grid {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }

    .product-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }

    .category-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 0.75rem;
    }

    /* Cards */
    .product-card {
        padding: 0.75rem;
    }

    .product-img {
        height: 150px;
    }

    .product-name {
        font-size: 0.9rem;
    }

    .product-price {
        font-size: 1rem;
        margin-bottom: 0.75rem;
    }

    .category-card {
        padding: 1rem 0.5rem;
    }

    .category-icon {
        width: 45px;
        height: 45px;
    }

    .category-card span {
        font-size: 0.8rem;
    }

    /* Footer */
    .footer {
        padding: 2.5rem 1rem 1rem;
    }

    .footer-container {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        margin-bottom: 1.5rem;
    }

    .footer-brand p {
        font-size: 0.9rem;
    }

    /* Buttons */
    .btn-primary, .btn-outline {
        padding: 0.65rem 1.25rem;
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .product-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.6rem;
    }

    .category-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 0.5rem;
    }

    .hero-content h1 {
        font-size: 1.35rem;
    }

    .umkm-img-container {
        height: 170px;
    }

    /* Sembunyikan teks Dashboard di mobile kecil */
    .nav-actions .action-btn span,
    .nav-actions .action-btn [data-lucide="layout-dashboard"] + * {
        display: none;
    }
}
