/**
 * Homepage sections (Figma Home • Desktop, 1:477).
 *
 * @package Atsko
 */

/* —— Page shell —— */
.home-page__content > * {
  margin: 0;
}

.home-page__content > .alignfull,
.home-page__content > .home-hero,
.home-page__content > .home-featured,
.home-page__content > .home-spotlight,
.home-page__content > .home-categories {
  max-width: none;
  width: 100%;
}

/* —— Alert bar (Figma 13:452) —— */
.home-alert {
  width: 100%;
  margin: 0;
  padding: 0.75rem max(2rem, calc((100% - var(--atsko-container)) / 2));
  background: var(--atsko-yellow);
  box-sizing: border-box;
}

.home-alert__inner {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  margin: 0;
}

.home-alert__message {
  margin: 0;
  font-size: 1.125rem;
  font-weight: 700;
  line-height: 1.5;
  color: var(--atsko-charcoal);
  text-align: center;
  display: flex;
  align-items: center;
}

.home-alert__link {
  color: var(--atsko-blue);
  border: 1px solid var(--atsko-blue);
  padding: 7px 5px;
  font-size: 12px;
  display: inline-block;
  border-radius: 5px;
  text-decoration: none;
  margin-left: 15px;
}

.home-alert__link:hover {
  color: var(--atsko-blue-highlight);
}

/* —— Hero (MMA, Figma 1:499) —— */
.home-hero {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  min-height: 40.5rem;
  padding: 10rem max(2rem, calc((100% - 80rem) / 2));
  background: var(--atsko-gray-100);
  box-sizing: border-box;
}

.home-hero.alignfull {
  width: 100%;
  max-width: none;
}

/*
 * WordPress constrained-layout rules (e.g. .wp-container-core-group-is-layout-*)
 * center children with max-width + margin-inline: auto. Defeat that for the
 * full-bleed media layer and left-aligned copy — including already-inserted
 * patterns that still carry is-layout-constrained.
 */
.home-hero > :where(:not(.alignleft):not(.alignright):not(.alignfull)),
.home-hero.is-layout-constrained
  > :where(:not(.alignleft):not(.alignright):not(.alignfull)) {
  max-width: 560px;
  margin-left: 0 !important;
  margin-right: 0 !important;
}

.home-hero__media {
  position: absolute !important;
  inset: 0;
  z-index: 0;
  width: 100% !important;
  max-width: none !important;
  height: 100%;
  margin: 0 !important;
  pointer-events: none;
}

.home-hero__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center right;
  display: block;
}

.home-hero__media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, #000 16.35%, rgba(0, 0, 0, 0) 53.85%);
}

.home-hero__content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  max-width: 36.1875rem;
  width: 100%;
  margin-left: 0 !important;
  margin-right: 0 !important;
}

.home-hero__content > *,
.home-hero__content.is-layout-constrained
  > :where(:not(.alignleft):not(.alignright):not(.alignfull)) {
  max-width: none;
  margin-left: 0 !important;
  margin-right: 0 !important;
}

.home-hero__eyebrow {
  margin: 0 0 0.5rem !important;
  font-size: 1rem !important;
  font-weight: 700 !important;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  line-height: 1.5 !important;
  color: var(--atsko-white) !important;
}

.home-hero__title {
  margin: 0 !important;
  font-size: clamp(2.5rem, 5vw, 3.5rem) !important;
  font-weight: 700 !important;
  line-height: 0.9 !important;
  color: var(--atsko-white) !important;
}

.home-hero__body {
  margin: 1.5rem 0 1rem !important;
  font-size: 1.5rem !important;
  line-height: 1.36 !important;
  color: var(--atsko-white) !important;
}

.home-hero__actions {
  margin: 0 !important;
}

/* —— Featured products (Figma 4:140) —— */
.home-featured {
  padding: 5rem max(2rem, calc((100% - var(--atsko-container)) / 2));
  background: var(--atsko-white);
  box-sizing: border-box;
}

.home-featured.alignfull {
  width: 100%;
  max-width: none;
}

.home-featured__header {
  display: flex !important;
  align-items: flex-end;
  justify-content: space-between;
  gap: 2rem;
  width: 100%;
  padding-bottom: 1rem !important;
  border-bottom: 1px solid var(--atsko-gray-200);
  margin-bottom: 0 !important;
}

.home-featured__heading {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1 1 auto;
}

.home-featured__eyebrow {
  margin: 0 !important;
  font-size: 0.875rem !important;
  font-weight: 700 !important;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  line-height: 1.5 !important;
  color: var(--atsko-orange-bright) !important;
}

.home-featured__title {
  margin: 0 !important;
  font-size: 1.75rem !important;
  font-weight: 700 !important;
  line-height: 1.5 !important;
  color: var(--atsko-charcoal) !important;
}

.home-featured__all {
  margin: 0 !important;
  flex: 0 0 auto;
}

.home-featured__all-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1rem;
  line-height: 1.5;
  color: var(--atsko-charcoal);
  text-decoration: none;
  white-space: nowrap;
}

.home-featured__all-link:hover {
  color: var(--atsko-blue);
  text-decoration: underline;
}

.home-featured__all-arrow {
  width: 1.5rem;
  height: 1.5rem;
  display: block;
  flex: 0 0 auto;
}

.home-featured__grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  margin: 3rem 0 0;
  padding: 0;
  list-style: none;
}

.home-featured__card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.625rem;
  justify-content: flex-end;
  text-align: center;
  padding-inline: 1.5rem;
}

.home-featured__figure {
  margin: 0;
  width: 100%;
  max-width: 11.6875rem;
  height: 16rem;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  color: inherit;
  text-decoration: none;
}

.home-featured__figure img,
.home-featured__image {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  object-position: center;
  display: block;
}

.home-featured__card-title {
  margin: 0.6875rem 0 0 !important;
  font-size: 1.125rem !important;
  font-weight: 700 !important;
  line-height: 1.1 !important;
  color: var(--atsko-charcoal) !important;
  max-width: 16.25rem;
}

.home-featured__card-title a {
  color: inherit;
  text-decoration: none;
}

.home-featured__card-title a:hover {
  color: var(--atsko-blue);
}

.home-featured__price {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
  margin: 0 !important;
  font-size: 1.125rem !important;
  line-height: 1.5 !important;
}

.home-featured__price-prefix {
  color: var(--atsko-charcoal);
}

.home-featured__price-amount,
.home-featured__price-amount .amount,
.home-featured__price-amount .woocommerce-Price-amount {
  font-weight: 700;
  color: var(--atsko-orange);
}

.home-featured__actions {
  margin: 0.375rem 0 0 !important;
}

/* —— Spotlight (Figma 520:6075 / 520:6103) —— */
.home-spotlight {
  position: relative;
  overflow: hidden;
  padding: 7rem max(2rem, calc((100% - var(--atsko-container)) / 2));
  box-sizing: border-box;
}

.home-spotlight.alignfull {
  width: 100%;
  max-width: none;
}

.home-spotlight--hunting {
  background-color: #f5fbff;
}

.home-spotlight--blog {
  background-color: #e8f5ff;
}

.home-spotlight--hunting::before,
.home-spotlight--blog::before {
  content: "";
  position: absolute;
  z-index: 0;
  pointer-events: none;
  background-repeat: no-repeat;
  background-size: 100% 100%;
}

/* Large diagonal wash behind hunting (copy left / media right). */
.home-spotlight--hunting::before {
  left: -75%;
  top: -90%;
  width: 204%;
  height: 236%;
  background-image: url("../images/home/spotlight-angle.svg");
}

/* Flipped diagonal for blog (media left / copy right). */
.home-spotlight--blog::before {
  right: -5%;
  top: 0;
  width: 106%;
  height: 126%;
  background-image: url("../images/home/spotlight-angle-blog.svg");
  /* transform: scaleX(-1) scaleY(-1); */
}

.home-spotlight__inner {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 0 !important;
  margin: 0 !important;
}

.home-spotlight__media,
.home-spotlight__copy {
  flex: 1 1 50%;
  flex-basis: 50% !important;
  width: 50% !important;
  min-width: 0;
}

.home-spotlight__copy {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  box-sizing: border-box;
}

.home-spotlight__figure-link {
  display: block;
  color: inherit;
  text-decoration: none;
}

.home-spotlight__title a {
  color: inherit;
  text-decoration: none;
}

.home-spotlight__title a:hover {
  color: var(--atsko-blue);
}

.home-spotlight--media-right .home-spotlight__copy {
  padding-right: 10rem;
}

.home-spotlight--media-left .home-spotlight__copy {
  padding-left: 10rem;
}

.home-spotlight__eyebrow {
  margin: 0 !important;
  font-size: 0.875rem !important;
  font-weight: 700 !important;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  line-height: 1.5 !important;
  color: var(--atsko-orange-bright) !important;
}

.home-spotlight__title {
  margin: 0 !important;
  font-size: clamp(1.75rem, 3vw, 2rem) !important;
  font-weight: 700 !important;
  line-height: 0.9 !important;
  color: var(--atsko-charcoal) !important;
}

.home-spotlight__body {
  margin: 0 !important;
  font-size: 1rem !important;
  line-height: 1.3 !important;
  color: var(--atsko-charcoal) !important;
}

.home-spotlight__actions {
  margin: 0.5rem 0 0 !important;
}

.home-spotlight__figure {
  margin: 0 !important;
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  box-shadow: 0 4px 4px rgba(0, 0, 0, 0.25);
  aspect-ratio: 646 / 400;
  background: var(--atsko-gray-400);
}

.home-spotlight__figure img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* —— Categories (Figma 572:6464) —— */
.home-categories {
  padding: 4.5rem max(2rem, calc((100% - var(--atsko-container)) / 2));
  background: var(--atsko-white);
  box-sizing: border-box;
}

.home-categories.alignfull {
  width: 100%;
  max-width: none;
}

.home-categories__header {
  margin-bottom: 3rem !important;
}

.home-categories__eyebrow {
  margin: 0 !important;
  font-size: 0.875rem !important;
  font-weight: 700 !important;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  line-height: 1.5 !important;
  color: var(--atsko-orange-bright) !important;
}

.home-categories__title {
  margin: 0 !important;
  font-size: 1.75rem !important;
  font-weight: 700 !important;
  line-height: 1.5 !important;
  color: var(--atsko-charcoal) !important;
}

.home-categories__grid {
  gap: 1.5rem !important;
  margin: 0 !important;
  align-items: flex-start;
}

.home-categories__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  text-align: center;
  padding: 2.5rem 1.5rem !important;
}

.home-categories__figure {
  margin: 0 0 0.5rem !important;
  width: 14.425rem;
  height: 14.425rem;
  max-width: 100%;
}

.home-categories__figure a {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  overflow: hidden;
  border: 4px solid var(--atsko-gray-400);
  box-sizing: border-box;
  transition:
    border-color 0.15s ease,
    border-width 0.15s ease,
    box-shadow 0.15s ease;
}

.home-categories__figure img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.home-categories__item:hover .home-categories__figure a,
.home-categories__item:focus-within .home-categories__figure a {
  border-width: 6px;
  border-color: var(--atsko-cta-border);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

.home-categories__item-title {
  margin: 0 !important;
  font-size: 1.75rem !important;
  font-weight: 700 !important;
  line-height: 1.5 !important;
  color: var(--atsko-charcoal) !important;
  transition: color 0.15s ease;
}

.home-categories__item-title a {
  color: inherit;
  text-decoration: none;
}

.home-categories__item:hover .home-categories__item-title,
.home-categories__item:focus-within .home-categories__item-title {
  color: var(--atsko-cta-border) !important;
}

.home-categories__item-body {
  margin: 0 !important;
  font-size: 1.25rem !important;
  line-height: 1.1 !important;
  color: var(--atsko-charcoal) !important;
}

/* —— Responsive —— */
@media (max-width: 1100px) {
  .home-spotlight--media-right .home-spotlight__copy {
    padding-right: 3rem;
  }

  .home-spotlight--media-left .home-spotlight__copy {
    padding-left: 3rem;
  }

  .home-featured__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .home-categories__grid {
    flex-wrap: wrap;
  }

  .home-categories__item {
    flex-basis: calc(50% - 0.75rem) !important;
  }
}

@media (max-width: 782px) {
  .home-hero {
    min-height: 32rem;
    padding: 5rem 1.5rem;
  }

  .home-hero__body {
    font-size: 1.25rem !important;
  }

  .home-featured,
  .home-spotlight,
  .home-categories {
    padding-inline: 1.5rem;
  }

  .home-featured__header {
    flex-direction: column;
    align-items: flex-start;
  }

  .home-featured__grid {
    grid-template-columns: 1fr;
  }

  .home-featured__card {
    padding-inline: 0;
  }

  .home-spotlight__inner {
    flex-direction: column !important;
  }

  .home-spotlight--media-left .home-spotlight__media {
    order: -1;
  }

  .home-spotlight__media,
  .home-spotlight__copy {
    flex-basis: 100% !important;
    width: 100% !important;
  }

  .home-spotlight--media-right .home-spotlight__copy,
  .home-spotlight--media-left .home-spotlight__copy {
    padding-left: 0;
    padding-right: 0;
  }

  .home-categories__item {
    flex-basis: 100% !important;
  }

  .home-categories__figure {
    width: 12rem;
    height: 12rem;
  }
}
