:root {
    --primary: #4f46e5; /* Indigo */
    --primary-dark: #4338ca;
    --text-dark: #1e293b;
    --text-light: #64748b;
    --bg-light: #f8fafc;
    --white: #ffffff;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

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

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-light);
    color: var(--text-dark);
}

/* Navbar */
nav {
    background: var(--white);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}
.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.logo { font-size: 1.5rem; font-weight: 700; color: var(--text-dark); }
.logo span { color: var(--primary); }
.cart-icon { 
    position: relative; 
    cursor: pointer; 
    font-size: 1.2rem;
    color: var(--text-dark);
    transition: color 0.3s;
}
.cart-icon:hover { color: var(--primary); }
#cart-count {
    position: absolute;
    top: -8px;
    right: -10px;
    background: var(--primary);
    color: white;
    font-size: 0.75rem;
    padding: 2px 6px;
    border-radius: 50%;
    font-weight: bold;
}

/* Hero Section */
.hero {
    background: linear-gradient(rgba(0,0,0,0.5), rgba(0,0,0,0.5)), url('https://images.unsplash.com/photo-1441986300917-64674bd600d8?auto=format&fit=crop&w=1500&q=80');
    background-size: cover;
    background-position: center;
    height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
}
.hero h1 { font-size: 3rem; margin-bottom: 10px; }
.hero p { font-size: 1.2rem; margin-bottom: 20px; opacity: 0.9; }
.cta-btn {
    padding: 12px 30px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 50px;
    font-size: 1rem;
    cursor: pointer;
    font-weight: 600;
    transition: transform 0.2s, background 0.2s;
}
.cta-btn:hover { background: var(--primary-dark); transform: scale(1.05); }

/* Main Layout */
.container { max-width: 1200px; margin: 40px auto; padding: 0 20px; }
.section-title { margin-bottom: 30px; font-size: 2rem; color: var(--text-dark); }

/* Product Grid */
.grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
}
.product-card {
    background: var(--white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
    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 15px -3px rgba(0, 0, 0, 0.1); }
.product-card img {
    width: 100%;
    height: 250px;
    object-fit: cover;
}
.card-content { padding: 20px; flex-grow: 1; display: flex; flex-direction: column; }
.card-cat { color: var(--text-light); font-size: 0.85rem; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 5px; }
.card-title { font-size: 1.25rem; font-weight: 600; margin-bottom: 10px; }
.card-price { font-size: 1.1rem; color: var(--primary); font-weight: 700; margin-bottom: 15px; }
.add-btn {
    margin-top: auto;
    width: 100%;
    padding: 12px;
    background: var(--text-dark);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s;
}
.add-btn:hover { background: var(--primary); }

/* Cart Slide-in */
.cart-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
    opacity: 1;
    transition: opacity 0.3s;
    display: flex;
    justify-content: flex-end;
}
.cart-overlay.hidden { display: none; } /* Simple toggle */

.cart-sidebar {
    background: white;
    width: 400px;
    max-width: 90%;
    height: 100%;
    display: flex;
    flex-direction: column;
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from { transform: translateX(100%); }
    to { transform: translateX(0); }
}

.cart-header { padding: 20px; border-bottom: 1px solid #eee; display: flex; justify-content: space-between; align-items: center; }
.close-btn { font-size: 1.5rem; cursor: pointer; }
.cart-body { flex-grow: 1; overflow-y: auto; padding: 20px; }
.cart-item { display: flex; align-items: center; margin-bottom: 15px; padding-bottom: 15px; border-bottom: 1px solid #f1f1f1; }
.cart-item img { width: 60px; height: 60px; object-fit: cover; border-radius: 6px; margin-right: 15px; }
.item-details h4 { font-size: 0.95rem; margin-bottom: 5px; }
.item-details p { color: var(--text-light); font-size: 0.9rem; }
.cart-footer { padding: 20px; border-top: 1px solid #eee; background: #fafafa; }
.total-row { display: flex; justify-content: space-between; font-size: 1.2rem; font-weight: 700; margin-bottom: 15px; }
#checkout-btn { width: 100%; padding: 15px; background: var(--primary); color: white; border: none; border-radius: 8px; font-weight: bold; cursor: pointer; }
#checkout-btn:hover { background: var(--primary-dark); }
footer { text-align: center; padding: 40px; color: var(--text-light); border-top: 1px solid #eee; margin-top: 40px; }