/* UniShop Blog Enhancements */
.category_description {overflow:auto; margin-bottom: 20px;}
.category_description .image{float:left; margin:0 15px 10px 0; max-width: 200px;}
.category_description .short_description {font-size: 14.5px; line-height: 1.6; color: #334155;}

/* Categories / Subcategories Grid */
.category_list {margin-bottom: 30px;}
.category_list > div {margin-bottom: 15px;}
.category_list a {position:relative; display:block; border-radius:8px; overflow:hidden; border:1px solid #e2e8f0; background:#f8fafc; text-decoration:none !important; transition:transform 0.2s ease, box-shadow 0.2s ease;}
.category_list a:hover {transform:translateY(-3px); box-shadow:0 8px 20px rgba(0,0,0,0.08); border-color:#cbd5e1;}
.category_list a img {width:100%; height:140px; object-fit:cover; display:block; transition:transform 0.3s ease;}
.category_list a:hover img {transform:scale(1.05);}
.category_list span {position:absolute; left:0; right:0; bottom:0; padding:10px 12px; background:rgba(15, 23, 42, 0.78); color:#fff; font-size:13.5px; font-weight:600; text-align:center; backdrop-filter:blur(3px); transition:background 0.2s ease;}
.category_list a:hover span {background:rgba(5, 84, 242, 0.9);}

/* 3-Column Article Grid (Desktop: 3 per row, Tablet: 2, Mobile: 1) */
.article_grid.row {
    display: flex !important;
    flex-wrap: wrap !important;
    margin-left: -10px !important;
    margin-right: -10px !important;
}
.article_grid_item {
    display: flex !important;
    padding-left: 10px !important;
    padding-right: 10px !important;
    margin-bottom: 24px !important;
}
@media (min-width: 992px) {
    .article_grid_item.col-md-4 {
        width: 33.33333333% !important;
        flex: 0 0 33.33333333% !important;
        max-width: 33.33333333% !important;
    }
}
@media (min-width: 768px) and (max-width: 991px) {
    .article_grid_item.col-sm-6 {
        width: 50% !important;
        flex: 0 0 50% !important;
        max-width: 50% !important;
    }
}
@media (max-width: 767px) {
    .article_grid_item.col-xs-12 {
        width: 100% !important;
        flex: 0 0 100% !important;
        max-width: 100% !important;
    }
}

/* Article Card */
.article_card {
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 12px !important;
    overflow: hidden !important;
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04) !important;
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease !important;
}
.article_card:hover {
    transform: translateY(-4px) !important;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.09) !important;
    border-color: #cbd5e1 !important;
}

/* Article Card Image - strictly top, full card width, never float */
.article_card_image {
    width: 100% !important;
    height: 195px !important;
    max-height: 195px !important;
    overflow: hidden !important;
    position: relative !important;
    background: #f1f5f9 !important;
    float: none !important;
    margin: 0 !important;
    padding: 0 !important;
}
.article_card_image img {
    width: 100% !important;
    height: 100% !important;
    max-width: 100% !important;
    object-fit: cover !important;
    object-position: center !important;
    display: block !important;
    float: none !important;
    border-radius: 0 !important;
    transition: transform 0.35s ease !important;
}
.article_card:hover .article_card_image img {
    transform: scale(1.05) !important;
}

/* Article Card Body */
.article_card_body {
    padding: 18px 20px 16px !important;
    display: flex !important;
    flex-direction: column !important;
    flex-grow: 1 !important;
}
.article_card_title {
    font-size: 15.5px !important;
    font-weight: 700 !important;
    line-height: 1.4 !important;
    color: #1e293b !important;
    margin: 0 0 10px 0 !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    min-height: 43px !important;
    transition: color 0.2s ease !important;
}
.article_card_title:hover {
    color: #0554f2 !important;
}
.article_card_desc {
    font-size: 13.5px !important;
    line-height: 1.55 !important;
    color: #64748b !important;
    margin-bottom: 16px !important;
    flex-grow: 1 !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 3 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}
.article_card_footer {
    margin-top: auto !important;
    padding-top: 14px !important;
    border-top: 1px solid #f1f5f9 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
}
.article_card_btn {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: #0554f2 !important;
    color: #ffffff !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    padding: 7px 16px !important;
    border-radius: 6px !important;
    text-decoration: none !important;
    box-shadow: 0 2px 6px rgba(5, 84, 242, 0.25) !important;
    transition: background 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease !important;
}
.article_card_btn:hover {
    background: #0340be !important;
    color: #ffffff !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 10px rgba(5, 84, 242, 0.35) !important;
}
.article_card_meta {
    font-size: 12px !important;
    color: #94a3b8 !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 12px !important;
}
.article_card_meta span {
    display: inline-flex !important;
    align-items: center !important;
    gap: 4px !important;
}

/* Fallback for classic .article_list */
.article_list .image img {border-radius:8px;}
.article_list .posted {text-align:right;color:#888;font-size:0.9em;}
.article_list .posted span + span {margin:0 0 0 5px;padding:0 0 0 10px;border-left:solid 1px #e2e8f0;}
.article_list .posted span i {margin:0 4px 0 0;}
.article_list .btn_readmore {
    display: inline-block;
    padding: 6px 14px;
    background: #0554F2;
    color: #fff !important;
    border-radius: 4px;
    font-weight: 600;
    font-size: 13px;
    text-decoration: none !important;
    box-shadow: 0 2px 4px rgba(5, 84, 242, 0.2);
}

/* Detail article page styles */
.blog_article .article .image {
    float: none !important;
    margin: 0 0 24px 0 !important;
    width: 100% !important;
    max-height: 480px !important;
    overflow: hidden !important;
    border-radius: 14px !important;
    box-shadow: 0 4px 16px rgba(15, 23, 42, 0.08) !important;
}
.blog_article .article .image a {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
}
.blog_article .article .image img {
    width: 100% !important;
    height: auto !important;
    max-height: 480px !important;
    object-fit: cover !important;
    object-position: center !important;
    display: block !important;
}
.blog_article .article .description {
    font-size: 15px !important;
    line-height: 1.7 !important;
    color: #334155 !important;
}
.blog_article .article .description p {
    font-size: 15px !important;
    line-height: 1.7 !important;
    color: #334155 !important;
    margin-bottom: 16px !important;
}

/* Теги статей в виде плиток (чипсы/кнопки) */
.article_tags {
    margin: 28px 0 20px 0 !important;
    padding-top: 18px !important;
    border-top: 1px solid #e2e8f0 !important;
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    gap: 10px !important;
}
.article_tags .tags_title {
    font-size: 14px !important;
    font-weight: 700 !important;
    color: #475569 !important;
    margin-right: 6px !important;
}
.article_tags .tags_chips {
    display: inline-flex !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    gap: 8px !important;
}
.article_tags .tag_chip,
.blog_article a[href*="tag="] {
    display: inline-flex !important;
    align-items: center !important;
    padding: 6px 14px !important;
    background: #f1f5f9 !important;
    color: #1e293b !important;
    border: 1px solid #cbd5e1 !important;
    border-radius: 20px !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    text-decoration: none !important;
    transition: all 0.2s ease !important;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05) !important;
}
.article_tags .tag_chip:hover,
.blog_article a[href*="tag="]:hover {
    background: #0554F2 !important;
    color: #ffffff !important;
    border-color: #0554F2 !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 10px rgba(5,84,242,0.25) !important;
}

/* Обратите внимание (Сопутствующие товары в блоге) */
.blog_article .product_carousel {
    box-shadow: none !important;
    background: transparent !important;
    border: none !important;
    margin: 36px 0 24px 0 !important;
    padding: 0 !important;
}
.blog_article .product_carousel .heading {
    font-size: 20px !important;
    font-weight: 700 !important;
    color: #1e293b !important;
    margin: 0 0 20px 0 !important;
    border-bottom: 2px solid #e2e8f0 !important;
    padding-bottom: 10px !important;
}
.blog_article .product_carousel .heading span {
    border-bottom: 2px solid #0554F2 !important;
    padding-bottom: 10px !important;
    margin-bottom: -2px !important;
    display: inline-block !important;
}
.blog_article .product_carousel .product-thumb {
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 12px !important;
    padding: 16px !important;
    margin: 6px !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04) !important;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease !important;
    display: flex !important;
    flex-direction: column !important;
    height: calc(100% - 12px) !important;
}
.blog_article .product_carousel .product-thumb:hover {
    transform: translateY(-3px) !important;
    box-shadow: 0 10px 24px rgba(0,0,0,0.08) !important;
    border-color: #cbd5e1 !important;
}
.blog_article .product_carousel .product-thumb .image {
    padding: 8px !important;
    text-align: center !important;
    margin-bottom: 10px !important;
}
.blog_article .product_carousel .product-thumb .image img {
    max-height: 160px !important;
    object-fit: contain !important;
    margin: 0 auto !important;
}
.blog_article .product_carousel .product-thumb .caption {
    padding: 0 !important;
    flex-grow: 1 !important;
    display: flex !important;
    flex-direction: column !important;
}
.blog_article .product_carousel .product-thumb .caption h4 {
    font-size: 14.5px !important;
    font-weight: 600 !important;
    line-height: 1.4 !important;
    min-height: 40px !important;
    margin: 0 0 8px 0 !important;
}
.blog_article .product_carousel .product-thumb .caption h4 a {
    color: #1e293b !important;
    text-decoration: none !important;
}
.blog_article .product_carousel .product-thumb .caption h4 a:hover {
    color: #0554F2 !important;
}
.blog_article .product_carousel .product-thumb .price {
    font-size: 16px !important;
    font-weight: 700 !important;
    color: #0554F2 !important;
    margin: auto 0 12px 0 !important;
}
.blog_article .product_carousel .product-thumb .cart {
    margin: 0 !important;
    padding: 0 !important;
    width: 100% !important;
}
.blog_article .product_carousel .product-thumb .cart .add_to_cart {
    width: 100% !important;
    height: 40px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    background: #0554F2 !important;
    border: 1px solid #0554F2 !important;
    border-radius: 8px !important;
    color: #ffffff !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    box-shadow: 0 2px 6px rgba(5,84,242,0.22) !important;
    transition: all 0.2s ease !important;
    cursor: pointer !important;
    padding: 0 14px !important;
}
.blog_article .product_carousel .product-thumb .cart .add_to_cart:hover {
    background: #0340be !important;
    border-color: #0340be !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 12px rgba(5,84,242,0.32) !important;
}
.blog_article .product_carousel .product-thumb .cart .add_to_cart i {
    font-size: 15px !important;
    display: inline-block !important;
}
.blog_article .product_carousel .product-thumb .cart .add_to_cart span {
    display: inline-block !important;
}

/* Мобильная адаптивность для статьи и сопутствующих товаров */
@media (max-width: 767px) {
    .blog_article .article .image {
        max-height: 250px !important;
        border-radius: 10px !important;
        margin-bottom: 16px !important;
    }
    .blog_article .article .image img {
        max-height: 250px !important;
    }
    .blog_article .article .description,
    .blog_article .article .description p {
        font-size: 14px !important;
        line-height: 1.65 !important;
    }
    .article_card_image {
        height: 190px !important;
    }
    .blog_article .product_carousel .product-thumb {
        padding: 12px !important;
        margin: 4px !important;
    }
    .blog_article .product_carousel .product-thumb .cart .add_to_cart {
        height: 38px !important;
        font-size: 13px !important;
        padding: 0 10px !important;
    }
}