/* ============================================================
   TAOBAO.COM — PIXEL-PERFECT HOMEPAGE CSS
   Exact match to taobao.com design
   ============================================================ */

@import url("https://fonts.googleapis.com/css2?family=Noto+Sans+SC:wght@300;400;500;700;900&display=swap");

/* ============================================================
   CSS VARIABLES (exact Taobao colors)
   ============================================================ */
:root {
  --primary: #ff5000;
  --primary-dark: #e64500;
  --tmall-red: #ff0036;
  --text-primary: #3c3c3c;
  --text-secondary: #666666;
  --text-muted: #9c9c9c;
  --bg-body: #f4f4f4;
  --bg-card: #ffffff;
  --border: #e5e5e5;
  --border-light: #f0f0f0;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 2px 8px rgba(0, 0, 0, 0.1);
  --shadow-hover: 0 4px 16px rgba(0, 0, 0, 0.14);
  --tb-primary: #ff5000;
  --tb-primary-dark: #e64500;
  --tb-primary-light: #ff6b35;
  --tb-tmall-red: #cc0000;
  --tb-bg-body: #f4f4f4;
  --tb-bg-card: #ffffff;
  --tb-bg-utility: #ffffff;
  --tb-text-primary: #333333;
  --tb-text-secondary: #666666;
  --tb-text-muted: #999999;
  --tb-border-color: #e5e5e5;
  --tb-border-light: #f0f0f0;
  --tb-shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
  --tb-shadow-md: 0 2px 8px rgba(0,0,0,0.12);
  --tb-shadow-hover: 0 4px 16px rgba(0,0,0,0.15);
  --tb-radius-sm: 4px;
  --tb-radius-md: 8px;
}


/* ============================================================
   RESET & BASE
   ============================================================ */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
html {
  overflow-x: hidden;
  scroll-behavior: smooth;
}
body {
  font-family:
    tahoma, arial, "Noto Sans SC", "Hiragino Sans GB", "宋体", sans-serif;
  font-size: 12px;
  color: var(--text-primary);
  background: var(--bg-body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a {
  text-decoration: none;
  color: inherit;
}
/* a:hover {
  color: var(--primary);
} */
img {
  max-width: 100%;
  display: block;
}
button {
  cursor: pointer;
  border: none;
  background: none;
  font-family: inherit;
}
ul {
  list-style: none;
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateX(-10px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@keyframes bounce {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-3px);
  }
}
@keyframes popIn {
  0% {
    transform: scale(0.8);
  }
  50% {
    transform: scale(1.2);
  }
  100% {
    transform: scale(1);
  }
}
@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

/* ============================================================
   UTILITY BAR  (top row, ~30px)
   ============================================================ */

.tb-utility-bar {
  background: var(--tb-bg-utility);
  border-bottom: 1px solid #e0e0e0;
  height: 30px;
  display: flex;
  align-items: center;
  font-size: 12px;
  color: var(--tb-text-secondary);
  position: relative;
  z-index: 9999;
}

.tb-utility-bar .tb-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.tb-utility-left,
.tb-utility-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.tb-utility-bar a {
  color: var(--tb-text-secondary);
  font-size: 12px;
  transition: color 0.2s;
  white-space: nowrap;
}

.tb-utility-bar a:hover { color: var(--tb-primary); }
.tb-utility-bar .tb-login-link { color: var(--tb-primary); font-weight: 500; }

.tb-divider { color: #ddd; margin: 0 2px; }

.tb-dropdown {
  position: relative;
  cursor: pointer;
  white-space: nowrap;
}

.tb-dropdown:hover .tb-dropdown-menu { display: block; }

.tb-dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  right: 0;
  background: #fff;
  border: 1px solid #e5e5e5;
  box-shadow: var(--tb-shadow-md);
  z-index: 999;
  min-width: 160px;
  border-radius: var(--tb-radius-sm);
  padding: 6px 0;
}

.tb-dropdown-menu a {
  display: block;
  padding: 6px 14px;
  font-size: 12px;
  color: var(--tb-text-primary);
  white-space: nowrap;
}

.tb-dropdown-menu a:hover {
  background: #fff8f5;
  color: var(--tb-primary);
}

/* ============================================================
   STICKY HEADER (appears on scroll)
   ============================================================ */
.tb-sticky-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: #fff;
  z-index: 600;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12);
  height: 48px;
  display: flex;
  align-items: center;
  padding: 0 16px;
  gap: 12px;
  transform: translateY(-100%);
  transition: transform 0.3s ease;
}
.tb-sticky-header.visible {
  transform: translateY(0);
}
.tb-sticky-logo {
  font-size: 22px;
  font-weight: 900;
  color: var(--primary);
  letter-spacing: -1px;
  flex-shrink: 0;
  font-family: "Noto Sans SC", sans-serif;
}
.tb-sticky-search {
  flex: 1;
  max-width: 600px;
  display: flex;
  height: 34px;
  border: 2px solid var(--primary);
  border-radius: 2px;
  overflow: hidden;
}
.tb-sticky-search input {
  flex: 1;
  min-width: 0;
  border: none;
  outline: none;
  padding: 0 12px;
  font-size: 13px;
}
.tb-sticky-search button {
  background: var(--primary);
  color: #fff;
  padding: 0 18px;
  font-size: 14px;
  font-weight: 600;
  border: none;
  white-space: nowrap;
}

/* ============================================================
   MAIN HEADER
   ============================================================ */
.tb-main-header {
  background: #fff;
  padding: 12px 0 8px;
  position: sticky;
  top: 0;
  z-index: 300;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
}
.tb-header-inner {
  max-width: 1190px;
  margin: 0 auto;
  padding: 0 10px;
  display: flex;
  align-items: center;
  gap: 18px;
}

/* Logo */
.tb-logo {
  flex-shrink: 0;
  cursor: pointer;
}
.tb-logo-text {
  color: var(--primary);
  font-size: 36px;
  font-weight: 900;
  font-family: "Noto Sans SC", sans-serif;
  line-height: 1;
  letter-spacing: -2px;
}
.tb-logo-sub {
  color: var(--primary);
  font-size: 10px;
  text-align: center;
  letter-spacing: 1px;
  margin-top: 2px;
}

/* Search area */
.tb-search-wrap {
  flex: 1;
  min-width: 0;
  max-width: 700px;
}
.tb-search-bar {
  display: flex;
  align-items: stretch;
  border: 2px solid var(--primary);
  border-radius: 2px;
  overflow: hidden;
  height: 40px;
}
.tb-search-type {
  display: flex;
  align-items: center;
  padding: 0 10px;
  background: #f9f9f9;
  border-right: 1px solid #e5e5e5;
  font-size: 13px;
  cursor: pointer;
  gap: 3px;
  color: var(--text-secondary);
  user-select: none;
  flex-shrink: 0;
  white-space: nowrap;
}
.tb-search-type:hover {
  background: #f0f0f0;
}
.tb-search-input {
  flex: 1;
  min-width: 0;
  border: none;
  outline: none;
  padding: 0 12px;
  font-size: 14px;
  font-family: inherit;
  color: var(--text-primary);
  background: #fff;
}
.tb-search-input::placeholder {
  color: #bbb;
}
.tb-search-btn {
  background: var(--primary);
  color: #000000;
  padding: 0 24px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  border: none;
  transition: opacity 0.2s;
  display: flex;
  align-items: center;
}
.tb-search-btn:hover {
  background: var(--primary-dark);
}
.tb-similar-btn {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 0 14px;
  font-size: 13px;
  color: var(--text-secondary);
  border: 1px solid var(--border);
  border-radius: 2px;
  margin-left: 8px;
  cursor: pointer;
  white-space: nowrap;
  background: #fff;
  height: 40px;
  transition: all 0.2s;
  flex-shrink: 0;
}
.tb-similar-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
}
.tb-hot-words {
  display: flex;
  flex-wrap: wrap;
  gap: 3px 12px;
  margin-top: 6px;
  font-size: 12px;
}
.tb-hot-words a {
  color: var(--text-secondary);
  transition: color 0.2s;
  white-space: nowrap;
}
.tb-hot-words a:first-child {
  color: var(--primary);
}
.tb-hot-words a:hover {
  color: var(--primary);
}

/* Promo card right of search */
.tb-header-promo {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, #fff8f0, #fff2e0);
  border: 1px solid #ffe0b2;
  border-radius: 6px;
  padding: 8px 14px;
  cursor: pointer;
  transition: box-shadow 0.2s;
  max-width: 190px;
}
.tb-header-promo:hover {
  box-shadow: 0 2px 8px rgba(255, 80, 0, 0.18);
}
.tb-promo-text-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--primary);
  white-space: nowrap;
}
.tb-promo-text-sub {
  font-size: 11px;
  color: #e65100;
  margin-top: 2px;
  white-space: nowrap;
}
.tb-promo-mascot {
  font-size: 30px;
  animation: bounce 2s infinite;
  flex-shrink: 0;
}

/* ============================================================
   NAVBAR
   ============================================================ */

.tb-nav-bar::-webkit-scrollbar {
  display: none;
}
.tb-nav-inner {
  max-width: 1190px;
  margin: 0 auto;
  padding: 0 10px;
  display: flex;
  align-items: center;
  height: 40px;
  gap: 0;
}
/* .tb-nav-cat-toggle {
  background: var(--primary);
  color: #fff;
  height: 100%;
  display: flex;
  align-items: center;
  padding: 0 16px;
  font-weight: 700;
  font-size: 15px;
  gap: 6px;
  flex-shrink: 0;
  cursor: pointer;
  white-space: nowrap;
} */
.tb-nav-links {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  white-space: nowrap;
}
.tb-nav-link {
  color: var(--text-primary);
  font-size: 14px;
  font-weight: 700;
  padding: 0 12px;
  height: 40px;
  display: flex;
  align-items: center;
  gap: 4px;
  transition: color 0.15s;
  white-space: nowrap;
  flex-shrink: 0;
}
.tb-nav-link:hover {
  color: var(--primary);
}
.tb-nav-link.tmall {
  color: var(--tmall-red);
}
.tb-nav-link.tmall:hover {
  color: #cc0000;
}
.tb-nav-link .tb-nav-icon {
  font-size: 14px;
}

/* ============================================================
   HERO LAYOUT (3-column)
   ============================================================ */
.tb-home-hero {
  max-width: 1190px;
  margin: 0 auto;
  padding: 10px 10px 0;
  display: flex;
  gap: 0;
}

/* ── LEFT: Category Sidebar ── */
.tb-cat-sidebar {
  width: 190px;
  flex-shrink: 0;
  background: rgba(255, 255, 255, 0.96);
  position: relative;
  z-index: 50;
}
.tb-cat-promo-row {
  padding: 8px 14px 6px;
  display: flex;
  gap: 10px;
  border-bottom: 1px solid #f5f5f5;
}
.tb-cat-promo-link {
  font-size: 12px;
  color: var(--primary);
  cursor: pointer;
  font-weight: 500;
}
.tb-cat-promo-link:hover {
  text-decoration: underline;
}
.tb-cat-sep {
  color: #ddd;
}

.tb-cat-list {
  padding: 2px 0;
}
.tb-cat-item {
  position: relative;
}
.tb-cat-link {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  font-size: 13px;
  color: var(--text-primary);
  cursor: pointer;
  transition:
    background 0.12s,
    color 0.12s;
  line-height: 1.4;
}
.tb-cat-link:hover,
.tb-cat-item:hover > .tb-cat-link {
  background: rgba(255, 80, 0, 0.07);
  color: var(--primary);
}
.tb-cat-name {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.tb-cat-arrow {
  font-size: 10px;
  color: #bbb;
  flex-shrink: 0;
}

/* Category Flyout */
.tb-cat-flyout {
  display: none;
  position: absolute;
  top: -2px;
  left: 100%;
  background: #fff;
  border: 1px solid #e0e0e0;
  box-shadow: 4px 4px 12px rgba(0, 0, 0, 0.12);
  min-width: 340px;
  max-width: 520px;
  padding: 16px 20px;
  z-index: 200;
  border-radius: 0 4px 4px 0;
  animation: slideIn 0.15s ease;
}
.tb-cat-item:hover .tb-cat-flyout {
  display: block;
}
.tb-flyout-header {
  font-weight: 700;
  font-size: 14px;
  color: var(--primary);
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid #f0f0f0;
}
.tb-flyout-links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 12px;
}
.tb-flyout-link {
  font-size: 13px;
  color: var(--text-secondary);
  padding: 3px 8px;
  border-radius: 2px;
  transition: all 0.15s;
  cursor: pointer;
}
.tb-flyout-link:hover {
  color: var(--primary);
  background: #fff8f5;
}

/* ── CENTER: Banner + sub-promo ── */
.tb-home-center {
  flex: 1;
  min-width: 0;
}
.tb-banner-row {
  display: flex;
  gap: 10px;
}

/* Banner carousel */
.tb-hero-banner {
  position: relative;
  flex: 1;
  min-height: 280px;
  background: #eee;
  border-radius: 4px;
  overflow: hidden;
}
.tb-banner-track {
  display: flex;
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  height: 100%;
}
.tb-banner-slide {
  min-width: 100%;
  height: 280px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.tb-banner-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.tb-banner-fallback {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 24px;
  text-align: center;
}
.tb-banner-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.3);
  color: #fff;
  border: none;
  width: 26px;
  height: 52px;
  cursor: pointer;
  z-index: 10;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition:
    opacity 0.2s,
    background 0.2s;
}
.tb-hero-banner:hover .tb-banner-nav {
  opacity: 1;
}
.tb-banner-nav:hover {
  background: rgba(0, 0, 0, 0.55);
}
.tb-banner-nav.prev {
  left: 0;
  border-radius: 0 3px 3px 0;
}
.tb-banner-nav.next {
  right: 0;
  border-radius: 3px 0 0 3px;
}
.tb-banner-dots {
  position: absolute;
  bottom: 8px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 5px;
  z-index: 10;
}
.tb-banner-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.55);
  cursor: pointer;
  transition: all 0.3s;
  border: none;
  padding: 0;
}
.tb-banner-dot.active {
  background: #fff;
  width: 16px;
  border-radius: 3px;
}

/* Sub-promo panels (right of banner) */
.tb-side-panels {
  width: 270px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
}
.tb-side-panel {
  flex: 1;
  background: #fff;
  padding: 10px 12px;
  overflow: hidden;
  border: 1px solid #f0f0f0;
  border-radius: 4px;
  margin-bottom: 6px;
  cursor: pointer;
  transition: box-shadow 0.2s;
}
.tb-side-panel:last-child {
  margin-bottom: 0;
}
.tb-side-panel:hover {
  box-shadow: var(--shadow-md);
}
.tb-side-panel-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
}
.tb-side-panel-sub {
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 6px;
}
.tb-side-panel-body a {
  display: block;
  font-size: 12px;
  color: var(--text-secondary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin-bottom: 5px;
  line-height: 1.5;
}
.tb-side-panel-body a:hover {
  color: var(--primary);
}
.tb-live-preview {
  height: 60px;
  background: linear-gradient(135deg, #ffe0d0, #fff0e5);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  margin-bottom: 4px;
  position: relative;
}
.tb-live-badge {
  position: absolute;
  top: 4px;
  left: 4px;
  background: var(--primary);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 2px;
}

/* ── RIGHT: User Widget ── */
.tb-user-widget {
  width: 190px;
  flex-shrink: 0;
  background: #fff;
  border: 1px solid #f0f0f0;
  border-radius: 4px;
  overflow: hidden;
  font-size: 12px;
  display: flex;
  flex-direction: column;
  margin-left: 10px;
}
.tb-user-top {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 12px 10px 8px;
  background: linear-gradient(135deg, #fff8f5, #fff);
  border-bottom: 1px solid #f0f0f0;
}
.tb-user-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ffd700, #ff9800);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  margin-bottom: 6px;
}
.tb-user-greeting {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 2px;
}
.tb-user-sub {
  font-size: 11px;
  color: var(--text-secondary);
  margin-bottom: 8px;
  text-align: center;
}
.tb-user-desc {
  font-size: 11px;
  color: var(--text-muted);
  text-align: center;
  margin-bottom: 8px;
}
.tb-btn-login {
  width: 100%;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 3px;
  padding: 8px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s;
  margin-bottom: 4px;
}
.tb-btn-login:hover {
  background: var(--primary-dark);
}
.tb-user-stats {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1fr;
  border-top: 1px solid #f0f0f0;
}
.tb-stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 6px 2px;
  font-size: 10px;
  color: var(--text-secondary);
  border-right: 1px solid #f0f0f0;
  cursor: pointer;
  transition: color 0.15s;
  text-align: center;
}
.tb-stat-item:last-child {
  border-right: none;
}
.tb-stat-item:hover {
  color: var(--primary);
}
.tb-stat-icon {
  font-size: 16px;
  margin-bottom: 2px;
}
.tb-notice {
  padding: 8px 10px;
  border-top: 1px solid #f0f0f0;
}
.tb-notice-title {
  font-size: 12px;
  color: var(--text-primary);
  font-weight: 500;
  margin-bottom: 4px;
}
.tb-notice-list a {
  display: block;
  font-size: 11px;
  color: var(--text-secondary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin-bottom: 3px;
}
.tb-notice-list a:hover {
  color: var(--primary);
}
.tb-coins-promo {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 8px 10px;
  padding: 8px 10px;
  background: #fff8f5;
  border-radius: 6px;
  border: 1px solid #ffe0d0;
}
.tb-coins-left {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.tb-coins-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-primary);
}
.tb-coins-sub {
  font-size: 11px;
  color: var(--text-muted);
}
.tb-coins-btn {
  margin-top: 4px;
  background: var(--primary);
  color: #fff;
  border: none;
  padding: 3px 10px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 500;
  cursor: pointer;
}
.tb-coins-btn:hover {
  background: var(--primary-dark);
}
.tb-coin-circle {
  width: 42px;
  height: 42px;
  background: #ffd900;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 3px 8px rgba(255, 217, 0, 0.45);
  position: relative;
  flex-shrink: 0;
}
.tb-coin-char {
  color: #fff;
  font-size: 20px;
  font-weight: 900;
}
.tb-coin-badge {
  position: absolute;
  top: -6px;
  right: -6px;
  background: var(--primary);
  color: #fff;
  font-size: 9px;
  padding: 1px 4px;
  border-radius: 3px;
  font-weight: 700;
}

/* ============================================================
   PROMO SECTION (4-col below hero)
   ============================================================ */
.tb-promo-section {
  max-width: 1190px;
  margin: 10px auto 0;
  padding: 0 10px;
}
.tb-promo-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}
.tb-promo-card {
  background: #fff;
  border-radius: 6px;
  overflow: hidden;
  cursor: pointer;
  transition:
    box-shadow 0.2s,
    transform 0.15s;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
  border: 1px solid #f0f0f0;
}
.tb-promo-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transform: translateY(-2px);
}
.tb-promo-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px 6px;
}
.tb-promo-card-title {
  font-size: 14px;
  font-weight: 700;
  color: #222;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.tb-promo-card-right {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}
.tb-promo-badge {
  font-size: 10px;
  font-weight: 700;
  padding: 0 5px;
  border-radius: 2px;
  line-height: 18px;
  color: #fff;
  background: var(--primary);
  white-space: nowrap;
}
.tb-promo-badge.new {
  background: #ff4d4f;
}
.tb-promo-badge.green {
  background: #52c41a;
}
.tb-promo-badge.purple {
  background: #722ed1;
}
.tb-promo-badge.blue {
  background: #1677ff;
}
.tb-promo-more {
  font-size: 11px;
  color: #999;
  transition: color 0.2s;
  white-space: nowrap;
}
.tb-promo-more:hover {
  color: var(--primary);
}

.tb-promo-products {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 5px;
  padding: 0 10px 10px;
}
.tb-promo-product {
  text-align: center;
  border-radius: 4px;
  padding: 4px;
  transition: background 0.15s;
}
.tb-promo-product:hover {
  background: #f5f5f5;
}
.tb-promo-product img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 3px;
  background: #f5f5f5;
}
.tb-promo-product-price {
  font-size: 12px;
  color: var(--primary);
  font-weight: 700;
  margin-top: 2px;
}

.tb-promo-live-img {
  width: calc(100% - 20px);
  height: 70px;
  object-fit: cover;
  border-radius: 3px;
  margin: 0 10px;
}
.tb-promo-live-label {
  padding: 5px 12px 8px;
  font-size: 12px;
  font-weight: 600;
  color: #e02d2d;
  text-align: center;
}

.tb-promo-single {
  padding: 6px 10px 10px;
  display: flex;
  gap: 8px;
  align-items: center;
}
.tb-promo-single img {
  width: 60px;
  height: 60px;
  object-fit: cover;
  border-radius: 5px;
  flex-shrink: 0;
  border: 1px solid #eee;
}
.tb-promo-single-info {
  flex: 1;
  min-width: 0;
}
.tb-promo-single-name {
  font-size: 12px;
  color: #333;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin-bottom: 4px;
}
.tb-promo-single-price {
  font-size: 17px;
  font-weight: 700;
  color: var(--primary);
}
.tb-promo-single-price small {
  font-size: 12px;
}

/* ============================================================
   PRODUCT FEED (Guess You Like)
   ============================================================ */
.tb-feed-area {
  max-width: 1190px;
  margin: 0 auto;
  padding: 0 10px;
}
.tb-product-feed {
  margin-top: 14px;
  background: #fff;
  border-radius: 4px;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

/* Feed header / tabs */
.tb-feed-header {
  display: flex;
  align-items: center;
  padding: 12px 16px 8px;
  border-bottom: 1px solid #f0f0f0;
  gap: 10px;
  overflow-x: auto;
  scrollbar-width: none;
}
.tb-feed-header::-webkit-scrollbar {
  display: none;
}

.tb-feed-title {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 17px;
  font-weight: 700;
  color: #333;
  white-space: nowrap;
  flex-shrink: 0;
}
.tb-feed-title-icon {
  color: var(--primary);
  font-size: 16px;
}

.tb-feed-tabs {
  display: flex;
  align-items: center;
  gap: 0;
  flex: 1;
  overflow-x: auto;
  scrollbar-width: none;
}
.tb-feed-tabs::-webkit-scrollbar {
  display: none;
}
.tb-feed-tab {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px 12px 6px;
  font-size: 13px;
  color: #666;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  font-family: inherit;
  background: none;
  border-top: none;
  border-left: none;
  border-right: none;
  transition: color 0.15s;
}
.tb-feed-tab:hover {
  color: var(--primary);
}
.tb-feed-tab.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
  font-weight: 700;
}
.tb-feed-tab-icon {
  font-size: 14px;
}

.tb-feed-refresh {
  margin-left: auto;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  color: #999;
  cursor: pointer;
  padding: 3px 10px;
  border-radius: 14px;
  border: 1px solid #e5e5e5;
  background: #fafafa;
  font-family: inherit;
  white-space: nowrap;
  transition: all 0.2s;
}
.tb-feed-refresh:hover {
  color: var(--primary);
  border-color: var(--primary);
  background: #fff8f5;
}
.tb-refresh-icon {
  display: inline-block;
  font-size: 13px;
}

/* Product Grid — 6 columns (Taobao style) */
.tb-product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
  padding: 16px 16px 8px;
}

.tb-product-card {
  background: #fff;
  cursor: pointer;
  position: relative;
  animation: tb-fadeIn 0.3s ease both;
}

.tb-product-img-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  overflow: hidden;
  background: #f8f8f8;
  border-radius: 12px;
  transition: box-shadow 0.2s;
}

.tb-product-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 12px;
  transition: opacity 0.3s ease, transform 0.4s ease;
}

.tb-product-img-wrap:hover .tb-product-img {
  opacity: 0.85;
  transform: scale(1.02);
}

.tb-product-img-wrap:hover { box-shadow: 0 4px 12px rgba(0,0,0,0.1); }

.tb-product-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 40px;
  background: linear-gradient(135deg, #f5f5f5, #ececec);
  border-radius: 12px;
}

.tb-product-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 500;
  z-index: 2;
}

.tb-product-badge.tmall { background: #cc0000; color: #fff; }
.tb-product-badge.guarantee { background: var(--tb-primary); color: #fff; }

.tb-product-hover-overlay {
  position: absolute;
  inset: 0;
  background: rgba(255,80,0,0.08);
  opacity: 0;
  transition: opacity 0.2s;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: 12px;
  border-radius: 12px;
}

.tb-product-img-wrap:hover .tb-product-hover-overlay { opacity: 1; }

.tb-quick-buy-btn {
  background: var(--tb-primary);
  color: #fff;
  border: none;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 12px;
  cursor: pointer;
  transition: background 0.2s;
}

.tb-quick-buy-btn:hover { background: var(--tb-primary-dark); }

.tb-product-info { padding: 7px 4px; }

.tb-product-title {
  font-size: 13px;
  color: var(--tb-text-primary);
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  word-break: break-word;
  margin-bottom: 5px;
  font-weight: 600;
}

.tb-tmall-label {
  display: inline-block;
  background: #cc0000;
  color: #fff;
  font-size: 9px;
  padding: 1px 4px;
  border-radius: 2px;
  vertical-align: middle;
  margin-right: 3px;
  font-weight: 600;
}

.tb-price-row {
  display: flex;
  align-items: baseline;
  gap: 5px;
  margin: 8px 0;
  flex-wrap: wrap;
}

.tb-product-price {
  font-size: 16px;
  font-weight: 700;
  color: var(--tb-primary);
  line-height: 1;
}

.tb-product-price .currency { font-size: 11px; }

.tb-original-price {
  font-size: 11px;
  color: var(--tb-text-muted);
  text-decoration: line-through;
}

.tb-product-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 10px;
  color: var(--tb-text-muted);
}

.tb-product-shop {
  display: flex;
  align-items: center;
  gap: 2px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  max-width: 58%;
}

.tb-product-sales { white-space: nowrap; }

.tb-load-more-wrap {
  text-align: center;
  padding: 18px 0 24px;
  border-top: 1px solid #f0f0f0;
}

.tb-load-more-btn {
  background: #f5f5f5;
  border: none;
  color: #666;
  padding: 8px 36px;
  border-radius: 20px;
  font-size: 13px;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.2s;
}

.tb-load-more-btn:hover {
  background: var(--tb-primary);
  color: #fff;
}

/* ============================================================
   FOOTER
   ============================================================ */
.tb-footer {
  background: #fff;
  border-top: 1px solid #e5e5e5;
  margin-top: 20px;
}
.tb-footer-container {
  max-width: 1190px;
  margin: 0 auto;
  padding: 0 10px;
}

.tb-footer-guarantees {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-around;
  gap: 16px 24px;
  padding: 14px 0 18px;
  border-bottom: 1px solid #f0f0f0;
}
.tb-guarantee-item {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 180px;
  flex: 1 0 auto;
}
.tb-guarantee-icon {
  font-size: 26px;
  color: var(--primary);
  flex-shrink: 0;
}
.tb-guarantee-text strong {
  font-size: 13px;
  color: #333;
  font-weight: 600;
  display: block;
}
.tb-guarantee-text span {
  font-size: 12px;
  color: #999;
}

.tb-footer-links {
  padding: 14px 0 20px;
  background: #f8f8f8;
}
.tb-footer-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px 14px;
  margin-bottom: 12px;
}
.tb-footer-nav a {
  color: #666;
  font-size: 12px;
  transition: color 0.15s;
  white-space: nowrap;
}
.tb-footer-nav a:hover {
  color: var(--primary);
}
.tb-footer-family {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px 10px;
  align-items: center;
  padding: 8px 0;
  border-top: 1px solid #eee;
  border-bottom: 1px solid #eee;
}
.tb-footer-family span {
  font-weight: 700;
  color: #333;
  font-size: 12px;
}
.tb-footer-family a {
  color: #999;
  font-size: 11px;
  transition: color 0.15s;
}
.tb-footer-family a:hover {
  color: var(--primary);
}
.tb-footer-legal {
  color: #999;
  font-size: 11px;
  text-align: center;
  padding: 10px 0 6px;
  line-height: 1.8;
}
.tb-footer-legal p {
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2px 16px;
}
.tb-footer-copyright {
  font-weight: 500;
  color: #666;
  margin-top: 4px;
}

/* ============================================================
   MOBILE CATEGORY BAR
   ============================================================ */
.tb-mobile-cat-bar {
  display: none;
  overflow-x: auto;
  padding: 8px 10px;
  gap: 12px;
  background: #fff;
  border-bottom: 1px solid #f0f0f0;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.tb-mobile-cat-bar::-webkit-scrollbar {
  display: none;
}
.tb-mobile-cat-chip {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
  color: var(--text-primary);
  font-size: 11px;
  cursor: pointer;
}
.tb-mobile-cat-chip-icon {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: #fff8f5;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  border: 1px solid #ffe0d0;
  transition: background 0.15s;
}
.tb-mobile-cat-chip:hover .tb-mobile-cat-chip-icon {
  background: #ffd0b5;
}

/* ============================================================
   MOBILE BOTTOM TAB BAR
   ============================================================ */
.tb-mobile-tabbar {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 56px;
  background: #fff;
  border-top: 1px solid #e5e5e5;
  z-index: 700;
  box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.06);
  padding-bottom: env(safe-area-inset-bottom);
}
.tb-tab-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.15s;
  cursor: pointer;
  padding: 4px 0;
}
.tb-tab-icon {
  font-size: 20px;
  margin-bottom: 2px;
  line-height: 1;
}
.tb-tab-label {
  font-size: 10px;
  font-weight: 500;
}
.tb-tab-item.active {
  color: var(--primary);
}
.tb-tab-item.active .tb-tab-icon {
  animation: popIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* ============================================================
   RESPONSIVE — TABLET (768–1199px)
   ============================================================ */
@media (max-width: 1199px) {
  .tb-cat-sidebar {
    width: 160px;
  }
  .tb-cat-flyout {
    min-width: 280px;
  }
  .tb-user-widget {
    width: 170px;
  }
  .tb-side-panels {
    width: 240px;
  }
  .tb-product-grid {
    grid-template-columns: repeat(4, 1fr);
  }
  .tb-promo-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }
  .tb-header-promo {
    display: none;
  }
  .tb-similar-btn {
    display: none;
  }
}
@media (max-width: 1023px) {
  .tb-product-grid {
    grid-template-columns: repeat(4, 1fr);
  }
  .tb-user-widget {
    display: none;
  }
  .tb-side-panels {
    width: 200px;
  }
}

/* ============================================================
   RESPONSIVE — MOBILE (<768px)
   ============================================================ */
@media (max-width: 767px) {
  body {
    padding-bottom: 56px;
  }

  /* hide desktop-only elements */
  .tb-utility-bar {
    display: none;
  }
  .tb-header-promo {
    display: none;
  }
  .tb-similar-btn {
    display: none;
  }
  .tb-search-type {
    display: none;
  }
  .tb-hot-words {
    display: none;
  }
  .tb-nav-bar {
    display: none;
  }
  .tb-cat-sidebar {
    display: none;
  }
  .tb-side-panels {
    display: none;
  }
  .tb-user-widget {
    display: none;
  }
  .tb-float-sidebar {
    display: none;
  }

  /* main header mobile */
  .tb-main-header {
    padding: 8px 0;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
  }
  .tb-header-inner {
    gap: 8px;
    padding: 0 8px;
    flex-wrap: nowrap;
  }
  .tb-logo-text {
    font-size: 26px;
  }
  .tb-logo-sub {
    display: none;
  }
  .tb-search-bar {
    height: 36px;
  }
  .tb-search-input {
    font-size: 13px;
  }
  .tb-search-btn {
    padding: 0 14px;
    font-size: 14px;
  }

  /* sticky header */
  .tb-sticky-header {
    height: 48px;
    padding: 0 10px;
  }
  .tb-sticky-logo {
    font-size: 18px;
  }
  .tb-sticky-search {
    max-width: none;
  }

  /* mobile category chips */
  .tb-mobile-cat-bar {
    display: flex;
  }

  /* hero */
  .tb-home-hero {
    padding: 0;
    flex-direction: column;
  }
  .tb-banner-row {
    flex-direction: column;
  }
  .tb-hero-banner {
    min-height: 190px;
    border-radius: 0;
  }
  .tb-banner-slide {
    height: 190px;
  }
  .tb-banner-nav {
    opacity: 1;
    width: 22px;
    height: 40px;
    font-size: 15px;
  }

  /* promo */
  .tb-promo-section {
    padding: 0 6px;
    margin-top: 8px;
  }
  .tb-promo-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 6px;
  }
  .tb-promo-card-title {
    font-size: 13px;
  }
  .tb-promo-card-head {
    padding: 8px 8px 4px;
  }
  .tb-promo-products {
    gap: 4px;
    padding: 0 6px 6px;
  }
  .tb-promo-product-price {
    font-size: 11px;
  }
  .tb-promo-live-img {
    height: 55px;
  }
  .tb-promo-single {
    padding: 4px 6px 8px;
    gap: 6px;
  }
  .tb-promo-single img {
    width: 50px;
    height: 50px;
  }
  .tb-promo-single-price {
    font-size: 15px;
  }

  /* feed */
  .tb-feed-area {
    padding: 0;
  }
  .tb-product-feed {
    margin-top: 6px;
    border-radius: 0;
  }
  .tb-feed-header {
    padding: 8px 10px 6px;
    gap: 6px;
  }
  .tb-feed-title {
    font-size: 14px;
  }
  .tb-feed-tab {
    font-size: 12px;
    padding: 3px 8px 5px;
  }
  .tb-feed-tabs {
    gap: 0;
  }
  .tb-feed-refresh {
    border-radius: 50%;
    padding: 4px;
    width: 26px;
    height: 26px;
    justify-content: center;
    border: 1px solid #e5e5e5;
  }
  .tb-feed-refresh .tb-refresh-label {
    display: none;
  }

  /* product grid 2-col on mobile */
  .tb-product-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .tb-product-title {
    font-size: 12px;
  }
  .tb-product-price {
    font-size: 14px;
  }
  .tb-product-info {
    padding: 6px 8px 8px;
  }
  .tb-load-more-btn {
    padding: 6px 22px;
    font-size: 12px;
  }

  /* footer */
  .tb-footer-guarantees {
    flex-direction: column;
    gap: 10px;
    padding: 10px 0 14px;
  }
  .tb-footer-nav {
    gap: 3px 10px;
  }
  .tb-footer-nav a {
    font-size: 11px;
  }

  /* show mobile tab bar */
  .tb-mobile-tabbar {
    display: flex;
  }
}

/* ============================================================
   EXTRA SMALL (<480px)
   ============================================================ */
@media (max-width: 479px) {
  .tb-banner-slide {
    height: 165px;
  }
  .tb-hero-banner {
    min-height: 165px;
  }
  .tb-promo-badge {
    display: none;
  }
  .tb-product-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ── Floating Sidebar (right edge) ── */
.tb-float-sidebar {
  position: fixed !important;
  right: 0px !important;
  bottom: 190px !important;
  z-index: 9999 !important;
  visibility: hidden !important;
  opacity: 0 !important;
  transition:
    visibility 0.3s ease,
    opacity 0.3s ease !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 8px !important;
  background: #ffffff !important;
  padding: 10px;
  border-radius: 40px;
}
.tb-float-sidebar.visible {
  visibility: visible !important;
  opacity: 1 !important;
}

.tb-float-btn {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  width: 35px !important;
  height: 35px !important;
  background: #fff !important;
  border: 1px solid #e5e5e5 !important;
  border-radius: 50% !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12) !important;
  cursor: pointer !important;
  font-size: 12px !important;
  color: #333 !important;
  transition: box-shadow 0.2s ease !important;
  padding: 0 !important;
}
.tb-float-btn:hover {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.18) !important;
}
.tb-float-icon {
  font-size: 15px !important;
  line-height: 1 !important;
  margin-bottom: 2px !important;
}
.tb-float-btn span:last-child {
  font-size: 14px !important;
  line-height: 1 !important;
}
.tb-back-top {
  background: #ff5000 !important;
  color: #fff !important;
  border-color: #ff5000 !important;
}
.tb-float-btn {
  position: relative;
}

.tb-tooltip-text {
  position: absolute;
  right: calc(100% + 12px);
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.8);
  color: #fff;
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 12px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
  visibility: hidden;
}

.tb-float-btn:hover .tb-tooltip-text {
  opacity: 1;
  visibility: visible;
}

/* ============================================================
   ADDITIONAL HEADER STYLES (Font Awesome integration)
   - Add this at the VERY END of your home.css file
   ============================================================ */

/* Utility bar icons */
.tb-utility-bar .fas,
.tb-utility-bar .far,
.tb-utility-bar .fab {
    font-size: 12px;
    margin-right: 2px;
    width: 14px;
    text-align: center;
}

.tb-utility-bar .tb-dropdown .fas.fa-chevron-down {
    font-size: 9px !important;
    margin-left: 4px !important;
}

/* Dropdown menu icons */
.tb-dropdown-menu .fas,
.tb-dropdown-menu .far,
.tb-dropdown-menu .fab {
    width: 16px;
    text-align: center;
    margin-right: 8px;
    font-size: 12px;
    color: #999;
}

.tb-dropdown-menu a:hover .fas,
.tb-dropdown-menu a:hover .far,
.tb-dropdown-menu a:hover .fab {
    color: var(--primary);
}

/* Cart badge */
.tb-cart-badge {
    display: inline-block;
    background: #ff5000;
    color: #fff;
    border-radius: 50%;
    padding: 0 5px;
    font-size: 10px;
    font-weight: 700;
    line-height: 16px;
    min-width: 16px;
    text-align: center;
    margin-left: 2px;
}

/* Sticky header icons */
.tb-sticky-search .fas {
    font-size: 14px;
}

/* Main header search */
.tb-search-type .fas.fa-chevron-down {
    font-size: 9px;
    margin-left: 4px;
}

.tb-search-btn .fas {
    margin-right: 6px;
}

.tb-similar-btn .fas {
    margin-right: 4px;
}

.tb-promo-text-title .fas {
    margin-right: 4px;
}

/* Navbar icons */
.tb-nav-cat-toggle .fas {
    margin-right: 6px;
}

.tb-nav-icon {
    font-size: 14px !important;
}

/* Mobile category chips */
.tb-mobile-cat-chip-icon .fas {
    font-size: 18px;
    color: #666;
}

/* Cart dropdown positioning */
.tb-cart-dropdown {
    position: relative;
}

.tb-cart-dropdown .tb-dropdown-menu {
    right: 0;
    left: auto;
}

.tb-cart-link {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    color: var(--text-secondary);
    text-decoration: none;
}

.tb-cart-link:hover {
    color: var(--primary);
}

/* Responsive adjustments */
@media (max-width: 767px) {
    .tb-search-btn .fas {
        margin-right: 0;
    }
    
    .tb-search-btn {
        padding: 0 12px !important;
    }
    
    .tb-utility-bar .fas,
    .tb-utility-bar .far,
    .tb-utility-bar .fab {
        font-size: 11px;
    }
}

/* Ensure Font Awesome doesn't conflict with existing styles */
.fa,
.fas,
.far,
.fal,
.fab,
.fa-solid,
.fa-regular,
.fa-light,
.fa-brands {
    font-family: "Font Awesome 6 Free" !important;
}

.fa-brands,
.fab {
    font-family: "Font Awesome 6 Brands" !important;
}

