:root {
    /* Colors */
    --primary: #2563EB; /* Deep Blue */
    --primary-dark: #1E40AF;
    --secondary: #64748B; /* Slate Gray */
    --accent: #F59E0B; /* Amber for bids/urgency */
    --danger: #DC2626; /* Darker red for urgent timers */
    --success: #10B981;
    --surface-hover: #F1F5F9;
    --background: #F8FAFC;
    --surface: #FFFFFF;
    --text-main: #0F172A;
    --text-muted: #64748B;
    --border: #E2E8F0;

    /* Spacing */
    --space-xs: 4px;
    --space-sm: 8px;
    --space-md: 16px;
    --space-lg: 24px;
    --space-xl: 32px;
    --space-2xl: 48px;
    --container-max: 1200px;

    /* Typography */
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: var(--font-sans);
    background-color: var(--background);
    color: var(--text-main);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Layout */
.container {
    width: 100%;
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--space-md);
}

main {
    flex: 1;
    width: 100%;
}

/* Navigation */
.navbar {
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
}

.navbar-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.brand {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary);
    text-decoration: none;
    letter-spacing: -0.02em;
}

.nav-links {
    display: flex;
    gap: var(--space-lg);
    align-items: center;
}

.nav-link {
    text-decoration: none;
    color: var(--text-muted);
    font-weight: 500;
    transition: color 0.2s;
}

.nav-link:hover, .nav-link.active {
    color: var(--primary);
}

.nav-actions {
    display: flex;
    gap: var(--space-md);
    align-items: center;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s;
    cursor: pointer;
    border: none;
    font-size: 0.95rem;
}

.btn-primary {
    background: var(--primary);
    color: white;
    box-shadow: 0 4px 6px -1px rgba(37, 99, 235, 0.2);
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-main);
}

.btn-outline:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: #F8FAFC;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 0.85rem;
}

/* Hero Section */
.hero {
    background: var(--surface);
    padding: var(--space-2xl) 0;
    text-align: center;
}

.hero h1 {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: var(--space-md);
    color: var(--text-main);
    line-height: 1.1;
}

.hero p {
    font-size: 1.25rem;
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto var(--space-xl);
}

/* Cards & Grid */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: var(--space-lg);
}

.grid-sidebar {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: var(--space-xl);
    align-items: start;
}

@media (max-width: 768px) {
    .grid-sidebar {
        grid-template-columns: 1fr;
    }
}

.card {
    background: var(--surface);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    flex-direction: column;
    border: 1px solid var(--border);
}

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

.card.card-horizontal {
    flex-direction: row;
}
.card.card-horizontal .card-image-container {
    width: 200px;
    height: auto;
}

.card-image-container {
    height: 240px; /* Taller images for auction items */
    background: #f1f5f9;
    position: relative;
}

.placeholder-image {
    width: 100%;
    height: 100%;
    background-color: #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #94a3b8;
    font-weight: 500;
}

.badge {
    position: absolute;
    top: var(--space-md);
    right: var(--space-md);
    background: rgba(255,255,255,0.9);
    padding: 4px 8px;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-main);
    box-shadow: var(--shadow-sm);
}

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

.card-body {
    padding: var(--space-md);
    flex: 1;
    display: flex;
    flex-direction: column;
}

.card-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin: 0 0 var(--space-sm);
    color: var(--text-main);
}

.card-meta {
    display: flex;
    justify-content: space-between;
    margin-bottom: var(--space-md);
    font-size: 0.9rem;
    color: var(--text-muted);
}

.current-bid {
    color: var(--text-main);
    font-weight: 800;
    font-size: 1.25rem;
}

.price-label {
    font-size: 0.8rem;
    text-transform: uppercase;
    color: var(--text-muted);
    font-weight: 600;
    margin-bottom: 2px;
}

.timer {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: var(--danger);
    font-weight: 600;
    font-size: 0.9rem;
}

.timer-icon {
    width: 16px;
    height: 16px;
    fill: currentColor;
}

.bid-info {
    margin-top: auto;
}

/* Forms */
.form-group {
    margin-bottom: var(--space-md);
}

.input-group {
    display: flex;
    gap: var(--space-sm);
}
.input-group .form-input {
    flex: 1;
}

.filter-group {
    margin-bottom: var(--space-lg);
    border-bottom: 1px solid var(--border);
    padding-bottom: var(--space-lg);
}
.filter-group:last-child {
    border-bottom: none;
}
.filter-title {
    font-weight: 700;
    margin-bottom: var(--space-md);
    display: block;
}
.checkbox-label {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    margin-bottom: var(--space-sm);
    cursor: pointer;
    font-size: 0.95rem;
    color: var(--text-muted);
}
.checkbox-label:hover {
    color: var(--primary);
}

.form-label {
    display: block;
    margin-bottom: var(--space-sm);
    font-weight: 600;
    font-size: 0.9rem;
}

.form-input, .form-textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 1rem;
    transition: border-color 0.2s;
}

.form-input:focus, .form-textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* Cart & Tables */
.table-container {
    background: var(--surface);
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    overflow: hidden;
}

.table {
    width: 100%;
    border-collapse: collapse;
}

.table th, .table td {
    padding: var(--space-md);
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.table th {
    background: #f8fafc;
    font-weight: 600;
    color: var(--text-muted);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.table tr:last-child td {
    border-bottom: none;
}

/* Profile */
.profile-header {
    background: var(--surface);
    padding: var(--space-xl);
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: var(--space-lg);
    margin-bottom: var(--space-xl);
}

.avatar-placeholder {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: 700;
}

/* Sections */
.section {
    padding: var(--space-2xl) 0;
}

.section-title {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: var(--space-lg);
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
}

/* Footer */
.footer {
    background: var(--surface);
    border-top: 1px solid var(--border);
    padding: var(--space-2xl) 0;
    margin-top: auto;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--space-xl);
}

.footer-col h4 {
    margin-top: 0;
    margin-bottom: var(--space-md);
}

.footer-link {
    display: block;
    color: var(--text-muted);
    text-decoration: none;
    margin-bottom: var(--space-sm);
}

.footer-link:hover {
    color: var(--primary);
}
