/* 天猫商城通用样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
    color: #333;
    background: #f5f5f5;
}

.container {
    width: 1200px;
    margin: 0 auto;
}

a {
    text-decoration: none;
    color: #333;
}

a:hover {
    color: #ff5000;
}

/* 顶部导航栏 */
.top-bar {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-bottom: none;
    height: 35px;
    line-height: 35px;
    font-size: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.top-bar .container {
    display: flex;
    justify-content: space-between;
}

.top-bar span {
    color: rgba(255, 255, 255, 0.9);
}

.top-bar a {
    color: rgba(255, 255, 255, 0.9);
    margin: 0 10px;
    transition: all 0.3s;
    padding: 2px 8px;
    border-radius: 4px;
}

.top-bar a:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.15);
}

/* 头部 */
.header {
    background: #fff;
    padding: 25px 0;
    border-bottom: none;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo img {
    height: 50px;
}

.search-box {
    flex: 1;
    margin: 0 50px;
}

.search-box form {
    display: flex;
    height: 40px;
}

.search-box input {
    flex: 1;
    padding: 0 20px;
    border: 2px solid #ff5000;
    border-right: none;
    border-radius: 25px 0 0 25px;
    font-size: 14px;
    outline: none;
    transition: all 0.3s;
}

.search-box input:focus {
    border-color: #ff6600;
    box-shadow: 0 0 0 3px rgba(255, 80, 0, 0.1);
}

.search-box button {
    width: 100px;
    background: linear-gradient(135deg, #ff5000, #ff6600);
    color: #fff;
    border: none;
    border-radius: 0 25px 25px 0;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 2px 8px rgba(255, 80, 0, 0.3);
}

.search-box button:hover {
    background: linear-gradient(135deg, #ff6600, #ff7700);
    box-shadow: 0 4px 12px rgba(255, 80, 0, 0.4);
    transform: translateY(-1px);
}

.user-info {
    color: #666;
}

.user-info a {
    margin-left: 10px;
    color: #ff5000;
}

/* 导航菜单 */
.nav-menu {
    background: linear-gradient(135deg, #ff5000 0%, #ff6600 100%);
    color: #fff;
    box-shadow: 0 2px 10px rgba(255, 80, 0, 0.2);
}

.nav-menu .container {
    display: flex;
    height: 48px;
    line-height: 48px;
}

.category-menu {
    width: 220px;
    background: rgba(0, 0, 0, 0.1);
    position: relative;
    border-radius: 0;
}

.category-menu h3 {
    padding: 0 20px;
    font-size: 16px;
    font-weight: 600;
    letter-spacing: 1px;
}

.category-menu ul {
    position: absolute;
    top: 48px;
    left: 0;
    width: 220px;
    background: #fff;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    display: none;
    z-index: 100;
    border-radius: 0 0 8px 8px;
    overflow: hidden;
    animation: slideDown 0.3s;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.category-menu:hover ul {
    display: block;
}

.category-menu li {
    padding: 0 20px;
    height: 45px;
    line-height: 45px;
    border-bottom: 1px solid #f5f5f5;
    transition: all 0.2s;
}

.category-menu li:last-child {
    border-bottom: none;
}

.category-menu li a {
    color: #333;
    display: block;
    font-size: 14px;
}

.category-menu li:hover {
    background: linear-gradient(90deg, #fff2e8, #fff);
    padding-left: 25px;
    border-left: 3px solid #ff5000;
}

.nav-links {
    flex: 1;
    display: flex;
    padding-left: 30px;
    align-items: center;
}

.nav-links a {
    padding: 0 25px;
    color: #fff;
    font-size: 15px;
    font-weight: 500;
    transition: all 0.3s;
    position: relative;
    height: 48px;
    line-height: 48px;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%) scaleX(0);
    width: 60%;
    height: 3px;
    background: rgba(255, 255, 255, 0.8);
    transition: transform 0.3s;
    border-radius: 2px;
}

.nav-links a:hover {
    background: rgba(255, 255, 255, 0.1);
}

.nav-links a:hover::after {
    transform: translateX(-50%) scaleX(1);
}

/* 商品卡片 */
.product-card {
    background: #fff;
    border: 1px solid #f0f0f0;
    padding: 0;
    margin-bottom: 0;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.product-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #ff5000, #ff6600);
    transform: scaleX(0);
    transition: transform 0.3s;
    z-index: 1;
}

.product-card:hover::before {
    transform: scaleX(1);
}

.product-card:hover {
    box-shadow: 0 8px 25px rgba(255, 80, 0, 0.15);
    transform: translateY(-8px);
    border-color: #ff5000;
}

.product-card img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    margin-bottom: 0;
    transition: transform 0.4s;
    background: #f5f5f5;
}

.product-card:hover img {
    transform: scale(1.05);
}

.product-card .name {
    font-size: 14px;
    color: #333;
    height: 42px;
    overflow: hidden;
    margin: 15px 15px 10px;
    line-height: 21px;
    font-weight: 500;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
}

.product-card .price {
    color: #ff5000;
    font-size: 22px;
    font-weight: 700;
    margin: 0 15px 8px;
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.product-card .original-price {
    color: #999;
    font-size: 13px;
    text-decoration: line-through;
    font-weight: 400;
}

.product-card .info {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: #999;
    margin: 0 15px 15px;
    padding-top: 10px;
    border-top: 1px solid #f5f5f5;
}

/* 商品网格 */
.product-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 20px;
    margin-top: 20px;
}

@media (max-width: 1400px) {
    .product-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 1100px) {
    .product-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .product-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
}

/* 按钮 */
.btn {
    display: inline-block;
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    text-align: center;
}

.btn-primary {
    background: #ff5000;
    color: #fff;
}

.btn-primary:hover {
    background: #ff6600;
}

.btn-default {
    background: #fff;
    color: #333;
    border: 1px solid #e8e8e8;
}

.btn-default:hover {
    border-color: #ff5000;
    color: #ff5000;
}

/* 底部 */
.footer {
    background: linear-gradient(180deg, #2c3e50 0%, #34495e 100%);
    margin-top: 60px;
    padding: 50px 0 25px;
    border-top: none;
    color: rgba(255, 255, 255, 0.8);
    box-shadow: 0 -2px 20px rgba(0, 0, 0, 0.1);
}

.footer-links {
    display: flex;
    justify-content: space-around;
    margin-bottom: 35px;
}

.footer-column {
    flex: 1;
    max-width: 250px;
}

.footer-column h4 {
    margin-bottom: 20px;
    font-size: 16px;
    color: #fff;
    font-weight: 600;
    position: relative;
    padding-bottom: 10px;
}

.footer-column h4::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 2px;
    background: linear-gradient(90deg, #ff5000, #ff6600);
    border-radius: 1px;
}

.footer-column a {
    display: block;
    color: rgba(255, 255, 255, 0.7);
    font-size: 13px;
    margin-bottom: 10px;
    transition: all 0.3s;
    padding: 4px 0;
    position: relative;
    padding-left: 15px;
}

.footer-column a::before {
    content: '•';
    position: absolute;
    left: 0;
    color: rgba(255, 80, 0, 0.5);
    transition: all 0.3s;
}

.footer-column a:hover {
    color: #fff;
    padding-left: 20px;
    transform: translateX(5px);
}

.footer-column a:hover::before {
    color: #ff5000;
    transform: scale(1.3);
}

.footer-copyright {
    text-align: center;
    color: rgba(255, 255, 255, 0.6);
    font-size: 13px;
    padding-top: 25px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* 分页 */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 30px 0;
}

.pagination a {
    display: inline-block;
    padding: 8px 12px;
    margin: 0 5px;
    border: 1px solid #e8e8e8;
    color: #333;
}

.pagination a:hover,
.pagination a.active {
    background: #ff5000;
    color: #fff;
    border-color: #ff5000;
}

