/* Curdes storefront. No JavaScript; layout is plain CSS grid. */

:root {
  --ink: #1d2430;
  --heading-ink: #333;
  --muted: #5d6675;
  --line: #dde1e7;
  --bg: #ffffff;
  --panel: #f5f7fa;
  --accent: #1f5fa8;
  --accent-ink: #ffffff;
  --good: #1e7a46;
  --price-col: 11rem;       /* listing price column */
  --thumb: 5.5rem;          /* listing thumbnail */
  --detail-price-col: 18rem;
}


.listing-main a {
     color: var(--heading-ink);
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font: 15px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--ink);
  background: var(--bg);
}
/* Links aren't underlined; the underline appears on hover (and keyboard focus). */
a { color: var(--accent); text-decoration: none; }
a:hover, a:focus-visible { text-decoration: underline; }
h1, h2, h3 { line-height: 1.25; }
.wrap { max-width: 68rem; margin: 0 auto; padding: 0 1rem; }
.muted { color: var(--muted); }
.small { font-size: 0.85em; }
.sku { color: var(--muted); font-size: 0.85em; }

/* Header */
.site-header { border-bottom: 1px solid var(--line); background: var(--panel); }
.header-inner { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 1.5rem; padding-block: 0.75rem; }
.brand { display: block; line-height: 0; }
.brand img { height: 2.5rem; width: auto; }
.cat-nav { display: flex; flex-wrap: wrap; gap: 0.9rem; flex: 1; }
.cat-nav a[aria-current="page"] { font-weight: 600; box-shadow: inset 0 -2px 0 var(--accent); }
.account-nav { display: flex; align-items: center; gap: 0.9rem; }
.account-name { color: var(--muted); }
form.inline { display: inline; margin: 0; }

main.wrap { padding-block: 1.25rem 3rem; }
.site-footer { border-top: 1px solid var(--line); color: var(--muted); padding-block: 1rem; font-size: 0.85em; }

/* Buttons & forms */
button, .button {
  display: inline-block; border: 0; border-radius: 4px; padding: 0.5rem 1rem;
  background: var(--accent); color: var(--accent-ink); font: inherit; font-weight: 600;
  text-decoration: none; cursor: pointer; text-align: center;
}
.button:hover, .button:focus-visible { text-decoration: none; }
.button.secondary { background: transparent; color: var(--accent); border: 1px solid var(--accent); }
.link-button { background: none; color: var(--accent); padding: 0; font-weight: normal; }
.link-button:hover, .link-button:focus-visible { text-decoration: underline; }
input[type=number] { width: 4.5rem; }
input { font: inherit; padding: 0.35rem 0.5rem; border: 1px solid var(--line); border-radius: 4px; }
.narrow-form { display: grid; gap: 0.75rem; max-width: 22rem; }
.narrow-form label { display: grid; gap: 0.25rem; }

.flash { background: #eef5ff; border: 1px solid #c6dcf5; padding: 0.5rem 0.75rem; border-radius: 4px; }
.bundle-note { background: #f1f8f3; border-left: 3px solid var(--good); padding: 0.5rem 0.75rem; font-size: 0.9em; }
.bundle-note.ok { font-weight: 600; color: var(--good); }
.login-hint { font-size: 0.9em; color: var(--muted); }
.intro { color: var(--muted); margin-top: -0.5rem; }

/* Flags */
.flag {
  display: inline-block; font-size: 0.7rem; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.04em; padding: 0.1rem 0.4rem; border-radius: 3px; vertical-align: middle;
  background: var(--panel); color: var(--muted); border: 1px solid var(--line);
}
.flag-new { background: #fff4df; color: #8a5a00; border-color: #f0d8a8; }
.flag-featured { background: #e9f1fb; color: var(--accent); border-color: #c6dcf5; }

/* Price box: the right-hand column on both listing and detail pages */
.price-box { text-align: right; }
.price-main { font-size: 1.15rem; font-weight: 700; }
.price-label { font-size: 0.75rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; }
.price-list { font-size: 0.85rem; color: var(--muted); }
.price-saving { font-size: 0.8rem; color: var(--good); font-weight: 600; }

/* Listing pages: compact rows, price in a fixed right column */
.toc ul { list-style: none; margin: 1rem 0 0; padding: 0; }
.group-heading { scroll-margin-top: 1rem; font-size: 1.1rem; margin: 1.75rem 0 0.25rem; }
.group-heading a { color: var(--ink); }
.listing { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.listing-row {
  display: grid; grid-template-columns: var(--thumb) 1fr var(--price-col); gap: 1rem;
  padding: 0.6rem 0; border-bottom: 1px solid var(--line); align-items: center;
}
.listing-thumb {
  width: var(--thumb); height: var(--thumb); border-radius: 6px; overflow: hidden;
  background: #fff; display: grid; place-items: center;
}
.listing-thumb img { width: 100%; height: 100%; object-fit: contain; }
.listing-main h3 { font-size: 1rem; margin: 0; }
.listing-main p { margin: 0.15rem 0 0; font-size: 0.9rem; }
.listing-price { border-left: 1px solid var(--line); padding-left: 1rem; }

/* Product detail: roomier, with a price card on the right */
.crumbs { font-size: 0.85rem; color: var(--muted); margin-bottom: 1rem; }
.detail { display: grid; grid-template-columns: 1fr var(--detail-price-col); gap: 2.5rem; align-items: start; }
.detail h1 { font-size: 2rem; margin: 1.25rem 0 0.25rem; }
.detail-meta { color: var(--muted); }
.lede { font-size: 1.15rem; }
.hero img, .hero-placeholder { width: 100%; border-radius: 8px; }
.hero-placeholder {
  aspect-ratio: 16 / 7; display: grid; place-items: center;
  background: linear-gradient(135deg, #e9f1fb, #f5f7fa); color: #9fb3cc;
  font-size: 2.5rem; font-weight: 700; letter-spacing: 0.08em;
}
.thumbs { list-style: none; padding: 0; margin: 0.5rem 0 0; display: flex; flex-wrap: wrap; gap: 0.5rem; }
.thumbs img { width: 4.5rem; height: 4.5rem; object-fit: contain; background: #fff; border: 1px solid var(--line); border-radius: 4px; display: block; }
.hero img { max-height: 28rem; object-fit: contain; background: #fff; border: 1px solid var(--line); }
.mr-badge { display: flex; align-items: center; gap: 0.6rem; font-size: 0.85rem; font-weight: 600; padding: 0.35rem 0.7rem; border-radius: 4px; margin: 0.75rem 0 0; }
.mr-safe { background: #e7f5ec; color: var(--good); border: 1px solid #b9e0c7; }
.mr-unsafe { background: #fdecec; color: #a12a2a; border: 1px solid #f1c0c0; }
.description h2 { font-size: 1.2rem; margin: 1.75rem 0 0.5rem; }
.description ul { padding-left: 1.25rem; }
.description li { margin: 0.2rem 0; }
.description table { border-collapse: collapse; margin: 1rem 0; }
.description th, .description td { border: 1px solid var(--line); padding: 0.3rem 0.6rem; text-align: left; }
.specs { border-collapse: collapse; width: 100%; }
.specs th, .specs td { text-align: left; padding: 0.4rem 0.6rem; border-bottom: 1px solid var(--line); }
.specs th { width: 40%; color: var(--muted); font-weight: 500; }
.detail-price {
  position: sticky; top: 1rem; padding: 1.25rem; border: 1px solid var(--line);
  border-radius: 8px; background: var(--panel); display: grid; gap: 1rem;
}
.price-box.large .price-main { font-size: 1.9rem; }
.add-to-cart { display: flex; gap: 0.5rem; align-items: center; justify-content: flex-end; flex-wrap: wrap; }
.add-to-cart .field { display: grid; gap: 0.25rem; width: 100%; font-size: 0.85rem; color: var(--muted); }
.add-to-cart select, .add-to-cart input[type=text] { font: inherit; padding: 0.35rem 0.5rem; border: 1px solid var(--line); border-radius: 4px; color: var(--ink); }
.price-from { font-size: 0.75em; font-weight: 500; color: var(--muted); }
.serial { font-size: 0.85em; font-weight: 600; }

/* Cart / checkout / quote */
.two-col { display: grid; grid-template-columns: 1fr var(--detail-price-col); gap: 2rem; align-items: start; }
.col-side { display: grid; gap: 0.75rem; padding: 1rem; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); }
.lines { width: 100%; border-collapse: collapse; margin-bottom: 1rem; }
.lines th, .lines td { padding: 0.5rem; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.lines th { font-size: 0.8rem; text-transform: uppercase; color: var(--muted); }
.num { text-align: right !important; white-space: nowrap; }
.totals { display: grid; grid-template-columns: 1fr auto; gap: 0.3rem 1rem; margin: 0; }
.totals dd { margin: 0; text-align: right; }
.totals .discount { color: var(--good); }
.totals .grand { font-weight: 700; font-size: 1.1rem; border-top: 1px solid var(--line); padding-top: 0.3rem; }

.quote { border: 1px solid var(--line); border-radius: 8px; padding: 2rem; margin-bottom: 1.5rem; }
.quote-head { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 1rem; margin-bottom: 1.5rem; }
.quote-head h1 { margin: 0 0 0.75rem; }
.quote-logo { height: 3.25rem; width: auto; margin-bottom: 0.5rem; }
.quote-from { line-height: 1.4; }
.quote-from .company-name { font-weight: 700; }
.quote-title { text-align: right; }
.quote-title .quote-meta { margin-left: auto; }
.quote-meta { border-collapse: collapse; }
.quote-meta th, .quote-meta td { text-align: left; vertical-align: top; padding: 0.1rem 0 0.1rem 1rem; }
.quote-meta th { color: var(--muted); font-weight: normal; white-space: nowrap; }
.quote-totals { max-width: 22rem; margin-left: auto; }
.quote-terms { margin-top: 2rem; font-size: 0.9rem; }
.quote-terms h2 { font-size: 1rem; margin-bottom: 0.25rem; }
.quote-terms ol { margin: 0; padding-left: 1.25rem; }
.shipping-choice { border: 1px solid var(--line); border-radius: 6px; padding: 0.5rem 0.75rem; margin: 0; display: grid; gap: 0.3rem; }
.shipping-choice legend { font-weight: 600; padding: 0 0.25rem; }
.shipping-choice label { display: flex; gap: 0.5rem; align-items: baseline; }
.shipping-choice .muted { margin-left: auto; }
.checkout-form { display: grid; gap: 0.75rem; }

.stub-processor { max-width: 30rem; margin: 2rem auto; text-align: center; }
.stub-banner { background: #fff4df; border: 1px dashed #d9a84a; padding: 0.5rem; }

@media (max-width: 720px) {
  .detail, .two-col { grid-template-columns: 1fr; }
  .detail-price { position: static; }
  :root { --price-col: 8rem; --thumb: 4rem; }
}

@media print {
  .site-header, .site-footer, .no-print, .flash { display: none; }
  .quote { border: 0; padding: 0; }
}

.quote-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: center; }

/* Tech Docs */
.techdoc { max-width: 52rem; }
.techdoc h1 { font-size: 1.9rem; margin-top: 0.5rem; }
.techdoc h2 { font-size: 1.35rem; margin-top: 2rem; }
.techdoc h3 { font-size: 1.1rem; margin-top: 1.5rem; }
.techdoc img, .techdoc video { max-width: 100%; height: auto; }
.techdoc table { border-collapse: collapse; margin: 1rem 0; font-size: 0.92rem; }
.techdoc th, .techdoc td { border: 1px solid var(--line); padding: 0.35rem 0.6rem; vertical-align: top; text-align: left; }
.techdoc tr:has(td[colspan]) td { background: var(--panel); }
.techdoc pre { background: var(--panel); border: 1px solid var(--line); border-radius: 6px; padding: 0.75rem 1rem; overflow-x: auto; }
.techdoc code { font-size: 0.9em; }
.techdoc .toc { background: var(--panel); border: 1px solid var(--line); border-radius: 6px; padding: 0.5rem 1rem; display: inline-block; }
.techdoc .toc .toctitle { font-weight: 600; }
.techdoc .toc ul { margin: 0.25rem 0; padding-left: 1.25rem; }

/* Company pages */
.prose { max-width: 48rem; }
.prose img { max-width: 100%; height: auto; }
.prose h2 { margin-top: 2rem; }
.prose h3 { font-size: 1rem; margin: 1.25rem 0 0.25rem; }
.prose h3 + ul { margin-top: 0; }
.citations { padding-left: 1.5rem; }
.citations li { margin-bottom: 1rem; }
.citations cite { font-style: italic; font-weight: 600; }
.cite-authors, .cite-journal { font-size: 0.9rem; }
.cite-authors { color: var(--muted); }
.footer-links { margin-bottom: 0.4rem; }

/* Admin */
.admin-search { display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: center; margin: 1rem 0; }
.admin-search input[type=search] { min-width: 18rem; }
.admin-table td { font-size: 0.9rem; }
.pending { color: #a15c00; }
.admin-form { max-width: 34rem; }
.admin-form .check { display: flex; gap: 0.5rem; align-items: baseline; }
.admin-form textarea { font: inherit; padding: 0.35rem 0.5rem; border: 1px solid var(--line); border-radius: 4px; }
.flash.error { background: #fdecec; border-color: #f1c0c0; }

