/**
 * Catalog Page Styles
 * Стили для каталога оборудования, фильтров и grid/list view
 * 
 * @package MedEquip_Aggregator
 */

/* ==========================================================================
   CATALOG PAGE
   ========================================================================== */
   .catalog-section__main {
    background-color: #fff;
    padding-top: 0;
    z-index: 10;
    top: 0;
}

.catalog-section__header {
    border-bottom: 1px solid #ddd;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding-bottom: 12px;
}

@media (min-width: 768px) {
    .catalog-section__header {
        align-items: center;
        flex-direction: row;
        flex-wrap: nowrap;
        padding-bottom: 24px;
    }
}

.catalog-section__count {
    color: #777;
    font-size: 14px;
    line-height: 16px;
    order: 1;
}

@media (min-width: 768px) {
    .catalog-section__count {
        flex: 0 0 33%;
        order: revert;
    }
}

@media (min-width: 1280px) {
    .catalog-section__count {
        flex: 0 0 25%;
    }
}


.catalog-section__title-top-wrap {
    max-width: var(--container-width);
    width: 100%;
}

.catalog-section__title-top {
    order: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 36px 0 0;
    cursor: pointer;
    user-select: none;
    transition: all 0.3s ease;
}

@media (min-width: 768px) {
    .catalog-section__title-top {
        order: revert;
    }
}

.catalog-section__header-link {
    color: #222222;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    transition: all 0.3s ease-in-out;
    text-decoration: none;
}

.catalog-section__header-link a,
.catalog-section__header-link.active,
.catalog-section__header-link:hover {
    color: #12356a;
}

.catalog-section__header-link:hover .catalog-section__icon {
    stroke: #12356a;
}

@media (min-width: 768px) {
    .catalog-section__header-link {
        margin-bottom: 0;
        margin-right: auto;
    }
}

.catalog-section__title {
    font-size: 24px;
    font-weight: 400;
    line-height: 28px;
}

.catalog-section__icon {
    stroke: #222222;
    stroke-width: 2px;
    cursor: pointer;
    height: 32px;
    margin-left: 12px;
    transform: rotate(45deg);
    transition: transform 0.25s ease;
    width: 32px;
    flex-shrink: 0;
}

.catalog-section__icon:hover line {
    stroke: #12356a;
}

.catalog-section__icon line {
    stroke: #222222;
    transition: stroke 0.25s ease;
}

.catalog-section__icon.-rotate {
    transform: rotate(180deg);
}

.catalog-section__icon.-rotate line {
    stroke: #12356a;
}

@media (min-width: 768px) {
    .catalog-section__icon {
        margin-right: 16px;
    }
}

@media (min-width: 1280px) {
    .catalog-section__icon {
        margin-right: 74px;
    }
}

@media (min-width: 768px) {
    .catalog-section__wrap {
        padding-left: 33%;
    }
}

@media (min-width: 1280px) {
    .catalog-section__wrap {
        padding-left: 25%;
    }
}

.catalog-section__items {
    padding-top: 32px;
    list-style: none;
    margin: 0;
    padding-left: 0;
}

@media (min-width: 1280px) {
    .catalog-section__items {
        display: flex;
        flex-wrap: wrap;
    }
}

.catalog-section__item {
    font-size: 16px;
    line-height: 20px;
    margin-bottom: 24px;
}

.catalog-section__item:last-child {
    margin-bottom: 0;
}

.catalog-section__item span {
    color: #777;
    margin-left: 10px;
}

@media (min-width: 1280px) {
    .catalog-section__item {
        flex: 0 0 50%;
        margin-bottom: 12px;
        max-width: 50%;
    }
}

.catalog-section__link {
    color: #222222;
    display: inline-block;
    font-size: 16px;
    line-height: 20px;
    position: relative;
    transform: translateX(0);
    transition: all 0.3s ease-in-out;
    text-decoration: none;
}

.catalog-section__link:before {
    content: "→";
    left: -15px;
    opacity: 0;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
}

.catalog-section__link:hover {
    color: #12356a;
    padding-left: 10px;
    transform: translateX(15px);
}

.catalog-section__link:hover:before {
    opacity: 1;
}

/* ==========================================================================
   EQUIPMENT CATEGORIES GRID
   ========================================================================== */
.equipment-categories-grid h2 {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 30px;
    color: #111827;
}

.categories-wrapper {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 60px;
}

.category-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 30px 20px;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.category-card:hover {
    border-color: #12356a;
    box-shadow: 0 8px 24px rgba(37, 99, 235, 0.15);
    transform: translateY(-5px);
}

.category-icon {
    width: 64px;
    height: 64px;
    margin-bottom: 15px;
    object-fit: contain;
}

.category-icon-placeholder {
    width: 64px;
    height: 64px;
    margin-bottom: 15px;
    background: #f3f4f6;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
}

.category-name {
    font-size: 18px;
    font-weight: 600;
    color: #111827;
    text-align: center;
    margin: 0 0 8px;
}

.category-count {
    font-size: 14px;
    color: #6b7280;
}

/* ==========================================================================
   ARCHIVE EQUIPMENT PAGE
   ========================================================================== */
.equipment-archive-page {
    padding: 40px 0;
}

.archive-header {
    margin-bottom: 40px;
}

.archive-title {
    font-size: 32px;
    font-weight: 700;
    color: #111827;
    margin: 0 0 10px;
}

.archive-description {
    font-size: 16px;
    color: #6b7280;
    margin: 0;
}

.archive-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 40px;
}

/* ==========================================================================
   FILTERS SIDEBAR
   ========================================================================== */
.filters-sidebar {
    position: sticky;
    top: 100px;
    align-self: flex-start;
}

.filters-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.filters-title {
    font-size: 18px;
    font-weight: 700;
    color: #111827;
    margin: 0;
}

.filters-reset {
    background: none;
    border: none;
    color: #12356a;
    font-size: 14px;
    cursor: pointer;
    text-decoration: underline;
}

.filters-reset:hover {
    color: #1d4ed8;
}

.filter-section {
    margin-bottom: 30px;
    padding-bottom: 30px;
    border-bottom: 1px solid #e5e7eb;
}

.filter-section:last-child {
    border-bottom: none;
}

.filter-section-title {
    font-size: 16px;
    font-weight: 600;
    color: #374151;
    margin: 0 0 15px;
}

.filter-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.filter-option {
    display: flex;
    align-items: center;
    gap: 10px;
}

.filter-option input[type="checkbox"],
.filter-option input[type="radio"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.filter-option label {
    font-size: 14px;
    color: #4b5563;
    cursor: pointer;
    flex-grow: 1;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.filter-count {
    font-size: 13px;
    color: #9ca3af;
}

/* Price Range Slider */
.price-range-slider {
    margin: 20px 0;
}

.price-range-inputs {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.price-range-inputs input {
    flex: 1;
    padding: 8px 10px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
}

.price-range-track {
    height: 6px;
    background: #e5e7eb;
    border-radius: 3px;
    position: relative;
    margin: 10px 0;
}

.price-range-progress {
    height: 100%;
    background: #12356a;
    border-radius: 3px;
}

/* Mobile Filters Toggle */
.mobile-filters-toggle {
    display: none;
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 100;
    padding: 15px 30px;
    background: #12356a;
    color: #ffffff;
    border: none;
    border-radius: 50px;
    font-size: 16px;
    font-weight: 600;
    box-shadow: 0 4px 20px rgba(37, 99, 235, 0.4);
    cursor: pointer;
}

/* ==========================================================================
   EQUIPMENT LISTING
   ========================================================================== */
.equipment-listing {
    min-height: 500px;
}

.listing-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding: 15px 20px;
    background: #f9fafb;
    border-radius: 8px;
}

.results-count {
    font-size: 14px;
    color: #6b7280;
}

.toolbar-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.view-switcher {
    display: flex;
    gap: 5px;
    background: #ffffff;
    padding: 4px;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
}

.view-btn {
    padding: 8px 12px;
    background: transparent;
    border: none;
    cursor: pointer;
    border-radius: 6px;
    color: #6b7280;
    transition: all 0.2s ease;
}

.view-btn:hover {
    background: #f3f4f6;
}

.view-btn.active {
    background: #12356a;
    color: #ffffff;
}

.view-btn svg {
    width: 18px;
    height: 18px;
}

.sort-select {
    padding: 8px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
    background: #ffffff;
    cursor: pointer;
}

/* Grid View */
.equipment-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
}

/* List View */
.equipment-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.equipment-card-horizontal {
    display: flex;
    gap: 20px;
    padding: 20px;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    transition: all 0.3s ease;
}

.equipment-card-horizontal:hover {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border-color: #d1d5db;
}

.equipment-card-horizontal .equipment-image {
    width: 200px;
    height: 150px;
    flex-shrink: 0;
}

.equipment-card-horizontal .equipment-info {
    flex-grow: 1;
}

/* Loading State */
.loading-state {
    text-align: center;
    padding: 60px 20px;
}

.loading-spinner {
    width: 48px;
    height: 48px;
    border: 4px solid #e5e7eb;
    border-top-color: #12356a;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto 15px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* No Results */
.no-results {
    text-align: center;
    padding: 80px 20px;
}

.no-results-icon {
    font-size: 64px;
    margin-bottom: 20px;
    opacity: 0.3;
}

.no-results h3 {
    font-size: 24px;
    color: #374151;
    margin: 0 0 10px;
}

.no-results p {
    font-size: 16px;
    color: #6b7280;
    margin: 0 0 25px;
}

/* ==========================================================================
   POPULAR MANUFACTURERS SECTION
   ========================================================================== */
.popular-manufacturers-section {
    margin-top: 80px;
}

.popular-manufacturers-section h2 {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 30px;
    color: #111827;
}

.manufacturers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.manufacturer-card-compact {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 25px 15px;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.manufacturer-card-compact:hover {
    border-color: #12356a;
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.12);
    transform: translateY(-3px);
}

.manufacturer-logo {
    width: 80px;
    height: 80px;
    object-fit: contain;
    margin-bottom: 12px;
}

.manufacturer-logo-placeholder {
    width: 80px;
    height: 80px;
    background: #f3f4f6;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    font-weight: 700;
    color: #9ca3af;
    margin-bottom: 12px;
}

.manufacturer-name {
    font-size: 15px;
    font-weight: 600;
    color: #111827;
    text-align: center;
    margin: 0 0 5px;
}

.manufacturer-equipment-count {
    font-size: 13px;
    color: #6b7280;
}

/* ==========================================================================
   PAGINATION
   ========================================================================== */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-top: 50px;
}

.pagination a,
.pagination span {
    padding: 10px 15px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    color: #374151;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.pagination a:hover {
    border-color: #12356a;
    color: #12356a;
}

.pagination .current {
    background: #12356a;
    color: #ffffff;
    border-color: #12356a;
}

.pagination .dots {
    border: none;
    pointer-events: none;
}

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */
@media (max-width: 1024px) {
    .archive-layout {
        grid-template-columns: 1fr;
    }
    
    .filters-sidebar {
        position: static;
    }
    
    .mobile-filters-toggle {
        display: block;
    }
    
    .filters-sidebar {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 1222222;
        background: #ffffff;
        padding: 20px;
        overflow-y: auto;
    }
    
    .filters-sidebar.active {
        display: block;
    }
}

@media (max-width: 768px) {
    .catalog-stats-overview {
        flex-direction: column;
        gap: 30px;
    }
    
    .categories-wrapper {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 15px;
    }
    
    .equipment-grid {
        grid-template-columns: 1fr;
    }
    
    .equipment-card-horizontal {
        flex-direction: column;
    }
    
    .equipment-card-horizontal .equipment-image {
        width: 100%;
        height: 200px;
    }
    
    .listing-toolbar {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }
    
    .toolbar-right {
        width: 100%;
        justify-content: space-between;
    }
    
    .manufacturers-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 15px;
    }
}

@media (max-width: 480px) {
    .catalog-hero-section .page-title {
        font-size: 28px;
    }
    
    .stat-value {
        font-size: 32px;
    }
    
    .categories-wrapper {
        grid-template-columns: 1fr;
    }
}


