/* Design Maker for Campaigns — overrides for the auto-generated discount
   activity landing page (templates/page.Discount_ActivityLandingPage.json).
   The page content is raw HTML injected by the app into `page.content`
   (rendered inside #activity_page) — these rules only reskin it, they don't
   control the markup. Class names below (e.g. `_product_pn9va_1`) are the
   app's own CSS-module hashes and may change without notice on app updates —
   if this stops matching after an app update, re-inspect the live DOM. */

/* Apply the campaign geometry before the app's inline content styles arrive. */
[data-settings-id="shopline-section-main"] > .page-width {
  max-width: none;
  padding-inline: 0;
}

[data-settings-id="shopline-section-main"] .main-page__title {
  display: none;
}

/* Keep the configurable section spacing on the persistent shell. The shell
   exists before and after hydration, so swapping the skeleton for the app can
   never add or remove these offsets. The variables are emitted by
   section.settings | class_list(). */
[data-settings-id="shopline-section-main"] .main-page {
  padding: 0;
}

[data-settings-id="shopline-section-main"] .bogo-campaign-shell {
  box-sizing: border-box;
  padding-block-start: var(--s-padding-block-start, 0px);
  padding-inline-end: var(--s-padding-inline-end, 0px);
  padding-block-end: var(--s-padding-block-end, 0px);
  padding-inline-start: var(--s-padding-inline-start, 0px);
}

/* Native card width formula (._product_pn9va_1) reads --column and
   --grid-horizontal-space directly — these were never defined anywhere,
   so the calc() was invalid and cards collapsed to content width. */
.bogo-campaign-shell {
  --column: 2;
  --grid-horizontal-space: 12px;
}

/* The placeholder is part of the initial HTML response. Design Maker stays
   out of layout until both async responses have produced a usable grid. */
.bogo-campaign-shell:not(.is-ready) #activity_page {
  display: none;
}

.bogo-skeleton {
  --bogo-skeleton-color: rgb(235 235 235 / 100%);
  --bogo-skeleton-highlight: rgb(248 248 248 / 100%);
  width: 100%;
  max-width: 1440px;
  min-height: 1960px;
  margin-inline: auto;
  padding: 32px 16px 48px;
}

.bogo-skeleton__intro {
  display: flex;
  min-height: 112px;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.bogo-skeleton__heading,
.bogo-skeleton__tag,
.bogo-skeleton__toolbar span,
.bogo-skeleton__image,
.bogo-skeleton__title,
.bogo-skeleton__price {
  display: block;
  overflow: hidden;
  background: var(--bogo-skeleton-color);
  background-image: linear-gradient(90deg, transparent, var(--bogo-skeleton-highlight), transparent);
  background-size: 220% 100%;
  animation: bogo-skeleton-shimmer 1.6s ease-in-out infinite;
}

.bogo-skeleton__heading { width: min(320px, 70%); height: 30px; }
.bogo-skeleton__tag { width: min(390px, 85%); height: 24px; }

.bogo-skeleton__toolbar {
  display: flex;
  height: 58px;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid rgb(225 225 225 / 100%);
}

.bogo-skeleton__toolbar span { width: 82px; height: 32px; }
.bogo-skeleton__toolbar span:last-child { width: 58px; margin-left: auto; }

.bogo-skeleton__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--grid-horizontal-space);
  padding-top: 20px;
}

.bogo-skeleton__image { width: 100%; aspect-ratio: 1; }
.bogo-skeleton__title { width: 76%; height: 40px; margin-top: 10px; }
.bogo-skeleton__price { width: 40%; height: 14px; margin-top: 8px; }

@media (min-width: 960px) {
  .bogo-skeleton { min-height: 1680px; padding: 48px 40px 64px; }
  .bogo-skeleton__grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (prefers-reduced-motion: reduce) {
  .bogo-skeleton * { animation: none; }
}

@keyframes bogo-skeleton-shimmer {
  from { background-position: 120% 0; }
  to { background-position: -120% 0; }
}

@media (min-width: 960px) {
  .bogo-campaign-shell {
    --column: 4;
    --grid-horizontal-space: 20px;
  }
}

/* Promo tag ("Buy 2 get the lowest-priced 50% off") — match product-card
   discount tag styling (blocks/product-card/_discount-tag.css) */
#activity_page [class*="_tags_"] {
  margin-top: 8px;
}

#activity_page [class*="_tag_"] {
  display: inline-block;
  padding: 0.1em 0.4em;
  line-height: 1.4;
  font-weight: 700;
  text-transform: uppercase;
  color: rgb(var(--color-tag-text));
  background-color: rgb(var(--color-tag-background));
  border-radius: var(--product-card-discount-radius, 0);
}

/* Filters / sort bar — uppercase, letter-spaced, matching site utility text */
#activity_page [class*="_filters_"],
#activity_page [class*="_handle_"],
#activity_page [class*="_sorter_"],
#activity_page [class*="_option_"] {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: rgb(var(--color-text));
}

#activity_page [class*="_productCount_"] {
  font-size: 13px;
  color: rgb(var(--color-text) / 70%);
}

/* Product grid — let the native flex-wrap + per-card width calc do the
   layout; we only feed it real --column/--grid-horizontal-space values
   (defined above) instead of fighting it with a second layout system. */
#activity_page [class*="_products_"] {
  gap: var(--grid-horizontal-space);
}

/* Product card — match blocks/product-card look (flat, no border-radius,
   theme background, neutral image tray) */
#activity_page [class*="_product_"] {
  background-color: rgb(var(--color-background));
}

#activity_page [class*="_link_"] {
  text-decoration: none;
  color: inherit;
}

/* Reserve the final image geometry before each remote image is decoded. */
#activity_page [class*="_imageCon_"] {
  position: relative;
  padding-bottom: 0 !important;
  aspect-ratio: 1;
  background-color: rgb(243 243 243 / 100%) !important;
  border-radius: 0;
}

#activity_page [class*="_imageCon_"] img {
  position: absolute !important;
  inset: 0;
  width: 100% !important;
  height: 100% !important;
  object-fit: contain;
}

/* Quick-add trigger — swap the app's own SVG for the theme's existing
   bag+alert icon (public/styles/blocks/product-card.css) so it matches the
   rest of the site instead of the app's default icon. */
#activity_page [class*="_quickView_"] {
  position: absolute;
  top: 12px;
  right: 12px;
  bottom: auto;
  left: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: none;
  opacity: 0.6;
  transition: opacity 0.2s ease;
}

#activity_page [class*="_quickView_"] svg {
  display: none;
}

#activity_page [class*="_quickView_"]::after {
  content: "";
  display: inline-block;
  width: 32px;
  height: 32px;
  background-image: url('data:image/svg+xml,<svg width="34" height="31" viewBox="0 0 34 31" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M15.4526 29.6347C16.9473 29.6347 18.1591 28.4229 18.1591 26.9282C18.1591 25.4334 16.9473 24.2217 15.4526 24.2217C13.9578 24.2217 12.7461 25.4334 12.7461 26.9282C12.7461 28.4229 13.9578 29.6347 15.4526 29.6347Z" stroke="%23ABABAB" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/><path d="M26.5502 29.8515C28.045 29.8515 29.2567 28.6397 29.2567 27.145C29.2567 25.6502 28.045 24.4385 26.5502 24.4385C25.0555 24.4385 23.8438 25.6502 23.8438 27.145C23.8438 28.6397 25.0555 29.8515 26.5502 29.8515Z" stroke="%23ABABAB" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/><path d="M1 1C1 1 2.53492 1 3.38765 1C4.24038 1 5.09311 1.37727 5.94585 2.20726C6.79858 3.03725 7.39549 4.47088 7.39549 4.47088L11.0622 15.3362C11.7444 17.1471 12.6824 18.4298 14.5584 18.4298H26.2409C28.2022 18.4298 29.396 16.3926 29.7371 15.3362C30.0782 14.2799 32.1247 7.48903 32.1247 7.48903C32.1247 6.05541 30.7604 4.84815 29.1402 4.84815H7.56604" stroke="%23ABABAB" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/><line x1="20.6758" y1="9.46973" x2="20.6758" y2="13.6947" stroke="%23ABABAB" stroke-width="2" stroke-linecap="round"/><line x1="18.1836" y1="11.2041" x2="22.4085" y2="11.2041" stroke="%23ABABAB" stroke-width="2" stroke-linecap="round"/></svg>');
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
}

#activity_page [class*="_product_"]:hover [class*="_quickView_"] {
  opacity: 1;
}

/* The app's own stylesheet sets `._product_pn9va_1 ._info_pn9va_16 {
   margin-top: 20px; row-gap: 12px; }` (flex column) — override both
   directly instead of adding padding/margin on top of them, or the two
   values stack instead of replacing each other.
   margin-top matches templates/collection.json main-collection-products__card
   layout.row-gap (image-to-info gap): 8px mobile / 14px desktop.
   row-gap matches main-collection-products__card__info layout.row-gap
   (title-to-price gap): 2px, same both breakpoints.
   Hash kept here (unlike most other selectors in this file) because the
   app reuses the bare name "_info_" for an unrelated wrapper elsewhere
   (._info_1bze2_1, the activity-level container below) — a name-only
   [class*="_info_"] match would apply per-card spacing to that wrapper
   too. */
#activity_page [class*="_info_pn9va_"] {
  min-height: 70px;
  margin-top: 8px;
  row-gap: 2px;
  padding: 0 4px 0;
}

@media (min-width: 960px) {
  #activity_page [class*="_info_pn9va_"] {
    margin-top: 14px;
  }
}

/* Activity-level wrapper (distinct from the per-card ._info_pn9va_ above —
   same bare name, different app component/hash). The app's own stylesheet
   sets a giant `margin: 45px 0`; cut it down to a reasonable 30px. Padding
   (the --padding gutter var) is left untouched — only the vertical margin
   was reported as the problem. Doesn't touch the skeleton: `.bogo-skeleton*`
   are our own classes, entirely separate from this app class, so this can't
   affect the skeleton's dimensions or the CLS reservation logic in
   design-maker-campaigns.js. */
#activity_page [class*="_info_1bze2_"] {
  margin: 30px 0;
}

/* Title — uppercase, matching .block-product-card .block-product-title
   (public/styles/blocks/product-card.css): 24px desktop override, weight
   500 override. Mobile has no size override in that file, so it falls
   through to body3's computed mobile size (18.375px = 21px × the fixed
   14/16 body3-font-size-mobile-ratio). Line-height from the Talons
   product-card tokens (public/styles/base/tokens.css): 1.12 mobile /
   1.15 desktop — not the generic body3 1.4.
   No min-height: the shared min-height on ._info_pn9va_16 above already
   reserves the card's total height for CLS, so a single-line title doesn't
   need its own reservation (that left a gap before the price). */
#activity_page [class*="_title_"] {
  font-size: 18.375px;
  font-weight: 500;
  font-style: normal;
  line-height: 1.12;
  text-transform: uppercase;
  color: rgb(var(--color-text));
}

@media (min-width: 960px) {
  #activity_page [class*="_title_"] {
    font-size: 24px;
    line-height: 1.15;
  }
}

/* Price — flagged as sale-style pricing (rgb(var(--color-sale))), matching
   how the theme colors discounted/highlighted prices elsewhere. Sizes match
   the collection product-card price block (templates/collection.json
   st-compare-at settings): sale_price_font_size_mobile 16px (schema
   default) / sale_price_font_size_desktop 20px, line-height 1.4 (body2),
   font-weight 300 (sale_price_font_family: "Jost:300", forced with
   !important in blocks/st-compare-at/st-compare-at.css regardless of the
   sale_price_bold setting).
   Title-to-price gap is handled by ._info_'s row-gap override above, not
   here — a margin-top here would stack on top of that gap instead of
   replacing it. */
#activity_page [class*="_discount_"] {
  font-size: 16px;
  line-height: 1.4;
  font-weight: 300;
  color: rgb(var(--color-sale));
}

@media (min-width: 960px) {
  #activity_page [class*="_discount_"] {
    font-size: 20px;
  }
}

/* Pagination */
#activity_page [class*="_paginationCon_"] {
  margin-top: 24px;
}

#activity_page [class*="_change_"] {
  color: rgb(var(--color-text));
}

#activity_page [class*="_change_"][class*="_disabled_"] {
  opacity: 0.3;
  pointer-events: none;
}

#activity_page [class*="_paginationText_"] {
  font-size: 13px;
  color: rgb(var(--color-text) / 70%);
}
