.dm-const-container{
    width: 100%;
    display: flex;
	flex-direction: column;
    justify-content: center;
    align-items: center;	
	font-family: "Montserrat", Sans-serif;
}
.dm-constructor-archive-header{
	margin: 80px 0px 0px 0px;
}

.dm-const-constructor {
    max-width: 1900px;
   
	width: 100%;
    background: white;
    border-radius: 32px;
    /*box-shadow: 0 20px 40px rgba(0,0,0,0.15);
    */
	padding: 30px;
	
}
.dm-const-header {
    font-size: 12px;
    font-weight: 600;
    margin: 0 0 25px 0;
    color: #1a2b3c;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}
.dm-const-header small {
    font-size: 12px;
    font-weight: 600;
    color: #5e6f7e;
    margin-left: auto;
}

/* ДВУХКОЛОНОЧНЫЙ МАКЕТ */
.dm-const-layout {
    display: flex;
    gap: 25px;
    min-height: 700px;
}

/* ЛЕВАЯ КОЛОНКА (АККОРДЕОН) */
.dm-const-sidebar {
    width: 30%;
    background: var(--e-global-color-97e8f69);
    border-radius: 24px;
    border: 1px solid #dee2e6;
    padding: 20px;
    overflow-y: auto;
    max-height: 700px;
    box-shadow: inset 0 2px 5px rgba(0,0,0,0.02);
}

/* ПРАВАЯ КОЛОНКА (ВИЗУАЛИЗАТОР + ФОРМА) */
.dm-const-visualizer {
    width: 70%;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* КРАСИВАЯ ПОЛОСА ПРОКРУТКИ ДЛЯ ПРАВОГО БЛОКА */
.dm-const-sidebar::-webkit-scrollbar {
    width: 8px;
}

.dm-const-sidebar::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 10px;
    margin: 5px;
}

.dm-const-sidebar::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, var(--e-global-color-97e8f69), #6c7e91);
    border-radius: 10px;
    border: 2px solid #f1f5f9;
    transition: all 0.3s ease;
}

.dm-const-sidebar::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #6c7e91, #4d6278);
}

/* Для Firefox */
.dm-const-sidebar {
    scrollbar-width: thin;
    scrollbar-color: var(--e-global-color-97e8f69) #f1f5f9;
}

/* Стили для аккордеона */
.dm-const-accordion-item {
    margin-bottom: 15px;
    border-radius: 16px;
    background: white;
    border: 1px solid var(--e-global-color-97e8f69);
    overflow: hidden;
    box-shadow: 0 2px 6px rgba(0,0,0,0.03);
}
.dm-const-accordion-header {
    width: 100%;
    padding: 16px 20px;
    background: white;
    border: none;
    text-align: left;
    font-size: 18px;
    font-weight: 600;
    color: #1e3a5f;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background 0.15s;
    border-bottom: 2px solid transparent;
}
.dm-const-accordion-header:hover {
    background: #f1f5f9;
}
.dm-const-accordion-header.dm-const-active {
    background: linear-gradient(135deg, var(--e-global-color-4de8dbf) 0%, #000 100%);
	color: white;
    border-bottom: 2px solid #ccc;
}
.dm-const-accordion-header .dm-const-arrow {
    font-size: 20px;
    color: #5e6f7e;
    transition: transform 0.2s;
}
.dm-const-accordion-header.dm-const-active .dm-const-arrow {
    transform: rotate(90deg);
    color: var(--n-tabs-title-color);
}
.dm-const-accordion-content {
    padding: 0 20px 20px 20px;
    background: white;
}
.dm-const-accordion-content.dm-const-hidden {
    display: none;
}

/* Сетка вариантов внутри аккордеона - по умолчанию 2 колонки */
.dm-const-variant-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-top: 15px;
}
.dm-const-variant-item {
    background: white;
    border: 2px solid #dee2e6;
    border-radius: 16px;
    padding: 12px 8px;
    text-align: center;
    font-weight: 500;
    cursor: pointer;
    transition: 0.1s;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}
.dm-const-variant-item:hover {
    border-color: #ccc;
    transform: scale(1.02);
}
.dm-const-variant-item.dm-const-selected {
    border-color: var(--e-global-color-5e0ba6d);
    background: var(--e-global-color-5e0ba6d);
	color: white;
}

.dm-const-variant-item.dm-const-selected .dm-const-variant-name {
	color: white !important;
}

/* Контейнер для изображения варианта с шаблоном на фоне */
.dm-const-variant-image-container {
    position: relative;
    width: 100%;
    height: 80px;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #ced4da;
    background-color: white;
}

/* Шаблонное изображение (фон) */
.dm-const-template-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /*background-image: url('template.png');
    */
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0.5;
    pointer-events: none;
}

/* Изображение элемента (поверх шаблона) */
.dm-const-variant-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    pointer-events: none;
    z-index: 2;
}

.dm-const-variant-name {
    font-size: 14px;
    color: #1e293b;
    position: relative;
    z-index: 3;
}

/* область предпросмотра */
.dm-const-preview {
    background: var(--e-global-color-97e8f69);
    border-radius: 24px;
    padding: 10px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    
}
.dm-const-layers-container {
    position: relative;
    width: 100%;
    aspect-ratio: 6 / 4;
    border-radius: 20px;
    /*box-shadow: 0 10px 25px rgba(0,0,0,0.2);
    */overflow: hidden;
    border: 3px solid var(--e-global-color-97e8f69);
    background-color: white;
}
.dm-const-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    pointer-events: none;
}

/* кнопка скачивания */
.dm-const-download-container {
    margin-top: 20px;
    display: flex;
    justify-content: center;
}
.dm-const-download-btn {
    background: var(--e-global-color-5e0ba6d);
    color: white;
    border: none;
    padding: 12px 28px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 60px;
    cursor: pointer;
    box-shadow: 0 8px 18px rgba(13, 59, 94, 0.3);
    transition: all 0.2s;
    border: 1px solid var(--e-global-color-5e0ba6d);
}
.dm-const-download-btn:hover {
    background: var(--e-global-color-accent);
    transform: translateY(-2px);
    box-shadow: 0 12px 24px rgba(13, 59, 94, 0.4);
	border: 1px solid var(--e-global-color-accent);
}
.dm-const-download-btn:active {
    transform: translateY(1px);
    box-shadow: 0 4px 10px rgba(13, 59, 94, 0.4);
}
.dm-const-download-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

/* ФОРМА ОТПРАВКИ */
.dm-const-form {
    background: var(--e-global-color-97e8f69);
    border-radius: 24px;
    padding: 25px;
    border: 1px solid #dee2e6;
}
.dm-const-form-title {
    font-size: 20px;
    font-weight: 600;
    margin: 0 0 15px 0;
    color: #2c3e50;
}
.dm-const-field {
    margin-bottom: 15px;
}
.dm-const-field label {
    display: block;
    font-weight: 500;
    margin-bottom: 5px;
    color: #334155;
}
.dm-const-field input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #cbd5e1;
    border-radius: 60px;
    font-size: 15px;
    background: white;
}
.dm-const-summary {
    background: white;
    padding: 15px 20px;
    border-radius: 20px;
    margin: 20px 0;
    font-size: 15px;
    line-height: 1.7;
}
.dm-const-summary strong {
    color: var(--e-global-color-5e0ba6d);
}
.dm-const-submit-btn {
    background: var(--e-global-color-5e0ba6d);
    color: white;
    border: none;
    padding: 16px 32px;
    font-size: 18px;
    font-weight: 600;
    border-radius: 60px;
    cursor: pointer;
    width: 100%;
    transition: background 0.2s;
}
.dm-const-submit-btn:hover {
    background: #1a4f7a;
}

/* чекбокс для фасада */
.dm-const-facade-toggle {
    margin-top: 15px;
    padding: 12px 15px;
    background: #f1f5f9;
    border-radius: 50px;
    display: flex;
    align-items: center;
    gap: 12px;
}
.dm-const-facade-toggle input {
    width: 18px;
    height: 18px;
    cursor: pointer;
}
.dm-const-facade-toggle label {
    font-weight: 500;
    color: #1e3a5f;
    cursor: pointer;
}

/* Скрытые поля для отправки формы */
.dm-const-hidden-fields {
    display: none;
}

/* ========== АДАПТИВНОСТЬ ========== */
@media (max-width: 768px) {
    .dm-const-layout {
        flex-direction: column;
        min-height: auto;
    }
    .dm-const-sidebar {
        width: 100%;
        max-height: 400px;
        order: 2;
    }
	
	.dm-const-header {
		text-align: center;
        display: none;		
	}
	
    .dm-const-visualizer {
        width: 100%;
        order: 1;
    }
    .dm-const-header small {
        margin-left: 0;
        width: 100%;
    }
	
	.dm-constructor-archive-header{
		text-align: center;
	}
    .dm-const-constructor {
        padding: 20px;
    }
    .dm-const-preview {
        padding: 20px;
    }
    .dm-const-variant-grid {
        grid-template-columns: 1fr !important;
    }
    .dm-const-accordion-header {
        font-size: 16px;
        padding: 14px 16px;
    }
}