/* Category Page Styles */

/* Category Header */
.category-header {
    background: linear-gradient(135deg, #1b4374 0%, #07054f 100%);
    color: #ffffff;
    padding: 60px 0 50px;
    position: relative;
    overflow: hidden;
    min-height: 300px;
}

.category-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(255,255,255,0.1) 0%, transparent 50%, rgba(27,67,116,0.2) 100%);
    z-index: 1;
}

.category-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: linear-gradient(180deg, transparent 0%, rgba(0,0,0,0.1) 100%);
    z-index: 1;
}

.category-header-content {
    position: relative;
    z-index: 2;
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    gap: 40px;
    padding-top: 40px;
}

.category-info {
    display: flex;
    align-items: center;
    gap: 30px;
    flex: 1;
}

.category-header-icon {
    width: 90px;
    height: 90px;
    background: rgba(255,255,255,0.15);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    color: #ffffff;
    flex-shrink: 0;
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255,255,255,0.2);
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    transition: all 0.3s ease;
}

.category-header-icon:hover {
    transform: scale(1.05);
    background: rgba(255,255,255,0.2);
    border-color: rgba(255,255,255,0.3);
}

.category-text {
    flex: 1;
}

.category-title {
    font-size: 48px;
    font-weight: 700;
    margin-bottom: 20px;
    line-height: 1.1;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
    background: linear-gradient(45deg, #ffffff, rgba(255,255,255,0.8));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.category-description {
    font-size: 17px;
    line-height: 1.6;
    opacity: 0.95;
    margin: 0;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
    max-width: 700px;
}

.category-stats {
    background: linear-gradient(135deg, rgba(255,255,255,0.15), rgba(255,255,255,0.05));
    padding: 25px 30px;
    border-radius: 20px;
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255,255,255,0.2);
    text-align: center;
    min-width: 140px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.stat-number {
    font-size: 36px;
    font-weight: 700;
    line-height: 1;
    margin-bottom: 8px;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.2);
}

.stat-label {
    font-size: 14px;
    opacity: 0.9;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    font-weight: 500;
}

/* Products Section */
.products-section {
    padding: 80px 0;
    background: linear-gradient(180deg, #ffffff 0%, #f8f9fa 100%);
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 30px;
    margin-bottom: 60px;
}

.product-card {
    background: #ffffff;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0,0,0,0.08);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 1px solid rgba(27,67,116,0.1);
    display: flex;
    flex-direction: column;
    height: 100%;
    position: relative;
}

.product-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(27,67,116,0.02), transparent);
    z-index: 1;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.product-card:hover::before {
    opacity: 1;
}

.product-card:hover {
    transform: translateY(-12px) scale(1.02);
    box-shadow: 0 20px 60px rgba(27,67,116,0.15);
    border-color: rgba(27,67,116,0.2);
}

.product-link {
    display: flex;
    flex-direction: column;
    height: 100%;
    text-decoration: none;
    color: inherit;
    position: relative;
    z-index: 2;
}

.product-image {
    position: relative;
    width: 100%;
    height: 220px;
    overflow: hidden;
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.product-card:hover .product-image img {
    transform: scale(1.08);
}

.product-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    padding: 8px 14px;
    border-radius: 25px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    z-index: 3;
    backdrop-filter: blur(10px);
}

.product-badge.featured {
    background: linear-gradient(45deg, #4CAF50, #388E3C);
    color: #ffffff;
    box-shadow: 0 4px 15px rgba(76,175,80,0.4);
}

.product-badge.prescription {
    background: linear-gradient(45deg, #FF9800, #F57C00);
    color: #ffffff;
    top: 55px;
    box-shadow: 0 4px 15px rgba(255,152,0,0.4);
}

.product-content {
    padding: 28px 24px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.product-title {
    font-size: 22px;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 15px;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-substance {
    font-size: 13px;
    color: #1b4374;
    margin-bottom: 12px;
    line-height: 1.4;
    background: linear-gradient(135deg, rgba(27,67,116,0.1), rgba(27,67,116,0.05));
    padding: 8px 12px;
    border-radius: 8px;
    border-left: 3px solid #1b4374;
}

.product-substance strong {
    font-weight: 600;
    color: #1b4374;
}

.product-description {
    font-size: 14px;
    color: #6c757d;
    line-height: 1.6;
    margin-bottom: 18px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex-grow: 1;
}

.product-details {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 18px;
    padding: 18px 0;
    border-top: 1px solid #f0f0f0;
    border-bottom: 1px solid #f0f0f0;
}

.product-detail {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    color: #6c757d;
}

.product-detail i {
    width: 18px;
    color: #1b4374;
    flex-shrink: 0;
    font-size: 14px;
}

.product-price {
    display: flex;
    align-items: baseline;
    gap: 6px;
    margin-bottom: 20px;
    padding: 15px 18px;
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border-radius: 15px;
    border: 1px solid #dee2e6;
}

.price-amount {
    font-size: 26px;
    font-weight: 700;
    color: #1b4374;
}

.price-currency {
    font-size: 16px;
    color: #6c757d;
    font-weight: 500;
}

.product-footer {
    padding: 0 24px 24px;
    margin-top: auto;
}

.product-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 14px 24px;
    background: linear-gradient(45deg, #1b4374, #07054f);
    color: #ffffff;
    border-radius: 50px;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    border: 2px solid transparent;
    box-shadow: 0 4px 15px rgba(27,67,116,0.3);
}

.product-card:hover .product-btn {
    background: linear-gradient(45deg, #07054f, #1b4374);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(27,67,116,0.4);
}

/* No Products */
.no-products {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 400px;
    padding: 60px 0;
}

.no-products-content {
    text-align: center;
    max-width: 500px;
    padding: 50px 40px;
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border-radius: 25px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.no-products-content i {
    font-size: 72px;
    color: #6c757d;
    margin-bottom: 30px;
    opacity: 0.7;
}

.no-products-content h3 {
    font-size: 30px;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 18px;
}

.no-products-content p {
    font-size: 16px;
    color: #6c757d;
    line-height: 1.6;
    margin-bottom: 35px;
}

.back-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 16px 32px;
    background: linear-gradient(45deg, #1b4374, #07054f);
    color: #ffffff;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    box-shadow: 0 5px 20px rgba(27,67,116,0.3);
}

.back-btn:hover {
    background: linear-gradient(45deg, #07054f, #1b4374);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(27,67,116,0.4);
}

/* Pagination */
.pagination-section {
    display: flex;
    justify-content: center;
    margin-top: 60px;
    padding-top: 40px;
    border-top: 2px solid #f0f0f0;
}

.pagination {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #ffffff;
    padding: 20px 30px;
    border-radius: 50px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
    border: 1px solid #e9ecef;
}

.pagination-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: linear-gradient(45deg, #1b4374, #07054f);
    color: #ffffff;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 15px rgba(27,67,116,0.3);
}

.pagination-btn:hover {
    background: linear-gradient(45deg, #07054f, #1b4374);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(27,67,116,0.4);
}

.pagination-numbers {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 20px;
}

.pagination-number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background: #f8f9fa;
    color: #6c757d;
    text-decoration: none;
    border: 2px solid #e9ecef;
    border-radius: 50%;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s ease;
}

.pagination-number:hover {
    background: #e9ecef;
    border-color: #dee2e6;
    color: #495057;
    transform: translateY(-1px);
}

.pagination-number.current {
    background: linear-gradient(45deg, #1b4374, #07054f);
    color: #ffffff;
    border-color: #1b4374;
    box-shadow: 0 4px 15px rgba(27,67,116,0.3);
}

.pagination-dots {
    color: #6c757d;
    padding: 0 12px;
    font-weight: 600;
    font-size: 16px;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .category-header {
        padding: 50px 0 40px;
        min-height: 280px;
    }
    
    .category-header-content {
        flex-direction: column;
        gap: 30px;
        text-align: center;
        padding-top: 30px;
    }
    
    .category-info {
        flex-direction: column;
        gap: 25px;
    }
    
    .category-header-icon {
        width: 80px;
        height: 80px;
        font-size: 32px;
    }
    
    .category-title {
        font-size: 40px;
    }
    
    .category-description {
        font-size: 16px;
        max-width: 600px;
    }
    
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 25px;
    }
    
    .product-card {
        border-radius: 20px;
    }
}

@media (max-width: 768px) {
    .category-header {
        padding: 40px 0 35px;
        min-height: 250px;
    }
    
    .category-header-content {
        gap: 25px;
        padding-top: 25px;
    }
    
    .category-info {
        gap: 20px;
    }
    
    .category-header-icon {
        width: 70px;
        height: 70px;
        font-size: 28px;
    }
    
    .category-title {
        font-size: 32px;
        margin-bottom: 15px;
    }
    
    .category-description {
        font-size: 15px;
    }
    
    .category-stats {
        padding: 20px 25px;
        min-width: 120px;
    }
    
    .stat-number {
        font-size: 28px;
    }
    
    .stat-label {
        font-size: 13px;
    }
    
    .products-section {
        padding: 60px 0;
    }
    
    .products-grid {
        /* ИСПРАВЛЕНО: Убрали auto-fit, оставляем 2 колонки */
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
        margin-bottom: 50px;
    }
    
    .product-image {
        height: 180px;
    }
    
    .product-content {
        padding: 20px 16px;
    }
    
    .product-title {
        font-size: 18px;
        margin-bottom: 10px;
    }
    
    .product-substance {
        font-size: 12px;
        margin-bottom: 8px;
        padding: 6px 8px;
    }
    
    .product-description {
        font-size: 13px;
        margin-bottom: 12px;
        -webkit-line-clamp: 2;
    }
    
    .product-details {
        gap: 6px;
        margin-bottom: 12px;
        padding: 12px 0;
    }
    
    .product-detail {
        font-size: 12px;
        gap: 6px;
    }
    
    .product-detail i {
        width: 16px;
        font-size: 13px;
    }
    
    .product-price {
        margin-bottom: 15px;
        padding: 10px 12px;
    }
    
    .price-amount {
        font-size: 20px;
    }
    
    .price-currency {
        font-size: 14px;
    }
    
    .product-footer {
        padding: 0 16px 16px;
    }
    
    .product-btn {
        font-size: 13px;
        padding: 10px 16px;
        letter-spacing: 0.5px;
    }
    
    .pagination-section {
        margin-top: 50px;
        padding-top: 30px;
    }
    
    .pagination {
        flex-wrap: wrap;
        gap: 10px;
        padding: 15px 20px;
    }
    
    .pagination-btn {
        font-size: 12px;
        padding: 10px 18px;
    }
    
    .pagination-numbers {
        margin: 0 15px;
        gap: 6px;
    }
    
    .pagination-number {
        width: 40px;
        height: 40px;
        font-size: 13px;
    }
}

@media (max-width: 575px) {
    .category-header {
        padding: 35px 0 30px;
        min-height: 220px;
    }
    
    .category-header-content {
        gap: 20px;
        padding-top: 20px;
    }
    
    .category-info {
        gap: 15px;
    }
    
    .category-header-icon {
        width: 60px;
        height: 60px;
        font-size: 24px;
    }
    
    .category-title {
        font-size: 26px;
        margin-bottom: 12px;
    }
    
    .category-description {
        font-size: 14px;
    }
    
    .category-stats {
        padding: 18px 20px;
        min-width: 100px;
    }
    
    .stat-number {
        font-size: 24px;
        margin-bottom: 6px;
    }
    
    .stat-label {
        font-size: 12px;
    }
    
    .products-section {
        padding: 50px 0;
    }
    
    .products-grid {
        /* ИСПРАВЛЕНО: Четко установлено 2 колонки для мобильных */
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
        margin-bottom: 40px;
    }
    
    .product-card {
        border-radius: 16px;
    }
    
    .product-image {
        height: 140px;
    }
    
    .product-content {
        padding: 16px 14px;
    }
    
    .product-title {
        font-size: 16px;
        margin-bottom: 8px;
    }
    
    .product-substance {
        font-size: 11px;
        margin-bottom: 6px;
        padding: 4px 6px;
    }
    
    .product-description {
        font-size: 12px;
        margin-bottom: 10px;
        -webkit-line-clamp: 2;
    }
    
    .product-details {
        gap: 4px;
        margin-bottom: 10px;
        padding: 10px 0;
    }
    
    .product-detail {
        font-size: 11px;
        gap: 4px;
    }
    
    .product-detail i {
        width: 14px;
        font-size: 12px;
    }
    
    .product-price {
        margin-bottom: 12px;
        padding: 8px 10px;
        border-radius: 10px;
    }
    
    .price-amount {
        font-size: 18px;
    }
    
    .price-currency {
        font-size: 12px;
    }
    
    .product-footer {
        padding: 0 14px 14px;
    }
    
    .product-btn {
        font-size: 11px;
        padding: 10px 14px;
        letter-spacing: 0.4px;
    }
    
    .no-products-content {
        padding: 40px 25px;
        border-radius: 20px;
    }
    
    .no-products-content i {
        font-size: 56px;
        margin-bottom: 25px;
    }
    
    .no-products-content h3 {
        font-size: 24px;
        margin-bottom: 15px;
    }
    
    .no-products-content p {
        font-size: 14px;
        margin-bottom: 30px;
    }
    
    .back-btn {
        font-size: 12px;
        padding: 14px 25px;
    }
    
    .pagination-section {
        margin-top: 40px;
        padding-top: 25px;
    }
    
    .pagination {
        flex-direction: column;
        gap: 15px;
        padding: 20px 15px;
        border-radius: 20px;
    }
    
    .pagination-numbers {
        margin: 0;
        order: 1;
        gap: 5px;
    }
    
    .pagination-btn.prev {
        order: 0;
    }
    
    .pagination-btn.next {
        order: 2;
    }
    
    .pagination-number {
        width: 36px;
        height: 36px;
        font-size: 12px;
    }
}