/**
 * Phase 3 — home banner carousel + hot deals (docs/improvements/Home_and_Products.md)
 * Banner: ~90vh desktop, shorter on small screens. Hot deals: responsive tiles, full-card click.
 */

/* --- Hero carousel (banner table) --- */
.jdh-hero-carousel {
  position: relative;
}

.jdh-hero-carousel .carousel-inner {
  border-radius: 0;
  overflow: hidden;
}

@media (min-width: 992px) {
  .jdh-hero-carousel {
    min-height: 90vh;
  }

  .jdh-hero-carousel .carousel-item,
  .jdh-hero-carousel .carousel-item > .jdh-hero-carousel__slide {
    min-height: 90vh;
  }
}

@media (max-width: 991.98px) {
  .jdh-hero-carousel {
    min-height: clamp(220px, 55vh, 520px);
  }

  .jdh-hero-carousel .carousel-item,
  .jdh-hero-carousel .carousel-item > .jdh-hero-carousel__slide {
    min-height: clamp(220px, 55vh, 520px);
  }
}

.jdh-hero-carousel .carousel-item {
  position: relative;
}

.jdh-hero-carousel .jdh-hero-carousel__slide {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  color: inherit;
  text-decoration: none;
  height: 100%;
}

.jdh-hero-carousel .jdh-hero-carousel__slide:hover {
  text-decoration: none;
  color: inherit;
}

.jdh-hero-carousel .jdh-hero-carousel__media {
  position: absolute;
  inset: 0;
  z-index: 0;
  background: #e9ecef;
}

.jdh-hero-carousel .jdh-hero-carousel__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

.jdh-hero-carousel .carousel-caption {
  position: relative;
  z-index: 2;
  left: auto;
  right: auto;
  bottom: auto;
  padding: 1.25rem 1rem 2rem;
  text-align: center;
}

.jdh-hero-carousel .carousel-control-prev,
.jdh-hero-carousel .carousel-control-next {
  z-index: 3;
  width: 8%;
  opacity: 0.85;
}

/* --- Hot deals (hot_deals table) --- */
.jdh-hot-deals-section .jdh-hot-deal-col {
  margin-bottom: 1rem;
}

@media (min-width: 768px) {
  .jdh-hot-deals-section .jdh-hot-deal-col {
    margin-bottom: 0;
  }
}

.jdh-hot-deal-card {
  position: relative;
  display: block;
  height: 100%;
  min-height: 200px;
  border-radius: 0.5rem;
  overflow: hidden;
  box-shadow: 0 0.25rem 1rem rgba(0, 0, 0, 0.08);
  color: inherit;
  text-decoration: none;
  background: #111 center / cover no-repeat;
}

.jdh-hot-deal-card:hover {
  color: inherit;
  text-decoration: none;
  box-shadow: 0 0.35rem 1.25rem rgba(0, 0, 0, 0.12);
}

.jdh-hot-deal-card__bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  transition: transform 0.35s ease;
}

.jdh-hot-deal-card:hover .jdh-hot-deal-card__bg {
  transform: scale(1.03);
}

.jdh-hot-deal-card__inner {
  position: relative;
  z-index: 1;
  min-height: 220px;
  padding: 1.5rem 1.25rem;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.65) 0%, rgba(0, 0, 0, 0.1) 55%, transparent 100%);
}

.jdh-hot-deal-card__title {
  color: #fff;
  font-weight: 700;
  font-size: 1.1rem;
  margin-bottom: 0.75rem;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.jdh-hot-deal-card__cta {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  align-self: flex-start;
  padding: 0.45rem 1rem;
  border-radius: 2rem;
  background: rgba(255, 255, 255, 0.95);
  color: #03124a;
  font-weight: 600;
  font-size: 0.875rem;
}

.jdh-hot-deal-card__cta i {
  font-size: 1rem;
}
