/* === Amazon Deals Product Grid === */

/* Flex container for product boxes */
.product-grid {
  display: flex;
  flex-wrap: wrap;         /* allow wrapping on smaller screens */
  gap: 20px;               /* space between boxes */
  justify-content: center; /* center them horizontally */
  margin: 20px 0;
}

/* Each product box */
.product-box {
  flex: 1 1 250px;         /* grow/shrink, min width ~250px */
  max-width: 300px;        /* prevent boxes from stretching too wide */
  border: 1px solid #ddd;
  border-radius: 8px;
  background: #fff;
  text-align: center;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  overflow: hidden;
}

/* Hover effect */
.product-box:hover {
  transform: translateY(-5px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

/* Product link covers the whole box */
.product-box .product-link {
  text-decoration: none;   /* remove underline */
  color: inherit;          /* inherit text color */
  display: block;
}

/* Product image */
.product-box .product-image img {
  width: 100%;
  height: auto;
  display: block;
}

/* Product description (H3) */

.product-box .product-desc {
  padding: 10px;
  font-size: 18px;         /* bigger text */
  color: #333;
  line-height: 1.4em;      /* prevents overlapping lines */
  margin: 0.5em 0;         /* spacing above/below */
  font-weight: normal;     /* keep headings readable */
  display: block;          /* proper block layout */
  text-align: left;        /* ✅ align text to the left */
  text-decoration: none !important;
}


/* Style for the price inside description */
.product-box .product-desc .price {
  font-weight: bold;
  color: #00699D;          /* custom color */
}

/* Remove underline from all links inside product boxes */
.product-box .product-link,
.product-box .product-link:link,
.product-box .product-link:visited,
.product-box .product-link:hover,
.product-box .product-link:focus,
.product-box .product-link:active,
.product-box .product-desc a,
.product-box .product-desc a:link,
.product-box .product-desc a:visited,
.product-box .product-desc a:hover,
.product-box .product-desc a:focus,
.product-box .product-desc a:active {
  text-decoration: none !important;
  color: inherit !important;
}

/* Optional: normalize link color on hover without underline */
.product-box .product-link:hover .product-desc,
.product-box .product-desc a:hover {
  color: #000 !important;
}

.discount-badge2 {
  position: absolute;
  top: 20px;
  left: -10px;              /* shift left so it cuts across */
  background: red;
  color: white;
  font-size: 16px;
  font-weight: bold;
  padding: 5px 10px;        /* wide padding to stretch across */
  transform: rotate(-45deg); /* diagonal slash */
  box-shadow: 2px 2px 6px rgba(0,0,0,0.3);
  text-align: center;
}

.product-image {
  position: relative; /* ensure badge overlays correctly */
  overflow: hidden;   /* keeps ribbon inside image bounds */
}





/* Responsive tweaks */
@media (max-width: 1024px) {
  .product-box {
    flex: 1 1 30%;   /* three per row on medium screens */
  }
}

@media (max-width: 768px) {
  .product-box {
    flex: 1 1 45%;   /* two per row on tablets */
  }
}

@media (max-width: 480px) {
  .product-box {
    flex: 1 1 100%;  /* one per row on mobile */
  }
}
