/* Company 51 Christmas Crew homepage promotion, popup, and campaign layout. */

.c51-christmas-crew {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: clamp(56px, 7vw, 104px) clamp(20px, 5vw, 76px);
  color: #fff;
  background:
    radial-gradient(circle at 88% 12%, rgba(205, 245, 128, 0.18), transparent 28%),
    radial-gradient(circle at 12% 80%, rgba(215, 53, 39, 0.3), transparent 34%),
    linear-gradient(125deg, #370606 0%, #780b0b 43%, #2a0505 100%);
  border-block: 1px solid rgba(205, 245, 128, 0.42);
}

.c51-christmas-crew::before {
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(45deg, rgba(255, 255, 255, 0.025) 25%, transparent 25%),
    linear-gradient(-45deg, rgba(255, 255, 255, 0.025) 25%, transparent 25%);
  background-size: 18px 18px;
  content: "";
  opacity: 0.65;
}

.c51-christmas-crew__inner {
  width: min(100%, 1460px);
  margin-inline: auto;
  display: grid;
  grid-template-columns: minmax(300px, 0.78fr) minmax(480px, 1.22fr);
  align-items: center;
  gap: clamp(34px, 5vw, 82px);
}

.c51-christmas-crew__copy {
  min-width: 0;
}

.c51-christmas-crew__eyebrow {
  margin: 0 0 12px;
  color: #cdf580;
  font-size: 0.9rem;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.c51-christmas-crew__title {
  margin: 0;
  color: #fff;
  font-family: var(--wp--preset--font-family--heading, "Barlow Condensed", Impact, sans-serif);
  font-size: clamp(3rem, 5.6vw, 5.9rem);
  font-weight: 900;
  letter-spacing: -0.025em;
  line-height: 0.84;
  text-transform: uppercase;
  text-shadow: 0 5px 0 rgba(0, 0, 0, 0.46);
}

.c51-christmas-crew__description {
  max-width: 620px;
  margin: 24px 0 0;
  color: rgba(255, 255, 255, 0.86);
  font-size: clamp(1rem, 1.35vw, 1.2rem);
  line-height: 1.55;
}

.c51-christmas-crew__highlights {
  display: grid;
  gap: 9px;
  margin: 24px 0 30px;
  padding: 0;
  list-style: none;
}

.c51-christmas-crew__highlights li {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  font-weight: 800;
}

.c51-christmas-crew__highlights li::before {
  width: 9px;
  height: 9px;
  flex: 0 0 9px;
  border-radius: 50%;
  background: #cdf580;
  box-shadow: 0 0 14px rgba(205, 245, 128, 0.75);
  content: "";
}

.c51-christmas-crew__button {
  display: inline-flex;
  min-height: 54px;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 13px 24px;
  border: 2px solid #cdf580;
  border-radius: 8px;
  color: #080a08;
  background: #cdf580;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.34);
  font-family: var(--wp--preset--font-family--heading, "Barlow Condensed", Impact, sans-serif);
  font-size: 1.2rem;
  font-weight: 900;
  letter-spacing: 0.035em;
  text-decoration: none;
  text-transform: uppercase;
}

.c51-christmas-crew__button:hover,
.c51-christmas-crew__button:focus-visible {
  color: #fff;
  background: #101210;
  outline: 3px solid rgba(205, 245, 128, 0.38);
  outline-offset: 3px;
}

.c51-christmas-crew__visual {
  display: block;
  overflow: hidden;
  border: 2px solid #cdf580;
  border-radius: clamp(15px, 2vw, 28px);
  background: #690808;
  box-shadow: 0 26px 64px rgba(0, 0, 0, 0.5), 0 0 34px rgba(205, 245, 128, 0.13);
  transform: rotate(1deg);
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.c51-christmas-crew__visual:hover,
.c51-christmas-crew__visual:focus-visible {
  box-shadow: 0 30px 72px rgba(0, 0, 0, 0.56), 0 0 42px rgba(205, 245, 128, 0.24);
  outline: 3px solid #fff;
  outline-offset: 5px;
  transform: rotate(0deg) translateY(-4px);
}

.c51-christmas-crew__visual img {
  display: block;
  width: 100%;
  height: auto;
}

.c51-christmas-popup[hidden] {
  display: none;
}

.c51-christmas-popup {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: grid;
  place-items: center;
  padding: clamp(12px, 3vw, 44px);
  background: rgba(3, 4, 3, 0.82);
  backdrop-filter: blur(9px);
  opacity: 0;
  transition: opacity 180ms ease;
}

.c51-christmas-popup.is-open {
  opacity: 1;
}

.c51-christmas-popup__dialog {
  position: relative;
  width: min(100%, 1370px);
  max-height: calc(100vh - clamp(24px, 6vw, 88px));
  overflow: hidden;
  border: 2px solid #cdf580;
  border-radius: clamp(15px, 2vw, 30px);
  background: #650808;
  box-shadow: 0 34px 100px rgba(0, 0, 0, 0.72), 0 0 40px rgba(205, 245, 128, 0.18);
  transform: translateY(18px) scale(0.985);
  transition: transform 180ms ease;
}

.c51-christmas-popup__dialog:focus {
  outline: none;
}

.c51-christmas-popup.is-open .c51-christmas-popup__dialog {
  transform: none;
}

.c51-christmas-popup__link,
.c51-christmas-popup__link img {
  display: block;
  width: 100%;
}

.c51-christmas-popup__link img {
  height: auto;
  max-height: calc(100vh - clamp(24px, 6vw, 88px));
  object-fit: contain;
}

.c51-christmas-popup__link:focus-visible {
  outline: 4px solid #fff;
  outline-offset: -8px;
}

/* The supplied artwork already contains the close icon. This real button
 * overlays that visual control so pointer and keyboard users get one target. */
.c51-christmas-popup__close {
  position: absolute;
  top: 7.5%;
  right: 5.9%;
  z-index: 2;
  width: clamp(42px, 4.8vw, 68px);
  aspect-ratio: 1;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
}

.c51-christmas-popup__close:focus-visible {
  outline: 4px solid #cdf580;
  outline-offset: 4px;
}

html.c51-popup-open {
  overflow: hidden;
}

/* Christmas Crew campaign: 60/40 desktop split and a single stacked preview
 * column so the color/magnifier note remains directly under the image. */
@media (min-width: 901px) {
  body.c51-christmas-page .shop-section {
    grid-template-columns: minmax(0, 3fr) minmax(420px, 2fr);
    gap: clamp(36px, 4vw, 72px);
  }

  body.c51-christmas-page .selected-product {
    width: min(100%, 720px);
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
    gap: 0;
  }

  body.c51-christmas-page .selected-image {
    grid-column: 1;
    grid-row: 1;
  }

  body.c51-christmas-page .c51-color-preview-status {
    grid-column: 1;
    grid-row: 2;
    width: 100%;
    margin: 10px 0 0;
  }

  body.c51-christmas-page .selected-copy {
    grid-column: 1;
    grid-row: 3;
    margin-top: 30px;
  }
}

@media (max-width: 960px) {
  .c51-christmas-crew__inner {
    grid-template-columns: 1fr;
  }

  .c51-christmas-crew__copy {
    max-width: 760px;
  }

  .c51-christmas-crew__visual {
    max-width: 820px;
    transform: none;
  }
}

@media (max-width: 620px) {
  .c51-christmas-crew {
    padding: 48px 16px;
  }

  .c51-christmas-crew__title {
    font-size: clamp(2.75rem, 14vw, 4.2rem);
  }

  .c51-christmas-crew__button {
    width: 100%;
    padding-inline: 16px;
    text-align: center;
  }

  .c51-christmas-popup {
    padding: 8px;
  }

  .c51-christmas-popup__dialog {
    border-radius: 12px;
  }

  .c51-christmas-popup__close {
    top: 6.5%;
    right: 4.5%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .c51-christmas-crew__visual,
  .c51-christmas-popup,
  .c51-christmas-popup__dialog {
    transition: none;
  }
}

