/* Grafink V6 mobile fix v2: uses exact class structure of compiled V6. */
@media (max-width: 767px) {
  /* Never allow separate stock badge to overlap category/campaign row. */
  #urunler div[class*="aspect-[16/10]"] > div.absolute.top-3.left-3 {
    left: 10px !important;
    right: 10px !important;
    top: 10px !important;
    max-width: calc(100% - 20px) !important;
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: flex-start !important;
    gap: 5px !important;
  }
  #urunler div[class*="aspect-[16/10]"] > div.absolute.top-3.left-3 > span {
    max-width: 100% !important;
    white-space: normal !important;
    overflow-wrap: anywhere !important;
    line-height: 1.3 !important;
  }
  /* Separate stock status to bottom left of the product photograph. */
  #urunler div[class*="aspect-[16/10]"] > div.absolute.top-3.right-3 {
    top: auto !important;
    right: auto !important;
    bottom: 12px !important;
    left: 10px !important;
    max-width: calc(100% - 20px) !important;
    z-index: 3;
  }
  #urunler div[class*="aspect-[16/10]"] > div.absolute.top-3.right-3 > span {
    max-width: 100% !important;
    width: fit-content !important;
    white-space: normal !important;
    overflow-wrap: anywhere !important;
    line-height: 1.35 !important;
  }
  /* Technical details: keep real React close button visible while scrolling.
     Use sticky *inside* scroll container, with distinct paint layer. */
  #urunler div.fixed.inset-0.z-50 > div.relative.overflow-y-auto > button.absolute.top-4.right-4 {
    position: sticky !important;
    top: 0 !important;
    left: auto !important;
    right: auto !important;
    margin: -4px -4px 8px auto !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    z-index: 100 !important;
    min-width: 48px !important;
    min-height: 48px !important;
    color: #ffffff !important;
    background: #0f172a !important;
    border: 2px solid #ffffff !important;
    border-radius: 14px !important;
    box-shadow: 0 4px 14px #0f172a55 !important;
    opacity: 1 !important;
    visibility: visible !important;
  }
  #urunler div.fixed.inset-0.z-50 > div.relative.overflow-y-auto > button.absolute.top-4.right-4 svg {
    width: 24px !important;
    height: 24px !important;
    stroke: #fff !important;
  }
}
