/* Featured Cards Carousel (Homepage)
   - Shows exactly 2 cards at a time on desktop
   - Manual controls (no autoplay)
   - Product images “float” (no inner white box)
*/

.home-cards-carousel {
  position: relative;
  margin-top: 32px;
}

.home-cards-carousel__viewport {
  /* Desktop: show exactly two cards and clip the rest */
  overflow: hidden;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  padding: 0;
  scrollbar-width: none;
}

.home-cards-carousel__viewport::-webkit-scrollbar {
  display: none;
}

.home-cards-carousel__track {
  display: flex;
  flex-wrap: nowrap;
  gap: 24px;
  align-items: stretch;
  width: 100%;
  list-style: none;
  padding: 0;
  margin: 0;
}

/* Exactly 2 cards in view (desktop) */
.home-cards-carousel__slide {
  box-sizing: border-box;
  display: flex;
  min-width: 0;
  flex: 0 0 calc((100% - 24px) / 2) !important;
  max-width: calc((100% - 24px) / 2);
  scroll-snap-align: start;
}

/* Equalize card heights + keep CTA buttons aligned */
.home-cards-carousel__slide .card {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.home-cards-carousel__slide .card .card-actions {
  margin-top: auto;
}

/* Keep titles from causing uneven vertical rhythm */
.home-cards-carousel__slide .card h3 {
  min-height: 2.6em; /* ~2 lines */
}

/* Carousel arrows */
.home-cards-carousel__btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 1px solid rgba(0, 0, 0, 0.12);
  background: #fff;
  color: #1f2a37;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
  z-index: 2;
}

.home-cards-carousel__btn:hover {
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.14);
}

.home-cards-carousel__btn:focus-visible {
  outline: 3px solid rgba(220, 38, 38, 0.35);
  outline-offset: 2px;
}

/* Pull arrows out so they don’t sit on top of card borders */
.home-cards-carousel__btn--prev {
  left: -32px;
}

.home-cards-carousel__btn--next {
  right: -32px;
}

/* Float product images in the cards (remove inner white “media box”) */
.home-cards-carousel .card .media {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  padding: 0 !important;
  border-radius: 0 !important;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 220px;
}

.home-cards-carousel .card .media img {
  display: block;
  width: 100%;
  height: auto;
  max-width: 260px;
  max-height: 220px;
  object-fit: contain;
  background: transparent !important;
  border: 0 !important;
  padding: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  filter: drop-shadow(0 12px 18px rgba(0, 0, 0, 0.18));
}

/* Reduce the perceived “gap” between image and bullets (helps HandPunch) */
.home-cards-carousel .card .grid-2 {
  grid-template-columns: 220px 1fr;
  gap: 20px;
  align-items: start;
}

/* Prevent bullet markers from "escaping" into the gap between cards */
.home-cards-carousel .card .bullets {
  margin: 0;
  padding-left: 18px;
}

@media (max-width: 1024px) {
  /* 1 card at a time on smaller screens */
  .home-cards-carousel__slide {
    flex: 0 0 100% !important;
    max-width: 100%;
  }

  .home-cards-carousel__viewport {
    overflow-x: auto;
    padding: 0 14px;
  }

  /* Keep arrows on-screen on smaller viewports */
  .home-cards-carousel__btn--prev {
    left: -10px;
  }

  .home-cards-carousel__btn--next {
    right: -10px;
  }

  /* Let the card’s existing responsive styles drive layout; don’t force columns too narrow */
  .home-cards-carousel .card .grid-2 {
    grid-template-columns: 1fr;
  }

  .home-cards-carousel .card .media {
    justify-content: center;
    margin-bottom: 12px;
    height: auto;
  }

  .home-cards-carousel .card .media img {
    max-width: 320px;
    max-height: none;
  }
}

/* =============================
   Home hero video: click-to-load
   ============================= */

/* Prevent any tiny horizontal overflow (video embeds, carousel controls, etc.) */
html, body { overflow-x: hidden; }

/* Give the hero a bit more room on wide desktop screens so the video feels less cramped */
@media (min-width: 1200px) {
  .hero .container {
    width: min(1280px, 100% - 40px);
  }

  .hero-grid {
    grid-template-columns: 1fr 1.25fr;
    gap: 48px;
  }
}

/* Make the video card slightly tighter so the video fills more of the card */
.hero-card--video {
  padding: 10px;
  max-width: 100%;
}

/* Video embed (thumbnail, play button, click-to-load) styles are maintained in
   /assets/css/home-video.css, which is loaded after this file. */

