/* ADIX B2B Shop – Design System v2 */

:root {
    color-scheme: light;
    --line: #e2e8f0;
    --line-strong: #cbd5e1;
    --ink: #0f172a;
    --ink-secondary: #334155;
    --muted: #64748b;
    --bg: #f1f5f9;
    --panel: #ffffff;
    --green: #15803d;
    --green-soft: #ecfdf5;
    --accent: #1a365d;
    --accent-hover: #234e82;
    --dark: #0f172a;
    --yellow: #f5c518;
    --yellow-soft: #fef9c3;
    --red: #b91c1c;
    --red-soft: #fef2f2;
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 14px;
    --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.05);
    --shadow-md: 0 4px 16px rgba(15, 23, 42, 0.08);
    --shadow-lg: 0 12px 32px rgba(15, 23, 42, 0.1);
    --header-toolbar-height: 64px;
    --header-height: 64px;
    --font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    --transition: 0.15s ease;
    --space-1: 4px;
    --space-2: 8px;
    --space-3: 12px;
    --space-4: 16px;
    --space-5: 24px;
    --space-6: 32px;
    --space-7: 48px;
    --text-xs: 12px;
    --text-sm: 13px;
    --text-base: 15px;
    --text-lg: 18px;
    --text-xl: 24px;
    --warning: #b45309;
    --warning-soft: #fffbeb;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body, .shop-body {
    margin: 0;
    font-family: var(--font);
    font-size: 15px;
    line-height: 1.5;
    color: var(--ink);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
}

/* ── Unified shop header ── */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.shop-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255, 255, 255, 0.98);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
    backdrop-filter: saturate(1.4) blur(12px);
}

.shop-header__shell {
    max-width: 1400px;
    margin: 0 auto;
    min-height: var(--header-toolbar-height);
    display: grid;
    grid-template-columns: auto auto minmax(180px, 1fr) auto;
    grid-template-areas: "brand nav search utilities";
    align-items: center;
    gap: 12px 20px;
    padding: 0 24px;
}

.shop-brand {
    grid-area: brand;
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    color: inherit;
    text-decoration: none;
    flex-shrink: 0;
}

.shop-brand__lockup {
    position: relative;
    display: flex;
    align-items: center;
    height: 38px;
    padding: 5px 46px 5px 10px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: var(--panel);
    box-shadow: var(--shadow-sm);
}

.shop-brand__lockup img {
    display: block;
    width: 92px;
    height: auto;
    max-height: 24px;
    object-fit: contain;
}

.shop-brand__badge {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    height: 20px;
    display: inline-flex;
    align-items: center;
    padding: 0 6px;
    border-radius: 4px;
    color: var(--ink);
    background: var(--yellow);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.02em;
}

.shop-brand__subtitle {
    color: var(--muted);
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}

.shop-nav {
    display: flex;
    align-items: center;
    gap: 2px;
}

.shop-nav--inline {
    grid-area: nav;
    flex-shrink: 0;
}

.shop-nav__link {
    height: 36px;
    display: inline-flex;
    align-items: center;
    padding: 0 12px;
    border-radius: var(--radius-sm);
    color: var(--ink-secondary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: color var(--transition), background var(--transition);
}

.shop-nav__link:hover {
    color: var(--accent);
    background: rgba(26, 54, 93, 0.06);
}

.shop-nav__link.is-active {
    color: var(--accent);
    background: rgba(26, 54, 93, 0.08);
    font-weight: 600;
}

.shop-header__search-slot {
    grid-area: search;
    min-width: 0;
}

.shop-search {
    position: relative;
    display: flex;
    align-items: stretch;
    gap: 8px;
    width: 100%;
    max-width: 560px;
}

.shop-search__field {
    flex: 1;
    min-width: 0;
    display: flex;
}

.shop-search input {
    width: 100%;
    height: 40px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    padding: 0 14px;
    background: var(--bg);
    color: var(--ink);
    font: inherit;
    font-size: 14px;
    transition: border-color var(--transition), box-shadow var(--transition), background var(--transition);
}

.shop-search input:focus {
    outline: none;
    border-color: var(--accent);
    background: var(--panel);
    box-shadow: 0 0 0 3px rgba(26, 54, 93, 0.12);
}

.shop-search__submit {
    height: 40px;
    border: 0;
    border-radius: var(--radius-sm);
    padding: 0 16px;
    color: var(--ink);
    background: var(--yellow);
    font: inherit;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
    transition: filter var(--transition), transform var(--transition);
}

.shop-search__submit:hover { filter: brightness(1.05); }
.shop-search__submit:active { transform: scale(0.98); }

.shop-header__utilities {
    grid-area: utilities;
    display: flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
}

.shop-util-link {
    height: 36px;
    display: inline-flex;
    align-items: center;
    padding: 0 10px;
    border-radius: var(--radius-sm);
    color: var(--ink-secondary);
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    transition: color var(--transition), background var(--transition);
}

.shop-util-link:hover {
    color: var(--accent);
    background: rgba(26, 54, 93, 0.06);
}

button.shop-util-link {
    border: none;
    background: transparent;
    cursor: pointer;
    font: inherit;
}

#shop-nav-logout[hidden],
.shop-nav__logout[hidden],
.shop-nav__logout--drawer[hidden] {
    display: none !important;
}

.shop-util-cart {
    position: relative;
    height: 36px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0 12px;
    border-radius: var(--radius-sm);
    border: 1px solid rgba(245, 197, 24, 0.45);
    background: var(--yellow);
    color: var(--ink);
    text-decoration: none;
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
    transition: filter var(--transition), box-shadow var(--transition);
}

.shop-util-cart:hover {
    filter: brightness(1.04);
    box-shadow: 0 2px 8px rgba(245, 197, 24, 0.35);
}

.shop-util-cart__icon {
    flex-shrink: 0;
}

.shop-lang {
    position: relative;
}

.shop-lang__trigger {
    height: 36px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0 10px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: var(--panel);
    color: var(--ink-secondary);
    font: inherit;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: border-color var(--transition), background var(--transition), color var(--transition);
}

.shop-lang__trigger:hover {
    border-color: var(--line-strong);
    color: var(--accent);
}

.shop-lang__icon,
.shop-lang__chevron {
    flex-shrink: 0;
    opacity: 0.75;
}

.shop-lang__chevron {
    transition: transform var(--transition);
}

.shop-lang.is-open .shop-lang__chevron {
    transform: rotate(180deg);
}

.shop-lang__menu {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    z-index: 120;
    min-width: 148px;
    margin: 0;
    padding: 4px;
    list-style: none;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: var(--panel);
    box-shadow: var(--shadow-lg);
}

.shop-lang__menu[hidden] {
    display: none;
}

.shop-lang__option {
    width: 100%;
    height: 36px;
    display: flex;
    align-items: center;
    padding: 0 12px;
    border: 0;
    border-radius: var(--radius-sm);
    background: transparent;
    color: var(--ink-secondary);
    font: inherit;
    font-size: 13px;
    font-weight: 500;
    text-align: left;
    cursor: pointer;
    transition: background var(--transition), color var(--transition);
}

.shop-lang__option:hover,
.shop-lang__option:focus-visible {
    background: rgba(26, 54, 93, 0.06);
    color: var(--accent);
    outline: none;
}

.shop-lang__option.is-active {
    background: rgba(26, 54, 93, 0.08);
    color: var(--accent);
    font-weight: 700;
}

.shop-nav-drawer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.25s ease;
    border-top: 0 solid var(--line);
}

.shop-header.is-nav-open .shop-nav-drawer {
    max-height: 360px;
    border-top-width: 1px;
}

.shop-nav--drawer {
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    max-width: 1400px;
    margin: 0 auto;
    padding: 8px 16px 14px;
}

.shop-nav--drawer .shop-nav__link,
.shop-nav--drawer .shop-nav__logout--drawer {
    width: 100%;
    justify-content: flex-start;
    height: 42px;
}

.shop-client-pill[hidden],
.shop-client-pill--drawer[hidden] {
    display: none !important;
}

.shop-client-pill {
    max-width: 160px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    padding: 0 10px;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--ink-secondary);
    background: var(--bg);
    font-size: 12px;
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.shop-client-pill--drawer {
    max-width: none;
    width: 100%;
    justify-content: center;
    margin: 4px 0;
}

.shop-client-pill--link {
    text-decoration: none;
    color: var(--ink-secondary);
    transition: border-color var(--transition), background var(--transition);
}

.shop-client-pill--link:hover {
    border-color: var(--accent);
    background: var(--panel);
}

.shop-nav-toggle {
    display: none;
    width: 40px;
    height: 40px;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
    padding: 0;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: var(--panel);
    color: var(--ink);
    cursor: pointer;
    transition: background var(--transition), border-color var(--transition);
}

.shop-nav-toggle:hover {
    background: var(--bg);
}

.shop-nav-toggle:focus-visible,
.shop-lang__trigger:focus-visible,
.shop-util-link:focus-visible,
.shop-util-cart:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(26, 54, 93, 0.2);
}

.shop-nav-toggle__bar {
    display: block;
    width: 18px;
    height: 2px;
    border-radius: 1px;
    background: currentColor;
    transition: transform var(--transition), opacity var(--transition);
}

.shop-header.is-nav-open .shop-nav-toggle__bar:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.shop-header.is-nav-open .shop-nav-toggle__bar:nth-child(2) {
    opacity: 0;
}

.shop-header.is-nav-open .shop-nav-toggle__bar:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

.shop-nav__link:focus-visible,
.shop-brand:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(26, 54, 93, 0.2);
    border-radius: var(--radius-sm);
}

/* Legacy topbar aliases (backward compat) */
.topbar { display: none; }
.account-topbar { display: none; }
.catalog-topbar { display: none; }

/* Legacy floating language switcher — removed from layout */
.language-switcher { display: none !important; }

body.shop-nav-open {
    overflow: hidden;
}

/* ── Search page hero ── */
.search-hero {
    margin-bottom: var(--space-5);
    padding: var(--space-5) var(--space-6);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: linear-gradient(135deg, var(--panel) 0%, #f8fafc 55%, var(--yellow-soft) 100%);
    box-shadow: var(--shadow-sm);
}

.search-hero h1 {
    margin: 0 0 8px;
    font-size: 28px;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

.search-hero__lead {
    margin: 0;
    color: var(--muted);
    font-size: 15px;
    line-height: 1.5;
    max-width: 560px;
}

.search-results-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin: -8px 0 18px;
}

.search-results-summary {
    margin: 0;
    color: var(--ink-secondary);
    font-size: 14px;
    font-weight: 600;
}

.view-toggle {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: var(--panel);
}

.view-toggle__btn {
    min-height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 12px;
    border-radius: calc(var(--radius-sm) - 2px);
    color: var(--muted);
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: color var(--transition), background var(--transition);
}

.view-toggle__btn:hover {
    color: var(--accent);
    background: rgba(26, 54, 93, 0.04);
}

.view-toggle__btn.is-active {
    color: var(--accent);
    background: rgba(26, 54, 93, 0.08);
}

.search-pager {
    margin-top: 24px;
}

.search-pager-link {
    min-height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 14px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    color: var(--accent);
    background: var(--panel);
    font-weight: 600;
    text-decoration: none;
    transition: border-color var(--transition), background var(--transition);
}

.search-pager-link:hover {
    border-color: var(--accent);
    background: rgba(26, 54, 93, 0.04);
}

.search-pager-link.is-disabled {
    opacity: 0.45;
    pointer-events: none;
}

/* ── Page containers ── */
.page, .product-page {
    max-width: 1200px;
    margin: 0 auto;
    padding: 28px 24px 48px;
}

.search { display: flex; gap: 10px; margin-bottom: 24px; }

.search input {
    flex: 1;
    height: 48px;
    padding: 0 16px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    font: inherit;
    font-size: 16px;
    transition: border-color var(--transition), box-shadow var(--transition);
}

.search input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(26, 54, 93, 0.12);
}

.search button {
    height: 48px;
    padding: 0 24px;
    border: 0;
    border-radius: var(--radius-sm);
    color: var(--ink);
    background: var(--yellow);
    font: inherit;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: filter var(--transition);
}

.search button:hover { filter: brightness(1.05); }

/* ── Search layout + filters ── */
.search-layout {
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    gap: 24px;
    align-items: start;
}

.filter-sidebar {
    position: sticky;
    top: calc(var(--header-height) + 16px);
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    padding: 16px;
    max-height: calc(100vh - var(--header-height) - 32px);
    overflow: auto;
}

.filter-sidebar--loading {
    min-height: 120px;
    display: grid;
    place-items: center;
}

.filter-sidebar--refreshing {
    opacity: 0.72;
    pointer-events: none;
}

.filter-sidebar__loading {
    margin: 0;
    color: var(--muted);
    font-size: 14px;
}

.filter-sidebar__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.filter-sidebar__head h2 {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
}

.filter-clear {
    font-size: 13px;
    color: var(--accent);
    text-decoration: none;
}

.filter-clear:hover { text-decoration: underline; }

.filter-group {
    border-top: 1px solid var(--line);
    padding-top: 10px;
    margin-top: 10px;
}

.filter-group__toggle {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 0;
    border: 0;
    background: transparent;
    font: inherit;
    font-size: 14px;
    font-weight: 600;
    color: var(--ink);
    cursor: pointer;
    text-align: left;
}

.filter-group__toggle::after {
    content: '▾';
    color: var(--muted);
    transition: transform var(--transition);
}

.filter-group:not(.is-expanded) .filter-group__body { display: none; }
.filter-group:not(.is-expanded) .filter-group__toggle::after { transform: rotate(-90deg); }

.filter-group__body {
    display: grid;
    gap: 6px;
    padding-bottom: 8px;
}

.filter-option {
    display: grid;
    grid-template-columns: 18px 1fr auto;
    gap: 8px;
    align-items: center;
    font-size: 14px;
    cursor: pointer;
}

.filter-option input { margin: 0; }

.filter-option__label {
    line-height: 1.3;
    color: var(--ink-secondary);
}

.filter-option__count {
    font-size: 12px;
    color: var(--muted);
    white-space: nowrap;
}

.filter-show-more {
    border: 0;
    background: transparent;
    color: var(--accent);
    font: inherit;
    font-size: 13px;
    padding: 4px 0;
    cursor: pointer;
    text-align: left;
}

.filter-dimensions {
    display: grid;
    gap: 10px;
}

.filter-dimension {
    display: grid;
    gap: 6px;
    font-size: 13px;
    color: var(--ink-secondary);
}

.filter-dimension input {
    width: 100%;
    height: 36px;
    padding: 0 10px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    font: inherit;
}

.search-main__form {
    margin-bottom: 16px;
}

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

.filter-chip {
    display: inline-flex;
    align-items: center;
    padding: 6px 10px;
    border-radius: 999px;
    background: var(--green-soft);
    border: 1px solid #bbf7d0;
    color: var(--green);
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
}

.filter-chip:hover {
    background: #dcfce7;
}

/* Mobile search/filter layout — see enterprise block near file end */

/* ── Product cards ── */
.results--grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr));
    gap: var(--space-4);
}

.results--list {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}

.product-media-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    width: 100%;
    height: 100%;
    min-height: 72px;
    padding: var(--space-2);
    background: linear-gradient(145deg, var(--bg) 0%, #eef2f7 100%);
    color: var(--muted);
    text-align: center;
}

.product-media-placeholder__icon {
    width: 28px;
    height: 28px;
    opacity: 0.55;
    flex-shrink: 0;
}

.product-media-placeholder__label {
    font-size: var(--text-xs);
    line-height: 1.25;
    max-width: 100%;
    overflow-wrap: anywhere;
}

.card {
    display: grid;
    grid-template-columns: 100px 1fr;
    gap: 14px;
    min-height: 140px;
    padding: 16px;
    color: inherit;
    text-decoration: none;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    transition: border-color var(--transition), box-shadow var(--transition), transform var(--transition);
}

.card:hover {
    border-color: var(--accent);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.card-image, .media {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fafbfc;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.card-image img {
    max-width: 100%;
    max-height: 96px;
    object-fit: contain;
}

.card-body {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}

.card-sku,
.product-row__sku {
    font-size: var(--text-xs);
    font-weight: 600;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: var(--muted);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.card-title,
.product-row__title {
    margin: 0;
    font-size: var(--text-base);
    font-weight: 600;
    line-height: 1.35;
    color: var(--ink);
}

.card-title {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--space-2);
    margin-top: auto;
}

.card-price-row {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: var(--space-2);
    padding-top: var(--space-2);
    border-top: 1px solid var(--line);
}

.results--grid .card--with-actions {
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr auto;
    min-height: 0;
    padding: 0;
    overflow: hidden;
}

.results--grid .card--with-actions .card-image {
    width: 100%;
    aspect-ratio: 4 / 3;
    min-height: 140px;
    border: 0;
    border-bottom: 1px solid var(--line);
    border-radius: 0;
}

.results--grid .card--with-actions .card-image img {
    max-height: none;
    height: 100%;
    width: 100%;
}

.results--grid .card--with-actions .card-body {
    padding: var(--space-3) var(--space-4) var(--space-2);
}

.results--grid .card--with-actions .product-quick-add {
    padding: 0 var(--space-4) var(--space-4);
    margin-top: 0;
}

.card h2 {
    margin: 4px 0 8px;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.3;
}

.product-row {
    display: grid;
    grid-template-columns: 72px minmax(0, 1fr) auto auto;
    gap: 16px;
    align-items: center;
    min-height: 76px;
    padding: 12px 16px;
    color: inherit;
    text-decoration: none;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    transition: border-color var(--transition), box-shadow var(--transition), background var(--transition);
}

.product-row:hover {
    border-color: var(--accent);
    box-shadow: var(--shadow-md);
    background: rgba(26, 54, 93, 0.02);
}

.product-row__image {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 72px;
    height: 56px;
    flex-shrink: 0;
    background: #fafbfc;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.product-row__image img {
    max-width: 100%;
    max-height: 52px;
    object-fit: contain;
}

.product-row__main {
    min-width: 0;
}

.product-row__main h2,
.product-row__title {
    margin: 0 0 4px;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.35;
}

.product-row__title {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 0;
}

.product-row__sku {
    margin-bottom: 2px;
}

.product-row__stock {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
    min-width: 120px;
    font-size: 13px;
    color: var(--ink-secondary);
    text-align: right;
}

.product-row__price {
    min-width: 0;
    max-width: 100%;
    font-size: 14px;
    font-weight: 700;
    color: var(--accent);
    text-align: right;
    overflow-wrap: anywhere;
}

@media (max-width: 760px) {
    .search-results-toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .view-toggle {
        align-self: flex-end;
    }

    .product-row {
        grid-template-columns: 64px minmax(0, 1fr);
        grid-template-areas:
            "image main"
            "stock price"
            "actions actions";
        gap: 10px 12px;
    }

    .product-row__link { display: contents; }

    .product-row__image { grid-area: image; }
    .product-row__main { grid-area: main; }
    .product-row__stock {
        grid-area: stock;
        align-items: flex-start;
        text-align: left;
        min-width: 0;
    }
    .product-row__price {
        grid-area: price;
        text-align: right;
    }
    .product-row--with-actions .product-quick-add {
        grid-area: actions;
        justify-self: stretch;
        flex-wrap: wrap;
    }
}

/* External supplier results */
.external-results {
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid var(--line);
}

.external-results-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
}

.external-results-head h2 { margin: 0 0 6px; font-size: 22px; font-weight: 700; }
.external-results-head p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.5; }

.external-results-head > span {
    min-height: 30px;
    display: inline-flex;
    align-items: center;
    padding: 0 12px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--panel);
    color: var(--accent);
    font-size: 12px;
    font-weight: 700;
}

.external-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 16px;
}

.external-card {
    display: grid;
    grid-template-columns: 104px 1fr;
    gap: 14px;
    min-height: 170px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: var(--panel);
    box-shadow: var(--shadow-sm);
    transition: box-shadow var(--transition);
}

.external-card:hover { box-shadow: var(--shadow-md); }

.external-image {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    min-height: 146px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    overflow: hidden;
    background: var(--bg);
}

.external-image img { width: 100%; height: 146px; object-fit: cover; object-position: top; }

.external-card-body { min-width: 0; display: grid; align-content: start; gap: 8px; }

.external-meta { display: flex; align-items: center; justify-content: space-between; gap: 8px; }

.external-meta span {
    padding: 4px 8px;
    border-radius: 999px;
    color: var(--ink);
    background: var(--yellow);
    font-size: 11px;
    font-weight: 700;
}

.external-meta strong { color: var(--accent); font-size: 12px; white-space: nowrap; }

.external-code {
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.external-card h3 { margin: 0; font-size: 15px; font-weight: 600; line-height: 1.3; }

.external-facts { display: flex; flex-wrap: wrap; gap: 6px; }

.external-facts span {
    padding: 4px 8px;
    border-radius: 999px;
    background: var(--bg);
    color: var(--ink-secondary);
    font-size: 12px;
}

.external-open {
    width: max-content;
    min-height: 34px;
    display: inline-flex;
    align-items: center;
    padding: 0 12px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    color: var(--accent);
    background: var(--panel);
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    transition: border-color var(--transition), background var(--transition);
}

.external-open:hover { border-color: var(--accent); background: rgba(26, 54, 93, 0.04); }

/* External product detail */
.external-product-hero {
    display: grid;
    grid-template-columns: minmax(280px, 430px) 1fr;
    gap: 24px;
    align-items: start;
    margin-bottom: 20px;
}

.external-product-facts { margin: 16px 0; }

.external-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }

.external-actions button {
    height: 44px;
    border: 0;
    border-radius: var(--radius-sm);
    padding: 0 20px;
    color: var(--ink);
    background: var(--yellow);
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}

.external-detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
    margin: 16px 0 20px;
}

.external-detail-grid div {
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: #fafbfc;
}

.external-detail-grid span { display: block; margin-bottom: 4px; color: var(--muted); font-size: 12px; }
.external-detail-grid strong { display: block; font-size: 14px; overflow-wrap: anywhere; }

.external-swatches { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 20px; }

.external-swatch {
    min-height: 30px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0 10px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--panel);
    font-size: 12px;
}

.external-swatch i {
    width: 14px;
    height: 14px;
    display: inline-block;
    border: 1px solid rgba(0, 0, 0, 0.15);
    border-radius: 3px;
}

.external-stock-table { overflow: auto; border: 1px solid var(--line); border-radius: var(--radius-md); }

.external-stock-table table { width: 100%; border-collapse: collapse; min-width: 520px; }

.external-stock-table th, .external-stock-table td {
    padding: 11px 14px;
    border-bottom: 1px solid var(--line);
    text-align: left;
}

.external-stock-table th { background: var(--bg); color: var(--ink-secondary); font-weight: 600; }

/* ── Shared utilities ── */
.muted { color: var(--muted); font-size: 13px; }

.facts { display: flex; flex-wrap: wrap; gap: 8px; }

.facts span {
    padding: 5px 10px;
    border-radius: 999px;
    background: var(--bg);
    color: var(--ink-secondary);
    font-size: 13px;
}

.stock-stale, .stock-warning { color: var(--red) !important; background: var(--red-soft) !important; }

.breadcrumb {
    display: flex;
    gap: 8px;
    align-items: center;
    color: var(--muted);
    font-size: 13px;
    margin-bottom: 16px;
}

.breadcrumb a { color: var(--accent); text-decoration: none; font-weight: 500; }
.breadcrumb a:hover { text-decoration: underline; }

/* ── Product detail page ── */
.product-hero {
    display: grid;
    grid-template-columns: minmax(260px, 430px) 1fr minmax(220px, 280px);
    gap: 24px;
    align-items: start;
    margin-bottom: 20px;
}

.media-stack {
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-width: 0;
}

.media { min-height: 320px; padding: 20px; }
.primary-media { min-height: 420px; }
.media img { max-width: 100%; max-height: 380px; }

.summary h1 {
    margin: 8px 0 16px;
    font-size: 32px;
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -0.02em;
}

.product-subtitle { margin: 0 0 18px; color: var(--muted); line-height: 1.5; }

.quick-links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }

.quick-links a {
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    color: var(--accent);
    padding: 8px 12px;
    text-decoration: none;
    background: var(--panel);
    font-size: 13px;
    font-weight: 500;
    transition: border-color var(--transition), background var(--transition);
}

.quick-links a:hover { border-color: var(--accent); background: rgba(26, 54, 93, 0.04); }

.gallery { display: flex; flex-wrap: wrap; gap: 10px; margin: 18px 0; }

.gallery.rail {
    margin: 0;
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 10px;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x proximity;
    padding-bottom: 4px;
    max-width: 100%;
}

.gallery.rail .thumb {
    flex: 0 0 76px;
    scroll-snap-align: start;
}

.thumb {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 76px;
    height: 76px;
    background: var(--panel);
    border: 2px solid var(--line);
    border-radius: var(--radius-sm);
    padding: 0;
    cursor: pointer;
    transition: border-color var(--transition), box-shadow var(--transition);
}

.thumb.is-active {
    border-color: var(--yellow);
    box-shadow: 0 0 0 2px rgba(245, 197, 24, 0.3);
}

.thumb img { max-width: 68px; max-height: 68px; }

.buy-box {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    padding: 20px;
    box-shadow: var(--shadow-md);
}

.box-label { color: var(--muted); font-size: 13px; font-weight: 600; margin-bottom: 12px; }
.buy-box .facts { margin-bottom: 16px; }

.buy-box button {
    width: 100%;
    height: 44px;
    border: 0;
    border-radius: var(--radius-sm);
    color: var(--ink);
    background: var(--yellow);
    font: inherit;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: filter var(--transition);
}

.buy-box button:hover { filter: brightness(1.05); }
.buy-box .quote-button { margin-top: 10px; color: #fff; background: var(--accent); }

.stock-note { margin-top: 12px; color: var(--red); font-size: 13px; line-height: 1.4; }

.quantity-field { display: grid; gap: 6px; margin: 14px 0; color: var(--muted); font-size: 13px; font-weight: 500; }

.quantity-field input {
    height: 40px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    padding: 0 12px;
    font: inherit;
    font-size: 15px;
}

.quantity-field input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(26, 54, 93, 0.12);
}

.cart-status { min-height: 22px; margin-top: 10px; color: var(--muted); font-size: 13px; line-height: 1.4; }
.cart-status.error { color: var(--red); }
.cart-status.success { color: var(--green); }
.cart-status.info { color: var(--accent); }

.description {
    padding: 24px;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    overflow: auto;
    box-shadow: var(--shadow-sm);
}

.description h2 { margin: 0 0 10px; font-size: 24px; font-weight: 700; }
.description h3 { margin: 0 0 16px; font-size: 18px; font-weight: 600; }

.description table { width: 100%; border-collapse: collapse; margin: 12px 0 20px; }

.description table + table { margin-top: 0; }

.description p:empty { display: none; margin: 0; }

.description th, .description td {
    text-align: left;
    padding: 10px 12px;
    border-bottom: 1px solid var(--line);
    vertical-align: top;
}

.description th { width: 34%; color: var(--ink-secondary); background: var(--bg); font-weight: 600; }
.description a { color: var(--accent); }

.description sub,
.description sup {
    font-size: 0.75em;
    line-height: 0;
    position: relative;
    vertical-align: baseline;
}

.description sub { bottom: -0.25em; }
.description sup { top: -0.5em; }

.source-pill {
    display: inline-flex;
    margin-bottom: 12px;
    padding: 5px 10px;
    border-radius: var(--radius-sm);
    background: var(--bg);
    color: var(--muted);
    font-size: 12px;
    font-weight: 600;
}

.lead { color: var(--muted); line-height: 1.55; margin: 0 0 20px; }

.metric-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 12px;
    margin: 20px 0;
}

.metric-tile {
    border: 1px solid var(--line);
    border-left: 4px solid var(--yellow);
    border-radius: var(--radius-sm);
    padding: 14px;
    background: #fafbfc;
}

.metric-tile span, .metric-tile small { display: block; color: var(--muted); font-size: 12px; }
.metric-tile strong { display: block; margin: 4px 0; font-size: 18px; font-weight: 700; }

.attribute-strip {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 12px;
    margin: 20px 0 28px;
}

.attribute-chip {
    display: flex;
    align-items: center;
    gap: 10px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    padding: 10px 12px;
    background: var(--panel);
    font-size: 13px;
}

.attribute-chip img { width: 28px; height: 28px; object-fit: contain; }

.enrichment-card { border-top: 1px solid var(--line); padding-top: 20px; margin-top: 20px; }

/* Grid spec cards reuse enrichment-card but are not sequential full-width sections. */
.spec-groups > .enrichment-card {
    border-top: none;
    margin-top: 0;
    padding-top: 0;
}

.spec-groups { column-count: 2; column-gap: 20px; }

.spec-group {
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    padding: 18px;
    margin: 0 0 20px;
    break-inside: avoid;
    -webkit-column-break-inside: avoid;
    page-break-inside: avoid;
}

.spec-group h3 { margin-bottom: 10px; }

.description .spec-group table { margin: 0; }

.spec-table .symbol { width: 88px; font-weight: 700; color: var(--dark); }
.spec-table .value { white-space: nowrap; font-weight: 700; }

.link-list, .knowledge-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }

.link-list li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    border-bottom: 1px solid var(--line);
    padding: 10px 0;
}

.link-list span { color: var(--muted); font-size: 12px; white-space: nowrap; }

.knowledge-list { grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }

.knowledge-list a {
    display: block;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    padding: 12px;
    text-decoration: none;
    background: #fafbfc;
    transition: border-color var(--transition);
}

.knowledge-list a:hover { border-color: var(--accent); }

.empty,
.checkout-empty {
    padding: 32px 24px;
    background: var(--panel);
    border: 1px dashed var(--line-strong);
    border-radius: var(--radius-md);
    color: var(--muted);
    text-align: center;
    font-size: 15px;
    line-height: 1.5;
}

/* ── Login page ── */
.login-page {
    max-width: 960px;
    margin: 0 auto;
    padding: 40px 24px 56px;
    display: grid;
    grid-template-columns: minmax(280px, 420px) 1fr;
    gap: 20px;
    align-items: start;
}

.login-panel, .session-panel {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: 28px;
    box-shadow: var(--shadow-md);
}

.eyebrow {
    margin: 0 0 8px;
    color: var(--accent);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.login-panel h1, .session-panel h2 { margin: 0 0 12px; font-size: 26px; font-weight: 700; line-height: 1.2; }
.login-copy { margin: 0 0 24px; color: var(--muted); line-height: 1.55; }

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

.login-form label { display: grid; gap: 6px; font-size: 13px; font-weight: 600; color: var(--ink-secondary); }

.login-form input {
    width: 100%;
    height: 46px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    padding: 0 14px;
    font: inherit;
    font-size: 15px;
    transition: border-color var(--transition), box-shadow var(--transition);
}

.login-form input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(26, 54, 93, 0.12);
}

.login-form button, .session-actions button, .session-actions a {
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    border: 0;
    padding: 0 20px;
    font: inherit;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    transition: filter var(--transition);
}

.login-form button { margin-top: 4px; color: #fff; background: var(--accent); }
.login-form button:hover { filter: brightness(1.08); }
.login-form button:disabled { opacity: 0.65; cursor: wait; }

.login-status { min-height: 22px; margin-top: 16px; color: var(--muted); font-size: 14px; }
.login-status.error { color: var(--red); }
.login-status.success { color: var(--green); }
.login-status.info { color: var(--accent); }

.session-details { display: grid; gap: 10px; margin: 18px 0 22px; }

.session-details div {
    display: grid;
    grid-template-columns: 100px 1fr;
    gap: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--line);
}

.session-details dt { color: var(--muted); font-size: 13px; }
.session-details dd { margin: 0; font-weight: 600; min-width: 0; overflow-wrap: anywhere; }

.session-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.session-actions a { color: var(--ink); background: var(--yellow); }
.session-actions button { color: #fff; background: #475569; }

/* ── Checkout step indicator ── */
.checkout-steps {
    max-width: 1080px;
    margin: 0 auto;
    padding: 20px 24px 0;
}

.checkout-steps__list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    gap: 0;
}

.checkout-steps__item {
    flex: 1;
    position: relative;
}

.checkout-steps__item:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 18px;
    left: calc(50% + 22px);
    right: calc(-50% + 22px);
    height: 2px;
    background: var(--line);
    z-index: 0;
}

.checkout-steps__item.is-complete:not(:last-child)::after {
    background: var(--green);
}

.checkout-steps__link {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 0 8px 4px;
    color: var(--muted);
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    transition: color var(--transition);
}

.checkout-steps__num {
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--line);
    border-radius: 999px;
    background: var(--panel);
    color: var(--muted);
    font-size: 14px;
    font-weight: 700;
    transition: border-color var(--transition), background var(--transition), color var(--transition);
}

.checkout-steps__item.is-complete .checkout-steps__link,
.checkout-steps__item.is-complete .checkout-steps__num {
    color: var(--green);
    border-color: var(--green);
}

.checkout-steps__item.is-active .checkout-steps__link {
    color: var(--accent);
}

.checkout-steps__item.is-active .checkout-steps__num {
    color: var(--ink);
    border-color: var(--yellow);
    background: var(--yellow);
    box-shadow: 0 0 0 3px rgba(245, 197, 24, 0.25);
}

.checkout-steps__label { white-space: nowrap; }

/* ── Cart page ── */
.cart-page {
    max-width: 1080px;
    margin: 0 auto;
    padding: 32px 24px 56px;
    display: grid;
    gap: 18px;
}

.cart-header { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; }
.cart-header h1 { margin: 0; font-size: 28px; font-weight: 700; line-height: 1.15; }

.cart-status-panel {
    min-width: 220px;
    padding: 12px 16px;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: var(--panel);
    color: var(--muted);
    font-size: 14px;
    text-align: right;
}

.cart-status-panel.error { color: var(--red); border-color: #fecaca; background: var(--red-soft); }
.cart-status-panel.success { color: var(--green); border-color: #bbf7d0; background: var(--green-soft); }
.cart-status-panel.info { color: var(--accent); }

.cart-company {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
}

.cart-company div {
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: var(--panel);
    box-shadow: var(--shadow-sm);
}

.cart-company span { display: block; margin-bottom: 6px; color: var(--muted); font-size: 12px; font-weight: 600; }
.cart-company strong { display: block; min-width: 0; overflow-wrap: anywhere; font-size: 15px; font-weight: 600; }

.cart-summary-panel {
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: linear-gradient(135deg, var(--panel) 0%, #f8fafc 55%, var(--yellow-soft) 100%);
    box-shadow: var(--shadow-md);
    padding: 20px;
    display: grid;
    gap: 16px;
}

.cart-summary-panel__head h2 {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    line-height: 1.2;
}

.cart-summary-panel__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 12px;
}

.cart-summary-panel__grid div {
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.9);
}

.cart-summary-panel__grid span {
    display: block;
    margin-bottom: 6px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 600;
}

.cart-summary-panel__grid strong {
    display: block;
    min-width: 0;
    overflow-wrap: anywhere;
    font-size: 18px;
    font-weight: 700;
}

.cart-summary-panel__cta {
    display: flex;
    justify-content: flex-end;
}

.checkout-cta {
    min-height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 28px;
    border: 0;
    border-radius: var(--radius-sm);
    color: var(--ink);
    background: var(--yellow);
    font: inherit;
    font-size: 16px;
    font-weight: 800;
    text-decoration: none;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(245, 197, 24, 0.35);
    transition: filter var(--transition), transform var(--transition), box-shadow var(--transition);
}

.checkout-cta:hover {
    filter: brightness(1.04);
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(245, 197, 24, 0.42);
}

.checkout-cta.is-loading {
    cursor: wait;
    filter: none;
    transform: none;
    opacity: 0.92;
}

.checkout-cta.is-loading::before {
    content: '';
    width: 16px;
    height: 16px;
    margin-right: 10px;
    border: 2px solid rgba(15, 23, 42, 0.15);
    border-top-color: var(--ink);
    border-radius: 50%;
    animation: shop-spin 0.75s linear infinite;
}

.shop-spinner {
    flex: 0 0 auto;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(15, 23, 42, 0.12);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: shop-spin 0.75s linear infinite;
}

@keyframes shop-spin {
    to { transform: rotate(360deg); }
}

.checkout-placement {
    display: grid;
    gap: 12px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.92);
}

.checkout-placement[hidden] {
    display: none !important;
}

.checkout-placement__status {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--accent);
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
}

.checkout-progress-steps {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 8px;
}

.checkout-progress-step {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.35;
}

.checkout-progress-step__marker {
    flex: 0 0 auto;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: 2px solid var(--line);
    background: var(--panel);
}

.checkout-progress-step.active {
    color: var(--ink);
    font-weight: 600;
}

.checkout-progress-step.active .checkout-progress-step__marker {
    border-color: var(--accent);
    background: var(--accent);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.checkout-progress-step.done {
    color: var(--green);
}

.checkout-progress-step.done .checkout-progress-step__marker {
    border-color: var(--green);
    background: var(--green);
}

.quote-draft-panel {
    display: flex;
    flex-direction: column;
    gap: 0;
    border: 1px solid #fdba74;
    border-radius: var(--radius-md);
    background: #fff;
    overflow: hidden;
}

.quote-draft-panel table {
    width: 100%;
    border-collapse: collapse;
}

.quote-draft-panel th,
.quote-draft-panel td {
    padding: 14px 16px;
    border-bottom: 1px solid var(--line);
    text-align: left;
    vertical-align: top;
}

.quote-draft-panel th {
    color: var(--ink-secondary);
    background: #fff7ed;
    font-size: 13px;
    font-weight: 600;
}

.quote-draft-panel tr:last-child td { border-bottom: 0; }

.quote-draft-panel .muted {
    margin-top: 4px;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.4;
}

.quote-qty-input {
    width: 84px;
    height: 36px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    padding: 0 8px;
    font: inherit;
    font-size: 14px;
}

.quote-draft-actions {
    display: flex;
    justify-content: flex-end;
    padding: 12px 16px 16px;
    border-top: 1px solid var(--line);
    background: #fffaf5;
}

.quote-draft-actions button {
    height: 36px;
    border: 1px solid #fdba74;
    border-radius: var(--radius-sm);
    padding: 0 14px;
    background: #fff;
    color: #9a3412;
    font: inherit;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}

.quote-draft-actions button:hover { background: #ffedd5; }

.quote-note {
    display: grid;
    gap: 6px;
    padding: 14px 16px 16px;
    border-top: 1px solid var(--line);
    background: #fffaf5;
}

.quote-note span { display: block; color: var(--muted); font-size: 12px; font-weight: 600; }
.quote-note strong { display: block; min-width: 0; overflow-wrap: anywhere; font-size: 14px; font-weight: 600; }

.panel-note {
    display: grid;
    gap: 10px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--line);
}

.checkout-section.quote-panel .panel-note {
    border-top-color: #fdba74;
}

.panel-note-field {
    display: grid;
    gap: 6px;
}

.panel-note-field span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 600;
}

.panel-note-field textarea {
    width: 100%;
    min-height: 96px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    padding: 10px 12px;
    font: inherit;
    font-size: 14px;
    line-height: 1.45;
    resize: vertical;
}

.cart-lines {
    overflow: auto;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: var(--panel);
    box-shadow: var(--shadow-sm);
}

.cart-lines table { width: 100%; border-collapse: collapse; min-width: 680px; }

.cart-lines th, .cart-lines td {
    padding: 14px 16px;
    border-bottom: 1px solid var(--line);
    text-align: left;
    vertical-align: top;
}

.cart-lines th { color: var(--ink-secondary); background: var(--bg); font-size: 13px; font-weight: 600; }
.cart-lines tr:last-child td { border-bottom: 0; }

.line-title { display: block; font-weight: 600; line-height: 1.35; }

.cart-qty-input {
    width: 84px;
    height: 36px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    padding: 0 8px;
    font: inherit;
    font-size: 14px;
}

.cart-line-actions { display: flex; flex-wrap: wrap; gap: 8px; }

.cart-line-actions button {
    height: 34px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    padding: 0 12px;
    background: var(--panel);
    color: var(--accent);
    font: inherit;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: border-color var(--transition), background var(--transition);
}

.cart-line-actions button:hover { border-color: var(--accent); background: rgba(26, 54, 93, 0.04); }
.cart-line-actions button:disabled { opacity: 0.6; cursor: wait; }
.cart-line-remove { color: var(--red) !important; }

.checkout-link { display: inline-flex; color: var(--accent); font-weight: 700; text-decoration: none; }
.checkout-link:hover { text-decoration: underline; }

.empty-cell {
    padding: 28px 16px !important;
    color: var(--muted);
    font-size: 15px;
    line-height: 1.5;
    text-align: center;
}

/* ── Checkout page ── */
.checkout-page {
    max-width: 1080px;
    margin: 0 auto;
    padding: 32px 24px 56px;
    display: grid;
    gap: 18px;
}

.checkout-header { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; }
.checkout-header h1 { margin: 0; font-size: 28px; font-weight: 700; line-height: 1.15; }

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

.checkout-layout:has(.checkout-sidebar[hidden]) {
    grid-template-columns: 1fr;
}

.checkout-main {
    display: grid;
    gap: 20px;
    min-width: 0;
}

.checkout-section {
    min-width: 0;
}

.checkout-section.checkout-panel,
.checkout-section.order-panel,
.checkout-section.quote-panel {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 16px;
}

.checkout-section.order-panel h2,
.checkout-section.checkout-panel h2,
.checkout-section.quote-panel h2 {
    margin: 0 0 12px;
    font-size: 16px;
    font-weight: 700;
}

.checkout-section.quote-panel {
    border-color: #fdba74;
    background: #fffaf5;
}

.checkout-sidebar {
    position: sticky;
    top: 16px;
}

.checkout-sidebar[hidden] {
    display: none !important;
}

.checkout-sidebar .cart-summary-panel__head h2 {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
}

.checkout-sidebar__missing {
    display: grid;
    gap: 6px;
}

.checkout-sidebar__missing:empty {
    display: none;
}

.checkout-sidebar__actions {
    display: grid;
    gap: 10px;
    margin-top: 16px;
}

.checkout-sidebar__actions .checkout-cta {
    width: 100%;
    min-height: 48px;
}

.checkout-sidebar__actions .shop-link-cta {
    text-align: center;
    padding: 8px 0;
}

.checkout-readiness {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.checkout-check {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--panel);
    font-size: 12px;
}

.checkout-check strong { min-width: auto; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; }
.checkout-check.ok strong { color: var(--green); }
.checkout-check.missing strong { color: var(--red); }
.checkout-check span { color: var(--ink-secondary); font-size: 12px; line-height: 1.3; }

.checkout-panel {
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: var(--panel);
    padding: 18px;
    box-shadow: var(--shadow-sm);
}

.checkout-panel h2 { margin: 0 0 14px; font-size: 17px; font-weight: 700; line-height: 1.2; }

.checkout-details { display: grid; gap: 10px; }

.checkout-details div {
    display: grid;
    gap: 3px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--line);
}

.checkout-details div:last-child { border-bottom: 0; padding-bottom: 0; }

.checkout-details span, .method-list span { color: var(--muted); font-size: 12px; font-weight: 500; }
.checkout-details strong, .method-list strong { min-width: 0; overflow-wrap: anywhere; font-size: 14px; font-weight: 600; }

.checkout-empty { margin: 0; color: var(--muted); line-height: 1.5; }

#b2b-checkout-export-results {
    display: grid;
    gap: 8px;
}

#b2b-checkout-export-results:empty {
    display: none;
}

.checkout-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.method-list { display: grid; gap: 6px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.method-list:last-child { border-bottom: 0; padding-bottom: 0; }

.method-select { display: grid; gap: 6px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.method-select:last-child { border-bottom: 0; padding-bottom: 0; }
.method-select span { color: var(--muted); font-size: 12px; font-weight: 500; }

.method-select select {
    width: 100%;
    min-height: 40px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: var(--panel);
    padding: 0 10px;
    color: var(--ink);
    font: inherit;
    font-size: 14px;
}

.method-select textarea {
    width: 100%;
    min-height: 96px;
    resize: vertical;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: var(--panel);
    padding: 10px 12px;
    color: var(--ink);
    font: inherit;
    font-size: 14px;
    line-height: 1.45;
}

.checkout-note { color: var(--muted); font-size: 12px; line-height: 1.45; }

#b2b-checkout-quote-panel[hidden] {
    display: none !important;
}

/* ── Account portal ── */
.account-page {
    max-width: 1140px;
    min-width: 0;
    margin: 0 auto;
    padding: 32px 24px 56px;
    display: grid;
    gap: 18px;
}

.account-page-enterprise { max-width: 1360px; padding: 28px 28px 48px; gap: 20px; }

.account-header { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; }

.account-hero {
    align-items: stretch;
    min-width: 0;
    min-height: 172px;
    padding: 28px;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: linear-gradient(135deg, var(--panel) 0%, #f8fafc 55%, var(--yellow-soft) 100%);
    box-shadow: var(--shadow-md);
}

.hero-copy { display: grid; align-content: center; }

.account-header h1 { margin: 0 0 8px; font-size: 28px; font-weight: 700; line-height: 1.15; }
.account-hero h1 { font-size: 34px; letter-spacing: -0.02em; overflow-wrap: anywhere; }

.hero-facts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }

.hero-facts span {
    min-height: 30px;
    display: inline-flex;
    align-items: center;
    padding: 0 12px;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--ink-secondary);
    background: rgba(255, 255, 255, 0.85);
    font-size: 12px;
    font-weight: 600;
}

.account-sync-card {
    width: min(330px, 100%);
    display: grid;
    align-content: center;
    gap: 8px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.92);
    box-shadow: var(--shadow-sm);
}

.account-sync-card span, .account-sync-card small { color: var(--muted); font-size: 12px; line-height: 1.4; }
.account-sync-card strong { color: var(--accent); font-size: 15px; font-weight: 600; line-height: 1.35; }
.account-sync-card strong.success { color: var(--green); }
.account-sync-card strong.error { color: var(--red); }
.account-sync-card strong.info { color: var(--accent); }

.account-metrics { min-width: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }

.account-metrics div {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    padding: 18px;
}

.account-metrics .metric-card {
    position: relative;
    min-height: 130px;
    display: grid;
    align-content: start;
    gap: 6px;
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.account-metrics .metric-card::before {
    content: '';
    position: absolute;
    inset: 0 auto 0 0;
    width: 4px;
    background: var(--line);
}

.account-metrics .metric-primary::before { background: var(--accent); }
.account-metrics .metric-risk::before { background: var(--red); }

.account-metrics span { display: block; margin-bottom: 8px; color: var(--muted); font-size: 12px; font-weight: 600; }
.account-metrics strong { display: block; min-width: 0; overflow-wrap: anywhere; font-size: 24px; font-weight: 700; line-height: 1.15; }
.account-metrics .metric-card strong { font-size: 26px; color: var(--ink); }
.account-metrics .metric-card small { color: var(--muted); font-size: 12px; line-height: 1.35; }

.account-focus-grid { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 16px; align-items: start; }
.account-focus-grid--documents { grid-template-columns: 1fr; }
.account-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }
.account-grid--priority { margin-top: 0; }
.account-grid--archive { margin-top: 0; }

.account-daily-panel {
    display: grid;
    gap: 14px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: linear-gradient(135deg, var(--panel) 0%, #f8fafc 55%, var(--yellow-soft) 100%);
    box-shadow: var(--shadow-sm);
}

.account-daily-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

.account-daily-header h2 {
    margin: 0 0 4px;
    font-size: 22px;
    font-weight: 700;
    line-height: 1.2;
}

.account-daily-header .muted {
    margin: 0;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.45;
}

.account-quick-actions-bar {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}

.account-quick-actions-bar .quick-action::after { display: none; }

.account-secondary-panel {
    display: grid;
    gap: 14px;
}

.account-secondary-panel .account-daily-header {
    padding: 0 2px;
}

.account-panel {
    min-width: 0;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    padding: 18px;
    box-shadow: var(--shadow-sm);
}

.account-page-enterprise .account-panel { box-shadow: var(--shadow-sm); }

.account-documents-panel { min-width: 0; }

.account-actions-panel { display: grid; gap: 10px; position: sticky; top: calc(var(--header-height) + 16px); }

.compact-title { margin-bottom: 4px; }

.quick-action {
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 14px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    color: var(--accent);
    background: var(--panel);
    font-weight: 600;
    text-decoration: none;
    transition: border-color var(--transition), background var(--transition), transform var(--transition);
}

.quick-action:hover { border-color: var(--line-strong); background: #fafbfc; transform: translateY(-1px); }
.quick-action::after { content: '›'; color: var(--muted); font-size: 18px; }
.quick-action.primary { color: var(--ink); border-color: var(--yellow); background: var(--yellow); }
.quick-action.muted-action { color: var(--muted); background: var(--bg); }

.account-advisor {
    margin-top: 6px;
    display: grid;
    gap: 5px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: var(--bg);
}

.account-advisor span, .account-advisor small { color: var(--muted); font-size: 12px; line-height: 1.35; }
.account-advisor strong { color: var(--ink); font-size: 14px; font-weight: 600; }

.panel-title { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.panel-title h2 { margin: 0; font-size: 17px; font-weight: 700; line-height: 1.2; }
.panel-title span { color: var(--muted); font-size: 12px; }

.document-browser-title { align-items: flex-start; }

.document-tabs { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }

.document-tabs button {
    height: 36px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    padding: 0 12px;
    color: var(--accent);
    background: var(--panel);
    font: inherit;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: border-color var(--transition), background var(--transition);
}

.document-tabs button.active { color: var(--ink); border-color: var(--yellow); background: var(--yellow); }

.document-filters {
    display: grid;
    grid-template-columns: minmax(180px, 1fr) 150px 150px auto;
    gap: 10px;
    align-items: end;
    margin-bottom: 14px;
}

.document-filters label { display: grid; gap: 5px; color: var(--muted); font-size: 12px; font-weight: 600; }

.document-filters input {
    width: 100%;
    height: 40px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    padding: 0 10px;
    color: var(--ink);
    background: var(--panel);
    font: inherit;
    font-size: 14px;
}

.document-filters button, .document-pager button {
    height: 40px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    padding: 0 14px;
    color: var(--accent);
    background: var(--panel);
    font: inherit;
    font-weight: 600;
    cursor: pointer;
}

.document-pager {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 14px;
    color: var(--muted);
    font-size: 13px;
}

.document-pager button:disabled { opacity: 0.5; cursor: default; }

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

.account-doc {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 12px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: #fafbfc;
    color: inherit;
    text-decoration: none;
    transition: border-color var(--transition), background var(--transition);
}

.account-doc:hover { border-color: var(--accent); background: var(--panel); }

.account-doc div { display: grid; gap: 4px; }
.account-doc small { color: var(--accent); font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; }
.account-doc span { color: var(--muted); font-size: 12px; }

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

.quote-card {
    min-width: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    align-items: start;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: #fafbfc;
}

.quote-main { min-width: 0; display: grid; gap: 6px; }
.quote-main strong { min-width: 0; color: var(--ink); font-size: 14px; font-weight: 600; line-height: 1.35; overflow-wrap: anywhere; }
.quote-main small, .quote-side small { color: var(--muted); font-size: 12px; line-height: 1.35; }
.quote-side { display: grid; justify-items: end; gap: 6px; }

.account-lines { max-width: 100%; overflow: auto; }

.account-lines table { width: 100%; min-width: 640px; border-collapse: collapse; }

.account-lines th, .account-lines td {
    padding: 12px 14px;
    border-bottom: 1px solid var(--line);
    text-align: left;
    vertical-align: top;
}

.account-lines th { color: var(--ink-secondary); background: var(--bg); font-size: 13px; font-weight: 600; }

.account-doc-table table { min-width: 820px; }
.account-doc-table tbody tr:hover { background: #fafbfc; }

.document-hero { background: linear-gradient(135deg, var(--panel) 0%, #f8fafc 55%, #eef4fb 100%); }
.document-lines-panel { margin-bottom: 10px; }

.doc-type, .doc-status {
    min-height: 26px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    padding: 0 10px;
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
}

.type-invoice { color: #1a4971; background: #e0f0fe; }
.type-order { color: #6b5209; background: var(--yellow-soft); }
.type-quote { color: #36553c; background: #edf7ef; }
.status-open { color: var(--red); background: var(--red-soft); }
.status-paid { color: var(--green); background: var(--green-soft); }
.status-deleted { color: #92400e; background: #fef3c7; }

.account-doc--deleted {
    opacity: 0.92;
    border-color: #f59e0b;
    background: #fffbeb;
}

.document-deleted-notice {
    margin-top: 12px;
    padding: 10px 12px;
    border-radius: 10px;
    font-size: 13px;
    background: #fee2e2;
    color: #991b1b;
}

.table-link { color: var(--accent); font-weight: 600; text-decoration: none; }
.table-link:hover { text-decoration: underline; }


/* Legacy aliases */
.brand { font-weight: 700; color: inherit; text-decoration: none; }
.brand-logo { display: flex; align-items: center; gap: 12px; min-width: 190px; }
.brand-lockup { position: relative; display: flex; align-items: center; height: 38px; padding: 7px 52px 7px 10px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--panel); box-shadow: var(--shadow-sm); }
.brand-lockup img { display: block; width: 96px; height: auto; max-height: 26px; object-fit: contain; }
.brand-badge { position: absolute; right: 8px; top: 7px; height: 22px; display: inline-flex; align-items: center; justify-content: center; padding: 0 7px; border-radius: 4px; color: var(--ink); background: var(--yellow); font-size: 11px; font-weight: 800; }
.brand-subtitle { color: var(--muted); font-size: 12px; font-weight: 700; white-space: nowrap; }
.portal-search { flex: 1; max-width: 520px; display: flex; align-items: center; gap: 8px; }
.portal-search input { width: 100%; height: 40px; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 0 12px; background: var(--bg); color: var(--ink); font-size: 14px; }
.portal-search button { height: 40px; border: 0; border-radius: var(--radius-sm); padding: 0 14px; color: var(--ink); background: var(--yellow); font-weight: 700; cursor: pointer; }
.shop-nav a { color: inherit; text-decoration: none; font-size: 14px; }
.client-pill { max-width: 210px; height: 34px; display: inline-flex; align-items: center; justify-content: center; padding: 0 10px; border: 1px solid var(--line); border-radius: 999px; color: var(--ink-secondary); background: var(--bg); font-size: 12px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.admin-link, .catalog-nav a { color: inherit; text-decoration: none; font-size: 14px; }
.catalog-nav { display: flex; gap: 22px; align-items: center; }
.catalog-nav a { color: #edf2f7; }
.admin-link { color: var(--accent); }

/* ── Responsive header ── */
@media (min-width: 961px) {
    .shop-nav-drawer {
        display: none !important;
    }

    .shop-nav-toggle {
        display: none !important;
    }

    .shop-nav__account--drawer,
    .shop-client-pill--drawer,
    .shop-nav__logout--drawer {
        display: none !important;
    }

    .shop-nav__badge--mobile {
        display: none !important;
    }
}

@media (max-width: 960px) {
    :root {
        --header-height: 112px;
    }

    .shop-header__shell {
        grid-template-columns: 1fr auto;
        grid-template-areas:
            "brand utilities"
            "search search";
        gap: 0;
        padding: 10px 16px 0;
        min-height: 56px;
    }

    .shop-brand {
        min-width: 0;
    }

    .shop-brand__subtitle {
        display: none;
    }

    .shop-nav--inline {
        display: none !important;
    }

    #topbar-company:not(.shop-client-pill--drawer) {
        display: none !important;
    }

    .shop-header__search-slot {
        padding: 10px 0 12px;
        border-top: 1px solid var(--line);
        margin-top: 10px;
    }

    .shop-search {
        max-width: none;
    }

    .shop-header__utilities {
        gap: 6px;
    }

    .shop-nav-toggle {
        display: inline-flex;
    }

    .shop-util-cart__label {
        display: none;
    }

    .shop-util-cart {
        width: 40px;
        padding: 0;
        justify-content: center;
    }

    .shop-nav__badge:not(.shop-nav__badge--mobile) {
        display: none !important;
    }

    .account-metrics { grid-template-columns: 1fr 1fr; }
    .account-focus-grid { grid-template-columns: 1fr; }
    .account-actions-panel { position: static; }
    .account-quick-actions-bar { grid-template-columns: 1fr 1fr; }
    .account-daily-header { flex-direction: column; }
    .account-grid { grid-template-columns: 1fr; }
    .checkout-layout { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
    .external-results-head { align-items: flex-start; flex-direction: column; }
    .external-grid { grid-template-columns: 1fr; }
    .external-card { grid-template-columns: 96px 1fr; }
    .external-image img { height: 138px; }
    .external-product-hero { grid-template-columns: 1fr; }
    .product-hero { grid-template-columns: 1fr; }
    .primary-media { min-height: 300px; }
    .summary h1 { font-size: 24px; }

    /* Product detail: sticky buy-box + title above media */
    .product-page:not(.external-product-page) .product-hero {
        display: flex;
        flex-direction: column;
    }

    .product-page:not(.external-product-page) .product-hero .summary { order: 1; }
    .product-page:not(.external-product-page) .product-hero .media-stack { order: 2; }
    .product-page:not(.external-product-page) .product-hero .media-stack .primary-media { min-height: 240px; }

    .product-page:not(.external-product-page) .product-hero .buy-box {
        order: 4;
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 30;
        border-radius: var(--radius-lg) var(--radius-lg) 0 0;
        box-shadow: 0 -8px 24px rgba(15, 23, 42, 0.12);
        border: 0;
        border-top: 1px solid var(--line);
        padding: var(--space-3) var(--space-4);
        padding-bottom: calc(var(--space-3) + env(safe-area-inset-bottom, 0px));
        margin: 0;
        max-height: min(50vh, 320px);
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        display: grid;
        grid-template-columns: minmax(72px, 88px) minmax(0, 1fr);
        grid-template-areas:
            "facts facts"
            "qty add"
            "quote quote"
            "stock stock"
            "status status"
            "post post";
        gap: var(--space-2) var(--space-3);
        align-items: center;
    }

    .product-page:not(.external-product-page) .buy-box .box-label { display: none; }

    .product-page:not(.external-product-page) .buy-box .facts {
        grid-area: facts;
        display: flex;
        flex-wrap: wrap;
        gap: var(--space-1) var(--space-3);
        margin-bottom: 0;
        font-size: var(--text-sm);
        line-height: 1.35;
    }

    .product-page:not(.external-product-page) .buy-box .quantity-field {
        grid-area: qty;
        margin: 0;
    }

    .product-page:not(.external-product-page) .buy-box .quantity-field > span {
        position: absolute;
        width: 1px;
        height: 1px;
        padding: 0;
        margin: -1px;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
        white-space: nowrap;
        border: 0;
    }

    .product-page:not(.external-product-page) .buy-box .quantity-field input {
        height: 44px;
        width: 100%;
    }

    .product-page:not(.external-product-page) .buy-box #b2b-add-to-cart {
        grid-area: add;
        width: 100%;
        height: 44px;
    }

    .product-page:not(.external-product-page) .buy-box #b2b-request-quote {
        grid-area: quote;
        margin-top: 0;
        height: 40px;
        font-size: var(--text-sm);
    }

    .product-page:not(.external-product-page) .buy-box .stock-note {
        grid-area: stock;
        margin-top: 0;
        font-size: var(--text-xs);
    }

    .product-page:not(.external-product-page) .buy-box #b2b-cart-status {
        grid-area: status;
        margin-top: 0;
    }

    .product-page:not(.external-product-page) .buy-box #b2b-product-actions {
        grid-area: post;
    }

    .product-page:not(.external-product-page) .buy-box #b2b-product-actions:not([hidden]) {
        display: flex;
        flex-wrap: wrap;
        gap: var(--space-3);
        font-size: var(--text-sm);
    }

    body:has(.product-page:not(.external-product-page)) .shop-chat {
        bottom: calc(172px + env(safe-area-inset-bottom, 0px));
    }

    .page, .product-page:not(.external-product-page) { padding: 16px; }
    .product-page:not(.external-product-page) {
        padding-bottom: calc(168px + env(safe-area-inset-bottom, 0px));
    }
    .search { flex-direction: column; }
    .search-hero { padding: 20px; }
    .search-hero h1 { font-size: 22px; }
    .spec-groups { column-count: 1; }
    .link-list li { align-items: flex-start; flex-direction: column; }
    .login-page { grid-template-columns: 1fr; padding: 20px 16px; }
    .cart-page { padding: 20px 16px; }
    .cart-header { align-items: stretch; flex-direction: column; }
    .cart-status-panel { min-width: 0; text-align: left; }
    .account-quick-actions-bar { grid-template-columns: 1fr; }
    .checkout-header { align-items: stretch; flex-direction: column; }
    .checkout-page { padding: 20px 16px; }
    .account-page { padding: 20px 16px; }
    .account-header { align-items: stretch; flex-direction: column; }
    .account-metrics { grid-template-columns: 1fr 1fr; }
    .account-doc { grid-template-columns: 1fr; }
    .quote-card { grid-template-columns: 1fr; }
    .quote-side { justify-items: start; }
    .document-browser-title { display: grid; }
    .document-tabs { justify-content: flex-start; }
    .document-filters { grid-template-columns: 1fr; }
    .document-pager { justify-content: space-between; }
    .account-lines table { min-width: 620px; }
    .account-doc-table table { min-width: 0; }
    .account-doc-table thead { display: none; }
    .account-doc-table table, .account-doc-table tbody, .account-doc-table tr, .account-doc-table td { display: block; width: 100%; }
    .account-doc-table tr { padding: 10px 0; border-bottom: 1px solid var(--line); }
    .account-doc-table td { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 7px 0; border-bottom: 0; }
    .account-doc-table td::before { color: var(--muted); font-size: 12px; font-weight: 700; }
    html[lang="ro"] .account-doc-table td:nth-child(1)::before { content: 'Document'; }
    html[lang="ro"] .account-doc-table td:nth-child(2)::before { content: 'Tip'; }
    html[lang="ro"] .account-doc-table td:nth-child(3)::before { content: 'Data'; }
    html[lang="ro"] .account-doc-table td:nth-child(4)::before { content: 'Scadență'; }
    html[lang="ro"] .account-doc-table td:nth-child(5)::before { content: 'Valoare'; }
    html[lang="ro"] .account-doc-table td:nth-child(6)::before { content: 'Sold'; }
    html[lang="ro"] .account-doc-table td:nth-child(7)::before { content: 'Status'; }
    html[lang="hu"] .account-doc-table td:nth-child(1)::before { content: 'Dokumentum'; }
    html[lang="hu"] .account-doc-table td:nth-child(2)::before { content: 'Típus'; }
    html[lang="hu"] .account-doc-table td:nth-child(3)::before { content: 'Dátum'; }
    html[lang="hu"] .account-doc-table td:nth-child(4)::before { content: 'Esedékesség'; }
    html[lang="hu"] .account-doc-table td:nth-child(5)::before { content: 'Érték'; }
    html[lang="hu"] .account-doc-table td:nth-child(6)::before { content: 'Egyenleg'; }
    html[lang="hu"] .account-doc-table td:nth-child(7)::before { content: 'Állapot'; }
    html[lang="en"] .account-doc-table td:nth-child(1)::before { content: 'Document'; }
    html[lang="en"] .account-doc-table td:nth-child(2)::before { content: 'Type'; }
    html[lang="en"] .account-doc-table td:nth-child(3)::before { content: 'Date'; }
    html[lang="en"] .account-doc-table td:nth-child(4)::before { content: 'Due date'; }
    html[lang="en"] .account-doc-table td:nth-child(5)::before { content: 'Value'; }
    html[lang="en"] .account-doc-table td:nth-child(6)::before { content: 'Balance'; }
    html[lang="en"] .account-doc-table td:nth-child(7)::before { content: 'Status'; }
    .document-line-table table { min-width: 0; }
    .document-line-table thead { display: none; }
    .document-line-table table, .document-line-table tbody, .document-line-table tr, .document-line-table td { display: block; width: 100%; }
    .document-line-table tr { padding: 10px 0; border-bottom: 1px solid var(--line); }
    .document-line-table td { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; padding: 7px 0; border-bottom: 0; overflow-wrap: anywhere; }
    .document-line-table td::before { flex: 0 0 86px; color: var(--muted); font-size: 12px; font-weight: 700; }
    html[lang="ro"] .document-line-table td:nth-child(1)::before { content: 'Cod articol'; }
    html[lang="ro"] .document-line-table td:nth-child(2)::before { content: 'Denumire'; }
    html[lang="ro"] .document-line-table td:nth-child(3)::before { content: 'Cantitate'; }
    html[lang="ro"] .document-line-table td:nth-child(4)::before { content: 'Net'; }
    html[lang="ro"] .document-line-table td:nth-child(5)::before { content: 'Brut'; }
    html[lang="hu"] .document-line-table td:nth-child(1)::before { content: 'Cikkszám'; }
    html[lang="hu"] .document-line-table td:nth-child(2)::before { content: 'Megnevezés'; }
    html[lang="hu"] .document-line-table td:nth-child(3)::before { content: 'Mennyiség'; }
    html[lang="hu"] .document-line-table td:nth-child(4)::before { content: 'Nettó'; }
    html[lang="hu"] .document-line-table td:nth-child(5)::before { content: 'Bruttó'; }
    html[lang="en"] .document-line-table td:nth-child(1)::before { content: 'Item code'; }
    html[lang="en"] .document-line-table td:nth-child(2)::before { content: 'Description'; }
    html[lang="en"] .document-line-table td:nth-child(3)::before { content: 'Quantity'; }
    html[lang="en"] .document-line-table td:nth-child(4)::before { content: 'Net'; }
    html[lang="en"] .document-line-table td:nth-child(5)::before { content: 'Gross'; }
    .checkout-steps { padding: 16px 16px 0; }
    .checkout-steps__label { font-size: 11px; }
    .cart-summary-panel__cta { justify-content: stretch; }
    .checkout-cta { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    html { scroll-behavior: auto; }
}

.shop-nav__badge {
    margin-left: 4px;
    font-size: 12px;
    font-weight: 700;
    color: inherit;
}

.shop-nav__badge--quote {
    opacity: 0.85;
}

.shop-nav__badge[hidden] {
    display: none;
}

.search-hero--compact {
    padding: var(--space-4) var(--space-5);
    margin-bottom: var(--space-4);
}

.search-hero--compact h1 {
    font-size: var(--text-xl);
}

.search-mobile-bar {
    display: none;
    margin-bottom: var(--space-3);
}

.search-mobile-filter-btn {
    min-height: 44px;
    width: 100%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    padding: 0 var(--space-4);
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: var(--panel);
    color: var(--accent);
    font: inherit;
    font-size: var(--text-sm);
    font-weight: 700;
    cursor: pointer;
}

.filter-backdrop {
    position: fixed;
    inset: 0;
    z-index: 90;
    background: rgba(15, 23, 42, 0.45);
}

.filter-backdrop[hidden] {
    display: none !important;
}

.search-main {
    min-width: 0;
    width: 100%;
}

.product-row__price--primary {
    font-size: var(--text-lg);
    font-weight: 700;
    color: var(--ink);
}

.product-row__stock-qty strong,
.card-price {
    color: var(--ink);
    font-weight: 700;
}

.card-price {
    font-size: var(--text-lg);
    line-height: 1.2;
}

.card-stock strong {
    font-weight: 700;
}

.skeleton {
    display: block;
    height: 12px;
    border-radius: 999px;
    background: linear-gradient(90deg, #e2e8f0 0%, #f1f5f9 50%, #e2e8f0 100%);
    background-size: 200% 100%;
    animation: shop-skeleton 1.2s ease-in-out infinite;
}

.skeleton--title {
    height: 18px;
    width: 55%;
    margin-bottom: var(--space-3);
}

.skeleton--line {
    margin-bottom: var(--space-2);
}

.skeleton--short {
    width: 70%;
}

@keyframes shop-skeleton {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.filter-sidebar__skeleton {
    display: grid;
    gap: var(--space-2);
    padding: var(--space-2) 0;
}

.shop-auth-gate {
    padding: var(--space-5);
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: var(--panel);
    text-align: center;
    box-shadow: var(--shadow-sm);
}

.shop-auth-gate__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    margin: 0 auto var(--space-3);
    border-radius: 50%;
    background: var(--warning-soft);
    color: var(--warning);
}

.shop-auth-gate__title { margin: 0 0 var(--space-2); font-weight: 700; font-size: var(--text-lg); }
.shop-auth-gate__body { margin: 0 0 var(--space-4); color: var(--muted); }
.shop-auth-gate__actions { display: flex; flex-wrap: wrap; gap: var(--space-3); justify-content: center; }

.shop-inline-error {
    display: grid;
    gap: var(--space-3);
    padding: var(--space-4);
    border: 1px solid #fecaca;
    border-radius: var(--radius-md);
    background: var(--red-soft);
    color: var(--red);
    text-align: center;
}

.shop-inline-error p {
    margin: 0;
    font-weight: 600;
}

.shop-retry-btn {
    min-height: 40px;
    padding: 0 var(--space-4);
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-sm);
    background: var(--panel);
    color: var(--accent);
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}

.shop-retry-btn:hover {
    border-color: var(--accent);
    background: rgba(26, 54, 93, 0.04);
}

.cart-status-panel.warning,
.login-status.warning {
    background: var(--warning-soft);
    border-color: #fcd34d;
    color: var(--warning);
}

.checkout-validation-hint {
    margin: 0 0 var(--space-4);
    padding: var(--space-3) var(--space-4);
    border-radius: var(--radius-sm);
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    color: #1e40af;
    font-size: var(--text-sm);
    font-weight: 600;
}

.checkout-readiness:empty + .checkout-validation-hint {
    display: none;
}

@media (max-width: 960px) {
    .search-layout {
        grid-template-columns: 1fr;
        position: relative;
    }

    .search-mobile-bar {
        display: block;
    }

    .filter-sidebar {
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        z-index: 95;
        width: min(320px, 88vw);
        max-height: none;
        margin: 0;
        padding: var(--space-4);
        border-radius: 0;
        border-right: 1px solid var(--line);
        box-shadow: var(--shadow-lg);
        transform: translateX(-110%);
        transition: transform var(--transition);
        overflow: auto;
        background: var(--panel);
    }

    .search-layout--filters-open .filter-sidebar {
        transform: translateX(0);
    }

    .search-main {
        grid-column: 1 / -1;
        width: 100%;
    }

    .product-row {
        grid-template-columns: 64px minmax(0, 1fr);
        grid-template-areas:
            "image main"
            "image stock"
            "price price"
            "actions actions";
        gap: var(--space-2) var(--space-3);
    }

    .product-row__image { grid-area: image; }
    .product-row__main { grid-area: main; }
    .product-row__stock { grid-area: stock; }
    .product-row__price { grid-area: price; justify-self: start; }
    .product-row--with-actions {
        grid-template-columns: 64px minmax(0, 1fr);
    }

    .product-row--with-actions .product-quick-add {
        grid-area: actions;
        grid-column: 1 / -1;
        justify-self: stretch;
    }

    .product-row--with-actions .product-row__link {
        display: contents;
    }
}

@media (prefers-reduced-motion: reduce) {
    .skeleton {
        animation: none;
        background: #e2e8f0;
    }
}
.shop-link-cta { font-weight: 600; color: var(--accent); text-decoration: none; align-self: center; }
.shop-link-cta:hover { text-decoration: underline; }

/* --- B2B dual-cart & shop client --- */

.split-modal-overlay { position: fixed; inset: 0; background: rgba(15, 23, 42, 0.45); display: flex; align-items: center; justify-content: center; z-index: 100; padding: 16px; }
.split-modal { background: #fff; border-radius: 16px; max-width: 440px; width: 100%; padding: 24px; box-shadow: 0 20px 40px rgba(15, 23, 42, 0.18); }
.split-modal h3 { margin: 0 0 8px; font-size: 18px; }
.split-modal p { margin: 0 0 16px; color: var(--muted); line-height: 1.5; }
.split-modal__actions { display: grid; gap: 8px; }
.split-modal__btn { border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px; font-weight: 600; cursor: pointer; background: #fff; }
.split-modal__btn--order { background: var(--accent); color: #fff; border-color: var(--accent); }
.split-modal__btn--quote { background: #fff7ed; border-color: #fdba74; color: #9a3412; }
.split-modal__btn--split { background: #eff6ff; border-color: #93c5fd; color: #1d4ed8; }

.stock-badge { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 11px; font-weight: 700; }
.stock-badge--ok { background: #dcfce7; color: #166534; }
.stock-badge--partial { background: #fef9c3; color: #854d0e; }
.stock-badge--quote { background: #ffedd5; color: #9a3412; }

.cart-layout { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 20px; align-items: start; }
.cart-layout:has(.cart-sticky-summary[hidden]) { grid-template-columns: 1fr; }
.cart-main-panels { display: grid; gap: 20px; min-width: 0; }
.order-panel, .quote-panel { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 16px; min-width: 0; }
.order-panel h2, .quote-panel h2 { margin: 0 0 12px; font-size: 16px; }
.quote-panel { border-color: #fdba74; background: #fffaf5; }
.cart-sticky-summary { position: sticky; top: 16px; }
.cart-sticky-summary[hidden] { display: none !important; }
.quote-panel[hidden] { display: none !important; }
.cache-stale-banner { background: #fff7ed; border: 1px solid #fdba74; color: #9a3412; border-radius: 10px; padding: 10px 14px; margin-bottom: 16px; font-size: 13px; }

.product-quick-add { display: flex; gap: 8px; align-items: center; margin-top: 10px; }
.product-quick-add input { width: 64px; padding: 6px 8px; border: 1px solid var(--line); border-radius: 8px; }
.product-quick-add button { padding: 6px 10px; border-radius: 8px; border: 0; background: var(--accent); color: #fff; font-weight: 600; cursor: pointer; }
.product-row__link {
    display: contents;
    color: inherit;
    text-decoration: none;
}

.product-row--with-actions {
    grid-template-columns: 72px minmax(0, 1fr) auto auto minmax(120px, auto);
}

.product-row--with-actions .product-quick-add {
    justify-self: end;
    white-space: nowrap;
}

.card--with-actions {
    grid-template-columns: 100px 1fr;
    grid-template-rows: auto auto;
}

.card--with-actions .card-link-area {
    display: contents;
    color: inherit;
    text-decoration: none;
}

.card--with-actions .product-quick-add {
    grid-column: 1 / -1;
    margin-top: 4px;
}

.card--with-actions, .product-row--with-actions { position: relative; }
.card-actions-wrap { display: grid; gap: 8px; }
.card-link-area { text-decoration: none; color: inherit; display: block; }

.search-suggest { position: absolute; top: 100%; left: 0; right: 0; z-index: 30; background: #fff; border: 1px solid var(--line); border-radius: 10px; margin-top: 4px; max-height: 320px; overflow: auto; box-shadow: 0 8px 24px rgba(15,23,42,0.12); }
.search-suggest a { display: block; padding: 10px 12px; text-decoration: none; color: inherit; border-bottom: 1px solid var(--line); font-size: 13px; }
.search-suggest a:hover { background: #f8fafc; }

.quotes-page, .quote-detail-page { padding: 24px; max-width: 1100px; margin: 0 auto; }
.quotes-grid { display: grid; gap: 12px; }
.quote-history-card { display: grid; grid-template-columns: 1fr auto; gap: 12px; padding: 14px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.quote-history-card a { font-weight: 700; color: var(--accent); }

.checkout-export-result { margin-top: 12px; padding: 10px 12px; border-radius: 10px; font-size: 13px; }
.checkout-export-result.ok { background: #dcfce7; color: #166534; }
.checkout-export-result.fail { background: #fee2e2; color: #991b1b; }

@media (max-width: 900px) {
    .cart-layout { grid-template-columns: 1fr; }
    .cart-sticky-summary { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; border-radius: 16px 16px 0 0; box-shadow: 0 -8px 24px rgba(15,23,42,0.12); background: #fff; padding: 12px 16px; border-top: 1px solid var(--line); }
    .cart-page { padding-bottom: 120px; }
    .cart-header { flex-direction: column; align-items: stretch; }
    .cart-status-panel { min-width: 0; text-align: left; }
    .cart-lines {
        overflow-x: hidden;
        border: 0;
        background: transparent;
        box-shadow: none;
    }
    .cart-lines table { min-width: 0; border-collapse: separate; border-spacing: 0 12px; }
    .cart-lines thead { display: none; }
    .cart-lines table, .cart-lines tbody, .cart-lines tr, .cart-lines td { display: block; width: 100%; }
    .cart-lines tr {
        padding: 14px 16px;
        border: 1px solid var(--line);
        border-radius: var(--radius-md);
        background: var(--panel);
        box-shadow: var(--shadow-sm);
    }
    .cart-lines td { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 6px 0; border-bottom: 0; }
    .cart-lines td::before { color: var(--muted); font-size: 12px; font-weight: 700; flex: 0 0 88px; }
    .cart-lines td:nth-child(1) { flex-direction: column; align-items: flex-start; }
    .cart-lines td:nth-child(1)::before { display: none; }
    .cart-lines td:nth-child(6) { flex-direction: column; align-items: stretch; }
    html[lang="ro"] .cart-lines td:nth-child(1)::before { content: 'Produs'; }
    html[lang="ro"] .cart-lines td:nth-child(2)::before { content: 'SKU'; }
    html[lang="ro"] .cart-lines td:nth-child(3)::before { content: 'Cant.'; }
    html[lang="ro"] .cart-lines td:nth-child(4)::before { content: 'Stoc'; }
    html[lang="ro"] .cart-lines td:nth-child(5)::before { content: 'Brut'; }
    html[lang="ro"] .cart-lines td:nth-child(6)::before { content: 'Acțiuni'; }
    html[lang="hu"] .cart-lines td:nth-child(1)::before { content: 'Termék'; }
    html[lang="hu"] .cart-lines td:nth-child(2)::before { content: 'SKU'; }
    html[lang="hu"] .cart-lines td:nth-child(3)::before { content: 'Menny.'; }
    html[lang="hu"] .cart-lines td:nth-child(4)::before { content: 'Készlet'; }
    html[lang="hu"] .cart-lines td:nth-child(5)::before { content: 'Bruttó'; }
    html[lang="hu"] .cart-lines td:nth-child(6)::before { content: 'Műveletek'; }
    html[lang="en"] .cart-lines td:nth-child(1)::before { content: 'Product'; }
    html[lang="en"] .cart-lines td:nth-child(2)::before { content: 'SKU'; }
    html[lang="en"] .cart-lines td:nth-child(3)::before { content: 'Qty'; }
    html[lang="en"] .cart-lines td:nth-child(4)::before { content: 'Stock'; }
    html[lang="en"] .cart-lines td:nth-child(5)::before { content: 'Gross'; }
    html[lang="en"] .cart-lines td:nth-child(6)::before { content: 'Actions'; }
    .cart-lines td.empty-cell { display: block; }
    .cart-lines td.empty-cell::before { display: none; }
    .cart-line-actions { flex-direction: column; align-items: stretch; width: 100%; }
    .cart-line-actions button { width: 100%; justify-content: center; min-height: 40px; }
    .cart-qty-input { width: 100%; max-width: 140px; }
    .quote-draft-panel table { min-width: 0; }
    .quote-draft-panel thead { display: none; }
    .quote-draft-panel table, .quote-draft-panel tbody, .quote-draft-panel tr, .quote-draft-panel td { display: block; width: 100%; }
    .quote-draft-panel tr { padding: 12px 0; border-bottom: 1px solid var(--line); }
    .quote-draft-panel td { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 6px 16px; border-bottom: 0; }
    .quote-draft-panel td::before { color: var(--muted); font-size: 12px; font-weight: 700; flex: 0 0 88px; }
    html[lang="ro"] .quote-draft-panel td:nth-child(1)::before { content: 'Produs'; }
    html[lang="ro"] .quote-draft-panel td:nth-child(2)::before { content: 'Cant.'; }
    html[lang="ro"] .quote-draft-panel td:nth-child(3)::before { content: 'Acțiuni'; }
    html[lang="hu"] .quote-draft-panel td:nth-child(1)::before { content: 'Termék'; }
    html[lang="hu"] .quote-draft-panel td:nth-child(2)::before { content: 'Menny.'; }
    html[lang="hu"] .quote-draft-panel td:nth-child(3)::before { content: 'Műveletek'; }
    html[lang="en"] .quote-draft-panel td:nth-child(1)::before { content: 'Product'; }
    html[lang="en"] .quote-draft-panel td:nth-child(2)::before { content: 'Qty'; }
    html[lang="en"] .quote-draft-panel td:nth-child(3)::before { content: 'Actions'; }
    .quote-draft-panel .cart-line-actions { justify-content: flex-end; width: 100%; }
    .checkout-layout { grid-template-columns: 1fr; }
    .checkout-sidebar {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 20;
        border-radius: 16px 16px 0 0;
        box-shadow: 0 -8px 24px rgba(15, 23, 42, 0.12);
        background: #fff;
        padding: 12px 16px;
        border-top: 1px solid var(--line);
    }
    .checkout-page { padding-bottom: 200px; }
    .checkout-sidebar__actions {
        grid-template-columns: 1fr 1fr;
        align-items: center;
    }
    .checkout-sidebar__actions .checkout-cta {
        grid-column: 1 / -1;
        width: 100%;
    }
    html[lang="ro"] .checkout-main .cart-lines td:nth-child(1)::before { content: 'Produs'; }
    html[lang="ro"] .checkout-main .cart-lines td:nth-child(2)::before { content: 'SKU'; }
    html[lang="ro"] .checkout-main .cart-lines td:nth-child(3)::before { content: 'Cant.'; }
    html[lang="ro"] .checkout-main .cart-lines td:nth-child(4)::before { content: 'Brut'; }
    html[lang="hu"] .checkout-main .cart-lines td:nth-child(1)::before { content: 'Termék'; }
    html[lang="hu"] .checkout-main .cart-lines td:nth-child(2)::before { content: 'SKU'; }
    html[lang="hu"] .checkout-main .cart-lines td:nth-child(3)::before { content: 'Menny.'; }
    html[lang="hu"] .checkout-main .cart-lines td:nth-child(4)::before { content: 'Bruttó'; }
    html[lang="en"] .checkout-main .cart-lines td:nth-child(1)::before { content: 'Product'; }
    html[lang="en"] .checkout-main .cart-lines td:nth-child(2)::before { content: 'SKU'; }
    html[lang="en"] .checkout-main .cart-lines td:nth-child(3)::before { content: 'Qty'; }
    html[lang="en"] .checkout-main .cart-lines td:nth-child(4)::before { content: 'Gross'; }
}

/* Product assistant chat */
.shop-chat {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 1200;
    font-size: 14px;
}

.shop-chat__toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: 0;
    border-radius: 999px;
    padding: 12px 16px;
    background: var(--accent);
    color: #fff;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
    box-shadow: var(--shadow-lg);
    transition: background var(--transition), transform var(--transition);
}

.shop-chat__toggle:hover {
    background: var(--accent-hover);
    transform: translateY(-1px);
}

.shop-chat__toggle-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.18);
    font-size: 12px;
    font-weight: 800;
}

.shop-chat__panel {
    position: absolute;
    right: 0;
    bottom: calc(100% + 12px);
    width: min(380px, calc(100vw - 32px));
    max-height: min(70vh, 560px);
    display: flex;
    flex-direction: column;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}

.shop-chat__panel[hidden] {
    display: none !important;
}

.shop-chat__header {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 16px;
    border-bottom: 1px solid var(--line);
    background: #f8fafc;
}

.shop-chat__header strong {
    display: block;
    color: var(--ink);
    font-size: 15px;
}

.shop-chat__header p {
    margin: 4px 0 0;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.4;
}

.shop-chat__close {
    flex-shrink: 0;
    border: 0;
    background: transparent;
    color: var(--muted);
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    padding: 4px 6px;
    margin: -4px -6px -4px 0;
}

.shop-chat__close:hover {
    color: var(--ink);
}

.shop-chat__messages {
    flex: 1;
    overflow-y: auto;
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    background: #fff;
}

.shop-chat__login-gate {
    padding: 16px;
    display: grid;
    gap: 12px;
    text-align: center;
    background: #fff;
}

.shop-chat__login-gate[hidden] {
    display: none !important;
}

.shop-chat__login-gate p {
    margin: 0;
    color: var(--ink-secondary);
    font-size: 0.92rem;
    line-height: 1.45;
}

.shop-chat__login-link {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    min-height: 36px;
    padding: 0 16px;
    border-radius: 999px;
    background: var(--accent);
    color: #fff;
    text-decoration: none;
    font-weight: 600;
}

.shop-chat__login-link:hover {
    filter: brightness(1.05);
}

.shop-chat__quick-prompts {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 10px 12px 0;
    border-bottom: 1px solid var(--line);
    background: #fff;
}

.shop-chat__quick-prompts[hidden] {
    display: none !important;
}

.shop-chat__quick-btn {
    border: 1px solid var(--line-strong);
    border-radius: 999px;
    padding: 6px 10px;
    background: #fff;
    color: var(--ink-secondary);
    font: inherit;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: border-color var(--transition), color var(--transition), background var(--transition);
}

.shop-chat__quick-btn:hover:not(:disabled) {
    border-color: var(--accent);
    color: var(--accent);
    background: rgba(26, 54, 93, 0.04);
}

.shop-chat__quick-btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.shop-chat__message {
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-width: 92%;
}

.shop-chat__message--user {
    align-self: flex-end;
}

.shop-chat__message--assistant {
    align-self: flex-start;
}

.shop-chat__bubble {
    padding: 10px 12px;
    border-radius: 12px;
    line-height: 1.45;
    white-space: pre-wrap;
    word-break: break-word;
}

.shop-chat__message--user .shop-chat__bubble {
    background: var(--accent);
    color: #fff;
    border-bottom-right-radius: 4px;
}

.shop-chat__message--assistant .shop-chat__bubble {
    background: #f1f5f9;
    color: var(--ink-secondary);
    border-bottom-left-radius: 4px;
}

.shop-chat__product-cards {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 8px;
    width: 100%;
}

.shop-chat__product-card {
    display: grid;
    grid-template-columns: 56px 1fr;
    gap: 10px;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: #fff;
}

.shop-chat__product-card-media {
    width: 56px;
    height: 56px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    background: #f8fafc;
    border: 1px solid var(--line);
    display: flex;
    align-items: center;
    justify-content: center;
}

.shop-chat__product-card-media img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.shop-chat__product-card-noimg {
    font-size: 10px;
    color: var(--muted);
    text-align: center;
    padding: 4px;
    line-height: 1.2;
}

.shop-chat__product-card-body {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.shop-chat__product-card-name {
    display: block;
    font-size: 13px;
    line-height: 1.3;
    color: var(--ink);
}

.shop-chat__product-card-sku {
    font-size: 11px;
    line-height: 1.2;
}

.shop-chat__product-card-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    font-size: 11px;
}

.shop-chat__product-card-price {
    font-weight: 700;
    color: var(--ink);
}

.shop-chat__product-card-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 2px;
}

.shop-chat__product-card-view {
    color: var(--accent);
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
}

.shop-chat__product-card-view:hover {
    text-decoration: underline;
}

.shop-chat__product-card-add {
    border: 0;
    border-radius: var(--radius-sm);
    padding: 5px 10px;
    background: var(--accent);
    color: #fff;
    font: inherit;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
}

.shop-chat__product-card-add:hover:not(:disabled) {
    background: var(--accent-hover);
}

.shop-chat__product-card-add:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.shop-chat__links {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.shop-chat__links a {
    color: var(--accent);
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
}

.shop-chat__links a:hover {
    text-decoration: underline;
}

.shop-chat__feedback {
    display: flex;
    gap: 6px;
    margin-top: 2px;
}

.shop-chat__feedback-btn {
    border: 1px solid var(--line);
    background: #fff;
    border-radius: 999px;
    width: 30px;
    height: 30px;
    cursor: pointer;
    font-size: 14px;
    line-height: 1;
    padding: 0;
}

.shop-chat__feedback-btn:hover:not(:disabled) {
    border-color: var(--accent);
    background: #f8fafc;
}

.shop-chat__feedback-btn--active {
    border-color: var(--accent);
    background: rgba(26, 54, 93, 0.08);
}

.shop-chat__feedback-btn:disabled {
    opacity: 0.65;
    cursor: default;
}

.shop-chat__form {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 8px;
    padding: 12px;
    border-top: 1px solid var(--line);
    background: #f8fafc;
}

.shop-chat__input-wrap {
    display: block;
}

.shop-chat__form textarea {
    width: 100%;
    resize: vertical;
    min-height: 44px;
    max-height: 120px;
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-sm);
    padding: 10px 12px;
    font: inherit;
    color: var(--ink);
    background: #fff;
}

.shop-chat__form textarea:focus {
    outline: 2px solid rgba(26, 54, 93, 0.2);
    border-color: var(--accent);
}

.shop-chat__send {
    align-self: end;
    border: 0;
    border-radius: var(--radius-sm);
    padding: 10px 14px;
    background: var(--yellow);
    color: var(--ink);
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}

.shop-chat__send:disabled,
.shop-chat__form textarea:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

@media (max-width: 640px) {
    .shop-chat {
        right: 12px;
        bottom: 12px;
    }

    .shop-chat__toggle-label {
        display: none;
    }

    .shop-chat__toggle {
        width: 52px;
        height: 52px;
        justify-content: center;
        padding: 0;
        border-radius: 50%;
    }
}
