/* ТЕХРУС — cart controls + notifications */

.th-notice-root {
  position: fixed;
  z-index: 10050;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
  max-width: calc(100vw - 32px);
}

.th-notice {
  pointer-events: auto;
  width: 380px;
  max-width: calc(100vw - 32px);
  background: #fff;
  border: 1px solid #e6e6e6;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(20, 20, 20, 0.1);
  color: #2b2b2b;
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.th-notice.is-enter {
  opacity: 0;
  transform: translateY(-6px);
}

.th-notice.is-leaving {
  opacity: 0;
  transform: translateY(-4px);
}

@media (prefers-reduced-motion: reduce) {
  .th-notice,
  .th-notice.is-enter,
  .th-notice.is-leaving {
    transition: none;
    transform: none;
  }
}

@media (max-width: 767px) {
  .th-notice-root {
    max-width: none;
  }
  .th-notice {
    width: 100%;
    max-width: calc(100vw - 24px);
  }
  .th-notice.is-enter {
    transform: translateY(8px);
  }
}

.th-notice__body {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 14px 8px 14px 14px;
}

.th-notice__icon {
  flex: 0 0 22px;
  width: 22px;
  height: 22px;
  margin-top: 1px;
  color: #2f9e44;
}

.th-notice--error .th-notice__icon {
  color: #d64545;
}

.th-notice--warning .th-notice__icon {
  color: #c98a00;
}

.th-notice--info .th-notice__icon {
  color: #5b6b7c;
}

.th-notice__content {
  flex: 1 1 auto;
  min-width: 0;
}

.th-notice__title {
  font-size: 15px;
  line-height: 22px;
  font-weight: 600;
  color: #222;
  overflow-wrap: anywhere;
  word-break: normal;
}

.th-notice__text {
  margin-top: 4px;
  font-size: 14px;
  line-height: 20px;
  color: #4a4a4a;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  overflow-wrap: anywhere;
  word-break: normal;
}

.th-notice__action {
  display: inline-flex;
  margin-top: 8px;
  margin-right: 12px;
  font-size: 14px;
  line-height: 20px;
  font-weight: 600;
  color: #e44900;
  text-decoration: underline;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}

.th-notice__action:hover,
.th-notice__action:focus-visible {
  color: #c43d00;
}

.th-notice__close {
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  margin: -8px -4px -8px 0;
  border: 0;
  background: transparent;
  color: #6b6b6b;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.th-notice__close:focus-visible {
  outline: 2px solid #e44900;
  outline-offset: 2px;
  border-radius: 8px;
}

/* Buy controls */
.th-cart-buy {
  min-height: 44px;
}

.catalog-card__controls.th-cart-buy {
  flex-wrap: wrap;
  align-items: stretch;
}

.th-cart-ctrl {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1 1 100%;
  min-width: 0;
  width: 100%;
}

.th-cart-ctrl__link {
  font-size: 13px;
  line-height: 1.2;
  color: #4a4a4a;
  text-decoration: underline;
  align-self: flex-start;
}

.th-cart-ctrl__link:hover,
.th-cart-ctrl__link:focus-visible {
  color: #e44900;
}

.th-cart-ctrl__row {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 44px;
  align-items: center;
  gap: 6px;
  min-height: 44px;
}

.th-cart-ctrl__btn {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  border: 1px solid #e44900;
  background: #fff;
  color: #e44900;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.th-cart-ctrl__btn:hover,
.th-cart-ctrl__btn:focus-visible {
  background: #f9ece5;
}

.th-cart-ctrl__btn:focus-visible {
  outline: 2px solid #e44900;
  outline-offset: 2px;
}

.th-cart-ctrl__btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.th-cart-ctrl__minus.is-remove {
  border-color: #b0b0b0;
  color: #666;
}

.th-cart-ctrl__count,
.th-cart-ctrl__input {
  text-align: center;
  font-size: 15px;
  font-weight: 600;
  color: #222;
  min-width: 0;
}

.th-cart-ctrl__input {
  width: 100%;
  height: 44px;
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 0 8px;
}

.th-cart-ctrl.is-saving {
  opacity: 0.72;
}

.th-cart-ctrl__hint {
  font-size: 12px;
  line-height: 1.3;
  color: #d64545;
}

.th-cart-multi__link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 12px;
  border-radius: 8px;
  background: #f9ece5;
  color: #e44900;
  font-weight: 600;
  text-decoration: none;
}

.catalog-card__controls .catalog-card__more {
  flex: 1 1 auto;
}

.catalog-card__controls .th-cart-ctrl + .catalog-card__more,
.catalog-card__controls .th-cart-multi + .catalog-card__more {
  flex: 1 1 100%;
  justify-content: center;
}

@media (max-width: 420px) {
  .catalog-card__controls {
    flex-direction: column;
    align-items: stretch;
  }
  .catalog-card__controls .catalog-card__more {
    width: 100%;
  }
}

.catalog-card__btn--cart[disabled],
.catalog-card__btn--cart[aria-busy="true"] {
  opacity: 0.85;
  cursor: wait;
}

/* Product page qty block sits with other CTAs */
.product-order__btns .th-cart-ctrl {
  flex: 1 1 220px;
  max-width: 280px;
}

.product-order__btns .th-cart-ctrl__row {
  grid-template-columns: 44px minmax(48px, 1fr) 44px;
}

/* Empty cart */
.th-cart-empty {
  padding: 32px 16px;
  text-align: center;
  background: #fff;
  border: 1px solid #eee;
  border-radius: 12px;
}

.th-cart-empty__title {
  margin: 0 0 12px;
  font-size: 18px;
  font-weight: 600;
  color: #222;
}

.th-cart-empty__link {
  color: #e44900;
  font-weight: 600;
  text-decoration: underline;
}