/* ── Шкаф ── */
.wardrobe-page { padding: 30px 0 60px; }
.wardrobe-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 30px; }
.wardrobe-header h1 { font-size: 28px; }
.wardrobe-actions { display: flex; gap: 12px; }

.wardrobe-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }

.shelf {
    background: var(--card-bg); border-radius: var(--radius); box-shadow: var(--shadow);
    overflow: hidden; cursor: pointer; transition: 0.3s; position: relative; min-height: 200px;
}
.shelf:hover { box-shadow: var(--shadow-lg); transform: translateY(-4px); }

.shelf-door {
    position: absolute; inset: 0; display: flex; flex-direction: column;
    align-items: center; justify-content: center; z-index: 2;
    background: linear-gradient(135deg, #e0e7ff, #c7d2fe);
    transition: transform 0.6s ease; transform-origin: left;
}
.shelf.open .shelf-door { transform: rotateY(-85deg); }

.shelf-icon { font-size: 48px; margin-bottom: 10px; }
.shelf-label { font-weight: 700; font-size: 16px; color: var(--text); }
.shelf-count { font-size: 13px; color: var(--text-muted); margin-top: 4px; }

/* ── Слайдер ── */
.shelf-slider {
    position: fixed; top: 0; right: -500px; width: 460px; max-width: 100vw;
    height: 100vh; background: var(--card-bg); box-shadow: var(--shadow-lg);
    transition: right 0.4s ease; z-index: 200; display: flex; flex-direction: column;
}
.shelf-slider.open { right: 0; }
.slider-header { padding: 18px 20px; border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; }
.slider-header h2 { font-size: 18px; }
.slider-close { background: none; border: none; font-size: 24px; cursor: pointer; color: var(--text-muted); }
.slider-body { flex: 1; overflow-y: auto; padding: 20px; }

.item-card {
    background: var(--bg); border-radius: 10px; padding: 14px; margin-bottom: 14px;
    display: flex; gap: 14px; align-items: start; transition: 0.2s;
}
.item-card:hover { box-shadow: var(--shadow); }
.item-card img { width: 90px; height: 90px; object-fit: cover; border-radius: 8px; flex-shrink: 0; }
.item-card .item-info { flex: 1; }
.item-card .item-desc { font-size: 13px; color: var(--text-muted); margin: 4px 0; }
.item-card .item-meta { font-size: 12px; color: var(--text-muted); display: flex; flex-wrap: wrap; gap: 8px; }
.item-card .item-actions { display: flex; gap: 8px; margin-top: 8px; }
.item-card .tryon-btn { background: var(--primary); color: #fff; border: none; padding: 6px 14px; border-radius: 6px; font-size: 13px; cursor: pointer; }
.item-card .delete-btn { background: var(--bg); color: var(--danger); border: 1px solid var(--border); padding: 6px 14px; border-radius: 6px; font-size: 13px; cursor: pointer; }
.item-card .empty-meta { font-size: 12px; color: var(--text-muted); font-style: italic; }

/* ── Модалки ── */
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 300; display: none; align-items: center; justify-content: center; }
.modal-overlay.open { display: flex; }
.modal { background: var(--card-bg); border-radius: var(--radius); padding: 30px; max-width: 500px; width: 90%; max-height: 90vh; overflow-y: auto; }
.modal h2 { margin-bottom: 20px; }

/* ── Примерка ── */
.tryon-result { text-align: center; }
.tryon-result img { max-width: 100%; border-radius: var(--radius); margin: 16px 0; }
.tryon-loading { text-align: center; padding: 40px; }
.tryon-loading .spinner { width: 50px; height: 50px; border: 4px solid var(--border); border-top-color: var(--primary); border-radius: 50%; animation: spin 0.8s linear infinite; margin: 0 auto 20px; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Промпт ── */
.prompt-bar { display: flex; gap: 12px; margin-bottom: 24px; }
.prompt-bar input { flex: 1; padding: 12px 16px; border: 1px solid var(--border); border-radius: 8px; font-size: 15px; }

@media (max-width: 768px) {
    .wardrobe-grid { grid-template-columns: 1fr; }
    .shelf-slider { width: 100%; }
}
