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

body {
    font-family: "Microsoft YaHei", "PingFang SC", "Hiragino Sans GB", Arial, sans-serif;
    background-color: #f5f5f5;
    color: #333;
    line-height: 1.6;
    font-size: 14px;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

/* 顶部导航栏 */
.top-nav {
    background-color: #ff6600;
    width: 100%;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1000;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.nav-menu {
    display: flex;
    align-items: center;
}

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

.nav-link {
    display: block;
    padding: 12px 20px;
    color: #fff;
    font-size: 15px;
    font-weight: 500;
    transition: background-color 0.3s;
}

.nav-link:hover,
.nav-link.active {
    background-color: #e65c00;
}

.arrow {
    margin-left: 5px;
    font-size: 10px;
}

/* 下拉菜单 */
.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background-color: #fff;
    min-width: 160px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1001;
}

.dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
}

.dropdown-menu li a {
    display: block;
    padding: 10px 20px;
    color: #333;
    border-bottom: 1px solid #f0f0f0;
    transition: background-color 0.3s;
}

.dropdown-menu li a:hover {
    background-color: #ff6600;
    color: #fff;
}

/* 主容器 */
.main-container {
    max-width: 1200px;
    margin: 50px auto 0;
    padding: 20px;
    min-height: calc(100vh - 50px);
}

.content-wrapper {
    display: flex;
    gap: 20px;
}

/* 左侧边栏 */
.sidebar {
    width: 240px;
    flex-shrink: 0;
}

.sidebar-section {
    background-color: #fff;
    margin-bottom: 15px;
    border: 1px solid #e0e0e0;
}

.sidebar-title {
    background-color: #ff6600;
    color: #fff;
    padding: 10px 15px;
    font-size: 15px;
    font-weight: bold;
}

.sidebar-content {
    padding: 15px;
}

/* 店内搜索 */
.search-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.form-group label {
    font-size: 13px;
    color: #666;
}

.form-control {
    padding: 8px 10px;
    border: 1px solid #ddd;
    border-radius: 3px;
    font-size: 13px;
}

.price-inputs {
    display: flex;
    gap: 5px;
    align-items: center;
}

.price-inputs input {
    width: 70px;
    text-align: center;
}

.search-btn {
    background-color: #ff6600;
    color: #fff;
    border: none;
    padding: 8px 20px;
    border-radius: 3px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: background-color 0.3s;
}

.search-btn:hover {
    background-color: #e65c00;
}

/* 商品分类 */
.category-item {
    margin-bottom: 12px;
}

.category-main {
    font-size: 14px;
    font-weight: bold;
    color: #333;
    margin-bottom: 5px;
    cursor: pointer;
}

.category-main:hover {
    color: #ff6600;
}

.category-sub {
    padding-left: 15px;
}

.category-sub a {
    display: block;
    font-size: 13px;
    color: #666;
    padding: 3px 0;
    transition: color 0.3s;
}

.category-sub a:hover {
    color: #ff6600;
}

.filter-options {
    margin-top: 5px;
    padding-left: 15px;
}

.filter-options span {
    font-size: 12px;
    color: #999;
    margin-right: 8px;
}

.filter-options span a {
    color: #ff6600;
}

/* 商品排行 */
.rank-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
}

.rank-tab {
    padding: 5px 15px;
    background-color: #fce4ec;
    color: #666;
    border-radius: 15px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.3s;
}

.rank-tab.active,
.rank-tab:hover {
    background-color: #ff6600;
    color: #fff;
}

.rank-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.rank-item {
    display: flex;
    gap: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid #f0f0f0;
}

.rank-item:last-child {
    border-bottom: none;
}

.rank-img {
    width: 50px;
    height: 50px;
    flex-shrink: 0;
    background-color: #f5f5f5;
    border-radius: 3px;
    overflow: hidden;
}

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

.rank-info {
    flex: 1;
}

.rank-name {
    font-size: 13px;
    color: #333;
    margin-bottom: 5px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.rank-price {
    color: #ff0000;
    font-size: 14px;
    font-weight: bold;
}

.rank-sales {
    font-size: 12px;
    color: #999;
}

/* 主内容区域 */
.main-content {
    flex: 1;
}

.content-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    background-color: #fff;
    border-bottom: 2px solid #ff6600;
    margin-bottom: 15px;
}

.search-result {
    font-size: 13px;
    color: #666;
}

.view-more {
    color: #ff6600;
    font-size: 13px;
    cursor: pointer;
}

.view-more:hover {
    text-decoration: underline;
}

/* 商品网格 */
.product-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.product-card {
    background-color: #fff;
    border: 1px solid #e0e0e0;
    transition: all 0.3s;
    cursor: pointer;
}

.product-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

.product-image {
    width: 100%;
    height: 180px;
    background-color: #f5f5f5;
    overflow: hidden;
}

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

.product-card:hover .product-image img {
    transform: scale(1.05);
}

.product-info {
    padding: 12px;
}

.product-name {
    font-size: 14px;
    color: #333;
    margin-bottom: 8px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    line-height: 1.4;
}

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

.product-price {
    color: #ff0000;
    font-size: 16px;
    font-weight: bold;
}

.product-sales {
    font-size: 12px;
    color: #999;
}

/* 悬浮按钮 */
.floating-buttons {
    position: fixed;
    right: 20px;
    bottom: 80px;
    z-index: 999;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.float-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    transition: all 0.3s;
    position: relative;
}

.float-btn:hover {
    transform: scale(1.1);
}

.float-btn-orange {
    background-color: #ff6600;
}

.float-btn-gradient {
    background: linear-gradient(135deg, #ff6600, #4facfe);
}

.float-btn-blue {
    background-color: #4facfe;
}

.float-btn-green {
    background-color: #66cc99;
}

.float-text {
    color: #fff;
    font-size: 18px;
    font-weight: bold;
}

.float-icon {
    color: #fff;
    font-size: 20px;
}

.float-label {
    position: absolute;
    right: 60px;
    background-color: #ff6600;
    color: #fff;
    padding: 5px 10px;
    border-radius: 3px;
    font-size: 12px;
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.3s;
}

.float-btn:hover .float-label {
    opacity: 1;
}

/* 页脚 */
.footer {
    background-color: #333;
    color: #fff;
    margin-top: 40px;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 30px 20px;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
}

.footer-section h3 {
    font-size: 16px;
    margin-bottom: 15px;
    color: #ff6600;
}

.footer-section p {
    margin-bottom: 8px;
}

.footer-section a {
    color: #ccc;
    font-size: 13px;
    transition: color 0.3s;
}

.footer-section a:hover {
    color: #ff6600;
}

.footer-bottom {
    background-color: #222;
    text-align: center;
    padding: 15px;
    color: #999;
    font-size: 12px;
}

/* 商品详情页 */
.product-detail {
    background-color: #fff;
    padding: 20px;
}

.detail-header {
    border-bottom: 1px solid #e0e0e0;
    padding-bottom: 15px;
    margin-bottom: 20px;
}

.detail-breadcrumb {
    font-size: 13px;
    color: #666;
    margin-bottom: 10px;
}

.detail-breadcrumb a {
    color: #ff6600;
}

.detail-content {
    display: flex;
    gap: 30px;
}

.detail-image {
    flex: 1;
    max-width: 400px;
}

.detail-image img {
    width: 100%;
    height: auto;
    border: 1px solid #e0e0e0;
    border-radius: 5px;
}

.detail-info {
    flex: 2;
}

.detail-title {
    font-size: 20px;
    color: #333;
    margin-bottom: 15px;
    line-height: 1.4;
}

.detail-price {
    font-size: 28px;
    color: #ff0000;
    font-weight: bold;
    margin-bottom: 15px;
}

.detail-meta {
    display: flex;
    gap: 20px;
    margin-bottom: 15px;
    font-size: 13px;
    color: #666;
}

.detail-description {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
}

.detail-description h4 {
    font-size: 16px;
    margin-bottom: 10px;
    color: #333;
}

.detail-description p {
    font-size: 14px;
    color: #666;
    line-height: 1.8;
}

/* 分类页 */
.category-header {
    background-color: #fff;
    padding: 20px;
    margin-bottom: 20px;
    border-bottom: 1px solid #e0e0e0;
}

.category-title {
    font-size: 20px;
    color: #333;
    margin-bottom: 10px;
}

.category-breadcrumb {
    font-size: 13px;
    color: #666;
}

/* 关于我们页 */
.about-section {
    background-color: #fff;
    padding: 30px;
    margin-bottom: 20px;
}

.about-title {
    font-size: 20px;
    color: #333;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #ff6600;
}

.about-content {
    font-size: 14px;
    color: #666;
    line-height: 1.8;
}

.faq-item {
    margin-bottom: 20px;
}

.faq-question {
    font-size: 15px;
    font-weight: bold;
    color: #333;
    margin-bottom: 8px;
}

.faq-answer {
    font-size: 14px;
    color: #666;
    line-height: 1.8;
    padding-left: 20px;
}

/* 联系我们页 */
.contact-section {
    background-color: #fff;
    padding: 30px;
    margin-bottom: 20px;
}

.contact-form {
    max-width: 600px;
}

.form-row {
    margin-bottom: 15px;
}

.form-row label {
    display: block;
    margin-bottom: 5px;
    font-size: 14px;
    color: #333;
}

.form-row textarea {
    width: 100%;
    min-height: 120px;
    resize: vertical;
}

.submit-btn {
    background-color: #ff6600;
    color: #fff;
    border: none;
    padding: 10px 30px;
    border-radius: 3px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: background-color 0.3s;
}

.submit-btn:hover {
    background-color: #e65c00;
}

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

    .sidebar {
        width: 100%;
    }

    .product-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .footer-content {
        grid-template-columns: repeat(2, 1fr);
    }

    .detail-content {
        flex-direction: column;
    }

    .detail-image {
        max-width: 100%;
    }
}

@media (max-width: 480px) {
    .product-grid {
        grid-template-columns: 1fr;
    }

    .footer-content {
        grid-template-columns: 1fr;
    }

    .nav-menu {
        flex-wrap: wrap;
    }

    .nav-link {
        padding: 10px 12px;
        font-size: 13px;
    }
}
