/* ============================================================
   HolstLab — Оформление заказа (checkout)
   ============================================================ */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&display=swap');

:root {
    --hco-brown: #B85C38;
    --hco-text:  #363636;
    --hco-bg:    #faf7f5;
    --hco-line:  rgba(54,54,54,0.12);
}

/* Контейнер-блок — ширина и отступы как у шапки (.hl-hdr-inner: 1360px / 32px) */
.hl-section { width: 100%; box-sizing: border-box; }
.hl-container { max-width: 1360px; margin: 0 auto; padding: 0 32px; box-sizing: border-box; }

.hco-wrap { font-family: 'Inter', sans-serif; margin: 10px 0 40px; box-sizing: border-box; }
.hco-wrap * { box-sizing: border-box; }

.hco-title {
    font-size: 40px;
    font-weight: 800;
    color: var(--hco-text);
    letter-spacing: -0.03em;
    margin: 0 0 28px;
}

/* Сетка: лево (форма) + право (сводка) */
.hco-grid {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 20px;
    align-items: start;
}
.hco-main { display: flex; flex-direction: column; gap: 16px; }

/* Карточка блока */
.hco-card {
    background: #fff;
    border: 1px solid var(--hco-line);
    border-radius: 20px;
    padding: 26px 28px;
}
.hco-card-head { display: flex; align-items: center; gap: 14px; margin-bottom: 20px; }
.hco-num {
    width: 32px; height: 32px;
    flex-shrink: 0;
    background: var(--hco-brown);
    color: #fff;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 15px; font-weight: 700;
}
.hco-card-title { font-size: 20px; font-weight: 700; color: var(--hco-text); margin: 0; letter-spacing: -0.02em; }

.hco-fields { display: flex; flex-direction: column; gap: 14px; }
.hco-field { display: flex; flex-direction: column; gap: 6px; }
.hco-label { font-size: 13px; font-weight: 600; color: rgba(54,54,54,0.55); }

.hco-input, .hco-textarea {
    width: 100%;
    border: 2px solid var(--hco-line);
    border-radius: 14px;
    padding: 0 18px;
    height: 54px;
    font-family: 'Inter', sans-serif;
    font-size: 16px;
    color: var(--hco-text);
    outline: none;
    background: #fff;
    transition: border-color 0.18s, box-shadow 0.18s;
}
.hco-textarea { height: 96px; padding: 14px 18px; resize: vertical; line-height: 1.5; }
.hco-input:focus, .hco-textarea:focus { border-color: var(--hco-brown); box-shadow: 0 0 0 3px rgba(184,92,56,0.12); }
.hco-input::placeholder, .hco-textarea::placeholder { color: rgba(54,54,54,0.32); }

/* Радио-опции */
.hco-options { display: flex; flex-direction: column; gap: 12px; }
.hco-radio {
    display: flex; align-items: center; gap: 14px;
    padding: 16px 18px;
    border: 2px solid var(--hco-line);
    border-radius: 14px;
    cursor: pointer;
    transition: border-color 0.18s, background 0.18s;
}
.hco-radio:hover { border-color: rgba(184,92,56,0.4); }
.hco-radio input { position: absolute; opacity: 0; pointer-events: none; }
.hco-radio-box {
    width: 22px; height: 22px; flex-shrink: 0;
    border: 2px solid rgba(54,54,54,0.3);
    border-radius: 50%;
    position: relative;
    transition: border-color 0.18s;
}
.hco-radio-box::after {
    content: ''; position: absolute; inset: 4px;
    border-radius: 50%; background: var(--hco-brown);
    transform: scale(0); transition: transform 0.18s;
}
.hco-radio input:checked ~ .hco-radio-box { border-color: var(--hco-brown); }
.hco-radio input:checked ~ .hco-radio-box::after { transform: scale(1); }
.hco-radio:has(input:checked) { border-color: var(--hco-brown); background: rgba(184,92,56,0.04); }
.hco-radio-text { display: flex; flex-direction: column; gap: 2px; }
.hco-radio-text b { font-size: 16px; font-weight: 600; color: var(--hco-text); }
.hco-radio-text small { font-size: 13px; color: rgba(54,54,54,0.5); }

.hco-address { margin-top: 14px; }

/* Сводка заказа (право, sticky) */
.hco-side { position: sticky; top: 88px; }
.hco-summary {
    background: var(--hco-bg);
    border: 1px solid var(--hco-line);
    border-radius: 20px;
    padding: 26px 26px 28px;
}
.hco-summary-title { font-size: 20px; font-weight: 700; color: var(--hco-text); margin: 0 0 18px; }

.hco-items { display: flex; flex-direction: column; gap: 14px; padding-bottom: 18px; border-bottom: 1px solid var(--hco-line); }
.hco-item { display: flex; flex-direction: row; gap: 12px; align-items: flex-start; }
.hco-item-thumb { width: 54px; height: 54px; border-radius: 10px; object-fit: cover; flex-shrink: 0; background: #f0e9e3; }
.hco-item-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.hco-item-name { font-size: 14px; font-weight: 600; color: var(--hco-text); line-height: 1.35; }
.hco-item-meta { display: flex; align-items: center; justify-content: space-between; }
.hco-item-qty { font-size: 13px; color: rgba(54,54,54,0.5); }
.hco-item-total { font-size: 15px; font-weight: 700; color: var(--hco-text); }
.hco-item-del { flex-shrink: 0; width: 26px; height: 26px; padding: 0; border: none; border-radius: 50%; background: rgba(54,54,54,0.07); color: rgba(54,54,54,0.5); font-size: 17px; line-height: 1; cursor: pointer; transition: background 0.15s, color 0.15s; }
.hco-item-del:hover { background: #fce4e4; color: #c62828; }
.hco-item-del:disabled { opacity: 0.5; cursor: default; }

.hco-totals { padding: 18px 0; display: flex; flex-direction: column; gap: 10px; }
.hco-total-row { display: flex; align-items: center; justify-content: space-between; font-size: 14px; color: rgba(54,54,54,0.7); }
.hco-ship-note { font-size: 13px; color: rgba(54,54,54,0.45); font-style: italic; }
.hco-total-final { font-size: 18px; font-weight: 800; color: var(--hco-text); padding-top: 12px; border-top: 1px solid var(--hco-line); }
.hco-total-final span:last-child { color: var(--hco-brown); font-size: 24px; }

/* Согласие */
.hco-agree { display: flex; align-items: flex-start; gap: 12px; cursor: pointer; margin: 4px 0 18px; }
.hco-agree input { position: absolute; opacity: 0; pointer-events: none; }
.hco-agree-box {
    width: 22px; height: 22px; flex-shrink: 0; margin-top: 1px;
    border: 2px solid rgba(54,54,54,0.3);
    border-radius: 6px;
    position: relative;
    transition: background 0.18s, border-color 0.18s;
}
.hco-agree-box::after {
    content: ''; position: absolute; left: 6px; top: 2px;
    width: 6px; height: 11px;
    border: solid #fff; border-width: 0 2.5px 2.5px 0;
    transform: rotate(45deg) scale(0); transition: transform 0.18s;
}
.hco-agree input:checked ~ .hco-agree-box { background: var(--hco-brown); border-color: var(--hco-brown); }
.hco-agree input:checked ~ .hco-agree-box::after { transform: rotate(45deg) scale(1); }
.hco-agree-text { font-size: 13px; color: rgba(54,54,54,0.6); line-height: 1.5; }
.hco-agree-text a { color: var(--hco-brown); }

.hco-submit {
    width: 100%; height: 58px;
    background: var(--hco-brown); color: #fff;
    border: none; border-radius: 100px;
    font-family: 'Inter', sans-serif;
    font-size: 16px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px;
    cursor: pointer;
    transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
}
.hco-submit:hover { background: #9e4f30; transform: translateY(-2px); box-shadow: 0 8px 24px rgba(184,92,56,0.38); }
.hco-submit:active { transform: translateY(0); }
.hco-submit:disabled { background: #c8b0a7; cursor: not-allowed; transform: none; box-shadow: none; }

.hco-msg { display: none; margin-top: 14px; padding: 12px 16px; border-radius: 12px; font-size: 14px; text-align: center; }
.hco-msg.ok  { display: block; background: #e8f5e9; color: #2e7d32; }
.hco-msg.err { display: block; background: #fce4e4; color: #c62828; }
.hco-hint { font-size: 12px; color: rgba(54,54,54,0.45); text-align: center; line-height: 1.5; margin: 14px 0 0; }

/* Пустая корзина */
.hco-empty { text-align: center; padding: 70px 20px; }
.hco-empty-ico { font-size: 56px; margin-bottom: 16px; }
.hco-empty-text { font-size: 20px; font-weight: 600; color: var(--hco-text); margin: 0 0 24px; }
.hco-empty-btn, .hco-success-btn {
    display: inline-flex; align-items: center; justify-content: center;
    background: var(--hco-brown); color: #fff !important;
    font-size: 15px; font-weight: 700;
    padding: 16px 36px; border-radius: 100px;
    text-decoration: none !important;
    transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
}
.hco-empty-btn:hover, .hco-success-btn:hover { background: #9e4f30; transform: translateY(-2px); box-shadow: 0 8px 24px rgba(184,92,56,0.35); }

/* Успех */
.hco-success { text-align: center; max-width: 560px; margin: 0 auto; padding: 60px 20px; }
.hco-success-ico {
    width: 88px; height: 88px; margin: 0 auto 24px;
    background: var(--hco-brown); border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
}
.hco-success-title { font-size: 34px; font-weight: 800; color: var(--hco-text); margin: 0 0 10px; letter-spacing: -0.03em; }
.hco-success-num { font-size: 17px; font-weight: 600; color: var(--hco-brown); margin: 0 0 16px; }
.hco-success-text { font-size: 16px; color: rgba(54,54,54,0.65); line-height: 1.6; margin: 0 0 28px; }

/* Адаптив — отступы контейнера как у шапки (.hl-hdr-inner) */
@media (max-width: 900px) {
    .hl-container { padding: 0 20px; }
    .hco-grid { grid-template-columns: 1fr; }
    .hco-side { position: static; }
    .hco-title { font-size: 30px; }
}
@media (max-width: 560px) {
    .hco-card { padding: 22px 20px; }
    .hco-summary { padding: 22px 20px; }
}
@media (max-width: 480px) {
    .hl-container { padding: 0 16px; }
}

/* DaData — поля города/адреса и подсказки */
.hco-address { flex-direction: column; gap: 14px; margin-top: 16px; }
.hco-dd-field { position: relative; }
.hco-dd-list {
    position: absolute; top: calc(100% - 1px); left: 0; right: 0; z-index: 60;
    background: #fff; border: 1px solid var(--hco-line); border-radius: 0 0 12px 12px;
    box-shadow: 0 12px 28px rgba(0,0,0,0.12); max-height: 270px; overflow-y: auto; display: none;
}
.hco-dd-list.open { display: block; }
.hco-dd-item { padding: 11px 16px; font-size: 14px; color: var(--hco-text); cursor: pointer; border-top: 1px solid rgba(54,54,54,0.06); }
.hco-dd-item:first-child { border-top: none; }
.hco-dd-item:hover { background: #f6efe7; color: var(--hco-brown); }

/* ================= СДЭК в чекауте ================= */
.hco-cdek-status {
    font-size: 14px;
    color: rgba(54,54,54,0.65);
    min-height: 18px;
}
.hco-cdek-tariffs {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.hco-tariff { margin: 0; }
.hco-cdek-map {
    width: 100%;
    height: 340px;
    border-radius: 14px;
    overflow: hidden;
    background: #efe9e4;
}
.hco-cdek-pvz-info {
    font-size: 14px;
    line-height: 1.5;
    color: #363636;
    background: #f6f1ec;
    border-radius: 12px;
    padding: 12px 14px;
}
.hco-cdek-pvz-info:empty { display: none; }
@media (max-width: 768px) {
    .hco-cdek-map { height: 280px; }
}

/* ================= Логотипы сервисов в карточках выбора ================= */
.hco-radio-logos {
    margin-left: auto;
    display: flex;
    gap: 7px;
    align-items: center;
    flex-shrink: 0;
    padding-left: 10px;
}
.hco-radio-logos img, .hco-radio-logos svg {
    height: 24px;
    width: auto;
    display: block;
    border-radius: 6px;
}
.hco-radio-logos img.hco-logo-wide { height: 18px; border-radius: 0; }
@media (max-width: 560px) {
    .hco-radio-logos img, .hco-radio-logos svg { height: 20px; }
    .hco-radio-logos img.hco-logo-wide { height: 15px; }
}

/* карточка реквизитов юрлица */
.hco-invoice-info {
    font-size: 14px;
    line-height: 1.55;
    color: #363636;
    background: #f6f1ec;
    border-radius: 12px;
    padding: 12px 14px;
}
