/* PNW Tech Shop storefront styles */
:root {
  --green-900: #12301f;
  --green-800: #1a3d2b;
  --green-700: #1d4a33;
  --green-600: #24593e;
  --green-100: #dcebdc;
  --green-50: #eef4ec;
  --ink: #141a17;
  --ink-2: #3d4641;
  --muted: #5d6762;
  --line: #e2e3dc;
  --bg: #fafaf7;
  --card: #ffffff;
  --sold: #8a3b12;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(20, 26, 23, 0.06), 0 8px 24px rgba(20, 26, 23, 0.06);
  --font: 'Figtree', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-logo: 'Oswald', 'Arial Narrow', sans-serif;
  --wrap: 1240px;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--bg);
}
img { max-width: 100%; display: block; }
a { color: var(--green-700); }
a:hover { color: var(--green-900); }
h1, h2, h3 { line-height: 1.1; margin: 0; letter-spacing: -0.02em; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid #4f9a6f; outline-offset: 2px; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; background: #fff; padding: 8px 12px; z-index: 50; }
.skip:focus { left: 8px; }

/* ---------- Header ---------- */
.site-header { background: var(--bg); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
.site-header .wrap { display: flex; align-items: center; gap: 24px; min-height: 76px; }
.logo { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); }
.logo svg { width: 112px; height: auto; flex: none; }
.logo span { font-family: var(--font-logo); font-weight: 700; font-size: 30px; letter-spacing: 0.01em; text-transform: uppercase; line-height: 1; }
.nav { display: flex; gap: 6px; flex-wrap: wrap; }
.nav a { color: var(--ink); text-decoration: none; font-weight: 500; padding: 10px 14px; border-radius: 8px; }
.nav a:hover, .nav a[aria-current='page'] { background: var(--green-50); color: var(--green-800); }
.header-tools { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.search { position: relative; }
.search input { width: 260px; height: 44px; border: 1px solid #cfd1c9; border-radius: 8px; background: #f3f3ef; padding: 0 14px 0 40px; }
.search svg { position: absolute; left: 13px; top: 13px; color: var(--ink-2); }
.cart-link { position: relative; display: inline-flex; width: 44px; height: 44px; align-items: center; justify-content: center; color: var(--ink); border-radius: 8px; }
.cart-link:hover { background: var(--green-50); }
.cart-count { position: absolute; top: 2px; right: 0; min-width: 19px; height: 19px; padding: 0 5px; border-radius: 10px; background: var(--green-700); color: #fff; font-size: 12px; font-weight: 700; line-height: 19px; text-align: center; }
.cart-count[hidden] { display: none; }

@media (max-width: 1240px) { .search input { width: 190px; } .nav a { padding: 10px 10px; } }
@media (max-width: 900px) {
  .site-header .wrap { flex-wrap: wrap; gap: 8px 16px; padding-top: 10px; padding-bottom: 10px; }
  .logo svg { width: 84px; }
  .logo span { font-size: 24px; }
  .nav { order: 3; width: 100%; overflow-x: auto; flex-wrap: nowrap; }
  .nav a { white-space: nowrap; padding: 8px 12px; }
  .search { display: none; }
}

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 52px; padding: 0 28px; border-radius: 6px; font-weight: 600; font-size: 18px; text-decoration: none; cursor: pointer; border: 1.5px solid transparent; transition: background 0.15s, color 0.15s; }
.btn-primary { background: var(--green-700); color: #fff; }
.btn-primary:hover { background: var(--green-800); color: #fff; }
.btn-outline { background: #fff; color: var(--ink); border-color: var(--ink-2); }
.btn-outline:hover { background: var(--green-50); color: var(--ink); }
.btn-light { background: #fff; color: var(--ink); }
.btn-light:hover { background: var(--green-50); color: var(--ink); }
.btn[disabled], .btn[aria-disabled='true'] { opacity: 0.55; cursor: not-allowed; }
.btn-small { min-height: 44px; font-size: 16px; padding: 0 18px; }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; background: #f4f5f1; border-bottom: 1px solid var(--line); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); min-height: 380px; }
.hero-copy > :not(svg) { position: relative; z-index: 1; }
.hero-copy { position: relative; z-index: 2; padding: 56px 24px 64px max(24px, calc((100vw - var(--wrap)) / 2 + 24px)); }
.hero h1 { font-size: clamp(40px, 5.2vw, 68px); font-weight: 800; letter-spacing: -0.035em; line-height: 1; }
.hero h1 .accent { color: var(--green-700); display: block; }
.hero p { font-size: 20px; color: var(--ink-2); max-width: 540px; margin: 22px 0 30px; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }
.hero-trees { position: absolute; left: 0; right: 0; bottom: 0; width: 100%; height: 130px; color: #cdd6cb; z-index: 0; pointer-events: none; }
.hero-photo { position: relative; min-height: 320px; }
.hero-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 62% 55%; }
.hero-photo::before { content: ''; position: absolute; inset: 0; z-index: 1; background: linear-gradient(90deg, #f4f5f1 0%, rgba(244, 245, 241, 0) 22%); }
.hero-photo.no-photo { background: var(--green-800); }
.hero-photo.no-photo img { display: none; }
@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-copy { padding: 40px 24px 36px; }
  .hero-photo { min-height: 240px; }
  .hero-photo::before { background: linear-gradient(180deg, #f4f5f1 0%, rgba(244, 245, 241, 0) 18%); }
  .hero-trees { height: 90px; }
}

/* ---------- Trust bar ---------- */
.trust { background: #fff; border-bottom: 1px solid var(--line); }
.trust ul { list-style: none; margin: 0; padding: 22px 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.trust li { display: flex; align-items: center; justify-content: center; gap: 14px; font-weight: 500; padding: 4px 16px; }
.trust li + li { border-left: 1px solid #cfd1c9; }
.trust svg { color: var(--ink); flex: none; }
@media (max-width: 700px) {
  .trust ul { grid-template-columns: 1fr; gap: 10px; }
  .trust li { justify-content: flex-start; }
  .trust li + li { border-left: 0; }
}

/* ---------- Sections ---------- */
.section { padding: 56px 0; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 24px; flex-wrap: wrap; }
.section-head h2 { font-size: clamp(30px, 3.4vw, 40px); font-weight: 800; }
.section-head p { margin: 4px 0 0; color: var(--ink-2); font-size: 18px; }
.link-arrow { font-weight: 600; text-decoration: underline; text-underline-offset: 4px; display: inline-flex; gap: 8px; align-items: center; }
.page-title { padding: 44px 0 8px; }
.page-title h1 { font-size: clamp(34px, 4.4vw, 52px); font-weight: 800; }
.page-title p { color: var(--ink-2); font-size: 18px; margin: 8px 0 0; max-width: 680px; }

/* ---------- Product cards ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 18px; }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 900px) { .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .grid-3 { grid-template-columns: 1fr; } }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 6px; overflow: hidden; display: flex; flex-direction: column; text-decoration: none; color: var(--ink); transition: box-shadow 0.15s, transform 0.15s; }
.card:hover { box-shadow: var(--shadow); transform: translateY(-2px); color: var(--ink); }
.card-img { aspect-ratio: 4 / 3; background: #eceee9; display: flex; align-items: center; justify-content: center; color: var(--muted); position: relative; }
.card-img img { width: 100%; height: 100%; object-fit: cover; }
.card-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.badge { align-self: flex-start; font-size: 13px; font-weight: 600; background: var(--green-100); color: var(--green-800); padding: 3px 11px; border-radius: 999px; }
.badge-sold { background: #f6e1d3; color: var(--sold); }
.badge-hold { background: #f1ecd8; color: #6b5413; }
.card h3 { font-size: 19px; font-weight: 700; }
.card .specline { color: var(--ink-2); font-size: 14px; }
.card-foot { display: flex; align-items: center; justify-content: space-between; margin-top: auto; padding-top: 6px; }
.price { font-size: 22px; font-weight: 800; }
.card-foot .more { font-weight: 600; font-size: 15px; color: var(--green-700); text-decoration: underline; text-underline-offset: 3px; }
.card.is-sold .card-img img { filter: grayscale(0.7); opacity: 0.75; }
.empty { border: 1.5px dashed #c9cbc2; border-radius: var(--radius); padding: 40px 24px; text-align: center; color: var(--ink-2); background: #fff; }
.skeleton { background: linear-gradient(90deg, #eceee9 0%, #f5f6f2 50%, #eceee9 100%); background-size: 200% 100%; animation: shimmer 1.2s infinite; border-radius: 6px; min-height: 330px; }
@keyframes shimmer { to { background-position: -200% 0; } }
@media (prefers-reduced-motion: reduce) { .skeleton { animation: none; } .card { transition: none; } }

/* ---------- Filters ---------- */
.filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin: 20px 0 24px; }
.chip { border: 1px solid #cfd1c9; background: #fff; border-radius: 999px; padding: 9px 16px; font-weight: 500; cursor: pointer; text-decoration: none; color: var(--ink); min-height: 44px; display: inline-flex; align-items: center; }
.chip[aria-pressed='true'] { background: var(--green-700); border-color: var(--green-700); color: #fff; }
.filters select { margin-left: auto; height: 44px; border: 1px solid #cfd1c9; border-radius: 8px; padding: 0 12px; background: #fff; }

/* ---------- How we test ---------- */
.steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.step { background: #fff; border: 1px solid var(--line); border-radius: 6px; padding: 22px; }
.step .num { font-weight: 800; color: var(--green-700); font-size: 14px; letter-spacing: 0.08em; }
.step h3 { font-size: 19px; margin: 6px 0 6px; }
.step p { margin: 0; color: var(--ink-2); font-size: 15px; }
@media (max-width: 900px) { .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .steps { grid-template-columns: 1fr; } }

/* ---------- CTA band ---------- */
.cta-band { position: relative; overflow: hidden; background: var(--green-800); color: #fff; }
.cta-band .wrap { position: relative; z-index: 1; display: flex; align-items: center; justify-content: space-between; gap: 24px; padding-top: 40px; padding-bottom: 40px; flex-wrap: wrap; }
.cta-band h2 { font-size: clamp(28px, 3.2vw, 38px); font-weight: 800; }
.cta-band p { margin: 4px 0 0; font-size: 19px; color: #d5e3d9; }
.cta-trees { position: absolute; left: 0; right: 0; bottom: 0; width: 100%; height: 100%; color: #23493a; }

/* ---------- Footer ---------- */
.site-footer { background: #1b211e; color: #c3cbc6; font-size: 15px; }
.site-footer .wrap { display: grid; grid-template-columns: 1.4fr repeat(3, minmax(0, 1fr)); gap: 32px; padding-top: 44px; padding-bottom: 32px; }
.site-footer h3 { color: #fff; font-size: 15px; margin-bottom: 10px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.site-footer a { color: #c3cbc6; }
.site-footer a:hover { color: #fff; }
.footer-brand { font-family: var(--font-logo); font-weight: 700; font-size: 24px; color: #fff; text-transform: uppercase; }
.footer-base { border-top: 1px solid #323a36; }
.footer-base .wrap { display: flex; justify-content: space-between; padding-top: 16px; padding-bottom: 16px; font-size: 13px; gap: 12px; flex-wrap: wrap; }
@media (max-width: 800px) { .site-footer .wrap { grid-template-columns: 1fr 1fr; } }

/* ---------- Product page ---------- */
.product { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 44px; padding: 32px 0 56px; }
.gallery-main { aspect-ratio: 4 / 3; background: #eceee9; border-radius: 8px; overflow: hidden; border: 1px solid var(--line); }
.gallery-main img { width: 100%; height: 100%; object-fit: contain; background: #fff; }
.thumbs { display: flex; gap: 10px; margin-top: 12px; flex-wrap: wrap; }
.thumbs button { width: 76px; height: 60px; padding: 0; border: 2px solid transparent; border-radius: 6px; overflow: hidden; cursor: pointer; background: #eceee9; }
.thumbs button[aria-current='true'] { border-color: var(--green-700); }
.thumbs img { width: 100%; height: 100%; object-fit: cover; }
.product h1 { font-size: clamp(28px, 3.4vw, 40px); font-weight: 800; margin: 10px 0 8px; }
.product .price { font-size: 32px; }
.buy-row { display: flex; gap: 12px; flex-wrap: wrap; margin: 20px 0 8px; }
.note { color: var(--muted); font-size: 14px; }
.panel { background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 18px 20px; margin-top: 18px; }
.panel h2 { font-size: 17px; margin-bottom: 8px; }
.panel ul { margin: 0; padding-left: 20px; }
.panel p { margin: 0; white-space: pre-line; }
.bench { border-left: 4px solid var(--green-700); }
.crumbs { font-size: 14px; color: var(--muted); padding-top: 22px; }
.crumbs a { color: var(--muted); }
@media (max-width: 860px) { .product { grid-template-columns: 1fr; gap: 24px; } }

/* ---------- Cart ---------- */
.cart { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 32px; padding: 24px 0 64px; align-items: start; }
.cart-item { display: grid; grid-template-columns: 96px minmax(0, 1fr) auto; gap: 16px; align-items: center; background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 12px; margin-bottom: 12px; }
.cart-item img, .cart-item .ph { width: 96px; height: 72px; object-fit: cover; border-radius: 6px; background: #eceee9; }
.cart-item h3 { font-size: 17px; }
.cart-item .remove { background: none; border: 0; color: var(--muted); text-decoration: underline; cursor: pointer; padding: 8px; min-height: 44px; }
.summary { background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 22px; position: sticky; top: 96px; }
.summary .row { display: flex; justify-content: space-between; margin-bottom: 8px; }
.summary .total { font-size: 20px; font-weight: 800; border-top: 1px solid var(--line); padding-top: 12px; margin-top: 12px; }
.summary .btn { width: 100%; margin-top: 16px; }
@media (max-width: 860px) { .cart { grid-template-columns: 1fr; } .summary { position: static; } }

/* ---------- Forms ---------- */
.form { display: grid; gap: 16px; max-width: 640px; }
.form label { display: grid; gap: 6px; font-weight: 600; font-size: 15px; }
.form input, .form select, .form textarea { border: 1px solid #c4c7bd; border-radius: 8px; padding: 12px 14px; background: #fff; font-weight: 400; min-height: 48px; }
.form textarea { min-height: 140px; resize: vertical; }
.hp { position: absolute; left: -5000px; }
.alert { padding: 14px 16px; border-radius: 8px; font-weight: 500; }
.alert-ok { background: var(--green-100); color: var(--green-900); }
.alert-err { background: #f8e2d8; color: #7a2a0a; }

/* ---------- Content pages ---------- */
.prose { max-width: 760px; padding: 16px 0 64px; font-size: 17px; }
.prose h2 { font-size: 24px; margin: 32px 0 10px; }
.services { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; margin: 24px 0 40px; }
.service { background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 22px; }
.service h3 { font-size: 19px; margin-bottom: 6px; }
.service p { margin: 0 0 10px; color: var(--ink-2); }
.service .from { font-weight: 700; }

/* Small phones: keep logo and cart on one row, fit all nav links */
@media (max-width: 480px) {
  .site-header .wrap { flex-wrap: wrap; }
  .logo { min-width: 0; gap: 8px; }
  .logo svg { width: 64px; }
  .logo span { font-size: 21px; white-space: nowrap; }
  .header-tools { margin-left: auto; }
  .nav { gap: 0; justify-content: space-between; }
  .nav a { padding: 8px 6px; font-size: 15px; }
}

.sold-price { font-size: 18px; color: var(--sold); }
.policy-toc { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0 8px; }
.policy-toc a { border: 1px solid #cfd1c9; background: #fff; border-radius: 999px; padding: 8px 14px; text-decoration: none; color: var(--ink); font-size: 15px; }
.policy-toc a:hover { background: var(--green-50); }
.prose ul { padding-left: 22px; }
.prose li { margin-bottom: 6px; }
.prose h2 { scroll-margin-top: 96px; }

/* Header: keep logo, five nav links and search on one line on desktop */
.logo { flex: none; }
.logo span { white-space: nowrap; }
.nav { flex-wrap: nowrap; }
.nav a { white-space: nowrap; }
.header-tools { flex: none; }
.search input { width: clamp(150px, 16vw, 240px); }
@media (max-width: 1180px) {
  .logo svg { width: 88px; }
  .logo span { font-size: 26px; }
  .nav a { padding: 10px 9px; }
}
@media (max-width: 1040px) { .search { display: none; } }
@media (max-width: 480px) {
  .logo svg { width: 56px; }
  .logo span { font-size: 19px; }
  .nav a { padding: 8px 3px; font-size: 14px; }
}

/* Hero: wider photo column so the whole build fits */
@media (min-width: 861px) {
  .hero-grid { grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.25fr); }
  .hero-photo img { object-position: 60% 60%; }
  .hero h1 { font-size: clamp(40px, 4.6vw, 64px); }
}
@media (max-width: 860px) { .hero-photo { min-height: 0; aspect-ratio: 16 / 9; } }

/* "Coming soon" preview cards on the homepage */
.badge-soon { background: #e9ece6; color: var(--ink-2); }
.soon-note { font-size: 15px; font-weight: 600; color: var(--muted); }

/* Hero photo: always show the whole picture (no cropping) on every screen size.
   The photo keeps its own shape and the text column centers beside it. */
.hero-grid { align-items: center; }
.hero-photo, .hero-photo img { min-height: 0; }
.hero-photo { aspect-ratio: auto; display: block; width: 100%; max-width: 1200px; justify-self: end; }
.hero-photo img { position: static; display: block; width: 100%; height: auto; object-fit: contain; }
@media (max-width: 860px) { .hero-photo { aspect-ratio: auto; min-height: 0; } }

/* PCs page: New / Used / Broken picker */
.cond-types { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: 4px 0 26px; }
.cond-types button { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; text-align: left; padding: 14px 16px; min-height: 64px; background: #fff; border: 1.5px solid var(--line); border-radius: 8px; cursor: pointer; font: inherit; color: var(--ink); transition: border-color 0.15s, background 0.15s; }
.cond-types button strong { font-size: 18px; }
.cond-types button span { font-size: 14px; color: var(--ink-2); }
.cond-types button:hover { border-color: var(--green-700); }
.cond-types button[aria-pressed='true'] { border-color: var(--green-700); background: var(--green-50); box-shadow: inset 0 0 0 1px var(--green-700); }
.cond-types button:focus-visible { outline: 2px solid var(--green-700); outline-offset: 2px; }
@media (max-width: 700px) { .cond-types { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; } .cond-types button strong { font-size: 17px; } }
.badge-parts { background: #f6e3cf; color: #7a4310; }

/* Condition picker on phones: one compact row */
@media (max-width: 700px) {
  .cond-types { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; margin-bottom: 20px; }
  .cond-types button { padding: 10px 6px; min-height: 48px; align-items: center; text-align: center; }
  .cond-types button span { display: none; }
  .cond-types button strong { font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
}
