/* Home page styles */
.home-hero {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 600px;
  overflow: hidden;
  background-color: var(--color-forest-deep);
}

.home-hero__image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 0;
}

.home-hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(31, 61, 40, 0.82) 0%, rgba(31, 61, 40, 0.45) 55%, rgba(31, 61, 40, 0.12) 100%);
}

.home-hero__container {
  position: relative;
  z-index: 1;
  width: 100%;
}

.home-hero__content {
  max-width: 600px;
  padding-block: var(--space-4xl);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-xl);
}

.home-hero__title {
  font-size: clamp(2rem, 4vw + 1rem, 2.75rem);
  line-height: 1.1;
  color: #ffffff;
  margin: 0;
}

.home-hero__lead {
  font-size: var(--text-body-large-size);
  line-height: var(--text-body-large-leading);
  color: rgba(255, 255, 255, 0.92);
  margin: 0;
  max-width: 540px;
}

.home-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-lg);
  margin: 0;
}

.home-hero__button {
  flex: 0 0 auto;
}

.home-categories {
  background-color: var(--color-canvas);
}

.home-categories__header,
.home-bestsellers__header,
.home-new__header,
.home-brands__header,
.home-health__header,
.home-toys__header,
.home-guides__header,
.home-reviews__header {
  max-width: 600px;
  margin-inline: auto;
  text-align: center;
  margin-block-end: var(--space-3xl);
}

.home-categories__title,
.home-bestsellers__title,
.home-new__title,
.home-brands__title,
.home-health__title,
.home-toys__title,
.home-guides__title,
.home-reviews__title {
  margin-block-end: var(--space-lg);
}

.home-categories__intro,
.home-bestsellers__intro,
.home-new__intro,
.home-brands__intro,
.home-health__intro,
.home-toys__intro,
.home-guides__intro,
.home-reviews__intro {
  margin: 0;
}

.home-categories__grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--space-xl);
}

.home-category-card {
  position: relative;
  display: block;
  border-radius: var(--radius-md);
  overflow: hidden;
  aspect-ratio: 4 / 3;
  background-color: var(--color-surface-alt);
  min-width: 0;
}

.home-category-card__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 0;
  transition: transform var(--transition-medium);
}

.home-category-card:hover .home-category-card__image {
  transform: scale(1.03);
}

.home-category-card__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(31, 61, 40, 0) 40%, rgba(31, 61, 40, 0.78) 100%);
}

.home-category-card__content {
  position: absolute;
  inset-inline: 0;
  bottom: 0;
  padding: var(--space-xl);
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.home-category-card__title {
  color: #ffffff;
  margin: 0;
  font-size: var(--text-h3-size);
  line-height: var(--text-h3-leading);
}

.home-category-card__count {
  color: rgba(255, 255, 255, 0.85);
  margin: 0;
  font-size: var(--text-small-size);
  line-height: var(--text-small-leading);
}

.home-bestsellers {
  background-color: var(--color-surface-alt);
}

.home-product-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--space-xl);
}

.home-product-card {
  display: flex;
  flex-direction: column;
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  min-width: 0;
  transition: box-shadow var(--transition-fast), transform var(--transition-fast);
}

.home-product-card:hover {
  box-shadow: var(--shadow-elevated);
  transform: translateY(-2px);
}

.home-product-card__image {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 0;
}

.home-product-card__body {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  padding: var(--space-lg);
  flex: 1 1 auto;
}

.home-product-card__badge {
  align-self: flex-start;
}

.home-product-card__title {
  margin: 0;
  font-size: var(--text-h4-size);
  line-height: var(--text-h4-leading);
  color: var(--color-forest-deep);
}

.home-product-card__rating,
.home-product-card__availability {
  margin: 0;
  font-size: var(--text-small-size);
  line-height: var(--text-small-leading);
  color: var(--color-ink-muted);
}

.home-product-card__price {
  margin: 0;
  font-size: var(--text-body-large-size);
  line-height: var(--text-body-large-leading);
  font-weight: 700;
  color: var(--color-caramel);
}

.home-product-card__add {
  margin-block-start: auto;
  width: 100%;
}

.home-new {
  background-color: var(--color-canvas);
}

.home-brands {
  background-color: var(--color-surface-alt);
}

.home-brands__list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: var(--space-2xl);
  max-width: 1000px;
  margin-inline: auto;
  padding: 0;
  list-style: none;
}

.home-brands__item {
  flex: 0 0 auto;
  font-family: var(--font-heading);
  font-size: var(--text-h4-size);
  font-weight: 600;
  color: var(--color-ink-muted);
  letter-spacing: 0.02em;
  transition: color var(--transition-fast);
}

.home-brands__item:hover {
  color: var(--color-forest);
}

.home-health {
  background-color: var(--color-canvas);
}

.home-health__block,
.home-toys__block {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-3xl);
  align-items: center;
  margin-block-end: var(--space-4xl);
}

.home-health__block:last-child,
.home-toys__block:last-child {
  margin-block-end: 0;
}

.home-health__block--reverse .home-health__image,
.home-toys__block--reverse .home-toys__image {
  order: 2;
}

.home-health__block--reverse .home-health__content,
.home-toys__block--reverse .home-toys__content {
  order: 1;
}

.home-health__image,
.home-toys__image {
  width: 100%;
  height: 100%;
  max-height: 420px;
  object-fit: cover;
  border-radius: var(--radius-md);
  min-width: 0;
}

.home-health__content,
.home-toys__content {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-lg);
  max-width: 500px;
  min-width: 0;
}

.home-health__subtitle,
.home-toys__subtitle {
  margin: 0;
}

.home-health__text,
.home-toys__text {
  margin: 0;
}

.home-health__list,
.home-toys__list {
  margin: 0;
  padding-inline-start: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.home-health__link,
.home-toys__link {
  font-weight: 600;
  color: var(--color-forest);
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

.home-health__link:hover,
.home-toys__link:hover {
  color: var(--color-forest-deep);
}

.home-toys {
  background-color: var(--color-surface-alt);
}

.home-guides {
  background-color: var(--color-canvas);
}

.home-guides__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-xl);
}

.home-guide-card {
  display: flex;
  flex-direction: column;
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  min-width: 0;
}

.home-guide-card__image {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 0;
}

.home-guide-card__body {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  padding: var(--space-xl);
  flex: 1 1 auto;
}

.home-guide-card__title {
  margin: 0;
  font-size: var(--text-h3-size);
  line-height: var(--text-h3-leading);
  color: var(--color-forest-deep);
}

.home-guide-card__text {
  margin: 0;
  font-size: var(--text-body-size);
  line-height: var(--text-body-leading);
}

.home-reviews {
  background-color: var(--color-surface-alt);
}

.home-reviews__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-xl);
}

.home-review-card {
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  padding: var(--space-2xl);
  min-width: 0;
}

.home-review-card__stars {
  font-size: var(--text-body-large-size);
  line-height: 1;
  color: var(--color-caramel);
  letter-spacing: 0.1em;
}

.home-review-card__text {
  margin: 0;
  font-size: var(--text-body-size);
  line-height: var(--text-body-leading);
  color: var(--color-ink);
}

.home-review-card__author {
  margin: 0;
  font-size: var(--text-small-size);
  line-height: var(--text-small-leading);
  font-weight: 700;
  color: var(--color-forest-deep);
}

.home-newsletter {
  background-color: var(--color-forest-deep);
  padding-block: var(--space-4xl);
}

.home-newsletter__container {
  display: grid;
  grid-template-columns: 3fr 2fr;
  gap: var(--space-3xl);
  align-items: center;
}

.home-newsletter__content {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-lg);
  max-width: 500px;
  min-width: 0;
}

.home-newsletter__title {
  color: #ffffff;
  margin: 0;
}

.home-newsletter__text {
  color: rgba(255, 255, 255, 0.85);
  margin: 0;
}

.home-newsletter__form {
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
  min-width: 0;
}

.home-newsletter__form input {
  background-color: var(--color-surface);
  border-color: transparent;
}

.home-newsletter__form input:focus-visible {
  border-color: var(--color-caramel);
  box-shadow: 0 0 0 2px var(--color-forest-deep), 0 0 0 4px var(--color-caramel);
}

.home-newsletter__button {
  width: 100%;
}

.home-newsletter__message {
  margin: 0;
  font-size: var(--text-small-size);
  line-height: var(--text-small-leading);
  color: var(--color-caramel-soft);
  min-height: 1.5em;
}

@media (max-width: 1024px) {
  .home-categories__grid,
  .home-product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--space-lg);
  }

  .home-guides__grid,
  .home-reviews__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--space-lg);
  }

  .home-health__block,
  .home-toys__block {
    grid-template-columns: 1fr;
    gap: var(--space-2xl);
  }

  .home-health__block--reverse .home-health__image,
  .home-toys__block--reverse .home-toys__image {
    order: 0;
  }

  .home-health__block--reverse .home-health__content,
  .home-toys__block--reverse .home-toys__content {
    order: 0;
  }

  .home-health__image,
  .home-toys__image {
    max-height: 360px;
  }

  .home-newsletter__container {
    grid-template-columns: 1fr;
    gap: var(--space-2xl);
  }

  .home-newsletter__content {
    max-width: 600px;
  }
}

@media (max-width: 768px) {
  .home-hero {
    min-height: 480px;
  }

  .home-hero__content {
    padding-block: var(--space-3xl);
    gap: var(--space-lg);
  }

  .home-hero__title {
    font-size: clamp(1.75rem, 6vw + 0.5rem, 2.25rem);
  }

  .home-hero__lead {
    font-size: var(--text-body-size);
    line-height: var(--text-body-leading);
  }

  .home-hero__actions {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
  }

  .home-hero__button {
    width: 100%;
  }

  .home-categories__grid,
  .home-product-grid,
  .home-guides__grid,
  .home-reviews__grid {
    grid-template-columns: 1fr;
    gap: var(--space-lg);
  }

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

  .home-brands__list {
    gap: var(--space-xl);
  }

  .home-health__block,
  .home-toys__block {
    gap: var(--space-xl);
  }

  .home-health__image,
  .home-toys__image {
    max-height: 280px;
  }

  .home-newsletter {
    padding-block: var(--space-3xl);
  }
}

@media (max-width: 480px) {
  .home-hero {
    min-height: 420px;
  }

  .home-hero__content {
    padding-block: var(--space-2xl);
  }

  .home-brands__list {
    gap: var(--space-lg);
  }

  .home-brands__item {
    font-size: var(--text-body-size);
  }
}

@media (prefers-reduced-motion: reduce) {
  .home-category-card__image,
  .home-product-card,
  .home-brands__item {
    transition: none;
  }

  .home-category-card:hover .home-category-card__image {
    transform: none;
  }

  .home-product-card:hover {
    transform: none;
  }
}
