:root {
    --ink: #16181d;
    --ink-2: #3a3f4a;
    --muted: #6b7280;
    --line: #e4e6eb;
    --bg: #f6f7f9;
    --card: #ffffff;
    --accent: #f2a900;
    --accent-ink: #1a1400;
    --red: #d71920;
    --radius: 10px;
    --shadow: 0 1px 2px rgba(16, 24, 40, .06), 0 4px 16px rgba(16, 24, 40, .06);
    --wrap: 1180px;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    font: 16px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: var(--ink);
    background: var(--bg);
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .6em; }
h1 { font-size: clamp(1.7rem, 3vw, 2.4rem); }
h2 { font-size: clamp(1.3rem, 2.2vw, 1.7rem); }
h3 { font-size: 1.1rem; }
p { margin: 0 0 1em; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 0; background: var(--accent); padding: 8px 12px; z-index: 100; }
.skip:focus { left: 8px; }
.muted { color: var(--muted); }

/* Buttons */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: .4em;
    padding: .65em 1.2em; border-radius: 999px; border: 1px solid transparent;
    font: inherit; font-weight: 600; text-decoration: none; cursor: pointer;
    background: var(--ink); color: #fff; transition: transform .1s, background .15s;
}
.btn:hover { background: #000; }
.btn:active { transform: translateY(1px); }
.btn-accent { background: var(--accent); color: var(--accent-ink); }
.btn-accent:hover { background: #ffb800; }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { background: #fff; }
.btn-danger { background: var(--red); }
.btn-danger:hover { background: #b0141a; }
.btn-sm { padding: .35em .8em; font-size: .9rem; }

/* Header */
.site-header { background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 50; }
.site-header::after { content: ""; display: block; height: 4px; background: linear-gradient(90deg, var(--accent) 0 70%, var(--red) 70%); }
.header-row { display: flex; align-items: center; gap: 24px; min-height: 84px; }
.brand img { width: 190px; height: auto; }
.site-nav { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.site-nav > a, .has-menu > a {
    display: block; padding: .55em .8em; border-radius: 8px; text-decoration: none;
    font-weight: 600; color: var(--ink-2);
}
.site-nav > a:hover, .has-menu > a:hover, .site-nav a.active { color: var(--ink); background: var(--bg); }
.site-nav .nav-cta { margin-left: 8px; color: var(--accent-ink); }
.site-nav .nav-cta:hover { background: #ffb800; }
.has-menu { position: relative; }
.has-menu .menu {
    position: absolute; top: 100%; left: 0; min-width: 240px; padding: 8px;
    background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
    display: none;
}
.has-menu:hover .menu, .has-menu:focus-within .menu { display: block; }
.has-menu .menu a { display: block; padding: .5em .75em; border-radius: 6px; text-decoration: none; color: var(--ink-2); }
.has-menu .menu a:hover { background: var(--bg); color: var(--ink); }
.nav-toggle { display: none; margin-left: auto; background: none; border: 0; padding: 10px; cursor: pointer; }
.nav-toggle span:not(.sr) { display: block; width: 24px; height: 2px; margin: 5px 0; background: var(--ink); }

@media (max-width: 980px) {
    .nav-toggle { display: block; }
    .site-nav {
        display: none; position: absolute; left: 0; right: 0; top: 100%;
        flex-direction: column; align-items: stretch; gap: 0; padding: 12px 20px 20px;
        background: #fff; border-bottom: 1px solid var(--line); box-shadow: var(--shadow);
    }
    .site-nav.open { display: flex; }
    .has-menu .menu { position: static; display: block; box-shadow: none; border: 0; padding: 0 0 0 12px; }
    .site-nav .nav-cta { margin: 10px 0 0; }
    .header-row { min-height: 70px; }
    .brand img { width: 160px; }
}

/* Page heading */
.page-head { background: var(--ink); color: #fff; padding: 44px 0 36px; }
.page-head h1 { margin: 0; }
.page-head p { margin: .5em 0 0; color: #c9ccd3; max-width: 760px; }
.crumbs { font-size: .9rem; color: #9aa0ab; margin-bottom: .6em; }
.crumbs a { color: #c9ccd3; text-decoration: none; }
.crumbs a:hover { color: #fff; }

.section { padding-block: 48px; }
.section-title { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.section-title h2 { margin: 0; }
.section-title a { font-weight: 600; text-decoration: none; color: var(--ink-2); }

/* Hero slider */
.hero { background: #0d0e11; }
.slides { position: relative; max-width: 1290px; margin: 0 auto; aspect-ratio: 1290 / 439; overflow: hidden; }
.slides img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .8s; }
.slides img.on { opacity: 1; }
.dots { position: absolute; left: 0; right: 0; bottom: 14px; display: flex; justify-content: center; gap: 8px; }
.dots button { width: 10px; height: 10px; padding: 0; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .45); cursor: pointer; }
.dots button.on { background: var(--accent); }

/* Cards and grids */
.grid { display: grid; gap: 20px; }
.grid-3 { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fill, minmax(min(220px, 44%), 1fr)); }
.card {
    background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
    box-shadow: var(--shadow); overflow: hidden; display: flex; flex-direction: column;
}
a.card { text-decoration: none; transition: transform .15s, box-shadow .15s; }
a.card:hover { transform: translateY(-2px); box-shadow: 0 8px 28px rgba(16, 24, 40, .12); }
.card-img { aspect-ratio: 4 / 3; background: #fff; display: grid; place-items: center; border-bottom: 1px solid var(--line); }
.card-img img { width: 100%; height: 100%; object-fit: contain; }
.card-img.cover img { object-fit: cover; }
.card-body { padding: 16px 18px 18px; flex: 1; }
.card-body h3 { margin-bottom: .3em; }
.card-body p { color: var(--muted); margin: 0; font-size: .95rem; }
.card-meta { display: flex; flex-wrap: wrap; gap: 6px 14px; color: var(--muted); font-size: .9rem; margin-top: 8px; }
.price { font-weight: 700; color: var(--ink); margin-top: 10px; }
.tag { display: inline-block; font-size: .78rem; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; color: var(--red); margin-bottom: 4px; }

.promo { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 16px; }
.promo a { display: block; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); background: #fff; }
.promo img { width: 100%; }

.cta-band { background: var(--accent); color: var(--accent-ink); }
.cta-band .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; padding-top: 32px; padding-bottom: 32px; }
.cta-band h2 { margin: 0; }
.cta-band p { margin: .3em 0 0; }

/* Text content */
.layout-side { display: grid; grid-template-columns: 240px 1fr; gap: 32px; align-items: start; }
.side-nav { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 8px; position: sticky; top: 110px; }
.side-nav a { display: block; padding: .55em .8em; border-radius: 6px; text-decoration: none; color: var(--ink-2); font-weight: 500; }
.side-nav a:hover { background: var(--bg); }
.side-nav a.active { background: var(--ink); color: #fff; }
.prose { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 28px 32px; }
.prose > :last-child { margin-bottom: 0; }
.prose ul { padding-left: 1.2em; }
.timeline { list-style: none; padding: 0; margin: 0; }
.timeline li { display: grid; grid-template-columns: 120px 1fr; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.timeline li:last-child { border-bottom: 0; }
.timeline b { color: var(--red); }
@media (max-width: 860px) {
    .layout-side { grid-template-columns: 1fr; }
    .side-nav { position: static; display: flex; flex-wrap: wrap; }
    .prose { padding: 20px; }
    .timeline li { grid-template-columns: 1fr; gap: 2px; }
}

table.data { width: 100%; border-collapse: collapse; background: #fff; }
table.data th, table.data td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
table.data th { font-size: .85rem; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); }
table.data tr.unread td { font-weight: 600; }
.table-scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); }

.cert-row { display: flex; flex-wrap: wrap; gap: 28px; align-items: center; justify-content: center; }
.cert-row img { height: 90px; width: auto; }

.doc-list { list-style: none; padding: 0; margin: 0; }
.doc-list li { display: flex; justify-content: space-between; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.doc-list li:last-child { border-bottom: 0; }

/* News */
.news { display: grid; grid-template-columns: 280px 1fr; gap: 0; }
.news img { width: 100%; height: 100%; object-fit: cover; }
.news .card-body p { color: var(--ink-2); }
@media (max-width: 700px) { .news { grid-template-columns: 1fr; } }

/* Product detail */
.detail { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 32px; align-items: start; }
.gallery-main { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); aspect-ratio: 4 / 3; display: grid; place-items: center; overflow: hidden; }
.gallery-main img { width: 100%; height: 100%; object-fit: contain; }
.thumbs { display: flex; gap: 8px; overflow-x: auto; padding: 10px 0; }
.thumbs button { flex: 0 0 84px; height: 64px; padding: 0; border: 2px solid transparent; border-radius: 6px; background: #fff; cursor: pointer; overflow: hidden; }
.thumbs button.on { border-color: var(--accent); }
.thumbs img { width: 100%; height: 100%; object-fit: cover; }
.specs { width: 100%; border-collapse: collapse; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.specs th, .specs td { padding: 11px 14px; border-bottom: 1px solid var(--line); text-align: left; }
.specs th { width: 45%; color: var(--muted); font-weight: 500; }
.specs tr:last-child th, .specs tr:last-child td { border-bottom: 0; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.features { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; }
.features ul { margin: 0; padding-left: 1.1em; }
.features li { margin-bottom: .4em; }
.sheet { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; overflow-x: auto; }
.sheet img { max-width: none; width: 100%; min-width: 640px; }
@media (max-width: 860px) { .detail { grid-template-columns: 1fr; } }

/* Forms */
.form { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 20px; }
.form-grid .full { grid-column: 1 / -1; }
@media (max-width: 700px) { .form-grid { grid-template-columns: 1fr; } .form { padding: 20px; } }
label { display: block; font-weight: 600; font-size: .92rem; margin-bottom: 6px; }
label .opt { font-weight: 400; color: var(--muted); }
input[type=text], input[type=email], input[type=tel], input[type=number], input[type=password], select, textarea {
    width: 100%; padding: .65em .8em; font: inherit; color: var(--ink);
    background: #fff; border: 1px solid #cfd3da; border-radius: 8px;
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: var(--accent); }
textarea { min-height: 150px; resize: vertical; }
.check { display: flex; gap: 8px; align-items: center; font-weight: 500; }
.field-error, .validation-summary-errors { color: var(--red); font-size: .9rem; }
.validation-summary-errors ul { margin: 0 0 12px; padding-left: 1.2em; }
.hp { position: absolute; left: -5000px; }
.notice { padding: 14px 18px; border-radius: var(--radius); margin-bottom: 20px; }
.notice.ok { background: #e8f6ec; color: #135c2a; border: 1px solid #b7e1c3; }
.notice.err { background: #fdecec; color: #8a1116; border: 1px solid #f3c1c3; }
.empty { text-align: center; padding: 48px 20px; background: #fff; border: 1px dashed #cfd3da; border-radius: var(--radius); color: var(--muted); }

/* Footer */
.site-footer { background: var(--ink); color: #c9ccd3; margin-top: 56px; }
.site-footer .brands { display: flex; flex-wrap: wrap; justify-content: center; gap: 18px 28px; padding-top: 28px; padding-bottom: 28px; border-bottom: 1px solid #2a2e36; }
.site-footer .brands img { height: 38px; width: auto; filter: grayscale(1) brightness(1.6); opacity: .75; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 28px; padding-top: 36px; padding-bottom: 28px; }
.footer-grid h2 { font-size: .85rem; text-transform: uppercase; letter-spacing: .08em; color: #fff; margin-bottom: 12px; }
.footer-grid a { display: block; color: #c9ccd3; text-decoration: none; padding: 3px 0; }
.footer-grid a:hover { color: var(--accent); }
.footer-grid p { margin: 0 0 6px; }
.footer-logo { background: #fff; border-radius: 8px; padding: 6px 10px; margin-bottom: 14px; width: 180px; }
.copyright { padding-top: 16px; padding-bottom: 24px; border-top: 1px solid #2a2e36; font-size: .9rem; color: #8b919c; }
@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .footer-grid { grid-template-columns: 1fr; } }

/* Admin */
.admin-bar { background: var(--ink); color: #fff; }
.admin-bar .wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 18px; min-height: 56px; }
.admin-bar a { color: #c9ccd3; text-decoration: none; font-weight: 600; }
.admin-bar a:hover, .admin-bar a.active { color: var(--accent); }
.admin-bar .right { margin-left: auto; display: flex; gap: 16px; align-items: center; }
.admin-bar form { margin: 0; }
.admin-bar button { background: none; border: 0; color: #c9ccd3; font: inherit; font-weight: 600; cursor: pointer; padding: 0; }
.admin-bar button:hover { color: var(--accent); }
.badge { display: inline-block; min-width: 1.6em; padding: 0 .45em; border-radius: 999px; background: var(--red); color: #fff; font-size: .8rem; text-align: center; }
.image-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.image-grid figure { margin: 0; background: #fff; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.image-grid img { aspect-ratio: 4 / 3; object-fit: cover; width: 100%; }
.image-grid figcaption { display: flex; gap: 6px; padding: 6px; flex-wrap: wrap; }
.image-grid form { margin: 0; }
.inline-form { display: inline; margin: 0; }
.login { max-width: 420px; margin: 60px auto; }
dl.request { display: grid; grid-template-columns: 160px 1fr; gap: 8px 16px; margin: 0; }
dl.request dt { color: var(--muted); }
dl.request dd { margin: 0; }
.pre { white-space: pre-wrap; }
.section-block { margin-bottom: 44px; }
