/* Pap's Supply Co. — candlelit gothic desk. */

:root {
  --bg: #171310;
  --panel: #221b16;
  --text: #efe3cc;
  --muted: #b8a88f;
  --gold: #c9a35c;
  --gold-dim: rgba(201, 163, 92, 0.35);
  --gold-glow: rgba(201, 163, 92, 0.22);
  --font-display: "Cinzel", serif;
  --font-body: "Inter", sans-serif;
  --header-h: 3.5rem;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 1rem);
}

body {
  background-color: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  min-height: 100vh;
}

/* Subtle candlelight vignette, warm and uncluttered. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 90% 55% at 50% -10%, rgba(201, 163, 92, 0.07), transparent 70%),
    radial-gradient(ellipse 120% 80% at 50% 120%, rgba(0, 0, 0, 0.35), transparent 70%);
  z-index: 0;
}

/* Subtle paper-grain texture over everything, pure CSS. */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 2;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

main,
header,
footer {
  position: relative;
  z-index: 1;
}

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  min-height: var(--header-h);
  padding: 0.5rem clamp(1rem, 4vw, 2.5rem);
  background: rgba(23, 19, 16, 0.92);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid rgba(201, 163, 92, 0.25);
}

.wordmark {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: 0.18em;
  color: var(--text);
  text-decoration: none;
  white-space: nowrap;
}

.wordmark:hover {
  color: var(--gold);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: clamp(0.75rem, 2.5vw, 1.5rem);
  flex-wrap: wrap;
}

.site-nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.85rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  transition: color 0.25s ease;
  padding: 0.5rem 0.15rem;
}

.site-nav a:hover {
  color: var(--gold);
}

.printify-link {
  color: var(--gold) !important;
  border: 1px solid var(--gold-dim);
  padding: 0.3rem 0.75rem;
  border-radius: 2px;
}

.printify-link:hover {
  border-color: var(--gold);
}

/* ---------- Sections ---------- */

main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 clamp(1rem, 4vw, 2.5rem);
}

.section-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.4rem, 3.5vw, 2rem);
  letter-spacing: 0.12em;
  text-align: center;
  color: var(--text);
}

.gold-rule {
  width: 90px;
  height: 1px;
  margin: 0.9rem auto 2rem;
  background: linear-gradient(to right, transparent, var(--gold), transparent);
}

/* ---------- Hero ---------- */

.hero {
  text-align: center;
  padding: clamp(5rem, 14vh, 8.5rem) 0 clamp(4rem, 12vh, 7rem);
}

.hero-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.2rem, 6.5vw, 4rem);
  letter-spacing: 0.08em;
  line-height: 1.2;
  margin-bottom: 1.25rem;
}

.hero-sub {
  max-width: 34rem;
  margin: 0 auto 2.25rem;
  color: var(--muted);
  font-size: clamp(1rem, 2vw, 1.125rem);
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  text-align: center;
  padding: 0.7rem 1.6rem;
  border-radius: 2px;
  border: 1px solid var(--gold);
  cursor: pointer;
  transition: background-color 0.25s ease, box-shadow 0.25s ease, color 0.25s ease;
}

.btn-gold {
  background: var(--gold);
  color: #171310;
}

.btn-gold:hover {
  background: transparent;
  color: var(--gold);
  box-shadow: 0 0 18px var(--gold-glow);
}

/* ---------- Featured strip ---------- */

.featured {
  padding: 2.5rem 0 3rem;
}

.featured-strip {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(240px, 280px);
  gap: 1.25rem;
  overflow-x: auto;
  padding: 0.25rem 0.25rem 1rem;
  scroll-snap-type: x proximity;
}

.featured-strip .product-card {
  scroll-snap-align: start;
}

.featured-strip::-webkit-scrollbar {
  height: 6px;
}

.featured-strip::-webkit-scrollbar-track {
  background: var(--panel);
}

.featured-strip::-webkit-scrollbar-thumb {
  background: var(--gold-dim);
  border-radius: 3px;
}

/* ---------- Catalog controls ---------- */

.catalog {
  padding: 2.5rem 0 4rem;
}

.catalog-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 2rem;
}

.filter-tabs {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.tab {
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  background: transparent;
  border: 1px solid rgba(184, 168, 143, 0.3);
  border-radius: 2px;
  padding: 0.45rem 1rem;
  min-height: 44px;
  cursor: pointer;
  transition: color 0.25s ease, border-color 0.25s ease, background-color 0.25s ease;
}

.tab:hover {
  color: var(--gold);
  border-color: var(--gold-dim);
}

.tab.active {
  color: var(--gold);
  border-color: var(--gold);
  background: rgba(201, 163, 92, 0.08);
}

.search-input {
  font-family: var(--font-body);
  font-size: 0.9rem;
  color: var(--text);
  background: var(--panel);
  border: 1px solid rgba(184, 168, 143, 0.3);
  border-radius: 2px;
  padding: 0.5rem 0.9rem;
  min-width: 220px;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.search-input::placeholder {
  color: var(--muted);
}

.search-input:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 12px var(--gold-glow);
}

/* ---------- Accessibility (B-40) ---------- */

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--gold);
  color: #171310;
  padding: 0.6rem 1rem;
  z-index: 50;
  font-weight: 600;
}

.skip-link:focus {
  left: 0.5rem;
  top: 0.5rem;
}

:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

.card-title a {
  color: inherit;
  text-decoration: none;
}

.card-title a:hover {
  color: var(--gold);
}

/* ---------- Collection chips (B-19) ---------- */

.theme-chips {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.chip {
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  background: transparent;
  border: 1px solid rgba(184, 168, 143, 0.3);
  border-radius: 999px;
  padding: 0.45rem 1rem;
  min-height: 44px;
  cursor: pointer;
  transition: color 0.25s ease, border-color 0.25s ease, background-color 0.25s ease;
}

.chip:hover {
  color: var(--gold);
  border-color: var(--gold-dim);
}

.chip.active {
  color: var(--gold);
  border-color: var(--gold);
  background: rgba(201, 163, 92, 0.08);
}

.result-count {
  color: var(--muted);
  font-size: 0.85rem;
  margin-bottom: 1rem;
  min-height: 1.2em;
}

.show-more {
  display: block;
  margin: 2rem auto 0;
}

.catalog-status {
  text-align: center;
  color: var(--muted);
  padding: 2rem 0;
}

.catalog-status a {
  color: var(--gold);
}

/* ---------- Featured compact cards ---------- */

.featured-card {
  background: var(--panel);
  border: 1px solid rgba(184, 168, 143, 0.15);
  border-radius: 3px;
  overflow: hidden;
  scroll-snap-align: start;
}

.featured-card a {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  padding: 0.9rem;
  color: var(--text);
  text-decoration: none;
}

.featured-card img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  display: block;
  border-radius: 2px;
}

.featured-card-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.04em;
}

.featured-card-price {
  color: var(--gold);
  font-weight: 600;
}

/* ---------- Card extras ---------- */

.card-save {
  font-size: 0.8rem;
}

.card-save a {
  color: var(--muted);
  text-decoration: none;
  letter-spacing: 0.04em;
}

.card-save a:hover {
  color: var(--gold);
  text-decoration: underline;
}

.buy-note {
  color: var(--muted);
  font-size: 0.85rem;
  margin-top: 0.75rem;
}

/* ---------- Trust block (B-45) ---------- */

.trust {
  padding: 3rem 0 4rem;
  max-width: 64rem;
  margin: 0 auto;
}

.trust-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

@media (max-width: 800px) {
  .trust-grid {
    grid-template-columns: 1fr;
  }
}

.trust-item {
  background: var(--panel);
  border: 1px solid rgba(184, 168, 143, 0.15);
  border-radius: 3px;
  padding: 1.25rem 1.4rem;
}

.trust-item h3 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: 0.06em;
  color: var(--gold);
  margin-bottom: 0.5rem;
}

.trust-item p {
  color: var(--muted);
  font-size: 0.92rem;
}

/* ---------- Kit capture slots (B-43) ---------- */

.kit-slot {
  max-width: 34rem;
  margin: 2rem auto 0;
  text-align: center;
}

.kit-slot-footer {
  flex-basis: 100%;
}

.kit-offer {
  color: var(--muted);
  margin-bottom: 0.9rem;
}

.kit-label {
  position: absolute;
  left: -9999px;
}

.kit-input {
  font-family: var(--font-body);
  font-size: 0.9rem;
  color: var(--text);
  background: var(--panel);
  border: 1px solid rgba(184, 168, 143, 0.3);
  border-radius: 2px;
  padding: 0.6rem 0.9rem;
  min-width: 220px;
  margin-right: 0.5rem;
}

.kit-note {
  color: var(--gold);
  font-size: 0.85rem;
  margin-top: 0.75rem;
}

/* ---------- Product pages (B-10) ---------- */

.product-page {
  max-width: 1000px;
  margin: 0 auto;
  padding: 2rem clamp(1rem, 4vw, 2.5rem) 4rem;
}

.breadcrumb {
  margin-bottom: 1.5rem;
}

.breadcrumb a {
  color: var(--gold);
  text-decoration: none;
}

.product-hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: start;
}

@media (max-width: 700px) {
  .product-hero {
    grid-template-columns: 1fr;
  }
}

.product-media {
  border: 1px solid rgba(201, 163, 92, 0.15);
  border-radius: 3px;
}

.product-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  letter-spacing: 0.06em;
  line-height: 1.25;
  margin-bottom: 0.75rem;
}

.product-info .card-price {
  font-size: 1.25rem;
  margin: 0.75rem 0;
}

.product-info .btn {
  margin-top: 1rem;
}

/* ---------- Product grid ---------- */

.product-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
}

@media (max-width: 1100px) {
  .product-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 560px) {
  /* B-41: two columns on phones instead of a 131-card single column. */
  .product-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
  }
}

/* ---------- Product card ---------- */

.product-card {
  display: flex;
  flex-direction: column;
  background: var(--panel);
  border: 1px solid rgba(184, 168, 143, 0.15);
  border-radius: 3px;
  overflow: hidden;
  transition:
    transform 0.35s ease,
    border-color 0.35s ease,
    box-shadow 0.35s ease,
    opacity 0.3s ease;
}

.product-card:hover {
  transform: translateY(-4px);
  border-color: var(--gold);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45), 0 0 16px var(--gold-glow);
}

.card-media {
  position: relative;
  aspect-ratio: 1 / 1;
  background: linear-gradient(160deg, #261f19 0%, #1a1512 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  border-bottom: 1px solid rgba(201, 163, 92, 0.15);
}

.card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.card-placeholder {
  background:
    radial-gradient(ellipse 70% 60% at 50% 40%, rgba(201, 163, 92, 0.08), transparent 75%),
    linear-gradient(160deg, #261f19 0%, #1a1512 100%);
}

.placeholder-initial {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.5rem, 5vw, 3.5rem);
  color: var(--gold);
  opacity: 0.85;
}

.card-body {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 1rem 1.1rem 0.4rem;
  flex: 1;
}

.card-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: 0.04em;
  line-height: 1.35;
  color: var(--text);
}

.card-note {
  color: var(--muted);
  font-size: 0.85rem;
}

.card-price {
  color: var(--gold);
  font-weight: 600;
  font-size: 1rem;
  margin-top: 0.2rem;
}

.card-size {
  color: var(--muted);
  font-size: 0.78rem;
  letter-spacing: 0.03em;
}

.product-card .btn {
  margin: 1rem 1.1rem 1.1rem;
}

/* ---------- Empty state ---------- */

.empty-state {
  text-align: center;
  color: var(--muted);
  font-style: italic;
  padding: 3rem 0;
}

/* ---------- About ---------- */

.about {
  padding: 3rem 0 4.5rem;
  max-width: 44rem;
  margin: 0 auto;
}

.about-text {
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.8;
}

/* ---------- Footer ---------- */

.site-footer {
  border-top: 1px solid rgba(201, 163, 92, 0.25);
  margin-top: 2rem;
  padding: 1.75rem clamp(1rem, 4vw, 2.5rem);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  flex-wrap: wrap;
  text-align: center;
}

.footer-copyright {
  color: var(--muted);
  font-size: 0.85rem;
}

.footer-link {
  color: var(--gold);
  font-size: 0.85rem;
  text-decoration: none;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.footer-link:hover {
  text-decoration: underline;
}

.footer-note {
  color: var(--muted);
  font-size: 0.8rem;
}

/* ---------- Responsive header ---------- */

/* B-41: the header wraps and grows on small screens — keep anchored
   sections clear of it instead of the fixed desktop offset. */
@media (max-width: 900px) {
  html {
    scroll-padding-top: 8.5rem;
  }
}

@media (max-width: 640px) {
  .site-header {
    justify-content: center;
    text-align: center;
  }

  .site-nav {
    justify-content: center;
  }

  html {
    scroll-padding-top: 11rem;
  }
}

/* ---------- Reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .product-card,
  .btn,
  .tab,
  .search-input {
    transition: none;
  }

  .product-card:hover {
    transform: none;
  }
}
