/* --- catalog.css (СТИЛІ ТІЛЬКИ ДЛЯ КАТАЛОГУ) --- */
.catalog-section {
    padding: 40px 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.catalog-header {
    text-align: center;
    margin-bottom: 40px;
}

.catalog-header h2 {
    color: #2c3e50;
    font-size: 32px;
    margin-bottom: 10px;
}

.catalog-header p {
    color: #666;
    margin-bottom: 20px;
}

.catalog-filter {
    display: flex;
    justify-content: center;
    gap: 10px;
    max-width: 600px;
    margin: 0 auto;
}

.catalog-filter input {
    flex: 1;
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 16px;
}

/* Сітка товарів */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
}

/* Картка товару */
.product-card {
    background: white;
    border-radius: 8px;
    padding: 25px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    flex-direction: column; /* Щоб кнопка завжди була внизу */
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0,0,0,0.12);
}

.product-image {
    margin-bottom: 20px;
    width: 100%;
}

.product-image img {
    width: 100%;
    height: 160px; /* Висоту можна змінити за потребою */
    object-fit: cover; /* Зображення заповнить блок, не розтягуючись */
    border-radius: 6px; /* Легке заокруглення кутів */
}

.product-card h2 {
    color: #2c3e50;
    margin-bottom: 15px;
    font-size: 20px;
}

.product-desc {
    color: #666;
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 20px;
    flex-grow: 1; /* Опис займає вільне місце, відштовхуючи ціну і кнопку вниз */
}

.product-price {
    font-size: 18px;
    font-weight: bold;
    color: #e74c3c;
    margin-bottom: 20px;
}

/* Кнопка на всю ширину картки */
.btn-block {
    width: 100%;
    display: block;
}

.btn-secondary {
    background-color: transparent;
    color: #f39c12;
    border: 2px solid #f39c12;
    padding: 10px 20px;
    cursor: pointer;
    font-weight: bold;
    border-radius: 5px;
    transition: 0.3s;
}

.btn-secondary:hover {
    background-color: #f39c12;
    color: white;
}

/* --- НОВЫЙ МАКЕТ С ФИЛЬТРАМИ (ДВЕ КОЛОНКИ) --- */
.catalog-layout {
    display: flex;
    gap: 30px;
    align-items: flex-start;
}

/* Левая колонка - Сайдбар с фильтрами */
.catalog-sidebar {
    flex: 0 0 280px; /* Ширина фильтра */
    background-color: #fafafa;
    padding: 25px 20px;
    border-radius: 8px;
    border: 1px solid #f0f0f0;
}

.catalog-content {
    flex: 1; /* Правая колонка занимает всё оставшееся место */
}

.filter-header {
    font-size: 18px;
    color: #333;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.filter-group {
    margin-bottom: 12px;
}

.filter-group select {
    width: 100%;
    padding: 12px 15px;
    background-color: #f1f3f5;
    border: none;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 700;
    color: #2c3e50;
    cursor: pointer;
    appearance: none; /* Убираем стандартную стрелочку браузера */
    background-image: url('data:image/svg+xml;utf8,<svg fill="%23666" height="20" viewBox="0 0 24 24" width="20" xmlns="http://www.w3.org/2000/svg"><path d="M7 10l5 5 5-5z"/></svg>');
    background-repeat: no-repeat;
    background-position-x: 95%;
    background-position-y: 50%;
    text-transform: uppercase;
}

.filter-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 25px;
}

.btn-cancel {
    background: none;
    border: none;
    color: #a0a0a0;
    cursor: pointer;
    font-size: 14px;
}

.btn-apply {
    background-color: #9ca3af;
    color: white;
    border: none;
    padding: 12px 15px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
}

/* --- ТОВАРЫ СТРОЧКОЙ ВНИЗ (СПИСОК) --- */
.products-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.product-list-card {
    display: flex;
    background: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    align-items: center;
    gap: 25px;
    transition: transform 0.2s, box-shadow 0.2s;
}

.product-list-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 15px rgba(0,0,0,0.1);
}

.product-list-image {
    font-size: 50px;
    flex: 0 0 80px;
    text-align: center;
}

.product-list-info {
    flex: 1;
}

.product-list-info h3 {
    color: #2c3e50;
    margin-bottom: 10px;
    font-size: 20px;
}

.product-list-info p {
    color: #666;
    font-size: 14px;
    line-height: 1.5;
    margin: 0;
}

.product-list-action {
    flex: 0 0 180px;
    text-align: right;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.product-list-price {
    font-size: 18px;
    font-weight: bold;
    color: #e74c3c;
}

/* --- ПЛИТКА ПІДКАТЕГОРІЙ --- */
.subcategories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 15px;
    margin-bottom: 40px;
}
.subcat-card {
    border: 1px solid #e5e7eb;
    background: white;
    border-radius: 6px;
    padding: 15px 10px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
}
.subcat-card:hover, .subcat-card.active {
    border-color: #2c3e50;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    background-color: #f8fafc;
}
.subcat-icon {
    font-size: 32px;
    margin-bottom: 8px;
}
.subcat-name {
    font-size: 13px;
    color: #374151;
    font-weight: bold;
}

/* --- РЯДКИ КОНКРЕТНИХ ТОВАРІВ (CRM СТИЛЬ) --- */
.crm-product-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: white;
    border-bottom: 1px solid #e5e7eb;
    padding: 20px 15px;
    gap: 20px;
    transition: background-color 0.2s;
}
.crm-product-row:hover {
    background-color: #f8fafc;
}
.crm-product-info {
    flex: 2;
}
.crm-product-title {
    color: #111827;
    font-size: 16px;
    font-weight: bold;
    margin-bottom: 10px;
}
.crm-product-specs {
    display: flex;
    gap: 20px;
    font-size: 12px;
    color: #6b7280;
}
.spec-item span {
    display: block;
    font-weight: bold;
    color: #111827;
    margin-top: 3px;
}
.crm-product-price {
    flex: 1;
    text-align: right;
    font-size: 20px;
    font-weight: bold;
    color: #111827;
}
.crm-product-price small {
    font-size: 12px;
    font-weight: normal;
    color: #6b7280;
    display: block;
}
.crm-product-action {
    flex: 1;
    display: flex;
    gap: 10px;
    align-items: center;
    justify-content: flex-end;
}
.qty-input {
    width: 60px;
    padding: 10px;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    text-align: center;
    font-size: 14px;
}
.btn-buy {
    background-color: #1e3a8a; /* Синій колір кнопки як на фото */
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 8px;
}


.btn-buy:hover {
    background-color: #1e40af;
}
.qty-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-right: 10px;
}
.qty-box .qty-input {
    width: 60px;
    height: 38px;
    padding: 4px;
    font-size: 15px;
    text-align: center;
    box-sizing: border-box;
}
.qty-unit {
    font-size: 12px;
    color: #888;
    margin-top: 3px;
}