:root {
  --red: #E53238; --blue: #0064D2; --blue-hi: #0050A8; --yellow: #F5AF02; --green: #86B817;
  --ink: #191919; --muted: #5E5E5E; --line: #E5E5E5; --soft: #F7F7F7; --bg: #FFFFFF; --sale: #E0103A;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--ink); font: 14px/1.45 'Inter', system-ui, -apple-system, 'Helvetica Neue', Arial, sans-serif; }
a { color: inherit; text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, select { font: inherit; }
img { max-width: 100%; display: block; }
.wrap { max-width: 1280px; margin: 0 auto; padding: 0 16px; }
.muted { color: var(--muted); }
.u { text-decoration: underline; }

/* top bar */
.top { border-bottom: 1px solid var(--line); font-size: 12px; }
.top .wrap { display: flex; align-items: center; gap: 18px; min-height: 40px; flex-wrap: wrap; }
.top .r { margin-left: auto; display: flex; gap: 18px; align-items: center; }
.top [data-bwx] .bwx-btn { min-height: 26px; padding: 0 10px; font-size: 12px; }

/* logo + search */
.head .wrap { display: flex; align-items: center; gap: 16px; padding-top: 14px; padding-bottom: 14px; }
.logo { display: block; line-height: 0; }
.logo img { height: 34px; width: auto; display: block; }
.cats { font-size: 12px; color: var(--muted); max-width: 70px; line-height: 1.2; }
.search { flex: 1; display: flex; gap: 8px; min-width: 0; }
.search .box { flex: 1; display: flex; border: 2px solid var(--ink); border-radius: 24px; overflow: hidden; min-width: 0; }
.search input { flex: 1; border: 0; padding: 0 16px; min-height: 40px; outline: none; min-width: 0; }
.search select { -webkit-appearance: none; appearance: none; border: 0; border-left: 1px solid var(--line); margin: 6px 14px 6px 0; padding: 0 26px 0 14px; color: var(--muted); cursor: pointer;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%235E5E5E' stroke-width='1.5'/%3E%3C/svg%3E") no-repeat right 8px center; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; padding: 0 28px; border-radius: 24px; border: 1px solid var(--blue); background: var(--blue); color: #fff; font-weight: 700; cursor: pointer; text-decoration: none !important; }
.btn:hover { background: var(--blue-hi); }
.btn.ghost { background: #fff; color: var(--blue); }
.btn.ghost:hover { background: #F0F6FD; }
.btn.wide { width: 100%; }
.btn:disabled { opacity: .5; cursor: default; }
.adv { font-size: 12px; color: var(--muted); align-self: center; }
.nav { border-bottom: 1px solid var(--line); font-size: 13px; }
.nav .wrap { display: flex; gap: 22px; overflow-x: auto; white-space: nowrap; padding-top: 8px; padding-bottom: 10px; }

/* home */
.hero { margin: 18px 0; border-radius: 16px; padding: 40px 36px; color: #fff; background: var(--blue); display: grid; grid-template-columns: 1.3fr 1fr; gap: 24px; align-items: center; overflow: hidden; }
.hero h1 { font-size: 36px; line-height: 1.1; margin: 0 0 10px; letter-spacing: -1px; }
.hero p { margin: 0 0 18px; font-size: 16px; opacity: .92; }
.hero .btn { background: #fff; color: var(--ink); border-color: #fff; }
.hero .bars { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; height: 160px; }
.hero .bars i { border-radius: 12px; }
.hero .bars i:nth-child(1) { background: var(--red); } .hero .bars i:nth-child(2) { background: #fff; }
.hero .bars i:nth-child(3) { background: var(--yellow); } .hero .bars i:nth-child(4) { background: var(--green); }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin: 26px 0; }
.step { border: 1px solid var(--line); border-radius: 16px; padding: 20px; }
.step b { display: block; font-size: 16px; margin: 6px 0; }
.step .n { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-weight: 800; }
h2.sec { font-size: 22px; margin: 26px 0 12px; }

/* storefront */
.sthead { display: flex; gap: 18px; align-items: center; padding: 24px 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.sthead .av { width: 96px; height: 96px; border-radius: 50%; border: 1px solid var(--line); object-fit: cover; background: var(--soft); }
.sthead h1 { margin: 0; font-size: 26px; }
.sthead .stats { display: flex; gap: 14px; font-size: 13px; margin-top: 4px; flex-wrap: wrap; }
.sthead .act { margin-left: auto; display: flex; gap: 10px; }
.sthead .act .btn { min-height: 36px; padding: 0 18px; }
.tabs { display: flex; gap: 26px; border-bottom: 1px solid var(--line); font-weight: 600; }
.tabs a { padding: 12px 0; border-bottom: 2px solid transparent; }
.tabs a.on { border-color: var(--ink); }
.tools { display: flex; gap: 10px; margin: 18px 0; flex-wrap: wrap; align-items: center; }
.pill { border: 1px solid var(--line); background: var(--soft); border-radius: 18px; min-height: 34px; padding: 0 14px; display: inline-flex; align-items: center; gap: 6px; cursor: pointer; font-size: 13px; }
.pill select { border: 0; background: transparent; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 24px 16px; margin-bottom: 24px; }
.card .img { aspect-ratio: 1; background: var(--soft); border-radius: 12px; display: grid; place-items: center; overflow: hidden; position: relative; }
.card .img img { max-height: 100%; width: auto; object-fit: contain; }
.card .heart { position: absolute; top: 8px; right: 8px; width: 32px; height: 32px; border-radius: 50%; background: #fff; border: 0; cursor: pointer; font-size: 16px; }
.card .t { margin: 8px 0 4px; font-size: 14px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.price { font-size: 20px; font-weight: 700; }
.was { color: var(--muted); text-decoration: line-through; font-size: 13px; margin-left: 4px; }
.bsv { color: var(--muted); font-size: 12px; }
.promo { color: var(--sale); font-weight: 700; font-size: 13px; }
.pager { display: flex; gap: 6px; justify-content: center; margin: 10px 0 30px; flex-wrap: wrap; }
.pager a { min-width: 36px; height: 36px; display: grid; place-items: center; border-radius: 50%; }
.pager a.on { background: var(--ink); color: #fff; }
.empty { padding: 60px 0; text-align: center; color: var(--muted); }

/* item */
.itm { display: grid; grid-template-columns: 1.1fr 1fr; gap: 32px; padding: 24px 0 40px; }
.itm .main { background: var(--soft); border-radius: 16px; aspect-ratio: 1; display: grid; place-items: center; overflow: hidden; }
.itm .main img { max-height: 100%; width: auto; }
.itm h1 { font-size: 24px; margin: 0 0 12px; line-height: 1.25; }
.seller { display: flex; gap: 10px; align-items: center; padding: 12px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin-bottom: 16px; }
.seller img { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; background: var(--soft); }
.itm .price { font-size: 28px; }
.itm .row { display: grid; grid-template-columns: 120px 1fr; gap: 8px; margin: 10px 0; }
.itm .buy { display: grid; gap: 10px; margin: 18px 0; }
.note { border-radius: 12px; background: var(--soft); padding: 12px 14px; font-size: 13px; }
.note.warn { background: #FFF6DC; }

/* sell / import */
.sell { max-width: 760px; margin: 0 auto; padding: 28px 0 60px; }
.sell h1 { font-size: 30px; margin: 0 0 6px; letter-spacing: -.5px; }
.field { display: flex; gap: 8px; margin: 18px 0; }
.field input { flex: 1; border: 1px solid #8F8F8F; border-radius: 8px; padding: 0 14px; min-height: 48px; min-width: 0; }
.prog { height: 8px; background: var(--soft); border-radius: 4px; overflow: hidden; margin: 12px 0; }
.prog i { display: block; height: 100%; width: 0; background: var(--green); transition: width .3s; }
.code { font: 700 22px ui-monospace, Menlo, monospace; background: var(--soft); padding: 10px 14px; border-radius: 8px; display: inline-block; user-select: all; }
.err { color: var(--red); }

/* footer */
.foot { border-top: 1px solid var(--line); margin-top: 30px; padding: 24px 0 40px; font-size: 12px; color: var(--muted); }
.foot .wrap { display: flex; gap: 18px; flex-wrap: wrap; }

@media (max-width: 760px) {
  .cats, .adv, .search select, .top .hide-s { display: none; }
  .logo img { height: 26px; }
  .head .wrap { flex-wrap: wrap; } .search { flex-basis: 100%; }
  .search .btn { padding: 0 16px; }
  .hero { grid-template-columns: 1fr; padding: 28px 22px; } .hero .bars { height: 60px; }
  .steps { grid-template-columns: 1fr; }
  .itm { grid-template-columns: 1fr; }
  .grid { grid-template-columns: repeat(2, 1fr); gap: 18px 12px; }
  .sthead .act { margin-left: 0; }
}

.drop { display: grid; gap: 4px; place-items: center; text-align: center; border: 2px dashed #B8B8B8; border-radius: 16px; padding: 36px 16px; cursor: pointer; background: var(--soft); }
.drop.over { border-color: var(--blue); background: #F0F6FD; }
.tbl { width: 100%; border-collapse: collapse; font-size: 13px; margin: 12px 0; }
.tbl th, .tbl td { text-align: left; padding: 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
.tbl td.n { text-align: right; white-space: nowrap; }
.tblwrap { overflow-x: auto; max-height: 420px; border: 1px solid var(--line); border-radius: 12px; }
.form2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 16px 0; }
.form2 label { display: grid; gap: 4px; font-weight: 600; font-size: 13px; }
.form2 input { border: 1px solid #8F8F8F; border-radius: 8px; padding: 0 12px; min-height: 44px; font-weight: 400; min-width: 0; }
.form2 .pre { display: flex; align-items: center; border: 1px solid #8F8F8F; border-radius: 8px; overflow: hidden; }
.form2 .pre span { padding: 0 0 0 12px; color: var(--muted); font-weight: 400; white-space: nowrap; }
.form2 .pre input { border: 0; padding-left: 2px; }
@media (max-width: 760px) { .form2 { grid-template-columns: 1fr; } }
.card .img picture, .itm .main picture { display: contents; }

/* home */
.hero.photo { position: relative; display: block; padding: 0; min-height: 420px; background: #191919; }
.hero.photo picture, .hero.photo picture img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero.photo::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(10,10,12,.82) 0%, rgba(10,10,12,.55) 45%, rgba(10,10,12,0) 75%); }
.hero-copy { position: relative; z-index: 1; max-width: 560px; padding: 56px 40px; }
.hero .kicker { display: inline-block; background: var(--yellow); color: #191919; font-weight: 800; font-size: 12px; letter-spacing: .06em; text-transform: uppercase; padding: 4px 10px; border-radius: 999px; margin-bottom: 14px; }
.hero h1 { font-size: 46px; }
.hero .cta { display: flex; gap: 10px; flex-wrap: wrap; }
.hero .btn.ghost { background: transparent; color: #fff; border-color: rgba(255,255,255,.7); }
.hero .btn.ghost:hover { background: rgba(255,255,255,.12); }
.catrow { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 16px; }
.catrow a { display: grid; gap: 10px; justify-items: center; text-align: center; text-decoration: none; }
.catrow picture { display: block; width: 100%; }
.catrow img { width: 100%; height: auto; aspect-ratio: 1; border-radius: 50%; object-fit: cover; background: var(--soft); display: block; transition: transform .2s; }
.catrow a:hover img { transform: scale(1.04); }
.band { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin: 30px 0; padding: 28px; border-radius: 16px; background: var(--soft); text-align: center; }
.band .big { display: block; font-size: 34px; font-weight: 800; letter-spacing: -1px; }
.band span { color: var(--muted); font-size: 13px; }
@media (max-width: 760px) {
  .hero.photo { min-height: 460px; } .hero.photo::after { background: linear-gradient(180deg, rgba(10,10,12,.35), rgba(10,10,12,.85) 60%); }
  .hero-copy { padding: 140px 22px 28px; } .hero h1 { font-size: 34px; }
  .catrow { grid-template-columns: repeat(3, minmax(0, 1fr)); } .band { grid-template-columns: repeat(2, 1fr); }
}

/* header dropdowns (eBay-style hover menus) */
.dd { position: relative; }
.dd .menu { display: none; position: absolute; right: 0; top: 100%; z-index: 40; min-width: 240px; background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 8px 28px rgba(0,0,0,.12); padding: 14px; font-size: 13px; }
.dd:hover .menu, .dd:focus-within .menu { display: grid; gap: 8px; }
.dd .menu.links a { padding: 3px 0; }
.dd .sellmenu { width: 300px; }
.dd .sellmenu ul { margin: 4px 0; padding-left: 18px; }
.dd .sellmenu .btn { min-height: 34px; padding: 0 14px; font-size: 13px; }
.dd .mini { display: grid; grid-template-columns: 40px 1fr; gap: 8px; align-items: center; }
.dd .mini img, .dd .mini > span:first-child { width: 40px; height: 40px; object-fit: contain; background: var(--soft); border-radius: 6px; }
.card .heart.on { color: var(--red); }

/* My bMarketX: side menu + panel */
.myb { display: grid; grid-template-columns: 220px 1fr; gap: 28px; padding: 24px 0 50px; }
.myb nav { display: grid; align-content: start; gap: 2px; }
.myb nav a { padding: 9px 12px; border-radius: 8px; text-decoration: none; }
.myb nav a.on { background: var(--soft); font-weight: 700; border-left: 3px solid var(--blue); }
.myb h2 { margin: 0 0 6px; font-size: 24px; }
@media (max-width: 760px) { .myb { grid-template-columns: 1fr; } .myb nav { grid-auto-flow: column; overflow-x: auto; } .myb nav a { white-space: nowrap; } }

/* deals */
.spot { display: grid; grid-template-columns: minmax(0, 360px) 1fr; gap: 24px; align-items: center; border-radius: 16px; background: #FFF6DC; padding: 24px; margin: 18px 0; }
.spot .img { background: #fff; border-radius: 12px; aspect-ratio: 1; display: grid; place-items: center; overflow: hidden; }
.spot .img img { max-height: 100%; width: auto; }
.off { display: inline-block; background: var(--red); color: #fff; font-weight: 800; border-radius: 6px; padding: 2px 8px; font-size: 13px; }
@media (max-width: 760px) { .spot { grid-template-columns: 1fr; } }

/* feedback tab + pop-up */
.fbtab { position: fixed; right: 0; top: 50%; transform: rotate(-90deg) translate(50%, -100%); transform-origin: right top; z-index: 30; background: var(--ink); color: #fff; border: 0; border-radius: 8px 8px 0 0; padding: 8px 14px; font: 600 12px Inter, sans-serif; cursor: pointer; }
.bwx-modal { position: fixed; inset: 0; z-index: 60; background: rgba(0,0,0,.5); display: grid; place-items: center; padding: 16px; }
.fbform { background: #fff; color: var(--ink); border-radius: 16px; padding: 22px; width: 100%; max-width: 440px; display: grid; gap: 10px; }
.fbform label { display: grid; gap: 4px; font-weight: 600; font-size: 13px; }
.fbform textarea, .fbform input:not([type]) { border: 1px solid #8F8F8F; border-radius: 8px; padding: 10px; font: inherit; font-weight: 400; }
.fbscale { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.fbscale label { display: block; } .fbscale input { position: absolute; opacity: 0; }
.fbscale span { display: grid; place-items: center; height: 40px; border: 1px solid var(--line); border-radius: 8px; cursor: pointer; font-weight: 700; }
.fbscale input:checked + span { background: var(--blue); color: #fff; border-color: var(--blue); }
.fbscale input:focus-visible + span { outline: 2px solid var(--blue); outline-offset: 2px; }
.fbends { display: flex; justify-content: space-between; font-size: 12px; }
.fbwallet { grid-template-columns: auto 1fr !important; align-items: center; font-weight: 400 !important; }

/* unclaimed store */
.claim { max-width: 640px; margin: 40px auto 60px; text-align: center; display: grid; justify-items: center; gap: 6px; }
.claim-av { width: 96px; height: 96px; border-radius: 50%; display: grid; place-items: center; font: 800 40px Inter, sans-serif; color: #fff;
  background: conic-gradient(var(--red) 0 25%, var(--blue) 0 50%, var(--yellow) 0 75%, var(--green) 0); margin-bottom: 10px; }
.claim .kicker { background: var(--yellow); color: #191919; font-weight: 800; font-size: 12px; letter-spacing: .06em; text-transform: uppercase; padding: 4px 10px; border-radius: 999px; }
.claim h1 { font-size: 28px; margin: 8px 0 4px; word-break: break-all; }
.claim-steps { text-align: left; margin: 10px 0; padding-left: 20px; display: grid; gap: 8px; }
.claim-cta { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }

/* sign in / get wallet box */
.getw { display: grid; gap: 10px; border: 1px solid var(--line); border-left: 4px solid var(--yellow); border-radius: 12px; padding: 16px; margin: 14px 0; background: #fff; }
.getw b { display: block; margin-bottom: 2px; }
.getw-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.getw-row .btn { min-height: 38px; padding: 0 16px; }
.getw-link { font-size: 12px; text-decoration: underline; margin-left: 4px; }
