/* ============================================================
   eezglobal / ASC365 JJS - Graphite & Vermilion theme
   Distinct from the ASC365CA blue and ASC365JJS graphite systems.
   ============================================================ */

:root {
  --ink: #123a2e;
  --ink-2: #17493a;
  --ink-3: #24604d;
  --accent: #2f8f74;
  --accent-dark: #226b57;
  --accent-soft: #e2f1ea;
  --paper: #f2f6f3;
  --card: #ffffff;
  --line: #d7e3dd;
  --line-soft: #e7f0eb;
  --muted: #5c6f68;
  --gold: #7f9f63;
  --radius: 6px;
  --container: 1260px;
  --shadow: 0 10px 30px rgba(18, 58, 46, .10);
  --serif: "Palatino Linotype", "Book Antiqua", Georgia, serif;
  --sans: "Segoe UI", "Helvetica Neue", Arial, "Microsoft YaHei", sans-serif;
}

* { box-sizing: border-box; }

body.tpa,
body.tpa-page {
  margin: 0;
  padding: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.tpa a,
.tpa-page a { color: var(--ink); text-decoration: none; }
.tpa a:hover,
.tpa-page a:hover { color: var(--accent); }

img { max-width: 100%; }
h1, h2, h3, h4 { margin: 0; }
p { margin: 0 0 10px; }
ul { margin: 0; padding: 0; }

.tpa-wrap { max-width: var(--container); margin: 0 auto; padding: 0 20px; }

/* ---------------- Header ---------------- */
.tpa-topbar {
  background: #0b241d;
  color: #93b0a4;
  font-size: 12px;
  letter-spacing: .02em;
}
.tpa-topbar-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 7px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.tpa-topbar-left { display: flex; align-items: center; gap: 8px; }
.tpa-topbar-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); display: inline-block; }
.tpa-topbar a { color: #c3d8ce; }
.tpa-topbar a:hover { color: #fff; }
.tpa-topbar-links { display: flex; gap: 18px; white-space: nowrap; }

.tpa-masthead { background: var(--ink); border-bottom: 1px solid rgba(255,255,255,.06); }
.tpa-masthead-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 18px 20px;
  display: flex;
  align-items: center;
  gap: 26px;
}
.tpa-logo {
  background: #fff;
  border-radius: 6px;
  padding: 8px 14px;
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
}
.tpa-logo img { display: block; height: 46px; width: auto; }

.tpa-search { flex: 1 1 auto; display: flex; min-width: 0; }
.tpa-search form {
  display: flex;
  width: 100%;
  background: #fff;
  border-radius: 6px;
  overflow: hidden;
}
.tpa-search input[type="text"] {
  flex: 1 1 auto;
  min-width: 0;
  border: 0;
  padding: 12px 16px;
  font-size: 13.5px;
  color: var(--ink);
  outline: none;
  background: #fff;
  font-family: var(--sans);
}
.tpa-search select {
  border: 0;
  border-left: 1px solid var(--line);
  background: #eef4f0;
  color: var(--muted);
  padding: 0 12px;
  font-size: 13px;
  max-width: 190px;
  outline: none;
  font-family: var(--sans);
}
.tpa-search button {
  border: 0;
  background: var(--accent);
  color: #fff;
  padding: 0 22px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  cursor: pointer;
  font-family: var(--sans);
}
.tpa-search button:hover { background: var(--accent-dark); }

.tpa-head-actions { display: flex; gap: 22px; flex: 0 0 auto; }
a.tpa-head-action { color: #c9dcd3; display: flex; align-items: center; gap: 8px; font-size: 12.5px; line-height: 1.25; }
a.tpa-head-action:hover { color: #fff; }
a.tpa-head-action svg { width: 20px; height: 20px; stroke: #c9dcd3; fill: none; stroke-width: 1.6; }
a.tpa-head-action:hover svg { stroke: #fff; }
.tpa-head-action b { display: block; font-weight: 600; }

.tpa-navbar { background: var(--ink-2); }
.tpa-nav {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
  overflow-x: auto;
}
.tpa-nav li { list-style: none; }
.tpa-nav a {
  display: block;
  padding: 13px 16px;
  color: #a9bfb5;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: .09em;
  text-transform: uppercase;
  border-bottom: 3px solid transparent;
  white-space: nowrap;
}
.tpa-nav a:hover { color: #fff; border-bottom-color: rgba(47,143,116,.65); }
.tpa-nav a.is-active { color: #fff; border-bottom-color: var(--accent); }
.tpa-nav-note { margin-left: auto; color: #8fa89c; font-size: 12px; white-space: nowrap; }

/* ---------------- Page shell ---------------- */
.tpa-page-wrap { padding: 26px 0 46px; }
.tpa-layout { display: grid; grid-template-columns: 248px minmax(0, 1fr); gap: 28px; align-items: start; }
.tpa-main { min-width: 0; }

.tpa-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  color: var(--muted);
  margin-bottom: 18px;
}
.tpa-breadcrumb a { color: var(--muted); }
.tpa-breadcrumb a:hover { color: var(--accent); }
.tpa-breadcrumb .sep { color: #9fb8ad; }
.tpa-breadcrumb .current { color: var(--ink); font-weight: 600; }

.tpa-page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}
.tpa-page-head h1 {
  font-family: var(--serif);
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -.01em;
}
.tpa-page-head .sub { color: var(--muted); font-size: 13px; margin: 4px 0 0; }
.tpa-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 11px;
  letter-spacing: .24em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 700;
  margin-bottom: 10px;
}
.tpa-eyebrow::before { content: ""; width: 26px; height: 2px; background: var(--accent); }

/* ---------------- Home hero ---------------- */
.tpa-hero {
  background:
    radial-gradient(900px 320px at 82% -30%, rgba(47,143,116,.32), transparent 62%),
    linear-gradient(120deg, #0b241d 0%, #16493a 58%, #1f5343 100%);
  border-radius: 12px;
  padding: 44px 48px;
  color: #fff;
  margin-bottom: 30px;
  position: relative;
  overflow: hidden;
}
.tpa-hero::after {
  content: "";
  position: absolute;
  right: -80px;
  bottom: -120px;
  width: 360px;
  height: 360px;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 50%;
}
.tpa-hero h1 {
  font-family: var(--serif);
  font-size: 46px;
  line-height: 1.12;
  font-weight: 700;
  letter-spacing: -.01em;
  margin: 0 0 14px;
  max-width: 640px;
}
.tpa-hero h1 em { color: #9fd8c6; font-style: italic; }
.tpa-hero-sub { color: #bfd3c9; max-width: 560px; font-size: 14.5px; }
.tpa-hero-ctas { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; position: relative; z-index: 1; }
.tpa-hero-points {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 26px;
  margin-top: 26px;
  padding-top: 20px;
  border-top: 1px solid rgba(255,255,255,.12);
  color: #a9c2b7;
  font-size: 12.5px;
}
.tpa-hero-points span::before { content: "\2022"; color: var(--accent); margin-right: 8px; }

/* ---------------- Buttons ---------------- */
.tpa-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 42px;
  padding: 0 22px;
  border-radius: 4px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  border: 1px solid transparent;
  cursor: pointer;
  font-family: var(--sans);
  transition: background .15s ease, color .15s ease, border-color .15s ease;
}
a.tpa-btn-primary { background: var(--accent); color: #fff; }
a.tpa-btn-primary:hover { background: var(--accent-dark); color: #fff; }
a.tpa-btn-ghost { background: transparent; color: #fff; border-color: rgba(255,255,255,.45); }
a.tpa-btn-ghost:hover { border-color: #fff; color: #fff; background: rgba(255,255,255,.07); }
a.tpa-btn-dark { background: var(--ink); color: #fff; }
a.tpa-btn-dark:hover { background: var(--ink-3); color: #fff; }
a.tpa-btn-line { background: #fff; color: var(--ink); border-color: var(--line); }
a.tpa-btn-line:hover { border-color: var(--ink); color: var(--ink); }
.tpa-btn-sm { height: 34px; padding: 0 14px; font-size: 11.5px; }
.tpa-btn-block { width: 100%; }

/* ---------------- Category rail ---------------- */
.tpa-side { position: sticky; top: 18px; }
.tpa-cat-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.tpa-cat-head {
  background: var(--ink);
  color: #fff;
  padding: 14px 18px;
  font-family: var(--serif);
  font-size: 17px;
  font-weight: 700;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.tpa-cat-head span { font-family: var(--sans); font-size: 10px; letter-spacing: .2em; color: #b9ccc3; text-transform: uppercase; }
.tpa-cat-list { list-style: none; }
.tpa-cat-list li { list-style: none; border-bottom: 1px solid var(--line-soft); }
.tpa-cat-list li:last-child { border-bottom: 0; }
.tpa-cat-list a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 18px;
  font-size: 13px;
  color: #33443d;
  border-left: 3px solid transparent;
}
.tpa-cat-list a:hover { background: #e9f3ee; color: var(--accent); border-left-color: var(--accent); }
.tpa-cat-list a.is-active { background: var(--accent-soft); color: var(--accent-dark); border-left-color: var(--accent); font-weight: 700; }
.tpa-cat-list .count {
  flex: 0 0 auto;
  min-width: 34px;
  text-align: center;
  font-size: 11px;
  color: var(--muted);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 1px 8px;
}
.tpa-cat-extra { padding: 14px 18px; background: #eef4f0; border-top: 1px solid var(--line-soft); }
.tpa-cat-extra a { display: flex; align-items: center; justify-content: space-between; font-size: 13px; font-weight: 700; color: var(--accent); }
.tpa-cat-extra a span { font-size: 11px; letter-spacing: .12em; }

/* ---------------- Product grid & cards ---------------- */
.tpa-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px 14px;
  margin-bottom: 16px;
  font-size: 12.5px;
  color: var(--muted);
}
.tpa-toolbar .perpage { display: flex; align-items: center; gap: 6px; }
.tpa-toolbar .perpage a {
  min-width: 34px;
  text-align: center;
  padding: 3px 8px;
  border: 1px solid var(--line);
  border-radius: 4px;
  color: var(--muted);
  font-weight: 600;
}
.tpa-toolbar .perpage a:hover { border-color: var(--ink); color: var(--ink); }
.tpa-toolbar .perpage a.is-active { background: var(--ink); border-color: var(--ink); color: #fff; }

.tpa-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  list-style: none;
}
.tpa-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  position: relative;
  transition: box-shadow .18s ease, transform .18s ease, border-color .18s ease;
}
.tpa-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); border-color: #cfe0d8; }
.tpa-card-media {
  display: block;
  aspect-ratio: 1 / 1;
  background: #fff;
  padding: 14px;
  border-bottom: 1px solid var(--line-soft);
}
.tpa-card-media img { width: 100%; height: 100%; object-fit: contain; display: block; }
.tpa-card-body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 6px; flex: 1 1 auto; }
.tpa-sku { font-size: 11px; letter-spacing: .08em; color: #8a9a92; text-transform: uppercase; }
.tpa-title {
  font-size: 13px;
  line-height: 1.45;
  color: #22312b;
  font-weight: 600;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 38px;
}
.tpa-card:hover .tpa-title { color: var(--accent); }
.tpa-price-row { margin-top: auto; display: flex; align-items: baseline; gap: 6px; padding-top: 8px; border-top: 1px dashed var(--line-soft); }
.tpa-price { font-size: 18px; font-weight: 800; color: var(--ink); letter-spacing: -.01em; }
.tpa-price small { font-size: 11px; font-weight: 600; color: var(--muted); margin-left: 2px; }
.tpa-was { font-size: 12px; color: #9aa79f; text-decoration: line-through; }
.tpa-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  background: var(--accent);
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 3px;
  z-index: 1;
}
.tpa-badge.is-used { background: var(--ink); }

.tpa-empty {
  background: var(--card);
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  padding: 42px 20px;
  text-align: center;
  color: var(--muted);
}

/* ---------------- Pagination ---------------- */
.tpa-pager { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 22px; font-size: 13px; }
.tpa-pager a, .tpa-pager span.cur, .tpa-pager span.gap {
  min-width: 34px;
  height: 34px;
  padding: 0 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #fff;
  color: var(--ink);
  font-weight: 600;
}
.tpa-pager a:hover { border-color: var(--ink); }
.tpa-pager span.cur { background: var(--accent); border-color: var(--accent); color: #fff; }
.tpa-pager span.gap, .tpa-pager span.disabled { border-color: transparent; background: transparent; color: #9aa79f; }

/* ---------------- Detail page ---------------- */
.tpa-detail { display: grid; grid-template-columns: minmax(0, 460px) minmax(0, 1fr); gap: 34px; align-items: start; }
.tpa-detail-media {
  position: relative;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px;
}
.tpa-detail-media img { width: 100%; max-height: 420px; object-fit: contain; display: block; }
.tpa-detail-info h1 { font-family: var(--serif); font-size: 28px; line-height: 1.25; margin-bottom: 8px; }
.tpa-detail-sku { color: #8a9a92; font-size: 12px; letter-spacing: .1em; text-transform: uppercase; margin-bottom: 14px; }
.tpa-detail-price {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 16px 18px;
  background: var(--card);
  border: 1px solid var(--line);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius);
  margin-bottom: 16px;
}
.tpa-detail-price .num { font-size: 30px; font-weight: 800; color: var(--accent); letter-spacing: -.02em; }
.tpa-detail-price .cur { font-size: 13px; color: var(--muted); font-weight: 600; }
.tpa-detail-price .free { margin-left: auto; font-size: 12px; color: #2f7d52; font-weight: 700; }
.tpa-spec { width: 100%; border-collapse: collapse; margin-bottom: 18px; }
.tpa-spec td { padding: 9px 0; border-bottom: 1px solid var(--line-soft); font-size: 13px; vertical-align: top; }
.tpa-spec td:first-child { width: 40%; color: var(--muted); }
.tpa-spec td:last-child { color: var(--ink); font-weight: 600; }
.tpa-buybar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 6px; }
.tpa-qty { display: flex; align-items: center; border: 1px solid var(--line); border-radius: 4px; background: #fff; height: 42px; overflow: hidden; }
.tpa-qty label { font-size: 11px; letter-spacing: .12em; color: var(--muted); padding: 0 10px; text-transform: uppercase; }
.tpa-qty input { width: 64px; height: 100%; border: 0; border-left: 1px solid var(--line-soft); text-align: center; font-size: 14px; outline: none; font-family: var(--sans); }
.tpa-stock { font-size: 12px; font-weight: 700; color: #2f7d52; }
.tpa-stock.out { color: var(--accent); }
.tpa-desc {
  margin-top: 36px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px 28px;
  overflow: hidden;
}
.tpa-desc img { max-width: 100%; height: auto; }
.tpa-section-title {
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}
.tpa-similar { margin-top: 36px; }
.tpa-similar-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; }
.tpa-mini { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 10px; }
.tpa-mini img { width: 100%; height: 130px; object-fit: contain; display: block; margin-bottom: 8px; }
.tpa-mini .t { font-size: 12px; line-height: 1.4; color: #33443d; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 34px; }
.tpa-mini:hover { border-color: #cfe0d8; box-shadow: var(--shadow); }
.tpa-mini:hover .t { color: var(--accent); }

/* ---------------- Forms & account ---------------- */
.tpa-card-box {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px 26px;
  margin-bottom: 20px;
}
.tpa-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 18px; }
.tpa-field { display: flex; flex-direction: column; gap: 6px; }
.tpa-field.full { grid-column: 1 / -1; }
.tpa-field label { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); font-weight: 700; }
.tpa-field input[type="text"], .tpa-field input[type="password"], .tpa-field input[type="email"], .tpa-field select, .tpa-field textarea {
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 10px 12px;
  font-size: 13.5px;
  font-family: var(--sans);
  color: var(--ink);
  background: #fff;
  outline: none;
}
.tpa-field input:focus, .tpa-field select:focus, .tpa-field textarea:focus { border-color: var(--ink); }
.tpa-field textarea { min-height: 130px; resize: vertical; }
.tpa-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 18px; }
.tpa-muted { color: var(--muted); font-size: 12.5px; }
.tpa-note {
  background: #e9f4ef;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  padding: 12px 16px;
  color: #4c6257;
  font-size: 12.5px;
}

.tpa-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.tpa-table th {
  background: var(--ink);
  color: #fff;
  text-align: left;
  font-size: 11px;
  letter-spacing: .12em;
  text-transform: uppercase;
  padding: 11px 12px;
  font-weight: 700;
}
.tpa-table td { padding: 11px 12px; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
.tpa-table tr:hover td { background: #f4f8f5; }
.tpa-table .empty td { text-align: center; color: var(--muted); padding: 30px 12px; }
.tpa-danger { color: var(--accent); font-weight: 600; }
.tpa-danger:hover { color: var(--accent-dark); }

.tpa-account-nav { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 20px; }
.tpa-account-nav a {
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #fff;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .04em;
  color: var(--muted);
}
.tpa-account-nav a.is-active { background: var(--ink); border-color: var(--ink); color: #fff; }

/* ---------------- FAQ / content ---------------- */
.tpa-prose { font-size: 14px; color: #2a3a33; }
.tpa-prose h2, .tpa-prose h3 { font-family: var(--serif); margin: 22px 0 10px; }
.tpa-prose p { margin-bottom: 12px; }
.tpa-prose a { color: var(--accent); text-decoration: underline; }
.tpa-prose img { max-width: 100%; height: auto; }
.tpa-prose table { max-width: 100%; }
.tpa-prose table[width] { width: 100% !important; }
.tpa-prose a.tpa-btn { color: #fff; text-decoration: none; }
.tpa-prose a.tpa-btn-line { color: var(--ink); }

/* ---------------- Footer ---------------- */
.tpa-footer { background: var(--ink); color: #b9ccc3; margin-top: 40px; border-top: 3px solid var(--accent); }
.tpa-footer-main {
  max-width: var(--container);
  margin: 0 auto;
  padding: 40px 20px 30px;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
  gap: 30px;
}
.tpa-footer-brand img { background: #fff; border-radius: 6px; padding: 8px 12px; height: 44px; width: auto; display: block; margin-bottom: 14px; }
.tpa-footer p { font-size: 12.5px; color: #93a9a0; }
.tpa-footer h3 {
  color: #fff;
  font-size: 12px;
  letter-spacing: .18em;
  text-transform: uppercase;
  margin-bottom: 14px;
}
.tpa-footer ul { list-style: none; }
.tpa-footer li { margin-bottom: 8px; }
.tpa-footer li a { color: #a8bdb3; font-size: 12.5px; }
.tpa-footer li a:hover { color: #fff; }
.tpa-footer strong { color: #e6efe9; font-weight: 600; }
.tpa-footer p a { color: #a8bdb3; }
.tpa-footer p a:hover { color: #fff; }
.tpa-footer-bottom { border-top: 1px solid rgba(255,255,255,.08); }
.tpa-footer-bottom-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 14px 20px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 20px;
  font-size: 12px;
  color: #86a095;
}
.tpa-footer-bottom a { color: #a8bdb3; }
.tpa-footer-bottom a:hover { color: #fff; }

/* ---------------- Legacy page compatibility ---------------- */
body.tpa-page {
  width: auto !important;
  margin: 0 !important;
  background: var(--paper) !important;
  text-align: left !important;
}
.tpa-page > table,
.tpa-page table[width="1000"],
.tpa-page table[style*="width:1000px"] {
  width: var(--container) !important;
  max-width: calc(100% - 32px) !important;
  margin-left: auto !important;
  margin-right: auto !important;
  background: #fff;
  border-radius: 10px;
  overflow: hidden;
}
.tpa-page table[width="998"],
.tpa-page table[width="900"],
.tpa-page form table[width="450"] { width: 100% !important; }
.tpa-page td, .tpa-page th { font-family: var(--sans); }
.tpa-page input[type="text"], .tpa-page input[type="password"], .tpa-page select, .tpa-page textarea {
  font-family: var(--sans);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 7px 10px;
  background: #fff;
}
.tpa-page input[type="submit"], .tpa-page input[type="button"] {
  font-family: var(--sans);
  cursor: pointer;
  background: var(--accent);
  color: #fff;
  border: 0;
  border-radius: 4px;
  padding: 7px 16px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.tpa-page input[type="submit"]:hover, .tpa-page input[type="button"]:hover { background: var(--accent-dark); }
.tpa-page table[bordercolor] { border-color: var(--line) !important; }
.tpa-page table[height] { height: auto !important; }
.tpa-page table[bgcolor="#00a0e9"], .tpa-page td[bgcolor="#00a0e9"] { background: var(--ink) !important; }
.tpa-page table[bgcolor="#00a0e9"] font { color: #fff !important; }
.tpa-page td[bgcolor="#E9F4EF"] { background: #f4f8f5 !important; }
.tpa-page font[color="#0033FF"] { color: var(--accent) !important; }
.tpa-page a font[color="#0033FF"] { color: var(--accent) !important; }
.tpa-page font[color="#800080"], .tpa-page font[color="#0000cc"] { color: var(--ink) !important; }
.tpa-page a[style*="color:#000000"] { color: var(--ink) !important; }
.tpa-account-main table { max-width: 100%; }
.tpa-account-main table[width="800"],
.tpa-account-main table[width="799"],
.tpa-account-main #main_content { width: 100% !important; }
.tpa-account-main [style*="width:800px"],
.tpa-account-main [style*="width:799px"],
.tpa-account-main [style*="width:600px"] { width: 100% !important; }
.tpa-account-main table[bordercolor] { border-color: var(--line) !important; }
.tpa-cart-head { padding: 24px 26px 0; }
.tpa-cart-head h1 { font-family: var(--serif); font-size: 30px; margin-top: 4px; }
.tpa-page > table > tbody > tr > td > table[width="900"] {
  width: calc(100% - 52px) !important;
  margin-left: auto !important;
  margin-right: auto !important;
}

/* Raw supplier descriptions on detail pages */
.tpa-desc { overflow-wrap: break-word; }
.tpa-desc table { max-width: 100% !important; table-layout: fixed !important; }
.tpa-desc table[width] { width: 100% !important; }
.tpa-desc img { max-width: 100% !important; height: auto !important; }
.tpa-desc iframe, .tpa-desc video { max-width: 100%; }

/* ---------------- Responsive ---------------- */
@media (max-width: 1180px) {
  .tpa-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .tpa-similar-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .tpa-footer-main { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 980px) {
  .tpa-masthead-inner { flex-wrap: wrap; gap: 14px; }
  .tpa-search { order: 3; flex: 1 1 100%; }
  .tpa-layout { grid-template-columns: 1fr; }
  .tpa-side { position: static; }
  .tpa-hero { padding: 34px 30px; }
  .tpa-hero h1 { font-size: 36px; }
  .tpa-detail { grid-template-columns: 1fr; }
  .tpa-similar-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .tpa-nav-note { display: none; }
}

@media (max-width: 720px) {
  .tpa-topbar-inner { flex-direction: column; align-items: flex-start; gap: 4px; }
  .tpa-topbar-links { gap: 14px; }
  .tpa-masthead-inner { padding: 14px 16px; }
  .tpa-logo img { height: 32px; }
  .tpa-head-actions { margin-left: auto; gap: 14px; }
  .tpa-search select { display: none; }
  .tpa-nav a { padding: 11px 12px; font-size: 11.5px; }
  .tpa-wrap, .tpa-topbar-inner, .tpa-masthead-inner, .tpa-nav { padding-left: 14px; padding-right: 14px; }
  .tpa-hero { padding: 26px 20px; border-radius: 10px; }
  .tpa-hero h1 { font-size: 28px; }
  .tpa-hero-sub { font-size: 13px; }
  .tpa-hero-ctas .tpa-btn { flex: 1 1 auto; }
  .tpa-page-wrap { padding-top: 18px; padding-bottom: 34px; }
  .tpa-page-head { flex-direction: column; align-items: flex-start; gap: 8px; }
  .tpa-page-head h1 { font-size: 24px; }
  .tpa-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .tpa-card-body { padding: 10px 10px 12px; }
  .tpa-title { font-size: 12.5px; min-height: 36px; }
  .tpa-price { font-size: 16px; }
  .tpa-similar-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tpa-form-grid { grid-template-columns: 1fr; }
  .tpa-card-box { padding: 18px 16px; }
  .tpa-desc { padding: 18px 14px; }
  .tpa-detail-media { padding: 14px; }
  .tpa-detail-info h1 { font-size: 22px; }
  .tpa-detail-price .num { font-size: 24px; }
  .tpa-footer-main { grid-template-columns: 1fr; padding: 28px 16px; }
  .tpa-footer-bottom-inner { padding: 12px 16px; }
  .tpa-table th, .tpa-table td { padding: 8px 8px; }

  /* Legacy table pages (cart, register, account) */
  .tpa-page table { max-width: 100% !important; }
  .tpa-page table[width] { width: 100% !important; }
  .tpa-page td[width], .tpa-page th[width] { width: auto !important; }
  .tpa-page td[height], .tpa-page tr[height] { height: auto !important; }
  .tpa-page table img { max-width: 100% !important; height: auto !important; }
  .tpa-page .tpa-footer img { max-width: none !important; width: auto !important; height: 44px !important; }
  .tpa-page input[type="text"], .tpa-page input[type="password"] { max-width: 100% !important; }
  .tpa-auth > table > tbody > tr,
  .tpa-auth > table > tr,
  .tpa-register > table > tbody > tr,
  .tpa-register > table > tr { display: block; }
  .tpa-auth > table > tbody > tr > td,
  .tpa-auth > table > tr > td,
  .tpa-register > table > tbody > tr > td,
  .tpa-register > table > tr > td { display: block; width: 100% !important; }
  .tpa-cart-head { padding: 18px 14px 0; }
  .tpa-cart-head h1 { font-size: 24px; }
  .tpa-page table[rules="rows"] > tbody > tr > td { display: block; width: 100% !important; text-align: center; }
  .tpa-page table[rules="rows"] th { display: block; width: auto !important; text-align: left !important; }
}

@media (max-width: 480px) {
  .tpa-topbar-inner { font-size: 11px; }
  .tpa-topbar-links { gap: 12px; }
  .tpa-head-actions { gap: 10px; }
  .tpa-search button { padding: 0 14px; font-size: 12px; }
  .tpa-nav { padding-left: 8px !important; padding-right: 8px !important; }
  .tpa-nav a { padding: 10px 9px; font-size: 10.5px; }
  .tpa-hero { padding: 22px 16px; }
  .tpa-hero h1 { font-size: 23px; }
  .tpa-hero-sub { font-size: 12.5px; }
  .tpa-hero-ctas { flex-direction: column; }
  .tpa-hero-ctas .tpa-btn { width: 100%; flex: 0 0 auto; }
  .tpa-hero-points { font-size: 11.5px; gap: 8px 16px; }
  .tpa-page-head h1 { font-size: 22px; }
  .tpa-grid { gap: 8px; }
  .tpa-card-body { padding: 8px; }
  .tpa-title { font-size: 12px; }
  .tpa-price { font-size: 15px; }
  .tpa-detail-info h1 { font-size: 20px; }
  .tpa-section-title { font-size: 18px; }
  .tpa-desc { padding: 14px 12px; }
  .tpa-footer-main { padding: 24px 14px; }
  .tpa-footer-bottom-inner { flex-direction: column; gap: 4px; text-align: center; }
}

/* ---------------- INTBUYING legacy accent overrides ---------------- */
.tpa-page table[bgcolor="#C3DAF9"], .tpa-page td[bgcolor="#C3DAF9"],
.tpa-page table[bgcolor="#c3daf9"], .tpa-page td[bgcolor="#c3daf9"] { background: var(--ink) !important; }
.tpa-page td[bgcolor="#C3DAF9"] font, .tpa-page td[bgcolor="#c3daf9"] font { color: #fff !important; }
.tpa-page td[bgcolor="#F1F1F1"], .tpa-page td[bgcolor="#f1f1f1"] { background: var(--paper) !important; }
.tpa-page font[color="#800000"] { color: #c3d8ce !important; }
.tpa-page .STYLE1 { color: var(--accent) !important; }

/* ---------------- Account / auth / cart / article shells ---------------- */
.tpa-account { display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 24px; align-items: start; padding: 6px 0 44px; }
.tpa-account-nav { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 10px; display: flex; flex-direction: column; gap: 2px; position: sticky; top: 16px; }
.tpa-account-nav a { display: block; padding: 10px 14px; border-radius: 6px; font-size: 13px; font-weight: 600; color: var(--ink); letter-spacing: .02em; }
.tpa-account-nav a:hover { background: var(--accent-soft); text-decoration: none; }
.tpa-account-nav a.is-active { background: var(--ink); color: #fff; }
.tpa-account-main { min-width: 0; }
.tpa-account-main > div, .tpa-account-main > table { max-width: 100%; }

.tpa-auth { max-width: 860px; margin: 0 auto; padding: 6px 0 44px; }
.tpa-auth > table { width: 100% !important; background: #fff; border: 1px solid var(--line) !important; border-radius: var(--radius); padding: 14px 28px 28px; }
.tpa-auth table { max-width: 100%; }
.tpa-auth > table > tbody > tr { display: block; }
.tpa-auth > table > tbody > tr > td { display: block; width: 100% !important; }
.tpa-auth form { display: block; margin-top: 12px; }
.tpa-auth form table[width] { width: 100% !important; }
.tpa-auth td[height], .tpa-auth tr[height], .tpa-register td[height], .tpa-register tr[height] { height: auto !important; }
.tpa-register { max-width: 1140px; margin: 0 auto; padding: 6px 0 44px; }
.tpa-register > table { width: 100% !important; background: #fff; border: 1px solid var(--line) !important; border-radius: var(--radius); padding: 14px 28px 28px; }
.tpa-register > table > tbody > tr > td[width] { width: 50% !important; padding: 8px 18px; vertical-align: top; }
.tpa-register > table > tbody > tr > td table[width] { width: 100% !important; }
.tpa-register table { max-width: 100%; }
.tpa-page td[style*="signin.jpg"] { background-image: none !important; }
.tpa-page img[src*="signin.jpg"] { display: none !important; }

.tpa-cart { max-width: 1240px; margin: 0 auto; }
.tpa-cart > div { max-width: 100% !important; width: auto !important; margin-left: 0 !important; }
.tpa-page [style*="width:920px"], .tpa-page [style*="width:800px"] { max-width: 100% !important; }
.tpa-page table[rules="rows"] { border: 1px solid var(--line) !important; border-radius: 8px; }
.tpa-page table[rules="rows"] > tbody > tr > td,
.tpa-page table[rules="rows"] > tr > td { border-bottom: 1px dashed var(--line-soft); }

.tpa-article { align-items: start; }
.tpa-article-body { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 26px 30px; min-width: 0; overflow-wrap: break-word; }
.tpa-article-body table { max-width: 100% !important; }
.tpa-article-body img { max-width: 100% !important; height: auto !important; }
.tpa-article .tpa-side { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; }
.tpa-article .tpa-side ul { list-style: none; margin: 0; padding: 0; }
.tpa-article .tpa-side li { list-style: none; }
.tpa-article .tpa-side li a { display: block; padding: 9px 2px; border-bottom: 1px dashed var(--line-soft); font-size: 13.5px; font-weight: 600; color: var(--ink); height: auto !important; line-height: 1.4 !important; white-space: normal !important; }
.tpa-article .tpa-side li a font { color: var(--ink) !important; font-family: var(--sans) !important; }
.tpa-article .tpa-side li:last-child a { border-bottom: 0; }
.tpa-article .tpa-side #suckertree1 { list-style: none; margin: 0 !important; padding: 0 !important; }
.tpa-article .tpa-side #suckertree1 li { list-style: none !important; border: 0 !important; background: none !important; margin: 0 !important; padding: 0 !important; }
.tpa-article .tpa-side #suckertree1 li a { display: block; padding: 9px 2px !important; border: 0 !important; background: none !important; border-bottom: 1px dashed var(--line-soft) !important; color: var(--ink) !important; font-weight: 600; font-size: 13.5px; height: auto !important; line-height: 1.4 !important; white-space: normal !important; }
.tpa-article .tpa-side #suckertree1 li a font { color: var(--ink) !important; font-family: var(--sans) !important; }
.tpa-auth td[style*="url("], .tpa-register td[style*="url("] { background-image: none !important; }
.tpa-auth img[src*="regedit"], .tpa-register img[src*="regedit"] { display: none !important; }
.tpa-auth td[height="29"][colspan="2"], .tpa-register td[height="29"][colspan="2"] {
  background: var(--ink) !important;
  text-align: center; color: #fff; font-weight: 700; font-size: 12px;
  letter-spacing: .12em; text-transform: uppercase; padding: 8px 0;
}
.tpa-auth td[height="29"][colspan="2"]::before, .tpa-register td[height="29"][colspan="2"]::before { content: "Create an Account"; }
.tpa-auth td[height="28"][colspan="2"][style*="signin"] {
  background: var(--ink) !important;
  text-align: center; color: #fff; font-weight: 700; font-size: 12px;
  letter-spacing: .12em; text-transform: uppercase;
}
.tpa-auth td[height="28"][colspan="2"][style*="signin"]::before { content: "Sign In"; }
.tpa-cart table[rules="rows"] { margin-top: 10px; }
.tpa-cart table[rules="rows"] > tbody > tr > td { padding: 8px 10px; }
.tpa-cart table[rules="rows"] th { padding: 10px 12px; font-weight: 400; vertical-align: top; }
.tpa-cart table[rules="rows"] th font { font-family: var(--sans) !important; }
.tpa-cart table[rules="rows"] td img { display: block; margin: 8px; border: 1px solid var(--line-soft); }
.tpa-cart input[name="productnumber"] { width: 64px; border: 1px solid var(--line); border-radius: 4px; padding: 6px 8px; font-size: 13px; text-align: center; }
.tpa-cart input[type="submit"] { background: var(--ink); color: #fff; border: 0; border-radius: 4px; padding: 7px 14px; font-size: 12px; cursor: pointer; }
.tpa-cart input[type="submit"]:hover { background: var(--accent-dark); }

.tpa-account-wide { grid-column: 1 / -1; }
.tpa-market-links { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 10px; font-size: 13px; color: var(--muted); }
.tpa-market-links a { font-weight: 600; border: 1px solid var(--line); border-radius: 4px; padding: 4px 10px; background: #fff; color: var(--ink); }
.tpa-market-links a:hover { border-color: var(--ink); text-decoration: none; }
.tpa-page .STYLE11 { color: var(--accent) !important; }
.tpa-page font[color="#000099"] { color: var(--ink) !important; }
.tpa-page div[style*="height:500px"] { height: auto !important; padding: 30px 0 10px; }
.tpa-article .tpa-side div, .tpa-article .tpa-side ul { width: auto !important; }

@media (max-width: 980px) {
  .tpa-account { grid-template-columns: 1fr; gap: 16px; }
  .tpa-account-nav { position: static; flex-direction: row; overflow-x: auto; padding: 6px; }
  .tpa-account-nav a { white-space: nowrap; }
  .tpa-article { display: block; }
  .tpa-article .tpa-side { margin-bottom: 16px; }
  .tpa-article .tpa-side div, .tpa-article .tpa-side ul { display: flex; flex-wrap: wrap; gap: 6px; }
  .tpa-article .tpa-side li { height: auto !important; }
  .tpa-article .tpa-side li a { border: 1px solid var(--line); border-radius: 20px; padding: 6px 12px !important; font-size: 12px; line-height: 1.2 !important; background: var(--paper); }
}
@media (max-width: 720px) {
  .tpa-auth > table, .tpa-register > table { padding: 10px 14px 18px; }
  .tpa-article-body { padding: 18px 14px; }
  .tpa-cart table img { height: auto; }
  .tpa-cat-list { max-height: 320px; overflow-y: auto; }
  .tpa-account-main #main_content td,
  .tpa-account-main #main_content th { display: block; width: 100% !important; text-align: left !important; }
}
