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

body {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f4f4f4;
    overflow-x: hidden;
    padding-bottom: 80px;
}

/* 确保所有容器元素都不会超出屏幕宽度 */
header, main, section, footer {
    max-width: 100vw;
    overflow-x: hidden;
}

/* 头部样式 */
header {
    background-color: #fff;
    color: #333;
    padding: 1rem 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
}

.header-content {
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    padding: 0 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-sizing: border-box;
}

.menu-icon {
    width: 18px;
    height: 14px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: flex-start;
}

.menu-icon span {
    width: 100%;
    height: 2px;
    background-color: #333;
    border-radius: 1px;
}

.nav-menu {
    display: flex;
    align-items: center;
    flex: 1;
    justify-content: center;
    gap: 2rem;
}

.nav-menu a {
    color: #333;
    text-decoration: none;
    font-size: 1.2rem;
    transition: color 0.3s;
    font-weight: 500;
}

.nav-menu a.active {
    color: #ff0000;
    font-weight: 700;
}

.nav-menu a:hover {
    color: #ff0000;
}

.nav-divider {
    width: 1px;
    height: 12px;
    background-color: #ddd;
}

.search-icon {
    cursor: pointer;
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.search-icon svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: #333;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* 页脚样式 */
footer {
    background-color: #fff;
    color: #333;
    padding: 0.8rem 0;
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    z-index: 999;
    box-shadow: 0 -2px 4px rgba(0,0,0,0.1);
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-around;
    align-items: center;
}

.footer-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: #999;
    transition: color 0.3s;
    flex: 1;
}

.footer-nav-item.active {
    color: #ff0000;
}

.footer-nav-item:hover {
    color: #ff0000;
}

.footer-icon {
    position: relative;
    margin-bottom: 0.3rem;
}

.footer-icon i {
    font-size: 20px;
    width: 20px;
    height: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.home-icon i {
    color: #ff0000;
}

.message-icon {
    position: relative;
}

.notification-dot {
    position: absolute;
    top: -2px;
    right: -2px;
    width: 8px;
    height: 8px;
    background-color: #ff0000;
    border-radius: 50%;
}

.footer-nav-item span {
    font-size: 0.8rem;
}

.footer-nav-item.active span {
    color: #ff0000;
}

/* 响应式调整 */
@media (max-width: 480px) {
    .nav-menu {
        gap: 1rem;
    }
}

/* 通知区域样式 */
.notification-bar {
    background-color: transparent;
    color: #333;
    padding: 0 0 0.4rem 0;
    margin: 0 0 0.5rem 0;
    position: relative;
    z-index: 990;
}

.notification-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.notification-icon {
    font-size: 1.2rem;
    color: #ff0000;
}

.notification-text {
    flex: 1;
    font-size: 0.9rem;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 80%;
}

.notification-more {
    font-size: 0.8rem;
    text-decoration: underline;
    cursor: pointer;
}

.notification-more:hover {
    opacity: 0.8;
}

/* 快捷导航区域样式 */
.quick-nav {
    margin: 0 auto;
    max-width: 1200px;
}

.quick-nav-container {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: space-between;
}

.quick-nav-item {
    flex: 1 1 calc(25% - 1rem);
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0.5rem 0;
}

.quick-nav-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.25rem;
    font-size: 1.5rem;
}

.quick-nav-text {
    font-size: 0.8rem;
    text-align: center;
}

/* 快捷导航图标颜色 */
.quick-nav-item.red .quick-nav-icon {
    background-color: #ffe6e6;
    color: #ff0000;
}

.quick-nav-item.green .quick-nav-icon {
    background-color: #e6ffe6;
    color: #00ff00;
}

.quick-nav-item.purple .quick-nav-icon {
    background-color: #f0e6ff;
    color: #9900ff;
}

.quick-nav-item.blue .quick-nav-icon {
    background-color: #e6f0ff;
    color: #0066ff;
}

.quick-nav-item.orange .quick-nav-icon {
    background-color: #fff0e6;
    color: #ff6600;
}

.quick-nav-item.cyan .quick-nav-icon {
    background-color: #e6ffff;
    color: #00cccc;
}

.quick-nav-item.violet .quick-nav-icon {
    background-color: #f5e6ff;
    color: #9933ff;
}

.quick-nav-item.pink .quick-nav-icon {
    background-color: #ffe6f0;
    color: #ff3399;
}

/* 年货区域样式 */
.spring-festival-section {
    margin: 2rem auto 1rem;
    max-width: 1200px;
    padding: 0 15px;
}

.spring-festival-header {
    background-color: #ff0000;
    color: white;
    padding: 1rem;
    border-radius: 8px 8px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.spring-festival-header h2 {
    margin: 0;
    font-size: 1.2rem;
    font-weight: bold;
}

.spring-festival-header p {
    margin: 0;
    font-size: 0.9rem;
}

.spring-festival-container {
    display: flex;
    flex-wrap: wrap;
    background-color: white;
    border-radius: 0 0 8px 8px;
}

.spring-festival-item {
    flex: 1 1 25%;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1.5rem 0;
}

.spring-festival-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.5rem;
    font-size: 1.5rem;
}

.spring-festival-icon.red {
    background-color: #ffe6e6;
    color: #ff0000;
}

.spring-festival-icon.orange {
    background-color: #fff0e6;
    color: #ff6600;
}

.spring-festival-icon.green {
    background-color: #e6ffe6;
    color: #00cc00;
}

.spring-festival-icon.blue {
    background-color: #e6f0ff;
    color: #0066ff;
}

.spring-festival-text {
    font-size: 0.9rem;
    text-align: center;
}

/* 区域卡片组合区域样式 */
.card-combination-section {
    margin: 1rem auto 1rem;
    max-width: 1200px;
    padding: 0 15px;
}

.card-combination-container {
    display: flex;
    gap: 1rem;
    width: 100%;
}

.card-combination-item {
    background-color: #333;
    color: white;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 8px;
}

.card-combination-item h3 {
    margin: 0 0 0.5rem 0;
    font-size: 1.5rem;
    font-weight: bold;
    text-align: center;
}

.card-combination-item p {
    margin: 0;
    font-size: 1rem;
    opacity: 0.8;
    text-align: center;
}

.card-combination-item.large-card {
    flex-basis: 150px;
    min-height: 200px;
}

.card-combination-item.large-card h3 {
    writing-mode: vertical-rl;
    text-orientation: upright;
    font-size: 1.8rem;
    letter-spacing: 0.5rem;
    margin: 0;
}

.card-combination-item.large-card p {
    writing-mode: vertical-rl;
    text-orientation: upright;
    font-size: 0.9rem;
    letter-spacing: 0.3rem;
    margin-top: 1rem;
    opacity: 0.7;
}

.card-combination-right {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    flex: 1;
}

.card-combination-item.small-card {
    flex: 1;
    min-height: 95px;
    flex-direction: column;
}

.card-combination-item.small-card h3 {
    font-size: 1.3rem;
    margin: 0;
}

.card-combination-item.small-card p {
    font-size: 0.9rem;
    margin-top: 0.5rem;
    opacity: 0.7;
}

/* 商品展示区域样式 */
.products-section {
    margin: 2rem auto 1rem;
    max-width: 1200px;
    padding: 0 15px;
}

.products-tabs {
    display: flex;
    margin-bottom: 1.5rem;
}

.products-tab {
    padding: 0.8rem 2rem;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    position: relative;
    color: #333;
    white-space: nowrap;
    min-width: 100px;
    text-align: center;
}

.products-tab.active {
    color: #ff0000;
    font-weight: bold;
}

.products-tab.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 2rem;
    right: 2rem;
    height: 3px;
    background-color: #ff0000;
}

.products-container {
    width: 100%;
}

.products-tab-content {
    display: none;
}

.products-tab-content.active {
    display: block;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.product-item {
    background-color: white;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.2s ease;
}

.product-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

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

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

.product-tag {
    position: absolute;
    top: 0.5rem;
    left: 0.5rem;
    background-color: #ff4d4f;
    color: white;
    font-size: 0.75rem;
    font-weight: bold;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    z-index: 10;
}

.product-tag.secondary {
    top: 2.5rem;
    background-color: #fa8c16;
}

.product-tag.vip {
    background-color: #722ed1;
}

.product-tag.hot {
    background-color: #ff4d4f;
}

.product-tag.discount {
    background-color: #13c2c2;
}

.product-info {
    padding: 1rem;
}

.product-title {
    margin: 0 0 0.5rem 0;
    font-size: 1rem;
    font-weight: 500;
    color: #333;
    height: 40px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.product-price {
    margin: 0 0 0.25rem 0;
    font-size: 1.1rem;
    font-weight: bold;
    color: #ff4d4f;
}

.product-sales {
    margin: 0;
    font-size: 0.8rem;
    color: #999;
}

/* 今日推荐区域样式 */
.today-recommended-section {
    margin: 1rem auto 1rem;
    max-width: 1200px;
    padding: 0 15px;
}

.today-recommended-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.today-recommended-header h2 {
    margin: 0;
    font-size: 1.2rem;
    font-weight: bold;
    position: relative;
    padding-left: 1rem;
}

.today-recommended-header h2::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 1.2rem;
    background-color: #ff0000;
}

.today-recommended-dots {
    display: flex;
    gap: 0.5rem;
}

.today-recommended-dots .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #ddd;
}

.today-recommended-dots .dot.active {
    background-color: #ff0000;
}

.today-recommended-tabs {
    position: relative;
}

.today-recommended-tab {
    display: none;
    flex: 1;
    gap: 1rem;
}

.today-recommended-tab.active {
    display: flex;
}

.today-recommended-item {
    flex: 1;
    background-color: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.today-recommended-image {
    width: 100%;
    height: 200px;
    overflow: hidden;
}

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

.today-recommended-info {
    padding: 1rem;
}

.today-recommended-title {
    margin: 0 0 0.5rem 0;
    font-size: 1rem;
    font-weight: 500;
}

.today-recommended-price {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.today-recommended-price .current-price {
    font-size: 1.1rem;
    font-weight: bold;
    color: #ff0000;
}

.today-recommended-price .original-price {
    font-size: 0.9rem;
    color: #999;
    text-decoration: line-through;
}

/* 倒计时区域样式 */
.countdown-section {
    margin: 1rem auto 1rem;
    max-width: 1200px;
    padding: 0 15px;
}

.countdown-container {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.countdown-image {
    flex: 0 0 auto;
}

.countdown-image img {
    width: 120px;
    height: 120px;
    object-fit: cover;
    border-radius: 4px;
    display: block;
}

.countdown-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.countdown-title {
    font-size: 1rem;
    font-weight: 500;
    margin: 0;
    color: #333;
    line-height: 1.3;
}

.countdown-price {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.current-price {
    font-size: 1.2rem;
    font-weight: bold;
    color: #ff0000;
}

.original-price {
    font-size: 0.9rem;
    color: #999;
    text-decoration: line-through;
}

.countdown-timer {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.countdown-label {
    font-size: 0.9rem;
    color: #333;
}

.countdown-numbers {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.countdown-digit {
    background-color: #ff0000;
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-weight: bold;
    font-size: 1rem;
}

.countdown-separator {
    color: #ff0000;
    font-weight: bold;
    font-size: 1rem;
}

main {
    max-width: 1200px;
    margin: 0 auto;
}

section {
    margin-top: 30px;
    background-color: #fff;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
}

/* 卡片区域特殊处理 */
.cards-section {
    margin-top: 0;
    background-color: transparent;
    padding: 0 10px;
    border: none;
    box-shadow: none;
}

section h2 {
    text-align: center;
    margin-bottom: 20px;
    color: #333;
}

.role-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.role-card {
    padding: 20px;
    background-color: #f9f9f9;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
    text-align: center;
}

.role-card h3 {
    margin-bottom: 10px;
}

.role-card a {
    display: inline-block;
    margin-top: 10px;
    padding: 8px 16px;
    background-color: #333;
    color: white;
    text-decoration: none;
    border-radius: 4px;
}



/* 新增卡片区域样式 */
.cards-section {
    margin: 1.5rem auto;
    padding: 0 10px;
    max-width: 100%;
    background-color: transparent;
    overflow: hidden;
    border: none;
    box-shadow: none;
}

.cards-container {
    display: flex;
    justify-content: space-around;
    gap: 10px;
    width: 100%;
}

.feature-card {
    flex: 1;
    width: calc(33.333% - 7px);
    min-width: 100px;
    padding: 10px;
    border-radius: 8px;
    text-align: center;
    color: white;
    transition: transform 0.3s ease;
}

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

.blue-card {
    background-color: #00b8d4;
}

.red-card {
    background-color: #f44336;
}

.yellow-card {
    background-color: #ffc107;
}

.card-icon {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.feature-card h3 {
    font-size: 0.9rem;
    font-weight: bold;
}

/* 幻灯片区域样式 */
.slider-section {
    position: relative;
    width: 100%;
    height: 250px;
    overflow: hidden;
    margin: 0;
    padding: 0;
    border-radius: 0;
    box-shadow: none;
}

.slider-container {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.slider-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1s ease-in-out;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-color: #333;
}

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

/* 幻灯片背景图片 */
.slider-slide:nth-child(1) {
    background-image: linear-gradient(rgba(0,0,0,0.5), rgba(0,0,0,0.5)), url('https://picsum.photos/1200/600?random=1');
}

.slider-slide:nth-child(2) {
    background-image: linear-gradient(rgba(0,0,0,0.5), rgba(0,0,0,0.5)), url('https://picsum.photos/1200/600?random=2');
}

.slider-slide:nth-child(3) {
    background-image: linear-gradient(rgba(0,0,0,0.5), rgba(0,0,0,0.5)), url('https://picsum.photos/1200/600?random=3');
}

.slide-content {
    position: absolute;
    bottom: 40px;
    left: 20px;
    right: 20px;
    color: white;
    z-index: 10;
    max-width: 90%;
}

.slide-content h3 {
    font-size: 1.5rem;
    font-weight: bold;
    margin-bottom: 8px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.slide-content p {
    font-size: 0.9rem;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
}

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

.slider-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: rgba(255,255,255,0.5);
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.slider-dot.active {
    background-color: white;
    transform: scale(1.2);
}

.slider-dot:hover {
    background-color: rgba(255,255,255,0.8);
}
