/* Final shared product-card contract from the approved Macaroma HTML. */
.mac-bestsellers {
  --mb-brand-pink: #b2477d;
  --mb-regular-price: #241a22;
  --mb-sale-badge: #7f4aa8;
  --mb-stock-badge: #66544f;
  --mb-new-badge: #b2477d;
  --mb-sale-price: #7f4aa8;
  --mb-old-price: #8a8a8a;
}

/* The "Извести ме" dialog itself is styled in restock-modal.css. */

body .mac-bestsellers .mac-bestsellers__card {
  position: relative;
  border-radius: 22px;
  font-family: "Montserrat", Arial, sans-serif;
}

body .mac-bestsellers .mac-bestsellers__photo {
  border-radius: 22px 22px 0 0;
}

body .mac-bestsellers .mac-bestsellers__badges {
  position: absolute;
  top: 18px;
  left: 18px;
  z-index: 2;
  display: flex;
  max-width: calc(100% - 36px);
  flex-direction: column;
  align-items: flex-start;
  gap: 7px;
}

body .mac-bestsellers .mac-bestsellers__badge {
  display: inline-flex;
  width: auto;
  max-width: 100%;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0 16px;
  border-radius: 999px;
  background: var(--mb-sale-badge);
  color: #ffffff;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.01em;
}

/* Approved catalog/home CSS makes every badge absolute; stack the left group in flow. */
body .mac-bestsellers .mac-bestsellers__badges > .mac-bestsellers__badge {
  position: static;
  inset: auto;
  flex: 0 0 auto;
}

body .mac-bestsellers .mac-bestsellers__badge--new,
body .mac-bestsellers .mac-bestsellers__badge--soft {
  background: var(--mb-new-badge);
  color: #ffffff;
}

body .mac-bestsellers .mac-bestsellers__badge--stock {
  position: absolute;
  top: 18px;
  right: 18px;
  left: auto;
  z-index: 2;
  background: var(--mb-stock-badge);
  color: #ffffff;
  font-size: 11px;
  padding: 0 12px;
}

/* Keep single-product stock status and restock action in the same card language. */
body .mac-product-section.mac-product-page-trial .mac-product-purchase .stock.out-of-stock {
  display: inline-flex;
  width: max-content;
  max-width: 100%;
  min-height: 34px;
  align-items: center;
  justify-content: center;
  margin: 10px 0;
  padding: 0 12px;
  border: 0;
  border-radius: 999px;
  background: #eee5f3;
  color: #5d4168;
  box-shadow: inset 0 0 0 1px rgba(127, 74, 168, .14);
  font: 700 11px/1.1 "Montserrat", Arial, sans-serif;
  letter-spacing: 0;
  text-transform: none;
}

/* Reuse the catalog badge palette on the main single-product gallery. */
@media (max-width: 900px) {
  body .mac-product-section .mac-product-gallery { position: relative; }
}
body .mac-product-section .mac-product-status-badges {
  position: absolute;
  z-index: 5;
  top: 16px;
  right: 16px;
  left: 16px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  pointer-events: none;
}
body .mac-product-section .mac-product-status-badges__left {
  display: flex;
  min-width: 0;
  max-width: calc(100% - 104px);
  flex-direction: column;
  align-items: flex-start;
  gap: 7px;
}
body .mac-product-section .mac-product-status-badge {
  display: inline-flex;
  width: max-content;
  max-width: 100%;
  min-height: 34px;
  align-items: center;
  justify-content: center;
  padding: 0 14px;
  border-radius: 999px;
  color: #fff;
  font: 700 12px/1 "Montserrat", Arial, sans-serif;
  white-space: nowrap;
}
body .mac-product-section .mac-product-status-badge--sale { background: var(--mb-sale-badge, #7f4aa8); }
body .mac-product-section .mac-product-status-badge--new { background: var(--mb-new-badge, #b2477d); }
body .mac-product-section .mac-product-status-badge--stock {
  flex: 0 0 auto;
  background: var(--mb-stock-badge, #66544f);
}
@media (max-width: 560px) {
  body .mac-product-section .mac-product-status-badges { top: 10px; right: 10px; left: 10px; gap: 6px; }
  body .mac-product-section .mac-product-status-badges__left { max-width: calc(100% - 88px); gap: 6px; }
  body .mac-product-section .mac-product-status-badge { min-height: 30px; padding: 0 10px; font-size: 11px; }
}

/* Keep sale colors consistent for regular and selected variation prices. */
body .mac-product-section.mac-product-page-trial .mac-product-price--trial .price del,
body .mac-product-section.mac-product-page-trial .woocommerce-variation-price del,
body .mac-product-section.mac-product-page-trial .mac-product-price--trial .price del .woocommerce-Price-amount,
body .mac-product-section.mac-product-page-trial .woocommerce-variation-price del .woocommerce-Price-amount {
  color: #8a8a8a !important;
}
body .mac-product-section.mac-product-page-trial .mac-product-price--trial .price ins,
body .mac-product-section.mac-product-page-trial .woocommerce-variation-price ins,
body .mac-product-section.mac-product-page-trial .mac-product-price--trial .price ins .woocommerce-Price-amount,
body .mac-product-section.mac-product-page-trial .woocommerce-variation-price ins .woocommerce-Price-amount {
  color: #7f4aa8 !important;
  text-decoration: none;
}

/* On out-of-stock pages, the restock action takes the primary add-to-cart slot. */
/* WooCommerce keeps the disabled add/gift block beside the restock action for
   an unavailable variation. Remove it from layout until a stocked option is selected. */
body.single-product .mac-product-section.mac-product-page-trial .mac-product-purchase form.variations_form .single_variation_wrap:has(.woocommerce-variation-availability .stock.out-of-stock) .woocommerce-variation-add-to-cart {
  display: none !important;
}
body .mac-product-section.mac-product-page-trial .mac-product-purchase .cwg_popup_submit {
  position: relative;
  inset: auto;
  display: inline-flex;
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  min-height: 62px;
  align-items: center;
  justify-content: center;
  margin: 10px 0;
  padding: 14px 28px;
  border: 1px solid #eda5c8;
  border-radius: 999px;
  background: #eda5c8;
  box-shadow: none;
  color: #080808;
  font: 900 15px/1.1 "Montserrat", Arial, sans-serif;
  text-align: center;
  white-space: nowrap;
  cursor: pointer;
  overflow: hidden;
  isolation: isolate;
  transition: color .32s ease, border-color .32s ease, box-shadow .32s ease;
}

body .mac-product-section.mac-product-page-trial .mac-product-purchase .cwg_popup_submit::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 1px;
  border-radius: inherit;
  background: #fff;
  transform: translate3d(0, 105%, 0);
  pointer-events: none;
  transition: transform .56s cubic-bezier(.3, 1, .3, 1);
}

body .mac-product-section.mac-product-page-trial .mac-product-purchase .cwg_popup_submit:hover,
body .mac-product-section.mac-product-page-trial .mac-product-purchase .cwg_popup_submit:focus-visible {
  border-color: #eda5c8;
  background: #eda5c8;
  color: #080808;
}

body .mac-product-section.mac-product-page-trial .mac-product-purchase .cwg_popup_submit:hover::before,
body .mac-product-section.mac-product-page-trial .mac-product-purchase .cwg_popup_submit:focus-visible::before {
  transform: translate3d(0, 0, 0);
}

body .mac-bestsellers .mac-bestsellers__info {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: 26.4px minmax(75.6px, 1fr) auto;
  justify-content: stretch;
  align-content: stretch;
  min-height: 0;
  padding: 20px 22px 24px;
  gap: 8px;
}

/* Do not reserve a blank brand line; stretched cards still keep their actions aligned. */
body .mac-bestsellers .mac-bestsellers__card--no-brand .mac-bestsellers__info {
  grid-template-rows: minmax(75.6px, 1fr) auto;
}

body .mac-bestsellers .mac-bestsellers__brand {
  display: -webkit-box;
  min-height: 26.4px;
  max-height: 26.4px;
  overflow: hidden;
  margin: 0;
  color: var(--mb-brand-pink);
  font-family: "Montserrat", Arial, sans-serif;
  font-size: 11px;
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  overflow-wrap: anywhere;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

body .mac-bestsellers .mac-bestsellers__row {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
  align-items: center;
  gap: 10px;
}

body .mac-bestsellers .mac-bestsellers__name {
  display: -webkit-box;
  width: 100%;
  flex: 0 0 100%;
  height: 75.6px;
  max-height: 75.6px;
  overflow: hidden;
  min-width: 0;
  margin: 0;
  align-self: center;
  color: #000000;
  font-family: "Montserrat", Arial, sans-serif;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.26;
  letter-spacing: -0.02em;
  text-transform: none;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;
}

body .mac-bestsellers .mac-bestsellers__name a {
  color: inherit;
  text-decoration: none;
}

/* Center short catalog names in the reserved title slot; long names keep their clamp. */
body .mac-catalog__grid .mac-bestsellers__name {
  display: flex;
  align-items: center;
}

body .mac-catalog__grid .mac-bestsellers__name a {
  display: -webkit-box;
  width: 100%;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;
}

body .mac-bestsellers .mac-bestsellers__pricebox {
  width: 100%;
  min-width: 0;
  padding-inline-end: 4px;
  margin: 0;
  color: var(--mb-regular-price);
  font-family: "Montserrat", Arial, sans-serif;
  text-align: right;
  white-space: normal;
}

/* The card action is a permanent 60% column beside the 40% price column. */
body .mac-bestsellers .mac-bestsellers__row > .mac-bestsellers__add {
  position: relative;
  inset: auto;
  display: flex;
  width: 100%;
  min-width: 0;
  min-height: 42px;
  padding: 0 10px;
  transform: none;
  opacity: 1;
  pointer-events: auto;
  justify-content: center;
  border-radius: 999px;
  font-size: 11px;
  text-align: center;
  white-space: normal;
}

body .mac-bestsellers .mac-bestsellers__row > .mac-bestsellers__restock-action {
  display: block;
  width: 100%;
  min-width: 0;
}

body .mac-bestsellers .mac-bestsellers__row .mac-bestsellers__restock-action .cwg_popup_submit {
  position: relative;
  inset: auto;
  display: flex;
  width: 100%;
  min-width: 0;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  padding: 0 10px;
  border: 1px solid #eda5c8;
  border-radius: 999px;
  background: #eda5c8;
  box-shadow: none;
  color: #000;
  font-family: "Montserrat", Arial, sans-serif;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.1;
  text-align: center;
  white-space: normal;
  cursor: pointer;
}

/* Same hover as "ДОБАВИ": a white layer rises from below, the label stays black. */
body .mac-bestsellers .mac-bestsellers__row .mac-bestsellers__restock-action .cwg_popup_submit {
  overflow: hidden;
  isolation: isolate;
  transition: color .32s ease, border-color .32s ease;
}
body .mac-bestsellers .mac-bestsellers__row .mac-bestsellers__restock-action .cwg_popup_submit::before {
  content: "";
  position: absolute;
  inset: 1px;
  z-index: -1;
  border-radius: inherit;
  background: #fff;
  pointer-events: none;
  transform: translate3d(0, 105%, 0);
  transition: transform .56s cubic-bezier(.3, 1, .3, 1);
}
body .mac-bestsellers .mac-bestsellers__row .mac-bestsellers__restock-action .cwg_popup_submit:hover,
body .mac-bestsellers .mac-bestsellers__row .mac-bestsellers__restock-action .cwg_popup_submit:focus-visible {
  border-color: #eda5c8;
  outline: none;
  background: #eda5c8;
  color: #000;
}
body .mac-bestsellers .mac-bestsellers__row .mac-bestsellers__restock-action .cwg_popup_submit:hover::before,
body .mac-bestsellers .mac-bestsellers__row .mac-bestsellers__restock-action .cwg_popup_submit:focus-visible::before {
  transform: translate3d(0, 0, 0);
}

body .mac-bestsellers .mac-bestsellers__row > .mac-bestsellers__add:hover,
body .mac-bestsellers .mac-bestsellers__row > .mac-bestsellers__add:focus-visible {
  transform: none;
  opacity: 1;
}

body .mac-bestsellers .mac-bestsellers__price {
  display: block;
  white-space: normal;
  overflow-wrap: anywhere;
  color: var(--mb-regular-price);
  font-size: 16px;
  font-weight: 600;
  line-height: 1.25;
}

body .mac-bestsellers .mac-bestsellers__card--sale .mac-bestsellers__price {
  color: var(--mb-sale-price);
  font-size: 18px;
  font-weight: 700;
}

body .mac-bestsellers .mac-bestsellers__compare {
  display: block;
  margin-top: 3px;
  color: var(--mb-old-price);
  font-size: 12px;
  font-weight: 400;
  line-height: 1.25;
  text-decoration-line: line-through;
  text-decoration-color: currentColor;
  text-decoration-thickness: 1px;
}

body .mac-bestsellers .mac-bestsellers__compare[hidden] {
  display: none;
}

@media (max-width: 560px) {
  body .mac-bestsellers .mac-bestsellers__info {
    min-height: 0;
    padding: 18px 16px 20px;
  }

  body .mac-bestsellers .mac-bestsellers__badges {
    top: 14px;
    left: 14px;
    max-width: calc(100% - 28px);
    gap: 6px;
  }

  body .mac-bestsellers .mac-bestsellers__badge {
    min-height: 30px;
    padding: 0 11px;
    font-size: 11px;
  }

  body .mac-bestsellers .mac-bestsellers__badge--stock {
    top: 14px;
    right: 14px;
    left: auto;
    padding: 0 9px;
    font-size: 10px;
  }

  body .mac-bestsellers .mac-bestsellers__row { grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 7px; }
  body .mac-bestsellers .mac-bestsellers__row > .mac-bestsellers__add { min-height: 38px; padding: 0 7px; font-size: 10px; }
  body .mac-bestsellers .mac-bestsellers__row .mac-bestsellers__restock-action .cwg_popup_submit { min-height: 38px; padding: 0 7px; font-size: 10px; }
}

/* Let a narrow two-column card stack the price instead of forcing it to the edge. */
.mac-catalog__grid .mac-bestsellers__info { container-type: inline-size; }
@container (max-width: 190px) {
  .mac-catalog__grid .mac-bestsellers__row { grid-template-columns: minmax(0, 1fr); gap: 6px; }
  .mac-catalog__grid .mac-bestsellers__row > .mac-bestsellers__add {
    min-width: 0;
    width: min(100%, 144px);
    justify-self: start;
    padding-inline: 10px;
  }
  .mac-catalog__grid .mac-bestsellers__pricebox {
    min-width: 0;
    padding-inline-end: 4px;
    text-align: left;
    white-space: normal;
  }
  .mac-catalog__grid .mac-bestsellers__price {
    white-space: normal;
    overflow-wrap: anywhere;
    font-size: clamp(10px, 3.2vw, 12px);
  }
}

@media (max-width: 560px) {
  .mac-catalog__grid .mac-bestsellers__row > .mac-bestsellers__add { min-width: 0; }
  .mac-catalog__grid .mac-bestsellers__pricebox { padding-inline-end: 4px; }
}

/* Bundle modal cards: an empty sale badge must not render as a pink circle. */
body .bundle-builder--modal .mac-bestsellers__badge[hidden] {
  display: none !important;
}

/* Keep catalog cards aligned when names or prices wrap to different lengths. */
body .bundle-builder--modal .bundle-product-grid {
  grid-auto-rows: max-content;
  align-items: stretch;
  align-content: start;
}

body .bundle-builder--modal .bundle-product-grid > .mac-bestsellers__card {
  height: auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

body .bundle-builder--modal .bundle-product-grid .mac-bestsellers__photo {
  flex: 0 0 auto;
  aspect-ratio: 1 / 1.02;
}

body .bundle-builder--modal .bundle-product-grid .mac-bestsellers__info {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  gap: 8px;
}

/* Keep modal pagination compact, single-line and limited to nearby pages. */
body .bundle-builder--modal .bundle-category-filters {
  min-width: 0;
  max-width: 100%;
  padding-right: 52px;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
}

body .bundle-builder--modal .bundle-pagination {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: center;
  flex-wrap: nowrap;
  gap: 6px;
  white-space: nowrap;
}

/* Popup pagination: same look as the catalog (see approved-bundle-reference.css, "Pagination in Създай пакет"). */
body .bundle-builder--modal .bundle-page-button {
  flex: 0 0 auto;
  width: auto;
  min-width: 36px;
  height: 36px;
  padding: 0 6px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #241A22;
  font: 500 14px/1 Montserrat, Arial, sans-serif;
}

body .bundle-builder--modal .bundle-page-button[aria-current="page"] {
  background: #EDA5C8;
  color: #000;
  font-weight: 700;
}

body .bundle-builder--modal .bundle-page-button--arrow {
  width: 44px;
  min-width: 44px;
  height: 44px;
  padding: 0;
  border: 1.5px solid #e5dedf;
  background: #fff;
}

body .bundle-builder--modal .bundle-page-number { position: relative; z-index: 2; display: block; line-height: 1; }
body .bundle-builder--modal .bundle-pagination__ellipsis {
  flex: 0 0 24px;
  color: #241A22;
  font: 700 14px/1 Montserrat, Arial, sans-serif;
  text-align: center;
}

/* Product cards follow the approved bundle page: media, details and CTA. */
body .bundle-builder--modal .bundle-modal-product-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: visible;
  border: 1px solid #e4dfe4;
  border-radius: 18px;
  background: #f7f7f7;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .025);
  transition: transform .22s ease, box-shadow .22s ease;
}

body .bundle-builder--modal .bundle-modal-product-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 24px rgba(0, 0, 0, .08);
}

/* Desktop stays visually flattened like review.199; mobile enables the in-card overlay. */
body .bundle-builder--modal .bundle-modal-product-card__visual,
body .bundle-builder--modal .bundle-modal-product-card__content,
body .bundle-builder--modal .bundle-modal-product-card__options-panel,
body .bundle-builder--modal .bundle-modal-product-card__options-scroll {
  display: contents;
}

body .bundle-builder--modal .bundle-modal-product-card__options-header,
body .bundle-builder--modal .bundle-modal-product-card__options-name,
body .bundle-builder--modal .bundle-modal-product-card__options-footer,
body .bundle-builder--modal .bundle-modal-product-card__options {
  display: none;
}

body .bundle-builder--modal .bundle-modal-product-card__options-back { display: none; }

/* Desktop uses the same in-card variation panel without changing card geometry. */
@media (min-width: 761px) {
  body .bundle-builder--modal .bundle-modal-product-card__options-panel,
  body .bundle-builder--page .bundle-page-product-card__options-panel {
    position: absolute;
    inset: 0;
    z-index: 5;
    display: flex;
    flex-direction: column;
    min-width: 0;
    min-height: 0;
    padding: 18px;
    overflow: hidden;
    border-radius: inherit;
    background: #f7f7f7;
    color: #000;
    opacity: 0;
    transform: translateX(100%);
    transition: transform 280ms cubic-bezier(.22,.75,.25,1), opacity 180ms ease;
    pointer-events: none;
  }

  body .bundle-builder--modal .bundle-modal-product-card.is-options-open .bundle-modal-product-card__options-panel,
  body .bundle-builder--page .bundle-page-product-card.is-options-open .bundle-page-product-card__options-panel {
    opacity: 1;
    transform: translateX(0);
    pointer-events: auto;
  }

  body .bundle-builder--modal .bundle-modal-product-card__options-header,
  body .bundle-builder--page .bundle-page-product-card__options-header {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 10px;
    min-width: 0;
  }

  body .bundle-builder--modal .bundle-modal-product-card__options-header h3,
  body .bundle-builder--page .bundle-page-product-card__options-header h3 {
    min-width: 0;
    margin: 0;
    font: 800 16px/1.2 Montserrat, Arial, sans-serif;
  }

  body .bundle-builder--modal .bundle-modal-product-card__options-back,
  body .bundle-builder--page .bundle-page-product-card__options-back {
    display: grid;
    flex: 0 0 34px;
    width: 34px;
    height: 34px;
    padding: 0;
    place-items: center;
    border: 1px solid #eda5c8;
    border-radius: 50%;
    background: #eda5c8;
    color: #000;
    font: 700 22px/1 Montserrat, Arial, sans-serif;
    cursor: pointer;
  }

  body .bundle-builder--modal .bundle-modal-product-card__options-name,
  body .bundle-builder--page .bundle-page-product-card__options-name {
    display: block;
    flex: 0 0 auto;
    min-width: 0;
    margin: 10px 0 0;
    color: #555;
    font: 600 12px/1.35 Montserrat, Arial, sans-serif;
    overflow-wrap: anywhere;
  }

  body .bundle-builder--modal .bundle-modal-product-card__options-scroll,
  body .bundle-builder--page .bundle-page-product-card__options-scroll {
    display: block;
    flex: 1 1 auto;
    min-width: 0;
    min-height: 0;
    margin-top: 12px;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
  }

  body .bundle-builder--modal .bundle-modal-product-card__options-footer,
  body .bundle-builder--page .bundle-page-product-card__options-footer {
    display: flex;
    flex: 0 0 auto;
    flex-direction: column;
    gap: 10px;
    min-width: 0;
    padding-top: 12px;
    border-top: 1px solid #e4dfe4;
  }

  body .bundle-builder--modal .bundle-modal-product-card__options-footer .bundle-modal-product-card__add,
  body .bundle-builder--page .bundle-page-product-card__options-footer .bundle-modal-product-card__add { display: flex; }

  body .bundle-builder--modal .bundle-modal-product-card__options,
  body .bundle-builder--page .bundle-page-product-card__options { display: flex; }

  body .bundle-builder--modal .bundle-modal-product-card__desktop-add[hidden],
  body .bundle-builder--modal .bundle-modal-product-card__mobile-add[hidden],
  body .bundle-builder--modal .bundle-modal-product-card__options[hidden],
  body .bundle-builder--page .bundle-page-product-card__options[hidden],
  body .bundle-builder--modal .bundle-modal-product-card__options-footer [hidden],
  body .bundle-builder--page .bundle-page-product-card__options-footer [hidden] { display: none; }

  body .bundle-builder--page .bundle-page-product-card {
    position: relative;
    overflow: hidden;
  }

  body .bundle-builder--page .bundle-page-product-card__options-panel {
    padding: 20px;
  }
}

body .bundle-builder--modal .bundle-modal-product-card .mac-bestsellers__badge {
  top: 14px;
  left: 14px;
  min-height: 28px;
  padding: 0 12px;
  font-size: 11px;
}

body .bundle-builder--modal .bundle-modal-product-card .mac-bestsellers__photo {
  aspect-ratio: 1 / 1;
  margin: 8px 8px 0;
  overflow: hidden;
  border-radius: 13px;
  background: #fff;
}

body .bundle-builder--modal .bundle-modal-product-card .mac-bestsellers__photo::after { display: none; }
body .bundle-builder--modal .bundle-modal-product-card .mac-bestsellers__photo a { position: absolute; inset: 0; display: block; }

body .bundle-builder--modal .bundle-modal-product-card .mac-bestsellers__photo img {
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
}

body .bundle-builder--modal .bundle-modal-product-card .mac-bestsellers__image--primary { transform: scale(1); }
body .bundle-builder--modal .bundle-modal-product-card .mac-bestsellers__image--secondary { transform: scale(1.02); }

body .bundle-builder--modal .bundle-modal-product-card__info {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 0;
  padding: 15px 15px 16px;
  gap: 8px;
}

/* Keep generic catalog flex-basis rules from sizing the popup title as the full card body. */
body .bundle-builder--modal .bundle-modal-product-card__body {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-content: start;
  gap: 8px;
  min-width: 0;
}

body .bundle-builder--modal .bundle-modal-product-card__body > * {
  min-width: 0;
  max-width: 100%;
}

body .bundle-builder--modal .bundle-modal-product-card__actions {
  display: flex;
  flex: 0 0 auto;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
  margin-top: auto;
}

body .bundle-builder--modal .bundle-modal-product-card .mac-bestsellers__name {
  display: block;
  height: auto;
  min-height: 0;
  max-height: none;
  overflow: visible;
  overflow-wrap: anywhere;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.12;
}

body .bundle-builder--modal .bundle-modal-product-card .mac-bestsellers__name a {
  display: block;
  width: 100%;
  max-height: none;
  overflow: visible;
  overflow-wrap: anywhere;
  -webkit-line-clamp: unset;
}

body .bundle-builder--modal .bundle-modal-product-card__description {
  display: -webkit-box;
  min-height: 30px;
  margin: 0;
  overflow: hidden;
  color: #707070;
  font: 400 11px/1.4 Montserrat, Arial, sans-serif;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

body .bundle-builder--modal .bundle-modal-product-card__rating {
  display: flex;
  min-height: 17px;
  align-items: center;
  gap: 6px;
  color: #777;
  font: 500 10px/1 Montserrat, Arial, sans-serif;
}

body .bundle-builder--modal .bundle-modal-product-card__stars {
  position: relative;
  display: inline-block;
  color: #d4d4d4;
  font: 15px/1 Arial, sans-serif;
  letter-spacing: 1px;
}

body .bundle-builder--modal .bundle-modal-product-card__stars::after {
  position: absolute;
  inset: 0 auto 0 0;
  width: calc(var(--rating, 0) / 5 * 100%);
  overflow: hidden;
  color: #e8b72b;
  content: "★★★★★";
  white-space: nowrap;
}

/* Bundle modal: keep WooCommerce price parts together and separate price from CTA. */
body :is(.bundle-builder--modal, .bundle-builder--page) .bundle-modal-product-card__pricebox {
  display: block;
  width: 100%;
  min-width: 0;
  margin: 0;
  text-align: left;
  white-space: normal;
}

body :is(.bundle-builder--modal, .bundle-builder--page) .bundle-modal-product-card__pricebox .mac-bestsellers__price {
  display: block;
  min-width: 0;
  color: var(--mb-regular-price, #241a22);
  font-size: 17px;
  font-weight: 800;
  line-height: 1.25;
  overflow-wrap: normal;
  word-break: normal;
}

body :is(.bundle-builder--modal, .bundle-builder--page) .bundle-modal-product-card__pricebox .woocommerce-Price-amount,
body :is(.bundle-builder--modal, .bundle-builder--page) .bundle-modal-product-card__pricebox .woocommerce-Price-amount bdi {
  white-space: nowrap;
  word-break: keep-all;
}

body :is(.bundle-builder--modal, .bundle-builder--page) .bundle-modal-product-card__pricebox del,
body :is(.bundle-builder--modal, .bundle-builder--page) .bundle-modal-product-card__pricebox ins {
  display: block;
  width: fit-content;
  max-width: 100%;
}

body :is(.bundle-builder--modal, .bundle-builder--page) .bundle-modal-product-card__pricebox del {
  color: #8a8a8a;
  font-size: 12px;
  font-weight: 500;
  opacity: .8;
}

body :is(.bundle-builder--modal, .bundle-builder--page) .bundle-modal-product-card__pricebox ins {
  color: var(--mb-sale-price, #7f4aa8);
  font-size: 17px;
  font-weight: 800;
  text-decoration: none;
}

body :is(.bundle-builder--modal, .bundle-builder--page) .bundle-modal-product-card__variants {
  display: grid;
  gap: 7px;
  min-width: 0;
}

body :is(.bundle-builder--modal, .bundle-builder--page) .bundle-modal-product-card__variants > input[data-bundle-variation] { display: none; }

body :is(.bundle-builder--modal, .bundle-builder--page) fieldset.bundle-modal-product-card__variant {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

body :is(.bundle-builder--modal, .bundle-builder--page) .bundle-modal-product-card__variant legend {
  margin: 0 0 5px;
  padding: 0;
  color: inherit;
  font: inherit;
  font-size: 10px;
  font-weight: 700;
}

body :is(.bundle-builder--modal, .bundle-builder--page) .bundle-modal-product-card__variant-options {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  min-width: 0;
}

body :is(.bundle-builder--modal, .bundle-builder--page) .bundle-variant-option {
  flex: 0 1 auto;
  min-width: 0;
  min-height: 30px;
  max-width: 100%;
  padding: 5px 9px;
  border: 1px solid #dedede;
  border-radius: 999px;
  background: #f5f4f4;
  color: #222;
  font: 700 10px/1.2 Montserrat, Arial, sans-serif;
  text-align: center;
  overflow-wrap: anywhere;
  cursor: pointer;
}

body :is(.bundle-builder--modal, .bundle-builder--page) .bundle-variant-option.is-active {
  border-color: #eda5c8;
  background: #eda5c8;
  color: #000;
}

body :is(.bundle-builder--modal, .bundle-builder--page) .bundle-variant-option:disabled {
  opacity: .42;
  cursor: not-allowed;
}

body :is(.bundle-builder--modal, .bundle-builder--page) .bundle-variant-option:focus-visible {
  outline: 2px solid #b2477d;
  outline-offset: 2px;
}

body .bundle-builder--modal .bundle-modal-product-card__footer {
  display: block;
  width: 100%;
  min-width: 0;
}

body .bundle-builder--modal .bundle-modal-product-card__footer .bundle-modal-product-card__add { display: block; }

body :is(.bundle-builder--modal, .bundle-builder--page) .bundle-modal-product-card__add,
body :is(.bundle-builder--modal, .bundle-builder--page) .bundle-modal-product-card__options {
  position: relative;
  z-index: 1;
  left: auto;
  bottom: auto;
  width: 100%;
  min-width: 0;
  min-height: 38px;
  padding: 0 8px;
  transform: none;
  opacity: 1;
  pointer-events: auto;
  isolation: isolate;
  overflow: hidden;
  border: 1px solid #eda5c8;
  border-radius: 999px;
  background: #eda5c8;
  color: #000;
  font: 800 11px/1 Montserrat, Arial, sans-serif;
  text-decoration: none;
}

body .bundle-builder--modal .bundle-modal-product-card:hover .bundle-modal-product-card__add,
body .bundle-builder--modal .bundle-modal-product-card:focus-within .bundle-modal-product-card__add,
body .bundle-builder--modal .bundle-modal-product-card:hover .bundle-modal-product-card__options,
body .bundle-builder--modal .bundle-modal-product-card:focus-within .bundle-modal-product-card__options,
body .bundle-builder--page .bundle-page-product-card:hover .bundle-modal-product-card__add,
body .bundle-builder--page .bundle-page-product-card:focus-within .bundle-modal-product-card__add,
body .bundle-builder--page .bundle-page-product-card:hover .bundle-modal-product-card__options,
body .bundle-builder--page .bundle-page-product-card:focus-within .bundle-modal-product-card__options {
  transform: none;
  opacity: 1;
  pointer-events: auto;
}

body :is(.bundle-builder--modal, .bundle-builder--page) .bundle-modal-product-card__add .macaroma-hover-label {
  position: relative;
  z-index: 2;
}

body :is(.bundle-builder--modal, .bundle-builder--page) .bundle-modal-product-card__add:disabled {
  opacity: .5;
  cursor: not-allowed;
}

body .bundle-builder--modal .bundle-modal-product-card__unavailable {
  position: relative;
  z-index: 1;
  display: grid;
  width: 100%;
  min-height: 38px;
  transform: none;
  place-items: center;
  border-radius: 999px;
  background: #e8e5e8;
  color: #777;
  font: 700 11px/1 Montserrat, Arial, sans-serif;
  padding: 0 8px;
  border: 0;
  cursor: not-allowed;
}

@media (max-width: 700px) {
  body .bundle-builder--modal .bundle-pagination { gap: 4px; }
  body .bundle-builder--modal .bundle-page-button { flex-basis: 28px; width: 28px; min-width: 28px; height: 28px; font-size: 10px; }
  body .bundle-builder--modal .bundle-pagination__ellipsis { flex-basis: 10px; font-size: 12px; }
  body .bundle-builder--modal .bundle-modal-product-card__info { padding: 12px 11px 13px; gap: 7px; }
  body .bundle-builder--modal .bundle-modal-product-card .mac-bestsellers__name { font-size: 12px; }
  body .bundle-builder--modal .bundle-modal-product-card__description { min-height: 28px; font-size: 10px; }
  body .bundle-builder--modal .bundle-modal-product-card__rating { font-size: 9px; }
  body .bundle-builder--modal .bundle-modal-product-card__stars { font-size: 13px; }
  body .bundle-builder--modal .bundle-modal-product-card__pricebox .mac-bestsellers__price,
  body .bundle-builder--modal .bundle-modal-product-card__pricebox ins { font-size: 13px; }
  body .bundle-builder--modal .bundle-modal-product-card__pricebox del { font-size: 10px; }
  body .bundle-builder--modal .bundle-modal-product-card__add { min-height: 34px; font-size: 9px; }
}

@media (max-width: 760px) {
  body .mac-bundle-modal .bundle-modal-product-card__visual {
    position: relative;
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    min-width: 0;
    min-height: 0;
    overflow: hidden;
    border-radius: inherit;
  }

  body .mac-bundle-modal .bundle-modal-product-card__content {
    position: relative;
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    min-width: 0;
  }

  body .mac-bundle-modal .bundle-modal-product-card__actions {
    flex: 0 0 auto;
  }

  body .mac-bundle-modal .bundle-modal-product-card__desktop-add { display: none; }

  body .mac-bundle-modal .bundle-modal-product-card__options-panel {
    position: absolute;
    inset: 0;
    z-index: 4;
    display: flex;
    flex-direction: column;
    min-width: 0;
    min-height: 0;
    padding: 9px;
    overflow: hidden;
    border-radius: inherit;
    background: #f7f7f7;
    color: #000;
    transform: translateX(100%);
    transition: transform 280ms cubic-bezier(.22,.75,.25,1);
    pointer-events: none;
  }

  body .mac-bundle-modal .bundle-modal-product-card.is-options-open .bundle-modal-product-card__options-panel {
    transform: translateX(0);
    pointer-events: auto;
  }

  body .mac-bundle-modal .bundle-modal-product-card__options-header {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 6px;
    min-width: 0;
  }

  body .mac-bundle-modal .bundle-modal-product-card__options-header h3 {
    min-width: 0;
    margin: 0;
    font: 800 11px/1.2 Montserrat, Arial, sans-serif;
  }

  body .mac-bundle-modal .bundle-modal-product-card__options-back {
    display: grid;
    flex: 0 0 27px;
    width: 27px;
    height: 27px;
    padding: 0;
    place-items: center;
    border: 1px solid #eda5c8;
    border-radius: 50%;
    background: #eda5c8;
    color: #000;
    font: 700 19px/1 Montserrat, Arial, sans-serif;
    cursor: pointer;
  }

  body .mac-bundle-modal .bundle-modal-product-card__options-name {
    display: block;
    flex: 0 0 auto;
    margin: 5px 0 0;
    color: #555;
    font: 700 9px/1.3 Montserrat, Arial, sans-serif;
    overflow-wrap: anywhere;
  }

  body .mac-bundle-modal .bundle-modal-product-card__options-scroll {
    display: block;
    flex: 1 1 auto;
    min-width: 0;
    min-height: 0;
    margin-top: 6px;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
  }

  body .mac-bundle-modal .bundle-modal-product-card__options-footer {
    display: flex;
    flex: 0 0 auto;
    flex-direction: column;
    gap: 5px;
    min-width: 0;
    padding-top: 6px;
    border-top: 1px solid #e4dfe4;
  }

  body .mac-bundle-modal .bundle-modal-product-card__options-footer .bundle-modal-product-card__add { min-height: 32px; font-size: 9px; }
  body .mac-bundle-modal .bundle-modal-product-card__options-footer .bundle-modal-product-card__pricebox .mac-bestsellers__price,
  body .mac-bundle-modal .bundle-modal-product-card__options-footer .bundle-modal-product-card__pricebox ins { font-size: 12px; }
  body .mac-bundle-modal .bundle-modal-product-card__options { display: block; }
}

/* Standalone bundle cards use the same compact in-card variation panel on mobile. */
@media (max-width: 760px) {
  body .bundle-builder--page .bundle-page-product-card {
    position: relative;
    overflow: hidden;
  }

  body .bundle-builder--page .bundle-page-product-card__options { display: flex; }
  body .bundle-builder--page .bundle-page-product-card__options[hidden] { display: none; }

  body .bundle-builder--page .bundle-page-product-card__options-panel {
    position: absolute;
    inset: 0;
    z-index: 4;
    display: flex;
    flex-direction: column;
    min-width: 0;
    min-height: 0;
    padding: 9px;
    overflow: hidden;
    border-radius: inherit;
    background: #f7f7f7;
    color: #000;
    transform: translateX(100%);
    transition: transform 280ms cubic-bezier(.22,.75,.25,1);
    pointer-events: none;
  }

  body .bundle-builder--page .bundle-page-product-card.is-options-open .bundle-page-product-card__options-panel {
    transform: translateX(0);
    pointer-events: auto;
  }

  body .bundle-builder--page .bundle-page-product-card__options-header {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 6px;
    min-width: 0;
  }

  body .bundle-builder--page .bundle-page-product-card__options-header h3 {
    min-width: 0;
    margin: 0;
    font: 800 11px/1.2 Montserrat, Arial, sans-serif;
  }

  body .bundle-builder--page .bundle-page-product-card__options-back {
    display: grid;
    flex: 0 0 27px;
    width: 27px;
    height: 27px;
    padding: 0;
    place-items: center;
    border: 1px solid #eda5c8;
    border-radius: 50%;
    background: #eda5c8;
    color: #000;
    font: 700 19px/1 Montserrat, Arial, sans-serif;
    cursor: pointer;
  }

  body .bundle-builder--page .bundle-page-product-card__options-name {
    display: block;
    flex: 0 0 auto;
    min-width: 0;
    margin: 5px 0 0;
    color: #555;
    font: 700 9px/1.3 Montserrat, Arial, sans-serif;
    overflow-wrap: anywhere;
  }

  body .bundle-builder--page .bundle-page-product-card__options-scroll {
    display: block;
    flex: 1 1 auto;
    min-width: 0;
    min-height: 0;
    margin-top: 6px;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
  }

  body .bundle-builder--page .bundle-page-product-card__options-footer {
    display: flex;
    flex: 0 0 auto;
    flex-direction: column;
    gap: 5px;
    min-width: 0;
    padding-top: 6px;
    border-top: 1px solid #e4dfe4;
  }

  body .bundle-builder--page .bundle-page-product-card__options-footer .bundle-modal-product-card__add {
    display: flex;
    min-height: 32px;
    font-size: 9px;
  }

  body .bundle-builder--page .bundle-page-product-card__options-footer .bundle-modal-product-card__pricebox .mac-bestsellers__price,
  body .bundle-builder--page .bundle-page-product-card__options-footer .bundle-modal-product-card__pricebox ins { font-size: 12px; }
}

@media (hover: none), (pointer: coarse) {
  body .bundle-builder--modal .bundle-modal-product-card__add {
    transform: none;
    opacity: 1;
    pointer-events: auto;
  }
}

/* Bundle modal: stable product scrolling and intrinsically sized cards. */
body .bundle-builder--modal .bundle-products {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  min-width: 0;
  min-height: 0;
}

body .bundle-builder--modal .bundle-product-scroll {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}

body .bundle-builder--modal .bundle-product-grid {
  flex: 0 0 auto;
  grid-auto-rows: max-content;
  align-content: start;
  overflow: visible;
}

body .bundle-builder--modal .bundle-product-grid > .bundle-modal-product-card {
  height: auto;
  min-height: 0;
  overflow: visible;
}

body .bundle-builder--modal .bundle-modal-product-card__info {
  grid-template-rows: auto auto auto;
  min-height: 0;
  gap: 5px;
  padding: 8px 8px 9px;
}

body .bundle-builder--modal .bundle-modal-product-card .mac-bestsellers__badge[hidden] {
  display: none;
}

/* Keep every progress label centered over its own milestone without sharing a text row. */
body .bundle-builder--modal .bundle-progress {
  min-width: 0;
  margin: 0;
  padding: 9px 12px 10px;
}

body .bundle-builder--modal .bundle-progress__summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
  font-size: 11px;
  line-height: 1.25;
}

body .bundle-builder--modal .bundle-progress__track {
  position: relative;
  height: 6px;
  margin: 24px 14px 13px;
  overflow: visible;
  border-radius: 99px;
}

body .bundle-builder--modal .bundle-progress__fill {
  height: 100%;
  border-radius: inherit;
}

body .bundle-builder--modal .bundle-progress__mark {
  top: 50%;
  width: 13px;
  height: 13px;
  transform: translate(-50%, -50%);
}

body .bundle-builder--modal .bundle-progress__top {
  position: absolute;
  bottom: calc(100% + 5px);
  left: 50%;
  z-index: 2;
  transform: translateX(-50%);
  white-space: nowrap;
  font-size: 9px;
  line-height: 1;
}

/* The full desktop cart remains visible beside the products. */
body .bundle-builder--modal .bundle-cart__desktop {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  min-width: 0;
  min-height: 0;
  height: 100%;
}

body .bundle-builder--modal .bundle-cart__desktop .bundle-cart__header {
  padding: 12px 16px 8px;
}

body .bundle-builder--modal .bundle-cart__desktop-items {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  min-width: 0;
  min-height: 0;
  overflow: hidden;
}

body .bundle-builder--modal .bundle-cart__desktop .bundle-cart__items {
  min-width: 0;
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
}

body .bundle-builder--modal .bundle-cart__mobile {
  display: none;
}

@media (max-width: 1100px) {
  body .bundle-builder--modal .bundle-product-scroll {
    scrollbar-gutter: auto;
  }
}

@media (max-width: 760px) {
  body :is(.mac-bundle-modal, .bundle-builder--page) .bundle-modal-intro {
    margin-bottom: 5px;
    padding-bottom: 0;
  }

  body :is(.mac-bundle-modal, .bundle-builder--page) .bundle-modal-intro p {
    display: none;
  }

  body :is(.mac-bundle-modal, .bundle-builder--page) .bundle-layout {
    position: relative;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: minmax(0, 1fr) auto;
    min-height: 0;
    gap: 7px;
  }

  body :is(.mac-bundle-modal, .bundle-builder--page) .bundle-products {
    grid-template-rows: auto minmax(0, 1fr);
    min-height: 0;
  }

  body :is(.mac-bundle-modal, .bundle-builder--page) .bundle-product-scroll {
    scrollbar-gutter: auto;
  }

  body :is(.mac-bundle-modal, .bundle-builder--page) .bundle-product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-auto-rows: max-content;
    align-content: start;
    gap: 8px;
    overflow: visible;
  }

  body :is(.mac-bundle-modal, .bundle-builder--page) .bundle-product-grid > .bundle-modal-product-card {
    overflow: visible;
  }

  body :is(.mac-bundle-modal, .bundle-builder--page) .bundle-product-grid .bundle-modal-product-card .mac-bestsellers__photo {
    aspect-ratio: 1 / 1;
    object-fit: contain;
  }

  body :is(.mac-bundle-modal, .bundle-builder--page) .bundle-modal-product-card .mac-bestsellers__brand,
  body :is(.mac-bundle-modal, .bundle-builder--page) .bundle-modal-product-card .bundle-modal-product-card__description,
  body :is(.mac-bundle-modal, .bundle-builder--page) .bundle-modal-product-card .bundle-modal-product-card__rating {
    display: none;
  }

  body :is(.mac-bundle-modal, .bundle-builder--page) .bundle-modal-product-card .mac-bestsellers__name {
    display: block;
    height: auto;
    min-height: 0;
    max-height: none;
    overflow: visible;
    overflow-wrap: anywhere;
    font-size: 10px;
    line-height: 1.25;
  }

  body :is(.mac-bundle-modal, .bundle-builder--page) .bundle-modal-product-card__info {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-width: 0;
    min-height: 0;
  }

  body :is(.mac-bundle-modal, .bundle-builder--page) .bundle-modal-product-card__body { gap: 5px; }

  body :is(.mac-bundle-modal, .bundle-builder--page) .bundle-modal-product-card__actions { gap: 6px; }

  body :is(.mac-bundle-modal, .bundle-builder--page) .bundle-modal-product-card__footer {
    display: block;
    width: 100%;
    margin-top: 0;
  }

  body :is(.mac-bundle-modal, .bundle-builder--page) .bundle-layout {
    grid-template-rows: minmax(0, 1fr) auto;
  }

  body :is(.mac-bundle-modal, .bundle-builder--page) .bundle-cart {
    position: static;
    display: block;
    min-width: 0;
    min-height: 0;
    max-height: none;
    overflow: visible;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }

  body :is(.mac-bundle-modal, .bundle-builder--page) .bundle-cart__desktop {
    display: none;
  }

  body :is(.mac-bundle-modal, .bundle-builder--page) .bundle-cart__mobile {
    display: flex;
    flex-direction: column;
    min-width: 0;
    gap: 4px;
    padding: 5px 10px max(8px, env(safe-area-inset-bottom));
    border: 1px solid #e4dfe4;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .04);
  }

  body :is(.mac-bundle-modal, .bundle-builder--page) .bundle-cart__mobile .bundle-progress {
    flex: 0 0 auto;
    padding: 4px 5px 0;
  }

  body :is(.mac-bundle-modal, .bundle-builder--page) .bundle-cart__mobile .bundle-progress__summary {
    font-size: 10px;
  }

  body :is(.mac-bundle-modal, .bundle-builder--page) .bundle-cart__mobile .bundle-progress__track {
    margin: 23px 14px 12px;
  }

  body :is(.mac-bundle-modal, .bundle-builder--page) .bundle-cart__mobile .bundle-progress__top {
    bottom: calc(100% + 5px);
    font-size: 8px;
  }

  body :is(.mac-bundle-modal, .bundle-builder--page) .bundle-cart__disclosure {
    position: static;
    flex: 0 0 auto;
    min-width: 0;
  }

  body :is(.mac-bundle-modal, .bundle-builder--page) .bundle-cart__details-toggle {
    display: flex;
    min-height: 31px;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 0 5px;
    border: 0;
    border-top: 1px solid #e4dfe4;
    border-radius: 0;
    background: transparent;
    color: #8c3560;
    font: 800 10px/1.2 Montserrat, Arial, sans-serif;
    text-align: left;
    cursor: pointer;
    list-style: none;
  }

  body :is(.mac-bundle-modal, .bundle-builder--page) .bundle-cart__details-toggle::-webkit-details-marker {
    display: none;
  }

  body :is(.mac-bundle-modal, .bundle-builder--page) .bundle-cart__details-icon {
    font-size: 17px;
    line-height: 1;
    transition: transform .24s ease;
  }

  body :is(.mac-bundle-modal, .bundle-builder--page) .bundle-cart__disclosure[open] .bundle-cart__details-icon {
    transform: rotate(180deg);
  }

  body :is(.mac-bundle-modal, .bundle-builder--page) .bundle-cart__details-panel {
    position: absolute;
    z-index: 10;
    inset: 0;
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
    min-width: 0;
    min-height: 0;
    gap: 4px;
    padding: 10px 12px max(10px, env(safe-area-inset-bottom));
    overflow: hidden;
    border: 1px solid #e4dfe4;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 12px 36px rgba(33, 18, 28, .16);
    opacity: 0;
    pointer-events: none;
    transform: translateY(102%);
    transition: transform .26s ease, opacity .2s ease, visibility .26s ease;
    visibility: hidden;
  }

  body :is(.mac-bundle-modal, .bundle-builder--page) .bundle-cart__disclosure[open] .bundle-cart__details-panel {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
    visibility: visible;
  }

  body :is(.mac-bundle-modal, .bundle-builder--page) .bundle-cart__details-header {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    min-height: 36px;
  }

  body :is(.mac-bundle-modal, .bundle-builder--page) .bundle-cart__details-header h2 {
    margin: 0;
    font: 900 13px/1.1 Montserrat, Arial, sans-serif;
  }

  body :is(.mac-bundle-modal, .bundle-builder--page) .bundle-cart__details-close {
    flex: 0 0 auto;
    min-height: 32px;
    padding: 0 10px;
    border: 1px solid #e4dfe4;
    border-radius: 999px;
    background: #f7f7f7;
    color: #8c3560;
    font: 700 9px/1 Montserrat, Arial, sans-serif;
    cursor: pointer;
  }

  body :is(.mac-bundle-modal, .bundle-builder--page) .bundle-cart__details-panel .bundle-progress {
    flex: 0 0 auto;
    padding: 3px 5px 0;
  }

  body :is(.mac-bundle-modal, .bundle-builder--page) .bundle-cart__details-panel .bundle-progress__summary {
    font-size: 10px;
  }

  body :is(.mac-bundle-modal, .bundle-builder--page) .bundle-cart__details-panel .bundle-progress__track {
    margin: 23px 14px 12px;
  }

  body :is(.mac-bundle-modal, .bundle-builder--page) .bundle-cart__details-panel .bundle-progress__top {
    font-size: 8px;
  }

  body :is(.mac-bundle-modal, .bundle-builder--page) .bundle-cart__details-list {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    min-width: 0;
    min-height: 0;
    overflow: hidden;
  }

  body :is(.mac-bundle-modal, .bundle-builder--page) .bundle-cart__details-list .bundle-cart__items {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    min-width: 0;
    min-height: 0;
    gap: 6px;
    padding: 4px 2px;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
  }

  body :is(.mac-bundle-modal, .bundle-builder--page) .bundle-cart__details-list .bundle-cart__item {
    flex: 0 0 auto;
    grid-template-columns: 42px minmax(0, 1fr);
    align-items: center;
    gap: 8px;
    min-width: 0;
    padding: 6px 28px 6px 6px;
  }

  body :is(.mac-bundle-modal, .bundle-builder--page) .bundle-cart__details-list .bundle-cart__photo {
    display: block;
    width: 42px;
    height: 42px;
    border-radius: 8px;
    background: #fff;
  }

  body :is(.mac-bundle-modal, .bundle-builder--page) .bundle-cart__details-list .bundle-cart__photo img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
  }

  body :is(.mac-bundle-modal, .bundle-builder--page) .bundle-cart__details-list .bundle-cart__product {
    font-size: 9px;
    line-height: 1.2;
  }

  body :is(.mac-bundle-modal, .bundle-builder--page) .bundle-cart__details-list .bundle-cart__variation,
  body :is(.mac-bundle-modal, .bundle-builder--page) .bundle-cart__details-list .bundle-cart__shade,
  body :is(.mac-bundle-modal, .bundle-builder--page) .bundle-cart__details-list .bundle-cart__price {
    font-size: 9px;
    line-height: 1.2;
  }

  body :is(.mac-bundle-modal, .bundle-builder--page) .bundle-cart__details-list .bundle-cart__remove {
    width: 23px;
    height: 23px;
  }

  body :is(.mac-bundle-modal, .bundle-builder--page) .bundle-cart__details-bottom {
    display: grid;
    flex: 0 0 auto;
    grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
    align-items: center;
    gap: 4px 10px;
    padding-top: 7px;
    border-top: 1px solid #e4dfe4;
  }

  body :is(.mac-bundle-modal, .bundle-builder--page) .bundle-cart__details-bottom .bundle-cart__row--saving {
    display: flex;
    grid-column: 1 / -1;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin: 0;
    font-size: 10px;
  }

  body :is(.mac-bundle-modal, .bundle-builder--page) .bundle-cart__details-bottom .bundle-cart__row--total,
  body :is(.mac-bundle-modal, .bundle-builder--page) .bundle-cart__mobile-bottom .bundle-cart__row--total {
    display: flex;
    grid-column: auto;
    grid-row: auto;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    min-width: 0;
    margin: 0;
    font-size: 9px;
    line-height: 1.15;
  }

  body :is(.mac-bundle-modal, .bundle-builder--page) .bundle-cart__details-bottom .bundle-cart__row--total strong,
  body :is(.mac-bundle-modal, .bundle-builder--page) .bundle-cart__mobile-bottom .bundle-cart__row--total strong {
    font-size: 17px;
    line-height: 1.1;
    white-space: nowrap;
  }

  body :is(.mac-bundle-modal, .bundle-builder--page) .bundle-cart__details-bottom .bundle-cart__checkout,
  body :is(.mac-bundle-modal, .bundle-builder--page) .bundle-cart__mobile-bottom .bundle-cart__checkout {
    grid-column: auto;
    grid-row: auto;
    width: 100%;
    min-width: 0;
    min-height: 42px;
    padding-inline: 7px;
    font-size: 10px;
  }

  body :is(.mac-bundle-modal, .bundle-builder--page) .bundle-cart__mobile-bottom {
    display: grid;
    flex: 0 0 auto;
    grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
    align-items: center;
    gap: 8px;
    padding-top: 7px;
    border-top: 1px solid #e4dfe4;
  }
}

@media (max-width: 430px) {
  body :is(.mac-bundle-modal, .bundle-builder--page) .bundle-product-grid {
    gap: 6px;
  }

  body :is(.mac-bundle-modal, .bundle-builder--page) .bundle-modal-product-card__info {
    padding-inline: 6px;
  }

  body :is(.mac-bundle-modal, .bundle-builder--page) .bundle-cart__details-panel {
    padding-inline: 9px;
  }
}

@media (prefers-reduced-motion: reduce) {
  body .bundle-builder--modal .bundle-modal-product-card__options-panel,
  body .bundle-builder--page .bundle-page-product-card__options-panel { transition: none; }
  body :is(.mac-bundle-modal, .bundle-builder--page) .bundle-cart__details-icon,
  body :is(.mac-bundle-modal, .bundle-builder--page) .bundle-cart__details-panel {
    transition: none;
  }
}

/* Standalone and modal builders render both responsive branches; desktop must expose only its full summary. */
@media (min-width: 1025px) {
  body .bundle-builder .bundle-cart__desktop {
    display: grid;
    grid-template-rows: auto auto minmax(0, 1fr) auto auto;
    min-width: 0;
    min-height: 0;
  }

  body .bundle-builder .bundle-cart__mobile,
  body .bundle-builder .bundle-cart__disclosure,
  body .bundle-builder .bundle-cart__mobile-bottom {
    display: none;
  }

  body .bundle-builder .bundle-cart__desktop-items {
    display: contents;
  }

  body .bundle-builder .bundle-cart__desktop > .bundle-progress {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto auto;
    row-gap: 28px;
    min-width: 0;
    margin: 0;
    padding: 10px 18px 14px;
  }

  body .bundle-builder .bundle-cart__desktop .bundle-progress__summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-width: 0;
    margin: 0;
    line-height: 1.25;
  }

  body .bundle-builder .bundle-cart__desktop .bundle-progress__summary > span {
    min-width: 0;
    white-space: nowrap;
  }

  body .bundle-builder .bundle-cart__desktop .bundle-progress__track {
    height: 6px;
    margin: 0 18px 12px;
  }

  body .bundle-builder .bundle-cart__desktop .bundle-progress__top {
    bottom: calc(100% + 5px);
    white-space: nowrap;
  }

  body .bundle-builder .bundle-cart__desktop .bundle-cart__items {
    grid-row: 3;
  }

  body .bundle-builder .bundle-cart__desktop .bundle-cart__row--saving {
    grid-row: 4;
    margin: 0;
    padding: 8px 16px 2px;
    background: #f7f7f7;
  }

  body .bundle-builder .bundle-cart__desktop > .bundle-cart__bottom {
    grid-row: 5;
    padding-top: 6px;
  }

  body .bundle-builder .bundle-cart__desktop .bundle-cart__row--total {
    margin-top: 4px;
    padding-top: 6px;
  }

  body .bundle-builder .bundle-cart__desktop .bundle-cart__items {
    min-width: 0;
    min-height: 0;
    overflow: auto;
    overscroll-behavior: contain;
  }
}


/* Create Package variation sheet stays within the product image on /create-package/. */
body .bundle-builder--page .bundle-page-product-card .mac-bestsellers__info {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
}

body .bundle-builder--page .bundle-page-product-card .mac-bestsellers__name {
  display: -webkit-box;
  height: auto;
  max-height: none;
  min-height: 0;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;
}

body .bundle-builder--page .bundle-page-product-card .bundle-modal-product-card__variants {
  margin: 0 0 2px;
}

body .bundle-builder--page .bundle-page-product-card .bundle-modal-product-card__variant[aria-label] {
  margin: 0;
}

body .bundle-builder--page .bundle-page-product-card .mac-bestsellers__photo {
  position: relative;
  isolation: isolate;
  overflow: hidden;
}

body .bundle-builder--page .bundle-page-product-card__options-panel {
  position: absolute;
  inset: 0;
  z-index: 6;
  display: flex;
  align-items: flex-end;
  min-width: 0;
  min-height: 0;
  padding: 0;
  overflow: hidden;
  border-radius: inherit;
  background: transparent;
  opacity: 1;
  transform: none;
  pointer-events: none;
}

body .bundle-builder--page .bundle-page-product-card.is-options-open .bundle-page-product-card__options-panel {
  background: rgba(255, 255, 255, .12);
  -webkit-backdrop-filter: blur(1.5px);
  backdrop-filter: blur(1.5px);
  transform: none;
  pointer-events: auto;
}

body .bundle-builder--page .bundle-page-product-card__options-sheet {
  display: flex;
  flex: 0 1 auto;
  flex-direction: column;
  width: 100%;
  max-height: 94%;
  min-width: 0;
  min-height: 0;
  padding: clamp(8px, 2.4vw, 14px);
  overflow: hidden;
  border: 1px solid rgba(228, 223, 228, .85);
  border-bottom: 0;
  border-radius: 15px 15px 0 0;
  background: rgba(255, 255, 255, .91);
  color: #000;
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  box-shadow: 0 -8px 24px rgba(0, 0, 0, .1);
  transform: translateY(105%);
  transition: transform 300ms cubic-bezier(.22, .75, .25, 1);
  pointer-events: auto;
}

body .bundle-builder--page .bundle-page-product-card.is-options-open .bundle-page-product-card__options-sheet {
  transform: translateY(0);
}

body .bundle-builder--page .bundle-page-product-card__options-header {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

body .bundle-builder--page .bundle-page-product-card__options-header h3 {
  flex: 1 1 auto;
  min-width: 0;
  margin: 0;
  font: 800 clamp(11px, 1.15vw, 15px)/1.2 Montserrat, Arial, sans-serif;
}

body .bundle-builder--page .bundle-page-product-card__options-back {
  display: grid;
  flex: 0 0 28px;
  width: 28px;
  height: 28px;
  min-width: 28px;
  min-height: 28px;
  margin: 0;
  padding: 0;
  place-items: center;
  border: 1px solid #eda5c8;
  border-radius: 50%;
  background: #eda5c8;
  color: #000;
  font: 600 19px/1 Arial, sans-serif;
  cursor: pointer;
}

body .bundle-builder--page .bundle-page-product-card__options-name {
  display: block;
  flex: 0 0 auto;
  margin: 5px 0 0;
  color: #555;
  font: 600 10px/1.3 Montserrat, Arial, sans-serif;
}

body .bundle-builder--page .bundle-page-product-card__options-scroll {
  display: block;
  flex: 1 1 auto;
  min-width: 0;
  min-height: 0;
  margin-top: 7px;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
}

body .bundle-builder--page .bundle-page-product-card__options-footer {
  display: flex;
  flex: 0 0 auto;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
  padding-top: 7px;
  border-top: 1px solid rgba(228, 223, 228, .9);
}

body .bundle-builder--page .bundle-page-product-card__options-footer .bundle-modal-product-card__add {
  display: flex;
  min-height: 34px;
}

@media (prefers-reduced-motion: reduce) {
  body .bundle-builder--page .bundle-page-product-card__options-sheet { transition-duration: 1ms; }
}


/* Keep standalone Create Package variation controls and actions visible in the card flow. */
body .bundle-builder--page .bundle-page-product-card .bundle-modal-product-card__variants {
  display: grid;
  visibility: visible;
  opacity: 1;
}

body .bundle-builder--page .bundle-page-product-card [data-bundle-card-actions] {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
  align-items: center;
  visibility: visible;
  opacity: 1;
}

body .bundle-builder--page .bundle-page-product-card .bundle-modal-product-card__add {
  display: flex;
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
}

body .bundle-builder--page .bundle-page-product-card .bundle-modal-product-card__pricebox {
  display: flex;
  visibility: visible;
  opacity: 1;
}

/* Match the bundle popup card structure only on the standalone builder page. */
body .bundle-builder--page .bundle-page-product-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: visible;
  border: 1px solid #e4dfe4;
  border-radius: 18px;
  background: #f7f7f7;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .025);
  transition: transform .22s ease, box-shadow .22s ease;
}

body .bundle-builder--page .bundle-page-product-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 24px rgba(0, 0, 0, .08);
}

body .bundle-builder--page .bundle-page-product-card .bundle-modal-product-card__visual,
body .bundle-builder--page .bundle-page-product-card .bundle-modal-product-card__content { display: contents; }

body .bundle-builder--page .bundle-page-product-card .mac-bestsellers__badge {
  top: 14px;
  left: 14px;
  min-height: 28px;
  padding: 0 12px;
  font-size: 11px;
}

body .bundle-builder--page .bundle-page-product-card .mac-bestsellers__photo {
  aspect-ratio: 1 / 1;
  margin: 8px 8px 0;
  overflow: hidden;
  border-radius: 13px;
  background: #fff;
}

body .bundle-builder--page .bundle-page-product-card .mac-bestsellers__photo::after { display: none; }
body .bundle-builder--page .bundle-page-product-card .mac-bestsellers__photo a { position: absolute; inset: 0; display: block; }

body .bundle-builder--page .bundle-page-product-card .mac-bestsellers__photo img {
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
}

body .bundle-builder--page .bundle-page-product-card .mac-bestsellers__image--primary { transform: scale(1); }
body .bundle-builder--page .bundle-page-product-card .mac-bestsellers__image--secondary { transform: scale(1.02); }

body .bundle-builder--page .bundle-page-product-card .bundle-modal-product-card__info {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  gap: 8px;
  padding: 15px 15px 16px;
}

body .bundle-builder--page .bundle-page-product-card .bundle-modal-product-card__body {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-content: start;
  gap: 8px;
  min-width: 0;
}

body .bundle-builder--page .bundle-page-product-card .bundle-modal-product-card__body > * {
  min-width: 0;
  max-width: 100%;
}

body .bundle-builder--page .bundle-page-product-card .bundle-modal-product-card__actions {
  display: flex;
  flex: 0 0 auto;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
  margin-top: auto;
}

body .bundle-builder--page .bundle-page-product-card .mac-bestsellers__name {
  display: block;
  height: auto;
  min-height: 0;
  max-height: none;
  overflow: visible;
  overflow-wrap: anywhere;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.12;
}

body .bundle-builder--page .bundle-page-product-card .mac-bestsellers__name a {
  display: block;
  width: 100%;
  max-height: none;
  overflow: visible;
  overflow-wrap: anywhere;
  -webkit-line-clamp: unset;
}

body .bundle-builder--page .bundle-page-product-card .bundle-modal-product-card__description,
body .bundle-builder--page .bundle-page-product-card .bundle-modal-product-card__rating { display: none; }

body .bundle-builder--page .bundle-page-product-card .bundle-modal-product-card__footer { display: block; width: 100%; min-width: 0; }
body .bundle-builder--page .bundle-page-product-card .bundle-modal-product-card__footer .bundle-modal-product-card__add { display: block; }

body .bundle-builder--page .bundle-page-product-card .bundle-modal-product-card__unavailable {
  position: relative;
  z-index: 1;
  display: grid;
  width: 100%;
  min-height: 38px;
  transform: none;
  place-items: center;
  border: 0;
  border-radius: 999px;
  background: #e8e5e8;
  color: #777;
  font: 700 11px/1 Montserrat, Arial, sans-serif;
  cursor: not-allowed;
}

@media (max-width: 700px) {
  body .bundle-builder--page .bundle-page-product-card .mac-bestsellers__brand { display: none; }
  body .bundle-builder--page .bundle-page-product-card .bundle-modal-product-card__info { padding: 12px 11px 13px; gap: 7px; }
  body .bundle-builder--page .bundle-page-product-card .mac-bestsellers__name { font-size: 12px; }
  body .bundle-builder--page .bundle-page-product-card .bundle-modal-product-card__pricebox .mac-bestsellers__price,
  body .bundle-builder--page .bundle-page-product-card .bundle-modal-product-card__pricebox ins { font-size: 13px; }
  body .bundle-builder--page .bundle-page-product-card .bundle-modal-product-card__pricebox del { font-size: 10px; }
  body .bundle-builder--page .bundle-page-product-card .bundle-modal-product-card__add { min-height: 34px; font-size: 9px; }
}

/* Sale prices inside product cards: original first, discounted second. */
body .mac-bestsellers__card .mac-bestsellers__pricebox:has(> .mac-bestsellers__compare:not([hidden])) {
  display: flex;
  align-items: baseline;
  justify-content: flex-end;
  gap: .4em;
  white-space: nowrap;
}

body .mac-bestsellers__card .mac-bestsellers__pricebox > .mac-bestsellers__compare:not([hidden]) {
  order: -1;
  flex: 0 0 auto;
  margin-top: 0;
  white-space: nowrap;
}

body .mac-bestsellers__card .mac-bestsellers__pricebox:has(> .mac-bestsellers__compare:not([hidden])) > .mac-bestsellers__price {
  flex: 0 0 auto;
  white-space: nowrap;
  overflow-wrap: normal;
}

body :is(.bundle-builder--modal, .bundle-builder--page) .bundle-modal-product-card__pricebox .mac-bestsellers__price:has(> del):has(> ins) {
  display: flex;
  align-items: baseline;
  gap: .4em;
  white-space: nowrap;
}

body :is(.bundle-builder--modal, .bundle-builder--page) .bundle-modal-product-card__pricebox .mac-bestsellers__price:has(> del):has(> ins) > :is(del, ins) {
  display: inline-block;
  flex: 0 0 auto;
  width: auto;
  max-width: none;
  margin: 0;
  white-space: nowrap;
}

body .mac-look__product .mac-look__prices:has(> del):has(> ins) {
  display: inline-flex;
  align-items: baseline;
  gap: .4em;
  white-space: nowrap;
}

body .mac-look__product .mac-look__prices:has(> del):has(> ins) > :is(del, ins) {
  display: inline-block;
  margin: 0;
  white-space: nowrap;
}

@container (max-width: 260px) {
  body .mac-catalog__grid .mac-bestsellers__card--sale .mac-bestsellers__row {
    grid-template-columns: minmax(0, 1fr);
  }

  body .mac-catalog__grid .mac-bestsellers__card .mac-bestsellers__pricebox:has(> .mac-bestsellers__compare:not([hidden])) {
    justify-content: flex-start;
  }
}

/* Bundle buttons live in the card footer; legacy added/touch rules still translate them as overlays. */
body :is(.bundle-builder--modal, .bundle-builder--page) .bundle-modal-product-card .bundle-modal-product-card__footer .bundle-modal-product-card__add,
body :is(.bundle-builder--modal, .bundle-builder--page) .bundle-modal-product-card .bundle-modal-product-card__footer .bundle-modal-product-card__add:is(.is-added, :hover, :focus-visible) {
  position: relative;
  inset: auto;
  transform: none;
}

/* Both bundle renderers use the same actions markup: price first, button second. */
body :is(.bundle-builder--modal, .bundle-builder--page) .bundle-modal-product-card .bundle-modal-product-card__actions {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
}

body :is(.bundle-builder--modal, .bundle-builder--page) .bundle-modal-product-card .bundle-modal-product-card__footer {
  order: -1;
  flex: 1 1 auto;
  width: auto;
  min-width: 0;
  margin: 0;
}

body :is(.bundle-builder--modal, .bundle-builder--page) .bundle-modal-product-card .bundle-modal-product-card__pricebox {
  display: block;
  flex: 0 0 auto;
  width: auto;
  min-width: 0;
  text-align: right;
  white-space: nowrap;
}

body :is(.bundle-builder--modal, .bundle-builder--page) .bundle-modal-product-card .bundle-modal-product-card__pricebox .mac-bestsellers__price {
  white-space: nowrap;
}

/* Product recommendation names in the cart drawer use the shop-card weight. */
#mac-cart-ui .mc-related > div > a { font-weight: 500; }

@media (max-width: 360px) {
  body .mac-bundle-modal .bundle-builder--modal .bundle-product-grid,
  body .bundle-builder--page .bundle-product-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* In the mobile product-page popup, the two-column cards need a full-width CTA. */
@media (max-width: 760px) {
  body .mac-bundle-modal .bundle-builder--modal .bundle-modal-product-card .bundle-modal-product-card__actions {
    flex-direction: column;
    align-items: stretch;
  }

  body .mac-bundle-modal .bundle-builder--modal .bundle-modal-product-card .bundle-modal-product-card__pricebox {
    flex: none;
    width: 100%;
    text-align: left;
    white-space: normal;
  }

  body .mac-bundle-modal .bundle-builder--modal .bundle-modal-product-card .bundle-modal-product-card__pricebox .mac-bestsellers__price {
    white-space: normal;
  }

  body .mac-bundle-modal .bundle-builder--modal .bundle-modal-product-card .bundle-modal-product-card__pricebox .mac-bestsellers__price:has(> del):has(> ins) {
    flex-wrap: wrap;
  }

  body .mac-bundle-modal .bundle-builder--modal .bundle-modal-product-card .bundle-modal-product-card__footer {
    order: 0;
    flex: none;
    display: block;
    width: 100%;
  }

  body .mac-bundle-modal .bundle-builder--modal .bundle-modal-product-card .bundle-modal-product-card__footer .bundle-modal-product-card__add {
    display: block;
    width: 100%;
    text-align: center;
    white-space: nowrap;
    overflow-wrap: normal;
  }
}

/* Center the shared mobile header logo against the viewport, independent of side controls. */
@media (max-width:1300px) {
  .mac-site-header .mac-main-header__inner { position:relative; }
  .mac-site-header .mac-logo > .mac-logo__white-image { display:none; }
  .mac-site-header .mac-main-header__inner > .mac-logo {
    position:absolute;
    left:50%;
    top:50%;
    transform:translate(-50%,-50%);
    grid-column:1 / -1;
    justify-self:center;
    margin:0;
  }
}


/* Mobile standalone builder mirrors the product-page popup layout. */
@media (max-width: 760px) {
  body .bundle-builder--page {
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: none;
    height: calc(100dvh - var(--mac-header-height, 66px) - 42px - env(safe-area-inset-bottom, 0px));
    min-height: 0;
    margin: 0;
    padding: 0;
    overflow: hidden;
  }

  body.admin-bar .bundle-builder--page {
    height: calc(100dvh - var(--mac-header-height, 66px) - 42px - 46px - env(safe-area-inset-bottom, 0px));
  }

  body .bundle-builder--page .bundle-catalog-intro {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    margin: -1px !important;
    padding: 0 !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
  }

  body .bundle-builder--page .bundle-layout {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    gap: 7px;
    width: calc(100% - 64px);
    max-width: none;
    min-width: 0;
    min-height: 0;
    margin: 0 auto;
    overflow: hidden;
  }

  body .bundle-builder--page .bundle-products {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    min-width: 0;
    min-height: 0;
    overflow: hidden;
  }

  body .bundle-builder--page .bundle-category-filters {
    display: flex;
    flex: 0 0 auto;
    flex-wrap: nowrap;
    gap: 6px;
    min-width: 0;
    max-width: 100%;
    margin: 0 0 8px;
    padding: 3px 1px 7px;
    overflow-x: auto;
    overflow-y: hidden;
    overscroll-behavior-inline: contain;
  }

  body .bundle-builder--page .bundle-category-pill {
    flex: 0 0 auto;
    min-height: 34px;
    padding: 7px 12px;
    white-space: nowrap;
    font-size: 10px;
  }

  body .bundle-builder--page #productGrid {
    display: grid;
    flex: 1 1 auto;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    min-height: 0;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-auto-rows: max-content;
    gap: 8px;
    align-content: start;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
  }

  body .bundle-builder--page #productGrid > .bundle-page-product-card {
    min-width: 0;
    min-height: 0;
  }

  body .bundle-builder--page .bundle-pagination {
    flex: 0 0 auto;
    margin: 6px 0 0;
  }

  body .bundle-builder--page .bundle-page-status {
    flex: 0 0 auto;
    margin: 5px 0 0;
  }

  body .bundle-builder--page #basket {
    position: relative;
    top: auto;
    display: block;
    flex: 0 0 auto;
    width: 100%;
    max-height: 38dvh;
    min-width: 0;
    min-height: 0;
    overflow: visible;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }
}

@media (max-width: 430px) {
  body .bundle-builder--page #productGrid { gap: 6px; }
}

/* Keep desktop card prices beside the CTA. In narrow cards, reserve the full
   intrinsic width of both prices and let the CTA use the remaining space. */
@media (min-width: 801px) {
  body .mac-bestsellers .mac-bestsellers__row > .mac-bestsellers__add {
    width: min(100%, 200px);
    justify-self: start;
    padding-inline: 5px;
    font-size: 10px;
    white-space: nowrap;
  }

  body .mac-bestsellers .mac-bestsellers__info { container-type: inline-size; }

  @container (max-width: 420px) {
    body .mac-catalog__grid .mac-bestsellers__card .mac-bestsellers__row,
    body .mac-catalog__grid .mac-bestsellers__card--sale .mac-bestsellers__row {
      grid-template-columns: minmax(0, 1fr) max-content;
    }

    body .mac-bestsellers .mac-bestsellers__row {
      grid-template-columns: minmax(0, 1fr) max-content;
      align-items: center;
      gap: 6px;
    }

    body .mac-bestsellers .mac-bestsellers__pricebox {
      grid-row: auto;
      width: max-content;
      min-width: 0;
      max-width: 100%;
      justify-self: end;
      padding-inline-end: 0;
      text-align: right;
      white-space: nowrap;
    }

    body .mac-bestsellers__card .mac-bestsellers__pricebox:has(> .mac-bestsellers__compare:not([hidden])) {
      justify-content: flex-end;
      flex-wrap: nowrap;
      gap: .35em;
      padding-inline-end: 0;
      text-align: right;
      white-space: nowrap;
    }

    body .mac-bestsellers__card .mac-bestsellers__pricebox > .mac-bestsellers__compare:not([hidden]),
    body .mac-bestsellers__card .mac-bestsellers__pricebox > .mac-bestsellers__price {
      flex: 0 0 auto;
      white-space: nowrap;
    }

    body .mac-bestsellers__card .mac-bestsellers__pricebox > .mac-bestsellers__compare:not([hidden]) {
      margin-top: 0;
    }

    body .mac-bestsellers .mac-bestsellers__row > .mac-bestsellers__add {
      grid-row: auto;
      width: 100%;
      min-width: 0;
      padding-inline: 5px;
      font-size: 10px;
      white-space: nowrap;
    }
  }
}


/* Keep the primary single-product sale prices consistent across Woo markup variants.
   The scope excludes quantity offers, recommendation cards and other promotion sections. */
body.single-product .mac-product-section .mac-product-info .mac-product-price .price del,
body.single-product .mac-product-section .mac-product-info .mac-product-price .price del *,
body.single-product .mac-product-section .mac-product-purchase .woocommerce-variation-price del,
body.single-product .mac-product-section .mac-product-purchase .woocommerce-variation-price del * {
  color: #8a8a8a !important;
}
body.single-product .mac-product-section .mac-product-info .mac-product-price .price ins,
body.single-product .mac-product-section .mac-product-info .mac-product-price .price ins *,
body.single-product .mac-product-section .mac-product-purchase .woocommerce-variation-price ins,
body.single-product .mac-product-section .mac-product-purchase .woocommerce-variation-price ins * {
  color: #7f4aa8 !important;
  text-decoration: none;
}

/* Single-product variation choices mirror the native WooCommerce variation selects. */
body.single-product .mac-product-section.mac-product-page-trial .mac-product-purchase .variations tr.has-mac-variation-choices select {
  display: none;
}
body.single-product .mac-product-section.mac-product-page-trial .mac-product-purchase .variations tr.has-mac-variation-choices th label {
  font: 900 13px/1.25 'Montserrat', sans-serif !important;
  letter-spacing: .01em;
  text-transform: none !important;
}
body.single-product .mac-product-section.mac-product-page-trial .mac-product-purchase form.variations_form.has-mac-variation-choices table.variations {
  margin-bottom: 0;
}
body.single-product .mac-product-section.mac-product-page-trial .mac-product-purchase .variations tr.has-mac-variation-choices {
  margin-bottom: 14px;
}
body.single-product .mac-product-section.mac-product-page-trial .mac-product-purchase .variations tr.has-mac-variation-choices:last-child {
  margin-bottom: 0;
}
body.single-product .mac-product-section.mac-product-page-trial .mac-product-purchase form.variations_form .reset_variations {
  display: none !important;
}
body.single-product .mac-product-section.mac-product-page-trial .mac-product-purchase form.variations_form.has-mac-variation-choices .mac-quantity {
  margin-top: 6px;
}
body.single-product .mac-product-section.mac-product-page-trial .mac-product-purchase .mac-variation-choices {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}
body.single-product .mac-product-section.mac-product-page-trial .mac-product-purchase .mac-variation-choices button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-sizing: border-box;
  width: auto;
  max-width: 100%;
  min-width: 112px;
  min-height: 44px;
  padding: 8px 14px;
  border: 1.5px solid rgba(190, 153, 213, .46);
  border-radius: 12px;
  background: #fff;
  color: #000;
  font: 900 13px/1.15 'Montserrat', sans-serif;
  text-align: center;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: border-color .2s ease, background-color .2s ease, box-shadow .2s ease, transform .2s ease;
}
body.single-product .mac-product-section.mac-product-page-trial .mac-product-purchase .mac-variation-choices__swatch {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .06);
}
body.single-product .mac-product-section.mac-product-page-trial .mac-product-purchase .mac-variation-choices button:hover:not(:disabled) {
  transform: translateY(-2px);
  border-color: #be99d5;
  box-shadow: 0 6px 16px rgba(0, 0, 0, .045);
}
body.single-product .mac-product-section.mac-product-page-trial .mac-product-purchase .mac-variation-choices button.is-active {
  border: 2px solid #eda5c8;
  background: #fff4f9;
  box-shadow: 0 0 0 1px rgba(237, 165, 200, .12);
}
body.single-product .mac-product-section.mac-product-page-trial .mac-product-purchase .mac-variation-choices button.mac-variation-choices__color {
  flex: none;
  width: 46px;
  height: 46px;
  min-width: 0;
  min-height: 0;
  padding: 4px;
  border: 1.5px solid #d8d8d8;
  border-radius: 50%;
  background: #fff;
}
body.single-product .mac-product-section.mac-product-page-trial .mac-product-purchase .mac-variation-choices button.mac-variation-choices__color:hover:not(:disabled) {
  border-color: #999;
  transform: translateY(-1px);
}
body.single-product .mac-product-section.mac-product-page-trial .mac-product-purchase .mac-variation-choices button.mac-variation-choices__color.is-active {
  border-color: #000;
  background: #fff;
  box-shadow: 0 0 0 2px #fff, 0 0 0 3.5px #000;
}
body.single-product .mac-product-section.mac-product-page-trial .mac-product-purchase .mac-variation-choices button:focus-visible {
  outline: 2px solid #000;
  outline-offset: 3px;
}
body.single-product .mac-product-section.mac-product-page-trial .mac-product-purchase .mac-variation-choices button:disabled {
  opacity: .38;
  cursor: not-allowed;
  transform: none;
}
body.single-product .mac-product-section.mac-product-page-trial .mac-product-purchase form.variations_form.has-mac-variation-choices .woocommerce-variation-price {
  display: none !important;
}
@media (max-width: 700px) {
  body.single-product .mac-product-section.mac-product-page-trial .mac-product-purchase .mac-variation-choices button {
    min-width: 96px;
    min-height: 42px;
    border-radius: 10px;
    font-size: 11px;
  }
  body.single-product .mac-product-section.mac-product-page-trial .mac-product-purchase .mac-variation-choices button.mac-variation-choices__color {
    width: 42px;
    height: 42px;
    min-width: 0;
    min-height: 0;
    border-radius: 50%;
  }
}
@media (prefers-reduced-motion: reduce) {
  body.single-product .mac-product-section.mac-product-page-trial .mac-product-purchase .mac-variation-choices button { transition: none; }
}

/* Bundle variations (.258): colour attributes render as wrapped swatches with the
   selected shade name; size-like attributes keep the compact text chips. */
html body :is(.bundle-builder--modal, .bundle-builder--page) .bundle-variant__current {
  margin: 0 0 5px;
  color: #6b6168;
  font: 500 11px/1.3 Montserrat, Arial, sans-serif;
}

html body :is(.bundle-builder--modal, .bundle-builder--page) .bundle-variant__current strong {
  color: #241a22;
  font-weight: 700;
}

html body :is(.bundle-builder--modal, .bundle-builder--page) .bundle-variant--color .bundle-modal-product-card__variant-options {
  gap: 6px;
}

html body :is(.bundle-builder--modal, .bundle-builder--page) .bundle-variant-option.bundle-variant-swatch {
  display: inline-grid;
  flex: 0 0 26px;
  place-items: center;
  width: 26px;
  height: 26px;
  min-width: 26px;
  min-height: 26px;
  padding: 0;
  border: 1px solid rgba(36, 26, 34, .14);
  border-radius: 50%;
  background: #fff;
}

html body :is(.bundle-builder--modal, .bundle-builder--page) .bundle-variant-swatch__dot {
  display: block;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--swatch, #ddd);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .08);
}

html body :is(.bundle-builder--modal, .bundle-builder--page) .bundle-variant-option.bundle-variant-swatch.is-active {
  border: 2px solid #241a22;
  background: #fff;
}

html body :is(.bundle-builder--modal, .bundle-builder--page) .bundle-variant-option.bundle-variant-swatch.is-active .bundle-variant-swatch__dot {
  width: 18px;
  height: 18px;
}

/* Bundle popup layout (.258, desktop/tablet): filters span both columns, products and
   "Твоят комплект" share one scroll area, and the summary is content-sized, starts level
   with the first card row and stays in view (sticky). Mobile (<=760px) is unchanged. */
@media (min-width: 761px) {
  html body dialog.mac-bundle-modal .bundle-builder--modal {
    padding: 0;
  }

  html body dialog.mac-bundle-modal .bundle-builder--modal .bundle-layout {
    --bundle-filters-h: 78px;
    display: grid;
    flex: 1 1 auto;
    grid-template-columns: minmax(0, 1fr) clamp(280px, 25vw, 340px);
    grid-template-rows: auto auto;
    align-items: start;
    align-content: start;
    column-gap: 24px;
    row-gap: 0;
    width: 100%;
    max-width: none;
    height: 100%;
    min-height: 0;
    margin: 0;
    padding: 0 28px 28px;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    box-sizing: border-box;
    container-type: size;
  }

  html body dialog.mac-bundle-modal .bundle-builder--modal .bundle-products {
    display: contents;
  }

  html body dialog.mac-bundle-modal .bundle-builder--modal .bundle-category-filters {
    position: sticky;
    top: 0;
    z-index: 4;
    grid-column: 1 / -1;
    grid-row: 1;
    align-items: center;
    min-height: var(--bundle-filters-h);
    margin: 0;
    padding: 18px 64px 14px 0;
    background: #e9e7e7;
    box-sizing: border-box;
  }

  html body dialog.mac-bundle-modal .bundle-builder--modal .bundle-product-scroll {
    display: block;
    grid-column: 1;
    grid-row: 2;
    height: auto;
    min-height: 0;
    overflow: visible;
    scrollbar-gutter: auto;
  }

  html body dialog.mac-bundle-modal .bundle-builder--modal .bundle-product-grid {
    height: auto;
    overflow: visible;
  }

  html body dialog.mac-bundle-modal .bundle-builder--modal .bundle-cart {
    position: sticky;
    top: var(--bundle-filters-h);
    display: flex;
    flex-direction: column;
    grid-column: 2;
    grid-row: 2;
    align-self: start;
    height: auto;
    min-height: 0;
    max-height: calc(100dvh - 240px);
    max-height: calc(100cqh - var(--bundle-filters-h) - 28px);
    border-radius: 20px;
    background: #fff;
    overflow: hidden;
  }

  html body dialog.mac-bundle-modal .bundle-builder--modal .bundle-cart__desktop {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    height: auto;
    min-height: 0;
  }

  html body dialog.mac-bundle-modal .bundle-builder--modal .bundle-cart__desktop-items {
    display: flex;
    flex: 0 1 auto;
    flex-direction: column-reverse;
    min-height: 0;
    overflow: hidden;
  }

  html body dialog.mac-bundle-modal .bundle-builder--modal .bundle-cart__desktop .bundle-cart__items {
    flex: 0 1 auto;
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
  }

  html body dialog.mac-bundle-modal .bundle-builder--modal .bundle-cart__desktop .bundle-cart__row--saving {
    margin: 0;
    padding: 8px 16px 2px;
    background: #f7f7f7;
  }

  html body dialog.mac-bundle-modal .bundle-builder--modal .bundle-cart__bottom {
    flex: 0 0 auto;
  }
}

@media (min-width: 761px) and (max-width: 1100px) {
  html body dialog.mac-bundle-modal .bundle-builder--modal .bundle-product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Bundle popup on phones (.259): full-screen sheet, close button beside the filters,
   full-width two-column grid with compact cards, and a one-row summary bar
   (thin progress, total, "Виж комплекта", cart CTA) so about two rows of products stay visible. */
@media (max-width: 760px) {
  html body dialog.mac-bundle-modal {
    inset: 0;
    width: 100vw;
    height: 100dvh;
    max-width: none;
    max-height: none;
    margin: 0;
    border: 0;
    border-radius: 0;
  }

  html body dialog.mac-bundle-modal .mac-bundle-modal__close {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 6;
    width: 32px;
    height: 32px;
  }

  html body dialog.mac-bundle-modal .bundle-builder--modal {
    padding: 10px 10px 0;
  }

  html body dialog.mac-bundle-modal .bundle-builder--modal .bundle-layout {
    grid-template-rows: minmax(0, 1fr) auto;
    gap: 0;
    width: 100%;
    max-width: none;
    margin: 0;
  }

  html body dialog.mac-bundle-modal .bundle-builder--modal .bundle-category-filters {
    gap: 6px;
    min-height: 32px;
    margin: 0 0 8px;
    padding: 0 46px 0 0;
  }

  html body dialog.mac-bundle-modal .bundle-builder--modal .bundle-category-pill {
    min-height: 32px;
    height: 32px;
    padding: 0 13px;
    font-size: 11px;
  }

  html body dialog.mac-bundle-modal .bundle-builder--modal .bundle-product-grid {
    gap: 8px;
    padding-bottom: 10px;
  }

  html body dialog.mac-bundle-modal .bundle-builder--modal .bundle-modal-product-card .mac-bestsellers__photo {
    height: 118px;
    margin-top: 6px;
    aspect-ratio: auto;
  }

  html body dialog.mac-bundle-modal .bundle-builder--modal .bundle-modal-product-card .mac-bestsellers__photo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
  }

  html body dialog.mac-bundle-modal .bundle-builder--modal .bundle-modal-product-card__info {
    gap: 5px;
    padding: 6px 8px 8px;
  }

  html body dialog.mac-bundle-modal .bundle-builder--modal .bundle-modal-product-card .mac-bestsellers__name {
    display: -webkit-box;
    height: auto;
    min-height: 0;
    overflow: hidden;
    font-size: 11px;
    line-height: 1.3;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  html body dialog.mac-bundle-modal .bundle-builder--modal .bundle-modal-product-card__add {
    min-height: 30px;
    height: 30px;
  }

  html body dialog.mac-bundle-modal .bundle-builder--modal .bundle-cart {
    margin: 0 -10px;
    border-radius: 18px 18px 0 0;
    background: #fff;
    box-shadow: 0 -8px 24px rgba(36, 26, 34, .1);
  }

  html body dialog.mac-bundle-modal .bundle-builder--modal .bundle-cart__mobile {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "progress progress"
      "total cta"
      "details cta";
    align-items: center;
    column-gap: 12px;
    row-gap: 0;
    padding: 6px 14px calc(10px + env(safe-area-inset-bottom));
  }

  html body dialog.mac-bundle-modal .bundle-builder--modal .bundle-cart__mobile > .bundle-progress {
    grid-area: progress;
    padding: 0;
    background: none;
  }

  html body dialog.mac-bundle-modal .bundle-builder--modal .bundle-cart__mobile > .bundle-progress .bundle-progress__summary {
    display: none;
  }

  html body dialog.mac-bundle-modal .bundle-builder--modal .bundle-cart__mobile > .bundle-progress .bundle-progress__track {
    height: 4px;
    margin: 16px 10px 8px;
  }

  html body dialog.mac-bundle-modal .bundle-builder--modal .bundle-cart__mobile-bottom {
    display: contents;
  }

  html body dialog.mac-bundle-modal .bundle-builder--modal .bundle-cart__mobile-bottom .bundle-cart__row--total {
    grid-area: total;
    display: flex;
    align-items: baseline;
    gap: 6px;
    min-height: 0;
    margin: 0;
    padding: 0;
    border: 0;
    background: none;
  }

  html body dialog.mac-bundle-modal .bundle-builder--modal .bundle-cart__mobile-bottom .bundle-cart__row--total span {
    font-size: 11px;
  }

  html body dialog.mac-bundle-modal .bundle-builder--modal .bundle-cart__mobile-bottom .bundle-cart__row--total strong {
    font-size: 18px;
    line-height: 1.15;
  }

  html body dialog.mac-bundle-modal .bundle-builder--modal .bundle-cart__mobile-bottom .bundle-cart__checkout {
    grid-area: cta;
    width: auto;
    min-width: 150px;
    min-height: 44px;
    margin: 0;
    padding: 0 16px;
  }

  html body dialog.mac-bundle-modal .bundle-builder--modal .bundle-cart__mobile > .bundle-cart__disclosure {
    grid-area: details;
    min-width: 0;
    margin: 0;
    border: 0;
  }

  html body dialog.mac-bundle-modal .bundle-builder--modal .bundle-cart__mobile .bundle-cart__details-toggle {
    justify-content: flex-start;
    gap: 4px;
    min-height: 22px;
    height: 22px;
    padding: 0;
    border: 0;
    background: none;
    font-size: 11px;
    text-decoration: underline;
    text-underline-offset: 2px;
  }
}

/* Bundle summary items (.260): regular-weight product names, bundle price shown as
   struck base price + discounted price, and an icon-only close for the mobile details. */
html body :is(.mac-bundle-modal, .bundle-builder--page) .bundle-cart__item .bundle-cart__product {
  font-weight: 500;
}

html body :is(.mac-bundle-modal, .bundle-builder--page) .bundle-cart__item .bundle-cart__price {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px;
}

html body :is(.mac-bundle-modal, .bundle-builder--page) .bundle-cart__item .bundle-cart__price del {
  color: #8a8a8a;
  font-weight: 500;
  text-decoration: line-through;
}

html body :is(.mac-bundle-modal, .bundle-builder--page) .bundle-cart__item .bundle-cart__price ins {
  color: #7f4aa8;
  font-weight: 800;
  text-decoration: none;
}

@media (max-width: 760px) {
  html body dialog.mac-bundle-modal .bundle-builder--modal .bundle-category-filters {
    gap: 5px;
    margin-right: 42px;
    padding-right: 0;
  }

  html body dialog.mac-bundle-modal .bundle-builder--modal .bundle-category-pill {
    min-height: 30px;
    height: 30px;
    padding: 0 11px;
    font-size: 10px;
  }

  html body dialog.mac-bundle-modal .mac-bundle-modal__close {
    top: 10px;
    right: 10px;
    margin: 0;
  }

  html body dialog.mac-bundle-modal .bundle-builder--modal .bundle-cart__mobile .bundle-cart__details-toggle .bundle-cart__details-icon {
    display: none;
  }

  html body dialog.mac-bundle-modal .bundle-builder--modal .bundle-cart__details-list .bundle-cart__product {
    font-size: 11px;
    line-height: 1.3;
  }

  html body dialog.mac-bundle-modal .bundle-builder--modal .bundle-cart__details-list .bundle-cart__price {
    font-size: 11px;
  }

  html body dialog.mac-bundle-modal .bundle-builder--modal .bundle-cart__details-close {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    min-height: 34px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: #eda5c8;
    color: #000;
  }
}

/* Bundle totals (.261): the final price shows the struck pre-discount total beside it,
   and on phones the savings line sits directly under the final price, left of the CTA. */
html body :is(.mac-bundle-modal, .bundle-builder--page) .bundle-cart__total-amount {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: flex-end;
  gap: 2px 8px;
  min-width: 0;
}

html body :is(.mac-bundle-modal, .bundle-builder--page) .bundle-cart__total-amount del {
  color: #8a8a8a;
  font-size: 13px;
  font-weight: 500;
  text-decoration: line-through;
}

html body :is(.mac-bundle-modal, .bundle-builder--page) .bundle-cart__saving-percent {
  font-size: .85em;
  font-weight: 700;
}

@media (max-width: 760px) {
  html body dialog.mac-bundle-modal .bundle-builder--modal .bundle-cart__total-amount {
    justify-content: flex-start;
    font-size: inherit;
  }

  html body dialog.mac-bundle-modal .bundle-builder--modal .bundle-cart__total-amount del {
    font-size: 12px;
  }

  html body dialog.mac-bundle-modal .bundle-builder--modal .bundle-cart__details-bottom {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "total cta"
      "saving cta";
    gap: 3px 12px;
    padding-top: 10px;
  }

  html body dialog.mac-bundle-modal .bundle-builder--modal .bundle-cart__details-bottom .bundle-cart__row--total {
    grid-area: total;
  }

  html body dialog.mac-bundle-modal .bundle-builder--modal .bundle-cart__details-bottom .bundle-cart__row--saving {
    grid-area: saving;
    grid-column: auto;
    justify-content: flex-start;
    gap: 5px;
    padding: 0;
    border: 0;
    background: none;
    font-size: 12px;
  }

  html body dialog.mac-bundle-modal .bundle-builder--modal .bundle-cart__details-bottom .bundle-cart__row--saving strong {
    font-size: 12px;
  }

  html body dialog.mac-bundle-modal .bundle-builder--modal .bundle-cart__details-bottom .bundle-cart__checkout {
    grid-area: cta;
    align-self: center;
    width: auto;
    min-width: 150px;
    min-height: 48px;
    padding-inline: 16px;
    font-size: 11px;
  }
}

/* Bundle cards (.262): an added product's button turns into "ПРЕМАХНИ" — a light
   outlined state that is clearly different from the pink "ДОБАВИ" call to action. */
html body :is(.bundle-builder--modal, .bundle-builder--page) .bundle-modal-product-card .bundle-modal-product-card__add.is-remove,
html body :is(.bundle-builder--modal, .bundle-builder--page) .bundle-modal-product-card .bundle-modal-product-card__add.is-remove:is(:hover, :focus-visible, :active) {
  /* !important is required: approved-bundle-reference.css forces the pink fill with !important. */
  border: 1.5px solid #c9a9dc !important;
  background: #fff !important;
  color: #7f4aa8;
  opacity: 1;
  cursor: pointer;
}

html body :is(.bundle-builder--modal, .bundle-builder--page) .bundle-modal-product-card .bundle-modal-product-card__add.is-remove::before,
html body :is(.bundle-builder--modal, .bundle-builder--page) .bundle-modal-product-card .bundle-modal-product-card__add.is-remove::after {
  display: none;
}

html body :is(.bundle-builder--modal, .bundle-builder--page) .bundle-modal-product-card .bundle-modal-product-card__add.is-remove .macaroma-hover-label {
  color: #7f4aa8;
}

html body :is(.bundle-builder--modal, .bundle-builder--page) .bundle-modal-product-card .bundle-modal-product-card__add.is-remove .macaroma-hover-label::before {
  content: "✕";
  margin-right: 6px;
  font-size: .95em;
}

@media (hover: hover) {
  html body :is(.bundle-builder--modal, .bundle-builder--page) .bundle-modal-product-card .bundle-modal-product-card__add.is-remove:hover {
    background: #f4ecf9 !important;
  }
}

/* Create Package page (.264): the popup design adapted to a normal page.
   Desktop/tablet: categories above both columns, "Твоят комплект" starts level with the
   first card row, stays sticky and is content-sized. Phones: the page scrolls naturally
   (no inner scroll area), compact popup-style cards, and the summary bar is fixed to the
   bottom of the screen with "Виж детайлите" opening as a bottom sheet. */
@media (min-width: 761px) {
  html body .bundle-builder--page .bundle-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) clamp(300px, 25vw, 365px);
    grid-template-rows: auto auto auto auto;
    align-items: start;
    column-gap: 24px;
    row-gap: 0;
  }

  html body .bundle-builder--page .bundle-products {
    display: contents;
  }

  html body .bundle-builder--page .bundle-category-filters {
    grid-column: 1 / -1;
    grid-row: 1;
    justify-content: flex-start;
    margin: 0 0 16px;
    padding: 4px 0;
  }

  html body .bundle-builder--page .bundle-product-grid {
    grid-column: 1;
    grid-row: 2;
  }

  html body .bundle-builder--page .bundle-pagination {
    grid-column: 1;
    grid-row: 3;
  }

  html body .bundle-builder--page .bundle-page-status {
    grid-column: 1;
    grid-row: 4;
  }

  html body .bundle-builder--page .bundle-cart {
    display: flex;
    flex-direction: column;
    grid-column: 2;
    grid-row: 2 / span 3;
    align-self: start;
    height: auto;
    max-height: calc(100vh - 130px);
    border-radius: 20px;
    background: #fff;
    overflow: hidden;
  }

  html body .bundle-builder--page .bundle-cart__desktop {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    height: auto;
    min-height: 0;
  }

  html body .bundle-builder--page .bundle-cart__desktop-items {
    display: flex;
    flex: 0 1 auto;
    flex-direction: column-reverse;
    min-height: 0;
    overflow: hidden;
  }

  html body .bundle-builder--page .bundle-cart__desktop .bundle-cart__items {
    flex: 0 1 auto;
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
  }

  html body .bundle-builder--page .bundle-cart__desktop .bundle-cart__row--saving {
    margin: 0;
    padding: 8px 16px 2px;
    background: #f7f7f7;
  }

  html body .bundle-builder--page .bundle-cart__bottom {
    flex: 0 0 auto;
  }
}

@media (min-width: 761px) and (max-width: 1100px) {
  html body .bundle-builder--page .bundle-product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  html body .bundle-builder--page {
    display: block;
    height: auto;
    overflow: visible;
    padding-bottom: calc(118px + env(safe-area-inset-bottom));
  }

  /* The page keeps its title (hidden while it behaved like the popup). */
  html body .bundle-builder--page .bundle-catalog-intro {
    position: static !important;
    width: auto !important;
    height: auto !important;
    margin: 0 !important;
    padding: 6px 10px 12px !important;
    overflow: visible !important;
    clip: auto !important;
    white-space: normal !important;
  }

  html body .bundle-builder--page .bundle-layout {
    display: block;
    position: static;
    width: auto;
    height: auto;
    max-height: none;
    min-height: 0;
    max-width: none;
    margin: 0 10px;
    overflow: visible;
  }

  html body .bundle-builder--page .bundle-products {
    display: block;
    height: auto;
    min-height: 0;
    overflow: visible;
  }

  html body .bundle-builder--page .bundle-category-filters {
    gap: 6px;
    min-height: 32px;
    margin: 0 0 10px;
    padding: 0;
  }

  html body .bundle-builder--page .bundle-category-pill {
    min-height: 32px;
    height: 32px;
    padding: 0 13px;
    font-size: 11px;
  }

  html body .bundle-builder--page #productGrid.bundle-product-grid {
    flex: none;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    height: auto;
    max-height: none;
    overflow: visible;
  }

  html body .bundle-builder--page .bundle-modal-product-card .mac-bestsellers__photo {
    height: 118px;
    margin-top: 6px;
    aspect-ratio: auto;
  }

  html body .bundle-builder--page .bundle-modal-product-card .mac-bestsellers__photo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
  }

  html body .bundle-builder--page .bundle-modal-product-card__info {
    gap: 5px;
    padding: 6px 8px 8px;
  }

  html body .bundle-builder--page .bundle-modal-product-card .mac-bestsellers__name {
    display: -webkit-box;
    height: auto;
    min-height: 0;
    overflow: hidden;
    font-size: 11px;
    line-height: 1.3;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  html body .bundle-builder--page .bundle-modal-product-card .bundle-modal-product-card__actions {
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
  }

  html body .bundle-builder--page .bundle-modal-product-card .bundle-modal-product-card__pricebox {
    order: 1;
    text-align: left;
  }

  html body .bundle-builder--page .bundle-modal-product-card .bundle-modal-product-card__footer {
    order: 2;
    width: 100%;
  }

  html body .bundle-builder--page .bundle-modal-product-card__add {
    width: 100%;
    min-height: 30px;
    height: 30px;
  }

  html body .bundle-builder--page #basket.bundle-cart {
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    top: auto;
    z-index: 60;
    width: auto;
    height: auto;
    max-height: none;
    margin: 0;
    border-radius: 18px 18px 0 0;
    background: #fff;
    box-shadow: 0 -8px 24px rgba(36, 26, 34, .12);
  }

  html body .bundle-builder--page .bundle-cart__mobile {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "progress progress"
      "total cta"
      "details cta";
    align-items: center;
    column-gap: 12px;
    row-gap: 0;
    padding: 6px 14px calc(10px + env(safe-area-inset-bottom));
  }

  html body .bundle-builder--page .bundle-cart__mobile > .bundle-progress {
    grid-area: progress;
    padding: 0;
    background: none;
  }

  html body .bundle-builder--page .bundle-cart__mobile > .bundle-progress .bundle-progress__summary {
    display: none;
  }

  html body .bundle-builder--page .bundle-cart__mobile > .bundle-progress .bundle-progress__track {
    height: 4px;
    margin: 16px 10px 8px;
  }

  html body .bundle-builder--page .bundle-cart__mobile-bottom {
    display: contents;
  }

  html body .bundle-builder--page .bundle-cart__mobile-bottom .bundle-cart__row--total {
    grid-area: total;
    min-height: 0;
    margin: 0;
    padding: 0;
    border: 0;
    background: none;
  }

  html body .bundle-builder--page .bundle-cart__mobile-bottom .bundle-cart__row--total strong {
    font-size: 18px;
    line-height: 1.15;
  }

  html body .bundle-builder--page .bundle-cart__mobile-bottom .bundle-cart__checkout {
    grid-area: cta;
    width: auto;
    min-width: 150px;
    min-height: 44px;
    margin: 0;
    padding: 0 16px;
  }

  html body .bundle-builder--page .bundle-cart__mobile > .bundle-cart__disclosure {
    grid-area: details;
    min-width: 0;
    margin: 0;
    border: 0;
  }

  html body .bundle-builder--page .bundle-cart__mobile .bundle-cart__details-toggle {
    justify-content: flex-start;
    gap: 4px;
    min-height: 22px;
    height: 22px;
    padding: 0;
    border: 0;
    background: none;
    font-size: 11px;
    text-decoration: underline;
    text-underline-offset: 2px;
  }

  html body .bundle-builder--page .bundle-cart__mobile .bundle-cart__details-toggle .bundle-cart__details-icon {
    display: none;
  }

  html body .bundle-builder--page .bundle-cart__details-panel {
    position: fixed;
    top: auto;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 61;
    max-height: 86dvh;
    padding: 14px 14px calc(12px + env(safe-area-inset-bottom));
    border-radius: 18px 18px 0 0;
    background: #fff;
    box-shadow: 0 -12px 32px rgba(36, 26, 34, .18);
  }

  html body .bundle-builder--page .bundle-cart__details-list {
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
  }

  html body .bundle-builder--page .bundle-cart__details-list .bundle-cart__product,
  html body .bundle-builder--page .bundle-cart__details-list .bundle-cart__price {
    font-size: 11px;
    line-height: 1.3;
  }

  html body .bundle-builder--page .bundle-cart__details-close {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    min-height: 34px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: #eda5c8;
    color: #000;
  }

  html body .bundle-builder--page .bundle-cart__total-amount {
    justify-content: flex-start;
  }

  html body .bundle-builder--page .bundle-cart__total-amount del {
    font-size: 12px;
  }

  html body .bundle-builder--page .bundle-cart__details-bottom {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "total cta"
      "saving cta";
    gap: 3px 12px;
    padding-top: 10px;
  }

  html body .bundle-builder--page .bundle-cart__details-bottom .bundle-cart__row--total {
    grid-area: total;
  }

  html body .bundle-builder--page .bundle-cart__details-bottom .bundle-cart__row--saving {
    grid-area: saving;
    grid-column: auto;
    justify-content: flex-start;
    gap: 5px;
    padding: 0;
    border: 0;
    background: none;
    font-size: 12px;
  }

  html body .bundle-builder--page .bundle-cart__details-bottom .bundle-cart__row--saving strong {
    font-size: 12px;
  }

  html body .bundle-builder--page .bundle-cart__details-bottom .bundle-cart__checkout {
    grid-area: cta;
    align-self: center;
    width: auto;
    min-width: 150px;
    min-height: 48px;
    padding-inline: 16px;
    font-size: 11px;
  }
}

/* Create Package title and breadcrumb (.265, .266 specificity/gutter fix): same typography as the category pages
   (e.g. Козметика), in black because this page has no photo hero. */
html body .bundle-builder--page .bundle-catalog-intro .mac-catalog__headline {
  margin: 0;
  color: #000;
  font: 900 64px/.87 Montserrat, sans-serif;
  letter-spacing: -.075em;
  text-transform: lowercase;
}

html body .bundle-builder--page .bundle-catalog-intro .bundle-breadcrumb,
html body .bundle-builder--page .bundle-catalog-intro .bundle-breadcrumb :is(a, span) {
  color: #000;
  font: 500 15px/1.25 Montserrat, sans-serif;
  letter-spacing: normal;
  text-transform: none;
}

html body .bundle-builder--page .bundle-catalog-intro .bundle-breadcrumb {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0 0 20px;
}

html body .bundle-builder--page .bundle-catalog-intro .bundle-breadcrumb svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linejoin: round;
}

@media (max-width: 760px) {
  /* Same side gutter and breathing room as the category intro on phones. */
  html body .bundle-builder--page .bundle-catalog-intro {
    padding: 26px 20px 26px !important;
  }

  html body .bundle-builder--page .bundle-catalog-intro .mac-catalog__headline {
    line-height: .94;
  }

  html body .bundle-builder--page .bundle-catalog-intro .bundle-breadcrumb,
  html body .bundle-builder--page .bundle-catalog-intro .bundle-breadcrumb :is(a, span) {
    font-size: 12px;
  }

  html body .bundle-builder--page .bundle-catalog-intro .bundle-breadcrumb {
    margin-bottom: 24px;
  }
}

/* Bundle details sheet (.267): slides in when opened, slides out before [open] is
   removed (JS adds .is-closing), and stays put without animation when the summary is
   re-rendered after removing a product (.is-static). */
@keyframes macaroma-bundle-sheet-in {
  from { opacity: 0; transform: translateY(102%); }
  to { opacity: 1; transform: translateY(0); }
}

html body :is(.mac-bundle-modal, .bundle-builder--page) .bundle-cart__disclosure[open].is-opening .bundle-cart__details-panel {
  animation: macaroma-bundle-sheet-in .26s ease;
}

html body :is(.mac-bundle-modal, .bundle-builder--page) .bundle-cart__disclosure[open].is-closing .bundle-cart__details-panel {
  animation: none;
  opacity: 0;
  pointer-events: none;
  transform: translateY(102%);
}

/* Restored after a re-render (no .is-opening): appear in place, no slide or fade. */
html body :is(.mac-bundle-modal, .bundle-builder--page) .bundle-cart__disclosure[open]:not(.is-opening, .is-closing) .bundle-cart__details-panel {
  transition: none;
}

/* (.268) While a product is removed, only its row fades; the summary is not dimmed. */
html body :is(.mac-bundle-modal, .bundle-builder--page) .bundle-cart.is-busy {
  opacity: 1;
}

html body :is(.mac-bundle-modal, .bundle-builder--page) .bundle-cart__item.is-removing {
  opacity: .35;
  transition: opacity .2s ease;
}

@media (prefers-reduced-motion: reduce) {
  html body :is(.mac-bundle-modal, .bundle-builder--page) .bundle-cart__disclosure[open].is-opening .bundle-cart__details-panel {
    animation: none;
  }
}

/* Shop product cards (.270). On phones every card stacks the price above a full-width button,
   so sale and regular cards look the same and prices never wrap beside the button. */

@media (max-width: 767px) {
  html body .mac-bestsellers .mac-bestsellers__card:not(.bundle-modal-product-card) .mac-bestsellers__row {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    grid-template-columns: none;
  }

  html body .mac-bestsellers .mac-bestsellers__card:not(.bundle-modal-product-card) .mac-bestsellers__row > .mac-bestsellers__pricebox {
    order: 1;
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: flex-start;
    gap: 2px 8px;
    width: auto;
    min-width: 0;
    text-align: left;
  }

  html body .mac-bestsellers .mac-bestsellers__card:not(.bundle-modal-product-card) .mac-bestsellers__pricebox :is(.mac-bestsellers__price, .mac-bestsellers__compare) {
    white-space: nowrap;
  }

  html body .mac-bestsellers .mac-bestsellers__card:not(.bundle-modal-product-card) .mac-bestsellers__row > :is(.mac-bestsellers__add, .mac-bestsellers__restock-action) {
    order: 2;
    width: 100%;
    max-width: none;
    margin: 0;
  }
}

/* Site-wide price colours (.271) — the one rule for prices everywhere:
   regular price = near-black, sale price and every discount/saving = purple (the "-%"
   badge colour), old struck price = grey. Prices inside coloured buttons are not changed. */
:root {
  --mac-price-regular: #241a22;
  --mac-price-sale: #7f4aa8;
  --mac-price-old: #8a8a8a;
}

/* WooCommerce price markup (single product, related products, cart, checkout). */
html body .price,
html body .price > .woocommerce-Price-amount {
  color: var(--mac-price-regular);
}

html body .price del,
html body .price del .woocommerce-Price-amount,
html body .woocommerce-variation-price del,
html body .woocommerce-variation-price del .woocommerce-Price-amount {
  color: var(--mac-price-old);
}

html body .price ins,
html body .price ins .woocommerce-Price-amount,
html body .woocommerce-variation-price ins,
html body .woocommerce-variation-price ins .woocommerce-Price-amount {
  color: var(--mac-price-sale);
  text-decoration: none;
}

/* Single product price block. */
html body .mac-product-section .mac-product-price .price,
html body .mac-product-section .mac-product-price .price .woocommerce-Price-amount {
  color: var(--mac-price-regular);
}

html body .mac-product-section .mac-product-price .price del,
html body .mac-product-section .mac-product-price .price del .woocommerce-Price-amount {
  color: var(--mac-price-old);
}

html body .mac-product-section .mac-product-price .price ins,
html body .mac-product-section .mac-product-price .price ins .woocommerce-Price-amount,
html body .mac-product-section .mac-product-price [data-mac-price-sale] {
  color: var(--mac-price-sale);
}

html body .mac-quantity__savings {
  color: var(--mac-price-sale);
}

/* Cart drawer. */
html body #mac-cart-ui :is(.mc-item-price, .mc-related-price),
html body #mac-cart-ui :is(.mc-item-price, .mc-related-price) .woocommerce-Price-amount {
  color: var(--mac-price-regular);
}

html body #mac-cart-ui :is(.mc-item-price, .mc-related-price) del,
html body #mac-cart-ui :is(.mc-item-price, .mc-related-price) del .woocommerce-Price-amount {
  color: var(--mac-price-old);
}

html body #mac-cart-ui :is(.mc-item-price, .mc-related-price) ins,
html body #mac-cart-ui :is(.mc-item-price, .mc-related-price) ins .woocommerce-Price-amount,
html body #mac-cart-ui .mc-discount-savings,
html body #mac-cart-ui .mc-discount-savings strong {
  color: var(--mac-price-sale);
  text-decoration: none;
}

html body #mac-cart-ui :is(.mc-item-price, .mc-related-price) del {
  text-decoration: line-through;
}

/* PLAN 83: bundle / quantity-offer items show the price without the discount struck through (drawer, cart, checkout). */
html body .mac-cart-was,
html body .mac-cart-was .woocommerce-Price-amount {
  color: var(--mac-price-old, #8a8a8a);
  font-size: .86em;
  font-weight: 500;
  text-decoration: line-through;
}
html body .mac-cart-now,
html body .mac-cart-now .woocommerce-Price-amount {
  color: var(--mac-price-sale, #7f4aa8);
  text-decoration: none;
  background: none;
}

/* Create Package (popup and page): savings rows use the sale colour. */
html body .bundle-cart__row--saving,
html body .bundle-cart__row--saving strong,
html body .bundle-cart__row--saving span {
  color: var(--mac-price-sale);
}

html body .bundle-cart__item .bundle-cart__price,
html body .bundle-cart__row--total strong {
  color: var(--mac-price-regular);
}

/* Search results and Shop the look. */
html body .mac-search-result__price {
  color: var(--mac-price-regular);
}

html body .mac-search-result__price del {
  color: var(--mac-price-old);
}

html body .mac-search-result__price ins {
  color: var(--mac-price-sale);
  text-decoration: none;
}

html body .mac-look__prices,
html body .mac-look__prices .woocommerce-Price-amount {
  color: var(--mac-price-regular);
}

html body .mac-look__prices del,
html body .mac-look__prices del .woocommerce-Price-amount {
  color: var(--mac-price-old);
}

html body .mac-look__prices ins,
html body .mac-look__prices ins .woocommerce-Price-amount {
  color: var(--mac-price-sale);
  text-decoration: none;
}

/* Phone product carousels (PLAN 42, 46): one full card plus half of the next instead of one
   full-width card, with the compact look of the catalog grid. Related products on the product
   page keep their own layout. theme.js counts 1 visible card at this width. */
@media (max-width: 560px) {
  body .mac-bestsellers:not(.mac-related-products) .mac-bestsellers__track { gap: 10px; }
  body .mac-bestsellers:not(.mac-related-products) .mac-bestsellers__slide {
    flex-basis: calc((100% - 10px) / 1.5);
    max-width: calc((100% - 10px) / 1.5);
  }
  body .mac-bestsellers:not(.mac-related-products):has(.mac-bestsellers__track) .mac-bestsellers__nav { display: none; }
  body .mac-bestsellers:not(.mac-related-products) .mac-bestsellers__title { font-size: 32px; }

  body .mac-bestsellers .mac-bestsellers__track .mac-bestsellers__info { padding: 14px 12px 14px; container-type: inline-size; }
  body .mac-bestsellers .mac-bestsellers__track .mac-bestsellers__badges { top: 10px; left: 10px; max-width: calc(100% - 20px); gap: 4px; }
  body .mac-bestsellers .mac-bestsellers__track .mac-bestsellers__badge { min-height: 24px; padding: 0 9px; font-size: 10px; }
  body .mac-bestsellers .mac-bestsellers__track .mac-bestsellers__badge--stock { top: 10px; right: 10px; padding: 0 7px; font-size: 9px; }
  body .mac-bestsellers .mac-bestsellers__track .mac-bestsellers__brand { font-size: 10px; }
  body .mac-bestsellers .mac-bestsellers__track .mac-bestsellers__name { max-height: 56px; font-size: 14px; line-height: 1.3; -webkit-line-clamp: 3; }
  body .mac-bestsellers .mac-bestsellers__track .mac-bestsellers__name a { display: -webkit-box; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 3; }
  body .mac-bestsellers .mac-bestsellers__track .mac-bestsellers__price { font-size: 15px; }
}

/* Phones only: tablets with three cards per row keep price and button side by side. */
@media (max-width: 560px) {
  @container (max-width: 260px) {
    body .mac-bestsellers .mac-bestsellers__track .mac-bestsellers__row { grid-template-columns: minmax(0, 1fr); gap: 8px; }
    body .mac-bestsellers .mac-bestsellers__track .mac-bestsellers__row > .mac-bestsellers__add {
      order: 2;
      width: 100%;
      min-width: 0;
      min-height: 36px;
      padding-inline: 8px;
      font-size: 10px;
    }
    body .mac-bestsellers .mac-bestsellers__track .mac-bestsellers__pricebox { order: 1; min-width: 0; text-align: left; white-space: normal; justify-content: flex-start; }
    body .mac-bestsellers .mac-bestsellers__track .mac-bestsellers__card--sale .mac-bestsellers__row { grid-template-columns: minmax(0, 1fr); }
  }
}

/* Product page summary (PLAN 45): brand above a calmer title, the price close under it and the
   short description as plain body text. Overrides the 34px !important title from
   approved-product-reference.css. */
body .mac-product-section.mac-product-page-trial .mac-product-brand {
  margin: 0 0 8px;
  color: var(--mb-brand-pink, #b2477d);
  font: 500 12px/1.25 "Montserrat", Arial, sans-serif;
  letter-spacing: .15em;
  text-transform: uppercase;
}
body .mac-product-section.mac-product-page-trial .mac-product-title {
  margin: 0 0 12px;
  font-size: 32px !important;
  font-weight: 800 !important;
  line-height: 1.12;
  letter-spacing: -.03em;
}
body .mac-product-section.mac-product-page-trial .mac-product-price--trial { margin: 0 0 14px; }
body .mac-product-section.mac-product-page-trial .mac-product-price--trial .price { font-size: 26px; }
body .mac-product-section.mac-product-page-trial .mac-product-description--trial,
body .mac-product-section.mac-product-page-trial .mac-product-description--trial p {
  color: #4b4b4b;
  font-size: 15px;
  font-weight: 400;
  line-height: 1.6;
}
/* Many imported short descriptions are wrapped in <strong> as a whole; keep only a light emphasis. */
body .mac-product-section.mac-product-page-trial .mac-product-description--trial :is(strong, b) { font-weight: 500; }

@media (max-width: 700px) {
  body .mac-product-section.mac-product-page-trial .mac-product-brand { margin-bottom: 6px; font-size: 11px; }
  body .mac-product-section.mac-product-page-trial .mac-product-title {
    margin-bottom: 10px;
    font-size: 23px !important;
    line-height: 1.2;
    letter-spacing: -.02em;
  }
  body .mac-product-section.mac-product-page-trial .mac-product-price--trial { margin-bottom: 12px; }
  body .mac-product-section.mac-product-page-trial .mac-product-price--trial .price { font-size: 24px; }
  body .mac-product-section.mac-product-page-trial .mac-product-price--trial .price del { font-size: 14px; }
  body .mac-product-section.mac-product-page-trial .mac-product-description--trial { margin-top: 0; }
}

/* PLAN 55: one badge language for cards and the product gallery.
 * Sale stays purple (it matches the promo price rule), new is black, a custom badge is the brand
 * pink, and "Изчерпан" is a quiet status: white, grey text, thin outline and a grey dot. */
body .mac-bestsellers .mac-bestsellers__badge,
body .mac-product-section .mac-product-status-badge {
  gap: 6px;
  min-height: 28px;
  padding: 0 12px;
  font: 800 11px/1 "Montserrat", Arial, sans-serif;
  letter-spacing: .04em;
  text-transform: uppercase;
}
body .mac-bestsellers .mac-bestsellers__badge--new,
body .mac-product-section .mac-product-status-badge--new {
  background: #000;
  color: #fff;
}
body .mac-bestsellers .mac-bestsellers__badge--soft {
  background: #EDA5C8;
  color: #000;
}
body .mac-bestsellers .mac-bestsellers__badge--stock,
body .mac-product-section .mac-product-status-badge--stock,
body .mac-product-section.mac-product-page-trial .mac-product-purchase .stock.out-of-stock {
  gap: 6px;
  background: rgba(255, 255, 255, .92);
  color: #4b4b4b;
  box-shadow: inset 0 0 0 1px #ddd3d5;
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}
body .mac-product-section.mac-product-page-trial .mac-product-purchase .stock.out-of-stock {
  min-height: 30px;
  font: 800 11px/1 "Montserrat", Arial, sans-serif;
  letter-spacing: .04em;
  text-transform: uppercase;
}
@media (max-width: 560px) {
  body .mac-product-section .mac-product-status-badge { min-height: 26px; padding: 0 10px; font-size: 10px; }
}

/* PLAN 55: zoom in the bottom-right corner of the photo (product-page.js moves it into the
 * slider viewport; with a single photo the gallery is the photo). */
body .mac-product-section .woocommerce-product-gallery__trigger {
  top: auto !important;
  right: 14px !important;
  bottom: 14px !important;
  left: auto !important;
}

/* PLAN 56: "Viral" for TikTok Viral products – black, white type and the TikTok Viral menu glitch. */
body .mac-bestsellers .mac-bestsellers__badge--viral,
body .mac-product-section .mac-product-status-badge--viral {
  background: #000;
  color: #fff;
  font-weight: 900;
  animation: mac-viral-glitch .5s linear infinite;
}
@keyframes mac-viral-glitch {
  0%, 100% { text-shadow: -1.5px -1.5px 0 #0ff, 1.5px 1.5px 0 #f00; }
  25% { text-shadow: 1.5px 1.5px 0 #0ff, -1.5px -1.5px 0 #f00; }
  50% { text-shadow: 1.5px -1.5px 0 #0ff, -1.5px 1.5px 0 #f00; }
  75% { text-shadow: -1.5px 1.5px 0 #0ff, 1.5px -1.5px 0 #f00; }
}
@media (prefers-reduced-motion: reduce) {
  body .mac-bestsellers .mac-bestsellers__badge--viral,
  body .mac-product-section .mac-product-status-badge--viral { animation: none; text-shadow: -1px -1px 0 #0ff, 1px 1px 0 #f00; }
}

/* PLAN 57: a calmer card.
 * The discount sits beside the struck-out price ("65,96 € −16%"), the price below it; the brand
 * keeps one line, the name two (three on phones), and the price weighs more than the button. */
html body .mac-bestsellers .mac-bestsellers__card:not(.bundle-modal-product-card) .mac-bestsellers__row > .mac-bestsellers__pricebox:has(> .mac-bestsellers__save) {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 3px 6px;
}
html body .mac-bestsellers .mac-bestsellers__card:not(.bundle-modal-product-card) .mac-bestsellers__row > .mac-bestsellers__pricebox:has(> .mac-bestsellers__save) > .mac-bestsellers__compare { order: 0; margin-top: 0; }
html body .mac-bestsellers .mac-bestsellers__card:not(.bundle-modal-product-card) .mac-bestsellers__row > .mac-bestsellers__pricebox > .mac-bestsellers__save { order: 1; }
html body .mac-bestsellers .mac-bestsellers__card:not(.bundle-modal-product-card) .mac-bestsellers__row > .mac-bestsellers__pricebox:has(> .mac-bestsellers__save) > .mac-bestsellers__price { order: 2; flex: 0 0 100%; text-align: inherit; }
body .mac-bestsellers .mac-bestsellers__save {
  display: inline-flex;
  align-items: center;
  min-height: 18px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--mb-sale-badge, #7f4aa8);
  color: #fff;
  font: 800 10px/1 "Montserrat", Arial, sans-serif;
  letter-spacing: .02em;
  white-space: nowrap;
}
body .mac-bestsellers .mac-bestsellers__price { font-size: 19px; font-weight: 800; letter-spacing: -.02em; }
body .mac-bestsellers .mac-bestsellers__card--sale .mac-bestsellers__price { font-size: 19px; font-weight: 800; }

/* Brand: one line, no reserved empty second line. */
body .mac-bestsellers .mac-bestsellers__info { grid-template-rows: 13.2px minmax(37.8px, 1fr) auto; gap: 6px; }
body .mac-bestsellers .mac-bestsellers__card--no-brand .mac-bestsellers__info { grid-template-rows: minmax(37.8px, 1fr) auto; }
body .mac-bestsellers .mac-bestsellers__brand {
  display: block;
  min-height: 13.2px;
  max-height: 13.2px;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow-wrap: normal;
}

/* Name: two lines with "…". */
body .mac-bestsellers .mac-bestsellers__name { height: 37.8px; max-height: 37.8px; -webkit-line-clamp: 2; }
body .mac-catalog__grid .mac-bestsellers__name a { -webkit-line-clamp: 2; }

/* Desktop: the price column gets a little more room, so the button is a little narrower. */
@media (min-width: 561px) {
  body .mac-bestsellers .mac-bestsellers__row { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); }
}

@media (max-width: 560px) {
  body .mac-bestsellers .mac-bestsellers__info { grid-template-rows: 13.2px minmax(56.7px, 1fr) auto; }
  body .mac-bestsellers .mac-bestsellers__card--no-brand .mac-bestsellers__info { grid-template-rows: minmax(56.7px, 1fr) auto; }
  body .mac-bestsellers .mac-bestsellers__name { height: 56.7px; max-height: 56.7px; -webkit-line-clamp: 3; }
  body .mac-catalog__grid .mac-bestsellers__name a { -webkit-line-clamp: 3; }
  body .mac-bestsellers .mac-bestsellers__price,
  body .mac-bestsellers .mac-bestsellers__card--sale .mac-bestsellers__price { font-size: 16px; }
}

/* Narrow two-column cards stack price under the button: keep the price group left-aligned. */
@container (max-width: 260px) {
  html body .mac-catalog__grid .mac-bestsellers__card:not(.bundle-modal-product-card) .mac-bestsellers__row > .mac-bestsellers__pricebox:has(> .mac-bestsellers__save) { justify-content: flex-start; text-align: left; }
}
/* Phones stack the price above a full-width button (.270): keep the price group left-aligned. */
@media (max-width: 767px) {
  html body .mac-bestsellers .mac-bestsellers__card:not(.bundle-modal-product-card) .mac-bestsellers__row > .mac-bestsellers__pricebox:has(> .mac-bestsellers__save) { justify-content: flex-start; text-align: left; }
}

/* PLAN 58: buttons on one line across a row of cards.
 * A sale price takes two lines (old price + "−16%", then the price). Every card keeps room for both
 * lines and sits its price on the lower one, so prices and buttons line up with or without a sale. */
@media (min-width: 768px) {
  html body .mac-bestsellers .mac-bestsellers__card:not(.bundle-modal-product-card) .mac-bestsellers__row > .mac-bestsellers__pricebox {
    display: flex;
    flex-wrap: wrap;
    align-content: flex-end;
    justify-content: flex-end;
    min-height: 46px;
  }
}
@media (max-width: 767px) {
  html body .mac-bestsellers .mac-bestsellers__card:not(.bundle-modal-product-card) .mac-bestsellers__row > .mac-bestsellers__pricebox {
    min-height: 46px;
    align-content: flex-end;
  }
}
@media (max-width: 560px) {
  html body .mac-bestsellers .mac-bestsellers__card:not(.bundle-modal-product-card) .mac-bestsellers__row > .mac-bestsellers__pricebox { min-height: 41px; }
}

/* PLAN 59: phones show the old and the sale price side by side, the "−16%" chip on the line above. */
@media (max-width: 767px) {
  html body .mac-bestsellers .mac-bestsellers__card:not(.bundle-modal-product-card) .mac-bestsellers__row > .mac-bestsellers__pricebox:has(> .mac-bestsellers__save) {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    grid-template-areas: "save save" "old price";
    align-content: end;
    align-items: baseline;
    justify-content: start;
    gap: 3px 6px;
  }
  html body .mac-bestsellers .mac-bestsellers__card:not(.bundle-modal-product-card) .mac-bestsellers__row > .mac-bestsellers__pricebox > .mac-bestsellers__save { grid-area: save; justify-self: start; }
  html body .mac-bestsellers .mac-bestsellers__card:not(.bundle-modal-product-card) .mac-bestsellers__row > .mac-bestsellers__pricebox:has(> .mac-bestsellers__save) > .mac-bestsellers__compare { grid-area: old; }
  html body .mac-bestsellers .mac-bestsellers__card:not(.bundle-modal-product-card) .mac-bestsellers__row > .mac-bestsellers__pricebox:has(> .mac-bestsellers__save) > .mac-bestsellers__price { grid-area: price; min-width: 0; }
}
/* Narrow phone cards: "Изчерпан" (top right) and VIRAL/НОВО (top left) would overlap, so the left
 * group starts under it. */
@media (max-width: 560px) {
  body .mac-bestsellers .mac-bestsellers__card--out-of-stock .mac-bestsellers__badges { top: 48px; }
  body .mac-bestsellers .mac-bestsellers__track .mac-bestsellers__card--out-of-stock .mac-bestsellers__badges { top: 40px; }
}

/* PLAN 60: desktop/tablet – a regular (not reduced) price sits centred beside the button. */
@media (min-width: 768px) {
  html body .mac-bestsellers .mac-bestsellers__card:not(.bundle-modal-product-card) .mac-bestsellers__row > .mac-bestsellers__pricebox:not(:has(> .mac-bestsellers__save)) { align-content: center; }
}

/* PLAN 61 (replaces the two-line phone layout of PLAN 59): on phones the old price, the sale price
 * and "−35%" share one line; sizes are trimmed so it fits a 360px screen, and the chip wraps only
 * if a price is ever too long. No reserved second line, so prices and buttons stay level. */
@media (max-width: 767px) {
  html body .mac-bestsellers .mac-bestsellers__card:not(.bundle-modal-product-card) .mac-bestsellers__row > .mac-bestsellers__pricebox {
    min-height: 24px;
    align-content: center;
  }
  html body .mac-bestsellers .mac-bestsellers__card:not(.bundle-modal-product-card) .mac-bestsellers__row > .mac-bestsellers__pricebox:has(> .mac-bestsellers__save) {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-start;
    gap: 3px 4px;
    padding-inline-end: 0;
  }
  html body .mac-bestsellers .mac-bestsellers__card:not(.bundle-modal-product-card) .mac-bestsellers__row > .mac-bestsellers__pricebox:has(> .mac-bestsellers__save) > .mac-bestsellers__compare { order: 0; font-size: 10px; }
  html body .mac-bestsellers .mac-bestsellers__card:not(.bundle-modal-product-card) .mac-bestsellers__row > .mac-bestsellers__pricebox:has(> .mac-bestsellers__save) > .mac-bestsellers__price { order: 1; flex: 0 0 auto; }
  html body .mac-bestsellers .mac-bestsellers__card:not(.bundle-modal-product-card) .mac-bestsellers__row > .mac-bestsellers__pricebox > .mac-bestsellers__save { order: 2; min-height: 16px; padding: 0 4px; font-size: 9px; letter-spacing: 0; }
}
@media (max-width: 560px) {
  html body .mac-bestsellers .mac-bestsellers__card:not(.bundle-modal-product-card) .mac-bestsellers__row > .mac-bestsellers__pricebox { min-height: 20px; }
  html body .mac-bestsellers .mac-bestsellers__card:not(.bundle-modal-product-card) .mac-bestsellers__row > .mac-bestsellers__pricebox:has(> .mac-bestsellers__save) > .mac-bestsellers__price { font-size: 14px; }
}

/* PLAN 63: "Създай пакет" cards match the catalog card.
 * Same price format and sale layout (old price + −% above the price), Viral/Ново badges on the photo,
 * the name on two lines and a narrower button that leaves room for a sale price. */
html body .bundle-builder .bundle-modal-product-card .mac-bestsellers__name { height: 37.8px; max-height: 37.8px; line-height: 18.9px; overflow: hidden; }
html body .bundle-builder .bundle-modal-product-card .mac-bestsellers__name a { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; line-height: inherit; }
html body .bundle-builder .bundle-modal-product-card .bundle-modal-product-card__actions > .bundle-modal-product-card__pricebox {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  align-content: center;
  justify-content: flex-end;
  gap: 3px 6px;
  min-width: 0;
  text-align: right;
}
html body .bundle-builder .bundle-modal-product-card .bundle-modal-product-card__actions > .bundle-modal-product-card__pricebox > .mac-bestsellers__compare {
  order: 0;
  margin: 0;
  color: #8a8a8a;
  font: 600 12px/1.2 "Montserrat", Arial, sans-serif;
  text-decoration: line-through;
  white-space: nowrap;
}
html body .bundle-builder .bundle-modal-product-card .bundle-modal-product-card__actions > .bundle-modal-product-card__pricebox > .mac-bestsellers__save { order: 1; }
html body .bundle-builder .bundle-modal-product-card .bundle-modal-product-card__actions > .bundle-modal-product-card__pricebox > .mac-bestsellers__price {
  order: 2;
  color: #241a22;
  font-size: 19px;
  font-weight: 800;
  letter-spacing: -.02em;
  white-space: nowrap;
}
html body .bundle-builder .bundle-modal-product-card .bundle-modal-product-card__actions > .bundle-modal-product-card__pricebox:has(> .mac-bestsellers__save) > .mac-bestsellers__price { flex: 0 0 100%; color: var(--mb-sale-badge, #7f4aa8); }

@media (min-width: 768px) {
  html body .bundle-builder .bundle-modal-product-card .bundle-modal-product-card__actions { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); align-items: center; }
  html body .bundle-builder .bundle-modal-product-card .bundle-modal-product-card__footer { grid-column: 1; grid-row: 1; min-width: 0; }
  html body .bundle-builder .bundle-modal-product-card .bundle-modal-product-card__actions > .bundle-modal-product-card__pricebox { grid-column: 2; grid-row: 1; min-height: 46px; }
}

/* Phones: old price, price and −% on one line, as in the catalog (PLAN 61). */
@media (max-width: 767px) {
  html body .bundle-builder .bundle-modal-product-card .bundle-modal-product-card__actions > .bundle-modal-product-card__pricebox { justify-content: flex-start; text-align: left; gap: 3px 4px; }
  html body .bundle-builder .bundle-modal-product-card .bundle-modal-product-card__actions > .bundle-modal-product-card__pricebox:has(> .mac-bestsellers__save) > .mac-bestsellers__compare { order: 0; font-size: 10px; }
  html body .bundle-builder .bundle-modal-product-card .bundle-modal-product-card__actions > .bundle-modal-product-card__pricebox:has(> .mac-bestsellers__save) > .mac-bestsellers__price { order: 1; flex: 0 0 auto; }
  html body .bundle-builder .bundle-modal-product-card .bundle-modal-product-card__actions > .bundle-modal-product-card__pricebox > .mac-bestsellers__save { order: 2; min-height: 16px; padding: 0 4px; font-size: 9px; letter-spacing: 0; }
}
@media (max-width: 560px) {
  html body .bundle-builder .bundle-modal-product-card .bundle-modal-product-card__actions > .bundle-modal-product-card__pricebox > .mac-bestsellers__price { font-size: 16px; }
  html body .bundle-builder .bundle-modal-product-card .bundle-modal-product-card__actions > .bundle-modal-product-card__pricebox:has(> .mac-bestsellers__save) > .mac-bestsellers__price { font-size: 14px; }
}

/* PLAN 65: create-package products change in place – stop under the sticky header and dim while loading. */
html body .bundle-builder--page .bundle-category-filters { scroll-margin-top: 100px; }
html body .bundle-builder--page .bundle-products :is(.bundle-product-grid, .bundle-pagination, .bundle-page-status) { transition: opacity .18s ease; }
html body .bundle-builder--page .bundle-products.is-loading :is(.bundle-product-grid, .bundle-pagination, .bundle-page-status) { opacity: .45; pointer-events: none; }
html body .bundle-builder--page .bundle-products.is-loading { cursor: progress; }
@media (max-width: 730px) {
  html body .bundle-builder--page .bundle-category-filters { scroll-margin-top: 84px; }
}
@media (prefers-reduced-motion: reduce) {
  html body .bundle-builder--page .bundle-products :is(.bundle-product-grid, .bundle-pagination, .bundle-page-status) { transition: none; }
}

/* PLAN 67–70: "Създай пакет" header laid out like TikTok Viral – a pink banner (#EDA5C8, PLAN 71) that starts behind the
   transparent main navigation, the title and a short line on the left, and on the right an equation that builds up
   product by product ("Парфюм + крем = −6%" … "= −25%") in the cart drawer's tile colours. The product area
   below begins with rounded top corners where the TikTok filter bar does. */
html body .bundle-builder--page { --bundle-nav-height: 88px; margin-top: calc(-1 * var(--bundle-nav-height)); }
html body .bundle-builder--page .bundle-stage {
  display: flex;
  flex-direction: column;
  min-height: clamp(380px, 32.6vw, 530px);
  padding-top: var(--bundle-nav-height);
  background: #EDA5C8;
  /* PLAN 162: nothing in the banner may widen the page (Safari on iPhone let the equation pan the page sideways). */
  overflow-x: clip;
}
html body .bundle-builder--page .bundle-stage::after { content: ""; display: block; height: 32px; border-radius: 32px 32px 0 0; background: #E9E7E7; }
html body .bundle-builder--page .bundle-stage .bundle-equation {
  display: grid;
  flex: 1 0 auto;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(20px, 4vw, 64px);
  width: 100%;
  max-width: none;
  margin: 0;
  padding: clamp(18px, 2vw, 32px) clamp(28px, 6vw, 110px) clamp(20px, 2.2vw, 36px);
}
html body .bundle-builder--page .bundle-equation__text { min-width: 0; }
html body .bundle-builder--page .bundle-equation__title {
  margin: 0;
  color: #111;
  font: 900 clamp(56px, 7.4vw, 136px)/.86 "Montserrat", Arial, sans-serif;
  letter-spacing: -.07em;
}
html body .bundle-builder--page .bundle-equation__title span { display: block; }
html body .bundle-builder--page .bundle-equation__sub {
  max-width: 26em;
  margin: clamp(14px, 1.6vw, 24px) 0 0;
  color: #4B1528;
  font: 700 clamp(15px, 1.35vw, 21px)/1.3 "Montserrat", Arial, sans-serif;
  letter-spacing: -.01em;
}
html body .bundle-builder--page .bundle-equation__line {
  min-width: 0;
  margin: 0;
  color: #241a22;
  font: 900 clamp(30px, 3.1vw, 58px)/1.14 "Montserrat", Arial, sans-serif;
  letter-spacing: -.045em;
  text-align: center;
}
html body .bundle-builder--page :is(.bundle-equation__part, .bundle-equation__total) { display: inline; white-space: nowrap; }
html body .bundle-builder--page .bundle-equation__line[data-count="1"] .bundle-equation__part:nth-child(n+2) { display: none; }
html body .bundle-builder--page .bundle-equation__line[data-count="2"] .bundle-equation__part:nth-child(n+3) { display: none; }
html body .bundle-builder--page .bundle-equation__line[data-count="3"] .bundle-equation__part:nth-child(n+4) { display: none; }
html body .bundle-builder--page .bundle-equation__line[data-count="4"] .bundle-equation__part:nth-child(n+5) { display: none; }
html body .bundle-builder--page .bundle-equation__op { margin: 0 .14em; }
html body .bundle-builder--page .bundle-equation__token {
  display: inline-block;
  margin: .05em 0;
  padding: .02em .36em .1em;
  border-radius: 999px;
  white-space: nowrap;
}
html body .bundle-builder--page .bundle-equation__token--white { background: #fff; }
html body .bundle-builder--page .bundle-equation__token--mint { background: #d9f1e7; }
html body .bundle-builder--page .bundle-equation__token--lilac { background: #efdcf8; }
html body .bundle-builder--page .bundle-equation__token--result { min-width: 3.4em; background: #111; color: #EDA5C8; text-align: center; }
html body .bundle-builder--page .bundle-equation__part.is-entering .bundle-equation__token { animation: bundleEquationIn .45s cubic-bezier(.22, .8, .25, 1) both; }
html body .bundle-builder--page .bundle-equation__token--result.is-changing { animation: bundleEquationPop .45s cubic-bezier(.22, .8, .25, 1) both; }
html body .mac-site-header.mac-header-on-bundle:not(.mac-header-scrolled) .mac-burger > span:nth-child(2) { background: currentColor; }
@keyframes bundleEquationIn { from { opacity: 0; transform: translateY(.3em) scale(.9); } to { opacity: 1; transform: none; } }
@keyframes bundleEquationPop { 0% { transform: scale(.88); } 60% { transform: scale(1.08); } 100% { transform: none; } }
@media (min-width: 768px) and (max-width: 1300px) {
  html body .bundle-builder--page { --bundle-nav-height: 76px; }
}
@media (max-width: 767px) {
  html body .bundle-builder--page { --bundle-nav-height: 66px; }
  html body .bundle-builder--page .bundle-stage { min-height: 415px; }
  html body .bundle-builder--page .bundle-stage::after { height: 24px; border-radius: 24px 24px 0 0; }
  html body .bundle-builder--page .bundle-stage .bundle-equation { grid-template-columns: minmax(0, 1fr); justify-items: center; gap: 18px; padding: 14px 12px 22px; text-align: center; }
  html body .bundle-builder--page .bundle-equation__title { font-size: clamp(38px, 11.4vw, 56px); }
  html body .bundle-builder--page .bundle-equation__title span { display: inline; }
  html body .bundle-builder--page .bundle-equation__sub { margin: 10px auto 0; font-size: 13px; }
  html body .bundle-builder--page .bundle-equation__line { font-size: clamp(22px, 7.6vw, 32px); line-height: 1.16; }
}
@media (prefers-reduced-motion: reduce) {
  html body .bundle-builder--page .bundle-equation__token { animation: none !important; }
}

/* PLAN 72: "Твоят бъндъл" summary. Desktop: white card – title + "2/5", five numbered segments with the discounts
   underneath, a pink hint tile, compact product lines and a grey footer (savings pill, total, button). Phones (≤760px):
   an always-visible bar (segments, round chevron, total, button) that toggles a sheet with the products. */
html body .bundle-builder .bundle-cart .bundle-bar { display: none; }
html body .bundle-builder .bundle-box { display: flex; flex-direction: column; min-height: 0; color: #241a22; font-family: "Montserrat", Arial, sans-serif; }
html body .bundle-builder .bundle-box__head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 20px 20px 0; }
html body .bundle-builder :is(.bundle-box, .bundle-sheet) .bundle-box__title { margin: 0; color: #241a22; font: 800 20px/1.1 "Montserrat", Arial, sans-serif; letter-spacing: -.02em; text-transform: none; }
html body .bundle-builder .bundle-box__count { flex: none; padding: 5px 10px; border-radius: 999px; background: #241a22; color: #fff; font: 800 12px/1 "Montserrat", Arial, sans-serif; }
html body .bundle-builder .bundle-box__progress { padding: 16px 20px; }
html body .bundle-builder :is(.bundle-steps__bars, .bundle-steps__tiers) { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 4px; }
html body .bundle-builder .bundle-steps__bar { display: flex; align-items: center; justify-content: center; height: 22px; border-radius: 7px; background: #efe9eb; color: #b3a9ae; font: 800 11px/1 "Montserrat", Arial, sans-serif; transition: background-color .3s ease, color .3s ease; }
html body .bundle-builder .bundle-steps__bar.is-on { background: #EDA5C8; color: #241a22; }
html body .bundle-builder .bundle-steps__tiers { margin-top: 5px; color: #b3a9ae; font: 800 11px/1 "Montserrat", Arial, sans-serif; text-align: center; }
html body .bundle-builder .bundle-steps__tier.is-reached { color: #241a22; }
html body .bundle-builder .bundle-hint { display: flex; align-items: center; gap: 10px; margin: 14px 0 0; padding: 9px 12px; border-radius: 12px; background: #ffdeea; color: #241a22; font: 700 13px/1.3 "Montserrat", Arial, sans-serif; }
html body .bundle-builder .bundle-hint__icon { display: grid; flex: none; place-items: center; width: 28px; height: 28px; border-radius: 9px; background: #fff; color: #c2185b; }
html body .bundle-builder .bundle-hint.is-full { background: #d9f1e7; }
html body .bundle-builder .bundle-hint.is-full .bundle-hint__icon { color: #0f6e56; }
html body .bundle-builder .bundle-lines--box { max-height: min(42vh, 360px); overflow-y: auto; overscroll-behavior: contain; border-top: 1px solid #efe9eb; }
html body .bundle-builder .bundle-lines__empty { margin: 0; padding: 16px 20px; color: #7d7d7d; font: 600 13px/1.4 "Montserrat", Arial, sans-serif; }
html body .bundle-builder .bundle-line { display: grid; grid-template-columns: 48px minmax(0, 1fr) 26px; align-items: center; gap: 10px; padding: 10px 20px; border-bottom: 1px solid #efe9eb; }
html body .bundle-builder .bundle-line:last-child { border-bottom: 0; }
html body .bundle-builder .bundle-line__photo { display: block; width: 48px; height: 48px; overflow: hidden; border-radius: 10px; background: #f7f7f7; }
html body .bundle-builder .bundle-line__photo img { display: block; width: 100%; height: 100%; object-fit: contain; }
html body .bundle-builder .bundle-line__body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
html body .bundle-builder :is(.bundle-line__name, .bundle-line__meta) { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
html body .bundle-builder .bundle-line__name { color: #241a22; font: 700 12px/1.3 "Montserrat", Arial, sans-serif; }
html body .bundle-builder .bundle-line__meta { color: #7d7d7d; font: 600 11px/1.3 "Montserrat", Arial, sans-serif; }
html body .bundle-builder .bundle-line__price { font: 600 12px/1.3 "Montserrat", Arial, sans-serif; }
html body .bundle-builder .bundle-line__price del { color: #9a8f95; }
html body .bundle-builder .bundle-line__price ins { color: #7f4aa8; font-weight: 800; text-decoration: none; }
html body .bundle-builder .bundle-line__remove { display: grid; place-items: center; width: 26px; height: 26px; min-height: 0; padding: 0; border: 1px solid #e5dedf; border-radius: 50%; background: #fff; color: #241a22; cursor: pointer; transition: background-color .2s ease, color .2s ease; }
html body .bundle-builder .bundle-line__remove:is(:hover, :focus-visible):not(:disabled) { background: #241a22; color: #fff; }
html body .bundle-builder .bundle-line__remove:disabled { opacity: .35; cursor: default; }
html body .bundle-builder .bundle-line.is-removing { opacity: .4; }
html body .bundle-builder .bundle-box__foot { margin-top: auto; padding: 16px 20px 20px; background: #ede9ea; }
html body .bundle-builder .bundle-sum__row { display: flex; align-items: center; justify-content: space-between; gap: 10px; color: #241a22; font: 700 13px/1.3 "Montserrat", Arial, sans-serif; }
html body .bundle-builder .bundle-sum__row--total { margin-top: 10px; align-items: baseline; }
html body .bundle-builder .bundle-sum__saving { padding: 4px 10px; border-radius: 999px; background: #7f4aa8; color: #fff; font-size: 12px; font-weight: 800; }
html body .bundle-builder .bundle-sum__total del { margin-right: 6px; color: #9a8f95; font-size: 12px; font-weight: 600; }
html body .bundle-builder .bundle-sum__total strong { color: #241a22; font: 900 24px/1 "Montserrat", Arial, sans-serif; letter-spacing: -.02em; }
html body .bundle-builder .bundle-checkout { display: flex; align-items: center; justify-content: center; width: 100%; min-height: 48px; margin-top: 14px; padding: 0 18px; border: 0; border-radius: 999px; background: #EDA5C8; color: #000; font: 800 13px/1 "Montserrat", Arial, sans-serif; letter-spacing: .04em; text-transform: uppercase; cursor: pointer; transition: background-color .2s ease, color .2s ease; }
html body .bundle-builder .bundle-checkout:is(:hover, :focus-visible):not(:disabled) { background: #000; color: #fff; }
html body .bundle-builder .bundle-checkout:disabled { background: #eadce3; color: #9a8f95; cursor: not-allowed; }
html body .bundle-builder--modal .bundle-box { height: 100%; }
html body .bundle-builder--modal .bundle-lines--box { flex: 1 1 auto; max-height: none; min-height: 0; }
@keyframes bundleSheetIn { from { transform: translateY(100%); } to { transform: none; } }
@keyframes bundleScrimIn { from { opacity: 0; } to { opacity: 1; } }
@media (max-width: 760px) {
  html body .bundle-builder .bundle-cart .bundle-box { display: none; }
  html body .bundle-builder .bundle-cart .bundle-bar { position: relative; display: block; padding: 10px 14px calc(12px + env(safe-area-inset-bottom)); font-family: "Montserrat", Arial, sans-serif; }
  html body .bundle-builder .bundle-bar::before { content: ""; position: absolute; inset: 0; z-index: 2; border-radius: 18px 18px 0 0; background: #fff; box-shadow: 0 -8px 24px rgba(36, 26, 34, .12); pointer-events: none; }
  html body .bundle-builder .bundle-bar:has(.bundle-bar__details[open]:not(.is-closing))::before { border-radius: 0; }
  html body .bundle-builder--page #basket.bundle-cart { overflow: visible; border-radius: 0; background: transparent; box-shadow: none; }
  html body .bundle-builder .bundle-bar__toggle { position: relative; z-index: 3; display: block; padding: 0; list-style: none; cursor: pointer; }
  html body .bundle-builder .bundle-bar__toggle::-webkit-details-marker { display: none; }
  html body .bundle-builder .bundle-steps--bar .bundle-steps__bar { height: 18px; border-radius: 6px; font-size: 10px; }
  html body .bundle-builder .bundle-steps--bar .bundle-steps__tiers { margin-top: 3px; font-size: 9px; }
  html body .bundle-builder .bundle-bar__row { display: flex; align-items: center; gap: 10px; min-height: 44px; margin-top: 8px; padding-right: 168px; }
  html body .bundle-builder .bundle-bar__chevron { display: grid; flex: none; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: #241a22; color: #fff; transition: transform .3s ease; }
  html body .bundle-builder .bundle-bar__details[open]:not(.is-closing) .bundle-bar__chevron { transform: rotate(180deg); }
  html body .bundle-builder .bundle-bar__total { display: flex; flex-direction: column; min-width: 0; line-height: 1; }
  html body .bundle-builder .bundle-bar__total del { color: #9a8f95; font: 600 11px/1.2 "Montserrat", Arial, sans-serif; }
  html body .bundle-builder .bundle-bar__total strong { color: #241a22; font: 900 20px/1.05 "Montserrat", Arial, sans-serif; letter-spacing: -.02em; white-space: nowrap; }
  html body .bundle-builder .bundle-bar > .bundle-checkout { position: absolute; right: 14px; bottom: calc(12px + env(safe-area-inset-bottom)); z-index: 3; width: 156px; min-height: 44px; margin: 0; padding: 0 12px; font-size: 11px; }
  html body .bundle-builder .bundle-sheet__scrim { position: fixed; inset: 0; z-index: 0; background: rgba(36, 26, 34, .38); }
  html body .bundle-builder .bundle-sheet { position: absolute; right: 0; bottom: 100%; left: 0; z-index: 1; display: flex; flex-direction: column; gap: 10px; max-height: 70dvh; padding: 16px 14px 14px; border-radius: 22px 22px 0 0; background: #e9e7e7; box-shadow: 0 -12px 32px rgba(36, 26, 34, .18); }
  html body .bundle-builder .bundle-bar__details.is-opening .bundle-sheet { animation: bundleSheetIn .3s cubic-bezier(.22, .8, .25, 1) both; }
  html body .bundle-builder .bundle-bar__details.is-opening .bundle-sheet__scrim { animation: bundleScrimIn .3s ease both; }
  html body .bundle-builder .bundle-bar__details.is-closing .bundle-sheet { animation: bundleSheetIn .26s ease reverse both; }
  html body .bundle-builder .bundle-bar__details.is-closing .bundle-sheet__scrim { animation: bundleScrimIn .26s ease reverse both; }
  html body .bundle-builder .bundle-sheet__head { display: flex; align-items: center; gap: 8px; }
  html body .bundle-builder .bundle-sheet__head .bundle-box__title { font-size: 17px; }
  html body .bundle-builder .bundle-sheet__close { display: grid; place-items: center; width: 32px; height: 32px; min-height: 0; margin-left: auto; padding: 0; border: 1px solid #d6cdd0; border-radius: 50%; background: transparent; color: #241a22; cursor: pointer; }
  html body .bundle-builder .bundle-lines--sheet { flex: 0 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; border-radius: 14px; background: #fff; }
  html body .bundle-builder .bundle-lines--sheet .bundle-line { grid-template-columns: 40px minmax(0, 1fr) 26px; padding: 8px 12px; }
  html body .bundle-builder .bundle-lines--sheet .bundle-line__photo { width: 40px; height: 40px; border-radius: 9px; }
  html body .bundle-builder .bundle-lines--sheet .bundle-lines__empty { padding: 14px 12px; }
  html body .bundle-builder .bundle-sheet .bundle-hint { margin: 0; padding: 8px 10px; font-size: 12px; }
  html body .bundle-builder .bundle-sheet .bundle-sum__row { padding: 0 2px; font-size: 12px; }
}
@media (max-width: 360px) {
  html body .bundle-builder .bundle-bar__row { padding-right: 148px; }
  html body .bundle-builder .bundle-bar > .bundle-checkout { width: 138px; font-size: 10px; }
}
@media (prefers-reduced-motion: reduce) {
  html body .bundle-builder :is(.bundle-steps__bar, .bundle-bar__chevron) { transition: none; }
  html body .bundle-builder .bundle-bar__details :is(.bundle-sheet, .bundle-sheet__scrim) { animation: none !important; }
}

/* PLAN 81: shop/category grid shows 5 cards per row on wide screens (4/3/2 below stay as before). */
@media (min-width: 1281px) {
  #mac-catalog-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}
/* PLAN 83: with 4 and 5 cards per row (≥1201px) the button and a sale price no longer fit side by side,
 * so the price sits on one line on top and the button spans the card width below it. */
@media (min-width: 1201px) {
  html body #mac-catalog-grid .mac-bestsellers__card:not(.bundle-modal-product-card) .mac-bestsellers__row {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }
  html body #mac-catalog-grid .mac-bestsellers__card:not(.bundle-modal-product-card) .mac-bestsellers__row > .mac-bestsellers__pricebox {
    order: -1;
    width: auto;
    flex-wrap: wrap;
    row-gap: 2px;
    justify-content: flex-start;
    white-space: nowrap;
  }
  html body #mac-catalog-grid .mac-bestsellers__card:not(.bundle-modal-product-card) .mac-bestsellers__pricebox > * {
    flex: 0 0 auto;
    width: auto;
    max-width: none;
  }
  html body #mac-catalog-grid .mac-bestsellers__card:not(.bundle-modal-product-card) .mac-bestsellers__row > .mac-bestsellers__restock-action { width: 100%; }
  html body #mac-catalog-grid .mac-bestsellers__card:not(.bundle-modal-product-card) .mac-bestsellers__row > .mac-bestsellers__add,
  html body #mac-catalog-grid .mac-bestsellers__card:not(.bundle-modal-product-card) .mac-bestsellers__row > .mac-bestsellers__restock-action .cwg_popup_submit {
    width: 100%;
    min-width: 0;
    max-width: none;
    height: 40px;
    min-height: 40px;
    padding: 0 16px;
    border-radius: 999px;
    justify-content: center;
    white-space: nowrap;
  }
}

/* PLAN 86: instant feedback while WooCommerce adds the product (it puts .loading on the button). */
html body .mac-bestsellers__add.loading,
html body .single_add_to_cart_button.loading {
  opacity: .6;
  cursor: progress;
  pointer-events: none;
}

/* review.427: card buttons (Добави / Избери / Извести ме) use the same 800 weight as „Създай бъндъл“. */
body .mac-bestsellers__add { font-weight: 800; }

/* review.428: one text size for every product-card button (catalog, sliders, related, „Създай пакет“), at every width. */
html body .mac-bestsellers__add,
html body .mac-bestsellers .mac-bestsellers__row > .mac-bestsellers__add,
html body .mac-bestsellers__restock-action .cwg_popup_submit,
html body .bundle-modal-product-card__add { font-size: 11.5px !important; }

/* review.460: the product page shows only the "Извести ме" popup button (.mac-product-restock), not the
 * plugin's inline form, whatever the plugin's popup setting. */
body .mac-product-purchase:has(.mac-product-restock) .cwginstock-subscribe-form { display: none !important; }
body .mac-product-purchase .mac-product-restock[hidden] { display: none !important; }
body .mac-product-section.mac-product-page-trial .mac-product-purchase .mac-product-restock .cwg_popup_submit { text-transform: uppercase; }
