* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body, html {
    height: 100%;
    font-family: sans-serif;
    overflow: hidden;
    background: #f8f9fa;
}

.app-container {
    display: flex;
    height: 100vh;
    width: 100vw;
}

/* --- SOL PANEL --- */
.sidebar {
    width: 250px;
    background: #ffffff;
    border-right: 1px solid #ddd;
    padding: 20px;
    overflow-y: auto;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
}

.sidebar h2 {
    font-size: 1.2rem;
    margin-bottom: 15px;
    color: #333;
    text-align: center;
}

/* YENİ EKLENEN BUTON STİLLERİ */
.action-buttons {
    display: flex;
    gap: 8px;
    margin-bottom: 15px;
}

.action-buttons button {
    flex: 1;
    padding: 8px 5px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.75rem;
    font-weight: bold;
    color: white;
    transition: all 0.2s;
}

#btn-delete {
    background: #ff4d4d;
}

#btn-delete:hover:not(:disabled) {
    background: #ff1a1a;
}

#btn-delete:disabled {
    background: #ffb3b3;
    cursor: not-allowed;
}

#btn-clear {
    background: #6c757d;
}

#btn-clear:hover {
    background: #5a6268;
}
/* -------------------------- */

.clothing-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.thumbnail {
    border: 1px solid #ddd;
    padding: 10px;
    border-radius: 8px;
    cursor: pointer;
    text-align: center;
    background: #fafafa;
    transition: all 0.2s;
}

.thumbnail:hover {
    border-color: #999;
    background: #f0f0f0;
}

.thumbnail img {
    width: 100%;
    height: auto;
    object-fit: contain;
    pointer-events: none;
}

.thumbnail span {
    display: block;
    font-size: 0.75rem;
    margin-top: 5px;
    color: #555;
    pointer-events: none;
}

/* --- SAĞ PANEL (CANVAS) --- */
.canvas-area {
    flex: 1;
    position: relative;
    background: #eaeaea;
    overflow: hidden;
    touch-action: none;
}

/* --- KIYAFET OBJESİ --- */
.clothing-item {
    position: absolute;
    cursor: grab;
    user-select: none;
}

.clothing-item:active {
    cursor: grabbing;
}

.clothing-item img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    pointer-events: none;
    display: block;
}

.clothing-item.selected {
    outline: 2px dashed #007bff;
}

.resize-handle {
    position: absolute;
    width: 14px;
    height: 14px;
    background: #007bff;
    border: 2px solid #fff;
    border-radius: 50%;
    z-index: 10;
    display: none;
}

.clothing-item.selected .resize-handle {
    display: block;
}

.handle-nw { top: -7px; left: -7px; cursor: nwse-resize; }
.handle-ne { top: -7px; right: -7px; cursor: nesw-resize; }
.handle-sw { bottom: -7px; left: -7px; cursor: nesw-resize; }
.handle-se { bottom: -7px; right: -7px; cursor: nwse-resize; }