/* v2-checkout.css — Redesign v2 (Figma GwYiEL3U7a634ABC0nE4b5, section 4706:2841) */
/*
 * Checkout on one page (/cart/, template-cart.php): steps accordion, receipt column,
 * delivery-time dropdown / bottom sheet, mobile sticky pay bar. Behaviour: js/v2-checkout.js.
 * Prefix .hh-co. Shared components (.hh-btn-primary, .hh-qty, .hh-extra-card, .hh-popup,
 * .hh-hint, .hh-pending, .hh-link, .hh-back) come from v2-base.css and are only placed here.
 */

/* .wrapper has overflow: hidden (main.css), which breaks position: sticky of the receipt. */
.page-template-template-cart .wrapper {
    overflow: clip;
}

.hh-co {
    --hh-co-green: #22A050;
    --hh-co-red: #C83232;
    margin-top: min(0px, calc(40px - var(--hh-wrap-extra)));
    margin-bottom: calc(140px - var(--hh-footer-gap));
    padding: max(0px, calc(40px - var(--hh-wrap-extra))) 0 0;
    color: var(--hh-black);
}

.hh-co p {
    margin: 0;
}

.hh-co button {
    font-family: inherit;
}

.hh-co .hh-back {
    margin-bottom: 32px;
}

.hh-co__title {
    margin-bottom: 32px;
}

.hh-co__notices {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-width: 920px;
    margin-bottom: 24px;
}

.hh-only-mobile-block {
    display: none;
}

.hh-only-desktop-block {
    display: block;
}

/* ---------- Layout ---------- */

.hh-co__cols {
    display: grid;
    grid-template-columns: minmax(0, 920px) 456px;
    justify-content: space-between;
    align-items: start;
    gap: 64px;
}

.hh-co__steps {
    display: flex;
    flex-direction: column;
    gap: 16px;
    min-width: 0;
}

/* ---------- Step card ---------- */

.hh-co-step {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 28px 32px;
    border: 1px solid var(--hh-secondary);
    background: #FFFFFF;
    scroll-margin-top: 130px;
}

.hh-co-step.is-active {
    gap: 28px;
    padding-bottom: 32px;
    border-color: var(--hh-primary);
}

.hh-co-step.is-pending {
    gap: 8px;
    background: #FCFCFC;
}

.hh-co-step__head {
    display: flex;
    align-items: center;
    gap: 16px;
}

.hh-co-step__badge {
    display: flex;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--hh-primary);
    color: #FFFFFF;
    font-size: 16px;
    font-weight: 600;
    line-height: normal;
}

.hh-co-step__check {
    display: none;
    width: 14px;
    height: 14px;
}

.hh-co-step.is-done .hh-co-step__num {
    display: none;
}

.hh-co-step.is-done .hh-co-step__check {
    display: block;
}

.hh-co-step.is-pending .hh-co-step__badge {
    border: 1px solid #BEBEBE;
    background: none;
    color: var(--hh-gray);
    font-weight: 400;
}

.hh-co-step__title {
    flex: 1 1 0;
    min-width: 0;
    margin: 0;
    font-family: 'Montserrat';
    font-size: 24px;
    font-weight: 500;
    line-height: normal;
}

.hh-co-step.is-pending .hh-co-step__title {
    color: var(--hh-gray);
    font-weight: 400;
}

.hh-co-change {
    flex-shrink: 0;
    padding: 0;
    border: 0;
    background: none;
    color: var(--hh-primary);
    font-size: 14px;
    font-weight: 600;
    line-height: normal;
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
    text-transform: uppercase;
    cursor: pointer;
    white-space: nowrap;
}

.hh-co-change:hover {
    text-decoration-thickness: 2px;
}

.hh-co-step__chevron {
    display: none;
    flex-shrink: 0;
    width: 20px;
    height: 20px;
}

.hh-co-step__edit,
.hh-co-step__hint,
.hh-co-step__summary,
.hh-co-step__body {
    display: none;
}

.hh-co-step.is-pending .hh-co-step__chevron,
.hh-co-step.is-pending .hh-co-step__hint,
.hh-co-step.is-done .hh-co-step__edit,
.hh-co-step.is-done .hh-co-step__summary {
    display: block;
}

.hh-co-step.is-active .hh-co-step__body {
    display: flex;
}

.hh-co-step__hint {
    padding-left: 48px;
    color: #A0A0A0;
    font-size: 14px;
    line-height: normal;
}

.hh-co-step.is-done .hh-co-step__summary {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding-left: 48px;
    color: var(--hh-gray);
    font-size: 16px;
    line-height: normal;
}

.hh-co-step__body {
    flex-direction: column;
    align-items: stretch;
    gap: 28px;
}

.hh-co-step__next {
    align-self: flex-start;
    width: auto;
}

.hh-co-step__next--short {
    width: 280px;
}

.hh-co-step__error {
    margin-top: -12px !important;
    color: var(--hh-co-red);
    font-size: 14px;
    line-height: 20px;
}

.hh-co-step__note {
    color: var(--hh-gray);
    font-size: 14px;
    line-height: normal;
}

/* ---------- Step 1: lines ---------- */

.hh-co-lines {
    display: flex;
    flex-direction: column;
    gap: 28px;
}

.hh-co-lines:empty {
    display: none;
}

.hh-co-lines.is-busy {
    opacity: 0.7;
    transition: opacity 0.2s;
}

.hh-co-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.hh-co-group__label {
    color: var(--hh-gray);
    font-size: 14px;
    font-weight: 600;
    line-height: normal;
    text-transform: uppercase;
}

.hh-co-divider {
    height: 1px;
    background: var(--hh-secondary);
}

.hh-co-item {
    display: grid;
    align-items: center;
    column-gap: 24px;
    color: var(--hh-black);
}

.hh-co-item__img {
    display: block;
    grid-area: img;
    overflow: hidden;
    background: var(--hh-light);
}

.hh-co-item__img img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hh-co-item__title {
    grid-area: title;
    font-size: 16px;
    font-weight: 500;
    line-height: normal;
}

.hh-co-item__meta {
    grid-area: meta;
    color: var(--hh-gray);
    font-size: 14px;
    line-height: normal;
}

.hh-co-item__price {
    grid-area: price;
    color: var(--hh-primary);
    font-size: 16px;
    font-weight: 600;
    line-height: normal;
    white-space: nowrap;
}

.hh-co-item__remove {
    display: flex;
    grid-area: rm;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    padding: 0;
    border: 0;
    background: none;
    cursor: pointer;
    transition: opacity 0.2s;
}

.hh-co-item__remove:hover {
    opacity: 0.6;
}

.hh-co-item__remove img {
    width: 20px;
    height: 20px;
}

/* Ration line («v2/Cart item»). */
.hh-co-item--ration {
    grid-template-columns: 96px minmax(0, 1fr) auto 20px;
    grid-template-areas:
        "img title price rm"
        "img meta price rm"
        "img change price rm";
    grid-template-rows: auto auto auto;
    row-gap: 6px;
    align-content: center;
    padding: 16px 24px 16px 16px;
    background: var(--hh-light);
}

.hh-co-item--ration .hh-co-item__img {
    width: 96px;
    height: 96px;
    border-radius: 50%;
    background: #FFFFFF;
}

.hh-co-item--ration .hh-co-item__title {
    align-self: end;
    font-size: 18px;
}

.hh-co-item--ration .hh-co-item__change {
    grid-area: change;
    justify-self: start;
    align-self: start;
}

.hh-co-item--ration .hh-co-item__price {
    font-size: 18px;
}

/* Extra line («Cart item / додаток»). */
.hh-co-item--extra {
    grid-template-columns: 72px minmax(0, 1fr) auto auto 20px;
    grid-template-areas: "img info qty price rm";
    padding: 12px 24px 12px 12px;
    border: 1px solid var(--hh-secondary);
    background: #FFFFFF;
}

.hh-co-item--pets {
    grid-template-columns: 72px minmax(0, 1fr) auto 20px;
    grid-template-areas: "img info price rm";
}

.hh-co-item--extra .hh-co-item__img {
    width: 72px;
    height: 72px;
    background: none;
}

.hh-co-item__info {
    display: flex;
    flex-direction: column;
    grid-area: info;
    gap: 6px;
    min-width: 0;
}

.hh-co-item__qty {
    grid-area: qty;
}

.hh-co-item--extra .hh-co-item__price {
    min-width: 64px;
    text-align: right;
}

.hh-co-item__qty .hh-qty__btn:disabled {
    opacity: 0.4;
    cursor: default;
}

/* Cross-sell «Доповніть раціон». */
.hh-co-cross {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.hh-co-cross__head {
    display: flex;
    align-items: center;
    gap: 16px;
}

.hh-co-cross__title {
    flex: 1 1 0;
    font-size: 20px;
    font-weight: 500;
    line-height: normal;
}

.hh-co-cross .hh-extra-card {
    width: 100%;
}

/* ---------- Step 2: form ---------- */

.hh-co-form {
    display: flex;
    flex-direction: column;
    gap: 28px;
}

.hh-co-field {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin: 0;
    padding: 8px 6px;
    border-bottom: 1px solid rgba(40, 40, 40, 0.6);
    cursor: text;
}

.hh-co-field__label {
    color: var(--hh-gray);
    font-size: 14px;
    font-weight: 400;
    line-height: normal;
    white-space: nowrap;
}

.hh-co .hh-co-field__input {
    display: block;
    width: 100%;
    height: 20px;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    outline: 0;
    background: none;
    color: var(--hh-black);
    font-family: inherit;
    font-size: 16px;
    line-height: 20px;
    -webkit-appearance: none;
    appearance: none;
}

.hh-co .hh-co-field__input::placeholder {
    color: #AFAFAF;
    opacity: 1;
}

.hh-co-field:focus-within {
    border-bottom-color: var(--hh-primary);
}

.hh-co-field.is-error {
    border-bottom-color: var(--hh-co-red);
}

.hh-co .hh-co-field.is-error .hh-co-field__input::placeholder {
    color: var(--hh-co-red);
    font-size: 14px;
}

.hh-co-field__error {
    position: absolute;
    top: 100%;
    left: 6px;
    margin-top: 4px;
    color: var(--hh-co-red);
    font-size: 12px;
    line-height: normal;
}

.hh-co-field--static {
    cursor: default;
}

.hh-co-field__static {
    display: flex;
    align-items: center;
    gap: 16px;
}

.hh-co .hh-co-field--static .hh-co-field__input {
    flex: 1 1 0;
    min-width: 0;
    color: #AFAFAF;
    pointer-events: none;
}

.hh-co-field__note {
    flex-shrink: 0;
    color: var(--hh-gray);
    font-size: 13px;
    line-height: normal;
    white-space: nowrap;
}

.hh-co-form__row {
    display: flex;
    align-items: flex-end;
    gap: 40px;
}

.hh-co-form__row .hh-co-field {
    flex: 1 1 0;
    min-width: 0;
}

/* «Доставляємо пн–сб, у неділю — вихідний кухні» right under the delivery time
   (the select shows its error inside the field, not below it). */
.hh-co-delivery-days {
    margin: -18px 0 0;
    color: var(--hh-gray);
    font-size: 13px;
    line-height: 18px;
}

/* Delivery time: custom select («v2/Field / Select», dropdown 4759:5361). */
.hh-co-select {
    position: relative;
}

.hh-co-select__btn {
    flex-direction: row;
    align-items: flex-end;
    gap: 12px;
    width: 100%;
    border-top: 0;
    border-right: 0;
    border-left: 0;
    background: none;
    color: var(--hh-black);
    text-align: left;
    cursor: pointer;
}

.hh-co-select__text {
    display: flex;
    flex: 1 1 0;
    flex-direction: column;
    gap: 14px;
    min-width: 0;
}

.hh-co-select__value {
    font-size: 16px;
    line-height: 20px;
}

.hh-co-select__value.is-placeholder {
    color: #AFAFAF;
}

.hh-co-select.is-error .hh-co-select__value.is-placeholder {
    color: var(--hh-co-red);
    font-size: 14px;
}

.hh-co-select__chevron {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    transition: transform 0.2s;
}

.hh-co-select.is-open .hh-co-select__btn {
    padding-bottom: 7px;
    border-bottom: 2px solid var(--hh-primary);
}

.hh-co-select.is-open .hh-co-select__chevron {
    transform: rotate(180deg);
}

.hh-co-select.is-error .hh-co-select__btn {
    border-bottom-color: var(--hh-co-red);
}

.hh-co-select__list {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    left: 0;
    z-index: 30;
    display: none;
    flex-direction: column;
    max-height: 70vh;
    overflow-y: auto;
    padding-bottom: 4px;
    border: 1px solid var(--hh-secondary);
    background: #FFFFFF;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

.hh-co-select.is-open .hh-co-select__list {
    display: flex;
}

.hh-co-select__sheet-head,
.hh-co-select__overlay {
    display: none;
}

.hh-co-select__group {
    padding: 14px 24px 6px;
    color: var(--hh-gray);
    font-size: 12px;
    font-weight: 600;
    line-height: normal;
    text-transform: uppercase;
}

.hh-co-select__divider {
    flex-shrink: 0;
    height: 1px;
    background: var(--hh-secondary);
}

.hh-co-select__option {
    display: flex;
    flex-shrink: 0;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 13px 24px;
    border: 0;
    background: none;
    color: var(--hh-black);
    font-size: 16px;
    line-height: normal;
    text-align: left;
    cursor: pointer;
}

.hh-co-select__option span {
    flex: 1 1 0;
}

.hh-co-select__option img {
    display: none;
    width: 16px;
    height: 16px;
}

.hh-co-select__option:hover,
.hh-co-select__option:focus-visible {
    background: var(--hh-light);
    outline: 0;
}

.hh-co-select__option.is-selected {
    background: var(--hh-light);
    color: var(--hh-primary);
    font-weight: 500;
}

.hh-co-select__option.is-selected img {
    display: block;
}

/* Checkboxes (consent, cutlery). */
.hh-co-check {
    position: relative;
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 0;
    cursor: pointer;
}

.hh-co-check input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
}

.hh-co-check__box {
    display: flex;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border: 1px solid #828282;
    background: #FFFFFF;
    transition: background 0.15s, border-color 0.15s;
}

.hh-co-check__box img {
    width: 14px;
    height: 14px;
    opacity: 0;
}

.hh-co-check input:checked + .hh-co-check__box {
    border-color: var(--hh-primary);
    background: var(--hh-primary);
}

.hh-co-check input:checked + .hh-co-check__box img {
    opacity: 1;
}

.hh-co-check input:focus-visible + .hh-co-check__box {
    outline: 2px solid var(--hh-primary);
    outline-offset: 2px;
}

.hh-co-check__text {
    font-size: 14px;
    line-height: 20px;
}

.hh-co-check.is-error .hh-co-check__box {
    border-color: var(--hh-co-red);
}

.hh-co-check.is-error .hh-co-check__text {
    color: var(--hh-co-red);
}

.hh-co-comment {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin: 0;
}

.hh-co-comment__label {
    font-size: 16px;
    font-weight: 500;
    line-height: normal;
}

.hh-co-comment textarea {
    display: block;
    width: 100%;
    height: 96px;
    margin: 0;
    padding: 14px 16px;
    border: 0;
    border-radius: 0;
    outline: 0;
    background: var(--hh-light);
    color: var(--hh-black);
    font-family: inherit;
    font-size: 14px;
    line-height: 20px;
    resize: none;
}

.hh-co-comment textarea::placeholder {
    color: var(--hh-gray);
    opacity: 1;
}

.hh-co-comment textarea:focus {
    box-shadow: inset 0 -1px 0 var(--hh-primary);
}

/* ---------- Step 3: promo and payment ---------- */

.hh-co-promo {
    gap: 16px;
}

.hh-co-promo__row {
    display: flex;
    align-items: flex-end;
    gap: 24px;
}

.hh-co-promo__row .hh-co-field {
    flex: 1 1 0;
    min-width: 0;
}

.hh-co .hh-co-promo__row .hh-co-field__input[readonly] {
    color: var(--hh-black);
}

.hh-co-outline {
    display: flex;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    min-width: 193px;
    height: 56px;
    padding: 0 32px;
    border: 1px solid var(--hh-primary);
    background: #FFFFFF;
    color: var(--hh-primary);
    font-size: 16px;
    font-weight: 600;
    line-height: normal;
    text-transform: uppercase;
    cursor: pointer;
    transition: background 0.2s;
}

.hh-co-outline:hover {
    background: var(--hh-light);
}

.hh-co-outline.is-busy {
    opacity: 0.6;
    pointer-events: none;
}

.hh-co-promo__msg {
    color: var(--hh-co-red);
    font-size: 14px;
    line-height: normal;
}

.hh-co-promo__msg.is-ok {
    color: var(--hh-co-green);
}

.hh-co-methods {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.hh-co-method {
    position: relative;
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 0;
    padding: 20px;
    border: 1px solid var(--hh-secondary);
    cursor: pointer;
    transition: border-color 0.15s;
}

.hh-co-method:hover {
    border-color: var(--hh-border);
}

.hh-co-method input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
}

.hh-co-method__radio {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    background: url('../img/v2/co-radio-off.svg') center / 20px 20px no-repeat;
}

.hh-co-method:has(input:checked),
.hh-co-method.is-checked {
    border-color: var(--hh-primary);
}

.hh-co-method input:checked + .hh-co-method__radio {
    background-image: url('../img/v2/co-radio-on.svg');
}

.hh-co-method input:focus-visible + .hh-co-method__radio {
    outline: 2px solid var(--hh-primary);
    outline-offset: 2px;
    border-radius: 50%;
}

.hh-co-method__text {
    display: flex;
    flex: 1 1 0;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.hh-co-method__title {
    font-size: 16px;
    font-weight: 500;
    line-height: normal;
}

.hh-co-method__sub {
    color: var(--hh-gray);
    font-size: 14px;
    line-height: normal;
}

.hh-co-logos {
    display: flex;
    flex-shrink: 0;
    align-items: center;
    gap: 8px;
}

/* Logos: the PNGs carry their own padding, so each sits in a cropped box as in the mockup. */
.hh-co-logo {
    position: relative;
    flex-shrink: 0;
    height: 32px;
}

.hh-co-logo > span {
    position: absolute;
    overflow: hidden;
}

.hh-co-logo img {
    position: absolute;
    max-width: none;
}

.hh-co-logo--gpay { width: 47px; }
.hh-co-logo--gpay > span { top: 8px; left: 4px; width: 39px; height: 16px; }
.hh-co-logo--gpay img { top: 4.03%; left: 0; width: 100%; height: 98.18%; }

.hh-co-logo--apple { width: 45px; }
.hh-co-logo--apple > span { top: 8px; left: 4px; width: 37px; height: 16px; }
.hh-co-logo--apple img { top: -64.13%; left: 0; width: 100%; height: 229.6%; }

.hh-co-logo--mc { width: 38px; }
.hh-co-logo--mc > span { top: 6px; left: 4px; width: 30px; height: 19px; }
.hh-co-logo--mc img { top: -36.25%; left: -6.07%; width: 111.94%; height: 172.81%; }

.hh-co-logo--visa { width: 45px; }
.hh-co-logo--visa > span { top: 10px; left: 4px; width: 37px; height: 12px; }
.hh-co-logo--visa img { top: 0; left: -1.58%; width: 100.46%; height: 100%; }

/* Pay buttons: 35% until delivery is filled and a method is chosen. */
.hh-co [data-hh-co-pay]:disabled {
    opacity: 0.35;
    cursor: default;
}

.hh-co [data-hh-co-pay]:disabled:hover {
    background: var(--hh-primary);
}

/* ---------- Receipt ---------- */

.hh-co-aside {
    position: sticky;
    top: 130px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.hh-co-receipt {
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding: 28px;
    border: 1px solid var(--hh-black);
}

.hh-co-receipt__head {
    display: flex;
    align-items: center;
    gap: 12px;
}

.hh-co-receipt__title {
    flex: 1 1 0;
    font-size: 24px;
    font-weight: 500;
    line-height: normal;
}

.hh-co-receipt__count {
    color: var(--hh-gray);
    font-size: 14px;
    line-height: normal;
    white-space: nowrap;
}

.hh-co-sum-item {
    display: flex;
    align-items: flex-start;
    gap: 16px;
}

.hh-co-sum-item__img {
    flex-shrink: 0;
    width: 64px;
    height: 64px;
    overflow: hidden;
}

.hh-co-sum-item__img img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hh-co-sum-item__info {
    display: flex;
    flex: 1 1 0;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
    padding-right: 12px;
}

.hh-co-sum-item__title,
.hh-co-sum-item__price {
    font-size: 16px;
    font-weight: 500;
    line-height: normal;
}

.hh-co-sum-item__price {
    flex-shrink: 0;
    white-space: nowrap;
}

.hh-co-sum-item__meta {
    color: var(--hh-gray);
    font-size: 14px;
    line-height: normal;
}

.hh-co-receipt__line {
    height: 1px;
    background: rgba(40, 40, 40, 0.5);
}

.hh-co-receipt__row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    font-size: 16px;
    line-height: 20px;
}

.hh-co-receipt__row[hidden],
.hh-co-receipt__old[hidden] {
    display: none;
}

.hh-co-receipt__row > span:last-child {
    white-space: nowrap;
}

.hh-co-receipt__green {
    color: var(--hh-co-green);
}

.hh-co-receipt__total {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.hh-co-receipt__total-label {
    font-size: 16px;
    font-weight: 500;
    line-height: normal;
}

.hh-co-receipt__total-sum {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
}

.hh-co-receipt__old {
    color: var(--hh-gray);
    font-size: 14px;
    line-height: normal;
}

.hh-co-receipt__sum {
    font-size: 28px;
    line-height: normal;
    white-space: nowrap;
}

.hh-co-aside__hint {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--hh-gray);
    font-size: 14px;
    line-height: normal;
}

.hh-co-aside__hint img {
    flex-shrink: 0;
    width: 16px;
    height: 16px;
}

.hh-co-aside__hint [hidden],
.hh-co-aside__hint[hidden] {
    display: none;
}

.hh-co-aside__offer {
    color: var(--hh-gray);
    font-size: 12px;
    line-height: 18px;
}

/* ---------- Mobile pay bar (hidden on desktop) ---------- */

.hh-co-bar {
    display: none;
}

/* ---------- Empty basket ---------- */

.hh-co-empty {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
    max-width: 920px;
    padding: 40px;
    border: 1px solid var(--hh-secondary);
}

.hh-co-empty__title {
    font-size: 24px;
    font-weight: 500;
    line-height: normal;
}

.hh-co-empty__text {
    color: var(--hh-gray);
    font-size: 16px;
    line-height: 24px;
}

.hh-co-empty__pending {
    align-self: stretch;
    margin-top: 8px;
}

.hh-co-empty__btn {
    width: 280px;
    margin-top: 16px;
    text-decoration: none;
}

/* ---------- Confirm popup ---------- */

.hh-co-confirm {
    max-width: 640px;
}

.hh-co-confirm__btns {
    display: flex;
    gap: 16px;
}

.hh-co-confirm__btns > * {
    flex: 1 1 0;
}

/* ---------- ≤1439 / ≤1199 / ≤1023 ---------- */

@media only screen and (max-width: 1439px) {
    .hh-co__cols {
        grid-template-columns: minmax(0, 1fr) 400px;
        gap: 40px;
    }
}

@media only screen and (max-width: 1199px) {
    .hh-co__cols {
        grid-template-columns: minmax(0, 1fr) 340px;
        gap: 32px;
    }

    .hh-co-step {
        padding: 24px;
    }

    .hh-co-step.is-active {
        padding-bottom: 24px;
    }

    .hh-co-receipt {
        padding: 24px;
    }

    .hh-co-logos {
        display: none;
    }
}

@media only screen and (max-width: 1023px) {
    .hh-co__cols {
        grid-template-columns: minmax(0, 1fr);
    }

    .hh-co-aside {
        position: static;
    }
}

/* ---------- ≤767px (mobile mockups, 375) ---------- */

@media only screen and (max-width: 767px) {
    .page-template-template-cart .footer {
        padding-bottom: 80px;
    }

    .hh-only-mobile-block {
        display: block;
    }

    .hh-only-desktop-block {
        display: none;
    }

    .hh-co {
        margin-top: min(0px, calc(24px - var(--hh-wrap-extra)));
        margin-bottom: calc(64px - var(--hh-footer-gap));
        padding-top: max(0px, calc(24px - var(--hh-wrap-extra)));
    }

    .hh-co .hh-back {
        margin-bottom: 24px;
    }

    .hh-co .hh-page-title {
        margin-bottom: 24px;
        font-size: 28px;
        line-height: 34px;
    }

    .hh-co__notices {
        margin-bottom: 16px;
    }

    .hh-co__steps {
        gap: 12px;
    }

    .hh-co-aside {
        display: none;
    }

    .hh-co-step,
    .hh-co-step.is-active {
        gap: 10px;
        padding: 20px 16px;
        scroll-margin-top: 90px;
    }

    .hh-co-step.is-active {
        gap: 20px;
    }

    .hh-co-step.is-pending {
        gap: 6px;
    }

    .hh-co-step__head {
        gap: 12px;
    }

    .hh-co-step__badge {
        width: 28px;
        height: 28px;
        font-size: 14px;
    }

    .hh-co-step__check {
        width: 12px;
        height: 12px;
    }

    .hh-co-step__title {
        font-size: 18px;
        line-height: 24px;
    }

    .hh-co-change {
        font-size: 12px;
    }

    .hh-co-step__hint {
        padding-left: 40px;
        font-size: 12px;
    }

    .hh-co-step.is-done .hh-co-step__summary {
        padding-left: 40px;
        font-size: 13px;
        line-height: 19px;
    }

    .hh-co-step__body {
        gap: 20px;
    }

    .hh-co-step__next,
    .hh-co-step__next--short {
        align-self: stretch;
        width: 100%;
        padding: 0 12px;
    }

    .hh-co-step__error {
        margin-top: -8px !important;
        font-size: 13px;
    }

    .hh-co-step__note {
        font-size: 12px;
        line-height: 17px;
    }

    .hh-co-lines {
        gap: 20px;
    }

    .hh-co-group {
        gap: 10px;
    }

    .hh-co-group__label {
        font-size: 12px;
    }

    .hh-co-item {
        column-gap: 12px;
        align-items: start;
    }

    .hh-co-item__remove,
    .hh-co-item__remove img {
        width: 16px;
        height: 16px;
    }

    .hh-co-item--ration {
        grid-template-columns: 56px minmax(0, 1fr) auto 16px;
        grid-template-areas:
            "img title title rm"
            "img meta meta rm"
            "img price change rm";
        row-gap: 4px;
        padding: 12px;
    }

    .hh-co-item--ration .hh-co-item__img {
        width: 56px;
        height: 56px;
    }

    .hh-co-item--ration .hh-co-item__title {
        font-size: 16px;
    }

    .hh-co-item--ration .hh-co-item__meta {
        font-size: 12px;
        line-height: 17px;
    }

    .hh-co-item--ration .hh-co-item__price {
        padding-top: 6px;
        font-size: 16px;
    }

    .hh-co-item--ration .hh-co-item__change {
        align-self: end;
        justify-self: end;
    }

    .hh-co-item--extra {
        grid-template-columns: 56px auto minmax(0, 1fr) 16px;
        grid-template-areas:
            "img info info rm"
            "img qty price rm";
        row-gap: 8px;
        padding: 12px;
    }

    .hh-co-item--pets {
        grid-template-columns: 56px minmax(0, 1fr) 16px;
        grid-template-areas:
            "img info rm"
            "img price rm";
    }

    .hh-co-item--extra .hh-co-item__img {
        width: 56px;
        height: 56px;
    }

    .hh-co-item--extra .hh-co-item__title {
        font-size: 14px;
        line-height: 19px;
    }

    .hh-co-item--extra:not(.hh-co-item--pets) .hh-co-item__meta {
        display: none;
    }

    .hh-co-item--pets .hh-co-item__meta {
        font-size: 12px;
    }

    .hh-co-item--extra .hh-co-item__price {
        align-self: center;
        justify-self: end;
        font-size: 14px;
    }

    .hh-co-item--pets .hh-co-item__price {
        justify-self: start;
    }

    .hh-co-cross {
        gap: 12px;
    }

    .hh-co-cross__title {
        font-size: 16px;
    }

    /* Form */
    .hh-co-form {
        gap: 24px;
    }

    .hh-co-form__row {
        gap: 20px;
    }

    .hh-co-form__row .hh-co-field {
        padding-right: 4px;
        padding-left: 4px;
    }

    .hh-co .hh-co-field.is-error .hh-co-field__input::placeholder,
    .hh-co-select.is-error .hh-co-select__value.is-placeholder {
        font-size: 12px;
    }

    .hh-co-field__static {
        gap: 8px;
    }

    .hh-co-field__note {
        font-size: 12px;
    }

    .hh-co-delivery-days {
        margin-top: -14px;
        font-size: 12px;
        line-height: 16px;
    }

    .hh-co-comment {
        gap: 10px;
    }

    .hh-co-comment__label {
        font-size: 14px;
    }

    .hh-co-comment textarea {
        padding: 12px;
        font-size: 13px;
        line-height: 19px;
    }

    .hh-co-check {
        align-items: flex-start;
        gap: 12px;
    }

    .hh-co-check__box {
        width: 22px;
        height: 22px;
    }

    .hh-co-check__box img {
        width: 12px;
        height: 12px;
    }

    .hh-co-check__text {
        font-size: 13px;
        line-height: 19px;
    }

    .hh-co-check:not(.hh-co-check--agree) {
        align-items: center;
    }

    /* Delivery time: bottom sheet (4759:5398). .container is a stacking context (z-index 5,
       main.css) under the fixed header (10): lift it while the sheet is open. */
    .hh-co.has-layer > .container {
        z-index: 1000;
    }

    .hh-co-select.is-open .hh-co-select__overlay {
        position: fixed;
        inset: 0;
        z-index: 1000;
        display: block;
        background: rgba(20, 20, 20, 0.5);
        animation: hh-fade 0.2s ease-out;
    }

    .hh-co-select__list {
        position: fixed;
        top: auto;
        right: 0;
        bottom: 0;
        left: 0;
        z-index: 1001;
        max-height: 85vh;
        padding: 16px 0 24px;
        border: 0;
        box-shadow: none;
        animation: hh-sheet 0.3s ease-out;
    }

    .hh-co-select.is-open .hh-co-select__btn {
        padding-bottom: 8px;
        border-bottom-width: 1px;
    }

    .hh-co-select.is-open .hh-co-select__chevron {
        transform: none;
    }

    .hh-co-select__sheet-head {
        display: flex;
        align-items: center;
        gap: 16px;
        padding: 0 16px 4px;
    }

    .hh-co-select__sheet-title {
        flex: 1 1 0;
        font-size: 20px;
        font-weight: 500;
        line-height: normal;
    }

    .hh-co-select__close {
        display: flex;
        padding: 0;
        border: 0;
        background: none;
        cursor: pointer;
    }

    .hh-co-select__close img {
        width: 20px;
        height: 20px;
    }

    .hh-co-select__group {
        padding: 14px 16px 6px;
    }

    .hh-co-select__option {
        padding: 13px 16px;
    }

    /* Promo + methods */
    .hh-co-promo {
        gap: 12px;
    }

    .hh-co-promo__row {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }

    .hh-co-outline {
        width: 100%;
    }

    .hh-co-promo__msg {
        font-size: 13px;
    }

    .hh-co-methods {
        gap: 10px;
    }

    .hh-co-method {
        flex-wrap: wrap;
        align-items: flex-start;
        gap: 12px;
        padding: 16px;
    }

    .hh-co-method__title {
        font-size: 14px;
    }

    .hh-co-method__sub {
        font-size: 12px;
        line-height: 17px;
    }

    .hh-co-logos {
        display: flex;
        width: 100%;
        margin-top: -6px;
        padding-left: 32px;
    }

    /* Sticky pay bar (4742:14845) and its receipt (4742:14930). */
    .hh-co-bar {
        position: fixed;
        right: 0;
        bottom: 0;
        left: 0;
        z-index: 900;
        display: block;
    }

    .hh-co-bar__overlay {
        position: fixed;
        inset: 0;
        display: none;
        background: rgba(20, 20, 20, 0.5);
    }

    .hh-co-bar.is-open .hh-co-bar__overlay {
        display: block;
        animation: hh-fade 0.2s ease-out;
    }

    .hh-co-bar__panel {
        position: relative;
        background: #FFFFFF;
        box-shadow: 0 -6px 10px rgba(0, 0, 0, 0.1);
    }

    .hh-co-bar.is-open .hh-co-bar__panel {
        box-shadow: none;
    }

    .hh-co-bar__sheet {
        display: none;
        max-height: calc(85vh - 80px);
        overflow-y: auto;
        border-bottom: 1px solid var(--hh-secondary);
    }

    .hh-co-bar.is-open .hh-co-bar__sheet {
        display: block;
        animation: hh-sheet 0.3s ease-out;
    }

    .hh-co-bar__handle {
        display: flex;
        justify-content: center;
        padding: 12px 16px 6px;
        cursor: pointer;
    }

    .hh-co-bar__handle span {
        width: 36px;
        height: 4px;
        background: #D9D9D9;
    }

    .hh-co-receipt--sheet {
        gap: 14px;
        padding: 8px 16px 16px;
        border: 0;
    }

    .hh-co-receipt--sheet .hh-co-receipt__title {
        font-size: 18px;
    }

    .hh-co-receipt--sheet .hh-co-receipt__count {
        font-size: 12px;
    }

    .hh-co-receipt--sheet .hh-co-receipt__line {
        background: var(--hh-secondary);
    }

    .hh-co-receipt--sheet .hh-co-receipt__row {
        align-items: flex-start;
        font-size: 14px;
        line-height: 17px;
    }

    .hh-co-receipt--sheet .hh-co-receipt__total-part {
        display: none;
    }

    .hh-co-bar__main {
        display: flex;
        align-items: center;
        gap: 12px;
        padding: 16px;
    }

    .hh-co-bar__toggle {
        display: flex;
        flex-shrink: 0;
        align-items: center;
        justify-content: center;
        width: 36px;
        height: 36px;
        padding: 0;
        border: 1px solid var(--hh-primary);
        background: #FFFFFF;
        cursor: pointer;
    }

    .hh-co-bar__toggle img {
        width: 16px;
        height: 16px;
    }

    .hh-co-bar__down,
    .hh-co-bar.is-open .hh-co-bar__up {
        display: none;
    }

    .hh-co-bar.is-open .hh-co-bar__down {
        display: block;
    }

    .hh-co-bar__sum {
        display: flex;
        flex: 1 1 0;
        flex-direction: column;
        align-items: flex-start;
        gap: 2px;
        min-width: 0;
        padding: 0;
        border: 0;
        background: none;
        color: var(--hh-black);
        text-align: left;
        cursor: pointer;
    }

    .hh-co-bar__label {
        color: var(--hh-gray);
        font-size: 12px;
        line-height: normal;
    }

    .hh-co-bar__total {
        font-size: 20px;
        font-weight: 500;
        line-height: normal;
        white-space: nowrap;
    }

    .hh-co-bar__pay {
        flex-shrink: 0;
        width: 160px;
        height: 48px;
        padding: 0 16px;
    }

    .hh-co-empty {
        padding: 24px 16px;
    }

    .hh-co-empty__title {
        font-size: 20px;
    }

    .hh-co-empty__text {
        font-size: 14px;
        line-height: 21px;
    }

    .hh-co-empty__btn {
        width: 100%;
    }

    .hh-co-confirm__btns {
        flex-direction: column;
        gap: 12px;
    }

    /* In a column `flex: 1 1 0` (equal widths in a row) means a zero base
       height: the buttons collapsed to the text line. Keep their own 56 px. */
    .hh-co-confirm__btns > * {
        flex: none;
        width: 100%;
        min-height: 56px;
    }
}

/* Links to the legal pages in the consent and offer notes */
.hh-co-check__text a,
.hh-co-aside__offer a {
    color: inherit;
    text-decoration: underline;
    text-underline-offset: 2px;
}
.hh-co-check__text a:hover,
.hh-co-aside__offer a:hover {
    color: #0F2D47;
}

/* «Ще N днів — і день дешевшає» nudge under a ration line. */
.hh-co-upsell {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin: 8px 0 4px;
    padding: 14px 16px;
    border-left: 3px solid #0F2D47;
    background: #F4F6F8;
}
.hh-co-upsell__info {
    min-width: 0;
}
.hh-co-upsell__title {
    margin: 0;
    color: #282828;
    font-size: 15px;
    line-height: 1.35;
}
.hh-co-upsell__title b {
    color: #0F2D47;
    font-weight: 600;
    white-space: nowrap;
}
.hh-co-upsell__text {
    margin: 4px 0 0;
    color: #737373;
    font-size: 13px;
    line-height: 1.4;
}
.hh-co-upsell__saving {
    color: #2E7D4F;
    font-weight: 600;
    white-space: nowrap;
}
.hh-co-upsell__btn {
    flex-shrink: 0;
    min-height: 44px;
    padding: 0 18px;
    border: 1px solid #0F2D47;
    background: #FFFFFF;
    color: #0F2D47;
    font-family: 'Montserrat', sans-serif;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}
.hh-co-upsell__btn:hover {
    background: #0F2D47;
    color: #FFFFFF;
}
.hh-co-upsell__btn.is-busy {
    opacity: 0.6;
    cursor: progress;
}
@media only screen and (max-width: 767px) {
    .hh-co-upsell {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }
    .hh-co-upsell__btn {
        width: 100%;
    }
}

/* Progress to the best price (28 days) + the «Ще N днів» nudge below it,
   rendered as one panel under the ration line. */
.hh-co-progress {
    margin: 8px 0 0;
    padding: 14px 16px 10px;
    border-left: 3px solid #0F2D47;
    background: #F4F6F8;
}
.hh-co-progress + .hh-co-upsell {
    /* the group is a flex column with a 12px gap: pull the nudge up so the
       progress bar and the nudge read as one panel */
    margin-top: -12px;
    padding-top: 10px;
    border-top: 1px solid #E5E5E5;
}
.hh-co-progress.is-best {
    margin-bottom: 4px;
    border-left-color: #2E7D4F;
}
.hh-co-progress__text {
    margin: 0 0 10px;
    color: #282828;
    font-size: 14px;
    line-height: 1.4;
}
.hh-co-progress__text b {
    color: #0F2D47;
    font-weight: 600;
    white-space: nowrap;
}
.hh-co-progress.is-best .hh-co-progress__text b {
    color: #2E7D4F;
}
.hh-co-progress__track {
    position: relative;
    height: 6px;
    border-radius: 3px;
    background: #D2D2D2;
    overflow: hidden;
}
.hh-co-progress__fill {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    border-radius: 3px;
    background: #0F2D47;
    transition: width 0.3s ease;
}
.hh-co-progress.is-best .hh-co-progress__fill {
    background: #2E7D4F;
}
.hh-co-progress__tick {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 2px;
    margin-left: -1px;
    background: #F4F6F8;
}
.hh-co-progress__labels {
    position: relative;
    height: 16px;
    margin-top: 4px;
    color: #737373;
    font-size: 11px;
    line-height: 16px;
}
.hh-co-progress__labels span {
    position: absolute;
    top: 0;
    transform: translateX(-50%);
}
.hh-co-progress__labels span:last-child {
    transform: translateX(-100%);
}
.hh-co-progress__labels span.is-reached {
    color: #0F2D47;
    font-weight: 600;
}
