/* =========================================================================
   Cart system styles — header icon, drawer, /cart/, /checkout/
   Color tokens:
     --dk-green: #1E9B18  (primary CTA)
     --dk-green-d: #187f13
     --dk-dark: #161616
     --dk-accent: #7C0DC6 (icon/badge accent only)
     --dk-orange: #F97316 (warning)
     --dk-grey-bg: #F8F8F8
     --dk-border: #F0F0F0
     --dk-text: #363636
   ========================================================================= */

/* ----------- Header cart icon button ----------- */
.cart-icon-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    vertical-align: middle;
    align-self: center;
    width: 45px;
    height: 45px;
    min-width: 45px;
    margin: 0 12px;
    border-radius: 12px;
    background: #f8f8f8;
    border: 1.5px solid #E6E6E6;
    color: #161616;
    transition: 0.2s ease;
    flex-shrink: 0;
    text-decoration: none;
}
.cart-icon-btn:hover,
.cart-icon-btn:focus {
    color: #161616;
    border-color: #161616;
    background: #fff;
}
.cart-icon-btn__icon {
    width: 22px;
    height: 22px;
    stroke: #161616;
    fill: none;
    display: block;
}
.cart-icon-btn:hover .cart-icon-btn__icon {
    stroke: #161616;
}
.cart-icon-btn__counter {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    border-radius: 10px;
    background: #1E9B18;
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    line-height: 20px;
    text-align: center;
    box-shadow: 0 0 0 2px #fff;
    pointer-events: none;
    transition: transform 0.2s ease;
}
.cart-icon-btn__counter[hidden] {
    display: none !important;
}
.cart-icon-btn__counter.is-bump {
    transform: scale(1.18);
}

/* ----------- Drawer ----------- */
.cart-drawer {
    position: fixed;
    inset: 0;
    z-index: 12000;
    visibility: hidden;
    pointer-events: none;
}
.cart-drawer.is-open {
    visibility: visible;
    pointer-events: auto;
}
.cart-drawer__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(3, 4, 24, 0.5);
    opacity: 0;
    transition: opacity 0.3s ease;
}
.cart-drawer.is-open .cart-drawer__backdrop {
    opacity: 1;
}
.cart-drawer__inner {
    position: absolute;
    top: 0;
    right: 0;
    width: 100%;
    max-width: 460px;
    height: 100%;
    background: #fff;
    box-shadow: -8px 0 32px rgba(0, 0, 0, 0.12);
    transform: translateX(100%);
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
}
.cart-drawer.is-open .cart-drawer__inner {
    transform: translateX(0);
}
.cart-drawer__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid #F0F0F0;
    flex-shrink: 0;
}
.cart-drawer__title {
    font-size: 20px;
    font-weight: 600;
    color: #161616;
    margin: 0;
    width: auto;
}
.cart-drawer__close {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: transparent;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #363636;
    flex-shrink: 0;
}
.cart-drawer__close .svg-icon {
    width: 20px;
    height: 20px;
    stroke: #161616;
    fill: none;
}
.cart-drawer__close:hover {
    background: #F8F8F8;
}
.cart-drawer__body {
    flex: 1 1 auto;
    overflow-y: auto;
    padding: 28px 24px 16px;
}
.cart-drawer__loading {
    text-align: center;
    color: #767676;
    padding: 40px 0;
    font-size: 14px;
}
.cart-drawer__footer {
    flex-shrink: 0;
    padding: 16px 24px 20px;
    border-top: 1px solid #F0F0F0;
    background: #fff;
}
.cart-drawer__footer[hidden],
.cart-drawer__footer.is-hidden {
    display: none !important;
}
.cart-drawer__cta {
    width: 100%;
    height: 52px;
    border-radius: 12px;
    font-weight: 600;
    margin-top: 12px;
}
.cart-drawer__hint {
    font-size: 12px;
    color: #767676;
    margin: 10px 0 0;
    text-align: center;
    line-height: 1.4;
}

/* ----------- Cart items list (drawer + cart page shared) ----------- */
.cart-list {
    list-style: none;
    padding: 0;
    margin: 0 0 16px;
}
.cart-list li {
    margin: 0;
}
.cart-item {
    display: flex;
    gap: 12px;
    padding: 14px 0;
    border-bottom: 1px solid #F0F0F0;
}
.cart-item:last-child {
    border-bottom: none;
}
.cart-item__image {
    width: 64px;
    height: 64px;
    flex-shrink: 0;
    border-radius: 12px;
    background: #F8F8F8;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}
.cart-item__image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}
.cart-item__main {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.cart-item__name {
    font-size: 14px;
    font-weight: 500;
    color: #161616;
    line-height: 1.35;
    text-decoration: none;
    display: block;
    width: auto;
    word-break: break-word;
}
.cart-item__name:hover {
    color: #161616;
}
.cart-item__bundle-tag {
    font-size: 12px;
    color: #1E9B18;
    font-weight: 500;
    line-height: 1.3;
}
.cart-item__row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 4px;
    gap: 8px;
}
.cart-item__price {
    font-size: 16px;
    font-weight: 600;
    color: #161616;
    white-space: nowrap;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
    text-align: right;
    line-height: 1.2;
    margin-left: auto;
}
.cart-item__price-base {
    font-size: 12px;
    color: #767676;
    text-decoration: line-through;
    font-weight: 400;
    line-height: 1.2;
}
.cart-item__discount-pct {
    display: inline-flex;
    align-items: center;
    height: 18px;
    padding: 0 7px;
    border-radius: 999px;
    background: #1E9B18;
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    line-height: 1;
    align-self: flex-end;
}
.cart-item__price-final {
    color: #161616;
    font-size: 16px;
    line-height: 1.2;
}
.cart-item__remove {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    background: transparent;
    border: none;
    cursor: pointer;
    color: #767676;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.cart-item__remove:hover {
    background: #FCECED;
    color: #c0392b;
}
.cart-item__remove .svg-icon {
    width: 18px;
    height: 18px;
    stroke: currentColor;
    fill: none;
}
.cart-item__unavailable {
    font-size: 12px;
    color: #F97316;
    margin-top: 2px;
}

/* ----------- Quantity stepper ----------- */
.cart-qty {
    display: inline-flex;
    align-items: center;
    height: 32px;
    border: 1.5px solid #E6E6E6;
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
}
.cart-qty__btn {
    width: 30px;
    height: 30px;
    border: none;
    background: transparent;
    cursor: pointer;
    color: #161616;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}
.cart-qty__btn:hover {
    background: #F8F8F8;
}
.cart-qty__btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}
.cart-qty__btn .svg-icon {
    width: 16px;
    height: 16px;
    stroke: currentColor;
    fill: none;
}
.cart-qty__value {
    width: 36px;
    text-align: center;
    font-size: 14px;
    font-weight: 500;
    color: #161616;
    user-select: none;
}

/* ----------- Bundle plates ----------- */
.cart-bundles {
    margin: 0 0 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.cart-bundle {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 14px;
    border-radius: 12px;
    background: #E5F4EF;
    border: 1px solid rgba(30, 155, 24, 0.18);
    color: #14651e;
    font-size: 13px;
    line-height: 1.4;
}
.cart-bundle--suggest {
    background: #FFF4E6;
    border-color: rgba(249, 115, 22, 0.25);
    color: #8a3d05;
}
.cart-bundle__icon {
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    margin-top: 1px;
}
.cart-bundle__body {
    flex: 1 1 auto;
    min-width: 0;
}
.cart-bundle__title {
    font-weight: 600;
    margin: 0 0 4px;
    font-size: 14px;
    line-height: 1.35;
}
.cart-bundle__desc {
    margin: 0;
    font-size: 13px;
    line-height: 1.5;
    opacity: 0.95;
}
.cart-bundle__action {
    margin-top: 12px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 38px;
    padding: 0 14px;
    background: #161616;
    color: #fff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 500;
    font-family: inherit;
}
.cart-bundle__action:hover {
    background: #363636;
}

/* ----------- Promo input ----------- */
.cart-promo {
    margin: 0 0 16px;
    border-top: 1px solid #F0F0F0;
    padding-top: 14px;
}
.cart-promo__toggle {
    background: none;
    border: none;
    color: #161616;
    cursor: pointer;
    padding: 0;
    font-size: 13px;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-family: inherit;
    text-decoration: underline;
    text-decoration-style: dashed;
    text-decoration-thickness: 1px;
    text-decoration-color: rgba(22, 22, 22, 0.45);
    text-underline-offset: 4px;
    transition: text-decoration-color 0.15s ease, color 0.15s ease;
}
.cart-promo__toggle:hover {
    color: #363636;
    text-decoration-color: #161616;
}
.cart-promo.is-applied .cart-promo__toggle {
    text-decoration: none;
}
.cart-promo__panel {
    margin-top: 10px;
    display: none;
}
.cart-promo.is-open .cart-promo__panel {
    display: block;
}
.cart-promo.is-applied .cart-promo__toggle::before {
    content: "";
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #1E9B18;
    margin-right: 6px;
}
.cart-promo__row {
    display: flex;
    gap: 8px;
    align-items: stretch;
}
.cart-promo__row input {
    flex: 1 1 auto;
    height: 48px;
    padding: 0 16px;
    border-radius: 12px;
    border: 1.5px solid #E6E6E6;
    background: #f8f8f8;
    font-size: 14px;
    color: #161616;
    box-shadow: none;
    outline: none;
    transition: border-color 0.15s ease, background 0.15s ease;
}
.cart-promo__row input:focus {
    border-color: #161616;
    background: #fff;
}
.cart-promo__btn {
    height: 48px;
    padding: 0 20px;
    border-radius: 12px;
    background: #161616;
    color: #fff;
    border: none;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    font-family: inherit;
    flex-shrink: 0;
}
.cart-promo__btn:hover {
    background: #363636;
}
.cart-promo__btn[disabled] {
    opacity: 0.5;
    cursor: not-allowed;
}
.cart-promo__msg {
    margin-top: 8px;
    font-size: 12px;
    line-height: 1.4;
}
.cart-promo__msg--ok {
    color: #1E9B18;
}
.cart-promo__msg--warn {
    color: #F97316;
}
.cart-promo__msg--err {
    color: #c0392b;
}

/* ----------- Totals (drawer + summary) ----------- */
@keyframes dk-cart-recalc {
    0% { opacity: 0.45; transform: translateY(-2px); }
    100% { opacity: 1; transform: translateY(0); }
}
[data-cart-totals] .cart-totals {
    animation: dk-cart-recalc 0.22s ease;
}
.cart-totals {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 14px;
    color: #363636;
}
.cart-totals__row {
    position: relative;
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px;
    line-height: 1.4;
}
.cart-totals__row::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 5px;
    border-bottom: 2px dotted #d9d9d9;
    pointer-events: none;
}
.cart-totals__row > span,
.cart-totals__row > strong {
    position: relative;
    z-index: 1;
    background: #fff;
}
.cart-totals__row > :first-child {
    padding-right: 8px;
}
.cart-totals__row > :last-child {
    padding-left: 8px;
    text-align: right;
}
.cart-totals__row--total::before {
    display: none;
}
.cart-totals__row--discount {
    color: #1E9B18;
}
.cart-totals__row--total {
    margin-top: 6px;
    padding-top: 10px;
    border-top: 1px solid #F0F0F0;
    font-size: 18px;
    font-weight: 600;
    color: #161616;
}
.cart-cumulative-note {
    margin: 8px 0 0;
    font-size: 12px;
    color: #1E9B18;
    line-height: 1.4;
}

/* ----------- Empty state ----------- */
.cart-empty {
    text-align: center;
    padding: 56px 24px 64px;
    max-width: 520px;
    margin: 0 auto;
}
.cart-empty__illustration {
    width: 200px;
    height: 160px;
    margin: 0 auto 20px;
    display: block;
}
.cart-empty__title {
    font-size: 22px;
    font-weight: 700;
    color: #161616;
    margin: 0 0 10px;
}
.cart-empty__text {
    color: #767676;
    font-size: 14px;
    margin: 0 auto 24px;
    line-height: 1.55;
    max-width: 380px;
}
.cart-empty__cta-group {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}
.cart-empty__cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 48px;
    padding: 0 22px;
    border-radius: 12px;
    background: #161616;
    color: #fff;
    font-size: 14px;
    font-weight: 500;
    width: auto;
    min-width: 180px;
    text-decoration: none;
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.cart-empty__cta:hover {
    background: #2d2d2d;
    color: #fff;
}
.cart-empty__cta--ghost {
    background: transparent;
    color: #161616;
    border: 1px solid #E5E5E5;
}
.cart-empty__cta--ghost:hover {
    background: #F5F5F7;
    color: #161616;
    border-color: #D4D4D4;
}

/* ----------- /cart/ page ----------- */
.cart-page {
    padding-bottom: 60px;
}
.cart-page h1 {
    margin: 0 0 24px;
}
.checkout-page {
    padding-bottom: 60px;
}
.cart-page__layout {
    display: grid;
    grid-template-columns: minmax(0, 1.85fr) minmax(0, 1fr);
    gap: 24px;
    align-items: start;
}
.cart-page__main {
    background: #fff;
    border: 1px solid #F0F0F0;
    border-radius: 16px;
    padding: 24px;
}
.cart-page__items {
    margin: 0 0 24px;
}
.cart-page__items .cart-item {
    padding: 16px 0;
}
.cart-page__items .cart-item__image {
    width: 88px;
    height: 88px;
}
.cart-page__items .cart-item__name {
    font-size: 16px;
}
.cart-page__items .cart-item__price {
    font-size: 16px;
}

.cart-page__sidebar {
    position: sticky;
    top: 100px;
    background: #fff;
    border: 1px solid #F0F0F0;
    border-radius: 16px;
    padding: 24px;
}
.cart-page__sidebar h3 {
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 16px;
    color: #161616;
    width: auto;
}
.cart-page__sidebar .cart-totals {
    margin-bottom: 16px;
}
.cart-page__sidebar .cart-promo {
    margin: 16px 0 16px;
    border-top: 1px solid #F0F0F0;
    padding-top: 14px;
}
.cart-page__sidebar .btn-checkout {
    width: 100%;
    height: 56px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 16px;
}
.cart-page__sidebar .btn-checkout:disabled,
.cart-page__sidebar .btn-checkout[disabled] {
    background: #E5E7EB;
    color: #9CA3AF;
    cursor: not-allowed;
    pointer-events: none;
}
.cart-page__sidebar .cart-page__hint {
    font-size: 12px;
    color: #767676;
    text-align: left;
    line-height: 1.5;
    margin: 12px 0 0;
    line-height: 1.45;
}

/* ----------- /checkout/ page ----------- */
.checkout-page h1 {
    margin: 0 0 24px;
}
.checkout-page__layout {
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
    gap: 24px;
    align-items: start;
}
.checkout-page__form {
    background: #fff;
    border: 1px solid #F0F0F0;
    border-radius: 16px;
    padding: 24px;
}
.checkout-page__tabs {
    display: flex;
    gap: 4px;
    background: #F8F8F8;
    border-radius: 12px;
    padding: 4px;
    margin: 0 0 20px;
    list-style: none;
}
.checkout-page__tabs li {
    flex: 1 1 50%;
    margin: 0;
    list-style: none;
}
.checkout-page__tabs li button {
    width: 100%;
    height: 40px;
    padding: 0 12px;
    background: transparent;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: #363636;
    font-family: inherit;
    transition: 0.15s;
}
.checkout-page__tabs li button.is-active {
    background: #fff;
    color: #161616;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}
.checkout-page__tab {
    display: none;
}
.checkout-page__tab.is-active {
    display: block;
}

/* ----- Inline checkout на /cart/ (физ. лицо) ----- */
.cart-checkout-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 4px;
}
.cart-checkout-form__field input {
    width: 100%;
    height: 48px;
    padding: 0 16px;
    border-radius: 12px;
    border: 1.5px solid #E6E6E6;
    background: #F8F8F8;
    font-size: 14px;
    color: #161616;
    outline: none;
    box-shadow: none;
    transition: border-color 0.15s ease, background 0.15s ease;
}
.cart-checkout-form__field input:focus {
    border-color: #161616;
    background: #fff;
}
.cart-checkout-form__consent {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 13px;
    line-height: 1.4;
    color: #475569;
    cursor: pointer;
    user-select: none;
}
.cart-checkout-form__consent input[type=checkbox] {
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    margin-top: 1px;
    accent-color: #161616;
    cursor: pointer;
}
.cart-checkout-form__consent a {
    color: #161616;
    text-decoration: underline;
    text-underline-offset: 2px;
}
.cart-checkout-form__cta {
    width: 100%;
    margin-top: 4px;
}
.cart-checkout-form__email-hint {
    margin: 0;
    font-size: 12px;
    color: #64748B;
    text-align: center;
}
.cart-checkout-form__email-hint strong {
    color: #161616;
    word-break: break-all;
}
.cart-checkout-form__error {
    display: none;
    color: #c62828;
    background: #ffebee;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 13px;
    line-height: 1.4;
    margin: 0;
}
.cart-checkout-form__error.is-shown {
    display: block;
}
.cart-checkout-form__consent-text {
    margin: 4px 0 0;
    font-size: 12px;
    color: #767676;
    line-height: 1.5;
    text-align: left;
}
.cart-checkout-form__consent-text a,
.cart-legal-modal__consent-text a {
    display: inline !important;
    color: #161616;
    text-decoration: underline;
    text-underline-offset: 2px;
}
.cart-checkout-form__consent-text a:hover,
.cart-legal-modal__consent-text a:hover {
    color: #2d2d2d;
}
.cart-legal-modal__consent-text {
    margin: 6px 0 0;
    font-size: 12px;
    color: #767676;
    line-height: 1.5;
    text-align: left;
}

/* ----- Скромная ссылка для юр.лиц ----- */
.cart-legal-link {
    background: none;
    border: none;
    margin: 14px auto 0;
    padding: 6px 4px;
    display: block;
    color: #64748B;
    font-size: 13px;
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 2px;
    text-decoration-color: rgba(100, 116, 139, 0.4);
    transition: color 0.15s ease, text-decoration-color 0.15s ease;
    font-family: inherit;
}
.cart-legal-link:hover,
.cart-legal-link:focus {
    color: #161616;
    text-decoration-color: #161616;
    outline: none;
}

/* ----- Модалка юр.лица ----- */
.cart-legal-modal {
    position: fixed;
    inset: 0;
    z-index: 1100;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}
.cart-legal-modal[hidden] {
    display: none;
}
.cart-legal-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(22, 22, 22, 0.45);
    backdrop-filter: blur(2px);
    animation: cart-legal-fade .2s ease-out;
}
.cart-legal-modal__inner {
    position: relative;
    z-index: 1;
    background: #fff;
    border-radius: 18px;
    padding: 32px 28px 24px;
    width: 100%;
    max-width: 460px;
    max-height: calc(100vh - 32px);
    overflow-y: auto;
    box-shadow: 0 24px 60px rgba(22, 22, 22, .25);
    animation: cart-legal-pop .25s ease-out;
}
@keyframes cart-legal-fade {
    from { opacity: 0; }
    to   { opacity: 1; }
}
@keyframes cart-legal-pop {
    from { opacity: 0; transform: translateY(12px) scale(0.98); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}
.cart-legal-modal__close {
    position: absolute;
    top: 12px;
    right: 12px;
    background: transparent;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    color: #64748B;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s ease, color 0.15s ease;
}
.cart-legal-modal__close:hover {
    background: #F1F5F9;
    color: #161616;
}
.cart-legal-modal__title {
    margin: 0 0 8px;
    font-size: 22px;
    font-weight: 700;
    color: #161616;
}
.cart-legal-modal__sub {
    margin: 0 0 20px;
    color: #64748B;
    font-size: 14px;
    line-height: 1.5;
}
body.cart-legal-open {
    overflow: hidden;
}

/* ----- Юр.лицо: блок успешной отправки заявки ----- */
.checkout-legal-success {
    text-align: center;
    padding: 24px 8px 8px;
}
.checkout-legal-success__icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.checkout-legal-success__icon svg {
    width: 100%;
    height: 100%;
    animation: checkout-legal-success-pop .35s ease-out;
}
@keyframes checkout-legal-success-pop {
    0% { transform: scale(0.6); opacity: 0; }
    60% { transform: scale(1.05); opacity: 1; }
    100% { transform: scale(1); opacity: 1; }
}
.checkout-legal-success__title {
    font-size: 22px;
    font-weight: 700;
    color: #161616;
    margin: 0 0 10px;
}
.checkout-legal-success__text {
    color: #475569;
    font-size: 14px;
    line-height: 1.5;
    max-width: 420px;
    margin: 0 auto 14px;
}
.checkout-legal-success__sub {
    color: #767676;
    font-size: 13px;
    margin: 0 0 20px;
}
.checkout-legal-success__sub strong {
    color: #161616;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}
.checkout-legal-success__actions {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}
.checkout-legal-success__actions .btn {
    min-width: 180px;
}
.checkout-form label {
    margin-bottom: 12px;
}
.checkout-form input[type="text"],
.checkout-form input[type="email"],
.checkout-form input[type="tel"],
.checkout-form textarea {
    width: 100%;
    height: 48px;
    padding: 0 16px;
    border-radius: 12px;
    border: 1.5px solid #E6E6E6;
    background: #F8F8F8;
    font-size: 14px;
    color: #161616;
    outline: none;
    box-shadow: none;
    transition: border-color 0.15s ease, background 0.15s ease;
}
.checkout-form input[type="text"]:focus,
.checkout-form input[type="email"]:focus,
.checkout-form input[type="tel"]:focus,
.checkout-form textarea:focus {
    border-color: #161616;
    background: #fff;
}
.checkout-form textarea {
    height: 100px;
    padding: 12px 16px;
}
.checkout-form input[readonly] {
    background: #F0F0F0;
    color: #767676;
    cursor: not-allowed;
}
.checkout-form .consent {
    font-size: 13px;
    color: #767676;
    line-height: 1.5;
    margin: 8px 0 16px;
    width: 100%;
}
.checkout-form .consent--checkbox {
    display: flex !important;
    flex-direction: row !important;
    align-items: flex-start;
    gap: 10px;
    width: 100%;
    max-width: none;
    margin: 0 0 16px;
    background: transparent;
    border: none;
    padding: 0;
    height: auto;
    cursor: pointer;
}
.checkout-form .consent--checkbox > input[type="checkbox"] {
    width: 18px !important;
    height: 18px !important;
    min-width: 18px;
    margin: 2px 0 0;
    flex: 0 0 18px;
    background: #fff;
    border: 1.5px solid #E6E6E6;
    border-radius: 4px;
    padding: 0;
    box-shadow: none;
    appearance: auto;
    -webkit-appearance: auto;
    cursor: pointer;
}
.checkout-form .consent--checkbox > span {
    flex: 1 1 auto;
    min-width: 0;
    line-height: 1.5;
}
.checkout-form .consent a {
    color: #161616;
    display: inline;
    text-decoration: underline;
}
.checkout-form .consent a:hover {
    color: #363636;
}
.checkout-form__cta {
    width: 100%;
    height: 56px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 16px;
}
.checkout-form__hint {
    margin: 12px 0 0;
    font-size: 12px;
    color: #767676;
    text-align: center;
    line-height: 1.5;
}
.checkout-form__error {
    margin: 12px 0 0;
    padding: 10px 14px;
    border-radius: 8px;
    background: #FCECED;
    color: #c0392b;
    font-size: 13px;
    line-height: 1.5;
    display: none;
}
.checkout-form__error.is-shown {
    display: block;
}
.checkout-page__summary {
    position: sticky;
    top: 100px;
    background: #fff;
    border: 1px solid #F0F0F0;
    border-radius: 16px;
    padding: 24px;
}
.checkout-page__summary h3 {
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 16px;
    color: #161616;
    width: auto;
}
.checkout-page__summary-list {
    list-style: none;
    padding: 0;
    margin: 0 0 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.checkout-page__summary-list li {
    margin: 0;
    display: flex;
    gap: 10px;
    align-items: flex-start;
    font-size: 14px;
    color: #363636;
}
.checkout-page__summary-list li img {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    background: #F8F8F8;
    object-fit: contain;
    flex-shrink: 0;
}
.checkout-page__summary-list li .name {
    flex: 1 1 auto;
    min-width: 0;
    line-height: 1.35;
}
.checkout-page__summary-list li .qty {
    font-size: 12px;
    color: #767676;
    margin-top: 2px;
}
.checkout-page__summary-list li .price {
    font-weight: 600;
    color: #161616;
    white-space: nowrap;
}
/* Итоги в правой колонке /checkout/ — крупнее и яснее */
.checkout-page__summary .cart-totals {
    border-top: 1px solid #F0F0F0;
    padding-top: 16px;
    gap: 10px;
    font-size: 15px;
}
.checkout-page__summary .cart-totals__row--total {
    font-size: 22px;
    font-weight: 700;
    margin-top: 10px;
    padding-top: 14px;
    border-top: 1px solid #E6E6E6;
}
.checkout-page__summary .cart-totals__row--total span:last-child {
    color: #161616;
}
.checkout-page__summary .cart-cumulative-note {
    margin-top: 12px;
    font-size: 12px;
    color: #1E9B18;
}

/* ----------- Product detail card buttons ----------- */
.product-add-to-cart {
    margin-top: 12px;
    width: 100%;
    height: 48px;
    border-radius: 12px;
    background: #fff;
    border: 1.5px solid #161616;
    color: #161616;
    font-weight: 500;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: inherit;
    font-size: 15px;
    transition: 0.15s;
}
.product-add-to-cart:hover {
    background: #161616;
    color: #fff;
}
.product-add-to-cart .svg-icon {
    width: 20px;
    height: 20px;
    stroke: currentColor;
    fill: none;
}
.product-add-to-cart[disabled] {
    opacity: 0.6;
    cursor: not-allowed;
}

/* ----------- Profile orders multi-item ----------- */
.order-card__items {
    margin: 14px 0 0;
    border-top: 1px solid #F0F0F0;
    padding-top: 14px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.order-item-row {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    padding: 10px 0;
    border-radius: 0;
    background: transparent;
}
.order-item-row + .order-item-row {
    border-top: 1px solid #F0F0F0;
}
.order-item-row__image {
    width: 56px;
    height: 56px;
    flex-shrink: 0;
    border-radius: 8px;
    background: #fff;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}
.order-item-row__image img {
    max-width: 100%;
    max-height: 100%;
}
.order-item-row__main {
    flex: 1 1 auto;
    min-width: 0;
}
.order-item-row__head {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    justify-content: space-between;
    margin: 0 0 4px;
}
.order-item-row__name {
    font-size: 14px;
    font-weight: 500;
    color: #161616;
    margin: 0;
    line-height: 1.35;
    flex: 1 1 auto;
    min-width: 0;
}
.order-item-row__name a {
    color: inherit;
    display: inline;
}
.order-item-row__name a:hover {
    color: #161616;
}
.order-item-row__review-btn {
    flex: 0 0 auto;
    height: 32px !important;
    line-height: 1 !important;
    padding: 0 12px !important;
    font-size: 12px !important;
    border-radius: 8px !important;
    white-space: nowrap;
}
.order-item-row__review-badge {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 24px;
    padding: 0 10px;
    border-radius: 999px;
    background: #E8F5E8;
    color: #1E9B18;
    font-size: 12px;
    font-weight: 500;
    white-space: nowrap;
    line-height: 1;
}
.order-item-row__review-badge::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #1E9B18;
}
.order-item-row__meta {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    font-size: 12px;
    color: #767676;
    margin: 0 0 8px;
}
.order-item-row__meta-qty {
    color: #767676;
}
.order-item-row__meta-total {
    color: #161616 !important;
    font-weight: 700;
    font-size: 15px;
    white-space: nowrap;
    line-height: 1.2;
}
.order-item-row__instructions-toggle {
    margin-top: 8px;
}
.order-item-row__instructions-toggle summary {
    cursor: pointer;
    color: #161616;
    font-size: 13px;
    font-weight: 500;
}
.order-item-row__instructions-toggle .order-detail-card__instructions {
    margin-top: 8px;
}
@media (max-width: 540px) {
    .order-item-row__head {
        flex-direction: column;
        align-items: stretch;
    }
    .order-item-row__review-btn,
    .order-item-row__review-badge {
        align-self: flex-start;
    }
    .cart-legal-modal {
        padding: 0;
        align-items: flex-end;
    }
    .cart-legal-modal__inner {
        max-width: 100%;
        max-height: 92vh;
        border-radius: 18px 18px 0 0;
        padding: 28px 20px 20px;
    }
    .order-detail-summary {
        padding: 14px 16px;
    }
    .order-detail-summary__list li {
        flex-wrap: wrap;
        gap: 4px;
    }
    .order-detail-summary__list li::before {
        display: none; /* пунктир мешает на узких экранах */
    }
    .order-detail-summary__value {
        margin-left: 0;
    }
}
.order-item-row__keys {
    margin: 6px 0 0;
}
.order-item-row__keys-toggle {
    background: none;
    border: none;
    color: #161616;
    cursor: pointer;
    padding: 0;
    font-size: 12px;
    font-weight: 500;
    font-family: inherit;
}
.order-item-row__keys-list {
    margin: 8px 0 0;
    padding: 0;
    list-style: none;
    display: none;
    flex-direction: column;
    gap: 6px;
}
.order-item-row__keys.is-open .order-item-row__keys-list {
    display: flex;
}
.order-item-row__key {
    display: flex;
    gap: 8px;
    align-items: center;
    padding: 8px 10px;
    background: #fff;
    border-radius: 6px;
    border: 1px solid #F0F0F0;
}
.order-item-row__key code {
    flex: 1 1 auto;
    font-size: 12px;
    color: #161616;
    word-break: break-all;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    background: transparent;
    padding: 0;
}
.order-item-row__key .btn-copy-key {
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 4px;
    color: #767676;
    border-radius: 4px;
}
.order-item-row__key .btn-copy-key:hover {
    color: #161616;
    background: #F8F8F8;
}
.order-item-row__actions {
    margin: 8px 0 0;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}
.order-item-row__actions .btn {
    height: 36px;
    font-size: 13px;
    padding: 0 14px;
    border-radius: 8px;
}

/* ----------- Responsive ----------- */
@media (max-width: 1023px) {
    .cart-page__layout,
    .checkout-page__layout {
        grid-template-columns: 1fr;
    }
    .cart-page__sidebar,
    .checkout-page__summary {
        position: static;
    }
}

@media (max-width: 767px) {
    .cart-icon-btn {
        width: 40px;
        height: 40px;
        margin: 0 8px;
    }
    .cart-icon-btn__icon {
        width: 22px;
        height: 22px;
    }
    .cart-drawer__inner {
        max-width: 100%;
    }
    .cart-drawer__header,
    .cart-drawer__body,
    .cart-drawer__footer {
        padding-left: 16px;
        padding-right: 16px;
    }
    .cart-page,
    .checkout-page {
        padding: 16px 0 40px;
    }
    .cart-page__main,
    .cart-page__sidebar,
    .checkout-page__form,
    .checkout-page__summary {
        padding: 16px;
        border-radius: 12px;
    }
    .cart-page__items .cart-item__image {
        width: 64px;
        height: 64px;
    }
    .cart-page__items .cart-item__name {
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .cart-item__row {
        flex-wrap: wrap;
    }
    .cart-qty {
        height: 30px;
    }
    .cart-qty__btn {
        width: 28px;
        height: 28px;
    }
}

/* ----------- Body scroll lock ----------- */
body.cart-drawer-open {
    overflow: hidden;
}

/* ----------- Recommendations block on /cart/ ----------- */
.cart-recommend {
    margin-top: 48px;
}
.cart-recommend__title {
    font-size: 24px;
    font-weight: 700;
    color: #161616;
    margin: 0 0 6px;
}
.cart-recommend__sub {
    color: #767676;
    font-size: 14px;
    margin: 0 0 24px;
}
.cart-recommend__grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    column-gap: 16px;
    row-gap: 32px;
}
.cart-recommend__col {
    display: flex;
}
.cart-recommend__col .product-card {
    width: 100%;
}
.cart-recommend__col .product-card__img {
    height: 220px;
}
.cart-recommend__col .product-card__body {
    height: auto;
    flex: 1 1 auto;
}
.cart-recommend__col .product-card__title {
    font-size: 15px;
    line-height: 1.35;
    margin-bottom: 12px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 41px;
}
.cart-recommend__col .product-card .new-price {
    font-size: 18px;
}
.cart-recommend__add-btn {
    width: 100%;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 42px;
    padding: 0 14px;
    border-radius: 10px;
    border: 1px solid #E2E8F0;
    background: transparent;
    color: #161616;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.cart-recommend__add-btn:hover,
.cart-recommend__add-btn:focus {
    background: #161616;
    border-color: #161616;
    color: #fff;
}
.cart-recommend__add-btn-icon {
    width: 18px;
    height: 18px;
    stroke: currentColor;
    fill: none;
}
.cart-recommend__add-btn[disabled],
.cart-recommend__add-btn.is-loading {
    opacity: 0.7;
    cursor: progress;
}

@media (max-width: 1024px) {
    .cart-recommend__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
    .cart-recommend__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .cart-recommend { margin-top: 32px; }
    .cart-recommend__title { font-size: 20px; }
    .cart-recommend__col .product-card__img { height: 180px; }
}
