/* Ficha producto Eldesa: breadcrumb arriba, ~70% de ancho, título en una línea. */

body.single-product .ed-product-topbar {
  width: 100%;
  box-sizing: border-box;
  padding: 4px 0 10px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 18px;
}

body.single-product .ed-product-topbar .woocommerce-breadcrumb,
body.single-product .ed-product-topbar nav.ed-cat-bc {
  flex: 1 1 auto;
  min-width: 0;
  margin: 0;
  padding: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 13px;
  line-height: 1.35;
  text-transform: none !important;
  letter-spacing: 0;
}

body.single-product .ed-product-topbar .ed-back-catalog {
  margin: 0;
  flex: 0 0 auto;
}

@media only screen and (max-width: 899px) {
  body.single-product .ed-product-topbar {
    padding: 8px 16px 12px;
    padding-left: max(16px, env(safe-area-inset-left, 0px));
    padding-right: max(16px, env(safe-area-inset-right, 0px));
    box-sizing: border-box;
  }
}

@media only screen and (min-width: 900px) {
  body.single-product #main > .container:has(.ed-product-topbar),
  body.single-product .product-container,
  body.single-product .product-main,
  body.single-product .product-footer > .container {
    width: 70%;
    min-width: min(1100px, calc(100vw - 48px));
    max-width: 1440px;
    margin-left: auto;
    margin-right: auto;
  }

  body.single-product .product-gallery.col.large-6 {
    flex: 0 0 42% !important;
    max-width: 42% !important;
    width: 42% !important;
  }

  body.single-product .product-info.summary {
    flex: 1 1 58% !important;
    max-width: 58% !important;
    width: auto !important;
    min-width: 0;
  }

  body.single-product #product-sidebar,
  body.single-product .product-sidebar-small {
    display: none !important;
  }

  body.single-product .product-info .product-title,
  body.single-product .product-info h1.product-title,
  body.single-product .product-summary h1 {
    font-size: clamp(1.4rem, 1.7vw, 2rem);
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
}


/* Galería ficha: 1:1 sin romper Flickity (no aspect-ratio en el wrapper). */
body.single-product .woocommerce-product-gallery__image {
  aspect-ratio: 1 / 1;
  overflow: hidden;
}
body.single-product .woocommerce-product-gallery__image > a {
  display: block;
  width: 100%;
  height: 100%;
  overflow: hidden;
}
body.single-product .woocommerce-product-gallery__image img.wp-post-image {
  width: 100% !important;
  height: 100% !important;
  max-width: 100% !important;
  object-fit: contain !important;
  object-position: center center !important;
}
