/* ============================================================
   SULAYMAN COFFEE — mobile-improvements.css  v1
   تحسينات بصرية للموبايل — mobile-first
   يُضاف بعد visual-improvements.css
   ============================================================ */

/* ══════════════════════════════════════════════════════
   كل شيء هنا محصور بـ max-width: 768px
   لا يلمس الديسكتوب إطلاقاً
══════════════════════════════════════════════════════ */

@media (max-width: 768px) {
  /* ══ 1. HERO — أضخم وأوضح على الشاشة الصغيرة ══ */

  .hero {
    padding: 90px 5% 3.5rem;
    min-height: 96svh; /* svh = شاشة حقيقية بدون address bar */
  }

  /* العنوان — يملأ الشاشة بجرأة */
  .hero h1 {
    font-size: clamp(3.2rem, 12.5vw, 5rem);
    line-height: 1.1;
    margin-bottom: 1.4rem;
    letter-spacing: -0.02em;
  }

  .hero h1 em {
    font-size: 1.05em; /* em أكبر قليلاً من الأول */
  }

  /* الوصف — أقصر وأوضح */
  .hero-desc {
    font-size: 0.96rem;
    line-height: 1.95;
    margin-bottom: 2rem;
    max-width: 100%;
    opacity: 0.82;
  }

  /* الأزرار — أكبر وأسهل للضغط */
  .hero-btns {
    gap: 0.8rem;
    flex-direction: column;
    align-items: flex-start;
  }

  .btn-fill {
    width: 100%;
    justify-content: center;
    padding: 1.1rem 2rem;
    font-size: 1rem;
    border-radius: 4px;
  }

  .btn-line {
    width: 100%;
    text-align: center;
    padding: 1rem 2rem;
    font-size: 1rem;
  }

  /* الـ pre-label أصغر على الموبايل */
  .hero-pre {
    font-size: 0.62rem;
    letter-spacing: 0.28em;
    margin-bottom: 1.4rem;
  }

  /* ══ 2. NUMBAR — شبكة 2×2 أوضح ══ */

  .numbar {
    grid-template-columns: 1fr 1fr;
    gap: 2px;
  }

  .nitem {
    padding: 2rem 1rem;
  }

  .nval {
    font-size: clamp(2.6rem, 10vw, 3.6rem);
  }

  .nlbl {
    font-size: 0.7rem;
    letter-spacing: 0.04em;
  }

  /* ══ 3. STORY — نص أريح ══ */

  .story-sec {
    padding: 5rem 5%;
    gap: 3rem;
  }

  .story-sec h2 {
    font-size: clamp(2rem, 9vw, 3rem);
    margin-bottom: 1.4rem;
  }

  .story-sec p {
    font-size: 0.94rem;
    line-height: 2.05;
  }

  .s-tag {
    font-size: 1.35rem;
    margin-top: 1.4rem;
  }

  /* التايم لاين — padding أوسع */
  .tl-row {
    padding: 1.6rem 0.5rem;
    gap: 1.2rem;
  }

  .tl-yr {
    font-size: 1.5rem;
    min-width: 60px;
  }

  .tl-t {
    font-size: 0.95rem;
    margin-bottom: 0.3rem;
  }

  .tl-d {
    font-size: 0.83rem;
    line-height: 1.75;
  }

  /* ══ 4. PRODUCTS — بطاقات أوضح وأكبر ══ */

  .prod-sec {
    padding: 4.5rem 4%;
  }

  /* اسم المنتج أكبر */
  .pname {
    font-size: 1.25rem;
    line-height: 1.25;
  }

  /* الوصف — سطرين كافي */
  .pdesc {
    font-size: 0.83rem;
    line-height: 1.65;
    -webkit-line-clamp: 2;
    line-clamp: 2;
  }

  /* السعر أوضح */
  .pprice {
    font-size: 1.4rem;
  }

  /* زر أضف — أسهل للضغط */
  .addbtn {
    padding: 10px 18px;
    font-size: 0.88rem;
    border-radius: 6px;
    min-height: 44px; /* حد iOS الأدنى للضغط */
  }

  /* أزرار الوزن — أكبر */
  .wbtn {
    padding: 0.4rem 0.9rem;
    font-size: 0.65rem;
    min-height: 36px;
  }

  /* شريط الفلاتر — scroll أفقي */
  .fbar {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 4px;
    margin-bottom: 1.2rem;
    gap: 0.35rem;
  }
  .fbar::-webkit-scrollbar {
    display: none;
  }

  .ftab {
    white-space: nowrap;
    flex-shrink: 0;
    padding: 0.55rem 1.1rem;
    font-size: 0.82rem;
    min-height: 40px;
  }

  /* صورة المنتج — ارتفاع أقل على الموبايل */
  .pimg-wrap {
    height: 200px;
  }

  /* ══ 5. PROCESS — أجمل على الشاشة الصغيرة ══ */

  .proc-sec {
    padding: 5rem 4%;
  }

  .proc-grid {
    grid-template-columns: 1fr 1fr;
    gap: 0;
    margin-top: 3.5rem;
  }

  .pstep {
    padding: 2rem 1rem;
    border-bottom: 1px solid rgba(34, 40, 51, 0.08);
  }

  .pstep:nth-child(odd) {
    border-left: 1px solid rgba(34, 40, 51, 0.08);
  }

  .pstep-n {
    width: 40px;
    height: 40px;
    font-size: 0.95rem;
    margin-bottom: 1.2rem;
  }

  .pstep-ic {
    width: 52px;
    height: 52px;
    margin-bottom: 1rem;
  }

  .pstep-ic svg {
    width: 22px;
    height: 22px;
  }

  .pstep-t {
    font-size: 1.05rem;
    margin-bottom: 0.5rem;
  }

  .pstep-d {
    font-size: 0.82rem;
    line-height: 1.8;
  }

  /* ══ 6. BREW GUIDE — tabs أفضل ══ */

  .brew-sec {
    padding: 5rem 4%;
  }

  .btabs {
    gap: 0;
    border-bottom-color: rgba(255, 255, 255, 0.15);
    margin: 2.5rem 0 2rem;
  }

  .btab {
    padding: 0.75rem 1.2rem;
    font-size: 0.8rem;
    min-height: 44px; /* سهولة الضغط */
    white-space: nowrap;
  }

  /* الخطوات — أوضح */
  .bstep {
    gap: 1.2rem;
    padding: 1rem 0;
  }

  .bsn {
    font-size: 1.6rem;
    min-width: 28px;
  }

  .bst {
    font-size: 0.91rem;
    line-height: 1.85;
  }

  /* الـ specs — شبكة 2×2 */
  .bspecs {
    grid-template-columns: 1fr 1fr;
    margin-top: 2rem;
  }

  .bspec {
    padding: 1.5rem 1rem;
  }

  .bsval {
    font-size: 2.2rem;
    margin-bottom: 0.35rem;
  }

  .bskey {
    font-size: 0.7rem;
  }

  /* ══ 7. REVIEWS — أسهل قراءة ══ */

  .reviews-sec {
    padding: 5rem 4%;
  }

  .rcard {
    padding: 1.5rem;
  }

  .rcard-text {
    font-size: 0.88rem;
    line-height: 1.85;
  }

  .rcard-name {
    font-size: 0.85rem;
  }

  /* ══ 8. ORDER — أسهل للضغط ══ */

  .ord-sec {
    padding: 5rem 4%;
  }

  .ord-title {
    font-size: clamp(2.2rem, 10vw, 3.5rem);
    line-height: 1.1;
  }

  .omethod {
    padding: 2rem 1.5rem;
  }

  .omic {
    font-size: 2rem;
    margin-bottom: 0.8rem;
  }

  .omname {
    font-size: 1.3rem;
    margin-bottom: 0.3rem;
  }

  .omdesc {
    font-size: 0.86rem;
    line-height: 1.7;
  }

  /* ══ 9. NAV موبايل — تحسين ══ */

  nav {
    height: 62px;
    padding: 0 4%;
  }

  .nav-logo img {
    height: 46px;
  }

  .cart-trigger {
    font-size: 0.85rem;
  }

  /* ══ 10. Bottom Nav — تحسين بصري ══ */

  .bottom-nav {
    background: rgba(22, 27, 38, 0.98);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-top: 1px solid rgba(176, 141, 87, 0.18);
    height: calc(62px + env(safe-area-inset-bottom));
  }

  .bnav-item {
    font-size: 0.56rem;
    letter-spacing: 0.01em;
    gap: 4px;
    padding: 0.45rem 0.5rem;
    min-height: 44px;
  }

  .bnav-item svg {
    width: 23px;
    height: 23px;
  }

  .bnav-item.active {
    color: var(--org);
  }

  /* نقطة فعّالة تحت الأيقونة */
  .bnav-item.active::after {
    content: '';
    position: absolute;
    bottom: 6px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 4px;
    background: var(--org);
    border-radius: 50%;
  }

  /* ══ 11. Modal — full screen على الموبايل ══ */

  .modal {
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    max-width: 100%;
    height: 100%;
    max-height: 100%;
    border-radius: 0;
    transform: translateY(40px);
    transition: transform 0.38s cubic-bezier(0.34, 1.36, 0.64, 1),
      opacity 0.28s ease;
  }

  .modal::before {
    display: none;
  }

  .modal.open {
    transform: translateY(0);
    left: 0;
    right: 0;
  }

  .md2-img-wrap {
    height: 52vw;
    min-height: 220px;
    max-height: 300px;
    border-radius: 0;
  }

  .md2-body {
    padding: 1.2rem 1.2rem 0.5rem;
  }

  .md2-name {
    font-size: 1.75rem;
  }

  .md2-footer {
    padding: 0.9rem 1.2rem;
    padding-bottom: calc(0.9rem + env(safe-area-inset-bottom));
  }

  .modal-add {
    padding: 0.9rem 1.8rem;
    font-size: 0.95rem;
    min-height: 48px;
  }

  /* ══ 12. Cart & Wish Panels — تجربة أفضل (Bottom Sheet) ══ */

  .cart-pnl,
  .wish-pnl {
    width: 100% !important;
    border-radius: 16px 16px 0 0;
    top: auto;
    bottom: 0;
    height: 90svh;
    transform: translateY(100%);
    border-right: none;
    border-left: none; /* لإلغاء حد المفضلة الجانبي */
    border-top: 1px solid rgba(176, 141, 87, 0.15);
  }

  .cart-pnl.open,
  .wish-pnl.open {
    transform: translateY(0);
  }

  /* مقبض السحب — يتحكم فيه cart-light.css */
  .cphead {
    position: relative;
    padding-top: 2rem;
  }

  /* ══ 13. الـ Search — أكبر وأسهل ══ */

  .search-input {
    font-size: 1rem;
    padding: 1rem 1.2rem 1rem 3rem;
    min-height: 48px;
  }

  /* ══ 14. Section labels — أصغر على الموبايل ══ */

  .sec-ttl {
    font-size: clamp(1.9rem, 7.5vw, 2.8rem);
  }

  /* ══ 15. الـ progress bar — أوضح ══ */

  #page-progress {
    height: 3px;
  }

  /* ══ 16. Marquee — سرعة أبطأ قليلاً ══ */

  .mtrack {
    animation-duration: 38s;
  }

  /* ══ 17. الـ review form — full width ══ */

  .review-form {
    padding: 1.5rem;
  }

  .rf-title {
    font-size: 1.3rem;
  }

  .rf-submit {
    min-height: 48px;
    font-size: 1rem;
  }

  /* ══ 18. Footer — مضغوط أكثر ══ */

  footer {
    padding: 4rem 5% 1.5rem;
  }

  .fbl img {
    height: 60px;
  }

  .fbl p {
    font-size: 0.86rem;
    line-height: 1.7;
    max-width: 100%;
  }

  .fbot {
    font-size: 0.6rem;
    flex-direction: column;
    align-items: center;
    gap: 0.4rem;
    text-align: center;
  }

  /* ══ 19. Lightbox — يملأ الشاشة ══ */

  .lightbox-img {
    max-width: 96vw;
    max-height: 80svh;
  }
} /* end @media max-width: 768px */

/* ══════════════════════════════════════════════════════
   تحسينات إضافية لأصغر الشاشات (iPhone SE وما شابه)
══════════════════════════════════════════════════════ */
@media (max-width: 390px) {
  .hero h1 {
    font-size: clamp(2.8rem, 13vw, 4rem);
  }

  .btn-fill,
  .btn-line {
    font-size: 0.95rem;
  }

  .pname {
    font-size: 1.15rem;
  }

  .proc-grid {
    grid-template-columns: 1fr; /* عمود واحد على أصغر شاشة */
  }

  .pstep:nth-child(odd) {
    border-left: none;
  }

  .btab {
    padding: 0.7rem 1rem;
    font-size: 0.76rem;
  }

  .nval {
    font-size: clamp(2.2rem, 9vw, 3rem);
  }
}

/* ══════════════════════════════════════════════════════
   تحسينات اللمس — Touch targets كافية لكل العناصر
══════════════════════════════════════════════════════ */
@media (hover: none) and (pointer: coarse) {
  /* كل عنصر تفاعلي ≥ 44px */
  .ftab,
  .btab,
  .wbtn,
  .addbtn,
  .modal-wbtn,
  .fcard-wbtn,
  .qb,
  .rf-submit,
  .wabtn,
  .bnav-item {
    min-height: 44px;
  }

  /* إلغاء hover states على اللمس */
  .pcard:hover {
    transform: none;
    box-shadow: none;
  }

  /* تأثير ضغط بدل hover */
  .pcard:active {
    transform: scale(0.98);
    transition: transform 0.15s;
  }

  .btn-fill:active,
  .btn-line:active {
    transform: scale(0.97);
    transition: transform 0.12s;
  }

  .addbtn:active {
    transform: scale(0.95);
  }

  .omethod:active {
    background: rgba(237, 97, 59, 0.12);
    transform: scale(0.99);
  }

  /* بطاقات المنتج — تأثير ضغط واضح */
  .pcard:active .pimg-wrap img {
    transform: scale(1.02);
  }
}

/* ══════════════════════════════════════════════════════
   تقليل الحركة — احترام تفضيلات المستخدم
══════════════════════════════════════════════════════ */
@media (prefers-reduced-motion: reduce) {
  .modal,
  .cart-pnl,
  .wish-pnl {
    transition: opacity 0.2s !important;
    transform: none !important;
  }
  .modal.open,
  .cart-pnl.open,
  .wish-pnl.open {
    transform: none !important;
  }
}