﻿/* PAGE FURNITURE MODULE - Нормальные компактные стили */
.page-furniture {
    padding: 2rem 0 4rem;
}

.furniture-header {
    text-align: center;
    margin-bottom: 3rem;
}

.furniture-header h1 {
    margin-bottom: 0.5rem;
    color: #1f2937;
    font-size: 2.2rem;
}

.furniture-subtitle {
    color: #6b7280;
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
}

.furniture-info {
    max-width: 700px;
    margin: 0 auto 2rem;
    padding: 1.25rem;
    background: #f9fafb;
    border-radius: 10px;
    border-left: 4px solid #10b981;
    font-size: 1rem;
}

.furniture-info p {
    margin-bottom: 0.5rem;
    color: #6b7280;
}

/* Коллекции */
.collection-section {
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid #e5e7eb;
}

.collection-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.collection-title {
    font-size: 1.75rem;
    color: #1f2937;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #3b82f6;
}

/* СЕТКА 3 КОЛОНКИ НА ДЕСКТОПЕ */
.collection-items {
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    gap: 1.5rem;
}

@media (min-width: 576px) {
    .collection-items {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
    }
}

@media (min-width: 768px) {
    .collection-items {
        grid-template-columns: repeat(3, 1fr); /* 3 колонки! */
        gap: 2rem;
    }
}

@media (min-width: 1200px) {
    .collection-items {
        grid-template-columns: repeat(4, 1fr); /* 4 колонки на широких экранах */
        gap: 2rem;
    }
}

/* КОМПАКТНЫЕ КАРТОЧКИ (нормальный размер) */
.furniture-item {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    overflow: hidden;
    transition: all 0.3s;
    position: relative;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.furniture-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    border-color: #3b82f6;
}

.furniture-item.handle-item {
    border-top: 3px solid #3b82f6;
}

.furniture-item.retainer-item {
    border-top: 3px solid #10b981;
}

/* Изображение НОРМАЛЬНОЙ высоты */
.item-image {
    height: 220px; /* Нормальная высота (было 200px в оригинале) */
    min-height: 220px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    padding: 1.5rem;
}

.item-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    transition: transform 0.5s ease;
}

.furniture-item:hover .item-image img {
    transform: scale(1.05);
}

/* Статусы остатков - НОВЫЕ СТИЛИ (ЗАМЕНИТЬ старые .in-stock, .on-order, .out-of-stock) */
.item-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    padding: 0.4rem 0.8rem;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid;
    z-index: 10;
    backdrop-filter: blur(4px);
}

/* Мало (1-3 шт.) */
.item-badge.low-stock {
    color: #dc2626;
    border-color: #fca5a5;
    background: rgba(220, 38, 38, 0.1);
}

/* Достаточно (4-9 шт.) */
.item-badge.medium-stock {
    color: #d97706;
    border-color: #fdba74;
    background: rgba(217, 119, 6, 0.1);
}

/* Много (10+ шт.) */
.item-badge.high-stock {
    color: #059669;
    border-color: #34d399;
    background: rgba(5, 150, 105, 0.1);
}

/* Под заказ (0 шт.) */
.item-badge.on-order {
    color: #4f46e5;
    border-color: #a5b4fc;
    background: rgba(79, 70, 229, 0.1);
}

/* Контент карточки */
.item-info {
    padding: 1.25rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.item-title {
    font-size: 1.1rem;
    margin-bottom: 0.75rem;
    color: #1f2937;
    flex-grow: 1;
    min-height: 3rem;
    line-height: 1.4;
    font-weight: 600;
}

.item-type {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    border-bottom: 1px solid #e5e7eb;
    margin-bottom: 0.75rem;
    font-size: 0.9rem;
}

.type-label {
    color: #6b7280;
}

.type-value {
    color: #1f2937;
    font-weight: 500;
}

.item-price {
    margin-bottom: 1rem;
    text-align: center;
}

.price-value {
    font-size: 1.3rem;
    font-weight: 700;
    color: #1f2937;
}

/* Кнопка */
.furniture-item .btn {
    width: 100%;
    justify-content: center;
    padding: 0.75rem;
    font-size: 1rem;
    border-radius: 8px;
    margin-top: auto;
    background: #3b82f6;
    color: white;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    font-weight: 600;
}

.furniture-item .btn:hover {
    background: #2563eb;
}

.furniture-item .btn:active {
    transform: translateY(2px);
}

.furniture-item .btn:disabled {
    background: #9ca3af;
    cursor: not-allowed;
    opacity: 0.7;
}

.furniture-item .btn.added {
    background: #10b981;
}

/* Для очень маленьких экранов */
@media (max-width: 576px) {
    .item-image {
        height: 180px;
        min-height: 180px;
        padding: 1rem;
    }
    
    .collection-items {
        gap: 1.25rem;
    }
}

/* ======================================== */
/* ТЁМНАЯ ТЕМА ДЛЯ ФУРНИТУРЫ               */
/* ======================================== */
[data-theme="dark"] .furniture-header h1,
[data-theme="dark"] .furniture-subtitle,
[data-theme="dark"] .collection-title {
    color: var(--text-primary) !important;
}

[data-theme="dark"] .furniture-info {
    background: #1f2937 !important;
    border-left-color: var(--accent-color) !important;
}

[data-theme="dark"] .furniture-item {
    background: #111827 !important;
    border-color: #374151 !important;
}

[data-theme="dark"] .item-title {
    color: var(--text-primary) !important;
}

[data-theme="dark"] .type-label {
    color: var(--text-secondary) !important;
}

[data-theme="dark"] .type-value {
    color: var(--text-primary) !important;
}

[data-theme="dark"] .price-value {
    color: var(--text-primary) !important;
}

[data-theme="dark"] .item-image {
    background: linear-gradient(135deg, #1f2937 0%, #111827 100%) !important;
}