/* ============================================================================
   home.css — hero and best-sellers carousel (categories/product cards live
   in storefront.css and are shared with the shop listing).
   Solid overlay, no gradients, blur or shadows; controls change color only.
   ========================================================================== */

/* ---------- Hero ---------------------------------------------------------- */
.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  color: #fff;
  background: var(--primary);
}

.hero__media {
  position: absolute;
  inset: 0;
  z-index: -1;
}
.hero__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
/* One flat dark layer keeps the text readable over any photo */
.hero__media::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(18, 18, 18, .62);
}

.hero__inner { padding-block: clamp(3.5rem, 9vw, 6rem); }

.hero__content {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1rem;
  max-width: 640px;
}

.hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .35rem .9rem;
  border: 1px solid rgba(255, 255, 255, .45);
  border-radius: var(--radius-sm);
  font-size: .88rem;
  font-weight: 600;
}

.hero__content h1 {
  margin: 0;
  font-size: clamp(1.85rem, 5vw, 2.8rem);
  line-height: 1.3;
  font-weight: 700;
  color: #fff;
}
.hero__content h1 span { color: rgba(255, 255, 255, .78); }

.hero__content p {
  margin: 0;
  font-size: clamp(1rem, 2.2vw, 1.1rem);
  line-height: 1.9;
  color: rgba(255, 255, 255, .88);
  max-width: 54ch;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
  margin-top: .75rem;
}

/* Charcoal buttons would disappear on the dark hero, so invert them here */
.hero .btn--primary {
  background: #fff;
  color: var(--ink);
}
.hero .btn--primary:hover { background: var(--primary-soft); }

/* ---------- Best-sellers carousel ----------------------------------------- */
.carousel { position: relative; }

.carousel__track {
  display: flex;
  gap: var(--gap);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  padding-block: .35rem .9rem;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.carousel__track::-webkit-scrollbar { display: none; }

.carousel__item {
  flex: 0 0 clamp(230px, 28%, 300px);
  scroll-snap-align: start;
}
.carousel__item .product-card { height: 100%; }

.carousel__btn {
  position: absolute;
  top: 50%;
  z-index: 5;
  transform: translateY(-60%);
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
  cursor: pointer;
  transition: background var(--speed) var(--ease), border-color var(--speed) var(--ease),
              opacity var(--speed) var(--ease);
}
.carousel__btn:hover {
  background: var(--primary-soft);
  border-color: var(--ink);
}
.carousel__btn[hidden] { display: none; }
.carousel__btn:disabled { opacity: .4; cursor: default; }
.carousel__btn:disabled:hover { background: #fff; border-color: var(--line); }

.carousel__btn--prev { inset-inline-start: -14px; }
.carousel__btn--next { inset-inline-end: -14px; }

/* ---------- Responsive ---------------------------------------------------- */
@media (max-width: 900px) {
  .carousel__item { flex-basis: clamp(215px, 44%, 270px); }
}
@media (max-width: 560px) {
  /* Thumb-sized screens swipe; floating buttons would overlap cards. */
  .carousel__btn { display: none; }
  .carousel__item { flex-basis: 72%; }
  .hero__content h1 { font-size: clamp(1.65rem, 7.5vw, 2.1rem); }
}