/**
 * Кошик zuumav.com.ua.
 * Палитра и формы взяты у темы cardealer: акцент #DB2E2D, тёмный текст #313131,
 * серый фон блоков #f5f5f5. Ничего нового не изобретаем — страница должна
 * выглядеть частью сайта, а не вставкой.
 */

/* --- кнопки «в кошик» на карточке модели --- */
.zu-buy-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 15px;
}
.zu-buy-row .car-vehicle-buy-online {
  flex: 1 1 45%;
  min-width: 160px;
}
.zu-buy-row .car-vehicle-buy-online .button {
  width: 100%;
}
.zu-add-to-cart {
  cursor: pointer;
}

/* --- кнопка «в кошик» под ценой в плитке каталога --- */
.zu-tile-cart {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: 12px;
  padding: 8px 16px;
  border: 1px solid #DB2E2D;
  background: transparent;
  color: #DB2E2D;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  cursor: pointer;
  transition: background .15s ease, color .15s ease;
}
.zu-tile-cart:hover {
  background: #DB2E2D;
  color: #fff;
}

/* --- счётчик в шапке --- */
#header .menu-links .menu-item-cart > a {
  position: relative;
}
#header .menu-links .menu-item-cart .zu-cart-count {
  position: absolute;
  top: 50%;
  margin-top: -18px;
  right: -8px;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  border-radius: 9px;
  background: #DB2E2D;
  color: #fff;
  font-size: 11px;
  line-height: 18px;
  text-align: center;
  font-weight: 700;
}

/* --- иконка корзины на телефоне: меню там свёрнуто в бургер --- */
.zu-cart-mobile {
  display: none;
}
@media (max-width: 991px) {
  .zu-cart-mobile {
    display: flex;
    position: absolute;
    top: 50%;
    right: 56px;
    margin-top: -20px;
    width: 40px;
    height: 40px;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 19px;
    z-index: 10;
  }
  .zu-cart-mobile .zu-cart-count {
    position: absolute;
    top: 2px;
    right: 0;
    min-width: 18px;
    height: 18px;
    padding: 0 4px;
    border-radius: 9px;
    background: #DB2E2D;
    color: #fff;
    font-size: 11px;
    line-height: 18px;
    text-align: center;
    font-weight: 700;
  }
}

/* --- всплывающее подтверждение --- */
#zu-cart-toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 100000;
  max-width: 340px;
  padding: 14px 18px;
  border-left: 3px solid #DB2E2D;
  background: #313131;
  color: #fff;
  font-size: 14px;
  line-height: 1.45;
  box-shadow: 0 6px 24px rgba(0, 0, 0, .25);
  opacity: 0;
  transform: translateY(12px);
  transition: opacity .2s ease, transform .2s ease;
  pointer-events: none;
}
#zu-cart-toast.is-visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
#zu-cart-toast a {
  color: #fff;
  text-decoration: underline;
  white-space: nowrap;
}

/* --- страница кошика --- */
#zu-cart-app {
  margin-bottom: 60px;
}
.zu-cart-table {
  width: 100%;
  margin-bottom: 25px;
  border-collapse: collapse;
}
.zu-cart-table th {
  padding: 12px 10px;
  border-bottom: 2px solid #e4e4e4;
  color: #313131;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: .04em;
  text-align: left;
}
.zu-cart-table td {
  padding: 16px 10px;
  border-bottom: 1px solid #ececec;
  vertical-align: middle;
}
.zu-cart-product {
  display: flex;
  align-items: center;
  gap: 14px;
}
.zu-cart-product img {
  width: 70px;
  height: 70px;
  object-fit: cover;
  flex: 0 0 auto;
}
.zu-cart-product a {
  color: #313131;
  font-weight: 600;
}
.zu-cart-product a:hover {
  color: #DB2E2D;
}
.zu-cart-price,
.zu-cart-sum {
  white-space: nowrap;
}
.zu-cart-sum {
  font-weight: 700;
  color: #313131;
}
.zu-cart-qty {
  white-space: nowrap;
}
.zu-qty-btn {
  width: 30px;
  height: 30px;
  border: 1px solid #d8d8d8;
  background: #fff;
  color: #313131;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
}
.zu-qty-btn:hover {
  border-color: #DB2E2D;
  color: #DB2E2D;
}
.zu-qty-value {
  display: inline-block;
  min-width: 32px;
  text-align: center;
  font-weight: 700;
}
.zu-remove-btn {
  width: 30px;
  height: 30px;
  border: 0;
  background: none;
  color: #9b9b9b;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}
.zu-remove-btn:hover {
  color: #DB2E2D;
}
.zu-cart-total {
  margin-bottom: 30px;
  text-align: right;
  font-size: 20px;
  color: #313131;
}
.zu-cart-total strong {
  color: #DB2E2D;
  font-size: 24px;
}

/* --- форма --- */
.zu-cart-form h3 {
  margin-bottom: 20px;
}
.zu-cart-fields {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  margin-bottom: 18px;
}
.zu-cart-field {
  flex: 1 1 240px;
  display: flex;
  flex-direction: column;
}
.zu-cart-field--wide {
  flex-basis: 100%;
}
.zu-cart-field label {
  margin-bottom: 6px;
  font-size: 13px;
  font-weight: 600;
  color: #313131;
}
.zu-cart-field input,
.zu-cart-field textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid #d8d8d8;
  background: #fff;
  color: #313131;
  font-size: 15px;
}
.zu-cart-field input:focus,
.zu-cart-field textarea:focus {
  border-color: #DB2E2D;
  outline: none;
}
.zu-cart-field textarea {
  min-height: 96px;
  resize: vertical;
}
.zu-cart-submit {
  padding: 14px 34px;
  border: 0;
  background: #DB2E2D;
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  cursor: pointer;
}
.zu-cart-submit:hover {
  background: #313131;
}
.zu-cart-submit[disabled] {
  opacity: .6;
  cursor: default;
}

/* --- сообщения --- */
.zu-cart-warn,
.zu-cart-ok {
  padding: 16px 20px;
  margin-bottom: 20px;
  font-size: 15px;
  line-height: 1.5;
}
.zu-cart-warn {
  border-left: 3px solid #DB2E2D;
  background: #fdf1f1;
  color: #313131;
}
.zu-cart-ok {
  border-left: 3px solid #2e9e4f;
  background: #f1f9f3;
  color: #313131;
}
.zu-cart-ok h3 {
  margin: 0 0 8px;
  font-size: 20px;
}
.zu-cart-ok p {
  margin: 0;
}
.zu-cart-empty {
  padding: 40px 0 60px;
  text-align: center;
}
.zu-cart-empty p {
  margin-bottom: 20px;
  font-size: 17px;
  color: #6d6d6d;
}
.zu-cart-empty .zu-cart-submit {
  display: inline-block;
  text-decoration: none;
}

/* --- телефон: таблица разворачивается в карточки --- */
@media (max-width: 767px) {
  .zu-cart-table thead {
    display: none;
  }
  .zu-cart-table,
  .zu-cart-table tbody,
  .zu-cart-table tr,
  .zu-cart-table td {
    display: block;
    width: 100%;
  }
  .zu-cart-table tr {
    position: relative;
    padding: 16px 0;
    border-bottom: 1px solid #ececec;
  }
  .zu-cart-table td {
    padding: 4px 40px 4px 0;
    border: 0;
  }
  .zu-cart-price::before {
    content: 'Ціна: ';
    color: #8b8b8b;
  }
  .zu-cart-sum::before {
    content: 'Сума: ';
    color: #8b8b8b;
    font-weight: 400;
  }
  .zu-cart-remove {
    position: absolute;
    top: 12px;
    right: 0;
    width: auto;
    padding: 0;
  }
  .zu-cart-total {
    text-align: left;
  }
}
