/* ═══════════════════════════════════════════════
   KREDO-SHOP — Modern Checkout v2
   Based on Figma design (Кроk до здоров'я)
   ═══════════════════════════════════════════════ */

:root {
  --green:       #5e8b1a;
  --green-dark:  #4a6e13;
  --green-light: #eef4e0;
  --green-text:  #5e8b1a;
  --text:        #1e1e1e;
  --text-muted:  #888;
  --border:      #e0e0e0;
  --bg:          #f3f3ee;
  --white:       #ffffff;
  --radius:      8px;
  --shadow:      0 2px 12px rgba(0,0,0,0.09);
}

/* ─── PAGE ─── */
.simple-content {
  background: var(--bg);
  padding: 0 4px;
  margin: 0 !important;
  overflow: visible !important;
}

/* Снять overflow: hidden с родительских контейнеров */
#simplecheckout_form_0,
.simplecheckout-form,
.wrapper,
.wrapper.no-margin {
  overflow: visible !important;
}

/* ─── МОБИЛЬНАЯ ШИРИНА: убрать отступы Bootstrap ─── */
@media only screen and (max-width: 768px) {
  /* CSS грузится только на странице оформления — безопасно переопределять .container */
  .simple-content {
    padding: 0 !important;
    /* вытягиваем за padding col-xs-12 (9px) и container (9px) */
    margin-left: -9px !important;
    margin-right: -9px !important;
    width: calc(100% + 18px) !important;
    box-sizing: border-box !important;
  }
  /* Убрать внутренний padding wrapper */
  .wrapper.no-margin {
    padding: 0 !important;
    margin: 0 !important;
  }
  #content {
    padding: 0 !important;
  }
  /* Карточки на мобильном — чуть меньше радиус */
  .simplecheckout-block {
    border-radius: 0 !important;
    border-left: none !important;
    border-right: none !important;
  }
}

/* ─── GRID: 2 колонки ─── */
.simplecheckout {
  display: flex !important;
  flex-wrap: nowrap !important;
  align-items: stretch !important; /* нужно для position:sticky в правой колонке */
  gap: 16px !important;
  width: 100% !important;
  float: none !important;
  overflow: visible !important;
}

.simplecheckout:after { display: none !important; }

/* ЛЕВАЯ КОЛОНКА */
.sc-left-col {
  flex: 1 1 0 !important;
  min-width: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 20px !important;
}

/* ПРАВАЯ КОЛОНКА */
.sc-right-col {
  flex: 0 0 340px !important;
  width: 340px !important;
}

/* STICKY-обёртка сайдбара */
.sc-sidebar-sticky {
  position: -webkit-sticky !important;
  position: sticky !important;
  top: 16px !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 0 !important;
}

/* ─── КАРТОЧКИ ─── */
.simplecheckout-block {
  background: var(--white) !important;
  border: 1px solid var(--border) !important;
  border-radius: var(--radius) !important;
  padding: 20px 22px !important;
  margin-bottom: 0 !important;
  box-shadow: var(--shadow) !important;
  box-sizing: border-box;
}

/* Summary: нижние скругления убираем, чтобы слиться с actions */
#simplecheckout_summary {
  border-bottom-left-radius: 0 !important;
  border-bottom-right-radius: 0 !important;
  border-bottom: none !important;
}

/* Блок действий (кнопка + чекбоксы) — продолжение карточки summary */
.sc-sidebar-actions {
  background: var(--white) !important;
  border: 1px solid var(--border) !important;
  border-top: none !important;
  border-bottom-left-radius: var(--radius) !important;
  border-bottom-right-radius: var(--radius) !important;
  padding: 16px 18px 18px !important;
  box-shadow: var(--shadow) !important;
}

/* Соглашения в сайдбаре */
.sc-agreements {
  margin-bottom: 12px !important;
}

.sc-agreements label {
  display: flex !important;
  align-items: flex-start !important;
  gap: 8px !important;
  font-size: 11.5px !important;
  color: #555 !important;
  margin-bottom: 8px !important;
  cursor: pointer !important;
  line-height: 1.5 !important;
}

.sc-agreements input[type=checkbox] {
  accent-color: var(--green) !important;
  flex-shrink: 0 !important;
  margin-top: 2px !important;
  width: 14px !important;
  height: 14px !important;
}

.sc-agreements a { color: var(--green-text) !important; }

/* Предупреждение соглашения в сайдбаре */
.sc-agreement-warning {
  border-radius: 0 !important;
  border-top: none !important;
  border-left: 1px solid var(--border) !important;
  border-right: 1px solid var(--border) !important;
  margin: 0 !important;
}

/* ─── ЗАГОЛОВКИ СЕКЦИЙ ─── */
.checkout-heading,
.simple-content .checkout-heading {
  background: transparent !important;
  background-color: transparent !important;
  border: none !important;
  border-bottom: 1px solid #ececec !important;
  border-radius: 0 !important;
  color: var(--text) !important;
  font-size: 15px !important;
  font-weight: 700 !important;
  padding: 0 0 12px !important;
  margin: 0 0 14px !important;
}

.checkout-heading span {
  float: none !important;
  display: inline !important;
  color: var(--text) !important;
  font-size: 15px !important;
  font-weight: 700 !important;
  background: none !important;
}

.checkout-heading-button {
  float: right !important;
  display: inline-block !important;
}

.checkout-heading-button a {
  font-size: 13px !important;
  font-weight: 400 !important;
  color: var(--green-text) !important;
  text-decoration: none !important;
}

/* ─── БЛОК "КОНТАКТНА ІНФОРМАЦІЯ" ─── */
/* Два столбца внутри карточки */
.sc-customer-wrap {
  display: flex !important;
  gap: 24px !important;
  align-items: flex-start !important;
  text-align: left !important;
}

.sc-customer-fields {
  flex: 1 1 0 !important;
  min-width: 0 !important;
}

.sc-customer-login {
  flex: 0 0 200px !important;
  width: 200px !important;
  border-left: 1px solid #ececec !important;
  padding-left: 20px !important;
}

.sc-login-desc {
  font-size: 13px !important;
  color: #666 !important;
  line-height: 1.55 !important;
  margin: 0 0 14px !important;
}

.sc-login-btn,
a.sc-login-btn {
  display: block !important;
  background: var(--green) !important;
  background-image: none !important;
  color: #fff !important;
  border: none !important;
  border-radius: 4px !important;
  padding: 11px 16px !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  text-align: center !important;
  cursor: pointer !important;
  text-decoration: none !important;
  transition: background 0.18s !important;
  margin-bottom: 10px !important;
  box-shadow: 0 2px 6px rgba(94,139,26,0.22) !important;
}

.sc-login-btn span { color: #fff !important; }

.sc-login-btn:hover { background: var(--green-dark) !important; }

.sc-register-hint {
  font-size: 12px !important;
  color: #777 !important;
  margin: 0 !important;
}

.sc-register-hint a {
  color: var(--green-text) !important;
  text-decoration: none !important;
}

/* ─── СКРЫТЬ ЛЕЙБЛЫ ФОРМЫ ─── */
.simplecheckout-table-form {
  width: 100% !important;
  float: none !important;
}

.simplecheckout-table-form-left {
  display: none !important;
}

.simplecheckout-table-form-right {
  width: 100% !important;
  display: block !important;
  padding: 0 0 10px !important;
}

.simplecheckout-table-form tr:last-child .simplecheckout-table-form-right {
  padding-bottom: 0 !important;
}

/* ─── ПОЛЯ ВВОДА ─── */
.simplecheckout input[type=text],
.simplecheckout input[type=tel],
.simplecheckout input[type=phone],
.simplecheckout input[type=email],
.simplecheckout input[type=password],
.simplecheckout input[type=date],
.simplecheckout select,
input[type=email], input[type=tel], input[type=phone], input[type=date] {
  border: 1px solid #d5d5d5 !important;
  border-radius: 4px !important;
  padding: 10px 12px !important;
  font-size: 14px !important;
  color: var(--text) !important;
  background: #fff !important;
  width: 100% !important;
  box-sizing: border-box !important;
  outline: none !important;
  box-shadow: none !important;
  transition: border-color 0.18s, box-shadow 0.18s !important;
  height: auto !important;
  line-height: 1.4 !important;
}

.simplecheckout input:focus,
.simplecheckout select:focus {
  border-color: var(--green) !important;
  box-shadow: 0 0 0 3px rgba(94,139,26,0.12) !important;
}

/* ─── RADIO BUTTONS ─── */
.simplecheckout input[type=radio],
.simplecheckout-methods-table input[type=radio] {
  accent-color: var(--green) !important;
  width: 16px !important;
  height: 16px !important;
  cursor: pointer !important;
  vertical-align: middle !important;
  flex-shrink: 0 !important;
}

/* ─── ТАБЛИЦА ДОСТАВКИ ─── */
/* Заголовок таблицы из шаблона */
.sc-shipping-header {
  display: flex !important;
  justify-content: space-between !important;
  padding: 0 4px 8px !important;
  font-size: 11px !important;
  font-weight: 600 !important;
  color: #aaa !important;
  letter-spacing: 0.6px !important;
  text-transform: uppercase !important;
  border-bottom: 1px solid #efefef !important;
  margin-bottom: 4px !important;
}

.simplecheckout-methods-table {
  width: 100% !important;
  border-collapse: collapse !important;
}

.simplecheckout-methods-table tr {
  border-bottom: 1px solid #f5f5f5 !important;
}

.simplecheckout-methods-table tr:last-child { border-bottom: none !important; }

.simplecheckout-methods-table td {
  padding: 10px 6px !important;
  vertical-align: middle !important;
}

.simplecheckout-methods-table td.code {
  width: 28px !important;
  padding-right: 0 !important;
}

.simplecheckout-methods-table td.title label {
  font-size: 14px !important;
  color: var(--text) !important;
  cursor: pointer !important;
  display: flex !important;
  align-items: center !important;
  gap: 6px !important;
  margin: 0 !important;
}

.simplecheckout-methods-table td.title img {
  display: inline-block !important;
  margin: 0 !important;
  vertical-align: middle !important;
}

.simplecheckout-methods-table td.quote label,
.simplecheckout-methods-table td.quote {
  font-size: 13px !important;
  font-weight: 600 !important;
  color: var(--green-text) !important;
  text-align: right !important;
  white-space: nowrap !important;
}

/* ─── СПОСОБЫ ОПЛАТЫ — вертикальный список ─── */
#simplecheckout_payment .simplecheckout-methods-table tr {
  display: table-row !important;
  width: auto !important;
  border: none !important;
  margin: 0 !important;
}

#simplecheckout_payment .simplecheckout-methods-table td {
  display: table-cell !important;
  padding: 10px 6px !important;
}

#simplecheckout_payment .simplecheckout-methods-table td.title label {
  font-size: 14px !important;
  white-space: normal !important;
  line-height: 1.4 !important;
}

/* ─── КОЛОНКА МОДЕЛЬ — скрыть ─── */
.simplecheckout-cart th.model,
.simplecheckout-cart td.model {
  display: none !important;
}

/* ─── ТАБЛИЦА КОРЗИНЫ ─── */
.simplecheckout-cart {
  border: none !important;
  width: 100% !important;
  table-layout: fixed !important;
}

/* Клипируем overflow внутри блока корзины */
#simplecheckout_cart {
  overflow: hidden;
}

.simplecheckout-cart th {
  background: transparent !important;
  font-size: 11px !important;
  color: #c0c0c0 !important;
  font-weight: 500 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.4px !important;
  padding: 4px 8px 8px !important;
  border-bottom: 1px solid #f0f0f0 !important;
}

.simplecheckout-cart td {
  border-bottom: 1px solid #f5f5f5 !important;
  padding: 10px 8px !important;
  font-size: 13px !important;
  vertical-align: middle !important;
}

.simplecheckout-cart td.name a {
  color: var(--green-text) !important;
  font-size: 13px !important;
  text-decoration: none !important;
}

.simplecheckout-cart td.price,
.simplecheckout-cart td.total {
  font-weight: 600 !important;
}

.simplecheckout-cart-total {
  border: none !important;
  border-top: 1px solid var(--border) !important;
  padding: 10px 4px !important;
  text-align: right !important;
}

.table-responsive {
  border: none !important;
  margin-bottom: 0 !important;
}

/* ─── SUMMARY CARD ─── */
.sc-summary-card {
  padding-bottom: 16px !important;
}

/* Заголовок карточки */
.sc-summary-header {
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  margin-bottom: 14px !important;
  padding-bottom: 12px !important;
  border-bottom: 1px solid #ececec !important;
}

.sc-summary-title {
  font-size: 16px !important;
  font-weight: 700 !important;
  color: var(--text) !important;
}

.sc-summary-edit {
  color: #aaa !important;
  cursor: pointer !important;
  display: flex !important;
  align-items: center !important;
}

.sc-summary-edit:hover { color: var(--green) !important; }

/* Строки итогов */
.sc-totals {
  display: flex !important;
  flex-direction: column !important;
  gap: 6px !important;
  margin-bottom: 4px !important;
}

.sc-total-row {
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
}

/* Обычные строки (Товари, Доставка) */
.sc-total-label-sm {
  font-size: 13px !important;
  color: #888 !important;
}

.sc-total-value-sm {
  font-size: 13px !important;
  color: var(--text) !important;
  text-align: right !important;
}

/* Строка Підсумок — крупно */
.sc-total-final {
  padding-top: 8px !important;
  margin-top: 4px !important;
  border-top: 1px solid #ececec !important;
  align-items: baseline !important;
}

.sc-total-label {
  font-size: 16px !important;
  font-weight: 600 !important;
  color: var(--text) !important;
}

.sc-total-amount {
  font-size: 22px !important;
  font-weight: 700 !important;
  color: var(--text) !important;
}

/* Мини-товары в сайдбаре */

/* Комментарий в сайдбаре — отдельная карточка под блоком действий */
.sc-sidebar-comment {
  margin-top: 12px !important;
  padding-top: 0 !important;
}

.sc-sidebar-comment .simplecheckout-block {
  border: 1px solid var(--border) !important;
  border-radius: var(--radius) !important;
  box-shadow: var(--shadow) !important;
  padding: 16px 18px !important;
  margin: 0 !important;
}

.sc-sidebar-comment .checkout-heading {
  display: none !important;
}

.sc-sidebar-comment textarea {
  border: 1px solid #d5d5d5 !important;
  border-radius: 4px !important;
  padding: 10px 12px !important;
  font-size: 13px !important;
  min-height: 70px !important;
  resize: vertical !important;
  width: 100% !important;
  box-sizing: border-box !important;
  color: var(--text) !important;
  margin-top: 12px !important;
}

.sc-sidebar-comment .simplecheckout-block-content {
  padding: 0 !important;
  border: none !important;
}

/* ─── КНОПКА ОФОРМИТЬ ЗАКАЗ ─── */
/* display без !important — jQuery может скрыть через .hide() */
#simplecheckout_button_confirm,
a#simplecheckout_button_confirm {
  display: block;
  background: var(--green) !important;
  background-image: none !important;
  border: none !important;
  color: #fff !important;
  border-radius: 4px !important;
  padding: 13px 20px !important;
  font-size: 15px !important;
  font-weight: 600 !important;
  width: 100% !important;
  text-align: center !important;
  cursor: pointer !important;
  text-decoration: none !important;
  transition: background 0.18s !important;
  box-shadow: 0 2px 8px rgba(94,139,26,0.25) !important;
  box-sizing: border-box !important;
  margin: 0 !important;
}

#simplecheckout_button_confirm:hover {
  background: var(--green-dark) !important;
}

#simplecheckout_button_confirm span { color: #fff !important; }

/* Клонированная кнопка платёжной формы (JS добавляет data-payment-button) */
a[data-payment-button="true"],
input[data-payment-button="true"],
button[data-payment-button="true"] {
  display: block !important;
  background: var(--green) !important;
  background-image: none !important;
  border: none !important;
  color: #fff !important;
  border-radius: 4px !important;
  padding: 13px 20px !important;
  font-size: 15px !important;
  font-weight: 600 !important;
  width: 100% !important;
  text-align: center !important;
  cursor: pointer !important;
  text-decoration: none !important;
  transition: background 0.18s !important;
  box-shadow: 0 2px 8px rgba(94,139,26,0.25) !important;
  box-sizing: border-box !important;
  margin: 0 0 8px !important;
}

a[data-payment-button="true"]:hover {
  background: var(--green-dark) !important;
}

/* Кнопки назад/вперёд */
#simplecheckout_button_next,
#simplecheckout_button_prev,
#simplecheckout_button_back {
  background: var(--green) !important;
  background-image: none !important;
  border: none !important;
  color: #fff !important;
  border-radius: 4px !important;
  padding: 10px 18px !important;
  font-size: 13px !important;
  margin: 0 !important;
}

#simplecheckout_button_next span,
#simplecheckout_button_prev span,
#simplecheckout_button_back span { color: #fff !important; }

/* ─── СТАРЫЙ БЛОК КНОПОК (скрыт) ─── */
#buttons[style*="display:none"] { display: none !important; }

.simplecheckout-button-block {
  background: none !important;
  border: none !important;
  padding: 0 !important;
  margin: 0 !important;
}

.simplecheckout-button-right {
  float: none !important;
  text-align: left !important;
  width: 100% !important;
}

/* ─── ЧЕКБОКСЫ СОГЛАШЕНИЯ ─── */
#agreement_checkbox {
  display: block !important;
  margin-top: 10px !important;
}

#agreement_checkbox label {
  display: flex !important;
  align-items: flex-start !important;
  gap: 8px !important;
  font-size: 12px !important;
  color: #555 !important;
  margin-bottom: 6px !important;
  cursor: pointer !important;
  line-height: 1.5 !important;
}

#agreement_checkbox input[type=checkbox] {
  accent-color: var(--green) !important;
  flex-shrink: 0 !important;
  margin-top: 2px !important;
  width: 15px !important;
  height: 15px !important;
}

#agreement_checkbox a { color: var(--green-text) !important; }

/* ─── КОММЕНТАРИЙ ─── */
#simplecheckout_comment .simplecheckout-block-content {
  padding: 0 !important;
  border: none !important;
}

#simplecheckout_comment textarea,
.simplecheckout textarea {
  border: 1px solid #d5d5d5 !important;
  border-radius: 4px !important;
  padding: 10px 12px !important;
  font-size: 14px !important;
  min-height: 75px !important;
  resize: vertical !important;
  width: 100% !important;
  box-sizing: border-box !important;
  color: var(--text) !important;
  transition: border-color 0.18s !important;
}

#simplecheckout_comment textarea:focus {
  border-color: var(--green) !important;
  box-shadow: 0 0 0 3px rgba(94,139,26,0.12) !important;
  outline: none !important;
}

/* ─── ОБЯЗАТЕЛЬНОЕ ПОЛЕ ─── */
.simplecheckout-required { color: #d44 !important; font-weight: 700 !important; }

/* ─── ПРЕДУПРЕЖДЕНИЯ ─── */
.simplecheckout-warning-block {
  border-color: #f5b8b8 !important;
  background: #fff6f6 !important;
  border-radius: 4px !important;
  padding: 10px 14px !important;
  font-size: 13px !important;
}

/* ─── ССЫЛКИ ─── */
.simplecheckout a,
.simplecheckout-block-content a { color: var(--green-text) !important; }

/* ─── СКРЫТЬ ПОЛЯ РЕГИСТРАЦИИ (Да/Нет + пароль) ─── */
/* Покрываем все возможные паттерны ID в SimpleCheckout */
#simplecheckout_row_register, #row_register,
[id*="row_register"], [id*="register_row"],
#simplecheckout_row_password, #row_password,
[id*="row_password"], [id*="password_row"],
#simplecheckout_row_confirm_password, #row_confirm_password,
[id*="row_confirm_password"],
#simplecheckout_row_newsletter, #row_newsletter,
[id*="row_newsletter"], [id*="newsletter_row"] {
  display: none !important;
}

/* Современные браузеры: скрыть строки таблицы по содержимому */
#simplecheckout_customer .simplecheckout-table-form tr:has(input[name="register"]),
#simplecheckout_customer .simplecheckout-table-form tr:has(input[name="password"]),
#simplecheckout_customer .simplecheckout-table-form tr:has(input[name="confirm_password"]),
#simplecheckout_customer .simplecheckout-table-form tr:has(input[name="newsletter"]) {
  display: none !important;
}

/* ─── nchtext (текст об условиях) — скрыть полностью ─── */
.nchtext {
  display: none !important;
}

/* ─── ПОЛЯ РЕГИСТРАЦИИ — CSS-подстраховка ─── */
#simplecheckout_customer input[name="register"],
#simplecheckout_customer input[name="password"],
#simplecheckout_customer input[name="confirm_password"],
#simplecheckout_customer input[name="newsletter"],
#simplecheckout_customer label:has(> input[name="register"]),
#simplecheckout_customer label:has(> input[name="password"]),
#simplecheckout_customer label:has(> input[name="confirm_password"]),
#simplecheckout_customer label:has(> input[name="newsletter"]) {
  display: none !important;
}

/* Скрыть родительский <tr> если внутри есть поле register/password/newsletter */
#simplecheckout_customer tr:has(input[name="register"]),
#simplecheckout_customer tr:has(input[name="password"]),
#simplecheckout_customer tr:has(input[name="confirm_password"]),
#simplecheckout_customer tr:has(input[name="newsletter"]) {
  display: none !important;
}

/* ─── payment_form: стилизация когда появляется после reloadAll ─── */
#simplecheckout_payment_form:not(:empty) {
  background: var(--white) !important;
  border: 1px solid var(--border) !important;
  border-radius: var(--radius) !important;
  padding: 16px 18px !important;
  box-shadow: var(--shadow) !important;
  margin-bottom: 8px !important;
}

/* ─── Убрать лишний стиль из шаблона ─── */
.simple-content .checkout-heading-button a {
  color: var(--green-text) !important;
}

/* ─── АДАПТИВ ─── */
@media only screen and (max-width: 860px) {
  .simplecheckout {
    flex-direction: column !important;
  }

  .sc-right-col {
    flex: none !important;
    width: 100% !important;
  }

  .sc-sidebar-sticky {
    position: static !important;
  }

  #simplecheckout_summary {
    border-radius: var(--radius) !important;
    border-bottom: none !important;
  }

  .sc-customer-wrap {
    flex-direction: column !important;
  }

  .sc-customer-login {
    width: 100% !important;
    flex: none !important;
    border-left: none !important;
    border-top: 1px solid #ececec !important;
    padding-left: 0 !important;
    padding-top: 16px !important;
  }

  #simplecheckout_payment .simplecheckout-methods-table tr {
    width: 100% !important;
    display: flex !important;
  }

  .sc-left-col {
    gap: 12px !important;
  }
}

@media only screen and (max-width: 600px) {
  .simplecheckout-block {
    padding: 14px 12px !important;
  }

  .sc-left-col {
    gap: 10px !important;
  }
}

/* ─── PLACEHOLDER ─── */
.simplecheckout ::placeholder,
.simplecheckout ::-webkit-input-placeholder { color: #b5b5b5 !important; opacity: 1 !important; }
.simplecheckout ::-moz-placeholder          { color: #b5b5b5 !important; opacity: 1 !important; }
.simplecheckout :-ms-input-placeholder      { color: #b5b5b5 !important; }

/* ─── ОШИБКА ВАЛИДАЦИИ — поля ─── */
.simplecheckout input[data-valid="false"],
.simplecheckout select[data-valid="false"],
.simplecheckout textarea[data-valid="false"] {
  border-color: #e05555 !important;
  background: #fff8f8 !important;
  box-shadow: none !important;
}

.simplecheckout .has-error input,
.simplecheckout .has-error select,
.simplecheckout .has-error textarea {
  border-color: #e05555 !important;
}

/* ─── ТЕКСТ ОШИБОК / ПРЕДУПРЕЖДЕНИЙ В БЛОКАХ ─── */
.simplecheckout-error-text,
.simplecheckout-warning-text {
  color: #c0392b !important;
  font-size: 12px !important;
  padding: 4px 2px !important;
}

/* ─── BLOCK-CONTENT RESET ─── */
.simplecheckout-block-content {
  padding: 0 !important;
  border: none !important;
  background: transparent !important;
}

/* ─── SELECT — стрелка вниз ─── */
.simplecheckout select,
#simplecheckout_form_0 select[name="shipping_method"],
#simplecheckout_form_0 select[name="payment_method"] {
  -webkit-appearance: none !important;
  -moz-appearance: none !important;
  appearance: none !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' stroke='%23999' stroke-width='1.8' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: right 12px center !important;
  padding-right: 36px !important;
}

/* ─── МЕТОДЫ ДОСТАВКИ / ОПЛАТЫ — hover ─── */
.simplecheckout-methods-table tbody tr:hover,
.simplecheckout-methods-table tr:hover {
  background: var(--green-light) !important;
  transition: background 0.12s !important;
}

/* Описание метода */
.simplecheckout-methods-description {
  font-size: 12px !important;
  color: #888 !important;
  margin-top: 4px !important;
  padding-left: 28px !important;
  line-height: 1.4 !important;
}

/* Описание выбранного метода под его radio-строкой */
.simplecheckout-methods-table td.title label + label {
  display: block !important;
  font-size: 11px !important;
  color: #999 !important;
  margin-top: 2px !important;
}

/* ─── ВЫРАВНИВАНИЕ ЯЧЕЕК ─── */
.simplecheckout-cart td.image {
  text-align: center !important;
  vertical-align: middle !important;
}

.simplecheckout-cart td.quantity {
  text-align: center !important;
  vertical-align: middle !important;
}

td.quantity .sc-qty-wrap {
  margin: 0 auto !important;
}

.simplecheckout-cart td.price,
.simplecheckout-cart td.total {
  text-align: right !important;
  vertical-align: middle !important;
}

.simplecheckout-cart td.remove {
  text-align: center !important;
  vertical-align: middle !important;
}

/* ─── КАРТИНКА ТОВАРА В КОРЗИНЕ ─── */
.simplecheckout-cart td.image img,
.simplecheckout-cart td img {
  max-width: 56px !important;
  height: auto !important;
  border-radius: 4px !important;
  border: 1px solid #eee !important;
}

/* ─── КОЛИЧЕСТВО В КОРЗИНЕ ─── */
.simplecheckout-cart input[name*="quantity"],
.simplecheckout-cart .quantity input {
  width: 54px !important;
  text-align: center !important;
  padding: 5px 6px !important;
}

/* ─── ИТОГИ КОРЗИНЫ — общая строка ─── */
.simplecheckout-cart-total td {
  font-weight: 600 !important;
  font-size: 13px !important;
}

/* ─── HEADING В БЛОКЕ (span) — убрать float ─── */
.checkout-heading span {
  display: block !important;
  float: none !important;
}

/* ─── КНОПКА ПОДТВЕРЖДЕНИЯ ОПЛАТЫ (клон) — стиль ─── */
[data-payment-button="true"] span {
  color: #fff !important;
}

/* ─── ИТОГИ КОРЗИНЫ В ЛЕВОЙ КОЛОНКЕ — скрыть (дублируют сайдбар) ─── */
#simplecheckout_cart .simplecheckout-cart-total {
  display: none !important;
}

/* ─── КНОПКИ ± КОЛИЧЕСТВА В КОРЗИНЕ ─── */
.simplecheckout-cart .btn-quantity,
.simplecheckout-cart .quantity .btn,
.simplecheckout-cart button[data-quantity],
.simplecheckout-cart .cart-quantity-plus,
.simplecheckout-cart .cart-quantity-minus,
.simplecheckout-cart a.cart-plus,
.simplecheckout-cart a.cart-minus,
.simplecheckout-cart input[type=button][value="+"],
.simplecheckout-cart input[type=button][value="-"],
.simplecheckout-cart .quantity a,
.simplecheckout-cart td.quantity a {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 26px !important;
  height: 26px !important;
  border: 1px solid #d5d5d5 !important;
  border-radius: 4px !important;
  background: #fff !important;
  color: var(--text) !important;
  font-size: 16px !important;
  font-weight: 400 !important;
  line-height: 1 !important;
  cursor: pointer !important;
  text-decoration: none !important;
  transition: border-color 0.15s, background 0.15s !important;
  padding: 0 !important;
  box-shadow: none !important;
}

.simplecheckout-cart .btn-quantity:hover,
.simplecheckout-cart .quantity .btn:hover,
.simplecheckout-cart button[data-quantity]:hover,
.simplecheckout-cart .cart-quantity-plus:hover,
.simplecheckout-cart .cart-quantity-minus:hover,
.simplecheckout-cart a.cart-plus:hover,
.simplecheckout-cart a.cart-minus:hover,
.simplecheckout-cart input[type=button][value="+"]:hover,
.simplecheckout-cart input[type=button][value="-"]:hover,
.simplecheckout-cart .quantity a:hover,
.simplecheckout-cart td.quantity a:hover {
  border-color: var(--green) !important;
  background: var(--green-light) !important;
  color: var(--green) !important;
}

/* ─── ЗАГОЛОВОК СТРАНИЦЫ "ОФОРМЛЕНИЕ ЗАКАЗА" ─── */
.simple-content ~ h1,
.content-top h1,
#column-left + #content h1,
h1.title,
.page-title h1,
.heading_title,
#content h1:first-child,
.simple-content + div h1 {
  font-size: 20px !important;
  font-weight: 700 !important;
  margin-bottom: 16px !important;
}

/* Заголовок внутри .simple-content (если рендерится там) */
.simple-content h1 {
  font-size: 20px !important;
  font-weight: 700 !important;
  margin-bottom: 16px !important;
}

/* ─── АДАПТИВ 480px ─── */
@media only screen and (max-width: 480px) {
  .sc-right-col {
    width: 100% !important;
  }

  .simplecheckout-cart td {
    padding: 8px 4px !important;
  }
}

/* ─── СПИСОК ТОВАРОВ: имя читается, цены не переносятся ─── */
.simplecheckout-cart td.name {
  min-width: 0 !important;
}

.simplecheckout-cart td.name > a {
  font-size: 14px !important;
  font-weight: 500 !important;
  color: var(--text) !important;
  text-decoration: none !important;
  line-height: 1.45 !important;
  display: block !important;
  overflow-wrap: break-word !important;
  word-break: break-word !important;
}

.simplecheckout-cart td.name > a:hover { color: var(--green) !important; }

.simplecheckout-cart td.name .image { display: none !important; }

.simplecheckout-cart td.name .options {
  font-size: 11.5px !important;
  color: #aaa !important;
  margin-top: 3px !important;
}

.simplecheckout-cart td.price,
.simplecheckout-cart td.total {
  white-space: nowrap !important;
  font-size: 14px !important;
  font-weight: 600 !important;
  color: var(--text) !important;
}

/* Ширины колонок (для table-layout: fixed) */
.simplecheckout-cart col.image    { width: 70px; }
.simplecheckout-cart col.name     { width: auto; } /* берёт всё оставшееся */
.simplecheckout-cart col.model    { width: 0; display: none; }
.simplecheckout-cart col.quantity { width: 110px; }
.simplecheckout-cart col.price    { width: 90px; }
.simplecheckout-cart col.total    { width: 90px; }
.simplecheckout-cart col.remove   { width: 40px; }

/* ─── QUANTITY SELECTOR "− 2 +" ─── */
td.quantity .sc-qty-wrap {
  display: inline-flex !important;
  align-items: center !important;
  border: 1px solid #d5d5d5 !important;
  border-radius: 6px !important;
  overflow: hidden !important;
  background: #fff !important;
  height: 36px !important;
}

.sc-qty-btn {
  background: #f8f8f8 !important;
  background-image: none !important;
  border: none !important;
  width: 32px !important;
  height: 36px !important;
  font-size: 20px !important;
  font-weight: 300 !important;
  line-height: 1 !important;
  cursor: pointer !important;
  color: #666 !important;
  padding: 0 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  transition: background 0.15s, color 0.15s !important;
  flex-shrink: 0 !important;
  box-shadow: none !important;
  outline: none !important;
}

.sc-qty-btn:hover {
  background: var(--green-light) !important;
  color: var(--green) !important;
}

.sc-qty-wrap input[type=text],
td.quantity .sc-qty-wrap input[type=text] {
  width: 38px !important;
  border: none !important;
  border-left: 1px solid #e8e8e8 !important;
  border-right: 1px solid #e8e8e8 !important;
  border-radius: 0 !important;
  text-align: center !important;
  font-size: 14px !important;
  font-weight: 600 !important;
  padding: 0 !important;
  height: 36px !important;
  background: #fff !important;
  box-shadow: none !important;
  color: var(--text) !important;
  outline: none !important;
}

/* ─── КНОПКА УДАЛЕНИЯ ─── */
.sc-remove-btn {
  background: transparent !important;
  background-image: none !important;
  border: 1px solid transparent !important;
  cursor: pointer !important;
  width: 30px !important;
  height: 30px !important;
  border-radius: 50% !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  color: #c8c8c8 !important;
  padding: 0 !important;
  transition: background 0.15s, color 0.15s, border-color 0.15s !important;
  box-shadow: none !important;
}

.sc-remove-btn:hover {
  background: #fff0f0 !important;
  border-color: #ffcccc !important;
  color: #e05555 !important;
}

/* ─── МИНИ-ПРОДУКТЫ В САЙДБАРЕ ─── */
.sc-mini-product {
  display: flex !important;
  align-items: flex-start !important;
  gap: 10px !important;
  padding-bottom: 12px !important;
  border-bottom: 1px solid #f3f3f3 !important;
}

.sc-mini-product:last-child {
  border-bottom: none !important;
  padding-bottom: 0 !important;
}

.sc-mini-thumb {
  flex-shrink: 0 !important;
  width: 44px !important;
  height: 44px !important;
  border-radius: 6px !important;
  overflow: hidden !important;
  border: 1px solid #eee !important;
  background: #fafafa !important;
}

.sc-mini-thumb img {
  width: 44px !important;
  height: 44px !important;
  object-fit: contain !important;
}

.sc-mini-info {
  flex: 1 !important;
  min-width: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 4px !important;
}

.sc-mini-name {
  font-size: 12.5px !important;
  color: var(--text) !important;
  line-height: 1.4 !important;
  display: -webkit-box !important;
  -webkit-line-clamp: 2 !important;
  -webkit-box-orient: vertical !important;
  overflow: hidden !important;
}

.sc-mini-meta {
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
}

.sc-mini-qty {
  font-size: 12px !important;
  color: #aaa !important;
}

.sc-mini-price {
  font-size: 13px !important;
  font-weight: 600 !important;
  color: var(--text) !important;
  white-space: nowrap !important;
}

/* Список мини-товаров в сайдбаре */
#sc-mini-products-list {
  display: flex !important;
  flex-direction: column !important;
  gap: 12px !important;
  overflow: hidden !important;
}

/* Разделитель перед итогами */
#sc-mini-products-list:not(:empty) {
  padding-bottom: 14px !important;
  margin-bottom: 14px !important;
  border-bottom: 1px solid #ececec !important;
}

/* Строка "Доставка: рассчитывается" */
.sc-shipping-tbd {
  color: #aaa !important;
  font-style: italic !important;
  font-size: 12px !important;
}

/* ─── СТРОКИ-ГРУППЫ В ТАБЛИЦЕ ДОСТАВКИ (название провайдера) ─── */
#simplecheckout_shipping .simplecheckout-methods-table td[colspan="3"],
#simplecheckout_shipping .simplecheckout-methods-table td[colspan] {
  font-size: 11px !important;
  font-weight: 700 !important;
  color: #aaa !important;
  text-transform: uppercase !important;
  letter-spacing: 0.7px !important;
  padding: 14px 8px 5px !important;
  background: transparent !important;
  border-bottom: none !important;
}

/* Первая группа — меньше отступа сверху */
#simplecheckout_shipping .simplecheckout-methods-table tr:first-child td[colspan] {
  padding-top: 4px !important;
}

#simplecheckout_shipping .simplecheckout-methods-table td[colspan] b {
  font-weight: 700 !important;
  font-size: inherit !important;
  color: inherit !important;
}

/* ─── АКТИВНАЯ СТРОКА МЕТОДА (radio checked) ─── */
.simplecheckout-methods-table tr:has(input[type=radio]:checked) {
  background: var(--green-light) !important;
  border-left: 3px solid var(--green) !important;
  transition: background 0.15s !important;
}

/* ─── КНОПКА УДАЛЕНИЯ ТОВАРА ─── */
.simplecheckout-cart td.remove a,
.simplecheckout-cart td.remove button,
.simplecheckout-cart .remove a {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 26px !important;
  height: 26px !important;
  border-radius: 50% !important;
  background: #f5f5f5 !important;
  background-image: none !important;
  color: #aaa !important;
  font-size: 14px !important;
  font-weight: 400 !important;
  text-decoration: none !important;
  border: none !important;
  cursor: pointer !important;
  transition: background 0.15s, color 0.15s !important;
  line-height: 1 !important;
  padding: 0 !important;
  box-shadow: none !important;
}

.simplecheckout-cart td.remove a:hover,
.simplecheckout-cart td.remove button:hover,
.simplecheckout-cart .remove a:hover {
  background: #ffe0e0 !important;
  color: #c0392b !important;
}

/* ─── ИКОНКИ ПЕРЕД ЗАГОЛОВКАМИ СЕКЦИЙ ─── */
#simplecheckout_customer .checkout-heading span::before {
  content: '';
  display: inline-block;
  width: 16px;
  height: 16px;
  margin-right: 7px;
  vertical-align: -3px;
  background-size: contain;
  background-repeat: no-repeat;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235e8b1a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2'/%3E%3Ccircle cx='12' cy='7' r='4'/%3E%3C/svg%3E");
}

#simplecheckout_shipping .checkout-heading span::before,
#simplecheckout_shipping_address .checkout-heading span::before {
  content: '';
  display: inline-block;
  width: 16px;
  height: 16px;
  margin-right: 7px;
  vertical-align: -3px;
  background-size: contain;
  background-repeat: no-repeat;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235e8b1a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='1' y='3' width='15' height='13'/%3E%3Cpolygon points='16 8 20 8 23 11 23 16 16 16 16 8'/%3E%3Ccircle cx='5.5' cy='18.5' r='2.5'/%3E%3Ccircle cx='18.5' cy='18.5' r='2.5'/%3E%3C/svg%3E");
}

#simplecheckout_payment .checkout-heading span::before,
#simplecheckout_payment_address .checkout-heading span::before {
  content: '';
  display: inline-block;
  width: 16px;
  height: 16px;
  margin-right: 7px;
  vertical-align: -3px;
  background-size: contain;
  background-repeat: no-repeat;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235e8b1a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='1' y='4' width='22' height='16' rx='2'/%3E%3Cline x1='1' y1='10' x2='23' y2='10'/%3E%3C/svg%3E");
}

#simplecheckout_cart .checkout-heading span::before {
  content: '';
  display: inline-block;
  width: 16px;
  height: 16px;
  margin-right: 7px;
  vertical-align: -3px;
  background-size: contain;
  background-repeat: no-repeat;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235e8b1a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='9' cy='21' r='1'/%3E%3Ccircle cx='20' cy='21' r='1'/%3E%3Cpath d='M1 1h4l2.68 13.39a2 2 0 0 0 2 1.61h9.72a2 2 0 0 0 2-1.61L23 6H6'/%3E%3C/svg%3E");
}

/* ─── AJAX СПИННЕР ─── */
.sc-ajax-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(255,255,255,0.55);
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.sc-ajax-overlay.active {
  display: flex !important;
}

.sc-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--green-light);
  border-top-color: var(--green);
  border-radius: 50%;
  animation: sc-spin 0.7s linear infinite;
}

@keyframes sc-spin {
  to { transform: rotate(360deg); }
}

/* ─── БЛОК ДОВЕРИЯ ─── */
.sc-trust {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid #efefef;
}

.sc-trust-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: #888;
  line-height: 1.4;
}

.sc-trust-item svg {
  flex-shrink: 0;
  color: var(--green);
}

/* ─── МИНИ-ТОВАРЫ В САЙДБАРЕ (новые элементы) ─── */
#sc-mini-products-list:empty {
  display: none !important;
}

.sc-mini-price {
  font-size: 12px !important;
  font-weight: 600 !important;
  color: var(--text) !important;
}

/* ─── МОБИЛЬНАЯ STICKY КНОПКА ─── */
.sc-mobile-bar {
  display: none;
}

@media only screen and (max-width: 860px) {
  .sc-mobile-bar {
    display: block;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 500;
    padding: 10px 16px 16px;
    background: #fff;
    box-shadow: 0 -2px 14px rgba(0,0,0,0.13);
  }

  .sc-mobile-bar a {
    display: block !important;
    background: var(--green) !important;
    background-image: none !important;
    color: #fff !important;
    border: none !important;
    border-radius: 6px !important;
    padding: 14px 20px !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    text-align: center !important;
    cursor: pointer !important;
    text-decoration: none !important;
    box-shadow: 0 2px 8px rgba(94,139,26,0.25) !important;
    box-sizing: border-box !important;
    width: 100% !important;
    margin: 0 !important;
  }

  .sc-mobile-bar a span { color: #fff !important; }

  .simplecheckout {
    padding-bottom: 80px !important;
  }
}

/* ─── ПАНЕЛЬ ВХОДА ─── */
.sc-login-panel {
  margin-top: 14px;
  padding: 16px;
  background: #f8faf3;
  border: 1px solid #d4e9a8;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.sc-login-panel-text {
  flex: 1;
  min-width: 160px;
  font-size: 13px;
  color: #555;
  margin: 0;
  line-height: 1.5;
}

.sc-login-panel .sc-login-btn,
.sc-login-panel a.sc-login-btn {
  flex-shrink: 0;
  width: auto !important;
  display: inline-block !important;
  padding: 10px 20px !important;
  margin-bottom: 0 !important;
}

/* ═══════════════════════════════════════════════
   КОРЗИНА — мобильная адаптация (≤ 768px)
   Строка 1: [фото·span2] [название  col2-3] [×  col4]
   Строка 2: [фото·span2] [−qty+ col2] [цена col3] [итого col4]
   ═══════════════════════════════════════════════ */
@media only screen and (max-width: 768px) {

  /* Скрыть заголовок таблицы */
  .simplecheckout-cart thead {
    display: none !important;
  }

  /* Таблица и tbody → block */
  .simplecheckout-cart,
  .simplecheckout-cart tbody {
    display: block !important;
  }

  /* Каждый tr — CSS-grid 4 колонки */
  .simplecheckout-cart tbody tr {
    display: grid !important;
    grid-template-columns: 64px 1fr auto auto !important;
    grid-template-rows: auto auto !important;
    column-gap: 10px !important;
    row-gap: 4px !important;
    padding: 12px 0 !important;
    border-bottom: 1px solid #f0f0f0 !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  /* Сбросить стили ячеек */
  .simplecheckout-cart td {
    display: block !important;
    border: none !important;
    padding: 0 !important;
    width: auto !important;
    box-sizing: border-box !important;
    text-align: left !important;
  }

  /* ── Фото: охватывает оба ряда ── */
  .simplecheckout-cart td.image {
    grid-column: 1 !important;
    grid-row: 1 / 3 !important;
    align-self: center !important;
  }

  /* ── Строка 1 ── */
  .simplecheckout-cart td.name {
    grid-column: 2 / 4 !important;
    grid-row: 1 !important;
    min-width: 0 !important;
    align-self: end !important;
  }

  .simplecheckout-cart td.model {
    display: none !important;
  }

  .simplecheckout-cart td.remove {
    grid-column: 4 !important;
    grid-row: 1 !important;
    align-self: start !important;
    text-align: center !important;
  }

  /* ── Строка 2 ── */
  .simplecheckout-cart td.quantity {
    grid-column: 2 !important;
    grid-row: 2 !important;
    align-self: center !important;
    text-align: left !important;
  }

  .simplecheckout-cart td.price {
    grid-column: 3 !important;
    grid-row: 2 !important;
    align-self: center !important;
    font-size: 12px !important;
    color: #aaa !important;
    text-align: right !important;
    white-space: nowrap !important;
  }

  .simplecheckout-cart td.total {
    grid-column: 4 !important;
    grid-row: 2 !important;
    align-self: center !important;
    text-align: right !important;
    font-weight: 700 !important;
    font-size: 15px !important;
    white-space: nowrap !important;
    color: var(--text) !important;
  }

  /* Контрол количества */
  td.quantity .sc-qty-wrap {
    height: 32px !important;
    margin: 0 !important;
  }

  .simplecheckout-cart .sc-qty-btn {
    width: 26px !important;
    height: 32px !important;
    font-size: 16px !important;
  }

  td.quantity .sc-qty-wrap input[type=text] {
    width: 28px !important;
    height: 32px !important;
  }

  /* Картинка */
  .simplecheckout-cart td.image img {
    max-width: 60px !important;
    max-height: 60px !important;
    display: block !important;
  }

  /* Имя товара */
  .simplecheckout-cart td.name > a {
    font-size: 13px !important;
    line-height: 1.3 !important;
  }
}


/* ═══════════════════════════════════════════════
   NOVA POSHTA — picker widget
   ═══════════════════════════════════════════════ */

/* Root block */
.np-picker-root {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 0 !important;
  overflow: hidden;
  margin-bottom: 16px;
}
.np-picker-root--error {
  border-color: #e05555 !important;
  box-shadow: 0 0 0 3px rgba(224,85,85,0.08) !important;
}

/* Heading inside root */
.np-picker-root > .checkout-heading {
  margin: 0 !important;
  padding: 16px 22px 14px !important;
  border-bottom: 1px solid #ececec !important;
}

/* ── Chosen bar (confirmed selection state) ── */
.np-chosen-bar {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 22px;
  background: linear-gradient(135deg, #f5faed 0%, #eef7dc 100%);
  border-bottom: 1px solid #d0e6a0;
}
.np-chosen-info { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; }
.np-chosen-icon {
  width: 26px; height: 26px;
  background: var(--green); border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 13px; font-weight: 700;
  flex-shrink: 0; line-height: 1;
}
.np-chosen-text { font-size: 13.5px; color: var(--text); line-height: 1.4; font-weight: 500; }
.np-chosen-change {
  flex-shrink: 0;
  background: var(--white);
  border: 1.5px solid var(--green);
  color: var(--green-text);
  border-radius: 6px;
  padding: 6px 16px;
  font-size: 12.5px; font-weight: 600;
  cursor: pointer; white-space: nowrap;
  transition: background 0.15s, color 0.15s;
}
.np-chosen-change:hover { background: var(--green); color: #fff; }

/* ── Picker body ── */
.np-picker-body {
  display: flex !important;
  flex-direction: row !important;
  height: 460px !important;
  overflow: hidden;
}

/* ── LEFT PANEL ── */
.np-left-panel {
  width: 320px; flex-shrink: 0;
  border-right: 1px solid #e6ede0;
  display: flex; flex-direction: column; overflow: hidden;
  background: #f9fbf6;
}
.np-view { display: flex; flex-direction: column; flex: 1; min-height: 0; }

/* Search box */
.np-search-row {
  display: flex; align-items: center; gap: 8px;
  margin: 10px 12px;
  padding: 8px 12px;
  background: #f2f7ea;
  border: 1.5px solid #d8e8c0;
  border-radius: 8px;
  flex-shrink: 0;
  transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
}
.np-search-row:focus-within {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(94,139,26,0.1);
  background: var(--white);
}
.np-search-ico { color: #b0ba9a; display: flex; align-items: center; flex-shrink: 0; }
.np-search-inp {
  flex: 1; border: none; outline: none;
  background: transparent; font-size: 13.5px; color: var(--text);
}
.np-search-inp::placeholder { color: #b8c0a8; }

/* Back row */
.np-back-row {
  display: flex; align-items: center; gap: 8px;
  padding: 9px 14px;
  border-bottom: 1px solid #e6ede0;
  background: var(--white);
  flex-shrink: 0;
}
.np-back-btn {
  display: flex; align-items: center; gap: 5px;
  background: none; border: none;
  color: var(--green-text); font-size: 12.5px; font-weight: 600;
  cursor: pointer; padding: 3px 7px; border-radius: 5px;
  transition: background 0.12s; white-space: nowrap;
}
.np-back-btn:hover { background: var(--green-light); }
.np-city-label {
  font-size: 13px; color: var(--text); font-weight: 700;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex: 1;
}

/* List */
.np-list { overflow-y: auto; flex: 1; padding: 4px 0; }
.np-list::-webkit-scrollbar { width: 4px; }
.np-list::-webkit-scrollbar-track { background: transparent; }
.np-list::-webkit-scrollbar-thumb { background: #ccdba8; border-radius: 2px; }

/* City items */
.np-city-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 16px;
  font-size: 13.5px; color: var(--text); line-height: 1.4;
  cursor: pointer; border-left: 3px solid transparent;
  transition: background 0.1s, border-color 0.1s, color 0.1s;
}
.np-city-item::before {
  content: ''; width: 6px; height: 6px; border-radius: 50%;
  background: #c8d4b0; flex-shrink: 0;
  transition: background 0.1s;
}
.np-city-item:hover { background: #f1f8e6; border-left-color: var(--green); color: var(--green-text); }
.np-city-item:hover::before { background: var(--green); }

/* Branch items */
.np-branch-item {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 11px 14px; border-bottom: 1px solid #eff2ea;
  transition: background 0.1s;
}
.np-branch-item:last-child { border-bottom: none; }
.np-branch-item:hover { background: #f4f9ed; }
.np-branch-info { flex: 1; min-width: 0; }
.np-branch-name { font-size: 13px; color: var(--text); line-height: 1.45; font-weight: 500; }
.np-branch-schedule { margin-top: 3px; }
.np-sched { font-size: 11px; color: #a8b098; line-height: 1.4; }

/* "Обрати" button */
.np-choose-btn {
  flex-shrink: 0; align-self: center;
  background: var(--green-light);
  border: 1.5px solid #c4dea0;
  color: var(--green-text); font-size: 12px; font-weight: 700;
  cursor: pointer; padding: 5px 12px; border-radius: 6px;
  white-space: nowrap;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.np-choose-btn:hover { background: var(--green); color: #fff; border-color: var(--green); }

/* Status */
.np-status { padding: 28px 20px; text-align: center; color: #a8b498; font-size: 13px; line-height: 1.5; }

/* ── RIGHT PANEL (map) ── */
.np-right-panel { flex: 1 1 0 !important; min-width: 0; position: relative; height: 460px !important; }
#np-map { position: absolute !important; top: 0; right: 0; bottom: 0; left: 0; background: #e8efdc; }

/* ── Error bar ── */
.np-error-bar {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 22px; font-size: 12.5px; color: #c03030;
  background: #fff5f5; border-top: 1px solid #f5c0c0;
}
.np-error-bar::before {
  content: '!'; display: inline-flex; align-items: center; justify-content: center;
  width: 16px; height: 16px; border-radius: 50%;
  background: #e05555; color: #fff; font-size: 10px; font-weight: 700; flex-shrink: 0;
}

/* ── Map markers ── */
.np-marker-wrap {
  background: transparent !important;
  border: none !important;
  overflow: visible !important;
}
.np-map-pin {
  width: 20px; height: 20px; border-radius: 50%;
  background: var(--green);
  border: 2.5px solid #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,0.26);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  box-sizing: border-box;
  transition: transform 0.18s cubic-bezier(.34,1.56,.64,1), box-shadow 0.18s, background 0.15s;
}
.np-map-pin__dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: rgba(255,255,255,0.85);
  flex-shrink: 0;
}
.np-map-pin--active {
  background: #e05555 !important;
  transform: scale(1.5) !important;
  box-shadow: 0 4px 16px rgba(224,85,85,0.45), 0 0 0 6px rgba(224,85,85,0.16) !important;
}

/* ── Branch schedule in list ── */
.np-branch-today { margin-top: 5px; }
.np-today-badge {
  display: inline-block;
  font-size: 11px; font-weight: 600;
  padding: 2px 8px; border-radius: 10px; line-height: 1.5;
}
.np-today-open  { background: #e6f3d0; color: #3d7010; }
.np-today-closed{ background: #f0f0f0; color: #aaa; }
.np-branch-week {
  margin-top: 3px;
  font-size: 10.5px; color: #b4bca8; line-height: 1.4;
}

/* ── Leaflet tooltip ── */
#np-map .np-tt.leaflet-tooltip {
  background: var(--white) !important;
  border: 1px solid #dde8c8 !important;
  border-radius: 7px !important;
  box-shadow: 0 4px 16px rgba(0,0,0,0.11) !important;
  padding: 7px 12px !important;
  font-size: 12px !important;
  color: var(--text) !important;
  max-width: 230px !important;
  white-space: normal !important;
  line-height: 1.45 !important;
  font-family: inherit !important;
}
#np-map .np-tt.leaflet-tooltip-top::before { border-top-color: #dde8c8 !important; }
.np-tt-name { font-size: 12px; font-weight: 600; color: var(--text); margin-bottom: 7px; line-height: 1.4; }
.np-tt-sched { display: flex; flex-direction: column; gap: 3px; }
.np-tt-row { display: flex; gap: 10px; align-items: baseline; }
.np-tt-d { font-size: 11px; color: #999; min-width: 36px; flex-shrink: 0; }
.np-tt-h { font-size: 11.5px; color: var(--text); font-weight: 500; }
.np-tt-cr .np-tt-h { color: #ccc; font-weight: 400; }

/* ── Leaflet zoom controls ── */
#np-map .leaflet-control-zoom {
  border: none !important;
  box-shadow: 0 2px 10px rgba(0,0,0,0.12) !important;
  border-radius: 8px !important;
  overflow: hidden;
  margin: 0 14px 14px 0 !important;
}
#np-map .leaflet-control-zoom a {
  background: var(--white) !important;
  color: #555 !important;
  border: none !important;
  border-bottom: 1px solid #f0f2ec !important;
  font-size: 17px !important;
  font-weight: 300 !important;
  width: 30px !important;
  height: 30px !important;
  line-height: 30px !important;
  transition: background 0.12s, color 0.12s !important;
}
#np-map .leaflet-control-zoom a:last-child { border-bottom: none !important; }
#np-map .leaflet-control-zoom a:hover { background: var(--green-light) !important; color: var(--green) !important; }

/* ── Attribution ── */
#np-map .leaflet-control-attribution {
  background: rgba(255,255,255,0.72) !important;
  backdrop-filter: blur(4px) !important;
  font-size: 9.5px !important;
  padding: 2px 7px !important;
  color: #999 !important;
  border-radius: 4px 0 0 0 !important;
}
#np-map .leaflet-control-attribution a { color: #aaa !important; }

/* ── TABLET (641–900px) ── */
@media only screen and (min-width: 641px) and (max-width: 900px) {
  .np-left-panel { width: 260px; }
}

/* ── MOBILE (≤ 640px) ── */
@media only screen and (max-width: 640px) {
  .np-picker-body {
    flex-direction: column !important;
    height: auto !important;
    overflow: visible !important;
  }
  .np-left-panel {
    width: 100% !important;
    border-right: none;
    border-bottom: 1px solid #e0e8d4;
    max-height: 340px;
  }
  .np-right-panel {
    height: 260px !important;
    flex: none !important;
    width: 100%;
  }
  #np-map { min-height: 260px; }

  /* Larger touch targets */
  .np-city-item { padding: 13px 16px; min-height: 44px; box-sizing: border-box; }
  .np-branch-item { padding: 13px 14px; }
  .np-choose-btn { padding: 8px 14px; font-size: 13px; min-height: 36px; }
  .np-back-btn { padding: 5px 10px; min-height: 36px; }

  /* Prevent iOS zoom on input focus — must be ≥ 16px */
  .np-search-inp { font-size: 16px !important; }

  /* Chosen bar */
  .np-chosen-bar { padding: 12px 16px; gap: 10px; }
  .np-chosen-text { font-size: 13px; }
  .np-chosen-change { padding: 6px 12px; font-size: 12px; }

  /* Heading */
  .np-picker-root > .checkout-heading { padding: 14px 16px 12px !important; }
}

/* ── SMALL MOBILE (≤ 420px) ── */
@media only screen and (max-width: 420px) {
  /* Branch items stack vertically */
  .np-branch-item { flex-direction: column; align-items: stretch; gap: 8px; }
  .np-choose-btn { align-self: stretch; text-align: center; }

  /* Chosen bar wraps */
  .np-chosen-bar { flex-wrap: wrap; }
  .np-chosen-change { flex: 1 1 100%; text-align: center; }

  /* Smaller map on tiny screens */
  .np-right-panel { height: 220px !important; }
  #np-map { min-height: 220px; }
}

/* ── NP picker: performance & polish (2026-07-22) ── */
.np-skel { padding: 12px 16px; border-bottom: 1px solid #eff2ea; }
.np-skel-line {
  height: 10px; border-radius: 5px;
  background: linear-gradient(90deg, #edf2e2 25%, #f8fbf2 50%, #edf2e2 75%);
  background-size: 200% 100%;
  animation: npShimmer 1.1s linear infinite;
}
.np-skel-line + .np-skel-line { margin-top: 7px; }
.np-skel-w1 { width: 74%; }
.np-skel-w2 { width: 46%; }
@keyframes npShimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }
@media (prefers-reduced-motion: reduce) { .np-skel-line { animation: none; } }

.np-list-count {
  position: sticky; top: 0; z-index: 2;
  padding: 7px 16px;
  font-size: 11px; color: #97a385; line-height: 1.4;
  background: #fbfdf7;
  border-bottom: 1px solid #eff2ea;
}

.np-branch-item--active {
  background: #f1f8e6;
  border-left: 3px solid var(--green);
  padding-left: 11px;
}
.np-branch-item--active .np-branch-name { color: var(--green-dark); font-weight: 700; }
.np-choose-btn--active {
  background: var(--green) !important;
  color: #fff !important;
  border-color: var(--green) !important;
}

/* приховування body пікера — класом, бо display:flex стоїть з !important */
.np-picker-body.np-hidden { display: none !important; }

/* ── NP map redesign: типы точек, кластеры, попап, легенда, мобильные табы (2026-07-23) ── */
.np-map-pin--point { background: #0e8f83; }
.np-map-pin--post  { background: #8a63d2; }
.np-map-pin--active { animation: npPinPop 0.35s cubic-bezier(.34,1.56,.64,1); }
@keyframes npPinPop { from { transform: scale(0.7); } to { transform: scale(1.5); } }
@media (prefers-reduced-motion: reduce) { .np-map-pin--active { animation: none; } }

.np-cluster-wrap { background: transparent !important; border: none !important; }
.np-cluster {
  display: flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; margin-left: -17px; margin-top: -17px;
  background: radial-gradient(circle at 30% 30%, #79a83a, #567f18);
  color: #fff; font-size: 12px; font-weight: 700;
  border: 2.5px solid rgba(255,255,255,0.92);
  border-radius: 50%;
  box-shadow: 0 3px 10px rgba(70,110,20,0.35);
  transition: transform 0.12s;
}
.np-cluster:hover { transform: scale(1.08); }
.np-cluster--md { width: 40px; height: 40px; margin-left: -20px; margin-top: -20px; font-size: 13px; }
.np-cluster--lg { width: 48px; height: 48px; margin-left: -24px; margin-top: -24px; font-size: 14px;
  background: radial-gradient(circle at 30% 30%, #5d8f24, #3f5e10); }

#np-map .np-popup .leaflet-popup-content-wrapper { border-radius: 10px; box-shadow: 0 8px 28px rgba(0,0,0,0.18); }
#np-map .np-popup .leaflet-popup-content { margin: 12px 14px; font-family: inherit; line-height: 1.4; }
.np-pop { max-width: 230px; }
.np-pop-name { font-size: 12.5px; font-weight: 600; color: var(--text); }
.np-pop-today { margin-top: 6px; display: inline-block; font-size: 11px; font-weight: 600;
  padding: 2px 8px; border-radius: 10px; background: #e6f3d0; color: #3d7010; }
.np-pop-today.np-pop-closed { background: #f0f0f0; color: #999; }
.np-pop-btn { margin-top: 10px; width: 100%; background: var(--green); color: #fff; border: none;
  border-radius: 7px; padding: 9px 10px; font-size: 12.5px; font-weight: 700; cursor: pointer;
  transition: background 0.15s; }
.np-pop-btn:hover { background: var(--green-dark); }

.np-legend { display: flex; gap: 10px; background: rgba(255,255,255,0.88); backdrop-filter: blur(4px);
  border-radius: 8px; padding: 6px 10px; box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  font-size: 10.5px; color: #5f6b52; }
.np-legend span { display: flex; align-items: center; gap: 4px; }
.np-legend i { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }

.np-route-link { flex-shrink: 0; font-size: 12px; font-weight: 600; color: var(--green-text) !important;
  text-decoration: none; border-bottom: 1px dashed #a9c37d; margin-left: 10px; white-space: nowrap; }
.np-route-link:hover { color: var(--green-dark) !important; border-bottom-style: solid; }

.np-mtabs { display: none; }
@media only screen and (max-width: 640px) {
  .np-mtabs { display: flex; gap: 8px; padding: 10px 12px; background: #f9fbf6; border-bottom: 1px solid #e6ede0; }
  .np-mtab { flex: 1; padding: 10px 0; border: 1.5px solid #d8e8c0; background: var(--white);
    border-radius: 8px; font-size: 13.5px; font-weight: 700; color: #68745a; cursor: pointer; }
  .np-mtab--on { background: var(--green); border-color: var(--green); color: #fff; }
  .np-left-panel { max-height: none; height: 420px; }
  .np-right-panel { display: none; height: 72vw !important; max-height: 430px; }
  #np-map { min-height: 0; }
  .np-picker-root.np-mode-map .np-left-panel { display: none; }
  .np-picker-root.np-mode-map .np-right-panel { display: block; }
  .np-legend { display: none; }
  .np-route-link { margin-left: 0; }
}

/* ── NP: крупные узнаваемые пины-«капли» с номером + строка-легенда над картой (2026-07-23b) ── */
.np-pin2 {
  width: 34px; height: 34px; margin: 0 auto;
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
  background: var(--green);
  border: 2.5px solid #fff;
  box-shadow: 0 3px 10px rgba(0,0,0,0.3);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; box-sizing: border-box;
}
.np-pin2 span {
  transform: rotate(45deg);
  color: #fff; font-size: 12px; font-weight: 800;
  font-family: Arial, sans-serif; letter-spacing: -0.3px; line-height: 1;
}
.np-pin2--point { background: #0e8f83; }
.np-pin2--post  { background: #8a63d2; }
.np-pin2--post span { font-size: 14px; }
.np-pin2--active {
  background: #e05555 !important;
  transform: rotate(-45deg) scale(1.22);
  box-shadow: 0 5px 16px rgba(224,85,85,0.5);
  animation: npPin2Pop 0.3s cubic-bezier(.34,1.56,.64,1);
}
@keyframes npPin2Pop { from { transform: rotate(-45deg) scale(0.7); } to { transform: rotate(-45deg) scale(1.22); } }
@media (prefers-reduced-motion: reduce) { .np-pin2--active { animation: none; } }

.np-right-panel { display: flex; flex-direction: column; }
.np-map-hint {
  display: flex; gap: 14px; align-items: center;
  padding: 8px 14px;
  background: var(--white);
  border-bottom: 1px solid #e6ede0;
  font-size: 11.5px; color: #5f6b52; font-weight: 600;
  flex-shrink: 0;
}
.np-map-hint span { display: flex; align-items: center; gap: 5px; }
.np-map-hint i { width: 10px; height: 10px; border-radius: 50% 50% 50% 0; transform: rotate(-45deg); display: inline-block; border: 1.5px solid #fff; box-shadow: 0 1px 3px rgba(0,0,0,0.2); }
.np-map-wrap { position: relative; flex: 1; min-height: 0; }
@media only screen and (max-width: 640px) {
  .np-map-hint { gap: 10px; padding: 8px 10px; font-size: 10.5px; }
}

/* ── Двухуровневый выбор доставки: перевозчик → способ (2026-07-23) ── */
.sc-ship2 { display: flex; flex-direction: column; gap: 10px; }
.sc-carrier {
  border: 1.5px solid #dfe8d2;
  border-radius: 10px;
  background: var(--white);
  overflow: hidden;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.sc-carrier--on { border-color: var(--green); box-shadow: 0 0 0 3px rgba(94,139,26,0.08); }
.sc-carrier-head {
  display: flex; align-items: center; gap: 10px;
  padding: 13px 16px;
  cursor: pointer; margin: 0;
  font-size: 14.5px; font-weight: 700; color: var(--text);
}
.sc-carrier--on .sc-carrier-head { background: #f7fbf0; }
.sc-carrier-input, .sc-sub-opt input[type="radio"], .sc-carrier-real { position: absolute; opacity: 0; pointer-events: none; }
.sc-radio-dot {
  width: 18px; height: 18px; border-radius: 50%;
  border: 2px solid #c3d2ac; background: var(--white);
  flex-shrink: 0; position: relative;
  transition: border-color 0.12s;
}
input:checked + .sc-radio-dot { border-color: var(--green); }
input:checked + .sc-radio-dot::after {
  content: ''; position: absolute; inset: 3px;
  border-radius: 50%; background: var(--green);
}
.sc-carrier-name { flex: 1; }
.sc-carrier-price { font-size: 13px; font-weight: 600; color: var(--green-text); white-space: nowrap; }
.sc-sub { padding: 2px 14px 12px 20px; border-top: 1px dashed #e4ecd6; }
.sc-sub-q { font-size: 12px; color: #7d8a6c; font-weight: 600; margin: 10px 0 8px; }
.sc-sub-opt {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; margin: 4px 0;
  border: 1px solid transparent; border-radius: 8px;
  cursor: pointer; font-size: 13.5px; color: var(--text);
  transition: background 0.12s, border-color 0.12s;
}
.sc-sub-opt:hover { background: #f4f9ed; }
.sc-sub-opt--on { background: #f1f8e6; border-color: #cfe3ad; font-weight: 600; }
.sc-sub-name { flex: 1; }
.sc-sub-price { font-size: 12.5px; color: var(--green-text); font-weight: 600; white-space: nowrap; }
.sc-sub-desc { font-size: 11.5px; color: #97a385; padding: 0 12px 6px 40px; }

/* карточка выбранного отделения (3 строки) */
.np-card-l1 { font-weight: 700; font-size: 13.5px; color: var(--text); }
.np-card-l2 { font-size: 13px; color: var(--text); margin-top: 2px; }
.np-card-l3 { font-size: 12px; color: var(--green-text); font-weight: 600; margin-top: 3px; }

/* поля курьера НП */
.np-courier-fields { display: flex; flex-direction: column; gap: 8px; margin-top: 6px; }
.np-cf {
  width: 100%; box-sizing: border-box;
  padding: 9px 12px; font-size: 13.5px;
  border: 1.5px solid #d8e8c0; border-radius: 7px;
  background: var(--white); color: var(--text);
}
.np-cf:focus { outline: none; border-color: var(--green); box-shadow: 0 0 0 3px rgba(94,139,26,0.1); }
.np-cf-row { display: flex; gap: 8px; }
.np-cf-row .np-cf { flex: 1; }
@media only screen and (max-width: 640px) {
  .sc-carrier-head { padding: 12px 12px; font-size: 14px; }
  .sc-sub { padding-left: 12px; }
  .np-cf { font-size: 16px; }
}

/* ── Кур'єрська панель НП (2026-07-24) ── */
#np-courier { padding: 16px 22px 20px; }
.np-cour-head { font-size: 14px; font-weight: 700; color: var(--text); margin-bottom: 12px; }
.np-cour-grid { display: flex; flex-direction: column; gap: 10px; max-width: 480px; }
.np-ac-wrap { position: relative; }
.np-ac-list {
  display: none; position: absolute; top: calc(100% + 4px); left: 0; right: 0; z-index: 50;
  background: var(--white); border: 1.5px solid #d8e8c0; border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.12); overflow: hidden;
}
.np-ac-item { padding: 10px 14px; font-size: 13px; color: var(--text); cursor: pointer; line-height: 1.4; }
.np-ac-item:hover { background: #f1f8e6; }
.np-ac-item + .np-ac-item { border-top: 1px solid #f0f4e8; }
.np-cf:disabled { background: #f5f7f0; color: #a9b198; cursor: not-allowed; }
.np-cour-price { margin: 14px 0 0; font-size: 13px; color: var(--text); }
.np-cour-price b { color: var(--green-text); }
.np-cour-note { color: #a0ab8e; font-size: 12px; }
.np-cour-done {
  margin-top: 14px;
  background: var(--green); color: #fff; border: none; border-radius: 8px;
  padding: 11px 26px; font-size: 13.5px; font-weight: 700; cursor: pointer;
  transition: background 0.15s;
}
.np-cour-done:hover { background: var(--green-dark); }
@media only screen and (max-width: 640px) {
  #np-courier { padding: 14px 14px 18px; }
  .np-cour-done { width: 100%; }
}

/* ── ФИКС мобильного каскада: display:flex правой панели (курьерский блок выше)
      перебивал мобильное display:none — карта просачивалась под список (2026-07-24) ── */
@media only screen and (max-width: 640px) {
  .np-right-panel { display: none !important; }
  .np-picker-root.np-mode-map .np-right-panel { display: flex !important; flex-direction: column; }
  .np-picker-root.np-mode-map .np-map-wrap { min-height: 58vw; }
}
