/* =============================
   Global Reset & Base Styles
============================= */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Poppins", Arial, sans-serif;
  overflow-x: hidden;
  width: 100%;
  background-color: #fff;
  color: #222;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* =============================
   Main Content Wrapper
============================= */
.main-content {
  width: 100%;
  min-height: 100vh;
}

/* =============================
   Hero Section
============================= */
.top1 {
  width: 100%;
  overflow: hidden;
  position: relative;
}

.hero-content {
  width: 100%;
}

.imgslider {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 0;
}

/* =============================
   Products Section
============================= */
.products {
  background-color: #f5f5f5;
  padding: 60px 0;
  text-align: center;
}

.ptitle {
  font-size: 36px;
  font-weight: 700;
  color: #0d4008;
  margin-bottom: 50px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.p1 {
  width: 95%;
  max-width: 1400px;
  margin: 0 auto;
  background-color: rgb(254, 234, 165);
  border-radius: 25px;
  padding: 50px 30px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

/* =============================
   Product Card
============================= */
.product-card {
  background-color: #fff;
  border-radius: 15px;
  padding: 20px;
  width: 100%;
  max-width: 400px;
  margin: 0 auto;
  position: relative;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.product-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

/* =============================
   Discount Badge
============================= */
.discount-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background-color: #0d4008;
  color: rgb(254, 234, 165);
  font-size: 13px;
  padding: 6px 12px;
  border-radius: 6px;
  font-weight: 600;
  z-index: 10;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.15);
}

/* =============================
   Image Slider Container - FIXED FOR MOBILE
============================= */
.image-slider-container {
  position: relative;
  overflow: hidden;
  border-radius: 15px;
  height: 280px;
  margin-bottom: 20px;
  background-color: #f0f0f0;
}

/* Stack all images absolutely */
.image-slider-container img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: contain; /* CHANGED FROM cover TO contain - prevents cropping */
  opacity: 0;
  transition: opacity 0.6s ease-in-out;
  pointer-events: none;
}

/* Active image is visible */
.image-slider-container img.active {
  opacity: 1;
  z-index: 2;
}

/* Slider dots positioned above images */
.slider-dots {
  position: absolute;
  bottom: 15px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 5;
}

.slider-dot {
  width: 10px;
  height: 10px;
  background-color: rgba(255, 255, 255, 0.6);
  border-radius: 50%;
  cursor: pointer;
  transition: background-color 0.3s, transform 0.2s;
}

.slider-dot:hover {
  transform: scale(1.2);
}

.slider-dot.active {
  background-color: #0d4008;
}

/* =============================
   Product Text
============================= */
.pdct1 {
  font-size: 22px;
  color: #0d4008;
  font-weight: 700;
  margin-bottom: 12px;
  text-align: center;
}

/* =============================
   Description Wrapper - NEW SCROLLABLE SECTION
============================= */
.description-wrapper {
  max-height: 200px;
  overflow-y: auto;
  margin-bottom: 20px;
  padding-right: 8px;
  flex-grow: 1;
}

/* Custom scrollbar for description */
.description-wrapper::-webkit-scrollbar {
  width: 6px;
}

.description-wrapper::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 10px;
}

.description-wrapper::-webkit-scrollbar-thumb {
  background: #0d4008;
  border-radius: 10px;
}

.description-wrapper::-webkit-scrollbar-thumb:hover {
  background: #0a3006;
}

.description {
  font-size: 14px;
  color: #444;
  line-height: 1.8;
  text-align: left;
  margin: 0;
}

/* =============================
   Price Section
============================= */
.price-container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 15px;
}

.price {
  font-size: 20px;
  font-weight: 700;
  color: #0d4008;
}

.original-price {
  font-size: 16px;
  color: #888;
  text-decoration: line-through;
}

/* =============================
   Add to Cart Button
============================= */
.add1 {
  margin-top: auto;
  text-align: center;
  padding-top: 10px;
}

.b1 {
  background-color: #0d4008;
  color: rgb(254, 234, 165);
  border: none;
  padding: 12px 30px;
  border-radius: 30px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  width: 100%;
  max-width: 250px;
}

.b1:hover {
  background-color: rgb(254, 234, 165);
  color: #0d4008;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
  transform: translateY(-2px);
}

.b1:active {
  transform: scale(0.98);
}

/* =============================
   Bootstrap Grid Adjustments
============================= */
.row.g-4 {
  --bs-gutter-x: 2rem;
  --bs-gutter-y: 2rem;
}

/* =============================
   Responsive Design
============================= */
@media (max-width: 992px) {
  .ptitle {
    font-size: 32px;
    margin-bottom: 40px;
  }

  .p1 {
    padding: 40px 20px;
  }

  .product-card {
    max-width: 100%;
  }
  
  .image-slider-container {
    height: 300px; /* Slightly taller for tablets */
  }
}

@media (max-width: 768px) {
  .ptitle {
    font-size: 28px;
    margin-bottom: 30px;
  }

  .p1 {
    width: 98%;
    padding: 30px 15px;
    border-radius: 20px;
  }

  .product-card {
    max-width: 450px;
  }

  .image-slider-container {
    height: 280px; /* FIXED HEIGHT - prevents cropping */
  }

  .description-wrapper {
    max-height: 180px;
  }

  .description {
    font-size: 13px;
  }

  .row.g-4 {
    --bs-gutter-x: 1.5rem;
    --bs-gutter-y: 1.5rem;
  }
}

@media (max-width: 576px) {
  .ptitle {
    font-size: 24px;
    margin-bottom: 25px;
  }

  .products {
    padding: 40px 0;
  }

  .p1 {
    padding: 25px 10px;
    border-radius: 15px;
  }

  .product-card {
    padding: 15px;
  }

  .image-slider-container {
    height: 260px; /* ADEQUATE HEIGHT - shows full image without cropping */
  }

  .pdct1 {
    font-size: 20px;
  }

  .description-wrapper {
    max-height: 160px;
  }

  .description {
    font-size: 12px;
    line-height: 1.6;
  }

  .price {
    font-size: 18px;
  }

  .original-price {
    font-size: 14px;
  }

  .b1 {
    font-size: 14px;
    padding: 10px 24px;
  }

  .discount-badge {
    font-size: 12px;
    padding: 5px 10px;
    top: 10px;
    left: 10px;
  }

  .row.g-4 {
    --bs-gutter-x: 1rem;
    --bs-gutter-y: 1rem;
  }
}

@media (max-width: 400px) {
  .image-slider-container {
    height: 240px; /* Extra small screens - still shows full image */
  }
  
  .description-wrapper {
    max-height: 140px;
  }
}