/* KomoHub catalogue module. Every class starts with "kh-" and every variable with --kh-
   so the module can live next to the existing KomoHub stylesheet without collisions. */
@font-face { font-family: "KH Barlow"; src: url("fonts/Barlow-Regular.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "KH Barlow"; src: url("fonts/Barlow-SemiBold.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "KH Barlow Condensed"; src: url("fonts/BarlowCondensed-Bold.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "KH Barlow Condensed"; src: url("fonts/BarlowCondensed-ExtraBold.woff2") format("woff2"); font-weight: 800; font-display: swap; }

.kh {
  --kh-red: #d71920;          /* KOMOTASHI red, as printed in the catalogues */
  --kh-red-ink: #b3121a;      /* hover / pressed */
  --kh-ink: #161616;          /* catalogue ink */
  --kh-grey: #5e6166;         /* secondary text */
  --kh-mute: #9a9ea4;         /* tertiary text on dark */
  --kh-line: #d9dbde;         /* rules and borders */
  --kh-panel: #f2f2f3;        /* photo panels */
  --kh-paper: #ffffff;
  --kh-sans: "KH Barlow", "Barlow", "Helvetica Neue", Arial, sans-serif;
  --kh-cond: "KH Barlow Condensed", "Barlow Condensed", "Arial Narrow", "Roboto Condensed", sans-serif;
  --kh-wrap: 1240px;
  margin: 0; background: var(--kh-paper); color: var(--kh-ink);
  font: 400 16px/1.5 var(--kh-sans);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
.kh *, .kh *::before, .kh *::after { box-sizing: border-box; }
.kh img { max-width: 100%; height: auto; display: block; }
.kh a { color: inherit; }
.kh :focus-visible { outline: 3px solid var(--kh-red); outline-offset: 2px; }
.kh-wrap { max-width: var(--kh-wrap); margin: 0 auto; padding: 0 24px; }
.kh-skip { position: absolute; left: -9999px; top: 8px; background: var(--kh-paper); padding: 8px 12px; z-index: 10; }
.kh-skip:focus { left: 8px; }
.kh-ico { width: 1.25em; height: 1.25em; flex: none; }

/* ---------- top bar */
.kh-top { background: var(--kh-ink); color: var(--kh-paper); }
.kh-top__in { display: flex; align-items: center; justify-content: space-between; height: 60px; }
.kh-logo { font: 800 28px/1 var(--kh-cond); letter-spacing: .01em; text-decoration: none; display: flex; align-items: center; gap: 10px; }
.kh-logo::before { content: ""; width: 6px; height: 26px; background: var(--kh-red); }
.kh-topnav { display: flex; gap: 20px; font-weight: 600; font-size: 15px; }
.kh-topnav a { text-decoration: none; color: #e6e7e9; }
.kh-topnav a:hover, .kh-topnav a[aria-current] { color: var(--kh-paper); text-decoration: underline; text-underline-offset: 4px; }

/* ---------- hero with the diagonal cut of the print catalogues */
.kh-hero { background: var(--kh-ink); color: var(--kh-paper); padding: 56px 0 104px;
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 56px), 0 100%); }
.kh-hero--small { padding: 28px 0 96px; }
.kh-stripe { height: 72px; margin-top: -56px; background: var(--kh-red);
  clip-path: polygon(0 56px, 100% 0, 100% 16px, 0 72px); pointer-events: none; }
.kh-hero__title { font: 800 clamp(44px, 7vw, 88px)/.92 var(--kh-cond); margin: 0 0 16px; max-width: 16ch; letter-spacing: -.005em; }
.kh-hero--small .kh-hero__title { font-size: clamp(40px, 6vw, 72px); max-width: none; }
.kh-hero__text { margin: 0 0 32px; max-width: 58ch; color: #c9cbcf; font-size: 18px; }
.kh-search { max-width: 720px; }
.kh-search__label { display: block; font-weight: 600; font-size: 15px; margin-bottom: 8px; color: #e6e7e9; }
.kh-search__box { display: flex; align-items: center; gap: 12px; background: var(--kh-paper); color: var(--kh-ink);
  padding: 0 18px; height: 64px; border-left: 6px solid var(--kh-red); }
.kh-search__box .kh-ico { color: var(--kh-grey); width: 24px; height: 24px; }
.kh-search__box input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; height: 100%;
  font: 700 26px/1 var(--kh-cond); letter-spacing: .02em; color: var(--kh-ink); }
.kh-search__box input::placeholder { color: #a6a9ad; font-weight: 700; }
.kh-search__box:focus-within { box-shadow: 0 0 0 3px var(--kh-red); }

/* ---------- breadcrumbs */
.kh-crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 20px; padding: 0; font-size: 14px; color: var(--kh-mute); }
.kh-crumbs li + li::before { content: "/"; margin-right: 6px; color: var(--kh-mute); }
.kh-crumbs a { color: #e6e7e9; }
.kh-product .kh-crumbs ol { color: var(--kh-grey); margin: 24px 0 28px; }
.kh-product .kh-crumbs a { color: var(--kh-ink); }
.kh-product .kh-crumbs li + li::before { color: var(--kh-line); }

/* ---------- filters */
.kh-results { padding-top: 24px; padding-bottom: 72px; }
.kh-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 28px; padding-bottom: 20px;
  border-bottom: 2px solid var(--kh-ink); margin-bottom: 28px; }
.kh-seg { display: flex; align-items: center; flex-wrap: wrap; gap: 0; }
.kh-seg__label, .kh-select span { font-weight: 600; font-size: 14px; color: var(--kh-grey); margin-right: 12px; }
.kh-seg__btn { font: 700 18px/1 var(--kh-cond); letter-spacing: .02em; padding: 10px 16px; min-height: 42px; background: var(--kh-paper);
  color: var(--kh-ink); border: 1.5px solid var(--kh-ink); margin-left: -1.5px; cursor: pointer; }
.kh-seg__btn:first-of-type { margin-left: 0; }
.kh-seg__btn[aria-pressed="true"] { background: var(--kh-ink); color: var(--kh-paper); }
.kh-seg__btn:hover:not([aria-pressed="true"]) { background: var(--kh-panel); }
.kh-select { display: flex; align-items: center; }
.kh-select select { font: 600 16px/1 var(--kh-sans); min-height: 42px; padding: 0 36px 0 12px; border: 1.5px solid var(--kh-ink);
  border-radius: 0; background: var(--kh-paper) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23161616' stroke-width='2'/%3E%3C/svg%3E") no-repeat right 12px center;
  appearance: none; color: var(--kh-ink); }
.kh-count { margin: 0 0 0 auto; font-weight: 600; color: var(--kh-grey); }
.kh-reset { background: none; border: 0; padding: 4px 0; font: 600 15px var(--kh-sans); color: var(--kh-red); text-decoration: underline; cursor: pointer; }

/* ---------- product grid: the code is the loudest element of every card */
.kh-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(248px, 1fr)); gap: 20px; }
.kh-card { display: flex; flex-direction: column; border: 1px solid var(--kh-line); background: var(--kh-paper); }
.kh-card:hover { border-color: var(--kh-ink); }
.kh-card[hidden] { display: none; }
.kh-card__link { display: flex; flex-direction: column; text-decoration: none; padding: 0 0 16px; flex: 1; }
.kh-card__photo { position: relative; display: block; aspect-ratio: 4 / 3; background: var(--kh-panel); margin-bottom: 16px; overflow: hidden; }
.kh-card__photo img { position: absolute; inset: 12px; width: calc(100% - 24px); height: calc(100% - 24px); object-fit: contain; mix-blend-mode: multiply; }
.kh-card__brand { padding: 0 18px; font-weight: 600; font-size: 14px; color: var(--kh-red); }
.kh-card__code { padding: 0 18px; font: 800 40px/1 var(--kh-cond); letter-spacing: .005em; margin: 2px 0 8px; overflow-wrap: anywhere; }
.kh-card__meta { padding: 0 18px; font-size: 15px; color: var(--kh-grey); }
.kh-card__link:hover .kh-card__code { text-decoration: underline; text-decoration-thickness: 3px; text-underline-offset: 5px; }
.kh-flag { margin: 12px 18px 0; font-size: 13px; font-weight: 600; color: var(--kh-red); display: flex; align-items: center; gap: 8px; }
.kh-flag::before { content: ""; width: 8px; height: 8px; background: var(--kh-red); flex: none; }
.kh-card__wa { display: flex; align-items: center; gap: 8px; padding: 12px 18px; border-top: 1px solid var(--kh-line);
  font-weight: 600; font-size: 15px; text-decoration: none; color: var(--kh-ink); }
.kh-card__wa .kh-ico { color: var(--kh-red); }
.kh-card__wa:hover { background: var(--kh-ink); color: var(--kh-paper); }
.kh-card__wa:hover .kh-ico { color: var(--kh-paper); }

.kh-empty { padding: 48px 0; max-width: 60ch; }
.kh-empty h2 { font: 800 36px/1.05 var(--kh-cond); margin: 0 0 12px; }
.kh-empty p { color: var(--kh-grey); margin: 0 0 24px; }

/* ---------- buttons */
.kh-btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 48px; padding: 0 22px;
  background: var(--kh-red); color: var(--kh-paper) !important; text-decoration: none; font: 700 20px/1 var(--kh-cond); letter-spacing: .02em; }
.kh-btn:hover { background: var(--kh-red-ink); }
.kh-btn--big { min-height: 60px; font-size: 24px; padding: 0 28px; width: 100%; max-width: 420px; }

/* ---------- product page */
.kh-product { padding-bottom: 80px; }
.kh-product__top { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 48px; align-items: start; }
.kh-gallery__main { margin: 0; background: var(--kh-panel); display: flex; flex-direction: column; }
.kh-gallery__main { aspect-ratio: auto; }
.kh-gallery__main img { width: min(100%, calc(var(--kh-nat, 400px) * 1.6)); max-height: 520px; aspect-ratio: auto; object-fit: contain;
  margin: 0 auto; padding: 32px; mix-blend-mode: multiply; }
.kh-gallery__main figcaption { padding: 10px 16px; font-size: 14px; color: var(--kh-grey); border-top: 1px solid var(--kh-line); background: var(--kh-paper); }
.kh-gallery__thumbs { list-style: none; display: flex; gap: 12px; padding: 0; margin: 12px 0 0; }
.kh-gallery__thumbs button { display: flex; flex-direction: column; gap: 6px; width: 132px; padding: 0 0 6px; background: var(--kh-paper);
  border: 1.5px solid var(--kh-line); cursor: pointer; font: 600 13px var(--kh-sans); color: var(--kh-ink); }
.kh-gallery__thumbs button img { aspect-ratio: 4 / 3; object-fit: contain; background: var(--kh-panel); padding: 6px; mix-blend-mode: multiply; }
.kh-gallery__thumbs button[aria-pressed="true"] { border-color: var(--kh-ink); }
.kh-gallery--none { background: var(--kh-panel); aspect-ratio: 4 / 3; display: flex; align-items: center; justify-content: center; color: var(--kh-grey); }

.kh-plate { border-top: 6px solid var(--kh-red); padding-top: 20px; }
.kh-plate__brand { margin: 0; font-weight: 600; font-size: 18px; color: var(--kh-red); }
.kh-plate__brand a { text-decoration: none; }
.kh-plate__brand a:hover { text-decoration: underline; }
.kh-plate__code { margin: 4px 0 12px; line-height: .9; }
.kh-plate__codetext { display: block; font: 800 clamp(64px, 9vw, 124px)/.88 var(--kh-cond); letter-spacing: -.005em; overflow-wrap: anywhere; }
.kh-plate__type { display: block; font: 700 26px/1.1 var(--kh-cond); color: var(--kh-grey); margin-top: 8px; }
.kh-plate__designation { font-size: 20px; font-weight: 600; margin: 0 0 8px; }
.kh-plate__apps { margin: 0 0 28px; color: var(--kh-grey); max-width: 46ch; }
.kh-plate__note { font-size: 14px; color: var(--kh-grey); margin: 12px 0 0; max-width: 46ch; }

.kh-product__details { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 48px; margin-top: 64px; }
.kh-block { margin-bottom: 40px; }
.kh-h2 { font: 800 30px/1 var(--kh-cond); margin: 0 0 16px; padding-bottom: 10px; border-bottom: 2px solid var(--kh-ink); }
.kh-specs { width: 100%; border-collapse: collapse; font-size: 16px; }
.kh-specs caption { text-align: left; font-size: 14px; color: var(--kh-grey); padding-bottom: 8px; }
.kh-specs th, .kh-specs td { text-align: left; vertical-align: top; padding: 11px 0; border-bottom: 1px solid var(--kh-line); }
.kh-specs th { width: 38%; font-weight: 600; color: var(--kh-grey); padding-right: 16px; }
.kh-apps, .kh-oe, .kh-check { list-style: none; margin: 0; padding: 0; }
.kh-apps li { padding: 10px 0; border-bottom: 1px solid var(--kh-line); }
.kh-apps__market { display: block; font-size: 13px; font-weight: 600; color: var(--kh-red); }
.kh-small { font-size: 14px; color: var(--kh-grey); margin: 12px 0 0; }
.kh-oe { display: flex; flex-wrap: wrap; gap: 8px; }
.kh-oe li { font: 700 20px/1 var(--kh-cond); letter-spacing: .04em; padding: 8px 12px; border: 1.5px solid var(--kh-ink); font-variant-numeric: tabular-nums; }
.kh-check li { position: relative; padding: 8px 0 8px 22px; }
.kh-check li::before { content: ""; position: absolute; left: 0; top: 16px; width: 9px; height: 9px; background: var(--kh-red); }
.kh-related { margin-top: 24px; }
.kh-grid--related { grid-template-columns: repeat(auto-fill, minmax(248px, 300px)); }

.kh-stickycta { display: none; }

/* ---------- contact channels: WhatsApp (main), WeChat, email, phone */
.kh-contact { display: flex; flex-direction: column; gap: 12px; max-width: 420px; }
.kh-contact__row { display: flex; flex-wrap: wrap; gap: 8px; }
.kh-contact__alt { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 14px; border: 1.5px solid var(--kh-ink);
  background: var(--kh-paper); color: var(--kh-ink); text-decoration: none; font: 600 15px/1 var(--kh-sans); cursor: pointer; list-style: none; }
.kh-contact__alt::-webkit-details-marker { display: none; }
.kh-contact__alt:hover { background: var(--kh-ink); color: var(--kh-paper); }
.kh-wechat { position: relative; }
.kh-wechat[open] > .kh-contact__alt { background: var(--kh-ink); color: var(--kh-paper); }
.kh-wechat__panel { position: absolute; z-index: 6; top: calc(100% + 6px); left: 0; width: 280px; padding: 16px; background: var(--kh-paper);
  border: 1.5px solid var(--kh-ink); box-shadow: 6px 6px 0 var(--kh-ink); font-size: 15px; }
.kh-wechat__panel p { margin: 0 0 10px; }
.kh-wechat__id strong { font: 700 20px/1.2 var(--kh-cond); letter-spacing: .02em; }
.kh-copy { margin-left: 6px; font: 600 13px var(--kh-sans); padding: 4px 10px; border: 1px solid var(--kh-ink); background: var(--kh-paper); cursor: pointer; }
.kh-iconbtn { display: inline-flex; align-items: center; justify-content: center; width: 48px; height: 48px; flex: none;
  border: 1.5px solid var(--kh-ink); color: var(--kh-ink); background: var(--kh-paper); }
.kh-iconbtn .kh-ico { width: 22px; height: 22px; }

/* ---------- new arrivals, badges, drafts */
.kh-new { position: absolute; top: 10px; left: 10px; background: var(--kh-red); color: var(--kh-paper); font: 700 14px/1 var(--kh-cond);
  letter-spacing: .04em; padding: 5px 8px; }
.kh-new--draft { left: auto; right: 10px; background: var(--kh-ink); }
.kh-new--inline { position: static; display: inline-block; vertical-align: middle; margin-left: 8px; }
.kh-card__nophoto { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: var(--kh-grey); font-size: 14px; }
.kh-arrivals { padding-top: 28px; }
.kh-arrivals__head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; border-bottom: 2px solid var(--kh-ink); margin-bottom: 20px; }
.kh-arrivals__head .kh-h2 { border: 0; margin: 0; padding-bottom: 10px; }
.kh-arrivals__all { font-weight: 600; color: var(--kh-red); }
.kh-grid--strip { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.kh-draftbar { background: #ffd23f; color: var(--kh-ink); text-align: center; font-weight: 600; padding: 8px 16px; }
.kh-draftnote { background: #fff4c2; border-left: 6px solid #e0a800; padding: 10px 14px; font-weight: 600; }
.kh-desc { max-width: 72ch; margin-top: 40px; font-size: 17px; }
.kh-desc p { margin: 0 0 12px; }

/* ---------- footer */
.kh-foot { background: var(--kh-ink); color: #c9cbcf; font-size: 14px; }
.kh-foot__in { padding-top: 40px; padding-bottom: 48px; }
.kh-foot__brand { font: 800 26px/1 var(--kh-cond); color: var(--kh-paper); margin: 0 0 12px; }
.kh-foot a { color: var(--kh-paper); }
.kh-foot__contacts a { white-space: nowrap; }
.kh-legal { border-top: 1px solid var(--kh-line); background: var(--kh-panel); color: var(--kh-grey); font-size: 13px; }
.kh-legal p { max-width: 100ch; margin: 0; padding: 18px 0; }

/* ---------- small screens */
@media (max-width: 860px) {
  .kh-product__top, .kh-product__details { grid-template-columns: 1fr; gap: 28px; }
  .kh-product__details { margin-top: 32px; }
  .kh-count { margin-left: 0; width: 100%; }
  .kh-stickycta { display: flex; gap: 8px; position: fixed; left: 0; right: 0; bottom: 0; padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
    background: var(--kh-paper); border-top: 1px solid var(--kh-line); z-index: 5; }
  .kh-stickycta .kh-btn { flex: 1; min-height: 48px; }
  .kh-wechat__panel { width: min(280px, calc(100vw - 48px)); }
  .kh-js .kh-stickycta { transform: translateY(110%); visibility: hidden; }
  .kh-js .kh-stickycta.is-on { transform: none; visibility: visible; }
  .kh-product { padding-bottom: 120px; }
  .kh-seg__label { width: 100%; margin-bottom: 8px; }
  .kh-seg__btn { font-size: 17px; padding: 10px 12px; }
}
@media (max-width: 560px) {
  .kh-wrap { padding: 0 16px; }
  .kh-hero { padding: 36px 0 88px; clip-path: polygon(0 0, 100% 0, 100% calc(100% - 32px), 0 100%); }
  .kh-stripe { height: 44px; margin-top: -32px; clip-path: polygon(0 32px, 100% 0, 100% 12px, 0 44px); }
  .kh-search__box { height: 56px; }
  .kh-search__box input { font-size: 22px; }
  .kh-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .kh-card__code { font-size: 30px; padding: 0 12px; }
  .kh-card__brand, .kh-card__meta { padding: 0 12px; font-size: 13px; }
  .kh-flag { margin: 10px 12px 0; font-size: 12px; }
  .kh-card__wa { padding: 10px 12px; font-size: 13px; }
  .kh-card__photo { margin-bottom: 12px; }
  .kh-card__photo img { inset: 6px; width: calc(100% - 12px); height: calc(100% - 12px); }
}
@media (prefers-reduced-motion: no-preference) {
  .kh-card, .kh-card__wa, .kh-btn, .kh-seg__btn { transition: background-color .12s, border-color .12s, color .12s; }
  .kh-stickycta { transition: transform .18s ease-out, visibility .18s; }
}
@media print {
  .kh-top, .kh-foot, .kh-stickycta, .kh-btn, .kh-card__wa, .kh-filters, .kh-search { display: none !important; }
  .kh-hero { clip-path: none; background: none; color: #000; padding: 0; }
  .kh-stripe { display: none; }
}
