/* OrthoFast v1.1.0 — tool & die design system
   Palette: clinical paper with dot grid, ink, indigo→teal→cyan gradient, coral punch accent.
   Type: Archivo (display) / Inter (body) / IBM Plex Mono (specs & SKUs).
   Signatures: progressive die-strip hero graphic + engineering title-block spec panels. */

:root {
  --ink: #10151a;
  --steel: #5e6b77;
  --bg: #f4f8f9;
  --card: #ffffff;
  --line: #d9e0e4;
  --accent: #0e7c86;
  --accent-ink: #0a5a61;
  --indigo: #1e2a78;
  --cyan: #22c7c0;
  --violet: #6d4de0;
  --punch: #ff6a3d;
  --punch-dark: #e2531f;
  --danger: #b3261e;
  --grad: linear-gradient(120deg, #141b4d 0%, #1e2a78 30%, #0e7c86 72%, #22c7c0 100%);
  --grad-line: linear-gradient(90deg, var(--indigo), var(--accent), var(--cyan));
  --font-display: 'Archivo', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, sans-serif;
  --font-mono: 'IBM Plex Mono', Consolas, monospace;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(16,21,26,.06), 0 10px 28px rgba(20,27,77,.10);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation: none !important; transition: none !important; }
}

body {
  margin: 0;
  background-color: var(--bg);
  background-image: radial-gradient(rgba(14,124,134,.14) 1px, transparent 1px);
  background-size: 26px 26px;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 20px; }

a { color: var(--accent-ink); }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 2px;
}

.skip-link { position: absolute; left: -9999px; top: 0; background: var(--ink); color: #fff; padding: 8px 14px; z-index: 100; }
.skip-link:focus { left: 8px; top: 8px; }

.mono { font-family: var(--font-mono); font-size: .85em; }

/* ---------- Header ---------- */
.topbar {
  background: var(--grad); color: #eafcfb;
  font-family: var(--font-mono); font-size: 12px;
  text-align: center; padding: 7px 12px; letter-spacing: .05em;
}
.site-header {
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 50;
}
.header-inner { display: flex; align-items: center; gap: 32px; height: 64px; }
.logo {
  font-family: var(--font-display); font-weight: 800; font-size: 22px;
  letter-spacing: .06em; color: var(--ink); text-decoration: none;
}
.logo span {
  background: var(--grad-line);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.main-nav { display: flex; gap: 22px; flex: 1; }
.main-nav a {
  color: var(--steel); text-decoration: none; font-weight: 500; font-size: 15px;
  padding: 4px 0; border-bottom: 2px solid transparent;
}
.main-nav a:hover { color: var(--ink); border-image: var(--grad-line) 1; border-bottom: 2px solid; }
.cart-link { display: flex; align-items: center; gap: 8px; color: var(--ink); text-decoration: none; font-weight: 600; font-size: 15px; }
.cart-badge {
  background: var(--punch); color: #fff;
  font-family: var(--font-mono); font-size: 12px;
  min-width: 22px; height: 22px; border-radius: 11px;
  display: inline-flex; align-items: center; justify-content: center; padding: 0 6px;
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  background: var(--grad);
  color: #fff;
  padding: 84px 0 76px;
  overflow: hidden;
}
.hero::after {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(ellipse 60% 70% at 78% 20%, rgba(34,199,192,.35), transparent 60%),
              radial-gradient(ellipse 50% 60% at 10% 90%, rgba(109,77,224,.30), transparent 60%);
  pointer-events: none;
}
.hero-strip {
  position: absolute; right: -60px; bottom: 24px; width: 760px; max-width: 90%;
  color: #9be8e4; opacity: .34; pointer-events: none;
}
.hero-grid { position: relative; z-index: 1; display: grid; grid-template-columns: 1.2fr .8fr; gap: 48px; align-items: center; }
.hero-eyebrow {
  font-family: var(--font-mono); font-size: 12px; letter-spacing: .14em; text-transform: uppercase;
  color: #8ef0ea; margin: 0 0 14px;
}
.hero h1 {
  font-family: var(--font-display); font-weight: 800;
  font-size: clamp(34px, 5vw, 54px); line-height: 1.04;
  letter-spacing: -.01em; margin: 0 0 18px;
}
.hero h1 em {
  font-style: normal;
  background: linear-gradient(90deg, #8ef0ea, #ffd7c9);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero p.lede { font-size: 18px; color: #d6e4ef; max-width: 50ch; margin: 0 0 28px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }

.hero-spec {
  border: 1px solid rgba(142,240,234,.5);
  background: rgba(9,14,40,.45);
  backdrop-filter: blur(6px);
  border-radius: var(--radius);
  overflow: hidden;
  font-family: var(--font-mono); font-size: 13px;
  box-shadow: 0 18px 44px rgba(6,10,32,.4);
}
.hero-spec .hs-row { display: grid; grid-template-columns: 1fr 1.4fr; }
.hero-spec .hs-row + .hs-row { border-top: 1px solid rgba(142,240,234,.22); }
.hero-spec .hs-label {
  padding: 11px 14px; color: #8ef0ea; border-right: 1px solid rgba(142,240,234,.22);
  font-size: 11px; letter-spacing: .1em; text-transform: uppercase;
  display: flex; align-items: center;
}
.hero-spec .hs-value { padding: 11px 14px; color: #f2fbfa; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block; background: var(--accent); color: #fff;
  font-family: var(--font-display); font-weight: 700; font-size: 15px;
  padding: 13px 26px; border: none; border-radius: var(--radius);
  text-decoration: none; cursor: pointer; letter-spacing: .02em;
  transition: transform .12s ease, box-shadow .12s ease, background .12s ease;
}
.btn:hover { background: var(--accent-ink); transform: translateY(-1px); }
.btn-punch { background: var(--punch); box-shadow: 0 8px 20px rgba(255,106,61,.35); }
.btn-punch:hover { background: var(--punch-dark); }
.btn-glass { background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.45); }
.btn-glass:hover { background: rgba(255,255,255,.22); }
.btn.btn-ghost { background: transparent; color: var(--ink); border: 1.5px solid var(--ink); }
.btn.btn-ghost:hover { background: var(--ink); color: #fff; transform: none; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }

/* ---------- Sections & product grid ---------- */
.section { padding: 60px 0; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-bottom: 28px; }
.section-head h2 {
  font-family: var(--font-display); font-weight: 700; font-size: 28px; margin: 0;
  position: relative; padding-bottom: 10px;
}
.section-head h2::after {
  content: ''; position: absolute; left: 0; bottom: 0; width: 56px; height: 4px;
  border-radius: 2px; background: var(--grad-line);
}
.cat-chips { display: flex; gap: 10px; flex-wrap: wrap; }
.chip {
  font-family: var(--font-mono); font-size: 12px; letter-spacing: .04em;
  color: var(--accent-ink); text-decoration: none;
  border: 1px solid rgba(14,124,134,.4); background: rgba(34,199,192,.10);
  padding: 6px 14px; border-radius: 16px;
  transition: background .12s ease, color .12s ease;
}
.chip:hover { background: var(--accent); color: #fff; }

.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 24px; }
.product-card {
  position: relative;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; color: var(--ink);
  display: flex; flex-direction: column;
  transition: box-shadow .15s ease, transform .15s ease;
}
.product-card .pc-body { text-decoration: none; color: inherit; }
.product-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 4px;
  background: var(--grad-line); opacity: 0; transition: opacity .15s ease;
}
.product-card:hover { box-shadow: var(--shadow); transform: translateY(-3px); }
.product-card:hover::before { opacity: 1; }
.product-card .pc-img {
  aspect-ratio: 4 / 3; background: #eef4f5; display: block;
  width: 100%; object-fit: cover; border-bottom: 1px solid var(--line);
}
.product-card .pc-body { padding: 16px; flex: 1; display: flex; flex-direction: column; gap: 6px; }
.product-card h3 { font-family: var(--font-display); font-size: 17px; font-weight: 600; margin: 0; }
.product-card .pc-sku { font-family: var(--font-mono); font-size: 11px; color: var(--steel); letter-spacing: .04em; }
.product-card .pc-price { margin-top: auto; font-weight: 700; font-size: 16px; color: var(--accent-ink); }
.product-card .pc-pack { color: var(--steel); font-size: 13px; font-weight: 400; }

/* ---------- Breadcrumbs ---------- */
.breadcrumbs { font-size: 13px; color: var(--steel); padding: 18px 0 0; }
.breadcrumbs a { color: var(--steel); }
.breadcrumbs span[aria-current] { color: var(--ink); font-weight: 500; }

/* ---------- Product page ---------- */
.product-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; padding: 28px 0 56px; }
.product-media img {
  width: 100%; border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--card); aspect-ratio: 4/3; object-fit: cover;
  box-shadow: var(--shadow);
}
.product-info h1 { font-family: var(--font-display); font-weight: 700; font-size: 30px; margin: 0 0 6px; line-height: 1.15; }
.product-info .p-sku { font-family: var(--font-mono); font-size: 12px; color: var(--steel); letter-spacing: .05em; }
.product-info .p-price {
  font-size: 28px; font-weight: 800; margin: 18px 0 4px;
  font-family: var(--font-display);
  background: var(--grad-line);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  display: inline-block;
}
.product-info .p-pack { color: var(--steel); font-size: 14px; margin-bottom: 20px; }
.product-info .p-short { color: var(--steel); font-size: 16px; }

.buy-box { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; margin: 22px 0; }
.field label {
  display: block; font-family: var(--font-mono); font-size: 11px;
  text-transform: uppercase; letter-spacing: .08em; color: var(--steel); margin-bottom: 6px;
}
.field select, .field input[type=number], .field input[type=text], .field input[type=email], .field input[type=tel] {
  font-family: var(--font-body); font-size: 15px; color: var(--ink);
  border: 1.5px solid var(--line); border-radius: 8px;
  padding: 11px 12px; background: var(--card); width: 100%;
}
.field select:hover, .field input:hover { border-color: var(--accent); }
.qty-field { width: 90px; }

/* Signature: engineering title block */
.title-block {
  border: 1.5px solid var(--ink); margin-top: 8px;
  font-family: var(--font-mono); font-size: 13px; background: var(--card);
  border-radius: 8px; overflow: hidden;
  box-shadow: 4px 4px 0 rgba(34,199,192,.35);
}
.title-block .tb-head {
  border-bottom: 1.5px solid var(--ink); padding: 8px 14px;
  font-size: 11px; letter-spacing: .12em; text-transform: uppercase;
  display: flex; justify-content: space-between; color: #fff;
  background: linear-gradient(90deg, var(--ink), var(--indigo));
}
.title-block .tb-grid { display: grid; grid-template-columns: 1fr 1fr; }
.title-block .tb-cell { padding: 10px 14px; border-top: 1px solid var(--line); }
.title-block .tb-cell:nth-child(odd) { border-right: 1px solid var(--line); }
.title-block .tb-grid .tb-cell:nth-child(-n+2) { border-top: none; }
.title-block .tb-label { display: block; font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: var(--steel); }

.product-desc { max-width: 70ch; padding-bottom: 56px; }
.product-desc h2 { font-family: var(--font-display); font-size: 22px; }
.product-desc p { color: #2a333b; }

/* ---------- Cart & checkout ---------- */
.page-title { font-family: var(--font-display); font-weight: 700; font-size: 30px; margin: 34px 0 24px; }
table.cart-table { width: 100%; border-collapse: separate; border-spacing: 0; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.cart-table th {
  text-align: left; font-family: var(--font-mono); font-size: 11px; letter-spacing: .08em;
  text-transform: uppercase; color: #fff; padding: 12px 14px;
  background: linear-gradient(90deg, var(--ink), var(--indigo));
}
.cart-table td { padding: 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.cart-table tr:last-child td { border-bottom: none; }
.cart-table .ct-name { font-weight: 600; }
.cart-table .ct-sku { font-family: var(--font-mono); font-size: 11px; color: var(--steel); }
.cart-table input[type=number] { width: 72px; padding: 8px; border: 1.5px solid var(--line); border-radius: 8px; }
.cart-remove { color: var(--danger); font-size: 13px; background: none; border: none; cursor: pointer; padding: 0; text-decoration: underline; }

.totals-card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px; max-width: 380px; margin-left: auto; margin-top: 20px;
  box-shadow: var(--shadow);
  border-top: 4px solid; border-image: var(--grad-line) 1;
}
.totals-card .t-row { display: flex; justify-content: space-between; padding: 5px 0; font-size: 15px; }
.totals-card .t-row.total { border-top: 2px solid var(--ink); margin-top: 8px; padding-top: 12px; font-weight: 700; font-size: 18px; }
.totals-card .btn { width: 100%; margin-top: 14px; text-align: center; }

.checkout-grid { display: grid; grid-template-columns: 1.2fr .8fr; gap: 40px; align-items: start; padding-bottom: 56px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-grid .full { grid-column: 1 / -1; }
.form-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); }
.form-error {
  background: #fdecea; border: 1px solid var(--danger); color: var(--danger);
  padding: 12px 16px; border-radius: 8px; margin-bottom: 18px; font-size: 14px;
}
.notice {
  background: #e8f4f5; border: 1px solid var(--accent); color: var(--accent-ink);
  padding: 12px 16px; border-radius: 8px; margin: 18px 0; font-size: 14px;
}
.empty-state { text-align: center; padding: 72px 20px; color: var(--steel); }

/* ---------- Trust strip ---------- */
.trust { border-top: 1px solid var(--line); background: var(--card); }
.trust-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; padding: 48px 0; }
.trust-item {
  padding: 22px; border-radius: var(--radius); border: 1px solid var(--line);
  background: linear-gradient(180deg, #fff, #f7fbfb);
}
.trust-item.t-cyan { border-top: 4px solid var(--cyan); }
.trust-item.t-violet { border-top: 4px solid var(--violet); }
.trust-item.t-coral { border-top: 4px solid var(--punch); }
.trust-item h3 { font-family: var(--font-display); font-size: 17px; margin: 6px 0; }
.trust-item p { color: var(--steel); font-size: 14px; margin: 0; }
.trust-item .mono { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; }
.t-cyan .mono { color: var(--accent-ink); }
.t-violet .mono { color: var(--violet); }
.t-coral .mono { color: var(--punch-dark); }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: #aebac3; margin-top: 64px; position: relative; }
.site-footer::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 4px; background: var(--grad-line); }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 32px; padding: 48px 0 24px; }
.footer-logo { color: #fff; font-size: 18px; }
.footer-note { font-size: 13px; max-width: 40ch; }
.site-footer nav { display: flex; flex-direction: column; gap: 8px; }
.site-footer a { color: #aebac3; text-decoration: none; font-size: 14px; }
.site-footer a:hover { color: #8ef0ea; }
.footer-contact { display: flex; flex-direction: column; gap: 8px; font-size: 13px; }
.footer-legal { border-top: 1px solid #2a333b; padding-top: 16px; padding-bottom: 24px; font-size: 12px; color: #71808c; }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .hero-grid, .product-layout, .checkout-grid { grid-template-columns: 1fr; }
  .hero-strip { width: 560px; opacity: .18; }
  .trust-grid { grid-template-columns: 1fr; gap: 16px; }
  .footer-grid { grid-template-columns: 1fr; }
  .main-nav { gap: 14px; overflow-x: auto; }
  .header-inner { gap: 16px; }
  .form-grid { grid-template-columns: 1fr; }
  .cart-table th:nth-child(2), .cart-table td:nth-child(2) { display: none; }
}

/* ---------- Arrow carousels (v1.2.0) ---------- */
.carousel { position: relative; overflow: hidden; }
.pc-carousel { border-bottom: 1px solid var(--line); }
.pc-overlay-link { position: absolute; inset: 0; z-index: 1; }
.product-carousel {
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--card); box-shadow: var(--shadow);
}
.product-carousel .carousel-img { width: 100%; aspect-ratio: 4/3; object-fit: cover; display: block; }
.car-btn {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 2;
  width: 38px; height: 38px; border-radius: 50%;
  border: 1px solid rgba(255,255,255,.6);
  background: rgba(16,21,26,.55); color: #fff;
  font-size: 22px; line-height: 1; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  backdrop-filter: blur(3px);
  transition: background .12s ease, transform .12s ease;
  padding: 0 0 3px 0;
}
.car-btn:hover { background: var(--accent); transform: translateY(-50%) scale(1.06); }
.car-prev { left: 10px; }
.car-next { right: 10px; }
.pc-carousel .car-btn { width: 30px; height: 30px; font-size: 18px; opacity: 0; }
.pc-carousel:hover .car-btn, .pc-carousel .car-btn:focus-visible { opacity: 1; }
.car-count {
  position: absolute; right: 10px; bottom: 10px; z-index: 2;
  background: rgba(16,21,26,.65); color: #8ef0ea;
  font-size: 11px; padding: 3px 9px; border-radius: 10px; letter-spacing: .06em;
  backdrop-filter: blur(3px);
}
@media (hover: none) {
  .pc-carousel .car-btn { opacity: 1; } /* touch devices: arrows always visible */
}

/* ---------- Quantity options (v1.4.0) ---------- */
.p-total-note { color: var(--accent-ink); font-size: 12px; margin: -2px 0 0; }
