/* Phase 9 marketing UI */
.tg-promo-strip {
  background: #1557C0;
  color: #fff;
  font-size: 0.95rem;
  font-weight: 600;
}
.tg-promo-strip__inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  padding: 0.55rem 1rem;
  text-align: center;
}
.tg-promo-strip__text,
.tg-promo-strip__text:link,
.tg-promo-strip__text:visited {
  color: #fff !important;
  text-decoration: none;
}
.tg-promo-strip__text:hover,
.tg-promo-strip__text:focus,
.tg-promo-strip__text:active {
  color: #fff !important;
  text-decoration: underline;
}
.tg-promo-strip__code {
  display: inline-flex;
  align-items: center;
  appearance: none;
  margin: 0;
  padding: 0.2rem 0.6rem;
  border: 1px dashed rgba(255,255,255,.75);
  border-radius: 4px;
  font: inherit;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  background: rgba(255,255,255,.14);
  color: #fff !important;
  cursor: pointer;
  line-height: 1.3;
}
.tg-promo-strip__code:hover,
.tg-promo-strip__code:focus-visible,
.tg-promo-strip__code:active {
  color: #fff !important;
  background: rgba(255,255,255,.22);
  outline: none;
}
.tg-promo-strip__code.is-copied {
  border-style: solid;
  background: rgba(255,255,255,.28);
}

.tg-card__media { position: relative; overflow: hidden; }
/* Beat Woo `.woocommerce ul.products li.product .onsale` (top/right negative)
   so the flash stays inside the image, not on the card border. */
.tg-card__sale,
.woocommerce ul.products li.product .onsale,
.tg-card .onsale,
ul.products li.product .onsale {
  position: absolute;
  top: 12px;
  right: 12px;
  left: auto;
  z-index: 2;
  background: #E30613;
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
  line-height: 1.2;
  min-height: 0;
  min-width: 0;
  box-sizing: border-box;
  max-width: calc(100% - 16px);
}
.tg-countdown {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-top: 0.35rem;
  padding: 0.25rem 0.55rem;
  background: #EEF3FC;
  color: #1557C0;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 600;
}
.tg-countdown--card { margin: 0.35rem 0 0; }
.tg-countdown--single { margin: 0.5rem 0 0.75rem; }
.tg-countdown.is-ended { opacity: 0.55; }

/* Cross-sells on cart — product row under cart (parent grid in main.css).
   Do NOT place .cross-sells beside .cart_totals; that squeezed the block into a side tab. */
.cross-sells {
  background: #fff;
  border: 1px solid var(--tg-border, #e5e7eb);
  border-radius: 16px;
  padding: 1.25rem 1.35rem 1.4rem;
  box-shadow: 0 6px 20px rgba(23, 54, 95, 0.04);
  box-sizing: border-box;
}
.cross-sells > h2 {
  font-size: 1.15rem;
  margin: 0 0 0.85rem;
  color: var(--tg-blue-deep, #17365F);
}
.cross-sells ul.products {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 1rem;
  margin: 0;
  padding: 0;
  list-style: none;
  float: none !important;
}
.cross-sells ul.products::before,
.cross-sells ul.products::after {
  display: none !important;
  content: none !important;
}
.cross-sells ul.products li.product {
  position: relative;
  margin: 0 !important;
  float: none !important;
  width: auto !important;
  max-width: none !important;
  border: 1px solid var(--tg-border, #e5e7eb);
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
  /* Image flush to top/sides so .onsale insets sit on the photo, not card padding. */
  padding: 0 0 0.85rem;
  box-sizing: border-box;
}
.cross-sells ul.products li.product > a.woocommerce-LoopProduct-link,
.cross-sells ul.products li.product > a.woocommerce-loop-product__link {
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
}
.cross-sells ul.products li.product img {
  margin: 0 0 0.65rem !important;
  border-radius: 0;
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
}
/* Keep title/price/button inset; badge stays on the full-bleed image. */
.cross-sells ul.products li.product .woocommerce-loop-product__title,
.cross-sells ul.products li.product .price,
.cross-sells ul.products li.product .star-rating,
.cross-sells ul.products li.product .tg-rv-stars,
.cross-sells ul.products li.product > .button,
.cross-sells ul.products li.product > .added_to_cart {
  margin-left: 0.75rem !important;
  margin-right: 0.75rem !important;
}
.cross-sells ul.products li.product .onsale {
  top: 12px;
  right: 12px;
  left: auto;
}
.cross-sells .woocommerce-loop-product__title { font-size: 0.95rem; }
.cross-sells .price { color: var(--tg-red, #E30613); font-weight: 700; }
@media (max-width: 600px) {
  .cross-sells ul.products {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* PDP gallery sale flash — replace Woo green circle with brand sale pill */
.tg-single span.onsale,
.single-product div.product > span.onsale,
.woocommerce.single-product div.product span.onsale,
.woocommerce div.product span.onsale {
  position: absolute !important;
  top: 14px !important;
  left: 14px !important;
  right: auto !important;
  z-index: 12 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 5px !important;
  min-height: 0 !important;
  min-width: 0 !important;
  width: auto !important;
  height: auto !important;
  padding: 7px 12px 7px 10px !important;
  margin: 0 !important;
  border-radius: 999px !important;
  background: var(--tg-sale, #D92D35) !important;
  color: #fff !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  line-height: 1.2 !important;
  letter-spacing: 0.02em !important;
  text-transform: none !important;
  box-shadow: 0 4px 12px rgba(217, 45, 53, 0.35) !important;
  box-sizing: border-box !important;
  white-space: nowrap !important;
}
.tg-single span.onsale::before,
.single-product div.product > span.onsale::before,
.woocommerce.single-product div.product span.onsale::before,
.woocommerce div.product span.onsale::before {
  content: "" !important;
  display: inline-block !important;
  width: 14px !important;
  height: 14px !important;
  flex: 0 0 14px !important;
  background: center / contain no-repeat
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23fff'%3E%3Cpath d='M21.41 11.58l-9-9A2 2 0 0011 2H4a2 2 0 00-2 2v7a2 2 0 00.59 1.42l9 9a2 2 0 002.82 0l7-7a2 2 0 000-2.84zM7 8a1.5 1.5 0 110-3 1.5 1.5 0 010 3z'/%3E%3C/svg%3E") !important;
}
@media (max-width: 768px) {
  .tg-single span.onsale,
  .single-product div.product > span.onsale,
  .woocommerce.single-product div.product span.onsale,
  .woocommerce div.product span.onsale {
    top: 10px !important;
    left: 10px !important;
    font-size: 12px !important;
    padding: 6px 10px 6px 8px !important;
  }
}
