/* products.css — Catálogo de productos Prina */

/* ── Tabs ───────────────────────────────────────────────── */
.products-tabs {
  display: flex;
  gap: var(--space-sm);
  margin-bottom: var(--space-xl);
  border-bottom: 2px solid rgba(255,255,255,0.08);
  padding-bottom: 0;
}

.tab-btn {
  background: none;
  border: none;
  color: rgba(255,255,255,0.45);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: var(--fw-medium);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: var(--space-sm) var(--space-md);
  cursor: pointer;
  position: relative;
  transition: color 0.2s;
  margin-bottom: -2px;
}

.tab-btn::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--color-accent);
  transform: scaleX(0);
  transition: transform 0.25s;
}

.tab-btn:hover { color: rgba(255,255,255,0.75); }
.tab-btn.active { color: var(--color-white); }
.tab-btn.active::after { transform: scaleX(1); }

/* ── Tab panels ─────────────────────────────────────────── */
.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* ── Product list ───────────────────────────────────────── */
.product-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.product-row {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-md) var(--space-md);
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: var(--radius-md);
  text-decoration: none;
  color: var(--color-white);
  transition: background 0.2s, border-color 0.2s, transform 0.2s;
  cursor: pointer;
}

.product-row:hover {
  background: rgba(255,255,255,0.07);
  border-color: rgba(255,255,255,0.15);
  transform: translateX(4px);
}

.product-thumb {
  width: 72px;
  height: 72px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  flex-shrink: 0;
  background: var(--color-dark-mid);
  display: flex;
  align-items: center;
  justify-content: center;
}

.product-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.product-row-info {
  flex: 1;
  min-width: 0;
}

.product-row-category {
  font-size: var(--text-xs);
  font-weight: var(--fw-medium);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-accent);
  margin-bottom: 4px;
}

.product-row-name {
  font-size: var(--text-base);
  font-weight: var(--fw-ultra);
  color: var(--color-white);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.product-row-arrow {
  flex-shrink: 0;
  color: rgba(255,255,255,0.3);
  transition: color 0.2s, transform 0.2s;
}

.product-row:hover .product-row-arrow {
  color: var(--color-accent);
  transform: translateX(4px);
}

/* ── Product detail page ────────────────────────────────── */
.product-hero {
  background: var(--color-dark);
  padding: calc(var(--header-h) + var(--space-xl)) 0 var(--space-xl);
}

.product-hero-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-xl);
  align-items: center;
}

.product-hero-img {
  background: var(--color-dark-mid);
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 4/3;
  display: flex;
  align-items: center;
  justify-content: center;
}

.product-hero-img--bare {
  background: transparent;
  border-radius: 0;
  overflow: visible;
  perspective: 1400px;
  position: relative;
}

/* Reflejo/piso sutil debajo del producto */
.product-hero-img--bare::after {
  content: "";
  position: absolute;
  left: 8%;
  right: 8%;
  bottom: 2%;
  height: 18%;
  background: radial-gradient(ellipse at center, rgba(0,0,0,0.55) 0%, rgba(0,0,0,0) 70%);
  filter: blur(6px);
  z-index: 0;
  pointer-events: none;
}

.product-hero-img--bare img,
.product-hero-img--bare .product-hero-video {
  position: relative;
  z-index: 1;
  filter:
    drop-shadow(0 30px 35px rgba(0,0,0,0.55))
    drop-shadow(0 12px 18px rgba(0,0,0,0.35))
    drop-shadow(0 2px 4px rgba(0,0,0,0.25));
  transform: translateZ(0) scale(1);
  transition: transform 0.5s cubic-bezier(0.2, 0.7, 0.2, 1), filter 0.5s ease;
  will-change: transform;
}

.product-hero-img--bare:hover img,
.product-hero-img--bare:hover .product-hero-video {
  transform: translateY(-8px) scale(1.02);
  filter:
    drop-shadow(0 45px 50px rgba(0,0,0,0.6))
    drop-shadow(0 18px 25px rgba(0,0,0,0.4))
    drop-shadow(0 4px 6px rgba(0,0,0,0.25));
}

/* Thumbnails All-in-one en lista de "Otras opciones" */
.product-row[href*="all-in-one-"] .product-thumb {
  background: transparent;
}
.product-row[href*="all-in-one-"] .product-thumb img {
  filter: drop-shadow(0 4px 8px rgba(0,0,0,0.45)) drop-shadow(0 1px 2px rgba(0,0,0,0.3));
}

.product-hero-img img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.product-hero-body {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.product-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(var(--color-accent-rgb, 0,174,239), 0.12);
  border: 1px solid rgba(var(--color-accent-rgb, 0,174,239), 0.3);
  color: var(--color-accent);
  font-size: var(--text-xs);
  font-weight: var(--fw-medium);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 4px 12px;
  border-radius: 100px;
  width: fit-content;
}

.product-hero-title {
  font-size: clamp(1.8rem, 3.5vw, 2.8rem);
  font-weight: var(--fw-ultra);
  color: var(--color-white);
  line-height: 1.1;
}

.product-hero-title em {
  font-style: normal;
  color: var(--color-accent);
}

.product-hero-desc {
  font-size: var(--text-base);
  font-weight: var(--fw-light);
  color: rgba(255,255,255,0.7);
  line-height: 1.75;
}

.product-specs {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-top: var(--space-sm);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.product-spec-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px var(--space-md);
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.product-spec-row:last-child { border-bottom: none; }

.product-spec-row span:first-child {
  font-size: var(--text-xs);
  font-weight: var(--fw-medium);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(255,255,255,0.4);
}

.product-spec-row span:last-child {
  font-size: var(--text-sm);
  font-weight: var(--fw-medium);
  color: var(--color-white);
}

/* ── Responsive ─────────────────────────────────────────── */
@media (max-width: 768px) {
  .product-hero-inner {
    grid-template-columns: 1fr;
  }

  .product-hero-img {
    aspect-ratio: 16/9;
  }

  .products-tabs {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
}

/* ── Click-to-play video en hero de producto ─────────────────── */
.product-hero-video {
  position: relative;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  font: inherit;
  color: inherit;
  transition: transform 0.25s ease;
}

.product-hero-video:hover { transform: scale(1.01); }
.product-hero-video:hover img { opacity: 0.85; }
.product-hero-video img { transition: opacity 0.25s ease; }

.product-hero-video .case-gallery-play {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 72px;
  height: 72px;
  background: rgba(0, 152, 247, 0.92);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  transition: transform 0.2s ease, background 0.2s ease;
}

.product-hero-video:hover .case-gallery-play {
  transform: translate(-50%, -50%) scale(1.08);
  background: var(--color-accent);
}

.product-hero-video .case-gallery-play svg {
  width: 32px;
  height: 32px;
  color: white;
  margin-left: 3px;
}

.product-hero-video .case-gallery-video-label {
  position: absolute;
  left: 16px;
  bottom: 16px;
  padding: 6px 12px;
  background: rgba(0, 0, 0, 0.6);
  color: white;
  font-size: var(--text-xs);
  font-weight: var(--fw-medium);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  border-radius: var(--radius-sm);
  backdrop-filter: blur(4px);
}

.product-hero-video.playing img,
.product-hero-video.playing .case-gallery-play,
.product-hero-video.playing .case-gallery-video-label {
  display: none;
}

.product-hero-video video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
  display: block;
}
