/* 自定义字体 */
@font-face {
    font-family: 'CustomFont';
    src: url('../images/font.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

/* 基础样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* 基础页面样式 */
body {
    font-family: 'Microsoft YaHei', Arial, sans-serif;
    background-color: #F3E3CE;
    line-height: 1.6;
    font-size: 14px;
}

/* 导航栏 */
.navbar {
    background-color: #8B5303;
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
}
.logo {
    display: flex;
    align-items: center;
}

.logo img {
    height: 40px;
    width: auto;
    filter: brightness(0) invert(1);
}
.logo img:nth-of-type(2){
    width: 80px;
    height: auto;
}

.logo-text {
    color: white;
    font-size: 18px;
    font-weight: 600;
    text-decoration: none;
    font-family: 'Cinzel', serif;
}

/* logo-text 样式已移除，该类不再使用 */

.nav-links {
    display: flex;
    list-style: none;
    gap: 30px;
    align-items: center;
}

.nav-links > li {
    position: relative;
}

.nav-links a {
    color: white;
    text-decoration: none;
    font-size: 15px;
    transition: opacity 0.3s;
    display: block;
    padding: 10px 0;
}

.nav-links a:hover {
    opacity: 0.8;
}

/* 二级菜单 */
.dropdown {
    position: relative;
}

.dropdown-content {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background-color: white;
    min-width: 160px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    border-radius: 5px;
    overflow: hidden;
    margin-top: 0;
    padding-top: 5px;
}

.dropdown-content a {
    color: #333;
    padding: 12px 20px;
    text-decoration: none;
    display: block;
    font-size: 14px;
    transition: background-color 0.3s;
}

.dropdown-content a:hover {
    background-color: #F3E3CE;
    opacity: 1;
}

/* 改进hover交互 - 添加延迟防止意外关闭 */
.dropdown:hover .dropdown-content,
.dropdown-content:hover {
    display: block;
}

/* 等边三角形图标 */
.dropdown > a {
    position: relative;
    padding-right: 18px;
}

.dropdown > a::after {
    content: '';
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 6px solid white;
    margin-left: 8px;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.search-box {
    position: relative;
}

.search-box input {
    padding: 8px 35px 8px 10px;
    border: none;
    border-radius: 5px;
    font-size: 14px;
}

.search-box button {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: #666;
}

/* Hero区域 */
.hero-section {
    position: relative;
    width: 100%;
    height: 350px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-section img {
    position: absolute;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
}

.hero-section::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
    z-index: 1;
}

.hero-content {
    position: relative;
    text-align: center;
    color: white;
    z-index: 10;
    max-width: 800px;
    padding: 0 20px;
}

.hero-content h1 {
    font-size: 48px;
    font-weight: normal;
    margin-bottom: 15px;
    font-family: 'CustomFont', 'Cinzel', serif;
    letter-spacing: 2px;
}

.hero-content p {
    font-size: 16px;
    line-height: 1.6;
    opacity: 0.95;
}

/* 轮播图 */
.carousel-container {
    position: relative;
    max-width: 100%;
    margin: 0 auto;
}

.carousel {
    position: relative;
    width: 100%;
    height: 500px;
    overflow: hidden;
}

.carousel-slide {
    position: absolute;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
}

.carousel-slide.active {
    opacity: 1;
}

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

.carousel-slide::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
    pointer-events: none;
}

/* 轮播图文字 */
.carousel-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: white;
    z-index: 10;
    width: 90%;
    max-width: 800px;
}

.carousel-text h1 {
    font-size: 64px;
    font-weight: normal;
    margin-bottom: 20px;
    font-family: 'CustomFont', 'Cinzel', serif;
    letter-spacing: 3px;
    text-transform: uppercase;
}

.carousel-text p {
    font-size: 16px;
    line-height: 1.6;
    opacity: 0.95;
}

.carousel-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.6);
    color: white;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    opacity: 0;
    visibility: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    z-index: 10;
}

.carousel-container:hover .carousel-nav {
    opacity: 0.8;
    visibility: visible;
}

.carousel-nav:hover {
    background: rgba(0, 0, 0, 0.9);
    opacity: 1 !important;
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
}

.carousel-prev {
    left: 20px;
}

.carousel-next {
    right: 20px;
}

.carousel-indicators {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 10;
}

.carousel-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: background-color 0.3s;
}

.carousel-indicator.active {
    background: white;
}

/* 主要内容区域 */
.main-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
}

/* 产品网格通用样式 */
.products-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
}

.product-card {
    background: white;
    border-radius: 5px;
    overflow: hidden;
    transition: transform 0.3s;
    position: relative;
}

.product-card:hover {
    transform: translateY(-5px);
}

.product-image {
    position: relative;
    width: 100%;
    height: 200px;
    overflow: hidden;
}

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

.favorite-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 45px;
    height: 45px;
    background: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s;
    z-index: 2;
}

.favorite-btn i {
    font-size: 20px;
    color: #8B5303;
}

.favorite-btn:hover {
    background: #8B5303;
}

.favorite-btn:hover i {
    color: white;
}

.product-info {
    padding: 25px;
}

.product-name {
    color: #2c1810;
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 12px;
}

.product-description {
    color: #666;
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 20px;
}

.product-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.price {
    color: #8B5303;
    font-size: 20px;
    font-weight: bold;
}

.add-to-cart {
    background: #8B5303;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.3s;
}

.add-to-cart:hover {
    background: #6d4002;
}

/* 页脚 */
.footer {
    background-color: #8B5303;
    color: white;
    text-align: center;
    padding: 15px 0;
    font-size: 14px;

}

/* 响应式设计 */
@media (max-width: 768px) {
    .nav-container {
        flex-direction: column;
        gap: 15px;
    }

    .nav-links {
        gap: 20px;
        flex-wrap: wrap;
        justify-content: center;
    }

    .hero-section {
        height: 250px;
    }

    .hero-content h1 {
        font-size: 32px;
    }

    .hero-content p {
        font-size: 14px;
    }

    .carousel {
        height: 400px;
    }

    .carousel-text h1 {
        font-size: 28px;
    }

    .carousel-text p {
        font-size: 16px;
    }

    .dropdown-content {
        position: static;
        box-shadow: none;
        margin-top: 10px;
    }
}

@media (max-width: 480px) {
    .nav-links {
        font-size: 14px;
    }

    .hero-section {
        height: 200px;
    }

    .hero-content h1 {
        font-size: 18px;
    }

    .hero-content p {
        font-size: 12px;
    }

    .carousel {
        height: 300px;
    }

    .carousel-text h1 {
        font-size: 28px;
    }

    .carousel-text p {
        font-size: 14px;
    }
}

.section-title{
    color: #8B5303;
    font-size: 28px;
    margin-bottom: 25px;
    text-align: center;
}