/* Online sales: shared public/account and administration styles, scoped to commerce UI. */
.commerce-page,
.commerce-shop,
.commerce-checkout,
.commerce-auth,
.commerce-account-grid,
.commerce-purchase {
    min-width: 0;
    color: var(--ink, #17324d);
    overflow-wrap: anywhere;
}

.commerce-page { display: grid; gap: 22px; }
.commerce-page > * { min-width: 0; margin-block: 0; }
.commerce-page h1 { margin: 0 0 8px; }
.commerce-page h2 { font-size: 1.3rem; margin: 0 0 15px; }
.commerce-page h3 { font-size: 1.05rem; margin: 0 0 8px; }
.commerce-header {
    position: static;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: flex-start;
    gap: 18px;
    background: transparent;
    border: 0;
}
.commerce-header > * { min-width: 0; max-width: 100%; }
.commerce-header p { margin-bottom: 0; }
.commerce-header > .commerce-actions { margin: 0; }
.commerce-page > .commerce-actions { margin: 0; }
.commerce-card {
    min-width: 0;
    padding: 24px;
    background: #fff;
    border: 1px solid var(--line, #dce4ed);
    border-radius: 16px;
    box-shadow: 0 3px 18px #073b7205;
}
.commerce-card > :last-child { margin-bottom: 0; }
.commerce-grid,
.commerce-account-grid,
.commerce-checkout-grid {
    display: grid;
    gap: 24px;
    align-items: start;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}
.commerce-grid > *,
.commerce-account-grid > *,
.commerce-checkout-grid > * { min-width: 0; }
.commerce-checkout-grid { grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); }
.commerce-account-grid { grid-template-columns: minmax(0, .95fr) minmax(0, 1.35fr); }
.commerce-settings-grid { align-items: start; gap: 22px; }
.commerce-field-wide { grid-column: 1 / -1; }

.commerce-toolbar,
.commerce-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    margin-block: 18px;
    min-width: 0;
}
.commerce-toolbar > *,
.commerce-actions > * { min-width: 0; max-width: 100%; }
.commerce-toolbar > form { margin: 0; }
.commerce-toolbar > a:not(.btn),
.commerce-actions > a:not(.commerce-button) { display: inline-flex; align-items: center; min-height: 44px; }
.commerce-actions > .commerce-field { flex: 1 1 12rem; max-width: 22rem; }
form.commerce-actions { align-items: flex-end; }
form.commerce-actions > .commerce-button { margin-bottom: 0; }
.commerce-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    max-width: 100%;
    padding: 10px 18px;
    border: 1px solid var(--navy, #073b72);
    border-radius: 9px;
    background: var(--navy, #073b72);
    color: #fff;
    font: 700 .9rem/1.75 Vazirmatn, Tahoma, sans-serif;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    white-space: normal;
    transition: background-color .18s, border-color .18s, box-shadow .18s;
}
.commerce-button-secondary { background: #fff; border-color: var(--line, #dce4ed); color: var(--navy, #073b72); }
.commerce-button:focus-visible { outline: 3px solid var(--gold, #c7a16b); outline-offset: 3px; }
.commerce-button:disabled,
.commerce-button[aria-disabled="true"] {
    opacity: .55;
    cursor: not-allowed;
    box-shadow: none;
}
.commerce-hero .commerce-toolbar { margin-bottom: 0; }
.commerce-hero .btn.secondary { color: var(--navy, #073b72); }

.commerce-form { min-width: 0; }
.commerce-field { min-width: 0; }
.commerce-form label,
.commerce-field > label { font-size: .9rem; margin: 0 0 7px; color: var(--ink, #17324d); }
.commerce-form > label { margin-top: 16px; }
:is(.commerce-form, .commerce-field, .commerce-product-form) :is(input:not([type="hidden"]):not([type="checkbox"]):not([type="radio"]), textarea, select) {
    display: block;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    min-height: 46px;
    padding: 10px 13px;
    margin: 0 0 8px;
    border: 1px solid #c2d0df;
    border-radius: 9px;
    background: #fff;
    color: var(--ink, #17324d);
    font: inherit;
    line-height: 1.8;
}
.commerce-form textarea,
.commerce-field textarea { min-height: 100px; resize: vertical; }
.commerce-form :is(input, textarea, select):focus-visible,
.commerce-field :is(input, textarea, select):focus-visible {
    outline: 3px solid var(--gold, #c7a16b);
    outline-offset: 2px;
    border-color: var(--navy, #073b72);
}
.commerce-form input[readonly] { background: var(--paper, #f4f7fa); color: #52697f; }
.commerce-form :is(input, textarea, select).input-validation-error,
.commerce-field :is(input, textarea, select).input-validation-error { border-color: #ba5549; background: #fffaf9; }
.commerce-field small { display: block; font-size: .8rem; color: var(--muted, #617487); margin-bottom: 8px; }
.commerce-field > .commerce-muted { margin: 5px 0 0; }
.commerce-field + .commerce-field { margin-top: 16px; }
:is(.commerce-grid, .form-grid) > .commerce-field { margin-top: 0; }
.commerce-form > .commerce-button { margin-top: 18px; }
.commerce-form > .commerce-field { margin-top: 18px; }
.commerce-form > .commerce-grid { margin-block: 22px; }
.commerce-form > .btn { margin-top: 14px; }
.commerce-check,
.commerce-form label.commerce-check,
.commerce-terms label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    min-height: 44px;
    margin-block: 8px;
    font-size: .87rem;
    line-height: 1.9;
    font-weight: 400;
    cursor: pointer;
}
.commerce-check input[type="checkbox"],
.commerce-terms input[type="checkbox"] {
    display: inline-block;
    flex: 0 0 18px;
    width: 18px;
    height: 18px;
    min-height: 18px;
    margin: 5px 0 0;
    padding: 0;
    accent-color: var(--navy, #073b72);
}
.commerce-actions > .commerce-check { margin-block: 0; }
.commerce-terms { margin-top: 18px; }
.commerce-terms label { font-weight: 400; }

.commerce-muted,
.commerce-note { color: var(--muted, #617487); font-size: .83rem; line-height: 1.95; }
.commerce-note { margin-block: 10px; }
.commerce-add-status {
    flex-basis: 100%;
    width: 100%;
    margin: 10px 0 0;
    font-size: .8rem;
    line-height: 1.9;
    color: #255a45;
    overflow-wrap: anywhere;
}
.commerce-add-status[hidden] { display: none; }
.commerce-add-status[data-state="busy"] { color: var(--muted, #617487); }
.commerce-add-status[data-state="error"] { color: #9e3e35; }
.commerce-add-status a { display: inline-block; margin-inline-start: 7px; font-weight: 700; }
.commerce-add-form[aria-busy="true"] button { cursor: progress; }
.notice.commerce-note { color: #20513b; }
.commerce-alert {
    padding: 14px 18px;
    border: 1px solid #e4c798;
    border-inline-start: 4px solid var(--gold, #c7a16b);
    border-radius: 10px;
    color: #785017;
    background: #fff8ed;
    font-size: .86rem;
    line-height: 2;
}
.commerce-alert a { color: #694309; text-decoration: underline; }
.commerce-validation,
.commerce-form .field-validation-error { color: #9a3027; font-size: .83rem; }
.commerce-validation.field-validation-error,
.commerce-form .field-validation-error { display: block; margin: 4px 0 10px; }
.commerce-validation.validation-summary-errors,
.commerce-errors.validation-summary-errors,
p.commerce-errors {
    padding: 14px 18px;
    border: 1px solid #e6b9b2;
    border-radius: 10px;
    color: #8e2e24;
    background: #fff2ef;
    font-size: .86rem;
    line-height: 2;
}
.commerce-form .validation-summary-errors { margin-bottom: 18px; }
.commerce-validation ul,
.commerce-errors ul { margin: 0; padding-inline-start: 20px; }
.commerce-validation:empty,
.commerce-errors:empty,
.commerce-validation.validation-summary-valid,
.commerce-errors.validation-summary-valid,
.commerce-validation.field-validation-valid { display: none; }

.commerce-pill,
.commerce-status {
    display: inline-block;
    max-width: 100%;
    padding: 4px 11px;
    border: 1px solid #d3dfeb;
    border-radius: 99px;
    background: #edf3f9;
    color: #254e76;
    font-size: .78rem;
    font-weight: 700;
    line-height: 1.8;
    white-space: normal;
}
.commerce-pill-sandbox { color: #805014; border-color: #e7cfaa; background: #fff5e5; }
.commerce-pill-live { color: #236144; border-color: #bfdcca; background: #edf8f1; }
.commerce-money,
.commerce-amount,
.commerce-purchase-price { font-variant-numeric: tabular-nums; font-weight: 700; color: var(--navy, #073b72); }
.commerce-amount { font-size: 1.15rem; margin-block: 8px; }
.commerce-product .commerce-amount,
.commerce-purchase .commerce-purchase-price { color: var(--navy, #073b72); }
.commerce-amount > span { font-size: .85rem; font-weight: 400; }
.commerce-preserve-lines { white-space: pre-wrap; overflow-wrap: anywhere; }
.commerce-break { overflow-wrap: anywhere; }

.commerce-details,
.commerce-definition {
    display: grid;
    grid-template-columns: minmax(0, .9fr) minmax(0, 1.2fr);
    gap: 0 18px;
    margin: 0 0 18px;
    font-size: .88rem;
}
.commerce-details > dt,
.commerce-details > dd,
.commerce-definition > dt,
.commerce-definition > dd { margin: 0; padding-block: 11px; border-bottom: 1px solid #e8eef4; min-width: 0; }
.commerce-details dt,
.commerce-definition dt { color: #546b80; font-weight: 400; }
.commerce-details dd,
.commerce-definition dd { margin-inline: 0; color: var(--ink, #17324d); overflow-wrap: anywhere; }
.commerce-total-row {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: minmax(0, .9fr) minmax(0, 1.2fr);
    gap: 18px;
    padding-block: 11px;
    border-bottom: 1px solid #e8eef4;
}
.commerce-total-row > * { min-width: 0; margin: 0; }
.commerce-total-row dd { text-align: end; }
.commerce-grand-total { border-top: 2px solid var(--gold, #c7a16b); margin-top: 8px; padding-top: 16px; font-weight: 700; }
.commerce-grand-total dt { color: var(--navy, #073b72); font-weight: 700; }
.commerce-totals { max-width: 620px; margin: 16px 0 0; margin-inline-start: auto; }
.commerce-totals dd { text-align: end; }
.commerce-totals > :nth-last-child(-n + 2) { color: var(--navy, #073b72); border-top: 2px solid var(--gold, #c7a16b); border-bottom: 0; margin-top: 8px; padding-top: 16px; }

.commerce-page div.commerce-summary {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin-block: 18px;
}
.commerce-page .commerce-summary > article { min-width: 0; background: #f5f8fc; border: 1px solid #e0e8f1; border-top: 3px solid var(--gold, #c7a16b); border-radius: 11px; padding: 16px; }
.commerce-page .commerce-summary > article :is(span, strong, small) { display: block; }
.commerce-page .commerce-summary > article span { color: #52697f; font-size: .8rem; }
.commerce-page .commerce-summary > article strong { font-size: 1.2rem; line-height: 1.8; margin-block: 8px; }
.commerce-page .commerce-summary > article small { color: var(--muted, #617487); font-size: .76rem; }
.commerce-checkout .commerce-summary { border-top: 4px solid var(--gold, #c7a16b); }
.commerce-checkout .commerce-summary > .btn { width: 100%; }
.commerce-checkout .commerce-definition { grid-template-columns: minmax(0, 1fr); }
.commerce-checkout .form-grid { align-items: start; }

.commerce-catalog { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.commerce-product { display: flex; flex-direction: column; padding: 22px; overflow: hidden; }
.commerce-product-image,
.commerce-product-placeholder { display: block; width: 100%; height: 220px; border-radius: 11px; background: #fff; }
.commerce-product-image { object-fit: contain; }
.commerce-product-placeholder { display: grid; place-items: center; padding: 24px; background: linear-gradient(140deg, var(--deep, #062c56), var(--blue, #1f4e79)); color: #e8cda6; text-align: center; }
.commerce-product-placeholder .latin { font-size: 1.35rem; }
.commerce-product-body { display: flex; flex: 1; flex-direction: column; min-width: 0; padding-top: 18px; }
.commerce-product-body h2 { font-size: 1.35rem; margin-bottom: 8px; }
.commerce-product-body > .btn { margin-top: auto; width: 100%; }
.commerce-product-body .commerce-note { margin-bottom: 18px; }
.commerce-empty { max-width: 800px; margin-inline: auto; }
.commerce-auth .login { width: 100%; max-width: 560px; margin: 0 auto; }
.commerce-auth .login h2 { font-size: 1.5rem; }
.commerce-order-list { display: grid; gap: 16px; }
.commerce-order-card { min-width: 0; padding: 18px; border: 1px solid var(--line, #dce4ed); border-inline-start: 3px solid var(--gold, #c7a16b); border-radius: 11px; background: #fbfcfe; }
.commerce-order-card h3 { font-size: 1.12rem; }
.commerce-order-card > :last-child { margin-bottom: 0; }
.commerce-order-card p { font-size: .88rem; }
.commerce-order-card .muted { font-size: .8rem; }
.commerce-orders h2 { margin-bottom: 18px; }
nav.commerce-pagination {
    position: static;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    inset: auto;
    max-height: none;
    padding: 18px 0 0;
    margin: 20px 0 0;
    overflow: visible;
    background: transparent;
    border: 0;
    border-top: 1px solid var(--line, #dce4ed);
    box-shadow: none;
    z-index: auto;
    font-size: .85rem;
}
nav.commerce-pagination a { white-space: normal; }

.commerce-product-form { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: 20px; align-items: start; padding-block: 22px; border-top: 1px solid #e4ebf2; }
.commerce-products-bulk-form > .commerce-button { justify-self: start; margin-top: 18px; }
.commerce-product-form > * { min-width: 0; }
.commerce-product-form > .commerce-button { align-self: center; }
.commerce-product-form > div:first-of-type p { margin-bottom: 10px; }
.commerce-product-picker[hidden],
.commerce-product-form[hidden] { display: none; }
.commerce-product-picker {
    max-width: 46rem;
    padding: 18px;
    margin-block: 18px 0;
    border: 1px solid #dce5ef;
    border-radius: 12px;
    background: #f6f9fc;
}
.commerce-product-picker > label { display: block; font-weight: 700; }
.commerce-product-picker > .commerce-product-edit-status {
    margin: 12px 0 0;
    color: #355774;
    font-size: .82rem;
    line-height: 1.9;
}
.commerce-table-wrap { max-width: 100%; min-width: 0; overflow-x: auto; border: 1px solid var(--line, #dce4ed); border-radius: 11px; overscroll-behavior-inline: contain; -webkit-overflow-scrolling: touch; }
.commerce-table-wrap:focus-visible { outline: 3px solid var(--gold, #c7a16b); outline-offset: 3px; }
.commerce-table,
.commerce-page .commerce-table { width: 100%; min-width: 42rem; border-collapse: collapse; table-layout: auto; font-size: .84rem; }
.commerce-table caption { padding: 12px 16px; text-align: start; background: #f8fafc; }
.commerce-page .commerce-table :is(th, td) { padding: 13px 15px; text-align: start; vertical-align: top; border: 1px solid #e4ebf2; overflow-wrap: anywhere; }
.commerce-page .commerce-table th { font-size: .8rem; font-weight: 700; background: #f2f6fa; color: #355774; }
.commerce-page .commerce-table td:first-child { min-width: 10rem; }
.commerce-page .commerce-table td:last-child { min-width: 8rem; }
.commerce-page .commerce-table .commerce-button { min-height: 44px; padding: 8px 12px; font-size: .78rem; }
.commerce-page .commerce-table small { font-size: .75rem; color: var(--muted, #617487); }
.commerce-page .commerce-table .commerce-money { min-width: 8rem; }

.commerce-navigation { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 4px; padding-inline-start: 8px; border-inline-start: 1px solid #dce4ed; }
.commerce-navigation a { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 8px 9px; border-radius: 10px; font-weight: 600; white-space: normal; }
.commerce-navigation a[aria-current="page"] { background: #fff; box-shadow: inset 0 -3px var(--gold, #c7a16b); }
.commerce-purchase { padding: 18px; margin-block: 20px; border: 1px solid #dbc7a9; border-top: 3px solid var(--gold, #c7a16b); border-radius: 12px; background: #fbf8f2; }
.commerce-purchase :is(h2, h3) { font-size: 1.2rem; margin: 0 0 8px; }
.commerce-purchase-price { font-size: 1.08rem; margin: 0 0 10px; }
.commerce-purchase .btn { width: 100%; margin-top: 8px; }
.commerce-purchase > :last-child { margin-bottom: 0; }

@media (hover: hover) and (pointer: fine) {
    .commerce-button:not(:disabled):not([aria-disabled="true"]):hover { background: var(--blue, #1f4e79); border-color: var(--gold, #c7a16b); color: #fff; text-decoration: none; box-shadow: 0 4px 13px #073b721a; }
    .commerce-button-secondary:not(:disabled):not([aria-disabled="true"]):hover { background: #edf3f9; color: var(--navy, #073b72); }
    .commerce-navigation a:hover { background: #e8eff7; text-decoration: none; }
}

@media (max-width: 1200px) {
    .commerce-page div.commerce-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .commerce-product-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .commerce-product-form > .commerce-button { grid-column: 1 / -1; justify-self: start; }
}
@media (max-width: 1100px) {
    .commerce-navigation { width: 100%; padding: 8px 0 0; border-inline-start: 0; border-top: 1px solid #dce4ed; }
    .commerce-navigation a { flex: 1 1 10rem; background: #f6f8fb; padding: 11px 14px; }
}
@media (max-width: 900px) {
    .commerce-catalog { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .commerce-checkout-grid,
    .commerce-account-grid { grid-template-columns: minmax(0, 1fr); }
    .commerce-checkout .commerce-summary { position: static; }
}
@media (max-width: 800px) {
    .commerce-form :is(input:not([type="hidden"]):not([type="checkbox"]):not([type="radio"]), textarea, select),
    .commerce-field :is(input:not([type="hidden"]):not([type="checkbox"]):not([type="radio"]), textarea, select) { font-size: 16px; }
}
@media (max-width: 700px) {
    .commerce-page { gap: 18px; }
    .commerce-card { padding: 19px; border-radius: 13px; }
    .commerce-header { flex-direction: column; gap: 14px; }
    .commerce-grid,
    .commerce-settings-grid,
    .commerce-product-form { grid-template-columns: minmax(0, 1fr); gap: 18px; }
    .commerce-product-form > .commerce-button { grid-column: auto; }
    .commerce-field-wide { grid-column: auto; }
    .commerce-actions > .commerce-field { max-width: none; }
    .commerce-product { padding: 18px; }
    .commerce-product-image,
    .commerce-product-placeholder { height: 190px; }
    .commerce-alert { padding: 12px 14px; }
    .commerce-details,
    .commerce-definition { gap: 0 12px; }
    .commerce-total-row { gap: 12px; }
    .commerce-page .commerce-table { min-width: 40rem; }
}
@media (max-width: 480px) {
    .commerce-catalog { grid-template-columns: minmax(0, 1fr); gap: 18px; }
    .commerce-page div.commerce-summary { gap: 10px; }
    .commerce-page .commerce-summary > article { padding: 12px; }
    .commerce-page .commerce-summary > article strong { font-size: 1.02rem; }
    .commerce-toolbar,
    .commerce-actions { gap: 9px; }
    .commerce-toolbar > .btn,
    .commerce-toolbar > form,
    .commerce-header > .commerce-button { width: 100%; }
    .commerce-toolbar > form > .btn { width: 100%; }
    .commerce-header .commerce-actions { width: 100%; }
    .commerce-header .commerce-actions > .commerce-button { flex-basis: 100%; }
    .commerce-actions > .commerce-field { flex-basis: 100%; }
    .commerce-actions > .commerce-button { width: 100%; }
    .commerce-card { padding: 16px; }
    .commerce-details,
    .commerce-definition { font-size: .85rem; grid-template-columns: minmax(0, .85fr) minmax(0, 1.2fr); }
    .commerce-total-row { grid-template-columns: minmax(0, .85fr) minmax(0, 1.2fr); }
    .commerce-checkout .commerce-definition { grid-template-columns: minmax(0, 1fr); }
    .commerce-order-card { padding: 15px; }
    nav.commerce-pagination { justify-content: flex-start; }
    nav.commerce-pagination > span { flex: 1 1 100%; order: -1; }
}
@media (prefers-reduced-motion: reduce) {
    .commerce-button { transition: none; }
}
@media print {
    .commerce-header { display: block; }
    .commerce-header > .commerce-button,
    .commerce-toolbar,
    .commerce-actions,
    .commerce-pagination,
    .commerce-navigation,
    .commerce-purchase .btn,
    .commerce-form button { display: none; }
    .commerce-grid,
    .commerce-account-grid,
    .commerce-checkout-grid { display: block; }
    .commerce-card { break-inside: avoid; box-shadow: none; margin-bottom: 18px; }
    .commerce-table-wrap { overflow: visible; }
    .commerce-table,
    .commerce-page .commerce-table { min-width: 0; font-size: 10px; }
    .commerce-page .commerce-table :is(th, td) { min-width: 0; padding: 6px; }
    .commerce-page .commerce-table td:first-child,
    .commerce-page .commerce-table td:last-child,
    .commerce-page .commerce-table .commerce-money { min-width: 0; }
}

/* Customer controls belong above the main menu so account and cart stay visible on every page. */
.commerce-headerbar { background: #f5f8fc; border-bottom: 1px solid #e0e8f1; }
.commerce-headerbar-inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px 24px;
    min-height: 62px;
    padding-block: 7px;
    direction: rtl;
}
body.studio-public .shell.commerce-headerbar-inner {
    width: 100%;
    max-width: none;
    padding-inline: clamp(16px, 2vw, 40px);
}
.commerce-headerbar-inner > * { min-width: 0; max-width: 100%; }
.commerce-account-link,
.commerce-register-link,
.commerce-cart-link {
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
    min-height: 44px;
    max-width: 100%;
    padding: 5px 9px;
    border-radius: 9px;
    color: var(--navy, #073b72);
    text-decoration: none;
    font-size: .85rem;
    line-height: 1.7;
}
.commerce-account-link { flex: 0 1 auto; }
.commerce-account-copy { display: grid; min-width: 0; gap: 0; }
.commerce-account-copy strong { font-size: .88rem; white-space: normal; overflow-wrap: anywhere; }
.commerce-account-caption { color: #5c7185; font-size: .69rem; }
.commerce-header-icon { display: block; flex: 0 0 22px; width: 22px; height: 22px; }
.commerce-auth-links { display: inline-flex; align-items: center; gap: 3px; flex-wrap: wrap; }
.commerce-auth-links .commerce-account-link { flex: 0 1 auto; }
.commerce-header-divider { flex: 0 0 1px; width: 1px; height: 18px; background: #cbd8e4; }
.commerce-cart-link { flex: 0 0 auto; margin-inline-start: auto; border: 1px solid #d7e2ec; background: #fff; white-space: nowrap; }
.commerce-cart-count { display: grid; place-items: center; min-width: 23px; min-height: 23px; padding: 1px 6px; border-radius: 50px; background: var(--navy, #073b72); color: #fff; font-size: .74rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.commerce-headerbar :is(.commerce-account-link, .commerce-register-link, .commerce-cart-link):focus-visible { outline: 3px solid var(--gold, #c7a16b); outline-offset: 2px; background: #e8eff7; text-decoration: none; }
.commerce-cart-link[aria-current="page"] { border-color: var(--navy, #073b72); background: #edf3f9; }
#account-profile { scroll-margin-top: 190px; }
.commerce-order-items { display: grid; gap: 8px; list-style: none; margin: 12px 0; padding: 0; font-size: .85rem; }
.commerce-order-items li { display: flex; align-items: start; justify-content: space-between; gap: 14px; min-width: 0; }
.commerce-order-items li > :first-child { min-width: 0; overflow-wrap: anywhere; }
.commerce-order-items li > :last-child { flex: 0 0 auto; color: #52697f; }

/* Product purchase forms stay clickable above linked carousel cards. */
.commerce-card-purchase { position: relative; z-index: 3; min-width: 0; margin-top: auto; padding-top: 12px; }
.commerce-add-form { display: flex; align-items: flex-end; flex-wrap: wrap; gap: 10px; min-width: 0; margin-top: 12px; }
.commerce-add-form > * { min-width: 0; max-width: 100%; }
.commerce-add-form > .commerce-quantity { flex: 0 1 6rem; }
.commerce-add-form > .btn { flex: 1 1 10rem; width: auto; min-height: 44px; margin: 0; padding-inline: 12px; font-size: .84rem; }
.commerce-quantity label { display: block; margin: 0 0 5px; font-size: .8rem; }
.commerce-quantity input {
    display: block;
    width: 100%;
    min-width: 0;
    min-height: 44px;
    padding: 8px 10px;
    border: 1px solid #c2d0df;
    border-radius: 9px;
    background: #fff;
    color: var(--ink, #17324d);
    font: inherit;
    font-variant-numeric: tabular-nums;
    text-align: center;
}
.commerce-quantity input:focus-visible { outline: 3px solid var(--gold, #c7a16b); outline-offset: 2px; border-color: var(--navy, #073b72); }
.commerce-purchase .commerce-add-form > .btn { margin: 0; width: auto; }
.commerce-card-purchase .commerce-note { margin: 5px 0 0; font-size: .74rem; }
.commerce-stock-note { margin: 6px 0 0; color: var(--muted, #617487); font-size: .76rem; line-height: 1.8; }

/* A single cart progresses through delivery, final review, and payment. */
.commerce-cart-steps {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    padding: 0;
    margin: 0 0 22px;
    list-style: none;
}
.commerce-cart-steps li { display: flex; align-items: center; gap: 9px; min-width: 0; padding: 12px; border: 1px solid #dce5ee; border-radius: 11px; background: #f6f8fb; color: #60768b; font-size: .84rem; line-height: 1.8; }
.commerce-cart-steps li b { display: grid; place-items: center; flex: 0 0 29px; width: 29px; height: 29px; border-radius: 50%; background: #e3ebf3; color: #536c83; font-size: .78rem; }
.commerce-cart-steps li.active,
.commerce-cart-steps li[aria-current="step"] { border-color: var(--navy, #073b72); background: #edf3fa; color: var(--navy, #073b72); font-weight: 700; }
.commerce-cart-steps li.active b,
.commerce-cart-steps li[aria-current="step"] b { background: var(--navy, #073b72); color: #fff; }
.commerce-cart-steps li.complete { border-color: #c8dece; color: #2c6544; background: #f2faf4; }
.commerce-cart-steps li.complete b { background: #dbeddf; color: #2c6544; }
.commerce-cart-layout { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr); align-items: start; gap: 24px; }
.commerce-cart-layout > * { min-width: 0; }
.commerce-cart-items { display: grid; gap: 18px; min-width: 0; }
.commerce-cart-item {
    display: grid;
    grid-template-columns: 80px minmax(0, 1fr);
    align-items: start;
    gap: 15px;
    min-width: 0;
    padding: 20px;
    border: 1px solid var(--line, #dce4ed);
    border-radius: 13px;
    background: #fff;
}
.commerce-cart-image { display: block; width: 80px; height: 80px; object-fit: contain; border: 1px solid #e4ebf1; border-radius: 10px; background: #fff; }
.commerce-cart-item-content { min-width: 0; }
.commerce-cart-item > .commerce-cart-item-content:first-child { grid-column: 1 / -1; }
.commerce-cart-item-content h2,
.commerce-cart-item-content h3 { margin: 0 0 7px; font-size: 1.03rem; }
.commerce-cart-item-content .commerce-money { font-size: .88rem; }
.commerce-cart-item-content .commerce-note { margin-block: 5px; }
.commerce-cart-item-actions { grid-column: 1 / -1; display: flex; align-items: flex-end; flex-wrap: wrap; justify-content: space-between; gap: 12px; margin-top: 12px; padding-top: 12px; border-top: 1px solid #e6edf3; }
.commerce-cart-item-actions > * { min-width: 0; max-width: 100%; }
form.commerce-cart-quantity { display: flex; align-items: flex-end; flex-wrap: wrap; gap: 9px; margin: 0; min-width: 0; }
.commerce-cart-quantity label { display: block; margin: 0 0 5px; font-size: .8rem; }
.commerce-cart-quantity input:not([type="hidden"]) { width: 90px; max-width: 100%; min-height: 44px; margin: 0; padding: 8px 10px; border: 1px solid #c2d0df; border-radius: 9px; background: #fff; color: var(--ink, #17324d); font: inherit; text-align: center; }
.commerce-cart-quantity input:not([type="hidden"]):focus-visible { outline: 3px solid var(--gold, #c7a16b); outline-offset: 2px; }
.commerce-cart-item-actions :is(.commerce-button, .btn) { min-height: 44px; margin: 0; padding: 9px 13px; font-size: .8rem; }
.commerce-cart-remove { color: #965144; background: #fff; border-color: #e4c9c2; }
.commerce-cart-review-items { display: grid; gap: 0; margin-block: 15px; border: 1px solid #e0e8f0; border-radius: 11px; background: #fbfcfe; overflow: hidden; }
.commerce-cart-review-line { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 18px; min-width: 0; padding: 15px; border-bottom: 1px solid #e3ebf2; }
.commerce-cart-review-line:last-child { border-bottom: 0; }
.commerce-cart-review-line > * { min-width: 0; max-width: 100%; }
.commerce-cart-review-line > div { flex: 1 1 12rem; }
.commerce-cart-review-line strong { font-size: .88rem; }
.commerce-cart-review-line .commerce-note { margin: 5px 0 0; font-size: .78rem; }
.commerce-cart-review-line > .commerce-money { font-size: .84rem; }
.commerce-cart-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; margin-top: 20px; }
.commerce-cart-actions > * { min-width: 0; max-width: 100%; }
.commerce-cart .commerce-definition { margin-bottom: 0; }
.commerce-cart .commerce-card > .commerce-button,
.commerce-cart .commerce-card > form > .commerce-button { width: 100%; }
.commerce-cart-address { align-items: start; }

/* Delivery choices and customer order progress. */
.commerce-delivery-options { margin: 0 0 12px; padding: 18px; border: 1px solid #d8e2ed; border-radius: 14px; background: #f8fafc; }
.commerce-delivery-options legend { padding: 0 8px; color: var(--ink, #17324d); font-weight: 700; }
.commerce-delivery-options label { display: flex; align-items: flex-start; gap: 12px; margin: 10px 0; padding: 15px; background: #fff; border: 1px solid #d8e2ed; border-radius: 10px; cursor: pointer; }
.commerce-delivery-options label:has(input:checked) { border-color: var(--gold, #c7a16b); box-shadow: 0 0 0 2px #c7a16b26; }
.commerce-delivery-options input[type="radio"] { flex: 0 0 18px; width: 18px; height: 18px; margin: 4px 0 0; accent-color: var(--navy, #073b72); }
.commerce-delivery-options strong, .commerce-delivery-options small { display: block; }
.commerce-delivery-options small { margin-top: 5px; line-height: 1.8; color: #52657b; font-weight: 400; }
.commerce-fulfillment { margin-bottom: 24px; }
.commerce-fulfillment-heading { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.commerce-fulfillment-heading h2 { margin: 0; }
.commerce-fulfillment-steps { list-style: none; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; padding: 0; margin: 24px 0; }
.commerce-fulfillment-steps li { min-width: 0; padding: 15px 12px; border: 1px solid #dce5ee; border-radius: 12px; background: #f8fafc; color: #63758a; font-size: .85rem; line-height: 1.8; }
.commerce-step-number { display: block; width: 30px; height: 30px; margin-bottom: 10px; border-radius: 50%; background: #e7edf3; color: #53667b; font-weight: 700; text-align: center; line-height: 30px; }
.commerce-fulfillment-steps li.is-complete { color: #255a45; border-color: #c3ddce; background: #f2faf5; }
.commerce-fulfillment-steps li.is-current { color: var(--ink, #17324d); border-color: var(--gold, #c7a16b); background: #fffaf0; font-weight: 700; }
.commerce-fulfillment-steps li.is-complete .commerce-step-number { background: #d6ebdf; color: #255a45; }
.commerce-fulfillment-steps li.is-current .commerce-step-number { background: var(--navy, #073b72); color: #fff; }
.commerce-tracking-box { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; padding: 18px; border: 1px solid #c6dbef; border-radius: 12px; background: #f1f7fd; overflow-wrap: anywhere; }
.commerce-tracking-box code, .commerce-tracking-box bdi { font-size: 1rem; letter-spacing: .03em; }
.commerce-tracking-box p { margin: 0; font-size: .85rem; line-height: 1.9; }
.commerce-fulfillment-history { list-style: none; margin: 18px 0 0; padding: 0; }
.commerce-fulfillment-history li { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; padding: 12px 0; border-bottom: 1px solid #e4ebf2; font-size: .85rem; }
.commerce-fulfillment-label { display: block; margin-top: 6px; color: #53677e; font-size: .78rem; }
@media (max-width: 700px) { .commerce-fulfillment-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); } .commerce-delivery-options { padding: 12px; } }
@media (prefers-reduced-motion: reduce) { .commerce-delivery-options label { transition: none; } }

@media (hover: hover) and (pointer: fine) {
    .commerce-headerbar :is(.commerce-account-link, .commerce-register-link, .commerce-cart-link):hover { background: #e8eff7; color: var(--navy, #073b72); text-decoration: none; }
}
@media (max-width: 900px) {
    .commerce-cart-layout { grid-template-columns: minmax(0, 1fr); }
    .commerce-cart-layout > aside { order: 2; }
    .commerce-account-link { flex: 0 1 26rem; }
}
@media (max-width: 700px) {
    .commerce-headerbar-inner { gap: 6px 12px; min-height: 58px; }
    .commerce-account-link { flex: 1 1 10rem; }
    .commerce-cart-link { gap: 7px; font-size: .8rem; }
    .commerce-account-copy strong { font-size: .8rem; }
    .commerce-cart-steps { gap: 7px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .commerce-cart-steps li { padding: 10px; font-size: .8rem; }
    .commerce-cart-layout { gap: 18px; }
    .commerce-quantity input,
    .commerce-cart-quantity input:not([type="hidden"]) { font-size: 16px; }
}
@media (max-width: 480px) {
    .commerce-headerbar-inner { gap: 5px 9px; padding-block: 6px; }
    .commerce-account-link,
    .commerce-register-link { padding-inline: 5px; gap: 7px; }
    .commerce-account-link { flex-basis: 9rem; }
    .commerce-auth-links { flex: 0 1 auto; }
    .commerce-header-icon { width: 20px; height: 20px; flex-basis: 20px; }
    .commerce-cart-link { padding-inline: 7px; gap: 6px; }
    .commerce-cart-count { min-width: 21px; min-height: 21px; padding-inline: 5px; font-size: .7rem; }
    .commerce-cart-item { grid-template-columns: 64px minmax(0, 1fr); gap: 12px; padding: 15px; }
    .commerce-cart-image { width: 64px; height: 64px; }
    .commerce-cart-item-actions { gap: 10px; }
    .commerce-cart-item-content h2,
    .commerce-cart-item-content h3 { font-size: .95rem; }
    .commerce-cart-quantity input:not([type="hidden"]) { width: 76px; }
    .commerce-cart-actions > .commerce-button,
    .commerce-cart-actions > .btn { width: 100%; }
    .commerce-cart-review-line { padding: 13px; }
}
@media print {
    .commerce-headerbar,
    .commerce-add-form,
    .commerce-cart-item-actions,
    .commerce-cart-steps,
    .commerce-cart-actions { display: none; }
    .commerce-cart-layout { display: block; }
    .commerce-cart-review-line { break-inside: avoid; }
}
