/* ==========================================================================
   SINGLE PRODUCT – VETPCR
   Scopeado y compatible con Astra + Woo
========================================================================== */

.vetpcr-single{
  --main-color: var(--kp-primary);
  --ink: var(--kp-ink);
  --panel: var(--kp-panel);
  --white: var(--kp-white);
  font-family: 'Poppins', sans-serif;
}

/* ================= MENSAJES ================= */
body.single-product .woocommerce-message{
  margin: 2rem auto;
  max-width: 1200px;
  padding: 1.2rem 2rem;
  border-radius: 16px;
  background-color: var(--main-color);
  color: #fff;
  font-size: 1rem;
  box-shadow: 0 4px 20px rgba(0,0,0,.08);
  border: none;
}

/* ================= HEADER PRODUCTO ================= */
.vetpcr-single .product-header{
  padding: 7rem 1rem 3rem;
  background: #fff;
}

.vetpcr-single .product-header-flex{
  max-width: 1200px;
  margin: auto;
  display: flex;
  gap: 3rem;
  align-items: flex-start;
}

/* Imagen */
.vetpcr-single .product-image-zone{
  width: 380px;
}

.vetpcr-single .product-image-wrapper{
  border-radius: 16px;
  overflow: hidden;
}

.vetpcr-single .product-image-wrapper img{
  width: 100%;
  display: block;
}

/* Info */
.vetpcr-single .product-info-text{
  flex: 1;
}

.vetpcr-single .product-info-text h1{
  font-size: 38px;
  font-weight: 800;
  color: var(--ink);
  text-transform: uppercase;
  line-height: 1.1;
}

.vetpcr-single .meta{
  color: #6b7280;
  font-size: 15px;
}

/* ================= DESCRIPCIÓN ================= */
.vetpcr-single .product-description{
  margin-top: 1rem;
  max-width: 600px;
  color: var(--ink);
}

/* ================= CARRITO ================= */
.vetpcr-single .cart-wrapper{
  margin-top: 2rem;
}

.vetpcr-single form.cart{
  display: flex;
  align-items: center;
  gap: 1rem;
}

.vetpcr-single .qty{
  width: 70px;
  border-radius: 12px;
  border: 1.5px solid var(--main-color);
}

.vetpcr-single .single_add_to_cart_button{
  background: var(--main-color);
  color: #fff;
  border-radius: 12px;
  padding: .7rem 1.5rem;
  font-weight: 600;
  border: none;
}

/* ================= PDFS ================= */
.vetpcr-single .product-pdfs{
  margin: 4rem auto;
  max-width: 1200px;
  text-align: center;
}

.vetpcr-single .pdf-block h3{
  color: var(--main-color);
  font-size: 26px;
}

/* =========================================================
   RELATED PRODUCTS – FIX DEFINITIVO
========================================================= */

/* contenedor general */
.vetpcr-single .related-products {
  max-width: 1100px;
  margin: 3rem auto 5rem;
  text-align: center;
  position: relative;
}

/* título */
.vetpcr-single .related-products h2 {
  font-size: 28px;
  font-weight: 800;
  color: var(--main-color);
  margin-bottom: 2rem;
  text-transform: uppercase;
}

/* contenedor scroll */
.vetpcr-single .related-scroll {
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}

/* imagen */
.vetpcr-single .related-scroll li.product img {
  width: 100%;
  height: 180px;
  object-fit: contain;
  border-radius: 12px;
}

/* título producto */
.vetpcr-single .related-scroll .woocommerce-loop-product__title {
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
  text-transform: uppercase;
  line-height: 1.3;
  margin-top: 0.5rem;
}

/* ocultar cosas innecesarias */
.vetpcr-single .related-scroll .price,
.vetpcr-single .related-scroll .button,
.vetpcr-single .related-scroll .star-rating {
  display: none !important;
}


/* flechas */
.vetpcr-single .scroll-btn {
  position: absolute;
  top: 55%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: var(--main-color);
  color: #fff;
  font-size: 20px;
  cursor: pointer;
  z-index: 10;
}

.vetpcr-single .scroll-btn.left { left: -15px; }
.vetpcr-single .scroll-btn.right { right: -15px; }

/* mobile */
@media (max-width: 768px) {
  .vetpcr-single .related-scroll ul.products {
    padding: 0 1rem;
  }

  .vetpcr-single .related-scroll li.product {
    flex: 0 0 160px;
  }

  .vetpcr-single .scroll-btn {
    display: none;
  }
}


/* ==========================================================================
   HEADER MORADO SOLO EN SINGLE PRODUCT
========================================================================== */

body.single-product .custom-header{
  background-color: #7a4dff !important;
  border-bottom: 1px solid rgba(255,255,255,0.15);
}

/* Texto del header */
body.single-product .custom-header,
body.single-product .custom-header a,
body.single-product .custom-header .login-icon,
body.single-product .custom-header .cart-icon-header a{
  color: #ffffff !important;
}

/* Hover */
body.single-product .custom-header a:hover,
body.single-product .custom-header .cart-icon-header a:hover{
  opacity: 0.85;
  background: transparent !important;
}

/* Submenús */
body.single-product .custom-header .sub-menu{
  background-color: rgba(122,77,255,0.95);
}

body.single-product .custom-header .sub-menu a{
  color: #ffffff !important;
}

body.single-product .custom-header .sub-menu a:hover{
  background-color: rgba(255,255,255,0.15);
}
/* SOLO ocultar el summary nativo de Woo */
body.single-product .summary.entry-summary {
  display: none !important;
}

/* Ocultar tabs nativos si no los usas */
body.single-product .woocommerce-tabs {
  display: none !important;
}
/* FIX definitivo related products */
body.single-product .related-products,
body.single-product .related,
body.single-product .upsells {
  display: block !important;
  visibility: visible !important;
  height: auto !important;
  opacity: 1 !important;
}
@media (max-width: 1024px) {

  .vetpcr-single .product-header {
    padding: 5rem 1.5rem 2.5rem;
  }

  .vetpcr-single .product-header-flex {
    gap: 2rem;
  }

  .vetpcr-single .product-image-zone {
    width: 320px;
  }

  .vetpcr-single .product-info-text h1 {
    font-size: 32px;
  }

  .vetpcr-single .product-description {
    max-width: 100%;
  }

}


@media (max-width: 768px) {

  /* Header */
  .vetpcr-single .product-header {
    padding: 4rem 1rem 2rem;
  }

  .vetpcr-single .product-header-flex {
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
  }

  /* Imagen */
  .vetpcr-single .product-image-zone {
    width: 100%;
    max-width: 320px;
  }

  /* Texto */
  .vetpcr-single .product-info-text {
    text-align: center;
  }

  .vetpcr-single .product-info-text h1 {
    font-size: 26px;
  }

  .vetpcr-single .meta {
    font-size: 14px;
  }

  .vetpcr-single .product-description {
    margin: 1rem auto 0;
    font-size: 15px;
  }

  /* Carrito */
  .vetpcr-single .cart-wrapper {
    width: 100%;
  }

  .vetpcr-single form.cart {
    flex-direction: column;
    gap: 0.75rem;
  }

  .vetpcr-single .qty {
    width: 100%;
    max-width: 120px;
    text-align: center;
  }

  .vetpcr-single .single_add_to_cart_button {
    width: 100%;
    padding: 0.9rem 1.2rem;
    font-size: 16px;
  }

}
@media (max-width: 480px) {

  .vetpcr-single .product-info-text h1 {
    font-size: 22px;
    line-height: 1.2;
  }

  .vetpcr-single .product-description {
    font-size: 14px;
  }

  .vetpcr-single .product-pdfs {
    margin: 3rem 1rem;
  }

  .vetpcr-single .pdf-block h3 {
    font-size: 22px;
  }

}
/* ===============================
   FIX REAL: Woo Related Carousel
================================ */

/* El carrusel REAL lo controla el UL */
.vetpcr-single .related-products ul.products {
  display: flex !important;
  flex-wrap: nowrap !important;
  gap: 1rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 0 1rem 1rem;
}

/* Anular grilla Astra/Woo */
.vetpcr-single .related-products ul.products {
  grid-template-columns: unset !important;
}

/* Cada tarjeta */
.vetpcr-single .related-products ul.products li.product {
  flex: 0 0 190px;
  max-width: 190px;
  scroll-snap-align: start;
}
