/* ==========================================================================
   ДВЕРИ №1 — CART & CHECKOUT СТИЛИ
   Apple-Inspired Minimalism + Premium Showroom System
   ========================================================================== */

/* Хлебные крошки и заголовок */
.cart-page-wrapper {
  max-width: 1280px;
  margin: 0 auto;
  padding: 36px 36px 80px;
  width: 100%;
}

.cart-breadcrumb-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
}

.cart-back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
  text-decoration: none;
  transition: color var(--transition-fast);
}

.cart-back-link:hover {
  color: var(--accent-terracotta);
}

.cart-header-title-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-stone);
  padding-bottom: 18px;
  margin-bottom: 32px;
}

.cart-main-heading {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

.cart-total-badge-label {
  font-size: 0.9375rem;
  color: var(--text-muted);
}

/* Двухколоночный макет */
.cart-layout-grid {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 40px;
  align-items: start;
}

/* Левая колонка: список товаров */
.cart-items-column {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.cart-item-card {
  display: grid;
  grid-template-columns: 120px 1fr auto;
  gap: 24px;
  background: var(--bg-surface);
  border: 1px solid var(--border-stone);
  border-radius: var(--radius-md);
  padding: 20px;
  box-shadow: var(--shadow-card);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
  position: relative;
}

.cart-item-card:hover {
  border-color: var(--border-stone-strong);
  box-shadow: var(--shadow-hover);
}

.cart-item-image-box {
  width: 120px;
  height: 150px;
  background: var(--bg-stone-subtle);
  border-radius: var(--radius-sm);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border: 1px solid rgba(0, 0, 0, 0.04);
}

.cart-item-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  mix-blend-mode: multiply;
  transition: transform var(--transition-smooth);
}

.cart-item-card:hover .cart-item-img {
  transform: scale(1.03);
}

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

.cart-item-brand-row {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  font-weight: 600;
  margin-bottom: 4px;
}

.cart-item-title {
  font-family: var(--font-display);
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 10px;
  line-height: 1.35;
}

.cart-item-title a {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition-fast);
}

.cart-item-title a:hover {
  color: var(--accent-terracotta);
}

/* Конфигурация / Спецификация */
.cart-item-specs-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 12px;
  margin-bottom: 12px;
}

.cart-spec-pill {
  font-size: 0.75rem;
  color: var(--text-secondary);
  background: var(--bg-stone-subtle);
  border: 1px solid var(--border-stone);
  padding: 3px 8px;
  border-radius: var(--radius-xs);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.cart-spec-pill strong {
  color: var(--text-primary);
  font-weight: 500;
}

.cart-spec-uncertain-alert {
  font-size: 0.75rem;
  color: #92400E;
  background: #FEF3C7;
  border: 1px solid #FCD34D;
  padding: 4px 8px;
  border-radius: var(--radius-xs);
  margin-top: 4px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* Правая колонка карточки товара: количество и цена */
.cart-item-actions-box {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: space-between;
  min-width: 140px;
}

.cart-item-price-block {
  text-align: right;
}

.cart-item-price-val {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}

.cart-item-price-unit {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.cart-item-price-uncertain {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--accent-terracotta);
  background: var(--accent-terracotta-light);
  padding: 4px 8px;
  border-radius: var(--radius-xs);
  border: 1px solid var(--accent-terracotta-border);
  display: inline-block;
}

/* Степпер количества */
.cart-stepper-wrap {
  display: inline-flex;
  align-items: center;
  background: var(--bg-stone-subtle);
  border: 1px solid var(--border-stone);
  border-radius: var(--radius-xs);
  overflow: hidden;
  margin-top: 12px;
}

.cart-stepper-btn {
  width: 32px;
  height: 32px;
  background: transparent;
  border: none;
  font-size: 1.1rem;
  color: var(--text-primary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition-fast), color var(--transition-fast);
}

.cart-stepper-btn:hover {
  background: var(--border-stone);
  color: var(--accent-terracotta);
}

.cart-stepper-val {
  width: 36px;
  text-align: center;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-primary);
}

.btn-remove-item {
  background: none;
  border: none;
  font-size: 0.75rem;
  color: var(--text-muted);
  cursor: pointer;
  margin-top: 12px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: color var(--transition-fast);
}

.btn-remove-item:hover {
  color: #DC2626;
}

/* Правая колонка: сводка заказа (Sticky Card) */
.cart-summary-sticky {
  position: sticky;
  top: 100px;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-stone);
  border-radius: var(--radius-md);
  padding: 28px 24px;
  box-shadow: var(--shadow-card);
}

.cart-summary-title {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 20px;
  border-bottom: 1px solid var(--border-stone-subtle);
  padding-bottom: 12px;
}

.cart-summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin-bottom: 10px;
}

.cart-summary-row.uncertain {
  color: var(--accent-terracotta);
  font-size: 0.8125rem;
}

.cart-summary-divider {
  height: 1px;
  background: var(--border-stone);
  margin: 18px 0;
}

.cart-summary-total-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 12px;
}

.cart-summary-total-label {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
}

.cart-summary-total-val {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

.cart-summary-note {
  font-size: 0.75rem;
  line-height: 1.45;
  color: var(--text-muted);
  margin-bottom: 24px;
  background: var(--bg-stone-subtle);
  padding: 10px 12px;
  border-radius: var(--radius-xs);
  border: 1px solid var(--border-stone-subtle);
}

.btn-cart-checkout {
  width: 100%;
  height: 48px;
  background: var(--accent-terracotta);
  color: #FFFFFF;
  border: 1px solid var(--accent-terracotta);
  border-radius: var(--radius-md);
  font-size: 0.9375rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 2px 8px rgba(184, 92, 58, 0.2);
}

.btn-cart-checkout:hover {
  background: var(--accent-terracotta-hover);
  border-color: var(--accent-terracotta-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(184, 92, 58, 0.28);
}

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

.cart-guarantees-list {
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px solid var(--border-stone-subtle);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.cart-guarantee-item {
  font-size: 0.75rem;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.cart-guarantee-icon {
  color: var(--accent-terracotta);
  font-size: 0.9rem;
}

/* Пустая корзина */
.cart-empty-view {
  text-align: center;
  padding: 80px 20px;
  max-width: 540px;
  margin: 0 auto;
}

.cart-empty-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 24px;
  color: var(--text-muted);
  opacity: 0.6;
}

.cart-empty-title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 12px;
}

.cart-empty-desc {
  font-size: 0.9375rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 28px;
}

.btn-empty-catalog {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 44px;
  padding: 0 24px;
  background: var(--bg-graphite);
  color: #FFFFFF;
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: var(--radius-md);
  transition: background var(--transition-fast), transform var(--transition-fast);
}

.btn-empty-catalog:hover {
  background: var(--bg-graphite-hover);
  transform: translateY(-1px);
}

/* ==========================================================================
   МОДАЛЬНОЕ ОКНО ПОШАГОВОГО ОФОРМЛЕНИЯ ЗАЯВКИ
   ========================================================================== */
.checkout-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(34, 35, 32, 0.65);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 1200;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.checkout-modal-overlay.open {
  display: flex;
  opacity: 1;
}

.checkout-modal-panel {
  background: var(--bg-surface);
  border: 1px solid var(--border-stone);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 600px;
  max-height: 92vh;
  overflow-y: auto;
  box-shadow: var(--shadow-modal);
  position: relative;
  display: flex;
  flex-direction: column;
}

.checkout-modal-header {
  padding: 22px 28px 16px;
  border-bottom: 1px solid var(--border-stone-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  background: var(--bg-surface);
  z-index: 10;
}

.checkout-modal-title {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-primary);
}

.btn-close-checkout {
  background: none;
  border: none;
  font-size: 1.25rem;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  transition: color var(--transition-fast);
}

.btn-close-checkout:hover {
  color: var(--text-primary);
}

/* Индикатор шагов */
.checkout-steps-tracker {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 28px;
  background: var(--bg-stone-subtle);
  border-bottom: 1px solid var(--border-stone-subtle);
}

.checkout-step-tab {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-muted);
  user-select: none;
}

.checkout-step-num {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--bg-stone);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.75rem;
  transition: all var(--transition-fast);
}

.checkout-step-tab.active {
  color: var(--accent-terracotta);
  font-weight: 600;
}

.checkout-step-tab.active .checkout-step-num {
  background: var(--accent-terracotta);
  color: #FFFFFF;
}

.checkout-step-tab.completed {
  color: var(--text-primary);
}

.checkout-step-tab.completed .checkout-step-num {
  background: #10B981;
  color: #FFFFFF;
}

.checkout-step-line {
  flex: 1;
  height: 1px;
  background: var(--border-stone);
  margin: 0 10px;
}

/* Тело модального окна */
.checkout-modal-body {
  padding: 24px 28px;
  flex: 1;
}

.checkout-step-pane {
  display: none;
}

.checkout-step-pane.active {
  display: block;
}

/* Формы шагов */
.form-group-field {
  margin-bottom: 18px;
}

.form-field-label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.form-field-input,
.form-field-select,
.form-field-textarea {
  width: 100%;
  height: 44px;
  padding: 0 14px;
  font-family: var(--font-sans);
  font-size: 0.875rem;
  color: var(--text-primary);
  background: var(--bg-surface);
  border: 1px solid var(--border-stone);
  border-radius: var(--radius-sm);
  outline: none;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.form-field-input:focus,
.form-field-select:focus,
.form-field-textarea:focus {
  border-color: var(--accent-terracotta);
  box-shadow: 0 0 0 3px rgba(184, 92, 58, 0.12);
}

.form-field-textarea {
  height: 84px;
  padding: 10px 14px;
  resize: vertical;
}

/* Выбор города */
.city-select-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 6px;
}

.city-select-btn {
  padding: 12px 14px;
  background: var(--bg-surface);
  border: 1px solid var(--border-stone);
  border-radius: var(--radius-sm);
  text-align: left;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.city-select-btn.active {
  border-color: var(--accent-terracotta);
  background: var(--accent-terracotta-light);
}

.city-select-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 2px;
}

.city-select-btn.active .city-select-title {
  color: var(--accent-terracotta);
}

.city-select-sub {
  font-size: 0.6875rem;
  color: var(--text-muted);
}

/* SMS Код */
.sms-verify-container {
  text-align: center;
  padding: 16px 0;
}

.sms-phone-target {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 12px;
}

.sms-digits-row {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin: 20px 0;
}

.sms-digit-box {
  width: 52px;
  height: 56px;
  text-align: center;
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
  border: 2px solid var(--border-stone);
  border-radius: var(--radius-sm);
  background: var(--bg-surface);
  outline: none;
  transition: all var(--transition-fast);
}

.sms-digit-box:focus {
  border-color: var(--accent-terracotta);
  box-shadow: 0 0 0 3px rgba(184, 92, 58, 0.15);
}

.sms-countdown-note {
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.btn-resend-sms {
  background: none;
  border: none;
  font-size: 0.8125rem;
  color: var(--accent-terracotta);
  font-weight: 600;
  cursor: pointer;
  text-decoration: underline;
  padding: 4px;
}

.btn-resend-sms:disabled {
  color: var(--text-muted);
  text-decoration: none;
  cursor: not-allowed;
}

.sms-error-banner {
  display: none;
  color: #DC2626;
  background: #FEE2E2;
  border: 1px solid #FCA5A5;
  border-radius: var(--radius-xs);
  padding: 8px 12px;
  font-size: 0.8125rem;
  margin-bottom: 14px;
  text-align: left;
}

/* Способ получения */
.delivery-options-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 16px;
}

.delivery-card-btn {
  padding: 14px;
  border: 1px solid var(--border-stone);
  border-radius: var(--radius-sm);
  background: var(--bg-surface);
  text-align: left;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.delivery-card-btn.active {
  border-color: var(--accent-terracotta);
  background: var(--accent-terracotta-light);
}

.delivery-card-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.delivery-card-desc {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* Чекбокс монтажа */
.checkbox-option-card {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px;
  background: var(--bg-stone-subtle);
  border: 1px solid var(--border-stone);
  border-radius: var(--radius-sm);
  cursor: pointer;
  margin-bottom: 18px;
}

.checkbox-option-card input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--accent-terracotta);
  margin-top: 2px;
  cursor: pointer;
}

.checkbox-option-label {
  font-size: 0.8125rem;
  color: var(--text-primary);
  line-height: 1.4;
}

.checkbox-option-label strong {
  display: block;
  font-size: 0.875rem;
  margin-bottom: 2px;
}

/* Шаг 4: Подтверждение */
.checkout-confirm-summary {
  background: var(--bg-stone-subtle);
  border: 1px solid var(--border-stone);
  border-radius: var(--radius-sm);
  padding: 16px;
  margin-bottom: 18px;
}

.confirm-summary-line {
  display: flex;
  justify-content: space-between;
  font-size: 0.8125rem;
  margin-bottom: 6px;
  color: var(--text-secondary);
}

.confirm-summary-line strong {
  color: var(--text-primary);
}

.confirm-items-mini-list {
  max-height: 180px;
  overflow-y: auto;
  border-top: 1px solid var(--border-stone);
  margin-top: 10px;
  padding-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.confirm-mini-item {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
}

.confirm-mini-title {
  color: var(--text-primary);
  font-weight: 500;
}

.confirm-mini-price {
  color: var(--accent-terracotta);
  font-weight: 600;
}

/* Экран благодарности (Thank You) */
.thank-you-container {
  text-align: center;
  padding: 32px 16px;
}

.thank-you-check-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: #D1FAE5;
  color: #059669;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  margin: 0 auto 20px;
}

.thank-you-title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.thank-you-order-id-badge {
  display: inline-block;
  padding: 8px 18px;
  background: var(--bg-stone-subtle);
  border: 1px solid var(--border-stone);
  border-radius: var(--radius-pill);
  font-family: var(--font-mono);
  font-size: 1rem;
  font-weight: 700;
  color: var(--accent-terracotta);
  margin-bottom: 16px;
}

.thank-you-note {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.5;
  max-width: 440px;
  margin: 0 auto 28px;
}

/* Подвал модального окна */
.checkout-modal-footer {
  padding: 16px 28px;
  border-top: 1px solid var(--border-stone-subtle);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--bg-surface);
}

.btn-checkout-prev {
  background: transparent;
  border: 1px solid var(--border-stone);
  border-radius: var(--radius-sm);
  padding: 10px 18px;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-checkout-prev:hover {
  background: var(--bg-stone-subtle);
  color: var(--text-primary);
}

.btn-checkout-next {
  background: var(--accent-terracotta);
  border: 1px solid var(--accent-terracotta);
  border-radius: var(--radius-sm);
  padding: 10px 24px;
  font-size: 0.875rem;
  font-weight: 600;
  color: #FFFFFF;
  cursor: pointer;
  transition: all var(--transition-fast);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.btn-checkout-next:hover {
  background: var(--accent-terracotta-hover);
  border-color: var(--accent-terracotta-hover);
}

.btn-checkout-next:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Мобильная нижняя панель корзины */
.mobile-cart-sticky-bar {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid var(--border-stone);
  padding: 12px 18px;
  z-index: 900;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.08);
}

@media (min-width: 769px) {
  .mobile-cart-sticky-bar {
    display: none !important;
  }
}

.mobile-cart-sticky-info {
  display: flex;
  flex-direction: column;
}

.mobile-cart-sticky-label {
  font-size: 0.6875rem;
  color: var(--text-muted);
  text-transform: uppercase;
}

.mobile-cart-sticky-val {
  font-family: var(--font-display);
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--text-primary);
}

.btn-mobile-checkout {
  height: 42px;
  padding: 0 18px;
  background: var(--accent-terracotta);
  color: #FFFFFF;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Адаптив для планшетов и мобильных устройств */
@media (max-width: 1024px) {
  .cart-layout-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .cart-summary-sticky {
    position: static;
  }
}

@media (max-width: 768px) {
  /* Защита от перекрытия кнопки заказа плавающим виджетом на экранах <= 768px */
  body.page-cart .floating-contact-widget {
    bottom: 84px !important;
  }

  .cart-page-wrapper {
    padding: 20px 16px 100px;
  }

  .cart-main-heading {
    font-size: 1.5rem;
  }

  .cart-item-card {
    grid-template-columns: 90px 1fr;
    gap: 16px;
    padding: 14px;
  }

  .cart-item-image-box {
    width: 90px;
    height: 120px;
  }

  .cart-item-actions-box {
    grid-column: 1 / -1;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid var(--border-stone-subtle);
  }

  .cart-item-price-block {
    text-align: left;
  }

  .mobile-cart-sticky-bar {
    display: flex;
  }

  .checkout-modal-panel {
    max-height: 98vh;
    border-radius: var(--radius-md);
  }

  .checkout-modal-header,
  .checkout-modal-body,
  .checkout-modal-footer {
    padding: 16px 18px;
  }

  .city-select-grid,
  .delivery-options-grid {
    grid-template-columns: 1fr;
  }

  .sms-digit-box {
    width: 44px;
    height: 48px;
    font-size: 1.25rem;
  }
}


/* ==========================================================================
   SPRINT 3: ROOM SPECIFICATION, PDF EXPORT & SHARE CART
   ========================================================================== */

/* Header Action Buttons */
.cart-header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn-cart-tool {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: var(--bg-surface);
  border: 1px solid var(--border-stone);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-primary);
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 1px 4px rgba(34, 35, 32, 0.04);
}

.btn-cart-tool:hover {
  background: var(--bg-stone-subtle);
  border-color: var(--border-stone-strong);
  transform: translateY(-1px);
  box-shadow: 0 3px 8px rgba(34, 35, 32, 0.08);
}

.btn-cart-pdf {
  background: #FAF8F5;
  border-color: rgba(184, 92, 58, 0.3);
  color: var(--accent-terracotta);
}

.btn-cart-pdf:hover {
  background: var(--accent-terracotta);
  color: #FFFFFF;
  border-color: var(--accent-terracotta);
}

.btn-cart-summary-pdf {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 12px 18px;
  margin-top: 10px;
  background: transparent;
  border: 1px dashed var(--border-stone-strong);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-cart-summary-pdf:hover {
  border-color: var(--accent-terracotta);
  color: var(--accent-terracotta);
  background: #FAF8F5;
}

/* Custom Room & Opening Assignment Controls */
.cart-item-custom-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 12px;
  padding: 10px 12px;
  background: var(--bg-stone-subtle);
  border: 1px solid var(--border-stone);
  border-radius: var(--radius-sm);
}

.cart-field-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.cart-field-label {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 600;
  color: var(--text-muted);
}

.cart-field-label svg {
  color: var(--accent-terracotta);
}

.cart-room-combo {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.cart-room-select,
.cart-opening-select,
.cart-room-custom-input {
  width: 100%;
  padding: 6px 10px;
  font-family: inherit;
  font-size: 0.8125rem;
  color: var(--text-primary);
  background: #FFFFFF;
  border: 1px solid var(--border-stone);
  border-radius: 4px;
  outline: none;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.cart-room-select:focus,
.cart-opening-select:focus,
.cart-room-custom-input:focus {
  border-color: var(--accent-terracotta);
  box-shadow: 0 0 0 2px rgba(184, 92, 58, 0.12);
}

.pill-kit {
  background: #F3F8F4;
  color: #2D6A4F;
  border: 1px solid #D1E7DD;
}

.pill-leaf {
  background: #F8F9FA;
  color: #495057;
  border: 1px solid #DEE2E6;
}

/* Toast Notifications */
.toast-notice {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%) translateY(30px);
  background: #222320;
  color: #FFFFFF;
  padding: 12px 24px;
  border-radius: 30px;
  font-size: 0.875rem;
  font-weight: 500;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 9999;
  pointer-events: none;
}

.toast-notice.show {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

/* ==========================================================================
   PRINT / PDF SPECIFICATION STYLES (@media print)
   ========================================================================== */
@media print {
  @page {
    size: A4 landscape;
    margin: 12mm 10mm;
  }

  body {
    background: #FFFFFF !important;
    color: #000000 !important;
    font-family: 'Golos Text', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif !important;
    font-size: 9.5pt !important;
    line-height: 1.35 !important;
  }

  /* Скрываем весь публичный веб-интерфейс */
  .site-header,
  .cart-page-wrapper,
  .mobile-cart-sticky-bar,
  .site-footer,
  .floating-contact-widget,
  .checkout-modal-overlay,
  .toast-notice,
  #mobileMenuOverlay,
  #mobileMenuPanel {
    display: none !important;
  }

  /* Показываем печатную смету */
  #printablePdfSpec {
    display: block !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  .print-doc-header {
    border-bottom: 2px solid #222320;
    padding-bottom: 12px;
    margin-bottom: 14px;
  }

  .print-header-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
  }

  .print-logo-box {
    display: flex;
    flex-direction: column;
    gap: 4px;
  }

  .print-logo-img {
    height: 38px;
    width: auto;
    object-fit: contain;
  }

  .print-tagline {
    font-size: 7.5pt;
    font-weight: 700;
    letter-spacing: 0.08em;
    color: #444;
  }

  .print-meta-box {
    text-align: right;
  }

  .print-doc-number {
    font-size: 11pt;
    font-weight: 800;
    color: #111;
  }

  .print-doc-date {
    font-size: 8.5pt;
    color: #555;
    margin-top: 3px;
  }

  .print-contacts-bar {
    display: flex;
    gap: 20px;
    font-size: 8pt;
    color: #333;
    margin-top: 8px;
    padding-top: 6px;
    border-top: 1px solid #DDD;
  }

  .print-spec-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
    font-size: 8.5pt;
  }

  .print-spec-table th,
  .print-spec-table td {
    border: 1px solid #CCC;
    padding: 6px 8px;
    vertical-align: middle;
  }

  .print-spec-table th {
    background: #F4F4F2 !important;
    font-weight: 700;
    text-align: left;
    font-size: 8pt;
    text-transform: uppercase;
  }

  .print-spec-table tfoot td {
    background: #FAFAFA !important;
    padding: 8px;
  }

  .print-footer-notes {
    margin-top: 18px;
    font-size: 8pt;
    color: #444;
  }

  .print-signature-row {
    display: flex;
    justify-content: space-between;
    margin-top: 28px;
    font-size: 8.5pt;
    font-weight: 600;
  }
}

@media (max-width: 640px) {
  .cart-header-title-row {
    flex-direction: column;
    gap: 14px;
    align-items: flex-start;
  }
  .cart-item-custom-fields {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   SPRINT 8: МОТИВАЦИЯ И ДОПРОДАЖИ В КОРЗИНЕ (FREE DELIVERY & INSTALLATION)
   ========================================================================== */

/* Блок прогресса бесплатной доставки */
.cart-upsell-delivery {
  background: var(--bg-stone-subtle);
  border: 1px solid var(--border-stone);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  margin-bottom: 16px;
  transition: all 0.25s ease;
}

.cart-upsell-delivery.unlocked {
  background: rgba(46, 125, 50, 0.08);
  border-color: rgba(46, 125, 50, 0.3);
}

.cart-upsell-delivery-header {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.cart-upsell-delivery-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-terracotta, #B85C3A);
  flex-shrink: 0;
  line-height: 1;
}

.cart-upsell-delivery-icon svg {
  stroke: var(--accent-terracotta, #B85C3A);
}

.cart-upsell-delivery.unlocked .cart-upsell-delivery-icon {
  color: #2E7D32;
}

.cart-upsell-delivery.unlocked .cart-upsell-delivery-icon svg {
  stroke: #2E7D32;
}

.cart-upsell-delivery.unlocked .cart-upsell-delivery-header {
  color: #2E7D32;
}

.cart-upsell-progress-track {
  width: 100%;
  height: 6px;
  background: rgba(0, 0, 0, 0.08);
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 8px;
}

.cart-upsell-progress-bar {
  height: 100%;
  background: var(--accent-terracotta);
  border-radius: 999px;
  transition: width 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.cart-upsell-delivery.unlocked .cart-upsell-progress-bar {
  background: #2E7D32;
}

.cart-upsell-delivery-desc {
  font-size: 0.75rem;
  line-height: 1.35;
  color: var(--text-secondary);
}

.cart-upsell-delivery.unlocked .cart-upsell-delivery-desc {
  color: #1B5E20;
}

/* Строка монтажа в сводке */
.cart-summary-row.install-row {
  color: var(--accent-terracotta);
  font-weight: 500;
}

/* Карточка монтажа «под ключ» */
.cart-upsell-install {
  background: #FFFFFF;
  border: 1px solid var(--border-stone);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  margin-bottom: 16px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.cart-upsell-install:hover {
  border-color: var(--accent-terracotta);
}

.cart-install-checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
  user-select: none;
}

.cart-install-checkbox {
  margin-top: 3px;
  width: 18px;
  height: 18px;
  accent-color: var(--accent-terracotta);
  cursor: pointer;
  flex-shrink: 0;
}

.cart-install-checkbox-content {
  flex: 1;
}

.cart-install-title-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

.cart-install-title {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-primary);
}

.cart-install-badge-price {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--accent-terracotta);
  background: rgba(184, 91, 53, 0.1);
  padding: 2px 8px;
  border-radius: 999px;
  white-space: nowrap;
}

.cart-install-desc {
  font-size: 0.71875rem;
  line-height: 1.35;
  color: var(--text-secondary);
  margin: 0;
}

.confirm-mini-item.confirm-mini-install {
  border-top: 1px dashed var(--border-stone);
  padding-top: 8px;
  margin-top: 8px;
  color: var(--accent-terracotta);
  font-weight: 500;
}
