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

body {
    font-family: "Microsoft YaHei", "微软雅黑", Arial, sans-serif;
    font-size: 14px;
    color: #333;
    background: #f5f5f5;
    line-height: 1.6;
}

a {
    text-decoration: none;
    color: #333;
    transition: color 0.2s;
}

a:hover {
    color: #c9a875;
}

ul, li {
    list-style: none;
}

img {
    border: 0;
    max-width: 100%;
}

.container {
    width: 1200px;
    margin: 0 auto;
}

.clearfix::after {
    content: "";
    display: block;
    clear: both;
}

/* 顶部欢迎条 */
.top-bar {
    background: #f5f5f5;
    border-bottom: 1px solid #e8e8e8;
    height: 32px;
    line-height: 32px;
    font-size: 12px;
    color: #666;
}

.top-bar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.top-bar .top-right a {
    color: #666;
    margin: 0 5px;
}

.top-bar .top-right a:hover {
    color: #c9a875;
}

/* 头部Logo+搜索 */
.header {
    background: #fff;
    padding: 20px 0;
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    flex-shrink: 0;
}

.logo h1 {
    font-size: 28px;
    color: #c9a875;
    font-weight: bold;
    letter-spacing: 1px;
}

.logo .domain {
    font-size: 12px;
    color: #999;
    margin-top: 3px;
    letter-spacing: 1px;
}

.logo .sub {
    font-size: 12px;
    color: #999;
    margin-top: 3px;
    letter-spacing: 2px;
}

.search-box {
    display: flex;
    border: 2px solid #c9a875;
    height: 40px;
    width: 400px;
}

.search-box input {
    flex: 1;
    border: 0;
    padding: 0 15px;
    outline: none;
    font-size: 14px;
}

.search-box button {
    width: 80px;
    background: #c9a875;
    color: #fff;
    border: 0;
    font-size: 14px;
    cursor: pointer;
    letter-spacing: 2px;
}

.search-box button:hover {
    background: #b8935f;
}

/* 导航栏 */
.nav {
    background: #fff;
    border-top: 1px solid #eee;
    border-bottom: 1px solid #eee;
}

.nav ul {
    display: flex;
    justify-content: center;
}

.nav ul li {
    flex: 1;
    text-align: center;
}

.nav ul li a {
    display: block;
    padding: 15px 0;
    font-size: 16px;
    color: #333;
    border-bottom: 2px solid transparent;
}

.nav ul li a:hover,
.nav ul li a.active {
    color: #c9a875;
    border-bottom-color: #c9a875;
}

/* Banner */
.banner {
    width: 100%;
    height: 400px;
    background: url('https://images.unsplash.com/photo-1600585154340-be6161a56a0c?w=1600') center/cover no-repeat;
    position: relative;
    overflow: hidden;
}

.banner::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.1);
}

.banner-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: #fff;
    z-index: 1;
    text-shadow: 0 2px 8px rgba(0,0,0,0.5);
}

.banner-content h2 {
    font-size: 48px;
    margin-bottom: 20px;
    letter-spacing: 4px;
}

.banner-content p {
    font-size: 20px;
    letter-spacing: 2px;
}

/* 主体内容 */
.main {
    padding: 30px 0 50px;
    background: #f5f5f5;
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

.main > .sidebar {
    width: 220px;
    flex-shrink: 0;
    background: #fff;
    border: 1px solid #eee;
}

.main > .content {
    flex: 1;
    background: #fff;
    padding: 20px;
    border: 1px solid #eee;
}

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

/* 侧边栏 - 商品分类 */
.sidebar {
    width: 220px;
    background: #fff;
    flex-shrink: 0;
    border: 1px solid #eee;
}

.sidebar .sidebar-title {
    background: #c9a875;
    color: #fff;
    padding: 12px 20px;
    font-size: 16px;
    font-weight: bold;
    letter-spacing: 2px;
}

.sidebar ul li {
    border-bottom: 1px solid #f0f0f0;
}

.sidebar ul li a {
    display: block;
    padding: 12px 20px;
    color: #555;
    font-size: 14px;
}

.sidebar ul li a:hover {
    background: #faf6ee;
    color: #c9a875;
    padding-left: 25px;
}

/* 内容区 */
.content-area {
    flex: 1;
    background: #fff;
    padding: 20px;
    border: 1px solid #eee;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid #c9a875;
    padding-bottom: 10px;
    margin-bottom: 20px;
}

.section-header h3 {
    font-size: 18px;
    color: #333;
    padding-left: 12px;
    border-left: 4px solid #c9a875;
}

.section-header .more {
    font-size: 13px;
    color: #999;
}

.section-header .more:hover {
    color: #c9a875;
}

/* 商品网格 */
.product-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    margin-bottom: 30px;
}

/* 统一样式 - 新版 product-card */
.product-card {
    background: #fafafa;
    border: 1px solid #eee;
    transition: all 0.3s;
    cursor: pointer;
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.product-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
    background: #fff;
}

.product-card .product-info {
    padding: 12px;
    flex: 1;
}

.product-card .product-info h3 {
    font-size: 14px;
    color: #333;
    margin: 0 0 8px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.product-card .product-info h3 a {
    color: #333;
    text-decoration: none;
}

.product-card .product-info h3 a:hover {
    color: #c9a875;
}

.product-card .product-price {
    color: #c9a875;
    font-size: 18px;
    font-weight: bold;
}

.product-item {
    background: #fafafa;
    border: 1px solid #eee;
    transition: all 0.3s;
    cursor: pointer;
}

.product-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.product-item .p-img {
    width: 100%;
    height: 180px;
    background: #ddd center/cover no-repeat;
}

.product-item .p-info {
    padding: 10px;
}

.product-item .p-name {
    font-size: 13px;
    color: #333;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.product-item .p-spec {
    font-size: 12px;
    color: #999;
    margin-top: 3px;
}

.product-item .p-price {
    color: #c9a875;
    font-size: 16px;
    font-weight: bold;
    margin-top: 5px;
}

/* 空状态 */
.empty-tip {
    text-align: center;
    padding: 60px 20px;
    color: #999;
}

.empty-tip .icon {
    font-size: 48px;
    margin-bottom: 15px;
    color: #ddd;
}

/* Footer */
.footer {
    background: #2c2c2c;
    color: #aaa;
    padding: 40px 0 0;
    font-size: 13px;
}

.footer .footer-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    margin-bottom: 30px;
}

.footer .footer-col h4 {
    color: #fff;
    font-size: 15px;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #444;
    position: relative;
}

.footer .footer-col h4::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 40px;
    height: 2px;
    background: #c9a875;
}

.footer .footer-col p,
.footer .footer-col a {
    color: #aaa;
    line-height: 2;
    display: block;
}

.footer .footer-col a:hover {
    color: #c9a875;
}

.footer .copyright {
    background: #1f1f1f;
    text-align: center;
    padding: 15px 0;
    color: #888;
    font-size: 12px;
}

.footer .copyright a {
    color: #4a90e2;
}

/* 面包屑 */
.breadcrumb {
    background: #fff;
    padding: 12px 0;
    border-bottom: 1px solid #eee;
    font-size: 13px;
    color: #999;
}

.breadcrumb a {
    color: #666;
}

.breadcrumb a:hover {
    color: #c9a875;
}

/* 店铺列表 */
.shop-list {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.shop-card {
    border: 1px solid #eee;
    padding: 20px;
    text-align: center;
    background: #fafafa;
    transition: all 0.3s;
}

.shop-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    border-color: #c9a875;
}

.shop-card .shop-logo {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: #c9a875;
    color: #fff;
    margin: 0 auto 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.shop-card h4 {
    font-size: 16px;
    color: #333;
    margin-bottom: 8px;
}

.shop-card p {
    color: #999;
    font-size: 12px;
}

.shop-card .btn-enter {
    display: inline-block;
    margin-top: 12px;
    padding: 6px 20px;
    background: #c9a875;
    color: #fff;
    font-size: 13px;
    border-radius: 3px;
}

.shop-card .btn-enter:hover {
    background: #b8935f;
    color: #fff;
}

/* 内页通用 */
.page-content {
    background: #fff;
    padding: 30px;
    margin-top: 20px;
    border: 1px solid #eee;
    min-height: 500px;
}

.page-content h2 {
    font-size: 22px;
    color: #333;
    text-align: center;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

/* 信息发布说明 */
.info-notice {
    background: #fffbe6;
    border: 1px solid #ffe58f;
    padding: 30px;
    text-align: center;
    color: #b8935f;
    border-radius: 4px;
    margin: 40px 0;
}

.info-notice p {
    margin: 10px 0;
    font-size: 15px;
}

/* 子分类入口卡片 */
.subcat-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-top: 20px;
}

.subcat-card {
    background: #fafafa;
    border: 1px solid #eee;
    text-align: center;
    padding: 40px 20px;
    transition: all 0.3s;
    cursor: pointer;
}

.subcat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(201,168,117,0.2);
    border-color: #c9a875;
    background: #fff;
}

.subcat-card .sc-icon {
    font-size: 48px;
    color: #c9a875;
    margin-bottom: 15px;
}

.subcat-card h4 {
    font-size: 18px;
    color: #333;
    margin-bottom: 8px;
}

.subcat-card p {
    font-size: 13px;
    color: #999;
}

.subcat-card .sc-count {
    display: inline-block;
    margin-top: 10px;
    padding: 3px 12px;
    background: #c9a875;
    color: #fff;
    font-size: 12px;
    border-radius: 12px;
}

/* 子分类Tab */
.subcat-tabs {
    display: flex;
    border-bottom: 2px solid #c9a875;
    margin-bottom: 20px;
}

.subcat-tabs a {
    padding: 10px 25px;
    font-size: 15px;
    color: #666;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: all 0.2s;
}

.subcat-tabs a:hover {
    color: #c9a875;
}

.subcat-tabs a.active {
    color: #c9a875;
    border-bottom-color: #c9a875;
    font-weight: bold;
}

/* 子分类侧边栏 - 默认直接显示所有子分类，点击即跳转 */
.sidebar .sub-list {
    display: block;
    padding-left: 15px;
}

.sidebar .parent {
    position: relative;
}

.sidebar .sub-list li a {
    font-size: 13px;
    padding: 8px 20px 8px 30px;
    color: #777;
}

.sidebar .sub-list li a.active {
    color: #c9a875;
    font-weight: bold;
    background: #faf6ee;
}

/* 去掉箭头 */
.sidebar .arrow {
    display: none;
}

/* 顶部购物车文字链接 */
.top-cart-link {
    margin-left: 12px;
    color: #c9a875;
    text-decoration: none;
    font-weight: 500;
}
.top-cart-link:hover {
    color: #a8884d;
    text-decoration: underline;
}
.cart-badge-text {
    color: #e74c3c;
    font-weight: bold;
}
