:root {
  --navy: #0b1f3a;
  --navy-2: #12305a;
  --ink: #0e1726;
  --steel: #55657a;
  --line: #dfe5ec;
  --grey-50: #f4f6f9;
  --grey-100: #eceff4;
  --accent: #1a73e8;
  --accent-dark: #0d5bc4;
  --accent-soft: #e8f1fe;
  --ok: #157347;
  --radius: 3px;
  --font-head: "Barlow Semi Condensed", "Arial Narrow", sans-serif;
  --font-body: "IBM Plex Sans", "Segoe UI", sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, monospace;
  --bs-body-font-family: var(--font-body);
  --bs-link-color-rgb: 13, 91, 196;
  --bs-primary: var(--accent);
  --bs-primary-rgb: 26, 115, 232;
}
body { min-height: 100vh; display: flex; flex-direction: column; font-family: var(--font-body); color: var(--ink); background: #fff; font-size: 1rem; line-height: 1.6; }
h1, h2, h3, h4, h5, .h1, .h2, .h3, .h4, .h5, .display-head { font-family: var(--font-head); font-weight: 700; letter-spacing: .005em; color: var(--navy); line-height: 1.15; }
h1, .h1 { font-size: clamp(2rem, 3.6vw, 3.1rem); }
h2, .h2 { font-size: clamp(1.6rem, 2.4vw, 2.2rem); }
.mono { font-family: var(--font-mono); font-size: .88em; }
.eyebrow { font-family: var(--font-mono); font-size: .75rem; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); font-weight: 500; }
a { text-underline-offset: 3px; }
:focus-visible { outline: 3px solid var(--accent) !important; outline-offset: 2px; box-shadow: none !important; }
.skip-link { position: absolute; left: -9999px; top: 0; z-index: 2000; background: var(--navy); color: #fff; padding: .6rem 1rem; }
.skip-link:focus { left: 1rem; top: .5rem; }
.hp-field { position: absolute !important; left: -10000px !important; width: 1px; height: 1px; overflow: hidden; }

/* Buttons */
.btn { border-radius: var(--radius); font-weight: 600; letter-spacing: .01em; padding: .6rem 1.15rem; transition: background-color .15s, color .15s, border-color .15s, transform .15s; }
.btn:active { transform: translateY(1px); }
.btn-accent { background: var(--accent); color: #fff; border: 1px solid var(--accent); }
.btn-accent:hover, .btn-accent:focus { background: var(--accent-dark); border-color: var(--accent-dark); color: #fff; }
.btn-navy { background: var(--navy); color: #fff; border: 1px solid var(--navy); }
.btn-navy:hover { background: var(--navy-2); color: #fff; }
.btn-outline-navy { border: 1px solid var(--navy); color: var(--navy); background: transparent; }
.btn-outline-navy:hover { background: var(--navy); color: #fff; }
.btn-ghost-light { border: 1px solid rgba(255,255,255,.5); color: #fff; }
.btn-ghost-light:hover { background: #fff; color: var(--navy); }

/* Header */
.topbar { background: var(--navy); color: #c9d6e8; font-size: .82rem; }
.topbar a { color: #e6eefa; text-decoration: none; }
.site-header { background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 1030; }
.brand { font-family: var(--font-head); font-weight: 700; font-size: 1.45rem; color: var(--navy); text-decoration: none; display: flex; align-items: center; gap: .6rem; }
.brand-mark { width: 36px; height: 36px; background: var(--navy); color: #fff; display: grid; place-items: center; font-family: var(--font-mono); font-size: .9rem; border-radius: 2px; position: relative; }
.brand-mark::after { content: ""; position: absolute; right: -4px; bottom: -4px; width: 10px; height: 10px; background: var(--accent); }
.brand img.brand-logo { height: 44px; width: 44px; object-fit: contain; flex-shrink: 0; }
.site-footer .brand img.brand-logo, .bg-navy .brand img.brand-logo, .admin-side .brand img.brand-logo { background: #fff; border-radius: 50%; padding: 3px; }
.site-footer .brand img.brand-logo { height: 40px; width: 40px; }
.admin-side .brand img.brand-logo { height: 34px; width: 34px; }
.site-header .nav-link { font-weight: 500; color: var(--ink); padding: .9rem .85rem !important; }
.site-header .nav-link:hover, .site-header .nav-link.active { color: var(--accent-dark); }
.mega-menu { width: min(920px, 92vw); padding: 1.5rem; border-radius: var(--radius); border: 1px solid var(--line); box-shadow: 0 18px 40px rgba(11,31,58,.12); }
.mega-menu .mega-root { font-weight: 600; color: var(--navy); text-decoration: none; display: block; padding: .25rem 0; }
.mega-menu .mega-root:hover { color: var(--accent-dark); }
.mega-menu .mega-child { font-size: .88rem; color: var(--steel); text-decoration: none; display: block; padding: .1rem 0 .1rem .75rem; border-left: 1px solid var(--line); }
.mega-menu .mega-child:hover { color: var(--accent-dark); border-left-color: var(--accent); }
.header-search { position: relative; min-width: 260px; }
.header-search input { border-radius: var(--radius); padding-left: 2.3rem; border-color: var(--line); background: var(--grey-50); }
.header-search .bi-search { position: absolute; left: .8rem; top: 50%; transform: translateY(-50%); color: var(--steel); }
.suggest-box { position: absolute; top: calc(100% + 4px); left: 0; right: 0; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 12px 30px rgba(11,31,58,.12); z-index: 1050; max-height: 420px; overflow: auto; }
.suggest-box a { display: block; padding: .55rem .85rem; text-decoration: none; color: var(--ink); border-bottom: 1px solid var(--grey-100); font-size: .9rem; }
.suggest-box a:hover, .suggest-box a.active { background: var(--accent-soft); }
.suggest-box .s-label { font-family: var(--font-mono); font-size: .68rem; text-transform: uppercase; letter-spacing: .1em; color: var(--steel); padding: .45rem .85rem; background: var(--grey-50); }

/* Hero */
.hero { position: relative; background: var(--navy); color: #fff; overflow: hidden; }
.hero-bg { position: absolute; inset: 0; background-size: cover; background-position: center; opacity: .32; }
.hero::before { content: ""; position: absolute; inset: 0; background-image: linear-gradient(rgba(255,255,255,.05) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.05) 1px, transparent 1px); background-size: 48px 48px; z-index: 1; }
.hero .container { position: relative; z-index: 2; }
.hero h1 { color: #fff; max-width: 22ch; }
.hero p.lead { color: #d4e0f0; max-width: 58ch; }
.hero-search { background: #fff; padding: .4rem; border-radius: var(--radius); max-width: 620px; }
.hero-search input { border: 0; box-shadow: none !important; }

/* Sections */
.section { padding-block: 5.5rem; }
.section-sm { padding-block: 3.5rem; }
.bg-grey { background: var(--grey-50); }
.bg-navy { background: var(--navy); color: #dbe5f3; }
.bg-navy h2, .bg-navy h3 { color: #fff; }
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 1rem; margin-bottom: 2.2rem; flex-wrap: wrap; }
.rule { width: 48px; height: 3px; background: var(--accent); margin: .8rem 0 1rem; }

/* Cards */
.cat-card { display: flex; flex-direction: column; height: 100%; border: 1px solid var(--line); background: #fff; text-decoration: none; color: var(--ink); border-radius: var(--radius); transition: border-color .15s, box-shadow .15s, transform .15s; }
.cat-card:hover { border-color: var(--accent); box-shadow: 0 10px 24px rgba(11,31,58,.08); transform: translateY(-2px); }
.cat-card .cat-img { aspect-ratio: 16/10; background: var(--grey-50); display: grid; place-items: center; overflow: hidden; }
.cat-card .cat-img img { width: 100%; height: 100%; object-fit: cover; }
.cat-card .cat-body { padding: 1rem 1.1rem 1.15rem; display: flex; justify-content: space-between; align-items: center; gap: .5rem; }
.cat-card h3 { font-size: 1.15rem; margin: 0; }
.cat-index { font-family: var(--font-mono); font-size: .72rem; color: var(--steel); }
.product-card { height: 100%; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; display: flex; flex-direction: column; transition: border-color .15s, box-shadow .15s; }
.product-card:hover { border-color: var(--accent); box-shadow: 0 10px 24px rgba(11,31,58,.08); }
.product-card .p-img { aspect-ratio: 4/3; background: var(--grey-50); display: grid; place-items: center; border-bottom: 1px solid var(--line); overflow: hidden; }
.product-card .p-img img { width: 100%; height: 100%; object-fit: contain; padding: .75rem; }
.product-card .p-body { padding: 1rem 1.1rem; flex: 1; display: flex; flex-direction: column; }
.product-card h3 { font-size: 1.1rem; margin-bottom: .35rem; }
.product-card h3 a { color: var(--navy); text-decoration: none; }
.product-card h3 a:hover { color: var(--accent-dark); }
.product-card .p-cat { font-size: .78rem; color: var(--steel); }
.product-card .p-sku { font-family: var(--font-mono); font-size: .78rem; color: var(--navy-2); background: var(--grey-50); border: 1px solid var(--line); padding: .05rem .4rem; display: inline-block; border-radius: 2px; }
.product-card .p-actions { margin-top: auto; padding-top: .9rem; display: flex; gap: .5rem; }
.feature-item { border-top: 2px solid var(--navy); padding-top: 1rem; height: 100%; }
.feature-item .num { font-family: var(--font-mono); color: var(--accent); font-size: .8rem; }
.placeholder-note { background: #fff8e1; border: 1px dashed #d9a400; color: #7a5b00; padding: .35rem .6rem; font-size: .82rem; border-radius: 2px; display: block; width: fit-content; }

/* Breadcrumb / page head */
.page-head { background: var(--grey-50); border-bottom: 1px solid var(--line); padding: 2.4rem 0 2rem; }
.page-head.with-banner { background-size: cover; background-position: center; position: relative; color: #fff; }
.page-head.with-banner::before { content: ""; position: absolute; inset: 0; background: rgba(11,31,58,.78); }
.page-head.with-banner > .container { position: relative; }
.page-head.with-banner h1, .page-head.with-banner .breadcrumb a, .page-head.with-banner .breadcrumb-item.active, .page-head.with-banner p { color: #fff; }
.breadcrumb { font-size: .85rem; margin-bottom: .75rem; }
.breadcrumb a { color: var(--steel); text-decoration: none; }
.breadcrumb a:hover { color: var(--accent-dark); text-decoration: underline; }

/* Category tree */
.cat-tree, .cat-tree ul { list-style: none; padding-left: 0; margin: 0; }
.cat-tree ul { padding-left: 1rem; border-left: 1px solid var(--line); margin-left: .45rem; }
.cat-tree li { margin: .15rem 0; }
.cat-tree a { text-decoration: none; color: var(--ink); padding: .2rem .35rem; display: inline-block; border-radius: 2px; }
.cat-tree a:hover, .cat-tree a.current { color: var(--accent-dark); background: var(--accent-soft); }
.cat-tree details > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: .2rem; }
.cat-tree details > summary::-webkit-details-marker { display: none; }
.cat-tree details > summary .tg { width: 1.1rem; display: inline-grid; place-items: center; color: var(--steel); transition: transform .15s; }
.cat-tree details[open] > summary .tg { transform: rotate(90deg); }
.cat-tree .leaf-pad { display: inline-block; width: 1.3rem; }

/* Cascade selector */
.cascade { border: 1px solid var(--line); background: #fff; padding: 1.25rem; border-radius: var(--radius); }
.cascade-levels { display: flex; flex-wrap: wrap; gap: .75rem; align-items: end; }
.cascade-level { min-width: 210px; flex: 1 1 210px; max-width: 320px; }
.cascade-level label { font-family: var(--font-mono); font-size: .7rem; letter-spacing: .1em; text-transform: uppercase; color: var(--steel); }
.cascade .form-select { border-radius: var(--radius); }

/* Product detail */
.gallery-main { border: 1px solid var(--line); background: var(--grey-50); aspect-ratio: 1/1; display: grid; place-items: center; border-radius: var(--radius); overflow: hidden; }
.gallery-main img { max-width: 100%; max-height: 100%; object-fit: contain; }
.gallery-thumbs { display: flex; gap: .5rem; flex-wrap: wrap; margin-top: .75rem; }
.gallery-thumbs button { border: 1px solid var(--line); background: #fff; padding: 2px; width: 72px; height: 72px; border-radius: 2px; }
.gallery-thumbs button.active, .gallery-thumbs button:hover { border-color: var(--accent); }
.gallery-thumbs img { width: 100%; height: 100%; object-fit: cover; }
.id-table th { font-weight: 500; color: var(--steel); width: 38%; font-size: .9rem; }
.id-table td { font-family: var(--font-mono); font-size: .9rem; }
.spec-table { border: 1px solid var(--line); }
.spec-table thead th { background: var(--navy); color: #fff; font-weight: 500; font-size: .85rem; letter-spacing: .03em; border-color: var(--navy); }
.spec-table td { font-size: .92rem; }
.spec-table td.val { font-family: var(--font-mono); }
.doc-item { display: flex; align-items: center; gap: 1rem; border: 1px solid var(--line); padding: .85rem 1rem; border-radius: var(--radius); text-decoration: none; color: var(--ink); transition: border-color .15s, background-color .15s; }
.doc-item:hover { border-color: var(--accent); background: var(--accent-soft); }
.doc-item .bi { font-size: 1.6rem; color: #c62828; }
.enquiry-panel { border: 1px solid var(--line); border-top: 4px solid var(--accent); background: #fff; padding: 1.75rem; border-radius: var(--radius); }
.form-control, .form-select { border-radius: var(--radius); border-color: #cfd8e3; }
.form-control:focus, .form-select:focus { border-color: var(--accent); }
.form-label { font-weight: 500; font-size: .9rem; }
.req { color: #c62828; }

/* Filters */
.filter-panel { border: 1px solid var(--line); border-radius: var(--radius); padding: 1.1rem; background: #fff; }
.filter-panel h2 { font-size: 1rem; text-transform: uppercase; letter-spacing: .06em; }

/* Footer */
.site-footer { background: var(--ink); color: #aebbd0; font-size: .92rem; }
.site-footer h2 { color: #fff; font-size: 1rem; letter-spacing: .08em; text-transform: uppercase; }
.site-footer a { color: #d6e0ee; text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.site-footer .foot-bottom { border-top: 1px solid rgba(255,255,255,.1); font-size: .82rem; }

.pagination .page-link { border-radius: 2px !important; color: var(--navy); }
.pagination .active .page-link { background: var(--navy); border-color: var(--navy); color: #fff; }
.empty-state { border: 1px dashed var(--line); padding: 3rem 1.5rem; text-align: center; border-radius: var(--radius); background: var(--grey-50); }
.fade-up { animation: fadeUp .5s ease both; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
@media (max-width: 991.98px) {
  .section { padding-block: 3.5rem; }
  .mega-menu { width: 100%; box-shadow: none; border: 0; padding: .5rem 0 .5rem 1rem; }
  .header-search { min-width: 0; width: 100%; margin: .5rem 0; }
}

main { flex: 1 0 auto; }
.site-header .navbar > .container { position: relative; }
.site-header .mega-menu { left: .75rem; }
.bg-navy .brand-mark, .site-footer .brand-mark { background: var(--accent); }
.bg-navy .brand-mark::after, .site-footer .brand-mark::after { background: #fff; }
.text-accent { color: var(--accent); }
