/* Plugin block helpers */
@media (max-width: 767px) {
  .cw-testimonials__grid > .cw-testimonials__column:nth-child(n + 2) {
    display: none;
  }
}

/* Custom print creator */
.cw-custom-print__layout {
  display: grid;
  gap: 1.5rem;
  align-items: start;
}

@media (min-width: 900px) {
  .cw-custom-print__layout {
    grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
    gap: 2rem;
  }
}

.cw-custom-print__controls {
  display: grid;
  gap: 1.15rem;
  padding: 1.25rem;
  border: 1px solid rgba(37, 37, 64, 0.12);
  background: #fff;
}

.cw-custom-print__step {
  display: grid;
  gap: 0.55rem;
}

.cw-custom-print__step[hidden] {
  display: none !important;
}

.cw-custom-print__step-label {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(37, 37, 64, 0.55);
}

.cw-custom-print__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.cw-custom-print__chip {
  appearance: none;
  border: 1px solid rgba(37, 37, 64, 0.18);
  background: #fff;
  color: #252540;
  padding: 0.55rem 0.9rem;
  font: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.cw-custom-print__chip.is-active,
.cw-custom-print__chip:hover {
  border-color: #252540;
  background: #252540;
  color: #fff;
}

.cw-custom-print__select {
  width: 100%;
  max-width: 16rem;
  padding: 0.65rem 0.75rem;
  border: 1px solid rgba(37, 37, 64, 0.18);
  background: #fff;
  font: inherit;
}

.cw-custom-print__upload {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem;
  padding: 0.75rem 1rem;
  border: 1px dashed rgba(37, 37, 64, 0.35);
  background: rgba(250, 248, 242, 0.8);
  cursor: pointer;
  font-size: 0.875rem;
  font-weight: 600;
}

.cw-custom-print__hint,
.cw-custom-print__note {
  margin: 0;
  font-size: 0.8125rem;
  line-height: 1.45;
  color: rgba(37, 37, 64, 0.65);
}

.cw-custom-print__slider-label {
  display: grid;
  gap: 0.35rem;
  font-size: 0.8125rem;
  font-weight: 600;
}

.cw-custom-print__slider-label input[type="range"] {
  width: 100%;
}

.cw-custom-print__price-row {
  display: grid;
  gap: 0.75rem;
}

@media (min-width: 520px) {
  .cw-custom-print__price-row {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
  }
}

.cw-custom-print__price {
  font-family: var(--cw-font-display, Georgia, serif);
  font-size: clamp(1.35rem, 3vw, 1.75rem);
  color: #252540;
}

.cw-custom-print__cart-btn {
  justify-self: stretch;
}

.cw-custom-print__status {
  margin: 0;
  font-size: 0.875rem;
  color: #1674c3;
}

.cw-custom-print__status.is-error {
  color: #b81a34;
}

.cw-custom-print__preview {
  background: transparent;
  padding: 0;
}

.cw-custom-print__stage {
  position: relative;
  width: min(100%, 560px);
  /* Default; JS sets real photo aspect so nothing is cropped. */
  aspect-ratio: 1 / 1;
  margin: 0 auto;
  overflow: hidden;
  background: #fff;
  user-select: none;
  -webkit-user-select: none;
  border: 0;
  outline: none;
  box-shadow: none;
}

.cw-custom-print__product {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center center;
  pointer-events: none;
  border: 0;
  outline: none;
  transform: none;
}

.cw-custom-print__print-zone,
.cw-custom-print__print-zone::before,
.cw-custom-print__print-zone::after {
  border: 0 !important;
  outline: 0 !important;
  box-shadow: none !important;
  background: transparent !important;
}

.cw-custom-print__print-zone {
  position: absolute;
  /* Do not clip the user's design into a hard rectangle. */
  overflow: visible;
  cursor: grab;
  touch-action: none;
}

.cw-custom-print__print-zone:active {
  cursor: grabbing;
}

.cw-custom-print__graphic {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 2;
  width: 55%;
  height: 55%;
  max-width: 90%;
  max-height: 90%;
  object-fit: contain;
  object-position: center;
  transform: translate3d(-50%, -50%, 0);
  transform-origin: center center;
  pointer-events: none;
  border: 0 !important;
  outline: 0 !important;
  box-shadow: none !important;
  background: transparent !important;
  image-rendering: auto;
  will-change: transform;
  backface-visibility: hidden;
}

.cw-custom-print__graphic[hidden] {
  display: none !important;
}

/* Cart / checkout — single-line custom print meta (plugin-owned, always loads). */
.cwb-cart-print-meta {
  display: block;
  margin: 0.35rem 0 0;
  padding: 0;
  font-size: 0.8125rem;
  line-height: 1.4;
  font-weight: 400;
  color: rgba(37, 37, 64, 0.62);
  white-space: normal;
}

/* Hide leftover broken variation lists on custom-print cart rows if any remain. */
.woocommerce-cart-form__contents .product-name:has(.cwb-cart-print-meta) dl.variation,
.woocommerce-checkout-review-order-table .product-name:has(.cwb-cart-print-meta) dl.variation {
  display: none !important;
}

/* ——— Creator campaign ticker + homepage promo ——— */
:root {
  --cwb-promo-ticker-h: 2.75rem;
}

.cwb-promo-ticker {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 200;
  min-height: var(--cwb-promo-ticker-h);
  background: linear-gradient(90deg, #16162a 0%, #252540 55%, #b81a34 100%);
  color: #fff;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.18);
}

body.cwb-has-promo-ticker {
  padding-top: var(--cwb-promo-ticker-h);
}

body.cwb-has-promo-ticker .site-header {
  top: var(--cwb-promo-ticker-h);
}

.cwb-promo-ticker__link {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.55rem 1rem;
  width: min(100% - 1.5rem, 1400px);
  margin: 0 auto;
  padding: 0.55rem 0;
  color: inherit;
  text-decoration: none;
  font-size: 0.8125rem;
  line-height: 1.25;
}

.cwb-promo-ticker__link:hover {
  color: #fff;
}

.cwb-promo-ticker__badge {
  display: inline-flex;
  align-items: center;
  padding: 0.15rem 0.45rem;
  background: #f0a62e;
  color: #16162a;
  font-family: var(--cw-font-display, "Archivo Black", sans-serif);
  font-size: 0.75rem;
  letter-spacing: 0.02em;
}

.cwb-promo-ticker__copy {
  font-weight: 600;
}

.cwb-promo-ticker__timer {
  display: inline-flex;
  align-items: baseline;
  gap: 0.35rem;
  font-variant-numeric: tabular-nums;
}

.cwb-promo-ticker__timer-label {
  opacity: 0.78;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.cwb-promo-ticker__digits {
  font-family: var(--cw-font-mono, "JetBrains Mono", monospace);
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.cwb-promo-ticker__cta {
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

@media (max-width: 640px) {
  :root {
    --cwb-promo-ticker-h: 3.35rem;
  }

  .cwb-promo-ticker__cta {
    display: none;
  }

  .cwb-promo-ticker__copy {
    flex: 1 1 auto;
    text-align: center;
  }
}

.cwb-price-promo {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.45rem;
}

.cwb-price-promo__badge,
.cw-creator-promo__pill {
  display: inline-flex;
  align-items: center;
  padding: 0.12rem 0.42rem;
  background: #b81a34;
  color: #fff;
  font-family: var(--cw-font-display, "Archivo Black", sans-serif);
  font-size: 0.78rem;
  letter-spacing: 0.02em;
  line-height: 1.2;
}

.cw-creator-promo {
  padding-block: clamp(2rem, 4vw, 3.25rem);
}

.cw-creator-promo__panel {
  display: grid;
  gap: 1.75rem;
  width: min(100% - 3rem, 1400px);
  margin-inline: auto;
  padding: clamp(1.5rem, 3.5vw, 2.5rem);
  background:
    radial-gradient(ellipse 80% 70% at 100% 0%, rgba(240, 166, 46, 0.22), transparent 55%),
    linear-gradient(135deg, #16162a 0%, #252540 48%, #1a2a4a 100%);
  color: #f5f2ea;
}

@media (min-width: 860px) {
  .cw-creator-promo__panel {
    grid-template-columns: minmax(0, 1.35fr) minmax(0, 0.85fr);
    align-items: end;
  }
}

.cw-creator-promo__eyebrow {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem;
  margin: 0 0 0.75rem;
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  opacity: 0.85;
}

.cw-creator-promo__title {
  margin: 0 0 0.75rem;
  font-size: clamp(1.85rem, 4vw, 2.75rem);
  line-height: 1.05;
  color: #fff;
}

.cw-creator-promo__text {
  margin: 0 0 1rem;
  max-width: 36rem;
  font-size: 1.05rem;
  line-height: 1.55;
  color: rgba(245, 242, 234, 0.88);
}

.cw-creator-promo__deal {
  margin: 0 0 1.35rem;
  font-size: 0.95rem;
  color: rgba(245, 242, 234, 0.92);
}

.cw-creator-promo__deal strong {
  color: #f0a62e;
  margin-left: 0.25rem;
}

.cw-creator-promo__cta.cw-btn--primary {
  background: #f0a62e;
  color: #16162a;
  border-color: #f0a62e;
}

.cw-creator-promo__cta.cw-btn--primary:hover {
  background: #fff;
  color: #16162a;
  border-color: #fff;
}

.cw-creator-promo__aside {
  display: grid;
  gap: 1rem;
}

.cw-creator-promo__meter {
  display: grid;
  gap: 0.25rem;
  padding: 1rem 1.15rem;
  border: 1px solid rgba(245, 242, 234, 0.18);
  background: rgba(0, 0, 0, 0.22);
}

.cw-creator-promo__meter-label {
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.75;
}

.cw-creator-promo__meter-digits {
  font-family: var(--cw-font-mono, "JetBrains Mono", monospace);
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  font-weight: 700;
  letter-spacing: 0.06em;
  font-variant-numeric: tabular-nums;
  color: #f0a62e;
}

.cw-creator-promo__list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.35rem;
  font-size: 0.92rem;
  color: rgba(245, 242, 234, 0.86);
}

.cw-creator-promo__list li::before {
  content: "→ ";
  color: #f0a62e;
}
