/*!
* <!-- 🔒 Protected by Chaudhary Abdul Ghaffar | © 2025 Arif Enterprises -->
* This CSS is protected under copyright law.
* Unauthorized copying, reuse, or modification is strictly prohibited.
* Contact: contact.arifenterprises@gmail.com
*/

@supports (-webkit-touch-callout: none) {

  /* --- Global font-scaling & smoothing --- */
  html, body {
    -webkit-text-size-adjust: 100% !important;
    text-size-adjust: 100% !important;
    -webkit-font-smoothing: antialiased !important;
    font-smooth: always !important;
    margin: 0;
    padding: 0;
  }

  * {
    -webkit-text-rendering: optimizeLegibility !important;
    text-rendering: optimizeLegibility !important;
    box-sizing: border-box;
  }

  /* --- English text rendering & alignment --- */
  body, p, h1, h2, h3, h4, h5, h6,
  .hs-line-7,
  .product-item-info {
    -webkit-font-smoothing: antialiased !important;
    -moz-osx-font-smoothing: grayscale !important;
    text-rendering: optimizeLegibility !important;
    letter-spacing: 0 !important;
    line-height: 1.3 !important;
  }

  /* --- Urdu & heading scaling fix --- */
  .urdu-heading,
  .hs-line-7,
  .txt-type,
  .product-item-info-a,
  .product-item-info-b {
    font-size: 95% !important;
    line-height: 1.35 !important;
  }

  /* --- Layout consistency --- */
  .video-container,
  .video-container-a,
  .product-item,
  .product-box {
    max-width: 100% !important;
    width: 100% !important;
    margin: 0 auto !important;
  }

  /* --- Prevent text clipping --- */
  .urdu,
  .txt-type,
  .urdu-heading {
    word-wrap: break-word !important;
    white-space: normal !important;
    overflow-wrap: anywhere !important;
  }

  /* --- Direction fixes for mixed Urdu/English --- */
  .urdu-heading,
  .product-item-info-a,
  .product-item-info-b {
    direction: rtl !important;
  }

  [lang="en"],
  .english,
  .hs-line-7 {
    direction: ltr !important;
    text-align: left !important;
    font-family: 'Times New Roman', Times, serif !important;
  }

  /* --- Small screen fine-tuning (≤ 430 px) --- */
  @media (max-width: 430px) {
    .urdu-heading,
    .hs-line-7,
    .txt-type {
      font-size: 90% !important;
      line-height: 1.3 !important;
    }

    .product-item {
      padding: 6px !important;
    }

    .video-container,
    .video-container-a {
      padding: 0 !important;
    }
  }

  /* --- iPhone 15 Pro / SE / High-DPI Font Adjustments --- */
  @media (-webkit-min-device-pixel-ratio: 3),
         (min-resolution: 458dpi) {

    html, body {
      -webkit-text-size-adjust: none !important;
    }

    .urdu-heading,
    .product-item-info-a,
    .product-item-info-b {
      font-size: 93% !important;
      line-height: 1.32 !important;
    }

    .hs-line-7,
    [lang="en"] {
      font-size: 97% !important;
      line-height: 1.3 !important;
    }

    /* Compensate for tighter spacing on newer iPhones */
    .product-item {
      padding: 8px !important;
    }
  }

  /* --- Safe-area handling for Dynamic Island & notches --- */
  body {
    padding-top: env(safe-area-inset-top);
    padding-left: env(safe-area-inset-left);
    padding-right: env(safe-area-inset-right);
    padding-bottom: env(safe-area-inset-bottom);
  }
}
