/* ============================================================
   Juveau Auction — Main Stylesheet
   Color palette:
     Navy    #1e3a5f  (primary)
     Gold    #c9a84c  (accent)
     White   #ffffff
     Light   #f8f9fa
     Dark    #0d1b2a
   ============================================================ */

:root {
    --color-primary:   #1e3a5f;
    --color-primary-d: #15293f;
    --color-accent:    #c9a84c;
    --color-accent-l:  #e2c475;
    --color-dark:      #0d1b2a;
    --color-light:     #f4f7fb;
    --color-muted:     #6c757d;
    --radius:          10px;
    --transition:      0.2s ease;
}

/* ─── Base ──────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--color-light);
    color: #1a1a2e;
    font-size: 15px;
    line-height: 1.6;
}

a { color: var(--color-primary); text-decoration: none; }
a:hover { color: var(--color-accent); }

/* ─── Navbar ────────────────────────────────────────────── */
.site-navbar {
    background: var(--color-dark);
    border-bottom: 3px solid var(--color-accent);
    padding: 0.5rem 0;
    z-index: 1030;
}

.site-navbar .navbar-brand {
    color: var(--color-accent) !important;
    font-weight: 800;
    font-size: 1.4rem;
    letter-spacing: -0.5px;
}

.site-navbar .nav-link {
    color: rgba(255,255,255,0.85) !important;
    font-weight: 500;
    padding: 0.5rem 0.75rem !important;
    border-radius: 6px;
    transition: background var(--transition), color var(--transition);
}

.site-navbar .nav-link:hover,
.site-navbar .nav-link.active {
    color: var(--color-accent) !important;
    background: rgba(201,168,76,0.12);
}

.bid-balance-display {
    font-weight: 600;
    font-size: 0.88rem;
    background: rgba(201,168,76,0.18);
    border-radius: 20px;
    padding: 4px 12px !important;
}

/* ─── Hero / Banners ────────────────────────────────────── */
.site-header-banner { width: 100%; overflow: hidden; }

.hero-section {
    background: linear-gradient(135deg, var(--color-dark) 0%, var(--color-primary) 60%, #2a5298 100%);
    color: #fff;
    padding: 80px 0 60px;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: -50px; right: -50px;
    width: 400px; height: 400px;
    background: radial-gradient(circle, rgba(201,168,76,0.15) 0%, transparent 70%);
    pointer-events: none;
}

.hero-section h1 {
    font-weight: 800;
    font-size: clamp(2rem, 5vw, 3.5rem);
    line-height: 1.1;
    color: #fff;
}

.hero-section .hero-accent {
    color: var(--color-accent);
    display: block;
}

/* ─── Auction Cards ─────────────────────────────────────── */
.auction-card {
    background: #fff;
    border-radius: var(--radius);
    box-shadow: 0 2px 12px rgba(0,0,0,0.07);
    overflow: hidden;
    transition: transform var(--transition), box-shadow var(--transition);
    border: 1px solid rgba(0,0,0,0.05);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.auction-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 28px rgba(0,0,0,0.12);
}

.auction-card .card-img-wrap {
    position: relative;
    overflow: hidden;
    height: 200px;
    background: #f1f5f9;
}

.auction-card .card-img-wrap img {
    width: 100%; height: 100%;
    object-fit: contain;
    transition: transform 0.35s ease;
    padding: 12px;
}

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

.auction-card .card-body {
    padding: 16px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.auction-card .auction-title {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--color-dark);
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Current price badge */
.auction-price {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--color-accent);
    font-variant-numeric: tabular-nums;
}

/* Countdown timer */
.auction-timer {
    font-size: 1.2rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    color: #fff;
    background: var(--color-primary);
    border-radius: 8px;
    padding: 6px 14px;
    display: inline-block;
    min-width: 80px;
    text-align: center;
    letter-spacing: 1px;
    transition: background 0.3s;
}

.auction-timer.urgent   { background: #dc2626; animation: pulse-red 0.8s infinite; }
.auction-timer.warning  { background: #d97706; }

@keyframes pulse-red {
    0%, 100% { opacity: 1; }
    50%       { opacity: 0.7; }
}

/* Status badges */
.badge-active    { background: #10b981; color: #fff; }
.badge-scheduled { background: #6366f1; color: #fff; }
.badge-ended     { background: #6b7280; color: #fff; }

/* Bid button */
.btn-bid {
    background: linear-gradient(135deg, var(--color-accent), var(--color-accent-l));
    color: var(--color-dark);
    font-weight: 700;
    border: none;
    padding: 10px 24px;
    border-radius: 8px;
    font-size: 1rem;
    transition: transform var(--transition), box-shadow var(--transition), filter var(--transition);
    letter-spacing: 0.3px;
}

.btn-bid:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(201,168,76,0.5);
    filter: brightness(1.05);
    color: var(--color-dark);
}

.btn-bid:active { transform: translateY(0); }
.btn-bid:disabled { filter: grayscale(0.5); opacity: 0.7; cursor: not-allowed; }

/* ─── Bid Pack Cards ────────────────────────────────────── */
.bid-pack-card {
    background: #fff;
    border-radius: var(--radius);
    box-shadow: 0 2px 12px rgba(0,0,0,0.07);
    padding: 28px 20px;
    text-align: center;
    transition: transform var(--transition), box-shadow var(--transition);
    position: relative;
    border: 2px solid transparent;
    height: 100%;
}

.bid-pack-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 32px rgba(0,0,0,0.13);
    border-color: var(--color-accent);
}

.bid-pack-card.featured {
    border-color: var(--color-accent);
    background: linear-gradient(180deg, #fffbf0 0%, #fff 100%);
}

.bid-pack-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--color-accent);
    color: var(--color-dark);
    font-size: 0.72rem;
    font-weight: 700;
    padding: 3px 12px;
    border-radius: 20px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    white-space: nowrap;
}

.bid-pack-count {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--color-primary);
    line-height: 1;
}

.bid-pack-bonus {
    font-size: 0.8rem;
    color: #10b981;
    font-weight: 600;
}

.bid-pack-price {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--color-dark);
}

/* ─── Auction Detail Page ───────────────────────────────── */
.auction-detail-img {
    border-radius: var(--radius);
    background: #fff;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
    padding: 24px;
    text-align: center;
}

.auction-detail-img img {
    max-height: 380px;
    object-fit: contain;
    width: 100%;
}

.bid-history-list {
    max-height: 320px;
    overflow-y: auto;
    font-size: 0.87rem;
}

.bid-history-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    border-bottom: 1px solid #f1f5f9;
    transition: background 0.15s;
}

.bid-history-item:hover     { background: #f8fafc; }
.bid-history-item.latest    { background: #fefce8; font-weight: 600; }
.bid-history-item .bidder   { color: var(--color-primary); font-weight: 500; }
.bid-history-item .bid-time { color: var(--color-muted); font-size: 0.78rem; }

/* ─── Auth Pages ────────────────────────────────────────── */
.auth-card {
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 4px 32px rgba(0,0,0,0.1);
    padding: 40px;
    max-width: 480px;
    margin: 0 auto;
}

.auth-card .auth-logo {
    font-weight: 800;
    font-size: 1.5rem;
    color: var(--color-primary);
}

/* ─── Forms ─────────────────────────────────────────────── */
.form-control:focus, .form-select:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(30,58,95,0.15);
}

/* ─── Cart & Checkout ───────────────────────────────────── */
.cart-table th { background: var(--color-primary); color: #fff; font-weight: 600; }
.order-total-row { font-weight: 700; font-size: 1.05rem; }

/* ─── Admin Panel ───────────────────────────────────────── */
.admin-sidebar {
    background: var(--color-dark);
    min-height: 100vh;
    width: 260px;
    position: fixed;
    top: 0; left: 0;
    overflow-y: auto;
    z-index: 1000;
    transition: transform 0.3s ease;
}

.admin-sidebar .sidebar-brand {
    padding: 20px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    color: var(--color-accent);
    font-weight: 800;
    font-size: 1.2rem;
    display: block;
}

.admin-sidebar .nav-link {
    color: rgba(255,255,255,0.75);
    padding: 10px 20px;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 10px;
    border-left: 3px solid transparent;
    transition: all var(--transition);
}

.admin-sidebar .nav-link:hover,
.admin-sidebar .nav-link.active {
    color: #fff;
    background: rgba(255,255,255,0.07);
    border-left-color: var(--color-accent);
}

.admin-sidebar .nav-section {
    padding: 12px 20px 4px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: rgba(255,255,255,0.35);
}

.admin-content {
    margin-left: 260px;
    min-height: 100vh;
    background: #f4f7fb;
}

.admin-topbar {
    background: #fff;
    border-bottom: 1px solid #e5e7eb;
    padding: 12px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 900;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}

.admin-main { padding: 24px; }

.stat-card {
    background: #fff;
    border-radius: var(--radius);
    padding: 20px 24px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.06);
    display: flex;
    align-items: center;
    gap: 16px;
    border-left: 4px solid var(--color-accent);
}

.stat-card .stat-icon {
    width: 52px; height: 52px;
    border-radius: 12px;
    background: rgba(30,58,95,0.1);
    display: flex; align-items: center; justify-content: center;
    font-size: 1.5rem;
    color: var(--color-primary);
}

.stat-card .stat-value {
    font-size: 1.8rem;
    font-weight: 800;
    line-height: 1;
    color: var(--color-dark);
}

.stat-card .stat-label {
    font-size: 0.8rem;
    color: var(--color-muted);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ─── Footer ────────────────────────────────────────────── */
.site-footer {
    background: var(--color-dark);
    color: rgba(255,255,255,0.8);
}

.footer-top { border-bottom: 1px solid rgba(255,255,255,0.08); }

.footer-brand {
    color: var(--color-accent);
    font-weight: 800;
    font-size: 1.4rem;
}

.footer-heading {
    color: #fff;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    font-size: 0.8rem;
}

.footer-links { margin: 0; padding: 0; }

.footer-links li { margin-bottom: 6px; }

.footer-links a {
    color: rgba(255,255,255,0.65);
    font-size: 0.88rem;
    transition: color var(--transition), padding-left var(--transition);
}

.footer-links a:hover { color: var(--color-accent); padding-left: 4px; }
.footer-links a .bi  { font-size: 0.65rem; margin-right: 4px; }

.footer-bottom {
    background: rgba(0,0,0,0.25);
}

/* ─── Utility & Misc ────────────────────────────────────── */
.section-title {
    font-weight: 800;
    font-size: 1.6rem;
    color: var(--color-dark);
    position: relative;
    padding-bottom: 12px;
    margin-bottom: 8px;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0;
    width: 48px; height: 3px;
    background: var(--color-accent);
    border-radius: 2px;
}

.section-title.text-center::after {
    left: 50%;
    transform: translateX(-50%);
}

.page-hero {
    background: linear-gradient(135deg, var(--color-primary), var(--color-dark));
    color: #fff;
    padding: 48px 0;
}

.page-hero h1 { font-weight: 700; font-size: 2rem; margin: 0; }

/* Scrollbar */
::-webkit-scrollbar       { width: 6px; }
::-webkit-scrollbar-track  { background: #f1f5f9; }
::-webkit-scrollbar-thumb  { background: var(--color-primary); border-radius: 3px; }

/* ─── Responsive ────────────────────────────────────────── */
@media (max-width: 991.98px) {
    .admin-sidebar   { transform: translateX(-100%); }
    .admin-sidebar.open { transform: translateX(0); }
    .admin-content   { margin-left: 0; }
}

@media (max-width: 767.98px) {
    .hero-section    { padding: 48px 0 36px; }
    .auth-card       { padding: 24px; }
    .auction-price   { font-size: 1.2rem; }
}

/* ─── Animations ────────────────────────────────────────── */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}

.fade-in-up { animation: fadeInUp 0.4s ease forwards; }

/* ─── Loading spinner ────────────────────────────────────── */
.spinner-bid {
    display: inline-block;
    width: 16px; height: 16px;
    border: 2px solid rgba(0,0,0,0.2);
    border-top-color: var(--color-dark);
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
    vertical-align: middle;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ─── Toast notifications ───────────────────────────────── */
.toast-container { z-index: 1090; }
