:root {
    --page: #f2f2f3;
    --surface: #ffffff;
    --surface-soft: #f7f7f7;
    --text: #262629;
    --text-soft: #646464;
    --muted: #8d8d92;
    --line: #e4e4e4;
    --dark: #222222;
    --dark-2: #383838;
    --primary: #f5a32e;
    --primary-strong: #ed8b00;
    --primary-soft: #fff3df;
    --green: #005b44;
    --blue: #5c8fad;
    --shadow: 0 4px 12px rgba(50, 50, 71, 0.09);
}

* {
    box-sizing: border-box;
}

html {
    min-width: 320px;
}

body {
    margin: 0;
    background: var(--page);
    color: var(--text);
    font-family: Montserrat, Lato, Arial, Helvetica, sans-serif;
    font-size: 14px;
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input,
select {
    font: inherit;
}

.header-container {
    width: min(1240px, calc(100% - 32px));
    margin: 0 auto;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 20;
    background: var(--surface);
    box-shadow: 0 2px 10px rgba(38, 38, 41, 0.08);
}

.utility-bar {
    background: var(--dark);
    color: #f7f7f7;
    font-size: 12px;
}

.utility-content {
    min-height: 34px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.utility-content nav,
.account-nav,
.category-content,
.hero-actions,
.filters,
.product-footer,
.section-title {
    display: flex;
    align-items: center;
}

.utility-content nav {
    gap: 18px;
}

.utility-content a:hover,
.account-nav a:hover,
.section-title a:hover {
    color: var(--primary);
}

.main-header {
    background: var(--surface);
}

.main-header-grid {
    min-height: 82px;
    display: grid;
    grid-template-columns: 220px minmax(260px, 1fr) auto;
    gap: 24px;
    align-items: center;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 11px;
    min-width: 0;
}

.brand-mark {
    width: 46px;
    height: 46px;
    display: grid;
    place-items: center;
    border-radius: 4px;
    background: var(--green);
    color: #fff;
    font-size: 27px;
    font-weight: 900;
}

.brand strong,
.brand small {
    display: block;
}

.brand strong {
    color: var(--text);
    font-size: 23px;
    font-weight: 900;
    line-height: 1;
}

.brand small {
    color: var(--primary-strong);
    font-size: 12px;
    font-weight: 800;
    margin-top: 3px;
}

.search {
    display: grid;
    grid-template-columns: 1fr 116px;
    min-width: 0;
    border: 2px solid var(--primary);
    border-radius: 3px;
    background: var(--surface);
    overflow: hidden;
}

.search input {
    width: 100%;
    min-height: 46px;
    border: 0;
    padding: 0 16px;
    color: var(--text);
    outline: 0;
}

.search button,
.button,
.product-footer button,
.filter-panel button,
.filters button {
    min-height: 42px;
    border: 1px solid transparent;
    border-radius: 3px;
    padding: 0 16px;
    background: var(--surface);
    color: var(--text);
    font-weight: 800;
    cursor: pointer;
    white-space: nowrap;
}

.search button {
    min-height: 46px;
    background: var(--primary);
    color: var(--dark);
}

.search button:hover,
.primary:hover,
.product-footer button:hover,
.filter-panel button:hover,
.filters button:hover {
    background: var(--primary-strong);
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-color: var(--line);
}

.primary,
.product-footer button,
.filter-panel button {
    background: var(--primary);
    color: var(--dark);
}

.light {
    background: #fff;
    color: var(--dark);
}

.account-nav {
    gap: 14px;
    color: var(--text-soft);
    font-size: 13px;
    font-weight: 800;
}

.cart-link {
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 0 12px;
    border: 1px solid var(--line);
    border-radius: 3px;
    background: var(--surface-soft);
}

.cart-link strong {
    width: 22px;
    height: 22px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--primary);
    color: var(--dark);
    font-size: 12px;
}

.category-bar {
    background: var(--primary);
    color: var(--dark);
}

.category-content {
    min-height: 44px;
    gap: 24px;
    overflow-x: auto;
    scrollbar-width: none;
}

.category-content::-webkit-scrollbar {
    display: none;
}

.category-content a {
    flex: 0 0 auto;
    font-size: 13px;
    font-weight: 800;
}

.all-categories {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    padding: 0 18px;
    background: var(--dark);
    color: #fff;
}

.page-shell {
    width: min(1240px, calc(100% - 32px));
    margin: 22px auto 48px;
}

.commerce-hero {
    min-height: 318px;
    display: flex;
    align-items: center;
    margin-bottom: 16px;
    padding: 38px;
    background:
        linear-gradient(90deg, rgba(34, 34, 34, 0.88), rgba(34, 34, 34, 0.55) 44%, rgba(34, 34, 34, 0.05)),
        url("/assets/img/b2b-tools-banner.png") center / cover no-repeat;
    color: #fff;
}

.hero-copy {
    max-width: 540px;
}

.promo-pill,
.eyebrow,
.product-badge {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    min-height: 24px;
    padding: 0 9px;
    border-radius: 3px;
    background: var(--primary);
    color: var(--dark);
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
}

.eyebrow {
    margin: 0 0 8px;
}

.commerce-hero h1 {
    margin: 12px 0 10px;
    font-size: 38px;
    line-height: 1.12;
    font-weight: 900;
}

.commerce-hero p,
.lead {
    color: inherit;
    font-size: 16px;
    line-height: 1.5;
}

.hero-actions {
    gap: 10px;
    margin-top: 22px;
}

.summary-strip {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-bottom: 26px;
    background: var(--surface);
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
}

.summary-item {
    min-height: 78px;
    padding: 16px 20px;
    border-right: 1px solid var(--line);
}

.summary-item:last-child {
    border-right: 0;
}

.summary-item span,
.sku {
    display: block;
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
}

.summary-item strong {
    display: block;
    margin-top: 7px;
    color: var(--text);
    font-size: 17px;
    line-height: 1.3;
}

.category-showcase,
.product-section {
    margin-top: 26px;
}

.section-title {
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 12px;
}

.section-title h2 {
    margin: 0;
    color: var(--text);
    font-size: 20px;
    font-weight: 900;
}

.section-title a {
    color: var(--blue);
    font-size: 13px;
    font-weight: 900;
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.category-card {
    min-height: 86px;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 4px;
    box-shadow: var(--shadow);
    color: var(--text);
    font-weight: 900;
}

.category-card:hover {
    border-color: var(--primary);
}

.category-card-copy {
    min-width: 0;
    display: grid;
    gap: 4px;
}

.category-card-copy strong,
.category-card-copy small {
    display: block;
    min-width: 0;
    overflow-wrap: anywhere;
}

.category-card-copy small {
    color: var(--text-soft);
    font-size: 12px;
    font-weight: 800;
}

.category-icon {
    width: 38px;
    height: 38px;
    flex: 0 0 auto;
    border-radius: 4px;
    background:
        linear-gradient(135deg, var(--primary) 0 45%, var(--dark) 45% 100%);
}

.home-product-grid,
.catalog-product-grid,
.admin-grid {
    display: grid;
    gap: 14px;
}

.home-product-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.product-tile,
.admin-card,
.empty-state,
.filter-panel,
.cart-summary {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 4px;
    box-shadow: var(--shadow);
}

.product-tile {
    display: flex;
    flex-direction: column;
    gap: 10px;
    position: relative;
    min-width: 0;
    overflow: visible;
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
}

.product-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 1;
    background: var(--green);
    color: #fff;
}

.tile-image {
    display: block;
    height: 238px;
    overflow: hidden;
    border: 1px solid #cfd3d7;
    border-radius: 4px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0.68)),
        url("/assets/img/b2b-tools-banner.png") center / 620px auto no-repeat;
}

.tile-image.has-product-image {
    display: grid;
    place-items: center;
    padding: 20px;
    background: #fff;
}

.tile-image img {
    display: block;
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 198px;
    object-fit: contain;
}

.tool-1 {
    background-position: 16% 72%;
}

.tool-2 {
    background-position: 35% 78%;
}

.tool-3 {
    background-position: 55% 76%;
}

.tool-4 {
    background-position: 83% 67%;
}

.tile-content {
    position: relative;
    z-index: 1;
    display: flex;
    flex: 1;
    flex-direction: column;
    padding: 0;
    background: transparent;
}

.sku {
    margin-bottom: 8px;
}

.tile-content h2,
.tile-content h3 {
    min-height: 48px;
    margin: 0 0 6px;
    color: #4a4a4f;
    font-size: 16px;
    line-height: 1.35;
    font-weight: 500;
}

.brand-line,
.product-code {
    display: block;
    color: var(--text-soft);
    font-size: 13px;
    line-height: 1.35;
}

.brand-line {
    min-height: 18px;
    margin: 0 0 8px;
    font-weight: 600;
    text-transform: uppercase;
}

.product-category {
    display: block;
    margin: 0 0 8px;
    color: var(--blue);
    font-size: 12px;
    font-weight: 900;
    overflow-wrap: anywhere;
}

.product-code {
    margin-bottom: 14px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
}

.product-footer {
    justify-content: space-between;
    gap: 10px;
    margin-top: auto;
}

.product-footer strong {
    color: #4a4a4f;
    font-size: 18px;
    line-height: 1.2;
    font-weight: 900;
}

.product-footer button {
    min-height: 36px;
    min-width: 110px;
    padding: 0 16px;
    border-radius: 18px;
    font-size: 12px;
}

.catalog-header,
.cart-shell,
.toolbar,
.detail-layout {
    display: flex;
    gap: 24px;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 18px;
}

.catalog-header h1,
.cart-shell h1,
.toolbar h1,
.detail-layout h1 {
    margin: 0;
    color: var(--text);
    font-size: 26px;
    line-height: 1.2;
    font-weight: 900;
}

.catalog-count {
    margin: 8px 0 0;
    color: var(--text-soft);
    font-weight: 800;
    line-height: 1.4;
}

.filters {
    gap: 10px;
}

.filters select,
.filters button,
.filter-panel select,
.filter-panel input {
    width: 100%;
    min-height: 40px;
    border: 1px solid var(--line);
    border-radius: 3px;
    padding: 0 11px;
    background: #fff;
    color: var(--text);
    outline: 0;
}

.catalog-layout {
    display: grid;
    grid-template-columns: 256px minmax(0, 1fr);
    gap: 18px;
    align-items: start;
}

.filter-panel {
    position: sticky;
    top: 160px;
    display: grid;
    gap: 14px;
    padding: 18px;
}

.filter-panel h2 {
    margin: 0;
    font-size: 18px;
    font-weight: 900;
}

.filter-panel label {
    display: grid;
    gap: 7px;
    color: var(--text-soft);
    font-size: 12px;
    font-weight: 900;
}

.category-filter-list {
    display: grid;
    gap: 6px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--line);
}

.category-filter-list > span {
    color: var(--text);
    font-size: 13px;
    font-weight: 900;
}

.category-filter-list a {
    min-width: 0;
    min-height: 34px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    align-items: center;
    padding: 7px 9px;
    border-radius: 3px;
    color: var(--text-soft);
    font-size: 12px;
    font-weight: 800;
}

.category-filter-list a:hover,
.category-filter-list a.active {
    background: var(--primary-soft);
    color: var(--text);
}

.category-filter-list strong {
    min-width: 0;
    font-weight: 900;
    overflow-wrap: anywhere;
}

.category-filter-list small {
    min-width: 26px;
    color: var(--muted);
    text-align: right;
    font-size: 11px;
    font-weight: 900;
}

.catalog-product-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.admin-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.admin-stat-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 18px;
}

.admin-stat-grid.compact-stats {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.stat-card,
.admin-section {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 4px;
    box-shadow: var(--shadow);
}

.stat-card {
    min-height: 86px;
    padding: 16px;
}

.stat-card span,
.admin-card span,
.import-metrics span,
.mini-table-row span {
    color: var(--text-soft);
    font-size: 12px;
    font-weight: 800;
    line-height: 1.45;
}

.stat-card strong {
    display: block;
    margin-top: 8px;
    font-size: 22px;
    font-weight: 900;
}

.admin-section {
    margin-bottom: 18px;
    padding: 18px;
}

.import-status {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

.admin-section h2 {
    margin: 0;
    font-size: 19px;
    font-weight: 900;
}

.import-metrics {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 10px;
}

.import-metrics span {
    min-height: 32px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 0 10px;
    border: 1px solid var(--line);
    border-radius: 3px;
    background: var(--surface-soft);
}

.admin-card {
    min-height: 84px;
    display: grid;
    align-content: center;
    gap: 8px;
    padding: 18px;
    color: var(--text);
}

.admin-card strong {
    font-weight: 900;
}

.admin-card:hover {
    border-color: var(--primary);
}

.toolbar-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 10px;
}

.admin-data-list {
    display: grid;
    border: 1px solid var(--line);
    border-radius: 4px;
    overflow: hidden;
    background: #fff;
    box-shadow: var(--shadow);
}

.admin-data-row {
    min-height: 62px;
    display: grid;
    gap: 12px;
    align-items: center;
    padding: 12px 14px;
    border-bottom: 1px solid var(--line);
    color: var(--text-soft);
    font-size: 12px;
    font-weight: 800;
}

.customer-list .admin-data-row {
    grid-template-columns: minmax(210px, 1.4fr) minmax(112px, 0.65fr) 106px 74px minmax(150px, 1fr) 112px;
}

.user-list .admin-data-row {
    grid-template-columns: minmax(220px, 1.35fr) minmax(126px, 0.75fr) minmax(170px, 1fr) 106px 112px 112px;
}

.representative-list .admin-data-row {
    grid-template-columns: minmax(220px, 1.4fr) minmax(100px, 0.6fr) 106px minmax(90px, 0.5fr) minmax(80px, 0.45fr) 112px;
}

.admin-data-row:last-child {
    border-bottom: 0;
}

a.admin-data-row:hover {
    border-color: var(--primary);
    background: #fffaf3;
}

.admin-data-row > span {
    min-width: 0;
    overflow-wrap: anywhere;
}

.admin-data-row strong,
.admin-data-row small {
    display: block;
    min-width: 0;
    overflow-wrap: anywhere;
}

.admin-data-row strong {
    color: var(--text);
    font-size: 13px;
    font-weight: 900;
}

.admin-data-row small {
    margin-top: 4px;
    color: var(--muted);
    font-size: 11px;
    line-height: 1.35;
}

.admin-data-head {
    min-height: 42px;
    background: var(--surface-soft);
    color: var(--text);
    font-weight: 900;
}

.status-pill {
    min-height: 26px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: fit-content;
    max-width: 100%;
    padding: 0 10px;
    border: 1px solid rgba(0, 91, 68, 0.18);
    border-radius: 13px;
    background: #edf7f3;
    color: var(--green);
    font-size: 11px;
    font-weight: 900;
    white-space: nowrap;
}

.status-pill.status-pending {
    border-color: rgba(237, 139, 0, 0.22);
    background: var(--primary-soft);
    color: #9a5b00;
}

.status-pill.status-blocked {
    border-color: rgba(157, 47, 47, 0.2);
    background: #fff0f0;
    color: #9d2f2f;
}

.status-pill.status-inactive {
    border-color: rgba(100, 100, 100, 0.18);
    background: var(--surface-soft);
    color: var(--text-soft);
}

.admin-record-form {
    display: grid;
    gap: 18px;
}

.form-grid {
    display: grid;
    gap: 12px;
}

.form-grid.two-columns {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.form-grid label,
.inline-admin-form label {
    display: grid;
    gap: 7px;
    color: var(--text-soft);
    font-size: 12px;
    font-weight: 900;
}

.form-grid input,
.form-grid select,
.form-grid textarea,
.inline-admin-form select {
    width: 100%;
    min-height: 40px;
    border: 1px solid var(--line);
    border-radius: 3px;
    padding: 0 11px;
    background: #fff;
    color: var(--text);
    outline: 0;
}

.form-grid textarea {
    min-height: 96px;
    padding: 10px 11px;
    resize: vertical;
}

.form-wide {
    grid-column: 1 / -1;
}

.form-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 10px;
}

.inline-admin-form {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) auto;
    gap: 10px;
    align-items: end;
    margin-bottom: 14px;
}

.account-mini-table .mini-table-row {
    grid-template-columns: minmax(160px, 1fr) minmax(180px, 1fr) minmax(110px, 0.55fr) auto;
}

.account-mini-table form {
    margin: 0;
}

.muted-line {
    margin: 0;
    color: var(--text-soft);
    font-weight: 800;
    line-height: 1.5;
}

.danger-link {
    color: #9d2f2f;
}

.mini-table {
    display: grid;
    border: 1px solid var(--line);
    border-radius: 4px;
    overflow: hidden;
}

.mini-table-row {
    display: grid;
    grid-template-columns: minmax(180px, 1.6fr) minmax(86px, 0.6fr) minmax(180px, 1.2fr) minmax(86px, 0.5fr);
    gap: 12px;
    align-items: center;
    min-height: 44px;
    padding: 10px 12px;
    background: var(--surface);
    border-bottom: 1px solid var(--line);
}

.mini-table-row:last-child {
    border-bottom: 0;
}

.mini-table-head {
    background: var(--surface-soft);
}

.mini-table-head span {
    color: var(--text);
    font-weight: 900;
}

.pagination {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 54px;
    padding: 10px 12px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 4px;
    box-shadow: var(--shadow);
}

.pagination span {
    color: var(--text-soft);
    font-size: 12px;
    font-weight: 800;
}

.pagination div {
    display: flex;
    gap: 8px;
}

.pagination-link {
    min-height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 12px;
    border: 1px solid var(--line);
    border-radius: 3px;
    background: var(--surface-soft);
    color: var(--text);
    font-size: 12px;
    font-weight: 900;
}

.pagination-link:hover {
    border-color: var(--primary);
}

.pagination-link.disabled {
    opacity: 0.48;
    cursor: default;
}

.empty-state {
    padding: 36px;
    text-align: center;
}

.empty-state h1,
.empty-state h2 {
    margin: 0 0 10px;
    font-size: 22px;
    font-weight: 900;
}

.empty-state p {
    margin: 0 auto 18px;
    max-width: 520px;
    color: var(--text-soft);
    line-height: 1.5;
}

.cart-shell {
    align-items: stretch;
}

.cart-summary {
    width: 280px;
    display: grid;
    gap: 10px;
    padding: 18px;
}

.cart-summary span {
    color: var(--text-soft);
    font-weight: 800;
}

.cart-summary strong {
    font-size: 25px;
    font-weight: 900;
}

.detail-layout {
    align-items: stretch;
}

.login-page {
    min-height: 430px;
    display: grid;
    grid-template-columns: minmax(320px, 430px) minmax(0, 1fr);
    gap: 18px;
    align-items: stretch;
}

.login-panel,
.login-aside {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 4px;
    box-shadow: var(--shadow);
}

.login-panel {
    padding: 28px;
}

.login-panel h1,
.login-aside h2 {
    margin: 14px 0 10px;
    color: var(--text);
    font-weight: 900;
    line-height: 1.18;
}

.login-panel h1 {
    font-size: 28px;
}

.login-panel p,
.login-aside p {
    margin: 0 0 18px;
    color: var(--text-soft);
    line-height: 1.5;
}

.login-form {
    display: grid;
    gap: 14px;
    margin-top: 18px;
}

.login-form label {
    display: grid;
    gap: 7px;
    color: var(--text-soft);
    font-size: 12px;
    font-weight: 900;
}

.login-form input {
    width: 100%;
    min-height: 44px;
    border: 1px solid var(--line);
    border-radius: 3px;
    padding: 0 12px;
    color: var(--text);
    outline: 0;
}

.login-form input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(245, 163, 46, 0.18);
}

.login-form button {
    min-height: 44px;
    border: 0;
    border-radius: 3px;
    background: var(--primary);
    color: var(--dark);
    font-weight: 900;
    cursor: pointer;
}

.login-form button:hover {
    background: var(--primary-strong);
}

.form-alert {
    margin-top: 14px;
    padding: 12px;
    border: 1px solid #ffe0bf;
    border-radius: 3px;
    background: #fff3e8;
    color: #9a4c00;
    font-weight: 800;
}

.success-alert {
    margin-bottom: 18px;
    border-color: #b8ddcf;
    background: #eaf7f1;
    color: var(--green);
}

.pricing-form {
    display: grid;
    gap: 16px;
}

.rules-editor {
    display: grid;
    gap: 12px;
}

.pricing-rule-card {
    display: grid;
    gap: 14px;
    padding: 16px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 4px;
    box-shadow: var(--shadow);
}

.rule-title,
.rule-fields,
.form-actions {
    display: grid;
    gap: 12px;
}

.rule-title {
    grid-template-columns: minmax(220px, 1fr) 160px;
}

.rule-fields {
    grid-template-columns: 130px repeat(2, minmax(110px, 1fr)) 110px 160px 110px;
}

.pricing-rule-card label {
    display: grid;
    gap: 7px;
    color: var(--text-soft);
    font-size: 12px;
    font-weight: 900;
}

.pricing-rule-card input,
.pricing-rule-card select {
    width: 100%;
    min-height: 40px;
    border: 1px solid var(--line);
    border-radius: 3px;
    padding: 0 10px;
    background: #fff;
    color: var(--text);
    outline: 0;
}

.pricing-rule-card input:focus,
.pricing-rule-card select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(245, 163, 46, 0.18);
}

.form-actions {
    grid-template-columns: max-content max-content;
    align-items: center;
}

.login-aside {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    min-height: 430px;
    padding: 34px;
    background:
        linear-gradient(90deg, rgba(34, 34, 34, 0.88), rgba(34, 34, 34, 0.44)),
        url("/assets/img/b2b-tools-banner.png") center / cover no-repeat;
    color: #fff;
}

.login-aside h2,
.login-aside p {
    max-width: 520px;
    color: #fff;
}

.product-photo-placeholder {
    width: min(380px, 42vw);
    min-height: 320px;
    display: grid;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 4px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.62)),
        url("/assets/img/b2b-tools-banner.png") center / cover no-repeat;
    color: var(--dark);
    font-size: 28px;
    font-weight: 900;
}

.product-photo-real {
    padding: 18px;
    background: #fff;
}

.product-photo-real img {
    width: 100%;
    height: 100%;
    max-height: 420px;
    object-fit: contain;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin: 6px 0 34px;
    color: var(--blue);
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
}

.breadcrumb strong {
    color: var(--blue);
    font-weight: 800;
}

.product-detail-stage {
    display: grid;
    grid-template-columns: minmax(0, 1.32fr) minmax(360px, 0.78fr);
    gap: 46px;
    align-items: start;
    margin-bottom: 48px;
}

.product-gallery {
    display: grid;
    grid-template-columns: 92px minmax(0, 1fr);
    gap: 26px;
    align-items: start;
}

.gallery-thumbs {
    display: grid;
    gap: 18px;
}

.gallery-thumb {
    width: 82px;
    height: 82px;
    display: grid;
    place-items: center;
    padding: 6px;
    border: 1px solid transparent;
    border-radius: 4px;
    background: #fff;
    cursor: pointer;
}

.gallery-thumb.active,
.gallery-thumb:hover {
    border-color: var(--primary);
}

.gallery-thumb img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.gallery-main {
    min-height: 560px;
    display: grid;
    place-items: center;
    padding: 20px;
    background: #fff;
}

.gallery-main img {
    width: 100%;
    height: 100%;
    max-height: 560px;
    object-fit: contain;
}

.gallery-placeholder {
    border: 1px solid var(--line);
    color: var(--dark);
    font-size: 34px;
    font-weight: 900;
}

.product-buy-panel {
    min-width: 0;
    min-height: 534px;
    padding-left: 46px;
    border-left: 1px solid var(--line);
}

.product-buy-panel h1 {
    margin: 0 0 8px;
    color: var(--text);
    font-size: 30px;
    line-height: 1.15;
    font-weight: 900;
}

.product-detail-meta {
    margin: 0;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.4;
}

.product-detail-meta strong {
    color: var(--text-soft);
    font-weight: 800;
}

.buy-panel-divider {
    height: 1px;
    margin: 18px 0 10px;
    background: var(--line);
}

.product-price-block {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 8px;
    margin: 0 0 32px;
}

.product-price-block strong {
    color: #4a4a4f;
    font-size: 34px;
    line-height: 1;
    font-weight: 900;
}

.product-price-block span {
    color: var(--text-soft);
    font-size: 12px;
    font-weight: 800;
}

.buy-actions {
    display: grid;
    grid-template-columns: minmax(180px, 1fr) minmax(170px, 0.82fr);
    gap: 18px;
    align-items: center;
}

.quantity-stepper {
    height: 36px;
    display: grid;
    grid-template-columns: 34px minmax(50px, 1fr) 34px;
    align-items: center;
    overflow: hidden;
    border: 1px solid var(--blue);
    border-radius: 18px;
    background: #fff;
}

.quantity-stepper button {
    width: 28px;
    height: 28px;
    justify-self: center;
    border: 0;
    border-radius: 50%;
    background: var(--blue);
    color: #fff;
    font-size: 18px;
    font-weight: 900;
    cursor: pointer;
}

.quantity-stepper input {
    width: 100%;
    border: 0;
    color: var(--green);
    text-align: center;
    font-weight: 900;
    outline: 0;
}

.buy-button {
    min-height: 36px;
    border-radius: 18px;
    box-shadow: 0 8px 14px rgba(237, 139, 0, 0.2);
}

.buy-facts {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin: 24px 0 0;
}

.buy-facts div {
    min-width: 0;
}

.buy-facts dt {
    color: var(--muted);
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
}

.buy-facts dd {
    margin: 5px 0 0;
    color: var(--text);
    font-size: 12px;
    font-weight: 900;
    overflow-wrap: anywhere;
}

.product-info-block {
    max-width: 980px;
    margin: 0 auto 42px;
}

.product-info-block h2 {
    margin: 0 0 18px;
    color: #4a4a4f;
    font-size: 23px;
    line-height: 1.2;
    font-weight: 900;
}

.product-info-block h3 {
    margin: 18px 0 8px;
    color: #4a4a4f;
    font-size: 14px;
    font-weight: 900;
}

.product-info-block p {
    margin: 0 0 12px;
    color: var(--text);
    line-height: 1.65;
}

.collapsible-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 14px;
}

.collapsible-title h2 {
    margin: 0;
    color: var(--muted);
    font-size: 17px;
    font-weight: 500;
}

.collapsible-title span {
    color: var(--text-soft);
    font-weight: 900;
}

.technical-table,
.package-table {
    display: grid;
    border-top: 1px solid var(--line);
}

.technical-row,
.package-row {
    display: grid;
    gap: 0;
    min-height: 42px;
    border-bottom: 1px solid #fff;
    background: #f3f3f3;
}

.technical-row {
    grid-template-columns: minmax(220px, 0.54fr) minmax(0, 1fr);
}

.package-row {
    grid-template-columns: 1fr 1fr 1.2fr 1fr 1.2fr;
}

.technical-row span,
.technical-row strong,
.package-row span {
    min-width: 0;
    padding: 13px 16px;
    color: var(--text);
    font-size: 12px;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.technical-row span,
.package-head span {
    font-weight: 900;
}

.technical-row strong {
    border-left: 1px solid #fff;
    font-weight: 500;
}

.package-head {
    background: #e2e2e2;
    font-weight: 900;
}

.product-detail-copy {
    min-width: 0;
    flex: 1;
}

.detail-price-row {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 20px 0;
}

.detail-price-row strong {
    color: var(--text);
    font-size: 28px;
    font-weight: 900;
}

.detail-price-row span {
    min-height: 32px;
    display: inline-flex;
    align-items: center;
    padding: 0 10px;
    border-radius: 3px;
    background: var(--primary-soft);
    color: var(--dark);
    font-weight: 900;
}

.product-facts {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin: 0 0 20px;
}

.product-facts div {
    min-width: 0;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 4px;
    background: var(--surface);
}

.product-facts dt {
    margin-bottom: 5px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
}

.product-facts dd {
    margin: 0;
    color: var(--text);
    font-weight: 900;
    overflow-wrap: anywhere;
}

@media (max-width: 1040px) {
    .main-header-grid {
        grid-template-columns: 180px 1fr;
    }

    .account-nav {
        grid-column: 1 / -1;
        justify-content: flex-end;
        padding-bottom: 12px;
    }

    .home-product-grid,
    .catalog-product-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .category-grid,
    .admin-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .admin-stat-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .mini-table-row {
        grid-template-columns: minmax(180px, 1.4fr) minmax(80px, 0.6fr) minmax(150px, 1fr) minmax(70px, 0.5fr);
    }

    .rule-title,
    .rule-fields {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .product-detail-stage {
        grid-template-columns: 1fr;
        gap: 28px;
    }

    .product-buy-panel {
        min-height: auto;
        padding: 24px 0 0;
        border-left: 0;
        border-top: 1px solid var(--line);
    }

    .gallery-main {
        min-height: 420px;
    }

    .gallery-main img {
        max-height: 420px;
    }

    .product-info-block {
        max-width: none;
    }
}

@media (max-width: 760px) {
    .header-container,
    .page-shell {
        width: min(100% - 22px, 1240px);
    }

    .utility-content,
    .catalog-header,
    .cart-shell,
    .toolbar,
    .detail-layout {
        align-items: stretch;
        flex-direction: column;
    }

    .utility-content nav {
        display: none;
    }

    .main-header-grid {
        grid-template-columns: 1fr;
        gap: 12px;
        padding: 12px 0;
    }

    .search {
        grid-template-columns: 1fr 92px;
    }

    .account-nav {
        grid-column: auto;
        justify-content: space-between;
        padding-bottom: 0;
    }

    .category-content {
        gap: 16px;
    }

    .all-categories {
        padding: 0 12px;
    }

    .commerce-hero {
        min-height: 300px;
        padding: 24px;
        background:
            linear-gradient(90deg, rgba(34, 34, 34, 0.9), rgba(34, 34, 34, 0.55)),
            url("/assets/img/b2b-tools-banner.png") center / cover no-repeat;
    }

    .commerce-hero h1 {
        font-size: 30px;
    }

    .hero-actions,
    .filters,
    .product-footer,
    .import-status,
    .detail-price-row {
        align-items: stretch;
        flex-direction: column;
    }

    .summary-strip,
    .category-grid,
    .home-product-grid,
    .catalog-product-grid,
    .admin-grid,
    .admin-stat-grid,
    .product-facts {
        grid-template-columns: 1fr;
    }

    .import-metrics {
        justify-content: flex-start;
    }

    .mini-table {
        border: 0;
        gap: 8px;
    }

    .mini-table-row {
        grid-template-columns: 1fr;
        border: 1px solid var(--line);
        border-radius: 4px;
    }

    .rule-title,
    .rule-fields,
    .form-actions {
        grid-template-columns: 1fr;
    }

    .breadcrumb {
        margin-bottom: 20px;
    }

    .product-gallery {
        grid-template-columns: 1fr;
    }

    .gallery-thumbs {
        display: flex;
        order: 2;
        overflow-x: auto;
        padding-bottom: 4px;
    }

    .gallery-thumb {
        flex: 0 0 76px;
        width: 76px;
        height: 76px;
    }

    .gallery-main {
        min-height: 310px;
    }

    .gallery-main img {
        max-height: 300px;
    }

    .product-buy-panel h1 {
        font-size: 24px;
    }

    .product-price-block {
        justify-content: flex-start;
    }

    .buy-actions,
    .buy-facts,
    .technical-row,
    .package-row {
        grid-template-columns: 1fr;
    }

    .technical-row strong {
        border-left: 0;
        border-top: 1px solid #fff;
    }

    .pagination,
    .pagination div {
        align-items: stretch;
        flex-direction: column;
    }

    .summary-item {
        border-right: 0;
        border-bottom: 1px solid var(--line);
    }

    .summary-item:last-child {
        border-bottom: 0;
    }

    .catalog-layout {
        grid-template-columns: 1fr;
    }

    .filter-panel {
        position: static;
    }

    .cart-summary {
        width: 100%;
    }

    .login-page {
        grid-template-columns: 1fr;
    }

    .login-aside {
        min-height: 240px;
    }

    .product-photo-placeholder {
        width: 100%;
        min-height: 220px;
    }
}

.catalog-heading {
    margin-bottom: 18px;
}

.catalog-heading .compact-breadcrumb {
    margin-bottom: 14px;
}

.catalog-heading-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(220px, 280px);
    gap: 18px;
    align-items: end;
}

.catalog-heading-grid h1 {
    margin: 0;
    color: var(--text);
    font-size: 28px;
    line-height: 1.2;
    font-weight: 900;
}

.catalog-heading-grid p {
    margin: 8px 0 0;
    color: var(--text-soft);
    font-weight: 700;
}

.catalog-sort label {
    display: grid;
    gap: 7px;
    color: var(--text-soft);
    font-size: 12px;
    font-weight: 900;
}

.catalog-sort select {
    width: 100%;
    min-height: 40px;
    border: 1px solid var(--line);
    border-radius: 3px;
    padding: 0 10px;
    background: #fff;
    color: var(--text);
}

.refined-catalog {
    grid-template-columns: 278px minmax(0, 1fr);
    gap: 32px;
}

.refined-filter-panel {
    top: 150px;
    gap: 18px;
    padding: 0;
    overflow: hidden;
    background: #f7f7f8;
    border-color: #e6e6e7;
    box-shadow: none;
}

.refined-filter-panel form,
.department-filter {
    display: grid;
    gap: 14px;
    padding: 18px;
}

.refined-filter-panel form {
    border-bottom: 1px solid var(--line);
}

.filter-panel-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 28px;
}

.filter-panel-title span {
    color: var(--text);
    font-size: 17px;
    font-weight: 900;
}

.filter-panel-title a {
    color: var(--blue);
    font-size: 12px;
    font-weight: 900;
}

.price-filter {
    display: grid;
    gap: 8px;
}

.price-filter > span {
    color: var(--text-soft);
    font-size: 12px;
    font-weight: 900;
}

.price-filter > div {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.price-filter small {
    color: var(--muted);
    font-size: 11px;
    font-weight: 800;
}

.department-list {
    display: grid;
    gap: 4px;
}

.department-item,
.category-subitem {
    min-width: 0;
    min-height: 36px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    align-items: center;
    border-radius: 3px;
    color: var(--text-soft);
    font-size: 12px;
}

.department-item {
    padding: 8px 9px;
}

.category-subitem {
    padding: 7px 8px 7px 14px;
}

.category-subitem.depth-2 {
    padding-left: 26px;
}

.category-subitem.depth-3,
.category-subitem.depth-4 {
    padding-left: 38px;
}

.department-item:hover,
.department-item.active,
.category-subitem:hover,
.category-subitem.active {
    background: #fff;
    color: var(--text);
}

.department-item.active,
.category-subitem.active {
    box-shadow: inset 3px 0 0 var(--primary);
}

.department-item strong,
.category-subitem span {
    min-width: 0;
    font-weight: 800;
    overflow-wrap: anywhere;
}

.department-item small,
.category-subitem small {
    min-width: 28px;
    color: var(--muted);
    text-align: right;
    font-size: 11px;
    font-weight: 900;
}

.category-branch {
    display: grid;
    gap: 2px;
    margin: 0 0 6px 8px;
    padding-left: 8px;
    border-left: 1px solid var(--line);
}

.catalog-results {
    min-width: 0;
}

.catalog-toolbar {
    display: grid;
    grid-template-columns: minmax(280px, 480px) auto;
    gap: 16px;
    align-items: center;
    margin-bottom: 14px;
}

.catalog-search-inline {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 96px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 3px;
    background: #fff;
}

.catalog-search-inline input,
.catalog-search-inline button {
    min-height: 40px;
    border: 0;
    outline: 0;
}

.catalog-search-inline input {
    min-width: 0;
    padding: 0 12px;
}

.catalog-search-inline button {
    background: var(--dark);
    color: #fff;
    font-weight: 900;
    cursor: pointer;
}

.view-toggle {
    display: inline-flex;
    justify-self: end;
    gap: 8px;
}

.view-toggle a {
    min-width: 84px;
    min-height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--line);
    border-radius: 3px;
    background: #fff;
    color: var(--text-soft);
    font-size: 12px;
    font-weight: 900;
}

.view-toggle a.active {
    border-color: #b8cddd;
    background: #c5d8e6;
    color: var(--text);
}

.active-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}

.active-filters a {
    min-height: 26px;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 0 9px;
    border: 1px solid var(--blue);
    border-radius: 3px;
    background: #fff;
    color: var(--blue);
    font-size: 11px;
    font-weight: 900;
}

.active-filters span {
    color: var(--text-soft);
}

.catalog-product-grid.catalog-grid-view {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 24px 22px;
}

.catalog-product-card {
    min-width: 0;
}

.catalog-product-card .tile-image {
    width: 100%;
    height: auto;
    aspect-ratio: 1 / 1.06;
    display: grid;
    place-items: center;
    padding: 18px;
    background: #fff;
}

.catalog-product-card .tile-image img {
    max-height: 100%;
}

.catalog-product-card .tile-content {
    padding-top: 10px;
}

.catalog-product-card .product-category {
    min-height: 16px;
    margin-bottom: 6px;
    color: var(--blue);
    font-size: 11px;
    line-height: 1.35;
    font-weight: 800;
}

.catalog-product-card h2,
.catalog-product-card h3 {
    min-height: 46px;
    margin-bottom: 8px;
    color: #4a4a4f;
    font-size: 15px;
    line-height: 1.32;
    font-weight: 500;
}

.catalog-product-card .brand-line {
    min-height: auto;
    margin-bottom: 5px;
    color: #4f5964;
    font-size: 13px;
    font-weight: 500;
    text-transform: uppercase;
}

.catalog-product-card .product-code {
    margin-bottom: 18px;
}

.product-card-actions {
    display: grid;
    gap: 9px;
    margin-top: auto;
}

.compact-price {
    justify-content: flex-start;
    gap: 5px;
    margin: 0;
}

.compact-price strong {
    color: #4a4a4f;
    font-size: 18px;
    font-weight: 900;
}

.compact-price span {
    color: var(--text-soft);
    font-size: 11px;
}

.quick-buy-row {
    display: grid;
    grid-template-columns: minmax(98px, 1fr) minmax(100px, 0.9fr);
    gap: 10px;
    align-items: center;
}

.compact-stepper {
    height: 30px;
    grid-template-columns: 28px minmax(34px, 1fr) 28px;
    border-color: var(--blue);
}

.compact-stepper button {
    width: 22px;
    height: 22px;
    font-size: 14px;
}

.quick-add-button {
    min-height: 30px;
    border: 0;
    border-radius: 15px;
    background: #f6bd00;
    color: var(--dark);
    font-size: 12px;
    font-weight: 900;
    cursor: pointer;
}

.quick-add-button:hover {
    background: var(--primary-strong);
}

.link-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 14px;
}

.catalog-list-view {
    grid-template-columns: 1fr;
    gap: 14px;
}

.catalog-list-view .catalog-product-card {
    display: grid;
    grid-template-columns: 168px minmax(0, 1fr);
    gap: 18px;
    align-items: start;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 4px;
    background: #fff;
}

.catalog-list-view .tile-image {
    aspect-ratio: 1 / 1;
    padding: 12px;
}

.catalog-list-view .tile-content {
    padding-top: 0;
}

.catalog-list-view .catalog-product-card h2 {
    min-height: auto;
    max-width: 760px;
}

.catalog-list-view .product-card-actions {
    grid-template-columns: minmax(160px, auto) minmax(230px, 340px);
    align-items: center;
}

.compact-breadcrumb {
    color: var(--blue);
}

.refined-detail-stage {
    grid-template-columns: minmax(0, 1.34fr) minmax(360px, 0.66fr);
    gap: 46px;
    margin-bottom: 46px;
}

.refined-gallery {
    grid-template-columns: 92px minmax(0, 1fr);
}

.refined-gallery .gallery-main {
    min-height: 560px;
    border: 0;
}

.refined-gallery .gallery-main img {
    max-height: 560px;
}

.refined-buy-panel {
    padding-left: 46px;
}

.detail-category-link {
    display: inline-flex;
    margin-bottom: 12px;
}

.refined-buy-panel h1 {
    margin-bottom: 14px;
}

.detail-meta-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin: 0;
}

.detail-meta-grid div {
    min-width: 0;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 3px;
    background: #fff;
}

.detail-meta-grid dt {
    margin-bottom: 5px;
    color: var(--muted);
    font-size: 10px;
    font-weight: 900;
    text-transform: uppercase;
}

.detail-meta-grid dd {
    margin: 0;
    color: var(--text);
    font-size: 12px;
    font-weight: 900;
    overflow-wrap: anywhere;
}

.refined-price-row {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 8px;
    margin: 10px 0 28px;
}

.refined-price-row strong {
    color: #55555a;
    font-size: 34px;
    line-height: 1;
    font-weight: 900;
}

.refined-price-row span {
    color: var(--text-soft);
    font-size: 12px;
    font-weight: 800;
}

.refined-buy-actions {
    grid-template-columns: minmax(170px, 1fr) minmax(170px, 0.9fr);
}

.tax-note {
    margin: 12px 0 0;
    color: var(--muted);
    text-align: center;
    font-size: 11px;
    line-height: 1.4;
    font-weight: 700;
}

.product-info-layout {
    display: grid;
    gap: 36px;
}

.product-info-layout .product-info-block {
    width: min(1080px, 100%);
    max-width: none;
    margin: 0 auto;
}

.product-description-block {
    padding-top: 6px;
}

.related-product-section {
    margin-top: 46px;
}

.related-product-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 24px 22px;
}

.related-product-grid .product-footer {
    margin-top: auto;
}

.product-footer form {
    margin: 0;
}

.cart-notice {
    min-height: 42px;
    display: flex;
    align-items: center;
    margin-bottom: 16px;
    padding: 0 14px;
    border: 1px solid var(--line);
    border-radius: 4px;
    background: #fff;
    color: var(--text);
    font-size: 13px;
    font-weight: 900;
}

.cart-notice.success {
    border-color: rgba(0, 91, 68, 0.24);
    background: #edf7f3;
    color: var(--green);
}

.cart-notice.error {
    border-color: rgba(171, 42, 42, 0.24);
    background: #fff0f0;
    color: #9d2f2f;
}

.cart-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 18px;
    align-items: start;
}

.cart-items {
    display: grid;
    gap: 12px;
}

.cart-item {
    display: grid;
    grid-template-columns: 104px minmax(220px, 1fr) minmax(105px, 0.34fr) minmax(190px, 0.5fr) minmax(105px, 0.34fr) auto;
    gap: 14px;
    align-items: center;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 4px;
    background: #fff;
    box-shadow: var(--shadow);
}

.cart-item-image {
    width: 104px;
    aspect-ratio: 1 / 1;
    display: grid;
    place-items: center;
    padding: 10px;
    border: 1px solid #d2d6da;
    border-radius: 4px;
    background: #fff;
}

.cart-item-image img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.cart-item-main {
    min-width: 0;
}

.cart-item-main h2 {
    margin: 4px 0 7px;
    color: #4a4a4f;
    font-size: 15px;
    line-height: 1.35;
    font-weight: 700;
}

.cart-item-price,
.cart-item-total {
    display: grid;
    gap: 6px;
}

.cart-item-price span,
.cart-item-total span,
.cart-checkout-panel span {
    color: var(--muted);
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
}

.cart-item-price strong,
.cart-item-total strong {
    color: #4a4a4f;
    font-size: 15px;
    font-weight: 900;
}

.cart-quantity-form {
    display: grid;
    grid-template-columns: minmax(102px, 1fr) 78px;
    gap: 8px;
    align-items: center;
}

.cart-quantity-form button,
.cart-remove-form button {
    min-height: 30px;
    border: 1px solid var(--line);
    border-radius: 3px;
    background: #fff;
    color: var(--text);
    font-size: 11px;
    font-weight: 900;
    cursor: pointer;
}

.cart-quantity-form button:hover,
.cart-remove-form button:hover {
    border-color: var(--primary);
}

.cart-remove-form button {
    color: #9d2f2f;
}

.cart-checkout-panel {
    position: sticky;
    top: 150px;
    display: grid;
    gap: 12px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 4px;
    background: #fff;
    box-shadow: var(--shadow);
}

.cart-checkout-panel div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.cart-checkout-panel strong {
    color: var(--text);
    font-size: 15px;
    font-weight: 900;
}

.cart-checkout-total {
    margin-top: 6px;
    padding-top: 14px;
    border-top: 1px solid var(--line);
}

.cart-checkout-total strong {
    font-size: 23px;
}

.cart-checkout-panel form {
    margin: 0;
}

.cart-submit-form {
    display: grid;
    gap: 10px;
}

.cart-submit-form label {
    display: grid;
    gap: 7px;
    color: var(--text-soft);
    font-size: 12px;
    font-weight: 900;
}

.cart-submit-form textarea {
    width: 100%;
    min-height: 92px;
    resize: vertical;
    border: 1px solid var(--line);
    border-radius: 3px;
    padding: 10px;
    background: #fff;
    color: var(--text);
    outline: 0;
}

.cart-checkout-panel .button {
    width: 100%;
}

.order-list {
    display: grid;
    gap: 10px;
}

.order-list-item {
    min-height: 72px;
    display: grid;
    grid-template-columns: minmax(170px, 0.9fr) 130px minmax(160px, 1fr) 90px minmax(110px, 0.7fr) 118px;
    gap: 12px;
    align-items: center;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 4px;
    background: #fff;
    box-shadow: var(--shadow);
}

.admin-order-list .order-list-item {
    grid-template-columns: minmax(170px, 0.82fr) 132px minmax(140px, 1fr) minmax(128px, 0.82fr) minmax(126px, 0.74fr) 74px minmax(108px, 0.5fr) 116px;
}

.order-list-item:hover {
    border-color: var(--primary);
}

.order-number {
    color: var(--text);
    font-weight: 900;
}

.order-status-pill {
    min-height: 26px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 10px;
    border: 1px solid rgba(0, 91, 68, 0.18);
    border-radius: 13px;
    background: #edf7f3;
    color: var(--green);
    font-size: 11px;
    font-weight: 900;
    white-space: nowrap;
}

.order-status-pill.status-approved {
    border-color: rgba(0, 91, 68, 0.18);
    background: #edf7f3;
    color: var(--green);
}

.order-status-pill.status-awaiting_payment,
.order-status-pill.status-invoiced,
.order-status-pill.status-shipped {
    border-color: rgba(92, 143, 173, 0.24);
    background: #eef6fa;
    color: #2d6689;
}

.order-status-pill.status-completed {
    border-color: rgba(0, 91, 68, 0.18);
    background: #e7f6ed;
    color: #12633a;
}

.order-status-pill.status-needs_adjustment {
    border-color: rgba(237, 139, 0, 0.22);
    background: var(--primary-soft);
    color: #9a5b00;
}

.order-status-pill.status-cancelled {
    border-color: rgba(157, 47, 47, 0.2);
    background: #fff0f0;
    color: #9d2f2f;
}

.order-list-item span,
.order-list-item small {
    min-width: 0;
    color: var(--text-soft);
    font-size: 12px;
    font-weight: 800;
    overflow-wrap: anywhere;
}

.order-list-item strong {
    color: var(--text);
    font-size: 15px;
    font-weight: 900;
}

.order-detail-header {
    display: flex;
    align-items: stretch;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 18px;
}

.order-detail-header h1 {
    margin: 0 0 10px;
    color: var(--text);
    font-size: 28px;
    font-weight: 900;
}

.order-progress {
    display: grid;
    gap: 12px;
    margin-bottom: 20px;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 4px;
    background: #fff;
    box-shadow: var(--shadow);
}

.order-progress .section-title {
    margin-bottom: 0;
}

.order-progress-steps {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.order-progress-steps li {
    min-width: 0;
    display: grid;
    grid-template-columns: 22px minmax(0, 1fr);
    gap: 8px;
    align-items: center;
    color: var(--muted);
    font-size: 12px;
    font-weight: 900;
}

.order-progress-steps li > span {
    width: 22px;
    height: 22px;
    border: 2px solid var(--line);
    border-radius: 50%;
    background: #fff;
}

.order-progress-steps li strong {
    min-width: 0;
    overflow-wrap: anywhere;
}

.order-progress-steps li.is-done,
.order-progress-steps li.is-current {
    color: var(--text);
}

.order-progress-steps li.is-done > span {
    border-color: var(--green);
    background: var(--green);
}

.order-progress-steps li.is-current > span {
    border-color: var(--primary);
    box-shadow: inset 0 0 0 4px #fff;
    background: var(--primary);
}

.order-progress-steps li.is-cancelled {
    color: #9d2f2f;
}

.order-progress-steps li.is-cancelled > span {
    border-color: #9d2f2f;
    background: #fff0f0;
}

.admin-order-filters {
    display: grid;
    grid-template-columns: minmax(180px, 240px) minmax(260px, 1fr) auto;
    gap: 12px;
    align-items: end;
}

.admin-order-filters label {
    display: grid;
    gap: 7px;
    color: var(--text-soft);
    font-size: 12px;
    font-weight: 900;
}

.admin-order-filters input,
.admin-order-filters select {
    width: 100%;
    min-height: 40px;
    border: 1px solid var(--line);
    border-radius: 3px;
    padding: 0 11px;
    background: #fff;
    color: var(--text);
    outline: 0;
}

.admin-review-panel {
    display: grid;
    grid-template-columns: minmax(220px, 0.5fr) minmax(0, 1fr);
    gap: 18px;
    align-items: start;
    margin-bottom: 20px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 4px;
    background: #fff;
    box-shadow: var(--shadow);
}

.admin-review-panel h2 {
    margin: 0 0 8px;
    color: var(--text);
    font-size: 18px;
    font-weight: 900;
}

.admin-review-panel p {
    margin: 0;
    color: var(--text-soft);
    line-height: 1.5;
}

.admin-review-panel form {
    display: grid;
    gap: 12px;
    margin: 0;
}

.admin-review-panel label {
    display: grid;
    gap: 7px;
    color: var(--text-soft);
    font-size: 12px;
    font-weight: 900;
}

.admin-review-panel textarea {
    width: 100%;
    min-height: 88px;
    resize: vertical;
    border: 1px solid var(--line);
    border-radius: 3px;
    padding: 10px;
    background: #fff;
    color: var(--text);
    outline: 0;
}

.admin-closed-note {
    display: grid;
    gap: 6px;
    align-content: center;
    min-height: 76px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 4px;
    background: var(--surface-soft);
}

.admin-closed-note strong {
    color: var(--text);
    font-size: 16px;
    font-weight: 900;
}

.admin-closed-note span,
.internal-history-note {
    color: var(--text-soft);
    font-size: 12px;
}

.admin-review-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.danger-button {
    border-color: rgba(157, 47, 47, 0.18);
    background: #fff0f0;
    color: #9d2f2f;
}

.danger-button:hover {
    border-color: #9d2f2f;
    background: #ffe3e3;
}

.order-summary-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 20px;
}

.order-summary-grid article,
.order-note,
.order-history {
    border: 1px solid var(--line);
    border-radius: 4px;
    background: #fff;
    box-shadow: var(--shadow);
}

.order-summary-grid article {
    min-height: 78px;
    display: grid;
    gap: 8px;
    align-content: center;
    padding: 14px;
}

.order-summary-grid span,
.order-note h2,
.order-history h2 {
    color: var(--muted);
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
}

.order-summary-grid strong {
    min-width: 0;
    color: var(--text);
    font-size: 15px;
    font-weight: 900;
    overflow-wrap: anywhere;
}

.order-note {
    margin-bottom: 20px;
    padding: 16px;
}

.order-note h2,
.order-history h2 {
    margin: 0 0 10px;
}

.order-note p {
    margin: 0;
    color: var(--text);
    line-height: 1.55;
}

.order-items {
    display: grid;
    gap: 12px;
}

.order-items .section-title {
    margin-bottom: 0;
}

.order-item {
    display: grid;
    grid-template-columns: 104px minmax(220px, 1fr) minmax(80px, 0.24fr) minmax(105px, 0.34fr) minmax(105px, 0.34fr);
    gap: 14px;
    align-items: center;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 4px;
    background: #fff;
    box-shadow: var(--shadow);
}

.order-history {
    display: grid;
    gap: 10px;
    margin-top: 22px;
    padding: 16px;
}

.order-history article {
    display: grid;
    gap: 4px;
    padding-left: 12px;
    border-left: 3px solid var(--primary);
}

.order-history strong {
    color: var(--text);
    font-weight: 900;
}

.order-history span,
.order-history p {
    margin: 0;
    color: var(--text-soft);
    font-size: 12px;
    line-height: 1.45;
}

@media (max-width: 1180px) {
    .catalog-product-grid.catalog-grid-view,
    .related-product-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 1040px) {
    .refined-catalog {
        grid-template-columns: 242px minmax(0, 1fr);
        gap: 22px;
    }

    .catalog-product-grid.catalog-grid-view,
    .related-product-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .refined-detail-stage {
        grid-template-columns: 1fr;
    }

    .refined-buy-panel {
        padding-left: 0;
    }

    .cart-layout {
        grid-template-columns: 1fr;
    }

    .cart-checkout-panel {
        position: static;
    }

    .cart-item {
        grid-template-columns: 104px minmax(0, 1fr) minmax(180px, 0.6fr);
    }

    .order-list-item,
    .admin-order-list .order-list-item,
    .order-item {
        grid-template-columns: 104px minmax(0, 1fr) minmax(140px, 0.6fr);
    }

    .cart-item-price,
    .cart-item-total,
    .cart-remove-form,
    .order-item .cart-item-total {
        grid-column: 2 / -1;
    }

    .order-summary-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .order-progress-steps {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .admin-order-filters,
    .admin-order-filters.three-filters,
    .admin-review-panel,
    .customer-list .admin-data-row,
    .user-list .admin-data-row,
    .representative-list .admin-data-row {
        grid-template-columns: 1fr;
    }

    .toolbar {
        align-items: flex-start;
    }

    .toolbar-actions {
        justify-content: flex-start;
    }
}

@media (max-width: 760px) {
    .catalog-heading-grid,
    .catalog-toolbar,
    .catalog-list-view .catalog-product-card,
    .catalog-list-view .product-card-actions,
    .refined-buy-actions,
    .detail-meta-grid {
        grid-template-columns: 1fr;
    }

    .refined-catalog {
        grid-template-columns: 1fr;
    }

    .catalog-product-grid.catalog-grid-view,
    .related-product-grid {
        grid-template-columns: 1fr;
    }

    .view-toggle {
        justify-self: stretch;
    }

    .view-toggle a {
        flex: 1;
    }

    .quick-buy-row {
        grid-template-columns: minmax(110px, 1fr) minmax(110px, 1fr);
    }

    .refined-gallery {
        grid-template-columns: 1fr;
    }

    .refined-gallery .gallery-main {
        min-height: 330px;
    }

    .refined-price-row {
        align-items: center;
    }

    .cart-item,
    .order-list-item,
    .admin-order-list .order-list-item,
    .order-item,
    .cart-quantity-form {
        grid-template-columns: 1fr;
    }

    .cart-item-image {
        width: 100%;
        max-width: 180px;
    }

    .cart-item-price,
    .cart-item-total,
    .cart-remove-form,
    .order-item .cart-item-total {
        grid-column: auto;
    }

    .order-detail-header {
        flex-direction: column;
    }

    .order-summary-grid {
        grid-template-columns: 1fr;
    }

    .order-progress-steps {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .form-grid.two-columns,
    .inline-admin-form,
    .account-mini-table .mini-table-row {
        grid-template-columns: 1fr;
    }

    .form-actions {
        justify-content: stretch;
    }

    .form-actions .button,
    .toolbar-actions .button,
    .inline-admin-form .button {
        width: 100%;
    }
}
