/* ===== MATERIALS PAGE ===== */

.nav-active {
  color: var(--gold) !important;
}

/* Hero */
.materials-hero {
  min-height: 28vh;
  background:
    linear-gradient(135deg, rgba(26,23,20,0.95) 0%, rgba(45,41,36,0.9) 100%),
    repeating-conic-gradient(var(--stone-700) 0% 25%, transparent 0% 50%) 0 0 / 60px 60px;
  display: flex;
  align-items: center;
  padding: 8rem 2rem 3rem;
}

.materials-hero-content {
  max-width: 1280px;
  margin: 0 auto;
  text-align: center;
}

.materials-hero-content .overline {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.75rem;
}

.materials-hero-content h1 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(2.2rem, 4vw, 3.4rem);
  font-weight: 900;
  color: var(--cream);
  margin-bottom: 1rem;
}

.materials-hero-content .tagline {
  font-size: 1rem;
  color: var(--stone-400);
  max-width: 640px;
  margin: 0 auto;
  font-weight: 300;
  line-height: 1.8;
}

.materials-switcher {
  background: var(--stone-900);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding: 0.9rem 2rem;
}

.materials-switcher-inner {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  gap: 0.65rem;
  justify-content: center;
  flex-wrap: wrap;
}

.materials-switch {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 160px;
  padding: 0.75rem 1.1rem;
  border-radius: 999px;
  border: 1px solid rgba(184, 146, 63, 0.35);
  color: var(--stone-200);
  text-decoration: none;
  font-family: 'Libre Franklin', sans-serif;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  transition: all 0.2s ease;
}

.materials-switch:hover {
  border-color: var(--gold);
  color: var(--gold);
}

.materials-switch.active {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--stone-900);
}

/* Pricing disclaimer */
.pricing-note {
  background: rgba(184, 146, 63, 0.08);
  border-top: 1px solid rgba(184, 146, 63, 0.2);
  border-bottom: 1px solid rgba(184, 146, 63, 0.2);
  padding: 0.9rem 2rem;
}

.pricing-note-inner {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  font-size: 0.85rem;
  color: var(--stone-600);
  line-height: 1.6;
}

.pricing-note-icon {
  color: var(--gold);
  font-size: 1.1rem;
  flex-shrink: 0;
  margin-top: 0.05rem;
}

/* Filter bar */
.materials-filter-section {
  background: var(--stone-50);
  border-bottom: 1px solid var(--stone-200);
  padding: 1.5rem 2rem 1rem;
  position: sticky;
  top: 76px;
  z-index: 100;
}

.filter-bar {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.filter-group {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.filter-label {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--stone-500);
  min-width: 80px;
}

.filter-btn {
  background: white;
  border: 1px solid var(--stone-200);
  border-radius: 4px;
  padding: 0.3rem 0.85rem;
  font-family: 'Libre Franklin', sans-serif;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--stone-600);
  cursor: pointer;
  transition: all 0.2s ease;
}

.filter-btn:hover {
  border-color: var(--gold);
  color: var(--gold);
}

.filter-btn.active {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--stone-900);
  font-weight: 600;
}

.results-count {
  max-width: 1280px;
  margin: 0.5rem auto 0;
  font-size: 0.78rem;
  color: var(--stone-400);
  font-weight: 500;
}

/* Materials grid */
.materials-section {
  padding: 3rem 2rem 5rem;
  background: var(--cream);
}

.materials-grid {
  max-width: 1280px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.5rem;
}

/* Card */
.mat-card {
  background: white;
  border: 1px solid var(--stone-200);
  border-radius: 8px;
  overflow: hidden;
  transition: all 0.35s ease;
  display: flex;
  flex-direction: column;
}

.mat-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0,0,0,0.09);
  border-color: rgba(184, 146, 63, 0.35);
}

/* Image */
.mat-img-wrap {
  position: relative;
  height: 200px;
  overflow: hidden;
  background: var(--stone-100);
}

.mat-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.45s ease;
}

.mat-card:hover .mat-img-wrap img {
  transform: scale(1.04);
}

/* Placeholder shown when img fails */
.mat-img-placeholder {
  position: absolute;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--stone-200), var(--stone-100));
  font-family: 'Playfair Display', serif;
  font-size: 3rem;
  font-weight: 700;
  color: var(--stone-400);
}

.mat-img-wrap.img-error img { display: none; }
.mat-img-wrap.img-error .mat-img-placeholder { display: flex; }

/* Supplier badge */
.mat-supplier-badge {
  position: absolute;
  top: 0.6rem;
  left: 0.6rem;
  padding: 0.2rem 0.6rem;
  border-radius: 3px;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.crescent-badge {
  background: rgba(26, 23, 20, 0.82);
  color: var(--gold);
}

.vicostone-badge {
  background: rgba(26, 23, 20, 0.82);
  color: var(--stone-200);
}

/* Card body */
.mat-info {
  padding: 1.1rem 1.25rem 1.25rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.mat-name {
  font-family: 'Playfair Display', serif;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--stone-900);
  margin-bottom: 0.5rem;
}

.mat-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 0.5rem;
}

.mat-collection {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--stone-500);
}

.mat-level-badge {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  padding: 0.15rem 0.55rem;
  border-radius: 3px;
  text-transform: uppercase;
}

.level-1 { background: var(--stone-100); color: var(--stone-600); }
.level-2 { background: rgba(184, 146, 63, 0.1); color: var(--gold-dark); }
.level-3 { background: rgba(184, 146, 63, 0.18); color: var(--gold-dark); border: 1px solid rgba(184,146,63,0.3); }
.level-4 { background: var(--stone-900); color: var(--gold); border: 1px solid rgba(184, 146, 63, 0.35); }

.mat-desc {
  font-size: 0.82rem;
  color: var(--stone-500);
  font-weight: 300;
  line-height: 1.5;
  margin-bottom: 0.5rem;
  font-style: italic;
}

.mat-details {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1rem;
  margin-bottom: 0.65rem;
}

.mat-detail {
  font-size: 0.78rem;
  color: var(--stone-500);
}

.mat-detail strong {
  color: var(--stone-700);
  font-weight: 600;
}


.mat-cta {
  display: block;
  text-align: center;
  background: transparent;
  border: 1.5px solid var(--stone-200);
  border-radius: 4px;
  padding: 0.45rem 1rem;
  font-family: 'Libre Franklin', sans-serif;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--stone-600);
  text-decoration: none;
  transition: all 0.3s ease;
}

.mat-cta:hover {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--stone-900);
}

/* Search input for natural stone page */
.stone-search {
  background: white;
  border: 1px solid var(--stone-200);
  border-radius: 4px;
  padding: 0.3rem 0.85rem;
  font-family: 'Libre Franklin', sans-serif;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--stone-700);
  outline: none;
  width: 220px;
  max-width: 100%;
  transition: border-color 0.2s ease;
}

.stone-search:focus {
  border-color: var(--gold);
}

/* Responsive */
@media (max-width: 900px) {
  .materials-filter-section { position: static; }
  .filter-label { min-width: 60px; }
  .stone-search { width: 160px; }
}

@media (max-width: 640px) {
  .materials-grid { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 1rem; }
  .mat-img-wrap { height: 160px; }
  .materials-hero { padding-top: 7rem; }
}
