:root {
  --commerce-ink: #26364a;
  --commerce-muted: #728093;
  --commerce-line: #dfe4ea;
  --commerce-blue: #0868f7;
  --commerce-bg: #f5f6f8;
  --commerce-card: #fff;
}

.commerce-body { min-width: 320px; color: var(--commerce-ink); background: var(--commerce-bg); }
.commerce-header { display: grid; min-height: 76px; place-items: center; padding: 13px 22px; background: #fff; box-shadow: 0 4px 15px rgba(30, 43, 61, .12); }
.commerce-logo { display: inline-flex; width: 152px; }
.commerce-logo img { display: block; width: 100%; height: auto; }
.commerce-main { width: min(100% - 42px, 1240px); margin: 0 auto; padding: 38px 0 54px; }
.commerce-heading { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin: 0 24px 14px; }
.commerce-heading h1 { margin: 5px 0 0; color: var(--commerce-ink); font-size: clamp(25px, 3vw, 31px); font-weight: 650; letter-spacing: -.035em; }
.commerce-heading h1 small { font-size: 15px; font-weight: 450; }
.commerce-kicker { color: #7662cf; font-size: 12px; font-weight: 650; letter-spacing: .14em; text-transform: uppercase; }
.commerce-back, .summary-card-head a { color: var(--commerce-blue); font-size: 13px; text-decoration: none; }
.commerce-back:hover, .summary-card-head a:hover { text-decoration: underline; }
.commerce-layout { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 22px; align-items: start; }
.cart-panel, .summary-card, .profile-card, .progress-card { border-radius: 6px; background: var(--commerce-card); box-shadow: 0 3px 12px rgba(32, 47, 65, .13); }
.cart-panel { overflow: hidden; }
.cart-panel-head { display: flex; align-items: center; justify-content: space-between; padding: 17px 24px; color: #687689; border-bottom: 1px solid var(--commerce-line); font-size: 12px; }
.cart-panel-head strong { color: var(--commerce-ink); font-size: 16px; }
.cart-items { padding: 0 24px; }
.cart-item { display: grid; grid-template-columns: 78px minmax(0, 1fr) 300px; gap: 16px; align-items: center; min-height: 142px; padding: 18px 0; border-bottom: 1px solid var(--commerce-line); }
.cart-item:last-child { border-bottom: 0; }
.cart-item-image { width: 78px; height: 78px; object-fit: contain; }
.cart-item-copy { min-width: 0; }
.cart-item-brand { color: #4c6a91; font-size: 12px; font-weight: 700; text-transform: uppercase; }
.cart-item-copy h2 { margin: 4px 0 2px; overflow: hidden; color: #28415e; font-size: 14px; font-weight: 600; line-height: 1.2; text-overflow: ellipsis; white-space: nowrap; }
.cart-item-copy p { max-width: 440px; margin: 0; overflow: hidden; color: #526579; font-size: 12px; line-height: 1.25; text-overflow: ellipsis; white-space: nowrap; }
.cart-item-actions { display: flex; gap: 18px; margin-top: 15px; }
.cart-item-actions a, .cart-item-actions button { padding: 0; color: var(--commerce-blue); border: 0; background: transparent; font-size: 12px; cursor: pointer; }
.cart-promo { display: inline-flex; margin-top: 6px; padding: 4px 8px; color: #fff; border-radius: 3px; background: #ff9d20; font-size: 12px; font-weight: 700; }
.cart-item-controls { display: grid; grid-template-columns: 30px 28px 30px minmax(90px, 1fr); gap: 10px; align-items: center; min-height: 76px; padding: 18px 16px; border-radius: 5px; background: #f8f9fb; }
.cart-item-controls button { display: grid; width: 30px; height: 30px; place-items: center; color: #48586b; border: 1px solid #b8c1cd; border-radius: 5px; background: #fff; font-size: 20px; line-height: 1; cursor: pointer; }
.cart-item-controls span { color: #46566a; font-size: 13px; text-align: center; }
.cart-item-controls strong { color: #344b66; font-size: 16px; text-align: right; white-space: nowrap; }
.summary-card { padding: 22px 24px 24px; }
.summary-card-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 26px; }
.summary-card h2 { margin: 0; color: var(--commerce-ink); font-size: 20px; font-weight: 650; }
.summary-line, .summary-total { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 14px 0; color: #44566b; font-size: 14px; border-bottom: 1px solid var(--commerce-line); }
.summary-total { padding: 16px 0; border-bottom: 0; font-size: 20px; font-weight: 700; }
.summary-note { margin: 0 0 24px; color: #9aa3ae; font-size: 12px; }
.commerce-primary, .commerce-dark { display: inline-flex; align-items: center; justify-content: center; min-height: 42px; padding: 10px 18px; color: #fff; border: 0; border-radius: 5px; background: var(--commerce-blue); box-shadow: 0 6px 14px rgba(8, 104, 247, .18); font-size: 13px; font-weight: 700; text-decoration: none; cursor: pointer; }
.summary-card .commerce-primary { width: 100%; }
.commerce-primary:hover { background: #0758d1; }
.recommendation-section { margin-top: 50px; }
.section-heading { display: flex; align-items: center; justify-content: space-between; margin: 0 24px 14px; }
.section-heading h2 { margin: 0; color: var(--commerce-ink); font-size: 21px; font-weight: 650; }
.section-heading span { color: #c7ccd2; font-size: 13px; letter-spacing: 3px; }
.section-heading span::first-letter { color: var(--commerce-blue); }
.recommendation-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; padding: 24px 12px 30px; border-radius: 6px; background: #fff; box-shadow: 0 3px 12px rgba(32, 47, 65, .1); }
.recommendation-grid .product-card { min-width: 0; }
.commerce-empty { display: grid; min-height: 430px; place-items: center; align-content: center; gap: 14px; padding: 40px; text-align: center; }
.commerce-empty h1 { margin: 0; font-size: 32px; }
.commerce-empty p { max-width: 430px; margin: 0 0 12px; color: var(--commerce-muted); font-size: 15px; }
.checkout-steps { display: flex; justify-content: center; gap: 22px; padding: 11px 20px; color: #a0a9b4; background: #eff1f4; box-shadow: 0 2px 5px rgba(30, 43, 61, .08); font-size: 12px; }
.checkout-steps span + span::before { margin-right: 22px; color: #c5cbd2; content: ">"; }
.checkout-steps .is-complete, .checkout-steps .is-active { color: var(--commerce-blue); }
.checkout-layout { grid-template-columns: minmax(0, 1fr) 360px; }
.profile-card { display: grid; gap: 16px; padding: 26px 22px 28px; }
.profile-card label { position: relative; display: grid; gap: 7px; color: #354b63; font-size: 12px; }
.profile-card input, .profile-card select { min-height: 38px; padding: 9px 11px; color: #536478; border: 1px solid #cbd4de; border-radius: 5px; background: #fff; font: inherit; }
.profile-card input:focus, .profile-card select:focus { outline: 2px solid rgba(8, 104, 247, .18); border-color: var(--commerce-blue); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-grid-doc { grid-template-columns: 1fr 1fr; }
.document-field { display: grid !important; gap: 7px !important; font-size: 12px !important; }
.document-input { display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: 7px; }
.document-input select, .document-input input { width: 100%; min-width: 0; font-size: 12px; }
.phone-input { display: grid; grid-template-columns: 52px 1fr; gap: 7px; }
.phone-input span { display: grid; min-height: 38px; place-items: center; color: #68788b; border: 1px solid #cbd4de; border-radius: 5px; background: #f7f8fa; font-size: 12px; }
.check-line { display: flex !important; grid-template-columns: none !important; align-items: flex-start; grid-template-rows: none !important; gap: 9px !important; font-size: 12px !important; line-height: 1.35; }
.check-line input { flex: 0 0 auto; width: 15px; min-height: 15px; margin-top: 1px; }
.check-line a { color: var(--commerce-blue); }
.commerce-dark { justify-self: end; min-width: 112px; background: #2d2d2d; box-shadow: none; }
.commerce-dark:hover { background: #111; }
.form-feedback { display: none; margin: -3px 0 0; color: #16884e; font-size: 12px; }
.form-feedback.is-visible { display: block; }
.checkout-side { display: grid; gap: 16px; }
.checkout-summary { min-height: 126px; }
.progress-card { display: grid; gap: 3px; padding: 20px; }
.progress-row { display: flex; align-items: center; gap: 13px; min-height: 57px; padding: 10px 12px; color: #9aa4af; border: 1px solid transparent; border-radius: 5px; }
.progress-row.is-active { color: var(--commerce-ink); border-color: #374151; }
.progress-row b { display: grid; width: 23px; height: 23px; place-items: center; border-radius: 4px; background: #eef0f3; font-size: 12px; }
.progress-row.is-active b { color: #fff; background: #333; }
.progress-row span { display: grid; gap: 2px; }
.progress-row strong { font-size: 13px; font-weight: 600; }
.progress-row small { font-size: 12px; }
.commerce-footer { display: flex; justify-content: space-between; gap: 20px; padding: 22px max(22px, calc((100vw - 1240px) / 2)); color: #8b96a3; background: #eceff2; font-size: 12px; }
.commerce-footer a { color: var(--commerce-blue); }

@media (max-width: 850px) {
  .commerce-main { width: min(100% - 28px, 650px); padding-top: 26px; }
  .commerce-layout, .checkout-layout { grid-template-columns: 1fr; }
  .summary-card, .checkout-side { order: -1; }
  .cart-item { grid-template-columns: 68px minmax(0, 1fr); align-items: start; }
  .cart-item-image { width: 68px; height: 68px; }
  .cart-item-controls { grid-column: 2; grid-template-columns: 30px 28px 30px minmax(90px, 1fr); width: 100%; }
  .recommendation-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 560px) {
  .commerce-header { min-height: 64px; }
  .commerce-logo { width: 132px; }
  .commerce-main { width: min(100% - 20px, 460px); padding-bottom: 32px; }
  .commerce-heading { align-items: flex-start; flex-direction: column; gap: 10px; margin-inline: 8px; }
  .commerce-heading h1 { font-size: 26px; }
  .commerce-layout { gap: 14px; }
  .cart-panel-head, .cart-items { padding-inline: 14px; }
  .cart-item { grid-template-columns: 58px minmax(0, 1fr); gap: 10px; padding-block: 15px; }
  .cart-item-image { width: 58px; height: 58px; }
  .cart-item-copy h2 { white-space: normal; }
  .cart-item-controls { grid-column: 1 / -1; grid-template-columns: 30px 28px 30px minmax(90px, 1fr); }
  .recommendation-grid { gap: 4px; padding-inline: 5px; }
  .checkout-steps { gap: 8px; font-size: 12px; }
  .checkout-steps span + span::before { margin-right: 8px; }
  .form-grid, .form-grid-doc { grid-template-columns: 1fr; }
  .commerce-dark { justify-self: stretch; }
  .commerce-footer { align-items: center; flex-direction: column; padding: 18px 12px; text-align: center; }
}
