:root {
  --brand-red: #b21c0a;
  --brand-brown: #76461f;
  --ink: #111111;
  --muted: #6b625d;
  --line: #eadbcc;
  --bg: #ffffff;
  --bg-tint: #f4ece2;
  --card-bg: #ffffff;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Wix Madefor Text", Arial, Helvetica, sans-serif;
  line-height: 1.5;
}

h1, h2, h3, h4 {
  font-family: "Instrument Sans", "Wix Madefor Text", Arial, sans-serif;
  color: var(--brand-red);
  margin: 0;
}

.site-header {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 20px 32px;
  background: #ffffff;
  border-bottom: 1px solid var(--line);
}

.brand {
  display: flex;
  align-items: center;
  justify-self: start;
}

.crest {
  width: 64px;
  height: 64px;
  object-fit: contain;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  justify-self: center;
  gap: 28px;
}

.site-nav a {
  font-family: "Wix Madefor Text", Arial, sans-serif;
  font-size: 1.5rem;
  font-weight: 400;
  color: var(--brand-red);
  text-decoration: none;
}

.site-nav a:hover {
  text-decoration: underline;
}

.site-nav a.current {
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 5px;
}

.hero {
  position: relative;
  height: 420px;
  overflow: hidden;
}

.hero-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.hero-copy {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 0 6%;
  max-width: 620px;
  background: linear-gradient(100deg, rgba(255, 255, 255, 0.88) 0%, rgba(255, 255, 255, 0.6) 55%, rgba(255, 255, 255, 0) 100%);
}

.standards-badge {
  display: inline-block;
  margin-top: 20px;
  padding: 6px 16px;
  background: #ffffff;
  border: 1px solid var(--brand-red);
  border-radius: 999px;
  color: var(--brand-red);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  width: fit-content;
}

.hero-copy h1 {
  font-size: 3rem;
  font-weight: 700;
  line-height: 1.05;
}

.hero-sub {
  margin-top: 16px;
  font-size: 1.15rem;
  color: var(--ink);
  max-width: 460px;
}

.page-banner {
  background: var(--bg-tint, #f4ece2);
  border-bottom: 1px solid var(--line);
  padding: 28px 24px;
}

.page-banner-inner,
.page-banner {
  max-width: 1200px;
  margin: 0 auto;
}

.breadcrumb {
  margin: 0 0 10px;
  font-size: 0.85rem;
  color: var(--muted);
}

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

.breadcrumb a:hover {
  color: var(--brand-red);
  text-decoration: underline;
}

.breadcrumb span[aria-hidden] {
  margin: 0 6px;
}

.page-banner h1 {
  font-size: 1.8rem;
}

.page-banner-sub {
  margin: 8px 0 0;
  color: var(--muted);
}

.strand-tiles {
  margin-top: 16px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
}

.strand-tile {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  text-decoration: none;
  background: var(--card-bg);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.strand-tile:hover {
  border-color: var(--brand-brown);
  box-shadow: 0 6px 18px rgba(73, 43, 31, 0.1);
}

.strand-tile-name {
  color: var(--brand-red);
  font-weight: 700;
  font-family: "Instrument Sans", "Wix Madefor Text", Arial, sans-serif;
}

.strand-tile-count {
  color: var(--muted);
  font-size: 0.82rem;
  white-space: nowrap;
}

.layout {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 24px 80px;
  display: flex;
  gap: 40px;
  align-items: flex-start;
}

.sidebar {
  flex: 0 0 260px;
  position: sticky;
  top: 24px;
}

.folder-nav details {
  border-bottom: 1px solid var(--line);
  padding: 14px 0;
}

.folder-nav details:first-child {
  padding-top: 0;
}

.folder-nav summary {
  cursor: pointer;
  font-weight: 700;
  color: var(--brand-red);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  list-style: none;
}

.folder-nav summary::-webkit-details-marker {
  display: none;
}

.folder-nav summary::before {
  content: "\25B8";
  display: inline-block;
  margin-right: 8px;
  transition: transform 0.15s ease;
}

.folder-nav details[open] > summary::before {
  transform: rotate(90deg);
}

.folder-nav .count {
  font-weight: 400;
  font-size: 0.75rem;
  color: var(--muted);
  background: var(--bg-tint, #f4ece2);
  border-radius: 999px;
  padding: 2px 9px;
}

.folder-nav ul {
  list-style: none;
  margin: 12px 0 0;
  padding: 0 0 0 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.folder-nav li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.folder-nav a {
  color: var(--ink);
  text-decoration: none;
  font-size: 0.92rem;
}

.folder-nav a:hover {
  color: var(--brand-red);
  text-decoration: underline;
}

.folder-nav a.current {
  color: var(--brand-red);
  font-weight: 700;
}

.folder-empty {
  margin: 12px 0 0 18px;
  font-size: 0.85rem;
  color: var(--muted);
  font-style: italic;
}

.subfolder-list {
  margin-top: 12px;
  padding-left: 14px;
  border-left: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.subfolder-list details {
  border-bottom: none;
  padding: 8px 0;
}

.folder-nav summary.sub {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--ink);
}

.folder-nav summary.sub::before {
  font-size: 0.8rem;
}

.catalog-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 56px;
}

.category h2 {
  font-size: 1.6rem;
  margin-bottom: 20px;
}

.category-empty {
  color: var(--muted);
  font-style: italic;
}

.subcategory + .subcategory {
  margin-top: 40px;
  padding-top: 40px;
  border-top: 1px solid var(--line);
}

.subcategory-title {
  font-size: 1.15rem;
  color: var(--brand-brown);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 16px;
}

.subcategory.grade > .subcategory-title {
  font-size: 1.5rem;
  color: var(--brand-red);
}

.cards-grid {
  margin-top: 24px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 20px;
}

.product-card {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr) 220px;
  gap: 24px;
  align-items: center;
  background: var(--card-bg);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 32px;
  box-shadow: 0 10px 30px rgba(73, 43, 31, 0.08);
}

.product-thumb {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid var(--line);
}

.product-eyebrow {
  display: inline-block;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  margin-bottom: 8px;
}

.product-card h4 {
  font-size: 1.5rem;
  margin-bottom: 12px;
}

.product-card.compact h4 {
  font-size: 1.15rem;
}

.product-card p {
  color: var(--ink);
  margin: 0 0 16px;
}

.product-facts {
  margin: 0;
  padding-left: 20px;
  color: var(--muted);
}

.product-facts li {
  margin-bottom: 6px;
}

.product-buy {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  border-left: 1px solid var(--line);
  padding-left: 24px;
  text-align: center;
}

.price {
  font-family: "Instrument Sans", sans-serif;
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--brand-red);
}

.buy-btn {
  display: inline-block;
  background: var(--brand-brown);
  color: #ffffff;
  text-decoration: none;
  font-weight: 700;
  padding: 14px 28px;
  border-radius: 999px;
  white-space: nowrap;
}

.buy-btn:hover {
  opacity: 0.9;
}

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

.price-sm {
  font-size: 1.3rem;
}

.buy-btn-sm {
  padding: 8px 22px;
  font-size: 0.85rem;
}

.save-badge {
  display: inline-block;
  color: var(--brand-red);
  font-weight: 700;
  font-size: 0.8rem;
}

.product-card.compact {
  grid-template-columns: 1fr;
  padding: 20px;
  gap: 4px;
}

.product-card.compact .product-thumb {
  margin-bottom: 12px;
}

.product-card.compact .product-copy p {
  color: var(--muted);
  font-size: 0.9rem;
  margin-bottom: 0;
}

.product-card.compact .product-buy {
  border-left: none;
  padding-left: 0;
  padding-top: 14px;
  align-items: flex-start;
}

.product-card.compact.bundle {
  background: var(--bg-tint, #f4ece2);
  border-color: var(--brand-brown);
}

.doc-thumb-wrap {
  position: relative;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--bg-tint, #f4ece2);
  margin-bottom: 12px;
}

.doc-thumb-wrap .product-thumb {
  width: 100%;
  height: 100%;
  object-fit: contain;
  margin-bottom: 0;
  border: none;
  border-radius: 0;
  filter: blur(3.5px);
  transform: scale(1.08);
  -webkit-user-select: none;
  user-select: none;
  pointer-events: none;
}

.doc-thumb-wrap::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(17, 17, 17, 0.15);
}

.doc-thumb-wrap .preview-badge {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  background: rgba(17, 17, 17, 0.75);
  color: #ffffff;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 6px 14px;
  border-radius: 999px;
  white-space: nowrap;
}

.coming-soon-badge {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--bg-tint, #f4ece2);
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 600;
}

.site-footer {
  text-align: center;
  padding: 32px 24px 48px;
  color: var(--muted);
  font-size: 0.9rem;
}

.site-footer a {
  color: var(--brand-red);
}

@media (max-width: 900px) {
  .layout {
    flex-direction: column;
  }
  .sidebar {
    flex: none;
    width: 100%;
    position: static;
  }
}

@media (max-width: 640px) {
  .site-header {
    grid-template-columns: 1fr;
    justify-items: start;
    gap: 12px;
  }
  .site-nav {
    justify-self: start;
    justify-content: flex-start;
    gap: 18px;
  }
  .site-nav a {
    font-size: 1.1rem;
  }
  .hero {
    height: 320px;
  }
  .hero-copy {
    max-width: 100%;
  }
  .hero-copy h1 {
    font-size: 2.1rem;
  }
  .product-card.featured {
    grid-template-columns: 1fr;
  }
  .product-card.featured .product-buy {
    border-left: none;
    border-top: 1px solid var(--line);
    padding-left: 0;
    padding-top: 20px;
  }
}
