/**
 * Ugobest Astra Child — main stylesheet.
 * Homepage Assembly visual rhythm (no architecture / feature changes).
 * @since 1.8.2 Premium refinement.
 */

body.ugobest-astra-child {
  font-family: var(--ugb-font-sans);
  color: var(--ugb-color-ink-muted);
  background: var(--ugb-color-background);
  line-height: var(--ugb-lh-normal);
}

body.ugobest-astra-child h1,
body.ugobest-astra-child h2,
body.ugobest-astra-child h3,
body.ugobest-astra-child .ugb-type-h1,
body.ugobest-astra-child .ugb-type-h2,
body.ugobest-astra-child .ugb-type-h3,
body.ugobest-astra-child .ugb-type-h4,
body.ugobest-astra-child .ugb-type-h5 {
  font-family: var(--ugb-font-display);
  color: var(--ugb-color-ink);
  line-height: var(--ugb-lh-tight);
}

/* Assembly document shell */
body.ugobest-homepage-assembly {
  margin: 0;
  background: var(--ugb-color-background);
}

body.ugobest-homepage-assembly .ugb-homepage {
  display: block;
  padding-bottom: var(--ugb-space-6);
}

body.ugobest-homepage-assembly .ugb-section + .ugb-section {
  border-top: 1px solid transparent;
}

body.ugobest-homepage-assembly .ugb-section:nth-of-type(even):not(.ugb-section--trust):not(.ugb-section--categories) {
  background: var(--ugb-color-surface-muted);
}

body.ugobest-homepage-assembly .ugb-section:nth-of-type(odd) {
  background: transparent;
}

body.ugobest-homepage-assembly .ugb-section--categories {
  background: var(--ugb-color-background);
  padding-top: var(--ugb-space-7);
  padding-bottom: var(--ugb-space-5);
}

/* Tighten gap between Shop by category → Top Picks */
body.ugobest-homepage-assembly .ugb-section--categories + .ugb-section--top-picks,
body.ugobest-homepage-assembly .ugb-section--categories + .ugb-section--products {
  padding-top: var(--ugb-space-5);
}

body.ugobest-homepage-assembly .ugb-hero + .ugb-section {
  padding-top: var(--ugb-space-7);
}

body.ugobest-homepage-assembly .ugb-btn {
  letter-spacing: 0.01em;
}

body.ugobest-homepage-assembly .ugb-btn--lg,
body.ugobest-homepage-assembly .ugb-hero .ugb-btn {
  min-height: 3rem;
}

body.ugobest-homepage-assembly .ugb-trust-badges--footer {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--ugb-space-4);
  margin: 0;
  padding: var(--ugb-space-6) var(--ugb-gutter);
  list-style: none;
  background: var(--ugb-color-surface-muted);
  border-top: 1px solid var(--ugb-color-border);
}

body.ugobest-homepage-assembly .ugb-trust-badges--footer .ugb-trust-badges__item {
  display: grid;
  gap: 0.2rem;
  text-align: center;
  padding: var(--ugb-space-2);
  border: 0;
  background: transparent;
}

body.ugobest-homepage-assembly .ugb-trust-badges--footer .ugb-trust-badges__title {
  font-family: var(--ugb-font-display);
  font-size: var(--ugb-fs-body-sm);
  font-weight: var(--ugb-fw-semibold);
  color: var(--ugb-color-ink);
}

body.ugobest-homepage-assembly .ugb-trust-badges--footer .ugb-trust-badges__desc {
  font-size: var(--ugb-fs-caption);
  color: var(--ugb-color-ink-subtle);
}

@media (min-width: 768px) {
  body.ugobest-homepage-assembly .ugb-homepage {
    padding-bottom: var(--ugb-space-8);
  }

  body.ugobest-homepage-assembly .ugb-hero + .ugb-section {
    padding-top: var(--ugb-space-8);
  }

  body.ugobest-homepage-assembly .ugb-section--categories {
    padding-bottom: var(--ugb-space-6);
  }

  body.ugobest-homepage-assembly .ugb-section--categories + .ugb-section--top-picks,
  body.ugobest-homepage-assembly .ugb-section--categories + .ugb-section--products {
    padding-top: var(--ugb-space-6);
  }

  body.ugobest-homepage-assembly .ugb-trust-badges--footer {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    padding-block: var(--ugb-space-7);
    width: min(var(--ugb-container-xl), calc(100% - (var(--ugb-gutter) * 2)));
    margin-inline: auto;
    border-radius: var(--ugb-radius-lg);
    border: 1px solid var(--ugb-color-border);
    margin-block: var(--ugb-space-4) var(--ugb-space-8);
  }
}

@media (min-width: 1280px) {
  body.ugobest-homepage-assembly .ugb-container {
    width: min(var(--ugb-container-xl), calc(100% - (var(--ugb-gutter) * 3)));
  }
}

/*
 * Hotfix 2.9.6 — replace Astra purple palette + common purple accents
 * with Ugobest brand (red / white / black / dark gray / light gray).
 */
:root {
  --ast-global-color-0: #d10012 !important;
  --ast-global-color-1: #b00010 !important;
  --ast-global-color-2: #081320 !important;
  --ast-global-color-3: #465563 !important;
  --ast-global-color-4: #f7f8fa !important;
  --ast-global-color-5: #ffffff !important;
  --ast-global-color-6: #000000 !important;
  --ast-global-color-7: #4b4f58 !important;
  --ast-global-color-8: #f6f7f8 !important;
}

body.ugobest-astra-child .woocommerce a.button.alt,
body.ugobest-astra-child .woocommerce button.button.alt,
body.ugobest-astra-child .woocommerce input.button.alt,
body.ugobest-astra-child .woocommerce #respond input#submit.alt {
  background-color: var(--ugb-color-primary, #d10012);
  border-color: var(--ugb-color-primary, #d10012);
  color: #ffffff;
}

body.ugobest-astra-child .woocommerce a.button.alt:hover,
body.ugobest-astra-child .woocommerce button.button.alt:hover,
body.ugobest-astra-child .woocommerce input.button.alt:hover,
body.ugobest-astra-child .woocommerce #respond input#submit.alt:hover {
  background-color: var(--ugb-color-primary-hover, #b00010);
  border-color: var(--ugb-color-primary-hover, #b00010);
  color: #ffffff;
}

body.ugobest-astra-child .page-numbers.current,
body.ugobest-astra-child .woocommerce nav.woocommerce-pagination ul li span.current,
body.ugobest-astra-child .woocommerce nav.woocommerce-pagination ul li a:hover {
  background-color: var(--ugb-color-secondary, #081320);
  border-color: var(--ugb-color-secondary, #081320);
  color: #ffffff;
}

body.ugobest-astra-child :focus-visible {
  outline-color: var(--ugb-color-focus, #081320);
}

/* Avoid Astra/default theme chrome gaps when Assembly owns the document */
body.ugobest-homepage-assembly.admin-bar .ugb-header {
  top: 32px;
}

@media screen and (max-width: 782px) {
  body.ugobest-homepage-assembly.admin-bar .ugb-header {
    top: 46px;
  }
}
