/* ============================================================================
   ECLECTIC UI | AUCTION PLATFORM — DESIGN SYSTEM
   Identity: Navy (#15233f) & Gold (#c8a13c), Cairo font, RTL Arabic
   ============================================================================ */

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

:root {
  --navy-900: #0d1626;
  --navy-800: #15233f;
  --navy-700: #1e3358;
  --navy-100: #eef1f6;
  --gold-500: #c8a13c;
  --gold-400: #d9b859;
  --gold-100: #f7eed9;
  --white: #ffffff;
  --gray-400: #8a92a3;
  --gray-100: #f4f5f8;
  --danger: #c0392b;
  --success: #1e8a5f;
  --radius: 10px;
  --shadow: 0 4px 20px rgba(13, 22, 38, 0.08);
  --shadow-lg: 0 12px 40px rgba(13, 22, 38, 0.16);
}

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

body {
  font-family: 'Cairo', sans-serif;
  background: var(--gray-100);
  color: var(--navy-900);
  direction: rtl;
  line-height: 1.6;
}

img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }
button { font-family: inherit; cursor: pointer; border: none; }

/* ---------- Layout ---------- */
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

.navbar {
  background: var(--navy-800);
  color: var(--white);
  padding: 16px 0;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow);
}
.navbar .container { display: flex; align-items: center; justify-content: space-between; }
.navbar .logo { font-weight: 800; font-size: 22px; color: var(--gold-400); letter-spacing: 0.5px; }
.navbar .logo span { color: var(--white); font-weight: 600; }
.navbar nav { display: flex; gap: 24px; align-items: center; }
.navbar nav a { font-weight: 600; font-size: 15px; opacity: 0.9; transition: opacity .2s; }
.navbar nav a:hover { opacity: 1; color: var(--gold-400); }

.btn {
  display: inline-block;
  padding: 12px 28px;
  border-radius: var(--radius);
  font-weight: 700;
  font-size: 15px;
  transition: transform .15s, box-shadow .15s;
}
.btn:active { transform: scale(0.97); }
.btn-gold { background: var(--gold-500); color: var(--navy-900); }
.btn-gold:hover { background: var(--gold-400); box-shadow: 0 6px 18px rgba(200,161,60,0.35); }
.btn-outline { background: transparent; border: 1.5px solid var(--white); color: var(--white); }
.btn-outline:hover { background: rgba(255,255,255,0.1); }
.btn-danger { background: var(--danger); color: var(--white); }
.btn-block { display: block; width: 100%; text-align: center; }

/* ---------- Hero / Filters ---------- */
.hero {
  background: linear-gradient(135deg, var(--navy-900), var(--navy-800) 60%, var(--navy-700));
  color: var(--white);
  padding: 56px 0 40px;
}
.hero h1 { font-size: 32px; font-weight: 800; margin-bottom: 8px; }
.hero p { color: var(--gray-400); font-size: 16px; }

.filters {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 28px;
}
.filters select, .filters input {
  padding: 12px 16px;
  border-radius: var(--radius);
  border: none;
  font-family: inherit;
  font-size: 14px;
  background: rgba(255,255,255,0.1);
  color: var(--white);
}
.filters input::placeholder { color: var(--gray-400); }
.filters select option { color: var(--navy-900); }

/* ---------- Auction Grid ---------- */
.section { padding: 40px 0; }
.section-title { font-size: 22px; font-weight: 800; margin-bottom: 20px; color: var(--navy-800); }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
}

.card {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform .2s, box-shadow .2s;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.card-img { height: 170px; background: var(--navy-100); background-size: cover; background-position: center; position: relative; }
.card-badge {
  position: absolute; top: 10px; right: 10px;
  background: var(--navy-900); color: var(--gold-400);
  font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 20px;
}
.card-body { padding: 16px; }
.card-body h3 { font-size: 16px; font-weight: 700; margin-bottom: 8px; color: var(--navy-900); }
.card-price-row { display: flex; justify-content: space-between; align-items: baseline; margin: 10px 0; }
.card-price { font-size: 20px; font-weight: 800; color: var(--gold-500); }
.card-price small { font-size: 12px; font-weight: 500; color: var(--gray-400); }
.card-meta { display: flex; justify-content: space-between; font-size: 13px; color: var(--gray-400); }
.countdown { font-weight: 700; color: var(--danger); }

/* ---------- Auction Detail ---------- */
.detail-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 32px;
}
@media (max-width: 860px) { .detail-grid { grid-template-columns: 1fr; } }

.gallery-main { border-radius: var(--radius); overflow: hidden; height: 380px; background: var(--navy-100); background-size: cover; background-position: center; }
.gallery-thumbs { display: flex; gap: 8px; margin-top: 10px; }
.gallery-thumbs img { width: 64px; height: 64px; border-radius: 6px; object-fit: cover; cursor: pointer; opacity: .7; }
.gallery-thumbs img.active { opacity: 1; outline: 2px solid var(--gold-500); }

.bid-panel {
  background: var(--white);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
  position: sticky;
  top: 90px;
  height: fit-content;
}
.bid-panel .current-price { font-size: 34px; font-weight: 800; color: var(--navy-900); }
.bid-panel .current-price .unit { font-size: 16px; color: var(--gray-400); font-weight: 500; }
.bid-panel .live-dot {
  display: inline-block; width: 8px; height: 8px; border-radius: 50%;
  background: var(--success); margin-left: 6px; animation: pulse 1.4s infinite;
}
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .3; } }

.time-left { background: var(--gold-100); color: var(--navy-900); font-weight: 700; padding: 10px 14px; border-radius: 8px; margin: 16px 0; text-align: center; }

.bid-form { display: flex; gap: 8px; margin-top: 16px; }
.bid-form input { flex: 1; padding: 14px; border: 1.5px solid #e2e5ec; border-radius: var(--radius); font-family: inherit; font-size: 16px; }

.deposit-notice { background: var(--navy-100); border-radius: 8px; padding: 12px; font-size: 13px; margin-top: 14px; color: var(--navy-700); }

.bid-history { margin-top: 24px; }
.bid-history h4 { font-size: 15px; margin-bottom: 10px; color: var(--navy-800); }
.bid-row { display: flex; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid var(--gray-100); font-size: 14px; }
.bid-row .amount { font-weight: 700; color: var(--navy-900); }
.bid-row .time { color: var(--gray-400); font-size: 12px; }

/* ---------- Forms (auth) ---------- */
.auth-wrap { max-width: 420px; margin: 60px auto; background: var(--white); border-radius: var(--radius); padding: 36px; box-shadow: var(--shadow); }
.auth-wrap h2 { font-size: 24px; font-weight: 800; margin-bottom: 24px; color: var(--navy-900); text-align: center; }
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 6px; color: var(--navy-700); }
.field input, .field select {
  width: 100%; padding: 13px 14px; border: 1.5px solid #e2e5ec; border-radius: 8px; font-family: inherit; font-size: 15px;
}
.field input:focus, .field select:focus, .bid-form input:focus { outline: 2px solid var(--gold-500); border-color: var(--gold-500); }
.form-error { background: #fdecea; color: var(--danger); padding: 10px 14px; border-radius: 8px; font-size: 14px; margin-bottom: 14px; }
.form-success { background: #e8f6f0; color: var(--success); padding: 10px 14px; border-radius: 8px; font-size: 14px; margin-bottom: 14px; }
.auth-switch { text-align: center; margin-top: 16px; font-size: 14px; color: var(--gray-400); }
.auth-switch a { color: var(--gold-500); font-weight: 700; }

/* ---------- Dashboard ---------- */
.dash-tabs { display: flex; gap: 8px; margin-bottom: 24px; border-bottom: 2px solid var(--gray-100); }
.dash-tab { padding: 12px 20px; font-weight: 700; color: var(--gray-400); border-bottom: 2px solid transparent; margin-bottom: -2px; }
.dash-tab.active { color: var(--navy-900); border-color: var(--gold-500); }
.wallet-card {
  background: linear-gradient(135deg, var(--navy-900), var(--navy-700));
  color: var(--white); border-radius: var(--radius); padding: 24px; margin-bottom: 24px;
  display: flex; justify-content: space-between; align-items: center;
}
.wallet-card .label { font-size: 13px; color: var(--gray-400); }
.wallet-card .amount { font-size: 28px; font-weight: 800; color: var(--gold-400); }

.empty-state { text-align: center; padding: 60px 20px; color: var(--gray-400); }

/* ---------- Utility ---------- */
.text-center { text-align: center; }
.mt-2 { margin-top: 16px; }
.hidden { display: none !important; }

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}
