/* Category Page Styles */
.category-page {
    padding: 60px 0;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    min-height: 70vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Breadcrumbs - Красивые */
.breadcrumbs-section {
    margin-bottom: 40px;
}

.woocommerce-breadcrumb {
    padding: 18px 24px;
    font-size: 15px;
    color: #666;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.06);
    display: flex;
    align-items: center;
    flex-wrap: wrap;
}

.woocommerce-breadcrumb a {
    color: #2e4152;
    text-decoration: none;
    transition: all 0.3s;
    font-weight: 500;
    padding: 4px 8px;
    border-radius: 6px;
}

.woocommerce-breadcrumb a:hover {
    color: #e74c3c;
    background: #f8f9fa;
}

.woocommerce-breadcrumb .delimiter {
    margin: 0 10px;
    color: #ccc;
    font-size: 18px;
}

.woocommerce-breadcrumb span:not(.delimiter) {
    color: #2c3e50;
    font-weight: 600;
}

/* Category Header - Красивый */
.category-header {
    text-align: center;
    margin-bottom: 60px;
    animation: fadeInDown 0.6s ease;
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.category-title {
    font-size: 3rem;
    font-weight: 800;
    background: linear-gradient(135deg, #2c3e50, #34495e);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 20px;
    letter-spacing: -0.5px;
}

.category-description {
    font-size: 1.2rem;
    color: #666;
    max-width: 700px;
    margin: 0 auto;
    line-height: 1.8;
}

/* Subcategories Grid - КОМПАКТНЫЕ КАРТОЧКИ */
.subcategories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
    margin: 40px 0;
    animation: fadeInUp 0.8s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.subcategory-card {
    background: white;
    border-radius: 24px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.08);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    overflow: hidden;
    position: relative;
}

.subcategory-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 6px;
    background: linear-gradient(90deg, #2e4152, #3d5367);
    transform: scaleX(0);
    transition: transform 0.4s ease;
}

.subcategory-card:hover::before {
    transform: scaleX(1);
}

.subcategory-card:hover {
    transform: translateY(-12px) scale(1.02);
    box-shadow: 0 20px 60px rgba(46, 65, 82, 0.15);
}

.subcategory-link {
    display: block;
    padding: 30px 25px;
    text-decoration: none;
    color: inherit;
    text-align: center;
}

.subcategory-icon {
    font-size: 3.5rem;
    margin-bottom: 18px;
    display: block;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.subcategory-card:hover .subcategory-icon {
    animation: none;
    transform: scale(1.15);
    transition: transform 0.3s ease;
}

.subcategory-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 12px;
    line-height: 1.3;
    letter-spacing: -0.3px;
}

.subcategory-count {
    font-size: 0.95rem;
    color: #666;
    margin-bottom: 18px;
    font-weight: 500;
}

.subcategory-arrow {
    font-size: 1.5rem;
    color: #2e4152;
    font-weight: bold;
    transition: all 0.3s ease;
    display: inline-block;
}

.subcategory-card:hover .subcategory-arrow {
    transform: translateX(12px) scale(1.2);
    color: #e74c3c;
}

/* Products Grid - МИНИ КОМПАКТНЫЕ КАРТОЧКИ */
.products-grid-container {
    margin-top: 40px;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
    padding: 20px 0;
}

.product-card-category {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.06);
    transition: all 0.3s ease;
    border: 1px solid #f0f0f0;
}

.product-card-category:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
    border-color: #2e4152;
}

.product-image {
    width: 100%;
    height: 140px;
    background: #fafbfc;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.product-image a {
    display: block;
    width: 100%;
    height: 100%;
    text-decoration: none;
}

.product-image::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, #2e4152, #3d5367);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.product-card-category:hover .product-image::after {
    transform: scaleX(1);
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 12px;
    transition: all 0.3s ease;
}

.product-card-category:hover .product-image img {
    transform: scale(1.05);
}

.product-info {
    padding: 15px;
}

.product-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 12px;
    line-height: 1.3;
    min-height: 2.6em;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-actions {
    margin-top: auto;
}

.btn-primary {
    display: inline-block;
    background: linear-gradient(135deg, #2e4152 0%, #3d5367 100%);
    color: white;
    padding: 10px 18px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 12px;
    transition: all 0.3s ease;
    text-align: center;
    width: 100%;
    box-sizing: border-box;
    box-shadow: 0 3px 10px rgba(46, 65, 82, 0.15);
    letter-spacing: 0.3px;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #3d5367 0%, #4a5f73 100%);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(46, 65, 82, 0.25);
}

/* No Products */
.no-products {
    text-align: center;
    padding: 80px 20px;
    color: #666;
    font-size: 1.2rem;
}

.no-products p {
    font-weight: 500;
}

/* Responsive */
@media (max-width: 768px) {
    .category-title {
        font-size: 2.2rem;
    }

    .subcategories-grid {
        grid-template-columns: 1fr;
        gap: 25px;
        margin: 40px 0;
    }

    .subcategory-link {
        padding: 40px 25px;
    }

    .subcategory-icon {
        font-size: 4rem;
        margin-bottom: 20px;
    }

    .subcategory-title {
        font-size: 1.4rem;
    }

    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
        gap: 15px;
    }

    .product-image {
        height: 130px;
    }

    .product-info {
        padding: 14px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }

    .category-page {
        padding: 30px 0;
    }

    .category-title {
        font-size: 1.8rem;
    }

    .products-grid {
        grid-template-columns: 1fr;
        gap: 18px;
    }

    .woocommerce-breadcrumb {
        padding: 14px 18px;
        font-size: 14px;
    }

    .subcategory-link {
        padding: 35px 20px;
    }
}
