/* ==== Инлайн-корзина ==== */
.cart-widget {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-wrap: nowrap;
}

/* --- Кнопка "В корзину" (когда товара нет в корзине) --- */
.cart-widget__add {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 24px;
  height: 44px;
  background: #2ed471;
  color: #fff;
  border: none;
  border-radius: 30px;
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  transition: background .15s, transform .1s;
  font-family: inherit;
  white-space: nowrap;
}
.cart-widget__add:hover { background: #22b85f; }
.cart-widget__add:active { transform: scale(.98); }

/* --- Счётчик "− N +" (когда товар в корзине) --- */
.cart-widget__qty {
  display: inline-flex;
  align-items: center;
  border: 1px solid #cbd5e1;
  border-radius: 30px;
  overflow: hidden;
  background: #fff;
  height: 44px;
  flex: 0 0 auto;
}
.cart-widget__qty button {
  width: 40px;
  height: 100%;
  border: none;
  background: transparent;
  font-size: 18px;
  cursor: pointer;
  color: #0f172a;
  transition: background .15s;
  font-family: inherit;
  padding: 0;
  line-height: 1;
}
.cart-widget__qty button:hover:not(:disabled) { background: #f1f5f9; }
.cart-widget__qty button:disabled { color: #cbd5e1; cursor: not-allowed; }

.cart-widget__qty input {
  width: 52px;
  height: 100%;
  border: none;
  outline: none;
  text-align: center;
  font-size: 15px;
  font-weight: 600;
  background: transparent;
  -moz-appearance: textfield;
  font-family: inherit;
  padding: 0;
}
.cart-widget__qty input::-webkit-outer-spin-button,
.cart-widget__qty input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* --- Кнопка удаления (крестик) --- */
.cart-widget__meta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
}
.cart-widget__check {
  font-size: 12px;
  color: #22b85f;
  font-weight: 600;
  white-space: nowrap;
}
.cart-widget__remove {
  width: 28px;
  height: 28px;
  border: none;
  border-radius: 50%;
  background: transparent;
  color: #94a3b8;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  transition: background .15s, color .15s;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}
.cart-widget__remove:hover { background: #fee2e2; color: #ef4444; }

/* ============================================================
   КОМПАКТНЫЙ РЕЖИМ для карточек в каталоге/поиске
   Всё в одну строку, ничего не разъезжается
   ============================================================ */
.product-card .cart-widget {
  display: flex;
  width: 100%;
  gap: 6px;
  align-items: center;
  flex-wrap: nowrap;
  overflow: hidden;
}

.product-card .cart-widget__add {
  width: 100%;
  height: 38px;
  font-size: 13px;
  padding: 0 10px;
  gap: 6px;
  border-radius: 8px;
  flex: 1 1 auto;
  min-width: 0;
}
.product-card .cart-widget__add span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.product-card .cart-widget__add svg {
  flex: 0 0 auto;
  width: 14px;
  height: 14px;
}

/* Счётчик в карточке — компактный */
.product-card .cart-widget__qty {
  height: 38px;
  flex: 1 1 auto;
  min-width: 0;
}
.product-card .cart-widget__qty button {
  width: 32px;
  font-size: 16px;
  flex: 0 0 auto;
}
.product-card .cart-widget__qty input {
  width: 100%;
  min-width: 30px;
  font-size: 14px;
}

/* Прячем "✓ В корзине" в карточке — там нет места */
.product-card .cart-widget__check {
  display: none;
}

/* Крестик в карточке — маленький, всегда виден */
.product-card .cart-widget__meta {
  flex: 0 0 auto;
  gap: 0;
}
.product-card .cart-widget__remove {
  width: 32px;
  height: 32px;
  font-size: 16px;
}

/* На узких экранах ещё компактнее */
@media (max-width: 480px) {
  .product-card .cart-widget__qty button { width: 28px; font-size: 15px; }
  .product-card .cart-widget__remove { width: 28px; height: 28px; font-size: 14px; }
  .product-card .cart-widget__add { font-size: 12px; padding: 0 8px; }
}

/* ==== Toast ==== */
.cart-toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(80px);
  background: #0f172a;
  color: #fff;
  padding: 12px 20px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 500;
  box-shadow: 0 10px 30px rgba(0,0,0,.25);
  opacity: 0;
  transition: opacity .25s, transform .25s;
  z-index: 9999;
  pointer-events: none;
  max-width: 90vw;
  text-align: center;
}
.cart-toast.is-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
.cart-toast.is-error { background: #ef4444; }

/* ==== Хлебные крошки ==== */
.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  color: #475569;
  padding: 20px 0 8px;
  line-height: 1.5;
  font-weight: 500;
}
.breadcrumbs a {
  color: #2ed471;
  text-decoration: none;
  transition: color .15s;
  word-break: break-word;
  font-weight: 500;
}
.breadcrumbs a:hover {
  color: #0f172a;
  text-decoration: underline;
}
.breadcrumbs .sep {
  color: #94a3b8;
  user-select: none;
  font-size: 14px;
  font-weight: 400;
}
.breadcrumbs .current {
  color: #0f172a;
  font-weight: 600;
  word-break: break-word;
}

@media (max-width: 768px) {
  .breadcrumbs {
    font-size: 13px;
    gap: 6px;
    padding: 14px 0 6px;
  }
}
@media (max-width: 480px) {
  .breadcrumbs {
    font-size: 12px;
    padding: 12px 0 4px;
  }
  .breadcrumbs .sep { font-size: 11px; }
}