/* Public typography: one body scale, with headings as the only larger text.
   Microsoft JhengHei is preferred; other systems use a local Traditional Chinese sans-serif fallback.
   These final overrides also normalize older article/product markup. */
:root {
  --public-font: "Microsoft JhengHei", "微軟正黑體", "PingFang TC", "Noto Sans TC", Arial, sans-serif;
  --sans: var(--public-font);
  --serif: var(--public-font);
  --body-size: 18px;
  --price-blue: #1656a7;
}
body { font-family: var(--public-font); font-size: var(--body-size); line-height: 1.75; }
body :where(*) { font-family: var(--public-font) !important; }
body :is(p, a, span, li, dt, dd, label, input, select, textarea, button, small,
  figcaption, caption, td, th, summary, legend, time, blockquote, .rich, .rich div,
  .company-content, .news-body, .news-body div, .spec-summary, .detail-service,
  .breadcrumbs, .main-nav, .footer-bottom, .category-current, .result-count,
  .content-card-copy, .description-tabs, .translation-note) {
  font-size: var(--body-size) !important;
}
body h1 { font-size: 34px !important; }
body h2 { font-size: 28px !important; }
body h3 { font-size: 22px !important; }
body :is(h4, h5, h6) { font-size: 20px !important; }
body :is(h1, h2, h3, h4, h5, h6) :is(a, span, strong, em) { font-size: inherit !important; }
body .hero-slide-copy :is(h1, h2) { font-size: clamp(36px, 4.4vw, 64px) !important; }
body .detail-copy h1 { font-size: 26px !important; line-height: 1.65; letter-spacing: 0; }
body .product-copy h3 { font-size: var(--body-size) !important; line-height: 1.75; }
.product-brand { letter-spacing: .02em; }
body :is(.price, .detail-price) { color: var(--price-blue); font-weight: 600; }
body :is(.price, .detail-price) * { color: inherit; }
/* Symbol controls retain their optical size; SVG icons retain their own geometry. */
body :is(.icon-button, .zoom-button) { font-size: 25px !important; }
body .search-field > span:not(.sr-only) { font-size: 23px !important; }
body .empty > span { font-size: 45px !important; }
body .image-dialog > button { font-size: 30px !important; }

/* Use the desktop canvas for the collection rather than centering a narrow block. */
.catalog-section { width: 100%; max-width: 1920px; padding-inline: clamp(24px, 2.5vw, 48px); }
.catalog-section .page-heading { margin-bottom: 28px; }
.catalog-main, .catalog-section .product-card, .catalog-section .product-copy { min-width: 0; }
.catalog-section .filter-form { flex-wrap: wrap; }
.catalog-section .filter-form label:not(.search-field) { flex: 0 1 180px; min-width: 0; }
.catalog-section .search-field { flex: 1 1 250px; }
.catalog-section .filter-form input,
.catalog-section .filter-form select { min-height: 48px; }
@media (min-width: 801px) {
  .catalog-section .catalog-layout { grid-template-columns: 240px minmax(0, 1fr); gap: 32px; }
  .catalog-main .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1024px) {
  .catalog-main .product-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (min-width: 1200px) {
  .catalog-section .catalog-layout { grid-template-columns: 260px minmax(0, 1fr); }
  .catalog-main .product-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 32px 24px; }
}
@media (max-width: 800px) {
  .catalog-section { padding-inline: 5.5%; }
  .catalog-section .filter-form label:not(.search-field) { flex: 1 1 120px; }
  .catalog-section .search-field { flex-basis: 100%; }
  .catalog-main .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  body h1 { font-size: 30px !important; }
  body h2 { font-size: 26px !important; }
  body .category-card h3 { font-size: var(--body-size) !important; }
}
/* Longer category names remain one line, with scrolling confined to their row. */
.category-card > div:last-child { display: block; min-width: 0; }
.category-card h3 { max-width: 100%; white-space: nowrap; overflow-x: auto; letter-spacing: 0; }
.category-card > div:last-child > span { display: block; margin-top: 4px; white-space: nowrap; }
.category-choice, .category-choice-group, .category-choice-children { min-width: 0; }
.category-sidebar details > a { padding-left: 8px; }
/* Keep the full address readable without pushing a narrow viewport sideways. */
.showroom-address { display: block; max-width: 100%; overflow-x: auto; overscroll-behavior-x: contain; }

/* A real text label, instead of text baked into the old add-friend image. */
body a.line-logo-button,
body .about-editorial a.line-logo-button {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  width: fit-content; min-height: 48px; padding: 8px 18px; margin-top: 8px;
  color: #fff; background: #087f39; border: 1px solid #087f39; border-radius: 6px;
  line-height: 1.5; white-space: nowrap; text-decoration: none;
}
body a.line-logo-button img,
body .about-editorial a.line-logo-button img { width: 30px; height: 30px; margin: 0; flex-shrink: 0; object-fit: contain; }
body a.line-logo-button:hover { background: #066b30; }
body a.line-logo-button:focus-visible { outline: 2px solid var(--ink); outline-offset: 4px; }
@media (max-width: 360px) {
  .header .brand-logo { width: 100px; }
  .header { gap: 6px; }
}
body .footer-visit a.line-logo-button { display: inline-flex; flex-direction: row; }

/* Keep a horizontal, fluid header through desktop/tablet widths. Only the
   site's existing phone breakpoint (800px) uses the dropdown navigation. */
.header { --header-gap: 22px; --navigation-gap: 22px; gap: var(--header-gap); width: 100%; min-width: 0; }
.header > .brand, .header > .main-nav, .header > .header-actions { flex-shrink: 0; }
.header .main-nav { flex-wrap: nowrap; }
.header .main-nav a, .header .header-contact { white-space: nowrap; word-break: normal; overflow-wrap: normal; flex-shrink: 0; }
@media (min-width: 801px) {
  .header {
    --header-gap: clamp(6px, calc(2vw - 10px), 22px);
    --navigation-gap: clamp(6px, calc(2vw - 10px), 22px);
    --header-fluid-size: clamp(13px, calc(7px + .75vw), 18px);
    padding-left: clamp(12px, calc(2.5vw - 8px), 48px); padding-right: clamp(12px, calc(2.5vw - 8px), 48px);
  }
  body .header :is(a, span) { font-size: var(--header-fit-size, var(--header-fluid-size)) !important; }
  .header .brand-logo { width: clamp(100px, 11vw, 170px); }
  .header:not(.header-layout-measure) > .main-nav {
    display: flex; position: static; flex-direction: row; align-items: center;
    width: max-content; padding: 0; border: 0; max-height: none; overflow: visible;
    gap: var(--navigation-gap); box-shadow: none;
  }
  .header .main-nav a { width: auto; padding: 12px 0; }
  .header .header-actions { gap: clamp(4px, calc(.7vw - 1px), 17px); margin-left: 0; }
  body .header .header-contact { display: flex; gap: clamp(6px, 1vw, 20px); }
  .header .mobile-menu { display: none; }
  .header .header-actions .icon-button { width: clamp(30px, 3vw, 40px); height: 40px; }
}
.header--compact .main-nav {
  display: none; position: absolute; left: 0; right: 0; top: 100%;
  padding: 24px 5%; background: var(--paper); border-bottom: 1px solid var(--line);
  max-height: 65dvh; overflow: auto; z-index: 20;
}
.header--compact .main-nav.open { display: flex; flex-direction: column; align-items: flex-start; gap: 18px; }
.header--compact .main-nav a { width: 100%; padding: 5px 0; }
.header--compact .header-contact { display: none; }
.header--compact .mobile-menu { display: grid; }
.header--compact .header-actions { margin-left: auto; }
/* Inert copy fits the same font to actual glyph widths without stretching text. */
.header.header-layout-measure {
  position: fixed; inset: 0 auto auto -100000px; width: max-content; max-width: none;
  min-height: 0; padding: 0; border: 0; visibility: hidden; pointer-events: none;
}
.header.header-layout-measure .main-nav {
  display: flex; position: static; flex-direction: row; align-items: center;
  width: max-content; padding: 0; border: 0; max-height: none; overflow: visible;
  gap: var(--navigation-gap); box-shadow: none;
}
.header-layout-measure .main-nav a { width: auto; padding: 12px 0; }
.header.header-layout-measure .header-contact { display: flex; }
.header-layout-measure .mobile-menu { display: none; }
.header-layout-measure .header-actions { margin-left: 0; }
@media (max-width: 800px) { .header { --header-gap: 8px; } }
@media (max-width: 360px) { .header { --header-gap: 6px; } }

/* Category names stay complete: reserve real sidebar space, then fit only an
   unusually long label to its own row instead of hiding it behind a scroller. */
@media (min-width: 1024px) {
  .catalog-section .catalog-layout { grid-template-columns: var(--category-sidebar-width, 360px) minmax(0, 1fr); }
}
@media (max-width: 1023px) {
  .catalog-section .catalog-layout { display: block; }
  .has-category-picker .catalog-section .category-sidebar { display: none; }
  .has-category-picker .mobile-category-control { display: block; margin-bottom: 16px; }
  .mobile-category-control > button {
    width: 100%; display: grid; grid-template-columns: minmax(0, 1fr) auto;
    gap: 4px 12px; text-align: left; padding: 12px 15px;
    background: var(--cream); border: 1px solid var(--line);
  }
  .category-current { display: contents; }
  .category-current small { grid-column: 1; grid-row: 1; }
  .category-current strong { grid-column: 1 / -1; grid-row: 2; width: 100%; }
  .category-switch { grid-column: 2; grid-row: 1; }
}
body :is(.category-sidebar a, .category-choice > span,
  .category-choice-group > summary > span, .category-current strong, .category-card h3) {
  font-size: var(--category-label-size, var(--body-size)) !important;
  white-space: nowrap; text-wrap: nowrap; overflow: visible;
  text-overflow: clip; word-break: normal; overflow-wrap: normal;
}
.category-sidebar summary > a { flex: 1 1 0; }
.category-choice-children { padding-left: 8px; }
.category-label-measure {
  position: fixed; left: -100000px; top: 0; visibility: hidden; pointer-events: none;
  width: max-content; white-space: nowrap; font-weight: 600;
}
.category-sidebar .all-products { overflow: visible; }
/* Product names may use as many lines as needed instead of being cut at line 3. */
body .product-copy h3 { display: block; -webkit-line-clamp: unset; overflow: visible; overflow-wrap: anywhere; }
/* Give long names the full sheet width before reducing type size. The current
   row is already distinguished by its background and bold text. */
.category-picker-tree { padding-left: 14px; padding-right: 14px; }
.category-picker .category-choice-children { padding-left: 0; }
.category-picker .category-choice-check { display: none; }
.category-picker :is(.category-choice, .category-choice-group > summary) { padding-left: 0; padding-right: 0; gap: 8px; }
.category-picker .category-choice-group[open] > .category-choice-children { background: #f4f3ed; }

/* This announcement alone can shrink to keep the complete copy on one line. */
.topline { min-width: 0; gap: 16px; }
body .topline > span {
  flex: 0 1 auto; min-width: 0; max-width: 100%;
  white-space: nowrap; word-break: normal; overflow-wrap: normal;
  font-size: var(--topline-fit-size, var(--body-size)) !important;
}
.topline > a { flex-shrink: 0; white-space: nowrap; }
body .topline > a span { font-size: inherit !important; }
