/* Homepage shop + library sections inside the main food/membership feature band. */
.gtg-split--home-feature .gtg-home-section {
  --gtg-home-section-gap: clamp(.85rem, 1.8vw, 1.15rem);
  grid-column: 1 / -1;
  position: relative;
  z-index: 2;
  width: 100%;
  padding: 0;
  margin: clamp(1.6rem, 3.4vw, 2.8rem) 0 0;
  overflow: visible;
  background: transparent;
}

.gtg-split--home-feature .gtg-home-section,
.gtg-split--home-feature .gtg-home-section * {
  box-sizing: border-box;
}

/* Shop and library both use the same panel treatment. */
.gtg-split--home-feature .gtg-home-section--shop,
.gtg-split--home-feature .gtg-home-section--library {
  padding: clamp(.9rem, 2.1vw, 1.35rem);
  border: var(--gtg-border);
  border-radius: var(--gtg-radius);
  background: var(--gtg-paper);
  box-shadow: var(--gtg-shadow);
}

.gtg-split--home-feature .gtg-home-section--library {
  margin-top: clamp(2rem, 4vw, 3.2rem);
  background: #fff;
}

.gtg-home-section__head {
  width: 100%;
  margin: 0 0 clamp(.95rem, 1.8vw, 1.2rem);
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.gtg-home-section__copy {
  max-width: 760px;
}

.gtg-home-section__eyebrow {
  display: inline-flex;
  width: fit-content;
  margin: 0 0 .55rem;
  padding: .32rem .65rem;
  border: var(--gtg-border);
  border-radius: 999px;
  background: var(--gtg-yellow);
  box-shadow: var(--gtg-shadow-sm);
  color: var(--gtg-ink);
  font-family: Bungee, Impact, sans-serif;
  font-size: .72rem;
  line-height: 1;
  letter-spacing: .01em;
}

.gtg-home-section__head h2 {
  max-width: 760px;
  margin: 0;
  font-size: clamp(2rem, 4vw, 3.35rem);
  line-height: .98;
  color: var(--gtg-ink);
}

.gtg-home-section__copy > p:not(.gtg-home-section__eyebrow) {
  max-width: 680px;
  margin: .45rem 0 0;
  color: var(--gtg-muted);
  font-size: clamp(.95rem, 1.2vw, 1.05rem);
  font-weight: 650;
  line-height: 1.35;
}

.gtg-home-section__button,
.gtg-home-product-card__button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.55rem;
  padding: .58rem .9rem;
  border: var(--gtg-border);
  border-radius: 999px;
  background: var(--gtg-orange);
  color: var(--gtg-paper) !important;
  box-shadow: var(--gtg-shadow-sm);
  font-weight: 900;
  text-decoration: none !important;
  transform: translate(-1px, -1px);
  transition: transform .16s ease, box-shadow .16s ease;
}

.gtg-home-section__button:hover,
.gtg-home-product-card__button:hover {
  box-shadow: 2px 2px 0 var(--gtg-ink);
  transform: none;
}

.gtg-home-product-grid {
  width: 100%;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--gtg-home-section-gap);
}

.gtg-home-product-card {
  position: relative;
  display: flex;
  min-width: 0;
  min-height: 100%;
  flex-direction: column;
  overflow: hidden;
  border: 2px solid var(--gtg-ink);
  border-radius: calc(var(--gtg-radius) - 6px);
  background: #fff !important;
  box-shadow: none !important;
  color: var(--gtg-ink);
  transform: none;
}

.gtg-home-product-card,
.gtg-home-product-card * {
  filter: none !important;
}

.gtg-home-product-card:nth-child(even) {
  transform: none;
}

.gtg-home-product-card__badge {
  position: absolute;
  z-index: 3;
  top: .58rem;
  left: .58rem;
  display: inline-flex;
  max-width: calc(100% - 1.16rem);
  padding: .28rem .52rem;
  border: 2px solid var(--gtg-ink);
  border-radius: 999px;
  background: var(--gtg-yellow);
  color: var(--gtg-ink);
  box-shadow: 2px 2px 0 var(--gtg-ink);
  font-size: .68rem;
  font-weight: 900;
  line-height: 1;
}

.gtg-home-product-card__image,
.gtg-home-product-card__body,
.gtg-home-product-card__footer {
  background: #fff !important;
}

.gtg-home-product-card__image {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: clamp(170px, 16vw, 210px);
  padding: .72rem .72rem .35rem;
  text-decoration: none;
  box-shadow: none !important;
}

.gtg-home-product-card__image img {
  display: block;
  width: 100%;
  height: clamp(150px, 15vw, 190px);
  object-fit: contain;
  filter: none !important;
  box-shadow: none !important;
}

.gtg-home-product-card__body {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  gap: .48rem;
  padding: .78rem;
}

.gtg-home-product-card h3 {
  margin: 0;
  font-size: clamp(.9rem, 1vw, 1.02rem);
  line-height: 1.12;
  color: var(--gtg-ink);
  overflow-wrap: anywhere;
}

.gtg-home-product-card h3 a {
  color: inherit;
  text-decoration: none;
}

/* Homepage shop should be image-led, not a full WooCommerce product listing. */
.gtg-home-product-card p {
  display: none;
}

.gtg-home-product-card__footer {
  display: grid;
  gap: .55rem;
  margin-top: auto;
}

.gtg-home-product-card__price {
  color: var(--gtg-orange);
  font-size: .98rem;
  font-weight: 900;
}

.gtg-home-product-card__button {
  width: 100%;
  min-height: 2.35rem;
  margin-top: auto;
  border-radius: 12px;
  font-size: .88rem;
}

/* Library keeps the lightbox layout inside the same outer panel style as the shop shelf. */
.gtg-home-library-lightbox {
  width: 100%;
  margin: 0;
  display: grid;
  grid-template-columns: minmax(310px, .95fr) minmax(0, 1.05fr);
  gap: clamp(1rem, 2.4vw, 1.5rem);
  min-height: clamp(360px, 36vw, 500px);
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: #fff;
  box-shadow: none;
  color: var(--gtg-ink);
  transform: none;
}

.gtg-home-library-lightbox .gtg-home-latest-games__gallery {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-rows: auto auto;
  gap: .85rem;
  min-width: 0;
  padding: clamp(1rem, 2.4vw, 1.45rem);
  background: #fff;
  color: var(--gtg-ink);
  border: 0;
  border-radius: calc(var(--gtg-radius) - 8px);
  box-shadow: none;
  overflow: hidden;
  clip-path: none;
}

.gtg-home-library-lightbox .gtg-home-latest-games__stage,
.gtg-home-library-lightbox .gtg-home-latest-games__thumbs {
  position: relative;
  z-index: 1;
}

.gtg-home-library-lightbox .gtg-home-latest-games__stage {
  display: grid;
  place-items: center;
  width: 100%;
  height: clamp(260px, 28vw, 390px);
  min-height: 0;
  padding: clamp(.8rem, 1.8vw, 1.15rem);
  background: #fff;
  border: 0;
  border-radius: calc(var(--gtg-radius) - 10px);
}

.gtg-home-library-lightbox .gtg-home-latest-games__stage img {
  display: block;
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.gtg-home-library-lightbox .gtg-home-latest-games__placeholder {
  display: grid;
  place-items: center;
  width: 100%;
  height: clamp(260px, 28vw, 390px);
  color: var(--gtg-muted);
  font-weight: 950;
  text-align: center;
}

.gtg-home-library-lightbox .gtg-home-latest-games__thumbs {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: .55rem;
  max-width: 620px;
}

.gtg-home-library-lightbox .gtg-home-latest-games__thumb {
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  padding: .28rem;
  background: #fff;
  border: 2px solid rgba(35, 31, 28, .34);
  border-radius: 12px;
  cursor: pointer;
  overflow: hidden;
  transition: transform .14s ease, box-shadow .14s ease, border-color .14s ease;
}

.gtg-home-library-lightbox .gtg-home-latest-games__thumb:hover,
.gtg-home-library-lightbox .gtg-home-latest-games__thumb.is-active {
  border-color: var(--gtg-ink);
  box-shadow: 2px 2px 0 var(--gtg-ink);
  transform: translateY(-1px);
}

.gtg-home-library-lightbox .gtg-home-latest-games__thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.gtg-home-library-lightbox .gtg-home-latest-games__content {
  position: relative;
  z-index: 0;
  display: flex;
  min-width: 0;
  min-height: 100%;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  padding: clamp(1.2rem, 2.6vw, 2.1rem);
  background: #fff;
  border: 0;
  border-radius: calc(var(--gtg-radius) - 8px);
  color: var(--gtg-ink);
}

.gtg-home-library-lightbox .gtg-home-latest-games__content .gtg-eyebrow {
  display: none !important;
}

.gtg-home-library-lightbox__game-title {
  max-width: 620px;
  margin: 0 0 .85rem;
  color: var(--gtg-ink);
  font-size: clamp(1.45rem, 2.35vw, 2.35rem);
  line-height: 1.02;
  letter-spacing: .01em;
}

.gtg-home-library-lightbox .gtg-home-latest-games__meta {
  display: flex;
  flex-wrap: wrap;
  gap: .45rem;
  margin: 0 0 1rem;
  color: var(--gtg-ink);
  font-weight: 950;
}

.gtg-home-library-lightbox .gtg-home-latest-games__meta span {
  display: inline-flex;
  align-items: center;
  padding: .34rem .55rem;
  background: #fff;
  border: 2px solid var(--gtg-ink);
  border-radius: 999px;
  color: var(--gtg-ink);
  font-weight: 950;
  line-height: 1.1;
}

.gtg-home-library-lightbox__intro {
  max-width: 520px;
  margin: 0 0 1.25rem;
  color: var(--gtg-muted);
  font-weight: 750;
  line-height: 1.45;
}

.gtg-home-library-lightbox .gtg-home-latest-games__button,
.gtg-home-library-lightbox__secondary {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 2.7rem;
  padding: .68rem 1rem;
  border: 2px solid var(--gtg-ink);
  border-radius: 12px;
  box-shadow: 3px 3px 0 var(--gtg-ink);
  font-weight: 950;
  text-align: center;
  text-decoration: none !important;
  transition: transform .14s ease, box-shadow .14s ease;
}

.gtg-home-library-lightbox .gtg-home-latest-games__button {
  background: var(--gtg-orange) !important;
  color: var(--gtg-paper) !important;
  box-shadow: var(--gtg-shadow-sm);
  transform: translate(-1px, -1px);
}

.gtg-home-library-lightbox__secondary {
  margin-top: .75rem;
  background: var(--gtg-yellow) !important;
  color: var(--gtg-ink) !important;
}

.gtg-home-library-lightbox .gtg-home-latest-games__button:hover,
.gtg-home-library-lightbox__secondary:hover {
  box-shadow: 2px 2px 0 var(--gtg-ink);
  transform: none;
}

@media (max-width: 960px) {
  .gtg-home-product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .gtg-home-library-lightbox {
    grid-template-columns: 1fr;
    color: var(--gtg-ink);
  }

  .gtg-home-library-lightbox .gtg-home-latest-games__content {
    padding: clamp(1.35rem, 4vw, 2rem);
  }
}

@media (max-width: 680px) {
  .gtg-split--home-feature .gtg-home-section {
    margin-top: clamp(1.6rem, 7vw, 2.6rem);
  }

  .gtg-split--home-feature .gtg-home-section--shop,
  .gtg-split--home-feature .gtg-home-section--library {
    padding: 1rem;
  }

  .gtg-home-section__head {
    display: grid;
    align-items: start;
  }

  .gtg-home-section__button {
    width: 100%;
  }

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

  .gtg-home-product-card__image {
    min-height: 190px;
  }

  .gtg-home-product-card__image img {
    height: 170px;
  }

  .gtg-home-library-lightbox .gtg-home-latest-games__stage,
  .gtg-home-library-lightbox .gtg-home-latest-games__placeholder {
    height: clamp(235px, 72vw, 340px);
  }

  .gtg-home-library-lightbox .gtg-home-latest-games__thumbs {
    display: flex;
    max-width: 100%;
    gap: .6rem;
    overflow-x: auto;
    overflow-y: hidden;
    padding: .1rem .1rem .65rem;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
  }

  .gtg-home-library-lightbox .gtg-home-latest-games__thumb {
    flex: 0 0 clamp(72px, 22vw, 96px);
    scroll-snap-align: start;
  }
}
