/* Airgrill2 cart - Figma 146:2 / 147:977 / 147:1225 */

body.tpl-airgrill2.is-cart {
  background: #fff;
  color: var(--ag2-text, #282828);
}

/* системные алерты HikaShop на корзине (пусто/обновлено) - не в макете */
body.tpl-airgrill2.is-cart .uk-alert,
body.tpl-airgrill2.is-cart .alert,
body.tpl-airgrill2.is-cart .hikashop_messages {
  display: none !important;
}

/* backup: joomla success/info после apply qty (основное - чистка queue в show.php) */
body.tpl-airgrill2.is-cart #system-message-container joomla-alert[type="info"],
body.tpl-airgrill2.is-cart #system-message-container joomla-alert[type="message"],
body.tpl-airgrill2.is-cart #system-message-container joomla-alert[type="success"],
body.tpl-airgrill2.is-cart #system-message-container joomla-alert[type="notice"] {
  display: none !important;
}

.ag2-cart-page {
  padding: 48px 0 48px;
}

.ag2-cart__title {
  margin: 0 0 0;
  max-width: 648px;
  font-size: 36px;
  font-weight: 600;
  line-height: 44px;
  color: #282828;
}

/* breadcrumbs + title block: Figma gap 24, then layout gap 48 from title group */
.ag2-cart-page .ag2-breadcrumbs {
  margin-bottom: 24px;
}

.ag2-cart-page .ag2-cart__title {
  margin-bottom: 48px;
}

.ag2-cart__empty {
  margin: 0;
  font-size: 18px;
  line-height: 28px;
  color: #7a7a7a;
}

.ag2-cart__layout {
  display: grid;
  grid-template-columns: minmax(0, 864px) 408px;
  gap: 72px;
  align-items: start;
}

.ag2-cart__items {
  min-width: 0;
}

.ag2-cart__sidebar {
  min-width: 0;
}

/* rows: Figma gap 24, без разделителей */
.ag2-cart-table {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.ag2-cart-row {
  display: flex;
  gap: 24px;
  align-items: center;
  padding: 0;
  border-bottom: 0;
}

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

.ag2-cart-row__image {
  flex: 0 0 144px;
  width: 144px;
  height: 144px;
  overflow: hidden;
  background: #f7f7f7;
}

.ag2-cart-row__image img,
.ag2-cart-row__image a,
.ag2-cart-row__image .jbimage {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ag2-cart-row__image a {
  height: 100%;
}

/* Figma: [img] [ meta(name+specs) + controls(price+qty | trash) ] */
.ag2-cart-row__body {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.ag2-cart-row__meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.ag2-cart-row__info {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-self: center;
}

.ag2-cart-row__name,
.ag2-cart-row__name a {
  font-size: 18px;
  font-weight: 600;
  line-height: 26px;
  color: #282828;
  text-decoration: none;
}

.ag2-cart-row__params {
  margin: 0;
  font-size: 14px;
  line-height: 20px;
  color: #7a7a7a;
}

.ag2-cart-row__params .jbprice-param,
.ag2-cart-row__params .param-list,
.ag2-cart-row__params ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.ag2-cart-row__controls {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
}

.ag2-cart-row__controls-main {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.ag2-cart-row__price,
.ag2-cart-row__price .jbmoney-value,
.ag2-cart-row__price .jbcurrency,
.ag2-cart-row__price .jbcurrency-value,
.ag2-cart-row__price .jbcurrency-symbol {
  flex: 0 0 120px;
  width: 120px;
  font-size: 18px;
  font-weight: 600;
  line-height: 26px;
  color: #282828;
}

.ag2-cart-row__qty {
  flex: 0 0 auto;
  margin-left: 0;
}

/* qty: рамка, цифра видна */
.ag2-cart-row__qty .quantity-wrapper {
  box-sizing: border-box;
  padding: 0 !important;
  border-radius: 0 !important;
  background: #fff !important;
  border: 1px solid #e0e0e0 !important;
  border-collapse: separate;
  table-layout: fixed;
  height: 36px !important;
  width: auto !important;
}

.ag2-cart-row__qty .quantity-wrapper,
.ag2-cart-row__qty .quantity-wrapper tbody,
.ag2-cart-row__qty .quantity-wrapper tr,
.ag2-cart-row__qty .quantity-wrapper td {
  height: 36px !important;
}

.ag2-cart-row__qty .quantity-wrapper .plus,
.ag2-cart-row__qty .quantity-wrapper .minus {
  width: 36px;
  height: 36px;
  border-radius: 0;
  background: transparent !important;
}

.ag2-cart-row__qty .quantity-wrapper td {
  padding: 0 !important;
  vertical-align: middle;
  line-height: 36px;
  max-height: 36px;
  overflow: visible;
}

.ag2-cart-row__qty .jsRemove,
.ag2-cart-row__qty .jsAdd,
.ag2-cart-row__qty .jsQuantityBtn,
.ag2-cart-row__qty button,
.ag2-cart-row__qty a {
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px !important;
  padding: 0;
  border: 0;
  background: transparent;
  color: #282828;
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
  text-decoration: none;
  box-shadow: none;
  user-select: none;
}

.ag2-cart-row__qty .jsRemove:hover,
.ag2-cart-row__qty .jsAdd:hover,
.ag2-cart-row__qty button:hover {
  background: #f7f7f7;
}

.ag2-cart-row__qty .item-count-digits {
  display: none !important;
  visibility: hidden !important;
  height: 0 !important;
  overflow: hidden !important;
}

.ag2-cart-row__qty .item-count-wrapper,
.ag2-cart-row__qty .item-count {
  position: relative !important;
  overflow: visible !important;
  height: 36px !important;
  line-height: 36px !important;
  width: 40px !important;
  min-width: 40px !important;
}

.ag2-cart-row__qty .quantity-wrapper .jsInput,
.ag2-cart-row__qty .quantity-wrapper input.input-quantity,
.ag2-cart-row__qty input.jsInput,
.ag2-cart-row__qty input.input-quantity {
  position: relative !important;
  z-index: 2 !important;
  display: block !important;
  opacity: 1 !important;
  visibility: visible !important;
  width: 40px !important;
  min-width: 40px !important;
  max-width: 40px !important;
  height: 36px !important;
  margin: 0 auto !important;
  padding: 0 !important;
  border: 0 !important;
  background: #fff !important;
  text-align: center !important;
  font-size: 14px !important;
  font-weight: 500 !important;
  line-height: 36px !important;
  color: #282828 !important;
  box-shadow: none !important;
  -webkit-appearance: none;
  appearance: none;
}

/* trash: default #f7f7f7 (Figma), hover - оранжевый */
.ag2-cart-row__delete {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  width: 32px;
  height: 32px;
  padding: 8px;
  background: #f7f7f7;
  text-decoration: none;
}

.ag2-cart-row__delete:hover,
.ag2-cart-row__delete:focus {
  background: #ff6123;
}

.ag2-cart-row__delete:hover img,
.ag2-cart-row__delete:focus img {
  filter: brightness(0) invert(1);
}

/* hide old table styles leftovers */
.ag2-cart .jbcart-subtotal,
.ag2-cart-page .order-product--calculations {
  display: contents;
}

/* sidebar */
.ag2-cart-summary {
  background: #f7f7f7;
  position: sticky;
  top: 96px;
}

.ag2-cart-summary__body {
  padding: 36px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.ag2-cart-summary__title {
  margin: 0;
  font-size: 24px;
  font-weight: 600;
  line-height: 32px;
  color: #282828;
}

.ag2-cart-summary__promo > label,
.ag2-cart-summary__promo .jbcart-label {
  position: static;
  width: auto;
  height: auto;
  overflow: visible;
  clip: auto;
}

.ag2-cart-summary__promo {
  border-bottom: 1px solid #e0e0e0;
  background: transparent;
  padding: 0 0 12px;
}

.ag2-cart-promo {
  display: flex;
  align-items: center;
  gap: 12px;
  position: relative;
  width: 100%;
  margin: 0;
}

.ag2-cart-promo__input,
.ag2-cart-promo .jsCode {
  flex: 1 1 auto;
  width: 100%;
  min-width: 0;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  outline: none !important;
  padding: 0 !important;
  font-size: 18px;
  line-height: 28px;
  color: #282828;
}

.ag2-cart-promo__input:focus,
.ag2-cart-promo__input:focus-visible,
.ag2-cart-promo .jsCode:focus,
.ag2-cart-promo .jsCode:focus-visible {
  outline: none !important;
  box-shadow: none !important;
  border: 0 !important;
}

.ag2-cart-promo__input::placeholder {
  color: rgba(40, 40, 40, 0.45);
}

.ag2-cart-promo__send,
.ag2-cart-promo .jsSendCode,
.ag2-cart-summary .jsSendCode,
.ag2-cart-summary button.jsSendCode {
  flex: 0 0 auto !important;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  width: 32px !important;
  height: 32px !important;
  min-width: 32px !important;
  min-height: 32px !important;
  padding: 0 !important;
  margin: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: #fff !important;
  background-color: #fff !important;
  box-shadow: none !important;
  cursor: pointer;
  color: #ff6123 !important;
}

.ag2-cart-promo__send img,
.ag2-cart-promo .jsSendCode img,
.ag2-cart-summary .jsSendCode img {
  display: block !important;
  width: 16px !important;
  height: 16px !important;
  filter: none !important;
  opacity: 1 !important;
}

.ag2-cart-summary__lines {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.ag2-cart-summary__line {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 0;
  background: transparent;
}

.ag2-cart-summary__line--discount[hidden] {
  display: none !important;
}

.ag2-cart-summary__label,
.ag2-cart-summary__value {
  flex: 1 1 50%;
  font-size: 16px;
  line-height: 24px;
  color: #282828;
}

.ag2-cart-summary__value {
  text-align: right;
  font-weight: 600;
}

.ag2-cart-summary__total {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 36px;
  border-top: 1px solid #e0e0e0;
  border-bottom: 1px solid #e0e0e0;
  background: #f7f7f7;
}

.ag2-cart-summary__total-label,
.ag2-cart-summary__total-value {
  flex: 1 1 50%;
  font-size: 20px;
  line-height: 28px;
  color: #282828;
}

.ag2-cart-summary__total-label {
  font-weight: 400;
}

.ag2-cart-summary__total-value {
  text-align: right;
  font-weight: 600;
}

.ag2-cart-summary__actions {
  padding: 36px;
}

.ag2-cart-summary__cta {
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  width: 100%;
  padding: 16px;
  border: 0;
  background: #ff6123;
  color: #fff !important;
  font-size: 18px;
  line-height: 28px;
  text-decoration: none !important;
  cursor: pointer;
}

.ag2-cart-summary__cta:hover {
  background: #e8561c;
  color: #fff !important;
}

/* qty controls for HikaShop cart override */
.ag2-qty {
  display: inline-flex;
  align-items: stretch;
  height: 34px;
  border: 1px solid #e0e0e0;
  background: #fff;
}

.ag2-qty__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.ag2-qty__btn:hover {
  background: #f7f7f7;
}

.ag2-qty__input {
  box-sizing: border-box;
  width: 36px;
  height: 32px;
  margin: 0;
  padding: 0;
  border: 0;
  border-left: 0;
  border-right: 0;
  background: #fff;
  text-align: center;
  font-size: 14px;
  font-weight: 500;
  line-height: 20px;
  color: #282828;
}

.ag2-qty__readonly {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  font-size: 16px;
}

/* related */
.ag2-cart-related {
  margin-top: 48px;
  padding-top: 0;
}

.ag2-cart-related__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 32px;
}

.ag2-cart-related__title {
  margin: 0;
  font-size: 24px;
  font-weight: 600;
  line-height: 32px;
  color: #282828;
}

body.tpl-airgrill2 .ag2-cart-related__link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--ag2-accent, #ff6123) !important;
  font-size: 16px;
  font-weight: 500;
  line-height: 24px;
  text-decoration: none;
}

body.tpl-airgrill2 .ag2-cart-related__link:hover {
  color: var(--ag2-accent-hover, #e8561c) !important;
}

/* рыба: карточки прямые дети; модуль: сетка только на .hk-row-fluid */
.ag2-cart-related__grid {
  display: block;
  width: 100%;
}

.ag2-cart-related__grid:has(> .ag2-cart-related__card) {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 24px;
}

/* не grid на обёртках HikaShop - иначе ряд схлопывается в 1 колонку */
.ag2-cart-related__grid > .hikashop_module,
.ag2-cart-related__grid .hikashop_products_listing,
.ag2-cart-related__grid .hikashop_products_listing_main,
.ag2-cart-related__grid .hikashop_products {
  display: block !important;
  width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
}

.ag2-cart-related__grid .hk-row-fluid,
body.tpl-airgrill2.is-cart .ag2-cart-related__grid .hikashop_products .hk-row-fluid {
  display: grid !important;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 24px;
  width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
}

.ag2-cart-related__grid .hikashop_product,
.ag2-cart-related__grid [class*="hikashop_product_column_"],
.ag2-cart-related__grid [class*="hkc-md-"],
.ag2-cart-related__grid [class*="hkc-"],
.ag2-cart-related__grid .hikashop_container,
.ag2-cart-related__grid .hikashop_subcontainer {
  float: none !important;
  clear: none !important;
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 0 !important;
  min-height: 0 !important;
  height: auto !important;
  min-width: 0 !important;
  box-sizing: border-box !important;
  grid-column: auto / span 1 !important;
}

.ag2-cart-related__card,
.ag2-cart-related__grid .ag2-product-card,
body.tpl-airgrill2.is-cart .ag2-cart-related__grid .ag2-product-card,
body.tpl-airgrill2.is-catalog.is-cart .ag2-cart-related__grid .ag2-product-card {
  display: flex !important;
  flex-direction: column;
  gap: 24px !important;
  text-decoration: none;
  color: inherit;
  min-width: 0;
  height: auto !important;
  min-height: 0 !important;
  background: #fff !important;
  box-shadow: none !important;
  border: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
}

/* каталог вешает hover-border на .ag2-product-card; на related корзины глушим */
body.tpl-airgrill2.is-cart .ag2-cart-related__grid .ag2-product-card:hover,
body.tpl-airgrill2.is-catalog.is-cart .ag2-cart-related__grid .ag2-product-card:hover,
body.tpl-airgrill2.is-cart .ag2-cart-related__card:hover {
  border: 0 !important;
  border-color: transparent !important;
  box-shadow: none !important;
}

.ag2-cart-related__card-image,
.ag2-cart-related__grid .ag2-product-card__media,
body.tpl-airgrill2.is-cart .ag2-cart-related__grid .ag2-product-card__media {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  min-height: 0 !important;
  height: auto !important;
  padding: 0 !important;
  background: #f7f7f7;
  overflow: hidden;
  position: relative;
}

.ag2-cart-related__card-image img,
.ag2-cart-related__grid .ag2-product-card__media img,
.ag2-cart-related__grid .ag2-product-card__image-link {
  display: block;
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  object-fit: contain;
}

.ag2-cart-related__grid .ag2-product-card__image-link {
  position: absolute;
  inset: 0;
}

.ag2-cart-related__grid .ag2-product-card__body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 0 !important;
  flex: 0 0 auto !important;
}

.ag2-cart-related__card-title,
.ag2-cart-related__grid .ag2-product-card__title,
.ag2-cart-related__grid .ag2-product-card__title a {
  font-size: 18px !important;
  font-weight: 500 !important;
  line-height: 26px !important;
  color: #282828 !important;
  text-decoration: none;
}

.ag2-cart-related__card-price,
.ag2-cart-related__grid .ag2-product-card__price,
.ag2-cart-related__grid .ag2-product-card__prices {
  margin: 0 !important;
  font-size: 18px !important;
  font-weight: 500 !important;
  line-height: 26px !important;
  color: #7a7a7a !important;
}

.ag2-cart-related__grid .ag2-product-card__price {
  color: #7a7a7a !important;
}

.ag2-cart-related__grid .ag2-product-card__time,
.ag2-cart-related__grid .ag2-product-card__cart-wrap,
.ag2-cart-related__grid .ag2-product-card__badges,
.ag2-cart-related__grid .ag2-product-card__old,
.ag2-cart-related__grid .hikacart,
.ag2-cart-related__grid .hikashop_product_stock,
.ag2-cart-related__grid .hikashop_add_to_cart {
  display: none !important;
}

/* modal order */
body.is-cart-modal-open {
  overflow: hidden;
}

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

.ag2-cart-modal {
  position: fixed;
  inset: 0;
  z-index: 1100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.ag2-cart-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(40, 40, 40, 0.5);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.ag2-cart-modal__dialog {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 528px;
  max-height: calc(100vh - 48px);
  overflow: auto;
  padding: 48px;
  background: #fff;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.12);
}

.ag2-cart-modal__head {
  display: flex;
  gap: 12px;
  margin-bottom: 48px;
}

.ag2-cart-modal__intro {
  flex: 1 1 auto;
  min-width: 0;
}

.ag2-cart-modal__title {
  margin: 0 0 12px;
  font-size: 24px;
  font-weight: 600;
  line-height: 32px;
  color: #282828;
}

.ag2-cart-modal__hint {
  margin: 0;
  font-size: 16px;
  line-height: 24px;
  color: #7a7a7a;
}

.ag2-cart-modal__close {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.ag2-cart-modal__fields {
  display: flex;
  flex-direction: column;
  gap: 32px;
  margin-bottom: 48px;
}

.ag2-cart-modal__field .jbcart-form-row {
  margin: 0;
}

.ag2-cart-modal__field .jbcart-form-label,
.ag2-cart-modal__field .jbcart-form-desc,
.ag2-cart-modal__field .required-dot {
  /* подписи прячем - placeholders как в макете */
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}

.ag2-cart-modal__field .jbcart-form-control {
  width: 100%;
}

.ag2-cart-modal__field input,
.ag2-cart-modal__field textarea,
.ag2-cart-modal__field .uk-input,
.ag2-cart-modal__field .uk-textarea {
  width: 100%;
  padding: 0 0 12px !important;
  border: 0 !important;
  border-bottom: 1px solid rgba(40, 40, 40, 0.2) !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  outline: none !important;
  font-size: 18px !important;
  line-height: 28px !important;
  color: #282828 !important;
  min-height: 0 !important;
  height: auto !important;
}

.ag2-cart-modal__sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}

.ag2-cart-modal__error {
  margin: 0 0 16px;
  color: #ff6123;
  font-size: 14px;
  line-height: 20px;
}

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

.ag2-cart-modal__submit:disabled {
  opacity: 0.7;
  cursor: wait;
}

.ag2-cart-modal__field textarea {
  resize: vertical;
  min-height: 28px;
}

.ag2-cart-modal__field input::placeholder,
.ag2-cart-modal__field textarea::placeholder {
  color: rgba(40, 40, 40, 0.5);
  opacity: 1;
}

.ag2-cart-modal__field .jbcart-form-error {
  margin: 8px 0 0;
  color: #ff6123;
  font-size: 14px;
}

.ag2-cart-modal__footer {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.ag2-cart-modal__submit {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 60px;
  padding: 16px 32px;
  border: 0;
  background: #ff6123;
  color: #fff;
  font-size: 16px;
  font-weight: 500;
  line-height: 28px;
  cursor: pointer;
}

.ag2-cart-modal__submit:hover {
  background: #e8561c;
}

.ag2-cart-modal__legal {
  margin: 0;
  text-align: center;
  font-size: 14px;
  font-weight: 300;
  line-height: 20px;
  color: rgba(40, 40, 40, 0.6);
}

.ag2-cart-modal__legal a {
  color: inherit;
  text-decoration: underline;
}

/* thanks modal (Figma 147:1225) - fixed overlay */
.ag2-cart-thanks-modal[hidden] {
  display: none !important;
}

.ag2-cart-thanks-modal {
  position: fixed;
  inset: 0;
  z-index: 1100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.ag2-cart-thanks-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(40, 40, 40, 0.5);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.ag2-cart-thanks-modal__dialog {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 528px;
  padding: 48px;
  background: #fff;
  text-align: center;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.12);
}

.ag2-cart-thanks-modal__close {
  position: absolute;
  top: 48px;
  right: 48px;
  display: inline-flex;
  width: 24px;
  height: 24px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.ag2-cart-thanks-modal__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  margin: 40px auto 32px;
  padding: 16px;
  background: #40d07a;
  box-sizing: border-box;
}

.ag2-cart-thanks-modal__icon img {
  display: block;
  width: 32px;
  height: 32px;
}

.ag2-cart-thanks-modal__title {
  margin: 0 0 12px;
  font-size: 24px;
  font-weight: 600;
  line-height: 32px;
  color: #282828;
}

.ag2-cart-thanks-modal__text {
  margin: 0;
  font-size: 16px;
  line-height: 24px;
  color: #7a7a7a;
}

/* legacy thanks selectors kept for safety */
.ag2-cart-page:has(.ag2-cart-thanks),
body.tpl-airgrill2.is-cart:has(.ag2-cart-thanks) .ag2-cart-page {
  position: relative;
  min-height: 60vh;
}

.ag2-cart-thanks {
  position: relative;
  min-height: 520px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 0;
}

.ag2-cart-thanks__backdrop {
  position: absolute;
  inset: -24px 0 -48px;
  background: rgba(40, 40, 40, 0.35);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.ag2-cart-thanks__card {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 528px;
  padding: 48px;
  background: #fff;
  text-align: center;
}

.ag2-cart-thanks__close {
  position: absolute;
  top: 48px;
  right: 48px;
  display: inline-flex;
  width: 24px;
  height: 24px;
}

.ag2-cart-thanks__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  margin: 40px auto 32px;
  padding: 16px;
  background: #40d07a;
}

.ag2-cart-thanks__title {
  margin: 0 0 12px;
  font-size: 24px;
  font-weight: 600;
  line-height: 32px;
  color: #282828;
}

.ag2-cart-thanks__text {
  margin: 0;
  font-size: 16px;
  line-height: 24px;
  color: #7a7a7a;
}

/* системные алерты на success не нужны поверх модалки */
body.tpl-airgrill2.is-cart:has(.ag2-cart-thanks) .uk-alert,
body.tpl-airgrill2.is-cart:has(.ag2-cart-thanks) .alert,
body.tpl-airgrill2.is-cart:has(.ag2-cart-thanks-modal:not([hidden])) .uk-alert,
body.tpl-airgrill2.is-cart:has(.ag2-cart-thanks-modal:not([hidden])) .alert {
  display: none !important;
}

/* validators */
.ag2-cart .jbcart-validator,
.ag2-cart .uk-alert {
  margin-bottom: 24px;
}

@media (max-width: 1199px) {
  .ag2-cart__layout {
    grid-template-columns: 1fr 340px;
    gap: 40px;
  }

  .ag2-cart-related__grid:has(> .ag2-cart-related__card),
  .ag2-cart-related__grid .hk-row-fluid,
  body.tpl-airgrill2.is-cart .ag2-cart-related__grid .hikashop_products .hk-row-fluid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 959px) {
  .ag2-cart__title {
    margin-bottom: 32px;
    font-size: 28px;
    line-height: 36px;
  }

  .ag2-cart__layout {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .ag2-cart-summary {
    position: static;
  }

  .ag2-cart-row {
    align-items: flex-start;
  }

  .ag2-cart-row__image {
    flex-basis: 96px;
    width: 96px;
    height: 96px;
  }

  .ag2-cart-row__price {
    flex-basis: auto;
    width: auto;
    min-width: 72px;
  }

  .ag2-cart-related__head {
    flex-direction: column;
    align-items: flex-start;
  }

  .ag2-cart-related__grid:has(> .ag2-cart-related__card),
  .ag2-cart-related__grid .hk-row-fluid,
  body.tpl-airgrill2.is-cart .ag2-cart-related__grid .hikashop_products .hk-row-fluid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ag2-cart-modal__dialog,
  .ag2-cart-thanks__card {
    padding: 32px 24px;
  }

  .ag2-cart-thanks__close {
    top: 24px;
    right: 24px;
  }
}

@media (max-width: 639px) {
  .ag2-cart-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    column-gap: 8px;
    row-gap: 16px;
    align-items: start;
  }

  .ag2-cart-row__image {
    grid-column: 1;
    width: 100%;
    height: 200px;
    flex-basis: auto;
  }

  .ag2-cart-row__body {
    grid-column: 1;
  }

  .ag2-cart-row__controls {
    flex-wrap: wrap;
  }

  .ag2-cart-row__price {
    flex-basis: auto;
    width: auto;
  }

  .ag2-cart-related__grid:has(> .ag2-cart-related__card),
  .ag2-cart-related__grid .hk-row-fluid,
  body.tpl-airgrill2.is-cart .ag2-cart-related__grid .hikashop_products .hk-row-fluid {
    grid-template-columns: 1fr;
  }
}

/* --- cartnotify toast (HikaShop notifyjs metro) - airgrill2 --- */
body.tpl-airgrill2 .notifyjs-corner {
  /* right: корзина 80px + зазор, чтобы toast не наезжал на иконку */
  margin: 16px 96px 16px 16px;
  z-index: 10050;
}

body.tpl-airgrill2 .notifyjs-container {
  min-width: 320px;
  max-width: 420px;
}

body.tpl-airgrill2 .notifyjs-metro-base,
body.tpl-airgrill2 .notifyjs-metro-lite-base {
  position: relative;
  min-height: 72px;
  padding: 0;
  color: var(--ag2-text, #282828) !important;
  background-color: #fff !important;
  border: 1px solid var(--ag2-line, #e0e0e0) !important;
  border-radius: 0 !important;
  box-shadow: 0 8px 24px rgba(19, 19, 19, 0.08);
  overflow: hidden;
  font-family: 'Onest', sans-serif;
}

/* accent полоска слева */
body.tpl-airgrill2 .notifyjs-metro-base::before,
body.tpl-airgrill2 .notifyjs-metro-lite-base::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--ag2-accent, #ff6123);
}

body.tpl-airgrill2 .notifyjs-metro-info,
body.tpl-airgrill2 .notifyjs-metro-success,
body.tpl-airgrill2 .notifyjs-metro-lite-info,
body.tpl-airgrill2 .notifyjs-metro-lite-success {
  color: var(--ag2-text, #282828) !important;
  background-color: #fff !important;
  border-color: var(--ag2-line, #e0e0e0) !important;
}

body.tpl-airgrill2 .notifyjs-metro-warning,
body.tpl-airgrill2 .notifyjs-metro-lite-warning {
  color: var(--ag2-text, #282828) !important;
  background-color: #fff !important;
  border-color: var(--ag2-line, #e0e0e0) !important;
}

body.tpl-airgrill2 .notifyjs-metro-warning::before,
body.tpl-airgrill2 .notifyjs-metro-lite-warning::before {
  background: var(--ag2-muted, #7a7a7a);
}

body.tpl-airgrill2 .notifyjs-metro-error,
body.tpl-airgrill2 .notifyjs-metro-lite-error {
  color: var(--ag2-text, #282828) !important;
  background-color: #fff !important;
  border-color: var(--ag2-line, #e0e0e0) !important;
}

body.tpl-airgrill2 .notifyjs-metro-error::before,
body.tpl-airgrill2 .notifyjs-metro-lite-error::before {
  background: #aa0000;
}

body.tpl-airgrill2 .notifyjs-metro-base .image {
  left: 40px;
  width: 48px;
  height: 48px;
}

body.tpl-airgrill2 .notifyjs-metro-base .image img {
  display: block;
  width: 48px;
  height: 48px;
  object-fit: cover;
  border-radius: 0;
  background: var(--ag2-bg-muted, #f7f7f7);
}

body.tpl-airgrill2 .notifyjs-metro-base .text-wrapper {
  margin: 14px 16px 14px 80px;
  font-family: inherit;
}

body.tpl-airgrill2 .notifyjs-metro-lite-base .text-wrapper {
  margin: 14px 16px 14px 16px;
  padding-left: 8px;
  font-family: inherit;
}

body.tpl-airgrill2 .notifyjs-metro-base .title,
body.tpl-airgrill2 .notifyjs-metro-lite-base .title {
  margin: 0 0 4px;
  font-size: 15px;
  font-weight: 600;
  line-height: 20px;
  color: var(--ag2-text, #282828) !important;
}

body.tpl-airgrill2 .notifyjs-metro-base .text,
body.tpl-airgrill2 .notifyjs-metro-lite-base .text {
  font-size: 13px;
  font-weight: 400;
  line-height: 18px;
  color: var(--ag2-muted, #7a7a7a) !important;
}

/* кликабельный toast - чуть заметнее hover */
body.tpl-airgrill2 .notifyjs-hidable.hikashop-cartnotify-cart {
  cursor: pointer;
}

body.tpl-airgrill2 .notifyjs-hidable.hikashop-cartnotify-cart:hover .notifyjs-metro-base,
body.tpl-airgrill2 .notifyjs-hidable.hikashop-cartnotify-cart:hover .notifyjs-metro-lite-base {
  border-color: #cfcfcf !important;
}
