/**
 * Purple Lion - sidebox product title wrapping fix
 *
 * Fixes long product names in left/right product sideboxes, especially:
 * - Novinky / What's New
 * - Specials
 * - Featured
 * - Reviews
 * - Bestsellers / Order History style product links
 *
 * SWS product names often contain long slash-separated specs that need forced wrapping.
 */

.sideBoxContent,
.sideBoxContentItem,
#whatsnewContent,
#specialsContent,
#featuredContent,
#reviewsContent,
#bestsellersContent,
#orderhistoryContent {
  box-sizing: border-box;
  max-width: 100%;
  overflow: hidden;
}

/* Force long product names inside sideboxes to wrap instead of overflowing */
.sideBoxContent a,
.sideBoxContentItem a,
#whatsnewContent a,
#specialsContent a,
#featuredContent a,
#reviewsContent a,
#bestsellersContent a,
#orderhistoryContent a {
  display: inline-block;
  max-width: 100%;
  white-space: normal !important;
  overflow-wrap: anywhere;
  word-wrap: break-word;
  word-break: break-word;
  hyphens: auto;
  line-height: 1.28;
}

/* Product entries in sideboxes should behave like contained mini-cards */
.sideBoxContentItem {
  display: block;
  width: 100%;
  padding-left: 6px;
  padding-right: 6px;
}

/* Images must not force a wider sidebox */
.sideBoxContent img,
.sideBoxContentItem img,
#whatsnewContent img,
#specialsContent img,
#featuredContent img,
#reviewsContent img,
#bestsellersContent img,
#orderhistoryContent img {
  max-width: 100%;
  height: auto;
}

/* Price / small text lines should also stay inside the box */
.sideBoxContent .productPriceDiscount,
.sideBoxContent .productSpecialPrice,
.sideBoxContent .productSalePrice,
.sideBoxContent .productPrice,
.sideBoxContent .normalprice,
.sideBoxContent .smallText {
  display: block;
  max-width: 100%;
  overflow-wrap: anywhere;
  word-wrap: break-word;
}

/* Slightly calmer spacing in the What's New box */
#whatsnewContent .sideBoxContentItem,
#whatsnewContent > div {
  margin-bottom: 16px;
}

#whatsnewContent .sideBoxContentItem:last-child,
#whatsnewContent > div:last-child {
  margin-bottom: 0;
}

/* If some sidebox template prints the product name as plain text after image link */
#whatsnewContent,
#specialsContent,
#featuredContent {
  overflow-wrap: anywhere;
  word-wrap: break-word;
  word-break: break-word;
}
