/**
 * Home — hero, categorías, productos, promo, ventajas, newsletter
 */

.home-hero {
  position: relative;
  min-height: clamp(22rem, 65vh, 36rem);
  display: flex;
  align-items: center;
  overflow: hidden;
  background-color: var(--color-bg-secondary);
  background-image:
    linear-gradient(
      105deg,
      rgba(248, 249, 252, 0.94) 0%,
      rgba(248, 249, 252, 0.75) 42%,
      rgba(108, 99, 255, 0.12) 100%
    ),
    url('https://images.unsplash.com/photo-1441986300917-64674bd600d8?w=1600&q=80');
  background-size: cover;
  background-position: center;
}

.home-hero__inner {
  position: relative;
  z-index: 1;
  max-width: 36rem;
  padding: var(--spacing-10) 0;
}

.home-hero__eyebrow {
  display: inline-block;
  margin-bottom: var(--spacing-3);
  padding: var(--spacing-1) var(--spacing-3);
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-semibold);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-primary-dark);
  background: rgba(108, 99, 255, 0.12);
  border-radius: 999px;
}

.home-hero__title {
  font-size: clamp(var(--font-size-2xl), 4vw, var(--font-size-4xl));
  font-weight: var(--font-weight-semibold);
  line-height: 1.15;
  letter-spacing: -0.03em;
  color: var(--color-text-primary);
  margin-bottom: var(--spacing-4);
}

.home-hero__subtitle {
  font-size: var(--font-size-md);
  line-height: 1.55;
  color: var(--color-text-secondary);
  margin-bottom: var(--spacing-8);
}

.home-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--spacing-3);
}

.section-header {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-2);
  margin-bottom: var(--spacing-8);
  text-align: center;
}

@media (min-width: 768px) {
  .section-header {
    margin-bottom: var(--spacing-10);
  }
}

.section-header__title {
  font-size: var(--font-size-2xl);
  font-weight: var(--font-weight-semibold);
  color: var(--color-text-primary);
  letter-spacing: -0.02em;
}

.section-header__desc {
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
  max-width: 36rem;
  margin-left: auto;
  margin-right: auto;
}

/* Categorías destacadas */
.category-card {
  position: relative;
  display: block;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-sm);
  background-color: var(--color-bg-card);
  transition:
    transform var(--transition-base),
    box-shadow var(--transition-base);
}

.category-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.category-card__media {
  aspect-ratio: 4 / 3;
  background: linear-gradient(145deg, var(--color-bg-secondary), var(--color-border-light));
}

.category-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.category-card__body {
  display: flex;
  align-items: center;
  gap: var(--spacing-3);
  padding: var(--spacing-4);
}

.category-card__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: var(--radius-md);
  background: rgba(108, 99, 255, 0.1);
  color: var(--color-primary);
  flex-shrink: 0;
}

.category-card__icon svg {
  width: 1.25rem;
  height: 1.25rem;
}

.category-card__name {
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-semibold);
  color: var(--color-text-primary);
}

.category-card__meta {
  font-size: var(--font-size-xs);
  color: var(--color-text-muted);
  margin-top: var(--spacing-1);
}

/* Banner promocional */
.home-promo {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--spacing-8);
  align-items: center;
  padding: var(--spacing-8);
  background: linear-gradient(
    135deg,
    rgba(108, 99, 255, 0.08) 0%,
    rgba(255, 101, 132, 0.06) 100%
  );
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-sm);
}

@media (min-width: 1024px) {
  .home-promo {
    grid-template-columns: 1fr 1fr;
    padding: var(--spacing-10);
    gap: var(--spacing-12);
  }
}

.home-promo__visual {
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 16 / 11;
  background: var(--color-bg-secondary);
}

.home-promo__visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.home-promo__content {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-4);
}

.home-promo__kicker {
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-semibold);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-secondary-dark);
}

.home-promo__title {
  font-size: var(--font-size-xl);
  font-weight: var(--font-weight-semibold);
  color: var(--color-text-primary);
  letter-spacing: -0.02em;
}

.home-promo__text {
  font-size: var(--font-size-sm);
  line-height: 1.6;
  color: var(--color-text-secondary);
}

/* Por qué elegirnos */
.feature-item {
  text-align: center;
  padding: var(--spacing-6);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background-color: var(--color-bg-card);
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition-base);
}

.feature-item:hover {
  box-shadow: var(--shadow-md);
}

.feature-item__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  margin-bottom: var(--spacing-4);
  border-radius: var(--radius-md);
  background: rgba(108, 99, 255, 0.1);
  color: var(--color-primary);
}

.feature-item__icon svg {
  width: 1.5rem;
  height: 1.5rem;
}

.feature-item__title {
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-semibold);
  color: var(--color-text-primary);
  margin-bottom: var(--spacing-2);
}

.feature-item__text {
  font-size: var(--font-size-sm);
  line-height: 1.55;
  color: var(--color-text-secondary);
}

/* Newsletter home */
.home-newsletter {
  padding: var(--spacing-10);
  border-radius: var(--radius-xl);
  background: linear-gradient(
    125deg,
    var(--color-text-primary) 0%,
    #2d2a45 50%,
    var(--color-primary-dark) 100%
  );
  color: #fff;
  text-align: center;
}

.home-newsletter__title {
  font-size: var(--font-size-xl);
  font-weight: var(--font-weight-semibold);
  margin-bottom: var(--spacing-2);
}

.home-newsletter__text {
  font-size: var(--font-size-sm);
  opacity: 0.85;
  margin-bottom: var(--spacing-6);
  max-width: 28rem;
  margin-left: auto;
  margin-right: auto;
}

.home-newsletter__form {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-3);
  max-width: 28rem;
  margin-left: auto;
  margin-right: auto;
}

@media (min-width: 480px) {
  .home-newsletter__form {
    flex-direction: row;
    align-items: stretch;
  }
}

.home-newsletter__input {
  flex: 1;
  min-height: 2.75rem;
  padding: 0 var(--spacing-4);
  font-size: var(--font-size-sm);
  border: none;
  border-radius: var(--radius-md);
}

.home-newsletter__input:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.35);
}

.home-newsletter__btn {
  min-height: 2.75rem;
  padding: 0 var(--spacing-6);
  font-weight: var(--font-weight-semibold);
  color: var(--color-text-primary);
  background-color: #fff;
  border-radius: var(--radius-md);
  transition:
    transform var(--transition-fast),
    box-shadow var(--transition-fast);
}

.home-newsletter__btn:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.home-newsletter__error {
  font-size: var(--font-size-xs);
  color: #fecaca;
  margin-top: var(--spacing-2);
}

/* Grid productos home */
.home-products-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--spacing-6);
}

@media (min-width: 480px) {
  .home-products-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .home-products-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.home-section--muted {
  background-color: var(--color-bg-secondary);
}
