/* ========================================
   GRID LAYOUTS
   ======================================== */

/* Categories Grid */
.categories__grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: var(--space-md);
}

/* Products Grid */
.products__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-md);
}

.products__header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: var(--space-xl);
}

.products__header .section__header {
  text-align: left;
  margin-bottom: 0;
}

/* Hero Grid */
.hero__content {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-xl);
  align-items: center;
}

/* Story Grid */
.story__inner {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-2xl);
  align-items: center;
}

/* ========================================
   RESPONSIVE GRID LAYOUTS
   ======================================== */
@media (max-width: 1024px) {
  .hero__content {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .hero__text {
    order: 1;
  }

  .hero__visual {
    order: 2;
    max-width: 400px;
    margin: 0 auto;
  }

  .hero__desc {
    margin: 0 auto var(--space-lg);
  }

  .hero__cta {
    justify-content: center;
  }

  .hero__floating-card {
    display: none;
  }

  .categories__grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .products__grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .story__inner {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .story__stats {
    justify-content: center;
  }
}

@media (max-width: 768px) {
  .hero {
    min-height: calc(100svh - var(--header-height));
    padding-block: calc(var(--header-height) + var(--space-lg)) var(--space-xl);
  }

  .hero__content {
    min-height: calc(100svh - var(--header-height) - var(--space-xl));
    align-content: center;
  }

  .hero__visual {
    display: none;
  }

  .hero__title {
    font-size: clamp(2.35rem, 13vw, 4rem);
  }

  .hero__desc {
    color: var(--color-cream);
  }

  .categories__grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .products__header {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-md);
  }

  .newsletter__inner {
    flex-direction: column;
    text-align: center;
  }

  .newsletter__form {
    width: 100%;
    flex-direction: column;
  }

}

@media (max-width: 480px) {
  .categories__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .products__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--space-sm);
  }
}

@media (max-width: 340px) {
  .categories__grid,
  .products__grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 340px) and (max-height: 650px) {
  .hero {
    min-height: calc(100svh - var(--header-height));
    padding-block: calc(var(--header-height) + var(--space-sm)) var(--space-md);
  }

  .hero__content {
    min-height: auto;
  }

  .hero__label,
  .hero__cta .btn--secondary {
    display: none;
  }

  .hero__title {
    font-size: 2.25rem;
    margin-bottom: 0.75rem;
  }

  .hero__desc {
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    font-size: 0.9rem;
    line-height: 1.45;
    margin-bottom: var(--space-sm);
  }
}
