/* ============================================================
   catalog.css — блок «catalog_cards» (каталог продукции)
   Стили адаптированы из catalogs/rokae/*/css/catalog.css
   и согласованы с карточками темы (.feature-card).
   Все селекторы scoped под .catalog-wrap.
   ============================================================ */
.catalog-wrap {
    margin: 0.5rem 0 2rem;
}

/* ---------- Заголовок каталога ---------- */
.catalog-header {
    text-align: center;
    margin-bottom: 20px;
}
.catalog-header h1 {
    font-family: 'Montserrat', sans-serif;
    font-size: 2rem;
    font-weight: 800;
    color: var(--primary-gold);
    margin-bottom: 10px;
}
.catalog-header p {
    color: var(--text-color-light);
    opacity: 0.9;
    max-width: 720px;
    margin: 0 auto;
}

/* ---------- Панель вида + навигация по секциям ---------- */
.catalog-controls {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px;
    margin: 18px 0 6px;
}
.catalog-controls .view-label {
    font-size: 0.8rem;
    color: rgba(255,255,255,0.45);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.view-btn {
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.12);
    color: rgba(255,255,255,0.45);
    padding: 6px 14px;
    border-radius: 30px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.25s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: 'Inter', sans-serif;
}
.view-btn:hover { background: rgba(255,255,255,0.1); color: var(--text-color-light); }
.view-btn.active {
    background: rgba(255,140,0,0.15);
    border-color: var(--primary-gold);
    color: var(--primary-gold);
}

.catalog-nav {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    margin: 8px 0 10px;
}
.catalog-nav-link {
    color: var(--text-color-light);
    text-decoration: none;
    padding: 8px 18px;
    border: 1px solid rgba(255,220,180,0.25);
    border-radius: 30px;
    transition: all 0.3s;
    font-size: 0.9rem;
}
.catalog-nav-link:hover {
    background: rgba(255,140,0,0.12);
    border-color: var(--primary-gold);
    color: var(--primary-gold);
}

/* ---------- Сетка и секции ---------- */
.products-grid {
    display: grid;
    gap: 26px;
    margin-top: 20px;
}
.catalog-wrap.view-large .products-grid {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}
.catalog-wrap.view-compact .products-grid {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
}
.catalog-section-header {
    grid-column: 1 / -1;
    margin: 26px 0 10px;
    text-align: center;
    scroll-margin-top: 90px;
}
.catalog-section-title {
    font-family: 'Montserrat', sans-serif;
    color: var(--primary-gold);
    font-size: 1.7rem;
    font-weight: 700;
    margin-bottom: 8px;
}
.catalog-section-subtitle {
    font-size: 1rem;
    opacity: 0.85;
    max-width: 720px;
    margin: 0 auto;
}

/* ---------- Карточка товара ---------- */
.product-card {
    background: linear-gradient(135deg, rgba(34,36,47,0.92), rgba(30,30,30,0.92));
    border: 1px solid var(--card-border-color);
    border-radius: 22px;
    overflow: hidden;
    transition: all 0.35s ease;
    display: flex;
    flex-direction: column;
    min-height: 360px;
    box-shadow: 0 0 20px var(--card-glow-color-1), inset 0 0 10px var(--card-inner-shadow);
}
.product-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 40px -10px rgba(255,140,0,0.25);
}
.product-image {
    height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.35);
    border-bottom: 1px solid rgba(255,220,180,0.1);
    padding: 12px;
    flex-shrink: 0;
}
.product-image img {
    max-height: 160px;
    object-fit: contain;
}
.product-card.details-open .product-image { display: none; }

.product-body {
    padding: 16px 18px;
    flex: 1;
    display: flex;
    flex-direction: column;
}
.product-name {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--primary-gold);
    text-align: center;
    margin-bottom: 14px;
}

/* ---------- Сводка и детали ---------- */
.summary-grid {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 5px;
    font-size: 0.85rem;
    margin-bottom: 10px;
}
.details-grid {
    flex: 1;
    display: none;
    flex-direction: column;
    gap: 5px;
    font-size: 0.85rem;
    margin-bottom: 8px;
}
.product-card.details-open .summary-grid { display: none; }
.product-card.details-open .details-grid { display: flex; }

.summary-item, .detail-item {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 8px;
    padding: 4px 0;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}
.summary-label, .detail-label {
    color: var(--text-color-light);
    font-weight: 500;
    font-size: 0.83rem;
    flex-shrink: 0;
}
.summary-value {
    color: #fff;
    font-weight: 600;
    text-align: right;
}
.detail-value {
    color: #fff;
    font-weight: 400;
    text-align: right;
    font-size: 0.8rem;
}

/* ---------- Кнопка «Вся информация» ---------- */
.card-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: auto;
    padding-top: 10px;
    border-top: 1px solid rgba(255,255,255,0.06);
}
.btn-details {
    background: transparent;
    border: 1px solid rgba(255, 140, 0, 0.3);
    color: var(--primary-gold);
    padding: 6px 16px;
    border-radius: 30px;
    font-size: 0.76rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s ease;
    font-family: 'Inter', sans-serif;
    letter-spacing: 0.3px;
}
.btn-details:hover {
    background: rgba(255, 140, 0, 0.12);
    border-color: var(--primary-gold);
}
.btn-details .icon-arrow {
    display: inline-block;
    transition: transform 0.3s ease;
    margin-left: 4px;
}
.product-card.details-open .btn-details .icon-arrow { transform: rotate(180deg); }

/* ---------- Компактный вид ---------- */
.catalog-wrap.view-compact .product-card { min-height: 270px; }
.catalog-wrap.view-compact .product-image { height: 125px; }
.catalog-wrap.view-compact .product-image img { max-height: 105px; }
.catalog-wrap.view-compact .product-name { font-size: 0.95rem; margin-bottom: 8px; }
.catalog-wrap.view-compact .summary-grid { font-size: 0.72rem; gap: 2px; }
.catalog-wrap.view-compact .summary-item { padding: 2px 0; }
.catalog-wrap.view-compact .details-grid { font-size: 0.68rem; }
.catalog-wrap.view-compact .btn-details { font-size: 0.62rem; padding: 4px 10px; }

/* ---------- Адаптив ---------- */
@media (max-width: 1024px) {
    .catalog-wrap.view-compact .products-grid { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
}
@media (max-width: 768px) {
    .products-grid { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)) !important; gap: 16px; }
    .product-card { min-height: 320px; }
    .product-image { height: 140px; }
    .product-image img { max-height: 120px; }
    .product-name { font-size: 1rem; }
    .catalog-header h1 { font-size: 1.5rem; }
    .catalog-section-title { font-size: 1.3rem; }
    .catalog-wrap.view-compact .product-card { min-height: 250px; }
}
@media (max-width: 480px) {
    .products-grid { grid-template-columns: 1fr !important; gap: 18px; }
    .product-card { min-height: 300px; }
    .product-image { height: 160px; }
    .product-image img { max-height: 140px; }
}
