/* ===============================
   RESET
   =============================== */
html, body {
  margin: 0 !important;
  padding: 0 !important;
  width: 100%;
  height: 100%;
  overflow-x: hidden !important; /* FIX scroll horizontal */
}

body {
  background: #000;
}

/* ===============================
   HERO
   =============================== */
.detail-hero {
  position: relative;
  width: 100%;              /* FIX: NO 100vw */
  min-height: 100vh;
  padding: 90px 16px 70px;

  background-size: cover;
  background-position: center;
  background-attachment: fixed;

  display: flex;
  justify-content: center;
}

.detail-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.45);
  z-index: 1;
}

/* ===============================
   CONTENEDOR
   =============================== */
.detail-wrap {
  position: relative;
  z-index: 2;
  width: min(1100px, 96vw);
  max-width: 100%;          /* FIX */
  color: #fff;
}

/* ===============================
   CABECERA
   =============================== */
.detail-head {
  display: grid;
  grid-template-columns: 1fr 220px;
  gap: 24px;
  align-items: center;
  margin-bottom: 22px;
  max-width: 100%;          /* FIX */
}

.detail-brand h1 {
  font-size: 46px;
  margin: 0 0 8px;
  font-weight: 800;
}

.detail-subtitle {
  margin: 0 0 14px;
  opacity: .85;
  max-width: 70ch;
}

/* ===============================
   TECH STACK (CHIPS SIN SPAN)
   =============================== */
.tech-stack {
  margin: 16px 0 18px;
}

.tech-list {
  list-style: none;
  padding: 0;
  margin: 0;

  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  max-width: 100%;          /* FIX */
}

.tech-list li {
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 500;

  color: #fff;
  white-space: nowrap;

  border-radius: 999px;
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.25);

  backdrop-filter: blur(6px);
}

/* ===============================
   LOGO
   =============================== */
.detail-logo {
  display: flex;
  justify-content: flex-end;
  max-width: 100%;          /* FIX */
}

.detail-logo img {
  width: 180px;
  height: 180px;
  max-width: 100%;          /* FIX */
  object-fit: contain;

  padding: 16px;
  border-radius: 16px;

  background: rgba(255,255,255,.75);
}

/* ===============================
   BOTONES
   =============================== */
.detail-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  max-width: 100%;          /* FIX */
}

.btn-ghost,
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  padding: 10px 16px;
  border-radius: 12px;

  font-size: 13px;
  font-weight: 700;
  text-decoration: none;

  transition: transform .18s ease, opacity .18s ease;
}

.btn-ghost {
  background: rgba(255,255,255,.10);
  color: #fff;
  border: 1px solid rgba(255,255,255,.18);
}

.btn-primary {
  background: rgba(0,0,0,.85);
  color: #fff;
  border: 1px solid rgba(255,255,255,.12);
}

.btn-ghost:hover,
.btn-primary:hover {
  transform: translateY(-1px);
  opacity: .95;
}

/* ===============================
   GRID
   =============================== */
.detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  max-width: 100%;          /* FIX */
}

/* ===============================
   PANELES
   =============================== */
.panel {
  background: rgba(0,0,0,.55);
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 16px;

  padding: 18px;
  box-shadow: 0 20px 70px rgba(0,0,0,.55);

  max-width: 100%;          /* FIX */
  overflow: hidden;         /* FIX: por si algo se desborda dentro */
}

.panel h2 {
  margin: 0 0 10px;
  font-size: 18px;
  font-weight: 800;
}

.panel ul {
  margin: 0;
  padding-left: 18px;
  line-height: 1.6;
  opacity: .9;
}

/* Key-Value */
.kv {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 10px 14px;
  max-width: 100%;          /* FIX */
}

.kv dt {
  font-weight: 800;
}

.kv dd {
  margin: 0;
  opacity: .85;
}

/* ===============================
   CAPTURAS
   =============================== */
.panel-wide {
  margin-top: 18px;
  max-width: 100%;          /* FIX */
}

.shots {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  max-width: 100%;          /* FIX */
}

.shots a {
  display: block;
  max-width: 100%;
}

.shots img {
  width: 100%;
  height: 160px;
  object-fit: cover;

  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.10);

  transition: transform .18s ease, opacity .18s ease;
  display: block;           /* FIX */
}

.shots a:hover img {
  transform: translateY(-2px);
  opacity: .95;
}

.note {
  margin: 10px 0 0;
  font-size: 13px;
  opacity: .65;
}

/* ===============================
   RESPONSIVE
   =============================== */
@media (max-width: 991px) {
  .detail-head {
    grid-template-columns: 1fr;
  }

  .detail-logo {
    justify-content: flex-start;
  }

  .detail-brand h1 {
    font-size: 38px;
  }

  .detail-grid {
    grid-template-columns: 1fr;
  }

  .shots {
    grid-template-columns: 1fr;
  }

  .shots img {
    height: 180px;
  }
}

/* FIX EXTRA MÓVIL: evita “margen” y empujes */
@media (max-width: 768px) {
  .detail-hero {
    padding-left: 12px;
    padding-right: 12px;
  }

  .detail-wrap {
    width: 100%;
  }

  /* Por si alguna imagen o bloque fuerza ancho */
  img, video, iframe {
    max-width: 100%;
    height: auto;
  }
}
