:root {
    --primary-sage: #9CAF88;          /* Мягкий зеленый шалфей */
    --primary-neutral: #F8F8F6;       /* Очень светлый нейтральный серый */
    --primary-blush: #E8D5D1;         /* Нежный пыльно-розовый */
    --sage-medium: #7D9970;           /* Средний зеленый */
    --sage-dark: #6B8A5A;             /* Темно-зеленый */
    --blush-medium: #D4C0BB;          /* Средний пыльно-розовый */
    --blush-dark: #C4ADA7;            /* Темный пыльно-розовый */
    --neutral-warm: #F0F0EE;          /* Теплый нейтральный */
    --text-dark: #3A3D3A;             /* Темный текст с зеленоватым оттенком */
    --text-medium: #5A5D58;           /* Средний текст */
    --neutral-light: #FDFDFC;         /* Почти белый */
    --accent-warm: #D9C7C1;           /* Теплый акцент */
}

/* Base styles */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    background: var(--primary-neutral);
    color: var(--text-dark);
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 15px;
}

/* Header */
.header {
    text-align: center;
    margin-bottom: 20px;
    background: white;
    padding: 20px 10px;
    border-radius: 15px;
    box-shadow: 0 3px 10px rgba(127, 176, 105, 0.1);
}

.header h1 {
    color: var(--sage-dark);
    font-size: 2em;
    margin: 0 0 8px 0;
}

.header p {
    color: var(--text-medium);
    font-size: 1em;
    margin: 0;
}

/* Admin auth */
.admin-auth {
    background: var(--neutral-warm);
    border-radius: 10px;
    padding: 20px;
    margin: 20px auto;
    max-width: 400px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(127, 176, 105, 0.1);
}

.admin-auth h3 {
    color: var(--sage-dark);
    margin-bottom: 15px;
}

.admin-auth input {
    width: 200px;
    padding: 8px;
    margin: 5px;
    border: 1px solid var(--primary-sage);
    border-radius: 5px;
    font-size: 14px;
}

.admin-auth button {
    background: var(--sage-medium);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    margin: 10px 5px;
}

.admin-auth button:hover {
    background: var(--sage-dark);
}

.admin-auth .error {
    color: #d32f2f;
    font-size: 12px;
    margin-top: 5px;
}

#logout-btn {
    display: none;
    margin-top: 20px;
    width: 100%;
    padding: 10px 0;
    font-size: 1rem;
    background-color: var(--accent-warm);
    color: #000;
    border: none;
    cursor: pointer;
    border-radius: 4px;
    box-shadow: 0 2px 6px rgba(218, 165, 32, 0.4);
    transition: background-color 0.3s ease;
}

#logout-btn:hover {
    background-color: var(--blush-medium);
}

/* Cart summary */
.cart-summary {
    background: var(--neutral-warm);
    border-radius: 12px;
    padding: 20px;
    margin: 20px auto;
    max-width: 600px;
    box-shadow: 0 2px 8px rgba(127, 176, 105, 0.1);
}

.cart-summary h2 {
    color: var(--sage-dark);
    text-align: center;
    margin-bottom: 15px;
}

.cart-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid var(--primary-sage);
}

.cart-item:last-child {
    border-bottom: none;
}

.cart-total {
    background: var(--sage-medium);
    color: white;
    padding: 15px;
    border-radius: 8px;
    margin-top: 15px;
    text-align: center;
    font-size: 1.2em;
    font-weight: bold;
}

.clear-cart {
    background: var(--blush-dark);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 5px;
    cursor: pointer;
    margin-top: 10px;
}

.clear-cart:hover {
    background: var(--blush-dark);
}

/* Messages */
.save-message {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #4CAF50;
    color: white;
    padding: 10px 14px;
    border-radius: 8px;
    margin: 0;
    text-align: center;
    display: none;
    z-index: 10000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.15);
}

.save-message.show {
    display: block;
}

/* Navigation buttons */
.nav-btn {
    width: 80px !important;
    height: 40px !important;
    border-radius: 10px !important;
    background: var(--sage-medium) !important;
    color: #fff !important;
    border: none !important;
    cursor: pointer !important;
    font-size: 14px !important;
    font-weight: bold !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2) !important;
    transition: background 0.3s ease, transform 0.2s ease !important;
    pointer-events: auto !important;
    z-index: 10 !important;
    position: relative !important;
}

.nav-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(127, 176, 105, 0.3);
    background: var(--sage-dark) !important;
}

.nav-btn:active:not(:disabled) {
    transform: translateY(1px);
}

.nav-btn:disabled {
    background: var(--primary-sage) !important;
    cursor: not-allowed !important;
    opacity: 0.6 !important;
}

.nav-btn.back-btn {
    background: var(--text-medium);
}

.nav-btn.next-btn {
    background: var(--sage-dark);
}

.nav-btn.reset-btn {
    background: var(--text-medium);
    margin-left: 10px;
}

.nav-btn.reset-btn:hover {
    background: var(--text-medium);
}

/* Tabs */
.tabs {
    display: flex;
    border-radius: 12px 12px 0 0;
    overflow: hidden;
}

.tab {
    flex: 1;
    padding: 14px;
    background: var(--primary-sage);
    border: none;
    cursor: pointer;
    color: var(--sage-dark);
    font-size: 1em;
    font-weight: bold;
    transition: all 0.3s;
}

.tab:hover {
    background: var(--neutral-warm);
}

.tab.active {
    background: var(--sage-medium);
    color: white;
}

/* Category content */
.category-content {
    position: relative;
    display: none;
    background: white;
    border-radius: 0 0 12px 12px;
    box-shadow: 0 6px 22px rgba(127, 176, 105, 0.1);
    padding: 20px;
}

.category-content.active {
    display: block;
}

.category-content > h2 {
    display: inline-block;
    margin: 0 15px 15px 0;
    vertical-align: middle;
}

/* Category header */
.category-header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 40px;
    flex-wrap: wrap;
    gap: 15px;
    position: sticky;
    top: 0;
    background: white;
    z-index: 10;
}

.category-content > h2 {
    margin: 0;
    flex: 1;
    min-width: 200px;
}

/* Constructor */
.constructor-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 20px;
    margin-top: 10px;
}

.components-section {
    position: relative;
    padding-top: 10px;
}

.component-group {
    max-height: 600px;
    overflow-y: auto;
    padding-right: 8px;
}

.component-group h3 {
    color: var(--sage-dark);
    margin-bottom: 9px;
    font-size: 1.14em;
    padding-bottom: 3px;
    border-bottom: 2px solid var(--primary-sage);
    position: sticky;
    top: 0;
    background: white;
    z-index: 10;
    padding: 10px 0;
    margin: 0 0 10px 0;
}

/* Options grid */
.options-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    padding-bottom: 20px !important;
}

.options-grid::-webkit-scrollbar {
    width: 8px;
}

.options-grid::-webkit-scrollbar-track {
    background: var(--primary-neutral);
    border-radius: 4px;
}

.options-grid::-webkit-scrollbar-thumb {
    background: var(--primary-sage);
    border-radius: 4px;
}

.options-grid::-webkit-scrollbar-thumb:hover {
    background: var(--sage-medium);
}

/* Option card */
.option-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: 10px;
    background: white;
    border: 1px solid var(--primary-sage);
    border-radius: 10px;
    box-shadow: 0 2px 6px rgba(127, 176, 105, 0.1);
    transition: transform 0.2s, box-shadow 0.2s;
    height: auto;
}

.option-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(127, 176, 105, 0.2);
}

.option-card.selected {
    border-color: var(--sage-dark);
    background: var(--neutral-warm);
    box-shadow: 0 0 0 2px var(--primary-blush);
}

.option-card h4 {
    margin: 5px 0;
    font-size: 0.9em;
    text-align: center;
    color: var(--sage-dark);
    word-break: break-word;
}

.option-card .price {
    font-weight: bold;
    color: var(--blush-dark);
    font-size: 0.9em;
    margin: 4px 0;
    text-align: center;
}

.option-card img {
    width: 170px !important;
    height: 170px !important;
    object-fit: cover !important;
    border-radius: 6px !important;
    margin: 0 auto 8px auto !important;
    display: block;
    background: var(--primary-neutral) !important;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="50" height="50" viewBox="0 0 50 50"><text x="25" y="30" font-family="Arial" font-size="12" fill="%238B4513" text-anchor="middle">🖼️</text></svg>') !important;
    background-repeat: no-repeat !important;
    background-position: center !important;
    background-size: 40px 40px !important;
    transition: opacity 0.3s ease !important;
}

/* Result section */
.result-section {
    background: var(--neutral-warm);
    border-radius: 12px;
    padding: 15px;
    margin-top: 8px;
    height: fit-content;
    min-width: 262px;
}

.result-section h2 {
    color: var(--sage-dark);
    margin-bottom: 12px;
    text-align: center;
    font-size: 1.3em;
}

.product-info {
    background: white;
    border-radius: 8px;
    padding: 6px 12px 8px 12px;
    margin-bottom: 8px;
}

.component-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2px 0;
    border-bottom: 1px solid var(--primary-sage);
    font-size: 0.92em;
}

.component-item:last-child {
    border-bottom: none;
}

.component-name {
    color: var(--text-medium);
}

.component-price {
    font-weight: bold;
}

.quantity-section {
    margin: 10px 0;
}

.quantity-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 8px 0;
}

.quantity-btn {
    background: var(--sage-medium);
    color: white;
    border: none;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1em;
    margin: 0 8px;
    transition: background 0.3s;
}

.quantity-btn:hover {
    background: var(--sage-dark);
}

.quantity-input {
    width: 45px;
    text-align: center;
    padding: 4px;
    border: 2px solid var(--primary-sage);
    border-radius: 7px;
    font-size: 1em;
}

.price-breakdown {
    background: white;
    border-radius: 8px;
    padding: 10px;
}

.price-line {
    display: flex;
    justify-content: space-between;
    padding: 2px 0;
}

.price-line.total {
    border-top: 2px solid var(--sage-medium);
    margin-top: 5px;
    padding-top: 7px;
    font-weight: bold;
    color: var(--sage-dark);
}

.discount-info {
    background: var(--neutral-warm);
    border: 1px solid var(--primary-blush);
    border-radius: 7px;
    padding: 10px;
    margin: 10px 0;
    text-align: center;
}

.discount-info.hidden {
    display: none;
}

.discount-level {
    font-weight: bold;
    color: var(--accent-warm);
    font-size: 1.1em;
}

/* Buttons */
.btn {
    width: 100%;
    background: var(--primary-sage); /* Неактивный цвет по умолчанию */
    color: var(--text-medium);
    border: none;
    padding: 11px;
    border-radius: 10px;
    font-size: 1em;
    font-weight: bold;
    cursor: not-allowed; /* Курсор "недоступно" по умолчанию */
    transition: all 0.3s;
    opacity: 0.7;
}

.btn:hover {
    background: var(--sage-dark);
}

.btn:not(:disabled) {
    background: var(--sage-medium); /* Активный цвет когда доступна */
    color: white;
    cursor: pointer;
    opacity: 1;
}

.btn:not(:disabled):hover {
    background: var(--sage-dark);
}

.btn:disabled {
    background: var(--primary-sage);
    cursor: not-allowed;
}

.btn-add {
    display: inline-block;
    padding: 10px 20px;
    background-color: var(--sage-medium);
    color: var(--text-dark);
    text-decoration: none;
    border: none;
    cursor: pointer;
    font-size: 1em;
    border-radius: 4px;
    margin-top: 20px;
}

.btn-add:focus {
    outline: none;
}

.move-btn {
    background: var(--text-medium);
    color: white;
    border: none;
    border-radius: 6px;
    padding: 2px 8px;
    margin-left: 3px;
    cursor: pointer;
}

.move-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.move-btn:hover:not(:disabled) {
    background: var(--text-dark);
}

.del-btn {
    background: var(--blush-dark);
    color: white;
    border: none;
    border-radius: 6px;
    padding: 2px 10px;
    margin-left: 5px;
    cursor: pointer;
}

.save-btn {
    background: var(--sage-medium);
    color: white;
    border: none;
    padding: 7px 22px;
    border-radius: 7px;
    margin-left: 10px;
    font-weight: bold;
    cursor: pointer;
}

.save-btn:hover {
    background: var(--sage-dark);
}

.reset-btn {
    background: var(--accent-warm);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    margin: 10px 5px;
}

.reset-btn:hover {
    background: var(--blush-medium);
}

/* Progress */
.progress-indicator {
    background: var(--primary-sage);
    height: 4px;
    border-radius: 3px;
    margin: 12px 0;
}

.progress-fill {
    background: linear-gradient(90deg, var(--primary-sage), var(--primary-blush));
    height: 100%;
    border-radius: 3px;
    transition: width 0.3s;
    width: 0;
}

/* Errors and warnings */
.add-to-cart-error {
    background: #ffe3e3 !important;
    border: 2px solid #e53935 !important;
    color: #e53935 !important;
}

.component-error {
    border: 2px solid #e53935 !important;
    box-shadow: 0 0 0 2px #ffebee;
    background: #fff6f6;
}

.select-components-warning {
    color: #e53935;
    background: #fff0f0;
    padding: 8px 16px;
    border-radius: 6px;
    display: inline-block;
    margin-bottom: 12px;
    font-size: 14px;
}

.error {
    border-color: #e74c3c !important;
    background-color: #fdecea;
}

.error-message {
    color: #c0392b;
    margin-top: 8px;
    font-size: 0.9em;
    display: none;
}

.error-message.visible {
    display: block;
}

/* Steps */
.step-pane {
    display: none;
}

.step-pane.active {
    display: block;
}

/* Admin block */
.admin-block {
    margin: 30px auto;
    padding: 22px 20px 15px 20px;
    background: var(--neutral-warm);
    border-radius: 11px;
    box-shadow: 0 3px 12px rgba(127, 176, 105, 0.1);
    max-width: 1100px;
    display: none;
}

.admin-block.visible {
    display: block;
}

.admin-block h2 {
    color: var(--sage-dark);
    margin-bottom: 10px;
    text-align: center;
}

.admin-tabs {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-bottom: 11px;
}

.admin-tab {
    border: none;
    background: var(--primary-sage);
    color: var(--sage-dark);
    padding: 10px 18px;
    border-radius: 18px;
    cursor: pointer;
    font-weight: bold;
    font-size: 1em;
    transition: background 0.3s;
}

.admin-tab.active {
    background: var(--sage-medium);
    color: white;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    margin: 8px 0 17px 0;
}

.admin-table th,
.admin-table td {
    border: 1px solid var(--primary-sage);
    padding: 5px 8px;
    font-size: 0.97em;
}

.admin-table th {
    background: var(--neutral-warm);
}

.admin-table td input[type="text"],
.admin-table td input[type="number"] {
    width: 85%;
    padding: 2px;
    font-size: 0.97em;
}

.admin-table td input[type="file"] {
    max-width: 90px;
}

.admin-controls {
    text-align: center;
    margin-top: 5px;
}

.add-row-block {
    margin-top: 8px;
    border-top: 1px dashed var(--light-brown);
    padding-top: 12px;
}

.add-row-block input[type="text"],
.add-row-block input[type="number"] {
    margin-right: 4px;
}

.comment-cell {
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    cursor: pointer;
    position: relative;
    transition: all 0.2s ease;
    padding: 6px 8px;
    border: 1px solid var(--primary-sage);
    border-radius: 6px;
    background-color: white;
    box-sizing: border-box;
}

.comment-cell:hover {
    background-color: #f5f5f5;
}

.comment-cell.expanded {
    white-space: normal;
    overflow: auto;
    background: white;
    z-index: 10;
    position: absolute;
    top: 0;
    left: 0;
    max-width: min(420px, calc(100vw - 40px));
    min-width: 260px;
    border: 1px solid var(--sage-medium);
    box-shadow: 0 4px 14px rgba(0,0,0,0.12);
    padding: 10px;
    border-radius: 8px;
    overflow-wrap: anywhere;
}

.comment-preview {
    white-space: pre-wrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-height: 60px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}

.comment-cell textarea {
    width: 100%;
    min-height: 110px;
    resize: vertical;
    border: 1px solid var(--primary-sage);
    padding: 8px 10px;
    font-family: inherit;
    font-size: 14px;
    line-height: 1.35;
    border-radius: 6px;
    box-sizing: border-box;
    outline: none;
}

.comment-cell textarea:focus {
    border-color: var(--sage-dark);
    box-shadow: 0 0 0 2px rgba(184,212,167,0.1);
}

.admin-img-thumb {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 5px;
    border: 2px solid #ddd;
    transition: transform 0.2s;
    cursor: pointer;
}

.admin-img-thumb:hover {
    transform: scale(1.05);
    border-color: var(--sage-dark);
}

/* Loader */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loader {
    width: 30px;
    height: 30px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid var(--sage-medium);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.uploading .loader {
    display: block;
}

.uploading img {
    opacity: 0.5;
}

.uploading {
    position: relative;
}

.uploading::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Consultation */
.consultation-fixed {
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 1000;
    background: var(--sage-medium);
    color: white;
    padding: 12px 15px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

.consultation-content {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.consultation-content span {
    font-size: 0.9em;
    opacity: 0.9;
}

.consultation-content a {
    color: white;
    text-decoration: none;
    font-weight: bold;
    font-size: 1.1em;
    transition: color 0.3s ease;
}

.consultation-content a:hover {
    color: var(--accent-warm);
    text-decoration: underline;
}

/* Subtitle */
.subtitle {
    color: var(--text-medium);
    font-size: 0.95em;
    font-style: italic;
    text-align: center;
    margin: -10px 0 20px 0;
    opacity: 0.8;
    transition: opacity 0.3s ease, transform 0.3s ease;
    display: inline-block;
    vertical-align: baseline;
}

.subtitle.hidden {
    opacity: 0;
    transform: translateY(-10px);
    height: 0;
    margin: 0;
    overflow: hidden;
}

/* Footer */
.footer {
    background: var(--sage-medium);
    color: white;
    padding: 30px 20px;
    margin-top: 40px;
    border-radius: 15px 15px 0 0;
}

.footer *:not(.marketplace-btn):not(.marketplace-btn *) {
    color: white !important;
}

.footer h3,
.footer h2,
.footer p,
.footer span,
.footer a,
.footer li {
    color: white !important;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.footer-sections-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    width: 100%;
}

.footer-section h3 {
    margin: 0 0 15px 0;
    font-size: 1.2em;
}

.marketplace-buttons,
.support-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 15px;
}

.marketplace-btn {
    width: 50px;
    height: 50px;
    background: white !important;
    border: 2px solid rgba(0,0,0,0.3) !important;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: .3s;
}

.marketplace-btn:hover {
    transform: scale(1.1);
}

.marketplace-btn img {
    width: 80%;
    height: 80%;
    object-fit: contain;
}

.support-btn {
    background: rgba(255, 255, 255, 0.2) !important;
    color: white !important;
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
    padding: 10px 15px;
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: .3s;
}

.support-btn:hover {
    background: rgba(255, 255, 255, 0.3) !important;
}

.support-btn img {
    width: 20px;
    height: 20px;
}

.copyright {
    text-align: center;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,.2);
    font-size: .9em;
    color: white !important;
}

/* SEO text */
.seo-text {
    width: 100%;
    margin-top: 30px;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    color: white !important;
}

.seo-text * {
    color: white !important;
}

.seo-text h2 {
    color: var(--accent-warm) !important;
    margin: 25px 0 15px 0;
    font-size: 1.3em;
}

.seo-text h2:first-child {
    margin-top: 0;
}

.seo-text p {
    line-height: 1.6;
    margin-bottom: 15px;
    font-size: 0.95em;
    color: white !important;
}

.seo-text a {
    color: var(--accent-warm) !important;
    text-decoration: underline;
}

/* Cropper */
.cropper-container {
    direction: ltr;
    font-size: 0;
    line-height: 0;
    position: relative;
    -ms-touch-action: none;
    touch-action: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

.cropper-modal {
    background: #000;
    opacity: 0.5;
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
}

.cropper-view-box {
    display: block;
    height: 100%;
    outline: 1px solid #39f;
    outline-color: rgba(51, 153, 255, 0.75);
    overflow: hidden;
    width: 100%;
}

.cropper-dashed {
    border: 0 dashed #eee;
    display: block;
    opacity: 0.5;
    position: absolute;
}

.cropper-point {
    background-color: #39f;
    height: 5px;
    opacity: 0.75;
    position: absolute;
    width: 5px;
}

.cropper-line {
    background-color: #39f;
    display: block;
    opacity: 0.1;
    position: absolute;
}

/* Component navigation */
.component-navigation {
    position: absolute !important;
    top: -20px !important;
    right: 23px !important;
    display: flex !important;
    gap: 10px !important;
    z-index: 100 !important;
    background: white !important;
    padding: 10px 15px !important;
    border-radius: 8px !important;
    box-shadow: 0 2px 10px rgba(0,0,0,0.15) !important;
    border: 1px solid var(--primary-sage) !important;
}

/* Media queries */
@media (max-width: 900px) {
    .consultation-fixed {
        display: none;
    }

  .component-navigation {
    position: fixed !important;
    bottom: 0 !important;
    top: auto !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    border-radius: 0 !important;
    padding: 15px !important;
    justify-content: space-between !important;
    background: white !important;
    box-shadow: 0 -4px 15px rgba(0,0,0,0.15) !important;
    z-index: 1000 !important;
  }

  .nav-btn {
    width: 45% !important;
    height: 50px !important;
    font-size: 16px !important;
    margin: 0 !important;
  }

  /* Улучшаем отображение конструктора */
  .constructor-grid {
    margin-bottom: 80px !important; /* Место для фиксированных кнопок */
  }

  .options-grid {
    grid-template-columns: 1fr !important;
    gap: 12px !important;
  }

  .option-card {
    padding: 15px !important;
  }

  .option-card img {
    width: 120px !important;
    height: 120px !important;
  }

  /* Улучшаем отображение результата */
  .result-section {
    position: sticky;
    bottom: 70px;
    z-index: 900;
    margin-bottom: 15px;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
  }

  /* Улучшаем табы */
  .tabs {
    flex-direction: row;
    flex-wrap: wrap;
  }

  .tab {
    flex: 1 0 50%;
    padding: 12px 8px;
    font-size: 14px;
  }

  /* Улучшаем заголовки */
  .category-content > h2 {
    font-size: 1.5em;
    text-align: center;
    margin-bottom: 10px !important;
  }

  .subtitle {
    text-align: center;
    margin-bottom: 20px !important;
  }

  /* Улучшаем кнопки количества */
  .quantity-controls {
    margin: 15px 0;
  }

  .quantity-btn {
    width: 40px;
    height: 40px;
    font-size: 18px;
  }

  .quantity-input {
    width: 60px;
    height: 40px;
    font-size: 18px;
  }

  /* Улучшаем кнопку завершения */
  .finish-btn {
    padding: 15px;
    font-size: 16px;
    margin-top: 15px;
  }

  /* Адаптируем админ-панель */
  .admin-tabs {
    flex-direction: column;
  }

  .admin-tab {
    width: 100%;
    margin-bottom: 10px;
  }
}

/* Дополнительные улучшения для очень маленьких экранов */
@media (max-width: 480px) {
  .container {
    padding: 8px;
  }

  .header {
    padding: 15px 10px;
    margin-bottom: 15px;
  }

  .header h1 {
    font-size: 1.4em;
  }

  .header p {
    font-size: 0.9em;
  }

  .tab {
    flex: 1 0 100%;
    font-size: 13px;
    padding: 10px 5px;
  }

  .category-content {
    padding: 15px 10px;
  }

  .option-card h4 {
    font-size: 14px;
  }

  .option-card .price {
    font-size: 14px;
  }

  /* Улучшаем модальное окно */
  #contact-modal > div {
    margin: 20px;
    padding: 15px;
  }

  .input-group {
    margin-bottom: 15px;
  }

  /* Фиксируем кнопки навигации еще надежнее */
  .component-navigation {
    padding: 12px !important;
  }

  .nav-btn {
    height: 45px !important;
    font-size: 14px !important;
  }
}

/* Улучшаем видимость кнопок навигации */
.nav-btn {
  font-weight: bold !important;
  text-shadow: 0 1px 2px rgba(0,0,0,0.3) !important;
  min-width: 80px !important;
}

.nav-btn:not(:disabled) {
  box-shadow: 0 3px 8px rgba(0,0,0,0.2) !important;
}

/* Улучшаем прогресс-бар */
.progress-indicator {
  height: 6px;
  margin: 15px 0;
}

.progress-fill {
  background: linear-gradient(90deg, var(--sage-medium), var(--sage-dark)) !important;
}

/* Делаем скролл более плавным */
.component-group {
  scroll-behavior: smooth;
}

/* Улучшаем видимость выбранных опций */
.option-card.selected {
  transform: scale(1.02);
  box-shadow: 0 4px 15px rgba(127, 176, 105, 0.3) !important;
}

/* Анимация для лучшей обратной связи */
.option-card {
  transition: all 0.3s ease;
}

.nav-btn {
  transition: all 0.2s ease !important;
}

/* Вкладка наценки */

/* Стили для вкладки настроек */
.admin-settings {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

.settings-section {
    background: white;
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.settings-section h4 {
    color: #8B4513;
    margin-bottom: 10px;
    font-size: 1.2em;
}

.settings-description {
    color: #666;
    margin-bottom: 20px;
    line-height: 1.5;
}

.markup-control {
    margin-bottom: 30px;
    padding: 20px;
    background: #f8f8f8;
    border-radius: 8px;
    border-left: 4px solid #8B4513;
}

.markup-input-group {
    display: flex;
    align-items: center;
    gap: 15px;
    margin: 15px 0;
}

.markup-input {
    padding: 12px 15px;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-size: 16px;
    width: 120px;
    transition: border-color 0.3s;
}

.markup-input:focus {
    border-color: #8B4513;
    outline: none;
}

.save-markup-btn {
    background: #8B4513;
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: bold;
    transition: background 0.3s;
}

.save-markup-btn:hover {
    background: #654321;
}

.markup-example {
    font-size: 14px;
    color: #666;
    margin-top: 10px;
    padding: 10px;
    background: #f0f0f0;
    border-radius: 5px;
}

.markup-preview {
    margin: 25px 0;
    padding: 20px;
    background: #f9f9f9;
    border-radius: 8px;
}

.price-examples {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

.price-example {
    background: white;
    padding: 15px;
    border-radius: 6px;
    text-align: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.example-label {
    font-size: 12px;
    color: #888;
    margin-bottom: 5px;
}

.base-price {
    font-weight: bold;
    color: #666;
    margin: 5px 0;
}

.arrow {
    color: #8B4513;
    margin: 5px 0;
    font-size: 14px;
}

.final-price {
    font-weight: bold;
    color: #8B4513;
    font-size: 1.1em;
    margin-top: 5px;
}

.markup-info-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-top: 25px;
}

.info-box {
    background: white;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    border: 2px solid #e0e0e0;
}

.info-label {
    font-size: 14px;
    color: #666;
    margin-bottom: 10px;
}

.info-value {
    font-size: 24px;
    font-weight: bold;
    color: #8B4513;
}

.info-value.markup-positive {
    color: #4CAF50;
}

.info-value.markup-negative {
    color: #f44336;
}

.markup-info {
    background: #e8f5e8;
    color: #2e7d32;
    padding: 10px 15px;
    border-radius: 5px;
    margin: 10px 0;
    border-left: 4px solid #4CAF50;
    font-weight: bold;
}