:root {
    --brand-primary: #3F7F5B;
    --brand-secondary: #7FB69A;
    --brand-accent: #F2B705;
    --text-main: #2E2E2E;
    --text-muted: #6F6F6F;
    --bg-main: #F6F7F6;
    --border: #E2E5E2;
    --layout-max-width: 1000px;
    --layout-side-gap: 15px;
}

.header-content,
.search-row,
.filters,
.table-container {
    box-sizing: border-box;
    width: calc(100% - (var(--layout-side-gap) * 2));
    max-width: var(--layout-max-width);
    margin-left: auto;
    margin-right: auto;
}

body {
    font-family: Inter, "Segoe UI", sans-serif;
    margin: 0;
    background: var(--bg-main);
    color: var(--text-main);
}

/* ШАПКА */
header {
    background: white;
    padding: 8px 0;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    position: sticky;
    top: 0;
    z-index: 2000 !important;
    transition: padding 0.22s ease, box-shadow 0.22s ease;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    flex-wrap: nowrap;
}

.logo-section {
    display: flex;
    flex-direction: column;
    gap: 3px;
    transition: gap 0.22s ease;
}

.logo-block {
    display: flex;
    align-items: center;
    gap: 8px;
}

.logo-img {
    width: 36px;
    height: 36px;
    object-fit: contain;
    transform: scale(1.35);
    transform-origin: center;
    transition: width 0.22s ease, height 0.22s ease;
}

.logo {
    display: inline-flex;
    align-items: center;
    font-size: 20px;
    font-weight: 900;
    color: var(--brand-primary);
    text-transform: uppercase;
    white-space: nowrap;
    transition: font-size 0.22s ease, line-height 0.22s ease;
}

#stockUpdatedLabel {
    display: inline-block;
    margin-left: 4px;
    white-space: nowrap;
    font-size: 0.7em;
}

.contacts {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
    overflow: hidden;
    max-height: 56px;
    opacity: 1;
    transition: max-height 0.22s ease, opacity 0.18s ease;
}

.contacts a {
    text-decoration: none;
    color: var(--text-main);
    font-weight: 600;
    font-size: 14px;
    line-height: 1.1;
}

.contacts a.phone {
    color: var(--brand-primary);
    font-weight: 800;
    font-size: 16px;
}

.contacts a.tg {
    color: var(--brand-secondary);
}

.contacts a.email {
    color: var(--text-muted);
    font-size: 13px;
}

.info-text {
    font-size: 11px;
    color: var(--text-muted);
    max-width: 500px;
    line-height: 1.3;
    overflow: hidden;
    max-height: 36px;
    opacity: 1;
    transition: max-height 0.22s ease, opacity 0.18s ease;
}

/* ПОИСК */
.search-row {
    margin: 15px auto 0;
    padding: 0;
    display: flex;
    align-items: stretch;
    gap: 10px;
    overflow: visible;
    max-height: 90px;
    opacity: 1;
    transform: translateY(0);
    transition: max-height 0.22s ease, opacity 0.18s ease, transform 0.22s ease, margin 0.22s ease;
}

.search-tools,
.search-tools-group {
    display: flex;
    align-items: stretch;
    gap: 10px;
}

.header-tools {
    display: none;
    align-items: stretch;
    margin-left: auto;
    overflow: visible;
    max-width: 0;
    opacity: 0;
    pointer-events: none;
    transition: max-width 0.22s ease, opacity 0.18s ease;
}

.search-box {
    flex: 1 1 auto;
    min-width: 0;
}

#searchInput {
    width: 100%;
    height: 42px;
    box-sizing: border-box;
    padding: 0 12px;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 15px;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.1);
}

.client-card {
    width: 210px;
    flex: 0 0 210px;
    position: relative;
}

.client-card-summary {
    list-style: none;
    height: 100%;
    height: 42px;
    box-sizing: border-box;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: var(--brand-primary);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 0 12px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    user-select: none;
}

.client-card-summary::-webkit-details-marker {
    display: none;
}

.client-card-brief {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 1px;
    min-width: 0;
}

.client-card-company-short {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.05;
}

.client-card-access-short {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 10px;
    font-weight: 600;
    line-height: 1.05;
    opacity: 0.92;
}

.client-card-arrow {
    width: 8px;
    height: 8px;
    border-right: 2px solid rgba(255, 255, 255, 0.9);
    border-bottom: 2px solid rgba(255, 255, 255, 0.9);
    transform: rotate(45deg);
    transition: transform 0.15s ease;
    flex: 0 0 auto;
    margin-top: -2px;
}

.client-card[open] .client-card-arrow {
    transform: rotate(-135deg);
    margin-top: 2px;
}

.client-card-body {
    position: absolute;
    right: 0;
    top: calc(100% + 6px);
    z-index: 1500;
    width: 100%;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 6px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.1);
    padding: 7px 9px;
    box-sizing: border-box;
}

.client-card-row {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    font-size: 10px;
    line-height: 1.3;
}

.client-card-logout-form {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid #eef2ef;
    display: flex;
    justify-content: flex-end;
}

.client-card-logout-link {
    border: 0;
    background: transparent;
    color: var(--brand-primary);
    font-size: 11px;
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 2px;
    cursor: pointer;
    padding: 0;
    line-height: 1.2;
}

.client-card-logout-link:hover {
    color: var(--brand-primary-dark);
}

.client-actions {
    display: flex;
    flex-wrap: nowrap;
    align-items: stretch;
    gap: 6px;
    flex: 1;
    min-width: 0;
}

.client-action-btn {
    border: 1px solid var(--border);
    background: #fff;
    color: var(--text-main);
    border-radius: 6px;
    height: 42px;
    box-sizing: border-box;
    font-size: 10px;
    font-weight: 600;
    line-height: 1.1;
    text-align: center;
    padding: 4px 12px;
    cursor: pointer;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 4px;
    position: relative;
    overflow: visible;
        white-space: nowrap;
    transition: all 0.15s ease-in-out;
    flex: 1;
    min-width: 0;
}

.client-action-btn:hover {
    border-color: var(--brand-primary);
    color: var(--brand-primary);
}

.client-action-btn.has-items {
    border-color: var(--brand-primary);
    box-shadow: 0 0 0 2px rgba(63, 127, 91, 0.15);
}

.client-action-btn.has-items::after {
    content: attr(data-quote-count);
    position: absolute;
    top: -7px;
    right: -7px;
    min-width: 20px;
    height: 20px;
    border-radius: 999px;
    background: var(--brand-accent);
    color: #fff;
    font-size: 11px;
    line-height: 20px;
    text-align: center;
    font-weight: 800;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
    padding: 0 5px;
    box-sizing: border-box;
}

.client-action-btn.just-updated {
    animation: invoice-btn-pulse 0.9s cubic-bezier(0.2, 0.8, 0.2, 1);
}

@keyframes invoice-btn-pulse {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(63, 127, 91, 0.25);
    }
    50% {
        transform: scale(1.11);
        box-shadow: 0 0 0 10px rgba(63, 127, 91, 0.05);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(63, 127, 91, 0);
    }
}

.client-action-btn.quote-drop-hit {
    animation: quote-drop-hit 0.6s ease;
}

@keyframes quote-drop-hit {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(48, 140, 88, 0.35);
    }
    50% {
        transform: scale(1.08);
        box-shadow: 0 0 0 12px rgba(48, 140, 88, 0.08);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(48, 140, 88, 0);
    }
}

.quote-fly-token {
    position: fixed;
    z-index: 3500;
    pointer-events: none;
    transform: translate(-50%, -50%);
    animation: quote-fly 0.8s cubic-bezier(0.18, 0.7, 0.22, 1) forwards;
    font-size: 14px;
    font-weight: 700;
    color: #fff;
    background: linear-gradient(135deg, #3f7f5b, #2f6a4b);
    border-radius: 999px;
    padding: 6px 10px;
    border: 1px solid rgba(255, 255, 255, 0.4);
    box-shadow: 0 10px 24px rgba(38, 89, 63, 0.35);
    white-space: nowrap;
}

@keyframes quote-fly {
    0% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(0.95);
    }
    55% {
        opacity: 1;
    }
    100% {
        opacity: 0;
        transform: translate(calc(-50% + var(--fly-x)), calc(-50% + var(--fly-y))) scale(0.72);
    }
}

.client-action-icon {
    font-size: 18px;
    line-height: 1;
    display: inline-block;
    flex: 0 0 auto;
}

.client-action-text {
    display: inline;
    white-space: normal;
}

.verification-modal {
    position: fixed;
    inset: 0;
    background: rgba(20, 28, 34, 0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    padding: 20px;
    box-sizing: border-box;
}

#stockDetailsModal {
    z-index: 2600;
}

#colorChoiceModal {
    z-index: 2800;
}

#stockNoticeModal {
    z-index: 3200;
}

.verification-modal[hidden] {
    display: none;
}

.verification-modal-dialog {
    width: min(640px, 100%);
    background: #fff;
    border-radius: 12px;
    border: 1px solid var(--border);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.22);
    padding: 20px 22px;
    position: relative;
}

.stock-check-dialog {
    width: min(860px, 100%);
}

.header-stock-form-table {
    width: 100%;
    border-collapse: collapse;
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: visible;
    margin: 10px 0 12px;
}

.header-stock-form-table th,
.header-stock-form-table td {
    border: 1px solid var(--border);
    padding: 8px 10px;
    font-size: 13px;
    color: var(--text-main);
    background: #fff;
    text-align: left;
    position: relative;
    overflow: visible;
    box-shadow: none;
}

.header-stock-form-table th {
    width: 170px;
    background: #f6f7f6;
    font-weight: 700;
}

.header-stock-input {
    width: 100%;
    max-width: 320px;
    box-sizing: border-box;
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 8px 10px;
    font-size: 13px;
    color: var(--text-main);
    background: #fff;
}

.header-stock-input-wrap {
    position: relative;
    width: 100%;
    max-width: 320px;
}

.header-stock-suggestions {
    position: absolute;
    left: 0;
    top: calc(100% + 2px);
    width: 100%;
    max-height: 220px;
    overflow-y: auto;
    overflow-x: hidden;
    background: #fff;
    border: 1px solid var(--border);
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.14);
    z-index: 3200;
}

.header-stock-suggestions[hidden] {
    display: none;
}

.header-stock-suggestion-option {
    width: 100%;
    border: none;
    border-bottom: 1px solid #f0f0f0;
    background: #fff;
    color: var(--text-main);
    font-size: 13px;
    text-align: left;
    padding: 7px 10px;
    cursor: pointer;
}

.header-stock-suggestion-option:hover {
    background: #f3faf6;
}

.header-stock-input:focus {
    outline: none;
    border-color: var(--brand-primary);
    box-shadow: 0 0 0 2px rgba(63, 127, 91, 0.15);
}

.header-stock-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
}

.header-stock-find-btn {
    margin-top: 8px;
}

.header-stock-status {
    margin-top: 10px;
    min-height: 20px;
}

.header-stock-switch-row {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
    margin-bottom: 8px;
}

.header-stock-title-row {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 8px;
}

.header-stock-title-row .verification-modal-title {
    margin: 0;
}

.header-stock-found-label {
    margin: 0;
    font-weight: 700;
}

.header-stock-result-table td {
    font-weight: 700;
    text-transform: lowercase;
}

.header-stock-result-ok {
    background: #e8f5e9;
    color: #1b5e20;
}

.header-stock-result-low {
    background: #ffebee;
    color: #b71c1c;
}

.verification-modal-close {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 28px;
    height: 28px;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: #fff;
    color: var(--text-muted);
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
}

.verification-modal-title {
    margin: 0 30px 12px 0;
    font-size: 22px;
    line-height: 1.25;
    color: var(--text-main);
}

.verification-modal-text {
    margin: 0 0 8px;
    color: var(--text-main);
    line-height: 1.45;
}

.verification-modal-list {
    margin: 0 0 14px 18px;
    padding: 0;
    color: var(--text-main);
    line-height: 1.45;
}

.verification-modal-list li + li {
    margin-top: 4px;
}

.verification-modal-list-numbered {
    margin-left: 22px;
}

.verification-modal-link {
    color: var(--brand-primary);
    font-weight: 600;
    text-decoration: none;
}

.verification-modal-link:hover {
    text-decoration: underline;
}

.color-choice-grid {
    display: grid;
    gap: 10px;
}

.color-choice-row {
    display: grid;
    grid-template-columns: 1fr 220px;
    gap: 10px;
    align-items: center;
}

.color-choice-label {
    font-size: 13px;
    color: var(--text-main);
    font-weight: 600;
}

.color-choice-select {
    width: 100%;
    box-sizing: border-box;
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 8px 10px;
    font-size: 13px;
    color: var(--text-main);
    background: #fff;
}

.color-choice-select:focus {
    outline: none;
    border-color: var(--brand-primary);
    box-shadow: 0 0 0 2px rgba(63, 127, 91, 0.15);
}

.color-choice-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
    margin-top: 12px;
}

body.verification-modal-open {
    overflow: hidden;
}

body.header-compact header {
    padding: 6px 0;
}

body.header-compact .header-content {
    gap: 10px;
}

body.header-compact .info-text,
body.header-compact .contacts {
    max-height: 0;
    opacity: 0;
    pointer-events: none;
}

body.header-compact .header-tools {
    display: flex;
    max-width: 760px;
    opacity: 1;
    pointer-events: auto;
}

body.header-compact .info-text {
    max-height: 0;
    opacity: 0;
}

body.header-compact .search-row {
    max-height: 0;
    opacity: 0;
    transform: translateY(-8px);
    margin: 0 auto;
    overflow: hidden;
    pointer-events: none;
}

body.header-compact .logo-img {
    width: 28px;
    height: 28px;
}

body.header-compact .logo {
    font-size: 15px;
    line-height: 1.1;
}

body.header-compact .search-tools-group {
    gap: 8px;
}

body.header-compact .client-actions {
    width: 246px;
    flex: 0 0 246px;
    gap: 5px;
}

body.header-compact .client-action-btn {
    height: 34px;
    font-size: 9px;
    padding: 4px 3px;
    gap: 4px;
}

body.header-compact .client-action-icon {
    font-size: 14px;
}

body.header-compact .client-card {
    width: 190px;
    flex: 0 0 190px;
}

body.header-compact .client-card-summary {
    height: 34px;
}

.client-card-row + .client-card-row {
    margin-top: 6px;
}

.client-card-key {
    color: var(--text-muted);
    flex: 0 0 auto;
}

.client-card-value {
    color: var(--text-main);
    font-weight: 600;
    text-align: right;
}

.price-header {
    text-align: right;
}

.price-header.sortable {
    cursor: pointer;
    user-select: none;
    white-space: nowrap;
}

.price-header.sortable::before /* disabled */ {
    content: '⇅  ';
    opacity: 0.3;
    font-size: 12px;
}

.price-header.sortable:hover {
    opacity: 0.8;
}

.price-header.sortable.sort-asc::before /* disabled */ {
    content: '↑  ';
    opacity: 1;
    color: #0066cc;
}

.price-header.sortable.sort-desc::before /* disabled */ {
    content: '↓  ';
    opacity: 1;
    color: #0066cc;
}

/* ФИЛЬТРЫ */
.filters {
    margin: 10px auto 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    align-items: end;
    gap: 8px;
    overflow: visible;
}

.filter-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1 1 140px;
    min-width: 120px;
}

.filter-item.filter-item-reset {
    align-self: end;
    min-width: 120px;
    margin-left: auto;
    flex: 0 0 auto;
}

.filter-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-main);
    line-height: 1.15;
}

.multi-select {
    position: relative;
}

/* Поднимаем выпадающее меню над sticky-шапкой */
/* ── Анимация открытия/закрытия мультиселекта ── */
.filters details[open] .multi-select-menu {
    z-index: 1100;
    max-height: 220px;
    opacity: 1;
    padding: 6px 0;
}

.filters details:not([open]) .multi-select-menu {
    max-height: 0;
    opacity: 0;
    padding: 0 0;
    overflow: hidden;
}

.multi-select-summary {
    list-style: none;
    height: 40px;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: #fff;
    color: var(--text-main);
    font-size: 12px;
    padding: 0 34px 0 10px;
    display: flex;
    align-items: center;
    cursor: pointer;
    user-select: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.multi-select-summary::-webkit-details-marker {
    display: none;
}

.multi-select-summary::after {
    content: "";
    position: absolute;
    right: 12px;
    top: 50%;
    width: 8px;
    height: 8px;
    border-right: 2px solid #666;
    border-bottom: 2px solid #666;
    transform: translateY(-65%) rotate(45deg);
    pointer-events: none;
    transition: transform 0.15s ease;
}

.multi-select[open] .multi-select-summary {
    border-color: var(--brand-primary);
}

.multi-select[open] .multi-select-summary::after {
    transform: translateY(-30%) rotate(-135deg);
}

.multi-select-menu {
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% + 4px);
    z-index: 1100;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 6px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
    overflow-y: auto;
    transition: max-height 0.25s ease, opacity 0.2s ease, padding 0.2s ease;
}

.multi-option {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    font-size: 12px;
    color: var(--text-main);
    cursor: pointer;
}

.multi-option:hover {
    background: #f7f8f7;
}

.btn-reset {
    background: #fff;
    border: 1px solid var(--border);
    color: var(--text-main);
    padding: 10px 12px;
    border-radius: 6px;
    font-size: 12px;
    cursor: pointer;
    white-space: nowrap;
    height: 40px;
    width: 100%;
}

.btn-reset:hover {
    border-color: var(--brand-primary);
    color: var(--brand-primary);
}

/* ТАБЛИЦА */
.table-container {
    margin: 15px auto;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    /* ВАЖНО: не ставим overflow на контейнер таблицы,
       иначе sticky-заголовки таблицы работают нестабильно в браузерах */
}

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 600px;
}

#priceTable thead th {
    /* ════════════════════════════════════════════
       Sticky-шапка таблицы - ЖЁСТКИЙ ФИКС:
       1. !important везде - чтобы перебить любые другие стили
       2. z-index: 1000 - выше картинок (.thumb:hover z-index:200)
       3. top: 85px - точная высота хедера
       4. background-color - абсолютно непрозрачный
       ════════════════════════════════════════════ */
    background-color: var(--table-header-bg-current) !important;
    color: var(--table-header-text);
    text-align: left;
    padding: 10px 12px;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    text-align: center;
    letter-spacing: 0.3px;
    position: sticky !important;
    top: var(--header-height, 85px) !important;
    z-index: 1000 !important;
    border: none;
    white-space: nowrap;
}



td {
    padding: 10px;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
    font-size: 14px;
    text-align: center;
}

tr:hover {
    background-color: #f9f9f9;
}

/* ЭЛЕМЕНТЫ */
.thumb {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    border-radius: 4px;
    cursor: zoom-in;
    transition: transform 0.2s;
    background: #fff;
    border: none;
}

.col-photo {
    width: 60px;
    padding: 0;
}

.thumb:hover {
    cursor: pointer;
}

@media (hover: none) {
    .thumb {
        cursor: default;
    }

        .thumb:hover {
        cursor: pointer;
    }
}

.col-name {
    font-weight: 600;
    color: var(--brand-primary);
}

.badge {
    background: var(--brand-accent);
    color: white;
    font-size: 10px;
    padding: 2px 4px;
    border-radius: 3px;
    margin-left: 5px;
    vertical-align: middle;
}

.col-specs {
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.4;
}

.col-features,
.col-packaging {
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.4;
}

.col-packaging {
    white-space: nowrap;
}

.col-art {
    font-weight: 600;
    color: var(--text-main);
    white-space: nowrap;
}

.certificate-link {
    display: block;
    font-size: 11px;
    font-weight: 400;
    color: var(--brand-secondary);
    text-decoration: none;
    margin-top: 4px;
    transition: color 0.2s;
}

.certificate-link:hover {
    color: var(--brand-primary);
    text-decoration: underline;
}

.certificate-link-under-name {
    margin-top: 6px;
    font-size: 12px;
}

.stock-line {
    display: block;
    margin-top: 4px;
    font-size: 11px;
    color: var(--text-muted);
}

.stock-details-row {
    margin-top: 8px;
}

.stock-details-btn {
    border: 1px solid var(--border);
    background: #fff;
    color: var(--brand-primary);
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    line-height: 1.1;
    padding: 3px 7px;
    cursor: pointer;
}

.stock-details-btn-large {
    font-size: 13px;
    font-weight: 700;
    padding: 6px 12px;
    border-radius: 8px;
}

.stock-details-btn:hover {
    border-color: var(--brand-primary);
    background: #f3faf6;
}

.stock-details-value {
    font-weight: 600;
}

.stock-details-table-wrap {
    overflow-x: auto;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #fff;
}

.stock-details-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 480px;
}

.stock-details-table th,
.stock-details-table td {
    border: 1px solid var(--border);
    padding: 6px 8px;
    text-align: center;
    font-size: 12px;
    white-space: nowrap;
    color: var(--text-main);
}

.stock-details-table thead th {
    background: #f6f7f6;
    font-weight: 700;
}

.stock-details-table tbody th {
    background: #fafbfa;
    font-weight: 700;
}

.stock-check-col-header,
.stock-check-col-cell {
    background: #f4f7f4;
    font-weight: 700;
    min-width: 92px;
}

.stock-check-col-header {
    white-space: normal;
    line-height: 1.15;
    position: sticky;
    right: 0;
    z-index: 2;
    box-shadow: -1px 0 0 var(--border);
}

.stock-check-col-cell {
    position: sticky;
    right: 0;
    z-index: 1;
    box-shadow: -1px 0 0 var(--border);
}

.stock-request-input {
    width: 72px;
    box-sizing: border-box;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: #fff;
    color: var(--text-main);
    font-size: 12px;
    font-weight: 600;
    line-height: 1.2;
    padding: 5px 6px;
    text-align: center;
}

.stock-request-input:focus {
    outline: none;
    border-color: var(--brand-primary);
    box-shadow: 0 0 0 2px rgba(63, 127, 91, 0.15);
}

.stock-details-cell.stock-details-available {
    background: #e8f5e9;
}

.stock-actions-spacer {
    border: none;
    background: transparent;
}

.stock-actions-cell {
    vertical-align: top;
    background: #f9fbf9;
}

.stock-actions-panel {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 6px;
    align-items: center;
    justify-content: flex-end;
}

.stock-actions-panel-standalone {
    margin-top: 10px;
    width: 100%;
    justify-content: flex-end;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    padding: 1px 0 3px;
}

.stock-action-btn {
    border: 1px solid var(--border);
    background: #fff;
    color: var(--text-main);
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    line-height: 1.2;
    padding: 6px 8px;
    cursor: pointer;
}

.stock-action-btn:hover {
    border-color: var(--brand-primary);
    color: var(--brand-primary);
    background: #f3faf6;
}

.stock-action-btn.stock-action-btn-primary {
    background: var(--brand-primary);
    color: #fff;
    border-color: var(--brand-primary);
}

.stock-action-btn.stock-action-btn-primary:hover {
    background: #356a4b;
    color: #fff;
    border-color: #356a4b;
}

.logistics-result-wrap {
    margin-top: 10px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #fff;
    padding: 10px;
}

.logistics-result-title {
    margin: 0 0 8px;
    font-size: 15px;
    color: var(--text-main);
}

.logistics-result-package {
    margin-bottom: 8px;
    font-weight: 600;
}

.logistics-result-totals {
    margin-top: 8px;
    font-weight: 700;
}

.logistics-result-warning {
    margin-top: 6px;
    color: #8a6d1d;
}

.logistics-result-warning-emphasis {
    margin: 0 0 8px;
    display: inline-block;
    padding: 2px 8px;
    border-radius: 6px;
    background: #fff4d6;
    border: 1px solid #f0deb0;
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.logistics-result-error {
    color: #b71c1c;
}

.quote-draft-table-wrap {
    margin-top: 10px;
    overflow: visible;
    position: relative;
    z-index: 3000;
}

.quote-draft-dialog {
    border-radius: 4px;
    padding: 14px 16px;
}

.quote-draft-table {
    width: 100%;
    min-width: 0;
    table-layout: fixed;
}

.quote-draft-table th,
.quote-draft-table td {
    border-radius: 0;
    padding: 5px 6px;
    vertical-align: middle;
}

.quote-draft-table thead th {
    background: #f4f6f4;
}

.quote-draft-input {
    width: 100%;
    box-sizing: border-box;
    border: 1px solid var(--border);
    border-radius: 0;
    background: #fff;
    color: var(--text-main);
    font-size: 12px;
    font-weight: 600;
    line-height: 1.2;
    padding: 5px 6px;
}

.quote-draft-input:focus {
    outline: none;
    border-color: var(--brand-primary);
    box-shadow: 0 0 0 2px rgba(63, 127, 91, 0.15);
}

.quote-draft-input-qty {
    width: 100%;
    min-width: 0;
    max-width: none;
    padding-left: 2px;
    padding-right: 2px;
    text-align: center;
    -moz-appearance: textfield;
    appearance: textfield;
}

.quote-draft-input-qty::-webkit-outer-spin-button,
.quote-draft-input-qty::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.quote-draft-readonly-cell {
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
    max-width: 320px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.quote-draft-name-cell {
    white-space: normal !important;
    overflow-wrap: break-word;
    word-break: break-word;
    line-height: 1.25;
    max-width: none;
    max-height: none;
    overflow: hidden;
    text-overflow: initial;
}

.quote-draft-table td:nth-child(2) {
    white-space: normal !important;
    overflow-wrap: break-word;
    word-break: break-word;
}

.quote-draft-remove-btn {
    white-space: nowrap;
}

.quote-sku-control {
    display: flex;
    gap: 6px;
    align-items: center;
    min-width: 0;
}

.quote-size-control {
    display: flex;
    gap: 6px;
    align-items: center;
    min-width: 0;
}

.quote-size-control .quote-draft-input {
    min-width: 0;
}

.quote-draft-color-select {
    min-width: 0;
}

.quote-sku-input-wrap {
    position: relative;
    z-index: 40;
    width: 92px;
    max-width: 100%;
}

.quote-sku-input-wrap:focus-within {
    z-index: 80;
}

.quote-draft-input-sku {
    width: 100%;
    max-width: none;
}

.quote-draft-table th:nth-child(1),
.quote-draft-table td:nth-child(1) {
    width: 2%;
}

.quote-draft-table th:nth-child(2),
.quote-draft-table td:nth-child(2) {
    width: 21.87%;
}

.quote-draft-table th:nth-child(3),
.quote-draft-table td:nth-child(3) {
    width: 10.1%;
}

.quote-draft-table th:nth-child(4),
.quote-draft-table td:nth-child(4) {
    width: 12.15%;
}

.quote-draft-table th:nth-child(5),
.quote-draft-table td:nth-child(5) {
    width: 10.53%;
}

.quote-draft-table th:nth-child(6),
.quote-draft-table td:nth-child(6) {
    width: 7.29%;
}

.quote-draft-table th:nth-child(7),
.quote-draft-table td:nth-child(7),
.quote-draft-table th:nth-child(8),
.quote-draft-table td:nth-child(8) {
    width: 10%;
}

.quote-draft-table th:nth-child(9),
.quote-draft-table td:nth-child(9) {
    width: 5%;
}

.quote-sku-suggestions {
    position: absolute;
    left: 0;
    top: calc(100% + 2px);
    z-index: 2200;
    min-width: 0;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    max-height: 180px;
    overflow-y: auto;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid var(--border);
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.12);
}

.quote-sku-suggestions[hidden] {
    display: none;
}

.quote-sku-option {
    width: 100%;
    border: none;
    border-bottom: 1px solid #f0f0f0;
    background: #fff;
    color: var(--text-main);
    font-size: 12px;
    text-align: left;
    padding: 6px 8px;
    cursor: pointer;
    white-space: nowrap;
}

.quote-sku-option:hover {
    background: #f3faf6;
}

.quote-draft-details-btn {
    width: 32px;
    min-width: 32px;
    padding: 5px 0;
    text-align: center;
    font-size: 13px;
}

.quote-draft-add-row-cell {
    text-align: left;
    background: #fafbfa;
}

.quote-draft-add-btn {
    border-style: dashed;
}

.quote-empty-add-wrap {
    display: flex;
    justify-content: center;
    margin-top: 8px;
}

.quote-draft-remove-btn {
    color: #b71c1c;
    border-color: #e8b3b3;
    font-size: 18px;
    line-height: 1;
    width: 36px;
    min-width: 36px;
    padding: 4px 0;
    font-weight: 800;
}

.quote-draft-remove-btn:hover {
    color: #fff;
    background: #c62828;
    border-color: #c62828;
}

.quote-draft-table tr.quote-row-available td {
    background: #e8f5e9;
}

.quote-draft-table tr.quote-row-unavailable td {
    background: #ffebee;
}

.quote-draft-index-cell {
    width: 34px;
    min-width: 34px;
    text-align: center;
    font-weight: 700;
}

.quote-status-line {
    min-height: 18px;
    font-weight: 600;
}

.quote-availability-inline {
    font-size: 13px;
    font-weight: 700;
    margin-right: 4px;
    min-width: 130px;
    text-align: right;
}

.quote-availability-ok {
    color: #1b5e20;
}

.quote-availability-bad {
    color: #b71c1c;
}

/* Изоляция от глобальных sticky-стилей основной таблицы прайса */
.stock-details-table th,
.stock-details-table thead th,
.stock-details-table tbody th {
    position: static;
    top: auto;
    z-index: auto;
    box-shadow: none;
}

.stock-label {
    font-weight: 400;
    color: var(--text-muted);
}

.col-price {
    text-align: center;
    white-space: nowrap;
    /* важно: оставляем TD table-cell, не flex */
    vertical-align: middle;
}

.price-content {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: center;
    gap: 4px;
}

.price-final {
    display: block;
    font-size: 16px;
    font-weight: 800;
    color: var(--brand-primary);
}

.cz-label {
    font-size: 10px;
    color: var(--brand-secondary);
    display: block;
}

/* Остатки: бейджи статусов */
.stock-badge {
    font-size: 9px;
    font-weight: 800;
    padding: 2px 6px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    border: 1px solid transparent;
    white-space: nowrap;
}

.stock-high {
    background-color: #e6f4ea;
    color: #137333;
    border-color: #137333;
}

.stock-medium {
    background-color: #e8f0fe;
    color: #1967d2;
    border-color: #1967d2;
}

.stock-low {
    background-color: #fef7e0;
    color: #ea8600;
    border-color: #ea8600;
}

.stock-out {
    background-color: #f1f3f4;
    color: #5f6368;
    border-color: #dadce0;
    opacity: 0.8;
}

.stock-unknown {
    background-color: #fff;
    color: var(--text-muted);
    border-color: var(--border);
    opacity: 0.9;
}

.category-row {
    background: var(--category-divider-bg);
    font-weight: bold;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: var(--text-main);
    padding-top: 6px;
    padding-bottom: 6px;
}

.category-row-content {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    width: 100%;
}

.category-name {
    flex: 1;
}

.rotate-hint {
    position: fixed;
    left: 50%;
    bottom: 14px;
    transform: translateX(-50%) translateY(8px);
    z-index: 300;
    display: flex;
    align-items: center;
    gap: 8px;
    max-width: min(92vw, 360px);
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: #fff;
    color: var(--text-main);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.rotate-hint.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.rotate-hint-phone {
    font-size: 20px;
    line-height: 1;
    animation: rotate-hint-phone 1.2s ease-in-out infinite;
}

.rotate-hint-text {
    font-size: 12px;
    font-weight: 600;
    line-height: 1.2;
}

@keyframes rotate-hint-phone {
    0% {
        transform: rotate(0deg);
    }
    35% {
        transform: rotate(-90deg);
    }
    70% {
        transform: rotate(-90deg);
    }
    100% {
        transform: rotate(0deg);
    }
}

@media (max-width: 980px) {
    .filters {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .filter-item.filter-item-reset {
        grid-column: 1 / -1;
    }
}

@media (max-width: 815px) {
    body.header-compact .logo {
        font-size: 13px;
    }

    body.header-compact #stockUpdatedLabel {
        font-size: 0.62em;
    }

    body.header-compact .header-content {
        gap: 8px;
    }

    body.header-compact .search-tools-group {
        gap: 6px;
    }

    body.header-compact .client-actions {
        width: 210px;
        flex: 0 0 210px;
        gap: 4px;
    }

    body.header-compact .client-action-btn {
        height: 32px;
        font-size: 8px;
        padding: 3px 2px;
    }

    body.header-compact .client-card {
        width: 165px;
        flex: 0 0 165px;
    }

    body.header-compact .client-card-summary {
        height: 32px;
        padding: 0 9px;
        font-size: 10px;
    }

    body.header-compact .client-card-company-short {
        font-size: 10px;
    }

    body.header-compact .client-card-access-short {
        font-size: 9px;
    }
}

@media (max-width: 720px) {
    body.header-compact .header-content {
        flex-wrap: wrap;
        align-items: stretch;
    }

    body.header-compact .header-tools {
        width: 100%;
        margin-left: 0;
    }

    body.header-compact .search-tools-group {
        width: 100%;
        gap: 8px;
    }

    body.header-compact .client-actions {
        width: 100%;
        flex: 1 1 auto;
    }

    body.header-compact .client-card {
        width: 190px;
        flex: 0 0 190px;
    }
}

@media (max-width: 760px) {
    .filters {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    th,
    thead th {
        position: static;
        top: auto;
        box-shadow: none;
    }

    .search-row {
        flex-direction: column;
        gap: 8px;
    }

    .search-tools,
    .search-tools-group {
        width: 100%;
    }

    .search-box {
        flex: 1 1 auto;
    }

    .client-card {
        width: 100%;
        flex: 0 0 auto;
    }

    .client-actions {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        width: 100%;
        flex: 0 0 auto;
    }

    .client-card-body {
        position: static;
        margin-top: 6px;
        box-shadow: none;
    }

    .rotate-hint {
        bottom: 10px;
    }

    .header-stock-form-table th,
    .header-stock-form-table td {
        font-size: 12px;
        padding: 7px 8px;
    }

    .header-stock-form-table th {
        width: 120px;
    }

    .header-stock-input {
        max-width: 100%;
        font-size: 12px;
        padding: 7px 8px;
    }

    .header-stock-controls {
        justify-content: flex-start;
    }

    .header-stock-switch-row {
        flex-wrap: wrap;
        justify-content: flex-start;
    }

    .stock-actions-panel-standalone {
        margin-top: 8px;
        gap: 4px;
        justify-content: flex-end;
    }

    .stock-action-btn {
        font-size: 10px;
        padding: 5px 7px;
        border-radius: 5px;
        white-space: nowrap;
        flex: 0 0 auto;
    }

    .quote-draft-table {
        min-width: 640px;
    }

    .color-choice-row {
        grid-template-columns: 1fr;
    }

    .color-choice-actions {
        justify-content: stretch;
    }

    .color-choice-actions .stock-action-btn {
        flex: 1 1 0;
    }
}

@media (max-width: 600px) {
    

    header {
        padding: 6px 0;
    }

    .header-content { 
        flex-direction: column; 
        align-items: flex-start; 
        gap: 8px;
    }

    .logo-section {
        width: 100%;
    }

    .logo {
        font-size: 16px;
        line-height: 1.2;
    }

    .contacts {
        align-items: flex-start;
        gap: 2px;
    }

    .contacts a.phone {
        font-size: 15px;
    }

    .info-text { 
        font-size: 10px;
        max-width: 100%;
    }

    .search-row {
        margin: 10px auto 0;
        padding: 0;
    }

    #searchInput {
        height: 42px;
        padding: 0 11px;
    }

    .client-card-summary {
        min-height: 42px;
        font-size: 13px;
    }

    .client-action-btn {
        min-height: 42px;
        font-size: 11px;
    }

    .col-specs,
    .col-specs-header {
        display: none;
    }

    .filters {
        grid-template-columns: 1fr;
        gap: 8px;
        margin: 8px auto 0;
        padding: 0;
    }

    .multi-select-summary,
    .btn-reset {
        height: 42px;
        font-size: 13px;
    }

    .multi-select-menu {
        max-height: min(42vh, 220px);
    }

    .multi-option {
        padding: 8px 10px;
        font-size: 13px;
    }

    .filter-item.filter-item-reset {
        grid-column: auto;
    }

    .btn-reset {
        width: 100%;
    }

    .table-container {
        margin: 10px auto 12px;
        border-radius: 6px;
    }

    table {
        min-width: 520px;
    }

    th {
        padding: 10px 8px;
        font-size: 12px;
    }

    td {
        padding: 8px;
        font-size: 12px;
    }

    .col-features,
    .col-packaging,
    .stock-line {
        font-size: 11px;
    }

    .price-final {
        font-size: 15px;
    }

    .category-row {
        font-size: 10px;
        letter-spacing: 0.4px;
        padding-top: 5px;
        padding-bottom: 5px;
    }

    .stock-check-dialog {
        width: min(100%, 100%);
    }

    .header-stock-form-table th,
    .header-stock-form-table td {
        display: block;
        width: 100%;
        box-sizing: border-box;
    }

    .header-stock-form-table th {
        border-bottom: none;
    }

    .header-stock-form-table td {
        border-top: none;
    }

    .stock-actions-panel-standalone {
        gap: 3px;
    }

    .stock-action-btn {
        font-size: 9px;
        padding: 4px 6px;
    }
}


/* ── Зебра-эффект для таблицы ── */
#priceTable tbody tr:not(.category-row):nth-child(even) {
    background-color: #fafcfa;
}

/* ── Скрытие строк через JS (фильтры/поиск) ── */
.is-hidden {
    display: none !important;
}

/* ==========================================
   Категорийные разделители (СЛАНЦЫ, САПОГИ)
   ========================================== */
tr.category-row td {
    background: var(--category-divider-bg-cell) !important;
    padding: 10px 16px !important;
    text-align: left !important;
}
tr.category-row:hover td {
    background: var(--category-divider-bg-hover) !important;
}
.category-divider {
    font-size: var(--category-divider-font-size);
    font-weight: 800;
    letter-spacing: 2px;
    color: var(--category-divider-text);
    text-transform: uppercase;
    text-align: left;
}

/* ==========================================
   Stock-badge под артикулом
   ========================================== */
.stock-status-line {
    font-size: 11px;
    color: #666;
    margin-top: 4px;
    line-height: 1.3;
}
.stock-badge {
    display: inline-block;
    padding: 1px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
}
.stock-badge.stock-high { background: #d4edda; color: #155724; }
.stock-badge.stock-medium { background: #fff3cd; color: #856404; }
.stock-badge.stock-low { background: #f8d7da; color: #721c24; }
.stock-badge.stock-out { background: #e2e3e5; color: #6c757d; }

/* ==========================================
   Модальное окно калькулятора
   ========================================== */
.lumber-modal {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 20000;
}
.lumber-modal-dialog {
    background: #fff;
    border-radius: 14px;
    padding: 28px 32px;
    max-width: 480px;
    width: 92%;
    box-shadow: 0 12px 40px rgba(0,0,0,0.18);
}
.lumber-modal-dialog h3 { margin: 0 0 6px; font-size: 20px; font-weight: 800; color: #1a2e22; }
.lumber-modal-dialog .modal-subtitle { margin: 0 0 20px; font-size: 13px; color: #6b7a70; }
.lumber-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 20px; margin-bottom: 20px; }
.lumber-field label { display: block; font-size: 12px; font-weight: 600; color: #3f4a40; margin-bottom: 4px; }
.lumber-field input {
    width: 100%;
    padding: 8px 12px;
    font-size: 16px;
    border: 1px solid #d0d9d2;
    border-radius: 8px;
    background: #fafcfa;
    outline: none;
    box-sizing: border-box;
    transition: border-color 0.15s;
}
.lumber-field input:focus { border-color: #3f7f5b; box-shadow: 0 0 0 3px rgba(63,127,91,0.12); }
.lumber-results {
    background: #f0f7f3; border-radius: 10px;
    padding: 16px 20px; margin-bottom: 20px;
    display: grid; grid-template-columns: 1fr 1fr; gap: 12px;
}
.lumber-result-item { text-align: center; }
.lumber-result-item .result-label { font-size: 11px; font-weight: 600; color: #6b7a70; text-transform: uppercase; letter-spacing: 1px; }
.lumber-result-item .result-value { font-size: 28px; font-weight: 800; color: #1a2e22; line-height: 1.2; }
.lumber-modal-actions { display: flex; gap: 10px; }
.lumber-modal-actions .btn { padding: 10px 20px; border-radius: 8px; font-size: 14px; font-weight: 600; border: none; cursor: pointer; }
.lumber-modal-actions .btn-primary { background: #3f7f5b; color: #fff; flex: 1; }
.lumber-modal-actions .btn-primary:hover { background: #356a4b; }
.lumber-modal-actions .btn-secondary { background: #f0f5f1; color: #3f4a40; }
.lumber-modal-actions .btn-secondary:hover { background: #e0ebe4; }

/* ── Адаптивный скролл таблицы в модалке бланка заказа ── */
.modal-table-wrapper {
    width: 100%;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
    margin-bottom: 16px;
    border: 1px solid #dee2e6;
    border-radius: 6px;
}
.modal-table-wrapper table {
    width: 100%;
    min-width: 800px;
}
.modal-table-wrapper table th,
.modal-table-wrapper table td {
    white-space: nowrap;
    padding: 6px 8px;
}
/* Узкие поля ввода внутри таблицы модалки */
.modal-sku-input {
    width: 100px;
    min-width: 70px;
    padding: 4px 6px;
    font-size: 13px;
    border: 1px solid #d0d9d2;
    border-radius: 4px;
}
.modal-qty-input {
    width: 50px;
    max-width: 70px;
    padding: 4px 6px;
    font-size: 13px;
    border: 1px solid #d0d9d2;
    border-radius: 4px;
    text-align: center;
}
.modal-option-select {
    width: 90px;
    padding: 4px 6px;
    font-size: 13px;
    border: 1px solid #d0d9d2;
    border-radius: 4px;
}
.modal-row-remove {
    background: none;
    border: none;
    color: #c0392b;
    cursor: pointer;
    font-size: 16px;
    padding: 2px 6px;
    border-radius: 4px;
    transition: background 0.15s;
}
.modal-row-remove:hover {
    background: #fce4e4;
}
/* Нумерация строк */
#modalOrderBody td:first-child {
    text-align: center;
    font-weight: 600;
    color: #6b7a70;
    width: 32px;
}

/* -- ����� (white-label, CSS-����������) -- */
.price-footer {
    background: var(--bg-footer, #f8f9fa);
    border-top: 1px solid var(--border-footer, #eee);
    padding: 16px 20px;
    margin-top: 24px;
}
.price-footer-content {
    width: calc(100% - 30px);
    max-width: var(--layout-max-width, 1000px);
    margin: 0 auto;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}
.price-footer-left,
.price-footer-right {
    width: 50%;
    min-width: 280px;
}
.price-footer-company {
    margin: 0 0 6px;
    font-size: 13px;
    font-weight: 700;
    color: var(--text-main, #333);
}
.price-footer-contacts-line {
    margin: 0;
    font-size: 12px;
    color: var(--text-muted, #666);
}
.price-footer-contact-link {
    color: var(--brand-primary, #007bff);
    text-decoration: none;
    font-size: 12px;
}
.price-footer-contact-link:hover {
    text-decoration: underline;
}
.price-footer-right {
    display: grid;
    grid-template-columns: 38px auto;
    grid-template-rows: auto auto;
    justify-content: end;
    align-items: start;
    column-gap: 10px;
    row-gap: 2px;
    text-align: left;
    padding: 0;
}
.price-footer-logo-link {
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-radius: 6px;
    grid-column: 1;
    grid-row: 1 / span 2;
}
.price-footer-logo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 10%;
    transition: opacity 0.2s ease;
}
.price-footer-logo:hover {
    opacity: 0.8;
}
.price-footer-wearbot-title {
    margin: 0 0 4px;
    font-size: 13px;
    font-weight: 700;
    color: var(--text-main, #333);
    line-height: 1.15;
    grid-column: 2;
    grid-row: 1;
}
.price-footer-wearbot-description {
    margin: 0;
    font-size: 12px;
    color: var(--text-muted, #666);
    line-height: 1.15;
    grid-column: 2;
    grid-row: 2;
}
.price-footer-wearbot-link {
    color: var(--brand-primary, #007bff);
    font-size: 12px;
    text-decoration: none;
}
.price-footer-wearbot-link:hover {
    text-decoration: underline;
}
@media (max-width: 768px) {
    .price-footer {
        padding: 14px 12px;
        margin-top: 18px;
    }
    .price-footer-content {
        flex-direction: column;
        align-items: stretch;
        text-align: left;
        gap: 12px;
        width: calc(100% - 20px);
    }
    .price-footer-left,
    .price-footer-right {
        width: 100%;
        min-width: 0;
    }
    .price-footer-logo-link {
        width: 32px;
        height: 32px;
    }
    .price-footer-company,
    .price-footer-wearbot-title {
        font-size: 12px;
    }
    .price-footer-contacts-line,
    .price-footer-wearbot-description {
        font-size: 10px;
    }
    .price-footer-contact-link {
        font-size: 11px;
    }
    .price-footer-wearbot-link {
        font-size: 11px;
    }
}

/* ── cart.html: стилизованные кнопки корзины ── */
.btn-clear-cart {
    background: #fdf2f2;
    border: 1px solid #f5c2c2;
    color: #c0392b;
    border-radius: 6px;
    padding: 6px 16px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease-in-out;
    line-height: 1.4;
    font-family: inherit;
}
.btn-clear-cart:hover {
    background: #c0392b;
    border-color: #c0392b;
    color: #fff;
}

.btn-add-row {
    background: #fff;
    border: 1px solid #3f7f5b;
    color: #3f7f5b;
    border-radius: 6px;
    padding: 6px 16px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease-in-out;
    margin-top: 12px;
    line-height: 1.4;
    font-family: inherit;
}
.btn-add-row:hover {
    background: #3f7f5b;
    color: #fff;
}

/* cart-logistics-summary — теперь внутри <tfoot> таблицы (см. cart.html) */

/* cart.html: кнопка назад — зелёный аналог btn-clear-cart */
.btn-back-cart {
    background: #f0f7f3;
    border: 1px solid #b8d9c6;
    color: #3f7f5b;
    border-radius: 6px;
    padding: 6px 16px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease-in-out;
    line-height: 1.4;
    font-family: inherit;
    text-decoration: none;
    display: inline-block;
}
.btn-back-cart:hover {
    background: #3f7f5b;
    border-color: #3f7f5b;
    color: #fff;
    text-decoration: none;
}

/* cart.html: футер таблицы для кнопки + строку */
.cart-table-footer {
    padding: 8px 10px;
    border-top: 1px solid #dee2e6;
    background: #fafcfa;
}

/* cart.html: итоги перенесены в footer таблицы (см. inline-стили cart.html) */

/* ── Лайтбокс для увеличения картинок (600×600) ── */
.image-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0,0,0,0.75);
    backdrop-filter: blur(8px);
    z-index: 3000 !important;
    display: flex;
    align-items: center;
    justify-content: center;
}
.lightbox-img {
    width: 600px;
    height: 600px;
    object-fit: contain;
    border-radius: 8px;
    background: #fff;
    padding: 8px;
}
.lightbox-close {
    position: absolute;
    top: 24px;
    right: 32px;
    color: #fff;
    font-size: 36px;
    font-weight: 300;
    cursor: pointer;
    z-index: 3001;
    transition: opacity 0.15s;
    line-height: 1;
    user-select: none;
}
.lightbox-close:hover {
    opacity: 0.7;
}
@media (max-width: 700px) {
    .lightbox-img {
        width: 90vw;
        height: auto;
        max-height: 80vh;
    }
}

/* ==========================================
   ?????? ???????????? ??????? ?? data-col-type
   ========================================== */

/* ????????? ??????? ? ????? */
/* ??????? ??????? ? ?????? */
/* ??????? ? ????????? ? ?? ?????? */
/* ??????? ?????? (qty) ? ?? ?????? */
