/* Скрываем элементы шапки */
.headers-container,
.header_top_logo,
.menu-row.middle-block.bgwhite,
#headerfixed,
#headerfixed.fixed,
.top-block-wrapper,
#navigation,
.breadcrumbs,
.title-v {
display: none !important;
visibility: hidden !important;
opacity: 0 !important;
height: 0 !important;
overflow: hidden !important;
}

/* Скрываем часть шапки с логотипом и меню на странице корзины */
.maxwidth-theme > .header_top_logo {
display: none !important;
}

/* Скрываем блок меню с каталогом и поиском на странице корзины */
.menu-row.middle-block.bgwhite {
display: none !important;
}

/* Скрываем фиксированную шапку на странице оформления заказа */
#headerfixed,
#headerfixed.fixed {
display: none !important;
}

/* Скрываем дублирующиеся блоки с заголовком (кроме нашего) */
.top-block-wrapper,
#navigation,
.breadcrumbs {
display: none !important;
}

/* Заголовок страницы "Оформление заказа" с логотипом слева, заголовок по центру */
.checkout-heading-with-logo {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 16px !important;
}

.checkout-heading-spacer {
  width: 120px;
  flex-shrink: 0;
}

.maxwidth-theme .page-top h1#pagetitle {
  flex: 1 !important;
  min-width: 0;
}

.checkout-page-logo {
  flex-shrink: 0;
  display: block;
  line-height: 0;
}

.checkout-page-logo img {
  width: 120px;
  height: auto;
  max-height: 40px;
  object-fit: contain;
  display: block;
}

.maxwidth-theme .page-top,
.maxwidth-theme .page-top .topic,
.maxwidth-theme .page-top .topic__inner {
  text-align: center !important;
}

.maxwidth-theme .page-top h1#pagetitle {
  text-align: center !important;
  margin: 20px 0 !important;
  font-size: 25px !important;
  font-weight: 500 !important;
}

@media (max-width: 480px) {
  .checkout-page-logo img {
    width: 100px;
    max-height: 32px;
  }

  .checkout-heading-spacer {
    width: 100px;
  }

  .checkout-heading-with-logo {
    gap: 12px !important;
  }
}

.page-top > div:last-of-type {
padding: 15px 0 15px;
}


/* Стили только для страницы корзины - обернуты в специфичный контейнер */
.basket-page-wrapper {
font-family: inherit;
background-color: #F5F5F5;
color: #333;
line-height: 1.5;
width: 100%;
border-radius: 10px;
}

.basket-page-wrapper * {
box-sizing: border-box;
}

.basket-page-wrapper .basket-container {
width: 100%;
margin: 20px auto;
padding: 20px;
}

.basket-page-wrapper .basket-header {
margin-bottom: 24px;
}

.basket-page-wrapper .basket-title {
font-size: 28px;
font-weight: 700;
margin-bottom: 8px;
color: #000;
position: relative;
display: inline-block;
}

/* Blur Text Animation */
.basket-page-wrapper .blur-text {
animation: blur-text 1.5s ease-out forwards;
animation-delay: 120ms;
filter: blur(10px);
opacity: 0;
}

@keyframes blur-text {
0% {
filter: blur(10px);
opacity: 0;
}
50% {
filter: blur(5px);
opacity: 0.5;
}
100% {
filter: blur(0px);
opacity: 1;
}
}

.basket-page-wrapper .basket-count {
font-size: 16px;
color: #666;
}

.basket-page-wrapper .basket-content {
display: grid;
grid-template-columns: 1fr 400px;
gap: 24px;
align-items: start;
}

.basket-page-wrapper .cart-items {
background: transparent;
border-radius: 0;
padding: 0;
margin-top: 8px;
}

.basket-page-wrapper .cart-item {
display: grid;
grid-template-columns: 120px 1fr auto;
align-items: center;
gap: 16px;
padding: 15px 0;
    width: 95%;
border-bottom: 1px solid #f0f0f0;
}

.basket-page-wrapper .cart-item:last-child {
border-bottom: none;
}

.basket-page-wrapper .item-image {
width: 120px;
    height: 80px;
object-fit: contain;
border-radius: 8px;
    background: rgb(255, 255, 255);
cursor: pointer;
transition: opacity 0.2s;
    padding: 0px;
box-sizing: border-box;
    grid-column-start: 1;
    grid-column-end: auto;
    display: block;
    flex-shrink: 0;
}

.basket-page-wrapper .item-image:hover {
opacity: 0.8;
}

/* Модальное окно для просмотра изображения */
.basket-page-wrapper .image-modal {
display: none;
position: fixed;
z-index: 10000;
left: 0;
top: 0;
width: 100%;
height: 100%;
background-color: rgba(0, 0, 0, 0.9);
overflow: auto;
animation: fadeIn 0.3s;
}

.basket-page-wrapper .image-modal.active {
display: flex;
align-items: center;
justify-content: center;
}

.basket-page-wrapper .image-modal-content {
position: relative;
max-width: 90%;
max-height: 90%;
margin: auto;
animation: zoomIn 0.3s;
}

.basket-page-wrapper .image-modal-content img {
width: 100%;
height: auto;
max-height: 90vh;
object-fit: contain;
border-radius: 8px;
}

.basket-page-wrapper .image-modal-close {
position: absolute;
top: -40px;
right: 0;
color: #fff;
font-size: 40px;
font-weight: bold;
cursor: pointer;
width: 40px;
height: 40px;
display: flex;
align-items: center;
justify-content: center;
background: rgba(255, 255, 255, 0.1);
border-radius: 50%;
transition: background 0.2s;
}

.basket-page-wrapper .image-modal-close:hover {
background: rgba(255, 255, 255, 0.2);
}

@keyframes fadeIn {
from { opacity: 0; }
to { opacity: 1; }
}

@keyframes zoomIn {
from { transform: scale(0.8); opacity: 0; }
to { transform: scale(1); opacity: 1; }
}

.basket-page-wrapper .item-info {
grid-column: 2;
min-width: 0;
}

.basket-page-wrapper .item-brand {
font-size: 14px;
color: #666;
margin-bottom: 4px;
}

.basket-page-wrapper .item-name {
font-size: 16px;
font-weight: 500;
margin-bottom: 8px;
color: #000;
line-height: 1.4;
text-decoration: none;
display: block;
}

.basket-page-wrapper .item-name:hover {
color: #dc2f2f;
text-decoration: none;
}

.basket-page-wrapper .item-description {
font-size: 14px;
color: #666;
margin-bottom: 8px;
}

/* Стикеры в корзине */
.basket-page-wrapper .basket-stickers {
display: flex;
flex-wrap: wrap;
gap: 4px;
margin-bottom: 4px;
}

.basket-page-wrapper .basket-sticker {
display: inline-block;
font-size: 12px;
line-height: 12px;
padding: 6px 7px;
border-radius: 2px;
color: #fff;
background-color: #60c339;
letter-spacing: 0.5px;
}

.basket-page-wrapper .basket-sticker.sticker_hit,
.basket-page-wrapper .basket-sticker.sticker_khit {
background-color: #2992d9;
}

.basket-page-wrapper .basket-sticker.sticker_sale_text {
background-color: #fc482d;
}

.basket-page-wrapper .basket-sticker.sticker_stock,
.basket-page-wrapper .basket-sticker.sticker_aktsiya {
background-color: #ffd83a;
color: #333;
}

.basket-page-wrapper .basket-sticker.sticker_recommend,
.basket-page-wrapper .basket-sticker.sticker_sovetuem {
background-color: #893ca9;
}


.basket-page-wrapper .item-actions-row {
display: flex;
align-items: start;
justify-content: flex-start;
gap: 12px;
flex-wrap: wrap;
}

.basket-page-wrapper .action-icons {
display: flex;
align-items: center;
gap: 12px;
}

.icon-btn {
width: 24px;
height: 24px;
border: none;
background: none;
cursor: pointer;
display: flex;
align-items: center;
justify-content: center;
color: #666;
transition: color 0.2s;
}

.icon-btn:hover {
color: #dc2f2f;
}

.icon-btn.js-item-action.added.in {
color: #c8100f;
}

.icon-btn.js-item-action.added.in:hover {
color: #a00d0c;
}

.icon-btn.js-item-action.added.in svg {
fill: #c8100f;
stroke: #c8100f;
}

.icon-btn svg {
width: 20px;
height: 20px;
}

.basket-page-wrapper .item-right {
display: flex;
align-items: flex-start;
justify-content: start;
    gap: 25px;
grid-column-start: 3;
grid-column-end: auto;
    width: 230px;
justify-self: end;
}

.basket-page-wrapper .quantity-selector-wrapper {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
gap: 6px;
width: 130px;
flex-shrink: 0;
}

.basket-page-wrapper .quantity-selector {
display: flex;
align-items: center;
justify-content: center;
gap: 0;
background: #f5f5f5;
border: none;
border-radius: 8px;
padding: 0;
overflow: hidden;
width: 100%;
}

.basket-page-wrapper .available-quantity-text {
font-size: 11px;
color: #999;
line-height: 1.2;
text-align: center;
white-space: nowrap;
}

.basket-page-wrapper .cart-item-min-order {
    margin-top: 4px;
    font-size: 12px;
    line-height: 1.3;
    color: #e53935;
}

.basket-page-wrapper .qty-btn {
width: 40px;
height: 36px;
border: none;
background: transparent;
border-radius: 0;
cursor: pointer;
display: flex;
align-items: center;
justify-content: center;
font-size: 18px;
font-weight: 500;
color: #333;
transition: background 0.2s;
padding: 0;
}

.basket-page-wrapper .qty-btn:hover {
background: rgba(0, 0, 0, 0.05);
}

.basket-page-wrapper .qty-btn:active {
background: rgba(0, 0, 0, 0.1);
}

.qty-value {
min-width: 50px;
text-align: center;
font-size: 16px;
font-weight: 500;
color: #333;
padding: 0 8px;
}

.basket-page-wrapper .item-right .item-price {
display: flex;
flex-direction: column;
align-items: flex-start;
justify-content: center;
gap: 4px;
align-self: flex-start;
margin-top: 6px;
}

.basket-page-wrapper .price-with-tooltip {
display: flex;
align-items: center;
gap: 8px;
    white-space: nowrap;
    flex-wrap: nowrap;
}

.basket-page-wrapper .price-current {
font-size: 16px;
font-weight: 600;
color: #dc2f2f;
    white-space: nowrap;
    display: inline-block;
    line-height: 1.2;
}

.basket-page-wrapper .price-with-tooltip .hint {
position: relative;
display: inline-flex;
align-items: center;
justify-content: center;
}

.basket-page-wrapper .price-with-tooltip .hint:hover {
z-index: 1001;
}

.basket-page-wrapper .price-with-tooltip .hint .icon {
width: 17px;
height: 17px;
border-radius: 35%;
cursor: pointer;
display: inline-flex;
align-items: center;
justify-content: center;
font-size: 10px;
font-style: normal;
font-weight: 600;
transition: all 0.2s;
flex-shrink: 0;
border: 1px solid #f0f0f0;
color: #999;
}

.basket-page-wrapper .price-with-tooltip .hint:hover .icon {
background: #dc2f2f;
color: #fff;
border-color: #dc2f2f;
}

.basket-page-wrapper .price-with-tooltip .hint .tooltip {
position: absolute;
left: 78%;
/* bottom: 23px; */
transform: translateX(-50%);
padding: 15px;
font-size: 14px;
line-height: 1.4;
color: #777;
border-radius: 11px;
background: #fff;
box-shadow: 0px 10px 25px 0px rgba(0, 0, 0, 0.1);
white-space: nowrap;
z-index: 1000;
display: none;
visibility: hidden;
opacity: 0;
transition: opacity 0.2s ease, visibility 0.2s ease;
-webkit-transition: opacity 0.2s ease, visibility 0.2s ease;
-moz-transition: opacity 0.2s ease, visibility 0.2s ease;
-ms-transition: opacity 0.2s ease, visibility 0.2s ease;
-o-transition: opacity 0.2s ease, visibility 0.2s ease;
text-align: center;
}

.basket-page-wrapper .price-with-tooltip .hint .tooltip:after {
content: "";
position: absolute;
left: 50%;
bottom: -10px;
margin-left: -5px;
border: 5px solid transparent;
border-top: 5px solid #fff;
}

/* Tooltip управляется через JavaScript */

.basket-page-wrapper .price-current.red {
color: #FF4444;
}

.price-old {
font-size: 14px;
color: #999;
text-decoration: line-through;
}

.basket-page-wrapper .checkout-steps {
background: #fff;
border-radius: 8px;
padding: 24px;
margin-bottom: 25px;
}

.basket-page-wrapper .step:last-child {
margin-bottom: 0;
}

.basket-page-wrapper .step-title {
font-size: 20px;
font-weight: 500;
margin-bottom: 10px;
color: rgb(0, 0, 0);
}

.basket-page-wrapper .step-link {
color: #dc2f2f;
text-decoration: none;
font-size: 14px;
cursor: pointer;
transition: color 0.2s;
}

.basket-page-wrapper .step-link:hover {
color: #c8100f;
text-decoration: underline;
}

/* Способы оплаты в один ряд */
.basket-page-wrapper #payments-list {
display: flex;
flex-wrap: wrap;
gap: 12px;
}

.basket-page-wrapper .payment-item {
    flex: 1 1 0%;
min-width: 200px;
    background: rgb(255, 255, 255);
    border-radius: 8px;
    padding: 16px;
    cursor: pointer;
    transition: none;
    margin-bottom: 0px !important;
    border: 2px solid #E5E5E5 !important;
}

.basket-page-wrapper .payment-item.active {
    border-color: #DC2F2F !important;
    box-shadow: none;
}

.basket-page-wrapper .payment-item-content {
    display: flex;
    align-items: center;
    gap: 12px;
}

.basket-page-wrapper .payment-item-logo {
    max-width: 60px;
    max-height: 40px;
    object-fit: contain;
}

.basket-page-wrapper .payment-item-name {
    flex: 1;
}

.basket-page-wrapper .payment-item-name-text {
    font-weight: 600;
    font-size: 16px;
}

.basket-page-wrapper .payment-item-description {
    color: #666;
    font-size: 14px;
}

.person-type-btn,
.person-type-btn-inline {
    flex: 1 1 0%;
    min-width: 200px;
    padding: 16px;
    border: 2px solid #E5E5E5 !important;
    border-radius: 8px;
    background: #fff !important;
    color: #333 !important;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    transition: none;
}

/* На десктопе показываем полный текст, короткий — скрыт */
.person-type-btn__short {
    display: none;
}

/* На мобильном (≤480px) показываем сокращение «Физ. лицо» / «Юр. лицо» */
@media (max-width: 480px) {
    .person-type-btn__full {
        display: none;
    }
    .person-type-btn__short {
        display: inline;
    }
}

.person-type-btn.active,
.person-type-btn-inline.active {
    border-color: #DC2F2F !important;
    box-shadow: none !important;
    color: #161616 !important;
}

.person-type-btn:not(.active):hover,
.person-type-btn-inline:not(.active):hover {
    border-color: #E5E5E5 !important;
}

.person-type-btn:focus,
.person-type-btn-inline:focus {
    outline: none !important;
    border-color: #E5E5E5 !important;
    box-shadow: none !important;
}

.person-type-btn.active:focus,
.person-type-btn-inline.active:focus {
    border-color: #DC2F2F !important;
    box-shadow: none !important;
}

/* Сообщение об ошибке под правым сайдбаром */
.basket-page-wrapper .payment-error-message {
    margin-top: 16px;
    padding: 12px 16px;
    background-color: #fff3f3;
    border: 1px solid #dc2f2f;
    border-radius: 8px;
    color: #dc2f2f;
    font-size: 14px;
    text-align: center;
    display: none;
    animation: fadeIn 0.3s ease-in;
}

.basket-page-wrapper .payment-error-message.show {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.basket-page-wrapper .order-summary {
background: #fff;
border-radius: 8px;
padding: 24px;
position: sticky;
top: 15px;
}

/* Стили для стандартного виджета Bitrix локации */
#location-widget-container .bx-sls {
width: 100%;
}

#location-widget-container .bx-sls input[type="text"] {
width: 100%;
border: 2px solid #e83333;
background: #fff;
color: #333;
padding: 8px 16px;
border-radius: 6px;
font-size: 14px;
box-sizing: border-box;
}

#location-widget-container .bx-sls input[type="text"]:focus {
border-color: #dc2f2f;
outline: none;
}

#location-widget-container .bx-sls .bx-ui-slst-loader {
display: none;
}

#location-widget-container .bx-sls .bx-ui-slst-dropdown {
border: 1px solid #E5E5E5;
border-radius: 6px;
box-shadow: 0 2px 8px rgba(0,0,0,0.1);
margin-top: 4px;
}

.basket-page-wrapper .summary-details {
margin-bottom: 24px;
}

.basket-page-wrapper .summary-row {
display: flex;
justify-content: space-between;
margin-bottom: 12px;
font-size: 16px;
}

.basket-page-wrapper .summary-row:last-child {
margin-bottom: 0;
}

.basket-page-wrapper .summary-label {
color: #666;
}

.basket-page-wrapper .summary-value {
font-weight: 500;
color: #000;
}

.basket-page-wrapper .summary-total {
font-size: 24px;
font-weight: 700;
color: #000;
margin-top: 16px;
padding-top: 16px;
border-top: 1px solid #f0f0f0;
}

.basket-page-wrapper .summary-total .summary-label {
color: #000;
}

.basket-page-wrapper .order-button {
width: 100%;
padding: 16px;
background: #dc2f2f;
color: #fff;
border: none;
border-radius: 8px;
font-size: 16px;
font-weight: 600;
cursor: pointer;
transition: background 0.2s;
margin-bottom: 16px;
}

.basket-page-wrapper .order-button:hover {
background: #c8100f;
}

.basket-page-wrapper .order-button:active {
background: #b91c1b;
}

.basket-page-wrapper .one-click-button {
background: transparent !important;
border: 2px solid #dc2f2f !important;
color: #dc2f2f !important;
margin-top: 12px;
}

.basket-page-wrapper .one-click-button:hover {
background: #dc2f2f !important;
color: #fff !important;
}

.basket-page-wrapper .one-click-button:active {
background: #c8100f !important;
border-color: #c8100f !important;
}

/* Переопределение стилей для кнопок в модалке профиля */
.basket-page-wrapper #profile-modal .order-button {
width: auto !important;
padding: 10px 24px !important;
font-size: 14px !important;
font-weight: 500 !important;
margin-bottom: 0 !important;
border-radius: 6px !important;
}

/* Кнопка "Отмена" - серая с рамкой */
.basket-page-wrapper #profile-modal .order-button[style*="background:#e0e0e0"] {
border: 1px solid #d0d0d0 !important;
}

.basket-page-wrapper #profile-modal .order-button[style*="background:#e0e0e0"]:hover {
background: #f0f0f0 !important;
border-color: #b0b0b0 !important;
}

/* Кнопка "Сохранить" - красная */
.basket-page-wrapper #profile-modal .order-button[type="submit"] {
background: #dc2f2f !important;
}

.basket-page-wrapper #profile-modal .order-button[type="submit"]:hover {
background: #c8100f !important;
}

.basket-page-wrapper #profile-modal .order-button[type="submit"]:active {
background: #b91c1b !important;
}

.basket-page-wrapper .terms-checkbox {
display: flex;
align-items: flex-start;
gap: 8px;
}

.basket-page-wrapper .checkbox-input {
width: 20px;
height: 20px;
margin-top: 2px;
cursor: pointer;
accent-color: #dc2f2f;
}

.basket-page-wrapper .checkbox-label {
font-size: 12px;
color: #666;
line-height: 1.4;
}

@media (max-width: 968px) {
.basket-page-wrapper .basket-content {
grid-template-columns: 1fr;
}

.basket-page-wrapper .order-summary {
position: static;
}
}

@media (max-width: 640px) {
.basket-page-wrapper .cart-item {
grid-template-columns: 1fr;
}

.basket-page-wrapper .item-image {
grid-column: 1;
width: 100%;
height: 250px;
object-fit: contain;
background: #ffffff;
padding: 15px;
}

.basket-page-wrapper .item-info {
grid-column: 1;
}

.basket-page-wrapper .item-right {
grid-column: 1;
width: 100%;
justify-self: start;
flex-direction: column;
align-items: flex-start;
gap: 12px;
margin-top: 12px;
}

.basket-page-wrapper .item-right .item-price {
align-items: flex-start;
}
}

/* Стили для пустой корзины */
.basket-page-wrapper .empty-cart-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 60vh;
    padding: 40px 20px;
    text-align: center;
}

.basket-page-wrapper .empty-cart-icon {
    margin-bottom: 30px;
}

.basket-page-wrapper .empty-cart-icon svg {
    color: #d0d0d0;
}

.basket-page-wrapper .empty-cart-title {
    font-size: 28px;
    font-weight: 700;
    color: #000;
    margin: 0 0 20px 0;
    line-height: 1.2;
}

.basket-page-wrapper .empty-cart-text {
    font-size: 16px;
    color: #333;
    line-height: 1.5;
}

.basket-page-wrapper .empty-cart-link {
    color: #dc2f2f;
    text-decoration: none;
    font-weight: 500;
}

.basket-page-wrapper .empty-cart-back {
    margin-top: 8px;
    display: inline-block;
}

/* Стили для загрузки */
.basket-page-wrapper .loading-text {
    text-align: center;
    padding: 40px;
    color: #666;
}

.basket-page-wrapper .loading-text-small {
    color: #666;
    font-size: 14px;
}

/* Стили для шапок секций */
.basket-page-wrapper .step-header {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.basket-page-wrapper .step-header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.basket-page-wrapper .step-header-actions {
    display: flex;
    gap: 16px;
    align-items: center;
}

.basket-page-wrapper .step-header-location {
    flex: 1;
    max-width: 400px;
}

.basket-page-wrapper .location-widget-container {
    width: 100%;
}

.basket-page-wrapper .step-content {
    margin-top: 8px;
}

/* Стили для textarea комментария */
.basket-page-wrapper #order-comment {
    width: 100%;
    min-height: 90px;
    padding: 10px;
    border: 1px solid #E5E5E5;
    border-radius: 6px;
}

/* Стили для кнопки "Купить в 1 клик" */
.basket-page-wrapper .one-click-button {
    background: transparent;
    border: 2px solid #dc2f2f;
    color: #dc2f2f;
}

/* Стили для модального окна профиля */
#profile-modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    overflow-y: auto;
    padding: 20px;
}

#confirm-modal.confirm-modal{
    display: none;
    position: fixed;
    inset: 0;
    z-index: 10001; /* поверх остальных модалок/оверлеев */
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(0, 0, 0, 0.35);
}

#confirm-modal.confirm-modal.active{
    display: flex;
}

#confirm-modal .confirm-modal__dialog{
    width: 520px;
    max-width: 92vw;
    background: #fff;
    border-radius: 12px;
    padding: 18px 18px 16px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.18);
    max-height: 90vh;
    overflow: auto;
}

#confirm-modal .confirm-modal__dialog:focus,
#confirm-modal .confirm-modal__dialog:focus-visible{
    outline: none;
}

#confirm-modal .confirm-modal__header{
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

#confirm-modal .confirm-modal__title{
    font-size: 18px;
    font-weight: 600;
    color: #111;
}

#confirm-modal .confirm-modal__close{
    border: none;
    background: none;
    font-size: 22px;
    cursor: pointer;
    line-height: 1;
    padding: 0 6px;
    color: #666;
}

#confirm-modal .confirm-modal__close:hover{
    color: #111;
}

#confirm-modal .confirm-modal__text{
    font-size: 15px;
    color: #333;
    line-height: 1.4;
    margin: 0;
}

#confirm-modal .confirm-modal__actions{
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 16px;
}

#confirm-modal .confirm-modal__btn{
    /* reset native button look */
    -webkit-appearance: none;
    appearance: none;
    border: 1px solid transparent;
    box-shadow: none;
    outline: none;

    /* Aspro-like button feel (similar to profile modal buttons) */
    width: auto;
    min-width: 140px;
    padding: 10px 24px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.2;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s, color 0.2s, transform 0.05s;
}

#confirm-modal .confirm-modal__btn--cancel{
    background: #e0e0e0;
    color: #333;
    border-color: #d0d0d0;
}

#confirm-modal .confirm-modal__btn--cancel:hover{
    background: #f0f0f0;
    border-color: #b0b0b0;
}

#confirm-modal .confirm-modal__btn--ok{
    background: #dc2f2f;
    color: #fff;
    border-color: #dc2f2f;
}

#confirm-modal .confirm-modal__btn--ok:hover{
    background: #c8100f;
    border-color: #c8100f;
}

#confirm-modal .confirm-modal__btn:active{
    transform: translateY(1px);
}

#confirm-modal .confirm-modal__btn:focus-visible{
    outline: 3px solid rgba(220,47,47,0.25);
    outline-offset: 2px;
}

#profile-modal.active,
#profile-modal[style*="display: flex"],
#profile-modal[style*="display:flex"] {
    display: flex !important;
}

#profile-modal .modal-content {
    width: 520px;
    max-width: 92vw;
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    max-height: 90vh;
    overflow-y: auto;
    margin: auto;
}

#profile-modal .modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

#profile-modal .modal-title {
    font-size: 18px;
    font-weight: 600;
}

#profile-modal .modal-header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

#profile-modal .modal-delete-link {
    display: none;
    color: #e83333;
    font-size: 14px;
    text-decoration: none;
}

#profile-modal .modal-close-btn {
    border: none;
    background: none;
    font-size: 22px;
    cursor: pointer;
}

#profile-modal .profile-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

#profile-modal .profile-form-field-hidden {
    display: none;
}

#profile-modal .profile-form-label {
    font-size: 14px;
    color: #666;
    display: block;
    margin-bottom: 8px;
}

#profile-modal .profile-form-input {
    width: 100%;
    padding: 10px;
    border: 1px solid #E5E5E5;
    border-radius: 6px;
}

#profile-modal .profile-properties-container {
    margin-top: 16px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

#profile-modal .profile-form-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 16px;
}

#profile-modal .profile-form-cancel {
    background: #e0e0e0;
    color: #333;
}

/* Стили для скрытых элементов */
.basket-page-wrapper .hidden {
    display: none !important;
}

.basket-page-wrapper .summary-row.hidden {
    display: none !important;
}

.basket-page-wrapper .person-type-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

/* Стили для delivery-item */
.basket-page-wrapper .delivery-item {
    background: rgb(255, 255, 255);
    border-radius: 8px;
    padding: 23px;
    margin-top: 8px;
    transition: none;
    cursor: pointer;
    border: 2px solid #E5E5E5 !important;
}

.basket-page-wrapper .delivery-item.active {
    border-color: #DC2F2F !important;
    box-shadow: none;
}

.basket-page-wrapper .delivery-item-header {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: flex-start;
}

.basket-page-wrapper .delivery-item-header-content {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.basket-page-wrapper .delivery-item-logo {
    max-width: 35px;
    max-height: 40px;
    object-fit: contain;
}

.basket-page-wrapper .delivery-item-name {
    flex: 1;
}

.basket-page-wrapper .delivery-item-name-text {
    font-weight: 600;
    font-size: 16px;
}

.basket-page-wrapper .delivery-details {
    margin-top: 8px;
    color: rgb(68, 68, 68);
    font-size: 14px;
    display: none;
}

.basket-page-wrapper .delivery-details.active {
    display: block;
}

.basket-page-wrapper .delivery-details-description {
    margin-bottom: 6px;
}

.basket-page-wrapper .delivery-details-price {
    color: #000;
    font-weight: 500;
}

.basket-page-wrapper .delivery-details-period {
    color: #666;
    font-size: 13px;
    margin-top: 4px;
}

/* Контейнер для адреса доставки в шапке блока */
.basket-page-wrapper .delivery-address-container {
    margin-top: 16px;
}

.basket-page-wrapper .delivery-address-field {
    margin-bottom: 12px;
}

/* Address field (actual markup is rendered from checkout/js/basket.js)
   Classes used:
   - .delivery-address-label
   - .delivery-address-description
   - .delivery-address-input-wrapper + input
   This block must visually match other inputs on the checkout page (FIO/PHONE/EMAIL). */
.basket-page-wrapper .delivery-address-label,
.basket-page-wrapper .delivery-address-field-label {
    font-size: 14px;
    color: #666;
    display: block;
    margin-bottom: 3px;
    font-weight: 400;
}

.basket-page-wrapper .delivery-address-description,
.basket-page-wrapper .delivery-address-field-description {
    font-size: 12px;
    color: #666;
    margin-bottom: 8px;
}

.basket-page-wrapper .delivery-address-field-input {
    width: 100%;
}

.basket-page-wrapper .delivery-address-field-input input {
    width: 100%;
    padding: 10px;
    border: 1px solid #E5E5E5;
    border-radius: 6px;
    font-size: 14px;
    box-sizing: border-box;
}

.basket-page-wrapper .delivery-address-field-input input:focus {
    border-color: #dc2f2f;
    outline: none;
}

.basket-page-wrapper .delivery-address-input-wrapper {
    width: 100%;
    position: relative;
}

.basket-page-wrapper .delivery-address-input-wrapper input {
    width: 100%;
    padding: 10px;
    border: 1px solid #E5E5E5;
    border-radius: 6px;
    font-size: 14px;
    box-sizing: border-box;
}

.basket-page-wrapper .delivery-address-input-wrapper input:focus {
    border-color: #dc2f2f;
    outline: none;
}

.basket-page-wrapper .delivery-address-value {
    padding: 12px;
    background-color: #f8f8f8;
    border: 1px solid #E5E5E5;
    border-radius: 6px;
    font-size: 14px;
    line-height: 1.6;
    white-space: pre-line;
}

.basket-page-wrapper .delivery-details-field {
    margin-top: 10px;
}

.basket-page-wrapper .delivery-details-field-label {
    font-weight: 500;
    margin-bottom: 6px;
}

.basket-page-wrapper .delivery-details-field-input {
    position: relative;
}

.basket-page-wrapper .delivery-details-field-input input,
.basket-page-wrapper .delivery-details-field-input textarea,
.basket-page-wrapper .delivery-details-field-input select {
    width: 100%;
    padding: 10px;
    border: 1px solid #E5E5E5;
    border-radius: 6px;
    font-size: 14px;
    box-sizing: border-box;
}

.basket-page-wrapper .delivery-details-field-input textarea {
    resize: vertical;
}

.basket-page-wrapper .delivery-details-field-checkbox {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.basket-page-wrapper .delivery-details-suggestions {
    position: relative;
}

.basket-page-wrapper .delivery-details-field-required {
    color: #e83333;
}

.basket-page-wrapper .delivery-details-field-name {
    font-weight: 500;
    margin-bottom: 6px;
}

.basket-page-wrapper .delivery-details-field-price {
    color: #666;
    font-size: 13px;
}

.basket-page-wrapper .delivery-details-field-description {
    color: #666;
    font-size: 13px;
    margin-bottom: 6px;
}

.basket-page-wrapper .delivery-details-field-input select {
    width: 100%;
    padding: 10px;
    border: 1px solid #E5E5E5;
    border-radius: 6px;
    font-size: 14px;
    box-sizing: border-box;
}

/* Стили для inline формы профиля */
.basket-page-wrapper #profile-form-inline {
    margin-top: 16px;
    background: #fff;
    border-radius: 8px;
}

.basket-page-wrapper #profile-form-inline .profile-form-grid-inline {
    display: block;
}

.basket-page-wrapper #profile-form-inline .profile-form-field-hidden-inline {
    display: none;
}

.basket-page-wrapper #profile-form-inline .profile-form-label-inline {
    font-size: 14px;
    color: #666;
    display: block;
    margin-bottom: 8px;
}

.basket-page-wrapper #profile-form-inline .profile-form-input-inline {
    width: 100%;
    padding: 10px;
    border: 1px solid #E5E5E5;
    border-radius: 6px;
}

/* Поля профиля — всегда в одну колонку (одно поле на строку) */
.basket-page-wrapper #profile-form-inline .profile-properties-container-inline {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    margin-top: 35px;
}

/* Перебиваем inline-стили grid-column, которые ставит JS при рендере полей */
.basket-page-wrapper #profile-form-inline .profile-properties-container-inline > div {
    grid-column: 1 / -1 !important;
}

/* Заголовок "Контактная информация:" над полями */
.basket-page-wrapper .checkout-contact-info-title {
    grid-column: 1 / -1;
    font-size: 14px;
    color: #666;
    margin: 0 0 4px;
    font-weight: 400;
}

.basket-page-wrapper #profile-form-inline .profile-properties-loading {
    grid-column: 1/-1;
    text-align: center;
    padding: 20px;
    color: #666;
}

/* ===== Checkout field typography (no inline styles) ===== */
.basket-page-wrapper .checkout-field-label,
#profile-modal .checkout-field-label {
    font-size: 14px;
    color: #666;
    display: block;
    margin-bottom: 3px;
    font-weight: 400;
}

.basket-page-wrapper .checkout-field-required,
#profile-modal .checkout-field-required {
    color: #e83333;
}

.basket-page-wrapper .checkout-field-desc,
#profile-modal .checkout-field-desc {
    font-size: 12px;
    color: #999;
    margin-top: 4px;
}

.basket-page-wrapper .checkout-field-note,
#profile-modal .checkout-field-note {
    font-size: 12px;
    color: #666;
    margin-top: 4px;
}

.basket-page-wrapper .checkout-field-group-title,
#profile-modal .checkout-field-group-title {
    grid-column: 1 / -1;
    margin-top: 16px;
    margin-bottom: 8px;
    font-weight: 600;
    font-size: 14px;
    color: #333;
    border-bottom: 1px solid #E5E5E5;
    padding-bottom: 4px;
}

/* ============================================================
   Адаптив для оформления заказа (мобильные)
   Дизайн: Figma node 1:5 (iPhone 17 Pro Max, 440px)
   Покрывает диапазон 320–480px
   ============================================================ */

/* По умолчанию (десктоп / >480px) "..." меню скрыто */
.basket-page-wrapper .more-menu-wrapper {
    display: none;
}

/* ===== Mobile checkout: серый фон + белые карточки-шаги ===== */
@media (max-width: 768px) {
    /* Серый фон только в зоне контента checkout (НЕ на body — иначе серый
       перетекает в футер). Контентные контейнеры:
       .wrapper1 / .middle / .container / .container_inner / .maxwidth-theme. */
    body#main.page-checkout .wrapper1,
    body#main.page-checkout .middle,
    body#main.page-checkout .container,
    body#main.page-checkout .container_inner,
    body#main.page-checkout .maxwidth-theme,
    body#main.page-checkout .workarea {
        background-color: #F5F5F5 !important;
        background-image: none !important;
    }
    /* Aspro.Max использует те же классы внутри <footer> — возвращаем фон.
       Селектор более специфичный (с footer впереди), чтобы перебить выше. */
    body#main.page-checkout footer .maxwidth-theme,
    body#main.page-checkout footer .wrapper1,
    body#main.page-checkout footer .middle,
    body#main.page-checkout footer .container,
    body#main.page-checkout footer .container_inner {
        background-color: transparent !important;
    }
    /* Скрываем заголовок «Оформление заказа» с логотипом — в макете он не нужен,
       отступ сверху должен быть равен боковому. */
    body.page-checkout .maxwidth-theme .page-top,
    body.page-checkout .checkout-heading-with-logo {
        display: none !important;
    }
    /* Wrapper и контейнер прозрачны — серый цвет даёт body */
    body.page-checkout .basket-page-wrapper {
        background-color: transparent !important;
        border-radius: 0 !important;
        padding: 12px 8px !important;
    }
    body.page-checkout .basket-page-wrapper .basket-container {
        margin: 0 !important;
        padding: 0 !important;
        background: transparent !important;
    }

    /* Карточки-шаги: Корзина, Данные покупателя, Доставка, Оплата, Комментарий */
    .basket-page-wrapper .checkout-steps {
        background-color: #FFFFFF !important;
        border-radius: 28px !important;
        padding: 24px 18px !important;
        margin: 0 0 12px !important;
        border: 1px solid #E5E5E5;
        box-shadow: none !important;
    }

    /* Заголовок шага по центру, крупно — как «Товары в корзине:» в макете */
    .basket-page-wrapper .step-title {
        font-size: 22px !important;
        font-weight: 700 !important;
        text-align: center !important;
        margin: 0 0 18px !important;
    }
}

@media (max-width: 480px) {
    /* ---------- Контейнер и карточки ---------- */
    .basket-page-wrapper .basket-container {
        margin: 12px auto;
        padding: 12px;
    }

    .basket-page-wrapper .checkout-steps {
        padding: 16px;
        border-radius: 16px;
        margin-bottom: 12px;
    }

    .basket-page-wrapper .order-summary {
        padding: 16px;
        border-radius: 16px;
    }

    /* ---------- Шапка: только заголовок «Оформление заказа», без логотипа ---------- */
    .maxwidth-theme .page-top h1#pagetitle {
        /* возвращаем заголовок в поток */
        position: static !important;
        width: auto !important;
        height: auto !important;
        padding: 0 !important;
        margin: 12px 0 !important;
        overflow: visible !important;
        clip: auto !important;
        white-space: normal !important;
        border: 0 !important;
        font-size: 22px !important;
        font-weight: 600 !important;
        text-align: left !important;
    }

    .checkout-heading-spacer,
    .checkout-page-logo {
        display: none !important;
    }

    .checkout-heading-with-logo {
        display: block !important;
        padding: 0 !important;
        gap: 0 !important;
    }

    /* ---------- Заголовок шага ---------- */
    .basket-page-wrapper .step-title {
        font-size: 18px;
        margin-bottom: 12px;
    }

    .basket-page-wrapper .step-header-top {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }

    .basket-page-wrapper .step-header-actions {
        flex-wrap: wrap;
        gap: 10px;
    }

    .basket-page-wrapper .step-header-location {
        max-width: 100%;
    }

    /* ---------- Табы "Физ. лицо / Юр. лицо" ---------- */
    .basket-page-wrapper .person-type-buttons {
        gap: 8px;
    }

    .person-type-btn,
    .person-type-btn-inline {
        min-width: 0;
        flex: 1 1 calc(50% - 4px);
        padding: 14px 8px;
        font-size: 14px;
        border-radius: 10px !important;
    }

    /* ---------- Способы оплаты ---------- */
    .basket-page-wrapper .payment-item {
        min-width: 0;
        flex: 1 1 100%;
        padding: 14px;
        border-radius: 10px !important;
    }

    .basket-page-wrapper .payment-item-name-text {
        font-size: 14px;
    }

    .basket-page-wrapper .payment-item-description {
        font-size: 13px;
    }

    /* ---------- Способ доставки ---------- */
    .basket-page-wrapper .delivery-item {
        padding: 16px;
        border-radius: 10px !important;
    }

    .basket-page-wrapper .delivery-item-name-text {
        font-size: 14px;
    }

    .basket-page-wrapper .delivery-item-logo {
        max-width: 28px;
        max-height: 32px;
    }

    .basket-page-wrapper .delivery-details {
        font-size: 13px;
    }

    /* ---------- Товары: img | name+price (row1) | qty+unit+more (row2) ---------- */
    .basket-page-wrapper .cart-item {
        display: grid;
        grid-template-columns: 80px 1fr auto;
        grid-template-rows: auto auto;
        column-gap: 12px;
        row-gap: 12px;
        align-items: start;
        padding: 14px 0;
        width: 100%;
    }

    .basket-page-wrapper .item-image {
        grid-column: 1;
        grid-row: 1 / span 2;
        align-self: start;
        width: 80px;
        height: 80px;
        padding: 6px;
        border-radius: 12px;
    }

    /* item-info раскрываем в grid, чтобы name занял col2/row1, а trash улетел в col3/row2 */
    .basket-page-wrapper .item-info {
        display: contents;
    }

    .basket-page-wrapper .item-name {
        grid-column: 2;
        grid-row: 1;
        font-size: 14px;
        margin-bottom: 0;
        display: -webkit-box;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 2;
        line-clamp: 2;
        overflow: hidden;
        text-overflow: ellipsis;
        word-break: break-word;
        line-height: 1.35;
        max-height: calc(1.35em * 2);
    }

    /* Скрываем встроенные кнопки (сердечко, корзинка) и стикеры — на мобилке всё через "..." меню */
    .basket-page-wrapper .item-actions-row {
        display: none !important;
    }

    /* Кружок "..." — триггер меню в правом нижнем углу карточки */
    .basket-page-wrapper .more-menu-wrapper {
        display: block;
        grid-column: 3;
        grid-row: 2;
        justify-self: end;
        align-self: center;
        position: relative;
    }

    .basket-page-wrapper .more-menu-trigger {
        width: 44px;
        height: 44px;
        border-radius: 50%;
        background: #fff;
        border: 1px solid #efefef;
        color: #666;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 0;
        transition: background 0.15s, border-color 0.15s;
    }

    .basket-page-wrapper .more-menu-trigger:hover,
    .basket-page-wrapper .more-menu-trigger[aria-expanded="true"] {
        background: #f5f5f5;
        border-color: #E5E5E5;
    }

    .basket-page-wrapper .more-menu-trigger svg {
        width: 20px;
        height: 20px;
    }

    /* Выпадающее меню */
    .basket-page-wrapper .more-menu {
        display: none;
        position: absolute;
        right: 0;
        bottom: calc(100% + 8px);
        min-width: 200px;
        background: #fff;
        border-radius: 12px;
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
        border: 1px solid #efefef;
        padding: 6px;
        z-index: 100;
    }

    .basket-page-wrapper .more-menu.is-open {
        display: block;
    }

    .basket-page-wrapper .more-menu-item {
        display: flex;
        align-items: center;
        gap: 10px;
        width: 100%;
        padding: 10px 12px;
        background: transparent;
        border: none;
        border-radius: 8px;
        font-size: 14px;
        color: #333;
        cursor: pointer;
        text-align: left;
        transition: background 0.15s;
    }

    .basket-page-wrapper .more-menu-item:hover {
        background: #f5f5f5;
    }

    .basket-page-wrapper .more-menu-item svg {
        width: 18px;
        height: 18px;
        flex-shrink: 0;
        color: #666;
    }

    .basket-page-wrapper .more-menu-item.added.in svg {
        color: #c8100f;
        fill: #c8100f;
        stroke: #c8100f;
    }

    .basket-page-wrapper .more-menu-item.added.in {
        color: #c8100f;
    }

    /* «Удалить» — мягкий красный, не дерзкий */
    .basket-page-wrapper .more-menu-item--danger,
    .basket-page-wrapper .more-menu-item--danger svg {
        color: #d96b6b;
    }

    .basket-page-wrapper .more-menu-item--danger:hover {
        background: #fdf3f3;
    }

    /* Раскрываем item-right, чтобы price ушёл в верхний правый угол, а qty — в низ */
    .basket-page-wrapper .item-right {
        display: contents;
    }

    .basket-page-wrapper .item-right .item-price {
        grid-column: 3;
        grid-row: 1;
        flex-direction: column;
        align-items: flex-end;
        justify-self: end;
        margin-top: 0;
        gap: 2px;
        white-space: nowrap;
    }

    .basket-page-wrapper .price-current {
        font-size: 15px;
        font-weight: 700;
        line-height: 1.2;
    }

    .price-old {
        font-size: 13px;
        line-height: 1.2;
    }

    .basket-page-wrapper .price-with-tooltip {
        gap: 0;
        justify-content: flex-end;
    }

    /* Скрываем "i" подсказку на мобилке — цены выравниваются по правому краю */
    .basket-page-wrapper .price-with-tooltip .hint {
        display: none;
    }

    /* qty + единица измерения + ... — на row 2, занимают col 2 */
    .basket-page-wrapper .quantity-selector-wrapper {
        grid-column: 2;
        grid-row: 2;
        width: auto;
        flex-direction: row;
        align-items: center;
        justify-content: flex-start;
        gap: 8px;
        flex-wrap: wrap;
    }

    /* «Минимальный заказ от N шт.» — на отдельной строке под счётчиком, чтобы не ломать вёрстку */
    .basket-page-wrapper .cart-item-min-order {
        flex-basis: 100%;
        order: 99;
        margin-top: 6px;
        font-size: 11px;
        line-height: 1.3;
    }

    /* Пилюля счётчика по дизайну Figma */
    .basket-page-wrapper .quantity-selector {
        width: 132px;
        height: 44px;
        background: #f5f5f5;
        border-radius: 24px;
        flex-shrink: 0;
    }

    .basket-page-wrapper .qty-btn {
        width: 44px;
        height: 44px;
        font-size: 18px;
        font-weight: 600;
    }

    .qty-value {
        font-size: 14px;
        font-weight: 500;
        min-width: 32px;
    }

    /* "шт." рядом со счётчиком */
    .basket-page-wrapper .quantity-selector-wrapper::after {
        content: "шт.";
        font-size: 14px;
        color: #666;
        white-space: nowrap;
    }

    .basket-page-wrapper .available-quantity-text {
        display: none;
    }

    /* ---------- Итоги и кнопка заказа ---------- */
    .basket-page-wrapper .summary-row {
        font-size: 14px;
        margin-bottom: 10px;
    }

    .basket-page-wrapper .summary-total {
        font-size: 20px;
        margin-top: 12px;
        padding-top: 12px;
    }

    .basket-page-wrapper .order-button {
        padding: 14px;
        font-size: 15px;
        margin-bottom: 12px;
        border-radius: 10px;
    }

    /* ---------- Поля профиля: 1 колонка ---------- */
    #profile-modal .profile-form-grid,
    #profile-modal .profile-properties-container,
    .basket-page-wrapper #profile-form-inline .profile-properties-container-inline {
        grid-template-columns: 1fr;
    }

    #profile-modal .modal-content {
        padding: 16px;
    }

    /* ---------- Чекбокс согласия ---------- */
    .basket-page-wrapper .checkbox-label {
        font-size: 11px;
    }

    /* ---------- Комментарий к заказу ---------- */
    .basket-page-wrapper #order-comment {
        font-size: 14px;
    }
}

/* === Очень компактные экраны (320–380px): iPhone SE и старые Android === */
@media (max-width: 380px) {
    .basket-page-wrapper .basket-container {
        padding: 8px;
    }

    .basket-page-wrapper .checkout-steps,
    .basket-page-wrapper .order-summary {
        padding: 12px;
        border-radius: 12px;
    }

    .basket-page-wrapper .step-title {
        font-size: 16px;
        margin-bottom: 10px;
    }

    /* Табы плательщика — в 1 столбец на совсем малых */
    .person-type-btn,
    .person-type-btn-inline {
        flex: 1 1 100%;
        padding: 12px;
        font-size: 13px;
    }

    /* Меньше картинка товара */
    .basket-page-wrapper .cart-item {
        grid-template-columns: 64px 1fr;
        gap: 6px 10px;
    }

    .basket-page-wrapper .item-image {
        width: 64px;
        height: 64px;
        padding: 4px;
    }

    .basket-page-wrapper .item-name {
        font-size: 13px;
    }

    .basket-page-wrapper .item-right {
        gap: 8px;
    }

    .basket-page-wrapper .quantity-selector {
        width: 110px;
    }

    .basket-page-wrapper .qty-btn {
        width: 36px;
        height: 32px;
        font-size: 16px;
    }

    .qty-value {
        min-width: 38px;
        font-size: 14px;
    }

    .checkout-page-logo img {
        width: 80px !important;
        max-height: 28px !important;
    }

    .checkout-heading-spacer {
        width: 80px !important;
    }

    .basket-page-wrapper .summary-total {
        font-size: 18px;
    }

    .basket-page-wrapper .order-button {
        padding: 12px;
        font-size: 14px;
    }

    .basket-page-wrapper .terms-checkbox {
        gap: 6px;
    }

    .basket-page-wrapper .checkbox-input {
        width: 18px;
        height: 18px;
    }
}

/* ============================================================
   Скрываем виджеты чатов (Wappi + Bitrix24 CRM) на странице checkout —
   и на десктопе, и на мобильном (конфликт со sticky-баром / sidebar).
   ============================================================ */
body.page-checkout #mainButton,
body.page-checkout #socialButtons,
body.page-checkout #socialIcons,
body.page-checkout .social-buttons,
body.page-checkout .social-icons,
body.page-checkout .main-button,
body.page-checkout [data-b24-crm-button-cont] {
    display: none !important;
    visibility: hidden !important;
    pointer-events: none !important;
}

/* ============================================================
   Sticky-бар внизу страницы оформления заказа (мобильные).
   Показывает итог + кнопку «Заказать», не перекрываясь футером.
   ============================================================ */
.checkout-sticky-bar {
    display: none;
}

@media (max-width: 768px) {
    .checkout-sticky-bar {
        display: flex;
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 100;
        align-items: center;
        gap: 12px;
        padding: 10px 14px;
        padding-bottom: calc(10px + env(safe-area-inset-bottom, 0px));
        background: #FFFFFF;
        border-top: 1px solid #E5E5E5;
        box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.06);
    }

    .checkout-sticky-bar__total {
        flex: 1;
        min-width: 0;
        display: flex;
        flex-direction: column;
        gap: 6px;
        line-height: 1.15;
    }

    .checkout-sticky-bar__label {
        font-size: 12px;
        color: #666;
    }

    .checkout-sticky-bar__value {
        font-size: 18px;
        font-weight: 700;
        color: #000;
        white-space: nowrap;
    }

    .checkout-sticky-bar__btn {
        flex: 0 0 auto;
        padding: 12px 22px;
        font-size: 15px;
        font-weight: 600;
        color: #fff;
        background: #DC2F2F;
        border: none;
        border-radius: 12px;
        cursor: pointer;
        transition: background 0.15s;
    }

    .checkout-sticky-bar__btn:hover {
        background: #c8100f;
    }

    .checkout-sticky-bar__btn:active {
        background: #b91c1b;
    }

    .checkout-sticky-bar__btn:disabled {
        background: #DC2F2F;
        opacity: 0.6;
        cursor: not-allowed;
        pointer-events: none;
    }

    /* Резервируем место внизу страницы, чтобы контент не уходил под бар */
    body.page-checkout {
        padding-bottom: calc(72px + env(safe-area-inset-bottom, 0px));
    }
}
