/* ================================
   Products in Demand — responsive image variables
   Drop this at the end of components.css
   ================================ */

/* ---------- Mobile-first default (mobile values from Figma) ---------- */
:root {
  /* products-in-demand image variables (mobile default) */
  --products-img-width: 157.48219299316406px;
  --products-img-height: 157.48219299316406px;
  --products-img-angle: 0deg;
  --products-img-opacity: 1;
  /* optional: image border-radius fallback */
  --products-img-radius: 2px;
}

/* ---------- Tablet (768 - 1023) — exact from Figma ---------- */
@media (min-width: 768px) and (max-width: 1023px) {
  :root {
    --products-img-width: 259.3824157714844px;
    --products-img-height: 259.3824157714844px;
    --products-img-angle: 0deg;
    --products-img-opacity: 1;
  }
}

/* ---------- Small / Medium Laptop (1024 - 1439) — interpolated ---------- */
@media (min-width: 1024px) and (max-width: 1439px) {
  :root {
    --products-img-width: 280px;
    --products-img-height: 280px;
    --products-img-angle: 0deg;
    --products-img-opacity: 1;
  }
}

/* ---------- Standard Laptop (1440 - 1599) — desktop-ish (Figma desktop used ~300) ---------- */
@media (min-width: 1440px) and (max-width: 1599px) {
  :root {
    --products-img-width: 300px;
    /* per Figma desktop value */
    --products-img-height: 300px;
    --products-img-angle: 0deg;
    --products-img-opacity: 1;
  }
}

/* ---------- Large Desktop (1600 - 1919) ---------- */
@media (min-width: 1600px) and (max-width: 1919px) {
  :root {
    --products-img-width: 340px;
    --products-img-height: 340px;
    --products-img-angle: 0deg;
    --products-img-opacity: 1;
  }
}

/* ---------- Wide Desktop / 1920px (1920 - 2499) ---------- */
@media (min-width: 1920px) and (max-width: 2499px) {
  :root {
    --products-img-width: 380px;
    --products-img-height: 380px;
    --products-img-angle: 0deg;
    --products-img-opacity: 1;
  }
}

/* ---------- Extra-large screens (2500px +) ---------- */
@media (min-width: 2500px) {
  :root {
    --products-img-width: 460px;
    --products-img-height: 460px;
    --products-img-angle: 0deg;
    --products-img-opacity: 1;
  }
}




.products-in-demand-section {
  /* top right bottom left — keep top & bottom, left unchanged, right = 0 */
  padding: var(--section-padding-y) 0 var(--section-padding-y) var(--section-padding-x) !important;
}

#products_horiz_container {
  padding: 0 !important;
}

.products-demand {
  background: #fff;
  overflow: hidden;
  position: relative;
}

.products-demand .container {

  max-width: var(--container-max-width);
  width: var(--container-width);
  padding: 0;
}

.products-demand__title {
  position: relative !important;
  display: inline-block !important;
  font-size: var(--section-title-fs);
  line-height: var(--section-title-lh);
  font-weight: 700;
  margin-bottom: clamp(40px, 3vw, 60px);
  width: 100%;
  color: var(--color-primary);
  text-transform: lowercase;
}

.products-demand__corner-svg {
  position: absolute;
  top: 0;
  transform: translate(50%, -50%);
  width: clamp(20px, 2vw, 25px);
  height: clamp(20px, 2vw, 25px);
}

.products-demand__carousel {
  margin-top: clamp(2rem, 3vw, 4rem);
  width: 100%;
  position: relative;
  overflow: visible;
}

.carousel__track {
  display: flex;
  gap: clamp(20px, 2vw, 40px);
  width: 100%;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding-bottom: clamp(20px, 2vw, 30px);
  padding-right: 0;
  padding-left: 0;
}

.carousel__track::-webkit-scrollbar {
  display: none;
}



.carousel__slide {
  scroll-snap-align: start;
  flex: 0 0 auto;
}

.product-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  background: #fff;
  padding: 0 !important;
  border-radius: 0;
  transition: transform 0.3s ease;
  height: 90%;
  box-shadow: none !important;
}

.product-card:hover {
  transform: translateY(clamp(-8px, -0.8vw, -12px));
}

/* 1. Wrapper that holds the image */
.product-card__img-wrapper {
  width: var(--products-img-width);
  height: var(--products-img-height);
  overflow: hidden;
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
}

/* 2. The image itself */
.product-card__img {
  width: 100%;
  height: 100%;
  max-width: var(--products-img-width);
  max-height: var(--products-img-height);
  transition: transform 0.28s ease, opacity 0.28s ease;
  transform-origin: center center;
  object-fit: cover;
  /* Fill the wrapper completely */
  object-position: center;
  /* Center the image crop */
  display: block;
}

.product-card:hover .product-card__img {
  transform: scale(1.02);
}

.product-card__title {
  font-size: var(--products-card-title-fs);
  line-height: var(--products-card-title-lh);
  font-weight: 500;
  color: var(--color-secondary);
}

.product-card__button {
  background-color: var(--color-primary);
  color: white;
  padding: var(--btn-padding-y) var(--btn-padding-x);
  font-size: var(--btn-font-size);
  line-height: var(--btn-line-height);
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: var(--btn-gap);
  ;
  text-decoration: none;
  width: fit-content;
  transition: background 0.3s ease;
}

.product-card__button-arrow {
  width: var(--btn-arrow-size);
  height: auto;
  display: inline-block;
  margin-left: var(--btn-arrow-offset-x);
  transition: transform .25s ease;
}

.product-card__button:hover {
  background-color: var(--color-secondary);
  color: #fff;
  transform: translateY(-2px);
}

.product-card__button:hover .product-card__button-arrow {
  transform: translateX(3px);
}

.carousel__progress-container {
  position: relative;
  width: clamp(200px, 20vw, 350px);
  height: clamp(8px, 0.6vw, 12px);
  background-color: rgba(230, 57, 70, 0.2);
  border-radius: 12px;
  overflow: visible;
  cursor: pointer;
  user-select: none;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
}

.carousel__progress-bar {
  position: absolute;
  top: clamp(-2px, -0.2vw, -3px);
  left: 0;
  height: clamp(12px, 1vw, 18px);
  width: clamp(50px, 5vw, 80px);
  background-color: var(--color-primary, #E63946);
  border-radius: 12px;
  transition: left 0.3s ease, width 0.3s ease;
  box-shadow: 0 2px 8px rgba(229, 57, 53, 0.3);
  cursor: grab;
  user-select: none;
}

.carousel__progress-bar:active {
  cursor: grabbing;
  transition: none;
}

@media (max-width: 768px) {
  .carousel__progress-container {
    width: clamp(120px, 40vw, 200px);
    height: clamp(6px, 0.5vw, 8px);
  }

  .carousel__progress-bar {
    height: clamp(8px, 0.7vw, 12px);
    width: clamp(30px, 3vw, 50px);
  }

  .carousel__slide {
    min-width: clamp(160px, 40vw, 220px);
    max-width: clamp(220px, 50vw, 280px);
  }
}

@media (max-width: 480px) {
  .carousel__progress-container {
    width: clamp(80px, 60vw, 120px);
    height: clamp(4px, 0.4vw, 6px);
  }

  .carousel__progress-bar {
    height: clamp(6px, 0.5vw, 8px);
    width: clamp(18px, 2vw, 30px);
  }

  .carousel__slide {
    min-width: clamp(120px, 60vw, 160px);
    max-width: clamp(160px, 80vw, 200px);
  }
}