/**
 * رزقي هب - أنماط التجاوب (Responsive)
 * @breakpoints: Mobile (<600px), Tablet (601-1200px), Desktop (>1200px)
 */

/* 📱 الجوال (<600px) */
@media (max-width: 600px) {
  :root { font-size: 14px; }
  
  .container { padding-inline: 0.75rem; }
  
  /* شريط التنقل */
  .nav-drawer-btn { display: block; }
  .navbar-menu { display: none; }
  .navbar-search { max-width: 100%; order: 3; flex-basis: 100%; }
  .navbar-inner { flex-wrap: wrap; }
  
  /* القائمة الجانبية */
  .drawer { width: 100%; max-width: 320px; }
  
  /* الشبكة والبطاقات */
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .grid-auto { grid-template-columns: repeat(2, 1fr); }
  
  .card { border-radius: var(--radius-sm); }
  .product-image { aspect-ratio: 1/1; }
  
  /* النماذج والأزرار */
  .btn { width: 100%; }
  .btn-block-mobile { width: 100%; }
  .form-row { grid-template-columns: 1fr; }
  
  /* الدردشة */
  .chat-layout {
    grid-template-columns: 1fr;
    height: auto;
    min-height: 80vh;
  }
  .chat-list { max-height: 200px; border-left: none; border-bottom: 1px solid var(--color-border-light); }
  
  /* التذييل */
  .footer-grid { grid-template-columns: 1fr; text-align: center; }
  .footer-title::after { right: 50%; transform: translateX(50%); }
  .footer-links { display: inline-block; text-align: right; }
  
  /* إخفاء العناصر */
  .hidden-mobile { display: none !important; }
  .show-mobile { display: block !important; }
  
  /* تحسين اللمس */
  .nav-icon, .btn-ghost { min-width: 44px; min-height: 44px; }
  input, button, select, textarea { font-size: 16px !important; } /* منع التكبير التلقائي في iOS */
}

/* 📱 التابلت (601px - 1200px) */
@media (min-width: 601px) and (max-width: 1200px) {
  :root { font-size: 15px; }
  
  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-auto { grid-template-columns: repeat(3, 1fr); }
  
  .navbar-search { max-width: 360px; }
  
  .chat-layout { grid-template-columns: 280px 1fr; }
  
  .hidden-tablet { display: none !important; }
  .show-tablet { display: block !important; }
}

/* 🖥️ سطح المكتب (>1200px) */
@media (min-width: 1201px) {
  .grid-4 { grid-template-columns: repeat(4, 1fr); }
  .grid-auto { grid-template-columns: repeat(4, 1fr); }
  
  .product-image { aspect-ratio: 4/3; }
  
  .navbar-search { max-width: 480px; }
  
  /* تحسينات الجدول */
  .table-responsive { overflow: visible; }
  .table th, .table td { padding: 1rem 1.25rem; }
  
  /* تأثيرات الهوفر */
  .card:hover { transform: translateY(-6px); }
  .btn-primary:hover { transform: translateY(-2px); }
  
  .hidden-desktop { display: none !important; }
  .show-desktop { display: block !important; }
}

/* ️ الطباعة */
@media print {
  .navbar, .drawer, .chat-layout, .footer, .btn, .nav-icon { display: none !important; }
  body { background: #fff; color: #000; }
  .card { box-shadow: none; border: 1px solid #ddd; }
}