    /* ===== CSS ПЕРЕМЕННЫЕ И БАЗОВЫЕ СТИЛИ ===== */
        :root {
            --primary: #C8F23D;
            --primary-dark: #A0C02A;
            --primary-light: #E0F87C;
            --secondary: #8AA823;
            --light: #f8faf7;
            --dark: #000000;
            --success: #8cc152;
            --gradient: linear-gradient(135deg, #C8F23D 0%, #A0C02A 100%);
            --shadow: 0 10px 30px rgba(200, 242, 61, 0.15);
            --card-bg: rgba(255, 255, 255, 0.98);
            --border-radius: 20px;
            --transition: all 0.3s ease;
        }
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }
    /* ===== ОСНОВНЫЕ СТИЛИ СТРАНИЦЫ ===== */
        body {
            font-family: 'Montserrat', sans-serif;
            background: black;
            color: var(--dark);
            min-height: 100vh;
            line-height: 1.6;
            padding: 20px;
        }
        .container {
            width: 100%;
            max-width: 1400px;
            margin: 0 auto;
        }
    /* ===== ТИПОГРАФИЯ ===== */
        h1 {
            font-size: 2.8rem;
            color: white;
            margin-bottom: 30px;
            text-align: center;
        }
        .section-title {
            font-size: 1.5rem;
            color: var(--dark);
            margin-bottom: 25px;
            padding-bottom: 15px;
            border-bottom: 2px solid #e9ecef;
            display: flex;
            align-items: center;
            gap: 10px;
        }
        .section-title i { color: var(--dark); }
        .result-title {
            color: var(--dark);
            margin-bottom: 20px;
            text-align: center;
            font-size: 1.8rem;
            margin-top: 20px;
        }
        .cost {
            font-size: 3rem;
            font-weight: bold;
            text-align: center;
            margin: 20px 0;
            color: var(--dark);
        }
    /* ===== СЕТКА И РАСПОЛОЖЕНИЕ ===== */
        .main-content {
            display: grid;
            grid-template-columns: 0.7fr 1.3fr;
            gap: 30px;
            margin-bottom: 30px;
        }
        .right-column {
            display: flex;
            flex-direction: column;
            gap: 30px;
        }
        .details {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
            gap: 20px;
            margin-top: 30px;
        }
        .detail-item {
            display: flex;
            justify-content: space-between;
            padding: 12px 0;
            border-bottom: 1px solid #eee;
        }
        .detail-item:last-child { border-bottom: none; }
        /* Стили для недоступных опций переплета книг */
        #bookBindingType option:disabled {
            color: #999;
            background-color: #f5f5f5;
        }

        #bookBindingType option {
            color: #000;
        }

        /* Подсказка для недоступных опций */
        #bookBindingType option[title]:hover::after {
            content: attr(title);
            position: absolute;
            background: #333;
            color: white;
            padding: 5px 10px;
            border-radius: 4px;
            font-size: 12px;
            margin-top: -30px;
            margin-left: 10px;
            z-index: 1000;
            white-space: nowrap;
        }
    /* ===== КАРТОЧКИ И КОНТЕЙНЕРЫ ===== */
        .form-container, .mockup-container, .result-container, .products-container {
            background: var(--card-bg);
            border-radius: var(--border-radius);
            padding: 30px;
            box-shadow: 0 10px 30px rgba(0,0,0,0.1);
            border: 1px solid #e9ecef;
        }
        /* Добавляем отступ после блока "Мои изделия" */
        .products-container { margin-bottom: 40px; /* Добавлен отступ */}
        /* Стили для подсказки нумерации */
        .numbering-tooltip-container {
            position: relative;
            cursor: pointer;
        }
        .tooltip-icon {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            width: 16px;
            height: 16px;
            background: var(--primary);
            color: var(--dark);
            border-radius: 50%;
            font-size: 12px;
            font-weight: bold;
            margin-left: 8px;
            cursor: help;
        }
        .tooltip-content {
            position: absolute;
            top: 100%;
            left: 0;
            background: white;
            border: 1px solid var(--primary);
            border-radius: 8px;
            padding: 15px;
            box-shadow: var(--shadow);
            z-index: 1000;
            min-width: 250px;
            opacity: 0;
            visibility: hidden;
            transform: translateY(-10px);
            transition: all 0.3s ease;
        }
        .numbering-tooltip-container:hover .tooltip-content {
            opacity: 1;
            visibility: visible;
            transform: translateY(5px);
        }
        .tooltip-text {
            font-weight: 600;
            margin-bottom: 10px;
            color: var(--dark);
            font-size: 0.9rem;
        }
        /* Анимация нумерации */
        .numbering-animation {
            display: flex;
            flex-direction: column;
            gap: 5px;
        }
        .document {
            display: flex;
            align-items: center;
            padding: 8px 12px;
            background: #f8f9fa;
            border: 1px solid #e9ecef;
            border-radius: 4px;
            font-size: 0.8rem;
            transition: all 0.3s ease;
            animation: slideIn 0.5s ease forwards;
            opacity: 0;
            transform: translateX(-10px);
        }
        .document:nth-child(1) { animation-delay: 0.1s; }
        .document:nth-child(2) { animation-delay: 0.3s; }
        .document:nth-child(3) { animation-delay: 0.5s; }
        .document:nth-child(4) { animation-delay: 0.7s; }
        .page-number {
            margin-left: auto;
            background: var(--primary);
            color: var(--dark);
            width: 20px;
            height: 20px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            font-weight: bold;
            font-size: 0.7rem;
            animation: pulse 2s infinite;
        }
        @keyframes slideIn {
            to {
                opacity: 1;
                transform: translateX(0);
            }
        }
        @keyframes pulse {
            0%, 100% { transform: scale(1); }
            50% { transform: scale(1.1); }
        }
        /* Адаптивность для подсказки */
        @media (max-width: 600px) {
            .tooltip-content {
                position: fixed;
                top: 50%;
                left: 50%;
                transform: translate(-50%, -50%) scale(0.9);
                min-width: 280px;
                z-index: 10000;
            }
            .numbering-tooltip-container:hover .tooltip-content { transform: translate(-50%, -50%) scale(1); }
        }
        /* Стили для новой подсказки нумерации */
        .numbering-tooltip-container .tooltip-content {
            left: calc(100% + 20px);
            top: 50%;
            transform: translateY(-50%) translateX(-10px);
            min-width: 180px;
        }
        .numbering-tooltip-container:hover .tooltip-content { transform: translateY(-50%) translateX(0); }
        .numbering-tooltip { padding: 12px; }
        .sheet-mockup {
            width: 120px;
            height: 160px;
            background: white;
            border: 1px solid #ddd;
            border-radius: 4px;
            position: relative;
            margin: 0 auto;
            box-shadow: 0 2px 8px rgba(0,0,0,0.1);
            overflow: hidden;
        }
        .sheet-content {
            padding: 15px 10px;
            height: 100%;
        }
        .text-line {
            height: 6px;
            background: #f0f0f0;
            margin-bottom: 8px;
            border-radius: 2px;
            animation: pulseLine 4s infinite;
        }
        .text-line.short { width: 70%; }
        .text-line:nth-child(2) { animation-delay: 0.5s; }
        .text-line:nth-child(3) { animation-delay: 1s; }
        .text-line:nth-child(4) { animation-delay: 1.5s; }
        .text-line:nth-child(5) { animation-delay: 2s; }
        .page-number-animated {
            position: absolute;
            bottom: 8px;
            left: 50%;
            transform: translateX(-50%);
            width: 24px;
            height: 24px;
        }
        .page-number-animated .number {
            position: absolute;
            top: 0;
            left: 0;
            width: 24px;
            height: 24px;
            background: var(--primary);
            color: var(--dark);
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            font-weight: bold;
            font-size: 0.8rem;
            opacity: 0;
            animation: numberCycle 4s infinite;
        }
        .page-number-animated .number:nth-child(1) { animation-delay: 0s; }
        .page-number-animated .number:nth-child(2) { animation-delay: 1s; }
        .page-number-animated .number:nth-child(3) { animation-delay: 2s; }
        .page-number-animated .number:nth-child(4) { animation-delay: 3s; }
        @keyframes pulseLine {
            0%, 100% { opacity: 0.3; }
            50% { opacity: 0.7; }
        }
        @keyframes numberCycle {
            0%, 20% {
                opacity: 0;
                transform: scale(0.5);
            }
            25%, 45% {
                opacity: 1;
                transform: scale(1);
            }
            50%, 70% {
                opacity: 0;
                transform: scale(0.5);
            }
            100% {
                opacity: 0;
                transform: scale(0.5);
            }
        }
        /* Адаптивность для новой подсказки */
        @media (max-width: 600px) {
            .numbering-tooltip-container .tooltip-content {
                position: fixed;
                top: 50%;
                left: 50%;
                transform: translate(-50%, -50%) scale(0.9);
                min-width: 200px;
                right: auto;
                left: 50%;
            }
            .numbering-tooltip-container:hover .tooltip-content { transform: translate(-50%, -50%) scale(1); }
        }
        /* Стили для подсказки скругления углов */
        .corner-rounding-tooltip-container .tooltip-content {
            left: calc(100% + 5px); /* Еще ближе к элементу */
            top: 50%;
            transform: translateY(-50%) translateX(-5px);
            min-width: 200px;
            opacity: 0;
            visibility: hidden;
            transition: all 0.3s ease;
            overflow: hidden; /* Обрезаем все, что выходит за границы */
            border-radius: 12px; /* Добавляем скругление для краев подсказки */
        }
        .corner-rounding-tooltip-container:hover .tooltip-content {
            opacity: 1;
            visibility: visible;
            transform: translateY(-50%) translateX(0);
        }
        .corner-rounding-tooltip {
            padding: 12px;
            overflow: hidden; /* Дополнительная обрезка */
        }
        .sheet-mockup-corner {
            width: 140px;
            height: 180px;
            background: white;
            border: 1px solid #ddd;
            border-radius: 0;
            position: relative;
            margin: 0 auto;
            box-shadow: 0 2px 8px rgba(0,0,0,0.1);
            overflow: hidden;
            transform-origin: top right;
            animation: cornerRoundCycle 6s infinite;
        }
        .sheet-content {
            padding: 15px 10px;
            height: 100%;
        }
        .text-line {
            height: 6px;
            background: #f0f0f0;
            margin-bottom: 8px;
            border-radius: 2px;
            animation: pulseLine 6s infinite;
        }
        .text-line.short { width: 70%; }
        .text-line:nth-child(2) { animation-delay: 0.5s; }
        .text-line:nth-child(3) { animation-delay: 1s; }
        .text-line:nth-child(4) { animation-delay: 1.5s; }
        .text-line:nth-child(5) { animation-delay: 2s; }
        .corner-animation {
            position: absolute;
            top: 10px;
            right: 10px;
            width: 40px;
            height: 40px;
        }
        .corner-sharp, .corner-round {
            position: absolute;
            top: 0;
            right: 0;
            width: 100%;
            height: 100%;
        }
        .corner-sharp {
            border-top: 3px solid #ff4757;
            border-right: 3px solid #ff4757;
            animation: cornerSharpAppear 6s infinite;
        }
        .corner-round {
            border-top: 3px solid var(--primary);
            border-right: 3px solid var(--primary);
            border-radius: 0 8px 0 0;
            animation: cornerRoundAppear 6s infinite;
            opacity: 0;
        }
        @keyframes cornerRoundCycle {
            0%, 30% {
                border-radius: 0;
                transform: scale(1);
            }
            35%, 40% {
                border-radius: 0;
                transform: scale(1.8) translateX(-15px) translateY(10px); /* Сильное приближение */
            }
            45%, 60% {
                border-radius: 12px; /* Более выраженное скругление */
                transform: scale(1.8) translateX(-15px) translateY(10px);
            }
            65%, 70% {
                border-radius: 12px;
                transform: scale(1);
            }
            75%, 100% {
                border-radius: 0;
                transform: scale(1);
            }
        }
        @keyframes cornerSharpAppear {
            0%, 25% {
                opacity: 1;
                transform: scale(1);
            }
            30%, 35% {
                opacity: 1;
                transform: scale(2); /* Сильное увеличение угла */
            }
            40%, 100% {
                opacity: 0;
                transform: scale(2);
            }
        }
        @keyframes cornerRoundAppear {
            0%, 35% {
                opacity: 0;
                transform: scale(2);
            }
            40%, 55% {
                opacity: 1;
                transform: scale(2);
            }
            60%, 100% {
                opacity: 0;
                transform: scale(2);
            }
        }
        @keyframes pulseLine {
            0%, 100% { opacity: 0.3; }
            50% { opacity: 0.7; }
        }
        /* Адаптивность для подсказки скругления углов */
        @media (max-width: 600px) {
            .corner-rounding-tooltip-container .tooltip-content {
                position: fixed;
                top: 50%;
                left: 50%;
                transform: translate(-50%, -50%) scale(0.9);
                min-width: 220px;
                right: auto;
                left: 50%;
            }
            .corner-rounding-tooltip-container:hover .tooltip-content { transform: translate(-50%, -50%) scale(1); }
        }
        /* Стили для подсказки фальцовки */
        .folding-tooltip-container .tooltip-content {
            left: calc(100% + 5px);
            top: 50%;
            transform: translateY(-50%) translateX(-5px);
            min-width: 240px;
            opacity: 0;
            visibility: hidden;
            transition: all 0.3s ease;
            overflow: hidden;
            border-radius: 12px;
        }
        .folding-tooltip-container:hover .tooltip-content {
            opacity: 1;
            visibility: visible;
            transform: translateY(-50%) translateX(0);
        }
        .folding-tooltip {
            padding: 12px;
            overflow: hidden;
        }
        .sheet-mockup-folding {
            width: 140px;
            height: 180px;
            position: relative;
            margin: 0 auto;
            perspective: 800px;
        }
        .sheet-base {
            width: 100%;
            height: 100%;
            background: white;
            border: 1px solid #ddd;
            border-radius: 4px;
            position: absolute;
            top: 0;
            left: 0;
            box-shadow: 0 2px 8px rgba(0,0,0,0.1);
            animation: sheetBaseTransition 8s infinite;
        }
        .folded-part {
            position: absolute;
            right: 0;
            top: 0;
            bottom: 0;
            width: 50%;
            background: white;
            border-left: 1px solid #ddd;
            transform-origin: left center;
            transform: rotateY(0deg);
            box-shadow: -2px 0 5px rgba(0,0,0,0.1);
            animation: foldPart 8s infinite;
        }
        .fold-line {
            position: absolute;
            left: 50%;
            top: 0;
            bottom: 0;
            width: 2px;
            background: #ff4757;
            transform: translateX(-50%);
            z-index: 2;
            animation: foldLinePulse 8s infinite;
        }
        .highlight-area {
            position: absolute;
            right: 0;
            top: 0;
            bottom: 0;
            width: 50%;
            background: rgba(200, 242, 61, 0);
            animation: highlightFold 8s infinite;
        }
        @keyframes sheetBaseTransition {
            0%, 30% {
                border: 1px solid #ddd;
                background: white;
                opacity: 1;
            }
            35%, 55% {
                border: 1px dashed #aaa; /* Пунктирный контур */
                background: transparent; /* Прозрачный фон */
                opacity: 0.5; /* Полупрозрачный */
            }
            60%, 100% {
                border: 1px solid #ddd;
                background: white;
                opacity: 1;
            }
        }
        @keyframes foldPart {
            0%, 20% {
                transform: rotateY(0deg);
                background: white;
            }
            25%, 30% {
                transform: rotateY(-30deg);
                background: white;
            }
            35%, 55% {
                transform: rotateY(-180deg); /* Полностью сложено */
                background: white;
                box-shadow: -5px 0 10px rgba(0,0,0,0.3);
                z-index: 3;
            }
            60%, 65% {
                transform: rotateY(-30deg);
                background: white;
            }
            70%, 100% {
                transform: rotateY(0deg);
                background: white;
            }
        }
        @keyframes highlightFold {
            0%, 20% {
                background: rgba(200, 242, 61, 0);
            }
            25%, 30% {
                background: rgba(200, 242, 61, 0.4); /* Подсветка правой части перед сгибанием */
            }
            35%, 55% {
                background: rgba(200, 242, 61, 0); /* Убираем подсветку когда часть согнута */
            }
            60%, 100% {
                background: rgba(200, 242, 61, 0);
            }
        }
        @keyframes foldLinePulse {
            0%, 20% {
                opacity: 0.7;
                background: #ff4757;
            }
            25%, 55% {
                opacity: 1;
                background: var(--primary);
                box-shadow: 0 0 8px var(--primary);
                width: 3px;
            }
            60%, 100% {
                opacity: 0.7;
                background: #ff4757;
                width: 2px;
            }
        }
        /* Адаптивность для подсказки фальцовки */
        @media (max-width: 600px) {
            .folding-tooltip-container .tooltip-content {
                position: fixed;
                top: 50%;
                left: 50%;
                transform: translate(-50%, -50%) scale(0.9);
                min-width: 260px;
                right: auto;
                left: 50%;
            }
            .folding-tooltip-container:hover .tooltip-content {
                transform: translate(-50%, -50%) scale(1);
            }
        }
    /* ===== ФОРМЫ И ЭЛЕМЕНТЫ ВВОДА ===== */
        .form-group {  margin-bottom: 25px;  }
        label {
            display: block;
            margin-bottom: 10px;
            font-weight: 600;
            color: var(--dark);
            display: flex;
            align-items: center;
            gap: 8px;
        }
        select, input {
            width: 100%;
            padding: 15px 20px;
            border: 2px solid #e6f2e3;
            border-radius: 12px;
            font-size: 16px;
            transition: var(--transition);
            background: white;
            color: var(--dark);
        }
        select:focus, input:focus {
            border-color: #e6f2e3;
            outline: none;
            box-shadow: 0 0 0 3px rgba(0,0,0,0.1);
        }
        .size-inputs {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 15px;
            margin-top: 15px;
        }
        .input-with-button {
            display: flex;
            gap: 10px;
            align-items: center;
        }
        .input-with-button input { flex: 1; }
    /* ===== ЧЕКБОКСЫ И РАДИОКНОПКИ ===== */
        .checkbox-group {
            display: flex;
            align-items: center;
            margin-bottom: 15px;
        }
        .checkbox-container {
            display: block;
            position: relative;
            cursor: pointer;
            font-size: 16px;
            user-select: none;
            padding-left: 35px;
            margin-bottom: 12px;
            color: var(--dark);
        }
        .checkbox-container input {
            position: absolute;
            opacity: 0;
            cursor: pointer;
            height: 0;
            width: 0;
        }
        .checkmark {
            position: absolute;
            top: 0;
            left: 0;
            height: 1.3em;
            width: 1.3em;
            background: #606062;
            border-radius: 5px;
            box-shadow: 0px 0px 1px rgba(0, 0, 0, 0.30), 0px 1px 1px rgba(0,5);
        }
        .checkbox-container input:checked ~ .checkmark {
            background-color: var(--primary);
            background-image: none;
        }
        .checkmark:after {
            content: "";
            position: absolute;
            display: none;
            left: 0.45em;
            top: 0.25em;
            width: 0.25em;
            height: 0.5em;
            border: solid white;
            border-width: 0 0.15em 0.15em 0;
            transform: rotate(45deg);
        }
        .checkbox-container input:checked ~ .checkmark:after { display: block; }
    /* ===== КНОПКИ ===== */
        .all-button {
            background-color: var(--primary);
            color: var(--dark);
            border: none;
            border-radius: 8px;
            padding: 10px 15px;
            cursor: pointer;
            font-weight: 600;
            transition: var(--transition);
            white-space: nowrap;
        }
        .all-button:hover { background-color: var(--primary-dark); }
        .all-button:disabled {
            background-color: #ccc;
            cursor: not-allowed;
        }
        .quantity-btn {
            background-color: var(--primary);
            color: var(--dark);
            border: none;
            width: 36px;
            height: 36px;
            border-radius: 50%;
            font-size: 18px;
            cursor: pointer;
            display: flex;
            justify-content: center;
            align-items: center;
            transition: var(--transition);
        }
        .quantity-btn:hover { background-color: var(--primary-dark); }
        .quantity-btn:disabled {
            background-color: #ccc;
            cursor: not-allowed;
        }
        .add-product-btn {
            background: var(--primary);
            color: var(--dark);
            border: none;
            border-radius: 12px;
            padding: 12px 20px;
            font-weight: 600;
            cursor: pointer;
            display: flex;
            align-items: center;
            gap: 8px;
            transition: var(--transition);
        }
        .add-product-btn:hover {
            transform: translateY(-2px);
            box-shadow: 0 6px 15px rgba(200, 242, 61, 0.3);
            background: var(--primary-dark);
        }
    /* ===== УПРАВЛЕНИЕ КОЛИЧЕСТВОМ ===== */
        .quantity-control {
            display: flex;
            align-items: center;
            margin-top: 10px;
        }
        .quantity-input {
            width: 80px;
            text-align: center;
            margin: 0 10px;
            padding: 10px;
            border: 2px solid #e6f2e3;
            border-radius: 12px;
            font-size: 16px;
            font-weight: 600;
            color: var(--dark);
        }
        .quantity-input:focus {
            border-color: #e6f2e3;
            outline: none;
            box-shadow: 0 0 0 3px rgba(0,0,0,0.1);
        }
        /* Стили для подсказки тиснения */
        .embossing-tooltip-container .tooltip-content {
            left: calc(100% + 5px);
            top: 50%;
            transform: translateY(-50%) translateX(-5px);
            min-width: 220px;
            opacity: 0;
            visibility: hidden;
            transition: all 0.3s ease;
            overflow: hidden;
            border-radius: 12px;
        }
        .embossing-tooltip-container:hover .tooltip-content {
            opacity: 1;
            visibility: visible;
            transform: translateY(-50%) translateX(0);
        }
        .embossing-tooltip {
            padding: 12px;
            overflow: hidden;
        }
        .embossing-animation {
            width: 140px;
            height: 180px;
            position: relative;
            margin: 0 auto;
            perspective: 1000px;
        }
        .sheet-wrapper {
            width: 100%;
            height: 100%;
            position: relative;
        }
        .sheet-embossing {
            width: 120px;
            height: 160px;
            background: white;
            border: 2px solid #333;
            border-radius: 4px;
            position: absolute;
            top: 10px;
            left: 10px;
            box-shadow: 0 4px 12px rgba(0,0,0,0.15);
            transform-style: preserve-3d;
            transform-origin: center center;
            animation: sheetEmbossingCycle 8s infinite;
        }
        .sheet-content {
            padding: 15px 10px;
            height: 100%;
            background: #f8f8f8;
        }
        .text-line {
            height: 6px;
            background: #e0e0e0;
            margin-bottom: 8px;
            border-radius: 2px;
            animation: pulseLine 8s infinite;
        }
        .text-line.short { width: 70%; }
        .text-line:nth-child(2) { animation-delay: 0.5s; }
        .text-line:nth-child(3) { animation-delay: 1s; }
        .text-line:nth-child(4) { animation-delay: 1.5s; }
        .text-line:nth-child(5) { animation-delay: 2s; }
        .harmony-text {
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%) scale(0);
            font-weight: bold;
            font-size: 1.2rem;
            color: #FFD700;
            text-shadow: 1px 1px 3px rgba(0,0,0,0.7);
            opacity: 0;
            animation: textAppear 8s infinite;
            font-family: 'Playfair Display', serif;
        }
        .press {
            position: absolute;
            top: -20px;
            left: 50%;
            transform: translateX(-50%);
            width: 100px;
            height: 15px;
            background: linear-gradient(to bottom, #555, #222);
            border-radius: 4px 4px 0 0;
            box-shadow: 0 -3px 8px rgba(0,0,0,0.4);
            z-index: 10;
            animation: pressStrike 8s infinite;
        }
        .press::after {
            content: '';
            position: absolute;
            bottom: -8px;
            left: 10%;
            right: 10%;
            height: 8px;
            background: linear-gradient(to bottom, #777, #444);
            border-radius: 0 0 4px 4px;
        }
        /* Обновленная анимация с поворотом по оси X на 85 градусов */
        @keyframes sheetEmbossingCycle {
            0%, 20% {
                transform: rotateX(0) rotateY(0) scale(1);
                border-color: #333;
                box-shadow: 0 4px 12px rgba(0,0,0,0.15);
            }
            25%, 30% {
                transform: rotateX(85deg) rotateY(0) scale(0.9);
                border-color: #555;
                box-shadow: 0 8px 20px rgba(0,0,0,0.25);
            }
            35%, 45% {
                transform: rotateX(85deg) rotateY(0) scale(0.85);
                border-color: #666;
                box-shadow: 0 10px 25px rgba(0,0,0,0.3);
                /* Эффект выгибания при ударе */
                border-top-color: #888;
                border-bottom-color: #222;
            }
            50%, 55% {
                transform: rotateX(85deg) rotateY(0) scale(0.9);
                border-color: #555;
                box-shadow: 0 8px 20px rgba(0,0,0,0.25);
            }
            60%, 80% {
                transform: rotateX(0) rotateY(0) scale(1);
                border-color: #333;
                box-shadow: 0 4px 12px rgba(0,0,0,0.15);
            }
            100% {
                transform: rotateX(0) rotateY(0) scale(1);
                border-color: #333;
                box-shadow: 0 4px 12px rgba(0,0,0,0.15);
            }
        }
        @keyframes pressStrike {
            0%, 30% {
                top: -20px;
                opacity: 0;
            }
            35%, 36% {
                top: 40px;
                opacity: 1;
            }
            37%, 45% {
                top: 75px;
                opacity: 1;
                /* Легкая вибрация при ударе */
                transform: translateX(-50%) translateY(1px);
            }
            46%, 47% {
                top: 40px;
                opacity: 1;
                transform: translateX(-50%) translateY(0);
            }
            50%, 100% {
                top: -20px;
                opacity: 0;
                transform: translateX(-50%) translateY(0);
            }
        }
        @keyframes textAppear {
            0%, 50% {
                opacity: 0;
                transform: translate(-50%, -50%) scale(0);
            }
            55%, 85% {
                opacity: 1;
                transform: translate(-50%, -50%) scale(1);
                text-shadow: 
                    1px 1px 3px rgba(0,0,0,0.7),
                    0 0 10px rgba(255,215,0,0.5);
            }
            90%, 100% {
                opacity: 0;
                transform: translate(-50%, -50%) scale(0);
            }
        }
        @keyframes pulseLine {
            0%, 100% { opacity: 0.4; }
            50% { opacity: 0.8; }
        }
        /* Адаптивность для подсказки тиснения */
        @media (max-width: 600px) {
            .embossing-tooltip-container .tooltip-content {
                position: fixed;
                top: 50%;
                left: 50%;
                transform: translate(-50%, -50%) scale(0.9);
                min-width: 240px;
                right: auto;
                left: 50%;
            }
            .embossing-tooltip-container:hover .tooltip-content { transform: translate(-50%, -50%) scale(1); }
        }
        /* Стили для подсказки ламинации */
        .lamination-tooltip-container .tooltip-content {
            left: calc(100% + 5px);
            top: 50%;
            transform: translateY(-50%) translateX(-5px);
            min-width: 280px;
            opacity: 0;
            visibility: hidden;
            transition: all 0.3s ease;
            overflow: hidden;
            border-radius: 12px;
        }
        .lamination-tooltip-container:hover .tooltip-content {
            opacity: 1;
            visibility: visible;
            transform: translateY(-50%) translateX(0);
        }
        .lamination-tooltip {
            padding: 12px;
            overflow: hidden;
        }
        .sheet-mockup-lamination {
            width: 140px;
            height: 180px;
            position: relative;
            margin: 0 auto;
            overflow: hidden;
            background: white;
            border: 1px solid #ddd;
            border-radius: 4px;
            box-shadow: 0 2px 8px rgba(0,0,0,0.1);
        }
        .sheet-content {
            padding: 15px 10px;
            height: 100%;
            position: relative;
            z-index: 1;
        }
        .text-line {
            height: 6px;
            background: #f0f0f0;
            margin-bottom: 8px;
            border-radius: 2px;
        }
        .text-line.short { width: 70%; }
        /* Рулон ламинации */
        .lamination-roller {
            position: absolute;
            top: -25px;
            left: 50%;
            width: 40px;
            height: 20px;
            background: #f0f0f0;
            border: 2px solid #ccc;
            border-radius: 10px;
            transform: translateX(-50%);
            z-index: 3;
            animation: rollDown 6s infinite;
            box-shadow: 0 2px 5px rgba(0,0,0,0.2);
        }
        .lamination-roller::before {
            content: "";
            position: absolute;
            top: 2px;
            left: 2px;
            right: 2px;
            bottom: 2px;
            background: linear-gradient(90deg, #e0e0e0, #f5f5f5, #e0e0e0);
            border-radius: 8px;
        }
        /* Пленка, которая наносится */
        .lamination-film {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 0;
            background: linear-gradient(to bottom,
                rgba(255, 255, 255, 0.1) 0%,
                rgba(255, 255, 255, 0.3) 50%,
                rgba(255, 255, 255, 0.1) 100%);
            z-index: 2;
            animation: applyFilm 6s infinite;
            backdrop-filter: blur(0.5px);
            border-top: 1px solid rgba(255, 255, 255, 0.5);
        }
        /* Блики на готовом изделии */
        .lamination-shine {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: linear-gradient(135deg,
                transparent 0%,
                rgba(255, 255, 255, 0) 40%,
                rgba(255, 255, 255, 0.7) 50%,
                rgba(255, 255, 255, 0) 60%,
                transparent 100%);
            z-index: 4;
            opacity: 0;
            animation: shineEffect 6s infinite;
            animation-delay: 3s;
        }
        .lamination-shine-2 {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: linear-gradient(45deg,
                transparent 0%,
                rgba(255, 255, 255, 0) 30%,
                rgba(255, 255, 255, 0.5) 40%,
                rgba(255, 255, 255, 0) 50%,
                transparent 100%);
            z-index: 4;
            opacity: 0;
            animation: shineEffect2 6s infinite;
            animation-delay: 4s;
        }
        /* Эффект завершения ламинации */
        .lamination-effect {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(255, 255, 255, 0);
            z-index: 5;
            animation: laminationFinish 6s infinite;
            animation-delay: 2.5s;
            pointer-events: none;
        }
        /* Контейнер для текста */
        .lamination-text-container {
            position: absolute;
            bottom: 5px;
            left: 0;
            width: 100%;
            text-align: center;
            z-index: 6;
            height: 20px;
        }
        /* Текст до и после ламинации */
        .lamination-text-before,
        .lamination-text-after {
            position: absolute;
            bottom: 0;
            left: 0;
            width: 100%;
            text-align: center;
            font-size: 10px;
            font-weight: 600;
        }
        .lamination-text-before {
            animation: textBefore 6s infinite;
            color: #666;
        }
        .lamination-text-after {
            opacity: 0;
            color: var(--primary-dark);
            font-weight: 700;
            animation: textAfter 6s infinite;
        }
        /* Анимация прокатки рулона */
        @keyframes rollDown {
            0%, 15% {
                top: -25px;
                opacity: 1;
            }
            20%, 50% {
                top: 100%;
                opacity: 1;
            }
            55%, 100% {
                top: 100%;
                opacity: 0;
            }
        }
        /* Анимация нанесения пленки */
        @keyframes applyFilm {
            0%, 15% {
                height: 0;
                opacity: 0.8;
            }
            20%, 50% {
                height: 100%;
                opacity: 0.8;
            }
            55%, 100% {
                height: 100%;
                opacity: 0.4;
            }
        }
        /* Анимация бликов */
        @keyframes shineEffect {
            0%, 50% {
                opacity: 0;
                transform: translateX(-100%);
            }
            55%, 65% {
                opacity: 0.8;
                transform: translateX(100%);
            }
            70%, 100% {
                opacity: 0;
                transform: translateX(100%);
            }
        }
        @keyframes shineEffect2 {
            0%, 60% {
                opacity: 0;
                transform: translateX(-100%);
            }
            65%, 75% {
                opacity: 0.6;
                transform: translateX(100%);
            }
            80%, 100% {
                opacity: 0;
                transform: translateX(100%);
            }
        }
        /* Эффект завершения ламинации */
        @keyframes laminationFinish {
            0%, 40% {
                background: rgba(255, 255, 255, 0);
                box-shadow: none;
            }
            45%, 50% {
                background: rgba(255, 255, 255, 0.1);
                box-shadow: 
                    0 0 15px rgba(255, 255, 255, 0.4),
                    inset 0 0 15px rgba(255, 255, 255, 0.2);
            }
            55%, 100% {
                background: rgba(255, 255, 255, 0.05);
                box-shadow: 
                    0 0 8px rgba(255, 255, 255, 0.2),
                    inset 0 0 8px rgba(255, 255, 255, 0.1);
            }
        }
        /* Анимация текста "До ламинации" */
        @keyframes textBefore {
            0%, 40% {
                opacity: 1;
            }
            45%, 100% {
                opacity: 0;
            }
        }
        /* Анимация текста "После ламинации" */
        @keyframes textAfter {
            0%, 40% {
                opacity: 0;
            }
            45%, 100% {
                opacity: 1;
            }
        }
        /* Адаптивность для подсказки ламинации */
        @media (max-width: 600px) {
            .lamination-tooltip-container .tooltip-content {
                position: fixed;
                top: 50%;
                left: 50%;
                transform: translate(-50%, -50%) scale(0.9);
                min-width: 300px;
                right: auto;
                left: 50%;
            }
            .lamination-tooltip-container:hover .tooltip-content {
                transform: translate(-50%, -50%) scale(1);
            }
        }
        /* Дополнительный эффект для лучшей видимости процесса */
        .sheet-content::before {
            content: "";
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(255, 255, 255, 0);
            z-index: -1;
            animation: contentAppearance 6s infinite;
        }

        @keyframes contentAppearance {
            0%, 40% {
                background: rgba(255, 255, 255, 0.95);
            }
            45%, 100% {
                background: rgba(255, 255, 255, 0.85);
            }
        }

        /* ===== МАКЕТ ЛИСТА ===== */
        .mockup-display {
            display: flex;
            justify-content: center;
            align-items: center;
            margin: 20px 0;
            background: #f8faf7;
            border-radius: 12px;
            position: relative;
            overflow: hidden;
            border: 2px dashed #e9ecef;
            min-height: 300px;
            padding: 20px;
        }

        .a3-sheet {
            width: 60%; /* Занимает 80% ширины контейнера */
            height: auto; /* Автоматическая высота для сохранения пропорций */
            aspect-ratio: 297/420; /* Сохраняем пропорции А3 */
            background: white;
            border: 1px solid #ccc;
            position: relative;
            box-shadow: 0 4px 8px rgba(0,0,0,0.1);
            display: flex;
            flex-wrap: wrap;
            align-content: flex-start;
        }

        .size-display {
            position: absolute;
            bottom: 10px;
            right: 10px;
            background: var(--dark);
            color: white;
            padding: 5px 10px;
            border-radius: 8px;
            font-size: 12px;
            font-weight: 600;
            z-index: 10;
        }

        .size-display.custom-size {
            background: var(--dark);
            font-size: 10px;
            padding: 3px 6px;
        }

        .mockup-info {
            text-align: center;
            margin-top: 15px;
            font-size: 0.9rem;
            color: #6c757d;
        }

        /* ===== ЭЛЕМЕНТЫ НА ЛИСТЕ ===== */
        .item-on-sheet {
            background: #f0f0f0 !important;
            border: 2px solid var(--dark) !important;
            display: flex;
            justify-content: center;
            align-items: center;
            color: var(--dark);
            box-sizing: border-box;
            margin: 2px;
            flex-grow: 0;
            flex-shrink: 0;
            font-size: 0.9em;
            font-weight: 700;
            position: relative;
            overflow: hidden;
        }

        .item-on-sheet > div {
            font-size: 12px;
            font-weight: 700;
            color: var(--dark);
            text-align: center;
            padding: 2px;
            transform: scale(1);
            line-height: 1.1;
        }

        .item-outline {
            font-size: 12px;
            font-weight: 700;
            color: var(--dark);
            text-align: center;
            padding: 2px;
            line-height: 1.1;
        }

        /* ===== ВИЗИТКИ ===== */
        .visiting-card-item {
            background: #f0f0f0;
            border: 1px solid var(--dark);
            border-radius: 4px;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 8px;
            color: var(--dark);
            box-sizing: border-box;
            position: relative;
            overflow: hidden;
            font-weight: 700;
        }

        .visiting-card-size {
            transform: scale(1);
            font-weight: 700;
            font-size: 8px;
            text-align: center;
            padding: 1px;
        }

        .visiting-card-layout {
            display: grid;
            grid-template-columns: repeat(3, 1fr);
            grid-template-rows: repeat(8, 1fr);
            width: 100%;
            height: 100%;
            padding: 5px;
            gap: 2px;
        }

        /* ===== СПИСОК ПРОДУКТОВ ===== */
        .products-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 20px;
        }

        .products-list {
            max-height: 300px;
            overflow-y: auto;
            margin-bottom: 20px;
            border: 1px solid #e9ecef;
            border-radius: 12px;
            padding: 10px;
        }

        .product-item {
            display: flex;
            flex-direction: column;
            padding: 12px 15px;
            border-bottom: 1px solid #eee;
            transition: var(--transition);
            position: relative;
            cursor: pointer;
            overflow: hidden;
            max-height: 95px;
        }

        .product-item:hover {
            max-height: 450px;
            background-color: #f8faf7;
            border-radius: 8px;
            margin-bottom: 10px;
            box-shadow: 0 4px 8px rgba(0,0,0,0.1);
        }

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

        .product-summary {
            display: flex;
            justify-content: space-between;
            align-items: center;
            min-height: 50px;
        }

        .product-info { 
            flex: 1; 
        }

        .product-name {
            font-weight: 600;
            color: var(--dark);
        }

        .product-basic-details {
            font-size: 0.85rem;
            color: var(--dark);
            margin-top: 5px;
        }

        .product-cost {
            font-weight: 600;
            margin: 0 15px;
            color: var(--dark);
        }

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

        .product-details {
            margin-top: 15px;
            padding-top: 15px;
            border-top: 1px dashed #ddd;
            display: none;
            font-size: 0.85rem;
            color: var(--dark);
        }

        .product-item:hover .product-details { 
            display: block; 
        }

        .detail-row {
            display: flex;
            justify-content: space-between;
            margin-bottom: 8px;
        }

        .empty-list-message {
            text-align: center;
            color: #6c757d;
            padding: 20px;
            font-style: italic;
        }

        .product-type-badge {
            display: inline-block;
            background: #f1f1f1;
            color: var(--dark);
            padding: 4px 8px;
            border-radius: 6px;
            font-size: 0.8rem;
            margin-left: 10px;
            font-weight: 500;
        }

        /* ===== СЕКЦИИ СТОИМОСТИ ===== */
        .total-cost-section {
            background: #f8faf7;
            padding: 20px;
            border-radius: 12px;
            border-left: 4px solid #e9ecef;
        }

        .total-cost-label {
            font-weight: 600;
            color: var(--dark);
            margin-bottom: 10px;
            display: flex;
            align-items: center;
            gap: 8px;
        }

        .total-cost-value {
            font-size: 2rem;
            font-weight: bold;
            color: var(--dark);
            text-align: center;
        }

        .minimal-cost {
            background-color: #fff9e6;
            border-left: 4px solid #ffc107;
            padding: 10px 15px;
            margin-top: 15px;
            border-radius: 8px;
            font-size: 0.9rem;
            display: none;
            color: var(--dark);
        }

        /* Добавьте в секцию логики отображения по типу */
        .not-for-book { display: block; }
        .book-only { display: none; }

        body.book-selected .not-for-book { display: none !important; }
        body.book-selected .book-only { display: block !important; }
        body.book-selected .not-for-visiting { display: none !important; }

        /* ===== СЕКЦИИ СТОИМОСТИ ===== */
        .result-container {
          position: relative;
          transition: var(--transition);
        }

        .result-container .details {
          opacity: 0;
          max-height: 0;
          overflow: hidden;
          transition: all 0.3s ease;
        }

        .result-container:hover .details {
          opacity: 1;
          max-height: 500px; /* Достаточно для отображения всех деталей */
        }

        /* Увеличиваем отступ перед деталями при наведении */
        .result-container:hover {
          padding-bottom: 20px;
        }

        /* На мобильных устройствах показываем детали всегда */
        @media (max-width: 600px) {
          .result-container .details {
            opacity: 1;
            max-height: none;
            display: grid;
          }
        }

        /* ===== КНОПКИ ДЕЙСТВИЙ ===== */
        .action-btn.delete-btn.button {
            width: 40px;
            height: 40px;
            border-radius: 50%;
            background-color: rgb(20, 20, 20);
            border: none;
            font-weight: 600;
            display: flex;
            align-items: center;
            justify-content: center;
            box-shadow: 0px 0px 20px rgba(0, 0, 0, 0.164);
            cursor: pointer;
            transition-duration: .3s;
            overflow: hidden;
            position: relative;
        }

        .action-btn.delete-btn.button .svgIcon {
            width: 12px;
            transition-duration: .3s;
        }

        .action-btn.delete-btn.button .svgIcon path { 
            fill: white; 
        }

        .action-btn.delete-btn.button:hover {
            width: 140px;
            border-radius: 50px;
            transition-duration: .3s;
            background-color: rgb(255, 69, 69);
            align-items: center;
        }

        .action-btn.delete-btn.button:hover .svgIcon {
            width: 50px;
            transition-duration: .3s;
            transform: translateY(60%);
        }

        .action-btn.delete-btn.button::before {
            position: absolute;
            top: -20px;
            content: "Удалить";
            color: white;
            transition-duration: .3s;
            font-size: 2px;
        }

        .action-btn.delete-btn.button:hover::before {
            font-size: 13px;
            opacity: 1;
            transform: translateY(30px);
            transition-duration: .3s;
        }

        .action-btn.edit-btn.edit-button {
            width: 40px;
            height: 40px;
            border-radius: 50%;
            background-color: rgb(20, 20, 20);
            border: none;
            font-weight: 600;
            display: flex;
            align-items: center;
            justify-content: center;
            box-shadow: 0px 0px 20px rgba(0, 0, 0, 0.164);
            cursor: pointer;
            transition-duration: 0.3s;
            overflow: hidden;
            position: relative;
            text-decoration: none !important;
        }

        .action-btn.edit-btn.edit-button .edit-svgIcon {
            width: 17px;
            transition-duration: 0.3s;
        }

        .action-btn.edit-btn.edit-button .edit-svgIcon path { 
            fill: white; 
        }

        .action-btn.edit-btn.edit-button:hover {
            width: 120px;
            border-radius: 50px;
            transition-duration: 0.3s;
            background-color: var(--primary);
            align-items: center;
        }

        .action-btn.edit-btn.edit-button:hover .edit-svgIcon path { 
            fill: var(--dark); 
        }

        .action-btn.edit-btn.edit-button::before {
            display: none;
            content: "Изменить";
            color: var(--dark);
            transition-duration: 0.3s;
            font-size: 2px;
        }

        .action-btn.edit-btn.edit-button:hover::before {
            display: block;
            padding-right: 10px;
            font-size: 13px;
            opacity: 1;
            transform: translateY(0px);
            transition-duration: 0.3s;
        }

        /* ===== КНОПКА СОХРАНЕНИЯ ===== */
        .save-button-container {
            display: flex;
            justify-content: center;
            margin-top: 30px;
            width: 100%;
        }

        #saveProductBtn.button {
            --width: 220px;
            --height: 55px;
            --tooltip-height: 40px;
            --tooltip-width: 220px;
            --gap-between-tooltip-to-button: 18px;
            --button-color: var(--primary);
            --tooltip-color: var(--dark);
            width: var(--width);
            height: var(--height);
            background: var(--button-color);
            position: relative;
            text-align: center;
            border-radius: 12px;
            font-family: "Montserrat", sans-serif;
            transition: all 0.3s ease;
            border: none;
            cursor: pointer;
            margin: 0 auto;
            display: flex;
            align-items: center;
            justify-content: center;
            padding: 0;
            overflow: visible;
        }

        #saveProductBtn.button::before {
            position: absolute;
            content: attr(data-tooltip);
            width: var(--tooltip-width);
            height: var(--tooltip-height);
            background-color: var(--tooltip-color);
            font-size: 1rem;
            color: white;
            border-radius: 8px;
            line-height: var(--tooltip-height);
            bottom: calc(var(--height) + var(--gap-between-tooltip-to-button) + 10px);
            left: calc(50% - var(--tooltip-width) / 2);
            z-index: 1000;
            text-align: center;
            font-weight: 500;
            box-shadow: 0 4px 12px rgba(0,0,0,0.15);
        }

        #saveProductBtn.button::after {
            position: absolute;
            content: '';
            width: 0;
            height: 0;
            border: 12px solid transparent;
            border-top-color: var(--tooltip-color);
            left: calc(50% - 12px);
            bottom: calc(100% + var(--gap-between-tooltip-to-button) - 10px);
        }

        #saveProductBtn.button::after,
        #saveProductBtn.button::before {
            opacity: 0;
            visibility: hidden;
            transition: all 0.3s ease;
        }

        #saveProductBtn .button-wrapper {
            position: relative;
            width: 100%;
            height: 100%;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        #saveProductBtn .text {
            display: flex;
            align-items: center;
            justify-content: center;
            font-weight: 600;
            font-size: 17px;
            color: white;
            position: absolute;
            width: 100%;
            height: 100%;
            top: 0;
            left: 0;
            transition: all 0.3s ease;
        }

        #saveProductBtn .icon {
            display: flex;
            align-items: center;
            justify-content: center;
            position: absolute;
            width: 100%;
            height: 100%;
            top: 100%;
            left: 0;
            transition: all 0.3s ease;
            color: white;
        }

        #saveProductBtn .icon svg {
            width: 22px;
            height: 22px;
            fill: white;
        }

        #saveProductBtn .icon svg path {
            fill: white;
        }

        #saveProductBtn.button:hover {
            background: var(--primary-dark);
            transform: translateY(-2px);
            box-shadow: 0 6px 15px rgba(200, 242, 61, 0.3);
        }

        #saveProductBtn.button:hover .text { 
            top: -100%; 
        }

        #saveProductBtn.button:hover .icon { 
            top: 0; 
        }

        #saveProductBtn.button:hover:before,
        #saveProductBtn.button:hover:after {
            opacity: 1;
            visibility: visible;
        }

        #saveProductBtn.button:hover:after {
            bottom: calc(100% + var(--gap-between-tooltip-to-button) - 20px);
        }

        #saveProductBtn.button:hover:before {
            bottom: calc(100% + var(--gap-between-tooltip-to-button));
        }

        /* ===== УВЕДОМЛЕНИЯ И МОДАЛЬНЫЕ ОКНА ===== */
        .notification {
            position: fixed;
            top: 20px;
            right: 20px;
            background: white;
            padding: 20px;
            border-radius: 10px;
            box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
            border-left: 4px solid #e9ecef;
            z-index: 2000;
            display: flex;
            align-items: center;
            gap: 10px;
            transform: translateX(100%);
            transition: var(--transition);
            max-width: 350px;
            color: var(--dark);
        }

        .notification.show { 
            transform: translateX(0); 
        }

        .notification-icon {
            font-size: 24px;
            color: var(--dark);
        }

        .notification-content {
            flex: 1;
            overflow: hidden;
        }

        .notification-title {
            font-weight: 600;
            margin-bottom: 5px;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
            color: var(--dark);
        }

        .notification-close {
            background: none;
            border: none;
            font-size: 18px;
            cursor: pointer;
            color: #6c757d;
        }

                .error-message {
            color: #ff4757;
            font-size: 0.85rem;
            margin-top: 5px;
            display: none;
        }

        .minimal-cost {
            background-color: #fff9e6;
            border-left: 4px solid #ffc107;
            padding: 10px 15px;
            margin-top: 15px;
            border-radius: 8px;
            font-size: 0.9rem;
            display: none;
            color: var(--dark);
        }

        .modal-overlay {
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: rgba(0,0,0,0.5);
            display: flex;
            justify-content: center;
            align-items: center;
            z-index: 3000;
            display: none;
        }

        .modal {
            background: white;
            border-radius: 12px;
            padding: 25px;
            max-width: 500px;
            width: 90%;
            box-shadow: 0 10px 30px rgba(0,0,0,0.2);
            color: var(--dark);
        }

        .modal-title {
            font-size: 1.3rem;
            margin-bottom: 15px;
            color: var(--dark);
        }

        .modal-buttons {
            display: flex;
            justify-content: flex-end;
            gap: 15px;
            margin-top: 20px;
        }

        .modal-btn {
            padding: 10px 20px;
            border-radius: 8px;
            border: none;
            cursor: pointer;
            font-weight: 600;
            transition: background-color 0.2s;
        }

        .modal-confirm {
            background: var(--primary);
            color: var(--dark);
        }

        .modal-confirm:hover { 
            background: var(--primary-dark); 
        }

        .modal-cancel {
            background: #f1f1f1;
            color: #333;
        }

        .modal-cancel:hover { 
            background: #e2e2e2; 
        }

        /* ===== ФУТЕР ===== */
        footer {
            background: var(--dark);
            color: white;
            text-align: center;
            padding: 30px 0;
            font-size: 0.9rem;
            border-radius: var(--border-radius);
            margin-top: 40px;
        }

        .footer-container {
            max-width: 1200px;
            margin: 0 auto;
            padding: 0 20px;
        }

        /* ===== ВСПОМОГАТЕЛЬНЫЕ СТИЛИ ===== */
        .info-text {
            font-size: 0.9rem;
            color: #6c757d;
            margin-top: 5px;
            font-style: italic;
        }

        .warning-text, .error-message {
            color: #ff4757;
            font-size: 0.85rem;
            margin-top: 5px;
            display: none;
        }

        .detail-label {
            color: var(--dark);
            display: flex;
            align-items: center;
            gap: 8px;
        }

        .detail-value {
            font-weight: 600;
            color: var(--dark);
        }

        /* ===== ЛОГИКА ОТОБРАЖЕНИЯ ПО ТИПУ ===== */
        .visiting-card-only { 
            display: none; 
        }

        .not-for-visiting { 
            display: block; 
        }

        body.visiting-card-selected .not-for-visiting { 
            display: none; 
        }

        body.visiting-card-selected .visiting-card-only { 
            display: block; 
        }

        .not-for-booklet { 
            display: block; 
        }

        .booklet-only { 
            display: none; 
        }

        body.booklet-selected .not-for-booklet { 
            display: none !important; 
        }

        body.booklet-selected .booklet-only { 
            display: block !important; 
        }

        body.booklet-selected .not-for-visiting { 
            display: none !important; 
        }

        .mockup-container {
            display: block !important;
        }

        .not-for-visiting, .visiting-card-only {
            transition: opacity 0.2s ease;
        }

        input[type="radio"] {
            margin-right: 8px;
        }

        .checkbox-container input[type="radio"] {
            position: absolute;
            opacity: 0;
            cursor: pointer;
            height: 0;
            width: 0;
        }

        .checkbox-container input[type="radio"]:checked ~ .checkmark {
            background-color: var(--primary);
        }

        .checkbox-container input[type="radio"]:checked ~ .checkmark:after {
            content: "";
            position: absolute;
            display: block;
            left: 0.4em;
            top: 0.4em;
            width: 0.5em;
            height: 0.5em;
            border-radius: 50%;
            background: white;
        }

        body.visiting-card-selected .not-for-visiting {
            display: none !important;
            opacity: 0;
        }

        body.visiting-card-selected .visiting-card-only {
            display: block !important;
            opacity: 1;
        }

        input.invalid {
            border-color: #ff4757;
            background-color: rgba(255, 71, 87, 0.05);
        }

        .postprint-section {
            margin-top: 30px;
            padding-top: 20px;
            border-top: 2px solid #e9ecef;
        }

        .postprint-options, .additional-options {
            display: none;
            margin-top: 15px;
            background: #f8faf7;
            padding: 20px;
            border-radius: 12px;
            border-left: 4px solid #e9ecef;
        }

        .item-on-sheet { 
            font-size: 0.7em; 
        }

        .visiting-card-item { 
            font-size: 0.5em; 
        }

        /* ===== ЛИНИИ СГИБА ===== */
        .fold-line-horizontal {
            position: absolute;
            left: 10%;
            right: 10%;
            height: 1px;
            background: transparent;
            border-top: 1px dashed #ff0000;
        }

        .fold-line-vertical {
            position: absolute;
            top: 10%;
            bottom: 10%;
            width: 1px;
            background: transparent;
            border-left: 1px dashed #ff0000;
        }

        /* ===== АДАПТИВНОСТЬ ===== */
        @media (max-width: 1100px) { 
            .main-content { 
                grid-template-columns: 1fr; 
            } 
        }

        @media (max-width: 600px) {
            .container { 
                padding: 10px; 
            }
            
            h1 { 
                font-size: 2rem; 
                margin-bottom: 15px; 
            }
            
            .main-content { 
                gap: 15px; 
                margin-bottom: 15px; 
            }
            
            .form-container, .mockup-container, .result-container, .products-container { 
                padding: 20px 15px; 
            }
            
            .section-title { 
                font-size: 1.2rem; 
                margin-bottom: 15px; 
            }
            
            .form-group { 
                margin-bottom: 15px; 
            }
            
            select, input { 
                padding: 12px 15px; 
                font-size: 14px; 
            }
            
            .size-inputs { 
                grid-template-columns: 1fr; 
                gap: 10px; 
            }
            
            .cost { 
                font-size: 2rem; 
                margin: 15px 0; 
            }
            
            .details { 
                grid-template-columns: 1fr; 
                gap: 10px; 
            }
            
            .a3-sheet { 
                width: 200px; 
                height: 280px; 
            }
            
            .product-summary { 
                flex-direction: column; 
                align-items: flex-start; 
            }
            
            .product-cost { 
                margin: 10px 0; 
            }
            
            .product-actions { 
                align-self: flex-end; 
            }
            
            .total-cost-value { 
                font-size: 1.5rem; 
            }
            
            .products-header { 
                flex-direction: column; 
                gap: 10px; 
                align-items: flex-start; 
            }
            
            .input-with-button { 
                flex-direction: column; 
                gap: 5px; 
            }
            
            .all-button { 
                width: 100%; 
            }
            
            .quantity-control { 
                justify-content: center; 
            }
            
            .save-button { 
                padding: 0.5em 1em; 
                font-size: 16px; 
            }
            
            .item-outline { 
                font-size: 10px; 
            }
            
            .visiting-card-size { 
                font-size: 7px; 
            }
        }

        @media (max-width: 400px) {
            h1 { 
                font-size: 1.7rem; 
            }
            
            .form-container, .mockup-container, .result-container, .products-container { 
                padding: 15px 10px; 
            }
            
            .section-title { 
                font-size: 1.1rem; 
            }
            
            select, input { 
                padding: 10px 12px; 
                font-size: 14px; 
            }
            
            .cost { 
                font-size: 1.7rem; 
            }
            
            .detail-item { 
                flex-direction: column; 
                gap: 5px; 
                align-items: flex-start; 
            }
            
            .detail-value { 
                text-align: left; 
            }
            
            .a3-sheet { 
                width: 150px; 
                height: 210px; 
            }
            
            .product-item { 
                padding: 8px 10px; 
            }
            
            .product-name { 
                font-size: 0.9rem; 
            }
            
            .product-basic-details { 
                font-size: 0.8rem; 
            }
            
            .product-type-badge { 
                font-size: 0.7rem; 
                margin-left: 5px; 
            }
            
            .action-btn.delete-btn.button,
            .action-btn.edit-btn.edit-button { 
                width: 35px; 
                height: 35px; 
            }
            
            .action-btn.delete-btn.button:hover,
            .action-btn.edit-btn.edit-button:hover { 
                width: 120px; 
            }
            
            .total-cost-value { 
                font-size: 1.3rem; 
            }
            
            .notification { 
                max-width: 280px; 
                padding: 15px; 
                right: 10px; 
            }
            
            .modal { 
                width: 95%; 
                padding: 15px; 
            }
            
            .modal-buttons { 
                flex-direction: column; 
                gap: 10px; 
            }
            
            .modal-btn { 
                width: 100%; 
            }
            
            footer { 
                padding: 20px 0; 
                font-size: 0.8rem; 
            }
            
            .visiting-card-layout { 
                grid-template-columns: repeat(3, 1fr); 
                grid-template-rows: repeat(8, 1fr); 
            }
            
            .item-outline { 
                font-size: 8px !important; 
            }
            
            .visiting-card-size { 
                font-size: 6px; 
            }
        }

        @media (max-width: 300px) {
            .container { 
                padding: 5px; 
            }
            
            h1 { 
                font-size: 1.5rem; 
            }

            .result-container {
                position: relative;
                transition: var(--transition);
            }

            .result-container .details {
                opacity: 0;
                max-height: 0;
                overflow: hidden;
                transition: all 0.3s ease;
            }

            .result-container:hover .details {
                opacity: 1;
                max-height: 500px; /* Достаточно для отображения всех деталей */
            }

            /* На мобильных устройствах показываем детали всегда */
            @media (max-width: 600px) {
                .result-container .details {
                    opacity: 1;
                    max-height: none;
                    display: grid;
                }
            }

            /* Увеличиваем отступ перед деталями при наведении */
            .result-container:hover {
                padding-bottom: 20px;
            }
            
            .form-container, .mockup-container, .result-container, .products-container { 
                padding: 10px 8px; 
            }
            
            select, input { 
                padding: 8px 10px; 
                font-size: 13px; 
            }
            
            .cost { 
                font-size: 1.5rem; 
            }
            
            .a3-sheet { 
                width: 120px; 
                height: 170px; 
            }
            
            .product-actions { 
                flex-direction: column; 
                gap: 5px; 
            }
            
            .action-btn.delete-btn.button,
            .action-btn.edit-btn.edit-button { 
                width: 30px; 
                height: 30px; 
            }
            
            .action-btn.delete-btn.button:hover,
            .action-btn.edit-btn.edit-button:hover { 
                width: 110px; 
            }
            
            .total-cost-value { 
                font-size: 1.2rem; 
            }
            
            .notification { 
                max-width: 250px; 
                padding: 10px; 
                right: 5px; 
            }
        }
        #visitingCardSuggestionModal .modal {
            max-width: 450px;
        }
        #visitingCardSuggestionModal .modal p {
            margin-bottom: 15px;
            line-height: 1.5;
        }
