/* ============================================
   Code Market - Modern CSS Stylesheet
   ============================================ */

:root {
    --primary-color: #6366f1;
    --secondary-color: #8b5cf6;
    --success-color: #10b981;
    --danger-color: #ef4444;
    --warning-color: #f59e0b;
    --dark-color: #1f2937;
    --light-color: #f9fafb;
    --border-color: #e5e7eb;
    --text-color: #374151;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.08);
}

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: var(--text-color);
    background-color: var(--light-color);
    line-height: 1.6;
}

/* ============================================
   Navbar Styles
   ============================================ */

.navbar {
    background: linear-gradient(135deg, var(--dark-color) 0%, #111827 100%);
    box-shadow: var(--shadow-sm);
    padding: 1rem 0;
}

.navbar-brand {
    font-size: 1.5rem;
    font-weight: 700;
    color: white !important;
    letter-spacing: -0.5px;
}

.navbar-nav .nav-link {
    color: #d1d5db !important;
    margin-left: 1.5rem;
    transition: color 0.3s ease;
    font-weight: 500;
}

.navbar-nav .nav-link:hover {
    color: var(--primary-color) !important;
}

.navbar-nav .nav-link.active {
    color: var(--primary-color) !important;
}

/* ============================================
   Hero Section
   ============================================ */

.hero {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    padding: 80px 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 500px;
    height: 500px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
}

.hero h1 {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 1rem;
    position: relative;
    z-index: 1;
}

.hero p {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    opacity: 0.95;
    position: relative;
    z-index: 1;
}

/* ============================================
   Cards & Products
   ============================================ */

.card {
    border: none;
    border-radius: 12px;
    transition: all 0.3s ease;
    overflow: hidden;
}

.card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow);
}

.product-card {
    position: relative;
    background: white;
    border-radius: 12px;
    overflow: hidden;
}

.product-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.product-card:hover img {
    transform: scale(1.05);
}

.product-card .card-body {
    padding: 1.5rem;
}

.product-card .card-title {
    font-weight: 700;
    color: var(--dark-color);
    margin-bottom: 0.5rem;
}

.product-card .card-text {
    font-size: 0.9rem;
    color: #6b7280;
    margin-bottom: 1rem;
}

.product-price {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

.product-rating {
    color: #fbbf24;
    font-size: 0.9rem;
}

/* ============================================
   Buttons
   ============================================ */

.btn {
    border-radius: 8px;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(99, 102, 241, 0.3);
    color: white;
}

.btn-outline-primary {
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-outline-primary:hover {
    background: var(--primary-color);
    color: white;
}

.btn-success {
    background: var(--success-color);
    color: white;
}

.btn-danger {
    background: var(--danger-color);
    color: white;
}

/* ============================================
   Forms
   ============================================ */

.form-control, .form-select {
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.form-label {
    font-weight: 600;
    color: var(--dark-color);
    margin-bottom: 0.5rem;
}

/* ============================================
   Alerts
   ============================================ */

.alert {
    border: none;
    border-radius: 8px;
    padding: 1rem 1.5rem;
    font-weight: 500;
}

.alert-success {
    background: #d1fae5;
    color: #065f46;
}

.alert-danger {
    background: #fee2e2;
    color: #7f1d1d;
}

.alert-warning {
    background: #fef3c7;
    color: #78350f;
}

.alert-info {
    background: #dbeafe;
    color: #0c2340;
}

/* ============================================
   Tables
   ============================================ */

.table {
    background: white;
    border-radius: 8px;
    overflow: hidden;
}

.table thead {
    background: var(--light-color);
    border-bottom: 2px solid var(--border-color);
}

.table th {
    font-weight: 700;
    color: var(--dark-color);
    padding: 1rem;
}

.table td {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.table tbody tr:hover {
    background: #f3f4f6;
}

/* ============================================
   Dashboard Stats
   ============================================ */

.stat-card {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow);
}

.stat-card h3 {
    color: #6b7280;
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 1rem;
}

.stat-card .number {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--primary-color);
}

/* ============================================
   Footer
   ============================================ */

footer {
    background: var(--dark-color);
    color: white;
    padding: 2rem 0;
    margin-top: 4rem;
}

footer p {
    margin: 0;
}

/* ============================================
   Responsive Design
   ============================================ */

@media (max-width: 768px) {
    .hero h1 {
        font-size: 2rem;
    }

    .hero p {
        font-size: 1rem;
    }

    .navbar-nav .nav-link {
        margin-left: 0;
        padding: 0.5rem 0;
    }

    .product-card img {
        height: 150px;
    }
}

/* ============================================
   Utility Classes
   ============================================ */

.text-primary {
    color: var(--primary-color) !important;
}

.text-success {
    color: var(--success-color) !important;
}

.text-danger {
    color: var(--danger-color) !important;
}

.bg-light-primary {
    background: rgba(99, 102, 241, 0.1);
}

.rounded-lg {
    border-radius: 12px;
}

.shadow-lg {
    box-shadow: var(--shadow);
}

.transition {
    transition: all 0.3s ease;
}

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