/* SMAXA — styles for editable block homepage (.smaxa-home-page) */

.home .site-content > .ast-container,
.home .site-content > .ast-container > #primary,
.home.page .entry-content {
  max-width: none;
  width: 100%;
  padding-left: 0;
  padding-right: 0;
}

.home #primary {
  margin: 0;
}

.smaxa-home-page {
  --home-max: 1180px;
}

.smaxa-home-page__hero .wp-block-cover__background {
  background: linear-gradient(
    135deg,
    rgba(8, 56, 104, 0.92) 0%,
    rgba(15, 83, 148, 0.72) 55%,
    rgba(15, 83, 148, 0.35) 100%
  ) !important;
}

.smaxa-home-page__hero .wp-block-button.is-style-outline .wp-block-button__link {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.55);
}

.smaxa-home-page__hero .wp-block-button.is-style-outline .wp-block-button__link:hover {
  border-color: var(--smaxa-yellow);
  color: var(--smaxa-yellow);
}

/* Nos univers — horizontal scroll (root categories only) */
.smaxa-home-page .smaxa-home-universes,
.smaxa-home-page .wc-block-product-categories.smaxa-home-universes {
  overflow: hidden;
}

.smaxa-home-page .smaxa-home-universes .wc-block-product-categories-list--depth-0 {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.85rem;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  padding: 0.25rem 0 0.75rem;
  margin: 0;
  list-style: none;
}

/* Hide sub-categories — show main universes only */
.smaxa-home-page .smaxa-home-universes .wc-block-product-categories-list--depth-1,
.smaxa-home-page .smaxa-home-universes .wc-block-product-categories-list-item .wc-block-product-categories-list {
  display: none !important;
}

.smaxa-home-page .smaxa-home-universes .wc-block-product-categories-list--depth-0 > .wc-block-product-categories-list-item {
  flex: 0 0 auto;
  width: 92px;
  scroll-snap-align: start;
  text-align: center;
}

.smaxa-home-page .smaxa-home-universes .wc-block-product-categories-list-item a {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  color: var(--smaxa-ink);
}

.smaxa-home-page .smaxa-home-universes .wc-block-product-categories-list-item__image {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 88px;
  height: 88px;
  margin: 0;
  border-radius: 50%;
  background: var(--smaxa-surface);
  border: 2px solid #e6ecf2;
  overflow: hidden;
  transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.smaxa-home-page .smaxa-home-universes .wc-block-product-categories-list-item__image img {
  width: 72%;
  height: 72%;
  object-fit: contain;
}

.smaxa-home-page .smaxa-home-universes .wc-block-product-categories-list-item__name {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  line-height: 1.25;
  color: var(--smaxa-ink);
}

.smaxa-home-page .smaxa-home-universes .wc-block-product-categories-list-item a:hover .wc-block-product-categories-list-item__image {
  border-color: var(--smaxa-yellow);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(15, 83, 148, 0.12);
}

/* Featured category banners */
.smaxa-home-page .wp-block-woocommerce-featured-category {
  margin-bottom: 1rem;
  border-radius: 12px;
  overflow: hidden;
}

/* Product grids on homepage */
.smaxa-home-page .wc-block-grid__products {
  gap: 1rem;
}

.smaxa-home-page a {
  color: var(--smaxa-blue);
}

.smaxa-home-page a:hover {
  color: var(--smaxa-blue-dark);
}

@media (max-width: 640px) {
  .smaxa-home-page .wc-block-grid.has-4-columns .wc-block-grid__products {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
