/* Hyva preview PDP: align image/price/cart, Details, and Reviews to one centered width. */
body.catalog-product-view .product-info-main > section[aria-label="Product Info"],
body.catalog-product-view .product-info-main > div.grid:has(> section[id="product.info.description"]),
body.catalog-product-view .product-info-main > section[aria-label="Product Reviews"],
body.catalog-product-view .product-info-main > div.product-options-bottom,
body.catalog-product-view .product-info-main > div.product-social-links {
  width: 100%;
  max-width: 980px;
  margin-inline: auto;
  box-sizing: border-box;
}
body.catalog-product-view .product-info-main > div.grid:has(> section[id="product.info.description"]) {
  display: block !important;
}
body.catalog-product-view section[id="product.info.description"],
body.catalog-product-view section[id="reviews.tab"] {
  width: 100%;
  min-width: 0;
}
body.catalog-product-view section[id="reviews.tab"] {
  margin-top: 32px;
}

/* A little more room for the image at desktop widths within the 980px page. */
@media (min-width: 1024px) {
  body.catalog-product-view .product-info-main > section[aria-label="Product Info"] {
    grid-template-columns: minmax(0, 55fr) minmax(0, 45fr);
    column-gap: 24px;
  }
  body.catalog-product-view .product-info-main > section[aria-label="Product Info"] > section[aria-label="Gallery"] {
    min-width: 0;
    width: 100%;
    max-width: 100%;
  }
}

/* Preview PDP: make the quantity control understandable beside Add to Cart. */
body.catalog-product-view .product-info-main label[for^="qty["] {
  position: static !important;
  display: inline-flex !important;
  align-items: center;
  clip: auto !important;
  clip-path: none !important;
  width: auto !important;
  height: auto !important;
  overflow: visible !important;
  white-space: normal !important;
  margin: 0 5px 0 0 !important;
  padding: 0 !important;
  font-size: 13px;
  line-height: 1.4;
}
body.catalog-product-view .product-info-main input[name="qty"] {
  min-width: 62px;
  max-width: 78px;
}

/* Keep the current product price legible with a stable quantity / cart row. */
body.catalog-product-view section[aria-label="Product Info"] .card > div:has(> [aria-label="Price"]) {
  display: flex !important;
  flex-direction: column !important;
  align-items: stretch !important;
  gap: 12px;
}
body.catalog-product-view section[aria-label="Product Info"] .card > div:has(> [aria-label="Price"]) > [aria-label="Price"] {
  width: 100%;
}
body.catalog-product-view section[aria-label="Product Info"] .price-box .final-price .price {
  font-size: 25px;
  font-weight: 700;
  line-height: 1.2;
}
body.catalog-product-view section[aria-label="Product Info"] .card > div:has(> [aria-label="Price"]) > div:has(> input[name="qty"]) {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  margin: 0 !important;
  gap: 8px;
}
body.catalog-product-view section[aria-label="Product Info"] #product-addtocart-button {
  white-space: nowrap;
  flex-shrink: 0;
}

/* Mobile purchase button: show the action label, not only the icon. */
@media (max-width: 639px) {
 body.catalog-product-view #product-addtocart-button > span {display:inline-block!important;}
 body.catalog-product-view #product-addtocart-button {gap:6px;padding-inline:13px;}
}

/* Preview PDP: long unbroken titles (comma-joined model lists) must wrap inside the info box. */
body.catalog-product-view .product-info-main,
body.catalog-product-view .product-info-main > section,
body.catalog-product-view .product-info-main section > div {
  min-width: 0;
}
body.catalog-product-view .product-info-main h1,
body.catalog-product-view .product-info-main .page-title,
body.catalog-product-view .product-info-main .page-title span {
  overflow-wrap: anywhere;
  word-break: break-word;
  max-width: 100%;
}
