@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');

:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --primary-light: #ede9fe;
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --bg: #f8fafc;
    --card: #ffffff;
    --text: #0f172a;
    --text-muted: #64748b;
    --border: #e2e8f0;
    --shadow: 0 4px 6px -1px rgba(0,0,0,0.07), 0 2px 4px -1px rgba(0,0,0,0.04);
    --shadow-lg: 0 20px 25px -5px rgba(0,0,0,0.1), 0 10px 10px -5px rgba(0,0,0,0.04);
}

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

body {
    font-family: 'Inter', sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
}

/* ── NAVBAR ── */
.navbar {
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(12px);
    padding: 0 5%;
    height: 68px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 1px 0 var(--border);
    position: sticky;
    top: 0;
    z-index: 999;
}
.logo {
    font-size: 1.5rem;
    font-weight: 900;
    background: linear-gradient(135deg, var(--primary) 0%, #8b5cf6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-decoration: none;
    letter-spacing: -0.5px;
}
.nav-links { display: flex; align-items: center; gap: 0.5rem; }
.nav-links a {
    text-decoration: none;
    color: var(--text-muted);
    padding: 0.5rem 0.9rem;
    border-radius: 8px;
    font-weight: 500;
    font-size: 0.92rem;
    transition: all 0.2s ease;
}
.nav-links a:hover { color: var(--primary); background: var(--primary-light); }
.nav-cart-badge {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}
.nav-cart-badge .badge {
    background: var(--danger);
    color: white;
    border-radius: 50%;
    width: 18px; height: 18px;
    display: flex; align-items: center; justify-content: center;
    font-size: 0.7rem; font-weight: 700;
    position: absolute; top: -4px; right: -4px;
}

/* ── BUTTONS ── */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.55rem 1.2rem;
    background: var(--primary);
    color: white !important;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.2s ease;
    white-space: nowrap;
}
.btn:hover { background: var(--primary-dark); transform: translateY(-1px); box-shadow: 0 4px 12px rgba(99,102,241,0.4); }
.btn-success { background: var(--success); }
.btn-success:hover { background: #059669; box-shadow: 0 4px 12px rgba(16,185,129,0.4); }
.btn-danger-btn { background: var(--danger); }
.btn-danger-btn:hover { background: #dc2626; box-shadow: 0 4px 12px rgba(239,68,68,0.4); }

/* ── CONTAINER ── */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2.5rem 5%;
}

/* ── HERO ── */
.hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #6366f1 100%);
    border-radius: 24px;
    padding: 4rem 3rem;
    text-align: center;
    color: white;
    margin-bottom: 3rem;
    position: relative;
    overflow: hidden;
}
.hero::before {
    content: '';
    position: absolute; inset: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Ccircle cx='30' cy='30' r='4'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}
.hero h1 { font-size: 3rem; font-weight: 900; margin-bottom: 1rem; position: relative; letter-spacing: -1px; }
.hero p { font-size: 1.15rem; opacity: 0.85; position: relative; margin-bottom: 2rem; }
.hero .hero-btns { display: flex; gap: 1rem; justify-content: center; position: relative; flex-wrap: wrap; }
.hero .btn-outline {
    background: transparent;
    border: 2px solid rgba(255,255,255,0.7);
    color: white !important;
}
.hero .btn-outline:hover { background: rgba(255,255,255,0.15); box-shadow: none; transform: translateY(-1px); }
.hero .btn-white { background: white; color: var(--primary) !important; font-weight: 700; }
.hero .btn-white:hover { background: #f1f5f9; box-shadow: 0 8px 20px rgba(0,0,0,0.2); }

/* ── SECTION TITLE ── */
.section-title {
    font-size: 1.6rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    color: var(--text);
    display: flex; align-items: center; gap: 0.5rem;
}

/* ── PRODUCT GRID ── */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 1.5rem;
}
.product-card {
    background: var(--card);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}
.product-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.product-image { width: 100%; height: 200px; object-fit: cover; display: block; }
.product-info { padding: 1.2rem; }
.product-badge {
    display: inline-block;
    background: var(--primary-light);
    color: var(--primary);
    padding: 2px 10px;
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 600;
    margin-bottom: 0.6rem;
}
.product-title { font-size: 1rem; font-weight: 700; margin-bottom: 0.3rem; color: var(--text); }
.product-price { color: var(--primary); font-size: 1.2rem; font-weight: 800; margin: 0.6rem 0 1rem; }

/* ── FORMS ── */
.auth-form {
    background: var(--card);
    padding: 2.5rem;
    border-radius: 20px;
    max-width: 420px;
    margin: 3rem auto;
    box-shadow: var(--shadow-lg);
}
.auth-form h2 { font-size: 1.6rem; font-weight: 800; margin-bottom: 0.3rem; }
.form-group { margin-bottom: 1.1rem; }
.form-group label { display: block; margin-bottom: 0.45rem; font-weight: 600; font-size: 0.9rem; color: #374151; }
.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1.5px solid var(--border);
    border-radius: 10px;
    outline: none;
    font-size: 0.95rem;
    font-family: inherit;
    transition: border-color 0.2s, box-shadow 0.2s;
    background: #fafafa;
    color: var(--text);
}
.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99,102,241,0.12);
    background: white;
}

/* ── ALERTS ── */
.alert { padding: 0.9rem 1.2rem; border-radius: 10px; font-weight: 600; margin-bottom: 1rem; }
.alert-success { background: #d1fae5; color: #059669; }
.alert-danger  { background: #fee2e2; color: #dc2626; }

/* ── STATUS BADGES ── */
.badge-pending   { background:#fef3c7; color:#d97706; padding:4px 12px; border-radius:20px; font-size:0.8rem; font-weight:700; }
.badge-shipping  { background:#dbeafe; color:#2563eb; padding:4px 12px; border-radius:20px; font-size:0.8rem; font-weight:700; }
.badge-completed { background:#d1fae5; color:#059669; padding:4px 12px; border-radius:20px; font-size:0.8rem; font-weight:700; }
.badge-canceled  { background:#fee2e2; color:#dc2626; padding:4px 12px; border-radius:20px; font-size:0.8rem; font-weight:700; }

/* ── TABLES ── */
.table-wrap { background: var(--card); border-radius: 16px; overflow: hidden; box-shadow: var(--shadow); }
.table-wrap table { width: 100%; border-collapse: collapse; }
.table-wrap th { background: #f8fafc; padding: 1rem 1.2rem; text-align: left; font-weight: 700; color: var(--text-muted); font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.05em; border-bottom: 1px solid var(--border); }
.table-wrap td { padding: 1rem 1.2rem; border-bottom: 1px solid #f1f5f9; vertical-align: middle; }
.table-wrap tr:last-child td { border-bottom: none; }
.table-wrap tr:hover td { background: #fafbff; }

/* ── FOOTER ── */
footer {
    text-align: center;
    padding: 2rem;
    color: var(--text-muted);
    font-size: 0.88rem;
    border-top: 1px solid var(--border);
    margin-top: 4rem;
}

@media (max-width: 768px) {
    .navbar { padding: 0 1rem; }
    .hero { padding: 2.5rem 1.5rem; }
    .hero h1 { font-size: 2rem; }
    .container { padding: 1.5rem 1rem; }
    .product-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 1rem; }
}
