@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&subset=cyrillic,cyrillic-ext&display=swap');

* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }

:root {
  --r: #E11D48; --rl: #FFF1F2; --rm: #FDA4AF; --rd: #BE123C;
  --d: #0F172A; --d2: #1E293B; --d3: #475569; --d4: #94A3B8; --d5: #CBD5E1;
  --bg: #ffffff; --s: #F8FAFC; --b: #E2E8F0; --b2: #F1F5F9;
  --g: #059669;
  --shadow-sm: 0 2px 4px rgba(15, 23, 42, 0.05);
  --shadow-md: 0 12px 24px -8px rgba(15, 23, 42, 0.1);
  --shadow-red: 0 8px 20px -6px rgba(225, 29, 72, 0.4);
}

body { font-family: 'Inter', sans-serif; background: var(--s); color: var(--d); line-height: 1.5; }
a { text-decoration: none; color: inherit; }

.container { max-width: 1140px; margin: 0 auto; padding: 0 20px; }

/* NAVBAR */
.nav-wrapper { background: rgba(255, 255, 255, 0.98); backdrop-filter: blur(10px); border-bottom: 1px solid var(--b); position: sticky; top: 0; z-index: 100; box-shadow: var(--shadow-sm); }
.nav { display: flex; align-items: center; justify-content: space-between; height: 70px; }
.logo { font-size: 24px; font-weight: 900; letter-spacing: -0.5px; }
.logo-a { color: var(--d); }
.logo-b { color: var(--r); }
.nav-links { display: flex; gap: 8px; }
.nl { padding: 8px 16px; font-size: 13px; color: var(--d3); border-radius: 8px; cursor: pointer; font-weight: 600; transition: 0.2s; }
.nl:hover, .nl.on { background: var(--b2); color: var(--d); }
.nav-r { display: flex; align-items: center; gap: 12px; }
.cbal { display: flex; align-items: center; gap: 6px; padding: 8px 14px; background: var(--rl); border-radius: 10px; font-size: 13px; font-weight: 700; color: var(--r); border: 1px solid rgba(225, 29, 72, 0.1); }
.btn-solid { padding: 9px 20px; background: var(--r); color: #fff; border: none; border-radius: 10px; font-size: 13px; font-weight: 700; cursor: pointer; transition: 0.2s; }
.btn-solid:hover { background: var(--rd); box-shadow: var(--shadow-red); transform: translateY(-1px); }
.btn-solid, .btn-bid, .btn-disabled, .btn-view, .sbm, .sbs, .filter-btn { font-family: inherit; }
.hamburger { display: none; cursor: pointer; }

/* Nav: сагсны icon + профайл chip (нэвтэрсэн төлөв) */
.nav-cart { position: relative; display: flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: 10px; background: var(--b2); color: var(--d);
  cursor: pointer; transition: 0.2s; text-decoration: none; }
.nav-cart:hover { background: var(--b); }
.nav-cart i { font-size: 20px; }
.nav-cart .badge { position: absolute; top: -4px; right: -4px; min-width: 18px; height: 18px;
  padding: 0 4px; background: var(--r); color: #fff; border-radius: 10px;
  font-size: 11px; font-weight: 800; display: flex; align-items: center; justify-content: center;
  border: 2px solid #fff; }
.nav-profile { display: flex; align-items: center; gap: 8px; padding: 5px 6px 5px 12px;
  background: var(--b2); border-radius: 30px; cursor: pointer; transition: 0.2s; text-decoration: none; }
.nav-profile:hover { background: var(--b); }
.nav-profile span { font-size: 13px; font-weight: 700; color: var(--d); }
.nav-profile .np-av { width: 30px; height: 30px; border-radius: 50%;
  background: linear-gradient(135deg, var(--r), var(--rd)); color: #fff;
  display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 800; }
@media (max-width: 768px) {
  .nav-profile span { display: none; }
  .nav-profile { padding: 4px; }
}

/* HERO */
.hero-wrapper { background: var(--d); padding: 70px 0 60px; position: relative; overflow: hidden; }
.hero-wrapper::before { content: ''; position: absolute; top: -50%; right: -20%; width: 600px; height: 600px; background: radial-gradient(circle, rgba(225, 29, 72, 0.12) 0%, transparent 60%); border-radius: 50%; }
.hero { text-align: center; position: relative; z-index: 1; }
.hero-badge { display: inline-flex; align-items: center; gap: 8px; background: rgba(225, 29, 72, 0.15); border: 1px solid rgba(225, 29, 72, 0.2); border-radius: 20px; padding: 6px 16px; margin-bottom: 24px; }
.hbdot { width: 6px; height: 6px; border-radius: 50%; background: var(--r); box-shadow: 0 0 10px var(--r); animation: pulse 2s infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.4; } }
.hbtxt { font-size: 12px; font-weight: 700; color: var(--rm); letter-spacing: 0.05em; text-transform: uppercase; }
.hero-h { font-size: 44px; font-weight: 900; color: #fff; letter-spacing: -1px; line-height: 1.2; margin-bottom: 16px; }
.hero-h em { color: var(--r); font-style: normal; }
.hero-sub { font-size: 15px; color: var(--d4); line-height: 1.6; margin-bottom: 36px; max-width: 550px; margin-left: auto; margin-right: auto; }

/* Hero — хамгийн ойрхон дуусах live дуудлагын онцлох хэсэг */
.hero-live { display: inline-flex; align-items: center; gap: 20px; margin-bottom: 36px;
  background: rgba(255, 255, 255, 0.04); border: 1px solid rgba(225, 29, 72, 0.35);
  border-radius: 16px; padding: 14px 22px; transition: 0.2s; }
.hero-live:hover { border-color: var(--r); background: rgba(225, 29, 72, 0.08); transform: translateY(-2px); }
.hl-label { display: flex; align-items: center; gap: 7px; font-size: 11px; font-weight: 800;
  color: var(--rm); text-transform: uppercase; letter-spacing: 0.05em; white-space: nowrap; }
.hl-title { font-size: 15px; font-weight: 800; color: #fff; }
.hl-timer { font-size: 26px; font-weight: 900; color: #fff; font-variant-numeric: tabular-nums; letter-spacing: 1px; }
.hl-cta { font-size: 13px; font-weight: 800; color: #fff; background: var(--r); padding: 9px 18px; border-radius: 10px; white-space: nowrap; }
@media (max-width: 768px) {
  .hero-live { flex-wrap: wrap; justify-content: center; gap: 10px 16px; padding: 14px 16px; }
}

/* STATS */
.stats-container { display: flex; justify-content: center; gap: 48px; border-top: 1px solid rgba(255, 255, 255, 0.08); padding-top: 32px; margin-top: 16px; }
.stat-box { text-align: center; }
.stat-v { font-size: 28px; font-weight: 900; color: #fff; letter-spacing: -0.5px; margin-bottom: 4px; }
.stat-l { font-size: 11px; font-weight: 600; color: var(--d4); text-transform: uppercase; letter-spacing: 0.05em; }

/* SECTIONS */
.section { padding: 64px 0; }
.sh-row { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 32px; }
.sh { font-size: 24px; font-weight: 900; color: var(--d); letter-spacing: -0.5px; }
.sm { font-size: 13px; color: var(--d3); margin-top: 6px; font-weight: 500; }
.sa { font-size: 12px; font-weight: 700; color: var(--r); cursor: pointer; padding: 8px 16px; background: var(--rl); border-radius: 8px; transition: 0.2s; white-space: nowrap; }
.sa:hover { background: var(--rm); color: #fff; }

/* GRIDS */
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.grid-shop { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }

/* AUCTION CARDS */
.acard { background: #fff; border-radius: 16px; border: 1px solid var(--b); overflow: hidden; transition: 0.3s; display: flex; flex-direction: column; position: relative; cursor: pointer; }
.acard:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: var(--rm); }
.acard-img { height: 180px; background: var(--b2); display: flex; align-items: center; justify-content: center; font-size: 70px; position: relative; }
.acard.dark-top .acard-img { background: var(--d); }
/* Категорийн icon (демо зураг — emoji-г орлуулсан цэвэр шугаман icon) */
.acard-img > i.ti, .simg > i.ti { color: var(--d3); line-height: 1; }
.acard.dark-top .acard-img > i.ti { color: #fff; }

/* BREADCRUMB (замчлал) */
.breadcrumb { background: var(--bg); border-bottom: 1px solid var(--b); }
.bc-list { display: flex; flex-wrap: wrap; align-items: center; gap: 4px;
  list-style: none; padding: 12px 0; margin: 0; font-size: 13px; }
.bc-item { display: flex; align-items: center; }
.bc-item + .bc-item::before { content: '\203A'; color: var(--d5);
  font-size: 15px; font-weight: 700; margin: 0 8px; line-height: 1; }
.bc-item a { color: var(--d3); font-weight: 600; transition: 0.2s; }
.bc-item a:hover { color: var(--r); }
.bc-item span[aria-current] { color: var(--d); font-weight: 700; }

/* ACCESSIBILITY — keyboard focus ring + skip link */
:focus-visible { outline: 3px solid var(--r); outline-offset: 2px; border-radius: 4px; }
a:focus-visible, button:focus-visible, [role="button"]:focus-visible,
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid var(--r); outline-offset: 2px; }
.skip-link { position: absolute; left: 12px; top: -100px; z-index: 2000;
  background: var(--r); color: #fff; padding: 10px 18px; border-radius: 0 0 10px 10px;
  font-size: 13px; font-weight: 700; transition: top 0.2s; }
.skip-link:focus { top: 0; }
/* Формын алдаа / амжилтын мессеж */
.form-error, .form-success { display: flex; align-items: center; gap: 8px;
  padding: 11px 14px; border-radius: 10px; font-size: 13px; font-weight: 600;
  margin-bottom: 16px; text-align: left; line-height: 1.4; }
.form-error { background: var(--rl); color: var(--rd); border: 1px solid var(--rm); }
.form-success { background: #ECFDF5; color: #047857; border: 1px solid #6EE7B7; }
/* Дэлгэцээс нуугдсан ч дэлгэц уншигчид зориулсан текст */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

.pill-live { position: absolute; top: 12px; left: 12px; background: var(--r); color: #fff; font-size: 10px; font-weight: 800; padding: 4px 10px; border-radius: 8px; box-shadow: var(--shadow-red); z-index: 2; }
.pill-hot { position: absolute; top: 12px; right: 12px; background: linear-gradient(135deg, #FF6B00, #FF3D00); color: #fff; font-size: 10px; font-weight: 800; padding: 4px 10px; border-radius: 8px; z-index: 2; }

/* Амьд card — үзэгчийн тоо (зургийн буланд) */
.pill-viewers { position: absolute; bottom: 12px; left: 12px; display: flex; align-items: center; gap: 5px;
  background: rgba(15, 23, 42, 0.75); backdrop-filter: blur(4px); color: #fff; font-size: 11px;
  font-weight: 700; padding: 4px 10px; border-radius: 8px; z-index: 2; font-variant-numeric: tabular-nums; }
.pill-viewers i { font-size: 13px; }

/* Амьд card — тэргүүлэгчийн мөр */
.leader-row { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--d3);
  margin-bottom: 14px; font-variant-numeric: tabular-nums; }
.leader-row i { font-size: 14px; color: var(--d4); }
.leader-row strong { color: var(--d); font-weight: 800; }

/* Үнэ өөрчлөгдөх агшны flash (card + дэлгэрэнгүй хуудас) */
@keyframes pbump { 0% { transform: scale(1); } 35% { transform: scale(1.14); } 100% { transform: scale(1); } }
.price-bump { animation: pbump 0.55s ease; display: inline-block; }
.pill-upcoming { position: absolute; top: 12px; left: 12px; background: var(--d2); color: #fff; font-size: 10px; font-weight: 800; padding: 4px 10px; border-radius: 8px; z-index: 2; }
.pill-ended { position: absolute; top: 12px; left: 12px; background: var(--d4); color: #fff; font-size: 10px; font-weight: 800; padding: 4px 10px; border-radius: 8px; z-index: 2; }

/* FLOATING TIMERS (Шинэчлэгдсэн) */
.timer-floating { position: absolute; top: 180px; right: 12px; transform: translateY(calc(-100% - 12px)); background: rgba(15, 23, 42, 0.8); backdrop-filter: blur(4px); color: #fff; padding: 8px 14px; border-radius: 10px; font-size: 18px; font-weight: 900; box-shadow: var(--shadow-md); display: flex; flex-direction: column; align-items: center; border: 1px solid rgba(255,255,255,0.2); z-index: 3; font-variant-numeric: tabular-nums; letter-spacing: 1px; }
.timer-floating span { font-size: 8px; font-weight: 700; color: var(--d4); text-transform: uppercase; letter-spacing: 0; margin-top: 2px; }
.acard.urgent .timer-floating { background: var(--r); animation: shake 1s infinite; }
@keyframes shake { 0%, 100% {transform: translateX(0);} 25% {transform: translateX(-2px);} 75% {transform: translateX(2px);} }

.abody { padding: 20px; display: flex; flex-direction: column; flex: 1; padding-top: 28px; }
.acat { font-size: 10px; font-weight: 800; color: var(--d4); text-transform: uppercase; margin-bottom: 6px; }
.aname { font-size: 15px; font-weight: 800; color: var(--d); margin-bottom: 16px; line-height: 1.3; }

.price-row { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 20px; padding-bottom: 16px; border-bottom: 1px dashed var(--b); }
.plbl { font-size: 11px; font-weight: 600; color: var(--d3); margin-bottom: 4px; }
.pv { font-size: 24px; font-weight: 900; color: var(--r); letter-spacing: -1px; line-height: 1; }
.pm { font-size: 11px; color: var(--d3); text-align: right; font-weight: 500; }

/* Winner Box */
.market-price-row {
  font-size: 11px;
  font-weight: 600;
  color: var(--d3);
  text-align: right;
  margin-bottom: 16px;
}
.winner-box { background: var(--s); border: 1px solid var(--b); border-radius: 10px; padding: 10px 14px; display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.w-left { display: flex; align-items: center; gap: 10px; }
.w-icon { font-size: 20px; }
.w-lbl { font-size: 9px; font-weight: 800; color: var(--d4); text-transform: uppercase; }
.w-name { font-size: 13px; font-weight: 800; color: var(--d); }
.w-price-lbl { font-size: 9px; font-weight: 800; color: var(--r); text-transform: uppercase; text-align: right; }
.w-price { font-size: 14px; font-weight: 900; color: var(--r); text-align: right; }

.btn-bid { width: 100%; padding: 14px; background: var(--rl); color: var(--r); border: none; border-radius: 10px; font-size: 13px; font-weight: 800; cursor: pointer; transition: 0.2s; margin-top: auto; }
.acard:hover .btn-bid { background: var(--r); color: #fff; }
.btn-disabled { width: 100%; padding: 14px; background: var(--b2); color: var(--d4); border: none; border-radius: 10px; font-size: 13px; font-weight: 800; cursor: not-allowed; margin-top: auto; }
.btn-view { width: 100%; padding: 12px; background: transparent; color: var(--d3); border: 1px solid var(--b); border-radius: 10px; font-size: 12px; font-weight: 700; cursor: pointer; transition: 0.2s; margin-top: auto; }
.btn-view:hover { background: var(--b2); color: var(--d); }
.card-actions {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.card-actions .btn-disabled { margin-top: 0; }

/* SHOP CARDS */
.filter-scroll { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 16px; margin-bottom: 20px; -webkit-overflow-scrolling: touch; }
.fp { padding: 8px 16px; background: #fff; border: 1px solid var(--b); border-radius: 20px; font-size: 12px; font-weight: 700; color: var(--d3); cursor: pointer; transition: 0.2s; white-space: nowrap; }
.fp.on, .fp:hover { background: var(--d); color: #fff; border-color: var(--d); }

.scard { background: #fff; border-radius: 16px; border: 1px solid var(--b); overflow: hidden; transition: 0.3s; display: flex; flex-direction: column; }
.scard:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: var(--d4); }
.simg { height: 160px; background: var(--s); display: flex; align-items: center; justify-content: center; font-size: 60px; position: relative; border-bottom: 1px solid var(--b); overflow: hidden; }
/* Hover үед зураг/icon зөөлөн томорно */
.simg img, .simg > i.ti { transition: transform 0.35s ease; }
.scard:hover .simg img, .scard:hover .simg > i.ti,
.discount-card:hover .simg img, .discount-card:hover .simg > i.ti { transform: scale(1.07); }
.schip-red { position: absolute; top: 10px; right: 10px; background: var(--r); color: #fff; font-size: 10px; font-weight: 900; padding: 4px 8px; border-radius: 6px; box-shadow: var(--shadow-red); z-index: 2; }
.sp-old { font-size: 13px; color: var(--d4); text-decoration: line-through; margin-left: 6px; font-weight: 600; }
.simg img { display: block; }
.sbody { padding: 16px; flex: 1; display: flex; flex-direction: column; }
.scat { font-size: 9px; font-weight: 800; color: var(--d4); text-transform: uppercase; margin-bottom: 6px; }
.sname { font-size: 13px; font-weight: 800; color: var(--d); margin-bottom: 6px; line-height: 1.4; }
.sprow { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.sp { font-size: 18px; font-weight: 900; color: var(--d); letter-spacing: -0.5px; } 
.sbtns { display: grid; grid-template-columns: 1fr; gap: 6px; margin-top: auto; }
.sbm { padding: 10px; background: var(--d); color: #fff; border: none; border-radius: 8px; font-size: 12px; font-weight: 800; cursor: pointer; transition: 0.2s; }
.sbm:hover { background: var(--d2); }
.sbs { padding: 10px; background: #fff; color: var(--d); border: 1px solid var(--b); border-radius: 8px; font-size: 12px; font-weight: 800; cursor: pointer; transition: 0.2s; }
.sbs:hover { border-color: var(--d); }

/* DISCOUNTED ITEM BOX (Шинэчлэгдсэн Хямдралын загвар) */
.discount-section-wrapper { background: linear-gradient(45deg, var(--rd) 0%, #A3143C 100%); color: #fff; }
.discount-card { background: #fff; border-radius: 12px; overflow: hidden; }
.discount-card .simg { border-radius: 12px 12px 0 0; }

.discount-box { background: var(--rl); border: 1px solid rgba(225, 29, 72, 0.2); border-radius: 10px; padding: 12px; margin-bottom: 16px; display: flex; flex-direction: column; gap: 4px; }
.disc-old { font-size: 12px; color: var(--d4); font-weight: 600; display: flex; justify-content: space-between; align-items: center; }
.disc-old span { text-decoration: line-through; }
.disc-new { font-size: 22px; font-weight: 900; color: var(--r); letter-spacing: -1px; }

/* SHOP PAGE LAYOUT & SIDEBAR */
.shop-layout { display: grid; grid-template-columns: 260px 1fr; gap: 32px; }
.shop-sidebar { background: #fff; border-radius: 16px; border: 1px solid var(--b); padding: 20px; align-self: start; }
.filter-block { margin-bottom: 24px; padding-bottom: 24px; border-bottom: 1px solid var(--b2); }
.filter-block:last-child { margin-bottom: 0; padding-bottom: 0; border-bottom: none; }
.shop-controls {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 20px;
}
.sort-by {
    display: flex;
    align-items: center;
    gap: 8px;
}
.sort-by label {
    font-size: 13px;
    font-weight: 600;
    color: var(--d3);
}
.sort-by select {
    padding: 8px 12px;
    border: 1px solid var(--b);
    border-radius: 8px;
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    background-color: #fff;
    cursor: pointer;
}
.sort-by select:focus {
    outline: none;
    border-color: var(--r);
    box-shadow: 0 0 0 3px var(--rl);
}
.filter-title { font-size: 14px; font-weight: 800; margin-bottom: 16px; }
.search-box { position: relative; }
.search-box input { width: 100%; padding: 10px 36px 10px 14px; border: 1px solid var(--b); border-radius: 8px; font-family: inherit; font-size: 13px; }
.search-box input:focus { outline: none; border-color: var(--r); box-shadow: 0 0 0 3px var(--rl); }
.search-box i { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); font-size: 16px; color: var(--d4); }
.category-list { list-style: none; display: flex; flex-direction: column; gap: 4px; }
.category-list a { display: flex; align-items: center; gap: 10px; padding: 8px 12px; font-size: 13px; font-weight: 600; color: var(--d3); border-radius: 6px; }
.category-list a i { font-size: 18px; }
.category-list a:hover { background: var(--b2); color: var(--d); }
.category-list a.active { background: var(--rl); color: var(--r); }
.price-filter { display: flex; align-items: center; gap: 8px; }
.price-filter input { width: 100%; padding: 10px; border: 1px solid var(--b); border-radius: 8px; font-family: inherit; text-align: center; -moz-appearance: textfield; }
.price-filter input::-webkit-outer-spin-button, .price-filter input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.price-filter span { font-weight: 600; color: var(--d4); }
.color-filter { display: flex; flex-wrap: wrap; gap: 10px; }
.color-swatch { width: 26px; height: 26px; border-radius: 50%; cursor: pointer; transition: transform 0.2s; position: relative; }
.color-swatch:hover { transform: scale(1.1); }
.color-swatch.active::after {
  content: '✓';
  color: white;
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  font-size: 14px;
  font-weight: bold;
  text-shadow: 0 0 2px rgba(0,0,0,0.5);
}
.filter-btn { width: 100%; padding: 12px; background: var(--r); color: #fff; border: none; border-radius: 10px; font-size: 13px; font-weight: 800; cursor: pointer; }

/* FOOTER */
.footer { background: var(--d); padding: 60px 0 0; margin-top: 40px; color: #fff; }
.ft-top { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 32px; padding-bottom: 40px; border-bottom: 1px solid rgba(255,255,255,0.1); }
.ft-logo { font-size: 22px; font-weight: 900; margin-bottom: 16px; }
.ft-logo-b { color: var(--r); }
.ft-desc { font-size: 13px; color: var(--d4); line-height: 1.6; margin-bottom: 20px; max-width: 280px; }
.ft-social { display: flex; gap: 8px; }
.fsoc { width: 36px; height: 36px; border-radius: 8px; background: rgba(255,255,255,0.05); display: flex; align-items: center; justify-content: center; cursor: pointer; transition: 0.2s; }
.fsoc:hover { background: var(--r); }
.ft-h { font-size: 11px; font-weight: 800; text-transform: uppercase; color: #fff; margin-bottom: 16px; letter-spacing: 0.05em; }
.ft-links { display: flex; flex-direction: column; gap: 10px; }
.ftl { font-size: 13px; color: var(--d4); cursor: pointer; font-weight: 500; transition: 0.2s; }
.ftl:hover { color: #fff; }

.ft-bot { padding: 20px 0; display: flex; align-items: center; justify-content: space-between; font-size: 12px; color: var(--d4); }
.ft-bot span { color: var(--r); font-weight: 700; }

/* RESPONSIVE DESIGN */
/* MOBILE MENU */
.mobile-nav { position: fixed; top: 0; right: -100%; width: 280px; height: 100%; background: #fff; z-index: 200; transition: right 0.3s ease-in-out; box-shadow: -10px 0 30px rgba(0,0,0,0.1); display: flex; flex-direction: column; padding: 20px; }
.mobile-nav.open { right: 0; }
.mobile-nav-header { display: flex; justify-content: space-between; align-items: center; padding-bottom: 20px; border-bottom: 1px solid var(--b); }
.mobile-nav-links { display: flex; flex-direction: column; gap: 10px; padding: 20px 0; }
.mobile-nav-links .nl { font-size: 15px; padding: 12px 0; }
.mobile-nav .btn-solid { width: 100%; text-align: center; padding: 12px; margin-top: auto; }
.overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.5); z-index: 150; opacity: 0; visibility: hidden; transition: opacity 0.3s, visibility 0.3s; }
.overlay.open { opacity: 1; visibility: visible; }

@media (max-width: 992px) { 
  .grid { grid-template-columns: repeat(2, 1fr); gap: 16px; }
  .grid-shop { grid-template-columns: repeat(3, 1fr); gap: 16px; }
  .shop-layout { grid-template-columns: 220px 1fr; }
  .ft-top { grid-template-columns: 1fr 1fr; } 
}
@media (max-width: 768px) {
  .container { padding: 0 20px; }
  .section { padding-top: 48px; padding-bottom: 48px; }
  .nav-links { display: none; }
  .nav-r .btn-solid { display: none; }
  .hamburger { display: block; }
  .nav { height: 60px; }
  .hero-h { font-size: 32px; }
  .hero-sub { font-size: 14px; }
  .stats-container { flex-wrap: wrap; gap: 24px; justify-content: space-around; }
  .stat-v { font-size: 22px; }
  .sh-row { flex-direction: column; align-items: flex-start; gap: 8px; }
  .sh { font-size: 20px; }
  .sm { font-size: 12px; }
  .grid { grid-template-columns: repeat(2, 1fr); }
  .grid-shop { grid-template-columns: repeat(2, 1fr); }
  .shop-controls { justify-content: flex-start; }
  .shop-layout { grid-template-columns: 1fr; gap: 24px; }
  .acard-img { height: 140px; font-size: 50px; }
  .timer-floating { top: 140px; }
  .aname { font-size: 13px; margin-bottom: 12px; }
  .pv { font-size: 20px; }
  .abody { padding: 16px; }
  .timer-floating { padding: 6px 10px; font-size: 14px; }
  .timer-floating span { font-size: 7px; }  
  .ft-top { grid-template-columns: 1fr; gap: 32px; text-align: center; }
  .ft-social { justify-content: center; }
  .ft-desc { margin-left: auto; margin-right: auto; }
  .ft-bot { flex-direction: column; gap: 12px; text-align: center; }
}
@media (max-width: 480px) {
  .grid, .grid-shop { grid-template-columns: 1fr; }
  .hero-h { font-size: 28px; }
}

/* AUCTION/PRODUCT DETAIL PAGE */
.product-images .main-image { background: #fff; border: 1px solid var(--b); border-radius: 16px; padding: 20px; text-align: center; margin-bottom: 16px; }
.product-images .main-image img { max-width: 100%; height: auto; max-height: 400px; }
.thumbnail-images { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; }
.thumbnail-images .thumb { border: 2px solid var(--b); border-radius: 10px; padding: 5px; cursor: pointer; transition: border-color 0.2s; }
.thumbnail-images .thumb:hover, .thumbnail-images .thumb.active { border-color: var(--r); }
.thumbnail-images .thumb img { width: 100%; border-radius: 6px; }

/* PAGE-SPECIFIC STYLES (from inline styles) */
.page-header { background: var(--d); color: #fff; padding: 40px 0; text-align: center; }
.page-title { font-size: 32px; font-weight: 900; letter-spacing: -1px; }
.page-subtitle { font-size: 14px; color: var(--d4); margin-top: 8px; }

/* PRODUCT/AUCTION DETAIL LAYOUT */
.auction-detail-layout, .product-detail-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
.product-images .main-image { background: #fff; border: 1px solid var(--b); border-radius: 16px; padding: 20px; text-align: center; margin-bottom: 16px; }
.product-images .main-image img { max-width: 100%; height: auto; max-height: 400px; }
.thumbnail-images { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; }
.thumbnail-images .thumb { border: 2px solid var(--b); border-radius: 10px; padding: 5px; cursor: pointer; transition: border-color 0.2s; }
.thumbnail-images .thumb:hover, .thumbnail-images .thumb.active { border-color: var(--r); }
.thumbnail-images .thumb img { width: 100%; border-radius: 6px; }

.product-info .p-cat, .auction-info .p-cat { font-size: 12px; font-weight: 700; color: var(--d4); text-transform: uppercase; margin-bottom: 8px; }
.product-info .p-name, .auction-info .p-name { font-size: 28px; font-weight: 900; color: var(--d); letter-spacing: -1px; margin-bottom: 16px; }
.product-info .p-price { font-size: 36px; font-weight: 900; color: var(--r); margin-bottom: 24px; }
.product-info .p-features { list-style: none; margin-bottom: 24px; padding-left: 20px; }
.product-info .p-features li { margin-bottom: 8px; font-size: 14px; color: var(--d3); position: relative; }
.product-info .p-features li::before { content: '✓'; position: absolute; left: -20px; color: var(--g); }
.actions { display: flex; flex-direction: column; gap: 12px; }
.quantity-selector { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.quantity-selector button { width: 40px; height: 40px; border: 1px solid var(--b); background: #fff; border-radius: 8px; font-size: 20px; cursor: pointer; }
.quantity-selector input { width: 60px; height: 40px; border: 1px solid var(--b); border-radius: 8px; text-align: center; font-size: 16px; font-weight: 700; -moz-appearance: textfield; }
.quantity-selector input::-webkit-outer-spin-button, .quantity-selector input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

.tabs { display: flex; border-bottom: 1px solid var(--b); margin: 40px 0 24px; }
.tab-link { padding: 12px 20px; font-size: 14px; font-weight: 700; color: var(--d3); cursor: pointer; border-bottom: 3px solid transparent; }
.tab-link.active { color: var(--r); border-bottom-color: var(--r); }
.tab-content { font-size: 14px; line-height: 1.7; color: var(--d3); }

@media (max-width: 768px) { .auction-detail-layout, .product-detail-layout { grid-template-columns: 1fr; } }

/* AUCTION HISTORY PAGE */
.auction-summary {
  background: var(--s);
  border: 1px solid var(--b);
  border-radius: 12px;
  padding: 16px;
  font-size: 14px;
  color: var(--d3);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.history-table-wrapper { margin-top: 48px; }
.history-table { width: 100%; border-collapse: collapse; background: #fff; border-radius: 12px; overflow: hidden; border: 1px solid var(--b); font-size: 13px; }
.history-table th, .history-table td { padding: 12px 16px; text-align: left; }
.history-table th { background: var(--s); font-weight: 700; color: var(--d3); text-transform: uppercase; font-size: 11px; }
.history-table tr:not(:last-child) { border-bottom: 1px solid var(--b2); }
.history-table tbody tr:hover { background-color: var(--s); }
.history-table td:first-child { color: var(--d4); font-weight: 600; }
.history-table strong { color: var(--d); font-weight: 700; }
.history-table .user-cell { display: flex; align-items: center; gap: 10px; }
.history-table .user-avatar { width: 32px; height: 32px; border-radius: 50%; background-color: var(--b2); }
.history-table .user-avatar img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.history-table .bid-price { font-weight: 700; color: var(--d); }
.history-table .winner-row {
  background-color: var(--rl);
  border-left: 3px solid var(--r);
}

/* CREDITS PAGE */
.credit-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.credit-pack { background: #fff; border: 1px solid var(--b); border-radius: 16px; padding: 24px; text-align: center; transition: 0.3s; position: relative; overflow:hidden; display: flex; flex-direction: column; }
.credit-pack:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: var(--r); }

.cp-popular { position: absolute; top: 0; left: 50%; transform: translateX(-50%); background: var(--r); color: #fff; font-size: 11px; font-weight: 800; padding: 6px 20px; border-radius: 0 0 8px 8px; }

.cp-name { font-size: 16px; font-weight: 800; color: var(--d); margin-top: 20px; }
.cp-amount { font-size: 36px; font-weight: 900; color: var(--d); margin-top: 8px; }
.cp-amount span { font-size: 16px; font-weight: 700; color: var(--d3); }
.cp-bonus { color: var(--r); font-weight: 700; font-size: 14px; margin: 4px 0 16px; height: 20px; }

.cp-price { display: flex; justify-content: center; align-items: baseline; gap: 4px; padding: 20px 0; margin: 16px 0; border-top: 1px solid var(--b2); border-bottom: 1px solid var(--b2); }
.cp-price-val { font-size: 32px; font-weight: 900; color: var(--d); letter-spacing: -1px; }
.cp-price-curr { font-size: 16px; font-weight: 700; color: var(--d3); }

.cp-button { width: 100%; padding: 12px; background: var(--d); color: #fff; border: none; border-radius: 10px; font-size: 13px; font-weight: 800; cursor: pointer; transition: 0.2s; margin-top: auto; }
.credit-pack:hover .cp-button { background: var(--r); }

@media (max-width: 768px) {
  .credit-grid { grid-template-columns: 1fr; }
}

/* ===== LEGAL / ТЕКСТ ХУУДАС (Нөхцөл, Нууцлал) ===== */
.legal { max-width: 800px; margin: 0 auto; }
.legal .updated { font-size: 13px; color: var(--d4); margin-bottom: 28px; }
.legal h2 { font-size: 18px; font-weight: 800; color: var(--d); margin: 28px 0 10px; }
.legal h2:first-of-type { margin-top: 0; }
.legal p { font-size: 14px; line-height: 1.8; color: var(--d3); margin-bottom: 12px; }
.legal ul { padding-left: 22px; margin-bottom: 12px; }
.legal li { font-size: 14px; line-height: 1.8; color: var(--d3); margin-bottom: 6px; }

/* ===== TOAST МЭДЭГДЭЛ ===== */
#toast-container { position: fixed; top: 20px; right: 20px; z-index: 9999;
  display: flex; flex-direction: column; gap: 10px; pointer-events: none; }
.toast { display: flex; align-items: center; gap: 10px; background: #fff;
  border: 1px solid var(--b); border-left: 4px solid var(--d3); border-radius: 10px;
  padding: 13px 16px; min-width: 260px; max-width: 360px; box-shadow: var(--shadow-md);
  font-size: 14px; font-weight: 600; color: var(--d);
  transform: translateX(120%); opacity: 0; transition: transform 0.3s ease, opacity 0.3s ease;
  pointer-events: auto; }
.toast.show { transform: translateX(0); opacity: 1; }
.toast i { font-size: 20px; flex-shrink: 0; }
.toast-success { border-left-color: var(--g); }
.toast-success i { color: var(--g); }
.toast-error { border-left-color: var(--r); }
.toast-error i { color: var(--r); }
.toast-info { border-left-color: #2563EB; }
.toast-info i { color: #2563EB; }
@media (max-width: 480px) {
  #toast-container { left: 16px; right: 16px; top: 16px; }
  .toast { min-width: 0; max-width: none; }
}
/* ===================================================================
   АМЬД ШОУ — глобал тууз, шоу орой, leaderboard, битүү хайрцаг
   =================================================================== */

/* Глобал саналын урсдаг тууз (нүүрний дээд хэсэг) */
.ticker-wrap { background: var(--d); overflow: hidden; position: relative; border-bottom: 1px solid rgba(255,255,255,0.07); }
.ticker-track { display: inline-flex; gap: 40px; padding: 10px 0; white-space: nowrap;
  animation: tickmove 45s linear infinite; will-change: transform; }
.ticker-wrap:hover .ticker-track { animation-play-state: paused; }
@keyframes tickmove { from { transform: translateX(0); } to { transform: translateX(-50%); } }
.tick-item { display: inline-flex; align-items: center; gap: 8px; color: var(--d4);
  font-size: 13px; font-weight: 600; }
.tick-item i { color: var(--r); font-size: 15px; }
.tick-item b { color: #fff; font-variant-numeric: tabular-nums; font-weight: 800; }
.tick-item .tk-price { color: #FB7185; font-weight: 800; font-variant-numeric: tabular-nums; }
.tick-item .tk-ago { font-size: 11px; color: var(--d3); }
.tick-item:hover { color: #fff; }
@media (prefers-reduced-motion: reduce) { .ticker-track { animation: none; } }

/* Шоу оройн зарлал (дараагийн бөөн эхлэлтийн countdown) */
.show-banner { display: flex; align-items: center; justify-content: center; gap: 22px; flex-wrap: wrap;
  background: linear-gradient(135deg, #1E1B4B 0%, #4C1D95 60%, #6D28D9 100%);
  color: #fff; border-radius: 20px; padding: 20px 28px; margin: 28px auto 0; max-width: 760px;
  box-shadow: 0 16px 32px -12px rgba(76, 29, 149, 0.5); }
.show-banner .shb-icon { font-size: 36px; line-height: 1; }
.shb-lbl { font-size: 11px; text-transform: uppercase; letter-spacing: 0.09em; color: #C4B5FD; font-weight: 800; }
.shb-title { font-size: 17px; font-weight: 900; margin-top: 2px; }
.shb-timer { font-size: 32px; font-weight: 900; font-variant-numeric: tabular-nums; letter-spacing: 1px; }
.shb-cta { background: #fff; color: #4C1D95; font-size: 13px; font-weight: 800;
  padding: 10px 18px; border-radius: 10px; transition: 0.2s; }
.shb-cta:hover { transform: translateY(-1px); box-shadow: 0 8px 16px rgba(0,0,0,0.25); }

/* Долоо хоногийн шилдэг оролцогчид */
.lb-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; }
.lb-card { background: #fff; border: 1px solid var(--b); border-radius: 14px;
  padding: 20px 14px; text-align: center; transition: 0.2s; }
.lb-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.lb-card.top { border-color: #FCD34D; background: #FFFBEB; }
.lb-medal { font-size: 32px; line-height: 1; }
.lb-phone { font-weight: 800; margin-top: 10px; font-variant-numeric: tabular-nums; color: var(--d); }
.lb-bids { font-size: 12px; color: var(--d3); margin-top: 4px; }
.lb-bids b { color: var(--r); }
@media (max-width: 900px) { .lb-grid { grid-template-columns: repeat(2, 1fr); } .lb-card:nth-child(5) { grid-column: 1 / -1; } }

/* Битүү хайрцаг (mystery) card */
.acard.mystery .acard-img { background: linear-gradient(135deg, #312E81, #6D28D9); }
.acard.mystery .acard-img > i.ti { color: #DDD6FE; }
.pill-mystery { position: absolute; top: 12px; right: 12px; background: #7C3AED; color: #fff;
  font-size: 10px; font-weight: 800; padding: 4px 10px; border-radius: 8px; z-index: 2; }

/* ===== In-app мэдэгдэл (хонх) ===== */
.nav-notif { position: relative; }
.nav-notif .nav-cart { background: none; border: none; cursor: pointer; font-family: inherit; }
.notif-drop { display: none; position: absolute; right: -60px; top: calc(100% + 12px); width: 340px;
  background: #fff; border: 1px solid var(--b); border-radius: 14px; box-shadow: var(--shadow-md);
  z-index: 200; overflow: hidden; }
.notif-drop.open { display: block; animation: fadeIn 0.18s; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
.nd-head { padding: 13px 16px; font-size: 13px; font-weight: 900; color: var(--d);
  border-bottom: 1px solid var(--b); background: var(--s); }
.nd-list { max-height: 380px; overflow-y: auto; }
.nd-item { display: block; padding: 12px 16px; border-bottom: 1px solid var(--b2);
  font-size: 13px; color: var(--d3); line-height: 1.5; transition: background 0.15s; }
.nd-item:hover { background: var(--s); }
.nd-item:last-child { border-bottom: none; }
.nd-item.unread { background: var(--rl); }
.nd-item.unread:hover { background: #FFE4E6; }
.nd-item .nd-time { display: block; font-size: 11px; color: var(--d4); margin-top: 3px; }
.nd-empty { padding: 30px 16px; text-align: center; color: var(--d4); font-size: 13px; }
@media (max-width: 480px) { .notif-drop { position: fixed; left: 12px; right: 12px; top: 64px; width: auto; } }
