* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen", "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif;
    background-color: rgba(249, 250, 251, 0.3);
    color: #111827;
    line-height: 1.6;
}

main {
    min-height: 100vh;
    padding: 32px 0;
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Breadcrumb */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 32px;
    font-size: 14px;
    color: #6b7280;
}

.breadcrumb a {
    color: #6b7280;
    text-decoration: none;
    transition: color 0.2s;
}

.breadcrumb a:hover {
    color: #00b894;
}

.breadcrumb span {
    color: #d1d5db;
}

/* Category Header */
.category-header {
    text-align: center;
    margin-bottom: 48px;
    background: white;
    padding: 48px 32px;
    border-radius: 20px;
    border: 1px solid rgba(229, 231, 235, 0.5);
}

.header-line {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.green-line {
    width: 4px;
    height: 40px;
    background: linear-gradient(to bottom, #00b894, #00a085);
    border-radius: 2px;
}

.category-header h1 {
    font-size: 2.5rem;
    font-weight: 300;
    color: #111827;
    letter-spacing: -0.025em;
    margin: 0;
}

.category-description {
    color: #6b7280;
    font-size: 1.125rem;
    font-weight: 300;
    max-width: 600px;
    margin: 16px auto 0;
}

/* Products Section */
.products-section {
    margin-top: 48px;
}

.products-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
    background: white;
    padding: 24px 32px;
    border-radius: 16px;
    border: 1px solid rgba(229, 231, 235, 0.5);
}

.products-header h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #111827;
    margin: 0;
}

.products-count {
    color: #6b7280;
    font-size: 0.875rem;
    font-weight: 500;
}

/* Products Grid */
.products-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    margin-bottom: 48px;
}

/* Product Card */
.product-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
    border: 1px solid rgba(229, 231, 235, 0.5);
    position: relative;
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.08);
    border-color: #00b894;
    text-decoration: none;
    color: inherit;
}

.product-image {
    width: 100%;
    height: 280px;
    position: relative;
    overflow: hidden;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.product-card:hover .product-image img {
    transform: scale(1.05);
}

.no-image {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    color: #6b7280;
    font-size: 14px;
    font-weight: 500;
    flex-direction: column;
}

.no-image i {
    font-size: 32px;
    margin-bottom: 8px;
    opacity: 0.5;
}

.image-count {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 6px 12px;
    border-radius: 16px;
    font-size: 12px;
    font-weight: 500;
    backdrop-filter: blur(4px);
}

.product-info {
    padding: 24px;
}

.product-title {
    margin: 0 0 8px 0;
    font-size: 1.125rem;
    font-weight: 600;
    line-height: 1.3;
    color: #111827;
}

.product-description {
    margin: 0 0 16px 0;
    color: #6b7280;
    font-size: 0.875rem;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-price {
    font-size: 1.25rem;
    font-weight: 700;
    color: #00b894;
    margin: 0;
}

/* Card Overlay Effect */
.product-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(0, 184, 148, 0.05), rgba(0, 160, 133, 0.05));
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.product-card:hover::after {
    opacity: 1;
}

/* Loading States */
.loading {
    text-align: center;
    padding: 48px 20px;
    background: white;
    border-radius: 16px;
    margin: 24px auto;
    max-width: 400px;
    border: 1px solid rgba(229, 231, 235, 0.5);
}

.spinner {
    display: inline-block;
    width: 24px;
    height: 24px;
    border: 3px solid #f3f4f6;
    border-top: 3px solid #00b894;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 16px;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

.loading-text {
    color: #6b7280;
    font-size: 1rem;
    font-weight: 500;
}

.end-message {
    text-align: center;
    padding: 32px 20px;
    color: #6b7280;
    font-style: italic;
    background: white;
    border-radius: 16px;
    margin: 24px auto;
    max-width: 400px;
    border: 1px solid rgba(229, 231, 235, 0.5);
}

.end-message i {
    font-size: 24px;
    margin-bottom: 12px;
    color: #00b894;
    display: block;
}

.no-products {
    text-align: center;
    padding: 80px 20px;
    background: white;
    border-radius: 20px;
    margin: 24px 0;
    border: 1px solid rgba(229, 231, 235, 0.5);
}

.no-products-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 24px;
    background: linear-gradient(to right, #00b894, #00a085);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.no-products h3 {
    color: #111827;
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 12px;
}

.no-products p {
    color: #6b7280;
    max-width: 400px;
    margin: 0 auto;
}

/* Error States */
.error-message {
    background: white;
    border: 1px solid #fecaca;
    color: #dc2626;
    padding: 24px;
    border-radius: 16px;
    margin: 24px auto;
    text-align: center;
    max-width: 500px;
    box-shadow: 0 4px 6px rgba(220, 38, 38, 0.05);
}

.error-icon {
    font-size: 32px;
    margin-bottom: 12px;
    color: #ef4444;
}

.retry-button {
    background: linear-gradient(135deg, #00b894, #00a085);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    cursor: pointer;
    margin-top: 16px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.retry-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 184, 148, 0.3);
}

/* Back Link */
.back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: white;
    border: 1px solid #e5e7eb;
    padding: 12px 24px;
    border-radius: 12px;
    color: #374151;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    margin: 32px 0;
    text-decoration: none;
}

.back-link:hover {
    background: #f9fafb;
    border-color: #00b894;
    color: #00b894;
    transform: translateX(-4px);
    text-decoration: none;
}

/* Load More Button */
.load-more-btn {
    display: block;
    width: 200px;
    margin: 32px auto;
    background: linear-gradient(135deg, #00b894, #00a085);
    color: white;
    border: none;
    padding: 16px 24px;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1rem;
}

.load-more-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 184, 148, 0.3);
}

/* Responsive Design */
@media (max-width: 1024px) {
    .products-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 20px;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 0 16px;
    }

    .category-header {
        padding: 32px 24px;
    }

    .category-header h1 {
        font-size: 2rem;
    }

    .products-header {
        padding: 20px 24px;
        flex-direction: column;
        gap: 12px;
        align-items: flex-start;
    }

    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }

    .product-info {
        padding: 16px;
    }

    .product-image {
        height: 240px;
    }
}

@media (max-width: 480px) {
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .product-info {
        padding: 12px;
    }

    .category-header h1 {
        font-size: 1.75rem;
    }

    .product-image {
        height: 200px;
    }
}

/* Animation for new products */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.product-card {
    animation: fadeInUp 0.5s ease forwards;
}

/* Staggered animation delay */
.product-card:nth-child(1) {
    animation-delay: 0.1s;
}

.product-card:nth-child(2) {
    animation-delay: 0.2s;
}

.product-card:nth-child(3) {
    animation-delay: 0.3s;
}

.product-card:nth-child(4) {
    animation-delay: 0.4s;
}

.product-card:nth-child(5) {
    animation-delay: 0.5s;
}

.product-card:nth-child(6) {
    animation-delay: 0.6s;
}

/* Hidden initially for animation */
.product-card {
    opacity: 0;
}

/* Focus states for accessibility */
.product-card:focus,
.back-link:focus,
.retry-button:focus {
    outline: 2px solid #00b894;
    outline-offset: 2px;
}

/* Ссылка только на изображение товара */
.product-image-link {
    display: block;
    width: 100%;
    height: 100%;
    text-decoration: none;
    cursor: pointer;
}

.product-image-link:focus {
    outline: 2px solid #00b894;
    outline-offset: 2px;
}