/* ═══════════════════════════════════════════════
   MAGA KITCHEN — material.css
   Compartido por todas las páginas de material:
   melamina, pvc, high-glossy, cristal
═══════════════════════════════════════════════ */

/* ── Nav active ── */
.nav-active { color: var(--red) !important; position: relative; }
.nav-active::after {
  content: '';
  position: absolute;
  bottom: -4px; left: 0; right: 0;
  height: 1.5px;
  background: var(--red);
}

/* ══ HERO ══ */
.mat-hero {
  position: relative;
  height: 600px;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
}

.mat-hero-bg {
  position: absolute;
  inset: 0;
}

.mat-hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

.mat-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(0,0,0,.85) 0%,
    rgba(0,0,0,.45) 45%,
    rgba(0,0,0,.1) 100%
  );
}

.mat-hero-content {
  position: relative;
  z-index: 2;
  padding: 0 40px 56px;
  max-width: 580px;
}

/* Breadcrumb */
.mat-breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  font-size: 12px;
  font-family: 'DM Sans', sans-serif;
}

.mat-breadcrumb a {
  color: rgba(255,255,255,.5);
  transition: color .2s;
}

.mat-breadcrumb a:hover { color: var(--white); }

.mat-breadcrumb span {
  color: rgba(255,255,255,.3);
}

.mat-breadcrumb span:last-child {
  color: rgba(255,255,255,.7);
}

.mat-hero-h1 {
  font-family: 'Playfair Display', serif;
  font-size: 64px;
  line-height: 1;
  color: var(--white);
  margin-bottom: 16px;
  font-weight: 400;
  letter-spacing: -.5px;
}

.mat-hero-sub {
  font-size: 15px;
  color: rgba(255,255,255,.65);
  line-height: 1.7;
  max-width: 440px;
  margin-bottom: 28px;
}

/* ══ INTRO ══ */
.mat-intro { background: var(--white); }

.mat-intro-grid {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 72px;
  align-items: start;
}

.mat-desc {
  font-size: 15px;
  color: #444;
  line-height: 1.75;
  margin-bottom: 16px;
  max-width: 520px;
}

/* Atributos */
.mat-attrs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 36px;
}

.mat-attr {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.mat-attr-icon {
  width: 36px;
  height: 36px;
  background: rgba(128,0,32,.07);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--red);
}

.mat-attr h4 {
  font-size: 13px;
  font-weight: 500;
  color: var(--black);
  margin-bottom: 3px;
}

.mat-attr p {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.55;
}

/* Ficha técnica */
.mat-ficha {
  background: var(--cream);
  border: 1px solid var(--border);
  padding: 28px 24px;
  position: sticky;
  top: 84px;
}

.mat-ficha-title {
  font-family: 'Playfair Display', serif;
  font-size: 18px;
  color: var(--black);
  font-weight: 500;
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}

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

.mat-table tr {
  border-bottom: 1px solid var(--border);
}

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

.mat-table th {
  text-align: left;
  font-size: 11px;
  font-weight: 500;
  font-family: 'DM Sans', sans-serif;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .5px;
  padding: 10px 8px 10px 0;
  width: 42%;
  vertical-align: top;
}

.mat-table td {
  font-size: 13px;
  color: var(--black);
  padding: 10px 0 10px 8px;
  line-height: 1.5;
  vertical-align: top;
}

/* ══ GALERÍA ══ */
.mat-galeria-section { background: var(--cream); }

.mat-galeria {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 3px;
}

.mat-gal-item {
  position: relative;
  overflow: hidden;
  cursor: pointer;
  background: var(--light);
  aspect-ratio: 4 / 3;
}

.mat-gal-large {
  grid-row: span 2;
  aspect-ratio: auto;
}

.mat-gal-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .45s ease;
  min-height: 200px;
}

.mat-gal-large img { min-height: 440px; }

.mat-gal-item:hover img { transform: scale(1.04); }

.mat-gal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.35);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity .22s;
}

.mat-gal-item:hover .mat-gal-overlay { opacity: 1; }

.mat-gal-overlay span {
  font-size: 11px;
  font-family: 'DM Sans', sans-serif;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--white);
  border: 1px solid rgba(255,255,255,.6);
  padding: 8px 18px;
}

/* ══ OTROS ESTILOS ══ */
.otros-section { background: var(--white); }

.otros-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2px;
  background: var(--border);
}

.otro-card {
  background: var(--white);
  display: block;
  color: inherit;
  transition: background .2s;
}

.otro-card:hover { background: #fff8f8; }

.otro-img {
  position: relative;
  height: 200px;
  overflow: hidden;
}

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

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

.otro-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.1);
  transition: background .2s;
}

.otro-card:hover .otro-overlay { background: rgba(0,0,0,.2); }

.otro-body {
  padding: 20px 20px 24px;
}

.otro-body h3 {
  font-family: 'Playfair Display', serif;
  font-size: 18px;
  color: var(--black);
  margin-bottom: 6px;
}

.otro-body p {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.6;
  margin-bottom: 12px;
}

/* Lightbox — hereda de proyectos.css via style global */
/* Si no está disponible, re-declara aquí */
.lb-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.94);
  z-index: 500;
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s;
}

.lb-overlay.open { opacity: 1; pointer-events: auto; }

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 501;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s;
}

.lightbox.open { opacity: 1; pointer-events: auto; }

.lb-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: calc(100vw - 160px);
  max-height: calc(100vh - 80px);
}

.lb-img {
  max-width: 100%;
  max-height: calc(100vh - 140px);
  object-fit: contain;
  display: block;
  transition: opacity .2s;
}

.lb-img.loading { opacity: 0; }

.lb-info {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 14px;
  width: 100%;
}

.lb-counter {
  font-size: 11px;
  font-family: 'DM Sans', sans-serif;
  color: rgba(255,255,255,.4);
  letter-spacing: 1px;
  white-space: nowrap;
}

.lb-title {
  font-family: 'Playfair Display', serif;
  font-size: 17px;
  color: var(--white);
  font-weight: 400;
  flex: 1;
}

.lb-subtitle {
  font-size: 12px;
  font-family: 'DM Sans', sans-serif;
  color: rgba(255,255,255,.4);
}

.lb-nav {
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.12);
  color: var(--white);
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: background .2s;
  align-self: center;
}

.lb-nav:hover { background: rgba(255,255,255,.15); }

.lb-close {
  position: fixed;
  top: 20px;
  right: 20px;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.12);
  color: var(--white);
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 502;
  transition: background .2s;
}

.lb-close:hover { background: var(--red); border-color: var(--red); }

/* ══════════════════════════════════════════════
   RESPONSIVE — TABLET ≤900px
══════════════════════════════════════════════ */
@media (max-width: 900px) {
  .mat-hero { height: 480px; }
  .mat-hero-h1 { font-size: 48px; }
  .mat-hero-content { padding: 0 24px 48px; }

  .mat-intro-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .mat-ficha { position: static; }

  .mat-attrs { grid-template-columns: 1fr 1fr; }

  .mat-galeria {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto;
  }

  .mat-gal-large { grid-row: span 1; }
  .mat-gal-item { aspect-ratio: 4/3; }
  .mat-gal-item img,
  .mat-gal-large img { min-height: 200px; }

  .otros-grid { grid-template-columns: 1fr; gap: 2px; }

  .lb-content { max-width: calc(100vw - 120px); }
}

/* ══════════════════════════════════════════════
   RESPONSIVE — MOBILE ≤600px
══════════════════════════════════════════════ */
@media (max-width: 600px) {
  .mat-hero { height: 380px; }
  .mat-hero-h1 { font-size: 36px; }
  .mat-hero-content { padding: 0 20px 36px; }

  .mat-attrs { grid-template-columns: 1fr; }

  .mat-galeria { grid-template-columns: 1fr; }
  .mat-gal-overlay { opacity: 1; }

  .lightbox { padding: 12px; gap: 8px; }
  .lb-content { max-width: 100%; }
  .lb-nav { width: 36px; height: 36px; }

  .nav { z-index: 401; }
}
