/* style2026.css - 通用样式和移动端优先样式 */

/* ==================== Mobile-First Responsive Styles ==================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background: #fff;
}

a {
    text-decoration: none;
    color: inherit;
}

img {
    max-width: 100%;
    height: auto;
}

/* ==================== Header / Navigation ==================== */
.header {
    background: #fff;
    padding: 15px 0;
    display: flex;
    justify-content: center;
    align-items: center;
    border-bottom: 1px solid #eee;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    max-width: 1920px;
    margin: 0 auto;
    width: 100%;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 0 60px;
}

@media (min-width: 1920px) {
    .header-inner {
        padding: 0 calc((100% - 1920px) / 2);
    }
}

/* Left: Hamburger menu + Logo */
.header-left {
    display: flex;
    align-items: center;
    gap: 15px;
    flex: 0 0 auto;
}

.header .logo {
    flex: 0 0 auto;
    margin-top: 0 !important;
    float: none !important;
}

.header .logo a {
    display: block;
    height: 25px;
    background: url('https://www.sinosword.com/images/logo.png') no-repeat left center;
    background-size: contain;
    text-indent: -9999px;
    padding: 5px 0;
}

/* Right: Search, Cart, Social Icons */
.header-right {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 0 0 auto;
}

.header-right > a {
    color: #333;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    transition: all 0.3s ease;
    position: relative;
}

.header-right > a:hover {
    background: rgba(0,0,0,0.05);
    color: #e74c3c;
}

.header-right > a img {
    width: 28px;
    height: 28px;
}

.header-actions .cart-count {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #e74c3c;
    color: #fff;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
}

/* Social Icons in Header */
.header-social {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: 8px;
    padding-left: 12px;
    border-left: 1px solid #eee;
}

.header-social a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    transition: all 0.3s ease;
    opacity: 0.7;
}

.header-social a:hover {
    opacity: 1;
    background: rgba(0,0,0,0.05);
    transform: translateY(-2px);
}

.header-social img {
    height: 18px;
    width: auto;
}

.header-actions .cart-count {
    background: #e74c3c;
    color: #fff;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    position: relative;
    top: -8px;
    left: -5px;
}

/* ==================== Desktop Navigation ==================== */
.desktop-nav {
    display: none;
    flex: 1;
    justify-content: center;
    align-items: center;
}

.desktop-nav-menu {
    display: flex;
    list-style: none;
    gap: 5px;
    align-items: center;
}

.desktop-nav-menu > li {
    position: relative;
}

.desktop-nav-menu > li > a {
    display: block;
    padding: 8px 12px;
    color: #333;
    text-decoration: none;
    font-size: 16px;
    /* font-weight: 700; */
    white-space: nowrap;
    transition: color 0.3s;
}

.desktop-nav-menu > li > a:hover {
    color: #e74c3c;
}

.desktop-nav-menu .dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    background: #fff;
    min-width: 200px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    display: none;
    z-index: 1001;
    list-style: none;
}

.desktop-nav-menu .dropdown li a {
    display: block;
    padding: 10px 15px;
    color: #333;
    text-decoration: none;
    font-size: 14px;
    border-bottom: 1px solid #f0f0f0;
}

.desktop-nav-menu .dropdown li a:hover {
    background: #f5f5f5;
    color: #e74c3c;
}

.desktop-nav-menu > li:hover .dropdown {
    display: block;
}

.desktop-nav-menu .has-dropdown > a::after {
    content: ' ▼';
    font-size: 10px;
}

.header-social {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-left: 20px;
}

.header-social a {
    display: inline-flex;
    align-items: center;
    opacity: 0.7;
    transition: opacity 0.3s;
}

.header-social a:hover {
    opacity: 1;
}

/* Mobile menu toggle */
.menu-toggle {
    display: block;
}

/* Hide social icons on mobile */
.header-social {
    display: none;
}

/* ==================== Mobile Navigation Drawer ==================== */
.mobile-nav-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 9998;
}

.mobile-nav-overlay.active {
    display: block;
}

.mobile-nav {
    position: fixed;
    top: 0;
    left: -280px;
    width: 280px;
    height: 100%;
    background: #fff;
    z-index: 9999;
    overflow-y: auto;
    transition: left 0.3s ease;
    box-shadow: 2px 0 5px rgba(0,0,0,0.1);
}

.mobile-nav.active {
    left: 0 !important;
    display: block !important;
    padding: 0;
}

.mobile-nav-header {
    padding: 15px;
    background: #1a1a1a;
    color: #fff;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.mobile-nav-header .close-btn {
    background: none;
    border: none;
    color: #fff;
    font-size: 24px;
    cursor: pointer;
}

.mobile-nav-menu {
    list-style: none;
}

.mobile-nav-menu li {
    border-bottom: 1px solid #eee;
}

.mobile-nav-menu li a {
    display: block;
    padding: 15px;
    color: #333;
    text-decoration: none;
    font-size: 14px;
}

.mobile-nav-menu li a:hover {
    background: #f5f5f5;
}

.mobile-nav-menu .submenu {
    display: none;
    background: #f9f9f9;
}

.mobile-nav-menu .submenu.active {
    display: block;
}

.mobile-nav-menu .submenu li a {
    padding-left: 30px;
    font-size: 13px;
}

.mobile-nav-menu .has-submenu > a::after {
    content: '▼';
    float: right;
    font-size: 10px;
}

.mobile-nav-menu .has-submenu.active > a::after {
    content: '▲';
}

/* ==================== Banner Section ==================== */
.banner-section {
    width: 100%;
    overflow: hidden;
    display: flex;
    justify-content: center;
    padding: 0;
}

.banner-section .swiper-container {
    width: 100% !important;
    max-width: 1920px !important;
    height: auto;
    position: relative !important;
    overflow: hidden !important;
    margin: 0 auto;
}

.banner-section .swiper-wrapper {
    display: flex;
}

.banner-section .swiper-slide {
    width: 100% !important;
    flex-shrink: 0;
}

.banner-section .swiper-slide img {
    width: 100%;
    height: auto;
    display: block;
}

.banner-section .swiper-container .swiper-button-prev,
.banner-section .swiper-container .swiper-button-next,
.category-section .swiper-container .swiper-button-prev,
.category-section .swiper-container .swiper-button-next,
.product-section .swiper-container .swiper-button-prev,
.product-section .swiper-container .swiper-button-next,
.reviews-section .swiper-button-prev,
.reviews-section .swiper-button-next {
    color: #333 !important;
    background: rgba(255,255,255,0.9);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    top: 50% !important;
    transform: translateY(-50%);
    margin-top: 0 !important;
}

.banner-section .swiper-container .swiper-button-prev,
.banner-section .swiper-container .swiper-button-next {
    color: #fff !important;
    background: rgba(0,0,0,0.3);
    text-shadow: 0 1px 3px rgba(0,0,0,0.5);
}

.banner-section .swiper-container .swiper-button-prev {
    left: 10px !important;
}

.banner-section .swiper-container .swiper-button-next {
    right: 10px !important;
}

.category-swiper .swiper-button-prev,
.product-swiper .swiper-button-prev {
    left: 10px !important;
    top: 50% !important;
    transform: translateY(-50%);
}

.category-swiper .swiper-button-next,
.product-swiper .swiper-button-next {
    right: 10px !important;
    top: 50% !important;
    transform: translateY(-50%);
}

.banner-section .swiper-button-prev:after,
.banner-section .swiper-button-next:after,
.category-section .swiper-button-prev:after,
.category-section .swiper-button-next:after,
.product-section .swiper-button-prev:after,
.product-section .swiper-button-next:after,
.reviews-swiper .swiper-button-prev:after,
.reviews-swiper .swiper-button-next:after,
.category-section .swiper-button-prev:after,
.category-section .swiper-button-next:after,
.product-section .swiper-button-prev:after,
.product-section .swiper-button-next:after {
    font-size: 16px;
    font-weight: bold;
}

/* ==================== Category Scroll ==================== */
.category-section {
    padding: 20px 15px;
    background: #fff;
}

.category-swiper {
    padding-bottom: 10px;
    position: relative;
    overflow: hidden;
}

.category-swiper .swiper-slide {
    width: calc(33.333% - 12px);
}

@media (max-width: 767px) {
    .category-swiper .swiper-slide {
        width: 100%;
    }
}

/* ==================== Product Sections ==================== */
.product-section {
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.3s;
}

.category-item:hover {
    transform: translateY(-2px);
}

.category-item .image {
    width: 100%;
    height: 0;
    padding-top: 66.6667%;
    overflow: hidden;
    position: relative;
}

.category-item .image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.category-item .image .overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.7));
    color: #fff;
    padding: 20px 10px 10px;
    font-size: 14px;
    font-weight: 600;
}

/* ==================== Product Sections ==================== */
.product-section {
    padding: 20px 15px;
    background: #fff;
}

.product-swiper {
    padding-bottom: 10px;
    position: relative;
    overflow: hidden;
}

.product-swiper .swiper-slide {
    width: calc(25% - 12px);
}

@media (max-width: 767px) {
    .product-swiper .swiper-slide {
        width: calc(50% - 12px);
    }
}

.product-section:nth-child(even) {
    background: #f8f8f8;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.section-title {
    font-size: 18px;
    font-weight: 700;
    color: #1a1a1a;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.section-link {
    color: #666;
    text-decoration: none;
    font-size: 13px;
    padding: 5px 10px;
    border: 1px solid #ddd;
    border-radius: 3px;
    transition: all 0.3s;
}

.section-link:hover {
    background: #1a1a1a;
    color: #fff;
    border-color: #1a1a1a;
}

/* Horizontal Scroll Products */
.product-scroll {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 10px;
}

.product-scroll::-webkit-scrollbar {
    display: none;
}

.product-card {
    width: 100%;
    scroll-snap-align: start;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.3s;
    position: relative;
}

.product-card:hover {
    transform: translateY(-2px);
}

.product-card .image {
    width: 100%;
    aspect-ratio: 3/2;
    overflow: hidden;
    background: #f0f0f0;
    position: relative;
}

.product-card .image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: opacity 0.3s ease;
}

.product-card .image .img-front,
.product-card .image .img-back {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: opacity 0.3s ease;
}

.product-card .image .img-back {
    opacity: 0;
}

.product-card:hover .image .img-front {
    opacity: 0;
}

.product-card:hover .image .img-back {
    opacity: 1;
}

.product-card .info {
    padding: 12px 10px 15px;
    text-align: center;
}

.product-card .title {
    font-size: 16px;
    color: #000;
    font-weight: 700;
    margin-bottom: 5px;
    line-height: 1.4;
    height: auto;
    overflow: hidden;
}

.product-card .sku {
    font-size: 12px;
    color: #757575;
    margin-bottom: 8px;
    font-weight: 600;
}

.product-card .price-wrapper {
    margin-bottom: 10px;
}

.product-card .old-price {
    font-size: 12px;
    color: #757575;
    margin-bottom: 3px;
    font-weight: 600;
}

.product-card .old-price .was {
    text-decoration: line-through;
}

.product-card .old-price .save {
    margin-left: 5px;
}

.product-card .price {
    font-size: 16px;
    font-weight: 600;
    color: #000;
}

.product-card .buy-now {
    display: inline-block;
    padding: 6px 24px;
    border: 1px solid #757575;
    color: #000;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s;
    background: transparent;
    cursor: pointer;
    min-width: 140px;
    font-family: inherit;
    text-align: center;
}

.product-card .buy-now:hover {
    background: #f5f5f5;
    color: #000;
    border-color: #757575;
}

.product-card .badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: #e74c3c;
    color: #fff;
    padding: 5px 12px;
    font-size: 12px;
    border-radius: 4px;
    font-weight: 600;
    z-index: 10;
}

.product-card .badge-promotion {
    position: absolute;
    top: 12px;
    right: 12px;
    background: #e67e22;
    color: #fff;
    padding: 5px 12px;
    font-size: 12px;
    border-radius: 4px;
    font-weight: 600;
    z-index: 10;
}

.product-card .badge-fastshipping {
    position: absolute;
    top: 12px;
    right: 12px;
    background: #27ae60;
    color: #fff;
    padding: 5px 12px;
    font-size: 12px;
    border-radius: 4px;
    font-weight: 600;
    z-index: 10;
}

/* ==================== Featured Images ==================== */
.featured-images {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    padding: 20px 15px;
    background: #fff;
}

.featured-images a {
    display: block;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.3s;
}

.featured-images a:hover {
    transform: translateY(-2px);
}

.featured-images a img {
    width: 100%;
    height: auto;
    display: block;
}

/* ==================== Info Images ==================== */
.info-images {
    padding: 20px 15px;
    background: #f8f8f8;
}

.info-images a {
    display: block;
    margin-bottom: 15px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.info-images a:last-child {
    margin-bottom: 0;
}

.info-images a img {
    width: 100%;
    height: auto;
    display: block;
}

/* ==================== Reviews Section ==================== */
.reviews-section {
    padding: 40px 15px;
    background: #f8f8f8;
    width: 100%;
    overflow: hidden;
    position: relative;
}

.reviews-section .section-header {
    max-width: 1920px;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 30px;
}

.reviews-swiper {
    max-width: 1920px;
    margin: 0 auto;
    padding-bottom: 50px;
    position: relative;
    overflow: hidden;
}

.reviews-swiper .swiper-button-prev {
    left: 10px !important;
    top: 50% !important;
    transform: translateY(-50%);
}

.reviews-swiper .swiper-button-next {
    right: 10px !important;
    top: 50% !important;
    transform: translateY(-50%);
}

.reviews-swiper .swiper-wrapper {
    display: flex;
}

.reviews-swiper .swiper-slide {
    height: auto;
}

.review-card {
    background: #fff;
    border-radius: 8px;
    padding: 25px;
    height: 100%;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    display: flex;
    flex-direction: column;
}

.review-product-image {
    width: 100%;
    height: 0;
    padding-top: 66.6667%;
    overflow: hidden;
    border-radius: 6px;
    margin-bottom: 15px;
    position: relative;
    background: #fff;
}

.review-product-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.review-card .review-product-image {
    margin: 0 auto 15px;
    border-radius: 8px;
}

.review-card .stars {
    color: #f39c12;
    font-size: 16px;
    margin-bottom: 15px;
}

.review-card .review-text {
    font-size: 14px;
    color: #555;
    line-height: 1.7;
    margin-bottom: 15px;
    font-style: italic;
    flex-grow: 1;
    word-wrap: break-word;
    overflow-wrap: break-word;
    width: 100%;
}

.review-card .author {
    font-size: 13px;
    color: #333;
    font-weight: 600;
    border-top: 1px solid #eee;
    padding-top: 12px;
}

/* ==================== Contact Section ==================== */
.contact-section {
    padding: 40px 15px;
    background: #1a1a1a;
    color: #fff;
    width: 100%;
}

.contact-section .section-title {
    color: #fff;
    text-align: center;
    margin-bottom: 30px;
    max-width: 1920px;
    margin-left: auto;
    margin-right: auto;
}

.contact-grid {
    display: grid;
    gap: 30px;
    max-width: 1920px;
    margin: 0 auto;
}

.contact-item {
    text-align: center;
}

.contact-item h3 {
    font-size: 14px;
    margin-bottom: 10px;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.contact-item p,
.contact-item a {
    font-size: 13px;
    color: #ccc;
    line-height: 1.8;
    text-decoration: none;
}

.contact-item a:hover {
    color: #fff;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 10px;
}

.social-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: #333;
    border-radius: 50%;
    color: #fff;
    text-decoration: none;
    font-size: 18px;
    transition: background 0.3s;
}

.social-links a:hover {
    background: #555;
}

/* ==================== Footer ==================== */
.footer {
    background: #1a1a1a;
    color: #999;
    font-size: 12px;
    width: 100%;
}

.footer-top {
    padding: 30px 15px;
    border-bottom: 1px solid #333;
}

.footer-inner {
    max-width: 1920px;
    margin: 0 auto;
}

.footer-nav-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin-bottom: 25px;
}

.footer-nav-links a {
    color: #ccc;
    text-decoration: none;
    font-size: 13px;
}

.footer-nav-links a:hover {
    color: #fff;
}

.footer-nav-links span {
    color: #555;
}

.footer-category-nav {
    display: flex;
    gap: 40px;
    justify-content: center;
    margin-top: 20px;
}

.footer-cat-col h3 {
    color: #fff;
    font-size: 14px;
    margin-bottom: 12px;
    font-weight: 700;
}

.footer-cat-col h4 {
    color: #ccc;
    font-size: 13px;
    margin-top: 15px;
    margin-bottom: 8px;
    font-weight: 600;
}

.footer-cat-col ul {
    list-style: none;
}

.footer-cat-col ul li {
    margin-bottom: 6px;
}

.footer-cat-col ul li a {
    color: #999;
    text-decoration: none;
    font-size: 12px;
}

.footer-cat-col ul li a:hover {
    color: #fff;
}

.footer-bottom {
    background: #0a0a0a;
    padding: 15px;
    text-align: center;
}

.footer-bottom .footer-inner {
    display: flex;
    justify-content: center;
    gap: 20px;
    color: #666;
    font-size: 11px;
}

.footer-bottom a {
    color: #999;
    text-decoration: none;
}

.footer-bottom a:hover {
    color: #fff;
}

/* ==================== 顶部公告栏 (仅 index2026) ==================== */
/* 公告栏展开时，头部和内容区需要偏移 */
/* class: .top-notice / .top-notice-active */
.top-notice-active .header {
    top: 52px;
}
.top-notice-active .content {
    padding-top: 64px;
}

.top-notice {
    position: fixed;
    left: 0;
    top: 0;
    width: 100%;
    background: #ff6634;
    padding: 6px 50px 6px 20px;
    color: #fff;
    z-index: 9999;
    font-size: 14px;
    box-sizing: border-box;
    display: none; /* 默认隐藏，由 jQuery 控制显示 */
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

    .top-notice a {
        text-decoration: underline;
        color: #FFFFFF;
    }

    /* 强制覆盖 style.css 中 .top-notice .title a 的 #856404，保证公告栏文字白色 */
    .top-notice,
    .top-notice .title,
    .top-notice .title a,
    .top-notice .con,
    .top-notice .con .desc {
        color: #fff;
    }

    .top-notice .closed {
        position: absolute;
        right: 15px;
        top: 10px;
        cursor: pointer;
    }

    .top-notice .title {
        font-size: 16px;
        font-weight: bold;
        white-space: nowrap;
        text-align: center;
    }

    .top-notice .con {
        display: flex;
        align-items: baseline;
        justify-content: center;
        gap: 20px;
        width: 100%;
    }

    .top-notice .con .desc {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        text-align: center;
    }

    .top-notice .con .details-link {
        color: #fff;
        white-space: nowrap;
        flex-shrink: 0;
    }

/* 移动端：允许换行但限高最多两行 */
@media (max-width: 767px) {
    .top-notice-active .header {
        top: 60px;
    }

    .top-notice-active .content {
        padding-top: 72px;
    }

    .top-notice {
        padding: 6px 40px 6px 12px;
        gap: 2px;
    }

    .top-notice .closed {
        right: 10px;
        top: 4px;
    }

    .top-notice .title {
        font-size: 14px;
        font-weight: bold;
        white-space: nowrap;
    }

    .top-notice .con {
        display: flex;
        align-items: baseline;
        gap: 6px;
        text-align: left;
    }

    .top-notice .con .desc {
        font-size: 12px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        text-align: left;
        flex: 1;
    }

    .top-notice .con .details-link {
        font-size: 12px;
        white-space: nowrap;
        flex-shrink: 0;
    }
}
