/* Aqara BY: допродажа в корзине. Цвета, шрифт и кнопки берём из темы */

.aq-xs { --aq-xs-line: rgba(51, 51, 51, .1); --aq-xs-muted: var(--color-text-dark-half-shade, #808080); color: var(--color-text-dark, #333); min-width: 0; max-width: 100%; box-sizing: border-box; }
.aq-xs *, .aq-xs *::before, .aq-xs *::after { box-sizing: border-box; }
.aq-xs_cart { margin-top: 32px; padding-top: 24px; border-top: 1px solid var(--aq-xs-line); }
.aq-xs__group + .aq-xs__group { margin-top: 24px; }
.aq-xs__head { margin: 0 0 8px; font-size: 20px; line-height: 1.3; font-weight: 500; font-family: var(--font-family-heading, inherit); }
.aq-xs__list { list-style: none; margin: 0; padding: 0; }
.aq-xs__item { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; gap: 16px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--aq-xs-line); }
.aq-xs__item:last-child { border-bottom: 0; }
.aq-xs__img { display: block; width: 64px; height: 64px; background: var(--bg-minor-shade, #f7f7f7); border-radius: var(--border-radius, 0); overflow: hidden; }
.aq-xs__img img { display: block; width: 100%; height: 100%; object-fit: contain; }
.aq-xs__body { min-width: 0; }
.aq-xs .aq-xs__title { color: var(--color-text-dark, #333); }
.aq-xs__title { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; color: inherit; text-decoration: none; font-size: 15px; line-height: 1.35; }
.aq-xs .aq-xs__title:hover { color: var(--color-btn-bg, #4660ff); }
.aq-xs__reason { margin-top: 4px; font-size: 13px; line-height: 1.35; color: var(--aq-xs-muted); }
.aq-xs__side { display: flex; align-items: center; gap: 16px; white-space: nowrap; }
.aq-xs__price { font-weight: 500; font-variant-numeric: tabular-nums; }
.aq-xs__btn { min-width: 112px; justify-content: center; text-align: center; }
.aq-xs__btn.is-added, .aq-xs__btn[disabled] { opacity: .6; cursor: default; }
.aq-xs__more { margin-top: 12px; }
.aq-xs__btn:focus-visible, .aq-xs__more:focus-visible, .aq-xs__title:focus-visible, .aq-xs-modal__close:focus-visible { outline: 2px solid var(--color-btn-bg, #4660ff); outline-offset: 2px; }

/* окно «Товар добавлен» */
.aq-xs_pop { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--aq-xs-line); }
.aq-xs_pop .aq-xs__head { font-size: 16px; margin-bottom: 4px; }
.aq-xs_pop .aq-xs__item { padding: 8px 0; }

/* модальное окно */
html.aq-xs-lock, html.aq-xs-lock body { overflow: hidden; }
.aq-xs-modal { position: fixed; inset: 0; z-index: 10000; display: flex; align-items: center; justify-content: center; padding: 16px; }
.aq-xs-modal[hidden] { display: none; }
.aq-xs-modal__overlay { position: absolute; inset: 0; background: rgba(0, 0, 0, .45); }
.aq-xs-modal__dialog { position: relative; width: 100%; max-width: 640px; max-height: calc(100vh - 32px); max-height: calc(100dvh - 32px); display: flex; flex-direction: column; background: var(--bg, #fff); border-radius: var(--border-radius, 0); box-shadow: 0 8px 32px rgba(0, 0, 0, .16); outline: none; }
.aq-xs-modal__top { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 24px; border-bottom: 1px solid rgba(51, 51, 51, .1); }
.aq-xs-modal__title { margin: 0; font-size: 20px; line-height: 1.3; font-weight: 500; font-family: var(--font-family-heading, inherit); }
.aq-xs-modal__close { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border: 0; background: transparent; color: inherit; cursor: pointer; font-size: 18px; }
.aq-xs-modal__body { padding: 8px 24px 16px; overflow-y: auto; overscroll-behavior: contain; }
.aq-xs-modal__body .aq-xs__head { font-size: 16px; margin-top: 8px; }

@media (max-width: 575px) {
  .aq-xs_cart { margin-top: 24px; padding-top: 16px; }
  .aq-xs__head { font-size: 18px; }
  .aq-xs__item { grid-template-columns: 56px minmax(0, 1fr); gap: 8px 12px; align-items: start; }
  .aq-xs__img { width: 56px; height: 56px; grid-row: span 2; }
  .aq-xs__side { grid-column: 2; justify-content: space-between; gap: 12px; }
  .aq-xs__btn { min-width: 0; padding-left: 16px; padding-right: 16px; }
  .aq-xs-modal { align-items: flex-end; padding: 0; }
  .aq-xs-modal__dialog { max-width: none; max-height: 85vh; max-height: 85dvh; }
  .aq-xs-modal__top { padding: 12px 16px; }
  .aq-xs-modal__body { padding: 4px 16px 16px; }
}

/* окно «Товар добавлен» темы: на мобильном — шторка снизу */
@media (max-width: 767px) {
  .layout[class*="widget_v4_notification_add_to_cart"].is-show-fullscreen { align-items: flex-end; padding: 0; overflow-x: hidden; }
  .layout[class*="widget_v4_notification_add_to_cart"].is-show-fullscreen > .layout__content { width: 100%; max-width: none; margin: 0; border-radius: 16px 16px 0 0; max-height: 90vh; max-height: 90dvh; overflow-x: hidden; overflow-y: auto; padding-bottom: env(safe-area-inset-bottom, 0px); animation: aq-xs-sheet-up .24s cubic-bezier(.2, .8, .2, 1); }
}
@keyframes aq-xs-sheet-up { from { transform: translateY(100%); } to { transform: none; } }
@media (prefers-reduced-motion: reduce) { .layout[class*="widget_v4_notification_add_to_cart"].is-show-fullscreen > .layout__content { animation: none; } }
