/* ============================================
   CZ Supply — Homepage Styles
   ============================================ */

/* --- Hero Slideshow --- */

.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

/* Slideshow layer */
.hero-slides {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  opacity: 0;
  transform: scale(1.06);
  transition: opacity 1.2s ease-in-out, transform 6s ease-out;
}

.hero-slide.is-active {
  opacity: 1;
  transform: scale(1);
}

/* Dark overlay */
.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    175deg,
    rgba(var(--navy-rgb), 0.72) 0%,
    rgba(var(--navy-rgb), 0.50) 40%,
    rgba(var(--navy-rgb), 0.65) 100%
  );
  z-index: 1;
}

/* Content */
.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 780px;
  padding: var(--sp-2xl) var(--sp-lg);
}

.hero-content .eyebrow {
  color: var(--lavender-light);
  font-size: var(--fs-small);
  margin-bottom: var(--sp-lg);
  display: block;
}

.hero-heading {
  font-family: var(--font-heading);
  font-size: var(--fs-hero);
  font-weight: 900;
  color: var(--text-inverse);
  line-height: var(--lh-tight);
  margin-bottom: var(--sp-xl);
  text-shadow: 0 2px 30px rgba(0, 0, 0, 0.2);
  position: relative;
  min-height: 1.3em;
}

/* Rotating headline text */
.hero-heading-line {
  display: none;
  opacity: 0;
  transition: opacity 0.6s ease-in-out;
}

.hero-heading-line.is-active {
  display: inline;
  opacity: 1;
}

.hero-text {
  font-size: var(--fs-body-lg);
  color: rgba(250, 247, 242, 0.8);
  line-height: var(--lh-body);
  max-width: 580px;
  margin: 0 auto var(--sp-2xl);
}

.hero-buttons {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-lg);
  flex-wrap: wrap;
}

/* Slide indicators */
.hero-indicators {
  position: absolute;
  bottom: 5rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  display: flex;
  gap: 10px;
}

.hero-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.5);
  background: transparent;
  cursor: pointer;
  transition: all var(--dur-med) var(--ease-out);
  padding: 0;
}

.hero-dot:hover {
  border-color: rgba(255, 255, 255, 0.9);
}

.hero-dot.is-active {
  background: var(--lavender);
  border-color: var(--lavender);
  transform: scale(1.2);
}

/* Progress bar on active dot */
.hero-dot.is-active::after {
  content: '';
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: transparent;
}

/* Scroll chevron */
.hero-scroll {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  color: rgba(250, 247, 242, 0.5);
  cursor: pointer;
  transition: color var(--dur-fast) var(--ease-out);
}

.hero-scroll:hover {
  color: var(--lavender-light);
}

/* --- Trust Bar --- */

.trust-bar {
  padding-top: var(--sp-3xl);
  padding-bottom: var(--sp-3xl);
}

.trust-bar .trust-item {
  padding: var(--sp-lg) var(--sp-md);
}

.trust-bar .trust-icon svg {
  stroke: var(--lavender-dark);
}

/* --- Shop by Category --- */

.categories {
  overflow: hidden;
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--sp-lg);
}

.category-tile {
  position: relative;
  display: block;
  aspect-ratio: 4 / 3;
  border-radius: var(--radius-lg);
  overflow: hidden;
  cursor: pointer;
}

.category-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--dur-slow) var(--ease-out);
}

.category-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(var(--navy-rgb), 0.75) 0%,
    rgba(var(--navy-rgb), 0.35) 50%,
    rgba(var(--navy-rgb), 0.2) 100%
  );
  transition: background var(--dur-med) var(--ease-out);
  z-index: 1;
}

.category-name {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 2;
  padding: var(--sp-xl) var(--sp-xl);
  font-family: var(--font-heading);
  font-size: var(--fs-h3);
  font-weight: 700;
  color: var(--text-inverse);
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.25);
  transition: transform var(--dur-med) var(--ease-out);
}

.category-tile:hover .category-img {
  transform: scale(1.08);
}

.category-tile:hover .category-overlay {
  background: linear-gradient(
    to top,
    rgba(var(--navy-rgb), 0.6) 0%,
    rgba(var(--navy-rgb), 0.2) 50%,
    rgba(var(--navy-rgb), 0.08) 100%
  );
}

.category-tile:hover .category-name {
  transform: translateY(-4px);
}

/* --- Customer Favorites --- */

.favorites-strip {
  position: relative;
  padding: 0 var(--sp-lg);
  max-width: var(--container-wide);
  margin: 0 auto;
}

.favorites-track {
  display: flex;
  gap: var(--sp-lg);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scroll-padding-left: var(--sp-lg);
  padding-bottom: var(--sp-md);
}

.favorites-track::-webkit-scrollbar {
  height: 6px;
}

.favorites-track::-webkit-scrollbar-track {
  background: var(--warm-200);
  border-radius: 3px;
}

.favorites-track::-webkit-scrollbar-thumb {
  background: var(--lavender);
  border-radius: 3px;
}

.favorites-track::-webkit-scrollbar-thumb:hover {
  background: var(--lavender-dark);
}

.fav-card {
  flex: 0 0 280px;
  min-width: 280px;
  scroll-snap-align: start;
  display: flex;
  flex-direction: column;
}

.fav-card .card-image {
  aspect-ratio: 1;
}

.fav-card .card-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: var(--sp-xs);
}

.fav-card .card-title {
  flex: 1;
}

.fav-btn {
  margin-top: var(--sp-sm);
  align-self: flex-start;
}

.shop-all-link {
  display: inline-block;
  font-family: var(--font-body);
  font-size: var(--fs-body);
  font-weight: 600;
  color: var(--lavender-dark);
  text-transform: uppercase;
  letter-spacing: var(--ls-wide);
  padding: var(--sp-sm) 0;
  border-bottom: 2px solid var(--lavender);
  transition: color var(--dur-fast) var(--ease-out),
              border-color var(--dur-fast) var(--ease-out);
}

.shop-all-link:hover {
  color: var(--navy);
  border-color: var(--navy);
}

/* --- Brand Story --- */

.brand-story-image {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-xl);
}

.brand-story-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  aspect-ratio: 4 / 5;
}

.brand-story-content p {
  color: var(--text-secondary);
  line-height: var(--lh-body);
  font-size: var(--fs-body-lg);
}

.brand-features {
  display: flex;
  gap: var(--sp-xl);
  margin-top: var(--sp-2xl);
  padding-top: var(--sp-xl);
  border-top: 1px solid var(--warm-200);
}

.brand-feature {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-sm);
  text-align: center;
}

.brand-feature-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--lavender-subtle);
  border-radius: 50%;
  color: var(--lavender-dark);
  transition: background var(--dur-fast) var(--ease-out);
}

.brand-feature-text {
  font-size: var(--fs-small);
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: var(--ls-wide);
}

/* --- Featured Review --- */

.featured-review {
  text-align: center;
  position: relative;
  overflow: hidden;
}

.featured-review::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(
    ellipse at 50% 0%,
    rgba(var(--lavender-rgb), 0.1) 0%,
    transparent 60%
  );
  pointer-events: none;
}

.featured-review .quote-mark {
  display: block;
  margin-bottom: var(--sp-md);
}

.review-quote {
  position: relative;
}

.review-quote p {
  font-family: var(--font-heading);
  font-size: var(--fs-h3);
  font-style: italic;
  font-weight: 400;
  color: rgba(250, 247, 242, 0.9);
  line-height: 1.7;
  max-width: 640px;
  margin: 0 auto;
}

.review-attribution {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-sm);
  margin-top: var(--sp-xl);
}

.review-attribution .stars {
  justify-content: center;
}

.review-author {
  font-family: var(--font-body);
  font-size: var(--fs-body);
  font-weight: 600;
  color: rgba(250, 247, 242, 0.7);
  letter-spacing: var(--ls-wide);
}

/* --- Newsletter --- */

.newsletter h2 {
  margin-bottom: var(--sp-md);
}

.newsletter-desc {
  font-size: var(--fs-body-lg);
  color: var(--text-secondary);
  max-width: 480px;
  margin: 0 auto var(--sp-2xl);
  line-height: var(--lh-body);
}

.newsletter-form {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-md);
  max-width: 520px;
  margin: 0 auto;
}

.newsletter-input {
  flex: 1;
  min-width: 0;
}

.newsletter-note {
  font-size: var(--fs-xs);
  color: var(--text-muted);
  margin-top: var(--sp-md);
}

/* ============================================
   Responsive Breakpoints
   ============================================ */

@media (max-width: 900px) {
  .hero-heading {
    font-size: clamp(2.25rem, 6vw, 3.5rem);
  }

  .hero-text {
    font-size: var(--fs-body);
  }

  .category-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--sp-md);
  }

  .category-name {
    font-size: var(--fs-body-lg);
    padding: var(--sp-lg);
  }

  .fav-card {
    flex: 0 0 260px;
    min-width: 260px;
  }

  .brand-features {
    gap: var(--sp-lg);
  }

  .review-quote p {
    font-size: var(--fs-body-lg);
  }
}

@media (max-width: 600px) {
  .hero {
    min-height: 100svh;
  }

  .hero-content {
    padding: var(--sp-xl) var(--sp-md);
  }

  .hero-heading {
    font-size: clamp(2rem, 9vw, 2.75rem);
  }

  .hero-buttons {
    flex-direction: column;
    gap: var(--sp-md);
  }

  .hero-buttons .btn {
    width: 100%;
  }

  .trust-bar .container {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--sp-md);
  }

  .category-grid {
    grid-template-columns: 1fr;
    gap: var(--sp-md);
  }

  .category-tile {
    aspect-ratio: 16 / 9;
  }

  .fav-card {
    flex: 0 0 240px;
    min-width: 240px;
  }

  .brand-features {
    flex-direction: column;
    gap: var(--sp-lg);
    align-items: flex-start;
  }

  .brand-feature {
    flex-direction: row;
    text-align: left;
  }

  .newsletter-form {
    flex-direction: column;
  }

  .newsletter-form .btn {
    width: 100%;
  }

  .newsletter-input {
    width: 100%;
  }

  .review-quote p {
    font-size: var(--fs-body);
  }
}