/* --- Root Variables & Reset --- */
:root {
    --primary-color: #2563eb;    /* Trustworthy Blue */
    --secondary-color: #10b981;  /* Growth Green */
    --accent-color: #f59e0b;     /* Warm Amber for Bids */
    --dark-bg: #1f2937;
    --light-bg: #f9fafb;
    --white: #ffffff;
    --text-main: #374151;
    --text-muted: #6b7280;
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    line-height: 1.6;
    color: var(--text-main);
    background-color: var(--light-bg);
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

/* --- Typography --- */
h1, h2, h3 {
    margin-bottom: 1rem;
    font-weight: 700;
}

a {
    text-decoration: none;
    transition: var(--transition);
}

/* --- Buttons --- */
.btn-primary, .btn-secondary {
    padding: 12px 24px;
    border-radius: 6px;
    font-weight: 700;
    text-decoration: none;
    display: inline-block;
    cursor: pointer;
    border: none;
    text-align: center;
    transition: var(--transition);
}

.btn-primary { background: var(--primary-color); color: var(--white); }
.btn-primary:hover { background: #1d4ed8; transform: translateY(-2px); }

.btn-secondary { background: var(--secondary-color); color: var(--white); }
.btn-secondary:hover { background: #059669; transform: translateY(-2px); }

/* --- Header & Navigation --- */
header {
    background: var(--white);
    padding: 1rem 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-links a {
    margin-left: 2rem;
    color: var(--text-main);
    font-size: 0.95rem;
}

.nav-links a:hover { color: var(--primary-color); }

/* --- Hero Section --- */
.hero {
    background: linear-gradient(rgba(0,0,0,0.6), rgba(0,0,0,0.6)), url('images/hero-bg.jpg') center/cover;
    color: var(--white);
    padding: 120px 0;
    text-align: center;
}

.hero h1 { font-size: 3.5rem; margin-bottom: 1rem; }
.hero p { font-size: 1.25rem; margin-bottom: 2rem; opacity: 0.9; }

.hero-btns {
    display: flex;
    justify-content: center;
    gap: 20px;
}

/* --- Stats Bar --- */
.stats-bar {
    background: var(--white);
    padding: 2.5rem 0;
    margin-top: -50px;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    position: relative; /* Ensures it sits above hero shadow */
    z-index: 10;
}

.stats-grid {
    display: flex;
    justify-content: space-around;
    align-items: center;
    text-align: center;
}

.stat-item { flex: 1; }
.stat-item strong {
    display: block;
    font-size: 1.8rem;
    color: var(--primary-color);
    margin-bottom: 0.25rem;
}
.stat-item span { color: var(--text-muted); font-size: 0.9rem; font-weight: 500; }

/* --- Section Layouts --- */
section { padding: 100px 0; }

.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 30px;
}

/* --- Card Styling --- */
.card {
    background: var(--white);
    border: 1px solid #eee;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    position: relative; /* For auction badges */
}

.card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.1);
}

.card-img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    background-color: #eee; /* Fallback for missing images */
}

.card-content {
    padding: 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.card-tag {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.price {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-main);
    margin: 1rem 0;
}

/* --- Auction Variations --- */
.card.auction {
    border: 2px solid var(--accent-color);
}

.auction-badge {
    background: var(--accent-color);
    color: var(--white);
    padding: 6px 12px;
    border-radius: 0 0 0 8px;
    font-size: 0.75rem;
    font-weight: 800;
    position: absolute;
    top: 0;
    right: 0;
    z-index: 5;
}

.timer {
    background: #fff7ed;
    color: #c2410c;
    padding: 0.6rem;
    border-radius: 6px;
    font-size: 0.85rem;
    text-align: center;
    margin-bottom: 1.25rem;
    font-weight: 700;
    border: 1px dashed var(--accent-color);
}

/* --- Footer --- */
footer {
    background: var(--dark-bg);
    color: var(--white);
    padding: 60px 0;
}

.footer-links { margin: 2rem 0; }
.footer-links a { color: #9ca3af; margin: 0 15px; }
.footer-links a:hover { color: var(--white); }

/* --- Responsive --- */
@media (max-width: 768px) {
    .hero h1 { font-size: 2.2rem; }
    .hero-btns { flex-direction: column; align-items: center; }
    .btn-primary, .btn-secondary { width: 80%; }
    .stats-grid { flex-direction: column; gap: 2rem; }
    .nav-links { display: none; }
}

/* --- Category Page Specifics --- */
.category-card {
    text-align: center;
    text-decoration: none;
    color: inherit;
    border: 2px solid transparent;
}

.category-card:hover {
    border-color: var(--primary-color);
}

.category-card .card-content {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.category-card h3 {
    color: var(--primary-color);
    margin-top: 10px;
}

.category-card .btn-primary {
    margin-top: 15px;
    width: 100%;
}

/* --- Auth Pages (Login/Reg) --- */
.auth-container {
    min-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
}

.auth-card {
    background: var(--white);
    width: 100%;
    max-width: 450px;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.1);
    border: 1px solid #eee;
}

.auth-header {
    text-align: center;
    margin-bottom: 30px;
}

.auth-header h2 {
    color: var(--primary-color);
    margin-bottom: 5px;
}

.auth-header p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text-main);
}

.auth-form input {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 1rem;
    transition: var(--transition);
}

.auth-form input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.auth-btn {
    width: 100%;
    padding: 14px;
    font-size: 1rem;
    margin-top: 10px;
}

.auth-footer {
    text-align: center;
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid #eee;
    font-size: 0.9rem;
}

.auth-footer a {
    color: var(--primary-color);
    font-weight: 600;
}

/* Alert Box for Errors */
.alert-error {
    background: #fee2e2;
    color: #b91c1c;
    padding: 12px;
    border-radius: 6px;
    margin-bottom: 20px;
    font-size: 0.85rem;
    text-align: center;
    border: 1px solid #fecaca;
}

/* Dashboard Specifics */
.badge {
    display: inline-block;
    font-weight: 700;
}

aside .card {
    position: sticky;
    top: 100px; /* Keeps your profile visible as you scroll */
}

.dashboard-welcome h1 {
    font-size: 2.2rem;
    margin-bottom: 10px;
}

/* Responsive grid for mobile */
@media (max-width: 768px) {
    main div[style*="grid-template-columns: 1fr 3fr"] {
        grid-template-columns: 1fr !important;
    }
}

/* The main wrapper to hold sidebar and content */
.dashboard-wrapper {
    display: flex;
    min-height: 100vh;
}

/* The Sidebar Navigation */
.sidenav {
    width: 250px;
    background-color: #ffffff;
    border-right: 1px solid #e5e7eb;
    display: flex;
    flex-direction: column;
    padding: 20px;
    position: sticky;
    top: 0;
    height: 100vh;
}

/* Sidebar Links */
.sidenav-link {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    text-decoration: none;
    color: #4b5563;
    font-weight: 500;
    border-radius: 8px;
    margin-bottom: 5px;
    transition: all 0.2s;
}

.sidenav-link:hover {
    background-color: #f3f4f6;
    color: var(--primary-color);
}

.sidenav-link.active {
    background-color: #eff6ff;
    color: var(--primary-color);
}

/* Main Content Area */
.main-content {
    flex: 1; /* Takes up remaining space */
    padding: 40px;
    background-color: #f9fafb;
}