/* ==========================================================
   ZEBITY — style.css
   Mobile-first (base ~390px) -> tablet 768px -> desktop 1024px+
   ========================================================== */

:root {
  --orange: #FB7701;
  --red: #E62E04;
  --green: #0BA15A;
  --peach: #FFF0E5;
  --black: #111111;
  --gray: #8C8C8C;
  --divider: #F2F2F2;
  --bg: #FFFFFF;
  --radius-lg: 16px;
  --radius-md: 12px;
  --radius-pill: 999px;
  --header-h: 56px;
}

* { box-sizing: border-box; }
html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--black);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-tap-highlight-color: transparent;
}
img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }
button { font-family: inherit; cursor: pointer; }
input, select { font-family: inherit; }
ul { list-style: none; margin: 0; padding: 0; }

.container {
  width: 100%;
  margin: 0 auto;
  padding: 0 12px;
}

@media (min-width: 1024px) {
  .container { max-width: 1400px; padding: 0 24px; }
}

/* ---------------- Top utility bar (desktop only) ---------------- */
.utility-bar {
  display: none;
  background: var(--black);
  color: #fff;
  font-size: 12px;
}
.utility-bar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 32px;
}
@media (min-width: 1024px) {
  .utility-bar { display: block; }
}

/* ---------------- Header ---------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: #fff;
  border-bottom: 1px solid var(--divider);
}
.header-row {
  display: flex;
  align-items: center;
  gap: 10px;
  height: var(--header-h);
  padding: 0 12px;
}
.logo {
  font-weight: 800;
  font-size: 22px;
  color: var(--orange);
  letter-spacing: -0.5px;
  white-space: nowrap;
}
.header-icon-btn {
  background: none;
  border: none;
  padding: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  color: var(--black);
}
.header-icon-btn svg { width: 24px; height: 24px; }
.cart-badge {
  position: absolute;
  top: 0;
  right: 0;
  background: var(--orange);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  min-width: 16px;
  height: 16px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 3px;
}

.search-box {
  flex: 1;
  display: flex;
  align-items: center;
  background: var(--divider);
  border-radius: var(--radius-pill);
  height: 38px;
  padding: 0 4px 0 14px;
  overflow: hidden;
  border: none;
}
.search-box input {
  border: none;
  background: transparent;
  flex: 1;
  outline: none;
  font-size: 14px;
  color: var(--black);
  min-width: 0;
}
.search-box .search-submit {
  background: var(--black);
  border: none;
  border-radius: 50%;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.search-box .search-submit svg { width: 16px; height: 16px; stroke: #fff; }

/* Category tabs row */
.cat-tabs {
  display: flex;
  gap: 22px;
  overflow-x: auto;
  scrollbar-width: none;
  padding: 0 14px 10px;
  white-space: nowrap;
}
.cat-tabs::-webkit-scrollbar { display: none; }
.cat-tab {
  font-size: 13.5px;
  color: var(--gray);
  padding-bottom: 6px;
  border-bottom: 2px solid transparent;
  flex-shrink: 0;
  font-weight: 500;
}
.cat-tab.active {
  color: var(--black);
  font-weight: 700;
  border-bottom-color: var(--orange);
}

/* Desktop nav */
.desktop-nav { display: none; }
@media (min-width: 1024px) {
  .header-row { height: 76px; padding: 0; gap: 24px; }
  .mobile-only { display: none !important; }
  .logo { font-size: 30px; }
  .desktop-nav {
    display: flex;
    align-items: center;
    gap: 20px;
    white-space: nowrap;
  }
  .desktop-nav a {
    font-size: 14px;
    font-weight: 600;
    color: var(--black);
  }
  .desktop-nav a:hover { color: var(--orange); }
  .search-box { max-width: 560px; height: 44px; }
  .header-actions {
    display: flex;
    align-items: center;
    gap: 18px;
    font-size: 13px;
    font-weight: 600;
    flex-shrink: 0;
  }
  .header-actions .divider-dot { color: var(--divider); }
  .cat-tabs { display: none; }
}
.desktop-only { display: none; }
@media (min-width: 1024px) { .desktop-only { display: flex; } }

/* ---------------- Info strips ---------------- */
.info-strip {
  background: var(--peach);
  display: flex;
  overflow-x: auto;
  scrollbar-width: none;
  font-size: 11.5px;
  font-weight: 600;
  color: #7A3E00;
}
.info-strip::-webkit-scrollbar { display: none; }
.info-strip .item {
  flex-shrink: 0;
  padding: 8px 14px;
  border-right: 1px solid rgba(0,0,0,0.06);
  white-space: nowrap;
}

.trust-bar {
  background: var(--green);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  padding: 8px 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  white-space: nowrap;
}
.trust-bar::-webkit-scrollbar { display: none; }
@media (min-width: 1024px) {
  .trust-bar { justify-content: space-between; }
  .trust-bar .trust-items { display: flex; gap: 24px; }
}

/* ---------------- Promo cards (clearance / lightning) ---------------- */
.promo-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding: 14px 12px 6px;
}
.promo-card {
  border-radius: var(--radius-lg);
  overflow: hidden;
  position: relative;
  color: #fff;
  min-height: 130px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 10px 12px;
}
.promo-card.clearance { background: linear-gradient(135deg,#E62E04,#ff6a3d); }
.promo-card.lightning { background: linear-gradient(135deg,#FB7701,#ffb35c); }
.promo-card .promo-title { font-weight: 800; font-size: 13.5px; }
.promo-card .promo-price { font-weight: 800; font-size: 18px; margin-top: auto; }
.promo-card .promo-price .was { font-size: 11px; text-decoration: line-through; opacity: 0.8; font-weight: 500; margin-left: 4px; }
.promo-card img { position: absolute; right: -6px; bottom: -6px; width: 78px; height: 78px; object-fit: cover; border-radius: 10px; opacity: 0.95; }

@media (min-width: 1024px) {
  .deals-desktop-row { display: flex; gap: 20px; padding: 24px 0; }
  .deals-desktop-col { flex: 1; background: #fafafa; border-radius: var(--radius-lg); padding: 16px; }
  .deals-desktop-col h3 { margin: 0 0 12px; font-size: 16px; display: flex; align-items: center; gap: 6px; }
  .deals-desktop-col.lightning h3 { color: var(--orange); }
  .deals-desktop-col.clearance h3 { color: var(--red); }
  .deals-desktop-scroll { display: flex; gap: 12px; overflow-x: auto; }
  .deals-desktop-scroll .product-card { width: 180px; flex-shrink: 0; }
  .promo-row { display: none; }
}

/* ---------------- Sub filter tabs ---------------- */
.filter-tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
  padding: 10px 12px;
}
.filter-tabs::-webkit-scrollbar { display: none; }
.filter-chip {
  flex-shrink: 0;
  padding: 7px 14px;
  border-radius: var(--radius-pill);
  background: var(--divider);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--black);
  white-space: nowrap;
}
.filter-chip.active { background: var(--black); color: #fff; }

/* ---------------- Product grid & card ---------------- */
.product-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding: 4px 12px 24px;
}
@media (min-width: 768px) {
  .product-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 1024px) {
  .product-grid { grid-template-columns: repeat(5, 1fr); gap: 16px; padding: 4px 0 32px; }
}
@media (min-width: 1280px) {
  .product-grid { grid-template-columns: repeat(6, 1fr); }
}

.product-card {
  background: #fff;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--divider);
  display: block;
  position: relative;
}
.product-card .img-wrap { position: relative; width: 100%; aspect-ratio: 1/1; background: var(--divider); overflow: hidden; }
.product-card .img-wrap img { width: 100%; height: 100%; object-fit: cover; }
.product-card .badge {
  position: absolute;
  top: 6px;
  left: 6px;
  background: var(--orange);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 3px 7px;
  border-radius: 6px;
}
.product-card .badge.deal { background: var(--red); }
.quick-add-btn {
  position: absolute;
  right: 6px;
  bottom: 6px;
  height: 26px;
  padding: 0 10px;
  border-radius: 13px;
  background: var(--orange);
  color: #fff;
  border: none;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}
.product-card .body { padding: 8px; }
.product-card .title {
  font-size: 12.5px;
  line-height: 1.3;
  height: 2.6em;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  margin: 0 0 6px;
}
.product-card .price-row { display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; }
.product-card .price { font-weight: 800; font-size: 15px; color: var(--black); }
.product-card .price.on-sale { color: var(--red); }
.product-card .price-was { font-size: 11px; color: var(--gray); text-decoration: line-through; }
.product-card .meta-row { display: flex; align-items: center; gap: 4px; margin-top: 4px; font-size: 11px; color: var(--gray); }
.product-card .stars { color: var(--orange); }

/* ---------------- Skeletons ---------------- */
.skeleton { background: linear-gradient(90deg, #eee 25%, #f5f5f5 37%, #eee 63%); background-size: 400% 100%; animation: shimmer 1.4s infinite; }
@keyframes shimmer { 0% { background-position: 100% 0; } 100% { background-position: 0 0; } }

.skeleton-card { background: #fff; border-radius: var(--radius-md); overflow: hidden; border: 1px solid var(--divider); }
.skeleton-card .img-wrap { aspect-ratio: 1/1; }
.skeleton-card .sk-line { height: 10px; margin: 8px 8px 0; border-radius: 4px; }
.skeleton-card .sk-line.short { width: 55%; margin-bottom: 8px; }

.chat-msg.typing { display: flex; gap: 4px; align-items: center; padding: 10px 14px; }
.chat-msg.typing span { width: 6px; height: 6px; border-radius: 50%; background: var(--gray); animation: typingDot 1.2s infinite; }
.chat-msg.typing span:nth-child(2) { animation-delay: 0.2s; }
.chat-msg.typing span:nth-child(3) { animation-delay: 0.4s; }
@keyframes typingDot { 0%, 60%, 100% { opacity: 0.3; transform: translateY(0); } 30% { opacity: 1; transform: translateY(-3px); } }

/* ---------------- Sticky bottom bar ---------------- */
.sticky-signin-bar {
  position: sticky;
  bottom: 0;
  background: #fff;
  border-top: 1px solid var(--divider);
  padding: 10px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 40;
}
.sticky-signin-bar span { font-size: 12.5px; font-weight: 600; }
@media (min-width: 1024px) { .sticky-signin-bar { display: none; } }

/* ---------------- Buttons ---------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-pill);
  padding: 12px 22px;
  font-weight: 700;
  font-size: 14px;
  border: none;
  text-align: center;
}
.btn-primary { background: var(--orange); color: #fff; }
.btn-outline { background: #fff; color: var(--black); border: 1.5px solid var(--black); }
.btn-block { width: 100%; }
.btn-sm { padding: 8px 14px; font-size: 12.5px; }

/* ---------------- Chat button + panel ---------------- */
.chat-fab {
  position: fixed;
  right: 16px;
  bottom: 76px;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: var(--orange);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 16px rgba(251,119,1,0.4);
  z-index: 90;
  border: none;
}
.chat-fab svg { width: 26px; height: 26px; }
@media (min-width: 1024px) { .chat-fab { bottom: 24px; } }

.chat-panel {
  position: fixed;
  z-index: 200;
  right: 0;
  bottom: 0;
  left: 0;
  top: 12%;
  background: #fff;
  border-radius: 18px 18px 0 0;
  display: flex;
  flex-direction: column;
  transform: translateY(110%);
  transition: transform 0.25s ease;
  box-shadow: 0 -8px 30px rgba(0,0,0,0.15);
}
.chat-panel.open { transform: translateY(0); }
@media (min-width: 1024px) {
  .chat-panel {
    left: auto;
    top: auto;
    bottom: 24px;
    right: 16px;
    width: 360px;
    height: 520px;
    border-radius: 16px;
  }
}
.chat-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px;
  border-bottom: 1px solid var(--divider);
}
.chat-header .avatar { width: 38px; height: 38px; border-radius: 50%; background: var(--peach); display: flex; align-items: center; justify-content: center; font-weight: 700; color: var(--orange); position: relative; }
.chat-header .status-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--green); position: absolute; right: -1px; bottom: -1px; border: 2px solid #fff; }
.chat-header .info strong { display: block; font-size: 14px; }
.chat-header .info span { font-size: 11px; color: var(--green); }
.chat-header .close-btn { margin-left: auto; background: none; border: none; font-size: 20px; color: var(--gray); }
.chat-header .chat-end-btn {
  margin-left: auto;
  background: none;
  border: 1px solid var(--divider);
  border-radius: 999px;
  padding: 5px 12px;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--red);
}
.chat-header .close-btn { margin-left: 8px; }
.chat-closed-banner {
  padding: 16px;
  text-align: center;
  border-bottom: 1px solid var(--divider);
}
.chat-closed-banner p { color: var(--gray); font-size: 12.5px; margin: 0 0 10px; }

.chat-body { flex: 1; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.chat-msg { max-width: 78%; padding: 9px 12px; border-radius: 14px; font-size: 13.5px; line-height: 1.4; }
.chat-msg.mine { align-self: flex-end; background: var(--orange); color: #fff; border-bottom-right-radius: 4px; }
.chat-msg.theirs { align-self: flex-start; background: var(--divider); color: var(--black); border-bottom-left-radius: 4px; }
.chat-msg .time { display: block; font-size: 10px; opacity: 0.7; margin-top: 4px; }

.chat-prestart { padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.chat-prestart input {
  border: 1px solid var(--divider);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 13.5px;
}

.chat-input-row { display: flex; gap: 8px; padding: 10px; border-top: 1px solid var(--divider); }
.chat-input-row input {
  flex: 1;
  border: 1px solid var(--divider);
  border-radius: var(--radius-pill);
  padding: 10px 14px;
  font-size: 13.5px;
  outline: none;
}
.chat-input-row button {
  background: var(--orange);
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
#chatAttachBtn, .agent-attach-btn {
  background: var(--divider);
  color: var(--gray);
}

.chat-reply-preview, .chat-attach-preview {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: #FAFAFA;
  border-top: 1px solid var(--divider);
  font-size: 12px;
}
.chat-reply-preview .crp-bar { width: 3px; align-self: stretch; background: var(--orange); border-radius: 2px; flex-shrink: 0; }
.chat-reply-preview .crp-content { flex: 1; min-width: 0; overflow: hidden; }
.chat-reply-preview .crp-content strong { display: block; font-size: 11.5px; color: var(--orange); }
.chat-reply-preview .crp-content span { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--gray); }
.chat-reply-preview button, .chat-attach-preview button { background: none; border: none; color: var(--gray); font-size: 16px; flex-shrink: 0; }
.chat-attach-preview span { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.chat-msg-reply-quote {
  border-left: 3px solid rgba(0,0,0,0.15);
  padding: 4px 8px;
  margin-bottom: 6px;
  border-radius: 4px;
  background: rgba(0,0,0,0.06);
  font-size: 11.5px;
  opacity: 0.9;
}
.chat-msg.mine .chat-msg-reply-quote { border-left-color: rgba(255,255,255,0.6); background: rgba(255,255,255,0.15); }
.chat-msg-reply-quote strong { display: block; font-size: 11px; }
.chat-msg-reply-quote span { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 220px; }
.chat-msg-attachment-image { max-width: 100%; border-radius: 10px; margin-bottom: 6px; display: block; }
.chat-msg-attachment-file {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(0,0,0,0.06);
  border-radius: 8px;
  padding: 8px 10px;
  margin-bottom: 6px;
  font-size: 12px;
  text-decoration: none;
  color: inherit;
}
.chat-msg.mine .chat-msg-attachment-file { background: rgba(255,255,255,0.15); }
.chat-msg-reply-btn {
  background: none;
  border: none;
  color: var(--gray);
  font-size: 10.5px;
  padding: 2px 0 0;
  cursor: pointer;
}
.chat-msg-wrap { display: flex; flex-direction: column; max-width: 78%; }
.chat-msg-wrap.mine { align-self: flex-end; align-items: flex-end; }
.chat-msg-wrap.theirs { align-self: flex-start; align-items: flex-start; }
.chat-msg-wrap .chat-msg { max-width: 100%; }

.chat-overlay-bg {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.35);
  z-index: 190;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}
.chat-overlay-bg.open { opacity: 1; pointer-events: auto; }

/* ---------------- Drawers / overlays (category, search, account) ---------------- */
.drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  z-index: 150;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}
.drawer-overlay.open { opacity: 1; pointer-events: auto; }

.drawer {
  position: fixed;
  top: 0;
  bottom: 0;
  width: 84%;
  max-width: 360px;
  background: #fff;
  z-index: 151;
  display: flex;
  transform: translateX(-105%);
  transition: transform 0.25s ease;
}
.drawer.open { transform: translateX(0); }
.drawer-left-nav {
  width: 96px;
  background: #F7F7F7;
  overflow-y: auto;
  flex-shrink: 0;
}
.drawer-left-nav .item { padding: 14px 10px; font-size: 12.5px; text-align: center; color: var(--gray); font-weight: 600; }
.drawer-left-nav .item.active { background: #fff; color: var(--orange); border-left: 3px solid var(--orange); }
.drawer-right { flex: 1; overflow-y: auto; padding: 14px; }
.drawer-right h4 { font-size: 13px; margin: 0 0 12px; }
.cat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.cat-grid .cat-item { text-align: center; font-size: 11.5px; font-weight: 600; }
.cat-grid .cat-circle { width: 100%; aspect-ratio: 1/1; border-radius: 50%; overflow: hidden; margin-bottom: 6px; position: relative; background: var(--divider); }
.cat-grid .cat-circle img { width: 100%; height: 100%; object-fit: cover; }
.cat-grid .hot-flag { position: absolute; top: -2px; right: -2px; background: var(--red); color: #fff; font-size: 8px; font-weight: 700; padding: 2px 5px; border-radius: 6px; }

.search-panel {
  position: fixed;
  inset: 0;
  background: #fff;
  z-index: 160;
  transform: translateY(100%);
  transition: transform 0.2s ease;
  display: flex;
  flex-direction: column;
}
.search-panel.open { transform: translateY(0); }
.search-panel-header { display: flex; align-items: center; gap: 10px; padding: 12px; border-bottom: 1px solid var(--divider); }
.search-panel-header .back-btn { background: none; border: none; font-size: 20px; }
.search-panel-body { padding: 14px; overflow-y: auto; }
.search-panel-body h4 { font-size: 13px; margin: 0 0 10px; }
.chip-row { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 12px; scrollbar-width: none; }
.chip-row::-webkit-scrollbar { display: none; }
.suggest-chip { flex-shrink: 0; display: flex; flex-direction: column; align-items: center; gap: 6px; width: 78px; }
.suggest-chip img { width: 60px; height: 60px; border-radius: 10px; object-fit: cover; }
.suggest-chip span { font-size: 11px; text-align: center; }

.account-panel {
  position: fixed;
  right: 0;
  top: 0;
  bottom: 0;
  width: 84%;
  max-width: 360px;
  background: #fff;
  z-index: 151;
  transform: translateX(105%);
  transition: transform 0.25s ease;
  overflow-y: auto;
  padding: 18px;
}
.account-panel.open { transform: translateX(0); }
.account-panel .signin-pill { margin: 10px 0 18px; }
.account-icons { display: flex; gap: 14px; margin-bottom: 18px; }
.account-icons .aitem { flex: 1; text-align: center; }
.account-icons .circle { width: 48px; height: 48px; border-radius: 50%; background: var(--black); color: #fff; display: flex; align-items: center; justify-content: center; margin: 0 auto 6px; }
.account-icons span { font-size: 10.5px; }
.account-list li { padding: 13px 0; border-bottom: 1px solid var(--divider); font-size: 13.5px; display: flex; justify-content: space-between; align-items: center; }
.account-list li .chev { color: var(--gray); }

/* ---------------- Cart page ---------------- */
.page-title { font-size: 18px; font-weight: 800; text-align: center; padding: 14px 0 6px; }
.cart-empty { display: flex; flex-direction: column; align-items: center; padding: 30px 20px; text-align: center; }
.cart-empty img { width: 140px; margin-bottom: 16px; opacity: 0.85; }
.cart-empty p { color: var(--gray); font-size: 13.5px; margin-bottom: 18px; }
.cart-empty .btn { margin-bottom: 10px; width: 220px; }
.badge-scroll { display: flex; gap: 18px; overflow-x: auto; padding: 16px; scrollbar-width: none; }
.badge-scroll::-webkit-scrollbar { display: none; }
.badge-item { flex-shrink: 0; text-align: center; width: 84px; font-size: 10.5px; color: var(--green); font-weight: 600; }
.badge-item .ico { width: 34px; height: 34px; border-radius: 50%; background: #E7F8EF; color: var(--green); display: flex; align-items: center; justify-content: center; margin: 0 auto 6px; }
.section-heading { font-size: 15px; font-weight: 800; padding: 16px 12px 4px; }

.cart-vendor-group { margin: 12px; border: 1px solid var(--divider); border-radius: var(--radius-md); overflow: hidden; }
.cart-vendor-group .vendor-head { padding: 10px 12px; font-weight: 700; font-size: 13px; background: #FAFAFA; border-bottom: 1px solid var(--divider); }
.cart-line { display: flex; gap: 10px; padding: 12px; border-bottom: 1px solid var(--divider); }
.cart-line:last-child { border-bottom: none; }
.cart-line img { width: 70px; height: 70px; border-radius: 10px; object-fit: cover; flex-shrink: 0; }
.cart-line .info { flex: 1; min-width: 0; }
.cart-line .info .name { font-size: 12.5px; margin-bottom: 6px; }
.cart-line .qty-row { display: flex; align-items: center; justify-content: space-between; }
.qty-stepper { display: flex; align-items: center; border: 1px solid var(--divider); border-radius: var(--radius-pill); }
.qty-stepper button { width: 26px; height: 26px; background: none; border: none; font-size: 15px; }
.qty-stepper span { width: 24px; text-align: center; font-size: 13px; }
.cart-summary { margin: 12px; padding: 14px; border: 1px solid var(--divider); border-radius: var(--radius-md); }
.cart-summary .row { display: flex; justify-content: space-between; font-size: 13px; margin-bottom: 8px; color: var(--gray); }
.cart-summary .row.total { color: var(--black); font-weight: 800; font-size: 15px; border-top: 1px solid var(--divider); padding-top: 10px; margin-top: 4px; }

/* ---------------- Auth pages ---------------- */
.auth-wrap { max-width: 420px; margin: 0 auto; padding: 30px 20px 60px; }
.auth-wrap .logo { display: block; text-align: center; margin-bottom: 6px; font-size: 26px; }
.auth-wrap h1 { font-size: 18px; text-align: center; margin: 0 0 22px; }
.form-group { margin-bottom: 14px; }
.form-group label { display: block; font-size: 12.5px; font-weight: 600; margin-bottom: 6px; }
.form-group input, .form-group select, .form-group textarea {
  width: 100%;
  border: 1px solid var(--divider);
  border-radius: 10px;
  padding: 11px 13px;
  font-size: 14px;
  outline: none;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus { border-color: var(--orange); }
.role-toggle { display: flex; gap: 10px; }
.role-toggle label { flex: 1; text-align: center; border: 1.5px solid var(--divider); border-radius: 10px; padding: 10px; font-size: 13px; font-weight: 600; cursor: pointer; }
.role-toggle input { display: none; }
.role-toggle input:checked + span { color: var(--orange); }
.role-toggle label:has(input:checked) { border-color: var(--orange); background: var(--peach); }
.auth-alt { text-align: center; font-size: 13px; margin-top: 16px; color: var(--gray); }
.auth-alt a { color: var(--orange); font-weight: 700; }
.form-error { background: #FEECEC; color: var(--red); font-size: 12.5px; padding: 10px 12px; border-radius: 8px; margin-bottom: 14px; }
.form-success { background: #E7F8EF; color: var(--green); font-size: 12.5px; padding: 10px 12px; border-radius: 8px; margin-bottom: 14px; }

/* ---------------- Agent inbox ---------------- */
.agent-wrap { display: flex; height: calc(100vh - var(--header-h)); }
.agent-sidebar { width: 280px; border-right: 1px solid var(--divider); overflow-y: auto; flex-shrink: 0; }
.agent-sidebar .sess-item { padding: 12px 14px; border-bottom: 1px solid var(--divider); cursor: pointer; }
.agent-sidebar .sess-item.active { background: var(--peach); }
.agent-sidebar .sess-item .name { font-weight: 700; font-size: 13.5px; display: flex; justify-content: space-between; }
.agent-sidebar .sess-item .preview { font-size: 12px; color: var(--gray); margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.unread-dot { background: var(--orange); color: #fff; font-size: 10px; border-radius: 999px; padding: 1px 6px; }
.agent-main { flex: 1; display: flex; flex-direction: column; }
.agent-empty { flex: 1; display: flex; align-items: center; justify-content: center; color: var(--gray); }
@media (max-width: 767px) {
  .agent-wrap { flex-direction: column; height: auto; }
  .agent-sidebar { width: 100%; max-height: 40vh; }
}

/* ---------------- Vendor dashboard ---------------- */
.vendor-wrap { display: flex; flex-direction: column; min-height: calc(100vh - var(--header-h)); }
.vendor-sidebar {
  width: 100%;
  border-bottom: 1px solid var(--divider);
  padding: 16px 14px;
  flex-shrink: 0;
}
.vendor-sidebar-head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.vendor-logo-circle {
  width: 42px; height: 42px; border-radius: 50%; background: var(--peach); color: var(--orange);
  display: flex; align-items: center; justify-content: center; font-weight: 800; overflow: hidden; flex-shrink: 0;
}
.vendor-logo-circle img { width: 100%; height: 100%; object-fit: cover; }
.vendor-sidebar-head strong { display: block; font-size: 14px; }
.vendor-type-badge {
  display: inline-block; margin-top: 2px; font-size: 10px; font-weight: 700; color: var(--orange);
  background: var(--peach); padding: 2px 8px; border-radius: 999px;
}
.vendor-nav-list { display: flex; overflow-x: auto; gap: 6px; scrollbar-width: none; }
.vendor-nav-list::-webkit-scrollbar { display: none; }
.vendor-nav-list a {
  flex-shrink: 0; padding: 8px 14px; border-radius: 999px; font-size: 12.5px; font-weight: 600;
  color: var(--black); background: var(--divider); white-space: nowrap;
}
.vendor-nav-list a.active { background: var(--black); color: #fff; }
.vendor-main { flex: 1; padding: 16px 14px 40px; }
@media (min-width: 1024px) {
  .vendor-wrap { flex-direction: row; }
  .vendor-sidebar { width: 240px; border-bottom: none; border-right: 1px solid var(--divider); flex-shrink: 0; }
  .vendor-nav-list { flex-direction: column; overflow: visible; }
  .vendor-nav-list a { display: block; }
  .vendor-main { padding: 24px 32px; }
}

.stat-cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-bottom: 20px; }
@media (min-width: 768px) { .stat-cards { grid-template-columns: repeat(4, 1fr); } }
.stat-card { border: 1px solid var(--divider); border-radius: var(--radius-md); padding: 14px; }
.stat-card .label { font-size: 11.5px; color: var(--gray); margin-bottom: 6px; }
.stat-card .value { font-size: 20px; font-weight: 800; }

.data-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.data-table th, .data-table td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--divider); vertical-align: middle; }
.data-table th { color: var(--gray); font-size: 11.5px; font-weight: 700; text-transform: uppercase; }
.data-table img { width: 42px; height: 42px; border-radius: 8px; object-fit: cover; }
.table-scroll { overflow-x: auto; }
.status-pill { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 11px; font-weight: 700; }
.status-pill.approved, .status-pill.paid, .status-pill.delivered { background: #E7F8EF; color: var(--green); }
.status-pill.pending, .status-pill.processing, .status-pill.return_requested { background: #FFF6E5; color: #B87500; }
.status-pill.shipped { background: #E5F1FF; color: #1E6FD9; }
.status-pill.suspended, .status-pill.cancelled, .status-pill.failed, .status-pill.returned, .status-pill.declined, .status-pill.rejected { background: #FEECEC; color: var(--red); }
.icon-btn-sm { border: 1px solid var(--divider); background: #fff; border-radius: 8px; padding: 5px 10px; font-size: 12px; font-weight: 600; }
.icon-btn-sm.danger { color: var(--red); border-color: #FBCFC2; }

/* ---------------- Product detail page ---------------- */
.pd-gallery-main { width: 100%; aspect-ratio: 1/1; border-radius: var(--radius-md); overflow: hidden; background: var(--divider); }
.pd-gallery-main img { width: 100%; height: 100%; object-fit: cover; }
.pd-thumbs { display: flex; gap: 8px; margin-top: 8px; overflow-x: auto; }
.pd-thumbs img { width: 60px; height: 60px; border-radius: 8px; object-fit: cover; border: 2px solid transparent; flex-shrink: 0; }
.pd-thumbs img.active { border-color: var(--orange); }
.pd-info { padding: 14px; }
.pd-info h1 { font-size: 17px; margin: 0 0 8px; }
.pd-price-row { display: flex; align-items: baseline; gap: 10px; margin-bottom: 6px; }
.pd-price-row .price { font-size: 24px; font-weight: 800; color: var(--red); }
.pd-price-row .price.no-discount { color: var(--black); }
.pd-price-row .was { font-size: 14px; color: var(--gray); text-decoration: line-through; }
.pd-price-row .pct { font-size: 12px; font-weight: 700; color: var(--red); background: #FEECEC; padding: 2px 8px; border-radius: 6px; }
.pd-meta { display: flex; align-items: center; gap: 10px; font-size: 12.5px; color: var(--gray); margin-bottom: 14px; }
.pd-vendor-strip { display: flex; align-items: center; gap: 10px; border: 1px solid var(--divider); border-radius: var(--radius-md); padding: 10px 12px; margin-bottom: 14px; }
.pd-vendor-strip img { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; }
.pd-vendor-strip .vinfo { flex: 1; min-width: 0; }
.pd-vendor-strip .vinfo strong { font-size: 13px; display: block; }
.pd-variant-picker { margin-bottom: 6px; }
.pd-option-group { margin-bottom: 12px; }
.pd-option-name { font-size: 12.5px; font-weight: 700; margin: 0 0 6px; }
.pd-option-values { display: flex; flex-wrap: wrap; gap: 8px; }
.pd-option-pill {
  border: 1.5px solid var(--divider);
  background: #fff;
  border-radius: 999px;
  padding: 7px 16px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--black);
}
.pd-option-pill.active { border-color: var(--orange); background: var(--peach); color: var(--orange); }
.pd-actions { display: flex; gap: 10px; margin-top: 14px; }
.pd-actions .btn { flex: 1; }
.pd-actions .btn:disabled { opacity: 0.5; }
.pd-desc { padding: 0 14px 14px; font-size: 13.5px; line-height: 1.6; color: #333; }
.review-item { padding: 12px 14px; border-bottom: 1px solid var(--divider); }
.review-item .rname { font-weight: 700; font-size: 13px; }
.review-item .rstars { color: var(--orange); font-size: 12px; margin: 3px 0; }
.review-item .rcomment { font-size: 13px; color: #333; }
@media (min-width: 1024px) {
  .pd-layout { display: flex; gap: 32px; padding: 24px 0; }
  .pd-layout .pd-gallery-col { flex: 1; max-width: 480px; }
  .pd-layout .pd-info-col { flex: 1; }
}

/* ---------------- Vendor store page ---------------- */
.store-banner { background: var(--peach); padding: 24px 16px; text-align: center; }
.store-banner .slogo { width: 72px; height: 72px; border-radius: 50%; object-fit: cover; margin: 0 auto 10px; border: 3px solid #fff; }
.store-banner h1 { font-size: 18px; margin: 0 0 4px; }
.store-banner p { font-size: 12.5px; color: #7A3E00; max-width: 480px; margin: 0 auto 12px; }

/* ---------------- Checkout / addresses ---------------- */
.address-card {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  border: 1.5px solid var(--divider);
  border-radius: var(--radius-md);
  padding: 12px;
  margin: 0 12px 10px;
  cursor: pointer;
}
.address-card.selected { border-color: var(--orange); background: var(--peach); }
.address-card input[type="radio"] { margin-top: 3px; accent-color: var(--orange); }
.address-card .a-name { font-weight: 700; font-size: 13.5px; }
.address-card .a-detail { font-size: 12.5px; color: var(--gray); margin-top: 2px; }
.new-address-form { margin: 0 12px; border: 1px dashed var(--divider); border-radius: var(--radius-md); padding: 14px; }
.checkout-vendor-block { margin: 12px; border: 1px solid var(--divider); border-radius: var(--radius-md); overflow: hidden; }
.checkout-vendor-block .vendor-head { padding: 10px 12px; font-weight: 700; font-size: 13px; background: #FAFAFA; border-bottom: 1px solid var(--divider); }
.checkout-line { display: flex; gap: 10px; padding: 10px 12px; border-bottom: 1px solid var(--divider); align-items: center; }
.checkout-line:last-child { border-bottom: none; }
.checkout-line img { width: 52px; height: 52px; border-radius: 8px; object-fit: cover; }
.checkout-line .info { flex: 1; font-size: 12.5px; }
.checkout-line .line-total { font-weight: 700; font-size: 13px; }

/* ---------------- Pay page ---------------- */
.pay-wrap { max-width: 480px; margin: 0 auto; padding: 24px 16px 60px; text-align: center; }
.pay-wrap .amount { font-size: 30px; font-weight: 800; margin: 6px 0 4px; }
.pay-wrap .ref { color: var(--gray); font-size: 12.5px; margin-bottom: 24px; }
.pay-note { background: #FFF6E5; color: #B87500; font-size: 12px; padding: 10px 12px; border-radius: 8px; margin-top: 16px; text-align: left; }

/* ---------------- Order confirmation / order lists ---------------- */
.confirm-hero { text-align: center; padding: 30px 20px 10px; }
.confirm-hero .check { font-size: 52px; color: var(--green); }
.order-card { border: 1px solid var(--divider); border-radius: var(--radius-md); margin: 12px; overflow: hidden; }
.order-card .oc-head { display: flex; justify-content: space-between; align-items: center; padding: 12px 14px; border-bottom: 1px solid var(--divider); }
.order-card .oc-head .ref { font-weight: 700; font-size: 13px; }
.order-card .oc-head .date { font-size: 11.5px; color: var(--gray); }
.order-track { display: flex; align-items: center; padding: 14px; gap: 4px; }
.order-track .step { flex: 1; text-align: center; font-size: 10.5px; color: var(--gray); position: relative; }
.order-track .step .dot { width: 20px; height: 20px; border-radius: 50%; background: var(--divider); color: #fff; display: flex; align-items: center; justify-content: center; margin: 0 auto 4px; font-size: 11px; }
.order-track .step.done .dot { background: var(--green); }
.order-track .step.current .dot { background: var(--orange); }

/* utility */
.text-center { text-align: center; }
.mt-16 { margin-top: 16px; }
.hidden { display: none !important; }
