/* Boli (Bolilaga) — Classima-style LIGHT theme, same as the demo. No dark mode. */
:root {
  --bg: #e9eff3; --surface: #ffffff; --text: #222222; --dim: #686868;
  --border: #dfe5ea; --accent: #f8566a; --accent-dark: #dd3c52; --accent-ink: #ffffff;
  --amber: #ffc61a; --amber-ink: #222222; --danger: #d92d20; --footer: #22242a;
  --radius: 8px; --shadow: 0 2px 10px rgba(16, 24, 40, 0.08);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: "Poppins", system-ui, -apple-system, "Segoe UI", sans-serif; font-size: 15px; line-height: 1.5; padding-bottom: 64px; }
@media (min-width: 640px) { body { padding-bottom: 0; } }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
.wrap { max-width: 1024px; margin: 0 auto; padding: 0 16px; }
h1, h2, h3, h4 { margin: 0; line-height: 1.3; }

/* Buttons */
.btn { display: inline-flex; align-items: center; gap: 6px; justify-content: center; border: 0; border-radius: var(--radius); padding: 10px 18px; font-weight: 600; cursor: pointer; background: var(--accent); color: var(--accent-ink); }
.btn:hover { background: var(--accent-dark); }
.btn-white { background: #fff; color: var(--accent); }
.btn-white:hover { background: #ffe9ec; }
.btn-coral { background: var(--accent); color: #fff; }
.btn-ghost { background: #fff; color: var(--text); border: 1px solid var(--border); }
.btn-ghost:hover { background: #f4f7f9; }
.btn-sm { padding: 8px 14px; font-size: 14px; }
.btn-block { width: 100%; }
.btn:disabled { opacity: .55; cursor: not-allowed; }

/* Header */
.site-header { background: var(--accent); color: #fff; position: sticky; top: 0; z-index: 40; box-shadow: 0 1px 6px rgba(0,0,0,.15); }
.header-in { display: flex; align-items: center; gap: 16px; height: 60px; }
.brand { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.brand-logo { height: 34px; width: auto; border-radius: 6px; }
.brand-text { font-size: 26px; font-weight: 800; letter-spacing: -.5px; }
.brand-dot { color: var(--amber); }
.brand-tag { display: none; font-size: 11px; font-weight: 600; letter-spacing: 2px; text-transform: uppercase; opacity: .9; border-left: 1px solid rgba(255,255,255,.4); padding-left: 10px; }
@media (min-width: 900px) { .brand-tag { display: inline; } }
.main-nav { display: none; align-items: center; gap: 4px; margin-left: 8px; }
@media (min-width: 760px) { .main-nav { display: flex; } }
.main-nav a { display: flex; align-items: center; gap: 6px; padding: 8px 12px; border-radius: var(--radius); font-weight: 500; }
.main-nav a:hover { background: rgba(255,255,255,.16); }
.header-actions { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.desktop-only { display: none; }
@media (min-width: 760px) { .desktop-only { display: inline-flex; } }
.flash { background: #fff8e1; border: 1px solid #ffe082; color: #5d4037; border-radius: var(--radius); padding: 10px 14px; margin: 12px 0 0; font-size: 14px; }

/* Hero */
.hero { background: var(--accent); color: #fff; padding: 34px 0 44px; }
.hero-form { max-width: 820px; margin: 0 auto; }
.hero-loc { display: flex; align-items: center; gap: 10px; font-weight: 600; margin-bottom: 12px; }
.loc-select { display: inline-flex; align-items: center; gap: 6px; background: var(--accent-dark); border-radius: var(--radius); padding: 6px 10px; }
.loc-select select { background: transparent; border: 0; color: #fff; font-weight: 600; outline: none; cursor: pointer; }
.loc-select select option { color: var(--text); }
.hero-search { display: flex; background: #fff; border-radius: 12px; padding: 6px; gap: 6px; box-shadow: 0 6px 20px rgba(0,0,0,.18); }
.hero-search-ic { display: flex; align-items: center; padding-left: 10px; color: var(--dim); }
.hero-search input { flex: 1; border: 0; outline: none; font-size: 15px; min-width: 0; color: var(--text); }
.hero-search .btn { border-radius: 8px; }

/* Browse layout */
.browse { display: block; padding: 22px 0 8px; }
@media (min-width: 1024px) { .browse { display: flex; gap: 24px; align-items: flex-start; } .browse-main { flex: 1; min-width: 0; } }
.browse-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.browse-head h1, .browse-head h2 { font-size: 22px; font-weight: 700; }
.browse-head .count { color: var(--dim); font-size: 14px; }
.browse-tools { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.sort-select { border: 1px solid var(--border); border-radius: var(--radius); background: #fff; padding: 8px 10px; font-size: 14px; }
.filter-btn { position: relative; }
.filter-count { position: absolute; top: -7px; right: -7px; background: var(--amber); color: var(--amber-ink); font-size: 11px; font-weight: 700; min-width: 20px; height: 20px; border-radius: 10px; display: flex; align-items: center; justify-content: center; padding: 0 5px; }

/* Category sidebar + chips */
.cat-sidebar { display: none; width: 260px; flex-shrink: 0; position: sticky; top: 76px; }
@media (min-width: 1024px) { .cat-sidebar { display: block; } }
.cat-card { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 14px; }
.cat-card h3 { font-size: 15px; margin-bottom: 8px; }
.cat-card ul { list-style: none; margin: 0; padding: 0; }
.cat-card a { display: flex; align-items: center; gap: 10px; padding: 9px 8px; border-radius: var(--radius); font-weight: 500; }
.cat-card a:hover { background: #f4f7f9; }
.cat-card a.active { color: var(--accent); background: #fff0f2; }
.cat-card a svg { color: var(--accent); flex-shrink: 0; }
.cat-card a b { margin-left: auto; font-weight: 600; color: var(--dim); font-size: 13px; }
.cat-card a .chev { opacity: 0; }
.cat-chips { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 12px; scrollbar-width: none; }
.cat-chips::-webkit-scrollbar { display: none; }
@media (min-width: 1024px) { .cat-chips { display: none; } }
.chip { flex-shrink: 0; display: inline-flex; align-items: center; gap: 6px; background: #fff; border: 1px solid var(--border); border-radius: 20px; padding: 7px 12px; font-size: 13px; font-weight: 500; }
.chip.active { background: var(--accent); border-color: var(--accent); color: #fff; }

/* Listing grid + cards */
.grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
@media (min-width: 768px) { .grid { grid-template-columns: repeat(3, 1fr); } }
.card { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; display: flex; flex-direction: column; }
.card-media { position: relative; display: block; aspect-ratio: 4 / 3; background: var(--bg); overflow: hidden; }
.card-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.card-ph { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; color: var(--dim); }
.card-ph small { font-size: 12px; font-weight: 600; }
.ribbon { position: absolute; top: 10px; left: 0; font-size: 11px; font-weight: 700; letter-spacing: .4px; text-transform: uppercase; color: #fff; background: var(--accent); padding: 4px 10px; border-radius: 0 4px 4px 0; }
.ribbon.sold, .ribbon.ended { background: #3a3d44; }
@media (max-width: 480px) { .ribbon.live { font-size: 0; } .ribbon.live::after { content: "Live"; font-size: 11px; } }
.timer-pill { position: absolute; top: 10px; right: 10px; display: inline-flex; align-items: center; gap: 4px; background: rgba(0,0,0,.7); color: #fff; font-size: 12px; font-weight: 600; padding: 4px 8px; border-radius: 20px; }
.timer-pill.urgent { background: var(--danger); }
.card-body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.card-body h3 { font-size: 15px; font-weight: 600; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card-price { color: var(--accent); font-weight: 800; font-size: 18px; font-variant-numeric: tabular-nums; }
.card-meta { display: flex; align-items: center; gap: 6px; color: var(--dim); font-size: 13px; }
.empty { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 34px 20px; text-align: center; color: var(--dim); }

/* Filters panel */
.filters { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px; margin-bottom: 16px; }
.filters h3 { font-size: 15px; margin-bottom: 12px; }
.filter-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
@media (min-width: 760px) { .filter-grid { grid-template-columns: repeat(3, 1fr); } }
.field label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 5px; }
.field input, .field select, .field textarea { width: 100%; border: 1px solid var(--border); border-radius: var(--radius); padding: 9px 11px; background: #fff; outline: none; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(248,86,106,.15); }
.field-row { display: flex; gap: 8px; }
.filter-actions { display: flex; gap: 8px; margin-top: 14px; flex-wrap: wrap; }
.seg { display: flex; gap: 6px; flex-wrap: wrap; }
.seg label { border: 1px solid var(--border); border-radius: 20px; padding: 6px 12px; font-size: 13px; cursor: pointer; }
.seg input { display: none; }
.seg input:checked + span { font-weight: 700; }
.seg label:has(input:checked) { background: var(--accent); border-color: var(--accent); color: #fff; }

/* Detail page */
.back-link { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; color: var(--dim); margin: 16px 0 10px; }
.detail { display: grid; gap: 18px; padding-bottom: 24px; }
@media (min-width: 900px) { .detail { grid-template-columns: 1.5fr 1fr; } }
.detail-media { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; position: relative; }
.detail-media .media-box { aspect-ratio: 16 / 10; background: var(--bg); display: flex; align-items: center; justify-content: center; }
.detail-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.detail-media .card-ph { position: static; height: 100%; }
.detail-body { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px; }
.detail-body h1 { font-size: 21px; margin: 8px 0 6px; }
.detail-price { color: var(--accent); font-size: 26px; font-weight: 800; font-variant-numeric: tabular-nums; }
.detail-price small { display: block; font-size: 13px; color: var(--dim); font-weight: 500; }
.spec-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0; }
.spec { background: #f4f7f9; border: 1px solid var(--border); border-radius: 20px; padding: 5px 11px; font-size: 13px; }
.spec b { font-weight: 700; }
.desc { white-space: pre-wrap; color: #444; margin: 12px 0; }
.photo-credit { font-size: 12px; color: var(--dim); }
.bid-box { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px; }
.bid-box .min-note { font-size: 13px; color: var(--dim); margin: 6px 0 10px; }
.pledge { background: #fff8e1; border: 1px solid #ffe082; border-radius: var(--radius); padding: 10px 12px; font-size: 13px; margin: 10px 0; }
.pledge label { display: flex; gap: 8px; align-items: flex-start; cursor: pointer; }
.bid-history { margin-top: 16px; }
.bid-history h3 { font-size: 15px; margin-bottom: 8px; }
.bid-row { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-top: 1px solid var(--border); font-size: 14px; }
.bid-row .amt { font-weight: 700; color: var(--accent); }
.badge { font-size: 11px; font-weight: 700; padding: 3px 8px; border-radius: 20px; }
.badge.highest { background: #fff0f2; color: var(--accent); }
.badge.won { background: var(--amber); color: var(--amber-ink); }
.badge.winning { background: #fff0f2; color: var(--accent); }
.badge.outbid { background: #fdecea; color: var(--danger); }
.badge.lost { background: #eef1f3; color: var(--dim); }
.seller-card { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px; margin-top: 16px; }
.owner-bar { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.ended-box { background: #f4f7f9; border: 1px solid var(--border); border-radius: var(--radius); padding: 14px; margin-top: 14px; font-size: 14px; }
.ended-box b { color: var(--accent); }

/* Forms (post / auth) */
.form-card { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; max-width: 640px; margin: 22px auto 30px; }
.form-card.narrow { max-width: 440px; }
.form-card h1 { font-size: 21px; margin-bottom: 4px; }
.form-sub { color: var(--dim); font-size: 14px; margin-bottom: 16px; }
.form-grid { display: grid; gap: 14px; }
.form-grid.two { grid-template-columns: 1fr 1fr; }
@media (max-width: 560px) { .form-grid.two { grid-template-columns: 1fr; } }
.tabs { display: flex; border-bottom: 1px solid var(--border); margin-bottom: 16px; }
.tabs a { padding: 10px 14px; font-weight: 600; color: var(--dim); border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs a.active { color: var(--accent); border-color: var(--accent); }
.error { background: #fdecea; color: var(--danger); border-radius: var(--radius); padding: 10px 12px; font-size: 14px; margin-bottom: 12px; }
.hint { font-size: 12px; color: var(--dim); margin-top: 4px; }

/* My Ads */
.status-chips { display: flex; gap: 8px; flex-wrap: wrap; margin: 14px 0; }
.my-row { display: flex; gap: 14px; background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 12px; margin-bottom: 12px; align-items: flex-start; }
.my-thumb { width: 80px; height: 60px; border-radius: 6px; background: var(--bg); flex-shrink: 0; display: flex; align-items: center; justify-content: center; color: var(--dim); overflow: hidden; }
.my-thumb img { width: 100%; height: 100%; object-fit: cover; }
.my-main { flex: 1; min-width: 0; }
.my-main h3 { font-size: 15px; }
.my-main h3 a:hover { color: var(--accent); }
.my-stats { display: flex; gap: 12px; flex-wrap: wrap; color: var(--dim); font-size: 13px; margin: 4px 0; }
.my-actions { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.pill { font-size: 11px; font-weight: 700; padding: 3px 9px; border-radius: 20px; text-transform: uppercase; letter-spacing: .3px; }
.pill.live { background: #fff0f2; color: var(--accent); }
.pill.pending { background: #fff8e1; color: #8d6e00; }
.pill.sold { background: #e6f4ea; color: #137333; }
.pill.expired { background: #eef1f3; color: var(--dim); }
.pill.paused { background: #fdecea; color: var(--danger); }
.account-card { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; max-width: 640px; margin: 22px auto 30px; }
.avatar { width: 64px; height: 64px; border-radius: 50%; background: var(--accent); color: #fff; display: flex; align-items: center; justify-content: center; margin-bottom: 10px; }

/* App banner + sheet */
.app-banner { background: var(--accent); color: #fff; margin-top: 26px; }
.app-banner-in { display: flex; align-items: center; gap: 16px; padding-top: 20px; padding-bottom: 20px; position: relative; }
.app-banner h3 { font-size: 19px; }
.app-banner p { margin: 4px 0 0; opacity: .95; font-size: 14px; max-width: 560px; }
.app-banner .btn { flex-shrink: 0; }
.banner-x { background: transparent; border: 0; color: #fff; cursor: pointer; padding: 6px; position: absolute; top: 8px; right: 8px; opacity: .85; }
.sheet-backdrop { position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 100; display: flex; align-items: flex-end; justify-content: center; }
@media (min-width: 640px) { .sheet-backdrop { align-items: center; } }
.sheet { background: #fff; border-radius: 16px 16px 0 0; max-width: 480px; width: 100%; padding: 22px; position: relative; max-height: 88vh; overflow-y: auto; }
@media (min-width: 640px) { .sheet { border-radius: 16px; } }
.sheet-x { position: absolute; top: 12px; right: 12px; background: #f4f7f9; border: 0; border-radius: 50%; width: 34px; height: 34px; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.sheet-sub { color: var(--dim); font-size: 14px; margin: 4px 0 14px; }
.sheet-steps h4 { margin: 14px 0 4px; font-size: 14px; }
.sheet-steps ol { margin: 0 0 0 18px; padding: 0; font-size: 14px; color: #444; }
.sheet-ok { background: #e6f4ea; color: #137333; border-radius: var(--radius); padding: 10px 12px; font-weight: 600; display: flex; gap: 8px; align-items: center; margin-top: 14px; }

/* Footer */
.site-footer { background: var(--footer); color: #cfd3da; margin-top: 0; }
.footer-grid { display: grid; gap: 26px; padding-top: 34px; padding-bottom: 30px; }
@media (min-width: 760px) { .footer-grid { grid-template-columns: 1.4fr 1fr 1.2fr; } }
.foot-brand { font-size: 24px; font-weight: 800; color: #fff; margin-bottom: 8px; }
.site-footer p { font-size: 14px; margin: 0 0 14px; }
.site-footer h4 { color: #fff; font-size: 15px; margin-bottom: 10px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; font-size: 14px; }
.site-footer ul a { border-bottom: 2px solid transparent; padding-bottom: 2px; }
.site-footer ul a:hover { color: #fff; border-color: var(--accent); }
.how { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; font-size: 14px; }
.how li { display: flex; gap: 10px; align-items: flex-start; }
.how svg { color: var(--accent); flex-shrink: 0; margin-top: 2px; }
.footer-bar { border-top: 1px solid rgba(255,255,255,.12); padding: 14px 0 20px; font-size: 13px; }
.footer-bar-in { display: flex; gap: 14px; flex-wrap: wrap; justify-content: space-between; align-items: center; }
.foot-note { display: inline-flex; gap: 6px; align-items: center; }

/* Mobile tabs */
.mobile-tabs { position: fixed; left: 0; right: 0; bottom: 0; background: #fff; border-top: 1px solid var(--border); display: flex; z-index: 40; padding-bottom: env(safe-area-inset-bottom); }
@media (min-width: 640px) { .mobile-tabs { display: none; } }
.mobile-tabs a { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 0 6px; font-size: 11px; font-weight: 600; color: var(--dim); }
.mobile-tabs a:hover { color: var(--accent); }

.pagination { display: flex; gap: 8px; justify-content: center; margin: 20px 0 8px; }
.pagination a, .pagination span { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 8px 13px; font-weight: 600; font-size: 14px; }
.pagination a:hover { border-color: var(--accent); color: var(--accent); }
.pagination span.current { background: var(--accent); border-color: var(--accent); color: #fff; }
