/* Home page. The page is a stack of white panels on the tinted background;
   this file only adds the blocks that are unique to the home page - cards,
   grids and the hero. Buttons, panels, section heads, product cards and
   vouchers all come from components.css. */

.home {
  padding-top: var(--space-4);
}
.home > section {
  margin-bottom: var(--space-4);
}

/* --- Top row: category rail | hero | category tiles --------------------- */
.home-top {
  display: grid;
  grid-template-columns: 228px minmax(0, 1fr) 258px;
  gap: var(--space-3);
  align-items: start;
}

.home-rail {
  background: var(--color-surface);
  border-radius: var(--radius-xl);
  padding: 0.55rem;
}
.home-rail li + li {
  margin-top: 1px;
}
.home-rail__link {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.6rem;
  border-radius: 9px;
  font-size: var(--font-size-sm);
  font-weight: 600;
  color: #3a2e33;
}
.home-rail__link:hover {
  background: var(--color-surface-tint);
  color: var(--color-primary-dark);
}
.home-rail__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--color-primary);
  flex: none;
  margin-left: 4px;
}
.home-rail__name {
  flex: 1;
  min-width: 0;
}
.home-rail__chevron {
  color: #c3cbd4;
}
.home-rail__all {
  display: block;
  margin-top: 0.35rem;
  padding: 0.55rem 0.6rem;
  border-top: 1px solid var(--color-border);
  font-size: var(--font-size-sm);
  font-weight: 700;
  color: var(--color-primary-dark);
}
.home-rail__skeleton {
  height: 34px;
  border-radius: 9px;
  margin-bottom: 1px;
}

/* --- Hero ---------------------------------------------------------------- */
.home-hero {
  position: relative;
  height: 344px;
  border-radius: var(--radius-xl);
  overflow: hidden;
  background: var(--gradient-hero);
}
.home-hero__slide {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: 1.02fr 0.98fr;
  align-items: center;
  opacity: 0;
  visibility: hidden;
  transform: translateX(18px);
  transition: opacity 0.5s ease, transform 0.5s ease, visibility 0s linear 0.5s;
}
.home-hero__slide.is-active {
  opacity: 1;
  visibility: visible;
  transform: none;
  transition: opacity 0.5s ease, transform 0.5s ease;
  z-index: 1;
}
@media (prefers-reduced-motion: reduce) {
  .home-hero__slide {
    transform: none;
    transition: opacity 0.2s ease, visibility 0s linear 0.2s;
  }
}
.home-hero__copy {
  padding: 0 0 0 2rem;
  position: relative;
  z-index: 2;
}
.home-hero__eyebrow {
  display: inline-block;
  background: var(--color-accent);
  color: var(--color-accent-ink);
  font-size: var(--font-size-2xs);
  font-weight: 800;
  letter-spacing: 0.04em;
  padding: 5px 11px;
  border-radius: var(--radius-xs);
}
.home-hero__title {
  margin: 0.9rem 0 0.7rem;
  font-size: var(--font-size-2xl);
  line-height: 1.12;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.03em;
}
.home-hero__text {
  margin: 0 0 1.3rem;
  font-size: var(--font-size-base);
  line-height: 1.65;
  color: #fce2eb;
  max-width: 34ch;
}
.home-hero__actions {
  display: flex;
  gap: var(--space-2);
  flex-wrap: wrap;
}
.home-hero__media {
  position: relative;
  height: 100%;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.home-hero__media::before {
  content: '';
  position: absolute;
  width: 280px;
  height: 280px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  right: -26px;
}
.home-hero__media img {
  position: relative;
  max-width: 82%;
  max-height: 82%;
  width: auto;
  height: auto;
  min-width: 0;
  min-height: 0;
  object-fit: contain;
  filter: drop-shadow(0 18px 30px rgba(90, 10, 40, 0.3));
}

.home-hero__arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 3;
  width: 34px;
  height: 34px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.24);
  color: #fff;
  font-size: 1.3rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}
.home-hero__arrow:hover {
  background: rgba(255, 255, 255, 0.42);
}
.home-hero__arrow--prev {
  left: 10px;
}
.home-hero__arrow--next {
  right: 10px;
}
.home-hero__dots {
  position: absolute;
  bottom: 14px;
  left: 2rem;
  z-index: 3;
  display: flex;
  gap: 6px;
}
.home-hero__dots .hero-carousel__dot {
  width: 7px;
  height: 5px;
  padding: 0;
  border: none;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.45);
  transition: width 0.2s ease;
}
.home-hero__dots .hero-carousel__dot.is-active {
  width: 22px;
  background: #fff;
}

/* --- Category tiles beside the hero ------------------------------------- */
.home-tiles {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}
.home-tile {
  position: relative;
  overflow: hidden;
  height: 165px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 0.9rem;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
}
.home-tile:hover {
  box-shadow: var(--shadow-md);
  color: inherit;
}
.home-tile__eyebrow {
  display: block;
  font-size: var(--font-size-2xs);
  font-weight: 800;
  letter-spacing: 0.05em;
  color: var(--color-primary-dark);
  text-transform: uppercase;
}
.home-tile__title {
  display: block;
  font-size: var(--font-size-md);
  font-weight: 800;
  color: var(--color-text);
  line-height: 1.28;
  margin-top: 0.35rem;
  max-width: 9.5em;
}
.home-tile__more {
  font-size: var(--font-size-sm);
  color: var(--color-muted);
  font-weight: 600;
}
.home-tile img {
  position: absolute;
  right: 10px;
  bottom: 10px;
  max-width: 96px;
  max-height: 96px;
  width: auto;
  height: auto;
  min-width: 0;
  min-height: 0;
  object-fit: contain;
}
.home-tile-skeleton {
  height: 165px;
  border-radius: var(--radius-xl);
}

/* --- Trust row ----------------------------------------------------------- */
.home-trust {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-3);
}
.home-trust__item {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.95rem 1.05rem;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-left: 4px solid var(--color-primary);
  border-radius: var(--radius-xl);
}
.home-trust__icon {
  flex: none;
  width: 40px;
  height: 40px;
  border-radius: 11px;
  background: var(--color-surface-tint);
  border: 1px solid var(--color-border-pink);
  color: var(--color-primary-dark);
  display: flex;
  align-items: center;
  justify-content: center;
}
.home-trust__item h3 {
  margin: 0;
  font-size: var(--font-size-base);
  font-weight: 700;
  color: var(--color-text);
}
.home-trust__item p {
  margin: 1px 0 0;
  font-size: var(--font-size-sm);
  color: var(--color-muted);
  line-height: 1.5;
}

/* --- Category icon grid -------------------------------------------------- */
.cat-grid {
  display: grid;
  /* auto-fit so a shop with four categories fills the row instead of
     leaving four empty tracks; the per-item max-width stops those four
     from stretching into billboards. */
  grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
  gap: var(--space-2);
}
.cat-grid__item {
  width: 100%;
  max-width: 190px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.55rem;
  padding: 0.75rem 0.3rem;
  border: 1px solid transparent;
  border-radius: var(--radius-lg);
  text-align: center;
}
.cat-grid__item:hover {
  background: var(--color-surface-tint-soft);
  border-color: var(--color-border-pink);
  color: inherit;
}
.cat-grid__icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--color-surface-tint);
  color: var(--color-primary-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex: none;
}
.cat-grid__icon img {
  width: 84%;
  height: 84%;
  object-fit: contain;
}
.cat-grid__name {
  font-size: var(--font-size-xs);
  font-weight: 600;
  color: var(--color-text);
  line-height: 1.35;
}
.cat-grid__skeleton {
  height: 96px;
  border-radius: var(--radius-lg);
}

/* --- Discount band ------------------------------------------------------- */
.deals-band {
  background: var(--gradient-sale);
  padding: 0.85rem 1.15rem;
  display: flex;
  align-items: center;
  gap: var(--space-3);
  flex-wrap: wrap;
}
.deals-band__title {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  color: #fff;
}
.deals-band__title h2 {
  margin: 0;
  font-size: var(--font-size-xl);
  font-weight: 800;
  letter-spacing: -0.01em;
}
.deals-band__note {
  margin: 0;
  font-size: var(--font-size-sm);
  color: #ffd9d4;
}
.deals-band__link {
  margin-left: auto;
  color: #fff;
  font-size: var(--font-size-sm);
  font-weight: 700;
  border: 1px solid rgba(255, 255, 255, 0.5);
  padding: 0.45rem 0.9rem;
  border-radius: var(--radius-sm);
}
.deals-band__link:hover {
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
}
.deals-band__body {
  padding: var(--space-4) 1.15rem 1.15rem;
}

/* --- Consult + brands --------------------------------------------------- */
.home-duo {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: var(--space-3);
}
.home-consult__text {
  font-size: var(--font-size-base);
  color: var(--color-text-soft);
  line-height: 1.7;
  margin-bottom: var(--space-4);
}
.brand-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.65rem;
}
.brand-grid__item {
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: #fffcfd;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}
.brand-grid__item:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 18px rgba(17, 17, 17, 0.08);
  border-color: var(--color-border-strong, var(--color-border));
}
.brand-grid__item img {
  max-width: 100%;
  max-height: 34px;
  width: auto;
  height: auto;
  object-fit: contain;
}
.brand-grid__item--text {
  font-size: var(--font-size-sm);
  font-weight: 700;
  color: var(--color-text-soft);
  letter-spacing: 0.01em;
}

/* --- Responsive ---------------------------------------------------------- */
@media (max-width: 1180px) {
  .home-top {
    grid-template-columns: minmax(0, 1fr) 240px;
  }
  .home-rail {
    display: none;
  }
}

@media (max-width: 900px) {
  .home-top {
    grid-template-columns: minmax(0, 1fr);
  }
  .home-hero {
    height: auto;
  }
  .home-hero__slide {
    position: relative;
    grid-template-columns: 1fr;
    padding: 1.3rem 0;
    display: none;
  }
  .home-hero__slide.is-active {
    display: grid;
  }
  .home-hero__copy {
    padding: 0 1.3rem;
    order: 2;
  }
  .home-hero__title {
    font-size: var(--font-size-xl);
  }
  .home-hero__media {
    order: 1;
    height: 190px;
    margin-bottom: var(--space-3);
  }
  .home-hero__media img {
    width: auto;
    max-height: 100%;
  }
  .home-hero__dots {
    left: 1.3rem;
    bottom: 8px;
  }
  .home-hero__arrow {
    display: none;
  }
  .home-tiles {
    flex-direction: row;
  }
  .home-tile {
    flex: 1;
  }
  .home-trust {
    grid-template-columns: 1fr;
  }
  .home-duo {
    grid-template-columns: 1fr;
  }
  .post-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 620px) {
  .home-tiles {
    flex-direction: column;
  }
  .deals-band__note {
    display: none;
  }
  .brand-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .category-section {
    display: none;
  }
}
