/*
Theme Name: Nevsin
Theme URI: https://nevsin.com
Author: Nevsin Team
Author URI: https://nevsin.com
Description: Nevsin 标准主题，基于 Bootstrap 5 构建，集成现代化响应式设计，支持自定义 Logo、导航菜单、特色图片等 WordPress 标准功能。
Version: 2.0.0
Requires at least: 6.0
Tested up to: 6.8
Requires PHP: 7.4
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: nevsin
Tags: blog, bootstrap, custom-logo, custom-menu, featured-images, threaded-comments, translation-ready, responsive-layout, two-columns
*/

/* ========================================
   Nevsin 主题 - 自定义样式
   基于 Bootstrap 5.3
   ======================================== */

/* ----- CSS 变量 ----- */
:root {
    --nevsin-primary: #0d6efd;
    --nevsin-primary-dark: #0b5ed7;
    --nevsin-accent: #ffc107;
    --nevsin-bg: #f8f9fa;
    --nevsin-text: #212529;
    --nevsin-muted: #6c757d;
    --nevsin-border: #dee2e6;
    --nevsin-radius: 0.5rem;
    --nevsin-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    --nevsin-shadow-lg: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

/* ----- 全局 ----- */
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
    color: var(--nevsin-text);
    background: #ffffff;
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
}

a {
    text-decoration: none;
    transition: color 0.2s ease;
}

img {
    max-width: 100%;
    height: auto;
}

/* ----- 头部导航 ----- */
.nevsin-header {
    z-index: 1030;
    transition: box-shadow 0.3s ease;
}

.nevsin-header .navbar {
    transition: box-shadow 0.3s ease;
}

.nevsin-header.scrolled .navbar {
    box-shadow: var(--nevsin-shadow-lg) !important;
}

.nevsin-header .navbar-brand {
    font-weight: 700;
    letter-spacing: -0.5px;
}

.nevsin-header .nav-link {
    font-weight: 500;
    padding: 0.5rem 1rem !important;
    color: var(--nevsin-text) !important;
    transition: color 0.2s ease;
}

.nevsin-header .nav-link:hover,
.nevsin-header .nav-link.active {
    color: var(--nevsin-primary) !important;
}

.nevsin-header .dropdown-menu {
    border: none;
    box-shadow: var(--nevsin-shadow-lg);
    border-radius: var(--nevsin-radius);
}

.nevsin-header .dropdown-item {
    padding: 0.5rem 1.25rem;
    font-size: 0.9rem;
}

/* ----- 轮播图 ----- */
.nevsin-carousel {
    margin-top: -1px;
}

.nevsin-carousel .carousel-item {
    height: 480px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
}

.nevsin-carousel .carousel-item::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.55) 0%, rgba(0, 0, 0, 0.2) 100%);
}

.nevsin-carousel .carousel-caption {
    bottom: 50%;
    transform: translateY(50%);
    text-align: left;
    left: 10%;
    right: 10%;
}

.nevsin-carousel .carousel-caption h2 {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.nevsin-carousel .carousel-caption p {
    font-size: 1.1rem;
    max-width: 600px;
    opacity: 0.9;
}

.nevsin-carousel .carousel-caption .btn {
    padding: 0.6rem 2rem;
    font-weight: 600;
    font-size: 1rem;
    border-radius: 50px;
}

/* ----- 内容区域 ----- */
.nevsin-main {
    min-height: 60vh;
}

.nevsin-content-area {
    padding: 3rem 0;
}

/* ----- 区块标题 ----- */
.nevsin-section-title {
    text-align: center;
    margin-bottom: 2.5rem;
}

.nevsin-section-title h2 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--nevsin-text);
    margin-bottom: 0.5rem;
    position: relative;
    display: inline-block;
}

.nevsin-section-title h2::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: var(--nevsin-primary);
    border-radius: 2px;
}

.nevsin-section-title p {
    color: var(--nevsin-muted);
    font-size: 1rem;
    max-width: 600px;
    margin: 1rem auto 0;
}

/* ----- 首页商品分组卡片 ----- */
.nevsin-product-card {
    border: 1px solid var(--nevsin-border);
    border-radius: var(--nevsin-radius);
    overflow: hidden;
    transition: all 0.3s ease;
    background: #fff;
    height: 100%;
}

.nevsin-product-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--nevsin-shadow-lg);
    border-color: var(--nevsin-primary);
}

.nevsin-product-card .product-thumbnail {
    overflow: hidden;
    height: 200px;
    background: var(--nevsin-bg);
    display: flex;
    align-items: center;
    justify-content: center;
}

.nevsin-product-card .product-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.nevsin-product-card:hover .product-thumbnail img {
    transform: scale(1.05);
}

.nevsin-product-card .product-thumbnail .placeholder-icon {
    font-size: 3rem;
    color: var(--nevsin-muted);
}

.nevsin-product-card .product-body {
    padding: 1.25rem;
}

.nevsin-product-card .product-body h5 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.nevsin-product-card .product-body h5 a {
    color: var(--nevsin-text);
}

.nevsin-product-card .product-body h5 a:hover {
    color: var(--nevsin-primary);
}

.nevsin-product-card .product-body .product-count {
    font-size: 0.8rem;
    color: var(--nevsin-muted);
}

/* ----- 文章列表 ----- */
.nevsin-post-card {
    margin-bottom: 2rem;
    border: 1px solid var(--nevsin-border);
    border-radius: var(--nevsin-radius);
    overflow: hidden;
    transition: box-shadow 0.3s ease;
    background: #fff;
}

.nevsin-post-card:hover {
    box-shadow: var(--nevsin-shadow-lg);
}

.nevsin-post-card .post-thumbnail img {
    width: 100%;
    height: 220px;
    object-fit: cover;
}

.nevsin-post-card .post-content {
    padding: 1.5rem;
}

.nevsin-post-card .post-meta {
    font-size: 0.85rem;
    color: var(--nevsin-muted);
    margin-bottom: 0.75rem;
}

.nevsin-post-card .post-meta span {
    margin-right: 1rem;
}

.nevsin-post-card .post-title {
    font-size: 1.35rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
}

.nevsin-post-card .post-title a {
    color: var(--nevsin-text);
}

.nevsin-post-card .post-title a:hover {
    color: var(--nevsin-primary);
}

.nevsin-post-card .post-excerpt {
    color: var(--nevsin-muted);
    font-size: 0.95rem;
    line-height: 1.7;
}

/* ----- 单篇文章 ----- */
.nevsin-single-header {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--nevsin-border);
}

.nevsin-single-header .post-title {
    font-size: 2.2rem;
    font-weight: 800;
    margin-bottom: 1rem;
    line-height: 1.3;
}

.nevsin-single-header .post-meta {
    font-size: 0.9rem;
    color: var(--nevsin-muted);
}

.nevsin-single-header .post-meta span {
    margin-right: 1.25rem;
}

.nevsin-single-content {
    font-size: 1.05rem;
    line-height: 1.8;
}

.nevsin-single-content h2,
.nevsin-single-content h3,
.nevsin-single-content h4 {
    margin-top: 2rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.nevsin-single-content p {
    margin-bottom: 1.25rem;
}

.nevsin-single-content img {
    border-radius: var(--nevsin-radius);
    margin: 1.5rem 0;
}

.nevsin-single-content blockquote {
    border-left: 4px solid var(--nevsin-primary);
    padding: 1rem 1.5rem;
    background: var(--nevsin-bg);
    margin: 1.5rem 0;
    border-radius: 0 var(--nevsin-radius) var(--nevsin-radius) 0;
}

/* ----- 分页 ----- */
.nevsin-pagination {
    margin-top: 2rem;
}

.nevsin-pagination .page-numbers {
    padding: 0.5rem 0.9rem;
    border: 1px solid var(--nevsin-border);
    border-radius: var(--nevsin-radius);
    color: var(--nevsin-text);
    margin: 0 2px;
    display: inline-block;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.nevsin-pagination .page-numbers.current {
    background: var(--nevsin-primary);
    color: #fff;
    border-color: var(--nevsin-primary);
}

.nevsin-pagination .page-numbers:hover:not(.current) {
    background: var(--nevsin-bg);
    border-color: var(--nevsin-primary);
    color: var(--nevsin-primary);
}

/* ----- 侧边栏 ----- */
.nevsin-sidebar .widget {
    margin-bottom: 2rem;
}

.nevsin-sidebar .widget-title {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--nevsin-primary);
}

.nevsin-sidebar ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.nevsin-sidebar ul li {
    padding: 0.4rem 0;
    border-bottom: 1px solid var(--nevsin-border);
}

.nevsin-sidebar ul li:last-child {
    border-bottom: none;
}

.nevsin-sidebar ul li a {
    color: var(--nevsin-text);
    font-size: 0.9rem;
}

.nevsin-sidebar ul li a:hover {
    color: var(--nevsin-primary);
}

/* ----- 面包屑 ----- */
.breadcrumb {
    background: transparent;
    padding: 0.75rem 0;
    margin-bottom: 0;
    font-size: 0.9rem;
}

/* ----- 页脚 ----- */
.nevsin-footer a:hover {
    color: #ffffff !important;
}

.nevsin-footer .footer-widget-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: #ffffff;
}

.nevsin-footer .nav-link {
    padding: 0.25rem 0.75rem;
    color: var(--nevsin-muted);
    font-size: 0.85rem;
}

.nevsin-footer .nav-link:hover {
    color: #ffffff !important;
}

/* ----- 返回顶部按钮 ----- */
.nevsin-back-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--nevsin-primary);
    color: #fff;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1040;
    box-shadow: var(--nevsin-shadow-lg);
    display: flex;
    align-items: center;
    justify-content: center;
}

.nevsin-back-top.show {
    opacity: 1;
    visibility: visible;
}

.nevsin-back-top:hover {
    background: var(--nevsin-primary-dark);
    transform: translateY(-3px);
}

/* ----- 分类页面标题 ----- */
.nevsin-page-header {
    background: linear-gradient(135deg, var(--nevsin-primary) 0%, #6610f2 100%);
    color: #fff;
    padding: 3rem 0;
    margin-bottom: 2.5rem;
}

.nevsin-page-header h1 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.nevsin-page-header .archive-description {
    opacity: 0.85;
    max-width: 700px;
}

/* ----- 响应式调整 ----- */
@media (max-width: 991.98px) {
    .nevsin-carousel .carousel-item {
        height: 380px;
    }

    .nevsin-carousel .carousel-caption h2 {
        font-size: 1.8rem;
    }

    .nevsin-carousel .carousel-caption {
        left: 5%;
        right: 5%;
        text-align: center;
    }

    .nevsin-carousel .carousel-caption p {
        max-width: 100%;
        margin: 0 auto;
    }
}

@media (max-width: 767.98px) {
    .nevsin-carousel .carousel-item {
        height: 300px;
    }

    .nevsin-carousel .carousel-caption h2 {
        font-size: 1.4rem;
    }

    .nevsin-carousel .carousel-caption p {
        font-size: 0.9rem;
    }

    .nevsin-single-header .post-title {
        font-size: 1.6rem;
    }

    .nevsin-page-header {
        padding: 2rem 0;
    }

    .nevsin-page-header h1 {
        font-size: 1.5rem;
    }
}

/* ----- 页脚小工具区域（可选） ----- */
.nevsin-footer-widgets {
    background: var(--nevsin-bg);
    padding: 3rem 0;
    border-top: 1px solid var(--nevsin-border);
}
