/* =========================================================
   Ficha de producto (pages/products/*.html)
   ========================================================= */

.migas { padding-top: 18px; font-size: 0.88rem; color: var(--texto-3); }
.migas ol { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; }
.migas li + li::before { content: "/"; margin-right: 6px; color: rgba(255,255,255,0.35); }
.migas a { color: var(--texto-2); text-decoration: underline; text-underline-offset: 3px; }
.migas a:hover { color: #fff; }

.product-hero { padding: 40px 0 70px; border-bottom: 1px solid var(--borde); background: radial-gradient(ellipse at 25% 40%, #1b1b1b 0%, #000 65%); }
.product-hero-container { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center; }

.product-hero-image { display: flex; justify-content: center; }
.product-hero-image button { background: none; border: none; padding: 0; cursor: zoom-in; border-radius: var(--radio); }
.product-hero-image img { width: 100%; max-width: 440px; height: auto; border-radius: var(--radio); }

.product-code { display: inline-block; font-size: 0.85rem; color: var(--texto-3); letter-spacing: 0.06em; margin-bottom: 8px; }
.product-hero-info h1 { font-size: 2.6rem; line-height: 1.15; margin-bottom: 14px; }
.product-subtitle { font-size: 1.15rem; color: var(--texto-2); margin-bottom: 22px; }

.product-tags { display: flex; flex-wrap: wrap; gap: 10px; list-style: none; margin-bottom: 28px; }
.product-tags li {
  padding: 6px 14px; border-radius: 999px;
  background: var(--gris-1); border: 1px solid var(--borde);
  font-size: 0.85rem; font-weight: 600;
}

.product-actions { display: flex; flex-wrap: wrap; gap: 14px; }

/* Secciones */
.product-section-block { padding: 70px 0; }
.product-section-block:nth-of-type(even) { background: var(--gris-0); }
.product-section-block h2 { font-size: 1.9rem; margin-bottom: 26px; }

.product-description p { max-width: 820px; font-size: 1.05rem; color: var(--texto-2); margin-bottom: 14px; }

.product-two-cols { display: grid; grid-template-columns: 1.1fr 1fr; gap: 50px; align-items: start; }

.features-list { list-style: none; }
.features-list li { position: relative; padding-left: 30px; margin-bottom: 12px; color: var(--texto-2); }
.features-list li::before { content: "✓"; position: absolute; left: 0; top: 0; color: var(--rojo-texto); font-weight: 700; }

.spec-table { width: 100%; border-collapse: collapse; font-size: 0.97rem; background: var(--gris-1); border-radius: var(--radio); overflow: hidden; }
.spec-table th, .spec-table td { text-align: left; padding: 12px 16px; border-bottom: 1px solid var(--borde); vertical-align: top; }
.spec-table th { width: 48%; font-weight: 600; color: var(--texto-2); }
.spec-table tr:last-child th, .spec-table tr:last-child td { border-bottom: none; }
.spec-nota { margin-top: 12px; font-size: 0.88rem; color: var(--texto-3); }
.spec-incluye { margin-top: 18px; color: var(--texto-2); }

/* Galería: cada miniatura es un botón (ACC-02) */
.gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 18px; list-style: none; }
.gallery-grid button {
  position: relative; display: block; width: 100%; aspect-ratio: 4 / 3;
  padding: 0; border: 1px solid var(--borde); border-radius: var(--radio); overflow: hidden;
  background: var(--gris-1); cursor: zoom-in;
}
.gallery-grid img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s ease; }
.gallery-grid button:hover img { transform: scale(1.04); }
.gallery-grid button::after {
  content: ""; position: absolute; right: 10px; bottom: 10px; width: 30px; height: 30px; border-radius: 50%;
  background: rgba(0,0,0,0.6) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='2.2' stroke-linecap='round'%3E%3Ccircle cx='10.5' cy='10.5' r='6.5'/%3E%3Cpath d='m20 20-4.8-4.8M10.5 7.5v6M7.5 10.5h6'/%3E%3C/svg%3E") center / 16px no-repeat;
}

/* Descargas */
.downloads-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px; }
.download-card {
  display: flex; align-items: center; gap: 14px; padding: 20px 22px;
  background: var(--gris-1); border: 1px solid var(--borde); border-radius: var(--radio);
  font-weight: 600; transition: border-color 0.2s ease, transform 0.2s ease;
}
.download-card:hover { border-color: var(--rojo-texto); transform: translateY(-3px); }
.download-card svg { width: 28px; height: 28px; flex: none; color: var(--rojo-texto); }
.download-card small { display: block; font-weight: 400; color: var(--texto-3); }

.video-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; }

/* Llamado a la acción */
.product-cta { padding: 80px 0; text-align: center; background: linear-gradient(135deg, #140404, #000 70%); border-top: 1px solid var(--borde); }
.product-cta h2 { font-size: 2rem; margin-bottom: 14px; }
.product-cta p { max-width: 680px; margin: 0 auto 30px; color: var(--texto-2); font-size: 1.08rem; }
.product-cta .product-actions { justify-content: center; }

/* ---------- Visor de fotos (dialog nativo) ---------- */
.visor {
  width: 100vw; height: 100vh; max-width: none; max-height: none; margin: 0;
  padding: 0; border: none; background: rgba(0,0,0,0.96); color: #fff;
}
.visor::backdrop { background: rgba(0,0,0,0.9); }
.visor[open] { display: flex; align-items: center; justify-content: center; }
.visor figure { display: flex; flex-direction: column; align-items: center; gap: 12px; max-width: 92vw; max-height: 90vh; }
.visor img { max-width: 92vw; max-height: calc(90vh - 40px); width: auto; height: auto; object-fit: contain; }
.visor figcaption { font-size: 0.9rem; color: var(--texto-2); }
.visor button {
  position: absolute; display: flex; align-items: center; justify-content: center;
  width: 52px; height: 52px; border-radius: 50%; border: 1px solid rgba(255,255,255,0.35);
  background: rgba(0,0,0,0.55); color: #fff; font-size: 26px; line-height: 1; cursor: pointer;
}
.visor button:hover { background: rgba(255,255,255,0.12); }
.visor-cerrar { top: 18px; right: 18px; }
.visor-ant { left: 18px; top: 50%; transform: translateY(-50%); }
.visor-sig { right: 18px; top: 50%; transform: translateY(-50%); }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .product-hero-container, .product-two-cols { grid-template-columns: 1fr; gap: 36px; }
  .product-hero-info { text-align: center; }
  .product-tags, .product-actions { justify-content: center; }
  .product-hero-image img { max-width: 340px; }
}

@media (max-width: 600px) {
  .product-hero { padding: 24px 0 50px; }
  .product-hero-info h1 { font-size: 2rem; }
  .product-section-block { padding: 50px 0; }
  .product-section-block h2, .product-cta h2 { font-size: 1.55rem; }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .spec-table th, .spec-table td { padding: 10px 12px; font-size: 0.92rem; }
  .visor-ant, .visor-sig { top: auto; bottom: 18px; transform: none; }
}
