/* تحسين ترتيب واجهة سطح المكتب - مرستكه */
@media (min-width:981px){
  :root{
    --murastakah-desktop-width:1340px;
    --murastakah-desktop-gutter:max(44px,calc((100vw - var(--murastakah-desktop-width)) / 2));
  }

  .hero,
  .dish-showcase,
  .trust-row,
  .section,
  .order-section,
  .customer-feedback-section{
    padding-left:var(--murastakah-desktop-gutter);
    padding-right:var(--murastakah-desktop-gutter);
  }

  .hero-copy{max-width:640px}
  .hero-art{max-width:570px;justify-self:end}

  .section-heading{
    gap:42px;
    margin-bottom:38px;
  }

  .section-heading > p{
    max-width:470px;
    line-height:1.85;
  }

  .plans-grid{
    grid-template-columns:repeat(3,minmax(0,1fr));
    align-items:stretch;
  }

  .plans-grid > *{
    min-width:0;
    height:100%;
  }

  .dish-showcase-grid{
    grid-template-columns:repeat(4,minmax(0,1fr));
  }

  .drinks-layout{
    grid-template-columns:minmax(0,1fr) minmax(330px,.42fr);
    align-items:start;
    gap:28px;
  }

  .drinks-products{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }

  .catalogue-controls{
    align-items:end;
    gap:24px;
  }

  .catalogue-filters{
    flex:1;
    display:grid;
    grid-template-columns:repeat(3,minmax(165px,1fr));
    gap:12px;
  }

  .order-section{
    grid-template-columns:minmax(330px,.78fr) minmax(0,1.22fr);
    gap:clamp(42px,6vw,88px);
  }

  .order-intro{
    max-width:430px;
  }

  .order-form{
    max-width:none;
  }

  .customer-feedback-layout{
    grid-template-columns:minmax(0,1.08fr) minmax(360px,.92fr);
  }

  #siteVisitorCounter{
    width:min(var(--murastakah-desktop-width),calc(100% - (var(--murastakah-desktop-gutter) * 2)));
    margin-left:auto;
    margin-right:auto;
  }
}

@media (min-width:981px) and (max-width:1199px){
  .dish-showcase-grid,
  #mealGrid.meal-grid{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }

  .catalogue-filters{
    grid-template-columns:repeat(2,minmax(165px,1fr));
  }
}

@media (min-width:1200px){
  #mealGrid.meal-grid{
    grid-template-columns:repeat(3,minmax(0,1fr));
  }
}

/* ضبط معرض الأطباق لسطح المكتب */
@media (min-width:981px){
  .dish-showcase-grid{grid-template-columns:repeat(4,minmax(0,1fr));}
  .dish-showcase-item{grid-column:span 1;}
  .dish-showcase-item.featured{grid-column:span 2;}
}

/* ترتيب الاشتراكات وقائمة الوجبات لسطح المكتب */
@media (min-width:981px){
  .plans-section,
  .drinks-section,
  .catalogue-section{
    padding-top:76px;
    padding-bottom:76px;
  }

  .plans-section .section-heading,
  .drinks-section .section-heading,
  .catalogue-section .section-heading{
    align-items:end;
  }

  .plans-section .section-heading > p,
  .drinks-section .section-heading > p,
  .catalogue-section .section-heading > p{
    margin:0 0 4px;
    max-width:460px;
  }

  .plans-grid{
    gap:20px;
  }

  .plan-card{
    display:flex;
    flex-direction:column;
  }

  .plan-card .button{
    margin-top:auto;
  }

  .delivery-note{
    max-width:1040px;
    margin:28px auto 0;
  }

  .drinks-section .drinks-layout{
    margin-top:22px;
  }

  .catalogue-controls{
    padding:18px;
    border:1px solid rgba(97,73,63,.12);
    border-radius:22px;
    background:rgba(255,253,249,.72);
  }

  .catalogue-filters{
    align-items:end;
  }
}

/* تحسين نموذج الاشتراك على سطح المكتب */
@media (min-width:981px){
  .order-section{
    align-items:start;
    padding-top:78px;
    padding-bottom:78px;
  }

  .order-intro{
    position:sticky;
    top:94px;
    align-self:start;
    padding:30px;
    border:1px solid rgba(97,73,63,.12);
    border-radius:24px;
    background:linear-gradient(145deg,#fffdf9,#f7eee7);
    box-shadow:0 16px 34px rgba(73,47,37,.06);
  }

  .order-intro h2{
    max-width:410px;
    font-size:clamp(2rem,2.8vw,2.85rem);
  }

  .order-intro > p{
    line-height:1.9;
  }

  .health-note{
    margin-top:24px;
  }

  .order-form{
    padding:clamp(28px,3vw,42px);
    border-radius:26px;
  }

  .form-progress{
    display:grid;
    grid-template-columns:repeat(5,minmax(0,1fr));
    gap:8px;
    overflow:visible;
    margin-bottom:36px;
    padding:0 0 18px;
    border-bottom:1px solid rgba(97,73,63,.12);
  }

  .progress-step{
    min-width:0;
    justify-content:center;
    padding-right:8px;
    padding-left:8px;
    text-align:center;
  }

  .form-step-heading{
    margin-bottom:28px;
  }

  .field-grid{
    gap:16px;
  }

  .price-preview{
    margin-top:24px;
    padding:22px;
  }

  .nutrition-estimator,
  .review-box{
    border-radius:20px;
  }

  .weekly-selection{
    margin-top:24px;
  }
}

/* ترتيب تذييل مرستكه لسطح المكتب */
@media (min-width:981px){
  .site-footer{
    grid-template-columns:minmax(240px,1.35fr) repeat(3,minmax(150px,.8fr));
    grid-template-rows:auto auto auto auto;
    column-gap:32px;
    row-gap:20px;
    align-items:start;
    padding:36px clamp(44px,7vw,125px) 18px;
  }

  .footer-brand{
    grid-column:1;
    grid-row:1 / span 2;
  }

  .site-footer > div:nth-child(2){
    grid-column:2;
    grid-row:1;
  }

  .site-footer > div:nth-child(3){
    grid-column:2;
    grid-row:2;
  }

  .site-footer > div:nth-child(4){
    grid-column:3;
    grid-row:1 / span 2;
  }

  .footer-policy-links{
    grid-column:4;
    grid-row:1;
  }

  .ecommerce-verification{
    grid-column:4;
    grid-row:2;
    justify-self:stretch;
    align-self:start;
    max-width:250px;
    min-height:auto;
    padding:14px;
  }

  .footer-brand img{
    width:145px;
    height:84px;
    margin-bottom:4px;
  }

  .footer-brand p{
    max-width:340px;
    margin:4px 0 12px;
    line-height:1.7;
  }

  .footer-contact-list{
    display:grid;
    gap:8px;
    max-width:360px;
  }

  .footer-contact-list a{
    margin:0;
    color:#edf4f0;
    font-size:.8rem;
    line-height:1.65;
    overflow-wrap:anywhere;
  }

  .site-footer h3{
    margin-bottom:8px;
  }

  .site-footer a{
    margin:4px 0;
    line-height:1.65;
  }

  .footer-document{
    grid-column:1 / -1;
    grid-row:3;
    padding-top:16px;
    border-top:1px solid rgba(255,255,255,.13);
    color:#edf4f0;
    font-size:.82rem;
  }

  .footer-bottom{
    grid-column:1 / -1;
    grid-row:4;
    padding-top:2px;
    border-top:0;
  }
}

/* المشروبات الصحية في صف واحد على سطح المكتب */
@media (min-width:981px){
  .drinks-section .drinks-layout{
    grid-template-columns:minmax(0,1fr) minmax(300px,.42fr);
    gap:22px;
  }

  .drinks-products{
    display:grid;
    grid-template-columns:repeat(4,minmax(0,1fr));
    gap:14px;
  }

  .drinks-products > *{
    min-width:0;
  }
}

/* منع تمدد قائمة الوجبات أفقيًا على سطح المكتب */
@media (min-width:981px){.catalogue-section{overflow-x:hidden}.catalogue-section #mealGrid.meal-grid{display:grid!important;width:100%!important;max-width:100%!important;min-width:0!important;grid-template-columns:repeat(3,minmax(0,1fr))!important}.catalogue-section #mealGrid.meal-grid>*{min-width:0!important;max-width:100%!important;width:auto!important}}

/* منع أي امتداد أفقي للصفحة على سطح المكتب */
@media (min-width:981px){html,body{width:100%!important;max-width:100%!important;overflow-x:hidden!important}main,.site-header,.site-footer{max-width:100%!important;min-width:0!important;overflow-x:hidden!important}.catalogue-section,.catalogue-section #mealGrid.meal-grid{min-width:0!important;max-width:100%!important;overflow-x:hidden!important}.catalogue-section #mealGrid.meal-grid>*,.catalogue-section #mealGrid .meal-card{min-width:0!important;max-width:100%!important}}

/* تصحيح عرض الكتالوج على سطح المكتب: الأقسام كاملة، والبطاقات أصغر وأوضح */
@media (min-width:981px){
  .catalogue-section #mealGrid{
    display:grid !important;
    grid-template-columns:minmax(0,1fr) !important;
    gap:26px !important;
    width:100% !important;
    max-width:100% !important;
    min-width:0 !important;
  }

  .catalogue-section .meal-category-group{
    width:100% !important;
    max-width:100% !important;
    min-width:0 !important;
    overflow:hidden !important;
  }

  .catalogue-section .meal-category-group > .meal-grid{
    display:grid !important;
    grid-template-columns:repeat(4,minmax(0,1fr)) !important;
    gap:16px !important;
    width:100% !important;
    max-width:100% !important;
    min-width:0 !important;
  }

  .catalogue-section .meal-category-head{
    align-items:end;
    gap:14px;
    margin-bottom:16px;
  }

  .catalogue-section .meal-category-head h3{
    font-size:2rem !important;
    line-height:1.2 !important;
  }

  .catalogue-section .meal-card{
    min-width:0 !important;
    max-width:100% !important;
    padding:16px 14px !important;
    border-radius:20px !important;
  }

  .catalogue-section .meal-card h3{
    font-size:clamp(1.25rem,1.35vw,1.55rem) !important;
    line-height:1.35 !important;
    margin-bottom:10px !important;
    word-break:break-word;
  }

  .catalogue-section .meal-card small,
  .catalogue-section .meal-card .meal-card-note,
  .catalogue-section .meal-card p{
    font-size:.82rem !important;
    line-height:1.6 !important;
  }

  .catalogue-section .meal-card img{
    width:100% !important;
    max-height:170px !important;
    object-fit:cover !important;
    border-radius:16px !important;
  }
}

@media (min-width:981px) and (max-width:1260px){
  .catalogue-section .meal-category-group > .meal-grid{
    grid-template-columns:repeat(3,minmax(0,1fr)) !important;
  }
}

/* ترتيب الكتالوج حسب التصنيف: صفوف واضحة وبطاقات متوازنة */
@media (min-width:981px){
  .catalogue-section #mealGrid{
    display:block!important;
    width:100%!important;
    max-width:100%!important;
    min-width:0!important;
  }
  .catalogue-section #mealGrid>.meal-category-group{
    display:block!important;
    width:100%!important;
    max-width:100%!important;
    margin:0 0 26px!important;
    padding:18px!important;
    overflow:hidden!important;
  }
  .catalogue-section #mealGrid>.meal-category-group>.meal-grid{
    display:grid!important;
    width:100%!important;
    max-width:100%!important;
    min-width:0!important;
    grid-template-columns:repeat(5,minmax(0,1fr))!important;
    gap:16px!important;
  }
  .catalogue-section .meal-category-head{
    align-items:center!important;
    margin-bottom:16px!important;
  }
  .catalogue-section .meal-category-head h3{
    font-size:1.45rem!important;
    line-height:1.25!important;
  }
  .catalogue-section .meal-card{
    min-width:0!important;
    min-height:0!important;
    padding:14px!important;
    border-radius:18px!important;
  }
  .catalogue-section .meal-card>*{min-width:0!important;}
  .catalogue-section .meal-card h3{
    font-size:1.08rem!important;
    line-height:1.38!important;
    margin:9px 0 10px!important;
  }
  .catalogue-section .meal-card-image{
    height:135px!important;
    margin-bottom:.65rem!important;
  }
  .catalogue-section .meal-card-description{
    font-size:.76rem!important;
    line-height:1.55!important;
    margin:.25rem 0 .65rem!important;
  }
  .catalogue-section .meal-card-price,
  .catalogue-section .meal-card-note{
    font-size:.74rem!important;
  }
}
@media (min-width:1500px){
  .catalogue-section #mealGrid>.meal-category-group>.meal-grid{
    grid-template-columns:repeat(6,minmax(0,1fr))!important;
  }
}
@media (min-width:981px) and (max-width:1199px){
  .catalogue-section #mealGrid>.meal-category-group>.meal-grid{
    grid-template-columns:repeat(4,minmax(0,1fr))!important;
  }
}

/* الكتالوج: كل تصنيف في صف مستقل وتحته بطاقاته */
@media (min-width:981px){
  .catalogue-section{
    overflow-x:hidden !important;
  }

  .catalogue-section #mealGrid,
  .catalogue-section #mealGrid.meal-grid{
    display:block !important;
    width:100% !important;
    max-width:100% !important;
    min-width:0 !important;
    overflow:hidden !important;
  }

  .catalogue-section .meal-category-group{
    display:block !important;
    width:100% !important;
    max-width:100% !important;
    min-width:0 !important;
    margin:0 0 34px !important;
    padding:22px !important;
    border-radius:24px !important;
    overflow:hidden !important;
  }

  .catalogue-section .meal-category-head{
    display:flex !important;
    align-items:center !important;
    justify-content:space-between !important;
    gap:16px !important;
    margin-bottom:20px !important;
  }

  .catalogue-section .meal-category-head h3{
    font-size:1.65rem !important;
    line-height:1.25 !important;
    margin:0 !important;
  }

  .catalogue-section .meal-category-head b{
    flex:0 0 auto !important;
  }

  .catalogue-section .meal-category-group .meal-grid{
    display:grid !important;
    grid-template-columns:repeat(5,minmax(0,1fr)) !important;
    gap:16px !important;
    width:100% !important;
    max-width:100% !important;
    min-width:0 !important;
    margin:0 !important;
    overflow:hidden !important;
  }

  .catalogue-section .meal-card{
    min-width:0 !important;
    max-width:100% !important;
    width:auto !important;
    min-height:0 !important;
    padding:14px !important;
    border-radius:18px !important;
  }

  .catalogue-section .meal-card-image{
    height:135px !important;
    border-radius:14px !important;
    margin-bottom:10px !important;
  }

  .catalogue-section .meal-card h3{
    font-size:1.05rem !important;
    line-height:1.4 !important;
    margin:8px 0 10px !important;
  }

  .catalogue-section .meal-card-description{
    font-size:.78rem !important;
    line-height:1.55 !important;
    margin:.25rem 0 .65rem !important;
  }

  .catalogue-section .meal-card-price,
  .catalogue-section .meal-card-note,
  .catalogue-section .meal-card small{
    font-size:.74rem !important;
  }
}

@media (min-width:1500px){
  .catalogue-section .meal-category-group .meal-grid{
    grid-template-columns:repeat(6,minmax(0,1fr)) !important;
  }
}

@media (min-width:981px) and (max-width:1250px){
  .catalogue-section .meal-category-group .meal-grid{
    grid-template-columns:repeat(4,minmax(0,1fr)) !important;
  }
}
