/* ===== اطار المنتج ===== */
.s-product-card-entry {
  border: 1.5px solid #444 !important;
  border-radius: 12px;
  padding: 6px;
  background: #fff;
  transition: all 0.3s ease;
}

.s-product-card-entry:hover {
  border-color: #5fbf95 !important;
  box-shadow: 0 4px 12px rgba(95,191,149,0.3);
  transform: translateY(-4px);
}

/* حذف المفضلة */
.s-product-card-wishlist-btn {
  display: none !important;
}

img {
  content-visibility: auto;
}

.swiper-wrapper {
  will-change: transform;
}

.product_classifications {
  padding-top: 8px !important;
}

/* ===================== */
/* 🔥 حل الفراغ أعلى الصفحة */
/* ===================== */
/* 🔥 حذف الفراغ من أول سكشن */
.storefront_almas {
  margin-top: 0 !important;
  padding-top: 0 !important;
}
body {
  margin-top: 0 !important;
  padding-top: 0 !important;
}

header,
.header,
.main-header {
  margin-top: 0 !important;
  padding-top: 0 !important;
}

.s-announcement-bar,
.announcement-bar {
  margin-top: 0 !important;
}

main,
#main-content,
.main-content {
  margin-top: 0 !important;
  padding-top: 0 !important;
}

/* القوالب اللي فيها sticky header */
body.has-sticky-header,
body.sticky-header {
  padding-top: 0 !important;
}

/* في حال فيه بلوك فاضي */
.s-block:first-child {
  margin-top: 0 !important;
  padding-top: 0 !important;
}

.s-block:empty {
  display: none !important;
}

/* ===================== */
/* 📱 الجوال */
/* ===================== */
@media (max-width: 768px) {

  #main_title {
    font-size: 24px !important;
  }

  #second_title {
    font-size: 16px !important;
  }

  /* ===================== */
  /* 🔲 التصنيفات */
  /* ===================== */

  .product_classifications .flex {
    gap: 6px !important;
  }

  .product_classifications a.group {
    width: 32% !important;
    flex: 0 0 32% !important;
    aspect-ratio: 1 / 1 !important;
    border-radius: 12px !important;
    overflow: hidden !important;
    display: block !important;
  }

  /* ❌ حذف display contents لأنه يخرب الصور */
  .product_classifications a.group > div {
    width: 100% !important;
    height: 100% !important;
  }

  .product_classifications a.group img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    display: block !important;
  }

  .product_classifications a.group h3,
  .product_classifications a.group span,
  .product_classifications a.group p {
    display: none !important;
  }

  /* ===================== */
  /* 🛍️ المنتجات */
  /* ===================== */

  .swiper-wrapper {
    display: flex !important;
    gap: 0 !important;
  }

  .swiper-slide {
    width: 50% !important;
    max-width: 50% !important;
    flex: 0 0 50% !important;
  }

  .s-product-card-content-title,
  .s-product-card-content-title a {
    font-size: 10px !important;
    line-height: 1.3 !important;
    font-weight: 500 !important;
    color: #333 !important;

    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
  }

  .s-product-card-content-sub,
  .s-product-card-content p {
    font-size: 9px !important;
  }

  .s-product-card-price {
    font-size: 12px !important;
    font-weight: 600 !important;
  }

  /* ===================== */
  /* 🛒 زر السلة (كما هو - لم يتم التعديل) */
  /* ===================== */

  .s-product-card-entry button {
    position: relative;
    display: flex !important;
    align-items: center;
    justify-content: center;

    width: 48px !important;
    height: 48px !important;
    padding: 0 !important;

    border: none !important;
    border-radius: 14px !important;
    background: #5fbf95 !important;

    font-size: 0 !important;
    color: transparent !important;
    overflow: hidden;
  }

  .s-product-card-entry button * {
    display: none !important;
  }

  .s-product-card-entry button::before {
    content: "";
    width: 22px;
    height: 22px;
    background: #fff;

    -webkit-mask: url("data:image/svg+xml;utf8,\
<svg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='black'>\
<path stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M3 3h2l.4 2M7 13h10l4-8H5.4M7 13L5.4 5M7 13l-1.5 7h11L17 13M9 21a1 1 0 100-2 1 1 0 000 2zm6 0a1 1 0 100-2 1 1 0 000 2z'/>\
</svg>") center / contain no-repeat;

    mask: url("data:image/svg+xml;utf8,\
<svg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='black'>\
<path stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M3 3h2l.4 2M7 13h10l4-8H5.4M7 13L5.4 5M7 13l-1.5 7h11L17 13M9 21a1 1 0 100-2 1 1 0 000 2zm6 0a1 1 0 100-2 1 1 0 000 2z'/>\
</svg>") center / contain no-repeat;
  }

  .s-product-card-entry button:hover {
    box-shadow: 0 0 12px #5fbf95, 0 0 25px rgba(95,191,149,0.6);
    transform: scale(1.1);
  }

}