:root {
  --dusa-text: #0f172a;
  --dusa-muted: #64748b;
  --dusa-line: #e9edf2;
  --dusa-bg: #f4f6f9;
  --dusa-blue: #1a56db;
  --dusa-navy: #0a2e6e;
  --dusa-red: #b91c1c;
}

.cart-page,
.cart-page *,
.invoice,
.invoice * {
  box-sizing: border-box;
}

.cart-page {
  padding: 20px 0 48px;
  overflow-x: hidden;
}

.cart-page h1 {
  font-size: 26px;
  font-weight: 700;
  margin: 0 0 16px;
}

/* Cart layout */
.cart-layout {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 24px;
  align-items: start;
  margin-top: 16px;
}

@media (max-width: 860px) {
  .cart-layout {
    grid-template-columns: 1fr;
  }

  .cart-summary {
    position: static !important;
  }
}

.cart-list {
  background: #fff;
  border: 1px solid var(--dusa-line);
  border-radius: 8px;
  overflow: hidden;
}

.cart-row {
  display: grid;
  grid-template-columns: 72px 1fr auto;
  gap: 14px;
  padding: 14px;
  align-items: center;
  border-bottom: 1px solid var(--dusa-line);
}

.cart-row:last-child {
  border-bottom: 0;
}

.cart-thumb img {
  width: 72px;
  height: 72px;
  object-fit: cover;
  border-radius: 6px;
  display: block;
}

.cart-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.cart-muted {
  font-size: 12.5px;
  color: var(--dusa-muted);
}

.cart-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--dusa-text);
  text-decoration: none;
}

.cart-title:hover {
  color: var(--dusa-blue);
}

.cart-meta {
  font-size: 13px;
  color: var(--dusa-muted);
}

.cart-price {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}

.cart-price-value {
  font-weight: 700;
  color: var(--dusa-navy);
  font-size: 16px;
  white-space: nowrap;
}

.cart-remove {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  color: var(--dusa-muted);
  font-size: 13px;
}

.cart-remove:hover {
  color: var(--dusa-red);
}

@media (max-width: 480px) {
  .cart-row {
    grid-template-columns: 64px 1fr;
    padding: 12px;
    gap: 10px 12px;
  }

  .cart-thumb {
    grid-column: 1;
    grid-row: 1 / span 2;
  }

  .cart-thumb img {
    width: 64px;
    height: 64px;
  }

  .cart-info {
    grid-column: 2;
    grid-row: 1;
  }

  .cart-price {
    grid-column: 2;
    grid-row: 2;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    width: 100%;
  }
}

/* Summary and form */
.cart-summary {
  background: #fff;
  border: 1px solid var(--dusa-line);
  border-radius: 8px;
  padding: 18px;
  position: sticky;
  top: 110px;
}

.cart-summary h2 {
  font-size: 18px;
  font-weight: 700;
  margin: 0 0 12px;
}

.cart-summary-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
  font-size: 15px;
  color: var(--dusa-text);
}

.cart-summary-line {
  font-size: 14px;
  color: var(--dusa-muted);
  margin-bottom: 8px;
}

.cart-note {
  font-size: 13px;
  color: var(--dusa-muted);
  margin: 12px 0 16px;
  line-height: 1.4;
}

#order-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.form-field {
  display: flex;
  flex-direction: column;
}

.form-field > label {
  font-size: 13px;
  font-weight: 600;
  color: var(--dusa-muted);
  margin-bottom: 6px;
}

.form-field .req {
  color: var(--dusa-red);
}

.form-field input[type="text"],
.form-field input[type="tel"],
.form-field select,
.form-field textarea {
  width: 100%;
  height: 40px;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  background: #fff;
  color: var(--dusa-text);
  font-size: 15px;
  padding: 0 12px;
  outline: none;
  transition: border-color 0.15s;
}

.form-field textarea {
  height: auto;
  min-height: 76px;
  padding: 10px 12px;
  resize: vertical;
}

.form-field input:focus,
.form-field textarea:focus,
.form-field select:focus {
  border-color: var(--dusa-blue);
}

.form-error {
  display: block;
  font-size: 13px;
  color: var(--dusa-red);
  margin-top: 4px;
}

.form-error:empty {
  display: none;
}

.form-general-error {
  display: block;
  font-size: 13px;
  color: var(--dusa-red);
  margin-top: 4px;
}

.form-general-error:empty {
  display: none;
}

.form-field-checkbox .cart-checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 14px;
  color: var(--dusa-text);
  font-weight: 400;
  margin-bottom: 0;
  cursor: pointer;
}

.form-field-checkbox input[type="checkbox"] {
  width: auto;
  height: auto;
  margin-top: 2px;
}

.cart-submit {
  width: 100%;
  height: 48px;
  border: none;
  border-radius: 8px;
  background: var(--dusa-blue);
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
}

.cart-submit:hover:not(:disabled) {
  background: var(--dusa-navy);
}

.cart-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.cart-notice {
  background: #fffbeb;
  border: 1px solid #fde68a;
  color: #92400e;
  padding: 12px 14px;
  border-radius: 8px;
  margin-bottom: 16px;
  font-size: 14px;
}

.cart-empty {
  background: #fff;
  border: 1px solid var(--dusa-line);
  border-radius: 8px;
  padding: 40px 20px;
  text-align: center;
}

.cart-empty h2 {
  font-size: 22px;
  margin: 0 0 16px;
}

.cart-empty .cart-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 40px;
  padding: 0 16px;
  border: 1px solid var(--dusa-blue);
  color: var(--dusa-blue);
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
}

.cart-empty .cart-link:hover {
  background: #eef3ff;
}

.cart-loading {
  color: var(--dusa-muted);
  font-size: 15px;
}

/* Invoice */
.invoice {
  background: #fff;
  border: 1px solid var(--dusa-line);
  border-radius: 8px;
  padding: 28px;
  max-width: 860px;
  margin: 0 auto;
}

.invoice-header {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
}

.invoice-brand .invoice-direct {
  font-weight: 700;
  font-size: 20px;
  color: var(--dusa-navy);
}

.invoice-muted {
  font-size: 13px;
  color: var(--dusa-muted);
  margin-top: 2px;
}

.invoice-title {
  text-align: right;
}

.invoice-title h1 {
  font-size: 22px;
  font-weight: 700;
  margin: 0;
  color: var(--dusa-navy);
}

.invoice-buyer {
  margin-bottom: 24px;
}

.invoice-buyer h2 {
  font-size: 16px;
  font-weight: 700;
  margin: 0 0 8px;
}

.invoice-buyer div {
  font-size: 14.5px;
  line-height: 1.5;
}

.invoice-table-wrap {
  overflow-x: auto;
  margin-bottom: 16px;
}

.invoice-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14.5px;
}

.invoice-table th {
  text-align: left;
  font-size: 12px;
  text-transform: uppercase;
  color: var(--dusa-muted);
  padding: 8px 10px;
  border: 1px solid var(--dusa-line);
  background: #fafbfc;
  font-weight: 600;
}

.invoice-table td {
  padding: 8px 10px;
  border: 1px solid var(--dusa-line);
  vertical-align: top;
}

.invoice-total td {
  font-weight: 700;
  background: #f8fafc;
}

.invoice-total td:last-child {
  white-space: nowrap;
}

.invoice-poa {
  color: var(--dusa-muted);
  font-size: 13px;
}

.invoice-delivery {
  font-size: 14.5px;
  margin-bottom: 12px;
}

.invoice-note {
  font-size: 14px;
  color: var(--dusa-muted);
  margin-bottom: 16px;
  line-height: 1.5;
}

.invoice-status {
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 14px;
  margin-bottom: 16px;
}

.invoice-status.ok {
  background: #ecfdf5;
  color: #065f46;
  border: 1px solid #a7f3d0;
}

.invoice-status.warn {
  background: #fffbeb;
  color: #92400e;
  border: 1px solid #fde68a;
}

.invoice-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.invoice-actions button,
.invoice-actions a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 16px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #fff;
  color: var(--dusa-text);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}

.invoice-actions button:hover,
.invoice-actions a:hover {
  border-color: var(--dusa-blue);
  color: var(--dusa-blue);
}

/* Header badge */
.cart-link,
.site-header .cart-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #0f172a;
  font-size: 14.5px;
  font-weight: 600;
  text-decoration: none;
  height: 38px;
  padding: 0 12px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #fff;
  line-height: 1;
  box-sizing: border-box;
}

.cart-link:hover,
.site-header .cart-link:hover {
  border-color: #1a56db;
}

.cart-badge,
.site-header .cart-badge {
  min-width: 20px;
  height: 20px;
  border-radius: 10px;
  background: #1a56db;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 6px;
  line-height: 1;
  box-sizing: border-box;
}

button[data-cart-add].btn-cart-in {
  background: #eef3ff;
  color: #1a56db;
  border-color: #1a56db;
}

button[data-cart-add][disabled] {
  opacity: 0.6;
  cursor: not-allowed;
}

@media print {
  .site-header,
  .site-footer,
  .no-print,
  .mobile-cta {
    display: none !important;
  }

  .invoice-status {
    display: none !important;
  }

  body {
    background: #fff !important;
  }

  .invoice {
    border: none;
    width: 100%;
    max-width: none;
    padding: 0;
  }
}

/* phone: cart button same height as the icon buttons (this file loads after header.css) */
@media (max-width: 860px) { .site-header .cart-link { height: 34px; padding: 0 10px; font-size: 13px; } }

/* ===== cart page in the store style (2026-10-16) ===== */
.cart-page { padding: 28px 0 56px; background: #f4f6f9; }
.cart-page .container { max-width: 1120px; margin: 0 auto; }
.cart-page h1 { display: flex; align-items: center; gap: 10px; font-size: 26px; font-weight: 700; color: #0f172a; letter-spacing: -0.3px; margin: 6px 0 18px; }
.cart-page h1 .cart-ico { width: 26px; height: 26px; color: #0a2e6e; flex-shrink: 0; }
.cart-layout { grid-template-columns: minmax(0, 1fr) 380px; gap: 20px; margin-top: 0; }
.cart-summary { top: 116px; }
.cart-summary h2 { color: #0f172a; }
.cart-list, .cart-summary, .cart-empty { border-color: #e2e8f0; }
.form-field > label { color: #334155; }
.form-field input[type="text"], .form-field input[type="tel"], .form-field textarea { border-color: #e2e8f0; color: #0f172a; }

/* own dropdowns: city suggestions + delivery list */
.combo { position: relative; }
.dsel-btn { width: 100%; height: 40px; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 0 12px;
  border: 1px solid #e2e8f0; border-radius: 6px; background: #fff; color: #0f172a; font: inherit; font-size: 15px; text-align: left; cursor: pointer; }
.dsel-btn svg { color: #64748b; flex-shrink: 0; transition: transform .15s; }
.dsel-btn[aria-expanded="true"] { border-color: #1a56db; }
.dsel-btn[aria-expanded="true"] svg { transform: rotate(180deg); }
.dsel-btn:focus-visible, .combo input:focus { outline: none; border-color: #1a56db; }
.dsel-value.is-placeholder { color: #94a3b8; }
.combo-list { position: absolute; z-index: 30; left: 0; right: 0; top: calc(100% + 4px); margin: 0; padding: 4px; list-style: none;
  background: #fff; border: 1px solid #e2e8f0; border-radius: 8px; max-height: 264px; overflow-y: auto; box-shadow: 0 6px 18px rgba(15, 23, 42, .08); }
.combo-opt { padding: 8px 10px; border-radius: 6px; font-size: 14.5px; color: #0f172a; cursor: pointer; line-height: 1.35; }
.combo-opt:hover, .combo-opt.is-active { background: #eef3ff; color: #0a2e6e; }
.combo-opt.is-selected { background: #1a56db; color: #fff; }
.combo-opt.is-selected.is-active, .combo-opt.is-selected:hover { background: #1749b8; color: #fff; }

/* header cart button icon */
.site-header .cart-link .cart-ico { width: 18px; height: 18px; color: #0a2e6e; flex-shrink: 0; }

@media (max-width: 860px) {
  .cart-page { padding-top: 18px; }
  .cart-page h1 { font-size: 22px; margin-bottom: 14px; }
  .cart-page h1 .cart-ico { width: 22px; height: 22px; }
}
@media (max-width: 600px) {
  .site-header .cart-link .cart-label { display: none; }
}
@media (max-width: 860px) { .cart-layout { grid-template-columns: 1fr; } .cart-summary { position: static; } }
.dsel-btn svg { transition: none; }

/* ===== cart: balanced two-column checkout (2026-10-16) ===== */
.cart-main { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.cart-checkout { background: #fff; border: 1px solid #e2e8f0; border-radius: 8px; padding: 18px 20px 20px; }
.cart-checkout h2 { font-size: 18px; font-weight: 700; color: #0f172a; margin: 0 0 14px; }
.cart-checkout #order-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 16px; }
.cart-checkout #order-form .form-field:has(#order-address),
.cart-checkout #order-form .form-field:has(#order-comment),
.cart-checkout #order-form .form-field:has(#order-telegram),
.cart-checkout #order-form .form-general-error { grid-column: 1 / -1; }
.cart-summary { align-self: start; }
.cart-summary .cart-submit { margin-top: 4px; }
@media (max-width: 720px) { .cart-checkout #order-form { grid-template-columns: 1fr; } }
.cart-page { overflow-x: clip; }

.cart-acct-note { margin: 0 0 14px; padding: 10px 12px; border-radius: 8px; background: #eef3ff; color: #1e3a8a; font-size: 14px; line-height: 1.5; }
.cart-acct-note a { color: #1a56db; font-weight: 600; }
