/* =============================================
   ArtMastex Calculator - Стили в стиле прайс-листа
   ============================================= */

/* Шрифты */
@font-face {
    font-family: 'NauryzRedKeds';
    src: url('font/NauryzRedKeds.ttf') format('truetype');
    font-style: normal;
    font-weight: normal;
}

/* Базовые стили */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent; /* Убираем подсветку при тапе на мобильных */
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

/* Разрешаем выделение для полей ввода и редактируемых элементов */
input,
textarea,
select,
[contenteditable="true"],
[contenteditable="true"] * {
    -webkit-user-select: text;
    -moz-user-select: text;
    -ms-user-select: text;
    user-select: text;
}

/* Отключаем автозаполнение для всех полей в калькуляторе */
#product-form input,
#product-form textarea,
#product-form select,
#client-data-form input,
#client-data-form textarea,
#client-data-form select,
.layers-container input,
.layers-container textarea,
.layers-container select {
    autocomplete: off;
    -webkit-autocomplete: off;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%; /* Предотвращает автоматическое изменение размера текста на iOS */
    -ms-text-size-adjust: 100%;
}

body {
    font-family: "Unbounded", sans-serif;
    font-size: 14px;
    font-weight: 400;
    min-height: 100vh;
    padding-bottom: 40px;
    /* Фон вынесен в common.css (для страниц, использующих общий CSS) */
    /* Для статических страниц калькулятора фон остаётся здесь */
    background-image: url(picture/sparkles-background.svg), url(picture/Vector.svg);
    background-repeat: no-repeat;
    background-size: contain, cover;
    background-position: 100% 0, 100% 0;
    background-color: #7231FF;
    background-attachment: scroll;
    color: #333;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Контейнер */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 1;
    overflow: visible; /* Чтобы котик не обрезался */
}

/* =============================================
   Шапка
   ============================================= */

.header {
    text-align: center;
    padding: 0 0 20px;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    z-index: 1;
}

.logo {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    transform: translateY(-20px);
    z-index: 10;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: white;
    text-decoration: none;
    font-size: 16px;
    padding: 14px 24px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 30px;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    font-weight: 500;
    position: relative;
    z-index: 11;
    pointer-events: auto;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

.back-link:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateX(-5px);
}

.title-with-clouds {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 30px;
    position: relative;
}

.main-title {
    font-family: "NauryzRedKeds", sans-serif;
    font-size: 72px;
    color: white;
    text-shadow: 4px 4px 0 rgba(0, 0, 0, 0.1);
    margin-bottom: 10px;
    letter-spacing: 2px;
    flex-shrink: 0;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

.title-cloud {
    width: 144px; /* Увеличено на 20% (было 120px) */
    height: 144px; /* Увеличено на 20% (было 120px) */
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: swing var(--swing-duration, 4s) ease-in-out infinite;
    animation-delay: calc(var(--delay, 0s) + 2.5s); /* Начинаем качание после падения */
    filter: drop-shadow(2px 4px 6px rgba(0, 0, 0, 0.15));
    transform-origin: top center; /* Точка вращения сверху */
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    pointer-events: none;
}

.title-cloud img {
    width: 100% !important;
    height: 100% !important;
    object-fit: contain;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    pointer-events: none;
}

.falling-cloud {
    animation: fallWithBounce 2.5s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
    animation-delay: var(--delay, 0s);
    opacity: 0;
    transform-origin: top center;
    filter: drop-shadow(2px 4px 6px rgba(0, 0, 0, 0.1));
}

/* Анимация падения с отскоком */
@keyframes fallWithBounce {
    0% {
        opacity: 0;
        transform: translateY(-200px) rotate(0deg) scale(0.8);
    }
    
    60% {
        opacity: 1;
        transform: translateY(0) rotate(0deg) scale(0.95);
    }
    70% {
        transform: translateY(-8px) rotate(-0.5deg) scale(0.98);
    }

    100% {
        opacity: 1;
        transform: translateY(0) rotate(0deg) scale(1);
    }
}

/* Анимация качания на ниточке */
@keyframes swing {
    0%, 100% {
        transform: rotate(-1.5deg) translateX(-1px);
    }
    50% {
        transform: rotate(2deg) translateX(1.5px);
    }
}

.subtitle {
    color: rgba(255, 255, 255, 0.85);
    font-size: 16px;
    font-weight: 300;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

/* =============================================
   Основной контент
   ============================================= */

.main-content {
    display: grid;
    grid-template-columns: 1.4fr 1fr; /* Среднее значение между 1.5fr и 1.2fr */
    gap: 30px;
    flex: 1;
    align-items: start;
    margin-bottom: 40px;
    margin-top: -10px;
    position: relative;
    z-index: 1;
}

/* =============================================
   Секции формы
   ============================================= */

.form-section {
    display: flex;
    flex-direction: column;
    gap: 20px;
    height: 100%;
    overflow: visible; /* Чтобы котик не обрезался */
    position: relative;
}

.form-card {
    background: white;
    border-radius: 30px;
    position: relative;
    min-height: 100%;
    display: flex;
    flex-direction: column;
    padding: 30px;
    color: #333;
    overflow: visible; /* Чтобы котик не обрезался */
}

.form-cat {
    display: none; /* Скрыт на всех страницах */
    position: absolute;
    left: -175px; /* Сдвинуто левее, чтобы не перекрывать блок */
    top: 50%;
    transform: translateY(-50%);
    width: 192px;
    height: 320px;
    z-index: 1;
    pointer-events: none;
}

.form-cat img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.cart-card {
    background: white;
    border-radius: 30px;
    padding: 30px;
    min-height: 100%;
    display: flex;
    flex-direction: column;
    color: #333;
}

/* Убеждаемся, что все элементы внутри белых карточек имеют темный цвет */
.form-card *,
.cart-card * {
    color: inherit;
}

.form-card input,
.form-card select,
.form-card textarea,
.cart-card input,
.cart-card select,
.cart-card textarea {
    color: #333;
}

.section-title {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 22px;
    font-weight: 600;
    margin-bottom: 25px;
    color: #333;
    position: relative;
}

.section-title > .btn-clear-form {
    margin-left: auto;
}

.title-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: #FFE343;
    border-radius: 12px;
    font-size: 20px;
    font-weight: 700;
    color: #7231FF;
}

.items-count {
    margin-left: auto;
    background: #7231FF;
    color: white;
    padding: 4px 14px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
}

/* =============================================
   Форма добавления продукта
   ============================================= */

.product-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
    flex: 1;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-weight: 500;
    color: #555;
    font-size: 13px;
}

.form-group select,
.form-group input[type="number"],
.form-group input[type="text"],
.form-group textarea,
.layer-group textarea,
.layer-group .form-control {
    padding: 14px 18px;
    border: 2px solid #E0DDEB;
    border-radius: 15px;
    font-family: inherit;
    font-size: 14px;
    background: #FAFAFA;
    color: #333;
    transition: all 0.3s ease;
    outline: none;
}

/* Специфичные стили для textarea */
.form-group textarea,
.layer-group textarea,
.layer-group textarea.form-control {
    resize: vertical;
    min-height: 80px;
    line-height: 1.5;
    width: 100%;
}

.form-group textarea::placeholder,
.layer-group textarea::placeholder,
.layer-group textarea.form-control::placeholder {
    color: #999;
    opacity: 1;
}

/* Скрываем стандартные стрелки для input[type="number"] */
.form-group input[type="number"]::-webkit-inner-spin-button,
.form-group input[type="number"]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    appearance: none;
    margin: 0;
}

/* Для Firefox - скрываем стандартные стрелки */
.form-group input[type="number"] {
    -moz-appearance: textfield;
}

/* Кастомные кнопки для изменения количества */
.quantity-spinner {
    position: absolute;
    right: 4px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 2px;
    pointer-events: none;
}

.quantity-spinner-btn {
    width: 18px;
    height: 14px;
    border: none;
    background: transparent;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    padding: 0;
    font-size: 10px;
    color: #7231FF;
    line-height: 1;
    pointer-events: auto;
    border-radius: 3px;
}

.quantity-spinner-btn:hover {
    background: #F8F6FF;
}

.quantity-spinner-btn:active {
    background: #E0DDEB;
    transform: scale(0.95);
}

.quantity-spinner-btn.up::before {
    content: '▲';
    font-size: 10px;
    line-height: 1;
}

.quantity-spinner-btn.down::before {
    content: '▼';
    font-size: 10px;
    line-height: 1;
}

.form-group select:focus,
.form-group input:focus,
.form-group textarea:focus,
.layer-group textarea:focus,
.layer-group .form-control:focus {
    border-color: #7231FF;
    background: white;
    box-shadow: 0 0 0 3px rgba(114, 49, 255, 0.1);
}

.form-group select:disabled,
.form-group textarea:disabled,
.layer-group textarea:disabled,
.layer-group .form-control:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Обертка для поля ввода количества и кнопок */
.quantity-input-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.quantity-input-container {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.quantity-input-wrapper input {
    flex: 0 0 auto;
    width: 100px;
    transition: all 0.3s ease;
}

/* Подсветка поля ввода количества при выборе через кнопки */
input.quantity-input-highlighted,
#quantity.quantity-input-highlighted,
#layer-input-quantity.quantity-input-highlighted,
input[type="number"].quantity-input-highlighted {
    background-color: #F0EBFF !important;
    border-color: #7231FF !important;
    box-shadow: 0 0 0 3px rgba(114, 49, 255, 0.15) !important;
    transform: scale(1.02);
}

/* Быстрые кнопки количества */
.quantity-quick-buttons {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.quantity-quick-btn {
    width: 70px;
    min-width: 50px;
    padding: 14px 8px;
    border: 2px solid #E0DDEB;
    background: #FAFAFA;
    border-radius: 15px;
    font-family: inherit;
    font-size: 14px;
    font-weight: 500;
    color: #333;
    cursor: pointer;
    transition: all 0.2s ease;
    outline: none;
    display: flex;
    align-items: center;
    justify-content: center;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    box-sizing: border-box;
}

.quantity-quick-btn:hover {
    border-color: #7231FF;
    background: #F8F6FF;
    transform: translateY(-1px);
}

.quantity-quick-btn:active {
    transform: translateY(0);
}

/* Grid кнопки для выбора опций */
.option-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 8px;
}

.option-button {
    padding: 14px 18px;
    border: 2px solid #E0DDEB;
    background: #FAFAFA;
    border-radius: 15px;
    font-family: inherit;
    font-size: 14px;
    font-weight: 500;
    color: #333;
    cursor: pointer;
    transition: all 0.3s ease;
    outline: none;
    text-align: center;
    white-space: nowrap;
    min-width: 120px;
    flex: 0 1 auto;
    overflow: hidden;
    text-overflow: ellipsis;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

.option-grid.missing-field,
.form-group.missing-field,
input.missing-field {
    animation: shake 0.5s ease;
}

.option-grid.missing-field .option-button {
    border-color: #D32F2F;
    background: #FFEBEE;
    box-shadow: 0 0 0 3px rgba(211, 47, 47, 0.2);
}

input.missing-field,
.custom-size-container.missing-field {
    border-color: #D32F2F !important;
    background: #FFEBEE !important;
}

/* Подсветка поля загрузки файла при ошибке */
.file-upload-group.missing-field .file-upload-area {
    border-color: #D32F2F !important;
    background: #FFEBEE !important;
    box-shadow: 0 0 0 3px rgba(211, 47, 47, 0.2) !important;
}

.file-upload-area.missing-field {
    border-color: #D32F2F !important;
    background: #FFEBEE !important;
    box-shadow: 0 0 0 3px rgba(211, 47, 47, 0.2) !important;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
}

.option-button:hover {
    border-color: #7231FF;
    background: #F8F6FF;
    transform: translateY(-2px);
}

.option-button.active {
    background: linear-gradient(135deg, #FFE343 0%, #FFD600 100%);
    color: #333;
    border-color: #FFE343;
    font-weight: 600;
}

.option-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

/* Сетка для типов цветного акрила с изображениями */
.option-grid.acrylic-types-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 16px;
    margin-top: 12px;
}

.acrylic-type-button {
    padding: 12px;
    border: 2px solid #E0DDEB;
    background: #FAFAFA;
    border-radius: 15px;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.3s ease;
    outline: none;
    text-align: center;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

.acrylic-type-button:hover {
    border-color: #7231FF;
    background: #F8F6FF;
    transform: translateY(-2px);
}

.acrylic-type-button.active {
    background: linear-gradient(135deg, #FFE343 0%, #FFD600 100%);
    border-color: #FFE343;
}

.acrylic-type-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    position: relative;
}

.acrylic-type-img {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: 10px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
    cursor: zoom-in;
    transition: all 0.2s ease;
}

.acrylic-type-img:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
    transform: scale(1.05);
}

.acrylic-type-label {
    font-size: 13px;
    font-weight: 500;
    color: #333;
    text-align: center;
}

.acrylic-type-button.active .acrylic-type-label {
    font-weight: 600;
    color: #333;
}

/* Радиокнопка (точечка) под изображением */
.acrylic-radio-dot {
    width: 20px;
    height: 20px;
    border: 2px solid #7231FF;
    border-radius: 50%;
    background: transparent;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 4px;
    position: relative;
    flex-shrink: 0;
}

.acrylic-radio-dot:hover {
    border-color: #FFE343;
    background: rgba(114, 49, 255, 0.1);
    transform: scale(1.1);
}

.acrylic-type-button.active .acrylic-radio-dot {
    background: #7231FF;
    border-color: #7231FF;
    box-shadow: 0 0 0 3px rgba(114, 49, 255, 0.2);
}

.acrylic-type-button.active .acrylic-radio-dot::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 8px;
    height: 8px;
    background: white;
    border-radius: 50%;
}

/* Модальное окно для просмотра изображений материалов */
.material-image-modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.material-image-modal-content {
    position: relative;
    background: white;
    border-radius: 16px;
    max-width: 90vw;
    max-height: 90vh;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        transform: translateY(30px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.material-image-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid #E0DDEB;
    background: #F8F6FF;
}

.material-image-modal-title {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin: 0;
}

.material-image-modal-close {
    background: none;
    border: none;
    font-size: 28px;
    color: #666;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.material-image-modal-close:hover {
    background: #E0DDEB;
    color: #333;
}

.material-image-modal-body {
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    max-height: calc(90vh - 80px);
    overflow: auto;
}

.material-image-modal-img {
    max-width: 100%;
    max-height: calc(90vh - 120px);
    object-fit: contain;
    border-radius: 8px;
}

/* Кастомный размер */
.custom-size-container {
    margin-top: 15px;
    padding: 15px;
    background: #F8F6FF;
    border-radius: 15px;
    border: 2px dashed #CCB2FA;
}

.custom-size-label {
    display: block;
    font-weight: 500;
    color: #555;
    font-size: 13px;
    margin-bottom: 10px;
}

.custom-size-input-wrapper {
    display: flex;
    gap: 10px;
    margin-bottom: 8px;
}

.custom-size-input {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid #E0DDEB;
    border-radius: 12px;
    font-family: inherit;
    font-size: 14px;
    background: white;
    color: #333;
    transition: all 0.3s ease;
    outline: none;
}

.custom-size-input:focus {
    border-color: #7231FF;
}

.btn-apply-custom {
    padding: 12px 20px;
    background: #7231FF;
    color: white;
    border: none;
    border-radius: 12px;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    font-family: inherit;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.btn-apply-custom:hover {
    background: #5a20e0;
    transform: translateY(-2px);
}

.custom-size-hint {
    font-size: 12px;
    color: #888;
    margin: 0;
    font-style: italic;
}

/* Карточка для ввода произвольного размера в полях типа radio */
.custom-size-card {
    margin-top: 15px;
    padding: 15px;
    background: #F8F6FF;
    border-radius: 15px;
    border: 2px dashed #CCB2FA;
    display: block !important;
    visibility: visible !important;
}

.custom-size-card .custom-size-input-wrapper {
    display: flex;
    gap: 10px;
    align-items: center;
}

.custom-size-card .custom-size-input {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid #E0DDEB;
    border-radius: 12px;
    font-family: inherit;
    font-size: 14px;
    background: white;
    color: #333;
    transition: all 0.3s ease;
    outline: none;
}

.custom-size-card .custom-size-input:focus {
    border-color: #7231FF;
    box-shadow: 0 0 0 3px rgba(114, 49, 255, 0.1);
}

.custom-size-input:disabled {
    background: #f5f5f5;
    color: #999;
    cursor: not-allowed;
    opacity: 0.6;
}

.btn-apply-custom-size:disabled {
    background: #ccc;
    cursor: not-allowed;
    opacity: 0.6;
}

.btn-apply-custom-size:disabled:hover {
    transform: none;
    background: #ccc;
}

.btn-apply-custom-size {
    padding: 12px 16px;
    background: #7231FF;
    color: white;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex !important;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    width: 44px;
    height: 44px;
    font-size: 16px;
    position: relative;
    flex-shrink: 0;
    visibility: visible !important;
    opacity: 1 !important;
}

.btn-apply-custom-size .btn-check-icon {
    display: inline-block;
    font-size: 20px;
    line-height: 1;
    font-weight: bold;
    color: white;
}

.btn-apply-custom-size:hover {
    background: #5a20e0;
    transform: translateY(-2px);
}

.btn-apply-custom-size:active {
    transform: translateY(0);
}

/* Placeholder стили */
.form-group input::placeholder,
.form-group select::placeholder,
.form-group textarea::placeholder,
.layer-group textarea::placeholder,
.promocode-input-group input::placeholder {
    color: #999;
    opacity: 1;
}

/* Checkbox стили */
.extras-group {
    padding: 15px;
    background: #F8F6FF;
    border-radius: 15px;
}

/* Контейнер для позиции допников (рендерится в layers-container) */
.extras-position-container {
    width: 100%;
}

.extras-position-container .extras-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-top: 10px;
}

.extras-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-top: 10px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    padding: 12px;
    background: white;
    border: 2px solid #E0DDEB;
    border-radius: 12px;
    transition: all 0.2s ease;
    position: relative;
    width: 100%;
    z-index: 1;
}

.checkbox-label:hover {
    z-index: 2;
}

.checkbox-label:hover {
    border-color: #7231FF;
    background: #F8F6FF;
    transform: translateY(-2px);
}

.checkbox-label input[type="checkbox"] {
    display: none;
}

.checkmark {
    width: 22px;
    height: 22px;
    border: 2px solid #E0DDEB;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    flex-shrink: 0;
    pointer-events: none;
}

.checkbox-label input:checked + .checkmark {
    background: #7231FF;
    border-color: #7231FF;
}

.checkbox-label input:checked + .checkmark::after {
    content: '✓';
    color: white;
    font-size: 14px;
    font-weight: bold;
}

.checkbox-label input:checked ~ .checkbox-content {
    color: #7231FF;
}

.checkbox-label:has(input:checked) {
    border-color: #7231FF;
    background: #F8F6FF;
}

.checkbox-content {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    pointer-events: none;
    color: #555;
    transition: color 0.2s ease;
    position: relative;
    width: 100%;
}

.checkbox-icon {
    font-size: 24px;
    line-height: 1;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    pointer-events: none;
}

.checkbox-icon .icon-svg {
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.checkbox-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
    pointer-events: none;
}

.checkbox-title {
    font-size: 13px;
    font-weight: 500;
    line-height: 1.3;
}

/* Обёртка для иконки подсказки */
.extra-hint-wrapper {
    margin-left: auto;
    pointer-events: auto !important;
    position: relative;
    z-index: 1;
    flex-shrink: 0;
    isolation: isolate;
}

.extra-hint-icon {
    font-size: 20px;
    color: #999;
    cursor: help;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    position: relative;
    z-index: 1;
}

.extra-hint-wrapper:hover .extra-hint-icon {
    color: #7231FF;
    transform: scale(1.15);
}

/* Кастомный tooltip */
.extra-tooltip {
    position: absolute;
    bottom: calc(100% + 12px);
    right: 0;
    background: linear-gradient(135deg, #7231FF 0%, #5a26cc 100%);
    color: white;
    padding: 14px 18px;
    border-radius: 15px;
    font-size: 13px;
    line-height: 1.5;
    white-space: normal;
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
    box-shadow: 0 6px 20px rgba(114, 49, 255, 0.4);
    z-index: 100000 !important;
    min-width: 280px;
    max-width: 350px;
    text-align: left;
    word-wrap: break-word;
}

.extra-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    right: 24px;
    border: 8px solid transparent;
    border-top-color: #7231FF;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

.extra-hint-wrapper:hover .extra-tooltip {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.extra-hint-wrapper:hover .extra-hint-icon {
    z-index: 0;
}

.checkbox-price {
    font-size: 12px;
    color: #7231FF;
    font-weight: 600;
}

/* Предварительный расчет */
.preview-price {
    background: linear-gradient(135deg, #F8F6FF 0%, #EDE8FF 100%);
    border-radius: 15px;
    padding: 20px;
    border: none;
}

.preview-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    font-size: 14px;
    color: #666;
}

.preview-row.furniture-price {
    /* Теперь такой же стиль как у "Изделие" */
    font-size: 14px;
    color: #666;
    padding: 8px 0;
}

.preview-row.unit-price-row {
    font-size: 13px;
    color: #666;
    padding: 6px 0;
    border-top: 1px dashed #E0DDEB;
    margin-top: 4px;
}

.preview-row.total {
    border-top: 2px solid #CCB2FA;
    margin-top: 10px;
    padding-top: 15px;
    font-size: 18px;
    font-weight: 600;
    color: #7231FF;
}

/* Контейнер кнопок формы */
.form-buttons-container {
    display: flex;
    gap: 15px;
    width: 100%;
    margin-top: 20px;
}

/* По умолчанию одна кнопка - она занимает всю ширину */
.form-buttons-container .btn-add {
    width: 100%;
}

/* Когда одна кнопка (явно указано) - она занимает всю ширину */
.form-buttons-container.single-button .btn-add {
    width: 100%;
}

/* Когда две кнопки - они рядом (отмена слева, сохранить справа) и одинаковой ширины */
.form-buttons-container.has-cancel-button {
    justify-content: space-between;
}

.form-buttons-container.has-cancel-button .btn-cancel-changes,
.form-buttons-container.has-cancel-button .btn-add {
    flex: 1 1 0;
    min-width: 0;
}

/* Кнопка добавления */
.btn-add {
    background: linear-gradient(135deg, #FFE343 0%, #FFD600 100%);
    color: #333;
    border: none;
    padding: 18px 30px;
    border-radius: 20px;
    font-family: inherit;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

.btn-add:hover {
    transform: translateY(-3px);
}

.btn-add:active {
    transform: translateY(1px);
}

/* Режим редактирования товара - фиолетовый как у промокода */
.btn-add.editing-mode {
    background: #7231FF;
    color: white;
}

.btn-add.editing-mode:hover {
    background: #5a26cc;
    transform: translateY(-2px);
}

.btn-add.editing-mode:active {
    transform: translateY(1px);
}

/* Режим редактирования заказа */
.editing-order-mode {
    background: linear-gradient(135deg, #FF9800 0%, #F57C00 100%) !important;
}

.btn-cancel-edit {
    margin-left: 10px;
    padding: 10px 20px;
    background: #f5f5f5;
    color: #666;
    border: 2px solid #ddd;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-cancel-edit:hover {
    background: #e0e0e0;
    border-color: #bbb;
}

/* Кнопка отмены изменений при редактировании товара - красный как у кнопки очистить */
.btn-cancel-changes {
    background: #FFE0E0;
    color: #D32F2F;
    border: none;
    padding: 18px 30px;
    border-radius: 20px;
    font-family: inherit;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

.btn-cancel-changes:hover {
    background: #D32F2F;
    color: white;
    transform: translateY(-2px);
}

.btn-cancel-changes:active {
    transform: translateY(1px);
}

/* =============================================
   Блок промокодов
   ============================================= */

/* Стили для модального окна промокода */
#promocode-modal .modal-body {
    padding: 25px 30px;
}

#promocode-modal .active-promocodes {
    margin-top: 20px;
    max-height: 300px;
    overflow-y: auto;
}

.promocode-input-group {
    display: flex;
    gap: 10px;
}

.promocode-input-group input {
    flex: 1;
    text-transform: uppercase;
    color: #333;
}

.btn-apply {
    padding: 14px 24px;
    background: #7231FF;
    color: white;
    border: none;
    border-radius: 15px;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    font-family: inherit;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.btn-apply:hover {
    background: #5a20e0;
    transform: translateY(-2px);
}

.active-promocodes {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 15px;
}

.promocode-tag {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 15px;
    background: white;
    border-radius: 12px;
    border: 2px solid #E0DDEB;
    font-size: 13px;
    color: #333;
}

.promocode-tag .type {
    padding: 4px 10px;
    border-radius: 8px;
    font-size: 11px;
    font-weight: 600;
    color: white;
}

.promocode-tag .type.tier-up {
    background: #4CAF50;
}

.promocode-tag .type.fixed {
    background: #2196F3;
}

.promocode-tag .type.lowest {
    background: #FF9800;
}

.promocode-tag .type.percent {
    background: #E91E63;
}

.promocode-tag .type.fixed-discount {
    background: #9C27B0;
}

.promocode-tag .name {
    flex: 1;
    font-weight: 500;
    color: #333;
}

.promocode-tag .category {
    color: #888;
    font-size: 12px;
}

.promocode-tag .remove {
    width: 24px;
    height: 24px;
    border: none;
    background: #FFE0E0;
    color: #D32F2F;
    border-radius: 50%;
    cursor: pointer;
    font-size: 16px;
    line-height: 1;
    transition: all 0.2s ease;
}

.promocode-tag .remove:hover {
    background: #D32F2F;
    color: white;
}

.promocode-info {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #E0DDEB;
}

.info-title {
    font-size: 12px;
    font-weight: 600;
    color: #888;
    margin-bottom: 10px;
}

.info-list {
    list-style: none;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.info-list li {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: #666;
}

.promo-type {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 20px;
    border-radius: 5px;
    font-size: 9px;
    font-weight: 700;
    color: white;
}

.promo-type.tier-up {
    background: #4CAF50;
}

.promo-type.fixed {
    background: #2196F3;
}

.promo-type.lowest {
    background: #FF9800;
}

.promo-type.percent {
    background: #E91E63;
}

.promo-type.fixed-discount {
    background: #9C27B0;
}

/* =============================================
   Корзина
   ============================================= */

.cart-section {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-width: 0; /* Позволяет секции сжиматься в grid */
    width: 100%; /* Фиксированная ширина для стабильности */
}

.cart-card {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 100%;
    width: 100%; /* Фиксированная ширина для стабильности */
    box-sizing: border-box; /* Учитываем padding в ширине */
}

.cart-items {
    flex: 1;
    min-height: 300px;
    max-height: 500px;
    overflow-y: auto;
    margin-bottom: 20px;
    padding-right: 10px;
    padding-top: 4px; /* Место для поднятия карточек при hover */
}

/* Скроллбар */
.cart-items::-webkit-scrollbar {
    width: 6px;
}

.cart-items::-webkit-scrollbar-track {
    background: #F0F0F0;
    border-radius: 3px;
}

.cart-items::-webkit-scrollbar-thumb {
    background: #CCB2FA;
    border-radius: 3px;
}

.cart-items::-webkit-scrollbar-thumb:hover {
    background: #7231FF;
}

.empty-cart {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #AAA;
    text-align: center;
    padding: 40px;
}

.empty-icon {
    font-size: 60px;
    margin-bottom: 15px;
    opacity: 0.5;
}

.empty-cart p {
    font-size: 14px;
}

/* Элемент корзины */
.cart-item {
    background: #F8F6FF;
    border-radius: 15px;
    padding: 18px;
    margin-bottom: 12px;
    border: 2px solid #E0DDEB;
    transition: all 0.3s ease;
    position: relative;
    display: flex;
    flex-direction: row;
    gap: 16px;
    align-items: flex-start;
    width: 100%; /* Фиксированная ширина для стабильности */
    min-width: 0; /* Позволяет контенту сжиматься */
    box-sizing: border-box; /* Учитываем padding и border в ширине */
}

.cart-item-image {
    flex-shrink: 0;
    width: 120px;
    height: 120px;
    max-height: 120px;
    overflow: hidden;
    border-radius: 10px;
    background: #FAFAFA;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cart-item-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 10px;
    background: #FAFAFA;
}

.cart-item-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0; /* Позволяет контенту сжиматься */
    width: 100%; /* Фиксированная ширина для стабильности */
    overflow: hidden; /* Предотвращаем выход контента за границы */
}

.cart-item:hover {
    border-color: #7231FF;
    background: #F0EBFF;
    transform: translateY(-2px);
}

.cart-item-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0;
    width: 100%; /* Фиксированная ширина для стабильности */
    min-width: 0; /* Позволяет контенту сжиматься */
    box-sizing: border-box; /* Учитываем padding в ширине */
}

.cart-item-title {
    font-weight: 600;
    font-size: 15px;
    color: #333;
    flex: 1; /* Занимает доступное пространство */
    min-width: 0; /* Позволяет тексту обрезаться при необходимости */
    overflow: hidden; /* Скрываем переполнение */
    text-overflow: ellipsis; /* Добавляем многоточие при переполнении */
    white-space: nowrap; /* Запрещаем перенос строк */
}

.cart-item-actions {
    display: flex;
    gap: 6px;
    align-items: center;
    flex-shrink: 0; /* Не позволяет сжиматься */
    margin-left: auto; /* Прижимаем к правому краю */
}

.cart-item-edit {
    width: 28px;
    height: 28px;
    border: none;
    background: #FFF4E6;
    color: #F57C00;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    line-height: 1;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    margin: 0;
    vertical-align: middle;
}

.cart-item-edit:hover {
    background: #F57C00;
    color: white;
    transform: scale(1.05);
}

.cart-item-duplicate {
    width: 28px;
    height: 28px;
    border: none;
    background: #E8F0FF;
    color: #1976D2;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    line-height: 1;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    margin: 0;
    vertical-align: middle;
}

.cart-item-duplicate:hover {
    background: #1976D2;
    color: white;
    transform: scale(1.05);
}

.cart-item-remove {
    width: 28px;
    height: 28px;
    border: none;
    background: #FFE0E0;
    color: #D32F2F;
    border-radius: 8px;
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    margin: 0;
    vertical-align: middle;
}

.cart-item-remove:hover {
    background: #D32F2F;
    color: white;
}

/* Анимация загрузки при изменении количества товара */
.cart-item.updating-quantity {
    position: relative;
    opacity: 0.7;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

.cart-item.updating-quantity::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.8);
    z-index: 10;
    border-radius: 15px;
}

.cart-item.updating-quantity::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 32px;
    height: 32px;
    margin: -16px 0 0 -16px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #007bff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    z-index: 11;
}

/* Анимация загрузки при удалении товара */
.cart-item.removing-item {
    position: relative;
    opacity: 0.5;
    pointer-events: none;
    transition: opacity 0.3s ease, transform 0.3s ease;
    transform: scale(0.95);
}

.cart-item.removing-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(220, 53, 69, 0.1);
    z-index: 10;
    border-radius: 15px;
}

.cart-item.removing-item::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 32px;
    height: 32px;
    margin: -16px 0 0 -16px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #dc3545;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    z-index: 11;
}

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

.cart-item-details {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 0;
    width: 100%; /* Фиксированная ширина для стабильности */
    min-width: 0; /* Позволяет контенту сжиматься */
    box-sizing: border-box; /* Учитываем padding в ширине */
}

.cart-item-tag {
    display: inline-flex;
    padding: 4px 10px;
    background: #E8E4F0;
    border-radius: 8px;
    font-size: 12px;
    color: #666;
}

.cart-item-tag.promo {
    background: #E8F5E9;
    color: #2E7D32;
}

.cart-item-extras {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 0;
}

.cart-item-extra {
    display: inline-flex;
    padding: 3px 8px;
    background: #FFF8E1;
    border-radius: 6px;
    font-size: 11px;
    color: #F57C00;
}

/* Фурнитура в карточке товара */
.cart-item-furniture {
    margin: 8px 0;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.2s ease;
}

.cart-item-furniture:hover {
    border-color: var(--primary-color, #4A90A4);
    box-shadow: 0 2px 8px rgba(74, 144, 164, 0.15);
}

.cart-furniture-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    font-size: 12px;
    font-weight: 500;
    color: #495057;
}

.cart-furniture-toggle i:first-child {
    color: var(--primary-color, #4A90A4);
    font-size: 12px;
}

.cart-furniture-arrow {
    margin-left: auto;
    font-size: 10px;
    color: #6c757d;
    transition: transform 0.2s ease;
}

.cart-furniture-arrow.expanded {
    transform: rotate(180deg);
}

.cart-furniture-details {
    padding: 10px;
    background: #fff;
    border-top: 1px solid #e0e0e0;
}

.cart-furniture-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px;
    margin-bottom: 6px;
    background: #f8f9fa;
    border-radius: 6px;
}

.cart-furniture-item:last-child {
    margin-bottom: 0;
}

.cart-furniture-img {
    width: 36px;
    height: 36px;
    object-fit: cover;
    border-radius: 4px;
    border: 1px solid #e0e0e0;
}

.cart-furniture-icon {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f0f0f0;
    border-radius: 4px;
    color: #6c757d;
    font-size: 16px;
}

.cart-furniture-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
    min-width: 0;
}

.cart-furniture-name {
    font-size: 12px;
    font-weight: 500;
    color: #333;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cart-furniture-price {
    font-size: 11px;
    color: var(--primary-color, #4A90A4);
    font-weight: 600;
}

.cart-furniture-no-ring {
    opacity: 0.7;
}

.cart-furniture-no-ring .cart-furniture-name {
    color: #6c757d;
    font-style: italic;
}

.cart-item-footer {
    display: flex;
    justify-content: space-between; /* Распределяем пространство между элементами */
    align-items: center;
    padding-top: 8px;
    margin-top: auto;
    border-top: 1px dashed #E0DDEB;
    gap: 12px; /* Отступ между элементами */
    width: 100%; /* Фиксированная ширина для стабильности */
    box-sizing: border-box; /* Учитываем padding в ширине */
    flex-wrap: nowrap; /* Запрещаем перенос элементов */
}

/* Группируем элементы слева (кнопки количества и цена за единицу) */
.cart-item-footer > .cart-item-quantity-controls,
.cart-item-footer > .cart-item-qty {
    flex-shrink: 0; /* Не сжимаются */
}

/* Цена прижимается к правому краю */
.cart-item-footer > .cart-item-price {
    margin-left: auto; /* Прижимаем цену к правому краю */
}

.cart-item-qty {
    font-size: 13px;
    color: #888;
    display: inline-block; /* Упрощаем отображение */
    line-height: 1;
    white-space: nowrap;
    text-align: left; /* Выравнивание текста слева */
    flex-shrink: 0; /* Не сжимается */
    margin-right: 8px; /* Отступ справа */
}

.cart-item-price {
    font-size: 18px;
    font-weight: 600;
    color: #7231FF;
    display: inline-block; /* Упрощаем отображение */
    line-height: 1;
    white-space: nowrap;
    text-align: right; /* Выравнивание текста справа */
    flex-shrink: 0; /* Не сжимается */
    min-width: fit-content; /* Ширина по содержимому */
}

.cart-item-unit-price {
    font-size: 12px;
    color: #888;
    font-weight: 400;
}

/* Группированные элементы */
.cart-item.grouped {
    border-left: 4px solid #7231FF;
}

.cart-item-group-info {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
    padding: 10px 12px;
    background: linear-gradient(135deg, #E8F5E9 0%, #C8E6C9 100%);
    border-radius: 10px;
    font-size: 12px;
    color: #2E7D32;
}

.cart-item-group-info .group-icon {
    font-size: 14px;
}

.cart-item-group-info .group-text {
    font-weight: 500;
}

.cart-item-promo-tier-info {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
    padding: 10px 12px;
    background: linear-gradient(135deg, #FFF3E0 0%, #FFE0B2 100%);
    border-radius: 10px;
    font-size: 12px;
    color: #E65100;
}

.cart-item-promo-tier-info .promo-tier-icon {
    font-size: 14px;
}

.cart-item-promo-tier-info .promo-tier-text {
    font-weight: 500;
}

/* Итоги */
.cart-summary {
    background: linear-gradient(135deg, #F8F6FF 0%, #EDE8FF 100%);
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 15px;
    position: sticky;
    width: 100%; /* Фиксированная ширина для стабильности */
    box-sizing: border-box; /* Учитываем padding в ширине */
    top: 20px;
    z-index: 10;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    font-size: 15px;
    width: 100%; /* Фиксированная ширина для стабильности */
    box-sizing: border-box; /* Учитываем padding в ширине */
}

.summary-row > span:first-child {
    flex: 1; /* Занимает доступное пространство */
    min-width: 0; /* Позволяет тексту обрезаться при необходимости */
    text-align: left; /* Выравнивание текста слева */
}

.summary-row > span:last-child {
    flex-shrink: 0; /* Не позволяет сжиматься */
    min-width: 100px; /* Фиксированная минимальная ширина для цен */
    text-align: right; /* Выравнивание цен справа */
    white-space: nowrap; /* Запрещаем перенос строк */
}

.summary-row.discount {
    color: #4CAF50;
}

.summary-row.total {
    border-top: 2px solid #CCB2FA;
    margin-top: 10px;
    padding-top: 15px;
    font-size: 22px;
    font-weight: 700;
    color: #7231FF;
}

/* Кнопки действий */
.cart-actions {
    display: flex;
    gap: 12px;
}

.btn-clear,
.btn-export,
.btn-promocode,
.btn-create-order {
    flex: 1;
    padding: 15px 20px;
    border: none;
    border-radius: 15px;
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

.btn-promocode {
    background: #7231FF;
    color: white;
}

.btn-promocode:hover {
    transform: translateY(-2px);
}

.btn-promocode.active {
    background: #FFB74D;
    color: #E65100;
    transform: translateY(1px);
    font-weight: 700;
}

.btn-clear {
    background: #FFE0E0;
    color: #D32F2F;
}

.btn-clear:hover {
    background: #D32F2F;
    color: white;
}

/* Кнопка очистки формы в заголовке */
.btn-clear-form {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 20px;
    background: #FFE0E0;
    color: #D32F2F;
    border: none;
    border-radius: 15px;
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    margin-left: auto;
}

.btn-clear-form:hover {
    background: #D32F2F;
    color: white;
    transform: translateY(-2px);
}

.btn-clear-form:active {
    transform: translateY(1px);
}

.btn-clear-form i {
    font-size: 14px;
}

.btn-clear-form span {
    font-size: 14px;
}

.btn-export {
    background: linear-gradient(135deg, #FFE343 0%, #FFD600 100%);
    color: #333;
}

.btn-export:hover {
    transform: translateY(-2px);
}

.btn-create-order {
    background: linear-gradient(135deg, #FFE343 0%, #FFD600 100%);
    color: #333;
    border: 2px solid #FFE343;
    font-weight: 600;
}

.btn-create-order:hover {
    background: linear-gradient(135deg, #FFD600 0%, #FFC700 100%);
    border-color: #FFD600;
    transform: translateY(-2px);
}

/* =============================================
   Модальное окно
   ============================================= */

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(5px);
    padding: 20px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch; /* Плавная прокрутка на iOS */
}

.modal.active {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: 25px;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    animation: modalSlideIn 0.3s ease;
    color: #333;
    margin: auto;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 25px 30px;
    border-bottom: 1px solid #E0DDEB;
}

.modal-header h3 {
    font-size: 20px;
    font-weight: 600;
    color: #333;
}

.modal-close {
    width: 36px;
    height: 36px;
    border: none;
    background: #F0F0F0;
    color: #666;
    border-radius: 10px;
    cursor: pointer;
    font-size: 24px;
    line-height: 1;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    margin: 0;
}

.modal-close:hover {
    background: #7231FF;
    color: white;
}

.modal-body {
    padding: 25px 30px;
    flex: 1;
    overflow-y: auto;
}

.modal-body textarea {
    width: 100%;
    height: 300px;
    border: 2px solid #E0DDEB;
    border-radius: 15px;
    padding: 15px;
    font-family: 'Roboto Mono', monospace;
    font-size: 13px;
    resize: none;
    background: #FAFAFA;
    color: #333;
    line-height: 1.6;
}

.modal-body textarea:focus {
    outline: none;
    border-color: #7231FF;
}

.modal-footer {
    padding: 20px 30px;
    border-top: 1px solid #E0DDEB;
    display: flex;
    justify-content: flex-end;
}

.modal-footer .btn-add,
.modal-footer .btn-clear {
    padding: 12px 24px;
    min-width: 120px;
    flex: 1;
    max-width: 200px;
}

#clear-cart-confirm-modal .modal-content {
    max-width: 400px;
}

#clear-form-confirm-modal .modal-content {
    max-width: 500px;
}

.clear-form-modal-footer,
.clear-cart-modal-footer {
    gap: 10px;
    padding: 20px 0 !important;
    margin: 0 30px;
}

.clear-form-modal-footer .btn-cancel,
.clear-form-modal-footer .btn-danger,
.clear-cart-modal-footer .btn-cancel,
.clear-cart-modal-footer .btn-danger {
    flex: 1;
    min-width: 0;
    margin: 0;
    width: 100%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: 16px;
    font-size: 14px;
    font-weight: 600;
    font-family: "Unbounded", sans-serif;
    cursor: pointer;
    transition: all 0.3s ease;
    min-height: 44px;
    box-sizing: border-box;
}

.clear-form-modal-footer .btn-cancel,
.clear-cart-modal-footer .btn-cancel {
    background: transparent;
    border: 2px solid #888;
    color: #888;
}

.clear-form-modal-footer .btn-cancel:hover,
.clear-cart-modal-footer .btn-cancel:hover {
    background: #f8f9fa;
    border-color: #666;
    color: #666;
    transform: translateY(-2px);
}

.clear-form-modal-footer .btn-cancel:active,
.clear-cart-modal-footer .btn-cancel:active {
    transform: translateY(0);
}

.clear-form-modal-footer .btn-danger,
.clear-cart-modal-footer .btn-danger {
    background: #d32f2f;
    color: white;
    border: none;
}

.clear-form-modal-footer .btn-danger:hover,
.clear-cart-modal-footer .btn-danger:hover {
    background: #b71c1c;
    transform: translateY(-2px);
}

.clear-form-modal-footer .btn-danger:active,
.clear-cart-modal-footer .btn-danger:active {
    transform: translateY(0);
}

.btn-copy {
    padding: 14px 30px;
    background: #7231FF;
    color: white;
    border: none;
    border-radius: 12px;
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-copy:hover {
    background: #5a20e0;
}

.btn-copy.copied {
    background: #4CAF50;
}

/* =============================================
   Футер
   ============================================= */

/* =============================================
   Навигация
   ============================================= */
.main-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 28px;
    margin-top: 20px;
    margin-bottom: 32px;
    position: relative;
    z-index: 1;
    /* Glassmorphism Effect */
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(40px);
    -webkit-backdrop-filter: blur(40px);
    border: 2px solid rgba(255, 255, 255, 1);
    border-radius: 50px;
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.nav-links {
    display: flex;
    gap: 8px;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    border-radius: 30px;
    border: 1px solid transparent;
    transition: all 0.3s ease;
}

.nav-link i {
    font-size: 16px;
}

.nav-link:hover {
    background: rgba(255, 255, 255, 0.08);
    color: white;
    border-color: rgba(255, 255, 255, 0.15);
}

.nav-link.active {
    background: rgba(255, 255, 255, 0.15);
    color: white;
    border-color: rgba(255, 255, 255, 0.25);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Иконка аккаунта - круглая */
.nav-actions .nav-link {
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
    padding: 0;
    justify-content: center;
    align-items: center;
    border-radius: 50%;
    overflow: hidden;
    position: relative;
    flex-shrink: 0;
    aspect-ratio: 1 / 1;
}

.nav-actions .nav-link span {
    display: none;
}

.nav-actions .nav-link i {
    margin: 0;
    font-size: 18px;
}

/* Аватар в навигации */
.nav-actions .nav-link img {
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
    object-fit: cover;
    border-radius: 50%;
    display: block;
    flex-shrink: 0;
}

.nav-cart {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    font-size: 18px;
    border-radius: 50%;
    border: 1px solid transparent;
    transition: all 0.3s ease;
}

.nav-cart:hover {
    background: rgba(255, 255, 255, 0.15);
    color: white;
    border-color: rgba(255, 255, 255, 0.25);
    transform: translateY(-1px);
}

.cart-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 18px;
    height: 18px;
    background: #FF4444;
    color: white;
    border-radius: 9px;
    font-size: 11px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 5px;
    box-sizing: border-box;
    line-height: 18px;
    text-align: center;
}

/* Footer */
.footer {
    margin-top: 40px;
    position: relative;
    z-index: 1;
    /* Glass Effect - светлое стекло с blur */
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(40px);
    -webkit-backdrop-filter: blur(40px);
    border: 2px solid rgba(255, 255, 255, 1);
    border-radius: 30px;
    padding: 28px 32px;
    color: white;
    box-shadow: 
        0 -4px 30px rgba(0, 0, 0, 0.06),
        inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.footer-content {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 32px;
    margin-bottom: 20px;
}

.footer-links {
    display: flex;
    gap: 8px;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    padding: 10px 16px;
    border-radius: 20px;
    border: 1px solid transparent;
    transition: all 0.3s ease;
}

.footer-links a:hover {
    color: white;
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
}

.footer-social {
    display: flex;
    gap: 10px;
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-top-color: rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    color: rgba(255, 255, 255, 0.85);
    font-size: 20px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.social-link:hover {
    background: rgba(255, 255, 255, 0.08);
    color: white;
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.footer-copyright {
    text-align: center;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.45);
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    word-wrap: break-word;
    overflow-wrap: break-word;
    max-width: 100%;
    box-sizing: border-box;
}

/* Адаптивность для мобильных устройств */
@media (max-width: 768px) {
    /* Навигация для мобильных */
    /* Навигация - используем единые стили из common.css */
    
    /* Footer для мобильных */
    .footer {
        padding: 20px 16px;
        margin-top: 32px;
        border-radius: 20px;
        overflow-x: hidden;
        word-wrap: break-word;
        overflow-wrap: break-word;
        box-sizing: border-box;
        max-width: 100%;
    }
    
    .footer-content {
        gap: 20px;
        margin-bottom: 16px;
        flex-wrap: wrap;
    }
    
    .footer-links {
        gap: 8px;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .footer-links a {
        padding: 8px 12px;
        font-size: 14px;
        white-space: nowrap;
        word-wrap: normal;
        overflow-wrap: normal;
    }
    
    .footer-social {
        gap: 8px;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .social-link {
        width: 40px;
        height: 40px;
        font-size: 18px;
        flex-shrink: 0;
    }
    
    .footer-copyright {
        font-size: 11px;
        padding-top: 16px;
        word-wrap: break-word;
        overflow-wrap: break-word;
        max-width: 100%;
    }
}

@media (max-width: 480px) {
    /* Навигация - используем единые стили из common.css */
    
    .footer {
        padding: 16px 12px;
        border-radius: 16px;
        overflow-x: hidden;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }
    
    .footer-links {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .footer-links a {
        padding: 6px 10px;
        font-size: 13px;
        white-space: nowrap;
    }
    
    .footer-social {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .social-link {
        width: 36px;
        height: 36px;
        font-size: 16px;
        flex-shrink: 0;
    }
    
    .footer-copyright {
        word-wrap: break-word;
        overflow-wrap: break-word;
        max-width: 100%;
    }
}

/* =============================================
   Уведомления
   ============================================= */

/* =============================================
   Единая система уведомлений
   ============================================= */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 25px;
    border-radius: 12px;
    color: white;
    font-size: 14px;
    font-weight: 500;
    z-index: 2000;
    animation: slideInNotification 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    width: fit-content;
    max-width: 400px;
    word-wrap: break-word;
}

/* Успешные операции */
.notification.success {
    background: #4CAF50;
}

/* Ошибки */
.notification.error {
    background: #F44336;
}

/* Предупреждения */
.notification.warning {
    background: #FFC107;
    color: #333;
}

@keyframes slideInNotification {
    from {
        opacity: 0;
        transform: translateX(100px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* =============================================
   Выбор типа заказа (индивидуальный/коллект)
   ============================================= */

.order-type-selector {
    margin-bottom: 1.5rem;
    padding: 1.25rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.order-type-selector .form-group {
    margin-bottom: 1rem;
}

.order-type-selector .form-group:last-child {
    margin-bottom: 0;
}

.order-type-selector label {
    color: #333;
    font-weight: 600;
    margin-bottom: 0.75rem;
    display: block;
}

.order-type-selector .radio-group {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.order-type-selector .form-check {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.order-type-selector .form-check-input {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #7231FF;
}

.order-type-selector .form-check-label {
    color: #333;
    font-weight: 500;
    cursor: pointer;
    user-select: none;
}

.order-type-selector .form-check-input:checked + .form-check-label {
    color: #7231FF;
    font-weight: 600;
}

.order-type-selector select.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    background: white;
    color: #333;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.order-type-selector select.form-control:focus {
    outline: none;
    border-color: #7231FF;
    box-shadow: 0 0 0 3px rgba(114, 49, 255, 0.1);
}

.order-type-selector select.form-control:invalid {
    border-color: #dc3545;
}

/* =============================================
   Адаптивность
   ============================================= */

/* Планшеты (768px - 1024px) */
@media (max-width: 1024px) {
    .main-content {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .cart-items {
        max-height: 400px;
    }
    
    .option-button {
        min-width: 110px;
        padding: 13px 17px;
        font-size: 12px;
        white-space: normal;
        word-wrap: break-word;
        line-height: 1.3;
    }
    
    .form-card,
    .cart-card {
        padding: 25px;
        border-radius: 25px;
    }
    
    .form-cat {
        display: none; /* Скрываем котика, когда он выезжает за границы экрана */
    }
    
    .title-cloud {
        display: none; /* Скрываем облака на планшетах */
    }
}

/* Планшеты в портретной ориентации (до 1200px) */
@media (max-width: 1200px) {
    .main-content {
        grid-template-columns: 1fr;
    }
    
    .cart-items {
        max-height: 350px;
    }
    
    .option-button {
        min-width: 100px;
        padding: 12px 16px;
        font-size: 11px;
        white-space: normal;
        word-wrap: break-word;
        line-height: 1.3;
    }
    
    .form-cat {
        display: none; /* Скрываем котика на планшетах */
    }
    
    .title-cloud {
        display: none; /* Скрываем облака на планшетах */
    }
}

/* Мобильные устройства (до 768px) */
@media (max-width: 768px) {
    .container {
        padding: 0 12px !important;
    }
    
    .header {
        padding: 15px 0 25px;
    }
    
    .logo {
        position: static;
        margin-bottom: 15px;
        text-align: center;
    }
    
    .title-with-clouds {
        gap: 20px;
    }
    
    .title-cloud {
        display: none; /* Скрываем облака на мобильных устройствах */
    }
    
    .main-title {
        font-size: 42px;
        letter-spacing: 1px;
    }
    
    .back-link {
        font-size: 0; /* Скрываем текст */
        padding: 12px; /* Уменьшаем padding для круглой кнопки */
        width: 44px; /* Фиксированная ширина для круглой кнопки */
        height: 44px; /* Фиксированная высота для круглой кнопки */
        border-radius: 50%; /* Делаем кнопку круглой */
        justify-content: center;
        align-items: center;
    }
    
    .back-link::before {
        content: '←';
        font-size: 24px; /* Размер стрелки */
        color: white;
        line-height: 1;
    }
    
    .subtitle {
        font-size: 14px;
    }
    
    .form-card,
    .cart-card {
        padding: 18px;
        border-radius: 20px;
    }
    
    .form-cat {
        display: none; /* Скрываем котика на мобильных устройствах */
    }
    
    /* Модальное окно на мобильных */
    .modal {
        padding: 15px;
    }
    
    .modal-content {
        width: 100%;
        max-width: 100%;
        max-height: 90vh;
        border-radius: 20px;
    }
    
    .modal-header {
        padding: 18px 20px;
    }
    
    .modal-header h3 {
        font-size: 18px;
    }
    
    .modal-close {
        width: 36px;
        height: 36px;
        min-width: 44px;
        min-height: 44px;
    }
    
    .modal-body {
        padding: 18px 20px;
    }
    
    .modal-body textarea {
        height: 300px;
        font-size: 14px;
    }
    
    .modal-footer {
        padding: 18px 20px;
    }
    
    .modal-footer button {
        width: 100%;
        padding: 14px;
        min-height: 44px;
    }
    
    .section-title {
        font-size: 18px;
    }
    
    .title-icon {
        width: 32px;
        height: 32px;
        font-size: 16px;
    }
    
    .promocode-input-group {
        flex-direction: column;
        gap: 10px;
    }
    
    .promocode-input-group input {
        width: 100%;
    }
    
    .promocode-input-group button {
        width: 100%;
        padding: 14px;
    }
    
    .cart-actions {
        flex-direction: column;
        gap: 10px;
    }
    
    .cart-actions button {
        width: 100%;
        padding: 14px;
    }
    
    .option-grid {
        gap: 10px;
    }
    
    .option-button {
        padding: 12px 14px;
        font-size: 11px;
        min-width: 90px;
        white-space: normal;
        word-wrap: break-word;
        line-height: 1.3;
        min-height: 44px; /* Минимальный размер для тач-интерфейса */
    }
    
    .form-group {
        margin-bottom: 18px;
    }
    
    .form-group label {
        font-size: 14px;
        margin-bottom: 10px;
    }
    
    .form-group input,
    .form-group select,
    .form-group textarea,
    .layer-group textarea {
        padding: 14px 16px;
        font-size: 16px; /* Предотвращает зум на iOS */
        min-height: 44px;
    }
    
    .form-group textarea,
    .layer-group textarea {
        min-height: 80px;
    }
    
    .quantity-input-wrapper {
        gap: 10px;
    }
    
    .quantity-input-container {
        width: 100%;
    }
    
    .quantity-input-wrapper input {
        width: 100%;
        min-width: 100%;
        padding: 14px 40px 14px 16px; /* Место для стрелок справа */
        font-size: 16px;
        min-height: 44px;
    }
    
    .quantity-spinner {
        right: 6px;
    }
    
    .quantity-spinner-btn {
        width: 20px;
        height: 16px;
    }
    
    .quantity-quick-buttons {
        width: 100%;
        justify-content: space-between;
        gap: 8px;
    }
    
    .quantity-quick-btn {
        flex: 1;
        min-height: 44px;
        padding: 12px;
        font-size: 14px;
    }
    
    .extras-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 10px;
    }
    
    .checkbox-label {
        padding: 12px;
        min-height: 44px;
    }
    
    .form-buttons-container {
        flex-direction: column;
        gap: 12px;
    }
    
    .form-buttons-container.single-button .btn-add {
        width: 100%;
    }
    
    .form-buttons-container.has-cancel-button {
        flex-direction: column;
    }
    
    .form-buttons-container.has-cancel-button .btn-cancel-changes,
    .form-buttons-container.has-cancel-button .btn-add {
        width: 100%;
    }
    
    .btn-add {
        width: 100%;
        padding: 16px;
        font-size: 16px;
        min-height: 50px;
    }
    
    .btn-cancel-changes {
        width: 100%;
        padding: 16px;
        font-size: 16px;
        min-height: 50px;
    }
    
    .cart-summary {
        position: relative; /* Убираем sticky на мобильных */
        top: 0;
        margin-bottom: 15px;
    }
    
    .cart-item {
        padding: 16px;
        margin-bottom: 12px;
        width: 100%; /* Сохраняем фиксированную ширину на мобильных */
        min-width: 0; /* Позволяем контенту сжиматься */
        box-sizing: border-box; /* Учитываем padding в ширине */
    }
    
    .cart-item-tags {
        flex-wrap: wrap;
        gap: 6px;
    }
    
    .cart-item-tag {
        font-size: 11px;
        padding: 4px 8px;
    }
    
    .cart-item-qty {
        min-width: 90px; /* Уменьшенная ширина для мобильных */
        max-width: 90px;
    }
    
    .cart-item-price {
        min-width: 100px; /* Увеличенная минимальная ширина для мобильных */
        font-size: 16px; /* Немного уменьшаем шрифт на мобильных */
        /* Убрали max-width, чтобы цены не обрезались */
    }
    
    .cart-item-group-info {
        font-size: 11px;
        padding: 8px 10px;
        margin-top: 8px;
    }
    
    .cart-item-promo-tier-info {
        font-size: 11px;
        padding: 8px 10px;
        margin-top: 8px;
    }
}

/* Маленькие мобильные устройства (до 480px) */
@media (max-width: 480px) {
    .container {
        padding: 0 10px !important;
    }
    
    .header {
        padding: 12px 0 20px;
    }
    
    .title-with-clouds {
        gap: 15px;
    }
    
    .title-cloud {
        display: none; /* Скрываем облака на маленьких экранах */
    }
    
    .main-title {
        font-size: 32px;
        letter-spacing: 0.5px;
    }
    
    .subtitle {
        font-size: 13px;
    }
    
    .back-link {
        font-size: 0; /* Скрываем текст */
        padding: 10px; /* Уменьшаем padding для круглой кнопки */
        width: 40px; /* Фиксированная ширина для круглой кнопки */
        height: 40px; /* Фиксированная высота для круглой кнопки */
        border-radius: 50%; /* Делаем кнопку круглой */
        display: inline-flex;
        justify-content: center;
        align-items: center;
    }
    
    .back-link::before {
        content: '←';
        font-size: 20px; /* Размер стрелки */
        color: white;
        line-height: 1;
    }
    
    .form-card,
    .cart-card {
        padding: 15px;
        border-radius: 15px;
    }
    
    .form-cat {
        display: none; /* Скрываем котика на маленьких экранах */
    }
    
    .section-title {
        font-size: 16px;
    }
    
    .title-icon {
        width: 28px;
        height: 28px;
        font-size: 14px;
    }
    
    .form-group {
        margin-bottom: 15px;
    }
    
    .form-group label {
        font-size: 13px;
        margin-bottom: 8px;
    }
    
    .form-group select,
    .form-group input,
    .form-group textarea,
    .layer-group textarea {
        padding: 12px 14px;
        font-size: 16px;
        min-height: 44px;
    }
    
    .form-group textarea,
    .layer-group textarea {
        min-height: 80px;
    }
    
    .option-grid {
        gap: 8px;
    }
    
    .option-button {
        padding: 12px 14px;
        font-size: 13px;
        min-width: 90px;
        min-height: 44px;
        flex: 1 1 calc(50% - 4px); /* Две кнопки в ряд */
    }
    
    .quantity-input-wrapper {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }
    
    .quantity-input-container {
        width: 100%;
    }
    
    .quantity-input-wrapper input {
        width: 100%;
        padding: 14px 40px 14px 14px; /* Место для стрелок справа */
        font-size: 16px;
        min-height: 44px;
    }
    
    .quantity-spinner {
        right: 6px;
    }
    
    .quantity-spinner-btn {
        width: 20px;
        height: 16px;
    }
    
    .quantity-quick-buttons {
        width: 100%;
        gap: 6px;
    }
    
    .quantity-quick-btn {
        flex: 1;
        min-height: 44px;
        padding: 12px 8px;
        font-size: 13px;
    }
    
    .extras-grid {
        grid-template-columns: 1fr;
        gap: 8px;
    }
    
    .checkbox-label {
        padding: 10px;
        min-height: 44px;
    }
    
    .checkbox-title {
        font-size: 13px;
    }
    
    .checkbox-price {
        font-size: 12px;
    }
    
    .btn-add {
        padding: 15px 20px;
        font-size: 15px;
        min-height: 50px;
    }
    
    .cart-item {
        padding: 12px;
        width: 100%; /* Сохраняем фиксированную ширину на маленьких экранах */
        min-width: 0; /* Позволяем контенту сжиматься */
        box-sizing: border-box; /* Учитываем padding в ширине */
    }
    
    .cart-item-title {
        font-size: 14px;
    }
    
    .cart-item-price {
        font-size: 16px;
        min-width: 90px; /* Увеличенная минимальная ширина для маленьких экранов */
        /* Убрали max-width, чтобы цены не обрезались */
    }
    
    .cart-item-qty {
        min-width: 80px; /* Уменьшенная ширина для маленьких экранов */
        max-width: 80px;
        font-size: 12px;
    }
    
    .cart-item-tags {
        flex-wrap: wrap;
        gap: 4px;
    }
    
    .cart-item-tag {
        font-size: 10px;
        padding: 3px 6px;
    }
    
    .cart-item-group-info {
        font-size: 10px;
        padding: 6px 8px;
        margin-top: 6px;
    }
    
    .cart-item-promo-tier-info {
        font-size: 10px;
        padding: 6px 8px;
        margin-top: 6px;
    }
    
    .cart-summary {
        padding: 15px;
    }
    
    .option-grid {
        gap: 8px;
    }
    
    .option-button {
        padding: 12px 14px;
        font-size: 13px;
        min-width: 90px;
        min-height: 44px;
        flex: 1 1 calc(50% - 4px); /* Две кнопки в ряд */
    }
    
    .quantity-input-wrapper {
        flex-direction: column;
        align-items: stretch;
    }
    
    .quantity-input-container {
        width: 100%;
    }
    
    .quantity-input-wrapper input {
        width: 100%;
        padding: 14px 40px 14px 14px; /* Место для стрелок справа */
        font-size: 16px;
        min-height: 44px;
    }
    
    .quantity-spinner {
        right: 6px;
    }
    
    .quantity-spinner-btn {
        width: 20px;
        height: 16px;
    }
    
    .quantity-quick-buttons {
        gap: 6px;
        width: 100%;
        justify-content: space-between;
    }
    
    .quantity-quick-btn {
        padding: 12px 8px;
        font-size: 13px;
        min-height: 44px;
        flex: 1;
    }
    
    .extras-grid {
        grid-template-columns: 1fr;
        gap: 8px;
    }
    
    .checkbox-label {
        padding: 10px;
        min-height: 44px;
    }
    
    .checkbox-icon {
        font-size: 20px;
    }
    
    .checkbox-title {
        font-size: 13px;
    }
    
    .checkbox-price {
        font-size: 12px;
    }
    
    .promocode-tag {
        font-size: 11px;
        padding: 6px 10px;
    }
    
    .custom-size-input-wrapper {
        flex-direction: column;
        gap: 8px;
    }
    
    .custom-size-input-wrapper input {
        width: 100%;
    }
    
    .custom-size-input-wrapper button {
        width: 100%;
    }
    
    /* Модальное окно на маленьких экранах */
    .modal {
        padding: 10px;
    }
    
    .modal-content {
        width: 100%;
        max-width: 100%;
        max-height: 95vh;
        border-radius: 15px;
    }
    
    .modal-header {
        padding: 15px 20px;
    }
    
    .modal-header h3 {
        font-size: 18px;
    }
    
    .modal-close {
        width: 32px;
        height: 32px;
        min-width: 44px; /* Для тач-интерфейса */
        min-height: 44px;
    }
    
    .modal-body {
        padding: 15px 20px;
    }
    
    .modal-body textarea {
        height: 250px;
        padding: 12px;
        font-size: 14px;
    }
    
    .modal-footer {
        padding: 15px 20px;
    }
    
    .modal-footer button {
        width: 100%;
        padding: 14px;
        min-height: 44px;
    }
}

/* Дополнительные улучшения для тач-интерфейса */
@media (hover: none) and (pointer: coarse) {
    /* Стили только для устройств с тач-интерфейсом */
    .option-button:hover,
    .quantity-quick-btn:hover,
    .quantity-spinner-btn:hover,
    .btn-add:hover {
        transform: none; /* Убираем hover-эффекты на тач-устройствах */
    }
    
    .option-button:active,
    .quantity-quick-btn:active,
    .quantity-spinner-btn:active,
    .btn-add:active {
        transform: scale(0.98);
        opacity: 0.9;
    }
    
    .cart-item:hover {
        transform: none;
    }
    
    .cart-item:active {
        transform: scale(0.99);
    }
}

/* Улучшения для ландшафтной ориентации на мобильных */
@media (max-width: 768px) and (orientation: landscape) {
    .header {
        padding: 10px 0 15px;
    }
    
    .title-with-clouds {
        gap: 10px;
    }
    
    .title-cloud {
        width: 60px; /* Увеличено на 20% (было 50px) */
        height: 60px; /* Увеличено на 20% (было 50px) */
    }
    
    .main-title {
        font-size: 36px;
    }
    
    .cart-items {
        max-height: 200px;
    }
    
    .form-card,
    .cart-card {
        padding: 15px;
    }
}

/* Улучшения для очень маленьких экранов */
@media (max-width: 360px) {
    .title-with-clouds {
        gap: 8px;
    }
    
    .title-cloud {
        width: 48px; /* Увеличено на 20% (было 40px) */
        height: 48px; /* Увеличено на 20% (было 40px) */
    }
    
    .main-title {
        font-size: 28px;
    }
    
    .option-button {
        min-width: 80px;
        padding: 10px 12px;
        font-size: 12px;
        flex: 1 1 calc(50% - 4px);
    }
    
    .form-card,
    .cart-card {
        padding: 12px;
    }
    
    .section-title {
        font-size: 15px;
    }
}

/* =============================================
   Анимации
   ============================================= */

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.cart-item {
    animation: slideUp 0.3s ease;
}

/* =============================================
   Состояния
   ============================================= */

.loading {
    pointer-events: none;
    opacity: 0.7;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    border: 2px solid #7231FF;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

/* =============================================
   Загрузка файлов
   ============================================= */

.file-upload-group {
    margin-top: 20px;
}

/* Обёртка для загрузки с превью (как в генераторе чеклистов) */
.image-upload-wrapper {
    display: flex;
    gap: 15px;
    align-items: stretch;
    transition: all 0.3s ease;
    max-height: 400px;
}

.image-upload-wrapper.has-preview .file-upload-area {
    flex: 0 0 50%;
    min-height: auto;
    padding: 20px;
}

.image-upload-wrapper.no-preview .file-upload-area {
    flex: 1;
}

.image-preview-container {
    flex: 0 0 48%;
    display: none;
    position: relative;
    min-height: 250px;
    align-items: center;
    justify-content: center;
}

.image-upload-wrapper.has-preview .image-preview-container {
    display: flex;
}

.preview-img {
    width: 100%;
    height: 100%;
    max-height: 400px;
    object-fit: contain;
    border-radius: 12px;
}

.remove-image {
    position: absolute;
    top: 5px;
    right: 5px;
    background: rgba(220, 53, 69, 0.9);
    color: white;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 14px;
    border: none;
    z-index: 10;
}

.remove-image:hover {
    background: #c82333;
    transform: scale(1.1);
}

.file-upload-area {
    border: 2px dashed #E0DDEB;
    border-radius: 15px;
    padding: 30px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #FAFAFA;
    position: relative;
    min-height: 180px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.file-upload-area:hover {
    border-color: #7231FF;
    background: #F8F6FF;
    transform: translateY(-2px);
}

.file-upload-area.dragover {
    border-color: #FFE343;
    background: #FFFEF0;
}

.file-upload-area.has-file {
    border-color: #28a745;
    background: #F0FFF4;
}

.file-upload-area.loading {
    pointer-events: none;
    opacity: 0.7;
}

.file-upload-area.uploading {
    pointer-events: none;
}

.file-upload-area.uploading .file-upload-content {
    opacity: 0.5;
}

/* Прогресс-бар загрузки */
.upload-progress {
    width: 100%;
    margin-top: 15px;
    padding: 0 10px;
}

.upload-progress-bar {
    width: 100%;
    height: 8px;
    background: #E0DDEB;
    border-radius: 4px;
    overflow: hidden;
    position: relative;
}

.upload-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #7231FF 0%, #FFE343 100%);
    border-radius: 4px;
    width: 0%;
    transition: width 0.3s ease;
    position: relative;
    overflow: hidden;
}

.upload-progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.3),
        transparent
    );
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(100%);
    }
}

.upload-progress-text {
    text-align: center;
    margin-top: 8px;
    font-size: 12px;
    font-weight: 600;
    color: #7231FF;
}

.file-upload-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.file-upload-content i {
    font-size: 48px;
    color: #7231FF;
    margin-bottom: 10px;
}

.file-upload-text {
    font-size: 14px;
    color: #333;
    margin: 0;
}

.file-upload-link {
    color: #7231FF;
    text-decoration: underline;
    cursor: pointer;
    font-weight: 500;
}

.file-upload-hint {
    font-size: 12px;
    color: #888;
    margin: 0;
}

.file-info {
    display: none !important;
}

.file-info-content {
    display: flex;
    align-items: center;
    gap: 12px;
}

.file-info-content i {
    color: #28a745;
    font-size: 20px;
}

.file-name {
    flex: 1;
    font-size: 14px;
    color: #333;
    word-break: break-all;
}

.file-remove-btn {
    background: none;
    border: none;
    color: #dc3545;
    cursor: pointer;
    padding: 5px;
    border-radius: 6px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.file-remove-btn:hover {
    background: #FFEBEE;
    transform: scale(1.1);
}

.duplicate-check-result {
    /* Скрыт по умолчанию - не показываем результаты проверки дубликатов под формой */
    display: none !important;
}

.duplicate-check-result p {
    margin: 0 0 10px 0;
    font-size: 13px;
}

.duplicate-check-result .btn {
    margin-top: 10px;
    margin-right: 10px;
}

/* =============================================
   Модальное окно данных клиента
   ============================================= */

.modal-large {
    max-width: 1400px;
    width: 95%;
}

.modal-large .modal-body {
    max-height: 70vh;
    overflow-y: auto;
}

.modal-large .form-group {
    margin-bottom: 20px;
}

.modal-large .form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #333;
    font-size: 14px;
}

.modal-large .form-group .form-control {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #E0DDEB;
    border-radius: 12px;
    font-size: 14px;
    transition: all 0.3s ease;
    font-family: "Unbounded", sans-serif;
}

.modal-large .form-group .form-control:focus {
    outline: none;
    border-color: #7231FF;
}

.modal-large .form-group textarea.form-control {
    resize: vertical;
    min-height: 80px;
}

.modal-large .radio-group {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.modal-large .form-check {
    display: flex;
    align-items: center;
    gap: 8px;
}

.modal-large .form-check-input {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #7231FF;
}

.modal-large .form-check-label {
    margin: 0;
    cursor: pointer;
    font-weight: 400;
}

.modal-large .text-danger {
    color: #dc3545;
}

.modal-large .text-muted {
    color: #888;
    font-size: 12px;
}

.modal-large .social-accounts-field {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #E0DDEB;
}

.modal-large .modal-footer {
    display: flex;
    gap: 15px;
    padding: 20px 30px;
    border-top: 1px solid #E0DDEB;
    justify-content: flex-end;
}

.modal-large .modal-footer .btn-add,
.modal-large .modal-footer .btn-clear {
    padding: 12px 24px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
}

.modal-large .modal-footer .btn-add {
    background: #7231FF;
    color: white;
}

.modal-large .modal-footer .btn-add:hover {
    background: #5a26cc;
    transform: translateY(-2px);
}

.modal-large .modal-footer .btn-clear {
    background: #F0F0F0;
    color: #666;
}

.modal-large .modal-footer .btn-clear:hover {
    background: #E0E0E0;
    transform: translateY(-2px);
}

/* =============================================
   Кнопки редактирования количества в корзине
   ============================================= */

.cart-item-quantity-controls {
    display: flex;
    align-items: center;
    gap: 0;
    margin: 0;
}

.cart-item-quantity-controls .qty-btn {
    width: 32px;
    height: 36px;
    border: 2px solid #E0DDEB;
    background: white;
    border-radius: 0;
    cursor: pointer;
    font-size: 18px;
    font-weight: 600;
    color: #7231FF;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    font-family: "Unbounded", sans-serif;
    padding: 0;
    margin: 0;
    line-height: 1;
    border-right: none;
}

.cart-item-quantity-controls .qty-btn.qty-down {
    border-top-left-radius: 8px;
    border-bottom-left-radius: 8px;
}

.cart-item-quantity-controls .qty-btn.qty-up {
    border-top-right-radius: 8px;
    border-bottom-right-radius: 8px;
    border-left: none;
    border-right: 2px solid #E0DDEB;
}

.cart-item-quantity-controls .qty-btn:hover {
    background: #7231FF;
    color: white;
    border-color: #7231FF;
    z-index: 1;
    position: relative;
}

.cart-item-quantity-controls .qty-input {
    width: 50px;
    height: 36px;
    text-align: center;
    padding: 8px 4px;
    border: 2px solid #E0DDEB;
    border-radius: 0;
    border-left: none;
    border-right: none;
    font-size: 14px;
    font-weight: 700;
    background: white;
    -moz-appearance: textfield;
}

.cart-item-quantity-controls .qty-input::-webkit-outer-spin-button,
.cart-item-quantity-controls .qty-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.cart-item-quantity-controls .qty-input:focus {
    outline: none;
    border-color: #7231FF;
    z-index: 1;
    position: relative;
}

.cart-item-quantity-controls .qty-value {
    min-width: 40px;
    text-align: center;
    font-weight: 600;
    color: #333;
    font-size: 16px;
}

/* =============================================
   Модальное окно выбора фурнитуры
   ============================================= */

#furniture-modal .modal-content {
    max-width: 1300px;
    width: 95%;
    border-radius: 25px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
}

#furniture-modal .modal-body {
    padding: 0;
    overflow: hidden;
    border-radius: 0 0 25px 25px;
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
}

.furniture-modal-layout {
    display: flex;
    flex: 1;
    min-height: 0;
    max-height: 100%;
}

/* Сайдбар фурнитуры */
.furniture-sidebar {
    width: 280px;
    background: #F8F9FA;
    border-right: 2px solid #E0DDEB;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    border-radius: 0 0 0 25px;
    overflow-y: auto;
    min-height: 0;
}

.furniture-sidebar-header {
    padding: 20px;
    background: white;
    border-bottom: 2px solid #E0DDEB;
    color: #333;
    font-weight: 600;
    font-size: 16px;
}

.furniture-sidebar-content {
    flex: 1;
    overflow-y: auto;
    padding: 10px 0;
    min-height: 0;
}

.furniture-sidebar-section {
    margin-bottom: 5px;
}

.furniture-category-btn {
    width: 100%;
    display: flex;
    align-items: center;
    padding: 12px 20px;
    background: none;
    border: none;
    text-align: left;
    cursor: pointer;
    transition: all 0.2s ease;
    border-radius: 0;
    font-size: 14px;
    color: #333;
    border-left: 3px solid transparent;
    font-family: inherit;
}

.furniture-category-btn:hover {
    background: #F0F0F0;
}

.furniture-category-btn.active {
    background: #F0F0F0;
    border-left-color: #7231FF;
    color: #7231FF;
    font-weight: 600;
}

.furniture-category-btn .category-icon {
    margin-right: 10px;
    font-size: 18px;
}

.furniture-category-btn .category-name {
    flex: 1;
    font-weight: 500;
}

.furniture-category-btn .category-count {
    background: #E0DDEB;
    color: #666;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    min-width: 28px;
    text-align: center;
}

.furniture-category-btn.active .category-count {
    background: #7231FF;
    color: white;
}

/* Основной контент фурнитуры */
.furniture-main-content {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    overflow-x: hidden;
    background: white;
    min-height: 0;
    border-radius: 0 0 25px 0;
}

/* Стилизация scrollbar для модального окна фурнитуры */
.furniture-main-content {
    scrollbar-width: thin;
    scrollbar-color: #CCB2FA #F0EBFF;
}

.furniture-main-content::-webkit-scrollbar {
    width: 10px;
}

.furniture-main-content::-webkit-scrollbar-track {
    background: #F0EBFF;
    border-radius: 5px;
}

.furniture-main-content::-webkit-scrollbar-thumb {
    background: #CCB2FA;
    border-radius: 5px;
    border: 2px solid #F0EBFF;
}

.furniture-main-content::-webkit-scrollbar-thumb:hover {
    background: #7231FF;
}

.furniture-sidebar {
    scrollbar-width: thin;
    scrollbar-color: #CCB2FA #E0DDEB;
}

.furniture-sidebar::-webkit-scrollbar {
    width: 6px;
}

.furniture-sidebar::-webkit-scrollbar-track {
    background: #E0DDEB;
    border-radius: 3px;
}

.furniture-sidebar::-webkit-scrollbar-thumb {
    background: #CCB2FA;
    border-radius: 3px;
}

.furniture-sidebar::-webkit-scrollbar-thumb:hover {
    background: #7231FF;
}

/* Поиск фурнитуры */
.furniture-search {
    margin-bottom: 20px;
}

.furniture-search .input-group {
    display: flex;
    align-items: stretch;
    border-radius: 15px;
    overflow: hidden;
    border: 2px solid #E0DDEB;
    background: white;
    transition: all 0.3s ease;
}

.furniture-search .input-group:focus-within {
    border-color: #7231FF;
    box-shadow: 0 0 0 3px rgba(114, 49, 255, 0.1);
}

.furniture-search .input-group-text {
    background: #F8F9FA;
    border: none;
    padding: 14px 18px;
    color: #666;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.furniture-search .input-group-text i {
    font-size: 16px;
}

.furniture-search .form-control {
    border: none;
    padding: 14px 18px;
    font-size: 14px;
    background: white;
    color: #333;
    font-family: inherit;
    flex: 1;
    min-width: 0;
}

.furniture-search .form-control:focus {
    outline: none;
    box-shadow: none;
    background: white;
}

.furniture-search .form-control::placeholder {
    color: #999;
    opacity: 1;
}

.furniture-search .btn-outline-secondary {
    border: none;
    background: #F8F9FA;
    color: #666;
    padding: 14px 18px;
    border-left: 1px solid #E0DDEB;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
    font-size: 16px;
}

.furniture-search .btn-outline-secondary:hover {
    background: #F0F0F0;
    color: #333;
}

.furniture-search .btn-outline-secondary:active {
    background: #E0DDEB;
}

/* Сетка фурнитуры - 5 колонок */
#furniture-items.furniture-items-grid,
.furniture-items-grid {
    display: grid !important;
    grid-template-columns: repeat(5, 1fr) !important;
    gap: 14px !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

@media (max-width: 1400px) {
    .furniture-items-grid {
        grid-template-columns: repeat(4, 1fr) !important;
    }
}

@media (max-width: 1100px) {
    .furniture-items-grid {
        grid-template-columns: repeat(3, 1fr) !important;
    }
}

@media (max-width: 800px) {
    .furniture-items-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

/* Карточки фурнитуры - увеличенные */
.furniture-item-card {
    border: 1px solid #E0DDEB;
    border-radius: 12px;
    transition: all 0.2s ease;
    cursor: pointer;
    background: white;
    display: flex;
    flex-direction: column;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
    min-height: 240px;
    overflow: hidden;
}

.furniture-item-card:hover {
    border-color: #7231FF;
    box-shadow: 0 4px 16px rgba(114, 49, 255, 0.18);
    transform: translateY(-3px);
}

.furniture-item-card:active {
    transform: translateY(0px) scale(0.98);
    box-shadow: 0 2px 8px rgba(114, 49, 255, 0.2);
}

/* Карточка без остатков */
.furniture-item-card.out-of-stock-card {
    position: relative;
    opacity: 0.7;
    cursor: not-allowed;
}

.furniture-item-card.out-of-stock-card:hover {
    transform: none;
    border-color: #E0DDEB;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

/* Overlay "Нет в наличии" */
.out-of-stock-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.75);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    border-radius: 14px;
    pointer-events: none;
}

.out-of-stock-overlay span {
    background: linear-gradient(135deg, #ff4444, #cc0000);
    color: white;
    font-weight: 700;
    font-size: 11px;
    padding: 8px 14px;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 10px rgba(204, 0, 0, 0.3);
    transform: rotate(-15deg);
}

/* Выбранная карточка */
.furniture-item-card.selected {
    border: 3px solid #7231FF;
    box-shadow: 0 0 0 3px rgba(114, 49, 255, 0.2), 0 4px 20px rgba(114, 49, 255, 0.3);
}

.furniture-item-card.selected:hover {
    border-color: #7231FF;
}

/* Бейдж "Выбрано" */
.selected-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 28px;
    height: 28px;
    background: linear-gradient(135deg, #7231FF, #9B6DFF);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 14px;
    z-index: 15;
    box-shadow: 0 2px 8px rgba(114, 49, 255, 0.4);
}

/* Верхняя часть - изображение */
.furniture-item-card .card-img-wrapper {
    width: 100%;
    height: 130px;
    background: #F8F9FA;
    overflow: hidden;
    border-radius: 12px 12px 0 0;
}

.furniture-item-card .card-img-wrapper {
    position: relative;
}

.furniture-item-card .card-img-top {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity 0.3s ease-in-out;
}

/* Placeholder для изображений */
.furniture-item-card .image-placeholder {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, #F8F9FA 25%, #E0DDEB 50%, #F8F9FA 75%);
    background-size: 200% 100%;
    animation: image-loading 1.5s infinite;
    z-index: 1;
    transition: opacity 0.3s ease-in-out;
}

@keyframes image-loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* Ленивая загрузка изображений */
.furniture-item-card .lazy-image {
    opacity: 0;
    position: relative;
    z-index: 2;
}

.furniture-item-card .lazy-image.loaded {
    opacity: 1;
}

/* Нижняя часть - информация */
.furniture-item-card .card-body {
    padding: 12px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.furniture-item-card .card-title {
    font-size: 13px;
    font-weight: 600;
    color: #333;
    margin-bottom: 4px;
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.furniture-item-card .card-sku {
    font-size: 11px;
    color: #888;
    margin-bottom: 8px;
    font-family: monospace;
}

/* Блок цены и остатков - прижат к низу */
.furniture-item-card .card-footer-info {
    margin-top: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.furniture-item-card .card-price {
    font-size: 15px;
    font-weight: 700;
    color: #7231FF;
}

.furniture-item-card .card-stock {
    font-size: 11px;
    padding: 4px 10px;
    border-radius: 12px;
    font-weight: 600;
    white-space: nowrap;
}

.furniture-item-card .card-stock.in-stock {
    background: #E8F5E9;
    color: #2E7D32;
}

.furniture-item-card .card-stock.out-of-stock {
    background: #F5F5F5;
    color: #757575;
}

/* Дерево категорий */
.category-tree-item {
    margin-bottom: 2px;
}

.category-tree-item.expanded > .furniture-category-btn {
    background: #F0EBFF;
}

.furniture-category-btn {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 12px 14px;
    border: none;
    background: transparent;
    border-radius: 8px;
    cursor: pointer;
    text-align: left;
    transition: all 0.2s ease;
    font-size: 14px;
    color: #333;
    min-height: 42px;
}

.furniture-category-btn:hover {
    background: #F0EBFF;
}

.furniture-category-btn.active {
    background: #7231FF;
    color: white;
}

.furniture-category-btn.active .category-icon,
.furniture-category-btn.active .category-count {
    color: white;
}

.furniture-category-btn .category-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    font-size: 9px;
    color: #888;
    flex-shrink: 0;
    transition: transform 0.2s ease;
}

.furniture-category-btn .category-toggle:hover {
    color: #7231FF;
}

.furniture-category-btn .category-icon {
    font-size: 14px;
    flex-shrink: 0;
}

.furniture-category-btn .category-name {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.furniture-category-btn .category-count {
    font-size: 11px;
    color: #888;
    background: #F0F0F0;
    padding: 2px 8px;
    border-radius: 10px;
    flex-shrink: 0;
}

.furniture-category-btn.active .category-count {
    background: rgba(255,255,255,0.2);
    color: white;
}

.category-children {
    margin-left: 22px;
    margin-top: 2px;
    border-left: 2px solid #E8E4F0;
}

.category-children .furniture-category-btn {
    font-size: 13px;
    padding: 10px 12px;
    border-radius: 0 8px 8px 0;
    min-height: 38px;
}

.category-children .furniture-category-btn:hover {
    background: #F5F0FF;
    border-left: 2px solid #7231FF;
    margin-left: -2px;
    padding-left: 12px;
}

.category-children .furniture-category-btn.active {
    background: #7231FF;
    color: white;
    border-left: 2px solid #7231FF;
    margin-left: -2px;
    padding-left: 12px;
}

/* Статус загрузки */
.furniture-loading {
    text-align: center;
    padding: 60px 20px;
    color: #666;
}

.furniture-loading .spinner-border {
    width: 3rem;
    height: 3rem;
    border-width: 0.3em;
    border-color: #7231FF;
    border-right-color: transparent;
}

/* Пустое состояние */
.furniture-empty {
    text-align: center;
    padding: 60px 20px;
    color: #666;
}

.furniture-empty i {
    font-size: 64px;
    color: #E0DDEB;
    margin-bottom: 20px;
    display: block;
}

.furniture-empty h6 {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin-bottom: 10px;
}

.furniture-empty p {
    font-size: 14px;
    color: #666;
}

/* Выбранная фурнитура в форме */
.selected-furniture-list {
    margin-top: 15px;
}

.selected-furniture-item {
    background: white;
    border: 2px solid #E0DDEB;
    border-radius: 12px;
    padding: 12px;
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.selected-furniture-item strong {
    color: #333;
    font-size: 14px;
    display: block;
    margin-bottom: 4px;
}

.selected-furniture-item small {
    color: #666;
    font-size: 12px;
    display: block;
}

.selected-furniture-item .btn-sm {
    padding: 6px 12px;
    font-size: 12px;
    border-radius: 8px;
    border: none;
    background: #FF4444;
    color: white;
    cursor: pointer;
    transition: all 0.2s ease;
}

.selected-furniture-item .btn-sm:hover {
    background: #CC0000;
    transform: scale(1.05);
}

/* Контейнер для двух полей: фурнитура + кольцо */
.furniture-ring-container {
    display: flex;
    gap: 15px;
    align-items: stretch;
}

/* Общие стили для полей выбора фурнитуры и кольца */
.furniture-selector-field,
.ring-selector-field {
    flex: 1;
    border: 2px dashed #D0C9E0;
    border-radius: 12px;
    padding: 20px 15px;
    background: #FAFAFF;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    min-height: 140px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.furniture-selector-field:hover,
.ring-selector-field:hover {
    border-color: #7231FF;
    background: #F5F0FF;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(114, 49, 255, 0.15);
}

.furniture-selector-field.has-selection,
.ring-selector-field.has-selection {
    border-style: solid;
    border-color: #7231FF;
    background: white;
}

/* Неактивное состояние полей фурнитуры */
.furniture-selector-field.disabled,
.ring-selector-field.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

.furniture-selector-field.disabled:hover,
.ring-selector-field.disabled:hover {
    border-color: #D0C9E0;
    background: #FAFAFF;
    transform: none;
    box-shadow: none;
}

.furniture-selector-field.disabled .furniture-field-hint {
    color: #999;
    font-style: italic;
}

/* Содержимое поля */
.furniture-field-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.furniture-field-content i {
    font-size: 2rem;
    color: #9B8DC5;
    transition: color 0.3s ease;
}

.furniture-selector-field:hover .furniture-field-content i,
.ring-selector-field:hover .furniture-field-content i {
    color: #7231FF;
}

.furniture-field-text {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin: 0;
}

.furniture-field-hint {
    font-size: 12px;
    color: #888;
}

/* Изображение выбранной фурнитуры */
.furniture-field-content img {
    max-width: 100%;
    max-height: 70px;
    object-fit: contain;
    border-radius: 8px;
}

/* Разделитель "+" */
.furniture-connector {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: 700;
    color: #9B8DC5;
    min-width: 30px;
}

/* Кнопка очистки */
.furniture-clear-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(220, 53, 69, 0.9);
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 12px;
    z-index: 5;
}

.furniture-clear-btn:hover {
    background: #dc3545;
    transform: scale(1.1);
}

/* Старая кнопка (оставляем для совместимости) */
.btn-furniture {
    width: 100%;
    padding: 14px 20px;
    background: white;
    color: #7231FF;
    border: 2px solid #7231FF;
    border-radius: 12px;
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-furniture:hover {
    background: #7231FF;
    color: white;
    transform: translateY(-2px);
}

.btn-furniture:active {
    transform: translateY(0);
}

/* Адаптивность */
@media (max-width: 768px) {
    .furniture-modal-layout {
        flex-direction: column;
        min-height: 0;
    }
    
    .furniture-sidebar {
        width: 100%;
        max-height: 200px;
        border-right: none;
        border-bottom: 2px solid #E0DDEB;
        flex-shrink: 0;
    }
    
    .furniture-main-content {
        flex: 1;
        min-height: 0;
    }
    
    .furniture-items-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }
    
    .furniture-item-card .card-img-top {
        height: 120px;
    }
}

/* =============================================
   Система слоёв (Layers System)
   ============================================= */

/* Контейнер слоёв */
#layers-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
    min-height: 100px; /* Минимальная высота для предотвращения прыжков */
    transition: min-height 0.2s ease;
}

/* Группа слоя */
.layer-group {
    opacity: 1;
    transition: opacity 0.2s ease, transform 0.2s ease;
    will-change: opacity, transform;
    min-height: 50px; /* Минимальная высота для предотвращения прыжков */
}

.layer-group.layer-disabled {
    opacity: 0.5;
    pointer-events: none;
}

.layer-group.layer-disabled .option-button,
.layer-group.layer-disabled .acrylic-type-button {
    cursor: not-allowed;
}

/* Разрешаем ввод в поля number даже когда слой disabled (для quantity) */
.layer-group.layer-disabled input[type="number"],
.layer-group.layer-disabled input[type="number"]:focus {
    pointer-events: auto !important;
    cursor: text !important;
    opacity: 1 !important;
    background-color: white !important;
}

/* Также разрешаем ввод в контейнере quantity-input-wrapper */
.layer-group.layer-disabled .quantity-input-wrapper,
.layer-group.layer-disabled .quantity-input-container {
    pointer-events: auto !important;
}

.layer-group.layer-disabled .quantity-input-wrapper input[type="number"] {
    pointer-events: auto !important;
    cursor: text !important;
    opacity: 1 !important;
}

/* Обёртка label с inline подсказкой */
.layer-label-wrapper {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.layer-label-wrapper label {
    font-weight: 500;
    color: #555;
    font-size: 14px;
    margin-bottom: 0;
}

.layer-label-hint {
    font-size: 12px;
    color: #9B95AA;
    font-weight: 400;
    font-style: italic;
}

/* Подсказка для слоя */
.layer-hint {
    color: #9B95AA;
    font-size: 13px;
    font-style: italic;
    text-align: center;
    padding: 10px;
}

/* =============================================
   Система видимости слоёв (prerender + CSS)
   ============================================= */

/* Скрытый слой — не занимает место */
.layer-group.layer-hidden {
    display: none !important;
}

/* Видимый слой — плавное появление */
.layer-group.layer-visible {
    display: block;
    animation: layerFadeIn 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

/* Слой который только что стал видимым — анимация slide-down */
.layer-group.layer-appearing {
    animation: layerSlideIn 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

/* Каскадная задержка для первоначального появления полей */
.layer-group.layer-appearing:nth-child(1) { animation-delay: 0s; }
.layer-group.layer-appearing:nth-child(2) { animation-delay: 0.04s; }
.layer-group.layer-appearing:nth-child(3) { animation-delay: 0.08s; }
.layer-group.layer-appearing:nth-child(4) { animation-delay: 0.12s; }
.layer-group.layer-appearing:nth-child(5) { animation-delay: 0.16s; }
.layer-group.layer-appearing:nth-child(6) { animation-delay: 0.20s; }
.layer-group.layer-appearing:nth-child(7) { animation-delay: 0.24s; }
.layer-group.layer-appearing:nth-child(8) { animation-delay: 0.28s; }
.layer-group.layer-appearing:nth-child(9) { animation-delay: 0.32s; }
.layer-group.layer-appearing:nth-child(10) { animation-delay: 0.36s; }

@keyframes layerFadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes layerSlideIn {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Placeholder загрузки */
.loading-placeholder {
    color: #9B95AA;
    font-size: 14px;
    text-align: center;
    padding: 20px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 12px;
    border: 2px dashed #E0DDEB;
}

/* Контейнер типа изделия */
#product-type-group {
    margin-bottom: 20px;
}

#product-type-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 12px;
}

#product-type-grid .option-button {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px 16px;
}

#product-type-grid .option-button span {
    font-size: 14px;
    text-align: center;
}

/* Дополнительные поля (скрыт - все поля теперь в layers-container) */
#additional-fields-container {
    display: none;
}

.field-hint {
    color: #9B95AA;
    font-size: 12px;
    margin-top: 5px;
}

/* Адаптивность для мобильных */
@media (max-width: 768px) {
    #product-type-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
    }
    
    #product-type-grid .option-button {
        padding: 10px 8px;
    }
    
    #product-type-grid .option-button span {
        font-size: 12px;
    }
    
    #layers-container {
        gap: 15px;
    }
}

@media (max-width: 480px) {
    #product-type-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* =============================================
   Оверлей загрузки при редактировании товара
   ============================================= */

.form-loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    border-radius: 20px;
    backdrop-filter: blur(2px);
}

.form-loading-spinner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    color: #7231FF;
    font-size: 16px;
    font-weight: 500;
}

.form-loading-spinner i {
    font-size: 32px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Плавное появление формы после загрузки */
#layers-container,
.calculator-form,
#product-form {
    transition: opacity 0.3s ease;
}

/* =============================================
   Модальное окно дубликата товара
   ============================================= */

.duplicate-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.duplicate-modal-overlay.active {
    opacity: 1;
}

.duplicate-modal-content {
    background: white;
    border-radius: 20px;
    padding: 0;
    max-width: 450px;
    width: 90%;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.duplicate-modal-overlay.active .duplicate-modal-content {
    transform: scale(1);
}

.duplicate-modal-content .modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid #E0DDEB;
}

.duplicate-modal-content .modal-header h3 {
    margin: 0;
    font-size: 18px;
    color: #333;
}

.duplicate-modal-content .modal-close {
    background: none;
    border: none;
    font-size: 24px;
    color: #999;
    cursor: pointer;
    padding: 0;
    line-height: 1;
}

.duplicate-modal-content .modal-close:hover {
    color: #666;
}

.duplicate-modal-content .modal-body {
    padding: 24px;
}

.duplicate-modal-content .modal-body p {
    margin: 0 0 12px 0;
    color: #666;
    font-size: 14px;
    line-height: 1.5;
}

.duplicate-modal-content .modal-body p:last-child {
    margin-bottom: 0;
    font-weight: 500;
    color: #333;
}

.duplicate-modal-buttons {
    padding: 16px 24px 24px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.duplicate-modal-buttons .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border: none;
    border-radius: 16px;
    font-size: 14px;
    font-weight: 600;
    font-family: "Unbounded", sans-serif;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    min-height: 44px;
    box-sizing: border-box;
}

.duplicate-modal-buttons .btn-primary {
    background: linear-gradient(135deg, #7231FF 0%, #9B59B6 100%);
    color: white;
}

.duplicate-modal-buttons .btn-primary:hover {
    transform: translateY(-2px);
}

.duplicate-modal-buttons .btn-primary:active {
    transform: translateY(0);
}

.duplicate-modal-buttons .btn-secondary {
    background: transparent;
    border: 2px solid #7231FF;
    color: #7231FF;
}

.duplicate-modal-buttons .btn-secondary:hover {
    background: #f8f4ff;
    transform: translateY(-2px);
}

.duplicate-modal-buttons .btn-secondary:active {
    transform: translateY(0);
}

.duplicate-modal-buttons .btn i {
    font-size: 14px;
    line-height: 1;
    display: inline-block;
    vertical-align: middle;
}

.duplicate-modal-buttons .btn-primary i {
    color: white;
    opacity: 1;
}

/* =============================================
   Модальное окно напоминания о дубликате
   ============================================= */
.duplicate-reminder-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.duplicate-reminder-modal.active {
    opacity: 1;
    visibility: visible;
}

.duplicate-reminder-content {
    background: white;
    border-radius: 20px;
    padding: 0;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.duplicate-reminder-modal.active .duplicate-reminder-content {
    transform: scale(1);
}

.duplicate-reminder-content .modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid #E0DDEB;
}

.duplicate-reminder-content .modal-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #333;
}

.duplicate-reminder-content .modal-close {
    background: none;
    border: none;
    font-size: 28px;
    color: #999;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.duplicate-reminder-content .modal-close:hover {
    color: #333;
    background: #F5F3FA;
}

.duplicate-reminder-content .modal-body {
    padding: 24px;
}

.duplicate-reminder-content .modal-body p {
    margin: 0 0 16px 0;
    color: #666;
    font-size: 14px;
    line-height: 1.6;
}

.duplicate-reminder-content .modal-body p:last-child {
    margin-bottom: 0;
}

.duplicate-reminder-content .modal-body .link-to-account {
    color: #7231FF;
    text-decoration: none;
    font-weight: 500;
    border-bottom: 1px solid transparent;
    transition: border-color 0.2s ease;
}

.duplicate-reminder-content .modal-body .link-to-account:hover {
    border-bottom-color: #7231FF;
}

.duplicate-reminder-content .modal-footer {
    padding: 16px 24px 24px;
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

.duplicate-reminder-content .modal-footer .btn {
    padding: 12px 24px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    border: none;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.duplicate-reminder-content .modal-footer .btn-secondary {
    background: #F5F3FA;
    color: #666;
}

.duplicate-reminder-content .modal-footer .btn-secondary:hover {
    background: #E8E4F0;
    color: #333;
}

.duplicate-reminder-content .modal-footer .btn-primary {
    background: linear-gradient(135deg, #7231FF 0%, #5a1fcc 100%);
    color: white;
}

.duplicate-reminder-content .modal-footer .btn-primary:hover {
    background: linear-gradient(135deg, #5a1fcc 0%, #4a1ab3 100%);
    transform: translateY(-1px);
}

/* =============================================
   Снегопад
   ============================================= */
#snowfall-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.snowflake {
    position: absolute;
    background: white;
    border-radius: 50%;
    will-change: transform;
    animation: snowfall linear infinite;
    animation-duration: var(--snowfall-duration, 5s);
    animation-delay: var(--snowfall-delay, 0s);
    /* Принудительное GPU ускорение */
    backface-visibility: hidden;
    transform-style: preserve-3d;
}

/* Примечание: Отключение анимации для prefers-reduced-motion обрабатывается в JavaScript,
   чтобы дать пользователю больше контроля */

/* Типизация CSS переменных для лучшей оптимизации браузером */
@property --snowfall-x-0 {
    syntax: '<length>';
    initial-value: 0px;
    inherits: false;
}
@property --snowfall-x-25 {
    syntax: '<length>';
    initial-value: 0px;
    inherits: false;
}
@property --snowfall-x-50 {
    syntax: '<length>';
    initial-value: 0px;
    inherits: false;
}
@property --snowfall-x-75 {
    syntax: '<length>';
    initial-value: 0px;
    inherits: false;
}
@property --snowfall-x-100 {
    syntax: '<length>';
    initial-value: 0px;
    inherits: false;
}

/* Упрощенная анимация с меньшим количеством keyframes для лучшей производительности */
@keyframes snowfall {
    0% {
        transform: translate3d(var(--snowfall-x-0, 0px), 0, 0);
        opacity: 1;
    }
    25% {
        transform: translate3d(var(--snowfall-x-25, 0px), 25vh, 0);
    }
    50% {
        transform: translate3d(var(--snowfall-x-50, 0px), 50vh, 0);
    }
    75% {
        transform: translate3d(var(--snowfall-x-75, 0px), 75vh, 0);
    }
    100% {
        transform: translate3d(var(--snowfall-x-100, 0px), 100vh, 0);
        opacity: 0.3;
    }
}

/* Класс для паузы анимации при скрытии вкладки */
.snowflake.paused {
    animation-play-state: paused !important;
}

/* ============================================
   Модальное окно выбора типа заказа
   ============================================ */

#order-type-modal .modal-content {
    max-width: 500px;
}

.order-type-btn {
    width: 100%;
    padding: 16px 20px;
    margin-bottom: 12px;
    border: 2px solid #E0DDEB;
    border-radius: 15px;
    background: white;
    color: #333;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 12px;
    text-align: left;
}

.order-type-btn:hover {
    border-color: #7231FF;
    background: #F8F5FF;
    transform: translateY(-2px);
}

.order-type-btn i {
    font-size: 20px;
    color: #7231FF;
    width: 24px;
    text-align: center;
}

.order-type-btn.individual i {
    color: #666;
}

.order-type-btn.collect i {
    color: #7231FF;
}

.order-type-btn span {
    flex: 1;
    font-weight: 700;
}

.collects-list {
    margin-top: 8px;
}

.collect-deadline-warning {
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 4px;
    padding: 12px;
    margin-bottom: 16px;
    color: #856404;
}

.collect-deadline-warning i {
    margin-right: 8px;
    color: #ffc107;
}

