/* Customer journey pages: compact, clear and comfortable on touch screens. */
.cart-layout { display: grid; gap: 1.5rem; align-items: start; }
.cart-layout > * { min-width: 0; }
.commerce-material-thumb { float: left; width: 4.5rem; height: 4.5rem; object-fit: cover; border-radius: .5rem; margin: 0 .85rem .5rem 0; }
.commerce-item-identity { overflow-wrap: anywhere; }
.checkout-attachment { clear: both; font-size: .875rem; }
.checkout-attachment summary { color: var(--color-primary-dark); padding: .5rem 0; cursor: pointer; }
.checkout-attachment[open] summary { margin-bottom: .5rem; }
.checkout-sidebar .list-group-item { border: 0; padding-left: 0; }
.tracking-page { max-width: 64rem; }
.tracking-page > .page-header { justify-content: center; text-align: center; margin-bottom: 2rem; }
.tracking-page .card-body { padding: clamp(1.25rem, 3vw, 2rem); }
.tracking-status { padding: 1.5rem; margin-bottom: 1.5rem; background: var(--color-primary-light); border-radius: .75rem; border-left: 3px solid var(--color-primary); }
.tracking-status h2 { font-size: clamp(1.3rem, 2.5vw, 1.75rem); }
.tracking-status p:last-child { margin-bottom: 0; }
.tracking-status-cancelled { background: var(--bs-danger-bg-subtle); border-color: var(--bs-danger-text-emphasis); }
.account-page .account-card .card-header { background: transparent; padding-top: 1.5rem; border-bottom: 0; }
.account-page .account-card .card-header h1 { font-size: 1.5rem; }
@media (min-width: 1200px) {
    .cart-layout { grid-template-columns: minmax(0, 1fr) 19rem; }
    .cart-layout .cart-table { min-width: 0 !important; }
    .cart-layout .cart-table th:first-child { min-width: 12rem; }
    .cart-layout .cart-table :is(th, td) { padding: .875rem .65rem; }
    .cart-summary-card { position: sticky; top: 7rem; }
    .cart-summary-card .row > div { width: 100%; text-align: left !important; }
}
.commerce-page { max-width: 1320px; }
.commerce-page > .page-header { margin-bottom: 1.5rem; }
.commerce-page .page-header h1 { font-size: clamp(1.5rem, 2.4vw, 2rem); }
.commerce-page .card { overflow: hidden; }
.commerce-page .card-header h3,
.commerce-page .card-header h5 { line-height: 1.4; }
.commerce-table-scroll { max-width: 100%; overscroll-behavior-inline: contain; scrollbar-color: #aaa69d #eeece5; }
.commerce-table-scroll:focus-visible { outline-offset: -3px; }
.commerce-page table { min-width: 42rem; }
.cart-table { min-width: 51rem !important; }
.cart-table th, .cart-table td { padding: 0.875rem 1rem; }
.cart-table th:first-child { min-width: 15rem; }
.cart-table th:last-child { min-width: 10rem; }
.cart-table td:last-child { white-space: nowrap; }
.cart-summary-card [data-role="cart-total"] { font-variant-numeric: tabular-nums; }
.cart-page .text-warning { color: var(--bs-warning-text-emphasis) !important; }
.checkout-page { max-width: 1320px; }
.checkout-page > .row { --bs-gutter-y: 1.25rem; }
.checkout-page .checkout-items-scroll table { min-width: 47rem; }
.checkout-page .checkout-items-scroll td:first-child { min-width: 21rem; }
.checkout-page .checkout-items-scroll input[type="file"] { max-width: 100%; }
.checkout-page .checkout-submit { min-width: min(12rem, 52%); }
.checkout-page .form-check { border: 1px solid var(--color-border-secondary); }
.my-orders-table { min-width: 48rem !important; }
.my-orders-table td, .my-orders-table th { padding: 0.875rem 1rem; }
.account-page .account-card { max-width: 100%; }
.account-page .account-card .card-header { padding: 1rem 1.25rem; }
.account-page .account-card .card-header h3 { font-size: 1.25rem; }
.account-page .account-card .card-body { padding: clamp(1.25rem, 4vw, 2rem); }
.account-page input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not([type="file"]) {
    width: 100%; box-sizing: border-box; padding: 0.55rem 0.75rem; border: 1px solid #c9cdc5;
    border-radius: 0.5rem; color: var(--color-text); background: #fff; font: inherit;
}
.account-page input:disabled { background: #eeefeb; color: var(--color-muted); }
.account-page .form-text, .account-page small.text-muted { display: block; margin-top: 0.375rem; }
.account-page .errorlist, .account-page .form-field-errors { margin: 0.375rem 0 0; padding-left: 1.125rem; color: #a52d29; font-size: 0.875rem; }
.account-page .alert ul { margin-bottom: 0; }
.account-page .profile-avatar { flex: 0 0 auto; }
.profile-page { max-width: 1180px; }
.profile-page .nav-tabs { overflow-x: auto; }
.profile-page .nav-tabs .nav-link { white-space: nowrap; }
.profile-page .table-responsive { overscroll-behavior-inline: contain; }
.cart-empty-state, .commerce-page > .empty-state { margin: 1rem 0; }
.cart-empty-state p, .commerce-page > .empty-state p { margin: 0 0 1rem; }

@media (max-width: 767.98px) {
    .commerce-page { padding-left: 1rem; padding-right: 1rem; }
    .commerce-page > .page-header { margin-bottom: 1rem; }
    .checkout-page .card-header { align-items: flex-start !important; gap: 0.5rem; }
    .checkout-page .card-header h5 { font-size: 0.95rem; }
    .checkout-page .card-header small { text-align: right; }
    .checkout-page .checkout-submit { min-width: 0; max-width: 62%; white-space: normal; }
    .checkout-page > .row > .col-md-8 { order: 1; }
    .checkout-page > .row > .col-md-4 { order: 0; }
    .cart-summary-card .card-body > .row { gap: 0.75rem; }
    .cart-summary-card .text-end { text-align: left !important; }
    .account-page .row.justify-content-center { --bs-gutter-x: 0; }
    .profile-page .profile-header { align-items: flex-start !important; }
    .profile-page .profile-avatar { width: 2.75rem !important; height: 2.75rem !important; font-size: 1.2rem !important; }
}

@media (max-width: 420px) {
    .cart-table { min-width: 46rem !important; }
    .checkout-page .checkout-submit { max-width: 58%; }
}

/* Item cards avoid hidden totals/actions on phones and portrait tablets. */
@media (max-width: 1199.98px) {
    .checkout-page > .row > :is(.col-md-8, .col-md-4) { width: 100%; }
    .commerce-page .commerce-item-table { display: block; width: 100%; min-width: 0 !important; }
    .commerce-item-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
    .commerce-item-table tbody, .commerce-item-table tfoot { display: block; width: 100%; }
    .commerce-item-table tr { display: flex; flex-wrap: wrap; width: 100%; padding: 1rem; gap: .75rem; border-bottom: 1px solid var(--color-border); }
    .commerce-page .commerce-item-table :is(td, th) { display: block; border: 0; padding: 0; min-width: 0 !important; white-space: normal; box-shadow: none; background: none; }
    .commerce-item-table td[data-label] { flex: 1 1 28%; font-variant-numeric: tabular-nums; }
    .commerce-item-table td[data-label]::before { content: attr(data-label); display: block; color: var(--color-muted); font-size: .75rem; margin-bottom: .3rem; }
    .commerce-item-table .commerce-item-identity, .commerce-item-table .commerce-item-actions { flex: 1 1 100%; }
    .commerce-item-table .commerce-item-actions { display: flex; gap: .5rem; padding-top: .25rem; }
    .commerce-item-actions .btn { min-height: 44px; display: inline-flex; align-items: center; justify-content: center; flex: 1; }
    .commerce-item-table tfoot tr { justify-content: space-between; }
    .commerce-item-table input[type=number] { min-height: 44px; max-width: 100%; }
    .checkout-page > .row > .checkout-sidebar { order: 2; }
    .checkout-actions { flex-direction: column-reverse; gap: .75rem; }
    .checkout-page .checkout-submit { max-width: none; width: 100%; min-height: 48px; }
    .checkout-attachment summary { min-height: 44px; }
}
