.checkout-link {
  text-decoration: none;
}

/* =========================
   КОНТЕЙНЕР КОРЗИНЫ
========================= */

.cart-container {
  max-width: 1000px;
  margin: 40px auto;
  padding: 32px;

  background: rgba(255, 255, 255, .78);
  backdrop-filter: blur(20px) saturate(1.4);
  -webkit-backdrop-filter: blur(20px) saturate(1.4);
  border: 1px solid rgba(255, 255, 255, .6);
  border-radius: 28px;

  box-shadow:
    0 3px 10px rgba(0, 0, 0, .05),
    0 16px 40px rgba(0, 0, 0, .10),
    inset 0 1px 1px rgba(255, 255, 255, .7);
}

@media (max-width: 768px) {
  .cart-container {
    margin: 24px 12px;
    padding: 18px;
    border-radius: 22px;
  }
}

/* Было "@media (max-width: 480)" — без px правило не работало вообще.
   Исправлено + добавлены собственные значения под маленькие экраны. */
@media (max-width: 480px) {
  .cart-container {
    margin: 16px 8px;
    padding: 14px;
    border-radius: 18px;
  }
}

/* Кнопка "← Каталог" — стеклянная пилюля, консистентная
   с остальной навигацией сайта */
.back-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 18px;
  padding: 9px 18px;

  font-size: 14px;
  font-weight: 700;
  color: #6b6b6b;
  text-decoration: none;

  background: rgba(255, 255, 255, .7);
  backdrop-filter: blur(14px) saturate(1.3);
  -webkit-backdrop-filter: blur(14px) saturate(1.3);
  border: 1px solid rgba(255, 255, 255, .6);
  border-radius: 999px;

  box-shadow:
    0 2px 6px rgba(0, 0, 0, .04),
    0 6px 16px rgba(0, 0, 0, .06);

  transition: color .2s ease, background-color .2s ease, transform .2s ease;
}

.back-btn:hover {
  color: #d47713;
  background: rgba(255, 255, 255, .9);
  transform: translateX(-2px);
}

.cart-container h2 {
  font-size: 30px;
  font-weight: 800;
  letter-spacing: -0.5px;
  margin-bottom: 28px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  color: #222;
}

/* =========================
   СПИСОК ТОВАРОВ
========================= */

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

.cart-item {
  display: flex;
  gap: 20px;
  padding: 16px;

  background: rgba(255, 255, 255, .55);
  border: 1px solid rgba(255, 255, 255, .6);
  border-radius: 20px;

  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
  transition: box-shadow 0.25s ease, transform 0.25s ease, background-color .25s ease;
}

.cart-item:hover {
  background: rgba(255, 255, 255, .8);
  transform: translateY(-2px);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.08);
}

.cart-item img {
  width: 110px;
  height: 110px;
  object-fit: cover;
  border-radius: 14px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.item-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.item-info h3 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 8px;
  color: #222;

  white-space: nowrap;       /* Запрещаем перенос строк */
  overflow: hidden;          /* Скрываем текст, выходящий за пределы */
  text-overflow: ellipsis;   /* Добавляем многоточие */
  max-width: 240px;          /* Устанавливаем максимальную ширину (настройте под ваш дизайн) */
}

.quantity-price {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 16px;
  color: #444;
}

/* Управление количеством — стеклянная пилюля вместо голых кнопок */
.cart-item .cart-controls {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px;

  background: rgba(255, 255, 255, .7);
  border: 1px solid rgba(255, 255, 255, .6);
  border-radius: 999px;
  width: fit-content;
}

/* Цена товара в корзине — с поддержкой скидки:
   бейдж процента + зачёркнутая старая цена + новая цена */
.cart-item .price {
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
}

.cart-item .price .sale-badge {
  font-size: 10.5px;
  font-weight: 800;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 0.3px;

  background-image: linear-gradient(to right, #f6911d, #d47713);
  padding: 3px 9px;
  border-radius: 999px;
  box-shadow: 0 2px 6px rgba(246, 145, 29, .20);
}

.cart-item .price .old-price {
  font-size: 14px;
  color: #a4a4a8;
  text-decoration: line-through;
  font-weight: 500;
  opacity: 0.8;
}

.cart-item .price .final-price {
  font-size: 18px;
  font-weight: 800;
  color: #111;
}

/* =========================
   ИТОГ + ОФОРМЛЕНИЕ ЗАКАЗА
========================= */

.cart-summary {
  margin-top: 28px;
  padding: 26px;

  background: rgba(255, 255, 255, .78);
  backdrop-filter: blur(18px) saturate(1.3);
  -webkit-backdrop-filter: blur(18px) saturate(1.3);
  border: 1px solid rgba(255, 255, 255, .6);
  border-radius: 22px;

  box-shadow:
    0 3px 10px rgba(0, 0, 0, .04),
    0 12px 30px rgba(0, 0, 0, .08);

  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;

  font-family: 'Montserrat', sans-serif;
  max-width: 520px;
  margin-left: auto;
  margin-right: auto;
}

.price-wrapper {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
}

.discounted {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.old-price {
  font-size: 17px;
  font-weight: 500;
  color: #999;
  text-decoration: line-through;
}

.new-price {
  font-size: 30px;
  font-weight: 800;
  color: #d47713;
}

.discount-badge {
  background: rgba(246, 145, 29, 0.14);
  color: #d47713;
  font-weight: 700;
  font-size: 14px;
  padding: 5px 12px;
  border-radius: 999px;
}

h3 {
  font-size: 22px;
  font-weight: 700;
  color: #222;
  margin: 0;
}

h3 b {
  font-size: 28px;
  font-weight: 800;
  color: #222;
}

.cart-container h2 {
  color: #222;
}

/* Кнопка оформления заказа — главный акцент страницы:
   крупная, тёплая, с постоянным лёгким свечением, чтобы
   взгляд шёл именно сюда */
.checkout-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 16px 32px;

  background-image: linear-gradient(to right, #f6911d, #d47713);
  text-decoration: none;
  color: white;
  font-size: 17px;
  font-weight: 800;
  letter-spacing: 0.2px;

  border: none;
  border-radius: 999px;
  cursor: pointer;

  box-shadow:
    0 6px 16px rgba(246, 145, 29, .28),
    0 3px 8px rgba(0, 0, 0, .06);

  transition: background 0.3s ease, box-shadow 0.3s ease, transform 0.2s ease;
  position: relative;
  z-index: 1;
}

/* При наведении */
.checkout-btn:hover {
  background-image: linear-gradient(to right, #ff9d2e, #e8821c);
  box-shadow:
    0 10px 24px rgba(246, 145, 29, .36),
    0 4px 10px rgba(0, 0, 0, .08);
  transform: translateY(-2px);
}

.checkout-btn:active {
  transform: translateY(0) scale(0.98);
}

.checkout-btn .btn-icon {
  width: 20px;
  height: 20px;
  text-decoration: none;
  object-fit: contain;
  filter: brightness(0) invert(1);
  transform: translateY(-1px);
}

@media (max-width: 480px) {
  .cart-summary {
    flex-direction: column;
    align-items: stretch;
    padding: 20px;
  }

  .checkout-btn {
    width: 100%;
  }
}

/* =========================
   ПУСТАЯ КОРЗИНА
========================= */

.empty-cart {
  font-size: 18px;
  text-align: center;
  color: #888;
  margin: 40px 0 16px;
  font-weight: 600;
}

.empty-cart-img {
  display: block;
  max-width: 200px; /* Фиксируем максимальную ширину */
  width: 100%; /* Для адаптивности */
  height: auto;
  margin: 20px auto; /* Уменьшаем отступы */
  border-radius: 12px;
}

/* =========================
   АКТИВНЫЕ АКЦИИ
========================= */

.active-promos {
  background: linear-gradient(to right, rgba(255, 248, 240, .8), rgba(255, 243, 224, .8));
  border-left: 6px solid #f6911d;
  padding: 15px 20px;
  border-radius: 14px;
  margin-bottom: 25px;

  box-shadow: 0 3px 10px rgba(246, 145, 29, .08);
}

.active-promos h4 {
  margin: 0 0 10px;
  color: #d97706;
  font-size: 18px;
  font-weight: bold;
}

.promo-item {
  font-size: 15px;
  color: #444;
  margin-bottom: 6px;
  list-style: disc inside;
}

/* ============= Цвета для текстовых + / − (карточки и корзина) ============= */

/* Основные правила — центрируем текст внутри кнопок и задаём нормальный line-height */
.product-card .action-wrapper .cart-controls > button,
.cart-container .cart-controls > button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  padding: 0;           /* чтобы не смещал внутренний текст */
  min-width: 26px;
  min-height: 26px;
  font-size: 14px;      /* подгони при необходимости */
  background: transparent;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  transition: background-color .2s ease;
}

.cart-container .cart-controls > button:hover {
  background: rgba(0, 0, 0, 0.05);
}

/* Зелёный плюс (текст) */
.product-card .action-wrapper .cart-controls > button.increase,
.cart-container .cart-controls > button.increase {
  color: #19bd04;
  -webkit-text-fill-color: #19bd04; /* для WebKit (Safari/Chrome) */
  font-weight: 600;
}

/* Красный минус (текст) */
.product-card .action-wrapper .cart-controls > button.decrease,
.cart-container .cart-controls > button.decrease {
  color: #c21212;
  -webkit-text-fill-color: #c21212;
  font-weight: 600;
}

/* Hover / focus — лёгкая подсветка без смены цвета текста */
.product-card .action-wrapper .cart-controls > button.increase:hover,
.cart-container .cart-controls > button.increase:hover {
  filter: brightness(0.98);
  outline: none;
}

.product-card .action-wrapper .cart-controls > button.decrease:hover,
.cart-container .cart-controls > button.decrease:hover {
  filter: brightness(0.98);
  outline: none;
}

/* Мобильные размеры */
@media (max-width: 480px) {
  .product-card .action-wrapper .cart-controls > button,
  .cart-container .cart-controls > button {
    min-width: 22px;
    min-height: 22px;
    font-size: 12px;
  }

  .cart-item img {
    width: 84px;
    height: 84px;
  }

  .item-info h3 {
    font-size: 15px;
    max-width: 150px;
  }
}

/* ============= ВАЖНО =============
Если после добавления этот цвет не применяется, значит есть более «тяжёлое» правило (например с !important или более специфичным селектором).
В таком случае можно временно повысить приоритет — используйте это только при необходимости: */

.product-card .action-wrapper .cart-controls > button.increase { color: #19bd04 !important; -webkit-text-fill-color: #19bd04 !important; }
.product-card .action-wrapper .cart-controls > button.decrease { color: #c21212 !important; -webkit-text-fill-color: #c21212 !important; }