/* ============================================================
   N1ceStudio — своя корзина (замена Tilda T706)
   ============================================================ */

/* --- Оверлей --- */
.n1ce-cart-overlay {
  position: fixed; inset: 0; z-index: 20000;
  background: rgba(5, 5, 8, 0.92);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  display: flex; align-items: center; justify-content: center; padding: 20px;
}
.n1ce-cart-overlay[hidden] { display: none; }

.n1ce-cart-body {
  position: relative; z-index: 1;
  background: linear-gradient(180deg, #0f111a 0%, #0a0c14 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 22px;
  color: #fff;
  font-family: 'Sora', 'Manrope', 'Inter', sans-serif;
  max-width: 600px; width: 100%;
  padding: 32px 32px 26px;
  max-height: 90vh; overflow-y: auto;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
  animation: n1ceCartIn .35s cubic-bezier(0.16, 1, 0.3, 1) both;
}
@keyframes n1ceCartIn {
  from { opacity: 0; transform: scale(0.96) translateY(12px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}
.n1ce-cart-body::-webkit-scrollbar { width: 6px; }
.n1ce-cart-body::-webkit-scrollbar-track { background: transparent; }
.n1ce-cart-body::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.12); border-radius: 100px; }

/* --- Шапка --- */
.n1ce-cart-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 0 16px; border: none; position: relative;
}
.n1ce-cart-head > span {
  font-family: 'Sora', 'Manrope', sans-serif; color: #fff;
  font-size: 25px; font-weight: 700; letter-spacing: -0.5px; line-height: 1.2;
  padding-left: 16px;
}
.n1ce-cart-head > span::before {
  content: ''; position: absolute; left: 0; top: 3px;
  width: 4px; height: 22px; border-radius: 4px;
  background: linear-gradient(180deg, #2962ff, #00b4ff);
}
.n1ce-cart-close {
  width: 32px; height: 32px; display: block;
  background: none; border: none; cursor: pointer;
  color: transparent; position: relative; z-index: 6;
}
.n1ce-cart-close::before,
.n1ce-cart-close::after {
  content: ''; position: absolute; top: 50%; left: 50%;
  width: 20px; height: 2.5px; border-radius: 2px; background: #ff4d4d;
}
.n1ce-cart-close::before { transform: translate(-50%, -50%) rotate(45deg); }
.n1ce-cart-close::after { transform: translate(-50%, -50%) rotate(-45deg); }

/* --- Товары --- */
.n1ce-cart-items { margin-bottom: 8px; }
.n1ce-cart-empty { color: #8a8fa8; text-align: center; padding: 40px 0; }
.n1ce-cart-item {
  display: flex; align-items: center; gap: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding: 18px 0;
}
.n1ce-cart-thumb { width: 56px; height: 56px; border-radius: 12px; background: rgba(255,255,255,0.06); flex-shrink: 0; }
.n1ce-cart-item img { width: 56px; height: 56px; border-radius: 12px; object-fit: cover; flex-shrink: 0; }
.n1ce-cart-info { flex: 1; min-width: 0; }
.n1ce-cart-title { color: #fff; font-weight: 700; font-size: 15px; line-height: 1.35; }
.n1ce-cart-qty { display: flex; align-items: center; gap: 10px; margin-top: 8px; }
.n1ce-cart-qty button {
  width: 24px; height: 24px; border-radius: 6px;
  background: rgba(255, 255, 255, 0.06); border: 1px solid rgba(255, 255, 255, 0.12);
  color: #fff; cursor: pointer; font-size: 15px; line-height: 1;
}
.n1ce-cart-qty span { min-width: 18px; text-align: center; font-size: 14px; }
.n1ce-cart-price {
  font-family: 'Sora', sans-serif; font-weight: 700; font-size: 16px;
  background: linear-gradient(135deg, #4a7cff 0%, #00b4ff 100%);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
  white-space: nowrap;
}
.n1ce-cart-del {
  width: 26px; height: 26px; border: none; background: none; cursor: pointer;
  color: #6b7088; font-size: 20px; line-height: 1;
}
.n1ce-cart-del:hover { color: #fff; }

/* --- Итог --- */
.n1ce-cart-foot { margin-top: 20px; padding-top: 18px; border-top: 1px solid rgba(255, 255, 255, 0.08); }
.n1ce-cart-total { display: flex; align-items: center; justify-content: flex-end; gap: 10px; margin-bottom: 18px; }
.n1ce-cart-total span { color: #8a8fa8; font-size: 15px; }
.n1ce-cart-total b {
  font-family: 'Sora', sans-serif;
  background: linear-gradient(135deg, #4a7cff 0%, #00b4ff 100%);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
  font-size: 24px; font-weight: 800;
}

/* --- Кнопка покупки / купить на карточке --- */
[data-cart-icon] { cursor: pointer; transition: opacity .2s; }

/* --- Тост --- */
.n1ce-toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(20px);
  background: #0f111a; border: 1px solid rgba(41, 98, 255, 0.5); color: #fff;
  padding: 12px 24px; border-radius: 12px; font-size: 14px; font-family: 'Inter', sans-serif;
  opacity: 0; visibility: hidden; transition: all .3s cubic-bezier(0.4,0,0.2,1); z-index: 30000;
}
.n1ce-toast.show { opacity: 1; visibility: visible; transform: translateX(-50%) translateY(0); }

@media (max-width: 600px) {
  .n1ce-cart-body { padding: 24px 18px 20px; border-radius: 18px; }
  .n1ce-cart-head > span { font-size: 21px; }
}