* { margin: 0; padding: 0; box-sizing: border-box; }
:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --bg: #f8fafc;
    --card: #ffffff;
    --text: #1e293b;
    --muted: #64748b;
    --border: #e2e8f0;
    --success: #10b981;
    --danger: #ef4444;
    --radius: 12px;
    --shadow: 0 4px 16px rgba(0,0,0,.06);
}
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg); color: var(--text); line-height: 1.6;
}
a { color: var(--primary); text-decoration: none; }
.container { max-width: 1200px; margin: 2rem auto; padding: 0 1.25rem; }

/* Navbar */
.navbar { background: white; box-shadow: var(--shadow); position: sticky; top: 0; z-index: 100; }
.nav-container { max-width: 1200px; margin: 0 auto; padding: 1rem 1.25rem; display: flex; justify-content: space-between; align-items: center; }
.brand { font-size: 1.35rem; font-weight: 700; color: var(--primary); }
.nav-menu { list-style: none; display: flex; gap: 1.25rem; align-items: center; }
.nav-menu a { color: var(--text); font-weight: 500; padding: .4rem .8rem; border-radius: 8px; transition: .2s; }
.nav-menu a:hover { background: #eef2ff; color: var(--primary); }
.nav-toggle { display: none; background: none; border: none; font-size: 1.4rem; cursor: pointer; }
.badge { background: var(--danger); color: white; padding: 2px 6px; border-radius: 10px; font-size: .7rem; }

/* Dropdown */
.dropdown { position: relative; }
.user-pill { background: #eef2ff !important; color: var(--primary) !important; border-radius: 999px !important; padding: .4rem 1rem !important; }
.dropdown-menu { position: absolute; right: 0; top: 100%; background: white; box-shadow: var(--shadow); border-radius: 8px; min-width: 180px; padding: .5rem 0; display: none; list-style: none; }
.dropdown:hover .dropdown-menu { display: block; }
.dropdown-menu a { display: block; padding: .5rem 1rem; }

/* Pills */
.pill { display: inline-block; padding: .5rem 1.1rem; border-radius: 999px; background: white; color: var(--text); border: 1px solid var(--border); font-weight: 500; cursor: pointer; transition: .2s; }
.pill:hover, .pill.active { background: var(--primary); color: white; border-color: var(--primary); }
.pill-primary { background: var(--primary); color: white; border-color: var(--primary); }
.btn-pill { background: var(--primary); color: white !important; border-radius: 999px !important; }

/* Buttons */
.btn { display: inline-block; padding: .6rem 1.2rem; border-radius: 8px; border: none; cursor: pointer; font-weight: 500; transition: .2s; text-align: center; }
.btn-primary { background: var(--primary); color: white; }
.btn-primary:hover { background: var(--primary-dark); }
.btn-outline { background: white; color: var(--primary); border: 1px solid var(--primary); }
.btn-danger { background: var(--danger); color: white; }
.btn-sm { padding: .35rem .7rem; font-size: .85rem; }
.btn-block { display: block; width: 100%; }

/* Hero */
.hero { text-align: center; padding: 4rem 1rem; background: linear-gradient(135deg, #eef2ff 0%, #f8fafc 100%); border-radius: var(--radius); margin-bottom: 2rem; }
.hero h1 { font-size: clamp(1.8rem, 4vw, 2.75rem); margin-bottom: .75rem; }
.hero p { color: var(--muted); margin-bottom: 1.5rem; font-size: 1.1rem; }
.hero-actions { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

/* Category pills */
.category-pills { display: flex; gap: .5rem; flex-wrap: wrap; margin-bottom: 2rem; }

/* Grid & Cards */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1.5rem; }
.card { background: var(--card); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); transition: transform .2s; }
.card:hover { transform: translateY(-4px); }
.card img { width: 100%; height: 170px; object-fit: cover; }
.card-body { padding: 1rem; }
.card-body h3 { font-size: 1.05rem; margin: .35rem 0; }
.card-meta { display: flex; justify-content: space-between; color: var(--muted); font-size: .85rem; margin-top: .5rem; }
.card-footer { display: flex; justify-content: space-between; align-items: center; margin-top: .85rem; padding-top: .85rem; border-top: 1px solid var(--border); }
.price { color: var(--primary); font-weight: 700; font-size: 1.15rem; }
.tag { background: #eef2ff; color: var(--primary); padding: .15rem .6rem; border-radius: 999px; font-size: .75rem; }

/* Auth */
.auth-wrap { display: flex; justify-content: center; padding: 3rem 1rem; }
.auth-card { background: white; padding: 2rem; border-radius: var(--radius); box-shadow: var(--shadow); width: 100%; max-width: 420px; }
.auth-card h2 { text-align: center; margin-bottom: 1.5rem; }
.form-group { margin-bottom: 1rem; }
.form-group label { display: block; margin-bottom: .35rem; font-weight: 500; }
.form-group input, .form-group textarea, .form-group select {
    width: 100%; padding: .7rem; border: 1px solid var(--border); border-radius: 8px; font-size: 1rem; font-family: inherit;
}
.form-group input:focus, .form-group textarea:focus { outline: none; border-color: var(--primary); }
.text-center { text-align: center; margin-top: 1rem; }

/* Alerts */
.alert { padding: .75rem 1rem; border-radius: 8px; margin-bottom: 1rem; }
.alert-error { background: #fee2e2; color: #991b1b; }
.alert-success { background: #d1fae5; color: #065f46; }

/* Cart / Checkout */
.cart-grid, .checkout-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 1.5rem; }
.cart-item, .summary-row { display: flex; justify-content: space-between; padding: .85rem 0; border-bottom: 1px solid var(--border); align-items: center; }
.cart-summary, .card-box { background: white; padding: 1.5rem; border-radius: var(--radius); box-shadow: var(--shadow); }
.cart-summary .btn { margin-top: 1rem; }
.payment-option { display: block; padding: 1rem; border: 1px solid var(--border); border-radius: 8px; margin: .5rem 0; cursor: pointer; }
.payment-option:hover { border-color: var(--primary); background: #eef2ff; }
.empty-state { text-align: center; padding: 4rem 1rem; }
.empty-state i { font-size: 3rem; color: var(--muted); margin-bottom: 1rem; }
.empty-state p { color: var(--muted); margin-bottom: 1.5rem; }

/* Stats */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 1rem; margin-bottom: 2rem; }
.stat-card { background: white; padding: 1.5rem; border-radius: var(--radius); box-shadow: var(--shadow); text-align: center; }
.stat-card i { color: var(--primary); font-size: 1.6rem; margin-bottom: .5rem; }
.stat-card h3 { font-size: 1.6rem; }
.stat-card p { color: var(--muted); font-size: .9rem; }
.action-pills { display: flex; gap: .75rem; flex-wrap: wrap; }

/* Footer */
.footer { background: #0f172a; color: #cbd5e1; padding: 3rem 0 1rem; margin-top: 4rem; }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 2rem; padding-bottom: 2rem; }
.footer h4 { color: white; margin-bottom: .75rem; }
.footer a { display: block; color: #cbd5e1; padding: .2rem 0; }
.footer a:hover { color: white; }
.footer-bottom { border-top: 1px solid #1e293b; padding-top: 1rem; text-align: center; color: #94a3b8; font-size: .9rem; }

/* Responsive */
@media (max-width: 768px) {
    .nav-toggle { display: block; }
    .nav-menu { position: absolute; top: 100%; right: 0; background: white; flex-direction: column; width: 220px; padding: 1rem; box-shadow: var(--shadow); border-radius: 8px; display: none; }
    .nav-menu.open { display: flex; }
    .cart-grid, .checkout-grid { grid-template-columns: 1fr; }
}