/* Anchor Bay Rewind — retro-modern, Amazon-style browsing. Mobile-first. */
:root{
  --navy:#0b1a33; --navy-2:#132a4d; --teal:#12a4a8; --teal-d:#0c7b80; --teal-l:#3ee6e0;
  --yellow:#ffc93c; --yellow-d:#f0b400; --orange:#ff8a3d; --pink:#ff4fd8;
  --bg:#eaeef2; --card:#fff; --ink:#0f1720; --muted:#5b6675; --line:#d5dbe1;
  --ok:#11845b; --bad:#c62828; --radius:10px;
  --stripe:linear-gradient(90deg,var(--yellow) 0 25%,var(--orange) 25% 50%,var(--pink) 50% 75%,var(--teal-l) 75% 100%);
}
*{box-sizing:border-box}
html{-webkit-text-size-adjust:100%}
body{margin:0;font-family:system-ui,-apple-system,"Segoe UI",Roboto,Arial,sans-serif;background:var(--bg);color:var(--ink);line-height:1.45;font-size:15px}
a{color:var(--teal-d);text-decoration:none}a:hover{text-decoration:underline}
img{max-width:100%}
h1,h2,h3{line-height:1.2;margin:0 0 .5em}
h1{font-size:1.5rem}h2{font-size:1.25rem}h3{font-size:1.05rem}
.muted{color:var(--muted)}.muted-sm{color:#b8c4d6;font-size:.72rem;display:block;line-height:1}
.hide-sm{display:none}
button,input,select,textarea{font:inherit;color:inherit}
:focus-visible{outline:3px solid var(--yellow);outline-offset:2px}

/* ---------- header ---------- */
.topbar{background:var(--navy);color:#fff;position:sticky;top:0;z-index:50}
.topbar-row{display:grid;grid-template-columns:auto 1fr;grid-template-areas:"brand acct" "search search";gap:8px 10px;padding:8px 10px;align-items:center}
.brand{grid-area:brand;display:flex;align-items:center}
.brand img{height:42px;width:auto;border-radius:6px;display:block}
.deliver{color:#fff;font-size:.85rem;padding:4px 6px;border:1px solid transparent;border-radius:4px}
.deliver:hover{border-color:#fff;text-decoration:none}
.searchbar{grid-area:search;display:flex;height:42px;border-radius:8px;overflow:hidden;background:#fff}
.searchbar:focus-within{box-shadow:0 0 0 3px var(--yellow)}
.searchbar select{border:0;background:#e6e9ee;color:#333;padding:0 4px;width:64px;font-size:.85rem;border-right:1px solid #cfd5dc}
.searchbar input{flex:1;border:0;padding:0 10px;min-width:0;color:#111;outline:none}
.searchbar button{border:0;background:var(--yellow);color:var(--navy);width:50px;cursor:pointer}
.searchbar button:hover{background:var(--yellow-d)}
.acct{grid-area:acct;display:flex;gap:4px;justify-content:flex-end;align-items:center;flex-wrap:wrap}
.acct a,.acct button{color:#fff;font-size:.85rem;padding:6px 8px;border:1px solid transparent;border-radius:4px;background:none;cursor:pointer;line-height:1.1;white-space:nowrap}
.acct a:hover,.acct button:hover{border-color:#fff;text-decoration:none}
.acct .sell-btn{background:var(--yellow);color:var(--navy);font-weight:700}
.acct .sell-btn:hover{border-color:var(--yellow-d);background:var(--yellow-d)}
.badge-dot{display:inline-block;background:var(--orange);color:#fff;border-radius:999px;font-size:.7rem;padding:1px 6px;margin-left:3px;font-weight:700}
.subnav{background:var(--navy-2);display:flex;gap:2px;overflow-x:auto;padding:4px 8px;scrollbar-width:none}
.subnav::-webkit-scrollbar{display:none}
.subnav a{color:#fff;font-size:.85rem;padding:5px 9px;white-space:nowrap;border:1px solid transparent;border-radius:4px}
.subnav a:hover,.subnav a.on{border-color:var(--teal-l);text-decoration:none}
.vhs-stripe{height:5px;background:var(--stripe)}

/* ---------- layout ---------- */
main{max-width:1500px;margin:0 auto;padding:12px 10px 40px;min-height:60vh;outline:none}
.loading{padding:60px 0;text-align:center;color:var(--muted);font-weight:600;letter-spacing:.05em}
.panel{background:var(--card);border-radius:var(--radius);padding:16px;margin-bottom:14px;box-shadow:0 1px 2px #0001}
.row{display:flex;gap:10px;flex-wrap:wrap;align-items:center}
.spacer{flex:1}
.btn{display:inline-flex;align-items:center;justify-content:center;gap:6px;border:1px solid #b8c0c9;background:#fff;border-radius:999px;padding:9px 16px;cursor:pointer;font-weight:600;color:var(--ink);text-decoration:none;min-height:40px}
.btn:hover{text-decoration:none;background:#f4f6f8}
.btn-primary{background:var(--yellow);border-color:var(--yellow-d);color:var(--navy)}
.btn-primary:hover{background:var(--yellow-d)}
.btn-teal{background:var(--teal);border-color:var(--teal-d);color:#fff}
.btn-teal:hover{background:var(--teal-d)}
.btn-danger{color:var(--bad);border-color:#e7b4b4}
.btn-sm{padding:5px 11px;min-height:32px;font-size:.85rem}
.btn[disabled]{opacity:.55;cursor:not-allowed}
.pill{display:inline-block;font-size:.72rem;font-weight:700;padding:2px 8px;border-radius:999px;background:#e8f6f6;color:var(--teal-d);letter-spacing:.02em}
.pill-pro{background:linear-gradient(90deg,var(--yellow),var(--orange));color:var(--navy)}
.pill-sold{background:#ffe3e3;color:var(--bad)}
.pill-hidden{background:#eee;color:#555}
.pill-feat{background:var(--navy);color:var(--yellow)}

/* ---------- forms ---------- */
label{display:block;font-weight:600;font-size:.88rem;margin:10px 0 4px}
.input,select.input,textarea.input{width:100%;padding:10px 11px;border:1px solid #a6aeb8;border-radius:6px;background:#fff;min-height:42px}
textarea.input{min-height:110px;resize:vertical}
.input:focus{border-color:var(--teal);box-shadow:0 0 0 3px #12a4a833;outline:none}
.help{font-size:.8rem;color:var(--muted);margin-top:3px}
.form-narrow{max-width:420px;margin:20px auto}
.err{background:#fff0f0;border:1px solid #f1b5b5;color:var(--bad);padding:9px 12px;border-radius:6px;margin:10px 0;font-size:.9rem}
.okmsg{background:#eafaf2;border:1px solid #a7e0c4;color:var(--ok);padding:9px 12px;border-radius:6px;margin:10px 0}
.grid2{display:grid;grid-template-columns:1fr;gap:0 14px}

/* ---------- home ---------- */
.hero{position:relative;border-radius:var(--radius);overflow:hidden;background:var(--navy);color:#fff;margin-bottom:14px}
.hero img{display:block;width:100%;height:200px;object-fit:cover;opacity:.9}
.hero-copy{padding:16px;background:linear-gradient(180deg,#0b1a33ee,#0b1a33)}
.hero-copy h1{font-size:1.45rem;margin-bottom:6px}
.hero-copy h1 em{font-style:normal;color:var(--yellow)}
.hero-copy p{margin:0 0 12px;color:#d4deec}
.tiles{display:grid;grid-template-columns:repeat(3,1fr);gap:8px}
.tile{background:var(--card);border-radius:var(--radius);padding:12px 6px;text-align:center;color:var(--ink);box-shadow:0 1px 2px #0001;border-top:4px solid var(--teal);transition:transform .1s}
.tile:hover{text-decoration:none;transform:translateY(-2px)}
.tile .ico{display:flex;justify-content:center;color:var(--navy)}
.tile:hover .ico{color:var(--teal-d)}
.tile b{display:block;font-size:.85rem;margin-top:4px}
.tile small{color:var(--muted);font-size:.75rem}
.tile:nth-child(4n+2){border-top-color:var(--yellow)}.tile:nth-child(4n+3){border-top-color:var(--orange)}.tile:nth-child(4n+4){border-top-color:var(--pink)}
.section-h{display:flex;align-items:center;gap:6px 12px;margin:4px 0 10px;flex-wrap:wrap}
.section-h h2{margin:0}
.carousel-wrap{position:relative}
.carousel{display:grid;grid-auto-flow:column;grid-auto-columns:46%;gap:10px;overflow-x:auto;scroll-snap-type:x mandatory;padding-bottom:6px;scrollbar-width:thin}
.carousel>*{scroll-snap-align:start}
.car-btn{display:none;position:absolute;top:35%;width:38px;height:60px;border:1px solid #ccc;background:#fffe;border-radius:6px;cursor:pointer;font-size:1.3rem;z-index:2}
.car-btn.prev{left:-6px}.car-btn.next{right:-6px}
.fb-banner{display:flex;gap:14px;align-items:center;background:linear-gradient(90deg,var(--navy),#1b3d6e);color:#fff;border-radius:var(--radius);padding:16px;margin-bottom:14px;flex-wrap:wrap}
.fb-banner p{margin:0;flex:1;min-width:220px}
.sellers{display:grid;grid-template-columns:repeat(2,1fr);gap:10px}
.seller-mini{display:flex;gap:10px;align-items:center;background:#fff;border:1px solid var(--line);border-radius:var(--radius);padding:10px;color:var(--ink)}
.seller-mini:hover{text-decoration:none;border-color:var(--teal)}
.avatar{width:44px;height:44px;border-radius:50%;object-fit:cover;background:var(--teal);color:#fff;display:inline-flex;align-items:center;justify-content:center;font-weight:800;flex:none;overflow:hidden}
.avatar.lg{width:84px;height:84px;font-size:1.8rem;border:4px solid #fff}

/* ---------- product cards ---------- */
.grid{display:grid;grid-template-columns:repeat(2,1fr);gap:10px}
.card{background:var(--card);border-radius:var(--radius);overflow:hidden;display:flex;flex-direction:column;color:var(--ink);box-shadow:0 1px 2px #0001;border:1px solid #e1e5ea;position:relative}
.card:hover{text-decoration:none;box-shadow:0 4px 14px #0b1a3322}
.card .thumb{aspect-ratio:1/1;background:#f3f5f7;display:flex;align-items:center;justify-content:center;overflow:hidden}
.card .thumb img{width:100%;height:100%;object-fit:contain}
.card .body{padding:8px 10px 10px;display:flex;flex-direction:column;gap:3px;flex:1}
.card .title{font-size:.9rem;line-height:1.3;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;color:#0f1111}
.card:hover .title{color:#c45500}
.price{font-size:1.25rem;font-weight:700;color:#0f1111}
.price sup{font-size:.62em;top:-.55em;margin-right:1px}
.card .meta{font-size:.78rem;color:var(--muted)}
.card .cond{font-size:.78rem;color:var(--ok);font-weight:600}
.card .flag{position:absolute;top:8px;left:8px}

/* ---------- search ---------- */
.search-layout{display:grid;grid-template-columns:1fr;gap:12px}
.filters{background:#fff;border-radius:var(--radius);padding:12px 14px;display:none}
.filters.open{display:block}
.filters h4{margin:14px 0 6px;font-size:.92rem}
.filters h4:first-child{margin-top:0}
.filters .opt{display:flex;align-items:center;gap:8px;font-weight:400;margin:4px 0;font-size:.88rem;cursor:pointer}
.filters .opt input{width:17px;height:17px;accent-color:var(--teal)}
.filters .opt small{color:var(--muted)}
.filters .price-row{display:flex;gap:6px;align-items:center}
.filters .price-row input{width:80px;min-height:36px;padding:6px}
.filters a.linkopt{display:block;font-size:.88rem;padding:2px 0;color:var(--ink)}
.filters a.linkopt.on{font-weight:700;color:var(--teal-d)}
.results-bar{display:flex;gap:8px;align-items:center;flex-wrap:wrap;background:#fff;border-radius:var(--radius);padding:8px 12px;margin-bottom:10px;font-size:.9rem}
.results-bar select{min-height:34px;padding:4px 8px;border-radius:6px;border:1px solid #c7ced6;background:#f2f4f6}
.chips{display:flex;gap:6px;flex-wrap:wrap}
.chip{background:#e8f6f6;border:1px solid #bfe5e5;border-radius:999px;padding:2px 10px;font-size:.8rem;color:var(--teal-d)}
.pager{display:flex;gap:6px;justify-content:center;margin:18px 0}
.empty{text-align:center;padding:40px 10px;color:var(--muted)}
.empty .big{font-size:3rem}

/* ---------- product detail ---------- */
.pdp{display:grid;grid-template-columns:1fr;gap:16px}
.gallery .main{background:#fff;border-radius:var(--radius);aspect-ratio:1/1;display:flex;align-items:center;justify-content:center;overflow:hidden;border:1px solid var(--line)}
.gallery .main img{width:100%;height:100%;object-fit:contain}
.thumbs{display:flex;gap:6px;margin-top:8px;overflow-x:auto}
.thumbs button{border:2px solid var(--line);border-radius:6px;padding:0;width:62px;height:62px;flex:none;background:#fff;cursor:pointer;overflow:hidden}
.thumbs button.on{border-color:var(--orange)}
.thumbs img{width:100%;height:100%;object-fit:cover}
.pdp-info h1{font-size:1.35rem;font-weight:500}
.spec{width:100%;border-collapse:collapse;font-size:.9rem;margin:10px 0}
.spec th{text-align:left;width:38%;padding:5px 8px 5px 0;color:var(--muted);font-weight:600}
.spec td{padding:5px 0}
.desc{white-space:pre-wrap;word-wrap:break-word}
.buybox{border:1px solid var(--line);border-radius:var(--radius);padding:14px;background:#fff}
.buybox .price{font-size:1.7rem}
.cash-note{color:var(--ok);font-weight:600;font-size:.9rem}
.tip{background:#fffaeb;border:1px solid #f6dc93;border-radius:8px;padding:10px 12px;font-size:.85rem;margin-top:10px}
.seller-card{display:flex;gap:12px;align-items:center}

/* ---------- store ---------- */
.store-banner{height:150px;background:var(--navy) center 45%/cover no-repeat;border-radius:var(--radius) var(--radius) 0 0}
.store-head{background:#fff;border-radius:0 0 var(--radius) var(--radius);padding:0 16px 16px;margin-bottom:14px;display:flex;gap:14px;align-items:flex-end;flex-wrap:wrap}
.store-head .avatar{margin-top:-40px}

/* ---------- dashboard ---------- */
.tabs{display:flex;gap:4px;overflow-x:auto;border-bottom:2px solid var(--line);margin-bottom:12px;scrollbar-width:none}
.tabs a{padding:9px 12px;color:var(--ink);font-weight:600;white-space:nowrap;border-bottom:3px solid transparent;margin-bottom:-2px;font-size:.92rem}
.tabs a.on{border-color:var(--orange);color:var(--navy)}
.tabs a:hover{text-decoration:none;background:#fff}
.mylist{display:flex;flex-direction:column;gap:8px}
.myitem{display:grid;grid-template-columns:64px 1fr;gap:10px;background:#fff;border:1px solid var(--line);border-radius:var(--radius);padding:8px}
.myitem img{width:64px;height:64px;object-fit:cover;border-radius:6px;background:#f2f2f2}
.myitem .actions{grid-column:1/-1;display:flex;gap:6px;flex-wrap:wrap}
.limit-bar{height:8px;background:#e3e7ec;border-radius:9px;overflow:hidden;margin-top:6px}
.limit-bar i{display:block;height:100%;background:var(--teal)}
.photo-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;margin-top:6px}
.photo-slot{position:relative;aspect-ratio:1/1;border-radius:8px;overflow:hidden;background:#f3f5f7;border:1px solid var(--line)}
.photo-slot img{width:100%;height:100%;object-fit:cover}
.photo-slot .x{position:absolute;top:4px;right:4px;background:#000a;color:#fff;border:0;border-radius:50%;width:28px;height:28px;cursor:pointer}
.photo-slot .mv{position:absolute;bottom:4px;left:4px;background:#000a;color:#fff;border:0;border-radius:6px;font-size:.75rem;padding:3px 6px;cursor:pointer}
.photo-slot .cover{position:absolute;bottom:4px;right:4px;font-size:.7rem}
.photo-add{display:flex;align-items:center;justify-content:center;flex-direction:column;border:2px dashed #9fb3c4;cursor:pointer;color:var(--teal-d);font-weight:700;font-size:.85rem;text-align:center}
.photo-add input{display:none}
.plans{display:grid;grid-template-columns:1fr;gap:12px}
.plan{background:#fff;border:2px solid var(--line);border-radius:14px;padding:18px}
.plan.pro{border-color:var(--yellow);box-shadow:0 6px 24px #ffc93c44;position:relative}
.plan .amt{font-size:2rem;font-weight:800}
.plan ul{padding-left:0;list-style:none}
.plan li{padding:4px 0 4px 24px;position:relative}
.plan li::before{content:"✓";position:absolute;left:0;color:var(--teal);font-weight:800}
.plan li.no::before{content:"–";color:#aaa}
.bars{display:flex;align-items:flex-end;gap:2px;height:120px;border-bottom:1px solid var(--line);padding-top:10px}
.bars i{flex:1;background:var(--teal);border-radius:2px 2px 0 0;min-height:1px}
table.data{width:100%;border-collapse:collapse;font-size:.88rem;background:#fff}
table.data th,table.data td{border-bottom:1px solid var(--line);padding:7px 6px;text-align:left;vertical-align:middle}
table.data th{background:#f5f7f9;font-size:.8rem;text-transform:uppercase;letter-spacing:.03em;color:var(--muted)}
.table-wrap{overflow-x:auto}

/* ---------- messages ---------- */
.threads{display:flex;flex-direction:column;gap:6px}
.thread-row{display:grid;grid-template-columns:52px 1fr auto;gap:10px;align-items:center;background:#fff;border:1px solid var(--line);border-radius:var(--radius);padding:8px;color:var(--ink)}
.thread-row:hover{text-decoration:none;border-color:var(--teal)}
.thread-row.unread{border-left:4px solid var(--orange)}
.thread-row img{width:52px;height:52px;object-fit:cover;border-radius:6px;background:#eee}
.thread-row .last{color:var(--muted);font-size:.85rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.chat{display:flex;flex-direction:column;height:calc(100vh - 230px);min-height:380px;background:#fff;border-radius:var(--radius);overflow:hidden;border:1px solid var(--line)}
.chat-head{display:flex;gap:10px;align-items:center;padding:10px;border-bottom:1px solid var(--line);background:#f8fafb}
.chat-head img{width:46px;height:46px;object-fit:cover;border-radius:6px}
.chat-log{flex:1;overflow-y:auto;padding:12px;display:flex;flex-direction:column;gap:6px;background:#f3f6f9}
.bubble{max-width:80%;padding:8px 12px;border-radius:14px;white-space:pre-wrap;word-wrap:break-word;font-size:.93rem}
.bubble.me{align-self:flex-end;background:var(--teal);color:#fff;border-bottom-right-radius:4px}
.bubble.them{align-self:flex-start;background:#fff;border:1px solid var(--line);border-bottom-left-radius:4px}
.bubble time{display:block;font-size:.68rem;opacity:.7;margin-top:2px}
.composer{display:flex;gap:8px;padding:8px;border-top:1px solid var(--line)}
.composer textarea{flex:1;min-height:44px;max-height:120px;resize:none}

/* ---------- content pages ---------- */
.prose{max-width:820px;margin:0 auto}
.prose h2{margin-top:1.2em}
.prose li{margin:4px 0}
.zones{display:grid;grid-template-columns:1fr;gap:8px}
.zone{background:#fff;border:1px solid var(--line);border-left:5px solid var(--teal);border-radius:8px;padding:10px 12px}

/* ---------- footer / toast ---------- */
.footer{background:var(--navy);color:#cfd8e6;margin-top:30px}
.footer-inner{max-width:1500px;margin:0 auto;padding:24px 14px 8px;display:grid;grid-template-columns:1fr 1fr;gap:16px}
.footer-inner>div:first-child{grid-column:1/-1}
.footer h4{color:#fff;margin:0 0 6px}
.footer a{display:block;color:#cfd8e6;padding:3px 0;font-size:.9rem}
.footer .muted{color:#9fb0c7;font-size:.9rem}
.footer-logo{height:50px;border-radius:6px}
.fine{text-align:center;font-size:.78rem;color:#8a9ab3;padding:12px;margin:0;border-top:1px solid #1f3558}
#toast{opacity:0;pointer-events:none;position:fixed;left:50%;bottom:22px;transform:translateX(-50%) translateY(120px);background:var(--navy);color:#fff;padding:11px 18px;border-radius:999px;box-shadow:0 6px 20px #0005;transition:transform .25s;z-index:100;max-width:92vw;font-weight:600;border:2px solid var(--yellow)}
#toast.show{opacity:1;transform:translateX(-50%) translateY(0)}

/* ---------- breakpoints ---------- */
@media (min-width:600px){
  .grid{grid-template-columns:repeat(3,1fr)}
  .tiles{grid-template-columns:repeat(5,1fr)}
  .carousel{grid-auto-columns:30%}
  .sellers{grid-template-columns:repeat(3,1fr)}
  .photo-grid{grid-template-columns:repeat(6,1fr)}
  .grid2{grid-template-columns:1fr 1fr}
  .myitem{grid-template-columns:72px 1fr auto}.myitem img{width:72px;height:72px}.myitem .actions{grid-column:auto;justify-content:flex-end;align-items:center}
  .zones{grid-template-columns:1fr 1fr}
  .footer-inner{grid-template-columns:2fr 1fr 1fr 1fr}.footer-inner>div:first-child{grid-column:auto}
  .hero img{height:260px}
}
@media (min-width:900px){
  .topbar-row{grid-template-columns:auto auto 1fr auto;grid-template-areas:"brand deliver search acct";padding:8px 14px}
  .hide-sm{display:block}
  .searchbar select{width:auto;max-width:190px;padding:0 6px}
  .deliver{grid-area:deliver}
  .brand img{height:50px}
  main{padding:16px 18px 50px}
  .search-layout{grid-template-columns:240px 1fr}
  .filters{display:block!important;position:sticky;top:128px;max-height:calc(100vh - 140px);overflow-y:auto;align-self:start}
  .filter-toggle{display:none!important}
  .grid{grid-template-columns:repeat(4,1fr)}
  .carousel{grid-auto-columns:calc((100% - 50px)/6)}
  .car-btn{display:block}
  .tiles{grid-template-columns:repeat(9,1fr)}
  .pdp{grid-template-columns:minmax(0,1.1fr) minmax(0,1fr) 300px;align-items:start}
  .plans{grid-template-columns:1fr 1fr}
  .hero{display:grid;grid-template-columns:1.3fr 1fr}
  .hero img{height:100%;min-height:300px}
  .hero-copy{display:flex;flex-direction:column;justify-content:center;padding:28px;background:var(--navy)}
  .hero-copy h1{font-size:2rem}
  .sellers{grid-template-columns:repeat(4,1fr)}
  .store-banner{height:240px}
}
@media (min-width:1250px){.grid{grid-template-columns:repeat(5,1fr)}}
