/* =========================================================
   بن القبطان — تظبيط الموبايل (الهيدر والفوتر)
   الملف ده لازم يتحمّل آخر ملف CSS في الصفحة
   ========================================================= */

@media (max-width: 700px) {

  /* ================= الهيدر ================= */

  /* صفّين: اللوجو فوق، والقايمة تحته.
     وبنخلّي الهيدر يلصق بـ top سالب، فصف اللوجو يطلع مع السكرول
     وصف القايمة يفضل ثابت فوق. */
  header.products-header {
    position: sticky !important;
    top: -50px !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    padding: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 0 !important;
    overflow: visible !important;
    border-radius: 0 0 18px 18px !important;
  }

  header.products-header .products-logo {
    position: static !important;
    inset: auto !important;
    transform: none !important;
    height: 50px !important;
    margin: 0 !important;
    padding: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
  }

  header.products-header .products-logo h2 {
    margin: 0 !important;
    font-size: 22px !important;
    line-height: 1 !important;
  }

  header.products-header nav {
    position: static !important;
    inset: auto !important;
    width: 100% !important;
    height: 46px !important;
    min-height: 46px !important;
    max-height: 46px !important;
    margin: 0 !important;
    padding: 0 16px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 10px !important;
    direction: rtl;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    border-top: 1px solid rgba(215, 161, 93, 0.18);
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }

  header.products-header nav::-webkit-scrollbar {
    display: none;
  }

  header.products-header nav a {
    flex: 0 0 auto;
    height: 46px !important;
    line-height: 46px !important;
    padding: 0 2px !important;
    font-size: 14.5px !important;
    white-space: nowrap;
    -webkit-tap-highlight-color: transparent;
  }

  header.products-header nav a::after {
    bottom: 4px !important;
  }

  header.products-header nav a:hover {
    transform: none !important;
  }

  /* زرار السلة يفضل تحت الهيدر */
  .cart-button {
    top: 108px !important;
  }

  /* ================= الفوتر ================= */

  .contact-footer {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 26px !important;
    padding: 36px 20px 22px !important;
    text-align: center !important;
  }

  .contact-footer > div {
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .contact-footer h3 {
    margin: 0 0 12px !important;
    font-size: 18px !important;
  }

  .contact-footer p {
    margin: 0 !important;
    max-width: 320px;
    font-size: 14.5px !important;
    line-height: 1.9 !important;
  }

  .contact-footer a {
    min-height: 38px;
    margin-left: auto !important;
    margin-right: auto !important;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 14.5px !important;
  }

  .contact-footer .footer-location {
    display: flex !important;
    max-width: 300px;
    line-height: 1.7;
  }

  /* روابط سريعة: في صف واحد بدل ما تبقى فوق بعض */
  .contact-footer > div:nth-child(2) {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    gap: 4px 22px;
  }

  .contact-footer > div:nth-child(2) h3 {
    width: 100%;
  }

  .contact-footer .social-icons {
    justify-content: center;
    gap: 14px;
  }

  .contact-footer .social-icons a {
    width: 44px;
    height: 44px;
    min-height: 44px;
  }

  .contact-footer-bottom {
    grid-column: auto !important;
    margin-top: 0 !important;
    padding-top: 16px !important;
    font-size: 13px !important;
  }

  /* ================= أسعار العروض (الرئيسية) ================= */

  .offer-price {
    display: flex !important;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: center;
    gap: 2px 8px;
  }

  .offer-price .new-price,
  .offer-price .old-price {
    white-space: nowrap;
  }
}

/* الشاشات الضيقة جداً */
@media (max-width: 360px) {
  header.products-header nav {
    padding: 0 10px !important;
    gap: 6px !important;
  }

  header.products-header nav a {
    font-size: 13.5px !important;
  }
}