/* ===== INFO BUTTON ===== */
.btn-info {
  position: absolute;
  top: 8px;
  right: 8px;
  background: #4caf50;
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1rem;
  z-index: 10;
  box-shadow: 0 2px 8px rgba(76,175,80,0.5);
  animation: pulse-info 2s infinite;
  touch-action: manipulation;
}
.btn-info:hover, .btn-info:active {
  animation: none;
  transform: scale(1.12);
  background: #43a047;
}
@keyframes pulse-info {
  0%   { box-shadow: 0 0 0 0 rgba(76,175,80,0.6); }
  70%  { box-shadow: 0 0 0 10px rgba(76,175,80,0); }
  100% { box-shadow: 0 0 0 0 rgba(76,175,80,0); }
}
.producto-card { position: relative; }
.descripcion { display: none !important; }

/* ===== OVERLAY ===== */
.descripcion-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 50000;
  background: rgba(0,0,0,0.4);
}
.descripcion-modal.show {
  display: block !important;
}

/* ===== CONTENIDO: 3 filas — título | scroll | botón ===== */
.descripcion-modal-content {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 50001;
  background: #111;
  display: grid;
  grid-template-rows: auto 1fr auto;
  animation: sheetUp 0.3s ease;
}
@keyframes sheetUp {
  from { transform: translateY(100%); }
  to   { transform: translateY(0); }
}

/* FILA 1: Título */
.dm-title-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  background: #1a2a1a;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.dm-titulo {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 800;
  color: #fff;
  line-height: 1.3;
  flex: 1;
}
.descripcion-modal-close {
  width: 36px;
  height: 36px;
  min-width: 36px;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 50%;
  color: #fff;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  touch-action: manipulation;
}

/* FILA 2: Área scrolleable */
.dm-scroll-area {
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  min-height: 0;
}
.dm-header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 20px;
  background: linear-gradient(160deg, #1a2a1a, #141414);
}
.dm-img-wrap {
  width: 60px;
  height: 60px;
  flex-shrink: 0;
  border-radius: 12px;
  overflow: hidden;
  background: rgba(255,255,255,0.06);
  display: flex;
  align-items: center;
  justify-content: center;
}
.dm-img { width: 100%; height: 100%; object-fit: cover; }
.dm-img-placeholder { font-size: 1.8rem; color: rgba(255,255,255,0.3); }
.dm-header-info { flex: 1; min-width: 0; }
.dm-precio {
  display: block;
  font-size: 1.4rem;
  font-weight: 800;
  color: #4caf50;
  margin-bottom: 4px;
}
.dm-garantia {
  font-size: 0.74rem;
  color: rgba(255,255,255,0.45);
  display: flex;
  align-items: center;
  gap: 5px;
}
.dm-divider {
  height: 1px;
  background: rgba(255,255,255,0.07);
  margin: 0 20px;
}
.descripcion-modal-body {
  padding: 14px 20px 20px;
  font-size: 0.9rem;
  color: #ccc;
  line-height: 1.65;
}
.dm-seccion {
  font-size: 0.7rem;
  font-weight: 700;
  color: #4caf50;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin: 14px 0 6px;
}
.dm-parrafo { margin: 0 0 8px; color: #bbb; font-size: 0.87rem; line-height: 1.6; }
.dm-lista {
  list-style: none;
  padding: 0;
  margin: 6px 0 12px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px 10px;
}
.dm-lista li {
  display: flex;
  align-items: baseline;
  gap: 6px;
  font-size: 0.82rem;
  color: #ddd;
  padding: 3px 0;
}
.dm-lista li::before {
  content: "✓";
  color: #4caf50;
  font-weight: 700;
  flex-shrink: 0;
}

/* FILA 3: Botón siempre visible */
.dm-footer {
  padding: 12px 20px;
  padding-bottom: max(12px, env(safe-area-inset-bottom, 12px));
  background: #111;
  border-top: 1px solid rgba(255,255,255,0.08);
}
.dm-btn-comprar {
  display: block;
  width: 100%;
  padding: 16px;
  background: linear-gradient(135deg, #4caf50, #2e7d32);
  color: #fff;
  font-size: 1rem;
  font-weight: 700;
  border: none;
  border-radius: 14px;
  cursor: pointer;
  text-align: center;
  box-shadow: 0 4px 16px rgba(76,175,80,0.4);
  touch-action: manipulation;
}
.dm-btn-comprar:active { opacity: 0.85; transform: scale(0.98); }

/* ===== DESKTOP ≥768px ===== */
@media (min-width: 768px) {
  .descripcion-modal {
    background: rgba(0,0,0,0.7);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    display: none;
  }
  .descripcion-modal.show {
    display: flex !important;
    align-items: center;
    justify-content: center;
  }
  .descripcion-modal-content {
    position: static;
    width: 90%;
    max-width: 460px;
    height: auto;
    max-height: 88vh;
    border-radius: 20px;
    overflow: hidden;
    animation: modalIn 0.3s ease;
  }
  .dm-scroll-area { max-height: calc(88vh - 140px); }
  @keyframes modalIn {
    from { opacity: 0; transform: scale(0.9); }
    to   { opacity: 1; transform: scale(1); }
  }
}
