:root {
    --bg-primary: #f8fafc;
    --bg-secondary: #ffffff;
    --bg-card: #ffffff;
    --text-primary: #0f172a;
    --text-secondary: #64748b;
    --accent: #2563eb;
    --accent-hover: #1d4ed8;
    --border-color: #e2e8f0;
    --header-bg: #0b132b;
    --header-nav: #1c2541;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    line-height: 1.6;
    margin: 0;
    padding: 0;
    background: var(--bg-primary);
    color: var(--text-primary);
}

header {
    background: var(--header-bg);
    padding: 1.25rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.brand {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.025em;
}

.brand a {
    color: #ffffff;
    text-decoration: none;
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.top-nav {
    background: var(--header-nav);
    padding: 10px 0;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.top-nav .container {
    display: flex;
    gap: 15px;
    overflow-x: auto;
    white-space: nowrap;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.top-nav .container::-webkit-scrollbar {
    display: none;
}

.top-nav a {
    color: #94a3b8;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    padding: 6px 16px;
    border-radius: 9999px;
    transition: var(--transition);
}

.top-nav a:hover, .top-nav a.active {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.1);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

.content-area {
    padding: 3rem 0;
    min-height: 80vh;
}

a {
    color: var(--accent);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--accent-hover);
}

.hero-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 32px;
    margin-bottom: 48px;
}

@media (max-width: 992px) {
    .hero-grid {
        grid-template-columns: 1fr;
    }
}

.hero-featured {
    background: var(--bg-secondary);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.05);
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
}

.hero-featured-img-wrap {
    width: 100%;
    height: 380px;
    overflow: hidden;
    position: relative;
    background: linear-gradient(135deg, #1e293b, #0f172a);
}

.hero-featured-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.hero-featured:hover .hero-featured-img {
    transform: scale(1.03);
}

.hero-featured-content {
    padding: 32px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.category-tag {
    display: inline-block;
    align-self: flex-start;
    padding: 4px 12px;
    background: rgba(37, 99, 235, 0.1);
    color: var(--accent);
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 16px;
}

.hero-featured-title {
    font-size: 1.85rem;
    line-height: 1.25;
    font-weight: 800;
    margin: 0 0 16px 0;
    letter-spacing: -0.025em;
}

.hero-featured-title a {
    color: var(--text-primary);
}

.hero-featured-title a:hover {
    color: var(--accent);
}

.hero-featured-text {
    color: var(--text-secondary);
    font-size: 1rem;
    line-height: 1.6;
    margin: 0 0 24px 0;
}

.meta-info {
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-top: auto;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

.popular-sidebar {
    background: var(--bg-secondary);
    border-radius: 16px;
    padding: 32px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.05);
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
}

.section-title {
    font-size: 1.5rem;
    font-weight: 800;
    margin: 0 0 24px 0;
    letter-spacing: -0.025em;
    position: relative;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-color);
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 60px;
    height: 3px;
    background: var(--accent);
    border-radius: 9999px;
}

.popular-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.popular-item {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    position: relative;
}

.popular-num {
    font-size: 1.5rem;
    font-weight: 800;
    color: #cbd5e1;
    line-height: 1;
    width: 24px;
    text-align: right;
}

.popular-item-content {
    flex-grow: 1;
}

.popular-item-title {
    font-size: 0.95rem;
    font-weight: 700;
    margin: 0 0 6px 0;
    line-height: 1.4;
}

.popular-item-title a {
    color: var(--text-primary);
}

.popular-item-title a:hover {
    color: var(--accent);
}

.popular-item-meta {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.category-section {
    margin-bottom: 64px;
}

.category-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.category-title-wrap {
    display: flex;
    align-items: center;
    gap: 16px;
}

.category-title-wrap h2 {
    font-size: 1.5rem;
    font-weight: 800;
    margin: 0;
    letter-spacing: -0.025em;
}

.category-title-wrap .view-all-link {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--accent);
}

.slider-controls {
    display: flex;
    gap: 8px;
}

.slider-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid var(--border-color);
    background: var(--bg-secondary);
    color: var(--text-primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
}

.slider-btn:hover {
    background: var(--accent);
    color: #ffffff;
    border-color: var(--accent);
}

.slider-container {
    display: flex;
    gap: 24px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    padding: 8px 4px 20px 4px;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.slider-container::-webkit-scrollbar {
    display: none;
}

.news-card {
    flex: 0 0 280px;
    scroll-snap-align: start;
    background: var(--bg-secondary);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    transition: var(--transition);
}

.news-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.news-card-img-wrap {
    height: 160px;
    overflow: hidden;
    position: relative;
    background: linear-gradient(135deg, #1e293b, #0f172a);
}

.news-card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

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

.news-card-img-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #2563eb, #8b5cf6);
    color: #ffffff;
    font-size: 1.5rem;
    font-weight: 700;
    text-transform: uppercase;
}

.news-card-content {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.news-card-title {
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.4;
    margin: 0 0 10px 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    height: 2.8rem;
}

.news-card-title a {
    color: var(--text-primary);
}

.news-card-title a:hover {
    color: var(--accent);
}

.news-card-text {
    color: var(--text-secondary);
    font-size: 0.875rem;
    line-height: 1.5;
    margin: 0 0 16px 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    height: 3.9rem;
}

.news-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
    font-size: 0.775rem;
    color: var(--text-secondary);
    border-top: 1px solid var(--border-color);
    padding-top: 12px;
}

.news-card-read-more {
    font-weight: 600;
    color: var(--accent);
}

.category-banner {
    background: linear-gradient(135deg, #0f172a, #1e293b);
    padding: 48px 32px;
    border-radius: 16px;
    color: #ffffff;
    margin-bottom: 40px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.category-banner h1 {
    font-size: 2.25rem;
    font-weight: 800;
    margin: 0 0 16px 0;
    letter-spacing: -0.025em;
}

.category-banner-desc {
    color: #94a3b8;
    font-size: 1.1rem;
    line-height: 1.6;
    max-width: 800px;
    margin: 0;
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 32px;
}

.article-view-card {
    background: var(--bg-secondary);
    border-radius: 16px;
    padding: 40px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.05);
    border: 1px solid var(--border-color);
    max-width: 840px;
    margin: 0 auto;
}

@media (max-width: 768px) {
    .article-view-card {
        padding: 24px;
    }
}

.article-cover-wrap {
    width: 100%;
    height: 420px;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 32px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.05);
    background: linear-gradient(135deg, #1e293b, #0f172a);
}

@media (max-width: 768px) {
    .article-cover-wrap {
        height: 260px;
    }
}

.article-cover-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.article-h1 {
    font-size: 2.25rem;
    line-height: 1.25;
    font-weight: 800;
    margin: 0 0 24px 0;
    letter-spacing: -0.025em;
    color: var(--text-primary);
}

@media (max-width: 768px) {
    .article-h1 {
        font-size: 1.75rem;
    }
}

.article-meta-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 32px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--border-color);
}

.article-meta-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    border-radius: 9999px;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.article-meta-badge strong {
    color: var(--text-primary);
}

.article-body-content {
    font-size: 1.125rem;
    line-height: 1.8;
    color: #334155;
}

.article-body-content .intro {
    font-size: 1.25rem;
    font-weight: 600;
    line-height: 1.6;
    color: var(--text-primary);
    margin-bottom: 32px;
    border-left: 4px solid var(--accent);
    padding-left: 20px;
}

.article-body-content p {
    margin: 0 0 24px 0;
}

.article-body-content img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    margin: 32px 0;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.back-link-wrap {
    margin-top: 40px;
    text-align: center;
}

.back-btn {
    display: inline-block;
    padding: 10px 24px;
    border-radius: 9999px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 0.9rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
}

.back-btn:hover {
    color: var(--accent);
    border-color: var(--accent);
}

.shop-container {
    display: flex;
    flex-wrap: wrap;
    gap: 48px;
    align-items: flex-start;
}

.shop-gallery-wrap {
    flex: 1;
    min-width: 320px;
}

.shop-sidebar-widget {
    width: 320px;
    background: var(--bg-secondary);
    padding: 32px;
    border-radius: 16px;
    border: 1px solid var(--border-color);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.05);
    height: fit-content;
}

@media (max-width: 992px) {
    .shop-sidebar-widget {
        width: 100%;
    }
}

.shop-price-box {
    margin-bottom: 24px;
}

.shop-price-old {
    color: #94a3b8;
    text-decoration: line-through;
    font-size: 1.1rem;
    margin-bottom: 4px;
}

.shop-discount-tag {
    display: inline-block;
    background: #ef4444;
    color: #ffffff;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 700;
    margin-bottom: 12px;
}

.shop-price-current {
    font-size: 2.25rem;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1;
}

.shop-buy-btn {
    display: block;
    width: 100%;
    box-sizing: border-box;
    text-align: center;
    background: linear-gradient(135deg, #2563eb, #3b82f6);
    color: #ffffff;
    padding: 16px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 1.1rem;
    box-shadow: 0 4px 6px -1px rgba(37, 99, 235, 0.2);
    transition: var(--transition);
}

.shop-buy-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(37, 99, 235, 0.3);
    color: #ffffff;
}

.shop-specs-table {
    border-top: 1px solid var(--border-color);
    padding-top: 20px;
    margin-top: 24px;
    font-size: 0.875rem;
}

.shop-spec-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
}

.shop-spec-label {
    color: var(--text-secondary);
}

.shop-spec-value {
    font-weight: 700;
    color: var(--text-primary);
}

footer {
    background: var(--header-bg);
    color: #94a3b8;
    padding: 40px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    text-align: center;
    font-size: 0.9rem;
}
/* --- MODERN SEARCH BAR --- */
.header-search-wrap {
    margin-left: auto;
    max-width: 320px;
    width: 100%;
}

@media (max-width: 640px) {
    .header-container {
        flex-direction: column;
        gap: 16px;
        align-items: stretch !important;
    }
    .header-search-wrap {
        max-width: 100%;
        margin-left: 0;
    }
}

.header-search-form {
    position: relative;
    display: flex;
    align-items: center;
}

.header-search-input {
    width: 100%;
    padding: 10px 48px 10px 20px;
    border-radius: 9999px;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    font-size: 0.9rem;
    font-family: inherit;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.03);
}

.header-search-input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15), inset 0 2px 4px rgba(0, 0, 0, 0.03);
    background: var(--bg-secondary);
}

.header-search-btn {
    position: absolute;
    right: 6px;
    background: var(--accent);
    color: #ffffff;
    border: none;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.header-search-btn:hover {
    background: #1d4ed8;
    transform: scale(1.05);
}


/* --- RELATED PRODUCTS IN NEWS --- */
.related-products-section {
    margin-top: 48px;
    padding-top: 32px;
    border-top: 1px solid var(--border-color);
}

.related-products-title {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 24px;
    letter-spacing: -0.02em;
}

.products-tabs-nav {
    display: flex;
    gap: 8px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 12px;
    margin-bottom: 24px;
    overflow-x: auto;
}

.tab-nav-btn {
    padding: 8px 16px;
    border-radius: 8px;
    background: transparent;
    border: 1px solid transparent;
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.tab-nav-btn:hover {
    color: var(--text-primary);
    background: var(--bg-secondary);
}

.tab-nav-btn.active {
    background: var(--accent);
    color: #ffffff;
    border-color: var(--accent);
}

.products-tab-content {
    display: none;
    animation: fadeIn 0.4s ease;
}

.products-tab-content.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(4px); }
    to { opacity: 1; transform: translateY(0); }
}

.products-mini-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 24px;
}

.product-mini-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.product-mini-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.05), 0 4px 6px -2px rgba(0, 0, 0, 0.03);
    border-color: rgba(37, 99, 235, 0.3);
}

.product-mini-img-wrap {
    height: 140px;
    background: linear-gradient(135deg, #f8fafc, #f1f5f9);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

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

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

.product-mini-img-placeholder {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, #2563eb, #3b82f6);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1.25rem;
}

.product-mini-info {
    padding: 16px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.product-mini-name {
    font-size: 0.95rem;
    font-weight: 700;
    line-height: 1.4;
    margin: 0 0 12px 0;
    height: 2.7rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-mini-name a {
    color: var(--text-primary);
}

.product-mini-name a:hover {
    color: var(--accent);
}

.product-mini-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
    font-size: 0.8rem;
}

.product-mini-hits {
    color: var(--text-secondary);
}

.product-mini-btn {
    background: linear-gradient(135deg, #2563eb, #3b82f6);
    color: #ffffff !important;
    padding: 6px 14px;
    border-radius: 6px;
    font-weight: 600;
    transition: all 0.2s ease;
}

.product-mini-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 6px -1px rgba(37, 99, 235, 0.2);
}


/* --- SEARCH RESULTS PAGE --- */
.search-page-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 24px 0;
}

.search-highlight {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.15);
    padding: 2px 8px;
    border-radius: 4px;
}

.search-meta-summary {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-bottom: 32px;
}

.search-meta-summary strong {
    color: var(--text-primary);
}

.search-type-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 10;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.badge-product {
    background: #2563eb;
    color: #ffffff;
}

.badge-news {
    background: #10b981;
    color: #ffffff;
}

.search-no-results {
    text-align: center;
    padding: 64px 32px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    margin: 40px auto;
    max-width: 600px;
}

.search-no-results-icon {
    font-size: 3rem;
    margin-bottom: 16px;
}

.search-no-results h2 {
    font-size: 1.5rem;
    font-weight: 800;
    margin: 0 0 8px 0;
}

.search-no-results p {
    color: var(--text-secondary);
    margin: 0;
}


/* Sidebar Recommendations */
.sidebar-recommendations-widget {
    margin-top: 32px;
    border-top: 1px solid var(--border-color);
    padding-top: 24px;
}

.sidebar-recommendations-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin: 0 0 16px 0;
    color: var(--text-primary);
}

.sidebar-recommendations-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.sidebar-prod-card {
    display: flex;
    gap: 12px;
    align-items: center;
    text-decoration: none;
    transition: transform 0.2s ease;
}

.sidebar-prod-card:hover {
    transform: translateX(4px);
}

.sidebar-prod-img-wrap {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    overflow: hidden;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sidebar-prod-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.sidebar-prod-img-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--accent), #3b82f6);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.2rem;
}

.sidebar-prod-info {
    flex-grow: 1;
    min-width: 0;
}

.sidebar-prod-name {
    font-size: 0.85rem;
    font-weight: 600;
    line-height: 1.3;
    margin: 0 0 4px 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    color: var(--text-primary);
}

.sidebar-prod-card:hover .sidebar-prod-name {
    color: var(--accent);
}

.sidebar-prod-price-box {
    display: flex;
    align-items: center;
    gap: 8px;
}

.sidebar-prod-price-old {
    font-size: 0.75rem;
    color: #94a3b8;
    text-decoration: line-through;
}

.sidebar-prod-price-current {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--accent);
}
