 * {
     margin: 0;
     padding: 0;
     box-sizing: border-box;
     font-family: 'Segoe UI', 'Microsoft YaHei', sans-serif;
 }

 :root {
     --primary: #333333;
     --secondary: #f5f5f5;
     --accent: #ff6b6b;
     --light-gray: #e0e0e0;
     --text: #333333;
     --light-text: #777777;
 }

 body {
     background-color: #ffffff;
     color: var(--text);
     line-height: 1.6;
 }

 /* 顶部导航 */
 header {
     background-color: white;
     box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
     position: sticky;
     top: 0;
     z-index: 100;
     padding: 1rem 5%;
 }

 .navbar {
     display: flex;
     justify-content: space-between;
     align-items: center;
 }

 .logo {
     font-size: 1.8rem;
     font-weight: 700;
     color: var(--primary);
     text-decoration: none;
     display: flex;
     align-items: center;
 }

 .logo i {
     margin-right: 8px;
     color: var(--accent);
 }

 .nav-links {
     display: flex;
     gap: 2rem;
 }

 .nav-links a {
     color: var(--text);
     text-decoration: none;
     font-weight: 500;
     transition: color 0.3s;
 }

 .nav-links a:hover {
     color: var(--accent);
 }

 .cart-icon {
     position: relative;
     cursor: pointer;
 }

 .cart-count {
     position: absolute;
     top: -8px;
     right: -8px;
     background-color: var(--accent);
     color: white;
     border-radius: 50%;
     width: 20px;
     height: 20px;
     display: flex;
     justify-content: center;
     align-items: center;
     font-size: 0.7rem;
 }

 /* 主标题 */
 .hero {
     background: linear-gradient(rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.9)),
         url('../img/herobgphoto.avif');
     background-size: cover;
     background-position: center;
     text-align: center;
     padding: 6rem 2rem;
     margin-bottom: 3rem;
 }

 .hero h1 {
     font-size: 3.5rem;
     margin-bottom: 1rem;
     font-weight: 300;
 }

 .hero p {
     font-size: 1.2rem;
     max-width: 700px;
     margin: 0 auto 2rem;
     color: var(--light-text);
 }

 .btn {
     display: inline-block;
     background-color: var(--primary);
     color: white;
     padding: 12px 28px;
     border: none;
     border-radius: 2px;
     cursor: pointer;
     font-size: 1rem;
     transition: all 0.3s;
     text-decoration: none;
 }

 .btn:hover {
     background-color: var(--accent);
     transform: translateY(-2px);
     box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
 }

 /* 商品区域 */
 .container {
     max-width: 1200px;
     margin: 0 auto;
     padding: 0 20px;
 }

 .section-title {
     text-align: center;
     font-size: 2rem;
     font-weight: 300;
     margin-bottom: 3rem;
     position: relative;
 }

 .section-title::after {
     content: "";
     position: absolute;
     bottom: -10px;
     left: 50%;
     transform: translateX(-50%);
     width: 60px;
     height: 3px;
     background-color: var(--accent);
 }

 .products {
     display: grid;
     grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
     gap: 30px;
     margin-bottom: 5rem;
 }

 .product-card {
     background: white;
     border-radius: 4px;
     overflow: hidden;
     box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
     transition: transform 0.3s, box-shadow 0.3s;
 }

 .product-card:hover {
     transform: translateY(-10px);
     box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
 }

 .product-img {
     height: 200px;
     background-color: var(--secondary);
     display: flex;
     align-items: center;
     justify-content: center;
     overflow: hidden;
 }

 .product-img img {
     max-width: 80%;
     max-height: 80%;
     transition: transform 0.3s;
 }

 .product-card:hover .product-img img {
     transform: scale(1.05);
 }

 .product-info {
     padding: 20px;
 }

 .product-title {
     font-size: 1.2rem;
     margin-bottom: 8px;
 }

 .product-price {
     font-size: 1.4rem;
     font-weight: 600;
     color: var(--accent);
     margin-bottom: 15px;
 }

 .add-to-cart {
     width: 100%;
     background-color: var(--primary);
     color: white;
     border: none;
     padding: 10px;
     border-radius: 2px;
     cursor: pointer;
     transition: background-color 0.3s;
     font-weight: 500;
 }

 .add-to-cart:hover {
     background-color: var(--accent);
 }

 /* 购物车侧边栏 */
 .cart-sidebar {
     position: fixed;
     top: 0;
     right: -800px;
     width: 100%;
     max-width: 380px;
     height: 100vh;
     background-color: white;
     box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
     z-index: 1000;
     transition: right 0.4s ease;
     padding: 20px;
     display: flex;
     flex-direction: column;
 }

 .cart-sidebar.active {
     right: 0;
 }

 .cart-header {
     display: flex;
     justify-content: space-between;
     align-items: center;
     padding-bottom: 15px;
     border-bottom: 1px solid var(--light-gray);
     margin-bottom: 20px;
 }

 .close-cart {
     background: none;
     border: none;
     font-size: 1.5rem;
     cursor: pointer;
     color: var(--light-text);
 }

 .cart-items {
     flex-grow: 1;
     overflow-y: auto;
 }

 .cart-item {
     display: flex;
     padding: 15px 0;
     border-bottom: 1px solid var(--light-gray);
 }

 .cart-item-img {
     width: 80px;
     height: 80px;
     background-color: var(--secondary);
     margin-right: 15px;
     display: flex;
     align-items: center;
     justify-content: center;
 }

 .cart-item-img img {
     max-width: 70%;
     max-height: 70%;
 }

 .cart-item-details {
     flex-grow: 1;
 }

 .cart-item-title {
     font-weight: 500;
     margin-bottom: 5px;
 }

 .cart-item-price {
     color: var(--accent);
     font-weight: 600;
 }

 .cart-item-remove {
     background: none;
     border: none;
     color: var(--light-text);
     cursor: pointer;
     margin-top: 10px;
 }

 .cart-footer {
     padding-top: 20px;
     border-top: 1px solid var(--light-gray);
 }

 .cart-total {
     display: flex;
     justify-content: space-between;
     font-size: 1.2rem;
     font-weight: 600;
     margin-bottom: 20px;
 }

 .checkout-btn {
     width: 100%;
     padding: 15px;
     background-color: var(--accent);
     color: white;
     border: none;
     border-radius: 2px;
     cursor: pointer;
     font-size: 1rem;
     font-weight: 500;
     transition: background-color 0.3s;
 }

 .checkout-btn:hover {
     background-color: #e55a5a;
 }

 .cart-email {
     width: 100%;
     font-size: 1.2rem;
     margin-bottom: 10px;
     background: #f3f3f4;
     border-width: 0px;
     padding: 15px;
 }

 /* 页脚 */
 footer {
     background-color: var(--primary);
     color: white;
     padding: 4rem 0 2rem;
 }

 .footer-content {
     display: grid;
     grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
     gap: 30px;
     max-width: 1200px;
     margin: 0 auto;
     padding: 0 20px;
 }

 .footer-column h3 {
     font-size: 1.3rem;
     margin-bottom: 20px;
     position: relative;
     padding-bottom: 10px;
 }

 .footer-column h3::after {
     content: "";
     position: absolute;
     bottom: 0;
     left: 0;
     width: 40px;
     height: 2px;
     background-color: var(--accent);
 }

 .footer-links li {
     list-style: none;
     margin-bottom: 10px;
 }

 .footer-links a {
     color: #ccc;
     text-decoration: none;
     transition: color 0.3s;
 }

 .footer-links a:hover {
     color: white;
 }

 .copyright {
     text-align: center;
     padding-top: 2rem;
     margin-top: 3rem;
     border-top: 1px solid rgba(255, 255, 255, 0.1);
     color: #aaa;
 }

 .modal {
     display: none;
     /* 默认隐藏 */
     position: fixed;
     top: 0;
     left: 0;
     width: 100%;
     height: 120%;
     background: rgba(0, 0, 0, 0.5);
     /* 半透明遮罩 */
     z-index: 9999;
 }

 .modal-content {
     background: white;
     margin: 30% auto;
     /* 居中 */
     padding: 20px;
     width: 80%;
     max-width: 600px;
     /* 响应式限制 */
 }

 .close {
     float: right;
     font-size: 24px;
     cursor: pointer;
     margin-top: -12px;
 }

 /* 响应式设计 */
 @media (max-width: 768px) {
     .nav-links {
         display: none;
     }

     .hero h1 {
         font-size: 2.5rem;
     }

     .hero p {
         font-size: 1rem;
     }

     .cart-sidebar {
         max-width: 100%;
     }
 }