/* ===== CSS Custom Properties (Theme Tokens) ===== */
:root {
    --primary: #1a47af;
    --secondary: #f2994a;
    --light-gray: #f5f7fa;
    --dark-gray: #333333;
    --white: #ffffff;
    --black: #000000;
    --red-500: #ef4444;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --font-sans: 'Inter', system-ui, sans-serif;
    --font-handwriting: 'Segoe Print', 'Brush Script MT', cursive;
}

/* ===== Reset / Base ===== */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
}

body {
    font-family: var(--font-sans);
    color: var(--dark-gray);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

img {
    max-width: 100%;
    display: block;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

.aboute-img {
    height: 100%;
    width: auto !important;
}

button {
    cursor: pointer;
    border: none;
    background: none;
    font: inherit;
}

.font-size-12 {
    font-size: 12px;
}

.font-size-14 {
    font-size: 14px;
}

.font-size-18 {
    font-size: 18px;
}

/* ===== Container ===== */
.container {
    width: 100%;
}

@media (min-width: 768px) {
    .container {
        max-width: 768px;
    }
}

@media (min-width: 1024px) {
    .container {
        max-width: 1440px;
    }
}

@media (min-width: 1280px) {
    .container {
        max-width: 1440px;
    }
}

/* ===== Margin ===== */
.mx-auto {
    margin-left: auto;
    margin-right: auto;
}

.mt-1 {
    margin-top: 0.25rem;
}

.mt-2 {
    margin-top: 0.5rem;
}

.mt-4 {
    margin-top: 1rem;
}

.mt-6 {
    margin-top: 1.5rem;
}

.mt-8 {
    margin-top: 2rem;
}

.ml-1 {
    margin-left: 0.25rem;
}

.ml-2 {
    margin-left: 0.5rem;
}

.ml-4 {
    margin-left: 1rem;
}

.ml-6 {
    margin-left: 1.5rem;
}

.ml-8 {
    margin-left: 2rem;
}

.mb-2 {
    margin-bottom: 0.5rem;
}

.mb-4 {
    margin-bottom: 1rem;
}

.mb-6 {
    margin-bottom: 1.5rem;
}

.mb-8 {
    margin-bottom: 2rem;
}

/* ===== Padding ===== */
.p-3 {
    padding: 0.75rem;
}

.p-4 {
    padding: 1rem;
}

.p-6 {
    padding: 1.5rem;
}

.px-1 {
    padding-left: 0.25rem;
    padding-right: 0.25rem;
}

.px-3 {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
}

.px-4 {
    padding-left: 1rem;
    padding-right: 1rem;
}

.px-12 {
    padding-left: 3rem;
    padding-right: 3rem;
}

.py-1 {
    padding-top: 0.25rem;
    padding-bottom: 0.25rem;
}

.py-3 {
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
}

.py-8 {
    padding-top: 2rem;
    padding-bottom: 2rem;
}

.py-10 {
    padding-top: 2.5rem;
    padding-bottom: 2.5rem;
}

.pt-4 {
    padding-top: 1rem;
}

.pr-20 {
    padding-right: 5rem;
}

/* ===== Position ===== */
.relative {
    position: relative;
}

.absolute {
    position: absolute;
}

.sticky {
    position: sticky;
}

.fixed {
    position: fixed;
}

.inset-0 {
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
}

.top-0 {
    top: 0;
}

.top-1\/2 {
    top: 50%;
}

.left-0 {
    left: 0;
}

.left-20 {
    left: 5rem;
}

.bottom-0 {
    bottom: 0;
}

.right-0 {
    right: 0;
}

.z-50 {
    z-index: 50;
}

/* ===== Overflow ===== */
.overflow-hidden {
    overflow: hidden;
}

/* ===== Display ===== */
.hidden {
    display: none;
}

/* ===== Flexbox ===== */
.flex {
    display: flex;
}

.inline-flex {
    display: inline-flex;
}

.flex-col {
    flex-direction: column;
}

.flex-wrap {
    flex-wrap: wrap;
}

.flex-1 {
    flex: 1;
}

.flex-shrink0 {
    flex-shrink: 0
}

.items-center {
    align-items: center;
}

.items-start {
    align-items: flex-start;
}

.items-stretch {
    align-items: stretch;
}

.justify-center {
    justify-content: center;
}

.justify-between {
    justify-content: space-between;
}

.gap-2 {
    gap: 0.5rem;
}

.gap-3 {
    gap: 0.8rem;
}

.gap-4 {
    gap: 1rem;
}

.gap-6 {
    gap: 1.5rem;
}

.gap-8 {
    gap: 2rem;
}

/* ===== Grid ===== */
.grid {
    display: grid;
}

.grid-cols-1 {
    grid-template-columns: repeat(1, 1fr);
}

/* ===== Width / Height ===== */
.w-full {
    width: 100%;
}

.w-auto {
    width: auto;
}

.w-maxc {
    width: max-content;
}

.w-2 {
    width: 0.5rem;
}

.w-10 {
    width: 2.5rem;
}

.w-16 {
    width: 4rem;
}

.w-24 {
    width: 6rem;
}

.w-32 {
    width: 8rem;
}

.h-auto {
    height: auto;
}

.h-full {
    height: 100%;
}

.h-2 {
    height: 0.5rem;
}

.h-10 {
    height: 2.5rem;
}

.h-16 {
    height: 4rem;
}

.h-24 {
    height: 6rem;
}
.h-max-24 {
    max-height: 6rem;
    height: auto;
}
.h-32 {
    height: 8rem;
}

.h-40 {
    height: 16rem;
}

.h-\[250px\] {
    height: 250px;
}

.h-\[400px\] {
    height: 400px;
}

/* ===== Max Width ===== */
.max-w-1xl {
    max-width: 90rem;
}

.max-w-3xl {
    max-width: 48rem;
}

.max-w-4xl {
    max-width: 76rem;
}

.aboute-img {
    max-width: 260px;
    height: 260px;
}

.padding-lr3rem {

    margin-right: 4rem !important;
    margin-left: 4rem !important;
}

/* ===== Object Fit ===== */
.object-cover {
    object-fit: cover;
    object-position: center;
}

.object-contain {
    object-fit: contain;
    object-position: center;
}

/* ===== Typography ===== */
.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

.text-xs {
    font-size: 0.75rem;
    line-height: 1rem;
}

.text-sm {
    font-size: 0.875rem;
    line-height: 1.25rem;
}

.text-lg {
    font-size: 1.125rem;
    line-height: 1.75rem;
}

.text-2xl {
    font-size: 1.5rem;
    line-height: 2rem;
}

.text-\[clamp\(2rem\2c 5vw\2c 3rem\)\] {
    font-size: clamp(2rem, 5vw, 3rem);
}

.font-sans {
    font-family: var(--font-sans);
}

.font-handwriting {
    font-family: var(--font-handwriting);
}

.font-medium {
    font-weight: 500;
}

.font-semibold {
    font-weight: 600;
}

.font-bold {
    font-weight: 700;
}

.leading-relaxed {
    line-height: 1.625;
}

/* line-clamp-2 */
.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ===== Colors - Text ===== */
.text-white {
    color: var(--white);
}

.text-primary {
    color: var(--primary);
}

.text-darkGray {
    color: var(--dark-gray);
}

.text-gray-500 {
    color: var(--gray-500);
}

.text-gray-600 {
    color: var(--gray-600);
}

.text-gray-700 {
    color: var(--gray-700);
}

.text-white\/80 {
    color: rgba(255, 255, 255, 0.8);
}


/* ===== Colors - Background ===== */
.bg-white {
    background-color: var(--white);
}

.bg-primary {
    background-color: var(--primary);
}

.bg-lightGray {
    background-color: var(--light-gray);
}

.bg-gray-200 {
    background-color: var(--gray-200);
}

.bg-gray-300 {
    background-color: var(--gray-300);
}

.bg-red-500 {
    background-color: var(--red-500);
}

.bg-containerGray {
    background: url(../images/cat_08.png);
    background-size: 100% 100%;
    /* 宽度100%，高度自动 */
    background-repeat: no-repeat;
    background-position: top center;
}

.bg-secondary\/90 {
    background-color: rgba(242, 153, 74, 0.9);
}

/* ===== Colors - Border ===== */
.border-primary {
    border-color: var(--primary);
}

.border-gray-300 {
    border-color: var(--gray-300);
}

/* ===== Borders & Radius ===== */
.border {
    border: 1px solid;
}

.border-t {
    border-top: 1px solid;
}

.rounded {
    border-radius: 0.25rem;
}

.rounded-lg {
    border-radius: 0.5rem;
}

.rounded-full {
    border-radius: 9999px;
}

/* ===== Shadows ===== */
.shadow-sm {
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.shadow-md {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

/* ===== Transforms ===== */
.-translate-y-1\/2 {
    transform: translateY(-50%);
}

/* ===== Transitions ===== */
.transition-colors {
    transition: color 0.15s, background-color 0.15s, border-color 0.15s;
}

.transition-opacity {
    transition: opacity 0.15s;
}

/* ===== Opacity ===== */
.hover\:opacity-90:hover {
    opacity: 0.9;
}

/* ===== Hover States ===== */
.hover\:text-primary:hover {
    color: var(--primary);
}

.hover\:text-white:hover {
    color: var(--white);
}

.hover\:bg-primary:hover {
    background-color: var(--primary);
}

/* ===== Space Utilities (flex gap fallback) ===== */
.space-x-1>*+* {
    margin-left: 0.25rem;
}

.space-x-2>*+* {
    margin-left: 0.5rem;
}

.space-x-4>*+* {
    margin-left: 1rem;
}

.space-x-8>*+* {
    margin-left: 2rem;
}

.space-y-1>*+* {
    margin-top: 0.25rem;
}

.space-y-6>*+* {
    margin-top: 1.5rem;
}

/* ===== Custom Utilities ===== */
.text-shadow-sm {
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

/* ===== Hero Background ===== */
.banner {
    background: linear-gradient(to right, rgba(0, 0, 0, 0.15), rgba(0, 0, 0, 0.05))
}

.hero-bg {
    background: linear-gradient(to right, rgba(0, 0, 0, 0.15), rgba(0, 0, 0, 0.05)),
        url('https://picsum.photos/id/40/1920/400');
    background-size: cover;
    background-position: center;
}

.hero-bg1 {
    background-size: cover;
    background-position: center;
}

.banner-img {
    width: 100%;
    height: auto;
    ;
}


/* ===== Responsive: md (768px+) ===== */
@media (min-width: 768px) {
    .md\:flex {
        display: flex;
    }

    .md\:hidden {
        display: none;
    }

    .md\:flex-row {
        flex-direction: row;
    }

    .md\:grid-cols-2 {
        grid-template-columns: repeat(2, 1fr);
    }

    .md\:grid-cols-3 {
        grid-template-columns: repeat(3, 1fr);
    }


    .md\:w-72 {
        width: 23rem;
    }
}

/* ===== Book Club Carousel ===== */
.bookclub-carousel {
    overflow: hidden;
    position: relative;
    touch-action: pan-y pinch-zoom;
}

.bookclub-track {
    display: flex;
    transition: transform 0.45s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: transform;
    cursor: grab;
    user-select: none;
    -webkit-user-select: none;
}

.bookclub-track.grabbing {
    cursor: grabbing;
}

.bookclub-slide {
    flex: 0 0 100%;
    min-width: 0;
    /* padding-right: 15px; */
}

.bookclub-slide:last-child {
    padding-right: 0;
}

.bookclub-dot {
    cursor: pointer;
    transition: background-color 0.3s;
}

/* ===== Research Carousel ===== */
.research-carousel {
    overflow: hidden;
    position: relative;
    touch-action: pan-y pinch-zoom;
}

.research-track {
    display: flex;
    transition: transform 0.45s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: transform;
    cursor: grab;
    user-select: none;
    -webkit-user-select: none;
}

.research-track.grabbing {
    cursor: grabbing;
}

.research-slide {
    flex: 0 0 100%;
    min-width: 0;
    padding-right: 5px;
}

.research-slide:last-child {
    padding-right: 0;
}

@media (min-width: 768px) {
    .research-slide {
        flex: 0 0 calc(100% / 3);
    }
}

.research-dot {
    cursor: pointer;
    transition: background-color 0.3s;
}

/* ===== Research Carousel Button ===== */
.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: var(--white);
    border-radius: 9999px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    width: 2.5rem;
    height: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    transition: color 0.15s, background-color 0.15s;
}

.carousel-btn:hover {
    color: var(--white);
    background-color: var(--primary);
}



@media screen and (max-width: 1000px) {
    .aboute-img {
        width: 100%;
        max-width: 100%;
        height: auto;
    }

    .padding-lr3rem {
        margin-right: 0rem !important;
        margin-left: 0rem !important;

    }

    .bookclub-slide {
        padding-right: 0px;
    }
}

/* =============================================
   Page Banner (shared by list/detail/about)
   ============================================= */
.page-banner {
    background: linear-gradient(to right, rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.05)), url('../images/cat_02.png');
    background-size: cover;
    background-position: center;
    height: 200px;
}

/* ===== Breadcrumb ===== */
.breadcrumb {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.25rem;
    font-size: 0.8125rem;
    padding: 10px 0px;
}

.breadcrumb a {
    color: var(--gray-500);
    transition: color 0.15s;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.breadcrumb a:hover {
    color: var(--primary);
}

.breadcrumb .sep {
    color: var(--gray-300);
    font-size: 0.625rem;
    margin: 0 0.125rem;
}

.breadcrumb .current {
    color: var(--primary);
    font-weight: 500;
}

.breadcrumb-bar {
    background: linear-gradient(to bottom, #f8f9fb, var(--light-gray));
    border-bottom: 1px solid var(--gray-200);
}

@media (max-width: 767px) {
    .page-banner {
        height: 140px;
    }
}

/* =============================================
   Sidebar Card (shared by list/detail)
   ============================================= */
.sidebar-card {
    background: var(--white);
    border-radius: 0.75rem;
    padding: 1.5rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    border: 1px solid rgba(0, 0, 0, 0.04);
}

.sidebar-card h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 1.25rem;
    padding-bottom: 0.625rem;
    border-bottom: 2px solid var(--primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    letter-spacing: 0.5px;
}

.sidebar-card h3::before {
    content: '';
    display: inline-block;
    width: 3px;
    height: 16px;
    background: var(--primary);
    border-radius: 2px;
}

/* =============================================
   Tag Cloud
   ============================================= */
.tag {
    display: inline-block;
    background: var(--light-gray);
    color: var(--gray-600);
    padding: 0.3rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    margin: 0.15rem;
    transition: all 0.2s;
    border: 1px solid transparent;
}

.tag:hover {
    background: var(--primary);
    color: var(--white);
    border-color: var(--primary);
    transform: translateY(-1px);
}

/* =============================================
   Search Box (sidebar)
   ============================================= */
.search-box {
    position: relative;
}

.search-box input {
    width: 100%;
    padding: 0.625rem 1rem 0.625rem 2.5rem;
    border: 1px solid var(--gray-300);
    border-radius: 9999px;
    font-size: 0.875rem;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
    background: var(--light-gray);
}

.search-box input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(26, 71, 175, 0.1);
    background: var(--white);
}

.search-box .search-icon {
    position: absolute;
    left: 0.875rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray-500);
    font-size: 0.875rem;
}

/* =============================================
   Category List (sidebar)
   ============================================= */
.category-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.6rem 0.75rem;
    border-radius: 0.5rem;
    transition: all 0.2s;
    cursor: pointer;
}

.category-item:hover {
    background: var(--light-gray);
}

.category-item:hover span:first-child {
    color: var(--primary);
}

.category-item .count {
    background: var(--light-gray);
    color: var(--gray-500);
    font-size: 0.75rem;
    padding: 0.1rem 0.55rem;
    border-radius: 9999px;
    transition: all 0.2s;
}

.category-item:hover .count {
    background: var(--primary);
    color: var(--white);
}

/* =============================================
   Hot Articles (sidebar)
   ============================================= */
.hot-item {
    display: flex;
    gap: 0.75rem;
    padding: 0.625rem 0;
    border-bottom: 1px dashed var(--gray-200);
}

.hot-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.hot-item:first-child {
    padding-top: 0;
}

.hot-item .hot-rank {
    width: 1.25rem;
    height: 1.25rem;
    border-radius: 0.25rem;
    font-size: 0.65rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-top: 2px;
}

.hot-item .hot-rank.rank-1 {
    background: linear-gradient(135deg, #f6d365, #fda085);
    color: #fff;
}

.hot-item .hot-rank.rank-2 {
    background: linear-gradient(135deg, #a8c0ff, #8ec5fc);
    color: #fff;
}

.hot-item .hot-rank.rank-3 {
    background: linear-gradient(135deg, #a18cd1, #fbc2eb);
    color: #fff;
}

.hot-item .hot-rank.rank-4 {
    background: linear-gradient(135deg, #a8edea, #fed6e3);
    color: #fff;
}

.hot-item .hot-rank.rank-5 {
    background: linear-gradient(135deg, #d4fc79, #96e6a1);
    color: #fff;
}

.hot-item .hot-rank.rank-6 {
    background: linear-gradient(135deg, #f093fb, #f5576c);
    color: #fff;
}

.hot-item .hot-rank.rank-7 {
    background: linear-gradient(135deg, #4facfe, #00f2fe);
    color: #fff;
}

.hot-item .hot-rank.rank-8 {
    background: linear-gradient(135deg, #43e97b, #38f9d7);
    color: #fff;
}

.hot-item .hot-rank.rank-9 {
    background: linear-gradient(135deg, #fa709a, #fee140);
    color: #fff;
}

.hot-item .hot-rank.rank-10 {
    background: linear-gradient(135deg, #a18cd1, #fbc2eb);
    color: #fff;
}

/* =============================================
   Article List Item
   ============================================= */
.article-item {
    border-bottom: 1px solid var(--gray-200);
    padding-bottom: 1.5rem;
}

.article-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

/* =============================================
   Pagination
   ============================================= */
.pager {
    margin-top: 2rem;
    justify-content: center;
    align-items: center;
    display: flex;
    width: 100%;
}

.pagination {
    list-style: none;
    display: flex;
    gap: 1rem;
}

.pagination li {
    border: 1px solid var(--gray-300); 
    border-radius: 0.25rem;
    font-size: 0.875rem;
    color: var(--gray-600);
    transition: all 0.15s;
}

.pagination li:hover {
    background-color: var(--primary);
    color: var(--white);
    border-color: var(--primary);
}
.pagination li a,.pagination li span { 
    display: flex;
    width: 100%; 
    height: 100%;
    padding: 0.5rem 1rem;
    align-content: center;
    justify-content: center;
    align-items: center;
}
.pagination li.active {
    background-color: var(--primary);
    color: var(--white);
    border-color: var(--primary);
}
.pagination li.disabled {
    background-color: var(--gray-300);
    color: var(--white);
    border-color: var(--gray-300);
}
/* =============================================
   Detail Body (article content)
   ============================================= */
.detail-body {
    line-height: 1.9;
    font-size: 0.95rem;
    color: #444;
}

.detail-body h2 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-top: 2rem;
    margin-bottom: 0.75rem;
    color: var(--dark-gray);
    padding-left: 0.75rem;
    border-left: 3px solid var(--primary);
}

.detail-body h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--dark-gray);
}

.detail-body p {
    margin-bottom: 1rem;
}

.detail-body ul {
    margin-bottom: 1rem;
    padding-left: 1.5rem;
    list-style: disc;
}

.detail-body li {
    margin-bottom: 0.25rem;
}

.detail-body blockquote {
    border-left: 3px solid var(--secondary);
    background: var(--light-gray);
    padding: 0.75rem 1rem;
    margin: 1rem 0;
    border-radius: 0 0.25rem 0.25rem 0;
    font-style: italic;
    color: #555;
}

/* =============================================
   About Section
   ============================================= */
.about-section h2 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--primary);
    color: var(--dark-gray);
}

.about-section p {
    line-height: 1.9;
    color: #555;
    margin-bottom: 1rem;
}

/* =============================================
   Timeline
   ============================================= */
.timeline-item {
    position: relative;
    padding-left: 2rem;
    padding-bottom: 2rem;
    border-left: 2px solid var(--primary);
}

.timeline-item:last-child {
    border-left: none;
    padding-bottom: 0;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -0.4rem;
    top: 0.25rem;
    width: 0.75rem;
    height: 0.75rem;
    background: var(--primary);
    border-radius: 50%;
}

.timeline-item .year {
    font-weight: 700;
    color: var(--primary);
    font-size: 1rem;
}

/* =============================================
   Value Card (about page)
   ============================================= */
.value-card {
    background: var(--white);
    border-radius: 0.5rem;
    padding: 2rem 1.5rem;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    transition: transform 0.2s;
}

.value-card:hover {
    transform: translateY(-4px);
}

.value-card i {
    font-size: 2rem;
    color: var(--primary);
    margin-bottom: 1rem;
}

.value-card h4 {
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.value-card p {
    font-size: 0.875rem;
    color: #666;
    line-height: 1.6;
}

/* =============================================
   Product Category / Multi-level Classification
   ============================================= */

/* --- Level-1 Category Tabs --- */
.cat-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.cat-tab {
    padding: 0.5rem 1.25rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--gray-600);
    background: var(--white);
    border: 1px solid var(--gray-200);
    transition: all 0.2s;
    cursor: pointer;
}

.cat-tab:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: rgba(26, 71, 175, 0.04);
}

.cat-tab.active {
    background: var(--primary);
    color: var(--white);
    border-color: var(--primary);
}

/* --- Level-2 Subcategory Tabs --- */
.subcat-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.375rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--gray-200);
}

.subcat-tab {
    padding: 0.3rem 0.875rem;
    border-radius: 0.25rem;
    font-size: 0.8125rem;
    color: var(--gray-500);
    transition: all 0.2s;
    cursor: pointer;
}

.subcat-tab:hover {
    color: var(--primary);
    background: rgba(26, 71, 175, 0.06);
}

.subcat-tab.active {
    color: var(--primary);
    font-weight: 600;
    background: rgba(26, 71, 175, 0.08);
}

/* --- Filter / Sort Bar --- */
.filter-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.75rem;
    padding: 0.625rem 1rem;
    background: var(--white);
    border-radius: 0.5rem;
    margin-bottom: 1.25rem;
    font-size: 0.8125rem;
    color: var(--gray-500);
}

.filter-bar .filter-count {
    color: var(--gray-700);
}

.filter-bar .filter-count strong {
    color: var(--primary);
    font-weight: 700;
}

.filter-sort {
    display: flex;
    align-items: center;
    gap: 0.375rem;
}

.filter-sort a {
    padding: 0.2rem 0.5rem;
    border-radius: 0.25rem;
    transition: all 0.15s;
}

.filter-sort a:hover {
    color: var(--primary);
}

.filter-sort a.active {
    color: var(--primary);
    font-weight: 600;
    background: rgba(26, 71, 175, 0.08);
}

/* =============================================
   Multi-Category Filter Card -1
   ============================================= */
.filter-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
    overflow: hidden;
}

.filter-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.6rem 1rem;
    background: #f9fafb;
    border-bottom: 1px solid #e5e7eb;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--dark-gray);
}

.filter-card-body {
    padding: 0.75rem 1rem;
}

.filter-groups {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.filter-group {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    font-size: 0.8125rem;
}

.filter-group-title {
    white-space: nowrap;
    color: var(--gray-600);
    font-weight: 500;
    min-width: 5.5rem;
    padding-top: 0.15rem;
}

.filter-group-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    list-style: none;
}

.filter-group-list li a {
    display: inline-block;
    padding: 0.15rem 0.6rem;
    border-radius: 0.25rem;
    color: var(--gray-600);
    transition: all 0.15s;
    text-decoration: none;
}

.filter-group-list li a:hover {
    color: var(--primary);
    background: rgba(26, 71, 175, 0.06);
}

.filter-group-list li.active a {
    color: var(--primary);
    background: rgba(26, 71, 175, 0.1);
    font-weight: 600;
}

/* =============================================
   Product Card Grid
   ============================================= */
.product-grid {
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    gap: 1.25rem;
}

@media (min-width: 640px) {
    .product-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .product-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.product-card {
    background: var(--white);
    border-radius: 0.75rem;
    overflow: hidden;
    border: 1px solid rgba(0, 0, 0, 0.06);
    transition: transform 0.25s, box-shadow 0.25s;
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.1);
}

.product-card .card-img {
    position: relative;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: var(--light-gray);
}

.product-card .card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s;
}

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

.product-card .card-badge {
    position: absolute;
    top: 0.75rem;
    left: 0.75rem;
    background: var(--primary);
    color: var(--white);
    font-size: 0.6875rem;
    padding: 0.15rem 0.55rem;
    border-radius: 0.25rem;
    font-weight: 500;
}

.product-card .card-body {
    padding: 1rem 1.125rem 1.125rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.product-card .card-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.375rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-card .card-title a {
    transition: color 0.15s;
}

.product-card .card-title a:hover {
    color: var(--primary);
}

.product-card .card-desc {
    font-size: 0.8125rem;
    color: var(--gray-500);
    line-height: 1.55;
    margin-bottom: 0.75rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 1;
}

.product-card .card-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 0.75rem;
    border-top: 1px solid var(--gray-200);
    font-size: 0.75rem;
    color: var(--gray-400);
}

.product-card .card-meta span {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

/* =============================================
   Product Detail Page
   ============================================= */

/* --- Product Hero --- */
.product-hero {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

@media (min-width: 768px) {
    .product-hero {
        flex-direction: row;
    }
}

.product-hero .hero-gallery {
    flex: 0 0 45%;
    border-radius: 0.75rem;
    overflow: hidden;
    background: var(--light-gray);
}

.product-hero .hero-gallery img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
}

.product-hero .hero-thumbs {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.product-hero .hero-thumbs img {
    width: 3.5rem;
    height: 3.5rem;
    border-radius: 0.375rem;
    object-fit: cover;
    cursor: pointer;
    opacity: 0.6;
    border: 2px solid transparent;
    transition: all 0.2s;
}

.product-hero .hero-thumbs img:hover,
.product-hero .hero-thumbs img.active {
    opacity: 1;
    border-color: var(--primary);
}

.product-hero .hero-info {
    flex: 1;
}

.product-hero .hero-info h1 {
    font-size: 1.375rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    line-height: 1.35;
}

.product-hero .hero-info .hero-brief {
    font-size: 0.875rem;
    color: var(--gray-500);
    line-height: 1.7;
    margin-bottom: 1rem;
}

.product-hero .hero-info .hero-price {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--secondary);
    margin-bottom: 1rem;
}

.product-hero .hero-info .hero-price small {
    font-size: 0.8125rem;
    font-weight: 400;
    color: var(--gray-400);
}

.product-hero .hero-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.375rem;
    margin-bottom: 1rem;
}

.product-hero .hero-tags span {
    background: var(--light-gray);
    padding: 0.2rem 0.6rem;
    border-radius: 0.25rem;
    font-size: 0.75rem;
    color: var(--gray-600);
}

.product-hero .hero-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--primary);
    color: var(--white);
    padding: 0.6rem 1.75rem;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    font-weight: 500;
    transition: opacity 0.15s;
}

.product-hero .hero-btn:hover {
    opacity: 0.9;
}

/* --- Product Params Table --- */
.params-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

.params-table tr {
    border-bottom: 1px solid var(--gray-200);
}

.params-table tr:last-child {
    border-bottom: none;
}

.params-table td {
    padding: 0.7rem 0.75rem;
    vertical-align: top;
}

.params-table td:first-child {
    width: 30%;
    font-weight: 600;
    color: var(--dark-gray);
    background: var(--light-gray);
}

.params-table td:last-child {
    color: var(--gray-600);
}

/* --- Feature Icons --- */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    gap: 1rem;
}

@media (min-width: 640px) {
    .feature-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 768px) {
    .feature-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.feature-item {
    display: flex;
    gap: 0.75rem;
    padding: 1rem;
    background: var(--light-gray);
    border-radius: 0.5rem;
    align-items: flex-start;
}

.feature-item i {
    font-size: 1.25rem;
    color: var(--primary);
    margin-top: 0.125rem;
    flex-shrink: 0;
}

.feature-item h4 {
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.feature-item p {
    font-size: 0.8125rem;
    color: var(--gray-500);
    line-height: 1.5;
}

/* =============================================
   Lightbox
   ============================================= */
.lightbox-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(0, 0, 0, 0.92);
    align-items: center;
    justify-content: center;
    user-select: none;
}

.lightbox-overlay.open {
    display: flex;
}

.lightbox-overlay .lightbox-img {
    max-width: 90vw;
    max-height: 88vh;
    object-fit: contain;
    border-radius: 0.25rem;
    transition: opacity 0.25s;
}

.lightbox-overlay .lightbox-close {
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    color: rgba(255, 255, 255, 0.7);
    font-size: 1.75rem;
    cursor: pointer;
    transition: color 0.15s;
    background: none;
    border: none;
    line-height: 1;
}

.lightbox-overlay .lightbox-close:hover {
    color: #fff;
}

.lightbox-overlay .lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(255, 255, 255, 0.6);
    font-size: 2.5rem;
    cursor: pointer;
    padding: 0.5rem 0.75rem;
    transition: color 0.15s, background 0.15s;
    border-radius: 0.375rem;
    background: none;
    border: none;
    line-height: 1;
}

.lightbox-overlay .lightbox-nav:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.12);
}

.lightbox-overlay .lightbox-nav.prev {
    left: 1rem;
}

.lightbox-overlay .lightbox-nav.next {
    right: 1rem;
}

.lightbox-overlay .lightbox-counter {
    position: absolute;
    bottom: 1.5rem;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.8125rem;
    letter-spacing: 1px;
}

/* =============================================
   News List
   ============================================= */

/* --- Breaking / Featured News --- */
.news-featured {
    position: relative;
    border-radius: 0.75rem;
    overflow: hidden;
    margin-bottom: 1.5rem;
    background: var(--dark-gray);
}

.news-featured img {
    width: 100%;
    height: 320px;
    object-fit: cover;
    opacity: 0.55;
    transition: transform 0.4s;
}

.news-featured:hover img {
    transform: scale(1.04);
}

.news-featured .featured-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 2rem 1.5rem 1.5rem;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.85));
}

.news-featured .featured-badge {
    display: inline-block;
    background: var(--secondary);
    color: #fff;
    font-size: 0.6875rem;
    font-weight: 600;
    padding: 0.15rem 0.6rem;
    border-radius: 0.25rem;
    margin-bottom: 0.5rem;
    letter-spacing: 1px;
}

.news-featured .featured-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #fff;
    line-height: 1.4;
    margin-bottom: 0.375rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-featured .featured-meta {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.7);
    display: flex;
    gap: 1rem;
}

/* --- News Tab Bar --- */
.news-tabs {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 1.25rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--gray-200);
}

.news-tab {
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--gray-500);
    position: relative;
    transition: color 0.15s;
    cursor: pointer;
}

.news-tab:hover {
    color: var(--primary);
}

.news-tab.active {
    color: var(--primary);
    font-weight: 600;
}

.news-tab.active::after {
    content: '';
    position: absolute;
    bottom: -0.8rem;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--primary);
    border-radius: 1px;
}

/* --- News List Items --- */
.news-list {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.news-item {
    display: flex;
    gap: 1.25rem;
    background: var(--white);
    border-radius: 0.75rem;
    padding: 1.125rem;
    border: 1px solid rgba(0, 0, 0, 0.05);
    transition: transform 0.2s, box-shadow 0.2s;
}

.news-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.07);
}

.news-item .news-thumb {
    width: 200px;
    min-height: 130px;
    border-radius: 0.5rem;
    object-fit: cover;
    flex-shrink: 0;
}

.news-item .news-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.news-item .news-content .news-source {
    display: inline-block;
    font-size: 0.6875rem;
    color: var(--primary);
    font-weight: 500;
    background: rgba(26, 71, 175, 0.08);
    padding: 0.1rem 0.5rem;
    border-radius: 0.25rem;
    margin-bottom: 0.375rem;
    align-self: flex-start;
}

.news-item .news-content h3 {
    font-size: 1.0625rem;
    font-weight: 600;
    margin-bottom: 0.375rem;
    line-height: 1.4;
}

.news-item .news-content h3 a {
    transition: color 0.15s;
}

.news-item .news-content h3 a:hover {
    color: var(--primary);
}

.news-item .news-content .news-summary {
    font-size: 0.8125rem;
    color: var(--gray-500);
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 1;
    margin-bottom: 0.5rem;
}

.news-item .news-content .news-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.75rem;
    color: var(--gray-400);
}

.news-item .news-content .news-footer span {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

@media (max-width: 640px) {
    .news-item {
        flex-direction: column;
    }

    .news-item .news-thumb {
        width: 100%;
        min-height: 180px;
    }

    .news-featured img {
        height: 220px;
    }
}

/* =============================================
   News Detail
   ============================================= */
.news-article-header {
    margin-bottom: 1.5rem;
}

.news-article-header .article-category {
    display: inline-block;
    background: var(--primary);
    color: #fff;
    font-size: 0.75rem;
    padding: 0.15rem 0.6rem;
    border-radius: 0.25rem;
    margin-bottom: 0.75rem;
}

.news-article-header h1 {
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1.35;
    margin-bottom: 0.75rem;
}

.news-article-header .article-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1.25rem;
    font-size: 0.8125rem;
    color: var(--gray-500);
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--gray-200);
}

.news-article-header .article-meta span {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}

.news-article-header .article-meta .source-tag {
    background: var(--light-gray);
    padding: 0.1rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.75rem;
    color: var(--gray-600);
}

.news-cover-img {
    width: 100%;
    max-height: 420px;
    object-fit: cover;
    border-radius: 0.75rem;
    margin-bottom: 1.5rem;
}

.news-share {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 0;
    border-top: 1px solid var(--gray-200);
    border-bottom: 1px solid var(--gray-200);
    margin: 1.5rem 0;
}

.news-share span {
    font-size: 0.8125rem;
    color: var(--gray-500);
}

.news-share a {
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--light-gray);
    color: var(--gray-500);
    transition: all 0.2s;
    font-size: 0.875rem;
}

.news-share a:hover {
    background: var(--primary);
    color: #fff;
}

.news-related {
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    gap: 1rem;
}

@media (min-width: 640px) {
    .news-related {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 1024px) {
    .news-related {
        grid-template-columns: repeat(4, 1fr);
    }
}

.news-related .related-card {
    background: var(--white);
    border-radius: 0.5rem;
    overflow: hidden;
    border: 1px solid rgba(0, 0, 0, 0.05);
    transition: transform 0.2s;
}

.news-related .related-card:hover {
    transform: translateY(-3px);
}

.news-related .related-card img {
    width: 100%;
    height: 140px;
    object-fit: cover;
}

.news-related .related-card .related-body {
    padding: 0.75rem;
}

.news-related .related-card .related-body h4 {
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-related .related-card .related-body h4 a {
    transition: color 0.15s;
}

.news-related .related-card .related-body h4 a:hover {
    color: var(--primary);
}

.news-related .related-card .related-body .related-date {
    font-size: 0.75rem;
    color: var(--gray-400);
}

/* =============================================
   Mobile Menu
   ============================================= */
.mobile-menu-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 100;
    background: rgba(0, 0, 0, 0.4);
    opacity: 0;
    transition: opacity 0.3s;
}

.mobile-menu-overlay.open {
    display: block;
    opacity: 1;
}

.mobile-menu-panel {
    position: fixed;
    top: 0;
    right: -280px;
    width: 260px;
    height: 100%;
    z-index: 110;
    background: var(--white);
    box-shadow: -4px 0 24px rgba(0, 0, 0, 0.12);
    transition: right 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
    padding-top: 4rem;
}

.mobile-menu-panel.open {
    right: 0;
}

.mobile-menu-panel .mm-close {
    position: absolute;
    top: 0.75rem;
    right: 1rem;
    font-size: 1.5rem;
    color: var(--gray-500);
    cursor: pointer;
    background: none;
    border: none;
    line-height: 1;
}

.mobile-menu-panel .mm-close:hover {
    color: var(--dark-gray);
}

.mobile-menu-panel a {
    display: block;
    padding: 0.875rem 1.5rem;
    font-size: 0.9375rem;
    color: var(--dark-gray);
    border-bottom: 1px solid var(--gray-200);
    transition: all 0.15s;
}

.mobile-menu-panel a:hover {
    background: var(--light-gray);
    color: var(--primary);
}

.mobile-menu-panel a.active {
    color: var(--primary);
    font-weight: 600;
    background: rgba(26, 71, 175, 0.06);
    border-left: 3px solid var(--primary);
}

/* =============================================
   Language Toggle
   ============================================= */
.lang-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    color: var(--gray-600);
    transition: color 0.15s;
    cursor: pointer;
    background: none;
    border: none;
    font: inherit;
    font-size: 0.875rem;
    padding: 0.2rem 0.4rem;
    border-radius: 0.25rem;
}

.lang-toggle:hover {
    color: var(--primary);
}

.lang-toggle .lang-label {
    font-weight: 500;
    min-width: 1.5rem;
}

.lang-toggle::after {
    content: '\f078';
    font: normal normal normal 11px/1 FontAwesome;
    margin-left: 2px;
    opacity: 0.6;
    transition: transform 0.2s;
}

.lang-dropdown-wrap.open .lang-toggle::after {
    transform: rotate(180deg);
}

/* =============================================
   Language Dropdown Wrapper & Menu
   ============================================= */
.lang-dropdown-wrap {
    position: relative;
    display: inline-flex;
}

.lang-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 4px);
    right: 0;
    min-width: 120px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
    z-index: 999;
    overflow: hidden;
}

.lang-dropdown.open {
    display: block;
}

.lang-dropdown-item {
    padding: 0.5rem 1rem;
    cursor: pointer;
    font-size: 0.875rem;
    color: #374151;
    transition: background-color 0.15s, color 0.15s;
    white-space: nowrap;
}

.lang-dropdown-item:hover {
    background-color: #f3f4f6;
    color: var(--primary);
}

.lang-dropdown-item.active {
    color: var(--primary);
    font-weight: 600;
    background-color: #eef2ff;
}