
/* Стили для вкладок */
.tabs-container {
    margin-top: 20px;
    margin-bottom: 20px;
    width: 100%;
}

.tabs-header {
    display: flex;
    border-bottom: 2px solid #e0e0e0;
    gap: 5px;
    flex-wrap: wrap;
}

.tab-btn {
    background: none;
    border: none;
    padding: 12px 24px;
    font-size: 16px;
    /* font-weight: 600; */
    cursor: pointer;
    color: #333;
    transition: all 0.3s ease;
    border-radius: 4px 4px 0 0;
    position: relative;
}

.tab-btn:hover {
    color: #26863c;
    background-color: #f5f5f5;
}

.tab-btn.active {
    color: #26863c;
    background-color: #fff;
}

.tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 2px;
    background-color: #26863c;
}

.tabs-content {
    padding: 20px 0;
}

.tab-pane {
    display: none;
}

.tab-pane.active {
    display: block;
}

/* Стили для контента главной вкладки */
.home-content {
    text-align: center;
    padding: 60px 20px;
    background: #f9f9f9;
    border-radius: 8px;
}

.home-content h3 {
    font-size: 24px;
    margin-bottom: 15px;
    color: #333;
}

.home-content p {
    font-size: 16px;
    color: #666;
    max-width: 500px;
    margin: 0 auto;
}

/* ========== ИСПРАВЛЕННЫЕ СТИЛИ ДЛЯ РЕЗУЛЬТАТОВ ПОИСКА ========== */

/* Контейнер результатов поиска - занимает всю ширину */
#tab-results {
    width: 100%;
}

.main__results {
    width: 100%;
    margin: 0;
    padding: 0;
}

/* Сетка товаров - ряд на всю ширину */
.products-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
    width: 100%;
    margin: 0;
    padding: 0;
}

/* Карточка товара */
.product-item {
    display: block;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s;
    text-decoration: none;
    color: #333;
    background: #fff;
}

.product-item:hover {
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    transform: translateY(-3px);
}

.product-item__inner {
    padding: 15px;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.product-item__image {
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
    border-radius: 4px;
    overflow: hidden;
}

.product-item__image img {
    max-height: 100%;
    max-width: 100%;
    object-fit: contain;
}

.product-item__title {
    font-size: 16px;
    margin: 0 0 10px;
    font-weight: 600;
    line-height: 1.3;
    min-height: 42px;
}

.product-item__price {
    font-weight: bold;
    font-size: 20px;
    color: #d32f2f;
    margin-bottom: 8px;
}

.product-item__stock {
    font-size: 14px;
    margin-bottom: 10px;
}

.product-item__stock.in-stock {
    color: #388e3c;
}

.product-item__stock.out-of-stock {
    color: #f57c00;
}

.product-item__article {
    font-size: 12px;
    color: #999;
    margin-top: 5px;
}

.add-to-cart-btn {
    background-color: #4CAF50;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    margin-top: 10px;
    width: 100%;
    transition: background-color 0.3s;
}

.add-to-cart-btn:hover {
    background-color: #45a049;
}

/* Пагинация */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 30px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.pagination button {
    border: 1px solid #ddd;
    background: #fff;
    padding: 8px 14px;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.2s;
    font-size: 14px;
}

.pagination button:hover {
    background: #f5f5f5;
    border-color: #26863c;
}

.pagination .active {
    background: #26863c;
    color: #fff;
    border-color: #26863c;
}

.pagination span.dots {
    padding: 0 8px;
    color: #999;
}

.results-info {
    text-align: center;
    margin: 15px 0;
    color: #666;
    font-size: 14px;
}

.no-results {
    text-align: center;
    padding: 40px;
    font-size: 16px;
    color: #999;
    grid-column: 1 / -1;
}

/* Адаптация для разных экранов */
@media (max-width: 1200px) {
    .products-list {
        grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
        gap: 20px;
    }
}

@media (max-width: 992px) {
    .products-list {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
        gap: 18px;
    }
    
    .product-item__image {
        height: 180px;
    }
}

@media (max-width: 768px) {
    .products-list {
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
        gap: 15px;
    }
    
    .product-item__inner {
        padding: 12px;
    }
    
    .product-item__image {
        height: 160px;
    }
    
    .product-item__title {
        font-size: 14px;
        min-height: 38px;
    }
    
    .product-item__price {
        font-size: 18px;
    }
    
    .tab-btn {
        padding: 10px 16px;
        font-size: 14px;
        flex: 1;
        text-align: center;
    }
    
    .tabs-header {
        gap: 2px;
    }
    
    .home-content {
        padding: 40px 15px;
    }
    
    .home-content h3 {
        font-size: 20px;
    }
    
    .home-content p {
        font-size: 14px;
    }
}

@media (max-width: 576px) {
    .products-list {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .product-item__image {
        height: 200px;
    }
    
    .pagination button {
        padding: 6px 12px;
        font-size: 13px;
    }
}

/* Для мобильных устройств с маленьким экраном */
@media (max-width: 480px) {
    .tab-btn {
        padding: 8px 12px;
        font-size: 12px;
    }
    
    .product-item__title {
        font-size: 14px;
    }
    
    .product-item__price {
        font-size: 16px;
    }
}

/* Для очень больших экранов */
@media (min-width: 1600px) {
    .products-list {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 30px;
    }
    
    .product-item__image {
        height: 240px;
    }
}

/* Индикатор загрузки */
#search-loading {
    text-align: center;
    padding: 40px;
}

#search-loading img {
    width: 40px;
    height: 40px;
}

/* Обеспечиваем полную ширину для контейнера результатов */
.wrap {
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 0 20px;
    box-sizing: border-box;
}

.main__wrapper {
    width: 100%;
    margin: 0;
    padding: 0;
}

/* Для больших экранов добавляем отступы по бокам */
@media (min-width: 1400px) {
    .wrap {
        padding: 0 40px;
    }
}
