.product-customizer {
    padding: 20px 20px 20px 15px;
    font-family: 'Manrope', sans-serif;
}

.product-customizer h1 {
    color: #000000;
    margin-bottom: 30px;
    text-align: left;
}

.product-customizer_instruction ul {
    margin-bottom: 30px;
}

/* Поиск товаров */
.product-search {
    margin-bottom: 30px;
}

.product-search input {
    width: 100%;
    padding: 15px;
    border-radius: 20px;
    border: 0;
    color: #000000CC;
    font-size: 16px;
    outline: none;
    background: #F3F5FD;
    transition: border-color 0.3s;
}

.search-results {
    position: relative;
    background: #F3F5FD;
    border-radius: 20px;
    margin-top: 20px;
    max-height: 300px;
    overflow-y: auto;
    z-index: 1000;
}

.product-result {
    display: flex;
    align-items: center;
    padding: 15px;
    border-bottom: 1px solid #eee;
    cursor: pointer;
    transition: background-color 0.3s;
}

.product-result:hover {
    background-color: #0D40C5;
    color: #FFFFFF;
}

.product-result:hover .product-result-info h4,.product-result:hover .product-result-info ins {
    color: #FFFFFF;
}

.product-result img {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 10px !important;
    margin-right: 15px;
}

.product-result-info h4 {
    margin: 0 0 5px 0;
    color: #000000;
}

.price {
    color: #000000;
    font-weight: bold;
}

.price del {
    color: #ABABAB;
    font-size: 12px;
}

.price ins {
    text-decoration: none !important;
    margin-left: 5px;
}

/* Выбранный товар */
.selected-product {
    background: #F3F5FD;
    border-radius: 20px;
    margin-bottom: 30px;
    display: flex;
    align-items: center;
}

#selected-product-info {
    display: flex;
    align-items: center;
    width: 100%;
}

#selected-product-info button:hover {
    border: 1px solid #0D40C5;
}

#selected-product-info div {
    display: flex;
    align-items: center;
    width: 100%;
    justify-content: space-between;
    margin-right: 20px;
}

.selected-product img {
    width: 150px;
    height: 150px;
    object-fit: cover;
    border-radius: 20px !important;;
    margin-right: 20px;
}

.selected-product h4 {
    margin: 0 0 10px 0;
    color: #000000;
}

.selected-product button {
    background: #4CAF50;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s;
}

.selected-product button:hover {
    background: #45a049;
}

/* Выбор изображений товара */
.product-images-section {
    margin-bottom: 30px;
}

.product-images-section h3 {
    color: #000000;
    margin-top: 0;
}

.product-images-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 15px;
    max-height: 300px;
    overflow-y: auto;
    padding: 15px;
    border: 2px dashed #0D40C5;
    border-radius: 20px;
}

.product-image-option {
    cursor: pointer;
    border: 2px solid transparent;
    border-radius: 20px;
    overflow: hidden;
    transition: all 0.3s;
    text-align: center;
}

.product-image-option:hover {
    border-color: #0D40C5;
}

.product-image-option.selected {
    border-color: #0D40C5;
    background: #f0f8f0;
}

.product-image-option img {
    width: 100%;
    height: 100px;
    object-fit: cover;
}

.image-title {
    padding: 8px;
    font-size: 12px;
    color: #666;
    background: #fff;
}

/* Редактор */
.editor-section {
    display: grid;
    grid-template-columns: 600px 1fr;
    gap: 30px;
    margin-top: 30px;
}

.canvas-container {
    border-radius: 20px;
    overflow: hidden;
    background: #F3F5FD;
}

.controls-panel {
    padding: 20px;
    background: #F3F5FD;
    border-radius: 20px;
}

.control-group {
    margin-bottom: 25px;
    padding: 20px;
    background: white;
    border-radius: 20px;
    border: 1px solid #0D40C5;
}

.control-group h3 {
    margin: 0 0 15px 0;
    color: #000000;
    font-size: 16px;
    border-bottom: 1px solid #0D40C5;
    padding-bottom: 10px;
}

/* Загрузка файлов */
.file-upload-area {
    position: relative;
    border: 2px dashed #0D40C5;
    border-radius: 6px;
    padding: 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
}

.file-upload-area:hover {
    border-color: #0D40C5;
    background-color: #F3F5FD;
}

.file-upload-area input[type="file"] {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
    z-index: 2;
}

/* Кнопки */
.btn {
    background: #4CAF50;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s;
    margin: 5px;
}

.btn:hover {
    background: #45a049;
}

.btn-secondary {
    background: #6c757d;
}

.btn-secondary:hover {
    background: #5a6268;
}

.btn-danger {
    background: #dc3545;
}

.btn-danger:hover {
    background: #c82333;
}

#clear-all-logos {
    width: 100%;
    background: transparent;
    border: 1px solid #0D40C5;
    color: #0D40C5;
}

.buttons-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
}

/* Слайдеры */
.slider-container {
    margin: 15px 0;
}

.slider-container label {
    display: block;
    margin-bottom: 5px;
    color: #555;
    font-weight: 500;
}

.slider-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.slider-group input[type="range"] {
    flex: 1;
    background: #F3F5FD;
}

.slider-value {
    min-width: 50px;
    font-weight: bold;
    color: #333;
}

input[type="range"] {
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: #ddd;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
}

input[type="range"]::-webkit-slider-thumb {
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #0D40C5;
    cursor: pointer;
}

input[type="range"]::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #0D40C5;
    cursor: pointer;
    border: none;
}

/* Текстовые поля */
.text-input-group {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.text-input-group input[type="text"] {
    flex: 1;
    padding: 10px;
    background: #F3F5FD;
    border-radius: 10px;
    border: 0;
    outline: none;
}

.text-input-group button {
    padding: 10px 15px;
    background: #4CAF50;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

/* Селекты */
select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: white;
    outline: none;
    margin-bottom: 10px;
}

select:focus {
    border-color: #4CAF50;
}

/* Цветовые поля */
input[type="color"] {
    width: 100%;
    height: 40px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

/* Google Fonts */
.font-search-container {
    position: relative;
    margin-bottom: 15px;
}

.font-search-input {
    width: 100%;
    padding: 12px;
    border: 0;
    border-radius: 10px;
    margin-top: 15px;
    font-size: 16px;
    outline: none;
    background: #F3F5FD;
}

.font-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #ddd;
    border-radius: 6px;
    max-height: 300px;
    overflow-y: auto;
    z-index: 1000;
    margin-top: 15px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.font-suggestion {
    padding: 12px;
    cursor: pointer;
    border-bottom: 1px solid #eee;
    transition: background-color 0.3s;
}

.font-suggestion:hover {
    background-color: #f5f5f5;
}

.font-suggestion:last-child {
    border-bottom: none;
}

.font-preview {
    font-size: 16px;
    font-weight: 500;
    margin-bottom: 4px;
    margin-top: 15px;
    color: #000000;
    border-radius: 10px;
}

.font-variants {
    font-size: 12px;
    color: #666;
}

.font-loading {
    padding: 15px;
    text-align: center;
    color: #666;
    font-style: italic;
}

#text-color {
    margin-top: 15px;
}

.font-error {
    padding: 15px;
    text-align: center;
    color: #dc3545;
    font-weight: 500;
}

.selected-font-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px;
    background: #F3F5FD;
    margin-top: 15px;
    border: 0;
    border-radius: 10px;
    margin-bottom: 15px;
}

.selected-font-name {
    font-weight: 500;
    color: #333;
}

#font-weight {
    margin-top: 15px;
    border: 1px solid #F3F5FD;
    border-radius: 10px;
}

.change-font-btn {
    background: #6c757d;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
}

.change-font-btn:hover {
    background: #5a6268;
}

/* Экшены */
.actions {
    margin-top: 20px;
    margin-bottom: 60px;
    text-align: center;
}

.actions .btn {
    margin: 10px;
    padding: 15px 30px;
    font-size: 16px;
}

/* Скрытые элементы */
.hidden {
    display: none !important;
}

/* Responsive */
@media (max-width: 768px) {
    .editor-section {
        grid-template-columns: 1fr;
    }
    
    .canvas-container {
        width: 100%;
        min-width: 280px;
        padding: 0 10px;
        box-sizing: border-box;
        overflow: visible;
        margin: 0 auto;
    }
    
    .product-images-gallery {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
        gap: 10px;
    }
    
    #selected-product-info div {
        flex-wrap: wrap;
    }
    
    .controls-panel {
        max-width: 100vw;
    }
    
    #text-input {
        max-width: 150px;
    }
    .product-customizer {
        padding: 0;
    }
    
    .product-search {
        padding: 0 10px;
    }
    
    .selected-product {
        margin: 0 10px;
    }
    
    .product-customizer h1 {
        font-size: 24px;
        line-height: 28px;
    }
    
    .product-customizer_instruction ul, .product-customizer_instruction p {
        font-size: 12px;
        line-height: 16px;
    }
    
    .product-customizer h1, .product-customizer_instruction ul, .product-customizer_instruction p {
        margin: 20px 10px;
    }

}
