/* ==========================================================================
   a2bid — giao diện 2026
   Lớp ghi đè có chủ đích, nạp sau styles.css + theme.css.
   Font: Be Vietnam Pro (SIL OFL 1.1), tự host tại /assets/fonts.
   Mục tiêu: chữ lớn dễ đọc, khoảng thở rộng, nút to, màu a2bid #549b90.
   ========================================================================== */

:root {
  --ui-bg: #f4f8f6;
  --ui-surface: #ffffff;
  --ui-surface-soft: #eef6f3;
  --ui-text: #162622;
  --ui-muted: #5e726c;
  --ui-line: #dce9e4;
  --ui-accent: #549b90;
  --ui-accent-dark: #377f73;
  --ui-accent-ink: #00370f;
  --ui-warm: #c9a34a;
  --ui-radius: 20px;
  --ui-radius-sm: 14px;
  --ui-shadow: 0 10px 32px rgba(20, 52, 46, 0.08);
  --ui-shadow-hover: 0 18px 46px rgba(20, 52, 46, 0.14);
}

html {
  font-size: 18px;
}

body {
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--ui-text);
  background-color: var(--ui-bg);
  background-image:
    radial-gradient(circle at 8% 0%, rgba(84, 155, 144, 0.10), transparent 28rem),
    radial-gradient(circle at 100% 10%, rgba(201, 163, 74, 0.07), transparent 24rem);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, h5,
.hero-title, .page-title, .detail-title, .brand-text strong {
  font-family: var(--sans);
  letter-spacing: -0.035em;
  font-weight: 800;
  color: var(--ui-text);
}

p, li, label, input, select, textarea, button {
  font-family: var(--sans);
}

a { color: var(--ui-accent-dark); }
a:hover { color: var(--ui-accent); }

.container { max-width: 1240px; padding-inline: 28px; }
.section { padding: 64px 0; }
.section-tight { padding: 40px 0; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 80;
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid var(--ui-line);
  backdrop-filter: blur(14px);
  box-shadow: 0 4px 18px rgba(20, 52, 46, 0.04);
}

.header-shell {
  min-height: 80px;
  gap: 18px;
}

.brand { gap: 12px; }
.brand-mark-img { width: 46px; height: 46px; border-radius: 15px; }
.brand-text strong { font-size: 24px; font-weight: 800; letter-spacing: -0.045em; }
.brand-text span { font-size: 11px; letter-spacing: 0.08em; color: var(--ui-muted); }

.global-search {
  min-height: 50px;
  border-radius: 999px;
  background: var(--ui-surface-soft);
  border: 1px solid transparent;
}
.global-search:focus-within { border-color: var(--ui-accent); background: #fff; }
.global-search input { font-size: 15px; padding-inline: 14px; }
.global-search button { min-height: 40px; border-radius: 999px; padding-inline: 20px; font-weight: 700; }

.primary-nav a { font-size: 14.5px; font-weight: 600; padding: 8px 10px; border-radius: 9px; }
.primary-nav a:hover { background: var(--ui-surface-soft); }
.auth-zone .btn, .auth-zone .link-quiet { font-size: 14px; }

/* ---------- Hero ---------- */
.hero {
  padding: 56px 0 44px;
  background: linear-gradient(180deg, rgba(255,255,255,0.55), transparent 80%);
}
.hero-grid { gap: 48px; align-items: center; }
.hero-copy { max-width: 640px; }
.eyebrow { font-size: 12px; letter-spacing: 0.14em; font-weight: 800; color: var(--ui-accent-dark); }
.hero-title {
  font-size: clamp(2.65rem, 5.2vw, 4.6rem);
  line-height: 1.04;
  margin: 14px 0 18px;
  font-weight: 800;
}
.hero-title .hl {
  color: var(--ui-accent);
  background: linear-gradient(transparent 68%, rgba(201, 163, 74, 0.34) 68%);
}
.hero-sub { font-size: 1.05rem; line-height: 1.75; color: var(--ui-muted); max-width: 54ch; }
.hero-actions { gap: 12px; margin-top: 24px; }
.hero-trust { gap: 18px; margin-top: 24px; font-size: 13.5px; }

.feature-card {
  border-radius: 26px;
  border: 1px solid var(--ui-line);
  box-shadow: var(--ui-shadow);
  overflow: hidden;
  background: var(--ui-surface);
}
.feature-art-wrap { border-radius: 20px; overflow: hidden; }
.feature-title { font-size: 1.45rem; line-height: 1.3; }

/* ---------- Buttons & forms ---------- */
.btn {
  min-height: 46px;
  padding: 11px 20px;
  border-radius: 12px;
  font-size: 14.5px;
  font-weight: 700;
  transition: transform .16s ease, box-shadow .16s ease, background .16s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-primary { background: var(--ui-accent); box-shadow: 0 7px 16px rgba(84,155,144,.22); }
.btn-primary:hover { background: var(--ui-accent-dark); }
.btn-lg { min-height: 52px; font-size: 16px; border-radius: 14px; }
.btn-sm { min-height: 38px; font-size: 13px; padding: 8px 14px; }

.input, .select, .textarea {
  min-height: 50px;
  border-radius: 12px;
  border: 1.5px solid var(--ui-line);
  background: #fff;
  font-size: 16px;
  padding: 12px 15px;
  transition: border-color .16s ease, box-shadow .16s ease;
}
.input:focus, .select:focus, .textarea:focus {
  border-color: var(--ui-accent);
  box-shadow: 0 0 0 4px rgba(84,155,144,.14);
  outline: none;
}
.input-lg { min-height: 56px; font-size: 17px; }
.textarea { line-height: 1.7; }
.field label { font-size: 14.5px; font-weight: 700; color: var(--ui-text); }
.field .hint, .field .error-text { font-size: 12.5px; line-height: 1.55; }
.optional { font-size: 12px; }

.form-card {
  border-radius: var(--ui-radius);
  border: 1px solid var(--ui-line);
  background: var(--ui-surface);
  box-shadow: 0 4px 18px rgba(20,52,46,.045);
  padding: 26px;
}
.form-card h2 { font-size: 1.35rem; }
.form-section-sub { font-size: 14.5px; color: var(--ui-muted); }
.fee-note { font-size: 14px; }

/* ---------- Category rail ---------- */
.category-rail { gap: 12px; }
.category-pill {
  min-width: 168px;
  padding: 16px;
  border-radius: var(--ui-radius-sm);
  background: var(--ui-surface);
  border: 1px solid var(--ui-line);
  box-shadow: 0 3px 12px rgba(20,52,46,.035);
  transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease;
}
.category-pill:hover {
  transform: translateY(-3px);
  border-color: var(--ui-accent);
  box-shadow: var(--ui-shadow);
}
.cat-orb { width: 46px; height: 46px; font-size: 22px; }
.category-pill strong { font-size: 14px; }
.category-pill span:last-child { font-size: 12px; color: var(--ui-muted); }

/* ---------- Auction cards ---------- */
.auction-card {
  border-radius: var(--ui-radius);
  border: 1px solid var(--ui-line);
  background: var(--ui-surface);
  box-shadow: 0 4px 16px rgba(20,52,46,.04);
  overflow: hidden;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.auction-card:hover {
  transform: translateY(-4px);
  border-color: rgba(84,155,144,.55);
  box-shadow: var(--ui-shadow-hover);
}
.card-art { aspect-ratio: 4 / 3; }
.card-body { padding: 16px 16px 18px; }
.card-title { font-size: 17px; line-height: 1.42; font-weight: 700; letter-spacing: -0.015em; }
.card-kicker { font-size: 11.5px; letter-spacing: .06em; }
.price { font-size: 1.4rem; font-weight: 800; letter-spacing: -0.03em; }
.price-label { font-size: 11.5px; letter-spacing: .08em; }
.bid-count { font-size: 12px; }

/* ---------- Detail ---------- */
.detail-page { padding-top: 28px; }
.detail-title { font-size: clamp(2rem, 3.6vw, 3rem); line-height: 1.12; margin: 14px 0; }
.detail-meta { font-size: 13.5px; gap: 16px; }
.detail-badges { gap: 8px; }
.detail-art, .detail-gallery { border-radius: var(--ui-radius); }
.detail-section { margin-top: 34px; }
.detail-section h2 { font-size: 1.35rem; }
.prose { font-size: 17px; line-height: 1.8; color: var(--ui-text); }
.bid-panel {
  border-radius: 22px;
  border: 1px solid var(--ui-line);
  background: #fff;
  box-shadow: var(--ui-shadow);
  padding: 22px;
}
.price-lg { font-size: 2.55rem; }
.bid-panel .price-label { font-size: 12px; }
.panel-trust { font-size: 12.5px; }
.notice { border-radius: 14px; font-size: 14px; }

/* ---------- Chat / order / admin ---------- */
.chat-shell, .checkout-card, .summary-card, .filter-card, .admin-panel {
  border-radius: var(--ui-radius);
}
.chat-shell { box-shadow: var(--ui-shadow); }
.chat-thread-head h2 { font-size: 1.2rem; }
.chat-message { font-size: 15.5px; line-height: 1.65; }
.chat-composer textarea { font-size: 15.5px; min-height: 48px; }
.checkout-card, .summary-card, .filter-card { border: 1px solid var(--ui-line); background: #fff; }
.order-status-hero h1 { font-size: 2rem; }
.mega-order-id { font-size: 14px; }

/* ---------- Footer ---------- */
.site-footer {
  margin-top: 48px;
  background: #0f2b27;
  color: #dfece8;
  border-top: 0;
}
.footer-shell { padding-top: 52px; padding-bottom: 40px; gap: 40px; }
.footer-brand p, .footer-col a, .footer-contact { font-size: 13.5px; color: #b9cec8; }
.footer-col h4 { font-size: 13px; color: #ffffff; letter-spacing: .08em; }
.footer-col a:hover { color: #ffffff; }
.footer-bottom { background: #0b211e; color: #9db5af; font-size: 12.5px; }

/* ---------- Mobile ---------- */
@media (max-width: 900px) {
  .header-shell { min-height: 68px; }
  .hero { padding: 36px 0 28px; }
  .hero-grid { gap: 28px; }
  .hero-title { font-size: clamp(2.3rem, 9vw, 3.3rem); }
  .hero-sub { font-size: 16px; }
  .section, .section-tight { padding: 40px 0; }
  .container { padding-inline: 18px; }
}

@media (max-width: 600px) {
  html { font-size: 17px; }
  .brand-mark-img { width: 40px; height: 40px; }
  .brand-text strong { font-size: 21px; }
  .brand-text span { display: none; }
  .header-shell { gap: 10px; }
  .global-search { min-height: 46px; }
  .hero-title { font-size: clamp(1.95rem, 9.5vw, 2.5rem); }
  .btn { min-height: 48px; font-size: 15px; }
  .input, .select, .textarea { font-size: 16px; min-height: 50px; }
  .form-card { padding: 18px; border-radius: 16px; }
  .bid-panel { padding: 18px; border-radius: 18px; }
  .price-lg { font-size: 2.15rem; }
  .detail-title { font-size: 2rem; }
  .category-pill { min-width: 148px; }
}
/* Tinh chỉnh nhịp chữ hero và badge nổi bật */
.hero-copy { max-width: 740px; }
.hero-title { font-size: clamp(2.5rem, 4.2vw, 3.9rem); }
.feature-flag { top: 10px; }
/* Header không bị ngắt chữ khi đã đăng nhập */
.primary-nav, .primary-nav a, .auth-zone { white-space: nowrap; }
.primary-nav { flex-shrink: 0; }
.global-search { min-width: 240px; }
@media (max-width: 1380px) {
  .primary-nav .support-link { display: none; }
  .global-search { min-width: 280px; }
}
@media (max-width: 1120px) {
  .primary-nav { display: none; }
}
.footer-bottom-actions { display: inline-flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.footer-textsize {
  min-height: 30px;
  padding: 3px 10px 3px 5px;
  border-color: rgba(255,255,255,.28);
  background: rgba(255,255,255,.08);
  color: #e8f3ef;
  font-size: 12px;
}
.footer-textsize:hover { background: rgba(255,255,255,.16); }
.footer-textsize .text-size-a { width: 22px; height: 22px; background: var(--ui-accent); color: #fff; }
.footer-textsize[aria-pressed="true"] { background: var(--ui-accent); border-color: var(--ui-accent); color: #fff; }
.footer-textsize[aria-pressed="true"] .text-size-a { background: #fff; color: var(--ui-accent-ink); }
.admin-fee-form { display: block; }
.admin-fee-form .field { margin: 0; max-width: 460px; }
.admin-fee-form .fee-inline { display: flex; align-items: center; gap: 12px; }
.admin-fee-form .fee-inline .input { flex: 0 0 220px; width: 220px; }
.admin-fee-form .fee-inline .btn { flex: 0 0 auto; white-space: nowrap; }
@media (max-width: 560px) {
  .admin-fee-form .fee-inline { display: block; }
  .admin-fee-form .fee-inline .input { width: 100%; }
  .admin-fee-form .fee-inline .btn { width: 100%; margin-top: 10px; }
}
.lang-toggle {
  display: inline-grid;
  place-items: center;
  min-width: 42px;
  min-height: 38px;
  padding: 0 10px;
  border: 1.5px solid var(--ui-line);
  border-radius: 10px;
  background: #fff;
  color: var(--ui-accent-dark);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .04em;
}
.lang-toggle:hover { border-color: var(--ui-accent); background: var(--ui-surface-soft); }
@media (max-width: 600px) {
  .lang-toggle { min-height: 34px; min-width: 36px; font-size: 11px; }
}
.buy-now-auction { margin: 0 0 14px; }
.buy-now-auction .gate-title { font-size: 1.1rem; }
#approval-section { display: none !important; }
.image-upload-item { cursor: grab; touch-action: pan-y; user-select: none; }
.image-upload-item img { pointer-events: none; }
.image-upload-item.dragging { opacity: .55; cursor: grabbing; transform: scale(.97); }
.image-upload-item.drag-over { outline: 3px dashed var(--ui-accent); outline-offset: -3px; }
.image-upload-item .image-cover-action {
  top: auto;
  right: 6px;
  bottom: 6px;
  width: auto;
  height: 26px;
  padding: 0 8px;
  border-radius: 999px;
  background: rgba(0,0,0,.62);
  font-size: 10.5px;
  font-weight: 700;
}
.image-upload-item .image-remove { z-index: 2; }
.brand-text { gap: 1px; }
.brand-wordmark {
  display: block;
  width: auto;
  height: 28px;
  max-width: 148px;
  object-fit: contain;
}
.brand-light .brand-wordmark { height: 30px; }
@media (max-width: 900px) {
  .brand-wordmark { height: 24px; max-width: 128px; }
  .brand-light .brand-wordmark { height: 26px; }
}
.otp-channel-choice { margin-top: 14px; }
.otp-channel-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 10px; }
.otp-channel-grid .btn { min-height: 64px; line-height: 1.35; }
.otp-channel-grid small { color: var(--ui-muted); font-size: 11px; font-weight: 500; }
@media (max-width: 520px) { .otp-channel-grid { grid-template-columns: 1fr; } }
/* Ảnh sản phẩm phải phủ kín khung card; badge thời gian nằm trên ảnh. */
.auction-card .card-art-link { overflow: hidden; }
.auction-card .card-art { width: 100%; height: 186px; position: relative; }
.auction-card .card-art.auction-photo { display: block; padding: 0; background: #eef4f0; }
.auction-card .card-art.auction-photo img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}
.auction-card .card-chips { z-index: 2; }
.feature-art.auction-photo { display: block; padding: 0; }
.feature-art.auction-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}
.btn-google {
  background: #fff;
  color: #1f2a27;
  border: 1.5px solid var(--ui-line, #dfe8e3);
  gap: 9px;
}
.btn-google:hover { background: #f7faf8; color: #1f2a27; border-color: #b9d2c8; }
.btn-google .google-icon { width: 18px; height: 18px; flex: 0 0 auto; }
.btn-google + .btn-facebook { margin-top: 8px; }
.footer-wordmark { height: 34px !important; max-width: 155px !important; }
@media (max-width: 900px) { .footer-wordmark { height: 30px !important; max-width: 140px !important; } }
.footer-wordmark { height: 42px !important; max-width: 190px !important; }
@media (max-width: 900px) { .footer-wordmark { height: 34px !important; max-width: 160px !important; } }
.auth-aside .auth-wordmark { height: 42px !important; max-width: 190px !important; }
@media (max-width: 900px) { .auth-aside .auth-wordmark { height: 34px !important; max-width: 160px !important; } }

/* Category cards: consistent line icons instead of small emoji in pale circles. */
.category-pill {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  grid-template-rows: auto auto;
  align-items: center;
  column-gap: 12px;
  min-width: 184px;
  padding: 14px;
  text-align: left;
}
.category-pill .cat-orb {
  grid-row: 1 / span 2;
  width: 46px;
  height: 46px;
  margin: 0;
  border-radius: 14px;
  background: var(--brand-soft, #e7f2ed);
  color: var(--brand, #0f6b5b);
  font-size: 24px;
}
.cat-icon {
  width: 27px;
  height: 27px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.65;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.cat-emoji { line-height: 1; }
.category-pill strong {
  align-self: end;
  font-size: 13.5px;
  color: var(--ink, #162a2e);
}
.category-pill > span:last-child {
  align-self: start;
  margin-top: 2px;
  font-size: 11.5px;
  color: var(--ui-muted, #71827c);
}
@media (max-width: 600px) {
  .category-pill { min-width: 172px; padding: 12px; column-gap: 10px; }
  .category-pill .cat-orb { width: 42px; height: 42px; border-radius: 12px; }
  .cat-icon { width: 24px; height: 24px; }
}

/* Giỏ hàng mua ngay */
.cart-page { padding-top: 14px; }
.cart-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 22px; align-items: start; }
.cart-list { display: grid; gap: 12px; }
.cart-item { display: grid; grid-template-columns: 86px minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 14px; border: 1px solid var(--line); border-radius: 14px; background: #fff; }
.cart-item-art { width: 86px; height: 86px; border-radius: 10px; overflow: hidden; display: block; background: var(--beige); }
.cart-item-art .cart-thumb, .cart-item-art img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cart-item-title { display: block; color: var(--ink); font-weight: 700; line-height: 1.35; }
.cart-item-meta { margin-top: 3px; color: var(--muted); font-size: 12px; }
.cart-item-expiry { margin-top: 7px; color: var(--forest); font-size: 12px; font-weight: 600; }
.cart-item-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.cart-item-price { text-align: right; display: grid; gap: 3px; }
.cart-item-price strong { font-size: 16px; color: var(--ink); }
.cart-item-price span { font-size: 11px; color: var(--muted); }
.cart-checkout { grid-column: 3; margin-top: 4px; }
.cart-summary { border: 1px solid var(--line); border-radius: 14px; background: #fff; padding: 18px; position: sticky; top: 86px; }
.cart-summary h2 { margin: 0 0 12px; font-size: 17px; }
.cart-summary .summary-row { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; border-bottom: 1px dashed var(--line); font-size: 13px; }
.cart-summary .summary-row:last-of-type { border-bottom: 0; }
.card-cart-note { margin: 4px 0 0; padding: 5px 7px; border-radius: 6px; background: #fff4dc; color: #8a5a00; font-size: 10px; line-height: 1.35; font-weight: 600; }
.header-chat.cart-link { position: relative; }
.cart-count { display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 99px; background: var(--coral); color: #fff; font-size: 10px; font-weight: 700; line-height: 1; }
@media (max-width: 760px) {
  .cart-layout { grid-template-columns: 1fr; }
  .cart-summary { position: static; }
  .cart-item { grid-template-columns: 64px minmax(0, 1fr); gap: 10px; }
  .cart-item-art { width: 64px; height: 64px; }
  .cart-item-price { grid-column: 2; text-align: left; display: flex; align-items: baseline; gap: 8px; }
  .cart-checkout { grid-column: 2; width: 100%; }
}

.required-mark { color: var(--coral); font-weight: 800; }
.cart-checkout-page { padding-top: 14px; }
.cart-checkout-layout { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 22px; align-items: start; }
.cart-checkout-layout .checkout-card { border: 1px solid var(--line); border-radius: 14px; background: #fff; padding: 20px; }
.cart-checkout-layout .checkout-summary { border: 1px solid var(--line); border-radius: 14px; background: #fff; padding: 18px; position: sticky; top: 86px; }
.cart-checkout-layout .checkout-summary h2 { font-size: 17px; line-height: 1.35; margin: 0 0 6px; }
.cart-checkout-layout .checkout-summary .summary-row { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; border-bottom: 1px dashed var(--line); font-size: 13px; }
.cart-checkout-layout .checkout-summary .summary-row.total { border-bottom: 0; font-size: 16px; padding-top: 12px; }
.cart-checkout-layout .checkout-summary .summary-row.total strong { color: var(--coral); }
@media (max-width: 760px) { .cart-checkout-layout { grid-template-columns: 1fr; } .cart-checkout-layout .checkout-summary { position: static; } }
/* Giữ nhãn đếm ngược trên thẻ sản phẩm không bị tràn/cắt */
.auction-card .card-chips {
  gap: 4px;
  align-items: flex-start;
  right: 8px;
}
.auction-card .card-chips .card-cat-chip {
  max-width: 40%;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.auction-card .card-chips .countdown {
  flex: 0 0 auto;
  white-space: nowrap;
  font-size: 10px;
  padding: 4px 7px;
  max-width: none;
}
@media (max-width: 520px) {
  .auction-card .card-chips .card-cat-chip { max-width: 36%; }
  .auction-card .card-chips .countdown { font-size: 9.5px; padding: 4px 6px; }
}
/* Mobile: xếp 3 cam kết thành một cột, tránh ô trống */
@media (max-width: 960px) {
  .trust-strip { grid-template-columns: 1fr; }
  .trust-item { align-items: center; padding: 14px 16px; }
  .trust-item > div { min-width: 0; }
  .trust-item .trust-icon { display: grid; }
  .trust-item > div > span { display: block; }
}
.auth-points .auth-point-note {
  display: block;
  margin-top: 3px;
  color: #c8d6c8;
  font-size: 10.5px;
  font-weight: 500;
  line-height: 1.45;
}
/* Hồ sơ người bán + đánh giá */
.seller-profile-card { background: #fff; border: 1px solid var(--ui-line); border-radius: 18px; padding: 22px; }
.seller-profile-head { display: flex; gap: 16px; align-items: flex-start; }
.seller-profile-head h1 { margin: 0 0 6px; font-size: 28px; line-height: 1.2; }
.seller-profile-head .avatar-lg { width: 64px; height: 64px; font-size: 20px; flex: 0 0 auto; }
.seller-profile-head .seller-stats-row { margin-top: 12px; }
.seller-reviews { margin-top: 34px; }
.seller-review-summary { display: flex; align-items: center; gap: 10px; margin: 4px 0 14px; color: var(--muted); font-size: 13px; }
.seller-review-summary strong { color: var(--ink); font-size: 18px; }
.seller-review-list { display: grid; gap: 12px; }
.seller-review-item { background: #fff; border: 1px solid var(--ui-line); border-radius: 14px; padding: 15px 17px; }
.seller-review-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.seller-review-head .stars { color: #d79a21; }
.seller-review-item p { margin: 8px 0 0; color: var(--ink-2); line-height: 1.55; }
.seller-review-images { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.seller-review-images img { width: 78px; height: 78px; object-fit: cover; border-radius: 8px; border: 1px solid var(--ui-line); }
.seller-page .auction-grid { margin-top: 14px; }
/* Đánh giá người bán */
.review-star-picker { display: flex; gap: 6px; margin-top: 4px; }
.review-star { border: 0; background: transparent; color: #d8d1c3; font-size: 32px; line-height: 1; cursor: pointer; padding: 0 3px; transition: color .15s, transform .15s; }
.review-star:hover, .review-star.active { color: #e0a11d; transform: translateY(-1px); }
.review-existing-head { display: flex; align-items: center; gap: 10px; color: var(--muted); }
.review-existing-head .stars { color: #d79a21; }
.review-existing p { color: var(--ink-2); line-height: 1.6; }
/* Ảnh đại diện người dùng */
.avatar { overflow: hidden; }
.avatar img { width: 100%; height: 100%; object-fit: cover; display: block; border-radius: 50%; }
.avatar-xl { width: 86px; height: 86px; font-size: 24px; }
.avatar-edit { display: flex; gap: 16px; align-items: center; padding: 14px 0 20px; border-bottom: 1px solid var(--ui-line); margin-bottom: 20px; }
.avatar-edit-main { flex: 1; min-width: 0; }
.avatar-edit-main > label { display: block; font-weight: 700; font-size: 14px; margin-bottom: 7px; }
.avatar-edit-main input[type=file] { max-width: 100%; }
.avatar-edit-actions { margin-top: 7px; }
@media (max-width: 560px) {
  .avatar-edit { align-items: flex-start; gap: 12px; }
  .avatar-edit .avatar-xl { width: 66px; height: 66px; }
}
/* Báo cáo sản phẩm */
.seller-actions { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.report-modal .textarea { width: 100%; min-height: 120px; margin-top: 12px; }
.report-modal .form-error { min-height: 18px; margin-top: 6px; }
/* Cửa hàng sửa chữa xe đạp */
.repair-page .page-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas: "eyebrow button" "title button" "sub button";
  align-items: center;
  column-gap: 16px;
}
.repair-page .page-head > .eyebrow { grid-area: eyebrow; }
.repair-page .page-head > .page-title { grid-area: title; }
.repair-page .page-head > .page-sub { grid-area: sub; }
.repair-page .page-head > [data-add-shop] { grid-area: button; justify-self: end; }
.repair-add-bottom { display: none; }
@media (max-width: 620px) {
  .repair-page .page-head { grid-template-columns: 1fr; grid-template-areas: "eyebrow" "title" "sub" "button"; }
  .repair-page .page-head > [data-add-shop] { justify-self: start; margin-top: 12px; }
  .repair-add-head, .repair-add-inline { display: none; }
  .repair-add-bottom { display: flex; width: 100%; justify-content: center; margin: 20px 0 100px; }
}
.repair-layout { display: grid; grid-template-columns: minmax(0, 1fr) 420px; gap: 22px; align-items: start; padding-top: 20px; }
.repair-list { display: grid; gap: 14px; }
.repair-shop-card { background: #fff; border: 1px solid var(--ui-line); border-radius: 16px; padding: 18px 20px; }
.repair-shop-head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.repair-shop-head h2 { margin: 0 0 4px; font-size: 19px; line-height: 1.3; }
.repair-shop-rating { color: var(--muted); font-size: 13px; }
.repair-shop-rating .stars { color: #d79a21; }
.repair-shop-address { margin: 10px 0 0; color: var(--ink-2); font-size: 14px; line-height: 1.5; }
.repair-shop-meta { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 8px; color: var(--muted); font-size: 13px; }
.repair-shop-meta a { color: var(--brand); text-decoration: none; }
.repair-shop-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.repair-shop-reviews { border-top: 1px dashed var(--ui-line); margin-top: 14px; padding-top: 10px; display: grid; gap: 8px; }
.repair-shop-review strong { font-size: 13px; }
.repair-shop-review .stars { color: #d79a21; font-size: 12px; }
.repair-shop-review p { margin: 3px 0 0; color: var(--ink-2); font-size: 13px; line-height: 1.5; }
.repair-map-panel { position: sticky; top: 92px; background: #fff; border: 1px solid var(--ui-line); border-radius: 18px; padding: 12px; overflow: hidden; }
.repair-map-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 2px 2px 10px; }
.repair-map { width: 100%; height: 460px; border-radius: 12px; display: block; background: var(--paper-2); z-index: 0; }
.repair-map .leaflet-container { font-family: var(--sans); }
.repair-map-error { display: grid; place-items: center; height: 460px; color: var(--muted); text-align: center; padding: 20px; }
.shop-form-modal { max-width: 620px; width: calc(100vw - 32px); }
.shop-form-modal form { margin-top: 12px; }
.shop-form-modal .field { margin-top: 12px; }
.shop-form-modal .form-grid { gap: 12px; }
.shop-form-modal .form-error { min-height: 18px; margin-top: 6px; }
@media (max-width: 900px) {
  .repair-layout { grid-template-columns: 1fr; }
  /* Trên mobile ưu tiên danh sách cửa hàng, bản đồ xuống dưới */
  .repair-list { order: 1; }
  .repair-map-panel { position: static; order: 2; }
  .repair-map { height: 280px; }
}
/* Header di động kiểu chợ: menu + danh mục nhanh */
.mobile-menu-toggle, .mobile-category-nav, .mobile-drawer { display: none; }
@media (max-width: 860px) {
  .mobile-menu-toggle {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    flex: 0 0 auto;
    border: 1px solid var(--ui-line);
    border-radius: 11px;
    background: #fff;
    color: var(--ui-text);
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
  }
  .header-shell { gap: 8px 10px; padding: 10px 14px 9px; }
  .brand { margin-right: auto; }
  .brand-wordmark { height: 27px; width: auto; }
  .auth-zone { gap: 8px; }
  .auth-zone .link-quiet { font-size: 12px; }
  .auth-zone .btn-sm { min-height: 34px; padding: 7px 12px; font-size: 12px; }
  .search-row { order: 4; flex-basis: 100%; width: 100%; flex-wrap: wrap; gap: 8px; }
  .global-search { order: 0; flex: 1 1 100%; max-width: none; }
  .search-repair-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 40px;
    padding: 8px 14px;
    border-radius: 12px;
    background: var(--ui-surface-soft);
    color: var(--brand);
    font-size: 13.5px;
    font-weight: 650;
    text-decoration: none;
  }
  .search-repair-link::before { content: "📍"; font-size: 14px; }
  .mobile-category-nav {
    display: flex;
    order: 5;
    flex-basis: 100%;
    gap: 6px;
    overflow-x: auto;
    padding: 1px 0 3px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }
  .mobile-category-nav::-webkit-scrollbar { display: none; }
  .mobile-category-nav a {
    flex: 0 0 auto;
    padding: 6px 10px;
    border: 1px solid var(--ui-line);
    border-radius: 999px;
    background: rgba(255,255,255,.75);
    color: var(--ui-text);
    font-size: 11.5px;
    font-weight: 650;
    text-decoration: none;
    white-space: nowrap;
  }
  .mobile-category-nav a:last-child { color: var(--brand); border-color: color-mix(in srgb, var(--brand) 35%, var(--ui-line)); }
  .mobile-drawer:not([hidden]) { display: block; }
  .mobile-drawer { position: fixed; inset: 0; z-index: 250; }
  .mobile-drawer-backdrop { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: rgba(10,25,22,.42); }
  .mobile-drawer-panel {
    position: relative; z-index: 1; width: min(86vw, 340px); height: 100%; overflow-y: auto;
    background: #fff; padding: 18px 18px 28px; box-shadow: 12px 0 40px rgba(10,30,25,.18);
    display: flex; flex-direction: column; gap: 18px;
  }
  .mobile-drawer-head { display: flex; align-items: center; justify-content: space-between; }
  .mobile-drawer-head strong { font-size: 21px; letter-spacing: -.03em; }
  .mobile-drawer-close { border: 0; background: transparent; font-size: 28px; line-height: 1; color: var(--muted); cursor: pointer; }
  .mobile-drawer-links, .mobile-drawer-cats { display: grid; gap: 2px; }
  .mobile-drawer-links a, .mobile-drawer-cats a { padding: 10px 2px; border-bottom: 1px solid var(--ui-line); color: var(--ui-text); font-size: 14px; text-decoration: none; }
  .mobile-drawer-links a:active, .mobile-drawer-cats a:active { color: var(--brand); }
  .mobile-drawer-label { font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); padding: 2px 2px 6px; }
  .mobile-drawer-auth { margin-top: auto; display: flex; align-items: center; gap: 10px; }
  .mobile-drawer-auth a:first-child { flex: 1; padding: 10px 2px; color: var(--ui-text); font-weight: 650; text-decoration: none; }
  body.mobile-menu-open { overflow: hidden; }
}
@media (max-width: 860px) {
  .auth-zone { gap: 5px; }
  .auth-zone .header-chat { width: 34px; height: 34px; padding: 0; justify-content: center; gap: 0; border-radius: 10px; }
  .auth-zone .header-chat[data-chat-link] { display: none; }
  .auth-zone .header-chat > span:not(.cart-count):not(.chat-badge) { display: none; }
  .auth-zone .header-chat svg { width: 19px; height: 19px; }
  .auth-zone .header-sell { display: none; }
  .auth-zone .user-menu-name, .auth-zone .user-menu summary > svg { display: none; }
  .auth-zone .user-menu summary { padding: 2px; gap: 0; }
  .auth-zone .user-menu .avatar { width: 34px; height: 34px; font-size: 11px; }
}

@media (max-width: 760px) {
  .header-shell .auth-zone { display: none; }
}

@media (max-width: 760px) {
  .mobile-menu-toggle, .mobile-drawer { display: none !important; }
  .mobile-cart-btn {
    display: inline-grid !important;
    place-items: center;
    position: relative;
    width: 38px;
    height: 38px;
    flex: 0 0 auto;
    border: 1px solid var(--ui-line);
    border-radius: 11px;
    background: #fff;
    color: var(--ui-text);
    text-decoration: none;
  }
  .mobile-cart-btn svg { width: 20px; height: 20px; }
  .mobile-cart-btn .cart-count { position: absolute; top: -5px; right: -5px; }
}
.mobile-cart-btn { display: none; }

@media (max-width: 760px) {
  .bottom-nav { grid-template-columns: repeat(5, 1fr) !important; }
  .bottom-nav [data-bottom="cart"] { display: none !important; }
}
/* Đấu giá sắp kết thúc — cuối trang chủ */
.ending-section { padding-top: 10px; padding-bottom: 66px; }
.ending-layout { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: 32px; align-items: center; border-top: 1px solid var(--ui-line); padding-top: 34px; }
.ending-copy .section-title { margin: 6px 0 8px; }
.ending-copy .section-sub { margin-bottom: 12px; }
.ending-list { display: grid; gap: 8px; }
.ending-item { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 13px 16px; border: 1px solid var(--ui-line); border-radius: 13px; background: #fff; color: var(--ui-text); text-decoration: none; }
.ending-item:hover { border-color: var(--brand); }
.ending-info { display: grid; gap: 4px; min-width: 0; }
.ending-info strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; }
.ending-info > span { color: var(--muted); font-size: 12.5px; }
.ending-info .countdown { color: var(--brand); font-weight: 700; }
.ending-arrow { color: var(--brand); font-size: 18px; flex: 0 0 auto; }
@media (max-width: 760px) {
  .ending-layout { grid-template-columns: 1fr; gap: 16px; padding-top: 24px; }
  .ending-section { padding-bottom: 88px; }
  .ending-info strong { white-space: normal; }
}
/* Tùy chọn bỏ qua xác nhận đặt giá */
.confirm-check { display: flex; align-items: flex-start; gap: 9px; margin-top: 14px; font-size: 13.5px; color: var(--ink-2); cursor: pointer; line-height: 1.45; }
.confirm-check input { width: 17px; height: 17px; margin-top: 1px; accent-color: var(--brand); flex: 0 0 auto; }
.bid-skip-state { margin: 8px 0 0; font-size: 12px; color: var(--muted); line-height: 1.5; }
.bid-skip-state button { border: 0; background: transparent; color: var(--brand); padding: 0; font: inherit; text-decoration: underline; cursor: pointer; }
/* Desktop/tablet: tách ô tìm kiếm thành hàng riêng */
.search-repair-link { display: none; }
.header-sell-search { display: none !important; }
.search-row { display: flex; align-items: center; gap: 10px; min-width: 0; flex: 1 1 auto; }
.search-row .global-search { flex: 1 1 auto; min-width: 0; max-width: none; }

@media (min-width: 861px) {
  .header-shell {
    flex-wrap: wrap;
    gap: 12px 22px;
    padding-top: 13px;
    padding-bottom: 13px;
  }
  .search-row {
    order: 10;
    flex: 0 0 100%;
    width: 100%;
  }
  .search-row .global-search {
    flex: 1 1 auto;
    max-width: none;
    margin: 0;
    min-width: 0;
  }
  .header-sell-search:not([hidden]) {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    min-height: 44px;
    padding: 0 16px;
    border-radius: 999px;
    white-space: nowrap;
  }
  .search-repair-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    padding: 0 18px;
    min-height: 44px;
    border: 1px solid var(--line-strong);
    border-radius: 999px;
    background: #fff;
    color: var(--ink-2);
    font-size: 14px;
    font-weight: 650;
    white-space: nowrap;
    text-decoration: none;
  }
  .search-repair-link:hover { border-color: var(--brand); color: var(--brand); }
  .primary-nav { margin-left: auto; }
}

@media (min-width: 861px) and (max-width: 1120px) {
  .primary-nav { display: flex; gap: 10px; }
  .primary-nav a { font-size: 12.5px; padding: 6px 6px; }
  .header-shell { gap: 10px 14px; }
}

@media (max-width: 860px) {
  .search-row { flex-wrap: wrap; gap: 8px; }
  .search-row .global-search { flex: 1 1 100%; width: 100%; max-width: none; }
  .search-row .search-repair-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 40px;
    padding: 8px 14px;
    border-radius: 12px;
    background: var(--ui-surface-soft);
    color: var(--brand);
    font-size: 13.5px;
    font-weight: 650;
    text-decoration: none;
  }
  .search-row .search-repair-link::before { content: "📍"; font-size: 14px; }
}

.auth-switch-block { display: grid; gap: 10px; text-align: center; }
.auth-switch-block .btn { width: 100%; }

/* Giỏ hàng luôn hiện ở header, mọi kích thước và mọi trạng thái đăng nhập */
.mobile-cart-btn {
  display: inline-grid !important;
  place-items: center;
  position: relative;
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  border: 1px solid var(--ui-line);
  border-radius: 11px;
  background: #fff;
  color: var(--ui-text);
  text-decoration: none;
}
.mobile-cart-btn svg { width: 20px; height: 20px; }
.mobile-cart-btn .cart-count { position: absolute; top: -5px; right: -5px; }
.auth-zone .header-chat.cart-link { display: none !important; }

.account-logout { margin-top: 14px; }

.account-gate-actions { display: grid; gap: 10px; width: 100%; max-width: 360px; margin: 18px auto 0; }
.account-gate-actions .btn { width: 100%; }

.checkout-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; }
@media (max-width: 760px) {
  .checkout-actions { display: grid; gap: 10px; }
  .checkout-actions .btn { width: 100%; }
}

@media (max-width: 760px) {
  .cart-item .cart-item-actions { display: flex !important; flex-direction: column !important; gap: 8px; }
  .cart-item .cart-item-actions .btn { width: 100% !important; flex: 0 0 100%; }
}
