/* Front page. Gutenberg content styled with the theme's own tokens, so an
   editor can change the copy without the page losing the design.

   Recurring pattern below: every section's OUTER wp:group class carries its
   background colour (or none) and stays 100% width; the actual content —
   grid, flex row, whatever — lives on the `wp-block-group__inner-container`
   WordPress wraps its children in (core/group's layout support does this
   for every one of these blocks; see lojas.css's `.st-stores` comment for
   the full story). That inner wrapper is also where the page's usual
   max-width/gutter recipe (`.st-container`, base.css) gets reapplied, since
   index.php's fallback template — which the front page used before
   front-page.php existed — never wrapped `the_content()` in `.st-container`
   the way `templates/page-lojas.php` does for the stores page.

   Every `:hover`/`:active` rule lives in its own block at the end of the
   file, after every base rule — stylelint's no-descending-specificity
   otherwise flags almost any later, unrelated, lower-specificity selector
   in a file this size. */

.st-hero {
  background: var(--st-ink);
  color: var(--st-on-dark-body);
}

.st-hero > .wp-block-group__inner-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: stretch;
  gap: 40px;
}

.st-hero__content {
  display: flex;
}

.st-hero__content > .wp-block-group__inner-container {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 56px 48px;
}

.st-hero__eyebrow {
  margin: 0;
  color: var(--st-accent);
  font-size: var(--st-size-caption);
  font-weight: var(--st-weight-black);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.st-hero__title {
  max-width: 18ch;
  margin: 16px 0 0;
  color: var(--st-surface);
  font-size: clamp(32px, 5vw, 58px);
  font-weight: var(--st-weight-black);
  letter-spacing: -0.035em;
  line-height: 0.98;
}

.st-hero__lede {
  max-width: 40ch;
  margin: 22px 0 0;
  color: var(--st-on-dark-body);
}

.st-hero .wp-block-buttons {
  gap: 12px;
  margin-top: 32px;
}

.st-hero__cta a,
.st-hero__cta-secondary a {
  display: flex;
  align-items: center;
  height: var(--st-h-button);
  padding-inline: 22px;
  font-size: 14px;
  font-weight: var(--st-weight-extrabold);
  letter-spacing: var(--st-track-button);
  text-transform: uppercase;
  text-decoration: none;
  transition: background var(--st-transition), color var(--st-transition), border-color var(--st-transition);
}

.st-hero__cta a {
  background: var(--st-accent);
  color: var(--st-surface);
  border: var(--st-border-width) solid var(--st-accent);
}

.st-promo {
  display: block;
  border: var(--st-border-width) solid var(--st-ink);
}

.st-promo img {
  display: block;
  width: 100%;
  height: auto;
}

.st-hero .st-promo {
  height: 100%;
  min-height: 320px;
  border: 0;
  border-left: var(--st-border-width) solid var(--st-ink);
}

.st-bedsizes {
  background: var(--st-surface);
  border-bottom: var(--st-border-width) solid var(--st-ink);
}

.st-bedsizes > .wp-block-group__inner-container {
  display: grid;
  grid-template-columns: 220px 1fr;
  align-items: center;
  gap: 32px;
  max-width: var(--st-container);
  margin-inline: auto;
  padding: 26px var(--st-gutter);
}

.st-bedsizes__label {
  margin: 0;
  font-size: 20px;
  font-weight: var(--st-weight-extrabold);
  letter-spacing: -0.01em;
  line-height: 1.15;
}

.st-sizes > .wp-block-group__inner-container {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 12px;
}

.st-size-card {
  display: block;
  padding: 14px;
  border: var(--st-border-width) solid var(--st-ink);
  text-decoration: none;
  color: var(--st-ink);
  transition: background var(--st-transition), color var(--st-transition);
}

.st-size-card__name {
  display: block;
  font-size: 15px;
  font-weight: var(--st-weight-extrabold);
}

.st-size-card__dim {
  display: block;
  margin-top: 4px;
  font-size: 12.5px;
  opacity: 0.75;
}

.st-home__head {
  margin-top: var(--st-section-y);
}

.st-home__head > .wp-block-group__inner-container {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  max-width: var(--st-container);
  margin-inline: auto;
  padding-inline: var(--st-gutter);
  padding-bottom: 14px;
  border-bottom: var(--st-border-width) solid var(--st-ink);
}

.st-home__head h2 {
  margin: 0;
  font-size: var(--st-size-h2);
  font-weight: var(--st-weight-black);
  letter-spacing: -0.03em;
}

.st-home__all {
  margin: 0;
  font-size: var(--st-size-body-sm);
  font-weight: var(--st-weight-semibold);
}

.st-cats {
  margin-top: var(--st-grid-gap);
}

.st-cats > .wp-block-group__inner-container {
  display: grid;
  gap: var(--st-grid-gap);
  grid-template-columns: repeat(3, 1fr);
  max-width: var(--st-container);
  margin-inline: auto;
  padding-inline: var(--st-gutter);
}

.st-cat-card {
  display: block;
  border: var(--st-border-width) solid var(--st-ink);
  background: var(--st-surface);
  text-decoration: none;
  color: var(--st-ink);
  transition: box-shadow var(--st-transition);
}

.st-cat-card__img {
  display: block;
  width: 100%;
  height: 190px;
  object-fit: cover;
  border-bottom: var(--st-border-width) solid var(--st-ink);
}

.st-cat-card__body {
  display: block;
  padding: 16px 18px 18px;
}

.st-cat-card__name {
  display: block;
  margin: 0;
  font-size: 19px;
  font-weight: var(--st-weight-extrabold);
}

.st-cat-card__desc {
  display: block;
  margin-top: 4px;
  color: var(--st-ink-2);
  font-size: 13.5px;
}

.st-bestsellers {
  margin-top: var(--st-grid-gap);
}

.st-bestsellers > .wp-block-group__inner-container {
  max-width: var(--st-container);
  margin-inline: auto;
  padding-inline: var(--st-gutter);
}

/* The handoff's "Mais vendidos" grid is 4 columns (README.md, "01 HOME"),
   not the site-wide product-grid default of 3
   (WooCommerce\Support::DEFAULT_COLUMNS, read into `--st-card-columns` on
   every page) — overridden locally rather than raising the site-wide
   default, which the shop archive still wants at 3. */
.st-bestsellers ul.products {
  --st-card-columns: 4;
}

.st-promo-row {
  margin-top: var(--st-section-y);
}

.st-promo-row > .wp-block-group__inner-container {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--st-grid-gap);
  max-width: var(--st-container);
  margin-inline: auto;
  padding-inline: var(--st-gutter);
}

.st-firm {
  max-width: var(--st-container);
  margin: var(--st-section-y) auto 0;
  padding-inline: var(--st-gutter);
  border: var(--st-border-width) solid var(--st-ink);
  background: var(--st-accent);
  color: var(--st-surface);
  box-sizing: border-box;
}

.st-firm > .wp-block-group__inner-container {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
}

.st-firm__pitch {
  padding: 44px 40px 44px 0;
}

.st-firm__pitch > .wp-block-group__inner-container {
  padding: 0;
}

.st-firm__eyebrow {
  margin: 0;
  font-size: 12px;
  font-weight: var(--st-weight-extrabold);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.st-firm__title {
  margin: 14px 0 0;
  max-width: 20ch;
  font-size: clamp(28px, 4vw, 44px);
  font-weight: var(--st-weight-black);
  line-height: 1.02;
  letter-spacing: -0.03em;
}

.st-firm__lede {
  margin: 18px 0 0;
  max-width: 46ch;
  font-size: 16px;
  line-height: 1.55;
}

.st-firm .wp-block-buttons {
  gap: 12px;
  margin-top: 28px;
}

.st-firm__cta a,
.st-firm__cta-secondary a {
  display: flex;
  align-items: center;
  height: var(--st-h-button-secondary);
  padding-inline: 22px;
  font-size: 14px;
  font-weight: var(--st-weight-extrabold);
  letter-spacing: var(--st-track-button);
  text-transform: uppercase;
  text-decoration: none;
  transition: background var(--st-transition), color var(--st-transition);
}

.st-firm__cta a {
  background: var(--st-surface);
  color: var(--st-ink);
}

.st-firm__bands > .wp-block-group__inner-container {
  display: flex;
  flex-direction: column;
  height: 100%;
  border-left: var(--st-border-width) solid var(--st-ink);
}

.st-firm__row {
  padding: 20px 26px;
  border-top: var(--st-border-width) solid var(--st-ink);
}

.st-firm__row:first-child {
  border-top: 0;
}

.st-firm__row > .wp-block-group__inner-container {
  display: flex;
  align-items: baseline;
  gap: 16px;
}

.st-firm__band {
  margin: 0;
  font-size: 13px;
  font-weight: var(--st-weight-black);
  letter-spacing: 0.1em;
  white-space: nowrap;
}

.st-firm__desc {
  margin: 0;
  font-size: 14.5px;
}

.st-store-preview {
  margin-top: var(--st-grid-gap);
}

.st-store-preview > .wp-block-group__inner-container {
  display: grid;
  gap: var(--st-grid-gap);
  grid-template-columns: repeat(3, 1fr);
  max-width: var(--st-container);
  margin-inline: auto;
  padding-inline: var(--st-gutter);
  padding-bottom: var(--st-section-y);
}

.st-store-preview__card {
  padding: 22px;
  border: var(--st-border-width) solid var(--st-ink);
  background: var(--st-surface);
}

.st-store-preview__eyebrow {
  margin: 0;
  color: var(--st-accent-deep);
  font-size: 11px;
  font-weight: var(--st-weight-black);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.st-store-preview__name {
  margin: 8px 0 0;
  font-size: 17px;
  font-weight: var(--st-weight-bold);
}

.st-store-preview__meta {
  margin: 6px 0 0;
  color: var(--st-ink-2);
  font-size: 14px;
  line-height: 1.55;
}

/* Was: base.css's own `.is-style-outline .wp-block-button__link` rule (two
   classes, specificity 0,2,0) sets `--st-ink` text site-wide on outline
   buttons — right for the light surfaces every other outline button sits
   on, but near-black text on the hero's near-black background (or the
   guide's near-black border showing through) is textually present and
   visually invisible. `.st-hero__cta-secondary a` alone (0,1,1) loses to
   that rule; qualifying with the section class too (0,3,0) wins outright. */
.st-hero .st-hero__cta-secondary a,
.st-firm .st-firm__cta-secondary a {
  border: var(--st-border-width) solid var(--st-surface);
  color: var(--st-surface);
}

/* Hover/active states, grouped here — see the file-top comment. */

.st-hero__cta a:hover {
  background: var(--st-accent-hover);
  border-color: var(--st-accent-hover);
}

.st-hero__cta-secondary a:hover {
  background: var(--st-surface);
  color: var(--st-ink);
}

.st-size-card:hover,
.st-size-card:active {
  background: var(--st-ink);
  color: var(--st-surface);
}

.st-cat-card:hover {
  box-shadow: var(--st-shadow-card);
}

.st-firm__cta a:hover {
  background: var(--st-ink);
  color: var(--st-surface);
}

.st-firm__cta-secondary a:hover {
  background: var(--st-accent-deep);
}

@media (max-width: 899px) {
  .st-hero > .wp-block-group__inner-container {
    grid-template-columns: 1fr;
  }

  .st-hero .st-promo {
    min-height: 220px;
    border-left: 0;
    border-top: var(--st-border-width) solid var(--st-ink);
  }

  .st-hero__content > .wp-block-group__inner-container {
    padding: 28px 20px;
  }

  .st-bedsizes > .wp-block-group__inner-container {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .st-sizes > .wp-block-group__inner-container {
    grid-template-columns: repeat(3, 1fr);
  }

  .st-cats > .wp-block-group__inner-container {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Was: `.st-bestsellers ul.products` (0,2,1), with no media query of its
     own, outranks and permanently defeats card.css's own `@media
     (max-width: 899px) { ul.products { --st-card-columns: 2 } }` — so the
     home page kept 4 cramped columns at phone width instead of the 2 every
     other product grid on the site falls back to. */
  .st-bestsellers ul.products {
    --st-card-columns: 2;
  }

  .st-promo-row > .wp-block-group__inner-container {
    grid-template-columns: 1fr;
  }

  .st-firm > .wp-block-group__inner-container {
    grid-template-columns: 1fr;
  }

  .st-firm__pitch {
    padding: 28px 0;
  }

  .st-firm__bands > .wp-block-group__inner-container {
    border-left: 0;
    border-top: var(--st-border-width) solid var(--st-ink);
  }

  .st-store-preview > .wp-block-group__inner-container {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 599px) {
  .st-sizes > .wp-block-group__inner-container {
    grid-template-columns: repeat(2, 1fr);
  }

  .st-cats > .wp-block-group__inner-container {
    grid-template-columns: 1fr;
  }
}
