/* ============================================================
   Bloom Box Page Styles
   Breakpoints: 1600px | 1180px | 972px | 375px (mobile)
   ============================================================ */

/* Скрываем карточки пока восстанавливаем состояние из sessionStorage */
.bloombox-restoring .bloom-box__steps {
    opacity: 0;
}

/* ---- Custom properties scoped to page ---- */
.bloom-box,
#popup-bloombox,
#popup-bloombox-checkout {
    --bb-brown: #6D351E;
    --bb-chocolate: #291A13;
    --bb-light-grey: #ECE7E1;
    --bb-secondary-grey: #8A8A8A;
    --bb-light-blue: #697CA6;
    --bb-sale-red: #E6420C;
    --bb-stroke: #D3D3D3;
    --bb-card-width: 300.8px;
}

/* ============================================================
   MAIN PAGE
   ============================================================ */

.bloom-box {
    display: flex;
    flex-direction: column;
    gap: 48px;
    max-width: 1600px;
    margin: 0 auto;
    padding: 52px 16px 0 16px;
}

.bloom-box__section {
    width: 100%;
}

/* ---- Page header ---- */
.bloom-box__header {
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.bloom-box__header-inner {
    display: flex;
    align-items: baseline;
    gap: 4px;
}

.bloom-box__title {
    font-family: NunitoSans, serif;
    font-weight: 500;
    font-size: 28px;
    line-height: 1;
    color: var(--bb-chocolate);
}

.bloom-box__title-counter {
    font-family: NunitoSans, serif;
    font-weight: 400;
    font-size: 12px;
    line-height: 1;
    color: var(--bb-secondary-grey);
    position: relative;
    top: -8px;
}

.bloom-box__desc {
    font-family: NunitoSans, serif;
    font-weight: 500;
    font-size: 18px;
    line-height: 24px;
    color: var(--bb-secondary-grey);
    max-width: 660px;
}

.bloom-box__mobile-break {
    display: inline;
}

/* ---- Steps row ---- */
.bloom-box__steps {
    display: flex;
    gap: 16px;
    align-items: stretch;
}

/* ============================================================
   STEP CARD
   ============================================================ */

.bloom-box__card {
    background-color: var(--bb-light-grey);
    overflow: clip;
    flex: 1 1 0;
    min-width: 0;
    position: relative;
    cursor: pointer;
    transition: opacity 0.3s ease;
}

.bloom-box__card.--cart-loading::before {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(236, 231, 225, 0.82);
    z-index: 4;
}

.bloom-box__card.--cart-loading::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 36px;
    height: 36px;
    margin: -18px 0 0 -18px;
    border-radius: 50%;
    border: 4px solid rgba(105, 124, 166, 0.18);
    border-top-color: var(--bb-light-blue);
    animation: spin 0.8s linear infinite;
    z-index: 5;
}

.bloom-box__card.--locked {
    opacity: 0.6;
    pointer-events: none;
}

.bloom-box__card.--help {
    pointer-events: none;
}

.bloom-box__card-inner {
    display: flex;
    flex-direction: column;
    gap: 0;
    padding-top: 16px;
    height: 100%;
}

/* ---- Card head ---- */
.bloom-box__card-head {
    display: flex;
    flex-direction: column;
    gap: 4px;
    align-items: flex-start;
    margin-bottom: 16px;
    padding: 0 16px;
    width: 100%;
    line-height: 1.45;
    font-size: 18px;
}

.bloom-box__card-number {
    font-family: NunitoSans, serif;
    font-weight: 500;
    color: var(--bb-brown);
    letter-spacing: 0.9px;
    font-size: 18px;
    width: 100%;
}

.bloom-box__card-number-slash {
    letter-spacing: 0;
    margin-left: 2px;
}

.bloom-box__card-titles {
    display: flex;
    flex-direction: column;
    gap: 4px;
    width: 100%;
}

.bloom-box__card-title {
    font-family: NunitoSans, serif;
    font-weight: 500;
    font-size: 18px;
    color: var(--bb-brown);
    line-height: 1.45;
    width: 100%;
}

.bloom-box__card-subtitle {
    font-family: NunitoSans, serif;
    font-weight: 400;
    font-size: 18px;
    line-height: 1.45;
    color: var(--bb-secondary-grey);
    width: 100%;
}

/* ---- Card media ---- */
.bloom-box__card-media {
    position: relative;
    height: 368px;
    width: 100%;
    background-color: #fff;
    overflow: hidden;
    flex-shrink: 0;
}

.bloom-box__card-img,
.bloom-box__card-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Video overlays fallback image when loaded */
.bloom-box__card-video {
    z-index: 1;
}

/* ---- Card Swiper (после выбора товара) ---- */
.bloom-box__card-swiper {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.bloom-box__card-swiper .swiper-slide {
    display: flex;
    align-items: center;
    justify-content: center;
}

.bloom-box__card-slide-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.bloom-box__card-swiper-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
    width: 24px;
    height: 24px;
    padding: 0;
    border: none;
    background: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    outline: none;
    -webkit-tap-highlight-color: transparent;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.bloom-box__card-swiper-btn--prev {
    left: 16px;
}

.bloom-box__card-swiper-btn--next {
    right: 16px;
}

.bloom-box__card-swiper-btn.swiper-button-disabled {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.bloom-box__card-details-btn {
    position: absolute;
    bottom: 26px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 48px;
    padding: 16px 24px;
    background: rgba(255, 255, 255, 0.7);
    border-radius: 2px;
    font-family: NunitoSans, serif;
    font-weight: 400;
    font-size: 14px;
    line-height: 1;
    color: #291A13;
    text-decoration: none;
    white-space: nowrap;
}

/* ---- Selected item info block ---- */
.bloom-box__card-selection {
    display: flex;
    flex-direction: column;
    gap: 4px;
    width: 100%;
}

.bloom-box__card-choice-label {
    font-family: NunitoSans, serif;
    font-weight: 500;
    font-size: 18px;
    line-height: 1.45;
    letter-spacing: 0;
    color: #6d351e;
}

.bloom-box__card-choice-name {
    font-family: NunitoSans, serif;
    font-weight: 400;
    font-size: 18px;
    line-height: 1.45;
    letter-spacing: 0;
    color: #291a13;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100%;
}

.bloom-box__card-choice-price {
    font-family: NunitoSans, serif;
    font-weight: 400;
    font-size: 18px;
    line-height: 1.45;
    letter-spacing: 0;
    color: #291a13;
}

.bloom-box__card-selection.--checkout-summary .bloom-box__card-choice-name {
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
}

.bloom-box__card-selection.--checkout-summary .bloom-box__card-choice-price {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.bloom-box__card-choice-price-caption {
    font-family: NunitoSans, serif;
    font-weight: 400;
    font-size: 18px;
    line-height: 1.45;
    letter-spacing: 0;
    color: #291a13;
}

.bloom-box__card-choice-price-row {
    display: flex;
    align-items: baseline;
    gap: 8px;
    flex-wrap: wrap;
}

.bloom-box__card-choice-price-old {
    font-family: NunitoSans, serif;
    font-weight: 400;
    font-size: 18px;
    line-height: 1.45;
    letter-spacing: 0;
    color: #291a13;
    text-decoration: line-through;
    text-decoration-thickness: 1px;
}

.bloom-box__card-choice-price-value {
    display: inline-flex;
    align-items: baseline;
    gap: 4px;
    font-family: NunitoSans, serif;
    font-weight: 400;
    font-size: 18px;
    line-height: 1.45;
    letter-spacing: 0;
    color: #e6420c;
}

.bloom-box__card-choice-price-currency {
    color: #e6420c;
}

/* ---- Card footer (buttons) ---- */
.bloom-box__card-footer {
    width: 100%;
    flex-shrink: 0;
    margin-top: 0;
}

.bloom-box__card-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 16px;
    height: 48px;
    width: 100%;
    font-family: NunitoSans, serif;
    font-weight: 400;
    font-size: 14px;
    line-height: 1.11;
    text-align: center;
    border: none;
    cursor: pointer;
    transition: background-color 0.25s ease, color 0.25s ease, opacity 0.25s ease;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    border-radius: 0;
    box-sizing: border-box;
}

.bloom-box__card-btn.--loading,
.bloom-box-checkout__submit.--loading {
    pointer-events: none;
}

.bloom-box__card-btn.--loading::after,
.bloom-box-checkout__submit.--loading::after {
    content: "";
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.35);
    border-top-color: #fff;
    animation: spin 0.8s linear infinite;
    flex: 0 0 16px;
}

/* Primary (выбрать) — active state */
.bloom-box__card-btn.--primary {
    background-color: var(--bb-chocolate);
    color: var(--bb-light-grey);
}

.bloom-box__card-btn.--primary:hover:not(:disabled) {
    opacity: 0.85;
}

.bloom-box__card-btn.--primary:disabled {
    background-color: rgba(41, 26, 19, 0.08);
    color: var(--bb-secondary-grey);
    cursor: default;
    pointer-events: none;
}

/* Help-active state — JS adds this class to button */
.bloom-box__card-btn.--help-active {
    background-color: var(--bb-light-blue);
    color: var(--bb-light-grey);
    pointer-events: none;
}

/* Edit (редактировать) */
.bloom-box__card-btn.--edit {
    background-color: rgba(41, 26, 19, 0.08);
    color: var(--bb-chocolate);
}

.bloom-box__card-btn.--edit:hover {
    background-color: rgba(41, 26, 19, 0.14);
}

/* Checkout (оформить Bloom Box) */
.bloom-box__card-btn.--checkout {
    background-color: var(--bb-chocolate);
    color: var(--bb-light-grey);
}

.bloom-box__card-btn.--checkout:hover:not(:disabled) {
    opacity: 0.85;
}

.bloom-box__card-btn.--checkout:disabled {
    background-color: rgba(41, 26, 19, 0.08);
    color: var(--bb-secondary-grey);
    cursor: default;
    pointer-events: none;
}

/* Step 5 selected state — price display */
.bloom-box__card.--selected .bloom-box__card-titles {
    display: none;
}

/* ============================================================
   POPUP OVERLAY — scoped to Bloom Box popups only
   ============================================================ */

#popup-bloombox,
#popup-bloombox-checkout {
    opacity: 0;
    transition: opacity 0.3s ease-out;
    pointer-events: none;
}

#popup-bloombox.--active,
#popup-bloombox-checkout.--active {
    opacity: 1;
    pointer-events: auto;
}

#popup-bloombox .popup,
#popup-bloombox-checkout .popup {
    transform: scale(0.95);
    transition: transform 0.3s ease-out;
}

#popup-bloombox.--active .popup,
#popup-bloombox-checkout.--active .popup {
    transform: scale(1);
}

/* ============================================================
   BLOOMBOX CATALOG POPUP  (#popup-bloombox)
   ============================================================ */

#popup-bloombox {
    position: fixed;
    inset: 0;
    z-index: 999;
    background-color: #fff;
    display: block;
    overflow: hidden;
    padding: 0;
}

#popup-bloombox .popup {
    width: 100%;
    max-width: none;
    margin: 0 auto;
    padding: 0;
    background-color: #fff;
    min-height: 100vh;
    overflow: visible;
}

.bloom-box-popup {
    display: flex;
    width: 100%;
    height: 100%;
}

/* ---- Left column: sticky photo ---- */
.bloom-box-popup__left {
    position: relative;
    flex-shrink: 0;
    width: 49.5%;
    height: 100vh;
    overflow: hidden;
}

.bloom-box-popup__photo-wrap {
    position: sticky;
    top: 0;
    width: 100%;
    height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    padding-bottom: 36px;
}

.bloom-box-popup__photo {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.bloom-box-popup__photo-overlay {
    position: absolute;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.2);
    pointer-events: none;
}

/* Pagination dots */
.bloom-box-popup__photo-dots {
    position: relative;
    z-index: 1;
    display: flex;
    gap: 8px;
    align-items: center;
    justify-content: center;
}

/* Dots are rendered by JS; target child divs */
.bloom-box-popup__photo-dots > * {
    width: 12px;
    height: 12px;
    border-radius: 170px;
    flex-shrink: 0;
    background-color: rgba(255, 255, 255, 0.1);
    border: 1px solid var(--bb-stroke);
    transition: background-color 0.25s ease;
}

.bloom-box-popup__photo-dots > *.--active {
    background-color: rgba(255, 255, 255, 0.7);
    border-color: transparent;
}

/* ---- Right column: scrollable content ---- */
.bloom-box-popup__right {
    flex-shrink: 0;
    width: 50.5%;
    height: 100vh;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.bloom-box-popup__right-inner {
    display: flex;
    flex-direction: column;
    flex: 1;
}

/* ---- Popup header ---- */
.bloom-box-popup__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding: 40px 16px 24px;
    position: sticky;
    top: 0;
    background-color: #fff;
    z-index: 10;
    border-bottom: 1px solid var(--bb-stroke);
}

.bloom-box-popup__header-left {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
    min-width: 0;
}

/* Override site's .popup_close-btn absolute positioning */
.bloom-box-popup__header .popup_close-btn,
.bloom-box-checkout__header .popup_close-btn {
    position: static;
    flex-shrink: 0;
}

.bloom-box-popup__title {
    font-family: NunitoSans, serif;
    font-weight: 500;
    font-size: 28px;
    line-height: 1;
    color: var(--bb-chocolate);
}

.bloom-box-popup__subtitle {
    font-family: NunitoSans, serif;
    font-weight: 400;
    font-size: 14px;
    line-height: 1.45;
    color: var(--bb-secondary-grey);
}

/* ---- Bundle info strip ---- */
.bloom-box-popup__bundle-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    border-bottom: 1px solid var(--bb-stroke);
}

.bloom-box-popup__bundle-label {
    font-family: NunitoSans, serif;
    font-weight: 400;
    font-size: 14px;
    color: var(--bb-secondary-grey);
}

.bloom-box-popup__bundle-price {
    font-family: NunitoSans, serif;
    font-weight: 500;
    font-size: 14px;
    color: var(--bb-chocolate);
}

/* ---- Catalog area ---- */
.bloom-box-popup__catalog {
    display: flex;
    flex-direction: column;
    gap: 36px;
    padding: 36px 16px 48px;
}

.bloom-box-popup__catalog-loading,
.bloom-box-popup__error,
.bloom-box-popup__empty {
    font-family: NunitoSans, serif;
    font-weight: 400;
    font-size: 14px;
    color: var(--bb-secondary-grey);
    padding: 24px 0;
    text-align: center;
}

.bloom-box-popup__catalog-loading {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.bloom-box-popup__loader {
    width: 48px;
    height: 48px;
    border-width: 4px;
}

/* ---- Category block ---- */
.bloom-box-popup__category {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.bloom-box-popup__category-title {
    font-family: NunitoSans, serif;
    font-weight: 500;
    font-size: 18px;
    line-height: normal;
    color: #130F0F;
}

/* Cards grid row */
.bloom-box-popup__cards {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.bloom-box-popup__cards::-webkit-scrollbar {
    display: none;
}

/* ============================================================
   POPUP PRODUCT CARD  (.bloom-box-popup__card)
   ============================================================ */

.bloom-box-popup__card {
    flex-shrink: 0;
    width: 248px;
    background-color: var(--bb-light-grey);
    display: flex;
    flex-direction: column;
    cursor: pointer;
}

.bloom-box-popup__card-img-wrap {
    position: relative;
    width: 248px;
    aspect-ratio: 248 / 362;
    overflow: hidden;
    flex-shrink: 0;
}

.bloom-box-popup__card-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Add "+" button — centered bottom, no wrapper div */
.bloom-box-popup__card-add {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%) translateY(-50%);
    width: 24px;
    height: 24px;
    border-radius: 71px;
    background-color: rgba(255, 255, 255, 0.7);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    line-height: 1;
    color: var(--bb-chocolate);
    padding: 0;
    transition: background-color 0.2s ease;
    z-index: 2;
}

.bloom-box-popup__card-add:hover {
    background-color: rgba(255, 255, 255, 0.9);
}

/* Product info */
.bloom-box-popup__card-info {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding-top: 12px;
    flex: 1;
}

.bloom-box-popup__card-name {
    font-family: NunitoSans, serif;
    font-weight: 500;
    font-size: 14px;
    line-height: 1;
    color: var(--bb-chocolate);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.bloom-box-popup__card-price {
    font-family: NunitoSans, serif;
    font-weight: 400;
    font-size: 14px;
    line-height: 1;
    color: var(--bb-chocolate);
    white-space: nowrap;
}

/* Color chips row */
.bloom-box-popup__card-colors {
    display: flex;
    gap: 4px;
    align-items: center;
    min-height: 16px;
    flex-wrap: wrap;
}

.bloom-box-popup__card-color {
    display: inline-block;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    flex-shrink: 0;
    overflow: hidden;
}

/* ============================================================
   CHECKOUT POPUP  (#popup-bloombox-checkout)
   ============================================================ */

#popup-bloombox-checkout {
    position: fixed;
    inset: 0;
    z-index: 500;
    background-color: rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
}

#popup-bloombox-checkout .popup {
    width: 100%;
    max-width: 560px;
    max-height: 90vh;
    overflow-y: auto;
    background-color: #fff;
    margin: 0 16px;
    padding: 0;
}

.bloom-box-checkout {
    width: 100%;
}

.bloom-box-checkout__inner {
    display: flex;
    flex-direction: column;
    gap: 0;
}

/* Header */
.bloom-box-checkout__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 32px 16px 24px;
    border-bottom: 1px solid var(--bb-stroke);
}

.bloom-box-checkout__title {
    font-family: NunitoSans, serif;
    font-weight: 500;
    font-size: 28px;
    line-height: 1;
    color: var(--bb-chocolate);
}

/* Items list (JS-rendered) */
.bloom-box-checkout__items {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.bloom-box-checkout__item {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    padding: 16px;
    border-bottom: 1px solid var(--bb-stroke);
}

.bloom-box-checkout__item-img {
    width: 64px;
    height: 80px;
    object-fit: cover;
    flex-shrink: 0;
    background-color: var(--bb-light-grey);
}

.bloom-box-checkout__item-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
    min-width: 0;
}

.bloom-box-checkout__item-name {
    font-family: NunitoSans, serif;
    font-weight: 500;
    font-size: 14px;
    line-height: 1.45;
    color: var(--bb-chocolate);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.bloom-box-checkout__item-size {
    font-family: NunitoSans, serif;
    font-weight: 400;
    font-size: 12px;
    line-height: 1;
    color: var(--bb-secondary-grey);
}

.bloom-box-checkout__item-price {
    font-family: NunitoSans, serif;
    font-weight: 400;
    font-size: 14px;
    line-height: 1;
    color: var(--bb-chocolate);
}

/* Box gift line */
.bloom-box-checkout__box-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    border-bottom: 1px solid var(--bb-stroke);
}

.bloom-box-checkout__box-label {
    font-family: NunitoSans, serif;
    font-weight: 400;
    font-size: 14px;
    color: var(--bb-secondary-grey);
}

.bloom-box-checkout__box-price {
    font-family: NunitoSans, serif;
    font-weight: 400;
    font-size: 14px;
    color: var(--bb-chocolate);
}

/* Totals block */
.bloom-box-checkout__totals {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
}

.bloom-box-checkout__old-price {
    font-family: NunitoSans, serif;
    font-weight: 400;
    font-size: 18px;
    line-height: 1;
    color: var(--bb-secondary-grey);
    text-decoration: line-through;
}

.bloom-box-checkout__new-price {
    font-family: NunitoSans, serif;
    font-weight: 400;
    font-size: 18px;
    line-height: 1;
    color: var(--bb-sale-red);
}

/* Submit button */
.bloom-box-checkout__submit {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 48px;
    background-color: var(--bb-chocolate);
    color: var(--bb-light-grey);
    font-family: NunitoSans, serif;
    font-weight: 400;
    font-size: 14px;
    line-height: 1;
    text-align: center;
    border: none;
    cursor: pointer;
    border-radius: 0;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    transition: opacity 0.25s ease;
}

.bloom-box-checkout__submit:hover:not(:disabled) {
    opacity: 0.85;
}

.bloom-box-checkout__submit:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}


/* ============================================================
   SIZE OVERLAY  (.bloombox-size-overlay)
   ============================================================ */

.bloombox-size-overlay {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 600;
    background-color: #fff;
    padding: 24px 16px 32px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.12);
    transform: translateY(100%);
    transition: transform 0.3s ease-out;
}

.bloombox-size-overlay.bloombox-size-overlay--show {
    transform: translateY(0);
}

.bloombox-size-overlay__close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--bb-chocolate);
    cursor: pointer;
    transition: opacity 0.2s ease;
    background: transparent;
    border: 0;
    padding: 0;
}

.bloombox-size-overlay__close:hover {
    opacity: 0.6;
}

.bloombox-size-overlay__close svg {
    display: block;
}

.bloombox-size-overlay__head {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding-right: 32px;
}

.bloombox-size-overlay__title {
    font-family: NunitoSans, serif;
    font-weight: 500;
    font-size: 18px;
    line-height: 1.2;
    color: var(--bb-chocolate);
}

.bloombox-size-overlay__product-name {
    font-family: NunitoSans, serif;
    font-weight: 400;
    font-size: 14px;
    line-height: 1.45;
    color: var(--bb-secondary-grey);
}

.bloombox-size-overlay__sizes {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.bloombox-size-overlay__size-btn {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    min-height: 34px;
    padding: 0;
    border: 0;
    background: transparent;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

.bloombox-size-overlay__size-btn .product__buy-size {
    text-transform: uppercase;
}

.bloombox-size-overlay__size-btn .product__buy-size-count {
    white-space: nowrap;
}

.bloombox-size-overlay__size-btn.bloombox-size-overlay__size-btn--unavailable {
    opacity: 1;
}

.bloombox-size-overlay__size-btn.bloombox-size-overlay__size-btn--unavailable .product__buy-size {
    text-decoration: line-through;
}

.bloombox-size-overlay__size-btn:disabled {
    cursor: default;
}

/* ============================================================
   STEP UNLOCK ANIMATION
   ============================================================ */

@keyframes bloom-card-unlock {
    0% { opacity: 0.6; }
    100% { opacity: 1; }
}

.bloom-box__card.bloom-box__card--unlocking {
    animation: bloom-card-unlock 0.4s ease forwards;
}

/* ============================================================
   RESPONSIVE: 1180px
   ============================================================ */
@media screen and (max-width: 1180px) {
    .bloom-box-popup__left {
        width: 44%;
    }

    .bloom-box-popup__right {
        width: 56%;
    }

    .bloom-box-popup__card {
        width: 200px;
    }

    .bloom-box-popup__card-img-wrap {
        width: 200px;
    }
}

/* ============================================================
   RESPONSIVE: 972px — horizontal scroll cards, smaller fonts
   ============================================================ */
@media screen and (max-width: 972px) {
    .bloom-box {
        padding: 32px 16px 0;
        gap: 32px;
    }

    .bloom-box__title {
        font-size: 20px;
    }

    .bloom-box__desc {
        font-size: 14px;
        max-width: 510px;
    }

    .bloom-box__steps {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        scroll-snap-type: x mandatory;
    }

    .bloom-box__steps::-webkit-scrollbar {
        display: none;
    }

    .bloom-box__card {
        flex: 0 0 220px;
        scroll-snap-align: start;
    }

    .bloom-box__card-number,
    .bloom-box__card-choice-label,
    .bloom-box__card-choice-name,
    .bloom-box__card-choice-price,
    .bloom-box__card-title,
    .bloom-box__card-subtitle {
        font-size: 14px;
    }

    .bloom-box__card-choice-price-caption,
    .bloom-box__card-choice-price-old,
    .bloom-box__card-choice-price-value {
        font-size: 14px;
    }

    .bloom-box__card-head {
        font-size: 14px;
    }

    .bloom-box__card-media {
        height: 280px;
    }

    .bloom-box-popup__left {
        width: 40%;
    }

    .bloom-box-popup__right {
        width: 60%;
    }

    .bloom-box-popup__title {
        font-size: 20px;
    }

    .bloom-box-popup__card {
        width: 180px;
    }

    .bloom-box-popup__card-img-wrap {
        width: 180px;
    }
}

/* ============================================================
   RESPONSIVE: 767px — popup single-column, wider scroll cards
   ============================================================ */
@media screen and (max-width: 767px) {
    .bloom-box__mobile-break {
        display: block;
    }

    .bloom-box__card {
        flex: 0 0 260px;
    }

    .bloom-box__card-media {
        height: 320px;
    }

    /* Popup goes single-column */
    #popup-bloombox .popup {
        flex-direction: column;
        height: 100vh;
        overflow-y: auto;
    }

    .bloom-box-popup {
        flex-direction: column;
        height: auto;
    }

    .bloom-box-popup__left {
        position: relative;
        width: 100%;
        height: auto;
        flex-shrink: 0;
    }

    .bloom-box-popup__photo-wrap {
        position: relative;
        width: 100%;
        height: auto;
        padding-bottom: 16px;
        justify-content: flex-start;
    }

    .bloom-box-popup__photo {
        position: relative;
        inset: auto;
        width: 100%;
        height: auto;
        aspect-ratio: 343 / 520;
        max-height: 520px;
        object-fit: cover;
        display: block;
    }

    .bloom-box-popup__photo-overlay {
        display: none;
    }

    .bloom-box-popup__right {
        width: 100%;
        height: auto;
        overflow-y: visible;
    }

    .bloom-box-popup__header {
        position: relative;
        top: auto;
        padding: 24px 16px 16px;
    }

    .bloom-box-popup__catalog {
        padding: 24px 16px 48px;
        gap: 24px;
    }

    .bloom-box-popup__card {
        width: 167px;
        flex-shrink: 0;
    }

    .bloom-box-popup__card-img-wrap {
        width: 167px;
    }

    .bloombox-size-overlay {
        border-radius: 0;
    }

    .swiper-blog-products__scrollbar {
        background: rgba(0, 0, 0, 0.1);
    }

    .swiper-blog-products__scrollbar .swiper-scrollbar-drag {
        background: var(--bb-light-blue, #697CA6);
    }
}

/* ============================================================
   RESPONSIVE: 480px — vertical stack
   ============================================================ */
@media screen and (max-width: 480px) {
    .bloom-box {
        padding: 24px 16px 0;
        gap: 24px;
    }

    .bloom-box__header {
        gap: 16px;
    }

    .bloom-box__title {
        font-size: 20px;
    }

    .bloom-box__steps {
        flex-direction: column;
        gap: 16px;
        overflow: visible;
        scroll-snap-type: none;
    }

    .bloom-box__card {
        flex: 0 0 auto;
        width: 100%;
    }

    .bloom-box__card-media {
        height: 400px;
    }

    .bloom-box-popup__title {
        font-size: 20px;
    }

    #popup-bloombox-checkout .popup {
        max-width: 100%;
        margin: 0;
        max-height: 100vh;
        border-radius: 0;
    }
}

/* ============================================================
   BLOOM BOX POPUP HTML INJECTION OVERRIDES
   ============================================================ */

#popup-bloombox .popup {
    max-width: 1600px;
    padding: 0;
}

.bloom-box-popup-shell {
    width: 100%;
    min-height: 100vh;
}

.bloom-box-popup {
    display: grid;
    grid-template-columns: 792px minmax(0, 1fr);
    width: 100%;
    min-height: 100vh;
    background: #fff;
}

.bloom-box-popup__media {
    position: sticky;
    top: 0;
    height: 100vh;
    overflow: hidden;
    background: var(--bb-light-grey);
}

.bloom-box-popup__preview-loading {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(236, 231, 225, 0.78);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
    z-index: 6;
}

.bloom-box-popup__preview-loading.--active {
    opacity: 1;
}

.bloom-box-popup__preview-loading .bloom-box-popup__loader {
    width: 40px;
    height: 40px;
    border-width: 4px;
}

.bloom-box-popup__gallery-swiper,
.bloom-box-popup__gallery-slide,
.bloom-box-popup__gallery-image {
    width: 100%;
    height: 100%;
}

.bloom-box-popup__gallery-image {
    display: block;
    object-fit: cover;
}

.bloom-box-popup__content {
    min-width: 0;
    background: #fff;
}

.bloom-box-popup__content-inner {
    display: flex;
    flex-direction: column;
    gap: 36px;
    padding: 24px 16px 48px;
}

.bloom-box-popup__close {
    background: transparent;
    border: 0;
    padding: 0;
}

.bloom-box-popup__description {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.bloom-box-popup__label {
    font-family: NunitoSans, serif;
    font-weight: 500;
    font-size: 18px;
    line-height: 1.45;
    color: var(--bb-chocolate);
}

.bloom-box-popup__description-text {
    display: flex;
    flex-direction: column;
    gap: 16px;
    font-family: NunitoSans, serif;
    font-weight: 400;
    font-size: 14px;
    line-height: 1.45;
    color: var(--bb-chocolate);
}

.bloom-box-popup__description-intro {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.bloom-box-popup__description-text p {
    margin: 0;
}

.bloom-box-popup__categories {
    display: flex;
    flex-direction: column;
    gap: 36px;
}

.bloom-box-popup__category-slider {
    position: relative;
}

.bloom-box-popup__category-swiper {
    overflow: hidden;
}

.bloom-box-popup__category-nav {
    position: absolute;
    top: 174px;
    z-index: 2;
    width: 24px;
    height: 24px;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    color: var(--bb-chocolate);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    outline: none;
    -webkit-tap-highlight-color: transparent;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.bloom-box-popup__category-nav.swiper-button-disabled {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.bloom-box-popup__category-nav--prev {
    left: 12px;
}

.bloom-box-popup__category-nav--next {
    right: 12px;
}

.bloom-box-popup__category-nav span {
    line-height: 1;
    font-size: 18px;
}

.bloom-box-popup__card {
    background: #fff;
}

.bloom-box-popup__card-fav {
    position: absolute;
    top: 16px;
    right: 16px;
    z-index: 2;
    border: 0;
    background: transparent;
    color: var(--bb-chocolate);
    padding: 0;
    width: 16px;
    height: 16px;
    cursor: pointer;
}

.bloom-box-popup__card-info {
    padding-right: 8px;
}

.bloom-box-popup__card-price {
    display: flex;
    align-items: center;
    gap: 8px;
}

.bloom-box-popup__dot {
    width: 12px;
    height: 12px;
    border-radius: 170px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid var(--bb-stroke);
    display: block;
}

.bloom-box-popup__dot.--active {
    background: rgba(255, 255, 255, 0.7);
    border-color: transparent;
}

@media screen and (max-width: 1180px) {
    .bloom-box-popup {
        grid-template-columns: minmax(360px, 46%) minmax(0, 1fr);
    }
}

@media screen and (max-width: 972px) {
    #popup-bloombox {
        align-items: flex-start;
    }

    #popup-bloombox .popup {
        height: 100vh;
        overflow-y: auto;
    }

    .bloom-box-popup {
        grid-template-columns: 1fr;
        min-height: 100%;
    }

    .bloom-box-popup__media {
        position: relative;
        height: 56vh;
        min-height: 320px;
    }

    .bloom-box-popup__header {
        position: relative;
        border-bottom: 0;
        padding-bottom: 0;
    }

    .bloom-box-popup__content-inner {
        gap: 24px;
        padding-top: 16px;
    }

    .bloom-box-popup__category-nav {
        top: 140px;
    }
}

@media screen and (max-width: 480px) {
    .bloom-box-popup__media {
        height: 48vh;
        min-height: 280px;
    }

    .bloom-box-popup__label {
        font-size: 16px;
    }

    .bloom-box-popup__description-text {
        gap: 12px;
    }

    .bloom-box-popup__category-nav {
        display: none;
    }
}

/* ============================================================
   PIXEL PERFECT POPUP LAYER
   ============================================================ */

#popup-bloombox .popup {
    display: block;
    width: 100%;
    max-width: none;
    min-height: 100vh;
    height: 100vh;
    overflow: hidden;
    margin: 0 auto;
    background: #fff;
    transform: none;
}

#popup-bloombox.--active .popup {
    transform: none;
}

#popup-bloombox .bloom-box-popup-shell {
    width: 100%;
}

#popup-bloombox .bloom-box-popup {
    display: flex;
    align-items: stretch;
    width: 100%;
    min-height: 100vh;
    height: 100vh;
    background: #fff;
}

#popup-bloombox .bloom-box-popup__column {
    flex: 1 1 50%;
    min-width: 0;
}

#popup-bloombox .bloom-box-popup__column--media {
    position: relative;
}

#popup-bloombox .bloom-box-popup__media {
    position: sticky;
    top: 0;
    width: 100%;
    height: 100vh;
    padding: 64px 16px 36px;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    overflow: hidden;
    background: #fff;
}

#popup-bloombox .bloom-box-popup__gallery-swiper {
    position: absolute;
    inset: 0;
}

#popup-bloombox .bloom-box-popup__gallery-slide {
    background: var(--bb-light-grey);
}

#popup-bloombox .bloom-box-popup__gallery-image {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
}

#popup-bloombox .bloom-box-popup__photo-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.2);
    pointer-events: none;
}

#popup-bloombox .bloom-box-popup__photo-dots {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

#popup-bloombox .bloom-box-popup__dot {
    width: 12px;
    height: 12px;
    border-radius: 170px;
    border: 1px solid var(--bb-stroke);
    background: rgba(255, 255, 255, 0.1);
}

#popup-bloombox .bloom-box-popup__dot.--active {
    background: rgba(255, 255, 255, 0.7);
    border-color: transparent;
}

/* ---- Gallery navigation arrows ---- */
.bloom-box-popup__gallery-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 3;
    width: 24px;
    background: #fff;
    border-radius: 50%;
    height: 24px;
    padding: 0;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    outline: none;
    -webkit-tap-highlight-color: transparent;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}
.bloom-box-popup__gallery-nav svg {
    width: 14px;
    transform: translateX(1px);
}
.bloom-box-popup__gallery-nav.bloom-box-popup__gallery-nav--prev svg{
    transform: translateX(-1px);
}
.bloom-box-popup__gallery-nav--prev {
    left: 16px;
}

.bloom-box-popup__gallery-nav--next {
    right: 16px;
}

.bloom-box-popup__gallery-nav.swiper-button-disabled {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

/* ---- Category slider scrollbar ---- */
.swiper-blog-products__scrollbar {
    height: 2px;
    margin: 12px 0 0;
    border-radius: 2px;
}

.swiper-blog-products__scrollbar .swiper-scrollbar-drag {
    border-radius: 2px;
}

@media screen and (min-width: 768px) {
    .swiper-blog-products__scrollbar {
        background: transparent;
    }
    .swiper-blog-products__scrollbar .swiper-scrollbar-drag {
        background: transparent;
    }
}

/* ---- «Подробнее» button in popup gallery ---- */
.bloom-box-popup__details-btn {
    position: relative;
    z-index: 3;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 48px;
    padding: 16px 24px;
    background: rgba(255, 255, 255, 0.7);
    border-radius: 2px;
    font-family: NunitoSans, serif;
    font-weight: 400;
    font-size: 14px;
    line-height: 1;
    color: #291A13;
    text-decoration: none;
    white-space: nowrap;
}

#popup-bloombox .bloom-box-popup__column--content {
    position: relative;
    height: 100vh;
    overflow-y: auto;
    overflow-x: hidden;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
}

#popup-bloombox .bloom-box-popup__top {
    width: 100%;
    background: #fff;
}

#popup-bloombox .bloom-box-popup__top-inner {
    display: flex;
    flex-direction: column;
    gap: 24px;
    width: 100%;
    max-width: 808px;
    padding: 40px 16px 0;
}

#popup-bloombox .bloom-box-popup__header {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 0;
    border: 0;
    background: transparent;
}

#popup-bloombox .bloom-box-popup__header-left {
    flex: 1 1 auto;
    min-width: 0;
}

#popup-bloombox .bloom-box-popup__title {
    max-width: 528px;
    font-family: NunitoSans, serif;
    font-size: 28px;
    line-height: 1;
    font-weight: 500;
    color: var(--bb-chocolate);
}

#popup-bloombox .bloom-box-popup__close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    color: var(--bb-chocolate);
    background: transparent;
    border: 0;
    padding: 0;
    flex: 0 0 auto;
}

#popup-bloombox .bloom-box-popup__close svg {
    display: block;
}

#popup-bloombox .bloom-box-popup__description {
    display: flex;
    flex-direction: column;
    gap: 16px;
    width: 100%;
    max-width: 776px;
}

#popup-bloombox .bloom-box-popup__label {
    margin: 0;
    font-family: NunitoSans, serif;
    font-size: 18px;
    line-height: 1.45;
    font-weight: 500;
    color: var(--bb-chocolate);
}

#popup-bloombox .bloom-box-popup__description-text {
    display: flex;
    flex-direction: column;
    gap: 16px;
    font-family: NunitoSans, serif;
    font-size: 14px;
    line-height: 1.45;
    font-weight: 400;
    color: var(--bb-chocolate);
}

#popup-bloombox .bloom-box-popup__description-intro {
    display: flex;
    flex-direction: column;
    gap: 0;
}

#popup-bloombox .bloom-box-popup__description-text p {
    margin: 0;
}

#popup-bloombox .bloom-box-popup__sections {
    display: flex;
    flex-direction: column;
    gap: 36px;
    width: 100%;
    padding-top: 36px;
    padding-bottom: 48px;
}

#popup-bloombox .bloom-box-popup__category {
    display: flex;
    flex-direction: column;
    gap: 24px;
    width: 100%;
    padding: 0 16px;
}

#popup-bloombox .bloom-box-popup__category-title {
    margin: 0;
    width: 100%;
    padding-right: 64px;
    font-family: NunitoSans, serif;
    font-size: 18px;
    line-height: normal;
    font-weight: 500;
    color: #130F0F;
    margin-bottom: 24px;
}

#popup-bloombox .bloom-box-popup__category-slider {
    position: relative;
    width: 100%;
}

#popup-bloombox .bloom-box-popup__category-swiper {
    width: 100%;
    overflow: hidden;
}

#popup-bloombox .bloom-box-popup__category-swiper.swiper-blog-products {
    position: relative;
}

#popup-bloombox .swiper-blog-products-nav {
    position: static;
}

#popup-bloombox .swiper-blog-products-nav .swiper__btn-prev-wrapper {
    display: block;
    left: 8px;
    right: unset;
    top: 50%;
    transform: translateY(calc(-50% - 40px));
    z-index: 3;
    outline: none;
    -webkit-tap-highlight-color: transparent;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

#popup-bloombox .swiper-blog-products-nav .swiper__btn-prev-wrapper.swiper-button-disabled {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

#popup-bloombox .swiper-blog-products-nav .swiper__btn-next-wrapper {
    display: block;
    right: 8px;
    top: 50%;
    transform: translateY(calc(-50% - 40px));
    z-index: 3;
    outline: none;
    -webkit-tap-highlight-color: transparent;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

#popup-bloombox .swiper-blog-products-nav .swiper__btn-next-wrapper.swiper-button-disabled {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

#popup-bloombox .bloom-box-popup__category-swiper .swiper-wrapper {
    align-items: flex-start;
}

#popup-bloombox .product-card-offer.bloom-box-popup__offer--selected {
    background: var(--bb-chocolate);
}

#popup-bloombox .product-card-offer.bloom-box-popup__offer--selected .product-card-offer__size {
    color: var(--bb-light-grey);
}

#popup-bloombox .bloom-box-popup__card {
    width: auto;
    background: #fff;
}

#popup-bloombox .bloom-box-popup__card-img-wrap {
    position: relative;
    width: 100%;
    height: auto;
    aspect-ratio: 248 / 362;
    overflow: visible;
}

#popup-bloombox .bloom-box-popup__card-img-wrap::before {
    content: "";
    display: block;
    width: 100%;
    padding-top: 145.967742%;
}

#popup-bloombox .bloom-box-popup__card-fav {
    position: absolute;
    top: 16px;
    right: 16px;
    z-index: 2;
    width: 16px;
    height: 16px;
    padding: 0;
    color: var(--bb-chocolate);
    background: transparent;
    border: 0;
}

#popup-bloombox .bloom-box-popup__card-fav.--liked svg path,
#popup-bloombox .bloom-box-popup__card-fav.--liked svg {
    stroke: var(--bb-secondary-blue);
    fill: rgba(105, 124, 166, 0.12);
}

#popup-bloombox .bloom-box-popup__card-fav svg,
#popup-bloombox .bloom-box-popup__card-add svg {
    display: block;
}

#popup-bloombox .bloom-box-popup__card-img {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: var(--bb-light-grey);
}

#popup-bloombox .bloom-box-popup__card-add {
    position: absolute;
    left: 50%;
    bottom: 0;
    z-index: 4;
    width: 24px;
    height: 24px;
    border-radius: 71px;
    transform: translate(-50%, -50%);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 0;
    color: var(--bb-chocolate);
    background: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    pointer-events: auto;
}

#popup-bloombox .bloom-box-popup__card-info {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
    padding-top: 12px;
}

#popup-bloombox .bloom-box-popup__card-name {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    font-family: NunitoSans, serif;
    font-size: 14px;
    line-height: 1;
    font-weight: 500;
    color: var(--bb-chocolate);
}

#popup-bloombox .bloom-box-popup__card-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    min-height: 16px;
}

#popup-bloombox .bloom-box-popup__card-price {
    flex: 0 0 auto;
    font-family: NunitoSans, serif;
    font-size: 14px;
    line-height: 1;
    font-weight: 400;
    color: var(--bb-chocolate);
    white-space: nowrap;
}

#popup-bloombox .bloom-box-popup__card-colors {
    display: flex;
    align-items: center;
    gap: 4px;
    min-width: 0;
}

#popup-bloombox .bloom-box-popup__card-color {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    flex: 0 0 auto;
}

#popup-bloombox .bloom-box-popup__category-nav {
    position: absolute;
    top: calc(50% - 50px);
    z-index: 3;
    width: 32px;
    height: 32px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transform: none;
}

#popup-bloombox .bloom-box-popup__category-nav--prev {
    left: 12px;
}

#popup-bloombox .bloom-box-popup__category-nav--next {
    right: 12px;
}

#popup-bloombox .bloom-box-popup__category-nav.swiper-button-disabled {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

@media screen and (max-height: 820px) and (min-width: 992px) {
    #popup-bloombox .bloom-box-popup__top {
        min-height: 308px;
    }

    #popup-bloombox .bloom-box-popup__top-inner {
        gap: 20px;
        padding-top: 24px;
    }

    #popup-bloombox .bloom-box-popup__sections {
        gap: 28px;
        padding-top: 24px;
        padding-bottom: 32px;
    }

    #popup-bloombox .bloom-box-popup__category {
        gap: 20px;
    }

    #popup-bloombox .bloom-box-popup__card-info {
        padding-top: 8px;
    }

    #popup-bloombox .bloom-box-popup__card-add {
        bottom: 12px;
        transform: translate(-50%, 0);
    }

    #popup-bloombox .bloom-box-popup__category-nav {
        top: calc(50% - 42px);
    }
}

@media screen and (max-width: 1599px) {
    #popup-bloombox .bloom-box-popup__media {
        width: auto;
    }
}

@media screen and (max-width: 1279px) {
    #popup-bloombox .bloom-box-popup__media {
        height: 100vh;
        padding-top: 48px;
    }

    #popup-bloombox .bloom-box-popup__top,
    #popup-bloombox .bloom-box-popup__sections,
    #popup-bloombox .bloom-box-popup__category,
    #popup-bloombox .bloom-box-popup__category-title,
    #popup-bloombox .bloom-box-popup__category-slider,
    #popup-bloombox .bloom-box-popup__category-swiper,
    #popup-bloombox .bloom-box-popup__top-inner,
    #popup-bloombox .bloom-box-popup__description {
        width: auto;
    }

    #popup-bloombox .bloom-box-popup__title {
        max-width: none;
    }
}

@media screen and (max-width: 991px) {
    #popup-bloombox .bloom-box-popup {
        display: flex;
        flex-direction: column;
        width: 100%;
        min-height: auto;
        height: auto;
    }

    /* Переставляем: описание → фото → категории */
    #popup-bloombox .bloom-box-popup__column--content {
        display: contents;
    }

    #popup-bloombox .bloom-box-popup__top {
        order: -1;
        min-height: 378px;
    }

    #popup-bloombox .bloom-box-popup__column--media {
        order: 0;
    }

    #popup-bloombox .bloom-box-popup__sections {
        order: 1;
    }

    #popup-bloombox .bloom-box-popup__media {
        position: relative;
        width: 100%;
        height: 72vw;
        min-height: 320px;
        max-height: 640px;
        padding: 0 16px 16px;
    }

    /* Кнопка «Подробнее» — на всю ширину */
    #popup-bloombox .bloom-box-popup__details-btn {
        width: 90%;
        padding: 8px 24px;
        height: 32px;
        text-align: center;
    }

    #popup-bloombox {
        overflow-y: auto;
        overflow-x: hidden;
        overscroll-behavior: contain;
        -webkit-overflow-scrolling: touch;
    }

    #popup-bloombox .popup {
        height: auto;
        min-height: 100vh;
        overflow: visible;
    }

    #popup-bloombox .bloom-box-popup__gallery-swiper {
        inset: 0;
    }

    #popup-bloombox .bloom-box-popup__top {
        width: 100%;
        min-height: auto;
    }

    #popup-bloombox .bloom-box-popup__top-inner {
        width: auto;
        padding: 24px 16px 0;
    }

    #popup-bloombox .bloom-box-popup__sections {
        width: 100%;
        padding-top: 24px;
        gap: 24px;
    }

    #popup-bloombox .bloom-box-popup__category {
        width: 100%;
    }

    #popup-bloombox .bloom-box-popup__category-title,
    #popup-bloombox .bloom-box-popup__category-slider,
    #popup-bloombox .bloom-box-popup__category-swiper {
        width: 100%;
    }

    #popup-bloombox .bloom-box-popup__category-title {
        padding-right: 0;
    }

    #popup-bloombox .bloom-box-popup__card {
        width: 212px;
    }

    #popup-bloombox .bloom-box-popup__card-img-wrap {
        width: 212px;
        height: 310px;
    }

    #popup-bloombox .bloom-box-popup__card-info,
    #popup-bloombox .bloom-box-popup__card-meta {
        width: 212px;
    }

    #popup-bloombox .bloom-box-popup__category-nav {
        top: calc(50% - 42px);
    }
}

@media screen and (max-width: 559px) {
    #popup-bloombox .popup {
        width: 100%;
        max-width: 100%;
    }

    #popup-bloombox .bloom-box-popup__media {
        min-height: 280px;
        height: 139vw;
        max-height: 520px;
        padding: 0 0 16px;
    }

    #popup-bloombox .bloom-box-popup__top-inner {
        gap: 20px;
        padding-top: 20px;
        padding-bottom: 36px;
    }

    #popup-bloombox .bloom-box-popup__title {
        font-size: 24px;
    }

    #popup-bloombox .bloom-box-popup__label {
        font-size: 16px;
    }

    #popup-bloombox .bloom-box-popup__description-text {
        gap: 12px;
        font-size: 13px;
    }

    #popup-bloombox .bloom-box-popup__sections {
        gap: 20px;
        padding-top: 20px;
    }

    #popup-bloombox .bloom-box-popup__category {
        gap: 20px;
    }

    #popup-bloombox .bloom-box-popup__card {
        width: 167px;
    }

    #popup-bloombox .bloom-box-popup__card-img-wrap {
        width: 167px;
        height: 244px;
    }

    #popup-bloombox .bloom-box-popup__card-info,
    #popup-bloombox .bloom-box-popup__card-meta {
        width: 167px;
    }

    #popup-bloombox .bloom-box-popup__card-name,
    #popup-bloombox .bloom-box-popup__card-price {
        font-size: 12px;
    }

    #popup-bloombox .bloom-box-popup__card-color {
        width: 12px;
        height: 12px;
    }

    #popup-bloombox .bloom-box-popup__category-nav {
        display: none;
    }
}

/* Кнопка «Добавить в Bloom Box» на детальной странице товара */
.bloombox-add-btn {
    background: #291A13 !important;
    color: #fff !important;
    margin-top: 8px;
}
