/* ==========================================================================
   Healza — purchase journey (Cart, Delivery, Review, Payment hand-off, payment
   result pages)

   Loaded only by those views through the layout's "Styles" section, after
   healza-editorial.css and healza-commerce.css. It adds no palette or type of
   its own: tokens, display type, buttons, links and price come from the
   editorial layer; breadcrumbs and the contained packshot stage come from the
   commerce layer. This file only adds the quieter, task-focused layout the
   purchase flow needs — hairlines and space, no cards, no shadows.

   Structure: 1) page frame + intro  2) progress  3) notices  4) line items
              5) summary  6) delivery (addresses + form)  7) review sheet
              8) status pages  9) responsive
   ========================================================================== */

body.hz-shell.hz-cart-page,
body.hz-shell.hz-checkout-page {
    background: var(--hzh-ivory);
    color: var(--hzh-ink);
}

/* 1) Page frame + intro ---------------------------------------------------- */

.hzk-intro {
    padding: clamp(22px, 2.6vw, 34px) 0 0;
}
.hzk-intro-head {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 14px 40px;
    margin-top: clamp(22px, 3vw, 40px);
    padding-bottom: clamp(20px, 2.4vw, 30px);
    border-bottom: 1px solid var(--hzh-ink);
}
.hzk-intro-head h1 {
    margin: 0;
    color: var(--hzh-ink);
    font-size: calc(clamp(1.9rem, 3.2vw, 2.8rem) * var(--hzh-scale));
}
.hzk-intro-head p {
    max-width: 34rem;
    margin: 12px 0 0;
    color: var(--hzh-ink-soft);
    line-height: 1.75;
}
.hzk-intro-meta {
    margin: 0;
    color: var(--hzh-ink-soft);
    font-size: .95rem;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}
.hzk-body {
    padding: clamp(18px, 2.4vw, 30px) 0 var(--hzh-page-end);
}
.hzk-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(300px, 360px);
    align-items: start;
    gap: clamp(24px, 3.4vw, 44px);
}
.hzk-main {
    min-width: 0;
}
.hzk-h2 {
    margin: 0 0 6px;
    color: var(--hzh-ink);
    font-size: 1.12rem;
    font-weight: 700;
    line-height: 1.4;
}
.hzk-note {
    margin: 0;
    color: var(--hzh-ink-soft);
    font-size: .92rem;
    line-height: 1.7;
}
.hzk-textlink {
    color: var(--hzh-ink);
    font-size: .92rem;
    font-weight: 700;
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 5px;
    transition: color var(--hzh-ease);
}
.hzk-textlink:hover,
.hzk-textlink:focus-visible {
    color: var(--hzh-cyan-deep);
}

/* 2) Progress — orientation only, never navigation ------------------------- */

.hzk-progress {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 14px;
    margin: 0;
    padding: 0;
    list-style: none;
    color: var(--hzh-ink-soft);
    font-size: .88rem;
    font-weight: 600;
}
.hzk-progress li {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.hzk-progress li + li::before {
    content: "";
    width: clamp(14px, 3vw, 34px);
    height: 1px;
    margin-inline-end: 6px;
    background: var(--hzh-line);
}
.hzk-progress b {
    display: inline-grid;
    place-items: center;
    width: 28px;
    height: 28px;
    border: 1px solid var(--hzh-line);
    border-radius: 50%;
    font-size: .78rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}
.hzk-progress .is-done {
    color: var(--hzh-pine);
}
.hzk-progress .is-done b {
    border-color: var(--hzh-pine);
}
.hzk-progress .is-current {
    color: var(--hzh-ink);
    font-weight: 700;
}
.hzk-progress .is-current b {
    border-color: var(--hzh-cyan);
    background: var(--hzh-cyan);
    color: #fff;
}

/* 3) Notices: server messages, shown in the page and not only as a toast --- */

.hzk-notice {
    display: grid;
    gap: 4px;
    margin: 0 0 26px;
    padding: 16px 20px;
    border-inline-start: 3px solid #b4432f;
    background: #fbefeb;
    color: #7c2a1b;
    font-size: .95rem;
    font-weight: 600;
    line-height: 1.7;
}
.hzk-notice.is-warning {
    border-color: #c08a1e;
    background: var(--hzh-amber-soft);
    color: var(--hzh-amber-ink);
}
.hzk-notice ul {
    margin: 0;
    padding-inline-start: 18px;
}
.hzk-notice.validation-summary-valid,
.hzk-notice:empty {
    display: none;
}

/* 4) Line items ------------------------------------------------------------ */

.hzk-thumb {
    --hzc-shot-inset: 9%;
    flex: 0 0 auto;
    width: 92px;
    aspect-ratio: 4 / 5;
    border-radius: 10px;
}
.hzk-thumb::after {
    content: none;
}
.hzk-thumb .hzc-shot img {
    border-radius: 5px;
    filter: drop-shadow(0 6px 8px rgba(11, 42, 37, .16));
}
.hzk-thumb.is-small {
    width: 60px;
    border-radius: 8px;
}
.hzk-lines {
    margin: 0;
    padding: 0;
    list-style: none;
}
.hzk-line {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto auto;
    grid-template-areas: "thumb info qty total";
    align-items: center;
    gap: 12px clamp(14px, 2.2vw, 28px);
    padding: 14px 0;
    border-bottom: 1px solid var(--hzh-line);
}
.hzk-line:first-child {
    padding-top: 0;
}
.hzk-line .hzk-thumb {
    grid-area: thumb;
}
.hzk-line-info {
    grid-area: info;
    min-width: 0;
}
.hzk-line-info h2,
.hzk-line-info h3 {
    margin: 0;
    color: var(--hzh-ink);
    font-size: 1.08rem;
    font-weight: 700;
    line-height: 1.45;
    overflow-wrap: anywhere;
}
.hzk-line-info h2 a {
    color: inherit;
}
.hzk-line-info h2 a:hover,
.hzk-line-info h2 a:focus-visible {
    color: var(--hzh-cyan-deep);
}
.hzk-line-unit {
    margin: 4px 0 0;
    color: var(--hzh-ink-soft);
    font-size: .9rem;
    font-variant-numeric: tabular-nums;
}
.hzk-line-qty {
    grid-area: qty;
}
.hzk-line-total {
    grid-area: total;
    min-width: 6.5em;
    color: var(--hzh-ink);
    font-size: 1.08rem;
    font-weight: 800;
    text-align: end;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}
.hzk-line-total small {
    color: var(--hzh-ink-soft);
    font-size: .72em;
    font-weight: 700;
}
/* Label of a cart line's total: hidden on wide screens (the column heading shows it), kept for
   screen readers; shown on phones, where there is no column heading. */
.hzk-line-total-label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}
@media (max-width: 640px) {
    .hzk-line-total-label {
        position: static;
        width: auto;
        height: auto;
        overflow: visible;
        clip: auto;
        margin-inline-end: 6px;
        color: var(--hzh-ink-soft);
        font-size: .78rem;
        font-weight: 700;
    }
}
.hzk-remove {
    margin-top: 2px;
}
.hzk-remove button {
    min-height: 44px;
    padding: 0 2px;
    border: 0;
    background: transparent;
    color: var(--hzh-ink-soft);
    font-size: .86rem;
    font-weight: 600;
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 4px;
    transition: color var(--hzh-ease);
}
.hzk-remove button:hover,
.hzk-remove button:focus-visible {
    color: #a3341f;
}

/* Quantity: two ordinary POST forms either side of the current value. */
.hzk-qty {
    height: 46px;
    display: inline-grid;
    grid-template-columns: 44px 40px 44px;
    align-items: stretch;
    border: 1px solid var(--hzh-ink);
    border-radius: 999px;
    overflow: hidden;
}
.hzk-qty form {
    display: grid;
}
.hzk-qty button {
    display: grid;
    place-items: center;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--hzh-ink);
    font-size: 1.15rem;
    font-weight: 600;
    line-height: 1;
    transition: background var(--hzh-ease);
}
.hzk-qty button:hover {
    background: var(--hzh-mist);
}
.hzk-qty output {
    display: grid;
    place-items: center;
    color: var(--hzh-ink);
    font-size: 1rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

/* Read-only lines (summary + review) */
.hzk-line.is-static {
    grid-template-columns: auto minmax(0, 1fr) auto;
    grid-template-areas: "thumb info total";
    padding: 18px 0;
}
.hzk-line.is-static:first-child {
    padding-top: 0;
}
.hzk-line.is-compact {
    gap: 12px 14px;
    padding: 14px 0;
}
.hzk-line.is-compact .hzk-line-info h3 {
    font-size: .95rem;
}
.hzk-line.is-compact .hzk-line-total {
    min-width: 0;
    font-size: .95rem;
}

/* Empty cart */
.hzk-empty {
    display: grid;
    justify-items: start;
    gap: 14px;
    max-width: 34rem;
    padding: clamp(16px, 3vw, 36px) 0;
}
.hzk-empty h2 {
    margin: 0;
    color: var(--hzh-ink);
    font-size: calc(clamp(1.6rem, 2.6vw, 2.1rem) * var(--hzh-scale));
}
.hzk-empty p {
    margin: 0;
    color: var(--hzh-ink-soft);
    line-height: 1.8;
}
.hzk-empty .hzh-btn {
    margin-top: 8px;
}

/* 5) Summary --------------------------------------------------------------- */

.hzk-summary {
    position: sticky;
    top: calc(var(--hzh-header-h) + 20px);
    padding: clamp(18px, 2vw, 24px);
    border: 1px solid var(--hzh-line);
    border-radius: 14px;
    background: #fff;
}
.hzk-summary > h2 {
    margin: 0 0 16px;
    color: var(--hzh-ink);
    font-size: 1.12rem;
    font-weight: 700;
}
.hzk-summary .hzk-lines {
    margin-bottom: 4px;
}
.hzk-totals {
    margin: 0;
}
.hzk-totals > div {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 18px;
    padding: 11px 0;
    border-top: 1px solid var(--hzh-line);
}
.hzk-totals > div:first-child {
    border-top: 0;
    padding-top: 0;
}
.hzk-totals dt {
    color: var(--hzh-ink-soft);
    font-size: .95rem;
    font-weight: 600;
}
.hzk-totals dd {
    margin: 0;
    color: var(--hzh-ink);
    font-weight: 700;
    text-align: end;
    font-variant-numeric: tabular-nums;
}
.hzk-totals dd.is-pending {
    color: var(--hzh-ink-soft);
    font-size: .9rem;
    font-weight: 600;
}
.hzk-totals .is-total {
    padding-top: 16px;
    border-top-color: var(--hzh-ink);
}
.hzk-totals .is-total dt {
    color: var(--hzh-ink);
    font-size: 1rem;
    font-weight: 700;
}
.hzk-totals .is-total dd {
    color: var(--hzh-pine);
    font-size: 1.5rem;
    font-weight: 800;
}
.hzk-summary-actions {
    display: grid;
    gap: 14px;
    justify-items: center;
    margin-top: 18px;
}
.hzk-summary-actions form {
    width: 100%;
}
.hzk-summary-actions .hzh-btn {
    width: 100%;
    white-space: normal;
    text-align: center;
    padding-block: 10px;
    line-height: 1.4;
}
.hzk-summary .hzk-note {
    margin-top: 14px;
}

/* 6) Delivery -------------------------------------------------------------- */

.hzk-block + .hzk-block {
    margin-top: clamp(30px, 4vw, 48px);
    padding-top: clamp(26px, 3.4vw, 40px);
    border-top: 1px solid var(--hzh-ink);
}
.hzk-block > .hzk-note {
    margin-bottom: 18px;
}
.hzk-addresses {
    margin: 14px 0 0;
    padding: 0;
    list-style: none;
    border-top: 1px solid var(--hzh-line);
}
.hzk-address {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 14px 28px;
    padding: 20px 0;
    border-bottom: 1px solid var(--hzh-line);
}
.hzk-address-body {
    flex: 1 1 260px;
    min-width: 0;
    display: grid;
    gap: 3px;
    color: var(--hzh-ink-soft);
    font-size: .95rem;
    line-height: 1.7;
    overflow-wrap: anywhere;
}
.hzk-address-body strong {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 10px;
    color: var(--hzh-ink);
    font-size: 1.02rem;
    font-weight: 700;
}
.hzk-tag {
    padding: 2px 10px;
    border-radius: 999px;
    background: var(--hzh-mist);
    color: var(--hzh-pine);
    font-size: .76rem;
    font-weight: 700;
}
.hzk-address .hzh-btn {
    min-height: 46px;
}

/* New address: a native disclosure, open whenever the server asks for it. */
.hzk-new > summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    min-height: 44px;
    color: var(--hzh-ink);
    font-size: 1.12rem;
    font-weight: 700;
    cursor: pointer;
    list-style: none;
}
.hzk-new > summary::-webkit-details-marker {
    display: none;
}
.hzk-new > summary::after {
    content: "+";
    flex: 0 0 auto;
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border: 1px solid var(--hzh-ink);
    border-radius: 50%;
    font-size: 1.2rem;
    font-weight: 500;
    line-height: 1;
}
.hzk-new[open] > summary::after {
    content: "\2212";
}
.hzk-form {
    display: grid;
    gap: 22px;
    margin-top: 18px;
}
.hzk-form .hzk-notice {
    margin: 0;
}
.hzk-fieldset {
    min-width: 0;
    margin: 0;
    padding: 0;
    border: 0;
}
.hzk-fieldset legend {
    float: none;
    width: auto;
    margin: 0 0 12px;
    padding: 0;
    color: var(--hzh-pine);
    font-size: .88rem;
    font-weight: 700;
}
.hzk-fields {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 18px 20px;
}
.hzk-field {
    grid-column: span 3;
    display: grid;
    align-content: start;
    gap: 7px;
    min-width: 0;
}
.hzk-field.is-wide {
    grid-column: 1 / -1;
}
.hzk-field.is-third {
    grid-column: span 2;
}
.hzk-field label {
    color: var(--hzh-ink);
    font-size: .92rem;
    font-weight: 700;
}
.hzk-field label small {
    color: var(--hzh-ink-soft);
    font-size: .86em;
    font-weight: 500;
}
.hzk-field input,
.hzk-field select,
.hzk-field textarea {
    width: 100%;
    min-height: 52px;
    padding: 12px 14px;
    border: 1px solid rgba(16, 38, 43, .34);
    border-radius: 8px;
    background: #fff;
    color: var(--hzh-ink);
    font: inherit;
    font-size: 1rem;
    line-height: 1.5;
    transition: border-color var(--hzh-ease), box-shadow var(--hzh-ease);
}
.hzk-field textarea {
    min-height: 104px;
    resize: vertical;
}
.hzk-field input:hover,
.hzk-field select:hover,
.hzk-field textarea:hover {
    border-color: var(--hzh-ink);
}
.hzk-field input:focus,
.hzk-field select:focus,
.hzk-field textarea:focus {
    outline: 0;
    border-color: var(--hzh-cyan);
    box-shadow: 0 0 0 3px rgba(0, 125, 189, .28);
}
.hzk-field .input-validation-error {
    border-color: #b4432f;
    background: #fffaf8;
}
.hzk-field .input-validation-error:focus {
    box-shadow: 0 0 0 3px rgba(180, 67, 47, .24);
}
.hzk-field .field-validation-error {
    color: #a3341f;
    font-size: .86rem;
    font-weight: 600;
    line-height: 1.5;
}
.hzk-field .field-validation-valid {
    display: none;
}
.hzk-hint {
    color: var(--hzh-ink-soft);
    font-size: .86rem;
    line-height: 1.6;
}
/* Phone numbers read left-to-right in both languages. */
html[dir="rtl"] .hzk-field input[type="tel"] {
    direction: ltr;
    text-align: right;
}
.hzk-check {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    min-height: 44px;
    color: var(--hzh-ink);
    font-size: .95rem;
    font-weight: 600;
    cursor: pointer;
}
.hzk-check input {
    flex: 0 0 auto;
    width: 20px;
    height: 20px;
    accent-color: var(--hzh-pine);
}
.hzk-form-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px 26px;
}

/* 7) Review sheet ---------------------------------------------------------- */

.hzk-sheet-head {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 6px 20px;
    margin-bottom: 18px;
}
.hzk-sheet-head .hzk-h2 {
    margin: 0;
}
.hzk-address-sheet {
    display: grid;
    gap: 3px;
    margin: 0;
    color: var(--hzh-ink-soft);
    font-style: normal;
    line-height: 1.75;
    overflow-wrap: anywhere;
}
.hzk-address-sheet strong {
    color: var(--hzh-ink);
    font-size: 1.05rem;
}

/* 8) Status pages: hand-off, success, pending, failed ---------------------- */

.hzk-status {
    padding: clamp(28px, 5vw, 72px) 0 clamp(64px, 8vw, 112px);
}
.hzk-status-inner {
    width: min(640px, calc(100% - 48px));
    margin-inline: auto;
}
.hzk-status-inner > .hzk-progress {
    margin-bottom: 26px;
}
.hzk-status-head {
    position: relative;
    display: grid;
    justify-items: start;
    gap: 14px;
    padding: clamp(26px, 4vw, 40px);
    overflow: hidden;
    background: var(--hzh-ivory-deep);
    border-top: 2px solid var(--hzh-pine);
}
.hzk-status-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    color: var(--hzh-pine);
    font-size: .9rem;
    font-weight: 700;
}
.hzk-status-head .hzk-status-label::before {
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
}
.hzk-status-head.is-success .hzk-status-label::before { content: "\f058"; }
.hzk-status-head.is-pending .hzk-status-label::before { content: "\f017"; }
.hzk-status-head.is-failed .hzk-status-label::before { content: "\f06a"; }
.hzk-status-head h1 {
    max-width: 16em;
    margin: 0;
    color: var(--hzh-ink);
    font-size: calc(clamp(1.7rem, 3.2vw, 2.4rem) * var(--hzh-scale));
    line-height: 1.16;
}
html[lang="ar"] .hzk-status-head h1 {
    line-height: 1.4;
}
.hzk-status-head p:not(.hzk-status-label) {
    max-width: 32rem;
    margin: 0;
    color: var(--hzh-ink-soft);
    line-height: 1.8;
}
/* Success: the one immersive moment of the flow — pine ground, helix thread. */
.hzk-status-head.is-success {
    background: var(--hzh-pine);
    border-top-color: var(--hzh-leaf);
    padding-inline-end: clamp(26px, 14%, 96px);
}
.hzk-status-head.is-success::after {
    content: "";
    position: absolute;
    inset-block: 0;
    inset-inline-end: 22px;
    width: 44px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 44 200' preserveAspectRatio='none'%3E%3Cpath d='M8,0 C8,50 36,50 36,100 S8,150 8,200 M36,0 C36,50 8,50 8,100 S36,150 36,200' fill='none' stroke='%23a9d15c' stroke-opacity='.4' stroke-width='1' vector-effect='non-scaling-stroke'/%3E%3C/svg%3E") repeat-y center top / 44px 200px;
    pointer-events: none;
}
.hzk-status-head.is-success .hzk-status-label {
    color: var(--hzh-leaf);
}
.hzk-status-head.is-success h1 {
    color: var(--hzh-on-pine);
}
.hzk-status-head.is-success p:not(.hzk-status-label) {
    color: var(--hzh-on-pine-soft);
}
.hzk-status-head.is-pending {
    background: var(--hzh-amber-soft);
    border-top-color: #c08a1e;
}
.hzk-status-head.is-pending .hzk-status-label {
    color: var(--hzh-amber-ink);
}
.hzk-status-head.is-failed {
    background: #fbefeb;
    border-top-color: #b4432f;
}
.hzk-status-head.is-failed .hzk-status-label {
    color: #a3341f;
}
.hzk-status-body {
    display: grid;
    gap: 26px;
    padding-top: 26px;
}
.hzk-status-body .hzk-notice {
    margin: 0;
}
.hzk-next h2 {
    margin: 0 0 6px;
    color: var(--hzh-ink);
    font-size: 1rem;
    font-weight: 700;
}
.hzk-status-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px 28px;
}
.hzk-devlog {
    margin: 0;
    padding: 12px 14px;
    border: 1px dashed #b4432f;
    background: #fff;
    color: #7c2a1b;
    font-size: .8rem;
    text-align: left;
    direction: ltr;
    white-space: pre-wrap;
    word-break: break-word;
}

.hzk-qty button:focus-visible,
.hzk-remove button:focus-visible,
.hzk-textlink:focus-visible,
.hzk-new > summary:focus-visible,
.hzk-check input:focus-visible,
.hzk-line-info h2 a:focus-visible {
    outline: 3px solid rgba(0, 125, 189, .5);
    outline-offset: 3px;
}
.hzk-qty button:focus-visible {
    outline-offset: -3px;
}

/* 9) Responsive ------------------------------------------------------------ */

@media (max-width: 980px), (max-height: 720px) {
    .hzk-summary {
        position: static;
    }
}
@media (max-width: 980px) {
    .hzk-layout {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (max-width: 640px) {
    .hzk-intro-head {
        align-items: flex-start;
        flex-direction: column;
    }
    .hzk-line {
        grid-template-columns: auto minmax(0, 1fr) auto;
        grid-template-areas:
            "thumb info info"
            "thumb qty  total";
        align-items: start;
        gap: 14px 16px;
        padding: 20px 0;
    }
    .hzk-line-qty,
    .hzk-line-total {
        align-self: center;
    }
    .hzk-line-total {
        min-width: 0;
    }
    .hzk-line.is-static {
        grid-template-areas: "thumb info total";
        align-items: center;
    }
    .hzk-thumb {
        width: 76px;
    }
    .hzk-thumb.is-small {
        width: 54px;
    }
    .hzk-field,
    .hzk-field.is-third {
        grid-column: 1 / -1;
    }
    .hzk-field.is-third {
        grid-column: span 2;
        grid-template-rows: 1fr auto;
        grid-auto-rows: auto;
    }
    .hzk-field.is-third label {
        align-self: end;
    }
    .hzk-address .hzh-btn,
    .hzk-form-actions .hzh-btn,
    .hzk-status-actions .hzh-btn,
    .hzk-empty .hzh-btn {
        width: 100%;
    }
    .hzk-form-actions .hzh-btn {
        white-space: normal;
        padding-block: 10px;
        line-height: 1.4;
        text-align: center;
    }
    .hzk-address form {
        width: 100%;
    }
    .hzk-status-inner {
        width: min(100% - 28px, 420px);
    }
    .hzk-status-actions {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
    }
    .hzk-status-actions .hzk-textlink {
        padding: 8px 0;
    }
}

@media (prefers-reduced-motion: reduce) {
    .hzk-field input,
    .hzk-field select,
    .hzk-field textarea,
    .hzk-qty button,
    .hzk-textlink,
    .hzk-remove button {
        transition: none;
    }
}

/* Phase C5 — cart line availability hints */
.hzk-line-unit del { margin-inline-start: 8px; opacity: .65; }
.hzk-line-flag { margin: 6px 0 0; color: #8a5a12; font-size: .88rem; font-weight: 600; }
.hzk-line-flag.is-error { color: #922c20; }
.hzk-qty button:disabled { opacity: .4; cursor: not-allowed; }
/* Phase C10.1 — the pressed control looks busy, not unavailable, while its request is sent. */
.hzk-qty button.is-submitting { opacity: 1; background: var(--hzh-mist); cursor: progress; }
.hzk-remove button.is-submitting { color: var(--hzh-ink); cursor: progress; text-decoration: none; }
.hzk-remove button:disabled:not(.is-submitting) { opacity: .5; cursor: not-allowed; }
.hzk-lines[aria-busy="true"] .hzk-line-total { opacity: .55; }

/* Phase C8 — order recap on the payment status pages */
.hzk-recap { display: grid; gap: 22px; margin-top: 22px; padding-top: 22px; border-top: 1px solid var(--hzh-line); text-align: start; }
.hzk-recap-block h2 { margin: 0 0 10px; color: var(--hzh-ink); font-size: 1rem; font-weight: 700; }
.hzk-recap-items { display: grid; gap: 8px; margin: 0 0 14px; padding: 0; list-style: none; }
.hzk-recap-items li { display: flex; justify-content: space-between; gap: 16px; }
.hzk-recap-items strong { flex: 0 0 auto; font-weight: 600; white-space: nowrap; }
.hzk-recap-qty { opacity: .7; white-space: nowrap; }
.hzk-recap-address { display: grid; gap: 2px; margin: 0; font-style: normal; overflow-wrap: anywhere; }
.hzk-recap-help { margin: 0; }

/* =========================================================================
   Phase C9 — cart and order-recap refinement
   ========================================================================= */

/* Cart line hints use the same amber label as low stock on the product page. */
.hzk-line-flag {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 8px;
    background: var(--hzh-amber-soft);
    color: var(--hzh-amber-ink);
}
.hzk-line-flag.is-error {
    background: #fbeeea;
    color: #922c20;
}

/* Order recap: each product on its own ruled row, totals aligned like the summary. */
.hzk-recap-items li {
    padding-bottom: 8px;
    border-bottom: 1px solid var(--hzh-line);
}
.hzk-recap-items li:last-child {
    border-bottom: 0;
}
.hzk-recap-address {
    color: var(--hzh-ink);
    line-height: 1.6;
}

/* Phase C15 — line thumbnail without a product image: a quiet dashed tile, clearly a
   placeholder and never mistaken for a photograph. */
.hzk-thumb.is-empty {
    background: var(--hzh-ivory-deep);
    box-shadow: none;
    border: 1px dashed var(--hzh-line);
}

/* Cart rows: a larger thumbnail on wide screens and a visible focus ring around the stepper. */
@media (min-width: 641px) {
    .hzk-line:not(.is-static) .hzk-thumb {
        width: 76px;
        aspect-ratio: 1 / 1;
    }
}
.hzk-qty {
    transition: box-shadow var(--hzh-ease), border-color var(--hzh-ease);
}
.hzk-qty:focus-within {
    box-shadow: 0 0 0 3px rgba(0, 125, 189, .24);
}
.hzk-qty button:active:not(:disabled) {
    background: var(--hzh-ivory-deep);
}
@media (prefers-reduced-motion: reduce) {
    .hzk-qty {
        transition: none;
    }
}

/* =========================================================================
   Phase 2 — cart columns, continue link, required markers.
   ========================================================================= */

/* Cart: labelled columns on wide screens; quantity and total keep fixed widths so rows align. */
.hzk-lines-head {
    display: none;
}
@media (min-width: 641px) {
    .hzk-lines-head {
        display: grid;
        grid-template-columns: minmax(0, 1fr) 134px 7.5rem;
        gap: 0 clamp(14px, 2.2vw, 28px);
        padding-bottom: 10px;
        margin-bottom: 14px;
        border-bottom: 1px solid var(--hzh-ink);
        color: var(--hzh-ink-soft);
        font-size: .82rem;
        font-weight: 700;
    }
    .hzk-lines-head > :nth-child(2) {
        text-align: center;
    }
    .hzk-lines-head > :last-child {
        text-align: end;
    }
    .hzk-line:not(.is-static) .hzk-line-total {
        width: 7.5rem;
        min-width: 0;
    }
}
.hzk-continue {
    margin-top: 16px;
    font-size: .95rem;
}
@media (max-width: 640px) {
    /* The row total sits on the trailing edge, level with the stepper. */
    .hzk-line:not(.is-static) .hzk-line-total {
        justify-self: end;
    }
    .hzk-continue {
        margin-top: 16px;
    }
}

/* Required fields carry a mark; optional ones already say so in their label. */
.hzk-field:has(> [required], > [aria-required="true"], > div > [required], > div > [aria-required="true"]) > label::after,
.hzk-field:has(> div > [required]) > .hzauth-row > label::after {
    content: " *";
    color: #a3341f;
    font-weight: 700;
}

/* =========================================================================
   Shopping 3.0 — cart cards on phones, branded empty cart, address cards, folding summary.
   ========================================================================= */

/* Phones: each cart line is a card — product on top, quantity and total on its own ruled row. */
@media (max-width: 640px) {
    .hz-cart-page .hzk-lines {
        display: grid;
        gap: 12px;
    }
    .hz-cart-page .hzk-line:not(.is-static),
    .hz-cart-page .hzk-line:not(.is-static):first-child {
        grid-template-columns: auto minmax(0, 1fr);
        grid-template-areas:
            "thumb info"
            "qty   total";
        gap: 10px 12px;
        padding: 12px;
        border: 1px solid var(--hzh-line);
        border-radius: 14px;
        background: #fff;
    }
    .hz-cart-page .hzk-line:not(.is-static) .hzk-line-qty {
        grid-column: 1 / -1;
        grid-row: 2;
        justify-self: start;
        padding-top: 10px;
    }
    .hz-cart-page .hzk-line:not(.is-static) .hzk-line-total {
        grid-column: 1 / -1;
        grid-row: 2;
        justify-self: end;
        align-self: center;
        padding-top: 10px;
        font-size: 1.1rem;
    }
    .hz-cart-page .hzk-line:not(.is-static)::after {
        content: "";
        grid-column: 1 / -1;
        grid-row: 2;
        align-self: start;
        height: 1px;
        background: var(--hzh-line);
    }
    .hz-cart-page .hzk-summary {
        padding: 20px 16px;
    }
}

/* Empty cart: one centred group (icon, heading, line, action) close under the page heading. */
.hzk-empty.is-cart {
    justify-items: center;
    gap: 12px;
    max-width: 30rem;
    margin: 0 auto;
    padding: clamp(12px, 2.4vw, 28px) 0 clamp(24px, 4vw, 48px);
    border-top: 0;
    text-align: center;
}
.hzk-empty-icon {
    display: grid;
    place-items: center;
    width: 64px;
    height: 64px;
    margin-bottom: 4px;
    border-radius: 50%;
    background: var(--hzh-mist);
    color: var(--hzh-pine);
    font-size: 1.5rem;
}
.hzk-empty.is-cart .hzh-btn {
    min-width: min(100%, 240px);
    min-height: 52px;
}

/* Saved addresses: cards with the choice on the trailing edge. */
.hzk-addresses {
    display: grid;
    gap: 12px;
    border-top: 0;
}
.hzk-address {
    padding: 18px clamp(16px, 2vw, 24px);
    border: 1px solid var(--hzh-line);
    border-radius: 14px;
    background: #fff;
    transition: border-color var(--hzh-ease);
}
.hzk-address:hover,
.hzk-address:focus-within {
    border-color: var(--hzh-pine);
}
@media (max-width: 980px) {
    /* Above the form, closed by default, opened with one tap. */
    .hzk-layout > .hzk-summary.is-fold {
        order: -1;
        padding-block: 6px;
    }
}
@media (prefers-reduced-motion: reduce) {
    .hzk-address {
        transition: none;
    }
}

/* Order summary disclosure (delivery step). The toggle exists only while site.js shows it on
   small screens; otherwise the summary reads as a normal titled block. */
.hzk-fold-toggle {
    display: flex;
    align-items: center;
    gap: 14px;
    width: 100%;
    min-height: 52px;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--hzh-ink);
    font: inherit;
    font-size: 1.12rem;
    font-weight: 700;
    text-align: start;
}
.hzk-fold-toggle[hidden] {
    display: none;
}
.hzk-fold-toggle b {
    margin-inline-start: auto;
    font-size: 1.05rem;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
}
.hzk-fold-toggle::after {
    content: "+";
    flex: 0 0 auto;
    width: 30px;
    height: 30px;
    display: grid;
    place-items: center;
    border: 1px solid var(--hzh-ink);
    border-radius: 50%;
    font-size: 1.1rem;
    font-weight: 500;
    line-height: 1;
}
.hzk-fold-toggle[aria-expanded="true"]::after {
    content: "\2212";
}
.hzk-fold-toggle:focus-visible {
    outline: 3px solid rgba(0, 125, 189, .5);
    outline-offset: 3px;
}
.hzk-fold-toggle[aria-expanded="true"] + [data-fold-body] {
    padding-top: 12px;
}
@media (max-width: 980px) {
    .hzk-layout > .hzk-summary.is-fold {
        order: -1;
        padding-block: 8px 12px;
    }
}
