:root {
  --bg: #ffffff;
  --text: #111111;
  --muted: #6b7280;
  --line: #e5e7eb;
  --soft: #f8f8f8;
  --primary: #111111;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.55;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
.container { width: min(1240px, 92%); margin: 0 auto; }
.muted { color: var(--muted); }
.section { padding: 56px 0; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 22px; }

.header-stack {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.95);
  border-bottom: 1px solid var(--line);
  backdrop-filter: saturate(180%) blur(8px);
}
.site-header {
  border-bottom: none;
}
.header-inner {
  min-height: 76px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 20px;
}
.header-left { display: flex; align-items: center; gap: 14px; }
.menu-toggle { display: none; background: transparent; border: none; padding: 6px; cursor: pointer; }
.menu-toggle span { display: block; width: 20px; height: 2px; background: #111; margin: 4px 0; }
.brand { text-decoration: none; font-weight: 700; letter-spacing: 0.01em; }
.brand img { width: 140px; height: 34px; object-fit: contain; }
.main-nav { display: flex; justify-content: center; gap: 26px; }
.main-nav a { text-decoration: none; font-weight: 500; }
.header-right {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 6px 10px;
  flex-wrap: nowrap;
  min-width: 0;
}
.header-right .cart-link,
.header-right .account-link,
.header-right .order-status-link {
  flex: 0 0 auto;
  white-space: nowrap;
}
.header-right form {
  flex: 0 0 auto;
}
.header-right .header-logout-btn,
.header-right .btn.btn-danger {
  padding: 7px 12px;
  font-size: 13px;
  border-radius: 10px;
  white-space: nowrap;
}
.search-form input {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 10px 14px;
  min-width: 190px;
}
@media (min-width: 761px) and (max-width: 1100px) {
  .search-form input {
    min-width: 120px;
    max-width: 160px;
  }
  .header-right {
    gap: 4px 8px;
  }
  .header-right .cart-link,
  .header-right .account-link,
  .header-right .order-status-link {
    font-size: 13px;
  }
}

.category-strip {
  border-top: 1px solid var(--line);
  background: inherit;
}
.category-strip-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  row-gap: 8px;
  padding: 10px 0 12px;
  min-height: 44px;
}
.category-pill {
  flex: 0 0 auto;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  color: var(--muted);
  border: 1px solid transparent;
  white-space: nowrap;
}
.category-pill:hover {
  color: var(--text);
  background: var(--soft);
}
.category-pill.is-active {
  color: var(--primary);
  background: var(--soft);
  border-color: var(--line);
}

@media (min-width: 761px) {
  .main-nav-categories {
    display: none !important;
  }
}
.main-nav-categories-label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 10px;
}
.main-nav-categories-inner {
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: stretch;
}
.main-nav-categories-inner .category-pill {
  display: block;
  text-align: left;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--soft);
}
.main-nav-categories-inner .category-pill.is-active {
  border-color: var(--primary);
  background: #fff;
}

/* USDT pay page: keep Copy button next to address, not at far right of card */
.usdt-address-copy-row {
  display: block;
  margin-top: 6px;
  line-height: 1.5;
}
.usdt-address-code {
  display: inline;
  word-break: break-all;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.95em;
}
.usdt-address-copy-row .copy-usdt-address {
  display: inline-block;
  vertical-align: top;
  margin: 0 0 0 10px;
  padding: 8px 14px;
  font-size: 13px;
  border-radius: 10px;
}

.usdt-network-warning {
  margin: 14px 0 0;
  padding: 11px 14px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.45;
  text-align: center;
  background: #fef08a;
  border: 1px solid #eab308;
  color: #713f12;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

.cart-link { text-decoration: none; font-weight: 600; }

.hero-banner { background: #f5f5f5; padding: 84px 0; }
.hero-banner .eyebrow { margin: 0; font-size: 12px; letter-spacing: 0.14em; color: var(--muted); }
.hero-banner h1 { margin: 8px 0 10px; font-size: clamp(32px, 5vw, 56px); line-height: 1.1; max-width: 760px; }
.hero-banner p { margin: 0; max-width: 640px; color: #4b5563; }
.hero-actions { margin-top: 28px; display: flex; gap: 12px; flex-wrap: wrap; }

/* Image banner: align with .container; show full image (letterbox if needed) */
.hero-banner.has-banner {
  position: relative;
  overflow: visible;
  padding: 20px 0 8px;
  height: auto;
  background: transparent;
}
.hero-banner.has-banner .hero-banner-media {
  display: flex;
  align-items: center;
  justify-content: center;
  width: min(1240px, 92%);
  margin: 0 auto;
  min-height: 0;
  max-height: min(52vh, 320px);
  border-radius: 14px;
  overflow: hidden;
  background: #0b0b0c;
}
.hero-banner.has-banner .hero-banner-media img {
  width: 100%;
  height: auto;
  max-height: min(52vh, 320px);
  object-fit: contain;
  object-position: center;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  border-radius: 999px;
  border: 1px solid var(--primary);
  padding: 12px 20px;
  cursor: pointer;
  font: inherit;
  font-weight: 600;
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-ghost { background: transparent; color: var(--primary); }
.btn-dark { background: #111; color: #fff; }
.btn-block { width: 100%; }

.collection-grid { display: grid; gap: 14px; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.collection-card {
  border: 1px solid var(--line);
  background: #fff;
  text-decoration: none;
  border-radius: 14px;
  min-height: 120px;
  padding: 20px;
  display: grid;
  align-content: space-between;
}
.collection-card small { color: var(--muted); }

.product-grid { display: grid; gap: 16px; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.product-card {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 14px;
  overflow: hidden;
  padding-bottom: 14px;
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.thumb-wrap {
  display: block;
  aspect-ratio: 1 / 1.08;
  background: var(--soft);
  flex-shrink: 0;
}
.thumb-wrap img { width: 100%; height: 100%; object-fit: cover; }
.product-card h3 {
  font-size: 16px;
  margin: 14px 14px 8px;
  line-height: 1.35;
  min-height: calc(1.35em * 2);
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  overflow: hidden;
  word-break: break-word;
}
.product-card h3 a {
  color: inherit;
  text-decoration: none;
}
.price-line { margin: 0 14px 10px; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; flex-shrink: 0; }
.price-line s.price-compare-at,
.price-line .price-compare-at {
  color: var(--muted);
  text-decoration: line-through;
  font-weight: 400;
}
.quick-link {
  text-decoration: none;
  margin: auto 14px 0;
  color: #111;
  font-weight: 600;
  flex-shrink: 0;
}

.article-grid { display: grid; gap: 16px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.article-card {
  text-decoration: none;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 18px;
  background: #fff;
}
.article-cover { aspect-ratio: 16 / 9; border-radius: 10px; overflow: hidden; margin-bottom: 12px; background: var(--soft); }
.article-cover img { width: 100%; height: 100%; object-fit: cover; }

.section-newsletter { background: #f5f5f5; }
.newsletter-box { text-align: center; max-width: 680px; }
.newsletter-form { display: flex; gap: 10px; justify-content: center; margin-top: 14px; }
.newsletter-form input { flex: 1; min-width: 180px; border: 1px solid var(--line); border-radius: 999px; padding: 12px 14px; }

.product-detail-top {
  display: grid;
  gap: 28px;
  grid-template-columns: 1.05fr 0.95fr;
  align-items: start;
}
.product-detail-bottom {
  margin-top: 28px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}
.product-detail-spec .product-description-html {
  max-width: 920px;
}
.product-detail-spec .product-description-html table {
  width: 100%;
  max-width: 720px;
  border-collapse: collapse;
  font-size: 15px;
}
.product-detail-spec .product-description-html table th,
.product-detail-spec .product-description-html table td {
  border-bottom: 1px solid var(--line);
  padding: 10px 14px;
  text-align: left;
  vertical-align: top;
}
.product-detail-spec .product-description-html table th:first-child,
.product-detail-spec .product-description-html table td:first-child {
  font-weight: 700;
  width: 38%;
  color: #0f172a;
}
.product-detail-spec .product-description-html table tr:last-child th,
.product-detail-spec .product-description-html table tr:last-child td {
  border-bottom: none;
}
.product-detail-bottom .desc-block {
  margin-top: 0;
  border-top: none;
  padding-top: 0;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.variant-select-sr {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.gallery-wrap {
  width: 100%;
  min-width: 0;
}
.main-shot {
  position: relative;
  width: 100%;
  max-width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--soft);
}
.main-shot-frame {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: zoom-in;
}
.main-shot-frame .main-shot-img,
.main-shot-frame img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}
.main-shot-zoom-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 4;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  border: 1px solid rgba(15, 23, 42, 0.14);
  background: rgba(255, 255, 255, 0.96);
  color: #0f172a;
  display: grid;
  place-items: center;
  padding: 0;
  cursor: pointer;
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.08);
}
.main-shot-zoom-btn:hover {
  background: #fff;
}
.main-shot-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 42px;
  height: 42px;
  border-radius: 999px;
  border: 1px solid rgba(15, 23, 42, 0.14);
  background: rgba(255, 255, 255, 0.95);
  color: #0f172a;
  display: grid;
  place-items: center;
  font-size: 24px;
  line-height: 1;
  padding: 0;
  cursor: pointer;
  z-index: 5;
}
.main-shot-nav:hover { background: #fff; }
.main-shot-nav.prev { left: 10px; }
.main-shot-nav.next { right: 10px; }
.main-shot-nav[hidden] { display: none !important; }
.product-image-lightbox {
  position: fixed;
  inset: 0;
  z-index: 10050;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  box-sizing: border-box;
}
.product-image-lightbox[hidden] {
  display: none !important;
}
.product-image-lightbox__backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  padding: 0;
  margin: 0;
  background: rgba(15, 23, 42, 0.78);
  cursor: pointer;
}
.product-image-lightbox__inner {
  position: relative;
  z-index: 1;
  max-width: min(96vw, 1280px);
  max-height: 92vh;
}
.product-image-lightbox__img {
  display: block;
  max-width: min(96vw, 1280px);
  max-height: 88vh;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 10px;
  box-shadow: 0 12px 48px rgba(0, 0, 0, 0.35);
}
.product-image-lightbox__close {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 2;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  border: 0;
  background: rgba(255, 255, 255, 0.95);
  color: #0f172a;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
  display: grid;
  place-items: center;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}
.product-image-lightbox__close:hover {
  background: #fff;
}
.thumb-strip {
  position: relative;
  margin-top: 10px;
  padding: 0 30px;
}
.thumb-row {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scroll-behavior: smooth;
  scrollbar-width: thin;
}
.thumb-item {
  flex: 0 0 88px;
  width: 88px;
  border: 1px solid var(--line);
  padding: 0;
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
  cursor: pointer;
  aspect-ratio: 1 / 1;
}
.thumb-item.active { border-color: #111; }
.thumb-item img { width: 100%; height: 100%; object-fit: cover; }
.thumb-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 26px;
  height: 26px;
  border-radius: 999px;
  border: 1px solid rgba(15, 23, 42, 0.14);
  background: rgba(255, 255, 255, 0.95);
  color: #0f172a;
  display: grid;
  place-items: center;
  font-size: 18px;
  line-height: 1;
  padding: 0;
  z-index: 2;
}
.thumb-nav.prev { left: 0; }
.thumb-nav.next { right: 0; }
.thumb-nav[hidden] { display: none !important; }
.detail-wrap h1 { margin: 0 0 6px; }
.variant-block { margin-top: 16px; display: grid; gap: 8px; max-width: 440px; }
.variant-pill-fieldset {
  border: 0;
  margin: 0;
  padding: 0;
  min-width: 0;
}
.variant-pill-legend {
  font-size: 14px;
  font-weight: 600;
  margin: 0 0 8px;
  padding: 0;
  color: var(--ink, #0f172a);
}
.variant-pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.variant-pill {
  display: inline-flex;
  align-items: stretch;
  cursor: pointer;
  margin: 0;
}
.variant-pill input {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
  opacity: 0;
}
.variant-pill:has(input:focus-visible) span {
  outline: 2px solid #111;
  outline-offset: 2px;
}
.variant-pill span {
  display: inline-block;
  padding: 10px 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  font-size: 14px;
  line-height: 1.25;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.variant-pill input:checked + span {
  border-color: #111;
  background: #f1f5f9;
  font-weight: 600;
}
.variant-pill:hover span {
  border-color: #94a3b8;
}
.product-moq-line { margin: 0; font-size: 14px; }
.touch-field, .variant-block input, .search-inline input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px;
  font: inherit;
}
.action-row { display: flex; gap: 10px; margin-top: 8px; }

.product-secondary-cta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 12px;
}
.product-secondary-cta .btn-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 14px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 14px;
  text-decoration: none;
  text-align: center;
  border: 1px solid;
  line-height: 1.2;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
  box-sizing: border-box;
}
.product-secondary-cta button.btn-pill {
  font: inherit;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
}
.btn-inquiry {
  background: #fff;
  border-color: #dc2626;
  color: #dc2626;
}
.btn-inquiry:hover:not(.is-disabled) {
  background: #fef2f2;
}
.btn-chat {
  background: #fff;
  border-color: #1f2937;
  color: #111827;
}
.btn-chat:hover:not(.is-disabled) {
  background: #f9fafb;
}
.btn-pill.is-disabled {
  opacity: 0.45;
  pointer-events: none;
  cursor: not-allowed;
}
.chat-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #2563eb;
  flex-shrink: 0;
}
.product-cta-hint {
  margin: 10px 0 0;
  font-size: 12px;
  max-width: 440px;
}

/* Standalone Send Inquiry page (MIC-style) */
.send-inquiry-page {
  max-width: 720px;
  margin: 0 auto;
  padding-bottom: 48px;
}
.inq-page-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 12px;
}
.inq-brand {
  font-weight: 700;
  font-size: 18px;
  color: #b91c1c;
  text-decoration: none;
}
.inq-page-title {
  margin: 0;
  font-size: 20px;
  font-weight: 600;
}
.inq-banner-success {
  background: #ecfdf5;
  border: 1px solid #6ee7b7;
  color: #065f46;
  padding: 12px 14px;
  border-radius: 10px;
}
.inq-banner-error {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #991b1b;
  padding: 12px 14px;
  border-radius: 10px;
  margin-bottom: 14px;
}
.inq-product-card {
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 16px 18px;
  margin-bottom: 20px;
}
.inq-supplier-name {
  margin: 0 0 12px;
  font-weight: 600;
  font-size: 15px;
  color: #0f172a;
}
.inq-product-row {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}
.inq-thumb-wrap {
  flex-shrink: 0;
}
.inq-thumb {
  width: 88px;
  height: 88px;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid #e2e8f0;
  display: block;
}
.inq-product-text {
  flex: 1;
  min-width: 0;
}
.inq-product-title {
  display: block;
  font-size: 15px;
  font-weight: 600;
  color: #1d4ed8;
  text-decoration: none;
  line-height: 1.35;
  margin-bottom: 12px;
}
.inq-product-title:hover {
  text-decoration: underline;
}
.inq-qty-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}
.inq-qty-label {
  font-size: 14px;
  color: #334155;
}
.inq-qty-input {
  width: 88px;
  padding: 8px 10px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  font: inherit;
}
.inq-unit-select {
  padding: 8px 10px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  font: inherit;
  background: #fff;
}
.inq-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.inq-hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.inq-label {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.inq-label-text {
  font-size: 14px;
  font-weight: 600;
  color: #0f172a;
}
.inq-req {
  color: #dc2626;
}
.inq-textarea,
.inq-input {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  padding: 12px;
  font: inherit;
}
.inq-textarea {
  min-height: 200px;
  resize: vertical;
}
.inq-char-hint {
  align-self: flex-end;
  font-size: 12px;
  color: #64748b;
}
.inq-attach-note {
  font-size: 13px;
  margin: -8px 0 0;
}
.inq-submit-wrap {
  margin-top: 8px;
}
.inq-submit-btn {
  appearance: none;
  -webkit-appearance: none;
  border: 0;
  border-radius: 4px;
  background: #dc2626;
  color: #fff;
  font-weight: 700;
  font-size: 16px;
  padding: 14px 36px;
  cursor: pointer;
}
.inq-submit-btn:hover {
  background: #b91c1c;
}

/* Live chat page */
.live-chat-page {
  max-width: 640px;
  margin: 0 auto;
  padding-bottom: 48px;
}
.lc-header {
  margin-bottom: 16px;
}
.lc-brand {
  font-weight: 700;
  color: #0f172a;
  text-decoration: none;
}
.lc-title {
  margin: 8px 0 4px;
  font-size: 22px;
}
.lc-banner-error {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #991b1b;
  padding: 10px 12px;
  border-radius: 8px;
  margin-bottom: 12px;
}
.lc-banner-success {
  background: #ecfdf5;
  border: 1px solid #6ee7b7;
  color: #065f46;
  padding: 10px 12px;
  border-radius: 8px;
  margin-bottom: 12px;
}
.lc-thread {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px;
  max-height: 360px;
  overflow-y: auto;
  background: #f8fafc;
  margin-bottom: 16px;
}
.lc-msg {
  margin-bottom: 12px;
}
.lc-msg-meta {
  font-size: 12px;
  color: #64748b;
  margin-bottom: 4px;
}
.lc-msg-body {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 10px 12px;
  white-space: pre-wrap;
  word-break: break-word;
}
.lc-compose {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.lc-hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.lc-label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 14px;
}
.lc-input,
.lc-textarea {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  font: inherit;
}
.lc-req {
  color: #dc2626;
}

/* Product inquiry / chat modal (on-site; replaces mailto) */
.pim-root { position: relative; }
.pim-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  z-index: 1000;
}
.pim-dialog {
  position: fixed;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 1001;
  width: min(520px, 94vw);
  max-height: min(90vh, 720px);
  overflow: auto;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  padding: 20px 20px 16px;
}
.pim-close {
  position: absolute;
  right: 12px;
  top: 8px;
  border: none;
  background: transparent;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  color: #64748b;
}
.pim-title { margin: 0 36px 8px 0; font-size: 1.25rem; }
.pim-sub { margin: 0 0 12px; font-size: 14px; line-height: 1.45; }
.pim-live-wrap { margin-bottom: 12px; display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.pim-open-chat { text-decoration: none; }
.pim-live-or { font-size: 13px; }
.pim-form { display: grid; gap: 10px; }
.pim-field span { display: block; font-size: 13px; font-weight: 600; margin-bottom: 4px; }
.pim-req { color: #b91c1c; }
.pim-field input,
.pim-field textarea {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid var(--line, #e2e8f0);
  border-radius: 10px;
  padding: 10px 12px;
  font: inherit;
}
.pim-hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.pim-error { color: #b91c1c; margin: 0; font-size: 14px; }
.pim-success { color: #047857; margin: 0; font-size: 14px; }
.pim-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 8px; }
body.pim-open { overflow: hidden; }

.desc-block { margin-top: 20px; border-top: 1px solid var(--line); padding-top: 14px; }

.product-description-html {
  font-size: 16px;
  line-height: 1.65;
  color: inherit;
  word-wrap: break-word;
}
.product-description-html p { margin: 0 0 12px; }
.product-description-html h2,
.product-description-html h3,
.product-description-html h4 { margin: 18px 0 8px; line-height: 1.3; }
.product-description-html ul,
.product-description-html ol { margin: 8px 0 12px; padding-left: 1.35em; }
.product-description-html img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  margin: 10px 0;
}
.product-description-html table {
  width: 100%;
  border-collapse: collapse;
  margin: 12px 0;
  font-size: 15px;
}
.product-description-html th,
.product-description-html td {
  border: 1px solid var(--line);
  padding: 8px 10px;
  text-align: left;
}
.product-description-html a { color: #2563eb; }

.volume-tier-card {
  margin-top: 14px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--soft);
}
.volume-tier-heading { margin: 0 0 6px; font-size: 1.05rem; }
.volume-tier-lead { margin: 0 0 10px; font-size: 13px; }
.volume-tier-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.volume-tier-table th,
.volume-tier-table td { border: 1px solid var(--line); padding: 8px 10px; text-align: left; }
.volume-tier-table th { background: #fff; }
.volume-tier-live { margin: 10px 0 0; font-size: 13px; min-height: 1.2em; }

.admin-tier-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.admin-tier-table th,
.admin-tier-table td { border: 1px solid #e2e8f0; padding: 8px 10px; text-align: left; }
.admin-tier-table th { background: #f1f5f9; }
.admin-tier-input { width: 100%; max-width: 140px; padding: 6px 8px; border: 1px solid #cbd5e1; border-radius: 8px; font: inherit; }

.article-layout { display: grid; gap: 26px; grid-template-columns: minmax(0, 1fr) 320px; }
.article-main { max-width: 780px; }
.article-hero { aspect-ratio: 16 / 9; border-radius: 14px; overflow: hidden; margin-bottom: 18px; background: var(--soft); }
.article-content { font-size: 17px; }
.article-side .list { display: grid; gap: 10px; }
.list-item {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px;
  text-decoration: none;
  background: #fff;
}

.cart-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 20px; align-items: start; }
.cart-summary { border: 1px solid var(--line); border-radius: 14px; padding: 18px; background: #fff; position: sticky; top: 92px; }

.site-footer { margin-top: 52px; border-top: 1px solid var(--line); background: #fafafa; }
.footer-grid { padding: 40px 0 20px; display: grid; gap: 24px; grid-template-columns: 1.2fr 1fr 1fr; }
.footer-grid h4 { margin: 0 0 10px; }
.footer-grid a { display: block; margin-bottom: 6px; text-decoration: none; color: #374151; }
.footer-bottom { border-top: 1px solid var(--line); padding: 14px 0 22px; color: #6b7280; }

.search-inline { display: flex; gap: 8px; align-items: center; }
.order-form { max-width: 560px; display: grid; gap: 10px; }
.payment-methods { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; margin-top: 8px; }
.payment-methods legend { padding: 0 6px; font-weight: 600; }
.payment-option { display: flex; align-items: flex-start; gap: 10px; margin: 10px 0; cursor: pointer; }
.payment-option input { margin-top: 3px; }
.payment-option--disabled { opacity: 0.5; cursor: not-allowed; color: #9ca3af; }
.payment-option--disabled input[type="radio"] { cursor: not-allowed; }
.wallet-balance-amount { font-weight: 700; }

@media (max-width: 1024px) {
  .product-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .collection-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .article-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .article-layout { grid-template-columns: 1fr; }
  .cart-layout { grid-template-columns: 1fr; }
  .cart-summary { position: static; }
}
@media (max-width: 760px) {
  body {
    overflow-x: hidden;
    padding-left: max(0px, env(safe-area-inset-left));
    padding-right: max(0px, env(safe-area-inset-right));
  }
  .header-inner {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto auto;
    gap: 8px;
    min-height: auto;
    padding-bottom: 8px;
  }
  .header-left {
    min-width: 0;
    width: 100%;
    justify-content: flex-start;
  }
  .brand span {
    max-width: min(52vw, 200px);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    display: inline-block;
    vertical-align: middle;
  }
  .header-right {
    grid-column: 1;
    width: 100%;
    justify-content: flex-start;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px 10px;
    row-gap: 8px;
    padding-top: 6px;
    border-top: 1px solid var(--line);
  }
  .header-right .cart-link,
  .header-right .account-link,
  .header-right .order-status-link {
    white-space: normal;
  }
  .header-right .cart-link,
  .header-right .account-link,
  .header-right .order-status-link {
    font-size: 13px;
  }
  .menu-toggle { display: inline-block; }
  /* Two-row header (brand row + actions row): position nav below full header */
  .main-nav {
    position: fixed;
    left: 0;
    top: 104px;
    z-index: 60;
    width: 100%;
    max-height: calc(100vh - 104px);
    overflow-y: auto;
    background: #fff;
    border-bottom: 1px solid var(--line);
    display: none;
    flex-direction: column;
    padding: 10px 4%;
    gap: 12px;
  }
  .main-nav.is-open { display: flex; }
  .header-stack > .category-strip {
    display: none;
  }
  .header-right .search-form { display: none; }
  .hero-banner { padding: 62px 0; }
  .hero-banner.has-banner { padding: 12px 0 6px; }
  .hero-banner.has-banner .hero-banner-media {
    width: min(1240px, 92%);
    max-height: min(42vh, 260px);
    border-radius: 12px;
  }
  .hero-banner.has-banner .hero-banner-media img {
    max-height: min(42vh, 260px);
  }
  .section { padding: 42px 0; }
  .collection-grid, .article-grid { grid-template-columns: 1fr; }
  .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .product-detail-top { grid-template-columns: 1fr; }
  .action-row { flex-direction: column; }
  .btn, .touch-field, .variant-block input, .search-inline input, .newsletter-form input {
    min-height: 46px;
    font-size: 16px;
  }
  .newsletter-form { flex-direction: column; }
  .footer-grid { grid-template-columns: 1fr; }
}
@media (max-width: 460px) {
  .product-grid { grid-template-columns: 1fr; }
}
