/* ═══════════════════════════════════════════════
   MAGA KITCHEN — cubiertas.css
═══════════════════════════════════════════════ */

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

/* ══ HERO (hereda .page-hero de closets.css) ══ */
.page-hero {
  position: relative;
  height: 560px;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
}
.page-hero-img { position: absolute; inset: 0; }
.page-hero-img img {
  width: 100%; height: 100%;
  object-fit: cover; object-position: center;
  display: block;
}
.page-hero-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to right, rgba(0,0,0,.72) 0%, rgba(0,0,0,.3) 60%, transparent 100%);
}
.page-hero-content {
  position: relative; z-index: 2;
  padding: 0 40px 56px;
  max-width: 580px;
}
.page-hero-h1 {
  font-family: 'Playfair Display', serif;
  font-size: 52px; line-height: 1.08;
  color: var(--white); margin-bottom: 16px;
}
.page-hero-h1 em { color: var(--red); font-style: italic; }
.page-hero-sub {
  font-size: 15px; color: rgba(255,255,255,.68);
  line-height: 1.7; max-width: 440px; margin-bottom: 28px;
}

/* ══ INTRO (reutiliza closets) ══ */
.intro-section { background: var(--white); }
.intro-grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 72px; align-items: center;
}
.intro-img-wrap { overflow: hidden; }
.intro-img-wrap img {
  width: 100%; height: 500px;
  object-fit: cover; object-position: center; display: block;
}
.intro-features { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 32px; }
.intro-feat { display: flex; gap: 12px; align-items: flex-start; }
.intro-feat-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);
}
.intro-feat h4 { font-size: 13px; font-weight: 500; color: var(--black); margin-bottom: 2px; }
.intro-feat p  { font-size: 12px; color: var(--muted); line-height: 1.55; }

/* ══ MATERIALES / TIPOS ══ */
.tipos-section { background: var(--cream); }

/* Grid de 4 columnas para materiales */
.tipos-grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.tipo-card {
  background: var(--white);
  border: 1px solid var(--border);
  padding: 36px 28px 32px;
  position: relative;
  transition: box-shadow .2s, transform .2s;
}
.tipo-card:hover { box-shadow: 0 8px 32px rgba(0,0,0,.07); transform: translateY(-2px); }
.tipo-card-featured { border-color: var(--red); border-width: 1.5px; }
.tipo-badge {
  position: absolute; top: -1px; right: 16px;
  background: var(--red); color: var(--white);
  font-size: 10px; font-weight: 500; text-transform: uppercase;
  letter-spacing: .8px; padding: 4px 12px;
  font-family: 'DM Sans', sans-serif;
  white-space: nowrap;
}
.tipo-icon {
  width: 56px; height: 56px;
  background: rgba(128,0,32,.07);
  display: flex; align-items: center; justify-content: center;
  color: var(--red); margin-bottom: 20px;
}
.tipo-card h3 { font-family: 'Playfair Display', serif; font-size: 20px; color: var(--black); margin-bottom: 10px; }
.tipo-card > p { font-size: 13px; color: var(--muted); line-height: 1.65; margin-bottom: 18px; }
.tipo-list { list-style: none; display: flex; flex-direction: column; gap: 7px; }
.tipo-list li {
  font-size: 13px; color: #444;
  display: flex; align-items: center; gap: 8px;
}
.tipo-list li::before {
  content: ''; width: 5px; height: 5px;
  border-radius: 50%; background: var(--red); flex-shrink: 0;
}

/* ══ COMPARATIVA ══ */
.cub-comparativa { background: var(--white); }

.cub-comp-grid {
  border: 1px solid var(--border);
  overflow: hidden;
}

.cub-comp-col {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  border-bottom: 1px solid var(--border);
}
.cub-comp-col:last-child { border-bottom: none; }

.cub-comp-col > div {
  padding: 14px 20px;
  font-size: 13px;
  font-family: 'DM Sans', sans-serif;
  color: #444;
  border-right: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 6px;
}
.cub-comp-col > div:last-child { border-right: none; }

/* Fila de cabecera */
.cub-comp-header { background: var(--cream); }
.cub-comp-header > div:first-child { background: transparent; }
.cub-comp-mat {
  font-weight: 500 !important;
  color: var(--black) !important;
  font-size: 14px !important;
  justify-content: center;
}

.cub-comp-label {
  font-weight: 500 !important;
  color: var(--black) !important;
  font-size: 12px !important;
  text-transform: uppercase;
  letter-spacing: .5px;
  background: var(--cream) !important;
}

.cub-comp-val { justify-content: flex-start !important; }

.cub-comp-win {
  color: var(--red) !important;
  font-weight: 500 !important;
}
.cub-comp-win svg { color: var(--red); flex-shrink: 0; }

/* ══ ESPECIFICACIONES ══ */
.cub-specs-section { background: var(--cream); }

.cub-specs-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 72px;
  align-items: center;
}

.cub-specs-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-top: 32px;
  border-top: 1px solid var(--border);
}

.cub-spec-item {
  padding: 18px 0;
  border-bottom: 1px solid var(--border);
}

.cub-spec-item h4 {
  font-size: 13px;
  font-weight: 500;
  color: var(--black);
  margin-bottom: 4px;
}

.cub-spec-item p {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.6;
}

.cub-specs-img {
  position: relative;
  overflow: hidden;
}

.cub-specs-img img {
  width: 100%;
  height: 500px;
  object-fit: cover;
  display: block;
}

.cub-specs-badge {
  position: absolute;
  bottom: 20px;
  left: 20px;
  background: rgba(0,0,0,.72);
  border: 1px solid rgba(255,255,255,.1);
  padding: 14px 18px;
}

.cub-specs-badge strong {
  display: block;
  font-family: 'Playfair Display', serif;
  font-size: 15px;
  color: var(--white);
  font-weight: 400;
  margin-bottom: 3px;
}

.cub-specs-badge span {
  font-size: 11px;
  font-family: 'DM Sans', sans-serif;
  color: rgba(255,255,255,.5);
}

/* ══ GALERÍA (hereda closets) ══ */
.galeria-section { background: var(--white); }
.galeria-header {
  display: flex; align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 28px; flex-wrap: wrap; gap: 16px;
}
.galeria-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 2px;
  height: 560px;
}
.galeria-item {
  position: relative; overflow: hidden;
  cursor: pointer; background: var(--light);
}
.galeria-large { grid-row: span 2; }
.galeria-item img {
  width: 100%; height: 100%;
  object-fit: cover; object-position: center;
  display: block; transition: transform .45s ease;
}
.galeria-item:hover img { transform: scale(1.04); }
.galeria-overlay {
  position: absolute; bottom: 0; left: 0; right: 0;
  background: linear-gradient(transparent, rgba(0,0,0,.72));
  padding: 24px 18px 16px; opacity: 0; transition: opacity .22s;
}
.galeria-item:hover .galeria-overlay { opacity: 1; }
.galeria-overlay h4 {
  font-family: 'Playfair Display', serif;
  font-size: 15px; color: var(--white);
  font-weight: 400; margin-bottom: 3px;
}
.galeria-overlay p { font-size: 11px; color: rgba(255,255,255,.6); }

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

  .intro-grid { grid-template-columns: 1fr; gap: 40px; }
  .intro-img-wrap img { height: 320px; }
  .intro-features { grid-template-columns: 1fr 1fr; }

  .tipos-grid-4 { grid-template-columns: 1fr 1fr; }

  .cub-comp-col { grid-template-columns: 1.5fr 1fr 1fr; }
  .cub-comp-col > div { padding: 12px 14px; font-size: 12px; }

  .cub-specs-grid { grid-template-columns: 1fr; gap: 40px; }
  .cub-specs-img img { height: 320px; }

  .galeria-grid {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
    height: auto;
  }
  .galeria-large { grid-row: span 1; }
  .galeria-item { height: 280px; }
}

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

  .intro-features { grid-template-columns: 1fr; }
  .intro-img-wrap img { height: 260px; }

  .tipos-grid-4 { grid-template-columns: 1fr; }

  .cub-comp-grid { overflow-x: auto; }
  .cub-comp-col { min-width: 480px; }

  .cub-specs-img img { height: 240px; }
  .galeria-item { height: 240px; }
  .galeria-overlay { opacity: 1; }

  .nav { z-index: 401; }
}
