    /* ===== 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;
        }
        /* Убрать стиль, который показывает book-only для всех типов */
        .book-only { 
            display: none !important; 
        }

        /* Показывать book-only только когда body имеет класс book-selected */
        body.book-selected .book-only { 
            display: block !important; 
        }

        /* Скрывать not-for-book когда выбрана книга */
        body.book-selected .not-for-book { 
            display: none !important; 
        }
        .book-section {
            margin-top: 20px;
            padding-top: 20px;
            border-top: 1px solid #e9ecef;
        }

        #bookCoverSections {
            transition: all 0.3s ease;
        }

        /* Адаптивность для книг */
        @media (max-width: 600px) {
            .book-section {
                margin-top: 15px;
                padding-top: 15px;
            }
        }

        /* Добавить в конец файла */
        body.book-selected .mockup-container {
            display: none !important;
        }
    /* ===== ОСНОВНЫЕ СТИЛИ СТРАНИЦЫ ===== */
        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; }
    /* ===== КАРТОЧКИ И КОНТЕЙНЕРЫ ===== */
        .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; /* Добавлен отступ */}
    /* ===== ФОРМЫ И ЭЛЕМЕНТЫ ВВОДА ===== */
        .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);
        }

        /* ===== МАКЕТ ЛИСТА ===== */
        .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);
        }

        /* ===== СЕКЦИИ СТОИМОСТИ ===== */
        .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;
        }