/* Ubidugo — design system themed on the logo (orange + azure + navy). */
:root {
  --orange: #f47920;
  --orange-light: #ff9a3d;
  --orange-dark: #ee6c0e;
  --blue: #1e8fd5;
  --blue-light: #38abe3;
  --blue-dark: #1577be;
  --ink: #16202e;
  --ink-soft: #243244;
  --slate: #5b6b7c;
  --slate-light: #8595a6;
  --canvas: #f5f7fa;
  --surface: #ffffff;
  --line: #e4e9ef;
  --line-soft: #eef2f6;
  --success: #1f9d6b;
  --gold: #e3a008;

  --grad-brand: linear-gradient(135deg, var(--orange-light), var(--orange-dark));
  --grad-blue: linear-gradient(135deg, var(--blue-light), var(--blue-dark));
  --grad-hero: linear-gradient(120deg, #16202e 0%, #1c3553 55%, #1577be 100%);

  --shadow-sm: 0 1px 2px rgba(22, 32, 46, 0.06), 0 1px 3px rgba(22, 32, 46, 0.08);
  --shadow-md: 0 8px 24px rgba(22, 32, 46, 0.1);
  --shadow-lg: 0 18px 50px rgba(22, 32, 46, 0.16);

  --radius: 16px;
  --radius-sm: 10px;
  --radius-lg: 24px;
  --maxw: 1180px;

  --font-sans: "Inter", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  --font-display: "Plus Jakarta Sans", var(--font-sans);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--ink);
  background: var(--canvas);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4 { font-family: var(--font-display); color: var(--ink); line-height: 1.12; margin: 0; letter-spacing: -0.02em; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
.container { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }
.muted { color: var(--slate); }
.center { text-align: center; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--font-display); font-weight: 700; font-size: 0.95rem;
  padding: 12px 22px; border-radius: 999px; border: none; cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--grad-brand); color: #fff; box-shadow: 0 8px 18px rgba(238, 108, 14, 0.28); }
.btn-primary:hover { box-shadow: 0 12px 26px rgba(238, 108, 14, 0.38); transform: translateY(-1px); }
.btn-blue { background: var(--grad-blue); color: #fff; box-shadow: 0 8px 18px rgba(21, 119, 190, 0.26); }
.btn-blue:hover { transform: translateY(-1px); }
.btn-ghost { background: var(--surface); color: var(--ink); border: 1px solid var(--line); }
.btn-ghost:hover { border-color: var(--blue); color: var(--blue-dark); }
.btn-light { background: rgba(255, 255, 255, 0.14); color: #fff; border: 1px solid rgba(255, 255, 255, 0.3); backdrop-filter: blur(6px); }
.btn-light:hover { background: rgba(255, 255, 255, 0.22); }
.btn-sm { padding: 8px 16px; font-size: 0.85rem; }
.btn-lg { padding: 15px 30px; font-size: 1.02rem; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }
.btn-block { width: 100%; }

/* ---------- Nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, 0.92); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav-inner { display: flex; align-items: center; gap: 18px; height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; }
.brand img { height: 38px; width: auto; border-radius: 6px; }
.brand .name { font-family: var(--font-display); font-weight: 800; font-size: 1.25rem; letter-spacing: -0.02em; }
.brand .name b { color: var(--orange); }
.nav-links { display: flex; gap: 4px; margin-left: 14px; }
.nav-links a { padding: 8px 14px; border-radius: 999px; font-weight: 600; font-size: 0.92rem; color: var(--ink-soft); transition: background 0.15s, color 0.15s; }
.nav-links a:hover { background: var(--line-soft); }
.nav-links a.active { color: var(--blue-dark); background: rgba(30, 143, 213, 0.1); }
.nav-right { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.credit-pill {
  display: inline-flex; align-items: center; gap: 7px; font-weight: 700; font-family: var(--font-display);
  background: linear-gradient(135deg, #fff4e9, #ffe7cf); color: var(--orange-dark);
  border: 1px solid #ffd9b3; padding: 8px 14px; border-radius: 999px; font-size: 0.9rem; cursor: pointer;
}
.credit-pill .dot { width: 16px; height: 16px; border-radius: 50%; background: var(--grad-brand); display: inline-block; }
.nav-toggle { display: none; background: none; border: none; cursor: pointer; padding: 8px; }
.nav-toggle span { display: block; width: 22px; height: 2px; background: var(--ink); margin: 4px 0; border-radius: 2px; }

/* ---------- Hero ---------- */
.hero { background: var(--grad-hero); color: #fff; position: relative; overflow: hidden; }
.hero::after { content: ""; position: absolute; right: -120px; top: -120px; width: 420px; height: 420px;
  background: radial-gradient(circle, rgba(244, 121, 32, 0.45), transparent 70%); }
.hero-inner { position: relative; padding: 84px 0 96px; max-width: 720px; }
.hero .eyebrow { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; font-size: 0.78rem;
  text-transform: uppercase; letter-spacing: 0.12em; color: #ffd9b3; background: rgba(244, 121, 32, 0.16);
  padding: 6px 14px; border-radius: 999px; }
.hero h1 { color: #fff; font-size: clamp(2.2rem, 5vw, 3.6rem); margin: 22px 0 16px; }
.hero h1 .accent { background: linear-gradient(120deg, #ff9a3d, #ffce8a); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p { font-size: 1.15rem; color: rgba(255, 255, 255, 0.82); max-width: 560px; }
.hero-cta { display: flex; gap: 12px; margin-top: 30px; flex-wrap: wrap; }
.hero-stats { display: flex; gap: 34px; margin-top: 46px; flex-wrap: wrap; }
.hero-stats .stat .n { font-family: var(--font-display); font-weight: 800; font-size: 1.7rem; }
.hero-stats .stat .l { font-size: 0.85rem; color: rgba(255, 255, 255, 0.7); }

/* ---------- Sections ---------- */
.section { padding: 64px 0; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 30px; flex-wrap: wrap; }
.section-head h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); }
.section-head p { margin: 6px 0 0; color: var(--slate); }
.eyebrow-dark { color: var(--orange); font-weight: 800; text-transform: uppercase; letter-spacing: 0.1em; font-size: 0.78rem; }

/* ---------- Category tiles ---------- */
.cat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.cat-tile { position: relative; border-radius: var(--radius); overflow: hidden; aspect-ratio: 4/3; color: #fff;
  display: flex; flex-direction: column; justify-content: flex-end; padding: 18px; cursor: pointer;
  box-shadow: var(--shadow-sm); transition: transform 0.18s ease, box-shadow 0.18s ease; }
.cat-tile:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.cat-tile::before { content: ""; position: absolute; inset: 0; background: var(--g, var(--grad-blue)); }
.cat-tile::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(0,0,0,0.45), transparent 60%); }
.cat-tile .icon { position: relative; font-size: 1.7rem; }
.cat-tile .label { position: relative; font-family: var(--font-display); font-weight: 800; font-size: 1.05rem; margin-top: auto; }
.cat-tile .count { position: relative; font-size: 0.8rem; opacity: 0.9; }

/* ---------- Auction cards ---------- */
.auction-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow-sm); transition: transform 0.18s ease, box-shadow 0.18s ease; display: flex; flex-direction: column; }
.card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); }
.card-media { position: relative; aspect-ratio: 16/10; overflow: hidden; }
.card-media .ph { position: absolute; inset: 0; background: var(--g, var(--grad-blue)); display: flex; align-items: center; justify-content: center; font-size: 3rem; }
.card-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.card-media .cat-badge { position: absolute; top: 12px; left: 12px; background: rgba(255,255,255,0.92); color: var(--ink);
  font-weight: 700; font-size: 0.72rem; padding: 5px 11px; border-radius: 999px; text-transform: uppercase; letter-spacing: 0.04em; }
.card-media .timer { position: absolute; top: 12px; right: 12px; background: rgba(22,32,46,0.82); color: #fff; font-weight: 700;
  font-size: 0.78rem; padding: 5px 10px; border-radius: 999px; font-variant-numeric: tabular-nums; display: flex; align-items: center; gap: 6px; }
.card-media .timer.urgent { background: var(--orange-dark); }
.card-media .timer .pulse { width: 7px; height: 7px; border-radius: 50%; background: #fff; animation: pulse 1.1s infinite; }
@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:0.35} }
.card-body { padding: 16px 18px 18px; display: flex; flex-direction: column; flex: 1; }
.card-loc { font-size: 0.8rem; color: var(--slate); display: flex; align-items: center; gap: 5px; }
.card-title { font-size: 1.08rem; margin: 6px 0 12px; font-weight: 700; }
.card-meta { display: flex; align-items: flex-end; justify-content: space-between; margin-top: auto; gap: 10px; }
.card-bid .k { font-size: 0.72rem; color: var(--slate); text-transform: uppercase; letter-spacing: 0.05em; }
.card-bid .v { font-family: var(--font-display); font-weight: 800; font-size: 1.32rem; color: var(--ink); }
.card-bid .retail { font-size: 0.78rem; color: var(--slate-light); text-decoration: line-through; }
.card-bidders { text-align: right; font-size: 0.8rem; color: var(--slate); }
.card-bidders b { color: var(--blue-dark); }
.card-foot { display: flex; gap: 8px; align-items: center; margin-top: 14px; }

/* ---------- Badges / pills ---------- */
.badge { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; font-size: 0.74rem; padding: 5px 11px; border-radius: 999px; }
.badge-live { background: rgba(238,108,14,0.12); color: var(--orange-dark); }
.badge-credit { background: rgba(30,143,213,0.12); color: var(--blue-dark); }
.badge-keep { background: rgba(31,157,107,0.12); color: var(--success); }

/* ---------- Detail page ---------- */
.detail-grid { display: grid; grid-template-columns: 1.5fr 1fr; gap: 32px; align-items: start; }
.detail-media { border-radius: var(--radius-lg); overflow: hidden; aspect-ratio: 16/10; position: relative; box-shadow: var(--shadow-md); }
.detail-media .ph { position: absolute; inset: 0; background: var(--g); display: flex; align-items: center; justify-content: center; font-size: 5rem; }
.detail-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.detail-panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 24px; position: sticky; top: 88px; box-shadow: var(--shadow-sm); }
.bid-now { font-family: var(--font-display); font-weight: 800; font-size: 2.3rem; }
.timer-big { display: flex; gap: 10px; margin: 16px 0; }
.timer-big .seg { background: var(--canvas); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 10px 0; flex: 1; text-align: center; }
.timer-big .seg .n { font-family: var(--font-display); font-weight: 800; font-size: 1.5rem; font-variant-numeric: tabular-nums; }
.timer-big .seg .l { font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--slate); }
.highlights { list-style: none; padding: 0; margin: 18px 0; display: grid; gap: 10px; }
.highlights li { display: flex; gap: 10px; align-items: flex-start; font-size: 0.95rem; }
.highlights li::before { content: "✓"; color: var(--success); font-weight: 800; }
.bid-history { margin-top: 8px; }
.bid-history .row { display: flex; justify-content: space-between; padding: 9px 0; border-bottom: 1px solid var(--line-soft); font-size: 0.88rem; }
.bid-history .row:last-child { border-bottom: none; }
.bid-history .who { font-weight: 600; }
.bid-history .who.you { color: var(--orange-dark); }
.keep-note { background: rgba(31,157,107,0.08); border: 1px solid rgba(31,157,107,0.25); border-radius: var(--radius-sm);
  padding: 12px 14px; font-size: 0.86rem; color: #15724f; display: flex; gap: 10px; margin-top: 14px; }

/* ---------- Wallet ---------- */
.wallet-hero { background: var(--grad-hero); color: #fff; border-radius: var(--radius-lg); padding: 34px; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 20px; }
.wallet-hero .bal { font-family: var(--font-display); font-weight: 800; font-size: 3rem; }
.credit-packs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 26px; }
.pack { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; text-align: center; position: relative; transition: transform 0.15s, border-color 0.15s; }
.pack:hover { transform: translateY(-4px); border-color: var(--orange); }
.pack.best { border-color: var(--orange); box-shadow: 0 10px 30px rgba(244,121,32,0.18); }
.pack .tag { position: absolute; top: -11px; left: 50%; transform: translateX(-50%); background: var(--grad-brand); color: #fff; font-size: 0.7rem; font-weight: 700; padding: 4px 12px; border-radius: 999px; }
.pack .amt { font-family: var(--font-display); font-weight: 800; font-size: 2rem; color: var(--orange-dark); }
.pack .price { color: var(--slate); margin: 4px 0 16px; }

/* ---------- How it works ---------- */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.step { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.step .num { font-family: var(--font-display); font-weight: 800; font-size: 1.1rem; width: 40px; height: 40px; border-radius: 12px; background: var(--grad-brand); color: #fff; display: flex; align-items: center; justify-content: center; margin-bottom: 14px; }
.step h3 { font-size: 1.08rem; margin-bottom: 6px; }
.step p { color: var(--slate); font-size: 0.92rem; margin: 0; }

/* ---------- Forms / modal ---------- */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field label { font-weight: 600; font-size: 0.88rem; }
.field input { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 11px 13px; font-size: 0.95rem; font-family: inherit; outline: none; transition: border 0.15s, box-shadow 0.15s; }
.field input:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(30,143,213,0.15); }
.modal-backdrop { position: fixed; inset: 0; background: rgba(22,32,46,0.5); backdrop-filter: blur(3px); z-index: 100; display: flex; align-items: center; justify-content: center; padding: 20px; }
.modal { background: var(--surface); border-radius: var(--radius-lg); padding: 28px; width: 100%; max-width: 420px; box-shadow: var(--shadow-lg); }
.modal h3 { font-size: 1.4rem; margin-bottom: 4px; }
.modal .close { float: right; background: none; border: none; font-size: 1.4rem; cursor: pointer; color: var(--slate); }

/* ---------- Toast ---------- */
#toast-wrap { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%); z-index: 200; display: flex; flex-direction: column; gap: 8px; align-items: center; }
.toast { background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 999px; font-size: 0.9rem; font-weight: 600; box-shadow: var(--shadow-md); animation: toastin 0.25s ease; }
.toast.good { background: var(--success); }
.toast.warn { background: var(--orange-dark); }
@keyframes toastin { from { opacity: 0; transform: translateY(10px); } }

/* ---------- Footer ---------- */
.footer { background: var(--ink); color: rgba(255,255,255,0.75); margin-top: 40px; }
.footer-inner { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 30px; padding: 50px 0 30px; }
.footer .brand .name { color: #fff; }
.footer h4 { color: #fff; font-size: 0.95rem; margin-bottom: 12px; }
.footer a { display: block; padding: 5px 0; color: rgba(255,255,255,0.7); font-size: 0.9rem; }
.footer a:hover { color: var(--orange-light); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.12); padding: 18px 0; display: flex; justify-content: space-between; gap: 14px; flex-wrap: wrap; font-size: 0.82rem; }
.demo-note { background: rgba(244,121,32,0.16); color: #ffd9b3; border: 1px solid rgba(244,121,32,0.3); padding: 7px 14px; border-radius: 999px; font-weight: 600; }

/* ---------- Filter bar ---------- */
.filterbar { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 26px; }
.chip { border: 1px solid var(--line); background: var(--surface); color: var(--ink-soft); padding: 8px 16px; border-radius: 999px; font-weight: 600; font-size: 0.88rem; cursor: pointer; transition: all 0.15s; }
.chip:hover { border-color: var(--blue); }
.chip.active { background: var(--ink); color: #fff; border-color: var(--ink); }

.breadcrumb { font-size: 0.85rem; color: var(--slate); margin: 22px 0 10px; }
.breadcrumb a:hover { color: var(--blue-dark); }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .cat-grid { grid-template-columns: repeat(2, 1fr); }
  .auction-grid { grid-template-columns: repeat(2, 1fr); }
  .detail-grid { grid-template-columns: 1fr; }
  .detail-panel { position: static; }
  .credit-packs { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .footer-inner { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 680px) {
  .nav-links { display: none; position: absolute; top: 68px; left: 0; right: 0; background: var(--surface); flex-direction: column; padding: 10px; border-bottom: 1px solid var(--line); box-shadow: var(--shadow-md); }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 12px 14px; }
  .nav-toggle { display: block; }
  .auction-grid { grid-template-columns: 1fr; }
  .cat-grid { grid-template-columns: repeat(2, 1fr); }
  .hero-inner { padding: 56px 0 64px; }
  .section { padding: 44px 0; }
  .footer-inner { grid-template-columns: 1fr; }
  .brand .name { font-size: 1.1rem; }
}
