/* ==========================================================================
   Hardware store page (/hardware/)
   Scoped under .hw-page so these rules never leak into other pages or the
   shared site header/footer. Design ported from the approved mockup
   (nepi-hardware-page-final.html). Colors: deep navy + bright blue accent.
   ========================================================================== */

.hw-page {
  --hw-navy: #0d1b2e;
  --hw-navy-deep: #071428;
  --hw-blue: #00AEEF;
  --hw-blue-dark: #0b6f9a;      /* darkened from mockup for AA contrast on white */
  --hw-ink: #0d1b2e;
  --hw-slate: #5b6675;
  --hw-muted: #64748b;          /* muted text that still meets AA on white */
  --hw-line: #e6e9ef;
  --hw-bg: #f6f8fb;
  --hw-white: #fff;
  --hw-ok: #1d9e75;

  color: var(--hw-ink);
  background: var(--hw-white);
  font-family: 'Sora', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  line-height: 1.6;
}

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

.hw-page img { display: block; max-width: 100%; height: auto; }
.hw-page button { font-family: inherit; cursor: pointer; }
.hw-page .hidden { display: none !important; }

.hw-page .wrap { max-width: 1160px; margin: 0 auto; padding: 0 28px; }

/* Keep in-page anchor targets clear of the sticky site header */
.hw-page #shop,
.hw-page #compare { scroll-margin-top: calc(var(--header-height, 80px) + 14px); }

/* ---- Buttons ---- */
.hw-page .btn-primary {
  background: var(--hw-blue); color: #04212e; font-weight: 600; font-size: 15px;
  border: none; border-radius: 9px; padding: 12px 22px;
}
.hw-page .btn-primary:hover { background: #12bdff; }
.hw-page .btn-primary:focus-visible,
.hw-page .opt:focus-visible,
.hw-page .pcard:focus-visible,
.hw-page .acc-card:focus-visible,
.hw-page .gallery .t:focus-visible,
.hw-page .addon:focus-visible,
.hw-page .backrow button:focus-visible,
.hw-page .po:focus-visible {
  outline: 3px solid var(--hw-blue); outline-offset: 2px;
}

/* ---- Cart button (page-local; top-right, shared header untouched) ---- */
.hw-cart {
  position: fixed; top: 90px; right: 18px; z-index: 90;
  display: flex; align-items: center; gap: 8px;
  background: var(--hw-navy-deep); color: #fff;
  border: 1px solid rgba(255,255,255,.14); border-radius: 24px;
  padding: 8px 15px; font-size: 14px; font-weight: 600; font-family: inherit;
  box-shadow: 0 6px 24px rgba(7,20,40,.28); cursor: pointer;
}
.hw-cart:hover { background: #0a1c33; }
.hw-cart:focus-visible { outline: 3px solid var(--hw-blue); outline-offset: 2px; }
.hw-cart svg { width: 17px; height: 17px; }
.hw-cart .dot {
  background: var(--hw-blue); color: #04212e; font-weight: 700; font-size: 11px;
  border-radius: 20px; padding: 1px 8px; min-width: 20px; text-align: center;
}
.hw-cart .dot.empty { background: rgba(255,255,255,.2); color: #cdd6e6; }

/* ---- Cart drawer + overlay ---- */
.hw-cart-overlay {
  position: fixed; inset: 0; z-index: 1000; background: rgba(7,20,40,.5);
  opacity: 0; visibility: hidden; transition: opacity .2s;
}
.hw-cart-overlay.open { opacity: 1; visibility: visible; }
.hw-cart-drawer {
  position: fixed; top: 0; right: 0; z-index: 1001; height: 100%; width: 400px; max-width: 92vw;
  background: #fff; box-shadow: -8px 0 40px rgba(7,20,40,.25);
  transform: translateX(100%); transition: transform .22s ease;
  display: flex; flex-direction: column;
}
.hw-cart-drawer.open { transform: translateX(0); }
.hw-cart-head { display: flex; align-items: center; justify-content: space-between; padding: 20px 22px; border-bottom: 1px solid var(--hw-line); }
.hw-cart-head h2 { font-size: 18px; font-weight: 700; }
.hw-cart-close { background: none; border: none; font-size: 26px; line-height: 1; color: var(--hw-slate); cursor: pointer; padding: 0 4px; }
.hw-cart-close:hover { color: var(--hw-ink); }
.hw-cart-body { flex: 1; overflow-y: auto; padding: 14px 22px; }
.hw-cart-empty { color: var(--hw-slate); font-size: 14px; padding: 24px 0; text-align: center; }

.hw-ci { display: flex; gap: 12px; justify-content: space-between; padding: 16px 0; border-bottom: 1px solid var(--hw-line); }
.hw-ci-info { min-width: 0; }
.hw-ci-name { font-size: 14px; font-weight: 600; }
.hw-ci-var { font-size: 12.5px; color: var(--hw-slate); margin-top: 2px; }
.hw-ci-sku { font-size: 11px; color: var(--hw-muted); font-family: 'JetBrains Mono', ui-monospace, monospace; margin-top: 3px; }
.hw-ci-right { text-align: right; flex-shrink: 0; display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.hw-ci-price { font-size: 14px; font-weight: 700; }
.hw-qty { display: inline-flex; align-items: center; border: 1px solid var(--hw-line); border-radius: 8px; overflow: hidden; }
.hw-qty button { width: 28px; height: 28px; border: none; background: #f7fafc; color: var(--hw-ink); font-size: 15px; cursor: pointer; }
.hw-qty button:hover { background: #eef2f7; }
.hw-qty span { min-width: 30px; text-align: center; font-size: 13px; }
.hw-ci-remove { background: none; border: none; color: var(--hw-blue-dark); font-size: 12px; cursor: pointer; padding: 0; }
.hw-ci-remove:hover { text-decoration: underline; }

.hw-cart-foot { border-top: 1px solid var(--hw-line); padding: 18px 22px calc(18px + env(safe-area-inset-bottom, 0px)); }
.hw-cart-sub { display: flex; justify-content: space-between; font-size: 16px; font-weight: 700; margin-bottom: 12px; }
.hw-cart-foot .btn-primary { width: 100%; padding: 14px; font-size: 16px; }
.hw-cart-foot .btn-primary:disabled { opacity: .5; cursor: not-allowed; }
.hw-cart-note { font-size: 12px; color: var(--hw-muted); margin-top: 10px; text-align: center; }

/* ---- Return-from-Stripe banner (cancel) ---- */
.hw-banner { padding: 14px 20px; font-size: 14px; font-weight: 500; text-align: center; }
.hw-banner-ok { background: #e7f7f0; color: #0e5f43; border-bottom: 1px solid #bfe6d5; }
.hw-banner-info { background: #eef4fb; color: #234; border-bottom: 1px solid #d4e2f2; }

/* ---- Order confirmation (success) ---- */
.hw-page .hw-confirm {
  display: flex; align-items: center; justify-content: center;
  min-height: 68vh; padding: 64px 20px;
  background: linear-gradient(180deg, var(--hw-bg), var(--hw-white));
}
.hw-confirm-inner { max-width: 560px; text-align: center; }
.hw-confirm-icon {
  width: 76px; height: 76px; border-radius: 50%;
  background: #e7f7f0; color: var(--hw-ok);
  display: flex; align-items: center; justify-content: center; margin: 0 auto 24px;
}
.hw-confirm-icon svg { width: 38px; height: 38px; }
.hw-page .hw-confirm h1 { font-size: 32px; font-weight: 800; letter-spacing: -.5px; color: var(--hw-ink); }
.hw-confirm-lead { font-size: 17px; color: var(--hw-slate); margin-top: 14px; line-height: 1.6; }
.hw-confirm-actions { margin-top: 28px; }
.hw-confirm-actions .btn-primary { display: inline-block; text-decoration: none; padding: 14px 30px; font-size: 16px; }
.hw-confirm-support { margin-top: 22px; font-size: 13.5px; color: var(--hw-muted); }
.hw-confirm-support a { color: var(--hw-blue-dark); }

/* ---- Hero ---- */
.hw-page .hero { background: linear-gradient(180deg, var(--hw-navy), var(--hw-navy-deep)); color: #fff; padding: 56px 0; }
.hw-page .hero .wrap { display: grid; grid-template-columns: 1.1fr .9fr; gap: 44px; align-items: center; }
.hw-page .pill {
  display: inline-block; background: rgba(0,174,239,.14); border: 1px solid rgba(0,174,239,.4);
  color: #7fd8f7; font-size: 12px; font-weight: 600; letter-spacing: .5px; padding: 5px 13px;
  border-radius: 20px; margin-bottom: 18px;
}
.hw-page .hero h1 { font-size: 42px; line-height: 1.1; font-weight: 700; letter-spacing: -1px; }
.hw-page .hero p { font-size: 18px; color: #aeb9cb; margin-top: 16px; max-width: 520px; }
.hw-page .hero .cta-row { margin-top: 26px; display: flex; gap: 12px; flex-wrap: wrap; }
.hw-page .hero .btn-ghost {
  background: transparent; color: #fff; border: 1px solid rgba(255,255,255,.3);
  font-weight: 600; font-size: 15px; border-radius: 9px; padding: 12px 22px;
}
.hw-page .hero .btn-ghost:hover { border-color: #fff; }
.hw-page .hero .heroimg { background: #0a1f38; border: 1px solid rgba(255,255,255,.1); border-radius: 16px; padding: 22px; }
.hw-page .hero .heroimg img { border-radius: 8px; }

/* ---- Section scaffolding ---- */
.hw-page .block { padding: 56px 0; border-bottom: 1px solid var(--hw-line); }
.hw-page .eyebrow { color: var(--hw-blue-dark); font-weight: 600; font-size: 13px; letter-spacing: 1.2px; text-transform: uppercase; margin-bottom: 10px; }
.hw-page h2.sec { font-size: 29px; font-weight: 700; letter-spacing: -.4px; }
.hw-page .lead { font-size: 16px; color: var(--hw-slate); max-width: 740px; margin-top: 10px; }
.hw-page .center { text-align: center; }
.hw-page .center .lead { margin: 10px auto 0; }

/* ---- Shop lineup ---- */
.hw-page .lineup { display: grid; grid-template-columns: repeat(3,1fr); gap: 20px; margin-top: 38px; }
.hw-page .pcard {
  border: 1px solid var(--hw-line); border-radius: 16px; overflow: hidden;
  display: flex; flex-direction: column; background: var(--hw-white);
  cursor: pointer; transition: box-shadow .15s; text-align: left;
}
.hw-page .pcard:hover { box-shadow: 0 8px 30px rgba(13,27,46,.09); }
.hw-page .pcard-pic { background: #f1f4f8; aspect-ratio: 4/3; }
.hw-page .pcard-pic img { width: 100%; height: 100%; object-fit: cover; }
.hw-page .pcard-body { padding: 20px; display: flex; flex-direction: column; flex: 1; }
.hw-page .tier { font-size: 11px; font-weight: 700; letter-spacing: .6px; text-transform: uppercase; color: var(--hw-blue-dark); }
.hw-page .pcard h3 { font-size: 18px; font-weight: 600; margin-top: 3px; }
.hw-page .pcard .plat { font-size: 12.5px; color: var(--hw-muted); margin-top: 1px; }
.hw-page .pcard p { font-size: 13px; color: var(--hw-slate); margin-top: 10px; flex: 1; }
.hw-page .fromprice { font-size: 17px; font-weight: 700; margin: 12px 0; }
.hw-page .pcard .btn-primary { width: 100%; }

/* ---- Accessories ---- */
.hw-page .acc-row { display: flex; gap: 18px; justify-content: center; flex-wrap: wrap; margin-top: 30px; }
.hw-page .acc-card {
  display: flex; gap: 16px; width: 400px; max-width: 100%; border: 1px solid var(--hw-line);
  border-radius: 14px; background: #fff; padding: 16px; align-items: center; cursor: pointer;
  transition: box-shadow .15s; text-align: left;
}
.hw-page .acc-card:hover { box-shadow: 0 8px 30px rgba(13,27,46,.09); }
.hw-page .acc-card img { width: 120px; height: 96px; object-fit: cover; border-radius: 10px; background: #f1f4f8; flex-shrink: 0; }
.hw-page .acc-card h3 { font-size: 16px; font-weight: 600; margin-top: 2px; }
.hw-page .acc-card .plat { font-size: 12px; color: var(--hw-muted); }
.hw-page .acc-card .ab p { font-size: 13px; color: var(--hw-slate); margin-top: 5px; }
.hw-page .acc-card .soon { font-size: 12.5px; font-weight: 600; color: var(--hw-blue-dark); margin-top: 8px; background: none; border: none; padding: 0; text-align: left; font-family: inherit; }
.hw-page .band-light { background: var(--hw-bg); }
.hw-page .faq-list { margin-top: 24px; }

/* ---- NEPI software band ---- */
.hw-page .band-dark { background: var(--hw-navy); color: #fff; }
.hw-page .band-dark h2.sec { color: #fff; }
.hw-page .band-dark .lead { color: #aeb9cb; }
.hw-page .band-dark .eyebrow { color: #7fd8f7; }
.hw-page .nepi-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 16px; margin-top: 34px; }
.hw-page .ncard { background: #10233c; border: 1px solid rgba(255,255,255,.08); border-radius: 13px; padding: 20px; }
.hw-page .ncard .ico { width: 34px; height: 34px; color: var(--hw-blue); margin-bottom: 12px; }
.hw-page .ncard .ico svg { width: 100%; height: 100%; }
.hw-page .ncard h3 { font-size: 15px; font-weight: 600; color: #fff; margin-bottom: 6px; }
.hw-page .ncard p { font-size: 13px; color: #9fabbd; }

/* ---- Comparison table ---- */
.hw-page .tablewrap { margin-top: 30px; border: 1px solid var(--hw-line); border-radius: 14px; overflow-x: auto; }
.hw-page table.cmp { width: 100%; border-collapse: collapse; font-size: 13px; min-width: 780px; }
.hw-page table.cmp th,
.hw-page table.cmp td { padding: 12px 15px; text-align: left; border-top: 1px solid var(--hw-line); vertical-align: top; }
.hw-page table.cmp thead th { background: var(--hw-navy); color: #fff; font-weight: 600; border-top: none; }
.hw-page table.cmp tbody th { background: #f7fafc; font-weight: 600; width: 170px; color: var(--hw-ink); }
.hw-page table.cmp td { color: var(--hw-slate); }
.hw-page table.cmp tr.cat th { background: var(--hw-navy-deep); color: var(--hw-blue); font-size: 11px; letter-spacing: .6px; text-transform: uppercase; }
.hw-page table.cmp tr.cat td { background: var(--hw-navy-deep); }
.hw-page table.cmp tr.price-row th,
.hw-page table.cmp tr.price-row td { font-weight: 700; color: var(--hw-ink); font-size: 14px; }

/* ---- Quote ---- */
.hw-page .quote { background: var(--hw-navy); color: #fff; border-radius: 18px; padding: 42px; text-align: center; }
.hw-page .quote blockquote { font-size: 21px; line-height: 1.45; font-weight: 500; max-width: 800px; margin: 0 auto; }
.hw-page .quote .by { margin-top: 18px; color: var(--hw-blue); font-weight: 600; font-size: 15px; }

/* ---- FAQ ---- */
.hw-page .qa { border-top: 1px solid var(--hw-line); padding: 18px 0; }
.hw-page .qa:last-child { border-bottom: 1px solid var(--hw-line); }
.hw-page .qa h3 { font-size: 16px; font-weight: 600; }
.hw-page .qa p { font-size: 14px; color: var(--hw-slate); margin-top: 8px; max-width: 820px; }

/* ==========================================================================
   Product-detail view (view B)
   ========================================================================== */
.hw-page .backrow { padding-top: 26px; }
.hw-page .backrow button { background: none; border: none; color: var(--hw-blue-dark); font-weight: 600; font-size: 14px; padding: 0; }
.hw-page .detail { display: grid; grid-template-columns: 1fr 1fr; gap: 44px; padding-top: 20px; }

.hw-page .gallery .main { background: #f1f4f8; border-radius: 14px; aspect-ratio: 3/2; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.hw-page .gallery .main img { width: 100%; height: 100%; object-fit: cover; }
.hw-page .gallery .main .soon { color: #7a8697; font-size: 14px; text-align: center; padding: 20px; }
.hw-page .gallery .thumbs { display: flex; gap: 10px; margin-top: 12px; flex-wrap: wrap; }
.hw-page .gallery .thumbs .t { width: 76px; height: 60px; border-radius: 8px; border: 1px solid var(--hw-line); overflow: hidden; cursor: pointer; background: #f1f4f8; padding: 0; }
.hw-page .gallery .thumbs .t.sel { border-color: var(--hw-blue); }
.hw-page .gallery .thumbs .t img { width: 100%; height: 100%; object-fit: cover; }

.hw-page .pd h2 { font-size: 27px; font-weight: 700; letter-spacing: -.4px; margin-top: 2px; }
.hw-page .pd .plat { font-size: 14px; color: var(--hw-slate); }
.hw-page .pd .sku { font-size: 12px; color: var(--hw-muted); font-family: 'JetBrains Mono', ui-monospace, monospace; margin-top: 6px; }
.hw-page .pd .blurb { font-size: 15px; color: var(--hw-slate); margin-top: 12px; }

.hw-page .keyfeat { margin-top: 16px; }
.hw-page .keyfeat li { list-style: none; font-size: 14px; padding: 5px 0 5px 24px; position: relative; }
.hw-page .keyfeat li::before {
  content: ""; position: absolute; left: 2px; top: 11px; width: 9px; height: 5px;
  border-left: 2px solid var(--hw-ok); border-bottom: 2px solid var(--hw-ok); transform: rotate(-45deg);
}

.hw-page .optlbl { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .4px; color: var(--hw-slate); margin-top: 18px; }
.hw-page .opts { display: flex; gap: 9px; margin-top: 8px; flex-wrap: wrap; }
.hw-page .opt { border: 1px solid var(--hw-line); border-radius: 9px; padding: 9px 16px; font-size: 13.5px; cursor: pointer; background: #fff; color: var(--hw-ink); }
.hw-page .opt.sel { border-color: var(--hw-blue); background: rgba(0,174,239,.07); color: var(--hw-blue-dark); font-weight: 600; }

.hw-page .buybar { margin-top: 22px; display: flex; align-items: center; gap: 14px; }
.hw-page .buybar .price { font-size: 28px; font-weight: 700; }
.hw-page .buybar .add { flex: 1; padding: 14px 22px; font-size: 16px; }
.hw-page .buynow { margin-top: 10px; width: 100%; background: var(--hw-navy); color: #fff; border: none; border-radius: 9px; padding: 13px; font-weight: 600; font-size: 15px; cursor: pointer; }
.hw-page .buynow:hover { background: var(--hw-navy-deep); }
.hw-page .buynow:focus-visible { outline: 3px solid var(--hw-blue); outline-offset: 2px; }
.hw-page .buynote { font-size: 12.5px; color: var(--hw-muted); margin-top: 10px; }
.hw-page .po { margin-top: 8px; width: 100%; background: transparent; border: 1px solid var(--hw-line); color: var(--hw-ink); font-weight: 600; font-size: 13.5px; border-radius: 9px; padding: 11px; display: inline-block; text-align: center; text-decoration: none; }
.hw-page .po:hover { border-color: var(--hw-blue); }

.hw-page .trust { display: flex; gap: 16px; margin-top: 14px; font-size: 12.5px; color: var(--hw-slate); flex-wrap: wrap; }
.hw-page .trust span { display: flex; align-items: center; gap: 5px; }
.hw-page .trust .k { color: var(--hw-ok); font-weight: 700; }

.hw-page .addon { display: flex; align-items: center; gap: 12px; margin-top: 16px; border: 1px solid var(--hw-line); border-radius: 12px; padding: 12px 14px; background: #f7fafc; cursor: pointer; width: 100%; text-align: left; }
.hw-page .addon:hover { border-color: var(--hw-blue); }
.hw-page .addon img { width: 58px; height: 46px; object-fit: cover; border-radius: 8px; background: #eef2f7; flex-shrink: 0; }
.hw-page .addon .at { font-size: 13.5px; font-weight: 600; }
.hw-page .addon .as { font-size: 12px; color: var(--hw-slate); margin-top: 1px; }
.hw-page .addon .badge { margin-left: auto; font-size: 11px; font-weight: 600; color: #5f6b7c; background: #eef1f5; border-radius: 5px; padding: 3px 9px; white-space: nowrap; }

.hw-page .soonwrap { border: 1px solid var(--hw-line); border-radius: 14px; padding: 22px; background: #f7fafc; margin-top: 8px; }
.hw-page .soon-badge { display: inline-block; font-size: 12px; font-weight: 700; color: var(--hw-blue-dark); background: rgba(0,174,239,.1); border-radius: 6px; padding: 4px 11px; }
.hw-page .soonwrap p { font-size: 14px; color: var(--hw-slate); margin-top: 12px; }
.hw-page .soonwrap .po { margin-top: 14px; }

.hw-page .panels { margin-top: 40px; display: grid; grid-template-columns: repeat(3,1fr); gap: 18px; padding-bottom: 10px; }
.hw-page .panel { border: 1px solid var(--hw-line); border-radius: 13px; padding: 20px; }
.hw-page .panel h4 { font-size: 14px; font-weight: 600; margin-bottom: 10px; }
.hw-page .panel table { width: 100%; font-size: 12.5px; border-collapse: collapse; }
.hw-page .panel td { padding: 5px 0; color: var(--hw-slate); vertical-align: top; }
.hw-page .panel td.k { color: var(--hw-ink); font-weight: 500; width: 44%; }
.hw-page .panel p { font-size: 12.5px; color: var(--hw-slate); }
.hw-page .doc { display: flex; align-items: center; gap: 9px; font-size: 13px; color: var(--hw-muted); padding: 7px 0; border-top: 1px solid var(--hw-line); }
.hw-page .doc:first-child { border-top: none; }
.hw-page .doc .soonbadge { margin-left: auto; font-size: 10.5px; background: #eef1f5; color: #5f6b7c; border-radius: 5px; padding: 1px 7px; font-weight: 600; }

/* ---- Sticky add-to-cart bar (mobile, product view only) ---- */
.hw-sticky-buy {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 45;
  display: none; align-items: center; gap: 12px;
  background: #fff; border-top: 1px solid var(--hw-line);
  padding: 10px 16px calc(10px + env(safe-area-inset-bottom, 0px));
  box-shadow: 0 -6px 24px rgba(13,27,46,.1);
}
.hw-sticky-buy .price { font-size: 20px; font-weight: 700; white-space: nowrap; }
.hw-sticky-buy .btn-primary { flex: 1; }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 900px) {
  .hw-page .lineup,
  .hw-page .nepi-grid { grid-template-columns: 1fr; }
  .hw-page .detail,
  .hw-page .hero .wrap,
  .hw-page .panels { grid-template-columns: 1fr; gap: 26px; }
  .hw-page .hero h1 { font-size: 32px; }
  .hw-page h2.sec { font-size: 23px; }
  /* Sticky buy bar takes over on mobile product view */
  .hw-page.hw-productview-active .hw-sticky-buy.hw-sticky-on { display: flex; }
  /* Cart button sits bottom-right on mobile, above the sticky buy bar */
  .hw-cart { top: auto; bottom: 14px; right: 14px; }
  .hw-page.hw-productview-active .hw-cart { bottom: 78px; }
}
