/* Octave Works theme — colors sampled from the logo (logo-new.webp):
   bright outline purple #7B50F0, deep infinity violet #6E3F94, black, brushed silver. */
:root {
  --brand: #7b50f0;
  --brand-600: #6a3fe0;
  --brand-deep: #6e3f94;
  --brand-50: #f3effe;
  --ink: #0f0e14;
  --ink-2: #26242e;
  --silver: #c9c9d1;
  --silver-2: #e9e9ee;
  --muted: #62616e;
  --bg: #f7f7fa;
  --surface: #ffffff;
  --line: #e2e1e8;
  --ok: #1a7f37;
  --warn: #a35f00;
  --bad: #c62828;
  --radius: 10px;
  --shadow: 0 1px 2px rgb(15 14 20 / 6%), 0 6px 20px rgb(15 14 20 / 6%);
  --font: "Archivo", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, Consolas, monospace;
  --wrap: 1200px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); color: var(--ink); background: var(--bg); line-height: 1.55; }
img { max-width: 100%; display: block; }
a { color: var(--brand-600); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { line-height: 1.15; margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: clamp(1.9rem, 4vw, 3rem); font-weight: 800; }
h2 { font-size: clamp(1.4rem, 2.5vw, 2rem); font-weight: 750; }
h3 { font-size: 1.1rem; font-weight: 700; }
code, .mono { font-family: var(--mono); font-size: .9em; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 16px; }
.section { padding: 56px 0; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 24px; flex-wrap: wrap; }
.section-head p { margin: 0; color: var(--muted); }
.eyebrow { text-transform: uppercase; letter-spacing: .12em; font-size: .75rem; font-weight: 700; color: var(--brand); }
.muted { color: var(--muted); }

/* ---- announcement + header ---- */
.announce { background: var(--ink); color: var(--silver-2); font-size: .85rem; text-align: center; padding: 6px 16px; }
.site-header { background: var(--surface); position: sticky; top: 0; z-index: 20; box-shadow: 0 1px 0 var(--line); }
.site-header::after { content: ""; display: block; height: 3px; background: linear-gradient(90deg, var(--ink), var(--brand-deep) 40%, var(--brand) 70%, var(--silver)); }
.header-row { display: flex; align-items: center; gap: 24px; min-height: 72px; }
.logo { flex-shrink: 0; padding: 6px 0; }
/* Frame the supplied square artwork around its central logo. */
.brand-image { display: block; position: relative; overflow: hidden; width: 150px; aspect-ratio: 665 / 365; background: #fff; }
.brand-image img { position: absolute; width: 154%; max-width: none; height: auto; left: 50%; top: 50%; transform: translate(-52%, -47%); }
.nav { display: flex; gap: 4px; margin-left: auto; align-items: center; }
.nav a { color: var(--ink-2); font-weight: 600; padding: 8px 12px; border-radius: 8px; }
.nav a:hover, .nav a.active { background: var(--brand-50); color: var(--brand-600); text-decoration: none; }
.quote-pill { display: inline-flex; align-items: center; gap: 8px; }
.quote-pill .count { background: var(--brand); color: #fff; border-radius: 999px; font-size: .75rem; padding: 1px 8px; }
.nav-toggle { display: none; margin-left: auto; background: none; border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; font: inherit; }
.header-search { display: flex; }
.header-search input { width: 220px; }

@media (max-width: 900px) {
  .nav-toggle { display: block; }
  .header-search { display: none; }
  .nav { display: none; position: absolute; left: 0; right: 0; top: 75px; background: var(--surface); flex-direction: column; align-items: stretch; padding: 8px 16px 16px; box-shadow: var(--shadow); }
  .nav.open { display: flex; }
  .logo .brand-image { width: 110px; }
}

/* ---- buttons & forms ---- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font: inherit; font-weight: 700; border-radius: 8px; padding: 11px 18px; border: 2px solid transparent; cursor: pointer; text-decoration: none !important; transition: background .15s, border-color .15s, color .15s; }
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-600); }
.btn-dark { background: var(--ink); color: #fff; }
.btn-dark:hover { background: var(--ink-2); }
.btn-outline { border-color: var(--brand); color: var(--brand-600); background: transparent; }
.btn-outline:hover { background: var(--brand-50); }
.btn-ghost { background: transparent; color: var(--muted); padding: 6px 10px; }
.btn-ghost:hover { color: var(--bad); }
.btn-block { width: 100%; }
.btn-sm { padding: 6px 12px; font-size: .9rem; }

input, select, textarea { font: inherit; color: inherit; width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--brand); outline-offset: 1px; border-color: transparent; }
input[type=checkbox] { width: auto; accent-color: var(--brand); }
label { font-weight: 600; font-size: .9rem; display: block; margin-bottom: 4px; }
.field { margin-bottom: 14px; }
.field .errorlist { color: var(--bad); list-style: none; padding: 0; margin: 4px 0 0; font-size: .85rem; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.form-grid .full, .form-grid .field:has(textarea), .form-grid .field:has(select) { grid-column: 1 / -1; }
.hp { position: absolute; left: -9999px; }
@media (max-width: 640px) { .form-grid { grid-template-columns: 1fr; } }

/* ---- hero ---- */
.hero { background: radial-gradient(1000px 420px at 85% 10%, rgb(123 80 240 / 45%), transparent 60%), radial-gradient(700px 400px at 0% 100%, rgb(110 63 148 / 40%), transparent 60%), var(--ink); color: #fff; padding: 72px 0 80px; overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 40px; align-items: center; }
.hero p.lead { font-size: 1.15rem; color: var(--silver); max-width: 52ch; }
.hero .actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 24px; }
.hero .btn-outline { color: #fff; border-color: rgb(255 255 255 / 40%); }
.hero .btn-outline:hover { background: rgb(255 255 255 / 8%); }
.hero-mark { justify-self: center; width: min(360px, 80%); filter: drop-shadow(0 20px 40px rgb(123 80 240 / 35%)); background: radial-gradient(circle, rgb(255 255 255 / 92%) 0 55%, transparent 56%); border-radius: 50%; padding: 6%; }
.hero-stats { display: flex; gap: 32px; margin-top: 36px; flex-wrap: wrap; }
.hero-stats div { border-left: 3px solid var(--brand); padding-left: 12px; }
.hero-stats b { display: block; font-size: 1.1rem; }
.hero-stats span { color: var(--silver); font-size: .9rem; }
@media (max-width: 860px) { .hero-grid { grid-template-columns: 1fr; } .hero-mark { display: none; } }

/* ---- cards / grids ---- */
.grid { display: grid; gap: 20px; }
.grid-4 { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.card-pad { padding: 20px; }

.product-card { display: flex; flex-direction: column; transition: box-shadow .15s, transform .15s; }
.product-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.product-card .thumb { aspect-ratio: 1; background: var(--silver-2); display: grid; place-items: center; }
.product-card .thumb img { width: 100%; height: 100%; object-fit: cover; }
.product-card .thumb .placeholder { width: 45%; opacity: .35; }
.product-card .body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.product-card h3 { font-size: 1rem; margin: 0; }
.product-card h3 a { color: var(--ink); }
.product-card .meta { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: auto; padding-top: 8px; }
.part-no { font-family: var(--mono); font-size: .8rem; color: var(--brand-deep); background: var(--brand-50); padding: 2px 6px; border-radius: 4px; display: inline-block; }

.badge { display: inline-block; font-size: .75rem; font-weight: 700; padding: 3px 8px; border-radius: 999px; background: var(--silver-2); color: var(--ink-2); white-space: nowrap; }
.badge-in { background: #e6f4ea; color: var(--ok); }
.badge-low { background: #fff3e0; color: var(--warn); }
.badge-out { background: #fdecea; color: var(--bad); }
.badge-request { background: var(--brand-50); color: var(--brand-600); }
.badge-kind { background: var(--ink); color: #fff; }

.cat-card { padding: 22px; display: flex; flex-direction: column; gap: 6px; color: var(--ink); border-top: 4px solid var(--brand); }
.cat-card:hover { text-decoration: none; box-shadow: var(--shadow); }
.cat-card .count { color: var(--muted); font-size: .9rem; }

.service-card { padding: 24px; }
.service-card .icon { width: 44px; height: 44px; border-radius: 10px; background: var(--brand-50); color: var(--brand-600); display: grid; place-items: center; margin-bottom: 12px; }

/* ---- band / CTA ---- */
.band { background: linear-gradient(120deg, var(--brand-deep), var(--brand)); color: #fff; border-radius: 16px; padding: 36px; display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap; }
.band p { margin: 0; opacity: .9; }
.band .btn-dark { background: #fff; color: var(--ink); }

/* ---- catalog layout ---- */
.page-head { background: var(--surface); border-bottom: 1px solid var(--line); padding: 28px 0; }
.crumbs { font-size: .85rem; color: var(--muted); margin-bottom: 6px; }
.crumbs a { color: var(--muted); }
.catalog { display: grid; grid-template-columns: 250px 1fr; gap: 28px; padding: 28px 0 56px; }
.filters .card { padding: 18px; position: sticky; top: 100px; }
.filters h4 { font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin: 18px 0 8px; }
.filters h4:first-child { margin-top: 0; }
.filters ul { list-style: none; margin: 0; padding: 0; }
.filters li a { display: block; padding: 5px 8px; border-radius: 6px; color: var(--ink-2); }
.filters li a.on { background: var(--brand-50); color: var(--brand-600); font-weight: 700; }
.filters li ul { padding-left: 12px; }
.toolbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.toolbar select { width: auto; }
.pager { display: flex; gap: 8px; justify-content: center; margin-top: 28px; align-items: center; }
.empty { text-align: center; padding: 56px 16px; }
@media (max-width: 860px) { .catalog { grid-template-columns: 1fr; } .filters .card { position: static; } }

/* ---- product detail ---- */
.pdp { display: grid; grid-template-columns: 1.1fr 1fr; gap: 40px; padding: 32px 0 56px; }
.gallery .main { aspect-ratio: 1; background: var(--silver-2); border-radius: var(--radius); overflow: hidden; display: grid; place-items: center; }
.gallery .main img { width: 100%; height: 100%; object-fit: contain; background: #fff; }
.gallery .thumbs { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.gallery .thumbs button { width: 72px; height: 72px; padding: 0; border: 2px solid var(--line); border-radius: 8px; overflow: hidden; cursor: pointer; background: #fff; }
.gallery .thumbs button.on { border-color: var(--brand); }
.gallery .thumbs img { width: 100%; height: 100%; object-fit: cover; }
.buy-box { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; margin: 20px 0; }
.buy-box .price { font-size: 1.6rem; font-weight: 800; }
.buy-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-top: 12px; }
.buy-row input[type=number] { width: 90px; }
.check { display: flex; gap: 8px; align-items: center; font-weight: 500; }
.spec { width: 100%; border-collapse: collapse; }
.spec th, .spec td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.spec th { width: 40%; color: var(--muted); font-weight: 600; }
.prose { max-width: 72ch; }
.prose p:first-child { margin-top: 0; }
@media (max-width: 860px) { .pdp { grid-template-columns: 1fr; } }

/* ---- quote cart ---- */
.cart-layout { display: grid; grid-template-columns: 1.3fr 1fr; gap: 28px; padding: 28px 0 56px; align-items: start; }
.cart-line { display: grid; grid-template-columns: 64px 1fr auto; gap: 14px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--line); }
.cart-line img, .cart-line .ph { width: 64px; height: 64px; object-fit: cover; border-radius: 8px; background: var(--silver-2); }
.cart-line form { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.cart-line input[type=number] { width: 72px; padding: 6px 8px; }
@media (max-width: 860px) { .cart-layout { grid-template-columns: 1fr; } .cart-line { grid-template-columns: 48px 1fr; } .cart-line img, .cart-line .ph { width: 48px; height: 48px; } .cart-line > form, .cart-line > div:last-child { grid-column: 2; } }

/* ---- messages ---- */
.messages { list-style: none; padding: 0; margin: 16px auto 0; }
.messages li { background: #e6f4ea; color: var(--ok); border-radius: 8px; padding: 10px 14px; font-weight: 600; }
.messages li.error { background: #fdecea; color: var(--bad); }

/* ---- faq ---- */
details.faq { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 18px; margin-bottom: 10px; }
details.faq summary { font-weight: 700; cursor: pointer; }

/* ---- footer ---- */
.site-footer { background: var(--ink); color: var(--silver); padding: 48px 0 24px; margin-top: 40px; }
.site-footer a { color: var(--silver-2); }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 32px; }
.footer-logo { background: #fff; display: inline-block; padding: 10px 14px; border-radius: 10px; }
.site-footer h4 { color: #fff; font-size: .85rem; text-transform: uppercase; letter-spacing: .1em; }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.footer-base { border-top: 1px solid var(--ink-2); margin-top: 32px; padding-top: 16px; font-size: .85rem; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-grid > :first-child { grid-column: 1 / -1; } }

/* fixes */
.nav a.btn-primary, .nav a.btn-primary:hover { color: #fff; background: var(--brand); }
.nav a.btn-primary:hover { background: var(--brand-600); }
.product-card .part-no { align-self: flex-start; }
.grid-4 { grid-template-columns: repeat(auto-fill, minmax(min(230px, 100%), 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 1fr)); }
.catalog > *, .cart-layout > *, .pdp > * { min-width: 0; }
@media (max-width: 860px) { .catalog, .pdp, .cart-layout { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 600px) { .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; } .product-card .body { padding: 10px; } .product-card .meta { flex-wrap: wrap; } }
.wrap.catalog, .wrap.cart-layout { padding-left: 16px; padding-right: 16px; }
