@charset "utf-8";
/* ============================================================
   cart.css — стили страницы корзины и оформления заказа
   ООО СТРОЙИНДУСТРИЯ · окна-шахты.рф
   ============================================================ */

/* ─── PAGE HERO ──────────────────────────────────────────── */
.page-hero {
  background: linear-gradient(135deg, #1B4F8C 0%, #163f70 100%);
  padding: 40px 0 32px;
  color: #fff;
}
.page-hero h1 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 700;
  margin: 0 0 8px;
}
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: rgba(255,255,255,.7);
  flex-wrap: wrap;
}
.breadcrumb a { color: rgba(255,255,255,.85); text-decoration: none; }
.breadcrumb a:hover { color: #F5841F; }
.breadcrumb__sep { opacity: .5; }
.breadcrumb__current { color: #fff; }

/* ─── CART LAYOUT ────────────────────────────────────────── */
.cart-section {
  padding: 48px 0 72px;
  background: #F4F6FA;
  min-height: 60vh;
}
.cart-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 380px);
  gap: 32px;
  align-items: flex-start;
}
@media (max-width: 960px) {
  .cart-layout { grid-template-columns: 1fr; }
}

/* ─── CART ITEMS PANEL ───────────────────────────────────── */
.cart-items-panel {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 12px rgba(27,79,140,.07);
  overflow: hidden;
}
.cart-items-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px 16px;
  border-bottom: 1px solid #eef0f4;
}
.cart-items-header h2 {
  font-size: 1.15rem;
  font-weight: 700;
  color: #1A2232;
  margin: 0;
}
.cart-count-badge {
  background: #F5841F;
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 20px;
  margin-left: 8px;
}
.cart-clear-link {
  font-size: 13px;
  color: #6B7A8D;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 5px;
  transition: color .2s;
}
.cart-clear-link:hover { color: #e05e1a; }

/* ─── CART TABLE ─────────────────────────────────────────── */
.cart-table-wrap { overflow-x: hidden; }
.cart-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  table-layout: fixed;
}
.cart-table thead th {
  padding: 12px 12px;
  text-align: left;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: #6B7A8D;
  background: #f8f9fc;
  border-bottom: 1px solid #eef0f4;
  box-sizing: border-box;
}
.cart-table thead th:last-child { text-align: center; }
.cart-table tbody tr {
  border-bottom: 1px solid #f0f1f5;
  transition: background .15s;
}
.cart-table tbody tr:hover { background: #fafbfd; }
.cart-table tbody tr:last-child { border-bottom: none; }
.cart-table td { padding: 16px 10px; vertical-align: middle; }

/* Product cell */
.cart-product-cell { display: flex; align-items: center; gap: 14px; }
.cart-product-img {
  width: 56px;
  height: 56px;
  border-radius: 8px;
  background: #f0f4f8;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
}
.cart-product-img img { width: 100%; height: 100%; object-fit: cover; }
.cart-product-img svg { opacity: .35; }
.cart-product-info { min-width: 0; overflow: hidden; }
.cart-product-name {
  font-weight: 600;
  color: #1A2232;
  font-size: 14px;
  margin: 0 0 4px;
  white-space: normal;
  word-break: break-word;
  overflow-wrap: break-word;
  line-height: 1.4;
}
.cart-product-specs {
  font-size: 12px;
  color: #6B7A8D;
  line-height: 1.5;
}
.cart-product-sku { font-size: 11px; color: #b0b8c4; margin-top: 2px; }

/* Price cells */
.cart-price, .cart-total-price {
  font-size: 15px;
  font-weight: 600;
  color: #1A2232;
  white-space: nowrap;
}
.cart-total-price { color: #1B4F8C; }

/* Quantity stepper */
.qty-stepper {
  display: flex;
  align-items: center;
  gap: 0;
  border: 1.5px solid #e2e6ef;
  border-radius: 8px;
  overflow: hidden;
  width: fit-content;
}
.qty-btn {
  width: 30px;
  height: 34px;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 18px;
  font-weight: 500;
  color: #1B4F8C;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .15s;
  user-select: none;
}
.qty-btn:hover { background: #eef3fb; }
.qty-btn:disabled { color: #c4c9d4; cursor: not-allowed; }
.qty-input {
  width: 34px;
  height: 34px;
  text-align: center;
  border: none;
  border-left: 1.5px solid #e2e6ef;
  border-right: 1.5px solid #e2e6ef;
  font-size: 14px;
  font-weight: 600;
  color: #1A2232;
  background: #fff;
  outline: none;
  -moz-appearance: textfield;
}
.qty-input::-webkit-outer-spin-button,
.qty-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

/* Remove button */
.cart-remove-btn {
  width: 32px;
  height: 32px;
  border: none;
  background: none;
  cursor: pointer;
  color: #c4c9d4;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color .2s, background .2s;
  margin: 0 auto;
}
.cart-remove-btn:hover { color: #e05e1a; background: #fff3ec; }

/* Cart footer */
.cart-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  border-top: 1px solid #eef0f4;
  flex-wrap: wrap;
  gap: 12px;
}
.continue-shopping {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #1B4F8C;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: color .2s;
}
.continue-shopping:hover { color: #F5841F; }

/* ─── EMPTY CART ─────────────────────────────────────────── */
.cart-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 80px 24px;
  text-align: center;
}
.cart-empty__icon {
  width: 120px;
  height: 120px;
  background: #f0f4fb;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
}
.cart-empty h2 {
  font-size: 1.4rem;
  font-weight: 700;
  color: #1A2232;
  margin: 0 0 8px;
}
.cart-empty p {
  color: #6B7A8D;
  font-size: 15px;
  margin: 0 0 28px;
}

/* ─── ORDER SUMMARY ──────────────────────────────────────── */
.order-summary {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 12px rgba(27,79,140,.07);
  padding: 24px;
  position: sticky;
  top: 80px;
  min-width: 0;
  overflow: hidden;
}
.order-summary h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: #1A2232;
  margin: 0 0 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid #eef0f4;
}
.summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  font-size: 14px;
  color: #6B7A8D;
}
.summary-row span:last-child { font-weight: 600; color: #1A2232; }
.summary-row.discount span:last-child { color: #2caa4a; }
.summary-row.delivery-row span:last-child { font-size: 12px; color: #6B7A8D; font-weight: 400; }

/* Promo code */
.promo-row {
  display: flex;
  gap: 8px;
  margin: 16px 0;
}
.promo-input {
  flex: 1;
  border: 1.5px solid #e2e6ef;
  border-radius: 8px;
  padding: 9px 12px;
  font-size: 14px;
  outline: none;
  transition: border-color .2s;
}
.promo-input:focus { border-color: #1B4F8C; }
.promo-input::placeholder { color: #b0b8c4; }
.promo-btn {
  padding: 9px 14px;
  border: 1.5px solid #1B4F8C;
  background: none;
  color: #1B4F8C;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: background .2s, color .2s;
}
.promo-btn:hover { background: #1B4F8C; color: #fff; }

.summary-divider {
  border: none;
  border-top: 1px solid #eef0f4;
  margin: 16px 0;
}

/* Total */
.summary-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}
.summary-total__label {
  font-size: 1.05rem;
  font-weight: 700;
  color: #1A2232;
}
.summary-total__price {
  font-size: 1.5rem;
  font-weight: 800;
  color: #1B4F8C;
  white-space: nowrap;
}

/* Buttons */
.btn-checkout {
  display: block;
  width: 100%;
  padding: 15px;
  background: #F5841F;
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 16px;
  font-weight: 700;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background .2s, transform .1s;
  margin-bottom: 10px;
}
.btn-checkout:hover { background: #e07318; }
.btn-checkout:active { transform: scale(.99); }

.btn-installment {
  display: block;
  width: 100%;
  padding: 13px;
  background: none;
  color: #1B4F8C;
  border: 2px solid #1B4F8C;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background .2s, color .2s;
}
.btn-installment:hover { background: #1B4F8C; color: #fff; }

/* Payment icons row */
.payment-icons-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 16px;
  flex-wrap: wrap;
}
.pay-icon {
  height: 24px;
  padding: 3px 8px;
  border: 1px solid #e2e6ef;
  border-radius: 5px;
  font-size: 11px;
  font-weight: 700;
  color: #1A2232;
  background: #fff;
  display: flex;
  align-items: center;
  letter-spacing: .02em;
}
.pay-icon--mir { color: #0060a9; border-color: #0060a9; }
.pay-icon--visa { color: #1a1f71; border-color: #1a1f71; font-style: italic; }
.pay-icon--mc { color: #eb001b; border-color: #eb001b; }
.pay-icon--sbp { color: #1cb85d; border-color: #1cb85d; }
.pay-icon--yk { color: #ff0000; border-color: #ff0000; }

/* Security badges */
.security-badges {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid #f0f1f5;
}
.sec-badge {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  color: #6B7A8D;
}
.sec-badge svg { color: #2caa4a; }

/* ─── CHECKOUT STEPS ─────────────────────────────────────── */
.checkout-section {
  padding: 48px 0 72px;
  background: #F4F6FA;
  min-height: 70vh;
}
.checkout-layout {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 32px;
  align-items: flex-start;
}
@media (max-width: 900px) {
  .checkout-layout { grid-template-columns: 1fr; }
}

/* Progress bar */
.checkout-steps {
  display: flex;
  align-items: center;
  margin-bottom: 32px;
  background: #fff;
  border-radius: 12px;
  padding: 20px 24px;
  box-shadow: 0 2px 8px rgba(27,79,140,.06);
  overflow-x: auto;
  gap: 0;
}
.step-item {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.step-num {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2px solid #dde2ed;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  color: #6B7A8D;
  transition: all .3s;
  flex-shrink: 0;
}
.step-label {
  font-size: 13px;
  font-weight: 600;
  color: #6B7A8D;
  white-space: nowrap;
  transition: color .3s;
}
.step-connector {
  flex: 1;
  min-width: 24px;
  height: 2px;
  background: #dde2ed;
  margin: 0 8px;
  transition: background .3s;
}
.step-item.active .step-num {
  background: #1B4F8C;
  border-color: #1B4F8C;
  color: #fff;
}
.step-item.active .step-label { color: #1B4F8C; }
.step-item.done .step-num {
  background: #2caa4a;
  border-color: #2caa4a;
  color: #fff;
}
.step-item.done + .step-connector { background: #2caa4a; }

/* Step panels */
.checkout-step-panel {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 12px rgba(27,79,140,.07);
  padding: 28px;
  display: none;
}
.checkout-step-panel.active { display: block; }
.checkout-step-panel h2 {
  font-size: 1.15rem;
  font-weight: 700;
  color: #1A2232;
  margin: 0 0 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid #eef0f4;
}

/* Form elements */
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 600px) { .form-row { grid-template-columns: 1fr; } }
.form-group { margin-bottom: 16px; }
.form-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #1A2232;
  margin-bottom: 6px;
}
.form-label .req { color: #F5841F; margin-left: 2px; }
.form-control {
  width: 100%;
  border: 1.5px solid #e2e6ef;
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 14px;
  font-family: inherit;
  color: #1A2232;
  background: #fff;
  outline: none;
  transition: border-color .2s, box-shadow .2s;
  box-sizing: border-box;
}
.form-control:focus {
  border-color: #1B4F8C;
  box-shadow: 0 0 0 3px rgba(27,79,140,.1);
}
.form-control.error { border-color: #e53e3e; }
.form-control::placeholder { color: #b0b8c4; }
.form-select { cursor: pointer; }
textarea.form-control { resize: vertical; min-height: 90px; }

/* Radio cards */
.radio-cards { display: flex; flex-direction: column; gap: 12px; }
.radio-card {
  border: 2px solid #e2e6ef;
  border-radius: 10px;
  padding: 14px 16px;
  cursor: pointer;
  transition: border-color .2s, background .2s;
  display: flex;
  align-items: flex-start;
  gap: 12px;
}
.radio-card:hover { border-color: #1B4F8C; background: #f7f9fd; }
.radio-card.selected { border-color: #1B4F8C; background: #eef3fb; }
.radio-card input[type="radio"] { margin-top: 2px; accent-color: #1B4F8C; }
.radio-card__content { flex: 1; }
.radio-card__title { font-weight: 600; color: #1A2232; font-size: 14px; }
.radio-card__desc { font-size: 12px; color: #6B7A8D; margin-top: 2px; }
.radio-card__icon {
  width: 40px;
  height: 28px;
  border: 1px solid #e2e6ef;
  border-radius: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  color: #1A2232;
  flex-shrink: 0;
}

/* Delivery table */
.delivery-info-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  margin: 16px 0;
}
.delivery-info-table th, .delivery-info-table td {
  padding: 10px 12px;
  text-align: left;
  border-bottom: 1px solid #eef0f4;
}
.delivery-info-table th {
  background: #f8f9fc;
  font-weight: 600;
  color: #6B7A8D;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.delivery-info-table tr:last-child td { border-bottom: none; }

/* Checkbox */
.checkbox-group {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 8px 0;
}
.checkbox-group input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: #1B4F8C;
  margin-top: 1px;
  flex-shrink: 0;
  cursor: pointer;
}
.checkbox-group label {
  font-size: 13px;
  color: #1A2232;
  line-height: 1.5;
  cursor: pointer;
}
.checkbox-group label a { color: #1B4F8C; }

/* Step navigation buttons */
.step-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid #eef0f4;
  gap: 12px;
}
.step-nav .btn-back {
  padding: 12px 24px;
  border: 2px solid #e2e6ef;
  background: none;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  color: #6B7A8D;
  cursor: pointer;
  transition: border-color .2s, color .2s;
}
.step-nav .btn-back:hover { border-color: #1B4F8C; color: #1B4F8C; }
.step-nav .btn-next {
  padding: 12px 32px;
  background: #F5841F;
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: background .2s;
}
.step-nav .btn-next:hover { background: #e07318; }

/* Checkout order summary (mini) */
.checkout-summary {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 12px rgba(27,79,140,.07);
  padding: 24px;
  position: sticky;
  top: 80px;
}
.checkout-summary h3 {
  font-size: 1rem;
  font-weight: 700;
  color: #1A2232;
  margin: 0 0 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid #eef0f4;
}
.mini-cart-item {
  display: flex;
  gap: 12px;
  margin-bottom: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid #f0f1f5;
}
.mini-cart-item:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }
.mini-cart-img {
  width: 52px;
  height: 52px;
  border-radius: 6px;
  background: #f0f4f8;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.mini-cart-info { flex: 1; min-width: 0; }
.mini-cart-name {
  font-size: 13px;
  font-weight: 600;
  color: #1A2232;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.mini-cart-qty { font-size: 12px; color: #6B7A8D; margin-top: 2px; }
.mini-cart-price { font-size: 14px; font-weight: 700; color: #1B4F8C; white-space: nowrap; }

/* ─── SUCCESS MODAL ──────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.5);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s;
}
.modal-overlay.open { opacity: 1; pointer-events: all; }
.modal-box {
  background: #fff;
  border-radius: 16px;
  max-width: 480px;
  width: 100%;
  padding: 40px 36px;
  position: relative;
  text-align: center;
  animation: modalIn .3s ease;
}
@keyframes modalIn {
  from { transform: scale(.9) translateY(-20px); opacity: 0; }
  to   { transform: scale(1) translateY(0); opacity: 1; }
}
.modal-close-btn {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 32px;
  height: 32px;
  border: none;
  background: #f4f6fa;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #6B7A8D;
  transition: background .2s;
}
.modal-close-btn:hover { background: #e2e6ef; }
.modal-success-icon {
  width: 80px;
  height: 80px;
  background: #edfaf2;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
}
.modal-box h2 { font-size: 1.4rem; font-weight: 800; color: #1A2232; margin: 0 0 8px; }
.modal-box p { color: #6B7A8D; font-size: 15px; margin: 0 0 8px; }
.order-number-badge {
  display: inline-block;
  background: #eef3fb;
  color: #1B4F8C;
  font-size: 14px;
  font-weight: 700;
  padding: 6px 16px;
  border-radius: 8px;
  margin: 12px 0 24px;
}

/* ─── FORM FEEDBACK ──────────────────────────────────────── */
.field-error {
  font-size: 12px;
  color: #e53e3e;
  margin-top: 4px;
}
.form-control.valid { border-color: #2caa4a; }

/* ─── RESPONSIVE ─────────────────────────────────────────── */
@media (max-width: 680px) {
  .cart-table thead { display: none; }
  .cart-table tbody tr { display: block; padding: 16px; border-bottom: 1px solid #f0f1f5; }
  .cart-table tbody tr:last-child { border-bottom: none; }
  .cart-table td { padding: 0; }
  .cart-table tbody td:nth-child(1) { padding: 0 48px 12px 0; }
  .cart-table tbody td:nth-child(2),
  .cart-table tbody td:nth-child(3),
  .cart-table tbody td:nth-child(4) {
    display: inline-flex; align-items: center; vertical-align: middle; padding: 0 14px 0 0;
  }
  .cart-table tbody td:nth-child(5) {
    position: absolute; top: 12px; right: 12px; padding: 0;
    display: flex; align-items: center; justify-content: center;
  }
  .cart-product-name { max-width: 100%; white-space: normal; word-break: break-word; }
  .order-summary { position: static; }
  .checkout-summary { position: static; }
}
