/* =====================================================
   GlobalB2B Wholesale — Frontend Styles
   Design tokens + component styles for the storefront.
   ===================================================== */

/* ---------- Reset ---------- */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* ---------- Design Tokens ---------- */
:root {
  /* Brand colors */
  --blue: #1d4ed8;
  --blue-dark: #0f172a;
  --blue-light: #eff6ff;
  --orange: #f97316;
  --green: #16a34a;
  --red: #dc2626;

  /* Neutral colors */
  --text: #1e293b;
  --text-heading: #0f172a;
  --muted: #64748b;
  --line: #e2e8f0;
  --bg: #f8fafc;
  --surface: #ffffff;

  /* Spacing scale */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 12px;
  --space-lg: 16px;
  --space-xl: 20px;
  --space-2xl: 24px;
  --space-3xl: 32px;
  --space-4xl: 40px;
  --space-5xl: 60px;

  /* Typography scale */
  --font-size-xs: 12px;
  --font-size-sm: 13px;
  --font-size-md: 14px;
  --font-size-base: 15px;
  --font-size-lg: 17px;
  --font-size-xl: 20px;
  --font-size-2xl: 24px;
  --font-size-3xl: 30px;
  --font-size-4xl: 36px;

  --font-weight-normal: 400;
  --font-weight-medium: 500;
  --font-weight-semibold: 600;
  --font-weight-bold: 700;
  --font-weight-extrabold: 800;

  /* Radius scale */
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 14px;
  --radius-2xl: 16px;
  --radius-full: 9999px;

  /* Shadow scale */
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.05);
  --shadow-md: 0 4px 12px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 10px 30px rgba(15, 23, 42, 0.12);
  --shadow-xl: 0 20px 50px rgba(15, 23, 42, 0.18);

  /* Layout */
  --container-max-width: 1200px;
  --header-height: 70px;
}

/* ---------- Base ---------- */
html {
  scroll-behavior: smooth;
}

body {
  font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  font-size: var(--font-size-base);
  line-height: 1.6;
  color: var(--text);
  background-color: var(--surface);
}

a {
  text-decoration: none;
  color: inherit;
}

img {
  max-width: 100%;
  display: block;
}

button {
  cursor: pointer;
  font-family: inherit;
}

input,
select,
textarea {
  font-family: inherit;
  font-size: var(--font-size-md);
  padding: 10px var(--space-md);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  width: 100%;
  outline: none;
  background-color: var(--surface);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(29, 78, 216, 0.12);
}

/* ---------- Layout ---------- */
.container {
  max-width: var(--container-max-width);
  margin: 0 auto;
  padding: 0 var(--space-xl);
}

/* ---------- Utility classes ---------- */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-muted { font-size: var(--font-size-sm); color: var(--muted); }
.text-sm { font-size: var(--font-size-sm); }
.text-xs { font-size: var(--font-size-xs); }
.w-full { width: 100%; }
.flex { display: flex; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.flex-wrap { flex-wrap: wrap; }
.gap-sm { gap: var(--space-sm); }
.gap-md { gap: var(--space-md); }
.gap-lg { gap: var(--space-lg); }
.mt-sm { margin-top: var(--space-sm); }
.mt-md { margin-top: var(--space-md); }
.mt-lg { margin-top: var(--space-lg); }
.mt-xl { margin-top: var(--space-xl); }
.mt-2xl { margin-top: var(--space-2xl); }
.mb-sm { margin-bottom: var(--space-sm); }
.mb-md { margin-bottom: var(--space-md); }
.mb-lg { margin-bottom: var(--space-lg); }
.mb-xl { margin-bottom: var(--space-xl); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: 10px 22px;
  border-radius: var(--radius-md);
  border: none;
  font-size: var(--font-size-md);
  font-weight: var(--font-weight-semibold);
  transition: background-color 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background-color: var(--blue);
  color: #fff;
}

.btn-primary:hover {
  background-color: #1e40af;
  box-shadow: var(--shadow-md);
}

.btn-orange {
  background-color: var(--orange);
  color: #fff;
}

.btn-orange:hover {
  background-color: #ea580c;
  box-shadow: var(--shadow-md);
}

.btn-outline {
  background-color: var(--surface);
  color: var(--blue);
  border: 1.5px solid var(--blue);
}

.btn-outline:hover {
  background-color: var(--blue-light);
}

.btn-green {
  background-color: var(--green);
  color: #fff;
}

.btn-green:hover {
  background-color: #15803d;
  box-shadow: var(--shadow-md);
}

.btn-danger {
  background-color: var(--red);
  color: #fff;
}

.btn-danger:hover {
  background-color: #b91c1c;
  box-shadow: var(--shadow-md);
}

.btn-sm {
  padding: 7px 14px;
  font-size: var(--font-size-sm);
  border-radius: var(--radius-sm);
}

/* ---------- Announcement bar ---------- */
.announce {
  background: linear-gradient(90deg, var(--blue-dark), var(--blue));
  color: #fff;
  font-size: var(--font-size-sm);
  padding: var(--space-sm) var(--space-lg);
  text-align: center;
}

/* ---------- Header ---------- */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: var(--surface);
  box-shadow: var(--shadow-sm);
}

.header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-xl);
  padding: var(--space-md) 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.brand-logo {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  object-fit: cover;
  background-color: var(--blue);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: var(--font-weight-extrabold);
  font-size: var(--font-size-xl);
  overflow: hidden;
  flex-shrink: 0;
}

.brand-name {
  font-size: var(--font-size-xl);
  font-weight: var(--font-weight-extrabold);
  color: var(--text-heading);
  letter-spacing: 0.3px;
  line-height: 1.2;
}

.brand-tag {
  font-size: var(--font-size-xs);
  color: var(--muted);
  line-height: 1.3;
}

.search-box {
  flex: 1;
  max-width: 460px;
  display: flex;
}

.search-box input {
  border-radius: var(--radius-md) 0 0 var(--radius-md);
  border-right: none;
}

.search-box button {
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.currency-toggle {
  display: inline-flex;
  border: 1.5px solid var(--blue);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.currency-toggle button {
  border: none;
  background-color: var(--surface);
  color: var(--blue);
  padding: 7px 14px;
  font-weight: var(--font-weight-bold);
  font-size: var(--font-size-sm);
}

.currency-toggle button.on {
  background-color: var(--blue);
  color: #fff;
}

.icon-btn {
  background-color: var(--blue-light);
  color: var(--blue);
  border-radius: var(--radius-md);
  padding: 9px 14px;
  font-weight: var(--font-weight-semibold);
  font-size: var(--font-size-md);
  border: none;
}

.icon-btn:hover {
  background-color: #dbeafe;
}

/* ---------- Language switcher ---------- */
.lang-switch {
  border: 1.5px solid var(--blue);
  border-radius: var(--radius-md);
  background-color: var(--surface);
  color: var(--text-heading);
  padding: 7px 10px;
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-semibold);
  cursor: pointer;
  max-width: 150px;
}

/* ---------- Navigation ---------- */
.nav {
  background-color: var(--blue-dark);
}

.nav-inner {
  display: flex;
  gap: var(--space-xs);
  flex-wrap: wrap;
}

.nav-inner a {
  color: #cbd5e1;
  padding: var(--space-md) 18px;
  font-size: var(--font-size-md);
  font-weight: var(--font-weight-semibold);
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  transition: color 0.2s ease, background-color 0.2s ease;
}

.nav-inner a:hover,
.nav-inner a.active {
  color: #fff;
  background-color: var(--blue);
}

/* ---------- Hero slider ---------- */
.hero {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-xl);
  margin: var(--space-xl) 0;
}

.hero-slides {
  display: flex;
  transition: transform 0.5s ease;
}

.hero-slide {
  min-width: 100%;
  position: relative;
}

.hero-slide img {
  width: 100%;
  height: 380px;
  object-fit: cover;
  display: block;
}

.hero-caption {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 0 var(--space-5xl);
  color: #fff;
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.55), transparent);
}

.hero-caption h2 {
  font-size: var(--font-size-4xl);
  font-weight: var(--font-weight-extrabold);
  margin-bottom: var(--space-sm);
  line-height: 1.2;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.hero-caption p {
  font-size: var(--font-size-lg);
  opacity: 0.95;
  margin-bottom: var(--space-xl);
  max-width: 520px;
  line-height: 1.5;
}

.hero-dots {
  position: absolute;
  bottom: var(--space-lg);
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: var(--space-sm);
}

.hero-dots span {
  width: 10px;
  height: 10px;
  border-radius: var(--radius-full);
  background-color: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  transition: background-color 0.2s ease, width 0.2s ease;
}

.hero-dots span.on {
  background-color: #fff;
  width: 26px;
  border-radius: var(--radius-sm);
}

/* ---------- Sections ---------- */
.section {
  padding: var(--space-3xl) 0 var(--space-lg);
}

.section-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: var(--space-lg);
}

.section-header h3 {
  font-size: var(--font-size-2xl);
  color: var(--text-heading);
  border-left: 5px solid var(--orange);
  padding-left: var(--space-md);
  line-height: 1.2;
}

.section-header a {
  color: var(--blue);
  font-size: var(--font-size-md);
  font-weight: var(--font-weight-semibold);
}

.section-header a:hover {
  text-decoration: underline;
}

/* ---------- Category grid ---------- */
.cat-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: var(--space-lg);
}

.cat-card {
  background-color: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  padding: var(--space-2xl) var(--space-md);
  text-align: center;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.cat-card:hover {
  border-color: var(--blue);
  box-shadow: var(--shadow-lg);
  transform: translateY(-3px);
}

.cat-card .icon {
  font-size: 40px;
  line-height: 1;
}

.cat-card h4 {
  margin-top: var(--space-sm);
  font-size: var(--font-size-md);
  line-height: 1.3;
}

.cat-card small {
  color: var(--muted);
  font-size: var(--font-size-xs);
}

/* ---------- Product grid & cards ---------- */
.product-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-xl);
}

.product-card {
  background-color: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  overflow: hidden;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
  display: flex;
  flex-direction: column;
}

.product-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-3px);
}

.product-card .img {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background-color: var(--bg);
}

.product-card .img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.product-card:hover .img img {
  transform: scale(1.05);
}

.badge {
  position: absolute;
  top: 10px;
  left: 10px;
  background-color: var(--orange);
  color: #fff;
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-bold);
  padding: 4px 10px;
  border-radius: var(--radius-full);
}

.badge.stock-out {
  background-color: var(--muted);
}

.product-card .body {
  padding: var(--space-md) var(--space-lg) var(--space-lg);
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.product-card .note {
  font-size: var(--font-size-xs);
  color: var(--muted);
}

.product-card h4 {
  font-size: var(--font-size-md);
  font-weight: var(--font-weight-semibold);
  line-height: 1.4;
  height: 44px;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.product-card h4 a:hover {
  color: var(--blue);
}

.price {
  font-size: var(--font-size-xl);
  font-weight: var(--font-weight-extrabold);
  color: var(--red);
}

.price small {
  color: var(--muted);
  font-weight: var(--font-weight-medium);
  font-size: var(--font-size-xs);
}

.meta-row {
  display: flex;
  gap: var(--space-md);
  font-size: var(--font-size-xs);
  color: var(--muted);
  flex-wrap: wrap;
}

.meta-row b {
  color: var(--green);
}

.card-actions {
  display: flex;
  gap: var(--space-sm);
  margin-top: auto;
}

.card-actions .btn {
  flex: 1;
  padding: var(--space-sm) 6px;
  font-size: var(--font-size-sm);
}

.fav-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 34px;
  height: 34px;
  border-radius: var(--radius-full);
  border: none;
  background-color: rgba(255, 255, 255, 0.92);
  font-size: var(--font-size-md);
  color: #cbd5e1;
  transition: color 0.2s ease, transform 0.15s ease;
}

.fav-btn:hover {
  transform: scale(1.08);
}

.fav-btn.on {
  color: var(--red);
}

/* ---------- Filter bar ---------- */
.filter-bar {
  display: flex;
  gap: var(--space-md);
  align-items: center;
  flex-wrap: wrap;
  background-color: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: var(--space-md) var(--space-lg);
  margin-bottom: var(--space-lg);
}

.filter-bar select {
  width: auto;
  padding: var(--space-sm) var(--space-md);
}

.filter-bar .count {
  margin-left: auto;
  color: var(--muted);
  font-size: var(--font-size-sm);
}

/* ---------- Product detail ---------- */
.detail-wrap {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: var(--space-3xl);
  padding: var(--space-2xl) 0;
}

.detail-gallery .main-img {
  border-radius: var(--radius-xl);
  overflow: hidden;
  border: 1px solid var(--line);
}

.detail-gallery .main-img img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  display: block;
}

.thumbs {
  display: flex;
  gap: var(--space-md);
  margin-top: var(--space-md);
  flex-wrap: wrap;
}

.thumbs img {
  width: 84px;
  height: 64px;
  object-fit: cover;
  border-radius: var(--radius-md);
  border: 2px solid transparent;
  cursor: pointer;
  transition: border-color 0.2s ease;
}

.thumbs img.on {
  border-color: var(--blue);
}

.detail-info h1 {
  font-size: var(--font-size-2xl);
  font-weight: var(--font-weight-bold);
  line-height: 1.3;
  margin-bottom: var(--space-md);
}

.detail-price {
  background-color: var(--blue-light);
  border-radius: var(--radius-lg);
  padding: var(--space-lg) var(--space-xl);
  margin: var(--space-md) 0;
}

.detail-price .p {
  font-size: var(--font-size-3xl);
  font-weight: var(--font-weight-extrabold);
  color: var(--red);
}

.detail-price .p small {
  font-size: var(--font-size-sm);
  color: var(--muted);
  font-weight: var(--font-weight-medium);
}

.detail-price .alt {
  color: var(--muted);
  font-size: var(--font-size-md);
  margin-top: var(--space-xs);
}

.kv {
  display: flex;
  gap: var(--space-sm);
  flex-wrap: wrap;
  font-size: var(--font-size-md);
  margin: var(--space-md) 0;
}

.kv span {
  background-color: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 6px var(--space-md);
}

.kv b {
  color: var(--green);
}

.detail-actions {
  display: flex;
  gap: var(--space-md);
  margin: var(--space-lg) 0;
}

.detail-actions .btn {
  flex: 1;
  padding: var(--space-md);
  font-size: var(--font-size-lg);
}

.spec-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: var(--space-sm);
}

.spec-table td {
  border: 1px solid var(--line);
  padding: 9px var(--space-md);
  font-size: var(--font-size-md);
}

.spec-table td:first-child {
  background-color: var(--bg);
  width: 160px;
  color: var(--muted);
}

.detail-desc {
  grid-column: 1 / -1;
  background-color: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  padding: var(--space-2xl) var(--space-3xl);
  line-height: 1.8;
  font-size: var(--font-size-base);
}

.detail-desc h4 {
  margin: var(--space-lg) 0 var(--space-sm);
  color: var(--text-heading);
}

.detail-desc ul,
.detail-desc ol {
  padding-left: var(--space-2xl);
}

.detail-desc li {
  margin: var(--space-xs) 0;
}

/* ---------- Contact modal ---------- */
.modal-mask {
  position: fixed;
  inset: 0;
  background-color: rgba(15, 23, 42, 0.6);
  z-index: 300;
  display: none;
  align-items: center;
  justify-content: center;
  padding: var(--space-lg);
}

.modal-mask.open {
  display: flex;
}

.modal {
  background-color: var(--surface);
  border-radius: var(--radius-2xl);
  max-width: 640px;
  width: 100%;
  max-height: 92vh;
  overflow-y: auto;
  padding: var(--space-2xl);
  position: relative;
}

.modal-close {
  position: absolute;
  top: 14px;
  right: var(--space-lg);
  background: none;
  border: none;
  font-size: 24px;
  color: var(--muted);
  transition: color 0.2s ease;
}

.modal-close:hover {
  color: var(--text);
}

.modal h3 {
  margin-bottom: var(--space-xs);
  font-size: var(--font-size-xl);
}

.modal .sub {
  color: var(--muted);
  font-size: var(--font-size-sm);
  margin-bottom: var(--space-lg);
}

.qr-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-lg);
  margin: var(--space-md) 0;
}

.qr-card {
  border: 1.5px dashed var(--line);
  border-radius: var(--radius-xl);
  padding: var(--space-lg);
  text-align: center;
}

.qr-card img {
  width: 170px;
  height: 170px;
  object-fit: cover;
  border-radius: var(--radius-lg);
  margin: var(--space-sm) auto;
}

.qr-card h5 {
  font-size: var(--font-size-md);
}

.qr-card small {
  color: var(--muted);
  display: block;
  margin-top: var(--space-xs);
}

.wa-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  width: 100%;
  padding: var(--space-md);
  border-radius: var(--radius-lg);
  background-color: #25d366;
  color: #fff;
  font-weight: var(--font-weight-bold);
  font-size: var(--font-size-md);
  border: none;
  margin-top: var(--space-sm);
  transition: background-color 0.2s ease;
}

.wa-btn:hover {
  background-color: #128c7e;
}

.inq-form {
  border-top: 1px solid var(--line);
  margin-top: var(--space-lg);
  padding-top: var(--space-lg);
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-md);
}

.form-grid .full {
  grid-column: 1 / -1;
}

label {
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-semibold);
  display: block;
  margin: var(--space-md) 0 var(--space-xs);
}

/* ---------- User center ---------- */
.uc-wrap {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: var(--space-lg);
  padding: var(--space-2xl) 0 var(--space-4xl);
}

.uc-side {
  background-color: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  overflow: hidden;
  height: fit-content;
}

.uc-side .user-brief {
  padding: var(--space-xl);
  text-align: center;
  background: linear-gradient(135deg, var(--blue), var(--blue-dark));
  color: #fff;
}

.avatar {
  width: 60px;
  height: 60px;
  border-radius: var(--radius-full);
  background-color: rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  margin: 0 auto var(--space-sm);
  border: 2px solid rgba(255, 255, 255, 0.5);
}

.tier {
  display: inline-block;
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-bold);
  padding: 3px 12px;
  border-radius: var(--radius-full);
  background-color: rgba(255, 255, 255, 0.2);
  margin-top: var(--space-sm);
}

.uc-side nav a {
  display: block;
  padding: var(--space-md) var(--space-xl);
  font-size: var(--font-size-md);
  font-weight: var(--font-weight-semibold);
  color: var(--text);
  border-left: 3px solid transparent;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.uc-side nav a:hover,
.uc-side nav a.active {
  background-color: var(--blue-light);
  color: var(--blue);
  border-left-color: var(--blue);
}

.uc-main {
  background-color: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  padding: var(--space-2xl);
  min-height: 400px;
}

.uc-main h3 {
  margin-bottom: var(--space-lg);
  font-size: var(--font-size-xl);
}

.auth-box {
  max-width: 420px;
  margin: var(--space-4xl) auto;
  background-color: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-2xl);
  padding: var(--space-3xl);
}

.auth-tabs {
  display: flex;
  gap: var(--space-sm);
  margin-bottom: var(--space-lg);
}

.auth-tabs button {
  flex: 1;
  padding: var(--space-md);
  border: 1.5px solid var(--line);
  background-color: var(--surface);
  border-radius: var(--radius-md);
  font-weight: var(--font-weight-bold);
  transition: border-color 0.2s ease, color 0.2s ease, background-color 0.2s ease;
}

.auth-tabs button.on {
  border-color: var(--blue);
  color: var(--blue);
  background-color: var(--blue-light);
}

/* ---------- Tables ---------- */
.table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--font-size-md);
}

.table th {
  background-color: var(--bg);
  text-align: left;
  padding: 11px var(--space-md);
  color: var(--muted);
  font-size: var(--font-size-sm);
}

.table td {
  padding: 11px var(--space-md);
  border-bottom: 1px solid var(--line);
}

.table tr:hover td {
  background-color: #f8fafc;
}

.tag {
  display: inline-block;
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-bold);
  padding: 3px 10px;
  border-radius: var(--radius-full);
}

.tag-new {
  background-color: #dcfce7;
  color: #166534;
}

.tag-progress {
  background-color: #fef9c3;
  color: #854d0e;
}

.tag-done {
  background-color: #dbeafe;
  color: #1e40af;
}

.tag-lost {
  background-color: #fee2e2;
  color: #991b1b;
}

/* ---------- Content page ---------- */
.page-content {
  background-color: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  padding: var(--space-3xl) var(--space-4xl);
  margin: var(--space-2xl) 0 var(--space-4xl);
  line-height: 1.9;
}

.page-content h2 {
  margin-bottom: var(--space-md);
  font-size: var(--font-size-2xl);
}

.page-content h4 {
  margin: var(--space-lg) 0 var(--space-xs);
}

.page-content ul,
.page-content ol {
  padding-left: var(--space-2xl);
}

/* ---------- Trust / features strip ---------- */
.features {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-lg);
  margin: var(--space-2xl) 0 var(--space-lg);
}

.feature {
  background-color: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  padding: var(--space-2xl);
  text-align: center;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.feature:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.feature .icon {
  font-size: 32px;
  line-height: 1;
}

.feature h4 {
  margin: var(--space-sm) 0 var(--space-xs);
  font-size: var(--font-size-md);
}

.feature p {
  color: var(--muted);
  font-size: var(--font-size-sm);
}

/* ---------- Newsletter ---------- */
.newsletter {
  background: linear-gradient(120deg, var(--blue-dark), var(--blue));
  color: #fff;
  border-radius: var(--radius-2xl);
  padding: var(--space-3xl);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-lg);
  margin: var(--space-2xl) 0;
  flex-wrap: wrap;
}

.newsletter h3 {
  font-size: var(--font-size-xl);
  line-height: 1.3;
}

.newsletter p {
  opacity: 0.85;
  margin-top: var(--space-xs);
  font-size: var(--font-size-md);
}

.newsletter form {
  display: flex;
  gap: var(--space-sm);
  min-width: 360px;
}

.newsletter input {
  border-color: rgba(255, 255, 255, 0.3);
  background-color: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.newsletter input::placeholder {
  color: rgba(255, 255, 255, 0.7);
}

.newsletter input:focus {
  border-color: #fff;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.2);
}

/* ---------- Footer ---------- */
.footer {
  background-color: var(--blue-dark);
  color: #cbd5e1;
  margin-top: var(--space-4xl);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: var(--space-xl);
  padding: var(--space-4xl) 0 var(--space-2xl);
}

.footer h4 {
  color: #fff;
  font-size: var(--font-size-md);
  margin-bottom: var(--space-md);
}

.footer a,
.footer p {
  font-size: var(--font-size-sm);
  line-height: 2;
  color: #94a3b8;
  transition: color 0.2s ease;
}

.footer a:hover {
  color: #fff;
}

.footer .qr-mini {
  display: flex;
  gap: var(--space-md);
}

.footer .qr-mini img {
  width: 92px;
  height: 92px;
  border-radius: var(--radius-lg);
  background-color: #fff;
  padding: 4px;
}

.footer .qr-mini small {
  display: block;
  text-align: center;
  margin-top: var(--space-sm);
  font-size: var(--font-size-xs);
}

.copyright {
  border-top: 1px solid #1e293b;
  padding: var(--space-lg) 0;
  text-align: center;
  font-size: var(--font-size-xs);
  color: #64748b;
}

.copyright a {
  color: #94a3b8;
}

.copyright a:hover {
  color: #fff;
}

/* ---------- Floating contact ---------- */
.float-bar {
  position: fixed;
  right: 18px;
  bottom: 80px;
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  z-index: 90;
}

.float-btn {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-full);
  border: none;
  color: #fff;
  font-size: 22px;
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.float-btn:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-xl);
}

.float-wa {
  background-color: #25d366;
}

.float-wc {
  background-color: #07c160;
}

.float-top {
  background-color: var(--blue-dark);
}

/* ---------- Toast ---------- */
.toast {
  position: fixed;
  top: 84px;
  left: 50%;
  transform: translateX(-50%) translateY(-20px);
  background-color: var(--blue-dark);
  color: #fff;
  padding: var(--space-md) var(--space-xl);
  border-radius: var(--radius-lg);
  font-size: var(--font-size-md);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease;
  z-index: 400;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ---------- User center extras ---------- */
.tier-notice {
  margin-top: var(--space-2xl);
  padding: var(--space-lg);
  background-color: var(--blue-light);
  border-radius: var(--radius-lg);
  font-size: var(--font-size-sm);
}

.form-small {
  max-width: 420px;
}

/* ---------- Misc ---------- */
.empty {
  text-align: center;
  color: var(--muted);
  padding: var(--space-5xl) 0;
}

.empty .icon {
  font-size: 48px;
  line-height: 1;
}

.breadcrumb {
  font-size: var(--font-size-sm);
  color: var(--muted);
  padding: var(--space-lg) 0 0;
}

.breadcrumb a:hover {
  color: var(--blue);
}

.note {
  font-size: var(--font-size-sm);
  color: var(--muted);
}

.ico {
  font-size: 32px;
  line-height: 1;
}

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .cat-grid { grid-template-columns: repeat(3, 1fr); }
  .product-grid { grid-template-columns: repeat(2, 1fr); }
  .detail-wrap { grid-template-columns: 1fr; }
  .features { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .uc-wrap { grid-template-columns: 1fr; }
  .hero-caption h2 { font-size: var(--font-size-3xl); }
  .hero-caption { padding: 0 var(--space-3xl); }
  .header-top { flex-wrap: wrap; }
  .newsletter form { min-width: 100%; }
}

@media (max-width: 720px) {
  .container { padding: 0 var(--space-md); }
  .cat-grid { grid-template-columns: repeat(2, 1fr); }
  .product-grid { grid-template-columns: 1fr; }
  .features { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .qr-row { grid-template-columns: 1fr; }
  .hero-slide img { height: 280px; }
  .hero-caption h2 { font-size: var(--font-size-2xl); }
  .hero-caption p { font-size: var(--font-size-md); }
  .search-box { order: 3; max-width: 100%; width: 100%; margin-top: var(--space-sm); }
  .header-actions { width: 100%; justify-content: flex-end; }
  .float-bar { right: 12px; bottom: 60px; }
}

/* ---------- RTL (Arabic) ---------- */
html.rtl body {
  direction: rtl;
}

html.rtl .header-top,
html.rtl .nav-inner,
html.rtl .filter-bar,
html.rtl .meta-row,
html.rtl .card-actions,
html.rtl .detail-actions,
html.rtl .features,
html.rtl .footer-grid,
html.rtl .form-grid,
html.rtl .qr-row,
html.rtl .hero-caption {
  direction: rtl;
  text-align: right;
}

html.rtl .float-bar {
  right: auto;
  left: 18px;
}

html.rtl .fav-btn {
  right: auto;
  left: 10px;
}

html.rtl .spec-table td:first-child {
  text-align: right;
}

html.rtl .brand {
  flex-direction: row;
}

html.rtl .toast {
  direction: rtl;
}
