/* MY2LK single-product proportion refinements. Loaded after product-page-polish.css. */

@media (min-width: 1100px) {
  /* Keep the main product dominant while giving recommendations enough room to stay readable. */
  body.single-product .product {
    grid-template-columns: minmax(0, 1.28fr) minmax(0, 1.18fr) 290px !important;
    gap: 20px 24px !important;
  }

  body.single-product .product > .images {
    padding: 12px !important;
    border-radius: 14px !important;
  }

  body.single-product .woocommerce-product-gallery__image img {
    max-height: 540px !important;
  }

  body.single-product .summary .product_title {
    font-size: clamp(31px, 2.65vw, 42px) !important;
    line-height: 1.05 !important;
    margin-bottom: 10px !important;
  }

  body.single-product .summary .price {
    font-size: clamp(28px, 2.2vw, 35px) !important;
    margin-bottom: 12px !important;
  }

  body.single-product .summary .woocommerce-product-details__short-description {
    margin-bottom: 12px !important;
  }

  body.single-product .my2lk-fulfilment-panel {
    margin-bottom: 12px !important;
    padding: 11px 14px !important;
  }

  body.single-product .product > .related.products {
    padding: 10px 0 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
  }

  body.single-product .related.products h2,
  body.single-product .related.products > h2,
  body.single-product section.related.products > h2 {
    margin: 0 0 12px !important;
    font-size: 18px !important;
    line-height: 1.1 !important;
    letter-spacing: -.015em !important;
    color: var(--my2lk-ink) !important;
  }

  body.single-product .related.products ul.products {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 10px !important;
    margin: 0 !important;
  }

  body.single-product .related.products ul.products li.product {
    float: none !important;
    display: grid !important;
    grid-template-columns: 82px minmax(0, 1fr) !important;
    grid-template-areas:
      "image details"
      "image actions" !important;
    align-items: start !important;
    column-gap: 10px !important;
    row-gap: 5px !important;
    box-sizing: border-box !important;
    width: 100% !important;
    min-width: 0 !important;
    min-height: 112px !important;
    margin: 0 !important;
    padding: 10px !important;
    border: 1px solid var(--my2lk-line) !important;
    border-radius: 11px !important;
    background: #fff !important;
    box-shadow: 0 4px 14px rgba(18, 56, 42, .025) !important;
    overflow: hidden !important;
  }

  body.single-product .related.products li.product > .product-images,
  body.single-product .related.products li.product > a:first-child {
    grid-area: image !important;
    float: none !important;
    display: block !important;
    width: 82px !important;
    max-width: 82px !important;
    min-width: 82px !important;
    margin: 0 !important;
  }

  body.single-product .related.products li.product img {
    display: block !important;
    width: 82px !important;
    height: 82px !important;
    max-width: 82px !important;
    margin: 0 !important;
    object-fit: contain !important;
    border-radius: 7px !important;
    background: #f7faf8 !important;
  }

  body.single-product .related.products li.product > .product-details,
  body.single-product .related.products li.product .product-details {
    grid-area: details !important;
    float: none !important;
    display: block !important;
    box-sizing: border-box !important;
    width: 100% !important;
    max-width: none !important;
    min-width: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  body.single-product .related.products li.product .product-title,
  body.single-product .related.products li.product h3 {
    display: block !important;
    margin: 0 0 4px !important;
    font-size: 11px !important;
    font-weight: 800 !important;
    line-height: 1.22 !important;
    overflow-wrap: anywhere;
  }

  body.single-product .related.products li.product .price {
    display: block !important;
    margin: 0 !important;
    font-size: 12px !important;
    font-weight: 800 !important;
    line-height: 1.1 !important;
  }

  /* Works whether Avada renders the button group as a direct child or inside product-details. */
  body.single-product .related.products li.product > .product-buttons {
    grid-area: actions !important;
  }

  body.single-product .related.products li.product .product-buttons {
    float: none !important;
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) 48px !important;
    align-items: center !important;
    gap: 6px !important;
    box-sizing: border-box !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    margin: 6px 0 0 !important;
    padding: 6px 0 0 !important;
    border-top: 1px solid var(--my2lk-line) !important;
  }

  body.single-product .related.products li.product .product-buttons a,
  body.single-product .related.products li.product .product-buttons .button,
  body.single-product .related.products li.product .add_to_cart_button,
  body.single-product .related.products li.product .show_details_button {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-sizing: border-box !important;
    min-width: 0 !important;
    min-height: 30px !important;
    margin: 0 !important;
    padding: 6px 7px !important;
    border-radius: 7px !important;
    font-size: 9px !important;
    font-weight: 800 !important;
    line-height: 1 !important;
    text-align: center !important;
    text-decoration: none !important;
  }

  body.single-product .related.products li.product .product-buttons .button,
  body.single-product .related.products li.product .add_to_cart_button {
    width: 100% !important;
    color: #fff !important;
    background: var(--my2lk-green) !important;
    border: 0 !important;
    white-space: normal !important;
  }

  body.single-product .related.products li.product .show_details_button,
  body.single-product .related.products li.product .product-buttons a:not(.button) {
    width: 48px !important;
    padding-inline: 2px !important;
    color: var(--my2lk-green-dark) !important;
    background: transparent !important;
    border: 0 !important;
    white-space: nowrap !important;
  }

  body.single-product .related.products li.product .product-buttons a::before,
  body.single-product .related.products li.product .product-buttons a::after {
    display: none !important;
    content: none !important;
  }
}
