.icon-btn--cart {
  position: relative;
  overflow: visible;
}

.cart-btn__glyph {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.18s var(--ease-out-apple), color 0.18s var(--ease-out-apple);
}

.icon-btn--cart.is-cart-bump .cart-btn__glyph {
  transform: scale(1.16);
}

.icon-btn--cart.is-cart-success {
  border-color: rgba(52, 199, 89, 0.55);
  background: rgba(52, 199, 89, 0.12);
}

.icon-btn--cart.is-cart-success .cart-btn__glyph {
  color: #1fa64a;
}

.cart-btn__badge {
  position: absolute;
  top: -5px;
  right: -5px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: #0071e3;
  color: #fff;
  font-size: 11px;
  line-height: 18px;
  font-weight: 700;
  text-align: center;
  box-shadow: 0 6px 16px rgba(0, 113, 227, 0.3);
}

.cart-flight-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 260;
}

.cart-flight-token {
  position: fixed;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.38);
  backdrop-filter: blur(14px);
  box-shadow: 0 18px 34px rgba(8, 12, 20, 0.2);
  transform: translate(-50%, -50%) scale(0.95);
  opacity: 0;
}

.cart-flight-token.is-active {
  transition: transform 0.55s var(--ease-out-apple), left 0.55s var(--ease-out-apple),
    top 0.55s var(--ease-out-apple), opacity 0.2s var(--ease-out-apple);
  opacity: 1;
}

.cart-overlay {
  position: fixed;
  inset: 0;
  z-index: 230;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px 12px;
  background: var(--topbar-overlay-backdrop-tint);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.22s var(--ease-out-apple), visibility 0.22s var(--ease-out-apple);
}

.cart-overlay.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.cart-overlay__panel {
  width: min(100%, 364px);
  max-height: min(78vh, 680px);
  display: flex;
  flex-direction: column;
  border-radius: 20px;
  background: var(--glass-overlay-bg);
  border: 1px solid var(--glass-overlay-border);
  backdrop-filter: blur(var(--glass-overlay-blur));
  -webkit-backdrop-filter: blur(var(--glass-overlay-blur));
  box-shadow: var(--glass-overlay-shadow);
  overflow: hidden;
  transform: translateY(16px) scale(0.98);
  opacity: 0;
  transition: transform 0.22s var(--ease-out-apple), opacity 0.22s var(--ease-out-apple);
}

.cart-overlay.is-open .cart-overlay__panel {
  transform: translateY(0) scale(1);
  opacity: 1;
}

.cart-overlay.cart--submitting .cart-overlay__panel {
  box-shadow: 0 18px 40px rgba(8, 12, 20, 0.32);
}

.cart-overlay.cart--success-closing .cart-overlay__panel {
  transform-origin: center center;
  transform: translateY(0) scaleX(0.985) scaleY(0.035);
  opacity: 0;
  transition: transform 0.46s cubic-bezier(0.22, 0.7, 0.1, 1), opacity 0.46s ease;
}

.cart-overlay.cart--submitting .cart-customer__input,
.cart-overlay.cart--submitting .cart-promo__input,
.cart-overlay.cart--submitting .cart-promo__apply,
.cart-overlay.cart--submitting .cart-stepper__btn,
.cart-overlay.cart--submitting .cart-row__remove,
.cart-overlay.cart--submitting .cart-overlay__close {
  pointer-events: none;
  opacity: 0.6;
}

.cart-overlay.cart--success-closing .cart-customer__input,
.cart-overlay.cart--success-closing .cart-promo__input,
.cart-overlay.cart--success-closing .cart-promo__apply,
.cart-overlay.cart--success-closing .cart-stepper__btn,
.cart-overlay.cart--success-closing .cart-row__remove,
.cart-overlay.cart--success-closing .cart-overlay__close {
  pointer-events: none;
}

.cart-overlay.cart--submitting .cart-overlay__list,
.cart-overlay.cart--submitting .cart-overlay__footer {
  transition: opacity 0.18s ease, filter 0.18s ease;
  opacity: 0.86;
  filter: saturate(0.9);
}

.app-success-flash {
  position: fixed;
  inset: 0;
  z-index: 280;
  pointer-events: none;
  visibility: hidden;
  opacity: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.18s ease;
}

.app-success-flash.is-visible {
  visibility: visible;
  opacity: 1;
}

.app-success-flash__check {
  width: 78px;
  height: 78px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(52, 199, 89, 0.16);
  border: 1px solid rgba(52, 199, 89, 0.52);
  color: #20b34f;
  font-size: 42px;
  line-height: 1;
  transform: scale(0.9);
  opacity: 0;
  transition: transform 0.24s cubic-bezier(0.22, 0.8, 0.25, 1.12), opacity 0.18s ease;
}

.app-success-flash.is-visible .app-success-flash__check {
  opacity: 1;
  transform: scale(1);
}

.cart-overlay__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
  padding: 16px 16px 8px;
  background: transparent;
}

.cart-overlay__title {
  margin: 0;
  font-size: 17px;
  line-height: 1.2;
  font-weight: 700;
  color: #111827;
}

.cart-overlay__close {
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.44);
  color: #111827;
  cursor: pointer;
}

.cart-overlay__list {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  background: transparent;
}

.cart-empty-state {
  display: flex;
  min-height: 180px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 6px;
  padding: 16px;
  color: #465467;
}

.cart-empty-state__title {
  font-size: 17px;
  font-weight: 700;
  color: #111827;
}

.cart-empty-state__subtitle {
  font-size: 13px;
  line-height: 1.4;
  max-width: 240px;
}

.cart-list {
  display: flex;
  flex-direction: column;
  padding: 8px 16px;
}

.cart-row {
  padding: 12px 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  max-height: 280px;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.28s ease, transform 0.28s ease, max-height 0.32s ease, padding 0.32s ease,
    border-color 0.32s ease, margin 0.32s ease;
  overflow: hidden;
}

.cart-row:last-child {
  border-bottom: none;
}

.cart-row.cart-row--in {
  opacity: 1;
  transform: translateY(0);
}

.cart-row.is-removing {
  opacity: 0;
  max-height: 0;
  padding-top: 0;
  padding-bottom: 0;
  margin-top: 0;
  margin-bottom: 0;
  border-bottom-color: transparent;
  pointer-events: none;
}

.cart-row__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.cart-row__title {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 14px;
  line-height: 1.35;
  font-weight: 600;
  color: #111827;
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.cart-row__controls {
  display: flex;
  align-items: center;
}

.cart-stepper {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  height: 32px;
  padding: 0 3px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.5);
  border: 1px solid rgba(17, 24, 39, 0.08);
  box-sizing: border-box;
}

.cart-stepper__btn,
.cart-promo__apply {
  border: 0;
  cursor: pointer;
}

.cart-stepper__btn {
  flex: 0 0 28px;
  width: 28px;
  height: 28px;
  padding: 0;
  border-radius: 999px;
  background: rgba(17, 24, 39, 0.08);
  color: #111827;
  font-size: 17px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.cart-stepper__value {
  min-width: 28px;
  text-align: center;
  font-size: 14px;
  font-weight: 700;
  color: #111827;
  line-height: 1;
}

.cart-row__remove {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: rgba(255, 0, 0, 0.6);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: color 0.15s ease, transform 0.12s ease;
}

.cart-row__remove:hover {
  color: rgba(220, 0, 0, 0.85);
}

.cart-row__remove:active {
  color: rgba(220, 0, 0, 0.95);
  transform: scale(0.92);
}

.cart-overlay__footer {
  flex-shrink: 0;
  padding: 0;
  background: transparent;
}

.cart-footer {
  position: sticky;
  bottom: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px 16px 16px;
  /* Единый glass задаётся на .cart-overlay__panel; здесь только разделитель */
  background: transparent;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.cart-customer {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.cart-overlay.cart--account-mode .cart-customer {
  display: none;
}

.cart-account-submit-hint {
  padding: 10px 12px;
  border-radius: 12px;
  font-size: 12px;
  line-height: 1.35;
  color: #1f2937;
  background: rgba(15, 159, 74, 0.1);
  border: 1px solid rgba(15, 159, 74, 0.24);
}

.cart-overlay:not(.cart--account-mode) .cart-account-submit-hint {
  display: none;
}

.cart-submit-status {
  margin: 0 0 10px;
  padding: 10px 12px;
  border-radius: 12px;
  font-size: 12px;
  line-height: 1.4;
  color: #7a4b00;
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.28);
}

.cart-submit-status.is-ambiguous {
  display: block;
}

.cart-submit-status__text {
  margin: 0;
}

.cart-submit-status__action {
  margin-top: 8px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #9a6700;
  font: inherit;
  font-weight: 600;
  text-decoration: underline;
  cursor: pointer;
}

.cart-customer__label {
  font-size: 12px;
  font-weight: 500;
  color: rgba(17, 24, 39, 0.55);
}

.cart-customer__input {
  height: 40px;
  padding: 0 12px;
  border-radius: 14px;
  border: 1px solid rgba(17, 24, 39, 0.08);
  background: rgba(255, 255, 255, 0.45);
  color: #111827;
  font: inherit;
  box-sizing: border-box;
}

.cart-promo {
  display: flex;
  align-items: stretch;
  gap: 8px;
}

.cart-promo__input {
  flex: 1 1 auto;
  min-width: 0;
  height: 40px;
  padding: 0 12px;
  border-radius: 14px;
  border: 1px solid rgba(17, 24, 39, 0.08);
  background: rgba(255, 255, 255, 0.45);
  color: #111827;
  font: inherit;
  box-sizing: border-box;
}

.cart-promo__apply {
  flex-shrink: 0;
  height: 40px;
  padding: 0 14px;
  border-radius: 14px;
  background: rgba(17, 24, 39, 0.08);
  color: #111827;
  font: inherit;
  font-weight: 600;
  box-sizing: border-box;
}

.cart-promo__message {
  min-height: 16px;
  font-size: 12px;
  line-height: 1.3;
  color: #4b5563;
}

.cart-promo__message.is-success {
  color: #0f9f4a;
}

.cart-promo__message.is-error {
  color: #d1433a;
}

.cart-summary {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
}

.cart-summary--unified {
  gap: 6px;
}

.cart-summary__text {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.cart-summary__label {
  font-size: 13px;
  font-weight: 600;
  color: #111827;
  line-height: 1.2;
  margin-bottom: 2px;
}

.cart-summary__hint {
  font-size: 11px;
  line-height: 1.2;
  color: rgba(17, 24, 39, 0.48);
}

.cart-summary__row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  font-size: 12px;
  line-height: 1.35;
}

.cart-summary__row-label {
  color: rgba(17, 24, 39, 0.55);
  flex: 1 1 auto;
  min-width: 0;
}

.cart-summary__row-value {
  color: #111827;
  text-align: right;
  flex: 0 1 auto;
  max-width: 58%;
  word-break: break-word;
}

.cart-summary__row--grand .cart-summary__row-label {
  font-size: 13px;
  font-weight: 600;
  color: #111827;
}

.cart-summary__row--grand .cart-summary__row-value {
  font-size: 16px;
  font-weight: 700;
  line-height: 1.2;
}

.cart-summary__value {
  font-size: 20px;
  line-height: 1.15;
  font-weight: 700;
  color: #111827;
  text-align: right;
}

.cart-summary__value--legacy {
  display: none !important;
}

.cart-summary__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0;
  min-height: 0;
  font-size: 11px;
  line-height: 1.35;
  color: #6b7280;
}

.cart-summary__meta[hidden] {
  display: none !important;
}

.cart-summary__meta-positions {
  color: rgba(17, 24, 39, 0.45);
}

.cart-summary__meta-details {
  color: #6b7280;
}

.cart-price-change-notice {
  margin: 0 0 10px;
  padding: 10px 12px;
  border-radius: 12px;
  font-size: 12px;
  line-height: 1.4;
  color: #374151;
  background: rgba(107, 114, 128, 0.1);
  border: 1px solid rgba(107, 114, 128, 0.22);
}

.cart-price-change-notice.hidden {
  display: none;
}

.cart-price-change-notice.is-increase {
  color: #7a4b00;
  background: rgba(245, 158, 11, 0.12);
  border-color: rgba(245, 158, 11, 0.28);
}

.cart-price-change-notice.is-decrease,
.cart-price-change-notice.is-became_fixed,
.cart-price-change-notice.is-became_request,
.cart-price-change-notice.is-multiple {
  color: #374151;
  background: rgba(107, 114, 128, 0.1);
  border-color: rgba(107, 114, 128, 0.22);
}

.cart-price-change-notice__text {
  margin: 0;
}

.cart-submit.cart-overlay__submit,
.cart-overlay__submit.cart-submit {
  width: 100%;
  height: 48px;
  border-radius: 15px;
  font-size: 16px;
  font-weight: 600;
  box-shadow: 0 10px 28px rgba(0, 113, 227, 0.28);
}
