.af-product-detail {
  padding: 40px 0 48px;
  background: #f3f4f6; /* fondo general claro */
}

.af-product-detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: 32px;
  align-items: flex-start;
}

/* COLUMNA IZQUIERDA */

.af-product-gallery {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.af-product-main {
  position: relative;
  background: #ffffff;
  border-radius: 28px;
  border: 1px solid #e5e7eb;   /* borde suave, sin sombra */
  padding: 32px 28px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.af-product-main img {
  max-width: 100%;
  max-height: 420px;
  object-fit: contain;
}

/* insignia de descuento */

.af-product-discount-badge {
  position: absolute;
  top: 18px;
  left: 18px;
  width: 82px;
  height: 82px;
  border-radius: 999px;
  background: #0f766e;
  color: #ffffff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-weight: 700;
  font-size: 0.95rem;
  border: 2px solid #ecfdf5;   /* aro claro en vez de sombra */
}

.af-product-discount-badge small {
  font-size: 0.65rem;
  font-weight: 500;
}

/* miniaturas */

.af-product-thumbs {
  display: flex;
  gap: 12px;
}

.af-product-thumb {
  flex: 0 0 86px;
  height: 86px;
  border-radius: 20px;
  border: 1px solid #e5e7eb;
  padding: 6px;
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition:
    border-color 0.16s ease,
    transform 0.16s ease,
    background-color 0.16s ease;
}

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

.af-product-thumb:hover {
  transform: translateY(-1px);
  background-color: #f3f4ff;  /* solo cambio de fondo */
}

.af-product-thumb--active {
  border-color: var(--af-secondary);
}

/* COLUMNA DERECHA */

.af-product-info {
  background: #ffffff;
  border-radius: 24px;
  border: 1px solid #e5e7eb;   /* tarjeta limpia sin sombra */
  padding: 24px 26px 22px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* temporizador */

.af-product-timer {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  font-size: 0.86rem;
  color: #b91c1c;
  background: #fee2e2;
  padding: 6px 10px;
  border-radius: 999px;
  align-self: flex-start;
}

.af-product-timer-icon {
  font-size: 1rem;
}

.af-product-timer-text strong {
  font-weight: 600;
}

/* tienda */

.af-product-store {
  margin: 4px 0 0 0;
  font-size: 0.85rem;
  color: var(--af-text-muted);
}

/* título */

.af-product-title {
  margin: 2px 0 6px 0;
  font-size: 1.9rem;
  font-weight: 700;
  color: var(--af-text-main);
}

/* rating */

.af-product-rating {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.88rem;
  color: var(--af-text-muted);
}

.af-product-stars {
  color: #fbbf24;
  letter-spacing: 1px;
  font-size: 1rem;
}

.af-product-rating-text {
  color: var(--af-text-main);
  font-weight: 500;
}

.af-product-rating-link {
  color: var(--af-secondary);
  text-decoration: none;
  font-size: 0.86rem;
}

.af-product-rating-link:hover {
  text-decoration: underline;
}

/* precio */

.af-product-price-block {
  margin-top: 4px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.af-product-price-main {
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--af-primary);
}

.af-product-price-note {
  font-size: 0.82rem;
  color: var(--af-text-muted);
}

/* BOTONES PRINCIPALES */

.af-product-actions-main {
  margin-top: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.af-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 24px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 0.94rem;
  font-weight: 600;
  cursor: pointer;
  transition:
    background-color 0.16s ease,
    border-color 0.16s ease,
    transform 0.12s ease,
    color 0.16s ease;
}

.af-btn i {
  font-size: 1.1rem;
}

/* botón primario */

.af-btn-primary {
  background: #e5f3fb;
  color: var(--af-primary);
  border-color: #bfdbfe;
}

.af-btn-primary:hover {
  background: #d4ebf8;
  border-color: var(--af-primary);
  transform: translateY(-1px);
}

/* botón acento (texto blanco) */

.af-btn-accent {
  background: var(--af-secondary);
  color: #ffffff;
  border-color: #0ea5e9;
}

.af-btn-accent:hover {
  background: #009dbb;
  border-color: #0369a1;
  transform: translateY(-1px);
}

/* ACCIONES SECUNDARIAS */

.af-product-actions-secondary {
  margin-top: 6px;
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
}

/* enlace de acción (lista de deseos) con diseño de hover */

.af-link-action {
  border: none;
  background: transparent;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.88rem;
  color: var(--af-text-main);
  cursor: pointer;
  padding: 4px 0;
  position: relative;
}

.af-link-action i {
  font-size: 1.1rem;
}

/* subrayado animado */

.af-link-action::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  height: 2px;
  width: 0;
  background: var(--af-secondary);
  border-radius: 999px;
  transition: width 0.16s ease;
}

.af-link-action:hover {
  color: var(--af-primary);
}

.af-link-action:hover::after {
  width: 100%;
}

/* estado activo de wishlist */

.af-link-wishlist.af-wishlist-active {
  color: var(--af-secondary);
}

.af-link-wishlist.af-wishlist-active i {
  color: var(--af-secondary);
}

/* META Y TAGS */

.af-product-meta-block {
  margin-top: 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.af-product-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 6px 0 2px 0;
}

.af-tag {
  font-size: 0.78rem;
  padding: 4px 10px;
  border-radius: 999px;
  background: #ecfdf5;
  color: #047857;
  font-weight: 500;
}

.af-product-sku,
.af-product-categories {
  margin: 0;
  font-size: 0.86rem;
  color: var(--af-text-muted);
}

/* ventas recientes */

.af-product-sales {
  margin: 6px 0 0 0;
  font-size: 0.9rem;
  color: #b91c1c;
  display: flex;
  align-items: center;
  gap: 6px;
  background: #fee2e2;
  padding: 6px 10px;
  border-radius: 999px;
  align-self: flex-start;
}

.af-product-sales-icon {
  font-size: 1rem;
}

/* descripción */

.af-product-description {
  margin-top: 8px;
  font-size: 0.92rem;
  color: var(--af-text-main);
  line-height: 1.6;
}

/* RESPONSIVE */

@media (max-width: 1024px) {
  .af-product-detail-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .af-product-info {
    margin-top: 12px;
  }

  .af-product-title {
    font-size: 1.7rem;
  }

  .af-product-price-main {
    font-size: 2rem;
  }
}

@media (max-width: 768px) {
  .af-product-detail {
    padding: 24px 0 32px;
  }

  .af-product-main {
    padding: 24px 18px;
  }

  .af-product-thumbs {
    justify-content: center;
    flex-wrap: wrap;
  }

  .af-product-info {
    padding: 18px 16px 18px;
  }

  .af-product-actions-main {
    flex-direction: column;
  }

  .af-btn {
    width: 100%;
  }
}
