/**
 * Стили страницы активных веществ
 * /new/assets/css/substance.css
 */

/* Скрываем sidebar */
#sidebar.zone2.grid_3 { display: none !important; }
.container_12 .grid_9, .container_12 .zone3, .container_12 .zone4, .container_12 .zone-content-all { 
    width: 100% !important; max-width: 100% !important; float: none !important; margin-left: 0 !important; 
}

.substance-page { max-width: 100%; margin: 0 auto; padding: 20px 30px; }

/* Хлебные крошки */
.substance-breadcrumbs { margin-bottom: 20px; font-size: 13px; color: #666; }
.substance-breadcrumbs a { color: #0066cc; text-decoration: none; }
.substance-breadcrumbs a:hover { text-decoration: underline; }
.substance-breadcrumbs .sep { margin: 0 8px; color: #999; }
.substance-breadcrumbs .current { color: #333; }

/* Заголовок */
.substance-title { font-size: 28px; font-weight: 600; margin: 0 0 16px; color: #222; }

/* Описание */
.substance-description { margin-bottom: 20px; line-height: 1.6; color: #444; }

/* Информация */
.substance-info { margin-bottom: 24px; font-size: 14px; color: #666; display: flex; gap: 16px; align-items: center; }
.substance-name-lat { font-style: italic; }

/* Сетка товаров */
.substance-products-grid { 
    display: grid; 
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); 
    gap: 20px; 
    margin-bottom: 30px; 
}

/* Карточка товара */
.substance-product-card { 
    display: flex; flex-direction: column; 
    padding: 16px; background: #fff; border: 1px solid #e8e8e8; border-radius: 10px; 
    text-decoration: none; transition: all 0.2s; 
}
.substance-product-card:hover { box-shadow: 0 4px 16px rgba(0,0,0,0.1); transform: translateY(-2px); }
.product-card-photo { height: 140px; display: flex; align-items: center; justify-content: center; margin-bottom: 12px; }
.product-card-photo img { max-width: 100%; max-height: 100%; object-fit: contain; }
.product-card-name { font-size: 14px; color: #222; font-weight: 500; line-height: 1.3; margin-bottom: 8px; 
    overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.product-card-vendor { font-size: 12px; color: #888; margin-bottom: 8px; }
.product-card-footer { margin-top: auto; display: flex; justify-content: space-between; align-items: center; }
.product-card-price { font-size: 16px; font-weight: 600; color: #e53935; }
.product-card-stock { font-size: 12px; color: #2e7d32; }
.product-card-stock.out { color: #999; }

/* Пагинация */
.substance-pagination { display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; }
.page-num, .page-btn { display: inline-flex; align-items: center; justify-content: center; 
    min-width: 36px; height: 36px; padding: 0 12px; 
    background: #f5f5f5; border: 1px solid #e0e0e0; border-radius: 6px; 
    font-size: 14px; color: #333; text-decoration: none; transition: all 0.2s; }
.page-num:hover, .page-btn:hover { background: #e8f4ff; border-color: #1976d2; color: #1976d2; }
.page-num.active { background: #1976d2; border-color: #1976d2; color: #fff; }
.page-dots { display: flex; align-items: center; color: #999; }

/* 404 */
.substance-not-found { text-align: center; padding: 60px 20px; }
.substance-not-found h1 { font-size: 24px; color: #333; margin-bottom: 16px; }
.btn-catalog { display: inline-block; padding: 12px 24px; background: #1976d2; color: #fff; border-radius: 8px; text-decoration: none; }
.btn-catalog:hover { background: #1565c0; }

.substance-no-products { text-align: center; padding: 40px; color: #666; }

/* Мобильная версия */
@media (max-width: 768px) {
    .substance-page { padding: 16px; }
    .substance-title { font-size: 22px; }
    .substance-products-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
    .substance-product-card { padding: 12px; }
    .product-card-photo { height: 100px; }
}
