/* Home v2 - loaded last. Marketplace-style structure with a warm red/orange palette.
   Content stays centred with symmetric gutters; the service rail is a pure overlay. */
/* Brand mark: vector logo, full lockup on desktop, compact mark on phones. */
.topbar .logo { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; text-decoration: none; }
.topbar .logo .logo-wide { height: 38px; width: auto; display: block; }
.topbar .logo .logo-small, .topbar .logo .logo-mini { display: none; }
.site-footer .f-logo { display: flex; align-items: center; gap: 9px; color: #fff; font-size: 17px; font-weight: 700; }
.site-footer .f-logo .f-logo-mark { width: 28px; height: 28px; flex: 0 0 28px; }
.brand-slogan { font-size: 12px; color: var(--ink-2); white-space: nowrap; padding-left: 12px; border-left: 1px solid var(--line); }
.site-footer .f-slogan { color: #ffb59f; font-size: 12.5px; margin: 8px 0 10px; }
:root {
  --brand: #ee4d2d;
  --brand-2: #d63c1f;
  --brand-soft: #fff2ee;
  --brand-tint: #fff8f5;
  --ink: #22201e;
  --ink-2: #5c5754;
  --muted: #9b9591;
  --line: #eeeae8;
  --bg: #f6f6f6;
}
body { background: var(--bg); }
.topbar { background: #fff; }
.topbar .logo { color: var(--brand); }

/* --- top strip: hot categories, wraps instead of sliding --- */
.hotnav { background: #fff; border-bottom: 1px solid var(--line); }
.hotnav-inner { max-width: 1240px; margin: 0 auto; padding: 9px 40px;
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.hotnav b { font-size: 12px; color: var(--ink-2); font-weight: 700; margin-right: 2px; }
.hotnav a { font-size: 12.5px; color: var(--ink-2); text-decoration: none;
  padding: 4px 11px; border-radius: 14px; background: #f8f5f3; }
.hotnav a:hover { color: #fff; background: var(--brand); }

/* --- first screen: carousel + member panel --- */
.hero-row { display: grid; grid-template-columns: minmax(0, 1fr) 292px; gap: 14px; margin-top: 14px; }
.carousel { height: 330px; border-radius: 10px; }
.member-card { background: #fff; border: 1px solid var(--line); border-radius: 10px;
  padding: 16px; display: flex; flex-direction: column; gap: 13px; }
.mc-hd { display: flex; align-items: center; gap: 10px; }
.mc-av { width: 42px; height: 42px; flex: 0 0 42px; border-radius: 50%;
  background: var(--brand-soft); color: var(--brand); display: flex; align-items: center; justify-content: center; }
.mc-hi { font-size: 13.5px; font-weight: 700; color: var(--ink); }
.mc-sub { font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.mc-btns { display: flex; gap: 8px; }
.mc-btns button { flex: 1; padding: 9px 0; border-radius: 5px; font-size: 12.5px;
  font-weight: 600; cursor: pointer; border: 1px solid var(--brand); }
.mc-primary { background: var(--brand); color: #fff; }
.mc-ghost { background: #fff; color: var(--brand); }
.mc-stats { display: grid; grid-template-columns: repeat(3, 1fr); padding-top: 12px; border-top: 1px solid var(--line); }
.mc-stat { text-align: center; }
.mc-stat b { display: block; font-size: 18px; color: var(--brand); }
.mc-stat span { font-size: 11px; color: var(--muted); }
.mc-links { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.mc-links a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  min-height: 58px; padding: 8px 2px; border-radius: 6px; background: #faf8f7;
  color: var(--ink-2); text-decoration: none; font-size: 11px; text-align: center; }
.mc-links a:hover { color: var(--brand); background: var(--brand-soft); }
.mc-links svg { color: var(--brand); }

/* --- all categories laid out flat, no drawers, no sliding --- */
.cat-all-wrap { background: #fff; border: 1px solid var(--line); border-radius: 10px; margin-top: 14px; padding: 16px; }
.cat-all-hd { display: flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 700; margin-bottom: 13px; }
.hd-bar { width: 4px; height: 16px; border-radius: 2px; background: var(--brand); }
.cat-all { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 10px; }
.cat-tile { background: #fff; border: 1px solid var(--line); border-radius: 8px;
  padding: 12px 4px 10px; text-align: center; cursor: pointer; transition: .16s; }
.cat-tile:hover { border-color: var(--brand); box-shadow: 0 4px 14px rgba(238,77,45,.13); transform: translateY(-2px); }
.cat-tile .ci { width: 42px; height: 42px; margin: 0 auto 8px; border-radius: 50%;
  background: var(--brand-tint); color: var(--brand); display: flex; align-items: center; justify-content: center; }
.cat-tile.top .ci { background: var(--brand); color: #fff; }
.cat-tile .cn { font-size: 12px; color: var(--ink-2); line-height: 1.35; }

/* --- named product sections --- */
.home-sec { background: #fff; border: 1px solid var(--line); border-radius: 10px; margin-top: 14px; overflow: hidden; }
.sec-head { border-bottom: 0; padding: 15px 16px 6px; }
.sec-head h2 { font-size: 17px; }
.sec-head .more { color: var(--brand); }
.prod-grid { display: grid; grid-template-columns: repeat(var(--cols, 4), minmax(0, 1fr));
  gap: 14px; background: transparent; padding: 4px 14px 18px; }
.grid { gap: 14px; }

/* --- standalone cards with breathing room --- */
.card.pcard { background: #fff; border: 1px solid var(--line); border-radius: 9px; position: relative; }
.card.pcard:hover { box-shadow: 0 6px 20px rgba(0,0,0,.10); transform: translateY(-2px); }
.card.pcard .thumb { aspect-ratio: 1 / 1; padding: 12px; background: #fff; }
.card.pcard .thumb img { width: 100%; height: 100%; object-fit: contain; border-radius: 4px; }
.card.pcard .body { padding: 10px 13px 13px; gap: 7px; }
.card.pcard .name { font-size: 13px; height: 38px; }
.card.pcard .price { color: var(--brand); font-size: 18px; }
.card.pcard .price .cur { color: var(--brand); }
.card.pcard .login-price { color: var(--brand); font-size: 12px; }
.card.pcard .addbtn { border-color: var(--brand); color: var(--brand); }
.card.pcard .addbtn:hover { background: var(--brand); color: #fff; }
.sold-tag { position: absolute; top: 12px; left: 12px; background: rgba(34,32,30,.72);
  color: #fff; font-size: 10.5px; padding: 3px 7px; border-radius: 3px; }

/* --- slim icon rail: never expands, never reflows the page --- */
.service-rail { position: fixed; right: 10px; top: 50%; transform: translateY(-50%);
  width: 54px; z-index: 55; background: #fff; border: 1px solid var(--line);
  border-radius: 9px; box-shadow: 0 4px 18px rgba(0,0,0,.10); padding: 4px 0; }
.rail-item { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  padding: 10px 2px; color: var(--ink-2); text-decoration: none; cursor: pointer;
  border-bottom: 1px solid var(--line); font-size: 10px; line-height: 1.25; text-align: center; }
.rail-item:last-child { border-bottom: 0; }
.rail-item .ri { color: var(--brand); display: flex; }
.rail-item .ri svg { width: 17px; height: 17px; }
.rail-item:hover { color: var(--brand); background: var(--brand-tint); }

@media (min-width: 1101px) {
  .wrap, .topbar-inner { max-width: 1240px; padding: 0 40px; }
  .site-footer .footer-inner { max-width: 1240px; padding: 0 40px; }
}
@media (max-width: 1100px) {
  .service-rail { display: none; }
  .hero-row { grid-template-columns: 1fr; }
  .cat-all { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .hotnav-inner { padding: 9px 16px; }
}
@media (max-width: 760px) {
  /* The old top bar could not shrink: its flex children forced a 572px layout
     viewport on a 390px phone, so the whole page was rendered too wide and the
     right edge was cut off. Let the search box shrink and clip any overflow. */
  html, body { overflow-x: hidden; }
  .topbar-inner { gap: 7px; padding: 0 10px; overflow: hidden; }
  .topbar-inner > * { min-width: 0; }
  .topbar .logo { font-size: 15px; flex: 0 0 auto; white-space: nowrap; letter-spacing: -.2px; }
  .topbar .search { flex: 1 1 0; min-width: 0; padding: 0 8px; gap: 6px; }
  .topbar .search input { flex: 1 1 0; min-width: 0; width: 100%; font-size: 12px; }
  .topbar .top-actions { flex: 0 0 auto; gap: 6px; }
  .topbar .top-actions .lang { font-size: 11px; padding: 4px 6px; }
  .hotnav-inner { padding: 8px 10px; gap: 6px; }
  .hotnav b { display: none; }
  .hotnav a { font-size: 11.5px; padding: 4px 9px; }
  .topbar .logo .logo-wide { display: none; }
  .topbar .logo .logo-small { display: block; width: 30px; height: 30px; }
  .topbar .logo .logo-mini { display: block; font-size: 14px; font-weight: 700; white-space: nowrap; color: var(--brand); }
  .brand-slogan { display: none; }
  /* Keep the support bubble just above the bottom bar so it does not sit on a section title. */
  .rail-fab { right: 10px; bottom: 68px; width: 42px; height: 42px; }
  .carousel { height: 172px; }
  .member-card { padding: 12px; }
  .mc-links { grid-template-columns: repeat(3, 1fr); }
  .cat-all { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
  .cat-tile { padding: 9px 2px; }
  .cat-tile .ci { width: 34px; height: 34px; margin-bottom: 6px; }
  .cat-tile .cn { font-size: 11px; }
  .prod-grid, .grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 9px; padding: 4px 9px 12px; }
  .card.pcard .thumb { padding: 8px; }
  .card.pcard .body { padding: 8px 9px 10px; }
}

/* ---------- product detail: a complete page, not a blank shell ---------- */
.pd-crumbs { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 12px; color: var(--muted); padding: 14px 0 10px; }
.pd-crumbs a { color: var(--ink-2); text-decoration: none; }
.pd-crumbs a:hover { color: var(--brand); }
.pd-top { display: grid; grid-template-columns: minmax(0, 420px) minmax(0, 1fr); gap: 22px;
  background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 18px; }
.pd-main { position: relative; width: 100%; aspect-ratio: 1 / 1; background: #fff;
  border: 1px solid var(--line); border-radius: 8px; padding: 14px; }
.pd-main img { width: 100%; height: 100%; object-fit: contain; }
.pd-thumbs { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.pd-thumbs img { width: 62px; height: 62px; object-fit: cover; padding: 3px; background: #fff;
  border: 1px solid var(--line); border-radius: 6px; cursor: pointer; }
.pd-thumbs img:hover { border-color: var(--brand); }
.pd-info h1 { font-size: 22px; line-height: 1.45; margin: 6px 0 8px; color: var(--ink); }
.pd-brand { color: var(--brand); font-size: 13px; font-weight: 700; }
.pd-sku { font-size: 12px; color: var(--muted); }
.pd-price { font-size: 28px; font-weight: 800; color: var(--brand); margin: 14px 0 6px; }
.pd-price span { font-size: 16px; margin-right: 2px; }
.pd-price.guest { font-size: 15px; font-weight: 600; color: var(--ink-2); }
.pd-block { margin: 16px 0; }
.pd-block h3 { font-size: 14px; margin: 0 0 9px; color: var(--ink); }
.pd-variants { display: flex; flex-wrap: wrap; gap: 8px; }
.pd-variant { border: 1px solid var(--line); background: #fff; color: var(--ink-2);
  border-radius: 5px; padding: 7px 14px; font-size: 12.5px; cursor: pointer; }
.pd-variant.on { border-color: var(--brand); color: var(--brand); background: var(--brand-soft); }
.pd-tiers { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.pd-tiers th, .pd-tiers td { border: 1px solid var(--line); padding: 8px 10px; text-align: left; }
.pd-tiers th { background: #faf8f7; color: var(--ink-2); }
.pd-tiers td:last-child { color: var(--brand); font-weight: 700; }
.pd-tier-box .small { margin-top: 7px; }
.pd-tier-row { display: flex; flex-wrap: wrap; gap: 8px; }
.pd-tier { display: flex; align-items: baseline; gap: 8px; border: 1px solid var(--line);
  background: #fff; color: var(--ink-2); border-radius: 5px; padding: 8px 12px;
  font-size: 12.5px; cursor: pointer; }
.pd-tier b { color: var(--brand); font-size: 14px; }
.pd-tier.on { border-color: var(--brand); background: var(--brand-soft); }
@media (max-width: 600px) { .pd-tier { flex: 1 1 44%; justify-content: space-between; } }
.pd-buy { display: flex; gap: 12px; align-items: center; margin: 18px 0 12px; }
.pd-buy .btn { padding: 10px 24px; }
.pd-support { display: inline-flex; align-items: center; gap: 6px; color: var(--brand); font-size: 12.5px; text-decoration: none; }
.pd-params, .pd-desc { margin-top: 14px; padding: 16px 18px; border: 1px solid var(--line);
  border-radius: 10px; background: #fff; }
.pd-params h3, .pd-desc h3 { font-size: 15px; margin: 0 0 12px; }
.pd-params .spec-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.pd-params .spec-table td { border-bottom: 1px solid var(--line); padding: 9px 10px; }
.pd-params .spec-table td:first-child { width: 190px; color: var(--muted); }
.pd-desc p { line-height: 1.9; color: var(--ink-2); font-size: 13px; margin: 0; }
.pd-detail-imgs { margin-top: 14px; padding: 16px 18px; border: 1px solid var(--line);
  border-radius: 10px; background: #fff; }
.pd-detail-imgs h3 { font-size: 15px; margin: 0 0 12px; }
.pd-detail-imgs img { display: block; width: 100%; max-width: 860px; margin: 0 auto 8px; height: auto; }
/* Parameters sit beside the gallery on desktop, below it on phones. No duplicate content. */
.pd-params-mobile { display: none; }
.pd-params-inline { margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--line); }
.pd-params-inline h3 { font-size: 14px; margin: 0 0 6px; }
.pd-params-inline .spec-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.pd-params-inline .spec-table td { border-bottom: 1px solid var(--line); padding: 7px 8px; }
.pd-params-inline .spec-table td:first-child { width: 130px; color: var(--muted); }
.pd-flow { margin-top: 14px; padding: 16px 18px; border: 1px solid var(--line);
  border-radius: 10px; background: #fff; }
.pd-flow h3 { font-size: 15px; margin: 0 0 12px; }
.pd-flow ol { list-style: none; margin: 0; padding: 0; display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 26px; counter-reset: flow; }
.pd-flow li { position: relative; padding-left: 30px; font-size: 12.5px; line-height: 1.8; color: var(--ink-2); }
.pd-flow li::before { counter-increment: flow; content: counter(flow); position: absolute; left: 0; top: 1px;
  width: 20px; height: 20px; border-radius: 50%; background: var(--brand-soft); color: var(--brand);
  font-size: 11px; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.pd-flow li b { color: var(--ink); margin-right: 7px; }
.pd-buybar { display: none; }

@media (max-width: 760px) {
  .pd-crumbs { padding: 10px 2px 8px; font-size: 11px; }
  .pd-top { grid-template-columns: 1fr; gap: 14px; padding: 10px; }
  .pd-main { padding: 8px; }
  .pd-info h1 { font-size: 18px; }
  .pd-price { font-size: 24px; }
  .pd-params, .pd-desc, .pd-flow { padding: 12px; }
  .pd-params .spec-table td:first-child { width: 110px; }
  /* On phones the parameters move out of the side column and sit below the
     gallery/buy block as their own panel; avoid showing the same table twice. */
  .pd-params-inline { display: none; }
  .pd-params-mobile { display: block; }
  .pd-assure { gap: 8px 12px; font-size: 11px; }
  .pd-flow ol { grid-template-columns: 1fr; gap: 10px; }
  .pd-buybar { display: flex; position: fixed; left: 0; right: 0; bottom: 56px; z-index: 60;
    background: #fff; border-top: 1px solid var(--line); padding: 8px 12px;
    align-items: center; justify-content: space-between; gap: 12px; box-shadow: 0 -3px 14px rgba(0,0,0,.06); }
  .pbb-price .pd-price { font-size: 19px; margin: 0; }
  .pbb-price .pd-price.guest { font-size: 12px; }
  .pd-buybar .btn { flex: 0 0 auto; padding: 9px 16px; }
  body:has(.pd-buybar) { padding-bottom: 120px; }
}

/* --- footer: light background with black text (loaded last, wins over the old
       dark-theme palette in style.css / theme.css) --- */
.site-footer { background: #fff; color: #222; border-top: 1px solid #e5e2e0; margin-top: 48px; }
.site-footer .footer-inner { padding: 40px 28px 30px; }
.site-footer .f-logo,
.site-footer .f-brand .f-logo { color: #111; font-size: 18px; font-weight: 800; letter-spacing: .01em; }
.site-footer .f-slogan { color: var(--brand); font-size: 13px; font-weight: 700; margin: 8px 0 12px; }
.site-footer .f-brand p,
.site-footer .f-col p { color: #333; font-size: 13.5px; line-height: 1.8; margin: 0 0 12px; max-width: 340px; }
.site-footer .f-col h4 { color: #111; font-size: 14px; font-weight: 800; margin: 0 0 16px; letter-spacing: .01em; }
.site-footer .f-col a { color: #222; font-size: 13.5px; line-height: 1.7; margin: 0 0 10px; font-weight: 500; }
.site-footer .f-col a:hover { color: var(--brand); }
.site-footer .f-hot { color: #111; font-size: 13.5px; font-weight: 700; }
.site-footer .f-hot svg { stroke: #111; }
.site-footer .footer-bot { color: #444; font-size: 12.5px; border-top: 1px solid #eceae8; padding: 18px 28px; }
@media (min-width: 1101px) {
  .site-footer .footer-inner { padding: 40px 40px 30px; }
}
@media (max-width: 760px) {
  .site-footer .footer-inner { padding: 30px 16px 20px; }
  .site-footer .footer-bot { padding: 14px 16px; }
}

/* --- buyer inbox --- */
.msg-item { border: 1px solid var(--line); border-radius: 6px; padding: 14px 16px; margin-bottom: 10px; background: #fff; }
.msg-item.unread { border-color: #f6c9bc; background: #fff9f7; }
.msg-hd { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; font-size: 14px; }
.msg-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--brand); margin-right: 7px; vertical-align: middle; }
.msg-body { font-size: 13.5px; color: #333; line-height: 1.8; margin: 8px 0 10px; white-space: normal; }
.mc-stat { text-decoration: none; }
