/* ==========================================================================
   Co-Order Hub — Public Styles
   ========================================================================== */

/* ── Layout container ────────────────────────────────────────────────────── */

.coh-container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ── Notices ─────────────────────────────────────────────────────────────── */

.coh-notice {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 3px;
    font-size: 13px;
}

.coh-notice--closed {
    background: #fef8e7;
    color: #7a5c00;
    border: 1px solid #f0d96b;
}

/* ── Purchases grid (archive / shortcode) ────────────────────────────────── */

.coh-purchases-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
    margin: 24px 0;
}

.coh-purchases-empty {
    color: #666;
    font-style: italic;
    grid-column: 1 / -1;
}

/* Purchase card */
.coh-purchase-card {
    border: 1px solid #ddd;
    border-radius: 6px;
    overflow: hidden;
    transition: box-shadow 0.15s ease;
    background: #fff;
}

.coh-purchase-card:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.coh-purchase-card--expired {
    opacity: 0.75;
}

.coh-purchase-card__link {
    text-decoration: none;
    color: inherit;
    display: block;
}

/* Card cover image */
.coh-purchase-card__cover {
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: #f6f7f7;
}

.coh-purchase-card__cover--placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
}

.coh-purchase-card__cover--placeholder::after {
    content: '';
    display: block;
    width: 48px;
    height: 48px;
    background: #dcdcde;
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-1 16H6V6h12v13zm-4.44-6.19l-2.35 3.02-1.56-1.88L7.5 17h9l-2.94-4.19z'/%3E%3C/svg%3E");
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-1 16H6V6h12v13zm-4.44-6.19l-2.35 3.02-1.56-1.88L7.5 17h9l-2.94-4.19z'/%3E%3C/svg%3E");
}

.coh-purchase-card__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Card body */
.coh-purchase-card__body {
    padding: 16px;
}

.coh-purchase-card__title {
    margin: 0 0 8px;
    font-size: 18px;
    line-height: 1.3;
    color: #1d2327;
}

.coh-purchase-card__excerpt {
    margin: 0 0 12px;
    font-size: 14px;
    color: #555;
    line-height: 1.5;
}

.coh-purchase-card__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    font-size: 13px;
    color: #646970;
}

.coh-purchase-card__currency {
    font-weight: 600;
    color: #1d2327;
}

.coh-purchase-card__date--past {
    color: #a00;
}

.coh-purchase-card__closed-badge {
    display: inline-block;
    margin-top: 10px;
    padding: 3px 8px;
    background: #fef8e7;
    border: 1px solid #f0d96b;
    border-radius: 3px;
    font-size: 12px;
    color: #7a5c00;
}

/* ── Single purchase page ────────────────────────────────────────────────── */

.coh-single-purchase {
    padding: 24px 0 48px;
}

/* Cover image */
.coh-purchase-cover {
    margin-bottom: 24px;
    border-radius: 6px;
    overflow: hidden;
    max-height: 400px;
}

.coh-purchase-cover__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Header */
.coh-purchase-header {
    margin-bottom: 20px;
}

.coh-purchase-title {
    margin: 0 0 12px;
    font-size: 28px;
    line-height: 1.2;
    color: #1d2327;
}

.coh-purchase-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 24px;
    align-items: center;
    font-size: 14px;
}

.coh-meta-item {
    display: flex;
    gap: 4px;
    align-items: center;
}

.coh-meta-label {
    color: #646970;
}

.coh-meta-value {
    font-weight: 500;
    color: #1d2327;
}

.coh-meta-item--expired .coh-meta-value {
    color: #a00;
}

.coh-delivery-status {
    font-size: 15px;
}

/* Description */
.coh-purchase-description {
    margin: 20px 0 32px;
    font-size: 15px;
    line-height: 1.7;
    color: #3c434a;
}

/* ── Items section ───────────────────────────────────────────────────────── */

.coh-items-section {
    margin-top: 32px;
}

.coh-items-heading {
    margin: 0 0 20px;
    font-size: 24px;
    line-height: 38px;
    color: #1d2327;
    border-bottom: 2px solid #dcdcde;
    padding-bottom: 8px;
}

/* ── Compact list (table) view ───────────────────────────────────────────── */

.coh-items-table-toolbar {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
}

.coh-items-table-search {
    flex: 1;
    max-width: 360px;
    padding: 7px 10px;
    border: 1px solid #c3c4c7;
    border-radius: 4px;
    font-size: 13px;
    line-height: 1.4;
}

.coh-items-table-search:focus {
    outline: none;
    border-color: #2271b1;
    box-shadow: 0 0 0 2px rgba(34, 113, 177, 0.2);
}

.coh-items-table-count {
    font-size: 12px;
    color: #646970;
    white-space: nowrap;
}

.coh-items-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.coh-items-table thead th {
    padding: 7px 10px;
    text-align: left;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #646970;
    border-bottom: 2px solid #dcdcde;
    white-space: nowrap;
}

.coh-items-table__th-price {
    text-align: right;
}

.coh-items-table__th-action {
    width: 1px; /* shrink to content */
}

.coh-items-table__row {
    border-bottom: 1px solid #f0f0f0;
}

.coh-items-table__row:last-child {
    border-bottom: none;
}

.coh-items-table__row:hover {
    background: #f9f9f9;
}

.coh-items-table__col-item,
.coh-items-table__col-price,
.coh-items-table__col-action {
    padding: 7px 10px;
    vertical-align: middle;
}

.coh-items-table__sku {
    display: inline;
    font-size: 11px;
    color: #8c8f94;
    white-space: nowrap;
    margin-right: 6px;
}

.coh-items-table__name {
    display: inline;
    color: #1d2327;
    font-weight: 500;
    margin-right: 4px;
}

.coh-items-table__supplier-link {
    display: inline;
    font-size: 11px;
    color: #646970;
    text-decoration: none;
}

.coh-items-table__supplier-link:hover {
    color: #2271b1;
}

.coh-items-table__col-price {
    text-align: right;
    white-space: nowrap;
}

.coh-items-table__price-orig {
    color: #8c8f94;
    font-size: 11px;
    margin-right: 4px;
    text-decoration: line-through;
}

.coh-items-table__price--group {
    color: #00a32a;
    font-weight: 600;
}

.coh-items-table__col-action {
    white-space: nowrap;
}

/* Compact add-to-cart row */
.coh-items-table__col-action .coh-add-to-cart {
    display: flex;
    align-items: center;
    gap: 4px;
    padding-top: 0;
}

.coh-items-table__qty {
    width: 48px;
    padding: 4px 6px;
    font-size: 13px;
    border: 1px solid #c3c4c7;
    border-radius: 4px;
    text-align: center;
}

.coh-items-table__add-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    padding: 0;
    border: 1px solid #2271b1;
    border-radius: 4px;
    background: #2271b1;
    color: #fff;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
    flex-shrink: 0;
}

.coh-items-table__add-btn:hover {
    background: #135e96;
    border-color: #135e96;
}

.coh-items-table__add-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.coh-items-table__col-action .coh-add-to-cart__feedback {
    font-size: 11px;
    min-width: 60px;
}

/* Items grid */
.coh-items-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
}

/* Item card */
.coh-item-card {
    border: 1px solid #dcdcde;
    border-radius: 6px;
    overflow: hidden;
    background: #fff;
    display: flex;
    flex-direction: column;
    transition: box-shadow 0.15s ease;
}

.coh-item-card:hover {
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.08);
}

/* Item image */
.coh-item-card__img-wrap {
    width: 100%;
    aspect-ratio: 1;
    overflow: hidden;
    background: #f6f7f7;
    flex-shrink: 0;
}

.coh-item-card__img-wrap--placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
}

.coh-item-card__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Item body */
.coh-item-card__body {
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1;
}

.coh-item-card__sku {
    margin: 0;
    font-size: 11px;
    color: #8c8f94;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.coh-item-card__name {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
    color: #1d2327;
    line-height: 1.3;
}

.coh-item-card__price {
    margin: 4px 0 0;
    font-size: 16px;
    font-weight: 700;
    color: #1d2327;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
}

.coh-item-card__price-badge {
    display: inline-block;
    padding: 2px 6px;
    background: #edfaef;
    color: #1a7a2a;
    border: 1px solid #b3e6bb;
    border-radius: 3px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
}

.coh-item-card__supplier-link {
    font-size: 12px;
    color: #2271b1;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 2px;
}

.coh-item-card__supplier-link:hover {
    text-decoration: underline;
}

/* Add to cart */
.coh-add-to-cart {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: auto;
    padding-top: 10px;
}

.coh-qty-input {
    width: 56px;
    padding: 6px 8px;
    border: 1px solid #c3c4c7;
    border-radius: 3px;
    font-size: 14px;
    text-align: center;
    -moz-appearance: textfield;
}

.coh-qty-input::-webkit-inner-spin-button,
.coh-qty-input::-webkit-outer-spin-button {
    opacity: 1;
}

.coh-add-to-cart-btn {
    flex: 1;
    padding: 6px;
    background: #2271b1;
    color: #fff;
    border: none;
    border-radius: 3px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s ease;
    white-space: nowrap;
}

.coh-add-to-cart-btn:hover {
    background: #135e96;
}

.coh-add-to-cart-btn:disabled {
    background: #8c8f94;
    cursor: not-allowed;
}

.coh-add-to-cart__feedback {
    font-size: 12px;
    color: #1a7a2a;
    min-height: 1em;
}

.coh-add-to-cart__feedback--error {
    color: #d63638;
}

.coh-item-card__closed-notice {
    margin: auto 0 0;
    padding-top: 10px;
    font-size: 13px;
    color: #8c8f94;
    font-style: italic;
}

/* ── Cart page ───────────────────────────────────────────────────────────── */

.coh-cart {
    margin: 24px 0 48px;
}

/* Error notice */
.coh-cart__error {
    padding: 12px 16px;
    background: #fcf0f1;
    border-left: 4px solid #d63638;
    border-radius: 3px;
    margin-bottom: 20px;
    color: #1d2327;
    font-size: 14px;
}

/* Empty state */
.coh-cart--empty {
    text-align: center;
    padding: 48px 24px;
    color: #646970;
}

.coh-cart__empty-msg {
    font-size: 18px;
    margin-bottom: 16px;
}

/* Purchase group */
.coh-cart__group {
    margin-bottom: 32px;
}

.coh-cart__group-title {
    margin: 0 0 12px;
    font-size: 18px;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.coh-cart__group-title a {
    color: #1d2327;
    text-decoration: none;
}

.coh-cart__group-title a:hover {
    text-decoration: underline;
}

.coh-cart__group-currency {
    font-size: 13px;
    font-weight: 400;
    color: #646970;
    border: 1px solid #dcdcde;
    border-radius: 3px;
    padding: 2px 8px;
}

/* Cart table */
.coh-cart__table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.coh-cart__table th,
.coh-cart__table td {
    padding: 10px 12px;
    text-align: left;
    border-bottom: 1px solid #f0f0f0;
    vertical-align: middle;
}

.coh-cart__table thead th {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #646970;
    border-bottom: 2px solid #dcdcde;
}

.coh-cart__col-price,
.coh-cart__col-qty,
.coh-cart__col-line,
.coh-cart__col-remove {
    width: 1px;
    white-space: nowrap;
}

.coh-cart__col-remove {
    text-align: center;
}

/* Item cell */
.coh-cart__col-item {
    display: flex;
    align-items: center;
    gap: 10px;
}

.coh-cart__item-img {
    width: 48px;
    height: 48px;
    object-fit: cover;
    border-radius: 3px;
    flex-shrink: 0;
}

.coh-cart__item-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.coh-cart__item-name {
    font-weight: 500;
    color: #1d2327;
}

.coh-cart__item-sku {
    font-size: 11px;
    color: #8c8f94;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

/* Qty input */
.coh-cart__qty-input {
    width: 60px;
    padding: 5px 8px;
    border: 1px solid #c3c4c7;
    border-radius: 3px;
    font-size: 14px;
    text-align: center;
    -moz-appearance: textfield;
}

.coh-cart__qty-input::-webkit-inner-spin-button,
.coh-cart__qty-input::-webkit-outer-spin-button {
    opacity: 1;
}

/* Remove button */
.coh-cart__remove-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: #8c8f94;
    font-size: 18px;
    line-height: 1;
    padding: 4px 8px;
    border-radius: 3px;
    transition: color 0.1s, background 0.1s;
}

.coh-cart__remove-btn:hover {
    color: #d63638;
    background: #fcf0f1;
}

/* Subtotal row */
.coh-cart__subtotal-row td {
    border-top: 2px solid #dcdcde;
    font-weight: 600;
    padding-top: 12px;
}

.coh-cart__subtotal-label {
    text-align: right;
    color: #646970;
}

.coh-cart__subtotal-value {
    white-space: nowrap;
}

/* ── Checkout form ────────────────────────────────────────────────────────── */

.coh-checkout {
    margin-top: 40px;
    padding-top: 32px;
    border-top: 2px solid #dcdcde;
    max-width: 520px;
}

.coh-checkout__heading {
    margin: 0 0 20px;
    font-size: 20px;
    color: #1d2327;
}

.coh-checkout__field {
    margin-bottom: 16px;
}

.coh-checkout__label {
    display: block;
    margin-bottom: 6px;
    font-size: 14px;
    font-weight: 500;
    color: #1d2327;
}

.coh-required {
    color: #d63638;
    margin-left: 2px;
}

.coh-checkout__input,
.coh-checkout__textarea {
    display: block;
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #c3c4c7;
    border-radius: 3px;
    font-size: 14px;
    color: #1d2327;
    background: #fff;
    box-sizing: border-box;
    transition: border-color 0.15s;
}

.coh-checkout__input:focus,
.coh-checkout__textarea:focus {
    outline: none;
    border-color: #2271b1;
    box-shadow: 0 0 0 1px #2271b1;
}

.coh-checkout__input.coh-field--error,
.coh-checkout__textarea.coh-field--error {
    border-color: #d63638;
    box-shadow: 0 0 0 1px #d63638;
}

.coh-checkout__textarea {
    resize: vertical;
    min-height: 80px;
}

.coh-checkout__required-note {
    font-size: 12px;
    color: #646970;
    margin: 0 0 16px;
}

.coh-checkout__actions {
    margin-top: 20px;
}

/* ── Buttons ─────────────────────────────────────────────────────────────── */

.coh-btn {
    display: inline-block;
    padding: 10px 20px;
    border-radius: 3px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    border: none;
    transition: background 0.15s, color 0.15s;
}

.coh-btn--primary {
    background: #2271b1;
    color: #fff;
}

.coh-btn--primary:hover {
    background: #135e96;
    color: #fff;
}

.coh-btn--secondary {
    background: #f6f7f7;
    color: #1d2327;
    border: 1px solid #c3c4c7;
}

.coh-btn--secondary:hover {
    background: #f0f0f1;
}

/* ── Thank-you screen ────────────────────────────────────────────────────── */

.coh-thank-you {
    text-align: center;
    padding: 48px 24px;
}

.coh-thank-you__icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.coh-thank-you__heading {
    margin: 0 0 12px;
    font-size: 26px;
    color: #1d2327;
}

.coh-thank-you__text {
    max-width: 480px;
    margin: 0 auto 24px;
    color: #3c434a;
    font-size: 15px;
    line-height: 1.6;
}

/* ── Order portal ────────────────────────────────────────────────────────── */

.coh-portal {
    padding: 24px 0 48px;
}

.coh-portal__header {
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 2px solid #dcdcde;
}

.coh-portal__title {
    margin: 0 0 10px;
    font-size: 26px;
    color: #1d2327;
}

.coh-portal__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    font-size: 14px;
}

.coh-portal__purchase-name {
    font-weight: 500;
    color: #1d2327;
}

.coh-portal__date {
    color: #646970;
}

.coh-portal__delivery-status {
    font-size: 14px;
    color: #1d2327;
}

/* Order status badge */
.coh-order-status-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 3px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.coh-order-status-badge--pending_payment {
    background: #fef8e7;
    color: #7a5c00;
    border: 1px solid #f0d96b;
}

.coh-order-status-badge--document_uploaded {
    background: #e7f0ff;
    color: #1a4c8a;
    border: 1px solid #91b6f5;
}

.coh-order-status-badge--paid {
    background: #edfaef;
    color: #1a7a2a;
    border: 1px solid #b3e6bb;
}

.coh-order-status-badge--cancelled {
    background: #f0f0f1;
    color: #646970;
    border: 1px solid #c3c4c7;
}

/* Portal sections */
.coh-portal__section {
    margin-bottom: 32px;
}

.coh-portal__section-title {
    margin: 0 0 14px;
    font-size: 18px;
    color: #1d2327;
    border-bottom: 1px solid #dcdcde;
    padding-bottom: 6px;
}

/* Notices */
.coh-portal__notice {
    padding: 12px 16px;
    border-radius: 3px;
    font-size: 14px;
    border-left: 4px solid transparent;
}

.coh-portal__notice--success {
    background: #edfaef;
    border-left-color: #1a7a2a;
    color: #1d2327;
}

.coh-portal__notice--error {
    background: #fcf0f1;
    border-left-color: #d63638;
    color: #1d2327;
}

/* Items table */
.coh-portal__items-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.coh-portal__items-table th,
.coh-portal__items-table td {
    padding: 10px 12px;
    text-align: left;
    border-bottom: 1px solid #f0f0f0;
    vertical-align: middle;
}

.coh-portal__items-table thead th {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #646970;
    border-bottom: 2px solid #dcdcde;
}

.coh-portal__total-row td {
    border-top: 2px solid #dcdcde;
    font-weight: 600;
    padding-top: 12px;
}

.coh-portal__total-label {
    color: #3c434a;
}

.coh-portal__total-note {
    display: block;
    font-size: 12px;
    font-weight: 400;
    color: #8c8f94;
    margin-top: 2px;
}

.coh-portal__total-value {
    white-space: nowrap;
    font-size: 16px;
}

/* Payment details */
.coh-portal__payment-details {
    background: #f6f7f7;
    border: 1px solid #dcdcde;
    border-radius: 3px;
    padding: 14px 16px;
    font-size: 14px;
    line-height: 1.7;
    color: #3c434a;
    white-space: pre-line;
}

.coh-portal__doc-uploaded {
    color: #646970;
    font-size: 14px;
    margin: 0;
}

/* Upload form */
.coh-upload-form__row {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 12px;
}

.coh-upload-form__file-input {
    flex: 1;
    min-width: 200px;
    font-size: 14px;
}

/* ── Purchases count ─────────────────────────────────────────────────────── */

.coh-purchases-count {
    margin: 0 0 4px;
    font-size: 13px;
    color: #646970;
}

.coh-purchases-heading {
    font-size: 1.4rem;
    font-weight: 700;
    margin: 0 0 1rem;
}

/* ── Archive empty state ─────────────────────────────────────────────────── */

.coh-purchases-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px 16px;
    color: #646970;
}

.coh-purchases-empty__icon {
    font-size: 40px;
    margin-bottom: 12px;
    display: block;
}

.coh-purchases-empty__msg {
    margin: 0;
    font-size: 15px;
    font-style: italic;
}

/* ── Item card: original price (crossed out when group price active) ─────── */

.coh-item-card__price-orig {
    text-decoration: line-through;
    color: #8c8f94;
    font-weight: 400;
    font-size: 13px;
    margin-right: 2px;
}

/* ── Threshold progress bar ─────────────────────────────────────────────── */

.coh-threshold {
    margin-top: 6px;
}

.coh-threshold__bar {
    height: 6px;
    background: #dcdcde;
    border-radius: 3px;
    overflow: hidden;
}

.coh-threshold__fill {
    height: 100%;
    width: var(--pct, 0%);
    background: #2271b1;
    border-radius: 3px;
    transition: width 0.3s ease;
}

.coh-threshold__label {
    margin: 4px 0 0;
    font-size: 11px;
    color: #646970;
    line-height: 1.4;
}

/* ── Cart: item image placeholder ────────────────────────────────────────── */

.coh-cart__item-img--placeholder {
    width: 48px;
    height: 48px;
    background: #f6f7f7;
    border-radius: 3px;
    flex-shrink: 0;
}

/* ── Order status steps / timeline ──────────────────────────────────────── */

.coh-order-steps {
    display: flex;
    align-items: center;
    margin: 20px 0 28px;
    overflow-x: auto;
}

.coh-order-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    min-width: 80px;
    text-align: center;
    flex-shrink: 0;
}

.coh-order-step--connector {
    flex: 1;
    height: 2px;
    background: #dcdcde;
    align-self: flex-start;
    margin-top: 13px;
    min-width: 24px;
}

.coh-order-step__dot {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #dcdcde;
    color: #646970;
    font-size: 12px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.coh-order-step--done .coh-order-step__dot {
    background: #1a7a2a;
    color: #fff;
}

.coh-order-step--active .coh-order-step__dot {
    background: #2271b1;
    color: #fff;
    box-shadow: 0 0 0 3px #c5d9f0;
}

.coh-order-step__label {
    font-size: 12px;
    color: #646970;
    line-height: 1.3;
    max-width: 80px;
}

.coh-order-step--done .coh-order-step__label,
.coh-order-step--active .coh-order-step__label {
    color: #1d2327;
    font-weight: 500;
}

/* ── Subscribe form ──────────────────────────────────────────────────────── */

.coh-subscribe-form__field {
    margin-bottom: 12px;
    max-width: 400px;
}

.coh-subscribe-form__label {
    display: block;
    margin-bottom: 6px;
    font-size: 14px;
    font-weight: 500;
    color: #1d2327;
}

.coh-subscribe-form__row {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.coh-subscribe-form__input {
    flex: 1;
    min-width: 200px;
    padding: 8px 12px;
    border: 1px solid #c3c4c7;
    border-radius: 3px;
    font-size: 14px;
    color: #1d2327;
    background: #fff;
    box-sizing: border-box;
    transition: border-color 0.15s;
}

.coh-subscribe-form__input:focus {
    outline: none;
    border-color: #2271b1;
    box-shadow: 0 0 0 1px #2271b1;
}

.coh-subscribe-notice {
    padding: 12px 16px;
    border-radius: 3px;
    font-size: 14px;
    border-left: 4px solid transparent;
    margin-bottom: 12px;
}

.coh-subscribe-notice--success {
    background: #edfaef;
    border-left-color: #1a7a2a;
    color: #1a7a2a;
}

.coh-subscribe-notice--info {
    background: #f6f7f7;
    border-left-color: #646970;
    color: #3c434a;
}

.coh-subscribe-notice--error {
    background: #fcf0f1;
    border-left-color: #d63638;
    color: #d63638;
}

/* ── Responsive ──────────────────────────────────────────────────────────── */

@media (max-width: 600px) {
    .coh-purchases-grid {
        grid-template-columns: 1fr;
    }

    .coh-items-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    }

    .coh-purchase-title {
        font-size: 22px;
    }

    /* ── Responsive cart table ──────────────────────────────────────── */

    .coh-cart__table thead {
        display: none;
    }

    .coh-cart__table tbody tr {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 4px 12px;
        padding: 12px 0;
        border-bottom: 1px solid #f0f0f0;
    }

    .coh-cart__table tbody tr:last-child {
        border-bottom: none;
    }

    .coh-cart__table td {
        display: flex;
        align-items: center;
        padding: 2px 0;
        border: none;
    }

    .coh-cart__table td::before {
        content: attr(data-label);
        font-size: 11px;
        font-weight: 600;
        text-transform: uppercase;
        letter-spacing: 0.04em;
        color: #646970;
        margin-right: 6px;
        flex-shrink: 0;
    }

    .coh-cart__col-item {
        grid-column: 1 / -1;
    }

    .coh-cart__col-item::before {
        display: none;
    }

    .coh-cart__col-remove {
        justify-content: flex-end;
    }

    .coh-cart__col-remove::before {
        display: none;
    }

    .coh-cart__table tfoot td {
        padding: 8px 0;
    }

    /* ── Responsive order portal table ─────────────────────────────── */

    .coh-portal__items-table thead {
        display: none;
    }

    .coh-portal__items-table tbody tr {
        display: block;
        padding: 12px 0;
        border-bottom: 1px solid #f0f0f0;
    }

    .coh-portal__items-table td {
        display: flex;
        align-items: center;
        padding: 3px 0;
        border: none;
    }

    .coh-portal__items-table td::before {
        content: attr(data-label);
        font-size: 11px;
        font-weight: 600;
        text-transform: uppercase;
        letter-spacing: 0.04em;
        color: #646970;
        width: 80px;
        flex-shrink: 0;
    }

    .coh-portal__total-row td {
        display: block;
        padding: 4px 0;
        border-top: 1px solid #dcdcde;
    }

    /* ── Order steps: vertical on mobile ───────────────────────────── */

    .coh-order-steps {
        flex-direction: column;
        align-items: flex-start;
        overflow: visible;
    }

    .coh-order-step {
        flex-direction: row;
        align-items: center;
        gap: 12px;
        text-align: left;
        min-width: 0;
    }

    .coh-order-step--connector {
        width: 2px;
        height: 20px;
        margin: 0 0 0 13px;
        flex: none;
    }

    .coh-order-step__label {
        max-width: none;
    }
}

/* ── Two-column purchase layout (items + sidebar) ────────────────────────── */

.coh-purchase-layout {
    margin-top: 32px;
}

.coh-purchase-layout--with-cart {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 32px;
    align-items: start;
}

.coh-purchase-layout__items {
    margin-top: 0;
    min-width: 0; /* prevent overflow inside grid */
}

/* ── Cart sidebar ────────────────────────────────────────────────────────── */

.coh-cart-sidebar {
    position: sticky;
    top: 24px;
}

.coh-cart-sidebar__inner {
    border: 1px solid #dcdcde;
    border-radius: 6px;
    background: #fff;
    display: flex;
    flex-direction: column;
    max-height: calc(100vh - 60px);
    overflow: hidden; /* children handle their own scroll */
}

.coh-cart-sidebar__heading {
    margin: 0;
    padding: 14px 16px;
    font-size: 16px;
    font-weight: 600;
    color: #1d2327;
    background: #f6f7f7;
    border-bottom: 1px solid #dcdcde;
    display: flex;
    align-items: center;
    gap: 6px;
    position: sticky;
    top: 0;
    z-index: 1;
}

.coh-cart-sidebar__count {
    font-size: 13px;
    font-weight: 400;
    color: #646970;
}

.coh-cart-sidebar__body {
    padding: 12px 16px;
    flex: 1;
    min-height: 0; /* allow flex child to shrink below content size */
    overflow-y: auto;
    overflow-x: hidden;
}

.coh-cart-sidebar__empty {
    margin: 8px 0;
    font-size: 13px;
    color: #8c8f94;
    font-style: italic;
}

/* Purchase group header (shown when cart has items from multiple purchases) */
.coh-cart-sidebar__group-header {
    margin: 10px 0 4px;
    padding: 4px 0;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #646970;
    border-bottom: 1px solid #ebebeb;
}

.coh-cart-sidebar__group-header:first-child {
    margin-top: 0;
}

.coh-cart-sidebar__group-subtotal {
    margin: 6px 0 14px;
    text-align: right;
    font-size: 12px;
    font-weight: 700;
    color: #1d2327;
    background-color: #2271b114;
    border-radius: 2px;
    padding: 2px 26px 2px 0;
    line-height: 1.2;
}

/* Items list */
.coh-cart-sidebar__items {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.coh-cart-sidebar__item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
}

.coh-cart-sidebar__item-img {
    width: 36px;
    height: 36px;
    object-fit: cover;
    border-radius: 3px;
    flex-shrink: 0;
}

.coh-cart-sidebar__item-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.coh-cart-sidebar__item-name {
    font-weight: 500;
    color: #1d2327;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.coh-cart-sidebar__item-qty {
    font-size: 12px;
    color: #646970;
}

.coh-cart-sidebar__item-price {
    font-weight: 600;
    color: #1d2327;
    white-space: nowrap;
    flex-shrink: 0;
}

.coh-cart-sidebar__remove-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: #8c8f94;
    font-size: 16px;
    line-height: 1;
    padding: 2px 4px;
    border-radius: 3px;
    flex-shrink: 0;
    transition: color 0.1s, background 0.1s;
}

.coh-cart-sidebar__remove-btn:hover {
    color: #d63638;
    background: #fcf0f1;
}

/* Checkout wrap: subtotal + trigger + form */
.coh-cart-sidebar__checkout-wrap {
    padding: 12px 16px 16px;
    border-top: 1px solid #f0f0f0;
    display: none;
}

.coh-cart-sidebar--has-items .coh-cart-sidebar__checkout-wrap {
    display: block;
}

/* When form is open: hide items body, make checkout-wrap fill + scroll */
.coh-cart-sidebar--form-open .coh-cart-sidebar__body {
    display: none;
}

.coh-cart-sidebar--form-open .coh-cart-sidebar__checkout-wrap {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
}

/* Trigger wrap: hidden when form is open */
.coh-cart-sidebar__order-trigger-wrap {
    margin-top: 12px;
}

.coh-cart-sidebar--form-open .coh-cart-sidebar__order-trigger-wrap {
    display: none;
}

/* Form wrap: hidden by default, shown when form is open */
.coh-cart-sidebar__form-wrap {
    display: none;
}

.coh-cart-sidebar--form-open .coh-cart-sidebar__form-wrap {
    display: block;
}

/* Back link */
.coh-cart-sidebar__form-back {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: none;
    border: none;
    padding: 8px 0;
    font-size: 12px;
    color: #646970;
    cursor: pointer;
    margin-bottom: 4px;
}

.coh-cart-sidebar__form-back:hover {
    color: #2271b1;
}

.coh-cart-sidebar__subtotal {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    font-size: 13px;
    color: #3c434a;
    margin-bottom: 4px;
}

.coh-cart-sidebar__subtotal-value {
    font-weight: 700;
    color: #1d2327;
}

.coh-cart-sidebar__subtotal-note {
    font-size: 11px;
    color: #8c8f94;
    margin: 0 0 14px;
    line-height: 1.4;
}

/* Inline checkout form */
.coh-cart-sidebar__form {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid #f0f0f0;
}

.coh-cart-sidebar__label {
    display: flex;
    flex-direction: column;
    gap: 3px;
    font-size: 11px;
    font-weight: 600;
    color: #646970;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.coh-cart-sidebar__input {
    width: 100%;
    box-sizing: border-box;
    border: 1px solid #c3c4c7;
    border-radius: 4px;
    padding: 7px 10px;
    font-size: 13px;
    color: #1d2327;
    background: #fff;
    font-family: inherit;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.coh-cart-sidebar__input:focus {
    outline: none;
    border-color: #2271b1;
    box-shadow: 0 0 0 2px rgba(34, 113, 177, 0.15);
}

.coh-cart-sidebar__textarea {
    resize: vertical;
    min-height: 54px;
}

.coh-cart-sidebar__agree-label {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 12px;
    line-height: 1.4;
    color: #3c434a;
    margin-top: 12px;
    cursor: pointer;
}

.coh-cart-sidebar__agree-checkbox {
    flex-shrink: 0;
    margin-top: 2px;
    width: 15px;
    height: 15px;
    cursor: pointer;
}

.coh-cart-sidebar__place-order-btn {
    width: 100%;
    margin-top: 4px;
}

/* ── Responsive: sidebar stacks below items on narrow screens ────────────── */

@media (max-width: 900px) {
    .coh-purchase-layout--with-cart {
        grid-template-columns: 1fr;
    }

    .coh-cart-sidebar {
        position: static;
    }

    .coh-cart-sidebar__inner {
        max-height: none;
    }
}
