/* Portada del catálogo: logo y banner GRANDES en todas las apariencias.
   Va después de constructor/refine/media; los selectores llevan "html body" para ganarle a las reglas
   de tamaño de cada plantilla y a las de móvil (que dejaban el logo en 56 px). */

/* ---------- Con banner ---------- */
html body .hero { min-height: clamp(330px, 60vw, 520px); }
html body .hero img.bg { object-fit: cover; object-position: center; }
html body .hero .hero-overlay { padding: 44px 20px clamp(34px, 5vw, 64px); }
html body .hero .hero-logo,
html body .hero.has-banner .hero-logo {
  height: clamp(108px, 28vw, 168px);
  width: auto;
  min-width: clamp(108px, 28vw, 168px);
  max-width: min(340px, 82vw);
  object-fit: contain;
  padding: 8px;
  box-sizing: border-box;
  border-radius: min(calc(var(--radius, 16px) * 1.2), 32px);
  background: var(--bg-card);
  border: 3px solid rgba(255, 255, 255, .94);
  box-shadow: 0 14px 40px rgba(0, 0, 0, .38);
  margin-bottom: clamp(14px, 2.4vw, 22px);
}
html body .hero .hero-name { font-size: clamp(2rem, 7.4vw, 3.6rem); max-width: 20ch; }
html body .hero .hero-desc { font-size: clamp(.95rem, 2.4vw, 1.1rem); max-width: 54ch; }

/* ---------- Sin banner: portada sencilla con el logo grande ---------- */
.brand-hero {
  display: flex; flex-direction: column; align-items: center; text-align: center;
  padding: clamp(30px, 6vw, 56px) 20px clamp(20px, 4vw, 36px);
  background:
    radial-gradient(120% 90% at 50% 0%, color-mix(in srgb, var(--accent) 14%, transparent), transparent 70%),
    var(--bg);
}
.brand-hero-logo {
  height: clamp(112px, 30vw, 176px);
  width: auto; min-width: clamp(112px, 30vw, 176px); max-width: min(360px, 84vw);
  object-fit: contain; padding: 8px; box-sizing: border-box;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: min(calc(var(--radius, 16px) * 1.2), 32px);
  box-shadow: var(--shadow);
  margin-bottom: clamp(14px, 2.4vw, 22px);
}
.brand-hero .hero-name { font-family: var(--font-heading); font-size: clamp(2rem, 7vw, 3.2rem); font-weight: 700; color: var(--text); line-height: 1.1; max-width: 20ch; text-wrap: balance; }
.brand-hero .hero-desc { margin-top: 8px; font-size: clamp(.95rem, 2.4vw, 1.08rem); color: var(--text-secondary); max-width: 54ch; }

/* ---------- Cabecera fija: el logo compacto también con presencia ---------- */
html body .hdr-logo { height: 44px; width: auto; min-width: 44px; max-width: 150px; object-fit: contain; }

@media (max-width: 480px) {
  html body .hero .hero-logo, html body .hero.has-banner .hero-logo { height: 112px; min-width: 112px; }
}

/* ---------- Banner: siempre a todo el ancho, recortando lo que sobre (nunca bandas ni degradados) ---------- */
html body .hero.has-banner img.bg { z-index: 1; width: 100%; min-width: 100%; height: 100%; object-fit: cover; object-position: center; }
html body .hero.has-banner .hero-overlay { z-index: 2; }
/* Si la foto del banner no existe, la portada pasa a ser sencilla (sin franja gris ni degradado) */
html body .hero.hero-plain { min-height: 0; background: none; }
html body .hero.hero-plain .hero-overlay { position: relative; inset: auto; background: none; padding: clamp(28px, 5vw, 48px) 20px clamp(18px, 3vw, 30px); }
html body .hero.hero-plain .hero-name { color: var(--text); text-shadow: none; }
html body .hero.hero-plain .hero-desc { color: var(--text-secondary); text-shadow: none; }
html body .hero.hero-plain .hero-status { background: var(--bg-card); border-color: var(--border); color: var(--text-secondary); }

/* ---------- PC: el banner se ve casi completo (altura según la proporción de la foto, con tope) ---------- */
@media (min-width: 900px) {
  html body .hero.has-banner { min-height: 0; }
  html body .hero.has-banner img.bg {
    position: relative; display: block; width: 100%; height: auto;
    max-height: min(82vh, 780px); min-height: 360px; object-fit: cover; object-position: center;
  }
  html body .hero.has-banner .hero-overlay { position: absolute; inset: 0; }
}
