/* ============================================
   PRICEY v4 — MAIN STYLESHEET
   Base + Components + Pages
   ============================================ */

@import url('variables.css');

/* === RESET === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; text-size-adjust: 100%; }
body { font-family: var(--sans); font-size: 15px; line-height: 1.55; color: var(--text); background: var(--ivory); min-height: 100vh; }
img, picture, video, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; font-size: inherit; }
input, textarea, select { font-family: inherit; font-size: inherit; color: inherit; }
ul, ol { list-style: none; }
h1, h2, h3, h4, h5, h6 { font-family: var(--serif); font-weight: 400; line-height: 1.15; letter-spacing: -0.01em; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; border-radius: 4px; }

/* === UTILITIES === */
.container { max-width: var(--container); margin-inline: auto; padding-inline: 16px; }
@media (min-width: 768px) { .container { padding-inline: 24px; } }
@media (min-width: 1024px) { .container { padding-inline: 32px; } }
.text-center { text-align: center; }
.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; }

/* Scroll reveal — content is VISIBLE by default; animation only activates if JS sets html.js-reveal */
[data-reveal] { transition: opacity 0.6s cubic-bezier(0.4,0,0.2,1), transform 0.6s cubic-bezier(0.4,0,0.2,1); }
html.js-reveal [data-reveal] { opacity: 0; transform: translateY(20px); }
html.js-reveal [data-reveal].visible { opacity: 1; transform: translateY(0); }

/* Scrollbar hide */
.scroll-x { overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.scroll-x::-webkit-scrollbar { display: none; }

/* === TOP ACCENT === */
.topline { height: 3px; background: linear-gradient(90deg, var(--esp), var(--text-muted) 50%, var(--esp)); }

/* === NAV === */
.nav { position: sticky; top: 0; z-index: 100; background: rgba(250,248,245,0.92); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border-bottom: 1px solid var(--border); }
.nav.nav-dark { background: rgba(26,20,16,0.92); border-bottom-color: rgba(212,168,83,0.1); }
.nav-inner { max-width: var(--container); margin: 0 auto; display: flex; align-items: center; justify-content: space-between; height: 56px; padding: 0 16px; gap: 12px; }
@media (min-width: 768px) { .nav-inner { height: 64px; padding: 0 24px; } }
.nav-logo { font-family: var(--serif); font-size: 22px; color: var(--text); letter-spacing: -0.5px; white-space: nowrap; margin-right: 20px; }
@media (min-width: 1024px) { .nav-logo { margin-right: 48px; } }
.nav-dark .nav-logo { color: var(--ivory); }
.nav-logo i { color: var(--gold); font-style: normal; }
.vip-tag { font-family: var(--sans); font-size: 9px; font-weight: 700; letter-spacing: 2px; color: var(--esp); background: var(--gold); padding: 2px 8px; border-radius: 4px; margin-left: 8px; vertical-align: middle; }

.nav-links { display: none; gap: 28px; align-items: center; }
@media (min-width: 1024px) { .nav-links { display: flex; } }
.nav-links a { font-size: 14px; font-weight: 500; color: var(--text-mid); transition: color var(--trans-fast); }
.nav-links a:hover, .nav-links a.active { color: var(--text); }
.nav-dark .nav-links a { color: rgba(250,248,245,0.6); }
.nav-dark .nav-links a:hover, .nav-dark .nav-links a.active { color: var(--ivory); }

.nav-search { flex: 1; max-width: 420px; position: relative; display: none; }
@media (min-width: 768px) { .nav-search { display: block; } }
.nav-search input { width: 100%; padding: 9px 16px 9px 38px; border: 1px solid var(--border); border-radius: var(--r-pill); background: var(--card); font-size: 14px; outline: none; transition: border-color var(--trans-fast); }
.nav-search input:focus { border-color: var(--gold); }
.nav-search svg { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: var(--text-muted); }

.nav-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.icon-btn { width: 36px; height: 36px; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: var(--text-mid); transition: background var(--trans-fast); }
.icon-btn:hover { background: var(--cream); }
.icon-btn svg { width: 20px; height: 20px; }
.nav-dark .icon-btn { color: rgba(250,248,245,0.7); }
.nav-dark .icon-btn:hover { background: rgba(255,255,255,0.06); }
.nav-avatar { width: 32px; height: 32px; border-radius: 50%; overflow: hidden; object-fit: cover; border: 2px solid transparent; transition: border-color var(--trans-fast); flex-shrink: 0; display: inline-block; }
.nav-avatar img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; display: block; }
.nav-avatar:hover { border-color: var(--gold); }
.nav-toggle, .nav-mobile-toggle { display: flex; width: 36px; height: 36px; align-items: center; justify-content: center; color: var(--text); }
.nav-dark .nav-toggle, .nav-dark .nav-mobile-toggle { color: var(--ivory); }
.nav-mobile-toggle { flex-direction: column; gap: 4px; padding: 0; }
.nav-mobile-toggle span { display: block; width: 20px; height: 2px; background: currentColor; border-radius: 2px; }
@media (min-width: 1024px) { .nav-toggle, .nav-mobile-toggle { display: none !important; } }

/* Mobile menu (hardcoded VIP pages use this) */
.mmenu { position: fixed; inset: 0; background: rgba(44,36,23,0.5); z-index: 200; opacity: 0; pointer-events: none; transition: opacity var(--trans-slow); }
.mmenu.open { opacity: 1; pointer-events: auto; }
.mmenu-panel { position: absolute; top: 0; right: 0; bottom: 0; width: 80%; max-width: 320px; background: var(--ivory); padding: 24px; transform: translateX(100%); transition: transform var(--trans-slow); overflow-y: auto; }
.mmenu.open .mmenu-panel { transform: translateX(0); }
.mmenu-close { position: absolute; top: 12px; right: 12px; width: 40px; height: 40px; font-size: 28px; color: var(--text-mid); }
.mmenu-links { margin-top: 48px; display: flex; flex-direction: column; gap: 4px; }
.mmenu-links a { display: block; padding: 14px 16px; border-radius: var(--r-md); font-size: 16px; font-weight: 500; color: var(--text); transition: background var(--trans-fast); }
.mmenu-links a:hover { background: var(--cream); }

/* === BOTTOM NAV === */
.bnav { position: fixed; bottom: 0; left: 0; right: 0; z-index: 100; height: 56px; background: var(--card); border-top: 1px solid var(--border); display: flex; align-items: center; justify-content: space-around; padding-bottom: env(safe-area-inset-bottom, 0); }
@media (min-width: 1024px) { .bnav { display: none; } }
body.has-bnav { padding-bottom: 56px; }
@media (min-width: 1024px) { body.has-bnav { padding-bottom: 0; } }
.bnav-item { display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 10px; font-weight: 500; color: var(--text-muted); transition: color var(--trans-fast); text-decoration: none; }
.bnav-item.active { color: var(--gold); }
.bnav-item svg { width: 22px; height: 22px; }
.bnav-add { width: 48px !important; height: 48px !important; background: var(--gold) !important; border-radius: 50%; display: flex; align-items: center; justify-content: center; margin-top: -12px; box-shadow: 0 2px 12px rgba(212,168,83,0.4); color: #fff !important; gap: 0 !important; }
.bnav-add .bnav-add-icon { font-size: 26px; font-weight: 300; line-height: 1; color: #fff; }
.bnav-add svg { width: 22px; height: 22px; }

/* === BUTTONS === */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 11px 22px; border-radius: var(--r-pill); font-size: 14px; font-weight: 600; line-height: 1.2; transition: all var(--trans); white-space: nowrap; cursor: pointer; font-family: var(--sans); }
.btn-primary { background: var(--esp); color: var(--ivory); }
.btn-primary:hover { background: var(--esp-light); transform: translateY(-1px); }
.btn-gold { background: var(--gold); color: #fff; }
.btn-gold:hover { background: var(--gold-hover); transform: translateY(-1px); }
.btn-ghost { background: var(--card); color: var(--text); border: 1px solid var(--border); }
.btn-ghost:hover { border-color: var(--text-mid); }
.btn-secondary { background: var(--cream); color: var(--text); }
.btn-secondary:hover { background: var(--sand); }
.btn-danger { background: var(--card); color: var(--red); border: 1px solid var(--red-bg); }
.btn-danger:hover { background: var(--red-bg); }
.btn-lg { padding: 14px 30px; font-size: 15px; }
.btn-sm { padding: 7px 14px; font-size: 12px; }
.btn-block { width: 100%; }

/* === BADGES === */
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: var(--r-pill); font-size: 11px; font-weight: 700; letter-spacing: 0.3px; white-space: nowrap; }
.bd-sale { background: rgba(255,255,255,0.95); color: var(--text); border: 1px solid var(--border); }
.bd-offers { background: var(--gold-light); color: #8a6d2f; }
.bd-trade { background: var(--green-bg); color: var(--green); }
.bd-private { background: var(--cream); color: var(--text-mid); }
.bd-charity { background: var(--amber-bg); color: var(--amber); }
.bd-vip { background: var(--gold); color: #fff; }
.bd-new { background: var(--blue-bg); color: var(--blue); }

/* === PRICEY SCORE === */
.pscore { display: inline-flex; align-items: center; gap: 5px; padding: 5px 14px; border-radius: var(--r-pill); background: var(--card); border: 1px solid var(--border); font-size: 12px; font-weight: 600; }
.pscore .stars { color: var(--gold); letter-spacing: 1px; }

/* === VERIFIED === */
.verified { display: inline-flex; align-items: center; justify-content: center; width: 18px; height: 18px; border-radius: 50%; background: var(--esp); color: var(--ivory); vertical-align: middle; }
.verified svg { width: 11px; height: 11px; }
.verified-gold { background: var(--gold); color: #fff; }

/* === FOOTER === */
.footer { background: var(--esp); color: var(--ivory); padding: 48px 16px 24px; }
@media (min-width: 768px) { .footer { padding: 64px 24px 32px; } }
.footer-grid, .footer-inner { max-width: var(--container); margin: 0 auto; display: grid; grid-template-columns: 1fr; gap: 32px; }
@media (min-width: 768px) { .footer-grid, .footer-inner { grid-template-columns: 2fr 1fr 1fr 1fr; } }
.footer-brand { font-family: var(--serif); font-size: 24px; }
.footer-brand i { color: var(--gold); font-style: normal; }
.footer-logo { font-family: var(--serif); font-size: 24px; }
.footer-logo i { color: var(--gold); font-style: normal; }
.footer-brand p { font-size: 13px; color: var(--text-muted); margin-top: 6px; }
.footer-tagline { font-size: 13px; color: var(--text-muted); margin-top: 6px; }
.footer-col-title { font-size: 11px; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: 1.5px; margin-bottom: 14px; }
.footer-col h4 { font-size: 11px; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: 1.5px; margin-bottom: 14px; font-family: var(--sans); }
.footer-col a { display: block; font-size: 13px; color: rgba(250,248,245,0.6); margin-bottom: 8px; transition: color var(--trans-fast); }
.footer-col a:hover { color: var(--ivory); }
.footer-bottom, .footer-copy { max-width: var(--container); margin: 40px auto 0; padding-top: 20px; border-top: 1px solid rgba(250,248,245,0.08); font-size: 12px; color: var(--text-muted); }
.footer-bottom { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; }
.footer-social { display: flex; gap: 10px; margin-top: 12px; }
.footer-social a { width: 32px; height: 32px; border-radius: 50%; border: 1px solid rgba(250,248,245,0.15); display: flex; align-items: center; justify-content: center; transition: all var(--trans-fast); }
.footer-social a:hover { background: var(--gold); border-color: var(--gold); }
.footer-social svg { width: 14px; height: 14px; }

/* === ITEM CARDS === */
.icard { background: var(--card); border-radius: var(--r-md); border: 1px solid var(--border); overflow: hidden; transition: all var(--trans-slow); cursor: pointer; display: block; }
.icard:hover { transform: translateY(-4px); box-shadow: var(--sh-lg); }
.icard-img { aspect-ratio: 4/5; overflow: hidden; position: relative; background: var(--cream); }
.icard-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s; }
.icard:hover .icard-img img { transform: scale(1.04); }
.icard-badge { position: absolute; top: 8px; right: 8px; backdrop-filter: blur(8px); }
.icard-body { padding: 10px 12px 12px; }
.icard-cat { font-size: 10px; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: 1px; margin-bottom: 4px; }
.icard-name { font-family: var(--serif); font-size: 15px; line-height: 1.25; margin-bottom: 6px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.icard-price { font-size: 16px; font-weight: 700; letter-spacing: -0.3px; }
.icard-user { display: flex; align-items: center; gap: 6px; padding-top: 8px; margin-top: 8px; border-top: 1px solid var(--border); }
.icard-uav { width: 22px; height: 22px; border-radius: 50%; object-fit: cover; }
.icard-uname { font-size: 12px; font-weight: 500; }
.icard-uloc { font-size: 11px; color: var(--text-muted); }

/* === FORMS === */
.fld { margin-bottom: 18px; }
.lbl { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; }
.lbl .req { color: var(--red); }
.hint { font-size: 12px; color: var(--text-muted); margin-top: 5px; line-height: 1.4; }
.inp, .txt, .sel { width: 100%; padding: 11px 14px; border: 1px solid var(--border); border-radius: var(--r-md); background: var(--card); font-size: 15px; outline: none; transition: all var(--trans-fast); font-family: var(--sans); }
.inp:focus, .txt:focus, .sel:focus { border-color: var(--gold); box-shadow: 0 0 0 3px var(--gold-light); }
.txt { min-height: 96px; resize: vertical; line-height: 1.5; }
.sel { appearance: none; background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236b5e50' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'/%3e%3c/svg%3e"); background-repeat: no-repeat; background-position: right 12px center; background-size: 16px; padding-right: 36px; }

/* Section titles */
.sec-title { font-family: var(--serif); font-size: clamp(24px, 4vw, 40px); line-height: 1.15; }
.sec-title em { color: var(--gold); font-style: italic; }
.sec-sub { font-size: 16px; color: var(--text-mid); max-width: 520px; line-height: 1.6; }
.sec-lbl { font-size: 11px; font-weight: 700; color: var(--gold); text-transform: uppercase; letter-spacing: 2px; margin-bottom: 8px; }
.sec { padding: 48px 0; }
@media (min-width: 768px) { .sec { padding: 72px 0; } }
@media (min-width: 1024px) { .sec { padding: 96px 0; } }
.sec.sec-sm { padding: 32px 0; }
@media (min-width: 768px) { .sec.sec-sm { padding: 48px 0; } }

/* Animation for live auctions */
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.3; } }
.live-dot::before { content: ''; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #ef4444; margin-right: 6px; animation: pulse 1.5s infinite; vertical-align: middle; }

/* === SAFETY FALLBACKS (ensure key layouts NEVER break) === */
.pstats { display: grid !important; grid-template-columns: repeat(4, 1fr) !important; gap: 0; }
.pstat { text-align: center; }
