/* === General Layout === */
.custom-carousel-wrapper {
  padding: 20px;
}

.category-carousel-block {
  border: 2px solid #ccc;
  padding: 30px 20px 20px 20px; /* Top padding increased to allow label overlap */
  margin-bottom: 40px;
  position: relative;
  background: #fff;
  border-radius: 10px;
  overflow: visible;
}

/* === Category Header === */
.category-header {
  position: absolute;
  top: -15px;
  left: 0;
  width: 100%;
  padding: 0 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 2;
}

.category-label {
  background-color: #f97316;
  color: #fff;
  padding: 5px 12px;
  border-radius: 6px;
  font-weight: bold;
  font-size: 15px;
  text-decoration: none;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  transition: background-color 0.3s;
  position: relative;
  z-index: 2;
}

.category-label:hover {
  background-color: #ea580c;
}

.see-all-link {
  background-color: #e2e8f0;
  color: #333;
  padding: 5px 12px;
  border-radius: 6px;
  font-weight: 500;
  font-size: 14px;
  text-decoration: none;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  transition: background-color 0.3s;
  z-index: 2;
}

.see-all-link:hover {
  background-color: #cbd5e1;
}

/* === Swiper Container === */
.custom-carousel {
  margin-top: 20px;
  direction: rtl;
}

.swiper-slide {
  display: flex;
  justify-content: center;
}

/* === Product Card === */
.carousel-product-card {
  width: 100%;
  max-width: 220px;
  aspect-ratio: 1 / 1;
  background: #f9f9f9;
  border: 1px solid #ddd;
  padding: 15px;
  box-sizing: border-box;
  border-radius: 10px;
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: box-shadow 0.2s ease;
}

.carousel-product-card:hover {
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.carousel-image {
  width: 100%;
  height: auto;
  object-fit: contain;
  margin-bottom: 10px;
}

/* === Product Title === */
.carousel-product-title {
  font-size: 14px;
  font-weight: 600;
  color: #333;
  margin-bottom: 5px;
  line-height: 1.4em;
  max-height: 2.8em; /* ~2 lines */
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  text-overflow: ellipsis;
}

/* === Price Styling === */
.carousel-price {
  font-size: 14px;
  margin-bottom: 10px;
  display: flex;
  justify-content: center;
  gap: 6px;
}

.carousel-price .old-price {
  color: #999;
  text-decoration: line-through;
  order: 1;
}

.carousel-price .new-price {
  color: #e65100;
  font-weight: bold;
  order: 2;
}

/* === Buttons === */
.carousel-buttons {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.add-to-cart-btn,
.whatsapp-btn {
  display: inline-block;
  padding: 8px;
  font-size: 13px;
  font-weight: bold;
  text-align: center;
  text-decoration: none;
  border-radius: 6px;
  transition: background 0.3s;
}

.add-to-cart-btn {
  background-color: #333;
  color: #fff;
}

.add-to-cart-btn:hover {
  background-color: #111;
}

.whatsapp-btn {
  background-color: #25D366;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: bold;
  text-decoration: none;
  transition: background 0.3s;
}

.whatsapp-btn:hover {
  background-color: #1ebe5b;
}

.whatsapp-btn .whatsapp-icon::before {
  content: '\\f232';
  font-family: \"Font Awesome 5 Brands\";
  font-weight: 400;
  font-size: 15px;
  line-height: 1;
}

/* === Swiper Controls === */
.swiper-button-next,
.swiper-button-prev {
  color: orange;
  background: rgba(255, 255, 255, 0.5);
  width: 18px;
  height: 18px;
  border-radius: 50%;
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.swiper-button-next::after,
.swiper-button-prev::after {
  font-size: 13px;
  color: orange;
}

.swiper-pagination-bullet {
  background: orange;
  opacity: 1;
}

.swiper-pagination-bullet-active {
  background: red;
}

.custom-carousel .swiper-pagination {
  position: relative;
  margin-top: 15px;
  text-align: center;
}

/* === Responsive WhatsApp Button === */
@media (max-width: 480px) {
  .whatsapp-btn {
    padding: 8px 10px;
    font-size: 13px;
    gap: 4px;
  }

  .whatsapp-btn .label-text {
    font-size: 13px;
  }

  .whatsapp-btn .whatsapp-icon::before {
    font-size: 15px;
  }
}

@media (max-width: 360px) {
  .whatsapp-btn {
    padding: 6px 8px;
    font-size: 12px;
  }

  .whatsapp-btn .label-text {
    font-size: 12px;
  }

  .whatsapp-btn .whatsapp-icon::before {
    font-size: 14px;
  }
}
