@media (max-width: 1100px) {
  .product-grid { grid-template-columns: repeat(3, 1fr); }
  .category-grid { grid-template-columns: repeat(3, 1fr); }
  .footer-grid, .seller-grid, .review-grid, .feature-grid { grid-template-columns: 1fr 1fr; }
  /* تحسين: منع المكعبات من التمدد الزائد */
  .feature-card { min-height: 140px; max-height: 220px; }
  .review-card { min-height: 160px; max-height: 240px; }
  .seller-card { min-height: 120px; max-height: 180px; }
}

@media (max-width: 900px) {
  .header-top { grid-template-columns: auto 1fr auto; gap: 10px; }
  .account-label { display: none; }
  .hero-grid, .offers-layout, .catalog, .detail-grid, .cart-layout, .checkout-layout, .dash { grid-template-columns: 1fr; }
  .hero-visual { min-height: 0; }
  .hero-photo { height: 320px; }
  .hero-card { left: 12px; width: min(200px, 70%); }
  .filters, .summary { position: static; }
  .dash-side { position: static; }
  .newsletter { flex-direction: column; align-items: stretch; }
  .product-grid { grid-template-columns: repeat(2, 1fr); }
  .nav-toggle { display: grid; place-items: center; }
  .cat-bar { display: none; }
  body.nav-open .mobile-panel { display: grid; }
  .mobile-panel { padding: 8px 16px 16px; gap: 4px; }
  .mobile-panel a, .mobile-panel button {
    text-align: left; text-decoration: none; color: white; background: transparent; border: 0;
    padding: 10px 4px; border-bottom: 1px solid rgba(255,255,255,.08); font-weight: 700;
  }
}

@media (max-width: 680px) {
  .header-top { grid-template-columns: 1fr auto; }
  .search { grid-column: 1 / -1; order: 3; }
  .category-grid, .product-grid, .footer-grid, .seller-grid, .review-grid, .feature-grid { grid-template-columns: 1fr; }
  .hero h1 { font-size: 38px; }
  .cart-item { grid-template-columns: 76px 1fr; }
  .cart-item .line-side { grid-column: 2; }
  .detail-actions, .hero-actions { flex-direction: column; }
  .gallery img { height: 240px; }
  .detail-card h1 { font-size: 22px; }
  .stat-grid { grid-template-columns: 1fr 1fr; }
  .table-wrap { overflow: auto; }
  .newsletter form { flex-direction: column; border-radius: 18px; }
  .section-head, .page-head { align-items: start; flex-direction: column; }
  /* تحسين: إزالة القيود على الموبايل */
  .feature-card, .review-card, .seller-card { 
    min-height: auto; 
    max-height: none;
  }
}
