.materials-shell {
  padding-top: 8px;
  padding-bottom: 48px;
}

.materials-page {
  display: grid;
  grid-template-columns: minmax(240px, 300px) 1fr;
  gap: 32px;
  align-items: start;
  min-height: calc(100vh - var(--header-height) - 80px);
}

.materials-sidebar {
  padding: 24px 8px 0 0;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: calc(var(--header-height) + 16px);
}

.materials-logo {
  text-align: left;
  margin-bottom: 36px;
}

.materials-logo img {
  width: 72px;
  height: auto;
  display: block;
  object-fit: contain;
}

.materials-sidebar h1 {
  font-family: var(--font-serif);
  font-size: clamp(18px, 1.6vw, 22px);
  color: var(--gold);
  letter-spacing: 0.08em;
  line-height: 1.35;
  margin-bottom: 20px;
  font-weight: 500;
}

.materials-tagline {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 10px;
  letter-spacing: 0.12em;
  color: var(--gold);
  text-transform: uppercase;
  margin-bottom: 18px;
  line-height: 1.5;
}

.materials-intro {
  font-size: 12px;
  color: var(--text-light);
  line-height: 1.75;
  margin-bottom: 28px;
  max-width: 260px;
}

.materials-product-img {
  margin-top: auto;
  max-width: 220px;
}

.materials-product-img img {
  width: 100%;
  object-fit: contain;
  display: block;
  filter: drop-shadow(0 16px 28px rgba(0, 0, 0, 0.55));
}

.materials-content {
  padding: 24px 0 0;
  min-width: 0;
}

.materials-section {
  margin-bottom: 40px;
}

.materials-section-title {
  font-family: var(--font-serif);
  font-size: clamp(16px, 1.5vw, 20px);
  color: var(--gold);
  text-align: center;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 28px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(197, 160, 89, 0.45);
  font-weight: 500;
}

.color-grid {
  display: grid;
  grid-template-columns: repeat(9, minmax(0, 1fr));
  gap: 20px 10px;
}

.color-swatch-item {
  text-align: center;
  transition: transform 0.2s ease;
}

.color-swatch-item .swatch-img {
  --swatch: #888;
  width: 46px;
  height: 58px;
  margin: 0 auto 10px;
  border-radius: 50% 50% 46% 46% / 58% 58% 40% 40%;
  background:
    radial-gradient(ellipse 55% 35% at 35% 22%, rgba(255, 255, 255, 0.55) 0%, rgba(255, 255, 255, 0) 70%),
    linear-gradient(160deg, rgba(255, 255, 255, 0.22) 0%, transparent 42%),
    linear-gradient(180deg, color-mix(in srgb, var(--swatch) 92%, white) 0%, var(--swatch) 48%, color-mix(in srgb, var(--swatch) 75%, black) 100%);
  box-shadow:
    0 8px 14px rgba(0, 0, 0, 0.35),
    inset 0 -6px 10px rgba(0, 0, 0, 0.28),
    inset 0 4px 8px rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.color-swatch-item .name {
  font-size: 9px;
  color: var(--text-white);
  margin-bottom: 2px;
  letter-spacing: 0.02em;
  line-height: 1.3;
}

.color-swatch-item .code {
  font-size: 8px;
  color: var(--text-muted);
  letter-spacing: 0.04em;
}

.finishes-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 20px;
  align-items: start;
}

.texture-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 14px 12px;
  min-width: 0;
}

.texture-item {
  text-align: center;
}

.texture-swatch {
  width: 100%;
  aspect-ratio: 1;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  margin-bottom: 10px;
  background: #111;
  position: relative;
}

.texture-swatch img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.texture-swatch.weave-plain img {
  object-position: 18% center;
  transform: scale(1.15);
}

.texture-swatch.weave-twill img {
  object-position: 55% center;
  transform: scale(1.35) rotate(2deg);
}

.texture-swatch.weave-forged img {
  object-position: 82% center;
  transform: scale(1.5);
  filter: contrast(1.15) brightness(1.08);
}

.texture-swatch.weave-honeycomb img {
  object-position: center 40%;
  transform: scale(1.6);
  filter: contrast(1.25) saturate(0.85);
}

.texture-swatch.matte::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.22);
  pointer-events: none;
}

.texture-swatch.gloss::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.18) 0%, transparent 42%, rgba(0, 0, 0, 0.12) 100%);
  pointer-events: none;
}

.texture-item span {
  font-size: 9px;
  color: var(--text-light);
  letter-spacing: 0.04em;
  display: block;
  line-height: 1.4;
}

.stealth-edition {
  width: 118px;
  min-height: 118px;
  border: 1px solid var(--gold);
  padding: 16px 12px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  align-self: stretch;
}

.stealth-edition img {
  width: 42px;
  height: auto;
  object-fit: contain;
}

.stealth-edition p {
  font-size: 9px;
  letter-spacing: 0.12em;
  color: var(--gold);
  text-transform: uppercase;
  line-height: 1.45;
}

@media (max-width: 1200px) {
  .color-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .texture-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .finishes-row { grid-template-columns: 1fr; }
  .stealth-edition {
    width: 100%;
    min-height: auto;
    flex-direction: row;
    justify-content: flex-start;
    gap: 16px;
    padding: 16px 20px;
  }
  .stealth-edition p br { display: none; }
}

@media (max-width: 900px) {
  .materials-page {
    grid-template-columns: 1fr;
  }

  .materials-sidebar {
    position: static;
    padding: 16px 0 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    margin-bottom: 8px;
  }

  .materials-logo {
    text-align: center;
  }

  .materials-logo img {
    margin-left: auto;
    margin-right: auto;
  }

  .materials-sidebar h1,
  .materials-tagline,
  .materials-intro {
    text-align: center;
    margin-left: auto;
    margin-right: auto;
  }

  .materials-product-img {
    margin: 8px auto 16px;
  }

  .color-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .texture-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 560px) {
  .color-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .texture-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
