/* css/style.css */
:root {
    --primary: #10b981; /* WhatsApp Green-ish for conversion */
    --primary-dark: #059669;
    --dark-bg: #0f172a;
    --darker-bg: #020617;
    --card-bg: #1e293b;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --border: #334155;
    --gradient: linear-gradient(135deg, #38bdf8 0%, #3b82f6 100%);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', sans-serif;
}

body {
    background-color: var(--dark-bg);
    color: var(--text-main);
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.py-5 {
    padding-top: 3rem;
    padding-bottom: 3rem;
}

.text-gradient {
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Navbar */
.navbar {
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
}

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

.logo {
    font-size: 24px;
    font-weight: 800;
    letter-spacing: -0.5px;
}

.search-bar {
    position: relative;
    width: 100%;
    max-width: 400px;
}

.search-bar i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}

.search-bar input {
    width: 100%;
    background: var(--darker-bg);
    border: 1px solid var(--border);
    color: var(--text-main);
    padding: 10px 15px 10px 40px;
    border-radius: 30px;
    outline: none;
    transition: all 0.3s ease;
}

.search-bar input:focus {
    border-color: #38bdf8;
    box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.2);
}

.cart-icon {
    position: relative;
    font-size: 20px;
    cursor: pointer;
    padding: 10px;
    transition: transform 0.2s;
}

.cart-icon:hover {
    transform: scale(1.1);
}

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

/* Hero Section */
.hero {
    position: relative;
    padding: 80px 0;
    text-align: center;
    overflow: hidden;
    border-bottom: 1px solid var(--border);
}

.hero-content {
    position: relative;
    z-index: 2;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 20px;
    line-height: 1.1;
}

.hero-subtitle {
    font-size: 1.2rem;
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto;
}

/* Background Shapes for dynamic look */
.hero-bg-shapes {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    z-index: 1;
    overflow: hidden;
}
.hero-bg-shapes::before {
    content: '';
    position: absolute;
    top: -50%; left: -10%;
    width: 600px; height: 600px;
    background: radial-gradient(circle, rgba(56,189,248,0.15) 0%, rgba(15,23,42,0) 70%);
    border-radius: 50%;
}
.hero-bg-shapes::after {
    content: '';
    position: absolute;
    bottom: -50%; right: -10%;
    width: 500px; height: 500px;
    background: radial-gradient(circle, rgba(59,130,246,0.15) 0%, rgba(15,23,42,0) 70%);
    border-radius: 50%;
}

/* Filters */
.filters {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.filter-btn {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-muted);
    padding: 8px 20px;
    border-radius: 30px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
}

.filter-btn:hover, .filter-btn.active {
    background: var(--text-main);
    color: var(--dark-bg);
    border-color: var(--text-main);
}

/* Products Grid */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
}

.product-card {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 20px;
    border: 1px solid var(--border);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    border-color: #38bdf8;
}

.product-image {
    width: 100%;
    height: 200px;
    border-radius: 10px;
    object-fit: cover;
    margin-bottom: 15px;
    background: var(--darker-bg);
}

.product-brand {
    font-size: 12px;
    text-transform: uppercase;
    color: #38bdf8;
    font-weight: 600;
    letter-spacing: 1px;
}

.product-title {
    font-size: 18px;
    font-weight: 600;
    margin: 5px 0 10px;
}

.product-meta {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 15px;
    flex-grow: 1;
}

.product-meta span {
    display: block;
    margin-bottom: 3px;
}

.product-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
}

.product-price {
    font-size: 20px;
    font-weight: 800;
    color: white;
}

.add-to-cart {
    background: var(--text-main);
    color: var(--dark-bg);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.add-to-cart:hover {
    background: #38bdf8;
    color: white;
    transform: scale(1.1);
}

.add-to-cart:disabled {
    background: var(--border);
    color: var(--text-muted);
    cursor: not-allowed;
    transform: none;
}

/* Loader */
.loader {
    width: 50px;
    height: 50px;
    border: 3px solid var(--border);
    border-top-color: #38bdf8;
    border-radius: 50%;
    animation: spin 1s infinite linear;
    margin: 40px auto;
    grid-column: 1 / -1;
}

@keyframes spin { 100% { transform: rotate(360deg); } }

/* Sidebar Cart */
.cart-sidebar {
    position: fixed;
    top: 0; right: -400px;
    width: 400px;
    max-width: 100%;
    height: 100vh;
    background: var(--card-bg);
    border-left: 1px solid var(--border);
    z-index: 1000;
    transition: right 0.3s ease;
    display: flex;
    flex-direction: column;
}

.cart-sidebar.open {
    right: 0;
}

.cart-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(3px);
    z-index: 999;
    display: none;
}

.cart-overlay.open {
    display: block;
}

.cart-header {
    padding: 20px;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.close-cart {
    background: none; border: none;
    color: var(--text-main);
    font-size: 24px; cursor: pointer;
}

.cart-items {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

.cart-item {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border);
}

.cart-item img {
    width: 60px; height: 60px;
    border-radius: 8px; object-fit: cover;
}

.cart-item-info {
    flex: 1;
}

.cart-item-title {
    font-weight: 600; font-size: 15px;
}

.cart-item-meta {
    font-size: 12px; color: var(--text-muted);
}

.cart-item-price {
    font-weight: 700; color: #38bdf8;
    margin-top: 5px;
}

.cart-item-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 8px;
}

.qty-btn {
    background: var(--border);
    border: none; color: white;
    width: 25px; height: 25px;
    border-radius: 4px; cursor: pointer;
}

.remove-item {
    color: #ef4444; background: none; border: none; cursor: pointer;
    font-size: 14px; margin-left: auto;
}

.cart-footer {
    padding: 20px;
    border-top: 1px solid var(--border);
    background: var(--darker-bg);
}

.cart-total {
    display: flex; justify-content: space-between;
    font-size: 20px; font-weight: 800;
    margin-bottom: 10px;
}

.cart-notice {
    font-size: 12px; color: var(--text-muted);
    margin-bottom: 20px; text-align: center;
}

.btn-checkout {
    width: 100%;
    padding: 15px;
    background: var(--primary);
    color: white;
    border: none; border-radius: 8px;
    font-size: 16px; font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
    display: flex; justify-content: center; gap: 10px;
}

.btn-checkout:hover {
    background: var(--primary-dark);
}

/* Responsive */
@media (max-width: 768px) {
    .nav-container { flex-direction: column; height: auto; padding: 15px 0; gap: 15px; }
    .hero-title { font-size: 2.5rem; }
}
