/* Корзина v2. Подключается только при включённом переключателе nk_v2 (body.nk-v2). */

/* Панель корзины: на телефоне — шторка на весь экран снизу, на компьютере — панель справа */
.nk-v2 .fixed-basket {
  left: 0 !important;
  width: 100% !important;
  height: 100%;
  height: 100dvh;
  height: var(--nk-vh, 100dvh);
  top: var(--nk-vtop, 0px) !important;
  padding: 0 !important;
  background: #fff;
  box-shadow: none;
  z-index: 2147483000;
  transform: translate(0, 105%);
  transition: transform .3s ease;
}
.nk-v2.close-basket-body .fixed-basket { transform: translate(0, 0); }
@media (min-width: 768px) {
  .nk-v2 .fixed-basket {
    left: auto !important;
    right: 0;
    width: 480px !important;
    transform: translate(105%, 0);
  }
  .nk-v2.close-basket-body .fixed-basket {
    transform: translate(0, 0);
    box-shadow: 0 0 0 100vmax rgba(0, 0, 0, .35);
  }
}
.nk-v2 .fixed-basket .close-basket-btn,
.nk-v2 .fixed-basket .infoContainer,
.nk-v2 .fixed-basket .basket_reg,
.nk-v2 .fixed-basket .basket_mob_layout > .row { display: none !important; }
.nk-v2 .fixed-basket .basket_mob_layout {
  position: absolute;
  top: 0; right: 0; bottom: 0; left: 0;
  width: 100%;
  height: 100%;
  padding: 0 !important;
  overflow: hidden !important;
}
.nk-v2 .fixed-basket .basket-fix-fix {
  display: block !important;
  height: 100%;
  max-height: none !important;
  margin: 0 !important;
  padding: 0 !important;
}

/* Каркас */
.nk-cart {
  height: 100%;
  color: #333;
  font-family: inherit;
  -webkit-text-size-adjust: 100%;
}
.nk-cart *, .nk-cart *::before, .nk-cart *::after { box-sizing: border-box; }
.nk-cart [hidden] { display: none !important; }
.nk-cart p { margin: 0; }
.nk-cart button { font-family: inherit; -webkit-tap-highlight-color: transparent; }
.nk-cart button:focus-visible,
.nk-cart a:focus-visible { outline: 2px solid #657B2A; outline-offset: 2px; }

.nk-step { display: none; flex-direction: column; height: 100%; min-height: 0; }
.nk-cart[data-step="1"] .nk-step-1,
.nk-cart[data-step="2"] .nk-step-2 { display: flex; }

.nk-head {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 12px 16px;
  padding-top: max(12px, env(safe-area-inset-top));
  background: #fff;
  border-radius: 0;
}
.nk-title { margin: 0; font-size: 24px; font-weight: 700; line-height: 1.2; color: #333; }
.nk-title-center { flex: 1; font-size: 18px; text-align: center; }

.nk-icon-btn {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #EEEFEA;
  color: #333;
  cursor: pointer;
}
.nk-icon-btn-small {
  width: 36px;
  height: 36px;
  margin: -8px -8px 0 0;
  background: transparent;
  color: #A6A683;
}

.nk-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  padding: 0 16px 16px;
  background: #fff;
}

.nk-foot {
  flex: none;
  padding: 12px 16px;
  padding-bottom: calc(16px + env(safe-area-inset-bottom));
  background: #fff;
  border-top: 1px solid #EEEFEA;
  text-align: center;
}
.nk-total-label { font-size: 15px; color: #7a7a72; }
.nk-total { margin-top: 2px; font-size: 32px; font-weight: 700; line-height: 1.2; color: #333; }
.nk-total-note { margin-top: 2px; font-size: 14px; color: #7a7a72; }

.nk-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 56px;
  margin-top: 12px;
  padding: 8px 16px;
  border: 0;
  border-radius: 28px;
  background: #657B2A;
  color: #fff;
  text-decoration: none;
  cursor: pointer;
  transition: background .15s;
}
.nk-btn:hover { background: #5A6E25; color: #fff; text-decoration: none; }
.nk-btn:active { background: #4F6120; }
.nk-btn[disabled] { background: #8FA05F; cursor: default; }
.nk-btn-title { font-size: 18px; font-weight: 700; line-height: 1.2; }
.nk-btn-sub { margin-top: 2px; font-size: 13px; color: #E4EBCF; }
.nk-btn-secondary {
  display: inline-flex;
  width: auto;
  min-height: 48px;
  padding: 0 24px;
  background: #EEEFEA;
  color: #333;
  font-size: 15px;
  font-weight: 500;
}
.nk-btn-secondary:hover { background: #E2E3DC; color: #333; }

.nk-link {
  min-height: 44px;
  padding: 12px 0;
  border: 0;
  background: none;
  color: #7a7a72;
  font-size: 15px;
  text-decoration: underline;
  cursor: pointer;
}

/* Шаг 1: товары */
.nk-items { margin: 0; padding: 0; list-style: none; }
.nk-item {
  display: flex;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid #EEEFEA;
  transition: opacity .2s;
}
.nk-item.is-busy { opacity: .5; pointer-events: none; }
.nk-item-img {
  flex: none;
  display: block;
  width: 100px;
  height: 100px;
  overflow: hidden;
  border-radius: 16px;
  background: #F8EFDB;
}
@media (max-width: 359px) {
  .nk-item-img { width: 88px; height: 88px; }
  .nk-item { gap: 10px; }
}
.nk-item-img img { display: block; width: 100%; height: 100%; object-fit: cover; }
.nk-item-info { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.nk-item-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.nk-item-name {
  font-size: 17px;
  font-weight: 500;
  line-height: 1.3;
  color: #333;
  text-decoration: none;
  overflow-wrap: anywhere;
}
.nk-item-name:hover { color: #657B2A; text-decoration: none; }
.nk-item-meta { margin-top: 2px; font-size: 15px; color: #7a7a72; }
.nk-item-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: auto;
  padding-top: 8px;
}
.nk-qty {
  display: inline-flex;
  align-items: center;
  height: 40px;
  border-radius: 20px;
  background: #EEEFEA;
}
.nk-qty-btn {
  width: 44px;
  height: 40px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #657B2A;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}
.nk-qty-value { min-width: 40px; font-size: 17px; text-align: center; white-space: nowrap; color: #333; }
.nk-item-sum { font-size: 18px; font-weight: 700; white-space: nowrap; color: #333; }

.nk-empty { padding-top: 56px; text-align: center; }
.nk-empty-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: #F8EFDB;
  color: #657B2A;
}
.nk-empty-title { margin-top: 16px !important; font-size: 20px; font-weight: 700; }
.nk-empty-text { margin: 6px auto 20px !important; max-width: 280px; font-size: 16px; line-height: 1.4; color: #7a7a72; }

/* Шаг 2: получение и контакты */
.nk-form { padding-top: 4px; }
.nk-seg {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  margin: 8px 0 12px;
  padding: 4px;
  border-radius: 16px;
  background: #EEEFEA;
}
.nk-seg-btn, .nk-online-btn {
  height: 44px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: #7a7a72;
  font-size: 16px;
  cursor: pointer;
}
.nk-seg-btn.is-active, .nk-online-btn.is-active { background: #fff; color: #333; font-weight: 700; box-shadow: 0 1px 3px rgba(0, 0, 0, .08); }

.nk-cities { display: flex; gap: 8px; margin-bottom: 10px; padding-bottom: 2px; overflow-x: auto; }
.nk-city {
  flex: none;
  height: 36px;
  padding: 0 16px;
  border: 0;
  border-radius: 18px;
  background: #EEEFEA;
  color: #333;
  font-size: 15px;
  white-space: nowrap;
  cursor: pointer;
}
.nk-city.is-active { background: #657B2A; color: #fff; }

.nk-points { display: flex; flex-direction: column; gap: 8px; }
.nk-point {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  width: 100%;
  min-height: 56px;
  padding: 12px 14px;
  border: 2px solid transparent;
  border-radius: 14px;
  background: #EEEFEA;
  color: #333;
  text-align: left;
  cursor: pointer;
}
.nk-point.is-active { border-color: #657B2A; background: #fff; }
.nk-radio {
  flex: none;
  width: 20px;
  height: 20px;
  margin-top: 1px;
  border: 2px solid #A6A683;
  border-radius: 50%;
  background: #fff;
}
.nk-point.is-active .nk-radio { border: 6px solid #657B2A; }
.nk-point-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.nk-point-name { font-size: 17px; font-weight: 500; line-height: 1.3; }
.nk-point-time { font-size: 15px; line-height: 1.3; color: #7a7a72; }
/* Живой статус бутика (заполняет js/nk-v3-points.js по кировскому времени, как на «Контактах») */
.nk-point-status { display: block; margin-top: 2px; font-size: 14px; font-weight: 700; line-height: 1.3; }
.nk-point-status.is-open { color: #4E6B1F; }
.nk-point-status.is-closed { color: #A8372B; }

.nk-email-hint { margin-top: 6px !important; }
/* Уведомления о заказе: предложение перед кнопкой «Оформить заказ» */
.nk-push { margin: 18px 0 0; padding: 14px 16px; border: 1px solid #DDE0D3; border-radius: 16px; background: #F6F7F2; }
.nk-push-title { margin: 0 0 4px !important; font-size: 17px; font-weight: 700; line-height: 1.3; color: #333; }
.nk-push-text { margin: 0 0 12px !important; font-size: 15px; line-height: 1.4; color: #5c5c55; }
.nk-push-ok { margin: 6px 0 0 !important; font-size: 15px; font-weight: 700; line-height: 1.4; color: #4E6B1F; }
.nk-push .nk-btn { display: flex; width: 100%; min-height: 48px; margin-top: 0; border: 1.5px solid #657B2A; background: #fff; color: #4E6B1F; }
.nk-push .nk-btn:hover { background: #F6F8EF; color: #4E6B1F; }
/* Самовывоз из точки, где можно оплатить онлайн: вопрос под списком точек */
.nk-online { margin: 14px 0 0; }
.nk-online-title { margin: 0 2px 2px !important; font-size: 17px; font-weight: 700; line-height: 1.3; color: #333; }
.nk-online .nk-seg { margin: 8px 0 0; }
.nk-hint { margin: 10px 2px 0 !important; font-size: 15px; line-height: 1.4; color: #7a7a72; }
.nk-subtitle { margin: 22px 0 8px; font-size: 18px; font-weight: 700; color: #333; }

.nk-field {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 60px;
  margin: 0 0 8px;
  padding: 6px 14px;
  border: 2px solid transparent;
  border-radius: 14px;
  background: #EEEFEA;
  cursor: text;
}
.nk-field:focus-within { border-color: #657B2A; background: #fff; }
.nk-field.is-error { border-color: #B03A2E; background: #fff; }
.nk-field-label { font-size: 14px; line-height: 1.2; color: #7a7a72; }
.nk-cart .nk-field input {
  width: 100%;
  min-width: 0;
  height: auto !important;
  margin: 0 !important;
  padding: 2px 0 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  outline: none;
  color: #333;
  font-family: inherit;
  font-size: 18px !important;
  line-height: 1.3;
  -webkit-appearance: none;
  appearance: none;
}
.nk-cart .nk-field input::placeholder { color: #A6A683; }
.nk-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.nk-grid .nk-field { margin: 0; }

.nk-error { margin: -2px 4px 8px !important; font-size: 15px; line-height: 1.3; color: #B03A2E; }
.nk-error-order {
  margin: 12px 0 0 !important;
  padding: 10px 12px;
  border-radius: 12px;
  background: #FCEBEB;
}

/* Заказ оформлен */
.nk-cart { position: relative; }
.nk-confetti { position: absolute; top: 0; left: 0; width: 100%; height: 100%; pointer-events: none; z-index: 2; }
.nk-success {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 24px 20px;
  padding-bottom: calc(20px + env(safe-area-inset-bottom));
  background: #fff;
  text-align: center;
}
.nk-success-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow-y: auto;
}
.nk-success-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 96px;
  height: 96px;
  border-radius: 50%;
  background: #657B2A;
  color: #fff;
  box-shadow: 0 0 0 10px #E4EBCF;
  animation: nk-pop .55s cubic-bezier(.2, 1.4, .4, 1) both;
}
.nk-success-check {
  stroke-dasharray: 40;
  stroke-dashoffset: 40;
  animation: nk-draw .45s .35s ease-out forwards;
}
.nk-success-kicker {
  margin-top: 26px !important;
  font-size: 16px;
  font-weight: 500;
  letter-spacing: .02em;
  color: #657B2A;
  animation: nk-rise .5s .25s ease-out both;
}
.nk-success-title {
  margin: 4px 0 0;
  font-size: 28px;
  font-weight: 700;
  line-height: 1.2;
  color: #333;
  animation: nk-rise .5s .3s ease-out both;
}
.nk-success-text {
  max-width: 320px;
  margin: 10px auto 0 !important;
  font-size: 17px;
  line-height: 1.45;
  color: #7a7a72;
  animation: nk-rise .5s .35s ease-out both;
}
.nk-success-card {
  width: 100%;
  max-width: 380px;
  margin-top: 22px;
  padding: 6px 16px;
  border-radius: 16px;
  background: #EEEFEA;
  text-align: left;
  animation: nk-rise .5s .45s ease-out both;
}
.nk-success-row { display: flex; flex-direction: column; gap: 2px; padding: 10px 0; }
.nk-success-row + .nk-success-row { border-top: 1px solid #E2E3DC; }
.nk-success-label { font-size: 14px; color: #7a7a72; }
.nk-success-value { font-size: 17px; line-height: 1.35; color: #333; overflow-wrap: anywhere; }
.nk-success-foot { flex: none; display: flex; flex-direction: column; align-items: center; }
.nk-success-more { color: #657B2A; text-decoration: none; font-weight: 500; }

@keyframes nk-pop { 0% { transform: scale(.3); opacity: 0; } 100% { transform: scale(1); opacity: 1; } }
@keyframes nk-draw { to { stroke-dashoffset: 0; } }
@keyframes nk-rise { 0% { transform: translateY(12px); opacity: 0; } 100% { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  .nk-success-icon, .nk-success-kicker, .nk-success-title, .nk-success-text, .nk-success-card { animation: none; }
  .nk-success-check { animation: none; stroke-dashoffset: 0; }
}

/* Во время ввода итог внизу сворачивается — больше места для полей над клавиатурой */
.nk-cart.nk-typing .nk-step-2 .nk-total-label,
.nk-cart.nk-typing .nk-step-2 .nk-total,
.nk-cart.nk-typing .nk-step-2 .nk-total-note { display: none; }
.nk-cart.nk-typing .nk-step-2 .nk-foot { padding-top: 8px; padding-bottom: 8px; }
.nk-cart.nk-typing .nk-step-2 .nk-btn { margin-top: 0; min-height: 48px; }

/* Повторный показ экрана «Заказ оформлен» после перерисовки — без повторной анимации */
.nk-cart.nk-no-anim * { animation: none !important; }
.nk-cart.nk-no-anim .nk-success-check { stroke-dashoffset: 0; }

/* Кнопка во время оформления */
.nk-btn.is-loading { flex-direction: row; gap: 10px; }
.nk-btn.is-loading::before {
  content: '';
  width: 18px;
  height: 18px;
  border: 2.5px solid rgba(255, 255, 255, .35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: nk-spin .7s linear infinite;
}
@keyframes nk-spin { to { transform: rotate(360deg); } }

/* Экран «Оформляем заказ…» — сразу после нажатия, пока сервер сохраняет заказ */
.nk-pending {
  position: absolute;
  top: 0; right: 0; bottom: 0; left: 0;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: #fff;
  text-align: center;
  animation: nk-fade .2s ease-out both;
}
.nk-pending-icon {
  width: 96px;
  height: 96px;
  border: 6px solid #E4EBCF;
  border-top-color: #657B2A;
  border-radius: 50%;
  animation: nk-spin .8s linear infinite;
}
.nk-pending-title { margin-top: 26px !important; font-size: 24px; font-weight: 700; color: #333; }
.nk-pending-text { margin-top: 8px !important; font-size: 17px; color: #7a7a72; }
@keyframes nk-fade { from { opacity: 0; } to { opacity: 1; } }

/* Окно подтверждения (удалить товар, очистить корзину) */
.nk-dialog-backdrop {
  position: absolute;
  top: 0; right: 0; bottom: 0; left: 0;
  z-index: 10;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background: rgba(51, 51, 51, .45);
  animation: nk-fade .15s ease-out both;
}
.nk-dialog {
  width: 100%;
  padding: 24px 20px;
  padding-bottom: calc(20px + env(safe-area-inset-bottom));
  border-radius: 22px 22px 0 0;
  background: #fff;
  color: #333;
  text-align: center;
  animation: nk-sheet-up .22s ease-out both;
}
.nk-dialog-title { margin: 0 !important; font-size: 21px; font-weight: 700; line-height: 1.25; }
.nk-dialog-text { margin: 8px 0 0 !important; font-size: 16px; line-height: 1.4; color: #7a7a72; overflow-wrap: anywhere; }
.nk-dialog-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 20px; }
.nk-dialog-actions .nk-btn { width: 100%; min-height: 52px; margin: 0; font-size: 17px; font-weight: 700; }
.nk-btn-danger { background: #B03A2E; color: #fff; }
.nk-btn-danger:hover { background: #9A3228; color: #fff; }
.nk-btn-danger:active { background: #85291F; }
@media (min-width: 768px) {
  .nk-dialog-backdrop { align-items: center; padding: 24px; }
  .nk-dialog { max-width: 380px; border-radius: 20px; padding-bottom: 20px; }
}
@keyframes nk-sheet-up { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }
.nk-dialog-backdrop, .nk-dialog-backdrop * { box-sizing: border-box; }
.nk-dialog-backdrop button { font-family: inherit; border: 0; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.nk-dialog-backdrop button:focus-visible { outline: 2px solid #657B2A; outline-offset: 2px; }
.nk-dialog-backdrop [hidden] { display: none !important; }
