/* CommerceBundles storefront widgets. Inherits the theme's font and colours by default. */
.cp-offers {
  --cp-accent: currentColor;
  --cp-text: inherit;
  --cp-bg: transparent;
  --cp-border: rgba(0, 0, 0, 0.14);
  --cp-muted: rgba(0, 0, 0, 0.62);
  --cp-button: #111;
  --cp-button-text: #fff;
  --cp-radius: 10px;
  --cp-saving: #8a5a00;
  --cp-reached: #0b7a56;
  --cp-tag: #7a2e0e;
  --cp-tag-text: #fff;
  display: grid;
  gap: var(--cp-gap, 16px);
  margin: var(--cp-gap, 16px) 0;
  max-width: 100%;
  font: inherit;
  color: var(--cp-text);
}

.cp-offers *,
.cp-offers *::before,
.cp-offers *::after {
  box-sizing: border-box;
}

.cp-skeleton {
  min-height: 72px;
  border-radius: var(--cp-radius);
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.09), rgba(0, 0, 0, 0.05));
  background-size: 200% 100%;
  animation: cp-shimmer 1.4s ease-in-out infinite;
}

@keyframes cp-shimmer {
  from { background-position: 200% 0; }
  to { background-position: -200% 0; }
}

.cp-offer {
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--cp-border);
  border-radius: var(--cp-radius);
  background: var(--cp-bg);
  min-width: 0;
}

.cp-offer__title {
  margin: 0;
  font-weight: 600;
  font-size: 1.05em;
  line-height: 1.3;
}

.cp-offer__description,
.cp-tier__label,
.cp-step__hint {
  margin: 2px 0 0;
  color: var(--cp-muted);
  font-size: 0.9em;
}

/* Tiers */
.cp-tiers { display: grid; gap: 8px; }
.cp-tiers--horizontal,
.cp-tiers--buttons { grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); }
.cp-tiers--table .cp-tier { border-radius: 0; border-top-width: 0; }
.cp-tiers--table .cp-tier:first-child { border-top-width: 1px; border-radius: var(--cp-radius) var(--cp-radius) 0 0; }
.cp-tiers--table .cp-tier:last-child { border-radius: 0 0 var(--cp-radius) var(--cp-radius); }
.cp-tiers--compact .cp-tier { padding: 8px 10px; }

.cp-tier {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid var(--cp-border);
  border-radius: calc(var(--cp-radius) - 2px);
  cursor: pointer;
  min-width: 0;
}

.cp-tiers--buttons .cp-tier,
.cp-tiers--horizontal .cp-tier { flex-direction: column; align-items: flex-start; }
.cp-tiers--buttons .cp-tier input { position: absolute; opacity: 0; pointer-events: none; }

.cp-tier:has(input:checked) {
  border-color: var(--cp-accent);
  box-shadow: 0 0 0 1px var(--cp-accent);
}

.cp-tier:focus-within { outline: 2px solid var(--cp-accent); outline-offset: 2px; }
.cp-tier input { margin: 0; accent-color: var(--cp-accent); flex-shrink: 0; }
.cp-tier--highlight { border-width: 2px; }
.cp-tier__main { display: grid; flex: 1; min-width: 0; }
.cp-tier__title { font-weight: 600; }
.cp-tier__price { display: grid; justify-items: end; text-align: right; }
.cp-tiers--buttons .cp-tier__price,
.cp-tiers--horizontal .cp-tier__price { justify-items: start; text-align: left; }

/* Visual tiers: a picture per unit, overlapping. */
.cp-tiers--visual .cp-tier { gap: 14px; padding: 12px 16px; }
.cp-tiers--visual .cp-tier input { position: absolute; opacity: 0; pointer-events: none; }
/* Wide enough for three pictures, so every tier's title starts in line. */
.cp-tier__stack { display: flex; align-items: center; flex-shrink: 0; min-width: 84px; }
.cp-tier__stack img { width: 40px; height: 40px; margin-left: -18px; border: 2px solid var(--cp-surface, #fff); border-radius: 8px; object-fit: cover; background: #f2f2f2; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12); }
.cp-tier__stack img:first-child { margin-left: 0; }
.cp-tier__more { margin-left: 4px; color: var(--cp-muted); font-size: 0.8em; font-weight: 600; }
.cp-tiers--visual .cp-tier-item:has(input:checked) .cp-tier { border-width: 2px; padding: 11px 15px; }

.cp-tier-item { position: relative; min-width: 0; }
.cp-tier-item:has(input:checked) .cp-tier { background: color-mix(in srgb, var(--cp-accent) 5%, transparent); }

.cp-tier__variants {
  display: grid;
  gap: 8px;
  padding: 10px 14px 12px;
  border: 1px solid var(--cp-accent);
  border-top: 0;
  border-radius: 0 0 calc(var(--cp-radius) - 2px) calc(var(--cp-radius) - 2px);
}

.cp-tier__variants[hidden] { display: none; }
.cp-tier-item:has(.cp-tier__variants:not([hidden])) .cp-tier { border-radius: calc(var(--cp-radius) - 2px) calc(var(--cp-radius) - 2px) 0 0; }
.cp-unit { display: grid; grid-template-columns: 56px minmax(0, 1fr); align-items: center; gap: 8px; }
.cp-unit__index { color: var(--cp-muted); font-size: 0.85em; }
.cp-unit .cp-select { width: 100%; }

/* A short tab sitting on the card's top edge. */
.cp-tag {
  position: absolute;
  top: -9px;
  right: 12px;
  z-index: 1;
  padding: 1px 8px;
  border-radius: 4px;
  background: var(--cp-tag);
  color: var(--cp-tag-text);
  font-size: 0.72em;
  font-weight: 600;
  line-height: 1.5;
  white-space: nowrap;
}

.cp-price { font-weight: 600; white-space: nowrap; }
.cp-price--large { font-size: 1.15em; }
.cp-offers s { color: var(--cp-muted); font-weight: 400; margin-left: 4px; }
.cp-save { color: var(--cp-saving); font-size: 0.85em; font-weight: 600; }
.cp-save--block { margin: 0; }

/* Products */
.cp-products { display: grid; gap: 10px; }
.cp-products--grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }

.cp-product {
  display: flex;
  gap: 12px;
  align-items: center;
  min-width: 0;
}

.cp-products--grid .cp-product { flex-direction: column; align-items: flex-start; }

.cp-product__image {
  width: 64px;
  height: 64px;
  flex-shrink: 0;
  border-radius: calc(var(--cp-radius) - 4px);
  object-fit: cover;
  background: rgba(0, 0, 0, 0.05);
}

.cp-product__body { display: grid; gap: 4px; flex: 1; min-width: 0; }

.cp-product__title {
  color: inherit;
  text-decoration: none;
  font-weight: 500;
  overflow-wrap: anywhere;
}

.cp-product__title:hover { text-decoration: underline; }

.cp-select {
  max-width: 100%;
  padding: 6px 8px;
  border: 1px solid var(--cp-border);
  border-radius: 6px;
  background: var(--cp-field-bg, #fff);
  color: var(--cp-field-text, inherit);
  font: inherit;
  font-size: 0.9em;
}

.cp-bundle { display: grid; }
.cp-bundle .cp-product {
  align-items: flex-start;
  padding: 12px;
  border: 1px solid var(--cp-border);
  border-radius: calc(var(--cp-radius) - 2px);
}
.cp-bundle .cp-product__image { width: 80px; height: 80px; }
.cp-bundle .cp-select { width: 100%; }

.cp-plus {
  position: relative;
  z-index: 1;
  justify-self: center;
  width: 26px;
  height: 26px;
  margin: -9px 0;
  border-radius: 50%;
  background:
    linear-gradient(var(--cp-button-text), var(--cp-button-text)) center / 12px 2px no-repeat,
    linear-gradient(var(--cp-button-text), var(--cp-button-text)) center / 2px 12px no-repeat,
    var(--cp-button);
}

/* Discount goals: each card fills as the shopper closes in on it. */
.cp-goals { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 8px; margin: 0; padding: 0; list-style: none; }
.cp-goal {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 1px;
  overflow: hidden;
  padding: 10px 8px 12px;
  border: 1px solid var(--cp-border);
  border-radius: calc(var(--cp-radius) - 2px);
  text-align: center;
}
.cp-goal__fill { position: absolute; left: 0; bottom: 0; width: 0; height: 3px; background: var(--cp-reached); transition: width 0.25s ease; }
.cp-goal__range { font-weight: 600; }
.cp-goal__off { color: var(--cp-muted); font-size: 0.85em; }
.cp-goal--reached { border-color: var(--cp-reached); background: color-mix(in srgb, var(--cp-reached) 9%, transparent); }
.cp-goal--reached .cp-goal__off,
.cp-goal--reached .cp-goal__range { color: var(--cp-reached); }

/* Picking products */
.cp-sections { display: grid; gap: 10px; }
.cp-section { position: relative; border: 1px solid var(--cp-border); border-radius: calc(var(--cp-radius) - 2px); min-width: 0; }
.cp-section--free { border-color: var(--cp-tag); }
.cp-section--done .cp-section__hint { color: var(--cp-reached); font-weight: 600; }
.cp-section__head {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 10px 12px;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.cp-section__head:focus-visible { outline: 2px solid var(--cp-accent); outline-offset: -2px; border-radius: inherit; }
.cp-section__text { display: grid; min-width: 0; }
.cp-section__title { font-weight: 600; }
.cp-section__hint { color: var(--cp-muted); font-size: 0.88em; }
.cp-chevron { flex-shrink: 0; width: 8px; height: 8px; margin: 0 3px 0 1px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(-45deg); transition: transform 0.15s ease; }
[aria-expanded='true'] > .cp-chevron { transform: rotate(45deg); }

.cp-picks { display: grid; }
.cp-picks[hidden] { display: none; }
.cp-picks--scroll { max-height: 420px; overflow-y: auto; border: 1px solid var(--cp-border); border-radius: calc(var(--cp-radius) - 2px); }
.cp-pick {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: start;
  gap: 8px 12px;
  padding: 12px;
  border-top: 1px solid var(--cp-border);
}
.cp-picks--scroll .cp-pick:first-child { border-top: 0; }
.cp-pick__body { display: grid; gap: 4px; min-width: 0; }
.cp-pick__title { font-weight: 500; overflow-wrap: anywhere; }
.cp-pick__price { color: var(--cp-muted); }
.cp-pick .cp-select { width: 100%; }
.cp-pick__lines { grid-column: 1 / -1; display: grid; gap: 6px; }
.cp-pick__lines:empty { display: none; }
.cp-free { color: var(--cp-reached); font-weight: 600; }

.cp-thumb { flex-shrink: 0; display: block; border-radius: 6px; object-fit: cover; background: rgba(0, 0, 0, 0.05); }
.cp-thumb--empty { width: 48px; height: 48px; }

.cp-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 6px 6px 6px 12px;
  border-radius: 6px;
  background: var(--cp-tint, rgba(0, 0, 0, 0.04));
}
.cp-line__title { min-width: 0; font-size: 0.92em; overflow-wrap: anywhere; }
.cp-stepper { display: inline-flex; align-items: center; flex-shrink: 0; border: 1px solid var(--cp-border); border-radius: 6px; background: var(--cp-field-bg, #fff); color: var(--cp-field-text, #111); }
.cp-stepper button { width: 32px; height: 32px; border: 0; background: none; color: inherit; font: inherit; font-size: 1.1em; line-height: 1; cursor: pointer; border-radius: 5px; }
.cp-stepper button:disabled { opacity: 0.35; cursor: not-allowed; }
.cp-stepper button:focus-visible { outline: 2px solid var(--cp-accent); outline-offset: -2px; }
.cp-stepper__n { min-width: 24px; text-align: center; font-variant-numeric: tabular-nums; }

/* Running total */
.cp-tally {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 46px;
  padding: 8px 12px;
  border-radius: calc(var(--cp-radius) - 2px);
  background: var(--cp-tint, rgba(0, 0, 0, 0.045));
}
.cp-tally__sum { min-width: 0; }
.cp-tally__note { color: var(--cp-muted); font-size: 0.88em; }
.cp-tally__thumbs { display: flex; align-items: center; flex-shrink: 0; }
.cp-tally__thumbs .cp-thumb { width: 28px; height: 28px; margin-left: -8px; border: 2px solid var(--cp-surface, #fff); border-radius: 50%; }
.cp-tally__more { margin-left: 6px; color: var(--cp-muted); font-size: 0.85em; }
.cp-guide { margin: 0; color: var(--cp-muted); font-size: 0.9em; }
.cp-guide:empty { display: none; }

.cp-summary {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--cp-border);
}

.cp-choice { display: flex; gap: 10px; align-items: center; cursor: pointer; min-width: 0; }
.cp-choice input { accent-color: var(--cp-accent); flex-shrink: 0; }
.cp-step { border: 0; padding: 0; margin: 0; display: grid; gap: 8px; min-width: 0; }
.cp-step__title { font-weight: 600; padding: 0; }

/* Headings with a small tag beside them */
.cp-offer__header--row { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 10px; }
.cp-pill { padding: 1px 9px; border-radius: 999px; background: var(--cp-tag); color: var(--cp-tag-text); font-size: 0.78em; font-weight: 600; line-height: 1.6; white-space: nowrap; }

/* Reached goal marker */
.cp-goal { overflow: visible; }
.cp-goal__fill { border-radius: 0 0 0 calc(var(--cp-radius) - 3px); }
.cp-goal__check { display: none; position: absolute; left: 50%; bottom: -9px; width: 18px; height: 18px; margin-left: -9px; border-radius: 50%; background: var(--cp-reached); z-index: 1; }
.cp-goal__check::after { content: ''; position: absolute; left: 6px; top: 3px; width: 5px; height: 9px; border: solid var(--cp-reached-text, #fff); border-width: 0 2px 2px 0; transform: rotate(45deg); }
.cp-goal--reached .cp-goal__check { display: block; }
.cp-goal--reached .cp-goal__fill { display: none; }
.cp-pick__meta { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 8px; }
.cp-pick__count { padding: 0 6px; border: 1px solid var(--cp-reached); border-radius: 4px; color: var(--cp-reached); font-size: 0.75em; }
.cp-pick__count[hidden] { display: none; }

/* Free gifts and rewards */
.cp-gifts { display: grid; gap: 12px; }
.cp-gift { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border: 1px solid var(--cp-border); border-radius: calc(var(--cp-radius) - 2px); min-width: 0; }
.cp-gift:has(.cp-gift__check:checked) { border-color: var(--cp-accent); }
.cp-gift__check { flex-shrink: 0; width: 20px; height: 20px; margin: 0; accent-color: var(--cp-accent); }
.cp-gift .cp-thumb { width: 72px; height: 72px; }
.cp-gift .cp-select { width: 100%; }

/* Add-on rows */
.cp-products--addon { gap: 12px; }
.cp-products--addon .cp-product { padding: 12px 14px; border: 1px solid var(--cp-border); border-radius: calc(var(--cp-radius) - 2px); }
.cp-add-icon {
  flex-shrink: 0;
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 8px;
  background:
    linear-gradient(var(--cp-button-text), var(--cp-button-text)) center / 14px 2px no-repeat,
    linear-gradient(var(--cp-button-text), var(--cp-button-text)) center / 2px 14px no-repeat,
    var(--cp-button);
  cursor: pointer;
}
.cp-add-icon:disabled { opacity: 0.55; }
.cp-add-icon:focus-visible { outline: 2px solid var(--cp-accent); outline-offset: 2px; }

/* Frequently bought together */
.cp-offer--together { padding: 0; border: 0; }
.cp-together { display: grid; gap: 20px; align-items: start; }
.cp-together__items { display: grid; gap: 16px; }
.cp-together__item { display: grid; gap: 6px; min-width: 0; align-content: start; }
.cp-together__media { position: relative; display: block; overflow: hidden; aspect-ratio: 4 / 3; border: 2px solid var(--cp-border); border-radius: 6px; background: rgba(0, 0, 0, 0.03); cursor: pointer; }
.cp-together__media img { display: block; width: 100%; height: 100%; object-fit: cover; }
.cp-together__media input { position: absolute; top: 8px; right: 8px; width: 20px; height: 20px; margin: 0; accent-color: var(--cp-accent, #111); }
.cp-together__plus { display: none; align-self: center; justify-self: center; width: 16px; height: 16px; margin-top: -40px; background: linear-gradient(currentColor, currentColor) center / 16px 1.5px no-repeat, linear-gradient(currentColor, currentColor) center / 1.5px 16px no-repeat; }
.cp-together__buy { display: grid; gap: 14px; justify-items: center; }
.cp-together__total { margin: 0; }
@media (min-width: 900px) {
  .cp-together { grid-template-columns: minmax(0, 1fr) 210px; }
  .cp-together__items { grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); grid-template-columns: none; gap: 8px; }
  .cp-together__items:has(.cp-together__plus) { grid-auto-columns: auto; }
  .cp-together__item { width: 100%; }
  .cp-together__plus { display: block; }
}

/* Full-page bundle builder */
.cp-offer--page { padding: 0; border: 0; }
.cp-builder { display: grid; gap: 24px; align-items: start; }
.cp-picks--grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 20px; }
.cp-picks--grid .cp-pick { grid-template-columns: minmax(0, 1fr); padding: 0; border: 0; align-content: start; }
.cp-picks--grid .cp-thumb { width: 100%; height: auto; aspect-ratio: 1; border: 1px solid var(--cp-border); border-radius: 8px; }
.cp-picks--grid .cp-button--small { width: 100%; border: 1px solid var(--cp-button); background: transparent; color: var(--cp-button); font-weight: 400; }
.cp-picks--grid .cp-button--small:hover:not(:disabled) { background: var(--cp-button); color: var(--cp-button-text); }
.cp-offer--page .cp-pick__lines { display: none; }
.cp-offer--page .cp-section { padding-bottom: 14px; }
.cp-offer--page .cp-section .cp-picks--grid { padding: 8px 12px 0; }
.cp-builder__side { display: grid; gap: 14px; padding: 20px; border: 1px solid var(--cp-border); border-radius: var(--cp-radius); background: var(--cp-bg); min-width: 0; }
.cp-added { display: grid; gap: 12px; min-height: 130px; align-content: start; }
.cp-added__head { display: flex; justify-content: space-between; margin: 0; }
.cp-added__head span:first-child { font-weight: 500; }
.cp-added__head span:last-child { color: var(--cp-muted); }
.cp-added__empty { display: flex; align-items: center; gap: 14px; margin: 0; font-size: 0.92em; }
.cp-added__plus { flex-shrink: 0; width: 40px; height: 40px; border: 1px dashed var(--cp-border); border-radius: 6px; background: linear-gradient(currentColor, currentColor) center / 16px 1.5px no-repeat, linear-gradient(currentColor, currentColor) center / 1.5px 16px no-repeat; }
.cp-added__line { display: flex; align-items: center; gap: 10px; }
.cp-added__line .cp-thumb { width: 36px; height: 36px; aspect-ratio: auto; }
.cp-added__line .cp-line__title { flex: 1; }
.cp-added__line small { display: block; color: var(--cp-muted); }
@media (min-width: 900px) {
  .cp-builder { grid-template-columns: minmax(0, 1fr) 390px; gap: 44px; }
  .cp-builder__side { position: sticky; top: 16px; }
}

/* Dialogs */
.cp-modal { width: min(560px, calc(100vw - 32px)); max-height: calc(100vh - 48px); padding: 0; border: 0; border-radius: var(--cp-radius); background: var(--cp-surface, #fff); color: var(--cp-surface-text, #111); box-shadow: 0 24px 60px rgba(0, 0, 0, 0.3); overflow: auto; margin: auto; }
.cp-modal--wide { width: min(1120px, calc(100vw - 32px)); }
.cp-modal::backdrop { background: rgba(0, 0, 0, 0.5); }
.cp-modal__head { position: sticky; top: 0; z-index: 3; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 20px; background: var(--cp-surface, #fff); border-bottom: 1px solid var(--cp-border); }
.cp-modal__close { position: relative; flex-shrink: 0; width: 32px; height: 32px; border: 0; background: none; cursor: pointer; }
.cp-modal__close::before, .cp-modal__close::after { content: ''; position: absolute; left: 7px; top: 15px; width: 18px; height: 1.5px; background: currentColor; transform: rotate(45deg); }
.cp-modal__close::after { transform: rotate(-45deg); }
.cp-modal__body { padding: 20px; border: 0; border-radius: 0; }
.cp-modal .cp-modal__body > .cp-offer__header { display: none; }

/* Fields and searching */
.cp-field { display: grid; gap: 4px; }
.cp-field__label { font-size: 0.85em; font-weight: 500; }
.cp-field__label small { color: var(--cp-muted); font-weight: 400; }
.cp-input { width: 100%; max-width: 100%; padding: 8px 10px; border: 1px solid var(--cp-border); border-radius: 6px; background: var(--cp-field-bg, #fff); color: var(--cp-field-text, #111); font: inherit; font-size: 0.92em; }
.cp-input:focus-visible, .cp-select:focus-visible { outline: 2px solid var(--cp-accent); outline-offset: 1px; }
.cp-pick[hidden] { display: none; }
.cp-pick__lines .cp-field, .cp-added .cp-field { padding: 0 6px; }

/* Tabs and steps */
.cp-nav { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; }
.cp-nav button { display: inline-flex; align-items: center; gap: 8px; flex-shrink: 0; padding: 8px 14px; border: 1px solid var(--cp-border); border-radius: 999px; background: none; color: inherit; font: inherit; font-size: 0.92em; cursor: pointer; }
.cp-nav button[aria-selected='true'] { border-color: var(--cp-button); background: var(--cp-button); color: var(--cp-button-text); }
.cp-nav__n { display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px; border-radius: 50%; background: var(--cp-tint, rgba(0, 0, 0, 0.08)); font-size: 0.8em; }
.cp-nav button[aria-selected='true'] .cp-nav__n { background: rgba(127, 127, 127, 0.3); }
.cp-nav .cp-nav--done .cp-nav__n { background: var(--cp-reached); color: var(--cp-reached-text, #fff); }
.cp-nav--tabs .cp-nav__n { display: none; }
.cp-sections--nav .cp-section__head { display: none; }
.cp-sections--nav .cp-section { border: 0; }
.cp-sections--nav .cp-picks:not(.cp-picks--grid) { border: 1px solid var(--cp-border); border-radius: calc(var(--cp-radius) - 2px); }
.cp-sections--nav .cp-pick:first-child { border-top: 0; }
.cp-section[hidden] { display: none; }
.cp-step-buttons { display: flex; gap: 8px; justify-content: flex-end; }
.cp-step-buttons .cp-button { width: auto; min-width: 110px; }
.cp-step-buttons [hidden], .cp-button[hidden] { display: none; }
.cp-button--ghost, .cp-button--outline { border: 1px solid var(--cp-button); background: transparent; color: var(--cp-button); }

/* Fixed bundle layouts */
.cp-bundle--minimal { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 8px; }
.cp-bundle--minimal .cp-product { flex: 1 1 110px; flex-direction: column; padding: 0; border: 0; gap: 6px; }
.cp-bundle--minimal .cp-product__image { width: 100%; height: auto; aspect-ratio: 1; }
.cp-bundle--minimal .cp-plus { width: 16px; height: 16px; margin: 36px 0 0; background: linear-gradient(currentColor, currentColor) center / 12px 1.5px no-repeat, linear-gradient(currentColor, currentColor) center / 1.5px 12px no-repeat; }
.cp-bundle--accordion { gap: 8px; }
.cp-fold { border: 1px solid var(--cp-border); border-radius: calc(var(--cp-radius) - 2px); }
.cp-fold summary { display: flex; align-items: center; gap: 12px; padding: 10px 12px; list-style: none; cursor: pointer; }
.cp-fold summary::-webkit-details-marker { display: none; }
.cp-fold .cp-thumb { width: 48px; height: 48px; }
.cp-fold__title { flex: 1; min-width: 0; font-weight: 500; overflow-wrap: anywhere; }
.cp-fold .cp-chevron { transform: rotate(-45deg); }
.cp-fold[open] .cp-chevron { transform: rotate(45deg); }
.cp-fold__body { display: grid; gap: 8px; padding: 0 12px 12px; }
.cp-fold__body .cp-select { width: 100%; }
.cp-fold__body .cp-note { color: var(--cp-muted); }

.cp-bundle--unified .cp-select { display: none; }
.cp-sections--nav .cp-tag { display: none; }

/* Purchase options */
.cp-purchase { display: grid; gap: 8px; margin: 0; padding: 12px 14px; border: 1px solid var(--cp-border); border-radius: calc(var(--cp-radius) - 2px); }
.cp-purchase__row { display: flex; align-items: center; gap: 8px; cursor: pointer; }
.cp-purchase__row input { margin: 0; accent-color: var(--cp-accent); }
.cp-purchase select[hidden] { display: none; }

/* Cart goals */
.cp-goal-bar { position: relative; height: 6px; margin: 8px 6px 6px; border-radius: 999px; background: var(--cp-track, rgba(0, 0, 0, 0.1)); }
.cp-goal-bar > span { display: block; height: 100%; border-radius: inherit; background: var(--cp-reached); transition: width 0.3s ease; }
.cp-goal-bar > i { position: absolute; top: 50%; width: 12px; height: 12px; margin: -6px 0 0 -6px; border: 2px solid var(--cp-surface, #fff); border-radius: 50%; background: #8a8a8a; }
.cp-goal-bar > i.is-done { background: var(--cp-reached); }

/* Celebration */
.cp-offer { position: relative; }
.cp-confetti { position: absolute; inset: 0; overflow: hidden; pointer-events: none; z-index: 4; }
.cp-confetti i { position: absolute; top: -10px; width: 7px; height: 11px; border-radius: 1px; animation: cp-fall 1.4s ease-in forwards; }
@keyframes cp-fall { to { transform: translateY(460px) rotate(540deg); opacity: 0; } }

/* Buttons */
.cp-button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-height: 44px;
  padding: 10px 18px;
  border: 0;
  border-radius: calc(var(--cp-radius) - 2px);
  background: var(--cp-button);
  color: var(--cp-button-text);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  width: 100%;
}

.cp-button--small { width: auto; min-height: 36px; padding: 6px 14px; flex-shrink: 0; }
.cp-button:disabled { opacity: 0.55; cursor: not-allowed; }
.cp-button:focus-visible { outline: 2px solid var(--cp-accent); outline-offset: 2px; }

.cp-banner { margin: 0; font-weight: 500; }

/* Gift progress */
.cp-progress { height: 6px; border-radius: 999px; background: var(--cp-track, rgba(0, 0, 0, 0.08)); overflow: hidden; }
.cp-progress span { display: block; height: 100%; background: var(--cp-accent); transition: width 0.3s ease; }
.cp-progress__text { margin: 0 0 8px; font-size: 0.95em; }

.cp-note { margin: 0; font-size: 0.9em; }
.cp-note--error { color: #b42318; }
.cp-placeholder { margin: 0; padding: 12px; border: 1px dashed var(--cp-border); border-radius: var(--cp-radius); color: var(--cp-muted); font-size: 0.9em; }

/* Floating cart goal */
.cp-goal-badge {
  --cp-badge-ring: #0b7a56;
  position: fixed;
  bottom: calc(16px + var(--cp-bottom-offset, 0px));
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: min(260px, calc(100vw - 32px));
  padding: 8px 14px 8px 8px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 999px;
  background: #fff;
  color: #111;
  font: inherit;
  font-size: 13px;
  line-height: 1.3;
  text-align: left;
  box-shadow: 0 10px 30px -8px rgba(0, 0, 0, 0.28);
  cursor: pointer;
  animation: cp-badge-in 0.35s ease-out;
}
.cp-goal-badge[hidden] { display: none; }
.cp-goal-badge--left { left: 16px; }
.cp-goal-badge--right { right: 16px; }
.cp-goal-badge:focus-visible { outline: 2px solid var(--cp-badge-ring); outline-offset: 3px; }
.cp-goal-badge__ring { position: relative; flex-shrink: 0; width: 44px; height: 44px; }
.cp-goal-badge__ring svg { display: block; width: 100%; height: 100%; transform: rotate(-90deg); }
.cp-goal-badge__ring circle { fill: none; stroke-width: 4; }
.cp-goal-badge__track { stroke: rgba(0, 0, 0, 0.08); }
.cp-goal-badge__fill { stroke: var(--cp-badge-ring); stroke-linecap: round; transition: stroke-dashoffset 0.5s ease; }
.cp-goal-badge__icon {
  position: absolute;
  inset: 12px;
  background: var(--cp-badge-ring);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='8' width='18' height='4' rx='1'/%3E%3Cpath d='M12 8v13M19 12v7a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2v-7M7.5 8a2.5 2.5 0 0 1 0-5C10 3 12 8 12 8s2-5 4.5-5a2.5 2.5 0 0 1 0 5'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='8' width='18' height='4' rx='1'/%3E%3Cpath d='M12 8v13M19 12v7a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2v-7M7.5 8a2.5 2.5 0 0 1 0-5C10 3 12 8 12 8s2-5 4.5-5a2.5 2.5 0 0 1 0 5'/%3E%3C/svg%3E") center / contain no-repeat;
}
.cp-goal-badge.is-done .cp-goal-badge__icon {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E");
}
.cp-goal-badge__text { display: grid; min-width: 0; }
.cp-goal-badge__text strong { font-weight: 700; white-space: nowrap; }
.cp-goal-badge__text span { overflow: hidden; color: rgba(0, 0, 0, 0.6); text-overflow: ellipsis; white-space: nowrap; }
@keyframes cp-badge-in { from { opacity: 0; transform: translateY(12px); } }
@media (max-width: 749px) {
  .cp-goal-badge { bottom: calc(12px + var(--cp-bottom-offset, 0px)); padding: 6px 12px 6px 6px; }
  .cp-goal-badge__ring { width: 38px; height: 38px; }
  .cp-goal-badge__icon { inset: 10px; }
}

.cp-offers--drawer { margin: 12px 0; }
.cp-offers--drawer .cp-offer { padding: 12px; }

.cp-visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

@media (prefers-reduced-motion: reduce) {
  .cp-skeleton { animation: none; }
  .cp-progress span,
  .cp-goal__fill,
  .cp-chevron,
  .cp-goal-bar > span { transition: none; }
  .cp-confetti { display: none; }
  .cp-goal-badge { animation: none; }
  .cp-goal-badge__fill { transition: none; }
}

/* Sold-out bundles, required builder items, free-shipping bundles */
.cp-tag--muted { background: #5c5f66; }
.cp-locked { display: inline-block; margin-left: 4px; padding: 0 6px; border-radius: 999px; background: rgba(0, 0, 0, 0.06); color: var(--cp-muted); font-size: 0.78em; font-weight: 600; }
.cp-save--shipping { color: var(--cp-reached); }
.cp-save--shipping::before { content: ''; display: inline-block; width: 1em; height: 1em; margin-right: 6px; vertical-align: -0.15em; background: currentColor; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M1 3h15v13H1zm15 5h4l3 3v5h-7M5.5 21a2.5 2.5 0 1 0 0-5 2.5 2.5 0 0 0 0 5zm13 0a2.5 2.5 0 1 0 0-5 2.5 2.5 0 0 0 0 5z'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M1 3h15v13H1zm15 5h4l3 3v5h-7M5.5 21a2.5 2.5 0 1 0 0-5 2.5 2.5 0 0 0 0 5zm13 0a2.5 2.5 0 1 0 0-5 2.5 2.5 0 0 0 0 5z'/%3E%3C/svg%3E") center / contain no-repeat; }

/* Complete the bundle (cart page pop-up) */
.cp-complete { display: flex; align-items: stretch; padding-top: 10px; }
.cp-complete > .cp-plus { flex: 0 0 auto; align-self: center; margin: 0 -9px; }
.cp-complete__item { position: relative; display: flex; flex: 1 1 0; min-width: 0; padding: 12px; border: 1px solid var(--cp-border); border-radius: calc(var(--cp-radius) - 2px); }
.cp-complete__item .cp-product { width: 100%; flex-direction: column; align-items: flex-start; }
.cp-complete__item .cp-product__image { width: 100%; height: auto; aspect-ratio: 1; }
.cp-complete__item.is-owned { background: rgba(0, 0, 0, 0.03); }
.cp-complete__item.is-owned .cp-product__image { opacity: 0.55; }
.cp-complete__owned { position: absolute; top: -10px; left: 12px; z-index: 2; padding: 2px 9px; border-radius: 999px; background: var(--cp-reached); color: #fff; font-size: 0.72em; font-weight: 600; line-height: 1.5; white-space: nowrap; }
.cp-complete__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; }
.cp-complete__actions .cp-button { flex: 1 1 220px; }
.cp-complete__actions .cp-complete__dismiss { flex: 0 0 auto; padding: 8px 4px; border: 0; background: none; color: var(--cp-muted); font: inherit; font-size: 0.9em; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.cp-complete__actions .cp-complete__dismiss:hover { color: inherit; }
@media (max-width: 600px) {
  .cp-complete { flex-direction: column; }
  .cp-complete > .cp-plus { margin: -9px 0; }
  .cp-complete__item .cp-product { flex-direction: row; }
  .cp-complete__item .cp-product__image { width: 72px; }
  .cp-complete__actions .cp-complete__dismiss { flex: 1 1 100%; }
}

/* The store's bundles page and single bundle pages (app proxy) */
.cp-bundles-page { max-width: 1200px; margin: 0 auto; padding: 48px 20px 72px; }
.cp-bundles-page--single { max-width: 620px; }
.cp-bundles-page__head { margin: 0 0 32px; text-align: center; }
.cp-bundles-page__title { margin: 0 0 8px; }
.cp-bundles-page__intro { margin: 0; opacity: 0.72; }
.cp-bundles-page__list { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 360px), 1fr)); align-items: start; gap: 28px; }
.cp-bundles-page__list > .cp-offers { margin: 0; }
.cp-bundles-page__list > .cp-offers:empty { display: none; }
.cp-bundles-page__empty { padding: 40px 0; text-align: center; opacity: 0.72; }
@media (max-width: 749px) { .cp-bundles-page { padding: 32px 16px 56px; } }

/* Countdown timers (bars, product page, cart and theme blocks) */
.cp-timer { position: relative; box-sizing: border-box; width: 100%; padding: var(--cpt-pad, 12px) calc(var(--cpt-pad, 12px) + 8px); border: var(--cpt-border, 0); border-radius: var(--cpt-radius, 0); background: var(--cpt-bg, #111318); line-height: 1.25; text-align: center; }
.cp-timer *, .cp-timer *::before, .cp-timer *::after { box-sizing: border-box; }
.cp-timer--font-sans { font-family: system-ui, -apple-system, "Segoe UI", sans-serif; }
.cp-timer--font-serif { font-family: Georgia, "Times New Roman", serif; }
.cp-timer--font-mono { font-family: ui-monospace, "SF Mono", Menlo, monospace; }
.cp-timer__link { display: block; color: inherit; text-decoration: none; }
.cp-timer__inner { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px 20px; }
.cp-timer--inline .cp-timer__inner { flex-direction: row; flex-wrap: wrap; }
.cp-timer--balanced .cp-timer__inner { flex-direction: row; flex-wrap: wrap; justify-content: space-between; text-align: left; }
.cp-timer--balanced .cp-timer__text { flex: 1 1 200px; }
.cp-timer__title { margin: 0; color: var(--cpt-title, #fff); font-size: var(--cpt-title-size, 16px); font-weight: 700; letter-spacing: -0.005em; }
.cp-timer__sub { margin: 3px 0 0; color: var(--cpt-sub, #c9ccd3); font-size: calc(var(--cpt-title-size, 16px) * 0.82); }
.cp-timer__clock { display: flex; align-items: flex-start; justify-content: center; gap: 6px; }
.cp-timer__unit { position: relative; display: flex; flex-direction: column; align-items: center; min-width: calc(var(--cpt-num-size, 22px) * 1.75); }
.cp-timer__num { color: var(--cpt-num, #fff); font-size: var(--cpt-num-size, 22px); font-weight: 700; line-height: 1.1; font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
.cp-timer__label { margin-top: 3px; color: var(--cpt-legend, #a3a8b3); font-size: max(10px, calc(var(--cpt-num-size, 22px) * 0.42)); font-weight: 500; text-transform: none; }
.cp-timer--boxes .cp-timer__num { min-width: 100%; padding: 0.22em 0.32em; border-radius: calc(var(--cpt-radius, 0px) * 0.5 + 4px); background: var(--cpt-digit-bg, #2a2e37); text-align: center; }
.cp-timer--colons .cp-timer__clock { gap: 14px; }
.cp-timer--colons .cp-timer__unit:not(:last-child)::after { content: ':'; position: absolute; top: 0; right: -10px; color: var(--cpt-num, #fff); font-size: var(--cpt-num-size, 22px); font-weight: 700; line-height: 1.1; opacity: 0.6; }
.cp-timer__ended { margin: 0; color: var(--cpt-num, #fff); font-size: calc(var(--cpt-title-size, 16px) * 1.05); font-weight: 600; }
.cp-timer__button { display: inline-flex; align-items: center; justify-content: center; min-height: 38px; padding: 0 18px; border-radius: 999px; background: var(--cpt-btn, #fff); color: var(--cpt-btn-text, #111318); font-size: 14px; font-weight: 700; text-decoration: none; white-space: nowrap; transition: filter 0.15s; }
.cp-timer__button:hover, .cp-timer__link:hover .cp-timer__title { filter: brightness(1.08); }
.cp-timer__button:focus-visible, .cp-timer__link:focus-visible, .cp-timer__close:focus-visible { outline: 2px solid currentColor; outline-offset: 2px; }
.cp-timer__close { position: absolute; top: 50%; right: 10px; width: 30px; height: 30px; margin-top: -15px; padding: 0; border: 0; border-radius: 50%; background: transparent; color: var(--cpt-title, #fff); cursor: pointer; opacity: 0.75; }
.cp-timer__close::before, .cp-timer__close::after { content: ''; position: absolute; top: 50%; left: 50%; width: 14px; height: 1.6px; background: currentColor; }
.cp-timer__close::before { transform: translate(-50%, -50%) rotate(45deg); }
.cp-timer__close::after { transform: translate(-50%, -50%) rotate(-45deg); }
.cp-timer__close:hover { opacity: 1; background: rgba(127, 127, 127, 0.18); }
.cp-timer--bar { padding-right: 48px; padding-left: 48px; }
.cp-timer-bar { position: relative; z-index: 40; width: 100%; }
.cp-timer-bar--sticky { position: sticky; top: 0; }
.cp-timer-bar--bottom { position: fixed; right: 0; bottom: 0; left: 0; box-shadow: 0 -6px 20px -8px rgba(0, 0, 0, 0.25); }
.cp-timer-host { margin: 14px 0; }
.cp-timer-host .cp-timer, .cp-timer-slot .cp-timer { border-radius: var(--cpt-radius, 10px); }
.cp-timer-slot { margin: var(--cp-slot-space, 12px) 0; }
.cp-timer-slot--left .cp-timer__inner { align-items: flex-start; justify-content: flex-start; }
.cp-timer-slot--right .cp-timer__inner { align-items: flex-end; justify-content: flex-end; }
@media (max-width: 600px) {
  .cp-timer { padding-left: 14px; padding-right: 14px; }
  .cp-timer--bar { padding-right: 40px; padding-left: 14px; }
  .cp-timer__inner, .cp-timer--balanced .cp-timer__inner { flex-direction: column; justify-content: center; text-align: center; }
  /* Stacked, the text's 200px basis would become its height. */
  .cp-timer--balanced .cp-timer__text { flex: 0 1 auto; }
  .cp-timer--bar .cp-timer__inner { flex-direction: row; flex-wrap: wrap; gap: 6px 12px; }
  .cp-timer__unit { min-width: calc(var(--cpt-num-size, 22px) * 1.55); }
  .cp-timer--bar .cp-timer__num { font-size: min(var(--cpt-num-size, 22px), 20px); }
  .cp-timer--bar .cp-timer__title { font-size: min(var(--cpt-title-size, 16px), 15px); }
  .cp-timer--bar .cp-timer__sub, .cp-timer--bar .cp-timer__label { display: none; }
  .cp-timer--bar .cp-timer__button { min-height: 32px; padding: 0 12px; font-size: 13px; }
  .cp-timer__close { right: 4px; }
}
