/* Import Font Inter */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root {
    --primary: #2563EB; /* Blue 600 - Warna Utama RyuuMart */
    --primary-hover: #1D4ED8; /* Blue 700 */
    --bg-light: #F3F4F6;
    --text-main: #1F2937;
    --text-gray: #6B7280;
    --border-color: #E5E7EB;
    --white: #FFFFFF;
    --shadow-sm: 0 1px 2px 0 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);
    --radius-md: 0.375rem;
    --radius-lg: 0.5rem;
    --radius-xl: 0.75rem;
    --radius-full: 9999px;
}

/* Reset & Base Styles */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body { 
    font-family: 'Inter', sans-serif; 
    background-color: var(--bg-light);
    color: var(--text-main);
    line-height: 1.5;
    scroll-behavior: smooth;
}

a { text-decoration: none; color: inherit; transition: color 0.2s; }
ul { list-style: none; }
button, input { font-family: inherit; }

/* --- Layout Utilities --- */
.container {
    width: 100%;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 1rem;
    padding-right: 1rem;
}

.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.gap-2 { gap: 0.5rem; }
.gap-4 { gap: 1rem; }
.gap-6 { gap: 1.5rem; }
.gap-8 { gap: 2rem; }
.hidden { display: none; }

@media (min-width: 768px) {
    .md\:flex { display: flex; }
    .md\:hidden { display: none; }
    .md\:block { display: block; }
    .md\:w-1\/4 { width: 25%; }
    .md\:w-3\/4 { width: 75%; }
    .md\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .md\:grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .md\:flex-row { flex-direction: row; }
}

.grid { display: grid; }
.grid-cols-1 { grid-template-columns: repeat(1, minmax(0, 1fr)); }
.grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.sm\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.lg\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }

/* --- Header & Navigasi --- */
header {
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 30;
    box-shadow: var(--shadow-sm);
}

.header-content {
    padding: 1rem 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary);
    letter-spacing: -0.025em;
}

.nav-links {
    display: flex;
    gap: 1.5rem;
    font-weight: 500;
    font-size: 0.95rem;
    color: var(--text-gray);
}

.nav-links a:hover { color: var(--primary); }

.nav-secondary {
    border-top: 1px solid var(--border-color);
    background-color: var(--white);
}

.nav-secondary .container {
    display: flex;
    gap: 2rem;
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
    overflow-x: auto;
}

.nav-link-secondary {
    color: var(--text-gray);
    font-weight: 500;
    font-size: 0.9rem;
    white-space: nowrap;
    padding-bottom: 0.25rem;
}
.nav-link-secondary:hover { color: var(--primary); }

/* Search Bar */
.search-container {
    flex: 1;
    max-width: 36rem;
    margin: 0 2rem;
    display: none;
}
@media (min-width: 768px) { .search-container { display: block; } }

.search-wrapper {
    position: relative;
}
.search-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-gray);
}
.search-input {
    width: 100%;
    padding: 0.6rem 1rem 0.6rem 2.5rem;
    border-radius: var(--radius-full);
    border: 1px solid var(--border-color);
    background-color: #F9FAFB;
    outline: none;
    transition: all 0.2s;
}
.search-input:focus {
    background-color: var(--white);
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* --- Hero Section --- */
.hero-section {
    background: linear-gradient(to right, #2563EB, #4F46E5);
    color: var(--white);
    text-align: center;
    padding: 5rem 1rem;
    position: relative;
    overflow: hidden;
}
.hero-bg-pattern {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background-image: url('https://www.transparenttextures.com/patterns/cubes.png');
    opacity: 0.1;
}
.hero-content { position: relative; z-index: 10; }
.hero-title {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    line-height: 1.2;
}
.hero-subtitle {
    font-size: 1.125rem;
    color: #DBEAFE;
    max-width: 42rem;
    margin: 0 auto 2.5rem auto;
}
.btn-hero {
    background-color: var(--white);
    color: var(--primary);
    font-weight: 700;
    padding: 0.75rem 2rem;
    border-radius: var(--radius-full);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: var(--shadow-lg);
    transition: transform 0.2s;
}
.btn-hero:hover { transform: scale(1.05); background-color: #F8FAFC; }

/* --- Sidebar Filter --- */
.sidebar-card {
    background: var(--white);
    padding: 1.25rem;
    border-radius: var(--radius-xl);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 6rem;
}
.filter-title {
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.filter-group { margin-bottom: 1.5rem; }
.filter-label {
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--text-main);
    margin-bottom: 0.75rem;
    display: block;
}
.radio-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: var(--text-gray);
    margin-bottom: 0.5rem;
    cursor: pointer;
}
.radio-item:hover { color: var(--primary); }
.radio-item input { accent-color: var(--primary); }

/* --- Product Grid --- */
.section-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: var(--text-main);
}
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1.5rem;
}

/* --- Kartu Produk --- */
.product-card {
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    overflow: hidden;
    transition: all 0.3s ease;
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary);
}

.product-img-wrapper {
    height: 160px;
    background-color: #F3F4F6;
    position: relative;
    overflow: hidden;
}

.product-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.product-card:hover .product-img-wrapper img { transform: scale(1.05); }

.product-content {
    padding: 1.25rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.product-name {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 0.25rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.product-meta {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.5rem;
    margin-bottom: 0.75rem;
    font-size: 0.75rem;
    font-weight: 500;
}
.badge-gray { background-color: #F3F4F6; color: var(--text-gray); padding: 0.25rem 0.5rem; border-radius: 0.25rem; }
.badge-blue { background-color: #EFF6FF; color: var(--primary); padding: 0.25rem 0.5rem; border-radius: 0.25rem; border: 1px solid #DBEAFE; }

.product-desc {
    font-size: 0.875rem;
    color: var(--text-gray);
    margin-bottom: 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-footer {
    margin-top: auto;
    padding-top: 1rem;
    border-top: 1px solid #F3F4F6;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.price-label { font-size: 0.75rem; color: #9CA3AF; text-transform: uppercase; letter-spacing: 0.05em; }
.product-price { font-size: 1.125rem; font-weight: 800; color: var(--primary); }

.btn-add-cart {
    background-color: var(--primary);
    color: var(--white);
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s, transform 0.2s;
    box-shadow: 0 4px 6px rgba(37, 99, 235, 0.3);
}
.btn-add-cart:hover { background-color: var(--primary-hover); transform: scale(1.05); }

/* Badge Best Seller */
.best-seller-badge {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    background: linear-gradient(135deg, #F59E0B, #D97706);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.7rem;
    font-weight: 700;
    box-shadow: var(--shadow-sm);
    z-index: 10;
}

/* --- Tombol Cart Badge --- */
.cart-badge {
    position: absolute;
    top: -5px;
    right: -8px;
    background-color: #EF4444;
    color: white;
    border-radius: 50%;
    padding: 0;
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: bold;
    border: 2px solid white;
}

/* --- Footer --- */
footer {
    background-color: #111827;
    color: #D1D5DB;
    margin-top: 3rem;
    padding: 3rem 0 2rem 0;
    border-top: 1px solid #1F2937;
}
.footer-grid {
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    gap: 2rem;
}
@media (min-width: 768px) { .footer-grid { grid-template-columns: repeat(4, 1fr); } }

.footer-title { color: var(--white); font-weight: 700; margin-bottom: 1rem; font-size: 1.125rem; }
.footer-links a { display: block; margin-bottom: 0.5rem; font-size: 0.875rem; color: #9CA3AF; }
.footer-links a:hover { color: var(--white); }
.footer-socials { display: flex; gap: 1rem; font-size: 1.25rem; }
.copyright { text-align: center; margin-top: 2rem; padding-top: 2rem; border-top: 1px solid #1F2937; font-size: 0.875rem; color: #6B7280; }

/* --- Modal --- */
.modal-backdrop {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    z-index: 40; display: none; backdrop-filter: blur(4px);
}

.modal {
    position: fixed; top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    z-index: 50; display: none;
    background-color: var(--white);
    width: 100%; max-width: 450px;
    border-radius: 1rem;
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}

/* --- Tombol Umum --- */
.btn-primary {
    background-color: var(--primary);
    color: white;
    font-weight: 600;
    border-radius: 0.5rem;
    padding: 0.75rem 1.5rem;
    transition: all 0.2s;
    display: inline-block;
    text-align: center;
    border: none;
    cursor: pointer;
}
.btn-primary:hover {
    background-color: #1D4ED8; /* Blue 700 */
    box-shadow: 0 4px 6px -1px rgba(37, 99, 235, 0.3);
}
.btn-secondary {
    background-color: #F3F4F6;
    color: #374151;
    font-weight: 600;
    border-radius: 0.5rem;
    padding: 0.75rem 1.5rem;
    transition: all 0.2s;
    text-align: center;
}
.btn-secondary:hover { background-color: #E5E7EB; }