/* Flipkart-style Horizontal Product Slider */

.products-section {
  background-color: #f1f2f4;
  padding: 16px 0;
  position: relative;
}

/* Main Container - vertical layout for categories */
.mainbody {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 0;
}

/* Category row wrapper */
.category-row {
  position: relative;
}

/* Grid Layout for each category - 2 products per row */
.category-products {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  padding: 10px 16px;
}

.products {
  background: white;
  text-decoration: none;
  color: black;
  display: block;
  cursor: pointer;
  border-radius: 8px;
  overflow: hidden;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  border: 1px solid #f0f0f0;
}

.products:hover {
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
  transform: translateY(-4px);
}

.productcard {
  padding: 12px;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.imagecontainer {
  text-align: center;
  flex-grow: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fafafa;
  border-radius: 4px;
  margin-bottom: 8px;
}

.productimage {
  width: 100%;
  height: 200px;
  object-fit: contain;
  padding: 12px;
}

.product-info {
  padding-top: 8px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

/* Product Title - max 2 lines with ellipsis */
.product-name {
  font-size: 14px;
  color: #212121;
  line-height: 1.4;
  margin-bottom: 4px;
  word-break: break-word;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

.price-line {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}

.selling-price {
  font-size: 16px;
  font-weight: 700;
  color: #212121;
}

.mrp {
  text-decoration: line-through;
  color: #878787;
  font-size: 12px;
}

.discount {
  font-size: 13px;
  color: #388e3c;
  font-weight: 700;
}

.wow-offer {
  margin-top: 4px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.wow-badge {
  height: 16px;
}

.wow-price {
  font-size: 13px;
  font-weight: 500;
  color: #212121;
}

.rating-line {
  display: flex;
  align-items: center;
  margin-top: auto;
  padding-top: 8px;
  gap: 6px;
  font-size: 12px;
}

.rating-stars {
  color: #388e3c;
  font-size: 13px;
  display: flex;
  gap: 2px;
}

.rating-stars .bi-star {
  color: #e0e0e0;
}

.fassured-logo-small {
  height: 14px;
}

/* Buy Button */
.buy-btn {
  background: #2874f0;
  color: white;
  border: none;
  padding: 8px 12px;
  border-radius: 4px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  margin-top: auto;
  width: 100%;
  transition: background 0.2s;
}

.buy-btn:hover {
  background: #1c5db8;
}

/* Slider Navigation Buttons */
.slider-nav {
  position: absolute;
  top: 50%;
  width: 100%;
  pointer-events: none;
  display: flex;
  justify-content: space-between;
  padding: 0 8px;
  transform: translateY(-50%);
  z-index: 10;
}

.slider-nav button {
  pointer-events: all;
  background: rgba(255, 255, 255, 0.95);
  border: none;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
  margin: 0 4px;
}

.slider-nav button:hover {
  background: #fff;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.16);
}

.slider-nav button:active {
  transform: scale(0.95);
}

.slider-nav button i {
  font-size: 18px;
  color: #212121;
}

/* Responsive */
@media (max-width: 1200px) {
  .productimage {
    height: 180px;
  }

  .category-products {
    padding: 10px 16px;
  }
}

@media (max-width: 768px) {
  .productimage {
    height: 150px;
  }

  .category-products {
    padding: 10px 12px;
    gap: 6px;
  }

  .cat-nav {
    display: none;
  }

  .deal-banner {
    padding: 10px 12px;
    margin: 8px;
  }

  .deal-title {
    font-size: 14px;
  }

  .sale-badge {
    font-size: 10px;
    padding: 3px 8px;
  }

  .product-name {
    font-size: 12px;
  }

  .selling-price {
    font-size: 14px;
  }

  .mrp {
    font-size: 11px;
  }

  .discount {
    font-size: 11px;
  }

  .wow-offer {
    display: none;
  }
}

@media (max-width: 480px) {
  .productimage {
    height: 120px;
    padding: 8px;
  }

  .product-name {
    font-size: 11px;
    -webkit-line-clamp: 2;
  }

  .selling-price {
    font-size: 13px;
  }

  .mrp, .discount {
    font-size: 10px;
  }

  .productcard {
    padding: 8px;
  }

  .category-products {
    padding: 8px 8px;
    gap: 6px;
  }

  .cat-nav {
    display: none;
  }

  .cat-nav-right {
    right: 2px;
  }

  .rating-line {
    font-size: 10px;
  }

  .rating-stars {
    font-size: 10px;
  }

  .fassured-logo-small {
    height: 12px;
  }

  .deal-banner {
    padding: 8px 10px;
    margin: 6px;
    border-radius: 8px;
  }

  .deal-title {
    font-size: 13px;
  }

  .sale-badge {
    font-size: 9px;
    padding: 3px 6px;
  }
}

/* Deal Banner */
.deal-banner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #ffffff;
  border-radius: 12px;
  padding: 12px 16px;
  margin: 10px;
  border: 0.5px solid #e2e8f0;
  gap: 10px;
}

.deal-title {
  font-size: 16px;
  font-weight: 600;
}

.sale-badge {
  background: #fe7d1a;
  color: white;
  padding: 4px 12px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  margin-left: auto;
}
