/*
Theme Name: 德志家具
Theme URI: #
Author: 自定义
Description: 高端家具门店官网，适配PHP8.2+，UTF-8编码，PC/手机自适应
Version: 1.0
Text Domain: dz-jiaju
*/

/* 全局重置 + 基础样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "微软雅黑", "PingFang SC", sans-serif;
}
body {
    color: #333;
    background: #f8f8f8;
    line-height: 1.6;
    scroll-behavior: smooth;
}
a {
    text-decoration: none;
    color: inherit;
}
ul {
    list-style: none;
}
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 顶部导航栏 */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    z-index: 999;
    padding: 8px 0;
    transition: all 0.3s ease;
}
.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.logo img,
.logo img.custom-logo {
    height: 40px !important;
    max-width: 160px !important;
    width: auto !important;
    object-fit: contain !important;
}

/* 电脑端菜单 */
.nav-menu {
    display: flex;
    gap: 40px;
    font-size: 16px;
    font-weight: 500;
    align-items: center;
}
.nav-menu li {
    position: relative;
    display: inline-block;
}
.nav-menu li a {
    position: relative;
    padding: 5px 0;
}
.nav-menu li a:hover {
    color: #8B5A2;
}
.nav-menu li a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: #8B5A2;
    transition: width 0.3s ease;
}
.nav-menu li a:hover::after {
    width: 100%;
}

/* 汉堡按钮 */
.hamburger {
    display: none;
    font-size: 24px;
    cursor: pointer;
}

/* ------------------------------ */
/* 手机菜单 - 正确版本 无重复 无冲突 */
/* ------------------------------ */
#mobileMenu {
    display: none !important;
    position: fixed;
    top: 58px;
    left: 0;
    width: 100%;
    background: #fff;
    padding: 20px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    z-index: 99999 !important;
}
#mobileMenu.active {
    display: block !important;
}
#mobileMenu li {
    padding: 12px 0;
    border-bottom: 1px solid #eee;
}
#mobileMenu li a {
    color: #333;
}
#mobileMenu .sub-menu {
    display: none !important;
    padding-left: 20px;
    background: #f6f6f6;
    margin-top: 8px;
}
#mobileMenu .sub-menu.open {
    display: block !important;
}
#mobileMenu li.menu-item-has-children > a::after {
    content: "+";
    float: right;
}
#mobileMenu li.menu-item-has-children.active > a::after {
    content: "-";
}

/* 电脑端二级菜单 */
.nav-menu li .sub-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: #fff;
    box-shadow: 0 3px 12px rgba(0,0,0,0.1);
    z-index: 9999;
    padding: 10px 0;
    min-width: 160px;
    display: none;
    flex-direction: column;
}
.nav-menu li:hover .sub-menu {
    display: flex;
}
.nav-menu li .sub-menu li {
    padding: 0;
    line-height: 40px;
}
.nav-menu li .sub-menu li a {
    display: block;
    padding: 0 20px;
    font-size: 14px;
    color: #333;
}
.nav-menu li .sub-menu li a:hover {
    color: #fff;
    background: #8B5A2;
}

/* 轮播 - 全屏沾满版 */
.hero {
    position: relative;
    margin-top: 0;
    overflow: hidden;
    height: 100vh;
}
.hero-slides {
    position: relative;
    width: 100%;
    height: 100%;
}
.hero-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-position: center center;
    background-size: cover;
    background-repeat: no-repeat;
    background-color: #f5f5f5;
    opacity: 0;
    z-index: 1;
    transition: opacity 0.8s ease;
}
.hero-mask {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to right, rgba(0,0,0,0.5), rgba(0,0,0,0.4));
    z-index: 1;
}
.hero-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #fff;
    text-align: center;
    width: 100%;
    padding: 0 20px;
    z-index: 2;
}
.hero-title {
    font-size: 48px;
    margin-bottom: 20px;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}
.hero-subtitle {
    font-size: 20px;
    margin-bottom: 30px;
    opacity: 0.9;
    text-shadow: 0 1px 2px rgba(0,0,0,0.2);
}
.hero-phone {
    display: inline-block;
    padding: 12px 30px;
    background: #8B5A2;
    border-radius: 4px;
    font-size: 18px;
    font-weight: 600;
    transition: all 0.3s;
    box-shadow: 0 4px 8px rgba(139, 90, 43, 0.2);
}
.hero-phone:hover {
    background: #6d424;
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(139, 90, 43, 0.3);
}

/* 轮播控制 */
.hero-controls {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 100%;
    z-index: 1000;
    display: flex;
    justify-content: space-between;
    padding: 0 20px;
}
.hero-controls button {
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 50%;
    background: rgba(255,255,255,0.5);
    color: #333;
    font-size: 18px;
    cursor: pointer;
    transition: all 0.3s ease;
}
.hero-controls button:hover {
    background: rgba(255,255,255,0.8);
    transform: scale(1.1);
}
.hero-indicators {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 1000;
}
.indicator-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255,255,255,0.4);
    cursor: pointer;
    transition: all 0.3s ease;
}
.indicator-dot.active {
    background: #fff;
}

/* 案例 */
.cases {
    padding: 80px 0;
    background: #f5f5f5;
    overflow: hidden;
}
.section-title {
    text-align: center;
    font-size: 32px;
    margin-bottom: 50px;
    color: #333;
    position: relative;
}
.section-title::after {
    content: '';
    display: block;
    width: 80px;
    height: 3px;
    background: #8B5A2;
    margin: 15px auto 0;
}
.case-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}
.case-card {
    flex: 1 1 calc(33.333% - 20px);
    max-width: calc(33.333% - 20px);
    margin-bottom: 20px;
}
.case-item {
    display: block;
    width: 100%;
    height: 260px;
    background-size: cover;
    background-position: center;
    border-radius: 8px;
    cursor: zoom-in;
    transition: all 0.3s;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}
.case-item:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 8px 20px rgba(0,0,0,0.12);
}
.case-text {
    padding: 12px 0;
}
.case-title {
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 6px;
    color: #333;
}
.case-content {
    font-size: 13px;
    color: #666;
    margin: 0;
    line-height: 1.5;
}
.case-cats {
    display: flex !important;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 25px;
    position: relative;
    z-index: 1;
}
.case-cats a {
    padding: 6px 16px;
    border: 1px solid #8B5A2;
    border-radius: 30px;
    font-size: 14px;
    color: #8B5A2;
}
.case-cats a:hover {
    background: #8B5A2;
    color: #fff;
}

/* 关于 */
.about {
    padding: 80px 0;
    background: #fff;
}
.about-content {
    display: flex;
    flex-direction: column;
    gap: 30px;
    max-width: 800px;
    margin: 0 auto;
}
.about-text {
    font-size: 16px;
    line-height: 1.8;
    color: #555;
}
.about-text p {
    margin-bottom: 15px;
}
.about-contact {
    padding: 25px;
    background: #f8f8f8;
    border-radius: 8px;
    margin-top: 20px;
    border: 1px solid #eee;
}
.about-contact h4 {
    font-size: 18px;
    margin-bottom: 20px;
    color: #8B5A2;
}
.contact-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
}
.contact-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 16px;
}
.contact-item span:first-child {
    font-size: 20px;
}
.qrcode {
    grid-column: 1 / -1;
    display: flex;
    justify-content: center;
    margin-top: 10px;
}
.qrcode img {
    width: 120px;
    height: 120px;
    display: block;
    border: 2px solid #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* 页脚 */
.footer {
    padding: 30px 0;
    background: #333;
    color: #fff;
    text-align: center;
    margin-top: 20px;
}
.footer-text {
    font-size: 14px;
    opacity: 0.8;
    line-height: 1.8;
}

/* 悬浮 */
.wechat-float {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background: #07C160;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 24px;
    box-shadow: 0 4px 12px rgba(7, 193, 96, 0.3);
    z-index: 998;
    transition: all 0.3s ease;
}
.wechat-float:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 16px rgba(7, 193, 96, 0.4);
}

/* 图片弹窗 */
#lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.95);
    z-index: 99999;
    justify-content: center;
    align-items: center;
    cursor: zoom-out;
}
#lightbox.show {
    display: flex !important;
}
#lightbox img {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
}

/* 详情 */
.case-single {
    padding: 60px 0;
}
.case-single-img {
    text-align: center;
    margin-bottom: 30px;
}
.case-single-img img {
    max-width: 100%;
    height: auto;
}
.case-single-content {
    font-size: 16px;
    line-height: 1.8;
    color: #333;
}

/* 响应式 */
@media (max-width: 768px) {
    .nav-menu {
        display: none !important;
    }
    .hamburger {
        display: block;
    }
    .hero {
        margin-top: 50px;
        height: 500px;
    }
    .hero-title {
        font-size: 32px;
    }
    .hero-subtitle {
        font-size: 16px;
    }
    .case-card {
        flex: 1 1 calc(50% - 10px);
        max-width: calc(50% - 10px);
    }
    .contact-list {
        grid-template-columns: 1fr;
    }
    .wechat-float {
        width: 50px;
        height: 50px;
        font-size: 20px;
    }
}

@media (max-width: 375px) {
    .hero-title {
        font-size: 28px;
    }
    .case-card {
        flex: 1 1 100%;
        max-width: 100%;
    }
}

.clearfix::after {
    content: '';
    display: table;
    clear: both;
}

img {
    -webkit-touch-callout: default;
    user-select: auto;
    pointer-events: auto;
}

.img-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999999;
    opacity: 0;
    visibility: hidden;
    transition: 0.3s;
}
.img-popup.show {
    opacity: 1;
    visibility: visible;
}
.img-popup img {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
}