:root {
    --primary-color: #ffffff;
    --secondary-color: #6c757d;
    --accent-color: #495057;
}

body {
    font-family: 'League Spartan', sans-serif;
    color: var(--secondary-color);
    background-color: #ffffff;
}

/* 导航栏样式 */
.navbar {
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    background-color: rgba(241, 239, 231, 0.9) !important; /* 使用 !important 确保样式不被覆盖 */
    position: fixed;
    width: 100%;
    top: 0;
    left: 0;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 99999; /* 使用具体的高数值，确保高于所有其他元素 */
    
    /* 新增样式 */
    border-radius: 0; /* 修改为直角 */
    padding: 0.5rem 0;  /* 稍微增加一点padding */
    height: 60px; /* 固定导航栏高度 */
}

.navbar-brand {
    display: inline-flex; /* 使其宽度自适应内容 */
    align-items: center;
    font-family: 'League Spartan', sans-serif;
    padding: 0;
    margin: 0;
    height: 50px;  /* 恢复固定高度，但略高一些 */
    position: relative; /* 保持相对定位 */
}

.navbar-logo {
    height: auto;
    width: 270px; /* 固定宽度 */
    padding: 0;
    margin: 0;
    object-fit: contain; /* 确保图片保持比例完整显示 */
    object-position: center; /* 居中显示 */
    display: block; /* 确保显示为块级元素 */
    transform: scale(0.9); /* 稍微缩小logo以适应高度 */
    transform-origin: left center; /* 从左侧中心缩放 */
    pointer-events: none; /* 防止在logo区域外被点击 */
}

/* 为了确保链接仍然可点击，添加以下样式 */
.navbar-brand::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1;
    pointer-events: auto; /* 确保链接区域可点击 */
}

.brand-text {
    font-family: 'League Spartan', sans-serif;
    font-weight: 500;
    margin-left: 8px;
    padding: 0;
    font-size: 1.2rem;  /* 调整文字大小 */
}

/* 导航链接基础样式 */
.navbar .nav-link {
    font-family: 'Century Gothic Bold', sans-serif;
    font-weight: normal;
    letter-spacing: 0.5px;
    padding: 8px 12px;
    margin: 0 2px;
    color: var(--accent-color) !important;
    position: relative;
    border-radius: 50px;
    transition: transform 0.25s cubic-bezier(0.3, 0, 0.2, 1);
    overflow: hidden;
    transform-origin: center center;
    will-change: transform;
}

/* 导航链接背景效果 */
.navbar .nav-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--accent-color);
    border-radius: 50px;
    transform: translateY(105%);
    transition: transform 0.25s cubic-bezier(0.3, 0, 0.2, 1);
    z-index: -1;
    will-change: transform;
}

/* 悬停效果 */
.navbar .nav-link:hover {
    color: rgb(241, 239, 231) !important;
    transform: scale(0.98);
}

.navbar .nav-link:hover::before {
    transform: translateY(0);
}

/* 导航栏字体间距优化 - 参考苹果UI风格 */
.navbar .navbar-brand {
    letter-spacing: 1px; /* 增加品牌名称的字母间距 */
    padding: 0 0; /* 调整上下内边距 */
}

/* 响应式调整 */
@media (max-width: 768px) {
    .navbar {
        padding: 0.5rem 1rem; /* 稍微增加上下padding，让导航栏更高一点 */
        height: 70px; /* 进一步增加移动端导航栏高度 */
    }
    
    .navbar .container {
        position: relative;
        justify-content: flex-end;
    }
    
    .navbar-brand {
        height: 50px; /* 增加高度 */
        position: absolute;
        left: 50%;
        transform: translateX(-50%);
        margin: 0;
        z-index: 1025; /* 确保logo在适当的层级 */
    }
    
    .navbar-logo {
        height: auto;
        width: 240px;  /* 再增加10%的宽度，从220px到240px */
        transform: scale(1.2); /* 再放大10% */
        transform-origin: center center; /* 从中心点缩放 */
    }
    
    /* 确保汉堡菜单按钮位于右侧且不被遮挡 */
    .navbar-toggler {
        margin-left: auto;
        position: relative;
        z-index: 1030;
        padding: 4px;
    }
    
    .navbar .nav-link {
        padding: 8px 10px;
        margin: 5px 0;
        text-align: center;
        transition: transform 0.2s cubic-bezier(0.3, 0, 0.2, 1);
    }
    
    .navbar-collapse {
        background-color: rgba(241, 239, 231, 0.95);
        margin-top: 10px;
        border-radius: 15px;
        padding: 10px;
        z-index: 1020; /* 确保下拉菜单在适当的层级 */
        position: absolute;  /* 添加绝对定位 */
        top: 100%;           /* 定位在导航栏下方 */
        right: 0;            /* 右对齐 */
        left: 0;             /* 左侧也对齐，确保宽度正确 */
        padding-top: 30px;   /* 增加顶部内边距，确保内容不被logo遮挡 */
    }
    
    .navbar .nav-link::before {
        transition: transform 0.2s cubic-bezier(0.3, 0, 0.2, 1);
    }
}

/* 优化导航栏动画效果 */
.navbar-collapse {
    transition: all 0.3s ease-in-out;
}

/* 自定义汉堡菜单按钮样式 */
.navbar-toggler {
    border: none;
    padding: 0;
    width: 30px;
    height: 30px;
    position: relative;
    outline: none !important;
    box-shadow: none !important;
}

.navbar-toggler:focus {
    box-shadow: none;
}

.navbar-toggler .navbar-toggler-icon {
    background-image: none !important;
    position: relative;
    padding: 0;
    width: 22px;
    height: 14px;
    display: inline-block;
}

/* 创建三条不等长的横线 */
.navbar-toggler .navbar-toggler-icon::before,
.navbar-toggler .navbar-toggler-icon::after,
.navbar-toggler .navbar-toggler-icon span {
    content: '';
    position: absolute;
    right: 0;
    height: 2px;
    background-color: var(--accent-color);
    transition: all 0.3s ease;
}

.navbar-toggler .navbar-toggler-icon::before {
    top: 0;
    width: 100%; /* 最长 */
}

.navbar-toggler .navbar-toggler-icon span {
    top: 6px;
    width: 60%; /* 最短 */
}

.navbar-toggler .navbar-toggler-icon::after {
    bottom: 0;
    width: 80%; /* 第二长 */
}

/* 展开时的动画效果 */
.navbar-toggler[aria-expanded="true"] .navbar-toggler-icon::before {
    transform: translateY(6px) rotate(45deg);
    width: 100%;
}

.navbar-toggler[aria-expanded="true"] .navbar-toggler-icon span {
    opacity: 0;
}

.navbar-toggler[aria-expanded="true"] .navbar-toggler-icon::after {
    transform: translateY(-6px) rotate(-45deg);
    width: 100%;
}

/* 导航栏展开时的背景遮罩 */
@media (max-width: 768px) {
    .navbar-collapse.show, 
    .navbar-collapse.collapsing {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        max-height: calc(100vh - 60px);
        overflow-y: auto;
    }
    
    .navbar-collapse.show::before {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background-color: rgba(0, 0, 0, 0.3);
        z-index: -1;
        backdrop-filter: blur(5px);
        -webkit-backdrop-filter: blur(5px);
        animation: fadeIn 0.3s ease-in-out;
    }
}

/* 添加淡入动画 */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Hero Section - 重写核心样式 */
.hero {
    position: relative;
    overflow: hidden;
    width: calc(100% - 16px);
    margin: 80px 8px 40px;
    border-radius: 20px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    touch-action: manipulation;
    cursor: grab;
    /* 统一使用20:9比例 */
    padding-bottom: 44.5% !important;
    height: 0 !important; /* 强制使用padding-bottom控制高度 */
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    will-change: transform;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.15);
    z-index: 1;
    border-radius: 20px;
    pointer-events: none;
}

.hero-slider {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 20px;
    cursor: grab;
    will-change: transform;
    z-index: 2;
    touch-action: none;
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
}

.hero-slide {
    position: absolute;
    top: 0;
    width: 95.5%;
    height: 100%;
    opacity: 0;
    border-radius: 20px;
    will-change: transform, opacity;
    background-color: #f8f8f8;
    overflow: hidden;
    left: 2.25%;
    transform: translateX(182%);
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    transition: transform 0.6s cubic-bezier(0.33, 1, 0.68, 1),
                opacity 0.5s cubic-bezier(0.33, 1, 0.68, 1);
}

.hero-slide.active {
    opacity: 1;
    transform: translateX(0);
    z-index: 3;
}

.hero-slide.prev {
    opacity: 0.2;
    transform: translateX(-98.5%);
    z-index: 1;
}

.hero-slide.next {
    opacity: 0.2;
    transform: translateX(98.5%);
    z-index: 1;
}

.hero-slide img {
    width: 100%;
    height: 100%;
    object-fit: fill; /* 改为fill模式以确保图片完整显示 */
    border-radius: 20px;
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

/* 响应式布局 - 简化和重写所有规则 */
/* 重写平板和移动设备媒体查询，保证设置正确的比例 */
@media screen and (max-width: 1366px) {
    /* 所有非桌面设备也统一使用20:9比例 */
    .hero {
        padding-bottom: 44.5% !important;  /* 20:9 比例 */
        margin: 70px 10px 30px !important;
        height: 0 !important;
    }
}

/* 确保iPad Pro和iPad Air特定的优化 */
@media only screen and (min-device-width: 768px) and (max-device-width: 1366px) {
    .hero {
        padding-bottom: 44.5% !important;  /* 20:9 比例 */
        width: calc(100% - 20px) !important;
        margin: 90px 10px 30px !important;
        height: 0 !important;
    }
}

/* 移动端设备 */
@media screen and (max-width: 767px) {
    .hero {
        width: calc(100% - 12px) !important;
        margin: 70px 6px 20px !important;
        padding-bottom: 44.5% !important;  /* 20:9 比例 */
        height: 0 !important;
    }
    
    .hero-slide {
        width: 93.5% !important;
        left: 3.25% !important;
    }
}

/* 超小屏幕设备 */
@media screen and (max-width: 400px) {
    .hero {
        width: calc(100% - 30px) !important;
        margin: 70px 15px 15px !important;
        padding-bottom: 44.5% !important;  /* 20:9 比例 */
        height: 0 !important;
    }
}

/* 移除其他可能干扰的媒体查询或设置 */
@media (max-height: 600px) {
    .hero {
        height: 0 !important; /* 强制使用padding-bottom */
        padding-bottom: 44.5% !important;  /* 20:9 比例 */
    }
}

/* 移动端优化 */
@media (hover: none) and (pointer: coarse) {
    .hero {
        touch-action: pan-y pinch-zoom;
    }
    
    .hero-slider {
        touch-action: pan-y pinch-zoom;
    }
}

/* 导航按钮样式 */
.slider-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.2);
    border: none;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 20; /* 确保导航按钮在最上层 */
    opacity: 0.7;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: block !important; /* 强制显示 */
    pointer-events: auto; /* 确保可以接收点击事件 */
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15); /* 减小阴影 */
}

.slider-nav:hover {
    background: rgba(255, 255, 255, 0.3);
    opacity: 1;
    transform: translateY(-50%) scale(1.05);
}

.slider-nav:active {
    transform: translateY(-50%) scale(0.98);
}

.slider-nav.prev {
    left: 20px;
}

.slider-nav.next {
    right: 20px;
}

.slider-nav svg {
    fill: white;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.2));
}

/* 指示器样式 */
.slider-indicators {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 12px;
    z-index: 20; /* 提高层级 */
    pointer-events: auto; /* 确保可以接收点击事件 */
}

.indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    border: none;
    padding: 0;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.33, 1, 0.68, 1);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}

.indicator.active {
    background: white;
    transform: scale(1.2);
    box-shadow: 0 0 8px rgba(255, 255, 255, 0.4);
}

/* 确保内容在滑动图片上层 */
.hero .container {
    position: relative;
    z-index: 2;  /* 文字内容层级 */
}

/* Section Styles */
.section-title {
    font-family: 'League Spartan', sans-serif;
    font-weight: 700;
    font-size: 2.5rem;
    color: var(--accent-color);
    margin-bottom: 1rem;
}

.section-subtitle {
    font-family: 'League Spartan', sans-serif;
    font-weight: 400;
    font-size: 1.1rem;
    color: var(--secondary-color);
    margin-bottom: 2rem;
}

/* Product Cards */
.product-card {
    position: relative;
    transition: all 0.3s ease;
    border: none;
    box-shadow: none;
    background-color: #ffffff;
}

.product-image {
    position: relative;
    overflow: hidden;
    height: 400px;
    margin-bottom: 50px;
}

.product-image .main-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 20px;
    transition: transform 0.4s cubic-bezier(0.215, 0.61, 0.355, 1);
    will-change: transform;
}

/* Products Section 的悬停效果 */
.products-section .product-card:hover .main-image {
    transform: scale(1.08);
}

/* Featured Products 的悬停效果可以稍微大一些 */
.featured-products .product-card:hover .main-image {
    transform: scale(1.12);
}

/* 移动端适配 */
@media (max-width: 768px) {
    .product-image {
        height: 300px;
        margin-bottom: 30px;
    }
    
    /* 移动端可以稍微减小放大效果 */
    .products-section .product-card:hover .main-image,
    .featured-products .product-card:hover .main-image {
        transform: scale(1.05);
    }
}

/* 确保堆叠顺序正确 */
.col-md-4 {
    position: relative;
    z-index: 1;
}

.col-md-4:hover {
    z-index: 9996;
}

/* 确保其他元素的层级正确 */
.navbar {
    z-index: 99999;
}

.modal {
    z-index: 9998;
}

.product-modal {
    z-index: 9998;
}

.hero-overlay {
    z-index: 1;
}

.hero .container {
    z-index: 2;
}

.slider-nav {
    z-index: 3;
}

.slider-indicators {
    z-index: 3;
}

/* 确保所有弹出层和遮罩层都低于导航栏 */
.modal-backdrop {
    z-index: 9997;
}

.product-card img {
    height: auto;
    max-height: 100%;
}

.product-card .card-body {
    padding: 1.5rem;
}

.product-card .card-title {
    font-family: 'League Spartan', sans-serif;
    font-weight: 600;
    color: var(--accent-color);
}

/* 响应式调整 */
@media (max-width: 768px) {
    .section-title {
        font-size: 2rem;
    }
    
    .featured-products,
    .products-section,
    .about-section,
    .contact-section {
        padding-top: 100px;
    }
    
    .product-categories .nav-link {
        padding: 6px 15px;
        font-size: 0.9rem;
    }

    .hero-slide img {
        height: 100%;
        object-fit: cover;
        object-position: center;
    }

    /* 移动端切换按钮样式 */
    .slider-nav {
        width: 40px;
        height: 40px;
        opacity: 0.6;
    }

    /* 移动端指示器位置调整 */
    .slider-indicators {
        bottom: 20px;
    }

    .indicator {
        width: 8px;
        height: 8px;
    }

    /* 移动端文字内容调整 */
    .hero .display-4 {
        font-size: 2rem;
        margin-bottom: 1rem;
    }

    .hero .lead {
        font-size: 1rem;
        margin-bottom: 1.5rem;
    }

    .hero .btn {
        padding: 0.5rem 1.5rem;
        font-size: 1rem;
    }
}

/* 平板设备适配 */
@media (min-width: 769px) and (max-width: 1024px) {
    .hero {
        height: calc(100vh - 60px);
    }

    .slider-nav {
        width: 42px;
        height: 42px;
    }

    .slider-indicators {
        bottom: 25px;
    }

    .hero .display-4 {
        font-size: 2.5rem;
    }
}

/* 横屏模式适配 */
@media (max-width: 768px) and (orientation: landscape) {
    .hero {
        height: 120vh;
    }

    .hero .container {
        padding-top: 70px;
    }

    .hero .display-4 {
        font-size: 1.8rem;
    }

    .hero .lead {
        font-size: 0.9rem;
    }
}

/* Featured Products Preview */
.featured-products {
    padding-top: 100px;  
    padding-bottom: 80px;
}

/* Products Section */
.products-section {
    padding-top: 100px;
    background-color: #ffffff;
}

.product-categories {
    margin-bottom: 3rem;
}

.product-categories .nav-link {
    color: var(--secondary-color);
    border-radius: 25px;
    padding: 8px 20px;
    margin: 0 5px;
    transition: all 0.3s ease;
}

.product-categories .nav-link.active {
    background-color: var(--accent-color);
    color: white !important;
}

.product-features {
    margin-top: 1rem;
}

.product-features .badge {
    font-family: 'League Spartan', sans-serif;
    font-weight: 500;
    margin-right: 0.5rem;
    padding: 0.5rem 1rem;
}

/* Modal Styles */
.modal-content {
    border: none;
    border-radius: 10px;
}

.modal-header {
    border-bottom: 1px solid rgba(0,0,0,0.1);
}

.modal-body img {
    border-radius: 5px;
}

.display-4 {
    font-family: 'League Spartan', sans-serif;
    font-weight: 700;
}

.lead {
    font-family: 'League Spartan', sans-serif;
    font-weight: 400;
}

.product-title {
    font-family: 'League Spartan', sans-serif;
    font-weight: 600;
    color: var(--accent-color);
}

.product-description {
    font-family: 'League Spartan', sans-serif;
    font-weight: 400;
}

/* About Section */
.about-section {
    background-color: #ffffff;
    padding-top: 120px;
    padding-bottom: 80px;
}

.about-image img {
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

/* Footer Styles */
.site-footer {
    background-color: #000;
    color: #fff;
    padding: 60px 0;
    font-family: 'League Spartan', sans-serif;
}

.footer-title {
    font-size: 1.2rem;
    font-weight: 500;
    margin-bottom: 20px;
    color: #fff;
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: 12px;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: color 0.3s ease;
    font-size: 0.95rem;
}

.footer-links a:hover {
    color: #fff;
}

.footer-image {
    max-width: 200px;
    opacity: 0.8;
}

.footer-container {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 40px;
}

.footer-column {
    flex: 1;
}

.footer-image-column {
    flex: 2;
    display: flex;
    justify-content: flex-end;
}

@media (max-width: 768px) {
    .footer-container {
        flex-direction: column;
        gap: 30px;
    }

    .footer-image-column {
        justify-content: flex-start;
    }

    .footer-image {
        max-width: 150px;
    }
}

.hero .display-4 {
    font-size: 3.5rem;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.hero .lead {
    font-size: 1.25rem;
    line-height: 1.6;
    max-width: 600px;
    margin-bottom: 2rem;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
}

/* 移动端适配 */
@media (max-width: 768px) {
    .hero .display-4 {
        font-size: 2.5rem;
    }
    
    .hero .lead {
        font-size: 1.1rem;
        max-width: 100%;
    }
}

/* 拖拽提示样式 */
.drag-hint {
    display: none; /* 完全隐藏拖拽提示 */
}

/* 移动端适配 */
@media (max-width: 768px) {
    .drag-hint {
        bottom: 70px;
        font-size: 12px;
        padding: 6px 12px;
    }
}

/* 拖拽时的特殊样式 */
.is-dragging {
    cursor: grabbing !important;
}

.hero-slider.is-dragging {
    cursor: grabbing;
}

.hero-slider.is-dragging .hero-slide {
    transition: none !important;
    will-change: transform, opacity;
}

/* 过渡效果增强 */
@media (hover: hover) {
    .slider-nav {
        opacity: 0.5;
        transform: translateY(-50%) scale(0.9);
        transition: all 0.25s cubic-bezier(0.33, 1, 0.68, 1);
    }
    
    .hero:hover .slider-nav {
        opacity: 0.7;
        transform: translateY(-50%) scale(1);
    }
    
    .slider-nav:hover {
        opacity: 1;
        transform: translateY(-50%) scale(1.1);
    }
}

/* 修复iOS上的过渡问题 */
@supports (-webkit-touch-callout: none) {
    .hero-slide {
        -webkit-transition: -webkit-transform 0.6s cubic-bezier(0.33, 1, 0.68, 1),
                          opacity 0.5s cubic-bezier(0.33, 1, 0.68, 1);
        transition: transform 0.6s cubic-bezier(0.33, 1, 0.68, 1),
                   opacity 0.5s cubic-bezier(0.33, 1, 0.68, 1);
    }
}

/* 优化拖动状态 */
.hero-slider.is-dragging {
    cursor: grabbing;
}

.hero-slider.is-dragging .hero-slide {
    transition: none !important;
    will-change: transform, opacity;
}

/* 触屏设备优化 */
@media (hover: none) {
    .navbar .nav-link {
        transition: transform 0.2s cubic-bezier(0.3, 0, 0.2, 1);
    }
    
    .navbar .nav-link:active {
        transform: scale(0.98);
    }
}
