/* ASC365 storefront theme
   Shared visual system for the classic ASP pages. */

:root {
  --brand: #00a0e9;
  --brand-dark: #0079b8;
  --brand-light: #e6f6fe;
  --accent: #f4552a;
  --ink: #1f2937;
  --ink-soft: #4b5563;
  --muted: #6b7280;
  --line: #e3e8ef;
  --line-soft: #eef2f7;
  --bg: #f4f6f9;
  --card: #ffffff;
  --shadow-sm: 0 1px 2px rgba(16, 24, 40, .05);
  --shadow-md: 0 8px 24px rgba(15, 39, 64, .08);
  --radius: 12px;
  --radius-sm: 8px;
  --container: 1280px;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body.site,
body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font: 14px/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
}

img { max-width: 100%; height: auto; border: 0; }

a { color: var(--brand-dark); text-decoration: none; }
a:hover { color: var(--brand); text-decoration: none; }

h1, h2, h3, h4, p, ul, ol, form, table { margin: 0; padding: 0; }
ul, ol { list-style: none; }

.site-container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 20px;
}

/* ---------- Top bar ---------- */
.topbar {
  background: #0f2740;
  color: #cfdae6;
  font-size: 12px;
}
.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 38px;
}
.topbar-left { display: flex; align-items: center; gap: 8px; }
.topbar-left .dot { width: 6px; height: 6px; border-radius: 50%; background: #35d07f; display: inline-block; }
.topbar-right { display: flex; align-items: center; gap: 18px; }
.topbar-right a { color: #cfdae6; }
.topbar-right a:hover { color: #fff; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: #fff;
  border-bottom: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
}
.header-inner {
  display: flex;
  align-items: center;
  gap: 28px;
  min-height: 86px;
  padding-top: 12px;
  padding-bottom: 12px;
}
.site-brand { flex: 0 0 auto; display: block; }
.site-brand img { display: block; height: 56px; width: auto; }

.site-search { flex: 1 1 auto; min-width: 0; }
.site-search form { display: flex; align-items: stretch; height: 44px; }
.search-field {
  display: flex;
  flex: 1 1 auto;
  min-width: 0;
  border: 2px solid var(--brand);
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: #fff;
}
.search-field input[type="text"] {
  flex: 1 1 auto;
  min-width: 0;
  height: 100%;
  border: 0;
  outline: 0;
  padding: 0 14px;
  font-size: 14px;
  color: var(--ink);
  background: #fff;
}
.search-field input[type="text"]::placeholder { color: #9aa5b1; }
.search-field select {
  flex: 0 0 auto;
  max-width: 190px;
  height: 100%;
  border: 0;
  border-left: 1px solid var(--line);
  outline: 0;
  padding: 0 10px;
  font-size: 13px;
  color: var(--ink-soft);
  background: #f7f9fb;
  cursor: pointer;
}
.search-field button,
.btn-search {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 100%;
  min-width: 96px;
  border: 0;
  background: var(--brand);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}
.search-field button:hover { background: var(--brand-dark); }
.search-field button svg { width: 17px; height: 17px; }

.header-actions { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; }
.header-action {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  color: var(--ink-soft);
  line-height: 1.2;
}
.header-action:hover { background: var(--brand-light); color: var(--brand-dark); }
.header-action svg { width: 22px; height: 22px; flex: 0 0 auto; }
.header-action .label { display: flex; flex-direction: column; font-size: 11px; color: var(--muted); }
.header-action .label strong { font-size: 13px; color: var(--ink); font-weight: 600; }
.header-action:hover .label strong { color: var(--brand-dark); }
.cart-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  margin-left: 2px;
  border-radius: 9px;
  background: var(--accent);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
}

/* ---------- Primary nav ---------- */
.site-nav {
  background: #fff;
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  display: flex;
  align-items: center;
  gap: 4px;
  min-height: 46px;
  overflow-x: auto;
  scrollbar-width: none;
}
.nav-inner::-webkit-scrollbar { display: none; }
.nav-inner a {
  display: inline-flex;
  align-items: center;
  height: 46px;
  padding: 0 16px;
  color: var(--ink-soft);
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  border-bottom: 2px solid transparent;
}
.nav-inner a:hover { color: var(--brand-dark); border-bottom-color: var(--brand); }
.nav-inner a.is-active { color: var(--brand-dark); border-bottom-color: var(--brand); }
.nav-inner a.promo { color: var(--accent); }
.nav-inner a.promo:hover { border-bottom-color: var(--accent); }

/* ---------- Shell / layout ---------- */
.page-wrap { padding: 24px 0 48px; }
.site-main {
  display: grid;
  grid-template-columns: 248px minmax(0, 1fr);
  align-items: start;
  gap: 24px;
}
.content { min-width: 0; }

.page-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 16px; flex-wrap: wrap; }
.page-heading h1 { font-size: 24px; line-height: 1.25; color: var(--ink); font-weight: 700; letter-spacing: -.01em; }
.page-heading .sub { color: var(--muted); font-size: 13px; margin-top: 2px; }

.breadcrumb { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); margin-bottom: 16px; }
.breadcrumb a { color: var(--muted); }
.breadcrumb a:hover { color: var(--brand-dark); }
.breadcrumb .sep { color: #c3ccd7; }
.breadcrumb .current { color: var(--ink); font-weight: 600; }

/* ---------- Sidebar categories ---------- */
.cat-panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.cat-panel-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 15px 18px;
  background: linear-gradient(135deg, var(--brand) 0%, #33b3ee 100%);
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: .01em;
}
.cat-panel-header svg { width: 20px; height: 20px; }
.cat-list { padding: 4px 0; }
.cat-list li { border-bottom: 1px solid var(--line-soft); }
.cat-list li:last-child { border-bottom: 0; }
.cat-list a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 18px;
  color: var(--ink-soft);
  font-size: 13.5px;
}
.cat-list a:hover { background: #f3fafe; color: var(--brand-dark); padding-left: 22px; transition: padding .15s ease; }
.cat-list a.is-active { background: var(--brand-light); color: var(--brand-dark); font-weight: 700; box-shadow: inset 3px 0 0 var(--brand); }
.cat-list .count {
  flex: 0 0 auto;
  min-width: 28px;
  padding: 1px 7px;
  border-radius: 10px;
  background: #f0f3f7;
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  text-align: center;
}
.cat-list a:hover .count, .cat-list a.is-active .count { background: #d8f0fb; color: var(--brand-dark); }
.cat-list a.promo { color: var(--accent); font-weight: 700; }
.cat-list a.promo .count { background: #ffe9e3; color: var(--accent); }
.cat-sublist { background: #fbfdff; }
.cat-sublist a { padding-left: 34px; font-size: 13px; }
.cat-sublist a:hover { padding-left: 38px; }
.cat-subhead a {
  padding: 9px 16px 8px;
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.cat-subhead a:hover { padding-left: 18px; background: transparent; }
.cat-special { border-top: 1px solid var(--line); }
.cat-support {
  margin-top: 16px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow-sm);
  font-size: 13px;
  color: var(--muted);
}
.cat-support strong { display: block; color: var(--ink); font-size: 14px; margin-bottom: 4px; }
.cat-support a { font-weight: 600; }

/* ---------- Toolbar ---------- */
.content-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding: 12px 16px;
  margin-bottom: 18px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-size: 13px;
  color: var(--muted);
}
.per-page { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.per-page .label { margin-right: 4px; }
.per-page a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  height: 30px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--ink-soft);
  font-weight: 600;
}
.per-page a:hover { border-color: var(--brand); color: var(--brand-dark); }
.per-page a.is-active { background: var(--brand); border-color: var(--brand); color: #fff; }

/* ---------- Product grid ---------- */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(206px, 1fr));
  gap: 18px;
}
.product-card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 12px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.product-card:hover {
  transform: translateY(-3px);
  border-color: #b9e5f8;
  box-shadow: var(--shadow-md);
}
.product-card .thumb {
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border-radius: var(--radius-sm);
  background: #fff;
}
.product-card .thumb img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  transition: transform .25s ease;
}
.product-card:hover .thumb img { transform: scale(1.045); }
.product-title {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 39px;
  margin: 10px 0 4px;
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.5;
}
.product-card a.product-link:hover .product-title { color: var(--brand-dark); }
.product-sku { color: #9aa5b1; font-size: 11px; letter-spacing: .02em; }
.product-price { margin-top: 8px; color: var(--brand-dark); font-size: 18px; font-weight: 700; letter-spacing: -.01em; }
.product-price .cur { font-size: 13px; font-weight: 700; margin-right: 2px; }
.product-price .was {
  margin-left: 8px;
  color: #9aa5b1;
  font-size: 12px;
  font-weight: 400;
  text-decoration: line-through;
}
.product-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 2;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.product-badge.new { background: #16a34a; }
.product-card .watch {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(15, 39, 64, .72);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
}
.product-card .watch:hover { background: var(--brand); }

.empty-state {
  padding: 56px 24px;
  text-align: center;
  color: var(--muted);
  background: #fff;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
}
.empty-state strong { display: block; color: var(--ink); font-size: 16px; margin-bottom: 6px; }

/* ---------- Pagination ---------- */
.pager { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 6px; margin-top: 28px; }
.pager a, .pager span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 600;
}
.pager a:hover { border-color: var(--brand); color: var(--brand-dark); }
.pager .is-current { background: var(--brand); border-color: var(--brand); color: #fff; }
.pager .is-disabled { color: #c3ccd7; background: #f8fafc; }
.pager .gap { border: 0; background: transparent; color: var(--muted); }

/* ---------- Cards / content panels ---------- */
.page-card {
  padding: 24px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.page-card + .page-card { margin-top: 18px; }
.page-card h1, .page-card h2, .page-card h3 { color: var(--ink); line-height: 1.3; }
.page-card h1 { font-size: 24px; margin-bottom: 14px; }
.page-card h2 { font-size: 19px; margin: 22px 0 10px; }
.page-card h3 { font-size: 15px; margin: 18px 0 8px; }
.page-card p { margin: 10px 0; color: var(--ink-soft); }
.page-card ul, .page-card ol { margin: 10px 0 10px 20px; color: var(--ink-soft); }
.page-card ul { list-style: disc; }
.page-card ol { list-style: decimal; }
.page-card li { margin: 5px 0; }
.page-card table { width: 100%; border-collapse: collapse; }
.page-card table td, .page-card table th { padding: 8px 10px; }
.page-card img { max-width: 100%; }
.page-card a { text-decoration: underline; }
.page-card a.btn { text-decoration: none; }

.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
  font-size: 17px;
  font-weight: 700;
  color: var(--ink);
}

/* ---------- Forms ---------- */
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 18px; }
.form-field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.form-field.full { grid-column: 1 / -1; }
.form-field label, .form-label { color: var(--ink-soft); font-size: 12.5px; font-weight: 600; }
.form-field input[type="text"],
.form-field input[type="password"],
.form-field input[type="email"],
.form-field input[type="tel"],
.form-field input[type="number"],
.form-field input[type="file"],
.form-field select,
.form-field textarea,
.input {
  width: 100%;
  height: 40px;
  padding: 0 12px;
  border: 1px solid #cfd8e3;
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--ink);
  font-size: 14px;
  font-family: inherit;
  outline: 0;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.form-field textarea { height: auto; min-height: 120px; padding: 10px 12px; resize: vertical; }
.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus,
.input:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(0, 160, 233, .14);
}
.form-field .hint { color: var(--muted); font-size: 11.5px; }
.form-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 18px; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 20px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  background: #eef2f7;
  color: var(--ink-soft);
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
  transition: background .15s ease, border-color .15s ease, transform .05s ease;
}
.btn:hover { background: #e2e8f0; text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-dark); color: #fff; }
.btn-accent { background: var(--accent); color: #fff; }
.btn-accent:hover { background: #d8431c; color: #fff; }
.btn-ghost { background: #fff; border-color: var(--line); color: var(--ink-soft); }
.btn-ghost:hover { border-color: var(--brand); color: var(--brand-dark); background: #fff; }
.btn-block { width: 100%; }
.btn-sm { min-height: 32px; padding: 0 12px; font-size: 12.5px; }
.btn-lg { min-height: 46px; padding: 0 28px; font-size: 15px; }

/* ---------- Tables (cart, orders) ---------- */
.data-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.data-table th {
  padding: 11px 12px;
  background: #f7f9fc;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: .04em;
  text-align: left;
  text-transform: uppercase;
  white-space: nowrap;
}
.data-table td { padding: 12px; border-bottom: 1px solid var(--line-soft); color: var(--ink-soft); vertical-align: middle; }
.data-table tr:hover td { background: #fbfdff; }
.data-table img { max-width: 64px; height: auto; }
.data-table .price { color: var(--brand-dark); font-weight: 700; }
.data-table .qty { width: 72px; height: 34px; padding: 0 8px; border: 1px solid #cfd8e3; border-radius: 6px; text-align: center; }
.table-wrap { width: 100%; overflow-x: auto; }

/* ---------- Alerts ---------- */
.notice {
  padding: 12px 16px;
  margin: 0 0 16px;
  border: 1px solid #bae6fd;
  border-radius: var(--radius-sm);
  background: #f0f9ff;
  color: #075985;
  font-size: 13px;
}
.notice-success { border-color: #bbe9c9; background: #f0fdf4; color: #166534; }
.notice-error { border-color: #fecaca; background: #fef2f2; color: #991b1b; }
.notice-warning { border-color: #fde68a; background: #fffbeb; color: #92400e; }

/* ---------- Product detail ---------- */
.product-detail { display: grid; grid-template-columns: minmax(0, 1.02fr) minmax(0, 1fr); gap: 30px; }
.detail-gallery {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 360px;
  padding: 20px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.detail-gallery img { max-width: 100%; max-height: 520px; object-fit: contain; }
.detail-info h1 { font-size: 23px; line-height: 1.35; color: var(--ink); margin-bottom: 10px; }
.detail-sku { color: var(--muted); font-size: 12px; }
.detail-price {
  margin: 16px 0;
  padding: 16px 0;
  border-top: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
  color: var(--brand-dark);
  font-size: 30px;
  font-weight: 800;
  letter-spacing: -.02em;
}
.detail-price .cur { font-size: 17px; margin-right: 3px; }
.detail-price .was { margin-left: 12px; color: #9aa5b1; font-size: 15px; font-weight: 400; text-decoration: line-through; }
.detail-desc { color: var(--ink-soft); font-size: 13.5px; line-height: 1.75; }
.detail-desc img { max-width: 100%; height: auto; }
.detail-desc table { max-width: 100%; }
.detail-desc td { max-width: 100%; }
.buy-box { display: flex; align-items: flex-end; gap: 14px; flex-wrap: wrap; margin-top: 20px; padding: 16px; border: 1px solid var(--line); border-radius: var(--radius); background: #fbfdff; }
.buy-box .form-field { width: 96px; }
.buy-box .form-field input { height: 42px; text-align: center; }
.detail-meta { display: grid; gap: 8px; margin-top: 18px; color: var(--muted); font-size: 12.5px; }
.detail-meta span strong { color: var(--ink-soft); font-weight: 600; }

/* ---------- Footer ---------- */
.site-footer { margin-top: 12px; background: #0f2740; color: #c7d3e0; }
.footer-main {
  display: grid;
  grid-template-columns: 1.35fr .85fr .85fr 1.05fr;
  gap: 32px;
  padding: 44px 0 34px;
}
.footer-col h3 {
  margin: 0 0 14px;
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .03em;
  text-transform: uppercase;
}
.footer-col p, .footer-col li { color: #aebdcd; font-size: 13px; line-height: 1.8; }
.footer-col ul { display: grid; gap: 2px; }
.footer-col a { color: #aebdcd; }
.footer-col a:hover { color: #fff; }
.footer-contact strong { color: #fff; font-weight: 600; }
.footer-brand img { display: block; height: 48px; width: auto; margin-bottom: 12px; background: #fff; padding: 6px 8px; border-radius: 8px; }
.footer-tagline { color: #8fa3b8; font-size: 12.5px; }
.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, .08);
  background: #0b1f33;
}
.footer-bottom-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding: 16px 0;
  color: #8fa3b8;
  font-size: 12px;
}
.footer-bottom-inner a { color: #aebdcd; }
.footer-bottom-inner a:hover { color: #fff; }

/* ---------- Legacy content normalisation ---------- */
.content font, .page-card font { font-family: inherit; }
.content > table, .page-card > table { width: 100%; }
.content > center { text-align: left; }

/* Hide old duplicated page chrome when legacy includes are reused */
body.site > table:first-of-type { width: 100%; }

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .header-inner { flex-wrap: wrap; gap: 14px 20px; }
  .header-actions { margin-left: auto; }
  .site-search { order: 3; flex: 1 1 100%; }
  .site-search { order: 3; flex-basis: 100%; }
  .header-actions { margin-left: auto; }
  .site-main { grid-template-columns: 220px minmax(0, 1fr); gap: 18px; }
  .product-detail { grid-template-columns: 1fr; }
  .footer-main { grid-template-columns: 1fr 1fr; gap: 26px; }
}

@media (max-width: 820px) {
  .site-main { grid-template-columns: 1fr; }
  .cat-panel { position: static; }
  .cat-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cat-list li { border-bottom: 1px solid var(--line-soft); }
  .cat-list a { padding: 11px 14px; }
  .cat-list a:hover { padding-left: 16px; }
  .cat-sublist { display: none; }
  .cat-support { display: none; }
  .page-heading h1 { font-size: 21px; }
  .topbar-left { display: none; }
  .topbar-inner { justify-content: flex-end; }
}

@media (max-width: 640px) {
  .site-container { padding: 0 14px; }
  .header-inner { min-height: 72px; }
  .site-brand img { height: 44px; }
  .header-action .label { display: none; }
  .header-action { padding: 8px; }
  .search-field select { display: none; }
  .search-field button { min-width: 52px; }
  .search-field button span { display: none; }
  .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .product-card { padding: 9px; }
  .product-title { font-size: 12px; min-height: 36px; }
  .product-price { font-size: 16px; }
  .page-wrap { padding: 16px 0 32px; }
  .footer-main { grid-template-columns: 1fr; padding: 32px 0 24px; }
  .form-grid { grid-template-columns: 1fr; }
  .page-card { padding: 18px; }
  .cat-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .nav-inner a { padding: 0 12px; font-size: 13px; }
  .topbar-right { gap: 10px; font-size: 11px; }
}

/* ---------- Shopping cart ---------- */
.cart-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 16px;
  margin-bottom: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}
.cart-thumb {
  flex: 0 0 84px;
  width: 84px;
  height: 84px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm);
  background: #fff;
  overflow: hidden;
}
.cart-thumb img { max-width: 100%; max-height: 100%; object-fit: contain; }
.cart-item-form { display: flex; align-items: center; gap: 16px; flex: 1; min-width: 0; }
.cart-item-main { flex: 1; min-width: 0; }
.cart-item-title {
  display: block;
  color: var(--ink);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.45;
  text-decoration: none;
}
.cart-item-title:hover { color: var(--brand-dark); }
.cart-item-title .product-sku { display: block; margin-bottom: 2px; }
.cart-item-meta { margin-top: 4px; color: var(--muted); font-size: 12px; }
.cart-item-side { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; justify-content: flex-end; }
.cart-qty { display: inline-flex; align-items: center; gap: 6px; color: var(--ink-soft); font-size: 12.5px; font-weight: 600; }
.cart-qty .input { width: 72px; height: 34px; text-align: center; padding: 0 6px; }
.cart-line-total { min-width: 90px; text-align: right; color: var(--brand-dark); font-size: 15px; font-weight: 700; }
.cart-summary { margin: 18px 0; }
.cart-summary .data-table th { background: var(--brand); color: #fff; }
.cart-summary .data-table td { background: #fbfdff; text-align: center; color: var(--ink); }
.cart-summary .grand-total { color: var(--accent); font-size: 15px; }
.checkout-card {
  margin: 18px 0;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  text-align: center;
}
.check-terms { display: inline-flex; align-items: center; gap: 8px; color: var(--ink-soft); font-size: 13.5px; cursor: pointer; }
.check-terms a { color: var(--brand-dark); }
.checkout-info { margin: 0 0 14px; color: var(--ink-soft); font-size: 14px; }
.checkout-hint { margin: 10px 0 0; color: var(--brand-dark); font-size: 12.5px; }
.checkout-notes {
  margin-top: 18px;
  padding: 16px 18px;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  background: #fafcfe;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.9;
}
.checkout-notes p { margin: 0; }
@media (max-width: 820px) {
  .cart-item { align-items: flex-start; }
  .cart-item-form { flex-direction: column; align-items: stretch; }
  .cart-item-side { justify-content: space-between; }
  .cart-line-total { text-align: left; }
}
@media (max-width: 640px) {
  .cart-item { flex-direction: column; align-items: stretch; }
  .cart-thumb { align-self: center; }
}

/* ---------- Auth pages ---------- */
.auth-grid { display: grid; grid-template-columns: minmax(0, 380px) minmax(0, 1fr); gap: 20px; align-items: start; }
.auth-card { padding: 24px; }
.auth-card-single { max-width: 560px; }
.auth-card .form-field { margin-bottom: 12px; }
.auth-card .form-actions { margin-top: 6px; }
.auth-note { margin: 0 0 12px; color: var(--muted); font-size: 12.5px; line-height: 1.7; }
.auth-terms { margin: 14px 0 4px; }
.req { color: var(--accent); }
@media (max-width: 820px) {
  .auth-grid { grid-template-columns: 1fr; }
}

/* ---------- Account ---------- */
.account-layout { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 20px; align-items: start; }
.account-nav {
  display: flex;
  flex-direction: column;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}
.account-link {
  display: block;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  color: var(--ink-soft);
  font-size: 13.5px;
  font-weight: 600;
  text-decoration: none;
}
.account-link:hover { background: var(--brand-light); color: var(--brand-dark); text-decoration: none; }
.account-link.is-active { background: var(--brand); color: #fff; }
.account-main { min-width: 0; }
.account-main table { width: 100% !important; max-width: 100%; border-collapse: collapse; background: #fff; }
.account-main table td, .account-main table th { padding: 9px 11px; border-bottom: 1px solid var(--line-soft); text-align: left; vertical-align: top; }
.account-main table th { color: var(--ink); font-weight: 700; }
.account-main table[border="1"] { border: 1px solid var(--line); }
.account-main font { font-family: inherit !important; }
.account-main form { margin: 0; }
.account-main input[type="text"], .account-main input[type="password"], .account-main select, .account-main textarea {
  max-width: 100%;
  padding: 7px 10px;
  border: 1px solid #cfd8e3;
  border-radius: 6px;
  font-family: inherit;
  font-size: 13px;
}
.account-main input[type="submit"], .account-main button {
  min-height: 34px;
  padding: 0 14px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: var(--brand);
  color: #fff;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.account-main input[type="submit"]:hover, .account-main button:hover { background: var(--brand-dark); }
@media (max-width: 820px) {
  .account-layout { grid-template-columns: 1fr; }
  .account-nav { flex-direction: row; flex-wrap: wrap; }
}

/* ---------- Content / policy pages ---------- */
.content-with-aside { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 20px; align-items: start; }
.content-body { padding: 26px 28px; line-height: 1.8; color: var(--ink-soft); font-size: 14px; }
.content-body h1, .content-body h2, .content-body h3 { color: var(--ink); line-height: 1.35; margin: 22px 0 10px; }
.content-body h1 { font-size: 24px; margin-top: 0; }
.content-body h2 { font-size: 19px; }
.content-body h3 { font-size: 16px; }
.content-body p { margin: 0 0 12px; }
.content-body ul, .content-body ol { margin: 0 0 12px; padding-left: 22px; }
.content-body table { width: 100%; border-collapse: collapse; margin: 14px 0; }
.content-body td, .content-body th { padding: 8px 10px; border: 1px solid var(--line); }
.content-body img { max-width: 100%; height: auto; }
.content-body font, .content-body span { font-family: inherit; }
.content-aside { padding: 18px; }
.aside-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.aside-list a { display: block; padding: 8px 10px; border-radius: var(--radius-sm); color: var(--ink-soft); font-size: 13px; text-decoration: none; }
.aside-list a:hover { background: var(--brand-light); color: var(--brand-dark); }
.aside-list a.is-active { background: var(--brand); color: #fff; font-weight: 600; }
.status-pill { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 11.5px; font-weight: 700; }
.status-open { background: #fff7ed; color: #c2410c; }
.status-done { background: #ecfdf5; color: #047857; }
.table-empty { text-align: center; color: var(--muted); padding: 26px 12px; }
.thread { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.thread-item { border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: hidden; }
.thread-head { display: flex; justify-content: space-between; gap: 12px; padding: 10px 14px; background: var(--bg); border-bottom: 1px solid var(--line-soft); font-size: 13px; }
.thread-head span { color: var(--muted); font-size: 12px; }
.thread-body { padding: 14px; font-size: 13.5px; line-height: 1.8; color: var(--ink-soft); word-break: break-word; }
.order-head td { background: var(--bg); border-top: 1px solid var(--line); }
.order-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; margin-bottom: 6px; font-size: 12.5px; color: var(--muted); }
.order-meta strong { color: var(--ink); font-weight: 600; margin-right: 4px; }
.order-thumb { display: inline-flex; align-items: center; justify-content: center; width: 64px; height: 64px; padding: 4px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: #fff; }
.order-thumb img { max-width: 100%; max-height: 100%; }
.order-name { color: var(--brand-dark); font-weight: 600; text-decoration: none; }
.order-name:hover { text-decoration: underline; }
.link-danger { color: #c2410c; font-size: 12.5px; font-weight: 600; text-decoration: none; }
.link-danger:hover { text-decoration: underline; }
@media (max-width: 820px) {
  .content-with-aside { grid-template-columns: 1fr; }
}

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; align-items: start; }
.contact-card { padding: 22px; }
.contact-card p { margin: 0 0 12px; color: var(--ink-soft); font-size: 13.5px; line-height: 1.8; }
.hours-table td { padding: 8px 0; border-bottom: 1px solid var(--line-soft); font-size: 13.5px; }
.hours-table td:last-child { text-align: right; color: var(--ink); font-weight: 600; }
.muted-note { color: var(--muted); font-size: 12px; }
@media (max-width: 1080px) {
  .contact-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .contact-grid { grid-template-columns: 1fr; }
}

/* ---------- Used / special detail ---------- */
.detail-tag { display: inline-block; margin-bottom: 8px; padding: 3px 10px; border-radius: 999px; background: var(--accent); color: #fff; font-size: 11.5px; font-weight: 700; }
.buy-qty { display: flex; flex-direction: column; gap: 4px; color: var(--ink-soft); font-size: 12.5px; font-weight: 600; }
.buy-qty .input { width: 92px; height: 42px; text-align: center; }
.badge-out { color: #b91c1c; font-weight: 700; font-size: 14px; }
.pricewatch-form { margin-top: 12px; }

/* ---------- Price watch ---------- */
.price-alert-box { margin-top: 20px; padding: 18px; border: 1px solid var(--line); border-radius: var(--radius); background: #fbfdff; }
.price-alert-box h3 { margin: 0 0 12px; font-size: 14px; color: var(--ink); }
.radio-line { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; color: var(--ink-soft); font-size: 13.5px; }
.radio-line .input { width: 110px; height: 34px; }
