/*!
 * دكانة — Dukkana Store Theme (ايزي اوردر / Default theme)
 * ملف CSS واحد لكل تعديلات المتجر
 *
 * المحتويات:
 *  1. الألوان (المتغيرات)
 *  2. الهيدر + القايمة الجانبية
 *  3. سكشن الأقسام في الرئيسية
 *  4. كروت المنتجات (الرئيسية + صفحة الأقسام)
 *  5. صفحة المنتج (السعر، العروض، أزرار الشراء)
 *  6. عداد الشحن المجاني
 *  7. الشريط الثابت تحت في صفحة المنتج
 *  8. شريط الأقسام فوق المنتجات
 */

/* ================================================================== */
/* 1. الألوان — غيّري من هنا وكل المتجر يتغير */
/* ================================================================== */
:root{
  --color-primary: 47, 93, 80;          /* اللون الأساسي للثيم (أخضر دكانة) */
  --dk-green:#2F5D50;  --dk-green-deep:#1f4038;
  --dk-gold:#C9A24B;   --dk-cream:#FAF7F0;
  --dk-header-bg:#C9A24B;    /* خلفية الهيدر والقايمة الجانبية */
  --dk-header-text:#F5EEDF;  /* لون الكلام والأيقونات في الهيدر */
  --dk-black:#161616;  --dk-ink:#161616;
  --dk-red:#E0242B;    --dk-line:#e8e8ec;
}

/* ================================================================== */
/* 2. الهيدر + القايمة الجانبية */
/* ================================================================== */
/* ---------- الخلفية ---------- */
div:has(> header.default_header){
  background:var(--dk-header-bg) !important;
  border-bottom:1px solid rgba(0,0,0,.08) !important;
  box-shadow:0 6px 18px -12px rgba(0,0,0,.18) !important;
}
.default_header,
.default_header_container,
.default_header_container button{
  background:transparent !important;
  color:var(--dk-header-text) !important;
}

/* ---------- الأيقونات ---------- */
.default_header svg{ color:var(--dk-header-text) !important; }
.default_header a[href="/search"] svg path{ fill:var(--dk-header-text) !important; }
.default_header button:hover{ opacity:1 !important; color:var(--dk-green) !important; }

/* ---------- روابط المنيو ---------- */
.default_header_container > div:nth-child(2) a{
  color:var(--dk-header-text) !important;
  font-size:14px !important; font-weight:500 !important;
  white-space:nowrap; text-decoration:none !important;
  position:relative; padding:6px 0; transition:color .2s;
}
.default_header_container > div:nth-child(2) a::after{
  content:""; position:absolute; right:0; bottom:0; width:0; height:2px;
  border-radius:2px; background:var(--dk-green); transition:width .3s;
}
.default_header_container > div:nth-child(2) a:hover{ color:var(--dk-green) !important; }
.default_header_container > div:nth-child(2) a:hover::after{ width:100%; }

/* إخفاء روابط السياسات من الهيدر (موجودة في الفوتر) — امسحي السطر ده لو عايزاها تظهر */
.default_header_container > div:nth-child(2) a[href^="/pages/"]{ display:none !important; }

/* ---------- الكمبيوتر: صف واحد (لوجو | روابط | بحث | سلة) ---------- */
@media (min-width:1024px){
  .default_header{ padding:14px 0 !important; }

  .default_header_container{ display:flex !important; align-items:center; gap:32px; width:100%; min-width:0; }
  .default_header_container > div:first-child{ display:contents !important; }
  .default_header_container > div:first-child > div:first-child{ display:none !important; }

  /* اللوجو يمين */
  .default_header_logo{ order:1; flex:0 0 auto !important; justify-content:flex-start !important; }
  .default_header_logo img,
  .default_header_logo a > div{ height:48px !important; }

  /* الروابط جنبه */
  .default_header_container > div:nth-child(2){ order:2; margin-top:0 !important; flex:1 1 auto; min-width:0; overflow:hidden; }
  .default_header_container > div:nth-child(2) > div{ justify-content:flex-start !important; gap:28px !important; }

  /* البحث والسلة شمال */
  .default_header_container > div:first-child > div:last-child{
    order:3; flex:0 0 auto !important; margin:0 !important; gap:18px !important;
  }

  /* أيقونة البحث تبقى مربع بحث */
  .default_header a[href="/search"]{
    display:flex !important; align-items:center; justify-content:space-between;
    flex:0 0 auto; width:420px; height:50px; white-space:nowrap;
    padding-block:5px !important; padding-inline:18px 5px !important;
    border-radius:14px !important;
    background:#fff !important;
    border:1px solid rgba(201,162,75,.45);
    color:rgba(22,22,22,.7) !important;
    font-size:14px; opacity:1 !important;
    transition:border-color .2s, box-shadow .2s;
  }
  .default_header a[href="/search"]:hover{
    border-color:var(--dk-green); box-shadow:0 0 0 3px rgba(201,162,75,.18);
  }
  .default_header a[href="/search"] svg{ display:none !important; }
  .default_header a[href="/search"]::before{ content:"ابحث عن منتج"; }
  .default_header a[href="/search"]::after{
    content:"بحث"; display:flex; align-items:center; height:100%;
    padding:0 22px; border-radius:10px;
    background:var(--dk-gold); color:var(--dk-black); font-weight:700;
  }
}
/* ---------- الفون والتابلت: لوجو يمين | سلة + منيو شمال | البحث في سطر لوحده ---------- */
@media (max-width:1023px){
  .default_header{ padding:12px 0 !important; }
  .default_header_container{ padding-inline:16px !important; }

  .default_header_container > div:first-child{
    height:auto !important; flex-wrap:wrap; row-gap:12px; column-gap:16px;
  }
  /* اللوجو يمين */
  .default_header_logo{ order:1; flex:1 1 auto !important; justify-content:flex-start !important; }
  .default_header_logo img,
  .default_header_logo a > div{ height:40px !important; }

  /* السلة ثم زر المنيو على الشمال */
  .default_header_container > div:first-child > div:last-child{ display:contents !important; }
  .default_header_container > div:first-child > div:last-child > button{ order:2; padding:4px !important; }
  .default_header_container > div:first-child > div:first-child{ order:3; flex:0 0 auto !important; }
  .default_header_container > div:first-child > div:first-child button{ padding:0 !important; }

  /* مربع البحث بعرض الشاشة */
  .default_header a[href="/search"]{
    order:4; flex:0 0 100%;
    display:flex !important; align-items:center; justify-content:space-between;
    height:48px; padding:0 16px !important;
    border-radius:14px !important;
    background:#fff !important;
    border:1px solid rgba(201,162,75,.45);
    color:rgba(22,22,22,.7) !important;
    font-size:15px; opacity:1 !important;
  }
  .default_header a[href="/search"]::before{ content:"ابحث عن منتج"; }
  .default_header a[href="/search"] svg{ width:20px !important; height:20px !important; }
}

@media (min-width:1024px) and (max-width:1279px){
  .default_header a[href="/search"]{ width:300px; }
  .default_header_container{ gap:20px; }
}

/* ---------- أيقونات خطية رفيعة زي اوبن دار ---------- */
.default_header_container > div:first-child > div:first-child button,
.default_header_container > div:first-child > div:last-child > button{
  display:grid !important; place-items:center;
  width:44px; height:44px; padding:0 !important;
  border-radius:12px !important; transition:background-color .2s !important;
}
.default_header_container > div:first-child > div:first-child button:hover,
.default_header_container > div:first-child > div:last-child > button:hover{
  background-color:rgba(255,255,255,.18) !important;
}
.default_header_container > div:first-child > div:first-child button svg,
.default_header_container > div:first-child > div:last-child > button svg,
.default_header a[href="/search"] svg{ display:none !important; }

/* منيو */
.default_header_container > div:first-child > div:first-child button::before{
  content:""; width:24px; height:24px; background:currentColor;
  -webkit-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M4 5h16M4 12h16M4 19h16'/%3E%3C/svg%3E") center/contain no-repeat;
          mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M4 5h16M4 12h16M4 19h16'/%3E%3C/svg%3E") center/contain no-repeat;
}
/* سلة */
.default_header_container > div:first-child > div:last-child > button::before{
  content:""; width:22px; height:22px; background:currentColor;
  -webkit-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='8' cy='21' r='1'/%3E%3Ccircle cx='19' cy='21' r='1'/%3E%3Cpath d='M2.05 2.05h2l2.66 12.42a2 2 0 0 0 2 1.58h9.78a2 2 0 0 0 1.95-1.57l1.65-7.43H5.12'/%3E%3C/svg%3E") center/contain no-repeat;
          mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='8' cy='21' r='1'/%3E%3Ccircle cx='19' cy='21' r='1'/%3E%3Cpath d='M2.05 2.05h2l2.66 12.42a2 2 0 0 0 2 1.58h9.78a2 2 0 0 0 1.95-1.57l1.65-7.43H5.12'/%3E%3C/svg%3E") center/contain no-repeat;
}
/* بحث (الفون) */
@media (max-width:1023px){
  .default_header a[href="/search"]::after{
    content:""; width:20px; height:20px; flex-shrink:0; background:var(--dk-black);
    -webkit-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m21 21-4.34-4.34'/%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3C/svg%3E") center/contain no-repeat;
            mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m21 21-4.34-4.34'/%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3C/svg%3E") center/contain no-repeat;
  }
}

/* ================= القايمة الجانبية (☰) ================= */
div.max-w-xs.shadow-xl:has(a[href^="/collections/"]){
  background:var(--dk-header-bg) !important;
  color:var(--dk-header-text) !important;
  padding-bottom:24px !important;
  border-inline-start:2px solid rgba(0,0,0,.08);
}

/* الشريط اللي فوق: اسم المتجر يمين و × شمال */
div.max-w-xs.shadow-xl:has(a[href^="/collections/"]) > div:first-child{
  display:flex !important; justify-content:space-between !important; align-items:center;
  padding:14px 16px !important;
  border-bottom:1px solid rgba(255,255,255,.3);
}
div.max-w-xs.shadow-xl:has(a[href^="/collections/"]) > div:first-child::before{
  content:"دكانة"; font-size:22px; font-weight:800; color:var(--dk-header-text);
}
div.max-w-xs.shadow-xl:has(a[href^="/collections/"]) > div:first-child button{
  display:grid !important; place-items:center;
  width:42px; height:42px; padding:0 !important; border-radius:12px !important;
  color:var(--dk-header-text) !important; transition:background-color .2s, color .2s;
}
div.max-w-xs.shadow-xl:has(a[href^="/collections/"]) > div:first-child button:hover{
  background:rgba(255,255,255,.18) !important; color:var(--dk-green) !important;
}

/* نشيل الخطوط الفاصلة الرمادي بين العناصر */
div.max-w-xs.shadow-xl:has(a[href^="/collections/"]) .divide-y > *{ border-width:0 !important; }

/* كل قسم */
div.max-w-xs.shadow-xl:has(a[href^="/collections/"]) > div:nth-child(n+2){
  padding:20px 0 12px !important;
}
div.max-w-xs.shadow-xl:has(a[href^="/collections/"]) > div:nth-child(2){
  margin:0 16px; padding-inline:0 !important;
  border-bottom:1px solid rgba(255,255,255,.3) !important;
}

/* عناوين الأقسام الصغيرة */
div.max-w-xs.shadow-xl:has(a[href^="/collections/"]) p{
  color:rgba(245,238,223,.8) !important;
  font-size:13px !important; font-weight:700 !important;
  padding:0 20px 8px !important;
}
div.max-w-xs.shadow-xl:has(a[href^="/collections/"]) > div:nth-child(2) p{ padding-inline:4px !important; }

/* الروابط */
div.max-w-xs.shadow-xl:has(a[href^="/collections/"]) > div:nth-child(n+2) > div{
  padding:0 !important;
}
div.max-w-xs.shadow-xl:has(a[href^="/collections/"]) a{
  display:block; padding:12px 20px !important; border-radius:10px;
  font-size:16px !important; line-height:1.5;
  transition:color .2s, background-color .2s;
}
/* الأقسام: أبيض وعريض */
div.max-w-xs.shadow-xl:has(a[href^="/collections/"]) > div:nth-child(2) a{
  padding-inline:4px !important;
  color:var(--dk-header-text) !important; font-weight:700 !important;
}
/* الصفحات: أخف */
div.max-w-xs.shadow-xl:has(a[href^="/collections/"]) > div:nth-child(3) a{
  color:var(--dk-header-text) !important; font-weight:400 !important;
}
div.max-w-xs.shadow-xl:has(a[href^="/collections/"]) a:hover{
  color:var(--dk-green) !important; background:rgba(255,255,255,.12);
}

/* ---------- الكمبيوتر: إخفاء روابط الأقسام من جنب اللوجو (بتفضل في القايمة الجانبية) ---------- */
@media (min-width:1024px){
  .default_header_container > div:nth-child(2) a[href^="/collections/"]:not([href*="all-product"]){ display:none !important; }
}

/* ---------- الكمبيوتر: كلمة «الرئيسية» جنب اللوجو (بتفتح الصفحة الرئيسية) ---------- */
@media (min-width:1024px){
  .default_header_logo a{ display:flex !important; align-items:center; gap:40px; text-decoration:none !important; }
  .default_header_logo a::after{
    content:"الرئيسية";
    color:var(--dk-header-text); font-size:15px; font-weight:500; white-space:nowrap;
    padding:6px 0; border-bottom:2px solid transparent;
    transition:color .2s, border-color .2s;
  }
  .default_header_logo a:hover::after{ color:var(--dk-green); border-color:var(--dk-green); }
}

/* ================================================================== */
/* 3. سكشن الأقسام في الرئيسية */
/* ================================================================== */
/* ---------- العنوان: يمين + "تسوّق حسب التصنيف" + سطر تحته ---------- */
.content_container:has(.default_category_card) .home_section_top_container{
  align-items:flex-start !important; margin-bottom:22px !important;
}
.content_container:has(.default_category_card) .home_section_top_title,
.content_container:has(.default_category_card) .home_section_top_title > span{
  font-size:0 !important; text-align:right;
}
.content_container:has(.default_category_card) .home_section_top_title svg{ display:none !important; }
.content_container:has(.default_category_card) .home_section_top_title::before{
  content:"تسوّق حسب التصنيف";
  display:inline-block; font-size:32px; font-weight:800; color:var(--dk-black);
  padding-bottom:6px; border-bottom:4px solid var(--dk-gold);
}
.content_container:has(.default_category_card) .home_section_top_title::after{
  content:"لقى اللي تدوّر عليه بسهولة";
  display:block; margin-top:10px; font-size:16px; font-weight:400; color:var(--dk-black);
}

/* ---------- الكارت: الاسم فوق الصورة بتدرّج غامق ---------- */
.default_category_card{
  position:relative !important; border-radius:20px; overflow:hidden; isolation:isolate;
}
.default_category_card > div:first-child{
  margin-bottom:0 !important; border-radius:20px !important; display:block !important;
}
.default_category_card::after{
  content:""; position:absolute; inset:0; z-index:1; pointer-events:none;
  background:linear-gradient(to top, rgba(22,22,22,.8) 0%, rgba(22,22,22,.35) 38%, rgba(22,22,22,0) 65%);
  transition:background .4s;
}
.default_category_card_name{
  position:absolute !important; z-index:2; left:12px; right:12px; bottom:18px; margin:0 !important;
  text-align:center !important; color:#fff !important;
  font-size:20px !important; font-weight:700 !important; line-height:1.4;
  text-shadow:0 2px 8px rgba(0,0,0,.35);
}
.default_category_card_name svg{ display:none !important; }
.default_category_card_name::after{
  content:""; display:block; width:0; height:3px; margin:8px auto 0;
  border-radius:3px; background:var(--dk-gold); transition:width .35s;
}
.default_category_card:hover::after{
  background:linear-gradient(to top, rgba(47,93,80,.9) 0%, rgba(47,93,80,.4) 42%, rgba(47,93,80,0) 70%);
}
.default_category_card:hover .default_category_card_name::after{ width:40px; }

/* ---------- الكمبيوتر: 4 كروت جنب بعض بدل السلايدر ---------- */
@media (min-width:768px){
  .swiper:has(.default_category_card) .swiper-wrapper{
    display:grid !important; grid-template-columns:repeat(4,1fr); gap:20px; transform:none !important;
  }
  .swiper:has(.default_category_card) .swiper-slide{ width:auto !important; margin:0 !important; }
  .carouselWrapper:has(.default_category_card) .slider_buttons_container{ display:none !important; }
}

/* ---------- الفون: كارتين جنب بعض بدل السكرول ---------- */
@media (max-width:767px){
  .content_container .md\:hidden:has(.default_category_card){
    display:grid !important; grid-template-columns:repeat(2,1fr); gap:12px !important; overflow:visible !important;
  }
  .content_container .md\:hidden:has(.default_category_card) .min-w-\[164px\]{ min-width:0 !important; }

  .default_category_card,
  .default_category_card > div:first-child{ border-radius:16px !important; }
  .default_category_card_img{ aspect-ratio:1.35/1 !important; }
  .default_category_card_name{ font-size:15px !important; bottom:12px; }

  .content_container:has(.default_category_card) .home_section_top_title::before{ font-size:24px; }
  .content_container:has(.default_category_card) .home_section_top_title::after{ font-size:14px; }
}

/* مسافة فوق عنوان «تسوّق حسب التصنيف» */
.content_container:has(.default_category_card) .home_section_top_container{ padding-top:40px !important; }
@media (max-width:767px){
  .content_container:has(.default_category_card) .home_section_top_container{ padding-top:28px !important; }
}

/* ================================================================== */
/* 4. كروت المنتجات (الرئيسية + صفحة الأقسام) */
/* ================================================================== */
/* ---------- العنوان والترتيب ---------- */
.category_section_header{ align-items:center !important; margin-bottom:28px !important; }
.category_section_header_title{
  font-size:36px !important; font-weight:800 !important; color:var(--dk-black) !important;
  padding-bottom:8px !important; border-bottom:4px solid var(--dk-gold);
}
.category_section_header button{
  height:52px; padding:0 20px !important; border:1px solid var(--dk-line) !important;
  border-radius:14px !important; background:#fff !important;
  font-size:15px !important; font-weight:500 !important; color:var(--dk-black) !important;
}
.category_section_header button:hover{ border-color:var(--dk-gold) !important; background:var(--dk-cream) !important; }
.category_section_header button svg{ color:var(--dk-green) !important; }
.category_section_header + div .home_section_top_container{ display:none !important; }

/* ---------- الشبكة ---------- */
:is(.category_products_grid_container,.home_products_grid_container){ gap:24px !important; }
@media (min-width:1536px){
  :is(.category_products_grid_container,.home_products_grid_container){ grid-template-columns:repeat(4,minmax(0,1fr)) !important; }
}

/* ---------- الكارت ---------- */
:is(.category_products_grid_container,.home_products_grid_container) > div{ height:100%; opacity:1 !important; }
:is(.category_products_grid_container,.home_products_grid_container) > div > div.group{
  height:100%; border:1px solid var(--dk-line); border-radius:18px !important;
  background:#fff !important; padding-bottom:0 !important;
  transition:transform .25s, box-shadow .25s !important;
}
:is(.category_products_grid_container,.home_products_grid_container) > div > div.group:hover{
  box-shadow:0 16px 30px -20px rgba(0,0,0,.25) !important;
}

/* الصورة بعرض الكارت ومربعة */
:is(.category_products_grid_container,.home_products_grid_container) > div > div.group > div:first-child{
  position:static !important; width:100%;
}
:is(.category_products_grid_container,.home_products_grid_container) > div > div.group > div:first-child > div:first-child,
:is(.category_products_grid_container,.home_products_grid_container) > div > div.group > div:first-child > div:first-child img{
  width:100% !important; aspect-ratio:1/1; border-radius:0 !important;
}

/* نخفي أزرار المعاينة والسلة اللي على الصورة */
:is(.category_products_grid_container,.home_products_grid_container) > div > div.group > div:first-child > div.absolute{ display:none !important; }

/* شارة الخصم: حمرا تحت السعر */
:is(.category_products_grid_container,.home_products_grid_container) > div > div.group > div:first-child > span.absolute{
  top:auto !important; left:auto !important; bottom:20px; right:20px;
  padding:8px 18px !important; border-radius:999px !important;
  background:var(--dk-red) !important; color:#fff !important;
  font-size:15px !important; font-weight:800 !important; z-index:2;
}

/* ---------- بيانات المنتج ---------- */
:is(.category_products_grid_container,.home_products_grid_container) > div > div.group > div.text-center{
  text-align:right !important; padding:22px 20px 78px !important;
}
/* نخفي كلمة القسم اللي فوق الاسم */
:is(.category_products_grid_container,.home_products_grid_container) > div > div.group > div.text-center > div:first-child{ display:none !important; }

/* الاسم */
:is(.category_products_grid_container,.home_products_grid_container) > div > div.group h3{
  text-align:right !important; margin-top:0 !important;
  font-size:19px !important; font-weight:700 !important; line-height:1.7 !important;
  color:var(--dk-black) !important; min-height:calc(1.7em * 2);
}

/* السعر */
:is(.category_products_grid_container,.home_products_grid_container) > div > div.group h3 + div{
  justify-content:flex-start !important; align-items:baseline !important;
  margin-top:26px !important; flex-wrap:wrap; gap:4px 14px;
}
:is(.category_products_grid_container,.home_products_grid_container) > div > div.group h3 + div > span{
  color:var(--dk-red) !important; font-size:23px !important; font-weight:800 !important;
}
:is(.category_products_grid_container,.home_products_grid_container) > div > div.group h3 + div > del{
  margin:0 !important; color:#7b8494 !important; font-size:16px !important; font-weight:400 !important;
}

/* نخفي المتغيرات (الألوان والمقاسات) */
:is(.category_products_grid_container,.home_products_grid_container) > div > div.group h3 + div ~ div{ display:none !important; }

/* ---------- الفون ---------- */
@media (max-width:767px){
  .category_section_header_title{ font-size:26px !important; }
  .category_section_header button{ height:44px; padding:0 14px !important; font-size:13px !important; }
  :is(.category_products_grid_container,.home_products_grid_container){ gap:12px !important; }
  :is(.category_products_grid_container,.home_products_grid_container) > div > div.group{ border-radius:14px !important; }
  :is(.category_products_grid_container,.home_products_grid_container) > div > div.group > div.text-center{ padding:14px 12px 58px !important; }
  :is(.category_products_grid_container,.home_products_grid_container) > div > div.group h3{ font-size:15px !important; }
  :is(.category_products_grid_container,.home_products_grid_container) > div > div.group h3 + div{ margin-top:14px !important; gap:2px 8px; }
  :is(.category_products_grid_container,.home_products_grid_container) > div > div.group h3 + div > span{ font-size:17px !important; }
  :is(.category_products_grid_container,.home_products_grid_container) > div > div.group h3 + div > del{ font-size:12.5px !important; }
  :is(.category_products_grid_container,.home_products_grid_container) > div > div.group > div:first-child > span.absolute{
    bottom:14px; right:12px; padding:6px 13px !important; font-size:12.5px !important;
  }
}

/* ---------- سكشن «أحدث المنتجات» في الرئيسية: العنوان يمين و«عرض الكل» شمال ---------- */
div:has(> .home_products_grid_container){
  display:grid !important; grid-template-columns:1fr auto; align-items:end; column-gap:16px;
}
div:has(> .home_products_grid_container) > div:first-child{ grid-column:1; grid-row:1; opacity:1 !important; }
div:has(> .home_products_grid_container) > .home_products_grid_container{ grid-column:1 / -1; grid-row:2; }

div:has(> .home_products_grid_container) .home_section_top_container{
  flex-direction:column-reverse !important; align-items:flex-start !important;
  gap:6px !important; margin-bottom:28px !important;
}
div:has(> .home_products_grid_container) .home_section_top_title{
  font-size:36px !important; font-weight:800 !important; color:var(--dk-black) !important; text-align:right;
}
div:has(> .home_products_grid_container) .home_section_top_title svg{ display:none !important; }
div:has(> .home_products_grid_container) .home_section_top_container > span{
  color:#7b8494 !important; font-size:17px !important; font-weight:400 !important;
}

/* زر «عرض جميع المنتجات» يبقى لينك «عرض الكل» أحمر فوق */
div:has(> .home_products_grid_container) > div:last-child:not(.home_products_grid_container){
  grid-column:2; grid-row:1; align-self:end;
  margin:0 0 30px !important; padding:0 !important; border:0 !important; border-radius:0 !important;
  background:none !important; opacity:1 !important; font-size:0 !important;
}
div:has(> .home_products_grid_container) > div:last-child:not(.home_products_grid_container) span{ display:none; }
div:has(> .home_products_grid_container) > div:last-child:not(.home_products_grid_container)::after{
  content:"عرض الكل"; font-size:17px; font-weight:500; color:var(--dk-red);
  border-bottom:1.5px solid transparent; transition:border-color .2s;
}
div:has(> .home_products_grid_container) > div:last-child:not(.home_products_grid_container):hover::after{
  border-color:var(--dk-red);
}

@media (max-width:767px){
  div:has(> .home_products_grid_container) .home_section_top_container{ margin-bottom:18px !important; }
  div:has(> .home_products_grid_container) .home_section_top_title{ font-size:26px !important; }
  div:has(> .home_products_grid_container) .home_section_top_container > span{ font-size:14px !important; }
  div:has(> .home_products_grid_container) > div:last-child:not(.home_products_grid_container){ margin-bottom:20px !important; }
  div:has(> .home_products_grid_container) > div:last-child:not(.home_products_grid_container)::after{ font-size:14px; }
}

/* ================================================================== */
/* 5. صفحة المنتج (السعر، العروض، أزرار الشراء) */
/* ================================================================== */
div.rounded-\[28px\]:has(.radio_container){
  --of-bg:#FFF9E8; --of-border:#F5C542; --of-accent:#F2B705;
  --of-red:#E0242B; --of-ink:#161616; --of-muted:#6b7280; --of-line:#e5e7eb;
  background:var(--of-bg) !important;
  border:1.5px solid var(--of-border);
  border-radius:18px !important;
  padding:18px !important;
}

/* ---------- العنوان ---------- */
div.rounded-\[28px\]:has(.radio_container) > div:first-child{
  justify-content:flex-start !important; gap:10px; margin-bottom:16px !important;
}
div.rounded-\[28px\]:has(.radio_container) > div:first-child > div:first-child{
  margin:0 !important; gap:0 !important;
}
/* نبدّل النص بـ «وفّر عند شراء أكثر» ونخفي السطر الرمادي */
div.rounded-\[28px\]:has(.radio_container) > div:first-child h3{ font-size:0 !important; }
div.rounded-\[28px\]:has(.radio_container) > div:first-child h3::before{
  content:"وفّر عند شراء أكثر"; font-size:20px; font-weight:800; color:var(--of-ink);
}
div.rounded-\[28px\]:has(.radio_container) > div:first-child p{ display:none !important; }

/* الأيقونة: صغيرة جنب العنوان من غير خلفية */
div.rounded-\[28px\]:has(.radio_container) > div:first-child > div:last-child{
  order:-1; width:28px !important; height:28px !important;
  background:transparent !important; border-radius:0 !important;
}
div.rounded-\[28px\]:has(.radio_container) > div:first-child > div:last-child svg{
  width:26px !important; height:26px !important; color:var(--of-ink) !important;
}

/* ---------- الكروت: اتنين جنب بعض ---------- */
div.rounded-\[28px\]:has(.radio_container) > div:last-child{
  display:grid !important; grid-template-columns:1fr; gap:12px !important;
}
div.rounded-\[28px\]:has(.radio_container) > div:last-child > div{
  position:relative; background:#fff !important;
  border:1.5px solid var(--of-line) !important; border-radius:16px !important;
  padding:16px 14px !important; transition:border-color .2s, box-shadow .2s;
}
div.rounded-\[28px\]:has(.radio_container) > div:last-child > div:hover{ border-color:var(--of-border) !important; }
/* العرض المختار */
div.rounded-\[28px\]:has(.radio_container) > div:last-child > div.border-skin-primary{
  border-color:var(--of-accent) !important; box-shadow:0 8px 20px -14px rgba(242,183,5,.8);
}

/* محتوى الكارت تحت بعض */
div.rounded-\[28px\]:has(.radio_container) > div:last-child > div > div:first-child{
  flex-direction:column !important; align-items:flex-start !important; gap:10px !important; margin:0 !important;
}
div.rounded-\[28px\]:has(.radio_container) .radio_container ~ div{ margin:0 !important; }
div.rounded-\[28px\]:has(.radio_container) .radio_container ~ div p{
  font-size:17px !important; font-weight:800 !important; color:var(--of-ink) !important;
  line-height:1.5; padding-inline-end:28px;
}

/* الدايرة فوق على الشمال */
div.rounded-\[28px\]:has(.radio_container) .relative:has(> .radio_container){ position:static !important; }
div.rounded-\[28px\]:has(.radio_container) .radio_container{
  position:absolute; top:16px; left:14px; margin:0 !important;
  width:22px !important; height:22px !important;
  border:2px solid #9ca3af !important; background:#fff;
}
div.rounded-\[28px\]:has(.radio_container) .border-skin-primary .radio_container{ border-color:var(--of-accent) !important; }
div.rounded-\[28px\]:has(.radio_container) .radio_circle{ width:11px !important; height:11px !important; }
div.rounded-\[28px\]:has(.radio_container) .border-skin-primary .radio_circle{ background:var(--of-accent) !important; }

/* السعر */
div.rounded-\[28px\]:has(.radio_container) > div:last-child > div > div:first-child > div:last-child{
  align-items:flex-start !important; gap:2px !important;
}
div.rounded-\[28px\]:has(.radio_container) > div:last-child > div > div:first-child > div:last-child p:first-child{
  font-size:18px !important; font-weight:800 !important; color:var(--of-ink) !important;
}
div.rounded-\[28px\]:has(.radio_container) > div:last-child > div > div:first-child > div:last-child p:last-child{
  font-size:13.5px !important; color:var(--of-muted) !important;
}

/* سطر الملاحظة تحت */
div.rounded-\[28px\]:has(.radio_container)::after{
  content:"الخصم تلقائي حسب الكمية – عدّلها من العداد.";
  display:block; margin-top:14px; font-size:13.5px; color:var(--of-muted);
}

@media (max-width:767px){
  div.rounded-\[28px\]:has(.radio_container){ padding:14px !important; }
  div.rounded-\[28px\]:has(.radio_container) > div:first-child h3::before{ font-size:18px; }
  div.rounded-\[28px\]:has(.radio_container) > div:last-child{ gap:10px !important; }
  div.rounded-\[28px\]:has(.radio_container) > div:last-child > div{ padding:14px 12px !important; }
  div.rounded-\[28px\]:has(.radio_container) .radio_container ~ div p{ font-size:15px !important; }
  div.rounded-\[28px\]:has(.radio_container) .radio_container{ top:14px; left:12px; }
  div.rounded-\[28px\]:has(.radio_container) > div:last-child > div > div:first-child > div:last-child p:first-child{ font-size:16px !important; }
}

/* ================= تحت السعر: دفع عند الاستلام | المعاينة + متاح للطلب ================= */
/* السعر بالأحمر */
#sale-price, #sale-price + span, div:has(> #sale-price){ color:#E0242B !important; }
#sale-price{ font-size:34px !important; font-weight:800 !important; }

/* سطر المميزات */
div.relative.flex-col:has(> div > .product_name) > div:not(:has(.product_name)){
  display:flex !important; align-items:center; flex-wrap:wrap; row-gap:14px; column-gap:26px !important;
}
div.relative.flex-col:has(> div > .product_name) > div:not(:has(.product_name)) > div{ flex:0 0 100%; }
div.relative.flex-col:has(> div > .product_name) > div:not(:has(.product_name))::before,
div.relative.flex-col:has(> div > .product_name) > div:not(:has(.product_name))::after{
  display:inline-flex; align-items:center; min-height:24px;
  padding-inline-start:30px;
  font-size:15px; font-weight:700; color:#161616;
  background-repeat:no-repeat; background-size:22px 22px; background-position:right center;
}
div.relative.flex-col:has(> div > .product_name) > div:not(:has(.product_name))::before{
  content:"دفع عند الاستلام"; order:2;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23161616' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect width='20' height='12' x='2' y='6' rx='2'/%3E%3Ccircle cx='12' cy='12' r='2'/%3E%3Cpath d='M6 12h.01M18 12h.01'/%3E%3C/svg%3E");
}
div.relative.flex-col:has(> div > .product_name) > div:not(:has(.product_name))::after{
  content:"المعاينة قبل الاستلام"; order:3;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23161616' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0'/%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3C/svg%3E");
}

/* متاح للطلب */
div.relative.flex-col:has(> div > .product_name)::after{
  content:"متاح للطلب";
  display:block; margin-top:18px; padding-inline-start:30px;
  font-size:16px; font-weight:500; color:#2F7D5B;
  background:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%232F7D5B' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") no-repeat right center / 22px 22px;
}

@media (max-width:767px){
  #sale-price{ font-size:28px !important; }
  div.relative.flex-col:has(> div > .product_name) > div:not(:has(.product_name)){ column-gap:20px !important; }
  div.relative.flex-col:has(> div > .product_name) > div:not(:has(.product_name))::before,
  div.relative.flex-col:has(> div > .product_name) > div:not(:has(.product_name))::after{ font-size:14px; padding-inline-start:28px; background-size:20px 20px; }
}

/* ================= أزرار الشراء ================= */
div.flex-col-reverse:has(> .checkout_btn){
  flex-direction:column !important; gap:14px !important;
}
div.flex-col-reverse:has(> .checkout_btn) > div{ order:1; margin-top:0 !important; }
div.flex-col-reverse:has(> .checkout_btn) > .checkout_btn{ order:2; }

/* أضف للسلة: أصفر بأيقونة سلة */
.add_to_cart_btn{
  height:58px; border:0 !important; border-radius:14px !important;
  background:#F5B400 !important; color:#161616 !important;
  font-size:17px !important; font-weight:800 !important; gap:10px !important;
  transition:background-color .2s, transform .2s !important;
}
.add_to_cart_btn:hover{ background:#E5A800 !important; transform:translateY(-1px); }
.add_to_cart_btn::before{
  content:""; width:22px; height:22px; background:currentColor;
  -webkit-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='8' cy='21' r='1'/%3E%3Ccircle cx='19' cy='21' r='1'/%3E%3Cpath d='M2.05 2.05h2l2.66 12.42a2 2 0 0 0 2 1.58h9.78a2 2 0 0 0 1.95-1.57l1.65-7.43H5.12'/%3E%3C/svg%3E") center/contain no-repeat;
          mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='8' cy='21' r='1'/%3E%3Ccircle cx='19' cy='21' r='1'/%3E%3Cpath d='M2.05 2.05h2l2.66 12.42a2 2 0 0 0 2 1.58h9.78a2 2 0 0 0 1.95-1.57l1.65-7.43H5.12'/%3E%3C/svg%3E") center/contain no-repeat;
}

/* اشترِ الآن: أحمر */
.checkout_btn{
  height:62px; border:0 !important; border-radius:14px !important;
  background:#E5383F !important; color:#fff !important;
  font-size:0 !important; box-shadow:0 12px 24px -14px rgba(229,56,63,.8);
  transition:background-color .2s, transform .2s !important;
}
.checkout_btn::before{ content:"اشترِ الآن"; font-size:20px; font-weight:800; }
.checkout_btn:hover{ background:#D22B32 !important; transform:translateY(-1px); }

/* مربع الشحن المجاني تحت الأزرار */
div.flex-col-reverse:has(> .checkout_btn)::after{
  content:"الشحن مجاني لمدة محدودة.. اطلب الآن";
  order:3; display:block; margin-top:6px;
  padding:16px 46px 16px 16px;
  border:1px solid #F2B8BC; border-radius:14px; background:#FDFAF6;
  color:#E0242B; font-size:16px; font-weight:800; line-height:1.6;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23E0242B' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 18V6a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2v11a1 1 0 0 0 1 1h2'/%3E%3Cpath d='M15 18H9'/%3E%3Cpath d='M19 18h2a1 1 0 0 0 1-1v-3.65a1 1 0 0 0-.22-.624l-3.48-4.35A1 1 0 0 0 17.52 8H14'/%3E%3Ccircle cx='17' cy='18' r='2'/%3E%3Ccircle cx='7' cy='18' r='2'/%3E%3C/svg%3E");
  background-repeat:no-repeat; background-size:22px 22px; background-position:right 16px center;
}

@media (max-width:767px){
  .add_to_cart_btn{ height:54px; font-size:16px !important; }
  .checkout_btn{ height:58px; }
  .checkout_btn::before{ font-size:18px; }
  div.flex-col-reverse:has(> .checkout_btn)::after{ font-size:14.5px; padding:14px 42px 14px 14px; background-position:right 14px center; }
}

/* ================= زر الشراء في الشريط الثابت تحت (CSS فقط) ================= */
div[class*="max-w-[1312px]"] > button:not(.dk-sb-cart){
  background:#E5383F !important; color:#fff !important;
  border-radius:14px !important; min-height:54px;
}
div[class*="max-w-[1312px]"] > button:not(.dk-sb-cart):hover{ background:#D22B32 !important; }
div[class*="max-w-[1312px]"] > button:not(.dk-sb-cart) p{ display:none !important; }
div[class*="max-w-[1312px]"] > button:not(.dk-sb-cart)::before{ content:"اشترِ الآن"; font-size:17px; font-weight:800; white-space:nowrap; line-height:1.5; }

/* ================================================================== */
/* 6. عداد الشحن المجاني */
/* ================================================================== */
/* نخفي المربع الثابت اللي في الـ CSS لما العداد يشتغل */
  .dk-timer-ready::after{ display:none !important; content:none !important; }

  /* الترتيب: أضف للسلة ← اشترِ الآن ← العداد */
  .dk-timer-ready{ flex-direction:column !important; }
  .dk-timer-ready > div:not(.dk-ship-box){ order:1 !important; margin-top:0 !important; }
  .dk-timer-ready > .checkout_btn{ order:2 !important; }
  .dk-timer-ready > .dk-ship-box{ order:3 !important; }

  .dk-ship-box{
    order:3; margin-top:6px; padding:16px;
    border:1px solid #F2B8BC; border-radius:14px; background:#FDFAF6;
    direction:rtl; font-family:inherit;
  }
  .dk-ship-title{
    display:flex; align-items:center; gap:10px;
    color:#E0242B; font-size:16px; font-weight:800; line-height:1.6;
  }
  .dk-ship-title svg{ width:22px; height:22px; flex-shrink:0; fill:none; stroke:#E0242B; stroke-width:2; stroke-linecap:round; stroke-linejoin:round; }
  .dk-ship-row{ display:flex; align-items:center; gap:10px; margin-top:10px; color:#6b7280; font-size:15px; }
  .dk-ship-time{
    direction:ltr; display:inline-block; min-width:96px; padding:4px 12px; border-radius:999px;
    background:#E5383F; color:#fff; font-size:16px; font-weight:800; text-align:center;
    font-variant-numeric:tabular-nums; letter-spacing:.5px;
  }
  @media (max-width:767px){
    .dk-ship-title{ font-size:14.5px; }
    .dk-ship-row{ font-size:14px; }
    .dk-ship-time{ font-size:15px; min-width:88px; }
  }

/* ================================================================== */
/* 7. الشريط الثابت تحت في صفحة المنتج */
/* ================================================================== */
.dk-sb{
    display:grid !important; grid-template-columns:1fr 1fr; gap:12px 10px !important;
    max-width:720px !important; padding:12px 16px !important; direction:rtl;
  }
  .dk-sb > div:first-child:not([class^="dk-sb-"]){ display:none !important; } /* صورة واسم المنتج */

  /* الإجمالي */
  .dk-sb-info{ display:flex; flex-direction:column; justify-content:center; gap:2px; min-width:0; }
  .dk-sb-total{ display:flex; align-items:baseline; gap:8px; white-space:nowrap; }
  .dk-sb-total small{ font-size:13px; color:#6b7280; }
  .dk-sb-total b{ font-size:19px; font-weight:800; color:#E0242B; }
  .dk-sb-ok{ font-size:13px; font-weight:700; color:#2F7D5B; }

  /* العداد */
  .dk-sb-qty{
    justify-self:end; display:flex; align-items:center; justify-content:space-between;
    width:100%; max-width:150px; height:48px; padding:0 6px;
    border:1px solid #e5e7eb; border-radius:14px; background:#fff;
  }
  .dk-sb-qty button{
    display:grid; place-items:center; width:36px; height:36px; border:0; border-radius:10px;
    background:transparent; color:#161616; cursor:pointer;
  }
  .dk-sb-qty button:hover{ background:#f3f4f6; }
  .dk-sb-qty button:disabled{ color:#c4c4c4; cursor:default; background:transparent; }
  .dk-sb-qty svg{ width:20px; height:20px; fill:none; stroke:currentColor; stroke-width:2.4; stroke-linecap:round; }
  .dk-sb-qty span{ font-size:17px; font-weight:800; min-width:24px; text-align:center; }

  /* الأزرار */
  .dk-sb-cart, .dk-sb .dk-sb-buy{
    height:54px; border:0 !important; border-radius:14px !important;
    display:flex !important; align-items:center; justify-content:center; gap:8px;
    font-family:inherit; font-size:16px; font-weight:800; cursor:pointer;
    max-width:none !important; padding:0 10px !important;
  }
  .dk-sb .dk-sb-cart{ background:#F5B400 !important; color:#161616 !important; white-space:nowrap; }
  .dk-sb .dk-sb-cart::before{ content:none !important; display:none !important; }
  .dk-sb .dk-sb-cart:hover{ background:#E5A800 !important; }
  .dk-sb-cart svg{ width:22px; height:22px; fill:none; stroke:currentColor; stroke-width:2; stroke-linecap:round; stroke-linejoin:round; }
  .dk-sb .dk-sb-buy{ background:#E5383F !important; color:#fff !important; }
  .dk-sb .dk-sb-buy:hover{ background:#D22B32 !important; }
  .dk-sb .dk-sb-buy p{ display:none !important; }
  .dk-sb .dk-sb-buy::before{ content:"اشترِ الآن"; font-size:17px; font-weight:800; white-space:nowrap; }

  /* الترتيب */
  .dk-sb-info{ order:1; } .dk-sb-qty{ order:2; } .dk-sb-cart{ order:3; } .dk-sb .dk-sb-buy{ order:4; }
  /* لما العداد مش موجود (زي مع العروض): الإجمالي سطر لوحده والزرارين جنب بعض */
  .dk-sb:has(.dk-sb-qty[style*="none"]) .dk-sb-info{ grid-column:1 / -1; flex-direction:row; justify-content:space-between; align-items:center; }

/* ================================================================== */
/* 8. شريط الأقسام فوق المنتجات */
/* ================================================================== */
#dk-cat-chips{
    display:flex; gap:12px; overflow-x:auto; scrollbar-width:none;
    margin:-8px 0 28px; padding:4px 2px 6px; direction:rtl;
  }
  #dk-cat-chips::-webkit-scrollbar{ display:none; }
  #dk-cat-chips a{
    flex:0 0 auto; display:inline-flex; align-items:center; height:52px; padding:0 22px;
    border:1px solid #ebe4d3; border-radius:999px; background:#fff;
    color:#161616; font-size:16px; font-weight:500; white-space:nowrap; text-decoration:none;
    transition:border-color .2s, background-color .2s, color .2s;
  }
  #dk-cat-chips a:hover{ border-color:#C9A24B; background:#FAF7F0; }
  #dk-cat-chips a.is-active{
    background:#2F5D50; border-color:#2F5D50; color:#FAF7F0; font-weight:700;
    box-shadow:0 8px 18px -10px rgba(47,93,80,.7);
  }
  @media (max-width:767px){
    #dk-cat-chips{ gap:8px; margin:-12px -16px 20px; padding:4px 16px 6px; }
    #dk-cat-chips a{ height:42px; padding:0 16px; font-size:14px; }
  }

/* ================================================================== */
/* 9. عروض الكمية: مسافة للشريط اللي فوق الكارت (الضمان / توصيل مجاني) */
/* ================================================================== */
div.rounded-\[28px\]:has(.radio_container) > div:last-child > div:has(.absolute){
  padding-top:46px !important; margin-top:10px;
}
div.rounded-\[28px\]:has(.radio_container) > div:last-child > div:has(.absolute) .radio_container{ top:46px; }

/* الشريط فوق العروض: ذهبي، والجملة (ضمان ذهبي...) بالأحمر وأصغر */
div.rounded-\[28px\] .bundles_label > div{ background:#C9A24B !important; }
div.rounded-\[28px\] .bundles_label > div > span{ color:#161616 !important; font-size:10.5px !important; font-weight:700 !important; }
/* سطر "خصم X% توفير Y دينار" في كل عرض: أصغر وبالأحمر (كل المنتجات) */
div.rounded-\[28px\] p.w-fit.text-sm.text-\[\#61758A\]{ color:#E0242B !important; font-size:12px !important; }
/* النص المساعد تحت عنوان "اختر العرض المناسب" بالأحمر */
div.rounded-\[28px\] p.md\:text-base.text-\[\#61758A\]{ color:#E0242B !important; }
