/* ============================================================
   Shoe Insole B2B Foreign-Trade Website — Industrial Professional
   ============================================================ */
:root {
  --navy: #0b2545;
  --navy2: #13315c;
  --blue: #1d4ed8;
  --blue-d: #1e40af;
  --accent: #ea580c;
  --accent-d: #c2410c;
  --ink: #1f2933;
  --muted: #5b6b7b;
  --line: #e3e8ee;
  --bg-alt: #f4f6f9;
  --white: #ffffff;
  --radius: 12px;
  --shadow: 0 6px 24px rgba(15, 23, 42, .08);
  --shadow-lg: 0 16px 48px rgba(15, 23, 42, .14);
  --maxw: 1200px;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
/* safety net: never let a wide element create a horizontal scrollbar */
html, body { overflow-x: clip; }
body {
  font-family: "Segoe UI", "Helvetica Neue", Arial, system-ui, sans-serif;
  color: var(--ink); line-height: 1.65; background: var(--white);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--blue); text-decoration: none; }
a:hover { color: var(--blue-d); }
.container { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }
.center { text-align: center; }
.mt { margin-top: 28px; }
.lead { font-size: 1.12rem; color: var(--muted); max-width: 760px; }
.narrow { max-width: 820px; }
.eyebrow { text-transform: uppercase; letter-spacing: 2px; font-size: .8rem; font-weight: 700; color: var(--accent); margin-bottom: 10px; }

/* ---------- Buttons ---------- */
.btn { display: inline-block; padding: 12px 24px; border-radius: 8px; font-weight: 600;
  border: 2px solid transparent; cursor: pointer; transition: .2s; font-size: .95rem; }
.btn-lg { padding: 14px 30px; font-size: 1rem; }
.btn-sm { padding: 8px 16px; font-size: .88rem; }
.btn-block { display: block; width: 100%; text-align: center; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-d); color: #fff; transform: translateY(-2px); }
.btn-ghost { background: transparent; color: var(--navy); border-color: rgba(11,37,69,.25); }
.btn-ghost:hover { background: var(--navy); color: #fff; }
/* ghost button on dark sections (e.g. Factory Strength) — white text */
.btn-ghost.on-dark { color: #fff; border-color: rgba(255,255,255,.45); }
.btn-ghost.on-dark:hover { background: #fff; color: var(--navy); }
.btn-light { background: #fff; color: var(--navy); }
.btn-light:hover { transform: translateY(-2px); }
.btn-outline-light { background: transparent; color: #fff; border-color: rgba(255,255,255,.6); }
.btn-outline-light:hover { background: #fff; color: var(--navy); }

/* ---------- Top bar ---------- */
.topbar { background: var(--navy); color: #cbd5e1; font-size: .85rem; }
.topbar-inner { display: flex; justify-content: space-between; align-items: center; height: 38px; }
.topbar span, .topbar a { color: #cbd5e1; }
.topbar a:hover { color: #fff; }
.topbar-sep { opacity: .4; margin: 0 8px; }
.topbar-catalog { font-weight: 600; }
.lang-switcher { display: inline-flex; align-items: center; gap: 6px; }
.lang-switcher .lang-label { cursor: default; }
.lang-switcher select {
  background: #16263f; color: #fff; border: 1px solid #33455e;
  border-radius: 4px; padding: 2px 6px; font-size: .82rem; cursor: pointer;
  max-width: 150px;
}
.lang-switcher select:focus { outline: none; border-color: var(--accent, #2f80ed); }
html[dir="rtl"] .lang-switcher { flex-direction: row-reverse; }
html[dir="rtl"] .topbar-inner,
html[dir="rtl"] .footer-grid,
html[dir="rtl"] .footer-contact { text-align: right; }
html[dir="rtl"] .float-dock { inset-inline-start: auto; inset-inline-end: 16px; }
html[dir="rtl"] .breadcrumb, html[dir="rtl"] .nav { text-align: right; }

/* ---------- Header ---------- */
.header { background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 100;
  box-shadow: 0 2px 10px rgba(15,23,42,.04); }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 74px; }
.brand { display: flex; align-items: center; gap: 10px; }
.brand-logo { font-size: 2rem; }
.brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.brand-text strong { color: var(--navy); font-size: 1.15rem; }
.brand-text small { color: var(--muted); font-size: .72rem; text-transform: uppercase; letter-spacing: 1px; }
.nav { display: flex; align-items: center; gap: 6px; }
.nav a { color: var(--ink); padding: 9px 13px; border-radius: 6px; font-weight: 500; font-size: .95rem; }
.nav a:hover { color: var(--blue); background: var(--bg-alt); }
.nav-cta { background: var(--accent); color: #fff !important; margin-left: 6px; }
.nav-cta:hover { background: var(--accent-d); }
.nav-toggle { display: none; background: none; border: none; font-size: 1.6rem; cursor: pointer; color: var(--navy); }

/* Products dropdown */
.nav-dropdown { position: relative; }
.nav-dropdown-toggle { display: flex; align-items: center; gap: 5px; }
.nav-caret { font-size: .7rem; }
.nav-sub { display: none; position: absolute; top: 100%; left: 0; min-width: 250px;
  background: #fff; border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow-lg);
  padding: 8px; flex-direction: column; align-items: stretch; z-index: 10; }
.nav-sub a { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 320px; padding: 10px 14px; }
.nav-dropdown:hover > .nav-sub { display: flex; }
html[dir="rtl"] .nav-sub { left: auto; right: 0; }

/* ---------- Banner ----------
   Fixed 40:9 slot (height = 2/5 of the original 16:9 frame) that scales
   fluidly with the window width. The banner photo fills the frame
   (object-fit: cover, center) so no empty space; text stays readable
   over the dark shade. */
.banner { position: relative; aspect-ratio: 40 / 9; min-height: 152px; max-height: 344px;
  display: flex; align-items: center; overflow: hidden; color: #fff; padding: 24px 0;
  background: linear-gradient(135deg, var(--navy), var(--navy2)); }
.banner-bg { position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: center; z-index: 0; }
.banner-shade { position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(rgba(8,24,48,.72), rgba(8,24,48,.72)); }
.banner-inner { position: relative; z-index: 2; }
.banner-content { max-width: 640px; }
.banner-badge { display: inline-block; background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.3);
  padding: 6px 14px; border-radius: 30px; font-size: .82rem; margin-bottom: 20px; backdrop-filter: blur(4px); }
.banner h1 { font-size: clamp(1.5rem, .9rem + 2.2vw, 2.4rem); line-height: 1.15;
  margin-bottom: 12px; font-weight: 800; }
.banner p { font-size: clamp(.85rem, .72rem + .42vw, 1.04rem); color: #e2e8f0; margin-bottom: 20px; }
.banner-actions { display: flex; gap: 14px; flex-wrap: wrap; }

/* ---------- Page hero ---------- */
.page-hero { background: linear-gradient(135deg, var(--navy), var(--navy2)); color: #fff; padding: 64px 0; }
.page-hero h1 { font-size: 2.5rem; margin-bottom: 12px; }
.page-hero p { color: #cbd5e1; font-size: 1.1rem; max-width: 720px; }
.page-hero .eyebrow { color: #fca5a5; }
.page-hero .cat-hero-tag { color: #fff; font-size: 1.15rem; font-weight: 600; margin-bottom: 8px; }
.page-hero .cat-hero-desc { color: #cbd5e1; font-size: 1rem; max-width: 720px; margin-bottom: 6px; }
.page-hero ul.cat-hero-desc { margin-bottom: 0; }
/* list-style description: .check-list li (var(--ink)) is defined later in
   this file and would otherwise paint near-invisible dark text on the
   dark navy hero background — this higher-specificity rule wins */
.page-hero .cat-hero-desc li { color: #fff; }
.breadcrumb { margin-top: 18px; font-size: .85rem; color: #94a3b8; }
.breadcrumb a { color: #cbd5e1; }

/* ---------- Sections ---------- */
.section { padding: 72px 0; }
.section-alt { background: var(--bg-alt); }
.section-dark { background: linear-gradient(135deg, var(--navy), var(--navy2)); color: #fff; }
.section-head { margin-bottom: 40px; }
.section-head.center { text-align: center; }
.section-head h2 { font-size: 2rem; color: var(--navy); }
.section-head.light h2 { color: #fff; }
.section-sub { color: var(--muted); margin-top: 8px; }
.section-head.light .section-sub { color: #cbd5e1; }
.section-line { display: block; width: 60px; height: 4px; background: var(--accent); margin-top: 12px; border-radius: 4px; }
.section-head.center .section-line { margin: 12px auto 0; }

/* ---------- About short ---------- */
.about-short { font-size: 1.2rem; color: var(--ink); }
.about-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-top: 40px; }
.stat { text-align: center; background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px 12px; box-shadow: var(--shadow); }
.stat-num { display: block; font-size: 2rem; font-weight: 800; color: var(--blue); }
.stat-label { color: var(--muted); font-size: .9rem; }

/* ---------- Card grid ---------- */
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 24px; }
.cat-grid { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }

/* ---------- Category cards ---------- */
.cat-card { background: #fff; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow);
  transition: .25s; display: flex; flex-direction: column; }
.cat-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
/* Square 1:1 slot (800x800 product photos fit it EXACTLY: no cropping,
   no letterbox). Non-square photos are still shown in full (contain) with
   the white area blending into the card. */
.cat-card-img { aspect-ratio: 1 / 1; height: auto; overflow: hidden; background: #fff; }
/* contain = show the WHOLE product photo, never cropped; the white letterbox
   area blends into the white card, so no visible empty bars either. */
.cat-card-img img { width: 100%; height: 100%; object-fit: contain; background: #fff; transition: .4s; }
.cat-card:hover .cat-card-img img { transform: scale(1.04); }
.cat-card-body { padding: 20px; }
.cat-card-body h3 { color: var(--navy); margin-bottom: 6px; }
.cat-tag { display: inline-block; font-size: .75rem; background: var(--bg-alt); color: var(--blue);
  padding: 3px 10px; border-radius: 20px; font-weight: 600; margin-bottom: 10px; }
.cat-card-body p { color: var(--muted); font-size: .9rem; margin-bottom: 14px; }
.cat-more { color: var(--accent); font-weight: 600; font-size: .9rem; }

/* ---------- Advantages ---------- */
.adv-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 24px; }
.adv-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 30px 24px;
  text-align: center; transition: .25s; box-shadow: var(--shadow); }
.adv-card:hover { border-color: var(--blue); transform: translateY(-4px); }
.adv-icon { font-size: 2.6rem; margin-bottom: 16px; }
.adv-card h3 { color: var(--navy); font-size: 1.1rem; margin-bottom: 10px; }
.adv-card p { color: var(--muted); font-size: .92rem; }
.section-dark .adv-card { background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.12); }
.section-dark .adv-card h3 { color: #fff; }
.section-dark .adv-card p { color: #cbd5e1; }

/* ---------- Factory gallery row ---------- */
.gallery-row { display: grid; grid-template-columns: 1.5fr 1fr; gap: 16px; }
.gallery-col { display: grid; grid-template-rows: 1fr 1fr; gap: 16px; }
.gallery-thumb { position: relative; border-radius: var(--radius); overflow: hidden; display: block; min-height: 200px; }
.gallery-thumb img { width: 100%; height: 100%; object-fit: cover; position: absolute; inset: 0; transition: .4s; }
.gallery-thumb:hover img { transform: scale(1.05); }
.gallery-cap { position: absolute; bottom: 0; left: 0; right: 0; background: linear-gradient(transparent, rgba(0,0,0,.75));
  color: #fff; padding: 24px 16px 12px; font-weight: 600; }

/* ---------- Two col ---------- */
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.two-col-img img { border-radius: var(--radius); box-shadow: var(--shadow-lg); }
.two-col-text h2 { font-size: 2rem; color: var(--navy); margin-bottom: 14px; }
.two-col-text p { color: var(--muted); margin-bottom: 20px; }
.feat-para { margin-bottom: 12px; line-height: 1.7; }
.feat-para:last-child { margin-bottom: 0; }
.check-list { list-style: none; margin-bottom: 24px; }
.check-list li { padding-left: 28px; position: relative; margin-bottom: 10px; color: var(--ink); }
.check-list li::before { content: "✔"; position: absolute; left: 0; color: var(--accent); font-weight: 700; }

/* ---------- Market chips ---------- */
.market-grid { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; }
.market-chip { background: #fff; border: 1px solid var(--line); padding: 12px 22px; border-radius: 30px;
  font-weight: 600; color: var(--navy); box-shadow: var(--shadow); }

/* ---------- CTA band ---------- */
.cta-band { background: linear-gradient(135deg, var(--accent), var(--accent-d)); color: #fff; padding: 56px 0; }
.cta-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.cta-band h2 { font-size: 1.9rem; margin-bottom: 8px; }
.cta-band p { opacity: .92; }
.cta-actions { display: flex; gap: 14px; flex-wrap: wrap; }

/* ---------- Footer ---------- */
.footer { background: var(--navy); color: #cbd5e1; padding: 56px 0 0; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1.4fr; gap: 40px; padding-bottom: 40px; }
.footer h4 { color: #fff; margin-bottom: 16px; font-size: 1.05rem; }
.footer p { font-size: .92rem; margin-bottom: 10px; }
.footer ul { list-style: none; }
.footer ul li { margin-bottom: 9px; font-size: .92rem; }
.footer a { color: #cbd5e1; }
.footer a:hover { color: #fff; }
.footer-badge { font-weight: 600; color: #fca5a5; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); padding: 18px 0; font-size: .85rem; text-align: center; }

/* ---------- Floating dock ---------- */
.float-dock { position: fixed; right: 20px; bottom: 24px; z-index: 200; display: flex; flex-direction: column; gap: 12px; }
.float-btn { display: flex; flex-direction: column; align-items: center; justify-content: center; width: 60px; height: 60px;
  border-radius: 50%; color: #fff; box-shadow: var(--shadow-lg); transition: .2s; font-size: 1.5rem; }
.float-btn:hover { transform: scale(1.08); }
.float-inquiry { background: var(--accent); }
.float-wa { background: #25d366; }
.float-mail { background: var(--blue); }
.float-label { font-size: .6rem; font-weight: 700; }

/* ---------- Modal ---------- */
.modal { position: fixed; inset: 0; z-index: 300; display: flex; align-items: center; justify-content: center; }
.modal[hidden] { display: none; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(11,37,69,.6); }
.modal-box { position: relative; background: #fff; border-radius: var(--radius); width: 92%; max-width: 520px;
  padding: 30px; box-shadow: var(--shadow-lg); max-height: 90vh; overflow-y: auto; }
.modal-close { position: absolute; top: 14px; right: 14px; background: var(--bg-alt); border: none;
  width: 34px; height: 34px; border-radius: 50%; cursor: pointer; font-size: 1rem; }
.modal-box h3 { color: var(--navy); margin-bottom: 6px; }
.modal-sub { color: var(--muted); font-size: .9rem; margin-bottom: 18px; }

/* ---------- Forms ---------- */
.inquiry-form .form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-weight: 600; font-size: .85rem; margin-bottom: 6px; color: var(--navy); }
.form-group input, .form-group select, .form-group textarea {
  width: 100%; padding: 11px 13px; border: 1px solid var(--line); border-radius: 8px; font-size: .95rem;
  font-family: inherit; }
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
  outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(29,78,216,.1); }

/* ---------- Flash ---------- */
.flash { padding: 12px 16px; border-radius: 8px; margin-bottom: 16px; font-size: .92rem; }
.flash-success { background: #d1fae5; color: #065f46; border: 1px solid #a7f3d0; }
.flash-error { background: #fee2e2; color: #991b1b; border: 1px solid #fecaca; }

/* ---------- Products sidebar layout ---------- */
.products-layout { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 32px; align-items: start; }
/* grid children default to min-width:auto — the horizontal chip bar on phones
   would otherwise force the whole layout wider than the viewport */
.products-layout > * { min-width: 0; }
.products-main { min-width: 0; }
.cat-sidebar { background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 18px 14px; position: sticky; top: 90px; }
.cat-sidebar-title { color: var(--navy); font-size: .82rem; text-transform: uppercase; letter-spacing: 1.5px;
  margin: 0 8px 12px; }
.cat-sidebar-nav { display: flex; flex-direction: column; gap: 4px; }
.cat-sidebar-nav a { display: flex; justify-content: space-between; align-items: center; gap: 10px;
  padding: 10px 12px; border-radius: 8px; color: var(--ink); font-weight: 500; font-size: .95rem; }
.cat-sidebar-nav a:hover { background: var(--bg-alt); color: var(--blue); }
.cat-sidebar-nav a.active { background: var(--navy); color: #fff; }
.cat-count { flex: 0 0 auto; font-size: .74rem; font-weight: 600; background: var(--bg-alt); color: var(--muted);
  padding: 2px 9px; border-radius: 20px; }
.cat-sidebar-nav a.active .cat-count { background: rgba(255,255,255,.18); color: #fff; }

/* ---------- Products list ---------- */
.product-list-card { background: #fff; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow);
  transition: .25s; display: flex; flex-direction: column; }
.product-list-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); }
/* Square 1:1 slot — 800x800 photos fill it exactly (no crop, no letterbox) */
.plc-img { aspect-ratio: 1 / 1; height: auto; overflow: hidden; background: #fff; }
.plc-img img { width: 100%; height: 100%; object-fit: contain; background: #fff; }
.plc-body { padding: 20px; }
.plc-body h3 { color: var(--navy); }
.plc-body p { color: var(--muted); font-size: .9rem; margin: 8px 0 12px; }
.plc-count { color: var(--accent); font-weight: 600; font-size: .9rem; }

/* ---------- Product detail ---------- */
/* Product category grid: main image + name + "view details" */
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 24px; }
.pg-card { background: #fff; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow);
           display: flex; flex-direction: column; transition: transform .2s ease, box-shadow .2s ease; }
.pg-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); }
.pg-img { aspect-ratio: 1 / 1; height: auto; display: block; overflow: hidden; background: #fff; }
.pg-img img { width: 100%; height: 100%; object-fit: contain; background: #fff; transition: transform .3s ease; }
.pg-card:hover .pg-img img { transform: scale(1.04); }
.pg-body { padding: 16px 18px 20px; display: flex; flex-direction: column; gap: 12px; flex: 1; }
.pg-body h3 { font-size: 1rem; color: var(--navy); line-height: 1.35; }
.pg-body h3 a { color: inherit; text-decoration: none; }
.pg-body h3 a:hover { color: var(--blue); }
.pg-sub { color: var(--muted); font-size: .85rem; line-height: 1.45; margin: 2px 0 10px; }
.pg-btn { margin-top: auto; align-self: flex-start; }
.product-detail-grid { display: flex; flex-direction: column; gap: 40px; }
.product-detail { display: grid; grid-template-columns: 1fr 1.3fr; gap: 40px; background: #fff;
  border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; align-items: start; }
/* grid children default to min-width:auto, and the aspect-ratio main image
   would otherwise force the column wider than the viewport on phones */
.product-detail > * { min-width: 0; }
.pd-main-img { min-width: 0; }
.pd-gallery { background: var(--bg-alt); display: flex; flex-direction: column; }
.pd-main { display: block; }
/* 1:1 frame that scales with the column width; `contain` always shows the
   whole product photo (no cropping) on a white background, so letterbox
   areas blend in and no empty bars are visible. */
.pd-main-img { display: block; width: 100%; height: auto; aspect-ratio: 1 / 1;
  object-fit: contain; background: #fff; }
.pd-thumbs { display: flex; gap: 8px; padding: 12px; overflow-x: auto; background: #fff; }
.pd-thumb { flex: 0 0 auto; width: 64px; height: 64px; padding: 0; border: 2px solid var(--line);
  border-radius: 8px; overflow: hidden; cursor: pointer; background: #fff; transition: border-color .2s, opacity .2s; opacity: .75; }
.pd-thumb img { width: 100%; height: 100%; object-fit: contain; background: #fff; display: block; }
.pd-thumb:hover { opacity: 1; }
.pd-thumb.active { border-color: var(--navy); opacity: 1; }
.pd-body { padding: 34px; }
.pd-body h2 { color: var(--navy); margin-bottom: 20px; }
.pd-block { margin-bottom: 22px; }
.pd-block h4 { color: var(--blue); text-transform: uppercase; font-size: .82rem; letter-spacing: 1px; margin-bottom: 8px; }
.pd-block p { color: var(--muted); }
.pd-oem { background: var(--bg-alt); border-radius: 8px; padding: 16px; }
.spec-table { width: 100%; border-collapse: collapse; }
.spec-table th, .spec-table td { border: 1px solid var(--line); padding: 8px 12px; text-align: left; font-size: .9rem; }
.spec-table th { background: var(--bg-alt); color: var(--navy); width: 35%; }
.faq-mini { margin-bottom: 10px; }
.faq-mini strong { color: var(--navy); }
.faq-mini p { font-size: .9rem; }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; border-radius: var(--radius); box-shadow: var(--shadow); }
.data-table { width: 100%; border-collapse: collapse; background: #fff; min-width: 640px; }
.data-table th, .data-table td { padding: 14px 16px; text-align: left; border-bottom: 1px solid var(--line); font-size: .92rem; }
.data-table thead th { background: var(--navy); color: #fff; font-weight: 600; }
.data-table tbody tr:nth-child(even) { background: var(--bg-alt); }
.data-table tbody tr:hover { background: #eef2ff; }

/* ---------- Material detail ---------- */
.mat-detail-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; }
.mat-detail-card { background: #fff; border: 1px solid var(--line); border-left: 4px solid var(--accent);
  border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); }
.mat-detail-card h3 { color: var(--navy); margin-bottom: 10px; }
.mat-detail-card p { color: var(--muted); font-size: .94rem; }
.mat-sub { margin-top: 12px; }
.mat-sub:first-of-type { margin-top: 0; }
.mat-sub h4 { color: var(--navy); font-size: .95rem; margin-bottom: 6px; }
.mat-sub .check-list { margin-bottom: 0; }
.mat-sub .check-list li { color: var(--muted); font-size: .94rem; margin-bottom: 6px; }
.mat-sub p { margin-bottom: 0; }

/* ---------- Guide ---------- */
.guide-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; }
.guide-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 22px;
  box-shadow: var(--shadow); }
.guide-sit { font-weight: 700; color: var(--navy); margin-bottom: 10px; }
.guide-rec { color: var(--muted); font-size: .94rem; }

/* ---------- OEM ---------- */
.oem-grid { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.oem-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 28px;
  box-shadow: var(--shadow); transition: .25s; }
.oem-card:hover { transform: translateY(-4px); border-color: var(--blue); }
.oem-ico { font-size: 2rem; margin-bottom: 14px; }
.oem-card h3 { color: var(--navy); margin-bottom: 8px; }
.oem-card p { color: var(--muted); font-size: .92rem; }

/* ---------- Process flow ---------- */
.process-flow { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 20px; }
.process-step { text-align: center; }
.process-num { display: inline-flex; align-items: center; justify-content: center; width: 48px; height: 48px;
  background: var(--navy); color: #fff; border-radius: 50%; font-weight: 800; font-size: 1.2rem; margin-bottom: 12px; }
.process-text { color: var(--ink); font-size: .9rem; font-weight: 500; }

/* ---------- About ---------- */
.about-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.about-layout.reverse { direction: rtl; }
.about-layout.reverse > * { direction: ltr; }
.about-img img { border-radius: var(--radius); box-shadow: var(--shadow-lg); }
.about-img-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
/* uploaded photos scale to fit the frame without being cropped */
.about-img-grid img { width: 100%; aspect-ratio: 4 / 3; object-fit: contain;
  border-radius: var(--radius); box-shadow: var(--shadow-lg); background: #eef2f7; }
/* fixed-slot grids: photos always fill the 4:3 slot (center-crop display;
   about company-profile uploads are pre-cropped to this slot on save) */
.about-img-grid.fill img { object-fit: cover; background: transparent; }
.section-dark .about-img-grid img { background: transparent; }
/* homepage factory photos link to the factory page;
   material-technology photos link to the materials page */
.about-img-grid .factory-link, .about-img-grid .material-link { display: block; }
.about-img-grid .factory-link img, .about-img-grid .material-link img { cursor: pointer; transition: transform .4s, box-shadow .4s; }
.about-img-grid .factory-link:hover img, .about-img-grid .material-link:hover img { transform: scale(1.03); box-shadow: 0 10px 24px rgba(0,0,0,.25); }
.about-block h2 { color: var(--navy); margin-bottom: 14px; }
.about-block p { color: var(--muted); margin-bottom: 16px; }
.about-feature { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 28px;
  text-align: center; box-shadow: var(--shadow); }
.about-feature h3 { color: var(--navy); margin: 14px 0 10px; }
.about-feature p { color: var(--muted); font-size: .92rem; }

/* ---------- Gallery grid ---------- */
.gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; }
.gallery-item { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); margin: 0; background: #fff; }
.gallery-item img { width: 100%; height: 220px; object-fit: cover; transition: .4s; }
.gallery-item:hover img { transform: scale(1.05); }
.gallery-item figcaption { padding: 14px 16px; font-weight: 600; color: var(--navy); }

/* ---------- FAQ ---------- */
.faq-list { display: flex; flex-direction: column; gap: 14px; }
.faq-item { background: #fff; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.faq-item summary { padding: 18px 20px; font-weight: 600; color: var(--navy); cursor: pointer; list-style: none;
  position: relative; padding-right: 44px; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; position: absolute; right: 20px; top: 50%; transform: translateY(-50%);
  font-size: 1.5rem; color: var(--accent); }
.faq-item[open] summary::after { content: "−"; }
.faq-a { padding: 0 20px 18px; color: var(--muted); }

/* ---------- News ---------- */
.news-grid { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.news-card { background: #fff; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow);
  transition: .25s; display: flex; flex-direction: column; }
.news-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); }
.news-img { height: 200px; overflow: hidden; }
.news-img img { width: 100%; height: 100%; object-fit: cover; }
.news-body { padding: 20px; }
.news-meta { font-size: .78rem; color: var(--accent); font-weight: 600; text-transform: uppercase; }
.news-body h3 { color: var(--navy); margin: 8px 0; }
.news-body p { color: var(--muted); font-size: .9rem; }
.news-more { color: var(--blue); font-weight: 600; font-size: .9rem; }
.article-img { border-radius: var(--radius); margin-bottom: 24px; width: 100%; }
.article p { font-size: 1.05rem; color: var(--ink); margin-bottom: 20px; }
.article-actions { display: flex; gap: 14px; margin-top: 30px; flex-wrap: wrap; }

/* ---------- Contact ---------- */
.contact-layout { display: grid; grid-template-columns: 1fr 1.3fr; gap: 40px; }
.contact-info h2, .contact-form-card h2 { color: var(--navy); margin-bottom: 20px; }
.contact-list { list-style: none; }
.contact-list li { display: flex; gap: 14px; margin-bottom: 20px; align-items: flex-start; }
.cico { font-size: 1.4rem; }
.contact-list strong { color: var(--navy); }
.contact-list p { color: var(--muted); font-size: .92rem; }
.contact-form-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 30px; box-shadow: var(--shadow); }
.map-section { height: 400px; }
.map-section iframe { width: 100%; height: 100%; border: 0; }

/* ---------- 404 ---------- */
.err-code { font-size: 6rem; font-weight: 800; color: var(--accent); line-height: 1; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .nav { position: fixed; top: 112px; left: 0; right: 0; background: #fff; flex-direction: column;
    align-items: stretch; padding: 12px; box-shadow: var(--shadow-lg); transform: translateY(-140%);
    transition: .3s; z-index: 99; border-radius: 0 0 12px 12px; }
  .nav.open { transform: translateY(0); }
  .nav a { padding: 14px; border-bottom: 1px solid var(--line); }
  .nav-cta { margin: 12px 0 0; text-align: center; }
  .nav-toggle { display: block; }
  /* Products dropdown: tap to expand inline instead of hover */
  .nav-dropdown { position: static; }
  .nav-dropdown:hover > .nav-sub { display: none; }
  .nav-dropdown.show > .nav-sub { display: flex; }
  .nav-sub { position: static; border: none; box-shadow: none; border-radius: 0; background: transparent;
    padding: 0; margin: 0 0 8px; border-inline-start: 2px solid var(--line); padding-inline-start: 14px; }
  .nav-sub a { white-space: normal; max-width: none; padding: 12px 8px; }
  /* Banner: let the text set the height so nothing gets cut off */
  .banner { aspect-ratio: auto; min-height: 0; max-height: none; padding: 44px 0 40px; }
  .banner h1 { font-size: 1.7rem; }
  .banner-badge { margin-bottom: 12px; }
  .banner p { margin-bottom: 16px; }
  /* Typography scales down for small screens */
  .page-hero { padding: 44px 0; }
  .page-hero h1 { font-size: 1.9rem; }
  .page-hero p { font-size: 1rem; }
  .section { padding: 56px 0; }
  .section-head { margin-bottom: 30px; }
  .section-head h2 { font-size: 1.6rem; }
  .two-col, .about-layout, .product-detail { gap: 28px; }
  .two-col-text h2 { font-size: 1.6rem; }
  .cta-band { padding: 44px 0; }
  .cta-band h2 { font-size: 1.5rem; }
  .cta-actions .btn { padding: 11px 18px; font-size: .9rem; }
  .pd-body { padding: 24px; }
  .about-stats, .two-col, .product-detail, .about-layout, .contact-layout, .gallery-row, .footer-grid {
    grid-template-columns: 1fr; }
  /* Product sidebar becomes a horizontal chip bar on phones */
  .products-layout { grid-template-columns: minmax(0, 1fr); gap: 18px; }
  .cat-sidebar { position: static; background: transparent; border: none; box-shadow: none; padding: 0; }
  .cat-sidebar-title { display: none; }
  .cat-sidebar-nav { flex-direction: row; overflow-x: auto; gap: 8px; padding: 2px 2px 6px;
    -webkit-overflow-scrolling: touch; scrollbar-width: thin; }
  .cat-sidebar-nav a { flex: 0 0 auto; white-space: nowrap; background: #fff; border: 1px solid var(--line);
    border-radius: 30px; padding: 8px 16px; font-size: .9rem; }
  .cat-sidebar-nav a:hover { background: #fff; color: var(--blue); }
  .cat-sidebar-nav a.active { border-color: var(--navy); }
  .cat-count { display: none; }
  .gallery-col { grid-template-rows: auto; }
  .footer-grid { gap: 28px; }
  .cta-inner { flex-direction: column; text-align: center; }
  .float-dock { right: 14px; bottom: 14px; }
  .float-btn { width: 54px; height: 54px; }
}
@media (max-width: 640px) {
  /* Top bar: keep a single 38px line (the mobile nav is anchored 112px
     below the top, so it must not grow) — drop the email address */
  .topbar { font-size: .75rem; }
  .topbar span, .topbar a { white-space: nowrap; }
  .topbar-left > span:nth-child(2),
  .topbar-left > span:nth-child(3) { display: none; }
  .lang-switcher select { max-width: 110px; font-size: .75rem; padding: 1px 4px; }
}
@media (max-width: 560px) {
  .inquiry-form .form-row { grid-template-columns: 1fr; }
  .banner h1 { font-size: 1.45rem; }
  .banner-actions .btn { padding: 10px 16px; font-size: .88rem; }
  .section { padding: 44px 0; }
  .page-hero { padding: 36px 0; }
  .page-hero h1 { font-size: 1.6rem; }
  /* Hide the catalog link in the top bar on very narrow screens */
  .topbar-right > .topbar-catalog,
  .topbar-right > .topbar-sep { display: none; }
  /* Stats: 2 x 2 instead of one giant column */
  .about-stats { grid-template-columns: repeat(2, 1fr); gap: 12px; margin-top: 28px; }
  .stat { padding: 18px 8px; }
  .stat-num { font-size: 1.5rem; }
  .stat-label { font-size: .8rem; }
  .contact-list li { gap: 10px; }
  .contact-form-card { padding: 22px 16px; }
  .modal-box { width: 94%; padding: 22px 16px; }
  .news-img { height: 160px; }
  .gallery-thumb { min-height: 160px; }
  .err-code { font-size: 4rem; }
  .float-dock { right: 12px; bottom: 12px; gap: 8px; }
  .float-btn { width: 48px; height: 48px; }
  .float-label { display: none; }
}