/* Корзина, оформление и «Спасибо»: строка позиции, общая раскладка страниц заказа */

/* Строка позиции: рисунок, серия, цвет и длина крупно, цена, количество, сумма */
.crow {
  display: grid; grid-template-columns: 104px minmax(0, 1fr) auto auto; grid-template-areas: "pic main price act";
  gap: 16px 22px; align-items: center; padding: 16px 20px 16px 16px; border-radius: var(--r-lg); background: var(--c-bg); box-shadow: var(--sh-1);
}
.crow__pic { grid-area: pic; display: grid; place-items: center; aspect-ratio: 1 / 1; border-radius: 6px; overflow: hidden; background: radial-gradient(110% 85% at 50% 38%, var(--c-bg) 0%, var(--c-tile) 100%); }
.crow__pic svg { width: 92%; }
.crow__pic img { width: 100%; height: 100%; object-fit: contain; }
.crow__main { grid-area: main; display: grid; gap: 7px; justify-items: start; min-width: 0; }
.crow__t { font: 700 19px/1.25 var(--font-heading); color: var(--c-ink); overflow-wrap: anywhere; }
.crow__t:hover { color: var(--c-primary); }
.crow__len { color: var(--c-ink); white-space: nowrap; }
.crow__sub { font-size: 13px; color: var(--c-text-muted); }
.crow__price { grid-area: price; display: grid; gap: 2px; text-align: right; font-size: 12.5px; color: var(--c-text-muted); white-space: nowrap; }
.crow__price b { font: 700 16px/1.2 var(--font-heading); color: var(--c-ink); }
.crow__act { grid-area: act; display: flex; align-items: center; gap: 14px; }
.crow .qty { width: 150px; }
.crow__sum { min-width: 118px; text-align: right; font: 800 21px/1.1 var(--font-heading); color: var(--c-ink); letter-spacing: -.01em; white-space: nowrap; }
.crow__rm { display: inline-flex; align-items: center; gap: 6px; font-size: 13.5px; color: var(--c-text-muted); }
.crow__rm:hover { color: var(--c-sale); }
@media (max-width: 1100px) {
  .crow { grid-template-columns: 88px minmax(0, 1fr) auto; grid-template-areas: "pic main main" "pic price price" "act act act"; gap: 10px 16px; }
  .crow__price { display: flex; gap: 6px; align-items: baseline; text-align: left; }
  .crow__act { justify-content: space-between; flex-wrap: wrap; }
}
@media (max-width: 640px) {
  .crow { grid-template-columns: 72px minmax(0, 1fr); grid-template-areas: "pic main" "pic price" "act act"; padding: 14px; }
  .crow__t { font-size: 17px; }
  .crow__sum { font-size: 19px; min-width: 0; margin-left: auto; }
  .crow__rm { flex-basis: 100%; justify-content: flex-end; }
}

/* Общая раскладка страниц заказа */
.page-order section[id] { scroll-margin-top: 150px; }
.ord-top { padding-bottom: 12px; }
.ord-head { display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px 16px; margin-top: 4px; }
.ord-head h1 { font-weight: 800; font-size: clamp(28px, 2vw + 14px, 40px); line-height: 1.1; letter-spacing: -.02em; }
.ord-head__n { color: var(--c-text-muted); font-size: 16px; }
.ord { padding-block: 12px 72px; }
.ord__grid { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 28px; align-items: start; }
.ord__main { display: grid; gap: 24px; min-width: 0; }
.ord__aside { position: sticky; top: 144px; }
.ord-list { display: grid; gap: 12px; }
.ord-link { display: block; text-align: center; font-weight: 600; font-size: 14.5px; }
.crow__ico { width: 40px; height: 40px; color: var(--c-muted-blue); }
@media (max-width: 959px) {
  .ord__grid { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .ord__aside { position: static; }
  .ord { padding-bottom: 120px; }
}

/* Пустая корзина */
.ord-empty { display: grid; justify-items: center; gap: 12px; padding: 64px 24px; border-radius: var(--r-lg); background: var(--c-surface); text-align: center; }
.ord-empty > .ico { width: 52px; height: 52px; color: var(--c-muted-blue); }
.ord-empty h2 { font-size: 24px; font-weight: 800; }
.ord-empty p { max-width: 52ch; color: var(--c-text-muted); }
.ord-empty__btns { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 8px; }

/* Скидка 7 % к комплекту */
.cart-promo { display: grid; gap: 16px; padding: 22px; border-radius: var(--r-lg); background: var(--c-dark); color: var(--c-on-dark); }
.cart-promo__h { display: flex; gap: 14px; align-items: flex-start; }
.cart-promo__h .tag { flex: none; height: 28px; font-size: 14px; }
.cart-promo__h h2 { color: var(--c-on-dark); font-size: 20px; font-weight: 800; line-height: 1.25; }
.cart-promo__h p { margin-top: 4px; color: var(--c-on-dark-muted); font-size: 14.5px; }
.cart-promo__cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.cart-promo .pc__img { aspect-ratio: 16 / 10; }
@media (max-width: 640px) { .cart-promo { padding: 16px; } .cart-promo__cards { gap: 10px; } .cart-promo__h h2 { font-size: 18px; } }

/* Закреплённая кнопка оформления на телефоне; на компьютере итог лежит справа */
.sticky-buy--cart .btn { min-width: 132px; }
@media (min-width: 960px) { .sticky-buy--cart { display: none; } body.has-sticky { padding-bottom: 0; } }

/* Оформление */
.co-form { display: grid; gap: 16px; }
.co-block { padding: 24px 26px; border-radius: var(--r-lg); background: var(--c-bg); box-shadow: var(--sh-1); border: 1px solid var(--c-line); }
.co-block__h { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }
.co-block__h i { font-style: normal; flex: none; width: 32px; height: 32px; border-radius: 50%; background: var(--c-primary); color: var(--c-on-dark); display: grid; place-items: center; font-weight: 700; }
.co-block__h h2 { font-size: 20px; font-weight: 800; }
.co-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 16px; }
.co-note { display: flex; align-items: center; gap: 8px; margin-top: 4px; font-size: 14px; color: var(--c-text-muted); }
.co-note .ico { color: var(--c-primary); flex: none; }
.pick-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.pick { position: relative; display: block; }
.pick input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.pick__b { display: grid; box-sizing: border-box; height: 100%; grid-template-columns: auto 1fr; column-gap: 12px; align-items: center; padding: 14px 16px; border-radius: 8px; border: 1.5px solid var(--c-line-strong); background: var(--c-bg); transition: border-color .15s, background-color .15s; }
.pick__b .ico { grid-row: span 2; color: var(--c-primary); }
.pick__b b { color: var(--c-ink); }
.pick__b small { color: var(--c-text-muted); font-size: 13px; }
.pick:hover .pick__b { border-color: var(--c-primary); }
.pick input:checked + .pick__b { border-color: var(--c-primary); background: var(--c-primary-soft); box-shadow: 0 0 0 1px var(--c-primary); }
.pick input:focus-visible + .pick__b { outline: 3px solid color-mix(in srgb, var(--c-primary) 45%, transparent); outline-offset: 2px; }
.co-pane { display: grid; gap: 12px; }

/* Подсказка про аккаунт Ozon: сворачивается, шаги — карточками в ряд */
.co-ozon { margin-bottom: 14px; border-radius: 8px; background: var(--c-primary-soft); }
.co-ozon summary { display: flex; align-items: center; gap: 12px; padding: 14px 16px; cursor: pointer; list-style: none; }
.co-ozon summary::-webkit-details-marker { display: none; }
.co-ozon summary > .ico:first-child { flex: none; width: 24px; height: 24px; color: var(--c-primary); }
.co-ozon summary span { flex: 1; min-width: 0; }
.co-ozon summary b { display: block; color: var(--c-ink); }
.co-ozon summary small { font-size: 13.5px; color: var(--c-text-muted); }
.co-ozon__chev { flex: none; width: 20px; height: 20px; color: var(--c-primary); transition: transform .2s; }
.co-ozon[open] .co-ozon__chev { transform: rotate(180deg); }
.co-ozon__steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin: 0; padding: 0 16px 16px; list-style: none; }
.co-ozon__steps li { display: grid; gap: 8px; align-content: start; padding: 12px; border-radius: 6px; background: var(--c-bg); font-size: 13.5px; color: var(--c-body); }
.co-ozon__steps i { font-style: normal; width: 26px; height: 26px; border-radius: 50%; background: var(--c-primary); color: var(--c-on-dark); display: grid; place-items: center; font: 700 13px var(--font-heading); }
@media (max-width: 959px) { .co-ozon__steps { grid-template-columns: 1fr; } .co-ozon__steps li { grid-template-columns: auto 1fr; align-items: start; gap: 10px; } }
.co-pickup { display: grid; gap: 14px; margin: 0; padding: 0; list-style: none; }
.co-pickup li { display: flex; gap: 12px; align-items: flex-start; }
.co-pickup .ico { color: var(--c-primary); margin-top: 1px; }
.co-pickup b { display: block; color: var(--c-ink); }
.co-pickup span { font-size: 14px; color: var(--c-text-muted); }
.co-block .btn--block { margin-top: 12px; }
.co-sum__body { display: grid; gap: 10px; }
.co-line { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 12px; padding-bottom: 10px; border-bottom: 1px solid var(--c-line); font-size: 14px; }
.co-line > span:first-child { font-weight: 600; color: var(--c-ink); }
.co-line small { display: block; font-weight: 400; color: var(--c-text-muted); font-size: 12.5px; }
.co-line > span.num { grid-column: 1; color: var(--c-text-muted); }
.co-line > b { grid-column: 2; grid-row: 1 / span 2; align-self: center; color: var(--c-ink); white-space: nowrap; }
.co-sum-m { display: none; border-radius: var(--r-lg); background: var(--c-bg); box-shadow: var(--sh-1); border: 1px solid var(--c-line); }
.co-sum-m summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 18px; list-style: none; cursor: pointer; font-weight: 700; color: var(--c-ink); }
.co-sum-m summary::-webkit-details-marker { display: none; }
.co-sum-m summary .ico { transition: transform .2s; color: var(--c-primary); }
.co-sum-m[open] summary .ico { transform: rotate(180deg); }
.co-sum-m .co-sum__body { padding: 0 18px 18px; }
@media (max-width: 959px) {
  .co-sum-m { display: block; }
  .page-checkout .ord__aside { display: none; }
}
@media (max-width: 640px) {
  .co-block { padding: 18px 16px; }
  .co-pair, .pick-row { grid-template-columns: 1fr; }
}

/* «Спасибо» */
.th-hero { display: grid; justify-items: center; gap: 8px; padding: 40px 16px 32px; text-align: center; }
.th-hero__i { width: 72px; height: 72px; border-radius: 50%; background: var(--c-success-bg); color: var(--c-success); display: grid; place-items: center; }
.th-hero__i .ico { width: 38px; height: 38px; stroke-width: 2.4; }
.th-hero h1 { font-weight: 800; font-size: clamp(28px, 2vw + 14px, 40px); letter-spacing: -.02em; }
.th-hero__n { font-size: 18px; color: var(--c-ink); }
.th-hero__n b { font: 800 22px var(--font-heading); letter-spacing: .02em; }
.th-hero__s { color: var(--c-text-muted); }
.th-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.th-card { padding: 26px 28px; border-radius: var(--r-lg); background: var(--c-bg); box-shadow: var(--sh-1); border: 1px solid var(--c-line); }
.th-card h2 { margin-bottom: 18px; font-size: 22px; font-weight: 800; }
.th-steps { display: grid; gap: 16px; margin: 0; padding: 0; list-style: none; }
.th-steps li { display: flex; gap: 14px; align-items: flex-start; }
.th-steps i { font-style: normal; flex: none; width: 30px; height: 30px; border-radius: 50%; background: var(--c-primary-soft); color: var(--c-primary); display: grid; place-items: center; font-weight: 700; font-size: 14px; }
.th-steps b { display: block; color: var(--c-ink); }
.th-steps span { font-size: 14.5px; color: var(--c-text-muted); }
.th-check { display: grid; gap: 12px; margin: 0; padding: 0; list-style: none; }
.th-check li { display: flex; gap: 10px; align-items: flex-start; }
.th-check .ico { flex: none; color: var(--c-success); margin-top: 1px; }
.th-items { margin-top: 20px; padding: 16px; border-radius: 8px; background: var(--c-surface); }
.th-items h3 { margin-bottom: 8px; font-size: 15px; font-weight: 700; }
.th-items ul { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.th-items b { display: block; color: var(--c-ink); font-size: 14.5px; }
.th-items span { font-size: 13.5px; color: var(--c-text-muted); }
.th-contacts { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px 32px; margin-top: 20px; padding: 24px 28px; border-radius: var(--r-lg); background: var(--c-primary-soft); }
.th-contacts h2 { font-size: 22px; font-weight: 800; }
.th-contacts p { color: var(--c-text-muted); }
.th-contacts__c { display: grid; gap: 10px; justify-items: start; }
.th-contacts__phone { font: 800 24px/1.2 var(--font-heading); color: var(--c-ink); }
.th-contacts__ms { display: flex; flex-wrap: wrap; gap: 8px; }
.th-contacts .ms { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 14px; border-radius: 5px; background: var(--c-bg); color: var(--c-ink); font-weight: 600; font-size: 14px; box-shadow: var(--sh-1); }
.th-contacts .ms:hover { color: var(--c-primary); }
.th-contacts .ms img { width: 20px; height: 20px; }
.th-btns { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 28px; }
@media (max-width: 859px) { .th-grid { grid-template-columns: 1fr; } .th-card { padding: 20px 18px; } .th-contacts { padding: 20px 18px; } }

/* На самой странице корзины ссылка «В корзину» в уведомлении лишняя */
.page-cart #toastLink { display: none; }
