/* Trang danh mục: nội dung SEO thu gọn được + cột Tin tức (class-dmw-shop.php). */
.shop-container > .term-description, .category-page-row .term-description { display: none !important; }
.section-cat-content { margin-top: 30px !important; padding: 0 !important; }
.section-cat-content .section-title-container { margin-bottom: .5em; }
.section-cat-content .section-title-normal span { text-transform: none; }
.section-cat-content .box-blog-post .is-divider { display: none; }

.cat-content { background-color: #fff; border: 1px solid #ececec; border-radius: 4px; padding: 28px 30px; max-height: 430px; overflow: hidden; position: relative; }
.cat-content.expanded { max-height: none; }
.cat-content:not(.expanded)::after { content: ""; position: absolute; left: 0; bottom: 0; width: 100%; height: 90px; background: linear-gradient(to top, #fff 15%, rgba(255,255,255,0)); pointer-events: none; }
/* Cỡ / màu heading theo thang của theme (h2 20, h3–h4 16, cùng #111). */
.cat-content h2, .cat-content h3, .cat-content h4 { line-height: 1.25; }
.cat-content h2 { font-size: 1.25rem; margin: 1.5em 0 .5em; }
.cat-content h3, .cat-content h4 { font-size: 1rem; margin: 1.25em 0 .5em; }
.cat-content p { margin-bottom: 1em; line-height: 1.7; }
.cat-content a { color: var(--primary-color, #1f4788); text-decoration: underline; }
.cat-content ol, .cat-content ul { padding-left: 22px; margin-bottom: 1em; }
.cat-content li { margin-bottom: .35em; line-height: 1.6; }
.cat-content table { width: 100%; border-collapse: collapse; margin: 1em 0 1.5em; font-size: .875rem; font-variant-numeric: tabular-nums; }
.cat-content th, .cat-content td { border: 1px solid #e3e3e3; padding: 9px 12px; text-align: left; vertical-align: top; }
.cat-content thead th, .cat-content tr:first-child th { background: var(--primary-color, #1f4788); color: #fff; border-color: var(--primary-color, #1f4788); }
.cat-content tbody tr:nth-child(even) td { background: #f7f9fc; }

.toggle-wrapper { text-align: center; }
/* Như .button của theme: cao 40, chữ 14 hoa 600, bo 4. */
.toggle-button { background-color: var(--primary-color, #1f4788); border: 1px solid var(--primary-color, #1f4788); color: #fff; min-height: 40px; padding: 0 20px; margin: 16px auto 0; display: inline-block; font-size: 14px; font-weight: 600; letter-spacing: .04em; line-height: 38px; text-transform: uppercase; cursor: pointer; border-radius: 4px; transition: background-color .2s, border-color .2s; }
.toggle-button:hover { background-color: #12294d; border-color: #12294d; }
.toggle-button:focus-visible { outline: 2px solid var(--primary-color, #1f4788); outline-offset: 2px; }

/* Bản HTML thường (không còn shortcode UX). */
.dmw-subcats { list-style: none; margin: 0 0 30px; padding: 0; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 30px; text-align: center; }
.dmw-subcats a { display: block; color: inherit; text-decoration: none; }
.dmw-subcats__img { position: relative; display: block; max-width: 125px; aspect-ratio: 1; margin: 0 auto 15px; border-radius: 50%; overflow: hidden; background: #fff; }
.dmw-subcats__img img { display: block; width: 100%; height: 100%; object-fit: cover; }
.dmw-subcats__img::after { content: ""; position: absolute; inset: 0; background: rgba(121, 121, 121, .25); transition: opacity .3s; }
.dmw-subcats a:hover .dmw-subcats__img::after { opacity: 0; }
.dmw-subcats__name { display: block; font-size: 14px; font-weight: 500; line-height: 1.4; color: #111; }
.dmw-subcats__count { display: block; margin-top: 2px; font-size: 12px; color: #666; }

.dmw-cat-content { margin-top: 30px; padding-top: 2em; border-top: 1px solid #ececec; display: grid; gap: 30px; }
.dmw-cat-content.has-news { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
/* Như .sec-title của theme. */
.dmw-news__head { display: flex; justify-content: space-between; align-items: baseline; font-size: 1rem; font-weight: 600; letter-spacing: .04em; line-height: 1.25; text-transform: uppercase; margin: 0 0 16px; padding-bottom: 8px; border-bottom: 2px solid #ececec; }
.dmw-news__head a { font-size: 14px; font-weight: 500; letter-spacing: 0; text-transform: none; color: var(--primary-color, #1f4788); }
.dmw-news ul { list-style: none; margin: 0; padding: 0; }
.dmw-news li { margin: 0 0 15px; }
.dmw-news li a { display: grid; grid-template-columns: 25% 1fr; gap: 16px; align-items: center; color: #111; text-decoration: none; font-size: 14px; font-weight: 500; line-height: 1.4; }
.dmw-news img, .dmw-news__ph { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; background: #f5f5f5; }
.dmw-news li a:hover span { color: var(--primary-color, #1f4788); }

@media (max-width: 849px) {
    .dmw-subcats { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
    .dmw-cat-content.has-news { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 549px) {
    .cat-content { padding: 20px; max-height: 360px; }
    .dmw-subcats { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 15px; }
}
