/* ════════════════════════════════════════════════════════════
   MATERIAL DETAIL PAGE — 360° Interactive Stone Showcase
   ════════════════════════════════════════════════════════════ */

html, body {
  overflow-x: hidden;
  max-width: 100%;
}

section {
  max-width: 100%;
  overflow-x: clip;
}

:root {
  --gold: #C9A84C;
  --gold-dim: rgba(201, 168, 76, 0.08);
  --border-gold: rgba(201, 168, 76, 0.2);
  --black: #0A0908;
  --dark: #121212;
  --dark-2: #1A1A1A;
  --dark-3: #222;
  --dark-card: #161616;
  --text-secondary: rgba(255,255,255,0.70);
  --text-muted: rgba(255,255,255,0.50);
}

/* ── MATERIAL HERO WITH 360° 3D ─────────────────────────── */
.material-hero {
  padding: 140px 0 100px;
  background: var(--black);
  position: relative;
  overflow: hidden;
}

.material-hero::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 800px;
  height: 800px;
  background: radial-gradient(circle, rgba(201,168,76,0.06) 0%, transparent 70%);
  pointer-events: none;
}

.mh-breadcrumb {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 50px;
}

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

.mh-breadcrumb a:hover {
  color: var(--gold);
}

.mh-sep {
  color: var(--gold);
}

.mh-current {
  color: var(--gold);
  font-weight: 700;
}

.mh-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 80px;
  align-items: center;
}

/* 3D Canvas Area */
/* ── Showcase wrapper provides comfortable padding around the stone so callouts can sit elegantly ── */
.mh-showcase {
  position: relative;
  width: 100%;
}

.mh-3d-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  background:
    radial-gradient(circle at 50% 55%, #1a1612 0%, #0a0908 70%);
  border: 1px solid rgba(201,168,76,0.15);
  border-radius: 18px;
  overflow: hidden;
  box-shadow:
    0 28px 72px rgba(0,0,0,0.7),
    inset 0 1px 0 rgba(255,236,200,0.04);
}

/* Decorative inner gold corner brackets */
.mh-3d-wrap::before,
.mh-3d-wrap::after {
  content: '';
  position: absolute;
  width: 28px;
  height: 28px;
  border: 1.5px solid rgba(201,168,76,0.55);
  pointer-events: none;
  z-index: 4;
}
.mh-3d-wrap::before {
  top: 14px;
  left: 14px;
  border-right: none;
  border-bottom: none;
}
.mh-3d-wrap::after {
  bottom: 14px;
  right: 14px;
  border-left: none;
  border-top: none;
}

/* SVG connecting lines layer */
.mh-connect-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 2;
  opacity: 0;
  animation: mhLineDraw 1.4s ease-out 0.5s forwards;
}
.mh-line {
  stroke-dasharray: 60;
  stroke-dashoffset: 60;
  animation: mhLineStroke 1.4s ease-out 0.6s forwards;
}
@keyframes mhLineDraw {
  to { opacity: 1; }
}
@keyframes mhLineStroke {
  to { stroke-dashoffset: 0; }
}

/* ── FLOATING SPEC CALLOUTS — luxury info cards floating around the stone ── */
.mh-callout {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: rgba(14, 12, 9, 0.85);
  border: 1px solid rgba(201, 168, 76, 0.32);
  border-radius: 10px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow:
    0 8px 24px rgba(0, 0, 0, 0.55),
    0 0 0 1px rgba(255, 235, 200, 0.04) inset;
  z-index: 3;
  min-width: 130px;
  max-width: 165px;
  opacity: 0;
  transform: translateY(10px) scale(0.95);
  animation: mhCalloutIn 0.7s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
  transition: transform 0.4s ease, border-color 0.3s, box-shadow 0.3s;
}
.mh-callout:hover {
  transform: translateY(-2px) scale(1.03);
  border-color: rgba(201, 168, 76, 0.7);
  box-shadow:
    0 12px 32px rgba(0, 0, 0, 0.65),
    0 0 18px rgba(201, 168, 76, 0.18);
}

.mh-callout-tl { top: 6%;    left: 4%;    animation-delay: 0.9s; }
.mh-callout-tr { top: 6%;    right: 4%;   animation-delay: 1.05s; }
.mh-callout-bl { bottom: 6%; left: 4%;    animation-delay: 1.2s; }
.mh-callout-br { bottom: 6%; right: 4%;   animation-delay: 1.35s; }

@keyframes mhCalloutIn {
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.mh-co-icon {
  width: 30px;
  height: 30px;
  flex-shrink: 0;
  background: linear-gradient(135deg, rgba(201,168,76,0.18) 0%, rgba(201,168,76,0.06) 100%);
  border: 1px solid rgba(201, 168, 76, 0.5);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #E0BE5C;
  font-size: 12px;
}

.mh-co-body {
  display: flex;
  flex-direction: column;
  gap: 1px;
  line-height: 1.2;
}

.mh-co-label {
  font-size: 8.5px;
  letter-spacing: 1.8px;
  text-transform: uppercase;
  color: rgba(255, 235, 200, 0.55);
  font-weight: 700;
}

.mh-co-value {
  font-size: 11.5px;
  color: #F5EBD6;
  font-weight: 700;
  letter-spacing: 0.3px;
}
.mh-co-value em {
  font-style: normal;
  font-size: 9.5px;
  color: #C9A84C;
  font-weight: 600;
  letter-spacing: 0.5px;
}

/* Pulsing gold dot showing the callout's "anchor point" toward the stone */
.mh-co-dot {
  position: absolute;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #C9A84C;
  box-shadow: 0 0 8px rgba(201, 168, 76, 0.8);
  animation: mhDotPulse 2s ease-in-out infinite;
}
.mh-callout-tl .mh-co-dot { bottom: -3px; right: -3px; }
.mh-callout-tr .mh-co-dot { bottom: -3px; left: -3px; }
.mh-callout-bl .mh-co-dot { top: -3px;    right: -3px; }
.mh-callout-br .mh-co-dot { top: -3px;    left: -3px; }

@keyframes mhDotPulse {
  0%, 100% { transform: scale(1);   box-shadow: 0 0 8px rgba(201, 168, 76, 0.7); }
  50%      { transform: scale(1.4); box-shadow: 0 0 14px rgba(201, 168, 76, 1); }
}

@media (max-width: 720px) {
  .mh-callout {
    padding: 7px 10px;
    min-width: 100px;
    max-width: 130px;
    gap: 6px;
  }
  .mh-co-icon { width: 24px; height: 24px; font-size: 10px; }
  .mh-co-label { font-size: 7.5px; letter-spacing: 1.2px; }
  .mh-co-value { font-size: 10px; }
  .mh-co-value em { font-size: 8.5px; }
}

.material-3d-canvas {
  width: 100%;
  height: 100%;
  cursor: grab;
}

.material-3d-canvas:active {
  cursor: grabbing;
}

.mh-3d-hint {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  background: rgba(12,11,9,0.92);
  border: 1px solid rgba(201,168,76,0.18);
  border-radius: 999px;
  color: rgba(201,168,76,0.85);
  font-size: 9.5px;
  letter-spacing: 2.2px;
  text-transform: uppercase;
  font-weight: 600;
  pointer-events: none;
  backdrop-filter: blur(6px);
  z-index: 2;
}

.mh-3d-hint i {
  font-size: 11px;
  opacity: 0.8;
}


/* Material Info */
.mh-info {
  position: relative;
  z-index: 1;
}

.mh-label {
  display: inline-block;
  font-size: 11px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 700;
  margin-bottom: 16px;
}

.mh-title {
  font-size: clamp(3rem, 6vw, 5rem);
  font-weight: 900;
  letter-spacing: -2px;
  margin-bottom: 12px;
  background: linear-gradient(135deg, #fff 0%, var(--gold) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.mh-subtitle {
  font-size: 1.1rem;
  color: var(--text-secondary);
  margin-bottom: 40px;
  font-weight: 300;
  letter-spacing: 0.5px;
}

.mh-quick-specs {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin-bottom: 40px;
  padding: 28px;
  background: rgba(10,8,5,0.4);
  border: 1px solid rgba(201,168,76,0.14);
  border-radius: 12px;
}

.mh-qs-item {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.mh-qs-item i {
  color: var(--gold);
  font-size: 20px;
  margin-bottom: 4px;
}

.mh-qs-label {
  font-size: 10px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 700;
}

.mh-qs-value {
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
}

.mh-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

/* ── DESCRIPTION SECTION ────────────────────────────────── */
.material-desc {
  padding: 100px 0;
}

.md-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 80px;
  align-items: start;
}

.md-text p {
  font-size: 1rem;
  line-height: 1.9;
  color: var(--text-secondary);
  margin-bottom: 20px;
  font-weight: 300;
}

.md-highlights {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.md-hl-item {
  display: flex;
  align-items: flex-start;
  gap: 18px;
  padding: 20px;
  background: rgba(10,8,5,0.4);
  border: 1px solid rgba(201,168,76,0.12);
  border-radius: 10px;
  transition: border-color 0.3s, background 0.3s;
}

.md-hl-item:hover {
  border-color: rgba(201,168,76,0.35);
  background: rgba(10,8,5,0.6);
}

.md-hl-icon {
  width: 44px;
  height: 44px;
  background: var(--gold-dim);
  border: 1px solid var(--border-gold);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gold);
  font-size: 18px;
  flex-shrink: 0;
}

.md-hl-text strong {
  display: block;
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.md-hl-text span {
  font-size: 0.85rem;
  color: var(--text-secondary);
  font-weight: 300;
}

/* ── SPECIFICATIONS SECTION ─────────────────────────────── */
.material-specs {
  padding: 100px 0;
  background: var(--dark-2);
}

.specs-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 2px;
  margin-bottom: 60px;
  background: rgba(201,168,76,0.15);
  border: 1px solid rgba(201,168,76,0.15);
  border-radius: 12px;
  overflow: hidden;
}

.spec-card {
  padding: 32px 24px;
  background: var(--dark-card);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  transition: background 0.3s;
}

.spec-card:hover {
  background: var(--dark-3);
}

.spec-icon {
  width: 52px;
  height: 52px;
  background: var(--gold-dim);
  border: 1px solid var(--border-gold);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gold);
  font-size: 20px;
}

.spec-label {
  font-size: 10px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 700;
}

.spec-value {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--gold);
  font-family: var(--font-display, serif);
}

.specs-table-wrap {
  background: rgba(10,8,5,0.4);
  border: 1px solid rgba(201,168,76,0.14);
  border-radius: 12px;
  overflow: hidden;
}

.specs-table {
  width: 100%;
  border-collapse: collapse;
}

.specs-table tbody tr {
  border-bottom: 1px solid rgba(201,168,76,0.08);
}

.specs-table tbody tr:last-child {
  border-bottom: none;
}

.st-label {
  padding: 20px 32px;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--gold);
  width: 35%;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-size: 11px;
}

.st-value {
  padding: 20px 32px;
  font-size: 0.95rem;
  color: rgba(255,255,255,0.85);
  font-weight: 300;
}

/* ── INDUSTRIAL APPLICATIONS ────────────────────────────── */
.material-applications {
  padding: 100px 0;
}

.app-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.app-card {
  padding: 36px 28px;
  background: rgba(10,8,5,0.4);
  border: 1px solid rgba(201,168,76,0.12);
  border-radius: 12px;
  text-align: center;
  transition: border-color 0.3s, transform 0.3s, background 0.3s;
  position: relative;
  overflow: hidden;
}

.app-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(201,168,76,0.08) 0%, transparent 60%);
  opacity: 0;
  transition: opacity 0.3s;
}

.app-card:hover::before {
  opacity: 1;
}

.app-card:hover {
  border-color: rgba(201,168,76,0.35);
  transform: translateY(-4px);
  background: rgba(10,8,5,0.6);
}

.app-icon-wrap {
  width: 70px;
  height: 70px;
  background: var(--gold-dim);
  border: 2px solid var(--border-gold);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gold);
  font-size: 28px;
  margin: 0 auto 24px;
  transition: transform 0.3s, box-shadow 0.3s;
}

.app-card:hover .app-icon-wrap {
  transform: scale(1.1) rotate(5deg);
  box-shadow: 0 0 30px rgba(201,168,76,0.4);
}

.app-title {
  font-size: 1.3rem;
  font-weight: 800;
  margin-bottom: 12px;
  color: #fff;
}

.app-desc {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.8;
  font-weight: 300;
  margin-bottom: 16px;
}

.app-stats {
  padding-top: 16px;
  border-top: 1px solid rgba(201,168,76,0.12);
}

.app-stats span {
  font-size: 11px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.app-stats i {
  font-size: 12px;
}

/* ── PROJECT GALLERY ────────────────────────────────────── */
.material-gallery {
  padding: 100px 0;
  background: var(--dark-2);
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.gallery-item {
  border-radius: 12px;
  overflow: hidden;
  background: var(--dark-card);
  border: 1px solid rgba(201,168,76,0.12);
  transition: border-color 0.3s, transform 0.3s, box-shadow 0.3s;
  box-shadow: 0 10px 30px rgba(0,0,0,0.4);
}

.gallery-item:hover {
  border-color: rgba(201,168,76,0.35);
  transform: translateY(-8px);
  box-shadow: 0 20px 50px rgba(0,0,0,0.6);
}

.gallery-photo,
.gallery-canvas {
  width: 100%;
  aspect-ratio: 4/3;
  display: block;
  object-fit: cover;
  display: block;
  transition: transform 0.6s cubic-bezier(0.2,0,0.2,1);
}

.gallery-item:hover .gallery-photo {
  transform: scale(1.03);
}

.gallery-info {
  padding: 20px;
  background: linear-gradient(0deg, var(--dark-card) 0%, rgba(22,22,22,0.95) 100%);
}

.gallery-info h4 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 6px;
  color: #fff;
  letter-spacing: -0.2px;
}

.gallery-info p {
  font-size: 0.82rem;
  color: var(--text-secondary);
  font-weight: 300;
}

/* ── GALLERY LIGHTBOX ───────────────────────────────────── */
.gallery-item {
  cursor: pointer;
  position: relative;
}

.gallery-item::after {
  content: '\f00e';
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
  position: absolute;
  top: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  background: rgba(0,0,0,0.7);
  border: 1px solid rgba(201,168,76,0.5);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gold);
  font-size: 14px;
  opacity: 0;
  transform: scale(0.8);
  transition: opacity 0.3s, transform 0.3s;
  pointer-events: none;
  line-height: 36px;
  text-align: center;
}

.gallery-item:hover::after {
  opacity: 1;
  transform: scale(1);
}

/* Lightbox overlay */
.nmg-lightbox {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(0,0,0,0.96);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s ease, visibility 0.35s ease;
}

.nmg-lightbox.open {
  opacity: 1;
  visibility: visible;
}

.nmg-lightbox-close {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 48px;
  height: 48px;
  background: rgba(201,168,76,0.15);
  border: 1px solid rgba(201,168,76,0.4);
  border-radius: 50%;
  color: var(--gold);
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, transform 0.2s;
  z-index: 2;
}

.nmg-lightbox-close:hover {
  background: var(--gold);
  color: #000;
  transform: rotate(90deg);
}

.nmg-lightbox-counter {
  position: absolute;
  top: 24px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 11px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: rgba(201,168,76,0.7);
  font-weight: 700;
}

.nmg-lightbox-main {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 1100px;
  padding: 0 80px;
  box-sizing: border-box;
}

.nmg-lightbox-img {
  max-width: 100%;
  max-height: 70vh;
  border-radius: 8px;
  box-shadow: 0 20px 80px rgba(0,0,0,0.8);
  object-fit: contain;
  transition: opacity 0.25s ease;
}

.nmg-lightbox-img.fading {
  opacity: 0;
}

.nmg-lb-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 52px;
  height: 52px;
  background: rgba(201,168,76,0.12);
  border: 1px solid rgba(201,168,76,0.4);
  border-radius: 50%;
  color: var(--gold);
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, transform 0.2s;
}

.nmg-lb-arrow:hover {
  background: var(--gold);
  color: #000;
}

.nmg-lb-prev { left: 16px; }
.nmg-lb-next { right: 16px; }

.nmg-lightbox-caption {
  margin-top: 20px;
  text-align: center;
  padding: 0 20px;
}

.nmg-lightbox-caption h4 {
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 6px;
}

.nmg-lightbox-caption p {
  font-size: 0.82rem;
  color: rgba(255,255,255,0.5);
  font-weight: 300;
}

.nmg-lightbox-thumbs {
  display: flex;
  gap: 8px;
  margin-top: 20px;
  flex-wrap: wrap;
  justify-content: center;
  padding: 0 20px;
  max-width: 1000px;
}

.nmg-lb-thumb {
  width: 68px;
  height: 50px;
  object-fit: cover;
  border-radius: 4px;
  cursor: pointer;
  opacity: 0.45;
  border: 2px solid transparent;
  transition: opacity 0.2s, border-color 0.2s, transform 0.2s;
}

.nmg-lb-thumb:hover {
  opacity: 0.8;
  transform: translateY(-2px);
}

.nmg-lb-thumb.active {
  opacity: 1;
  border-color: var(--gold);
}

/* ── RESPONSIVE ─────────────────────────────────────────── */
@media (max-width: 1024px) {
  .mh-grid { grid-template-columns: 1fr; gap: 50px; }
  .md-grid { grid-template-columns: 1fr; gap: 50px; }
  .specs-grid { grid-template-columns: repeat(3, 1fr); }
  .app-grid { grid-template-columns: repeat(2, 1fr); }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .material-hero { padding: 100px 0 60px; }
  .specs-grid { grid-template-columns: repeat(2, 1fr); }
  .mh-quick-specs { grid-template-columns: 1fr; gap: 16px; }
}

@media (max-width: 600px) {
  .app-grid { grid-template-columns: 1fr; }
  .gallery-grid { grid-template-columns: 1fr; }
  .specs-grid { grid-template-columns: 1fr; }
}
