/* =========================
   Mango Jazan — Raed theme
   Final consolidated CSS
   (keeps current look, lighter on perf)
========================= */

/* Tokens */
:root{
  --brand: #fecd04;
  --ink:   #333333;
  --bg:    #f3f4f6;
  --promo: #859e3b;
  --price-card: #bf2c16;
}

/* خلفية عامة + الهيدر */
body{ background: var(--bg); }
.main-nav-container{ box-shadow:none; background-color: var(--brand); }
.top-navbar{ background-color: var(--brand); }
i.header-btn__icon{ border:none; }
.navbar-brand img{ padding:5px; max-height:4rem !important; }

/* أول بانر ثابت */
section.s-block.s-block--fixed-banner:nth-of-type(1){ margin-top:0; }
section.s-block.s-block--fixed-banner:nth-of-type(1) .container{ max-width:100%; padding:0; }
.banner--fixed img{ border-radius:0; background:transparent; display:block; width:100%; height:auto; }

/* بحث + أزرار هيدر */
.top-navbar .s-search-input{ border-radius:5px !important; background-color:#ffdc4c !important; }
.header-buttons>button{ background-color:#ffdc4c; border-radius:5px; }

/* عناوين السكاشن */
section:not(.s-block.s-block--categories) .s-slider-block__title-left:has(.s-slider-block__title-nav),
.store-footer__inner .grid>div:nth-of-type(1)>a h3{ display:none; }

html[dir="rtl"] section:not(.s-block.s-block--categories) .s-slider-block__title h2,
html[dir="rtl"] section:has(salla-products-list) .s-block__title h2{
  padding:5px 12px; border-right:4px solid var(--brand); border-radius:3px;
}
html[dir="ltr"] .s-slider-block__title h2,
html[dir="ltr"] section:has(salla-products-list) .s-block__title h2{
  padding:5px 12px; border-left:4px solid var(--brand); border-radius:3px;
}

/* سكشن البانرات */
section.s-block.s-block--banners{ margin-top:2rem; }
section.s-block.s-block--banners .grid{ grid-template-columns: repeat(4, minmax(0,1fr)); }
section.s-block.s-block--banners .right-side{ padding-left:0; }
section.s-block.s-block--banners .right-side h2{ color:var(--brand); font-size:22px; }

/* البنرات عريضة 16:9 بدل ارتفاعات ثابتة */
section.s-block.s-block--banners .grid a.banner-entry,
a.banner-entry.square-photos{
  display:block;
  height:auto !important;
  aspect-ratio: 16 / 9;
  overflow:hidden;
  background:transparent;
}
section.s-block.s-block--banners .grid a.banner-entry img{
  width:100%; height:100%; object-fit:cover;
}

/* الفوتر */
.store-footer__inner{ background: transparent !important; }
footer.store-footer{ background-color: var(--brand) !important; margin-top:4rem !important; }
.store-footer__inner *{ border-color: transparent !important; text-align:center; }
.store-footer__inner .grid>div:nth-of-type(1),
.store-footer__inner .grid>.s-apps-icons{ grid-column:span 1 / span 1; padding:0; }
.store-footer__inner .grid>div:nth-of-type(1)>a,
salla-social.s-social-list,
a.s-contacts-item,
.store-footer__inner .grid>div:nth-of-type(1)>div.flex,
.s-apps-icons-list,
section.s-block.s-block--banners .s-block__title,
.s-product-card-content-sub{ justify-content:center; }
.store-footer__inner .grid>div:nth-of-type(1)>a::after{
  content:""; display:block; width:100px; height:81px;
  background-image:url(https://cdn.salla.sa/cdn-cgi/image/fit=scale-down,width=400,height=400,onerror=redirect,format=auto/reYwX/jx3bqJig3ogssRD7bD5u2XsQsXDmDtZk1TVrh0E7.png);
  background-size:cover;
}
.store-footer__inner .grid>div:nth-of-type(1) p{ margin:10px auto; }
.s-user-menu-trigger{ background:transparent; }

/* بطاقات/منتجات */
.s-product-card-out-of-stock img{ filter:none !important; }
.s-product-card-content-title a,
p.s-product-card-content-subtitle{ text-align:center; }
.s-product-card-promotion-title{ background-color: var(--promo); }
h4.s-product-card-price{ color: var(--price-card); }

/* فيديو بعرض كامل */
section.s-block.s-block--video .container{ max-width:100%; padding:0; }

/* القائمة العلوية */
.main-menu li.root-level>a{ color:#333333 !important; }

/* أزرار غير مفعّلة + ملخص السلة */
button.s-button-outline.s-button-wide.s-button-light-outline.s-button-disabled{ color:#0d121a !important; border-color:#374151 !important; }
p.s-cart-summary-content b{ color:#374151; }

/* تصغير Padding لأصغر الشاشات */
@media(max-width:350px){
  button.s-button-outline.s-button-wide.s-button-light-outline.s-button-disabled,
  button.s-button-outline.s-button-wide.s-button-light-outline{ padding:5px 8px; }
}

/* سلايدر الأقسام (أيقونات كخلفية) */
.slide--cat-entry i{ color:transparent; width:100%; height:100%; background-size:cover; margin-bottom:0; }
a.slide--cat-entry{ padding:0; height:11.65rem; }

salla-slider .slide--one-sixth{ width:25%; }
salla-slider .slide--one-sixth:nth-of-type(1) i{ background-image:url(https://cdn.salla.sa/form-builder/oBLxzLseJnItGLF39dFJ1RfcMAmbo54ooMSSh9Hg.png); }
salla-slider .slide--one-sixth:nth-of-type(2) i{ background-image:url(https://cdn.salla.sa/form-builder/hm8OORSUfaZvec4And5MI9zWgBKPwo6d61t58oi1.png); }
salla-slider .slide--one-sixth:nth-of-type(3) i{ background-image:url(https://cdn.salla.sa/form-builder/x3rP2JDpUi49PUaQXbW9DHT13MbjuGPID4tBgXKC.png); }
salla-slider .slide--one-sixth:nth-of-type(4) i{ background-image:url(https://cdn.salla.sa/form-builder/iLIGelqKKBEk3e1IXTJqy1R1yx4gkZSJu2BMVzf1.png); }
salla-slider .slide--one-sixth:nth-of-type(5) i{ background-image:url(https://cdn.salla.sa/form-builder/lNs38XE3r3ADpqgiiwFz5EfNLcoobYu4UvWHlaEB.png); }
salla-slider .slide--one-sixth:nth-of-type(6) i{ background-image:url(https://cdn.salla.sa/form-builder/XJXLGhLCdtBAlqPxNDZBQ9HMvSvUiCHq1TptZM1y.png); }

/* ترويسة سكشن الأقسام */
section.s-block.s-block--categories .s-slider-block__title{ justify-content:center; flex-direction:column; }
section.s-block.s-block--categories .s-slider-block__title-right{ padding-left:0; }
section.s-block.s-block--categories h2{ padding:0; color:var(--brand); font-size:22px; }
section.s-block.s-block--categories a>h2{ display:none; }
section.s-block.s-block--categories .s-slider-block__title-right button.s-slider-nav-arrow{
  background-image: radial-gradient(var(--brand), transparent); border:none;
}
section.s-block.s-block--categories button.s-slider-nav-arrow:hover{
  background-image: radial-gradient(var(--brand), #ffffff9c);
}
span.s-slider-button-icon svg{ fill:#373632 !important; }
.slide--one-sixth h2{ padding:5px !important; }

/* عناوين سلايدر عامة */
.s-slider-block__title-left{ width:100%; margin-top:-1.74rem; }
.s-slider-block__title-nav{ justify-content:space-between; }

/* ريسبونسف */
@media(max-width:1050px){ a.slide--cat-entry{ height:9.2rem; } }
@media(max-width:992px){
  .carousel-slider .s-slider-block__title-nav{ display:flex; }
  section.s-block.s-block--categories .s-slider-block__title{ margin-bottom:1rem; }
  a.slide--cat-entry{ height:6.7rem; }
  .store-footer__inner{ padding-top:0; }
  .store-footer__inner .grid>div:nth-of-type(1)>a{ margin-top:-3.3rem; }
}
@media(min-width:600px){ section.s-block.s-block--categories .swiper.s-slider-container{ padding-left:0; } }
@media(max-width:600px){
  section.s-block.s-block--banners .grid{ grid-template-columns: repeat(2, minmax(0,1fr)); }
  a.slide--cat-entry{ height:13.8rem; }
}
@media(max-width:400px){ a.slide--cat-entry{ height:11.9rem; } }
@media(max-width:350px){
  a.slide--cat-entry{ height:9.75rem; }
  .s-search-container.s-search-inline{ min-width:200px; }
}

/* ===== Mobile performance helpers ===== */
@media (max-width: 768px){
  /* حجز ارتفاع الهيدر/التوب بار (تقليل CLS) */
  .announcement-bar, .store-header .topbar{ min-height:40px; }
  .store-header{ min-height:64px; }

  /* بطاقات المنتجات: ارتفاع أدنى وملاءمة الصور */
  .s-product-card{ min-height:360px; }
  .s-product-card .thumb img{ width:100%; height:auto; aspect-ratio:1/1; object-fit:cover; }

  /* إيقاف الأنيميشن الثقيلة على الهاتف */
  [data-wow], .wow, .animate, .marquee{ animation:none !important; transition:none !important; }
}


/* ==== Fix: farms gallery on mobile only ==== */
@media (max-width: 768px){
  /* نخلي السلايد أعرض شوية بدل الضغط */
  .fix-farms .swiper-slide,
  .fix-farms .slide{
    flex: 0 0 78vw !important;
    max-width: 78vw !important;
    margin-inline: 6px;
  }

  /* الصورة بنسبة 4:3 وتقصّي لطيف */
  .fix-farms .swiper-slide img,
  .fix-farms .slide img{
    width: 100% !important;
    height: auto !important;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border-radius: 12px;
    display: block;
  }

  /* في حال القالب محدِّد ارتفاع/عرض ثابت للسلايد */
  .fix-farms .swiper,
  .fix-farms .s-slider-container{ overflow: visible; }
  .fix-farms [class*="slide--"]{ width: auto !important; }
  .fix-farms .swiper-wrapper{ gap: 12px; }
}