/* V4.1 - public Simplified/English and English/Traditional display switch with mobile hardening. */
.public-language-switch {
  display: inline-flex;
  align-items: center;
  padding: 2px;
  border: 1px solid #d8c9bb;
  border-radius: 999px;
  background: #f8f3ec;
  white-space: nowrap;
}
.public-language-switch button {
  min-height: 28px;
  padding: 4px 9px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #786b64;
  font: 700 10px/1 Arial, "Microsoft JhengHei", "PingFang TC", sans-serif;
  letter-spacing: .25px;
  box-shadow: none;
}
.public-language-switch button:hover { background: rgba(74, 24, 34, .055); }
.public-language-switch button.active {
  background: var(--wine);
  color: #fff;
}
.public-stock-subtitle {
  margin-top: 3px;
  color: #8d817a;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .25px;
}
.contact-compact { display: none; }
.export-language-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
}
.export-language-grid button {
  display: grid;
  gap: 5px;
  min-height: 76px;
  padding: 13px 15px;
  text-align: left;
}
.export-language-grid button b { font-size: 14px; }
.export-language-grid button span { font-size: 10px; opacity: .72; }

@media (max-width: 820px) {
  .public-topbar {
    flex-wrap: nowrap;
    min-height: 58px;
  }
  .public-topbar .toplinks {
    display: flex;
    flex: 1 1 auto;
    justify-content: flex-end;
    gap: 6px;
    overflow: visible;
  }
  .public-language-switch { flex: 0 0 auto; }
  .public-language-switch button {
    min-width: 44px;
    min-height: 30px;
    padding: 4px 7px;
    font-size: 9px;
  }
  .public-contact-link {
    flex: 0 0 auto;
    min-height: 32px;
    padding: 5px 8px;
  }
  .contact-full { display: none; }
  .contact-compact { display: inline; }
  .public-stock-subtitle {
    margin-top: 2px;
    font-size: 9px;
    line-height: 1.25;
  }
  .mobile-offer-table thead th .th-en {
    display: block;
    margin-top: 2px;
    font-size: 6.5px;
    font-weight: 600;
    line-height: 1.05;
    opacity: .76;
    white-space: normal;
  }
  .mobile-offer-table thead th {
    white-space: normal;
    overflow-wrap: anywhere;
  }
  .mobile-list-cn.public-mobile-name-primary,
  .mobile-list-en.public-mobile-name-primary {
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    white-space: normal;
    text-overflow: ellipsis;
  }
  .mobile-list-en.public-mobile-name-primary {
    margin-top: 0;
    color: #272124;
    font-size: 10.2px;
    font-weight: 700;
    line-height: 1.28;
  }
  .mobile-list-cn.public-mobile-name-secondary,
  .mobile-list-en.public-mobile-name-secondary {
    display: block;
    overflow: hidden;
    margin-top: 1px;
    color: #7f7470;
    font-size: 7.7px;
    font-weight: 400;
    line-height: 1.2;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .export-language-grid { grid-template-columns: 1fr; }
}

@media (max-width: 380px) {
  .public-wordmark { font-size: 18px; letter-spacing: 2.1px; }
  .public-wordmark small { font-size: 6.5px; letter-spacing: 1px; }
  .public-language-switch button { min-width: 40px; padding-inline: 5px; }
  .public-contact-link { padding-inline: 7px; font-size: 9px; }
  .mobile-offer-table thead th { padding-inline: 2px; font-size: 7.5px; }
  .mobile-offer-table thead th:first-child { padding-left: 7px; }
}


/* V4.2 - bilingual hierarchy: primary language bold, secondary language light. */
.lang-primary,
.th-primary,
.public-top-primary {
  font-weight: 800;
}
.lang-secondary,
.th-secondary,
.public-top-secondary {
  font-weight: 400;
}
.public-top-primary,
.public-top-secondary {
  display: block;
}
.public-top-secondary {
  margin-top: 3px;
  opacity: .72;
}
.public-stock-title {
  font-weight: 800;
}
.public-stock-subtitle {
  font-weight: 400;
  opacity: .78;
}
.public-products > thead > tr > th .th-primary {
  display: block;
  font-weight: 800;
}
.public-products > thead > tr > th .th-secondary {
  display: block;
  margin-top: 2px;
  font-size: 9px;
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: .35px;
  opacity: .74;
}
.quote-table caption .caption-primary {
  display: block;
  color: inherit;
  font-size: inherit;
  font-weight: 800;
  letter-spacing: inherit;
}
.quote-table caption .caption-secondary {
  display: block;
  margin-top: 2px;
  color: var(--gold);
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 2px;
}
.mobile-arrivals-heading > span {
  font-weight: 800;
}
.mobile-arrivals-heading > small {
  font-weight: 400;
  opacity: .76;
}

@media (max-width: 820px) {
  .mobile-offer-table thead th .th-primary {
    display: block;
    font-size: 8px;
    font-weight: 800;
    line-height: 1.05;
  }
  .mobile-offer-table thead th .th-secondary {
    display: block;
    margin-top: 2px;
    font-size: 6.2px;
    font-weight: 400;
    line-height: 1.05;
    letter-spacing: .15px;
    opacity: .72;
    white-space: normal;
  }
}

@media (max-width: 380px) {
  .mobile-offer-table thead th .th-primary { font-size: 7.5px; }
  .mobile-offer-table thead th .th-secondary { font-size: 5.9px; }
}

.stock-date-label b,
.stock-date-label small {
  display: block;
}
.stock-date-label b { font-weight: 800; }
.stock-date-label small {
  margin-top: 1px;
  font-size: 9px;
  font-weight: 400;
  opacity: .72;
}

/* V4.3 - fix language hierarchy for product names and keep BOSUNVA in the English masthead. */
.public-products .product-name .public-name-primary {
  margin-top: 0;
  color: #292326;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.42;
}
.public-products .product-name .public-name-secondary {
  margin-top: 2px;
  color: #7f7470;
  font-size: 11.5px;
  font-weight: 400;
  line-height: 1.38;
}
.public-hero-eyebrow > span,
.public-hero-eyebrow > small {
  display: block;
}
.public-hero-eyebrow > small {
  margin-top: 3px;
  font-size: .78em;
  letter-spacing: 2.4px;
  opacity: .72;
}
.public-stock-title-en {
  font-size: clamp(28px, 2.25vw, 40px);
  letter-spacing: -.75px;
}

@media (max-width: 820px) {
  .mobile-offer-table .public-mobile-name-primary {
    display: -webkit-box;
    overflow: hidden;
    margin-top: 0;
    color: #272124;
    font-size: 10.2px;
    font-weight: 800;
    line-height: 1.28;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    white-space: normal;
    text-overflow: ellipsis;
  }
  .mobile-offer-table .public-mobile-name-secondary {
    display: block;
    overflow: hidden;
    margin-top: 1px;
    color: #7f7470;
    font-size: 7.7px;
    font-weight: 400;
    line-height: 1.2;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .public-stock-title-en {
    font-size: clamp(20px, 5.7vw, 25px);
    letter-spacing: -.35px;
    white-space: nowrap;
  }
  .public-hero-eyebrow > small {
    margin-top: 2px;
    letter-spacing: 1.2px;
  }
}

@media (max-width: 360px) {
  .public-stock-title-en {
    font-size: 19px;
  }
}

/* V4.4 - traceability values follow the same primary/secondary language hierarchy. */
.public-products .trace-cell .public-trace-primary {
  display: block;
  color: #30292c;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.25;
}
.public-products .trace-cell .public-trace-secondary {
  display: block;
  margin-top: 2px;
  color: #817773;
  font-size: 9.5px;
  font-weight: 400;
  line-height: 1.2;
}
.mobile-trace-value .public-trace-primary,
.mobile-trace-value .public-trace-secondary {
  display: block;
}
.mobile-trace-value .public-trace-primary {
  font-weight: 800;
}
.mobile-trace-value .public-trace-secondary {
  margin-top: 1px;
  font-size: .82em;
  font-weight: 400;
  opacity: .72;
}


/* V4.5 - currency column headings are real primary headers, not auxiliary labels. */
@media (min-width: 821px) {
  .public-products > thead > tr > th .th-primary:only-child {
    font-size: 13px;
    font-weight: 800;
    line-height: 1.12;
    letter-spacing: .45px;
  }
}

/* V4.5 price editing: automatic and base prices stay locked until an explicit edit action. */
.staff-products .quote-input.auto-rate-price,
.staff-products .quote-input.base-rate-price,
.arrival-inline-table .arrival-quote-input.auto-rate-price,
.arrival-inline-table .arrival-quote-input.base-rate-price {
  background: #f6f3ef;
  color: #6f6862;
  border-color: #ddd5cd;
  cursor: default;
}
.staff-products .quote-input.manual-price-editing,
.staff-products .quote-input.base-price-editing,
.arrival-inline-table .arrival-quote-input.manual-price-editing,
.arrival-inline-table .arrival-quote-input.base-price-editing {
  background: #fff;
  color: var(--text);
  border-color: #cbb7a4;
  cursor: text;
}

/* V4.6 HK customer-facing offer QTY: explicit edit/save with COM as the hard ceiling. */
.staff-products .offer-qty-input,
.arrival-inline-table .offer-qty-input {
  width: 74px;
  max-width: calc(100% - 8px);
  padding: 7px 6px;
  text-align: center;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  color: #6f6862;
  background: #f6f3ef;
  border-color: #ddd5cd;
  cursor: default;
}
.staff-products .offer-qty-input.offer-qty-editing,
.arrival-inline-table .offer-qty-input.offer-qty-editing {
  color: var(--text);
  background: #fff;
  border-color: #cbb7a4;
  cursor: text;
}
.staff-products .offer-qty-actions,
.arrival-inline-table .offer-qty-actions {
  display: flex;
  justify-content: center;
  margin-top: 6px;
}
.staff-products .offer-qty-actions .table-action,
.arrival-inline-table .offer-qty-actions .table-action {
  font-size: 10px;
  padding: 4px 8px;
  margin: 0;
}

/* V4.7 price-attention marker: persists until manually cleared or an actual price change resets it. */
.quote-table tr.price-highlight-row > td:not(.brand-cell),
.mobile-offer-table tr.price-highlight-row > td {
  background: #f6e3af !important;
}
.quote-table tr.price-highlight-row > .barcode-cell,
.mobile-offer-table tr.price-highlight-row > td:first-child {
  box-shadow: inset 4px 0 #b57b25;
}
/* The merged brand title is a group label, not part of one highlighted SKU. */
.quote-table tr.price-highlight-row > .brand-cell {
  background: #fcfaf7 !important;
  box-shadow: none !important;
}
.quote-table tr.price-highlight-row .barcode-cell,
.quote-table tr.price-highlight-row .currency-amount {
  font-weight: 800;
}
.staff-products tr.price-highlight-row .source-stock,
.staff-products tr.price-highlight-row .offer-qty-cell,
.staff-products tr.price-highlight-row .currency-cell,
.staff-products tr.price-highlight-row .row-actions {
  background: #f6e3af !important;
}
.staff-products .toggle-price-highlight {
  display: block;
  margin: 6px auto 0;
  padding: 4px 8px;
  font-size: 10px;
}
.staff-products .toggle-price-highlight.is-active {
  border-color: #b57b25;
  background: #fff7e4;
  color: #7a4a12;
  font-weight: 700;
}
.price-highlight-tag {
  display: inline-block;
  margin-top: 5px;
  padding: 2px 6px;
  border-radius: 999px;
  background: #8b5a17;
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  line-height: 1.35;
}

/* Staff-only COM batch column. It intentionally reuses .source-stock so it has the same
   read-only visual treatment as COM source inventory. Never used by public/export tables. */
.staff-products .business-batch-cell {
  white-space: normal;
  overflow-wrap: anywhere;
  line-height: 1.55;
  font-variant-numeric: tabular-nums;
}
.staff-products .business-batch-id {
  font-weight: inherit;
  color: inherit;
}
.staff-products .batch-separator {
  color: inherit;
  opacity: .62;
  padding: 0 2px;
}

/* Customer-side quotation download; separate from staff draft export. */
.public-controls .public-export-excel {
  flex: 0 0 auto;
  min-height: 46px;
  padding: 0 17px;
  border: 1px solid #4a1822;
  border-radius: 7px;
  color: #fffaf3;
  background: #4a1822;
  font-weight: 700;
  letter-spacing: .15px;
  white-space: nowrap;
  cursor: pointer;
}
.public-controls .public-export-excel:hover { background: #612733; }
.public-controls .public-export-excel:disabled { opacity: .65; cursor: wait; }
@media (max-width: 820px) {
  .public-controls .public-export-excel { width: 100%; min-height: 44px; }
}
