/* ── Header de página ── */
.page-hero {
  padding-top: calc(var(--sp-section) + 60px);
  padding-bottom: var(--sp-5);
  background-image:
    linear-gradient(rgba(133, 158, 160, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(133, 158, 160, 0.05) 1px, transparent 1px);
  background-size: 60px 60px;
}

.page-hero h1 {
  font-size: var(--fs-hero);
  margin-block: var(--sp-2) var(--sp-3);
  animation: heroIn 0.9s ease both;
}

.page-hero .tag { animation: heroIn 0.9s ease both; }

.page-hero-sub {
  color: var(--text-secondary);
  font-size: 1.1rem;
  max-width: 60ch;
  animation: heroIn 0.9s 0.15s ease both;
}

@keyframes heroIn {
  from { opacity: 0; transform: translateY(30px); filter: blur(8px); }
  to { opacity: 1; transform: translateY(0); filter: blur(0); }
}

.accent-text {
  background: linear-gradient(90deg, #4DA3FF, #FFFFFF, #4DA3FF);
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: gradientShift 4s linear infinite;
}

@keyframes gradientShift {
  to { background-position: 200% center; }
}

/* ── Bloque de producto (texto + visual) ── */
.product-block {
  min-width: 0;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: var(--sp-5);
  align-items: center;
}

/* Versión invertida: visual a la izquierda */
.product-block.inverted .product-info { order: 2; }
.product-block.inverted .product-visual { order: 1; }

.product-badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--frost);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.3rem 1rem;
  margin-bottom: var(--sp-2);
}

.product-info h2 {
  font-size: var(--fs-h2);
  margin-bottom: var(--sp-2);
}

.product-desc {
  color: var(--text-secondary);
  margin-bottom: var(--sp-3);
}

.product-features {
  display: grid;
  gap: var(--sp-1);
  margin-bottom: var(--sp-3);
}

.product-features li {
  font-size: var(--fs-small);
  color: var(--text-secondary);
  padding-left: 1.6rem;
  position: relative;
}

.product-features li strong {
  color: var(--text-primary);
}

.product-features li::before {
  content: '▸';
  position: absolute;
  left: 0.3rem;
  color: var(--accent);
  font-weight: 700;
}

/* ── Precios ── */
.product-pricing {
  display: flex;
  gap: var(--sp-3);
  flex-wrap: wrap;
  margin-bottom: var(--sp-3);
}

.price-item {
  display: grid;
  gap: 0.2rem;
  padding: var(--sp-2) var(--sp-3);
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.alt-bg .price-item {
  background: var(--charcoal);
}

.price-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--mist);
  font-weight: 600;
}

.price-value {
  font-family: var(--font-heading);
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--text-heading);
}

.price-value small {
  font-size: 0.9rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.price-note {
  font-size: 0.75rem;
  color: var(--text-secondary);
}

/* ── Visual / placeholder ── */
.img-placeholder {
  aspect-ratio: 4 / 3;
  display: grid;
  place-items: center;
  text-align: center;
  background: var(--bg-surface);
  border: 2px dashed var(--border);
  border-radius: var(--radius-lg);
  color: var(--mist);
  font-size: 1.1rem;
  line-height: 1.8;
}

.alt-bg .img-placeholder {
  background: var(--charcoal);
}

.img-placeholder small {
  font-size: 0.8rem;
  opacity: 0.7;
}

/* ── Por qué Velcra ── */
.why-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--sp-3);
  margin-top: var(--sp-4);
}

.why-grid h3 {
  font-size: 1.05rem;
  margin-bottom: var(--sp-1);
}

.why-grid p {
  color: var(--text-secondary);
  font-size: var(--fs-small);
}

.cta-sub {
  color: var(--text-secondary);
  margin-block: var(--sp-2) var(--sp-3);
}

/* ── Responsive ── */
@media (max-width: 900px) {
  .product-block {
    grid-template-columns: 1fr;
    gap: var(--sp-4);
  }
  /* En móvil el visual siempre va abajo */
  .product-block.inverted .product-info { order: 1; }
  .product-block.inverted .product-visual { order: 2; }
  .why-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 600px) {
  .why-grid { grid-template-columns: 1fr; }
  .product-pricing { flex-direction: column; }
}

/* ── Grid de casos (fusionado desde portfolio) ── */
.cases-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--sp-3);
  margin-top: var(--sp-4);
}

.portfolio-card {
  display: flex;
  flex-direction: column;
  gap: var(--sp-1);
}

.alt-bg .portfolio-card {
  background: var(--charcoal);
}

.portfolio-img {
  font-size: 2.5rem;
  width: 64px;
  height: 64px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, rgba(0, 102, 255, 0.15), rgba(133, 158, 160, 0.1));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: var(--sp-1);
}

.portfolio-card h3 {
  font-size: var(--fs-h3);
}

.portfolio-card > p {
  color: var(--text-secondary);
  font-size: var(--fs-small);
  flex-grow: 1;
}

.portfolio-result {
  margin-top: var(--sp-2);
  padding: var(--sp-2);
  background: rgba(0, 102, 255, 0.07);
  border-left: 3px solid var(--electric);
  border-radius: 0 var(--radius) var(--radius) 0;
}

.result-label {
  display: block;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent);
  margin-bottom: 0.3rem;
}

.portfolio-result p {
  font-size: var(--fs-small);
  color: var(--text-primary);
}

@media (max-width: 700px) {
  .cases-grid { grid-template-columns: 1fr; }
}

/* ── Carrusel de capturas ── */
.product-gallery {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--bg-surface);
}

.gallery-track {
  display: flex;
  transition: transform 0.45s cubic-bezier(0.4, 0, 0.2, 1);
}

.gallery-track img {
  width: 100%;
  flex-shrink: 0;
  height: auto;
  display: block;
}

/* Flechas */
.gallery-prev,
.gallery-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 1.2rem;
  color: var(--white);
  background: rgba(27, 37, 40, 0.75);
  backdrop-filter: blur(4px);
  border: 1px solid var(--border);
  transition: background var(--transition);
  z-index: 2;
}

.gallery-prev { left: 12px; }
.gallery-next { right: 12px; }

.gallery-prev:hover,
.gallery-next:hover {
  background: var(--electric);
}

/* Dots */
.gallery-dots {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 2;
}

.gallery-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.35);
  transition: background var(--transition), transform var(--transition);
}

.gallery-dot.active {
  background: var(--electric);
  transform: scale(1.3);
}

/* ── Lightbox ── */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 9500;
  display: grid;
  place-items: center;
  background: rgba(15, 20, 22, 0.92);
  backdrop-filter: blur(8px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.lightbox.active {
  opacity: 1;
  visibility: visible;
}

.lightbox-img {
  max-width: min(1400px, 92vw);
  max-height: 88vh;
  border-radius: var(--radius);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
  /* Entrada con zoom suave */
  transform: scale(0.95);
  transition: transform 0.3s ease;
}

.lightbox.active .lightbox-img {
  transform: scale(1);
}

.lightbox-close,
.lightbox-prev,
.lightbox-next {
  position: absolute;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 1.3rem;
  color: var(--white);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  transition: background var(--transition);
  z-index: 2;
}

.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover {
  background: var(--electric);
}

.lightbox-close { top: 20px; right: 20px; }
.lightbox-prev { left: 20px; top: 50%; transform: translateY(-50%); }
.lightbox-next { right: 20px; top: 50%; transform: translateY(-50%); }

@media (max-width: 600px) {
  .lightbox-prev { left: 8px; }
  .lightbox-next { right: 8px; }
}

/* ── Logo de producto ── */
.product-title {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  margin-bottom: var(--sp-2);
}

.product-logo {
  height: 52px;
  width: auto;
  flex-shrink: 0;
}

.product-title h2 {
  margin-bottom: 0; /* el margen ahora lo maneja el contenedor */
}

@media (max-width: 600px) {
  .product-logo { height: 40px; }
}

.product-logo {
  height: 52px;
  width: auto;
  max-width: 78px; /* contiene al apaisado de GoMatch */
  object-fit: contain;
  flex-shrink: 0;
}