/* ===== СТИЛИ ДЛЯ СЕРВИСА №1 ===== */
#frameToolContainer {
    margin: 20px 0;
    padding: 20px;
    background: #faf8f6;
    border-radius: 16px;
    max-width: 100%;
    box-sizing: border-box;
}
#frameToolContainer h3 {
    text-align: center;
    margin-top: 0;
}
#frameToolContainer p {
    text-align: center;
    color: #555;
}

/* Пресеты интерьеров */
.fit-presets-wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin-bottom: 15px;
}
.fit-preset-bg {
    width: 80px;
    height: 60px;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    border: 3px solid transparent;
    transition: 0.2s;
    background-size: cover;
    background-position: center;
    flex-shrink: 0;
}
.fit-preset-bg.active {
    border-color: #d8450b !important;
    box-shadow: 0 0 0 2px #d8450b;
}
.fit-preset-bg:hover {
    transform: scale(1.05);
}

/* Зоны загрузки */
.drop-zones-wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    justify-content: center;
    margin-bottom: 15px;
}
.drop-zone {
    border: 2px dashed #c0b8ae;
    border-radius: 16px;
    padding: 15px;
    background: #f5f2ed;
    text-align: center;
    cursor: pointer;
    transition: 0.3s;
    flex: 1;
    min-width: 200px;
    position: relative;
}
.drop-zone.dragover {
    border-color: #d8450b;
    background: #f0ece7;
}
.drop-zone input[type="file"] {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
    font-size: 0;
}
.drop-icon {
    font-size: 30px;
    display: block;
}
.drop-hint {
    font-size: 12px;
    color: #999;
}

/* Палитры */
.palettes-wrapper {
    text-align: center;
    margin: 10px 0;
}
.palette-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 5px;
}
.palette-label {
    font-weight: bold;
    font-size: 14px;
}
#colorPalette,
#patternPalette {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: center;
}
.color-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 3px solid transparent;
    cursor: pointer;
    transition: 0.2s;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
    position: relative;
}
.color-btn::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background-image: 
        radial-gradient(circle at 30% 40%, rgba(255,255,255,0.15) 0%, transparent 60%),
        radial-gradient(circle at 70% 60%, rgba(0,0,0,0.05) 0%, transparent 50%);
    pointer-events: none;
}
.color-btn:hover {
    transform: scale(1.08);
    border-color: #888;
}
.color-btn.active {
    border-color: #d8450b;
    box-shadow: 0 0 0 2px #d8450b;
}
.pattern-btn {
    width: 36px;
    height: 36px;
    border-radius: 4px;
    border: 3px solid transparent;
    cursor: pointer;
    transition: 0.2s;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}
.pattern-btn:hover {
    transform: scale(1.08);
    border-color: #888;
}
.pattern-btn.active {
    border-color: #d8450b;
    box-shadow: 0 0 0 2px #d8450b;
}
.pattern-btn svg {
    width: 28px;
    height: 28px;
}
#clearColorBtn {
    margin-top: 8px;
    padding: 4px 16px;
    background: #ccc;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    font-size: 12px;
}

/* Кнопки рамок */
#ftFrameButtons {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
    margin: 15px 0;
}
.ft-frame-btn {
    padding: 6px 12px;
    border: 2px solid #ccc;
    background: #fff;
    color: #333;
    border-radius: 10px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    min-width: 70px;
    transition: 0.2s;
}
.ft-frame-btn.active {
    border-color: #8a7a6a !important;
    background: #8a7a6a !important;
    color: #fff !important;
}
.ft-frame-btn.active img {
    filter: none !important;
    opacity: 1 !important;
}
.ft-frame-btn:hover:not(.active) {
    border-color: #b8a99a;
    background: #f7f5f2;
}
.ft-frame-btn img {
    display: block;
    max-width: 120px;
    max-height: 80px;
    border-radius: 4px;
    object-fit: contain;
}

/* Управление */
.controls-wrapper {
    text-align: center;
    margin: 10px 0;
}
.control-btn {
    padding: 8px 16px;
    background: #333;
    color: #fff;
    border: none;
    border-radius: 30px;
    font-size: 18px;
    cursor: pointer;
    margin: 0 5px;
    transition: 0.2s;
}
.control-btn:hover {
    background: #555;
}
.control-btn.reset {
    background: #666;
    font-size: 14px;
}
.control-btn.reset:hover {
    background: #888;
}
#zoomLevel {
    font-size: 14px;
    font-weight: bold;
    margin: 0 10px;
}

/* Холст */
.canvas-wrapper {
    background: #eae7e2;
    border-radius: 12px;
    max-width: 600px;
    margin: 0 auto;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}
#ftCanvas {
    display: block;
    width: 100%;
    height: auto;
    max-width: 100%;
    touch-action: none;
    background: #eae7e2;
    border-radius: 12px;
}

/* Действия */
.actions-wrapper {
    text-align: center;
    margin-top: 15px;
}
#ftDownloadBtn {
    background: #1a1a1a;
    color: #fff;
    padding: 10px 30px;
    border: none;
    border-radius: 40px;
    font-size: 16px;
    cursor: pointer;
    transition: 0.2s;
}
#ftDownloadBtn:hover {
    background: #333;
}
#ftDownloadBtn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}
.hint {
    font-size: 12px;
    color: #999;
    margin-top: 8px;
}
.btn-frames {
    display: inline-block;
    background: #d8450b;
    color: #fff;
    padding: 10px 30px;
    border-radius: 40px;
    text-decoration: none;
    font-weight: 600;
}

/* Адаптив */
@media (max-width: 480px) {
    .fit-preset-bg {
        width: 60px;
        height: 45px;
    }
    .color-btn {
        width: 28px;
        height: 28px;
    }
    .pattern-btn {
        width: 30px;
        height: 30px;
    }
    .pattern-btn svg {
        width: 22px;
        height: 22px;
    }
    .ft-frame-btn img {
        max-width: 80px;
        max-height: 60px;
    }
}