/* ===== Estilos generales ===== */
body {
  font-family: "Poppins", sans-serif;
  margin: 0;
  padding: 0;
  background-color: #fff;
  color: #333;
}

/* ===== Encabezado ===== */
.encabezado {
  background-color: #1362AD; /* Azul CIAME */
  color: white;
  text-align: center;
  padding: 1.2rem 0;
}

/* ===== Contenedor principal ===== */
.contenedor-detalle {
  padding: 2rem 0; /* espacio superior e inferior */
}

.contenedor-principal {
  width: min(1100px, 95%);
  margin: 0 auto;
  display: flex;
  flex-direction: row;
  align-items: center; /* alinea al centro la descripción e imagen */
  justify-content: center;
  gap: 40px; /* separación entre columnas */
  flex-wrap: nowrap;
}

/* ===== Galería ===== */
.galeria {
  flex: 0 0 520px; /* ancho base fijo */
  max-width: 52%;
  text-align: left;
}

.imagen-principal-container {
  width: 100%;
  max-width: 450px;
  margin: 0 auto;
  border-radius: 10px;
  overflow: hidden;
  position: relative;
}

.imagen-principal {
  width: 100%;
  height: auto;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  display: block;
  cursor: crosshair;
  transition: transform 0.3s ease;
  transform-origin: center center;
}

.miniaturas {
  margin-top: 1rem;
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}

.thumb {
  width: 70px;
  height: 70px;
  object-fit: cover;
  border-radius: 8px;
  cursor: pointer;
  opacity: 0.6;
  transition: 0.3s;
}

.thumb.active,
.thumb:hover {
  opacity: 1;
  transform: scale(1.05);
}

/* ===== Descripción ===== */
.descripcion {
  flex: 1 1 420px;
  max-width: 48%;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

.descripcion h2 {
  color: #E35E9F; /* Rosado CIAME */
  margin-top: 0;
  margin-bottom: 12px;
}

.descripcion ul {
  list-style-type: disc;
  padding-left: 1.5rem;
  line-height: 1.8;
}

.nota-precio{
  font-size:0.9rem;
  color:#666;
  margin-top:10px;
  text-align: center;
}

/* ===== Botones ===== */
.botones {
  margin-top: 2rem;
  display: flex;
  justify-content: space-between; /* mantiene botones separados */
  gap: 1rem;
  flex-wrap: wrap;
}

.botones{
  position: relative;
  padding: 18px 16px;
  margin-top: 18px;
  border-radius: 14px;

  /* enfoque visual premium */
  background: rgba(11, 98, 172, 0.03);
  border: 1px solid rgba(11, 98, 172, 0.08);
}

.btn {
  padding: 0.8rem 1.4rem;
  border-radius: 8px;
  text-decoration: none;
  font-weight: bold;
  text-align: center;
  transition: 0.3s ease;
  flex: 1; /* permite que ambos botones se adapten en móvil */
  min-width: 120px;
}

.btn.volver {
  background-color: #D65197; /* Rosado CIAME */
  color: white;
}

.btn.volver:hover {
  background-color: #c44d86;
  transform: translateY(-2px);
}

.btn.whatsapp {
  background-color: #D65197; /* Rosado CIAME */
  /*background-color: #25D366;*/
  color: white;
}

.btn.whatsapp:hover {
  /*background-color: #1eb35a;*/
  background-color: #c44d86;
  transform: translateY(-2px);
}

.ciame-microtrust{
  margin-top: 18px;
  margin-bottom: 6px;
  font-size: 0.90rem;
  color: #3f4a56;
  text-align: center;
}

.ciame-urgencia{
  margin: 4px 0;
  font-size: 0.9rem;
  color: #6b7785;   /* ligeramente más suave */
  text-align: center;
}

.ciame-conv-text{
  margin: 4px 0;
  font-size: 0.9rem;
  color: #6b7785;   /* ligeramente más suave */
  text-align: center;
}


/* ===== Responsive ===== */
@media (max-width: 900px) {
  .contenedor-principal {
    flex-direction: column;
    align-items: center;
    gap: 2rem;
  }

  .galeria,
  .descripcion {
    max-width: 100%;
    flex: 1 1 100%;
  }

  /* Los botones se mantienen lado a lado */
  .botones {
    justify-content: center;
    gap: 1rem;
  }

  .btn {
    flex: none;
    width: auto; /* mantiene tamaño ajustado al contenido */
  }
}


/* =========================================================
   RELACIONADOS (SOLO PÁGINA DE DETALLE)
   Encapsulado: no rompe el layout del detalle
   ========================================================= */

.relacionados{
  margin: 72px auto 0;
  max-width: 980px;
}

.relacionados-title{
  text-align: center;
  color: #0B62AC;
  font-size: 1.25rem;
  margin: 0 0 18px;
}

/* Base: 3 cards (desktop + tablet) */
.relacionados-grid{
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  justify-content: center;
}

/* Card */
.rel-card{
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 6px 16px rgba(0,0,0,0.08);
  overflow: hidden;
  transition: transform .25s ease, box-shadow .25s ease;

  /* No más pequeños que “originales” */
  max-width: 320px;
  width: 75%;
  margin: 0 auto;
}

.rel-card:hover{
  transform: translateY(-6px);
  box-shadow: 0 12px 24px rgba(0,0,0,0.14);
}

/* Link full-card */
.rel-card-link{
  display: flex;
  flex-direction: column;
  color: inherit;
  text-decoration: none;
}

/* Imagen */
.rel-card-media{
  height: 210px;
  overflow: hidden;
}

.rel-card-media img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Zoom solo desktop */
@media (hover: hover) and (pointer: fine){
  .rel-card-media img{
    transition: transform 0.3s ease;
    will-change: transform;
  }
  .rel-card:hover .rel-card-media img{
    transform: scale(1.06);
  }
}

/* Contenido */
.rel-card-body{
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 10px 14px 16px;
}

.rel-card-title{
  color: #0B62AC;
  font-size: 1.02rem;
  margin: 0 0 8px;
  font-weight: 700;
}

.rel-card-price{
  color: #0B62AC;
  font-size: 0.95rem;
  font-weight: 400;
  margin: 0 0 12px;
}

/* CTA tipo botón (span para no competir con el CTA principal) */
.rel-card-cta{
  display: inline-flex;
  justify-content: center;
  align-items: center;
  background: #D65197;
  color: #ffffff;
  font-weight: 600;
  padding: 8px 14px;
  border-radius: 12px;
  transition: transform .2s ease, box-shadow .2s ease;
  white-space: nowrap;
}

.rel-card:hover .rel-card-cta{
  transform: translateY(-2px);
  box-shadow: 0 8px 16px rgba(0,0,0,0.12);
}


/* =========================================================
   RESPONSIVE
   ========================================================= */

/* Tablet (horizontal y vertical): mantener 3 cards y buen tamaño */
@media (max-width: 1100px){
  .relacionados{
    margin-top: 72px;
    max-width: 980px;
    padding-inline: 28px;
  }
  .relacionados-grid{
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .rel-card{
    max-width: 320px; /* mantiene tamaño premium */
  }
  .rel-card-media{
    height: 210px;
  }
}

/* Tablet vertical más estrecha: sigue en 3, ajusta un toque imagen */
@media (max-width: 820px){
  .rel-card-media{
    height: 175px;
  }
}

/* Móvil: 2 cards */
@media (max-width: 600px){
  .relacionados{
    margin-top: 52px;
    max-width: 520px;
    padding-inline: 8px;
  }
  .relacionados-grid{
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }
  .rel-card{
    max-width: 210px; /* no los achica */
  }
  .rel-card-media{
    height: 200px;
  }
  .relacionados-title{
    font-size: 1.15rem;
  }
  .relacionados-grid .rel-card:nth-child(3){
    display: none;
  }
}
