/* Mayana Core 7.9.71 — single-product refinements.
   This layer intentionally targets the active Mayana Shop UI markup without
   taking ownership of the shop plugin's base layout. */

/* 1) Desktop short description: use the full purchase-column width instead of
   the old 46–48ch cap. The current product copy naturally settles at ~2 lines
   on standard desktop widths while remaining fully visible (no line-clamp). */
@media (min-width: 901px) {
  body.msui-product-page .msui-pdp-summary .msui-product-intro,
  body.msui-product-page .msui-pdp-summary .msui-short-message,
  body.msui-product-page .summary .msui-product-intro {
    width: 100% !important;
    max-width: none !important;
  }
}

/* 3) Delivery rows: keep labels and values visually calm, left aligned and
   regular-weight on desktop and mobile. JS adds .is-mayana-delivery by title. */
body.msui-product-page .msui-product-info .msui-accordion.is-mayana-delivery .msui-spec-row {
  align-items: start !important;
}
body.msui-product-page .msui-product-info .msui-accordion.is-mayana-delivery .msui-spec-label,
body.msui-product-page .msui-product-info .msui-accordion.is-mayana-delivery .msui-spec-value {
  text-align: left !important;
}
body.msui-product-page .msui-product-info .msui-accordion.is-mayana-delivery .msui-spec-value {
  font-weight: 400 !important;
  color: #5f5b54 !important;
}

/* 4) Mobile: main product image/gallery must be the first product-page block
   immediately below the main menu/header. Preserve the gallery itself and only
   remove layout offsets / force source-order priority. */
@media (max-width: 900px) {
  body.msui-product-page .msui-pdp-page,
  body.msui-product-page .msui-product-custom,
  body.msui-product-page .msui-pdp-main {
    margin-top: 0 !important;
    padding-top: 0 !important;
  }

  body.msui-product-page .msui-pdp-main {
    display: flex !important;
    flex-direction: column !important;
  }

  body.msui-product-page .msui-pdp-gallery-col {
    order: -100 !important;
    width: 100% !important;
    margin-top: 0 !important;
    padding-top: 0 !important;
  }

  body.msui-product-page .msui-pdp-summary {
    order: 0 !important;
  }

  /* Blocksy/Woo fallback when the custom Shop UI template is not active. */
  body.single-product .product-entry-wrapper {
    display: flex !important;
    flex-direction: column !important;
  }
  body.single-product .product-entry-wrapper > .woocommerce-product-gallery {
    order: -100 !important;
    margin-top: 0 !important;
  }
  body.single-product .product-entry-wrapper > .entry-summary,
  body.single-product .product-entry-wrapper > .summary {
    order: 0 !important;
  }
}

/* 7.9.143 — Mobile floating purchase CTA appears only after the visitor has
   scrolled past the original Sepete Ekle / Hemen Satın Al controls. This keeps
   the product gallery and purchase configuration area unobstructed on entry. */
@media (max-width: 900px) {
  /* Hide the Shop UI bar from the first paint. JavaScript only adds the visible
     state after the normal purchase controls have been scrolled past. */
  body.single-product .msui-mobile-buy,
  body.single-product .mayana-mobile-buy-bar-managed {
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
    transition: opacity .18s ease, visibility 0s linear .18s !important;
  }

  body.single-product .msui-mobile-buy.mayana-mobile-buy-bar-visible,
  body.single-product .mayana-mobile-buy-bar-managed.mayana-mobile-buy-bar-visible {
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
    transition-delay: 0s !important;
  }
}
