/* ==========================================================================
   IMAGE SYSTEM & PORTRAIT FRAMES (PDP / ARCHIVES)
   ========================================================================== */

/* PDP Gallery Center Adjustments */
.single-product .woocommerce-product-gallery__image img {
  display: block;
  margin-inline: auto;
}

.single-product .product_meta .posted_in,
.single-product .product_meta .posted_in a,
.single-product .product_meta .posted_in span {
  display: inline;
  text-align: center;
  margin-inline: auto;
}

.single-product .product_meta .posted_in {
  width: 100%;
  font-size: 0.77rem;
  letter-spacing: 0.04em;
  margin-bottom: 0.5rem;
}

/* Related & Upsells Mobile Fixes */
@media (max-width: 700px) {
  .related .products .product .wp-post-image,
  .upsells .products .product .wp-post-image,
  .related .products .product img,
  .upsells .products .product img {
    display: block;
    margin-inline: auto;
    margin-bottom: 1.2rem;
    max-width: 90vw;
  }
  .related .products .product,
  .upsells .products .product {
    text-align: center;
  }
}

/* Suggested Routines Section Optimization */
.single-product .vb-product-routine .vb-routine-product .woocommerce-LoopProduct-link {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  text-align: center;
}

.single-product .vb-product-routine .vb-routine-product .vb-loop-product-category {
  display: block;
  width: 100%;
  text-align: center !important;
  margin: 0.45rem 0 0.1rem;
}

.single-product .vb-product-routine .vb-routine-product img {
  display: block;
  width: 100% !important;
  max-width: 100% !important;
  height: auto;
  margin-inline: auto !important;
  padding: 0 !important;
  aspect-ratio: 1 / 1;
  object-fit: contain;
  object-position: center;
}

@media (max-width: 700px) {
  .single-product .vb-product-routine .vb-routine-product .woocommerce-LoopProduct-link { align-items: center; }
}

.single-product .woocommerce-product-gallery .flex-control-thumbs {
  margin-top: 1.0rem !important;
}

/* Team and Specialized Layout Scopes */
body.page-template-page-equipo .wp-block-image img {
  border-radius: calc(var(--vb-radius-lg) - 6px);
  box-shadow: var(--vb-shadow-soft);
  background: #fff;
  display: block;
}

/* Clean Portrait Framework for Services */
.vb-page-main--services .vb-services-section .wp-block-image.vb-portrait-frame {
  aspect-ratio: 3 / 4;
  width: 100%;
  max-width: 380px;
  min-width: 260px;
  min-height: 340px;
  margin: 0 auto;
  display: flex;
  align-items: stretch;
  justify-content: stretch;
  overflow: hidden;
}

.vb-page-main--services .vb-services-section .wp-block-image.vb-portrait-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover !important;
  object-position: center top;
  border-radius: calc(var(--vb-radius-lg) - 6px) !important;
  background: none !important;
  box-shadow: none !important;
}