/* 基本样式 */
body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f5f5f5;
}

.app-container {
    max-width: 1200px;
    margin: 0 auto;
    background-color: white;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

/* 头部样式 */
header {
    background-color: #2c3e50;
    color: white;
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    flex-wrap: wrap;
    gap: 1rem;
}

/* 确保logo正确显示 */
.logo h1 {
    margin: 0;
    padding: 0;
    font-size: 1.5rem;
    color: white;
    text-align: center;
}

/* 主导航样式 */
.main-nav {
    flex: 1;
    margin: 0 1rem;
}

.nav-menu {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    gap: 1.5rem;
}

.nav-link {
    color: white;
    text-decoration: none;
    font-weight: 500;
    padding: 0.5rem 0.75rem;
    border-radius: 4px;
    transition: background-color 0.3s ease;
}

.nav-link:hover {
    background-color: rgba(255, 255, 255, 0.1);
    text-decoration: none;
    color: #ecf0f1;
}

.nav-link.active {
    background-color: #3498db;
    color: white;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
}

.search-container {
    flex: 1;
    max-width: 500px;
    margin: 0 1rem;
}

.search-input {
    width: 100%;
    padding: 0.5rem;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
}

.sort-container {
    margin-right: 1rem;
}

.sort-select {
    padding: 0.5rem;
    border: none;
    border-radius: 4px;
    background-color: white;
}

.cart-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.cart-link {
    color: white;
    text-decoration: none;
    font-weight: bold;
}

/* 内容区域 */
.content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

/* 内容区域布局 - 主内容容器 */
.content {
    display: flex;
    width: 100%;
    gap: 2rem;
}

/* 侧边栏样式 - 左侧位置 */
.sidebar {
    flex: 0 0 220px;
    background-color: #ffffff;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    height: fit-content;
    margin-right: 2rem;
    border: 1px solid #e9ecef;
}

.sidebar h3 {
    margin-top: 0;
    margin-bottom: 1.5rem;
    font-size: 1.2rem;
    color: #2c3e50;
}

.category-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

/* 主内容区域 */


.main-content h2 {
    margin-top: 0;
    margin-bottom: 1.5rem;
    font-size: 1.8rem;
    color: #2c3e50;
}

/* 商品网格 */
.product-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    justify-items: center;
}

/* 商品卡片基础样式 */
.product-item {
    width: 100%;
    max-width: 320px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    background-color: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0,0,0,0.1);
    padding: 1.75rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 340px;
    position: relative;
}

.product-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
}

/* 样式1：红色突出显示 */
.product-item.style-1 {
    background-color: #fff2f0;
    border: 1px solid #ffccc7;
}

.product-item.style-1:hover {
    background-color: #fff1f0;
    border-color: #ff8c8c;
}

/* 样式2：蓝色优雅风格 */
.product-item.style-2 {
    background-color: #f0f7ff;
    border: 1px solid #cce7ff;
    border-radius: 12px;
}

.product-item.style-2:hover {
    background-color: #e6f3ff;
    border-color: #99d1ff;
}

/* 样式3：绿色简约风格 */
.product-item.style-3 {
    background-color: #f6ffed;
    border: 1px solid #b7eb8f;
    border-radius: 6px;
}

.product-item.style-3:hover {
    background-color: #f0f9e8;
    border-color: #73d13d;
}

/* 样式4：橙色促销风格 */
.product-item.style-4 {
    background-color: #fffbe6;
    border: 1px solid #ffe58f;
    position: relative;
    overflow: visible;
}

.product-item.style-4::before {
    content: "促销";
    position: absolute;
    top: -1px;
    right: -20px;
    background-color: #ff7a45;
    color: white;
    padding: 5px 30px;
    transform: rotate(45deg);
    font-weight: bold;
    font-size: 0.8rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.product-item.style-4:hover {
    background-color: #fff7e6;
    border-color: #ffa940;
}

/* 样式5：紫色现代风格 */
.product-item.style-5 {
    background-color: #f9f0ff;
    border: 1px solid #d3adf7;
    border-radius: 8px;
}

.product-item.style-5:hover {
    background-color: #f4e8ff;
    border-color: #b37feb;
    transform: translateY(-5px) scale(1.02);
}

/* 商品卡片内部元素样式 - 图标样式在下方统一定义 */

/* 移除重复的样式定义，统一使用下方的white颜色定义 */

.product-item .product-desc {
    margin: 0 0 1rem 0;
    font-size: 0.9rem;
    color: #6c757d;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-item .product-price {
    font-size: 1.2rem;
    font-weight: bold;
    color: #dc3545;
    margin-bottom: 1rem;
}

.product-item .product-stock {
    font-size: 0.85rem;
    color: #28a745;
    margin-bottom: 1.5rem;
}

.product-item .btn {
    width: 100%;
    padding: 0.75rem;
    font-size: 1rem;
    font-weight: 500;
    border-radius: 4px;
    transition: background-color 0.3s ease;
}

/* 响应式设计优化 */
@media (max-width: 1200px) {
    .product-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .product-item,
    .product-item.style-1,
    .product-item.style-2,
    .product-item.style-3,
    .product-item.style-4,
    .product-item.style-5 {
        max-width: 240px;
        min-height: 320px;
    }
    
    .product-item.style-4::before {
        padding: 3px 20px;
        font-size: 0.7rem;
    }
}

@media (max-width: 1024px) {
    .product-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.2rem;
    }
    
    .product-item,
    .product-item.style-1,
    .product-item.style-2,
    .product-item.style-3,
    .product-item.style-4,
    .product-item.style-5 {
        max-width: 280px;
        min-height: 330px;
    }
}

@media (max-width: 768px) {
    .product-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    
    .product-item,
    .product-item.style-1,
    .product-item.style-2,
    .product-item.style-3,
    .product-item.style-4,
    .product-item.style-5 {
        max-width: 180px;
        min-height: 300px;
        padding: 1.25rem;
    }
    
    .product-item.style-4::before {
        padding: 2px 15px;
        font-size: 0.6rem;
        right: -15px;
    }
}

@media (max-width: 480px) {
    .product-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .product-item,
    .product-item.style-1,
    .product-item.style-2,
    .product-item.style-3,
    .product-item.style-4,
    .product-item.style-5 {
        max-width: 100%;
        min-height: 320px;
        padding: 1.5rem;
    }
    
    .product-item.style-4::before {
        padding: 3px 25px;
        font-size: 0.7rem;
        right: -25px;
    }
}

/* 表单元素样式 */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: bold;
}

.form-input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 1rem;
}

textarea.form-input {
    resize: vertical;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
}

/* 支付方式选项 */
.payment-options {
    display: flex;
    gap: 1rem;
    margin-top: 0.5rem;
}

.payment-options label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: normal;
}

/* 表单操作区域 */
.form-actions {
    margin-top: 2rem;
    text-align: right;
}

/* 购物车相关样式 */
.cart-actions {
    margin-top: 2rem;
    display: flex;
    justify-content: flex-start;
    gap: 1rem;
}

.order-form {
    margin-top: 2rem;
    padding: 1rem;
    border: 1px solid #e9ecef;
    border-radius: 4px;
}

.order-form h2 {
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

/* 侧边栏样式 */
.sidebar {
    width: 200px;
    padding: 1rem;
    background-color: #ffffff;
    border-right: 1px solid #e9ecef;
    margin-right: 2rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.sidebar h3 {
    margin-top: 0;
}

.category-list {
    list-style: none;
    padding: 0;
}

.category-item {
    margin-bottom: 0.5rem;
}

.category-link {
    display: block;
    padding: 0.5rem;
    text-decoration: none;
    color: #333;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.category-link:hover {
    background-color: #e9ecef;
}

.category-link.active {
    background-color: #007bff;
    color: white;
}

/* 主内容区域 */


/* 商品卡片样式（兼容product-card类） */
.product-card {
    /* 继承product-item的所有样式 */
    width: 100%;
    max-width: 280px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    background-color: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 320px;
}

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

/* 确保商品卡片内元素样式统一 */
.product-card .product-icon,
.product-item .product-icon {
    font-size: 3rem;
    text-align: center;
    margin-bottom: 1rem;
    color: #e9ecef;
}

.product-card .product-title,
.product-item h3 {
    margin: 0 0 0.75rem 0;
    font-size: 1.1rem;
    color: white;
    font-weight: 600;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-card .product-desc {
    margin: 0 0 1rem 0;
    font-size: 0.9rem;
    color: #6c757d;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-card .product-price,
.product-item .product-price {
    font-size: 1.2rem;
    font-weight: bold;
    color: #dc3545;
    margin-bottom: 1rem;
}

.product-card .product-stock,
.product-item .product-stock {
    font-size: 0.85rem;
    color: #28a745;
    margin-bottom: 1.5rem;
}

.product-actions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

/* 响应式设计中确保product-card也能适应 */
@media (max-width: 1200px) {
    .product-card {
        max-width: 240px;
    }
}

@media (max-width: 1024px) {
    .product-card {
        max-width: 220px;
    }
}

@media (max-width: 768px) {
    .product-card {
        max-width: 180px;
    }
}

@media (max-width: 480px) {
    .product-card {
        max-width: 100%;
    }
}

.btn {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.btn-primary {
    background-color: #007bff;
    color: white;
    width: 100%;
    padding: 0.75rem;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    text-decoration: none;
    display: inline-block;
    text-align: center;
    transition: background-color 0.3s ease;
}

.btn-primary:hover {
    background-color: #0056b3;
}

.btn-primary:disabled {
    background-color: #cccccc;
    cursor: not-allowed;
}

.btn-secondary {
    background-color: #6c757d;
    color: white;
    width: 100%;
    padding: 0.75rem;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    text-decoration: none;
    display: block;
    text-align: center;
    transition: background-color 0.3s ease;
}

.btn-secondary:hover {
    background-color: #5a6268;
}

.btn-success {
    background-color: #28a745;
    color: white;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    text-decoration: none;
    display: inline-block;
    text-align: center;
    transition: background-color 0.3s ease;
}

.btn-success:hover {
    background-color: #218838;
}

.btn-info {
    background-color: #17a2b8;
    color: white;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    text-decoration: none;
    display: inline-block;
    text-align: center;
    transition: background-color 0.3s ease;
}

.btn-info:hover {
    background-color: #138496;
}

/* 加载状态 */
.loading {
    text-align: center;
    padding: 2rem;
    color: #6c757d;
}

/* 通知样式 */
.notification {
    padding: 1rem;
    margin: 1rem 0;
    border-radius: 4px;
    text-align: center;
}

.notification-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.notification-error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.notification-warning {
    background-color: #fff3cd;
    color: #856404;
    border: 1px solid #ffeeba;
}

/* 管理员登录样式 */
.login-form {
    text-align: left;
}

.form-title {
    font-size: 1.5rem;
    font-weight: bold;
    color: #2c3e50;
    margin-bottom: 1.5rem;
    text-align: center;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: bold;
    color: #495057;
}

.form-input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 1rem;
    box-sizing: border-box;
}

.form-input:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

.error-message {
    background-color: #f8d7da;
    color: #721c24;
    padding: 0.75rem;
    border: 1px solid #f5c6cb;
    border-radius: 4px;
    margin-bottom: 1.5rem;
    text-align: center;
}

.back-link {
    display: block;
    text-align: center;
    margin-top: 1rem;
    color: #007bff;
    text-decoration: none;
}

.back-link:hover {
    text-decoration: underline;
}

/* 管理员后台样式 */
.admin-container {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 200px;
    padding: 1rem;
    background-color: #ffffff;
    color: #333333;
    padding: 1rem;
    border: 1px solid #e9ecef;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.sidebar h2 {
    margin-top: 0;
    font-size: 1.2rem;
    color: #2c3e50;
    font-weight: 600;
}

.sidebar-nav {
    list-style: none;
    padding: 0;
    margin: 1rem 0 0 0;
}

.sidebar-nav li {
    margin-bottom: 0.5rem;
}

.sidebar-nav a {
    color: #333333;
    text-decoration: none;
    display: block;
    padding: 0.5rem;
    border-radius: 4px;
    transition: background-color 0.2s, color 0.2s;
}

.sidebar-nav a:hover {
    background-color: #f8f9fa;
    color: #007bff;
}

.sidebar-nav a.active {
    background-color: #007bff;
    color: white;
}

.admin-main {
    flex: 1;
    padding: 1rem;
    background-color: #f5f5f5;
}

.admin-header {
    background: white;
    padding: 1rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.admin-header h1 {
    margin: 0;
    font-size: 1.5rem;
    color: #2c3e50;
}

.admin-actions {
    display: flex;
    gap: 0.5rem;
}

.admin-content {
    background: white;
    padding: 1rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.section-title {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    color: #2c3e50;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1rem;
}

.data-table th,
.data-table td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid #e9ecef;
}

.data-table th {
    background-color: #f8f9fa;
    font-weight: bold;
    color: #495057;
}

.data-table tr:hover {
    background-color: #f8f9fa;
}

.status-badge {
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: bold;
    text-transform: uppercase;
}

.status-pending {
    background-color: #fff3cd;
    color: #856404;
}

.status-paid {
    background-color: #d1ecf1;
    color: #0c5460;
}

.status-completed {
    background-color: #d4edda;
    color: #155724;
}

.status-cancelled {
    background-color: #f8d7da;
    color: #721c24;
}

.status-payment_failed {
    background-color: #f8d7da;
    color: #721c24;
}

/* 订单详情样式 */
.order-detail {
    background: white;
    padding: 1rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 1rem;
}

.order-info {
    margin-bottom: 1rem;
}

.order-info h3 {
    margin-top: 0;
    margin-bottom: 0.5rem;
    color: #2c3e50;
}

.order-info p {
    margin: 0.25rem 0;
    color: #6c757d;
}

.order-items {
    margin-top: 1rem;
}

.order-items h4 {
    margin-top: 0;
    margin-bottom: 0.5rem;
    color: #2c3e50;
}

.order-item {
    border: 1px solid #e9ecef;
    border-radius: 4px;
    padding: 0.75rem;
    margin-bottom: 0.5rem;
    background-color: #f8f9fa;
}

.order-item h5 {
    margin-top: 0;
    margin-bottom: 0.25rem;
    color: #2c3e50;
}

.order-item p {
    margin: 0.25rem 0;
    color: #6c757d;
}

/* 结账页面样式 */
.checkout-container {
    max-width: 800px;
    margin: 0 auto;
    background-color: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.checkout-header {
    text-align: center;
    margin-bottom: 2rem;
}

.checkout-header h1 {
    color: #2c3e50;
}

.checkout-content {
    display: flex;
    gap: 2rem;
}

.checkout-form {
    flex: 1;
}

.cart-summary {
    flex: 0 0 300px;
    background-color: #f8f9fa;
    padding: 1.5rem;
    border-radius: 8px;
    height: fit-content;
}

.cart-summary h3 {
    margin-top: 0;
    margin-bottom: 1rem;
    color: #2c3e50;
}

.cart-items {
    margin-bottom: 1rem;
}

.cart-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #e9ecef;
}

.cart-item:last-child {
    border-bottom: none;
    margin-bottom: 1rem;
    padding-bottom: 0;
}

.cart-total {
    display: flex;
    justify-content: space-between;
    font-weight: bold;
    font-size: 1.2rem;
    color: #2c3e50;
    margin-bottom: 1rem;
}

.payment-methods {
    margin-top: 1rem;
}

.payment-methods h4 {
    margin-top: 0;
    margin-bottom: 0.5rem;
    color: #2c3e50;
}

.payment-option {
    margin-bottom: 0.5rem;
}

/* 商品详情样式 */
.product-detail-container {
    max-width: 800px;
    margin: 0 auto;
    background-color: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.product-detail-header {
    text-align: center;
    margin-bottom: 2rem;
}

.product-detail-header h1 {
    color: #2c3e50;
    margin-bottom: 0.5rem;
}

.product-detail-price {
    font-size: 1.5rem;
    color: #dc3545;
    font-weight: bold;
    margin-bottom: 1rem;
}

.product-detail-content {
    display: flex;
    gap: 2rem;
}

.product-detail-image {
    flex: 0 0 300px;
    text-align: center;
}

.product-detail-info {
    flex: 1;
}

.product-detail-description {
    margin-bottom: 1rem;
    color: #6c757d;
}

.product-detail-stock {
    margin-bottom: 1rem;
    color: #28a745;
    font-weight: bold;
}

.product-detail-actions {
    margin-top: 2rem;
}

.quantity-control {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.quantity-input {
    width: 60px;
    padding: 0.5rem;
    border: 1px solid #ced4da;
    border-radius: 4px;
    text-align: center;
}

/* 订单成功样式 */
.success-container {
    max-width: 600px;
    margin: 0 auto;
    background-color: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    text-align: center;
}

.success-icon {
    font-size: 4rem;
    color: #28a745;
    margin-bottom: 1rem;
}

.success-title {
    color: #2c3e50;
    margin-bottom: 1rem;
}

.success-message {
    color: #6c757d;
    margin-bottom: 2rem;
}

.success-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

/* 购物车页面样式 */
.cart-container, .purchase-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.cart-title, .purchase-title {
    margin-bottom: 2rem;
    font-size: 2rem;
    color: #333;
    text-align: center;
}

.empty-cart {
    text-align: center;
    padding: 3rem;
}

.empty-cart h2 {
    margin-bottom: 1rem;
    color: #333;
}

.empty-cart p {
    margin-bottom: 2rem;
    color: #666;
}

.empty-cart a {
    color: #007bff;
    text-decoration: none;
}

.empty-cart a:hover {
    text-decoration: underline;
}

.cart-items {
    margin-bottom: 2rem;
}

.cart-item {
    display: flex;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid #e9ecef;
    transition: background-color 0.2s ease;
}

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

.cart-item:hover {
    background-color: #f8f9fa;
}

.cart-item-icon {
    font-size: 2rem;
    margin-right: 1rem;
    flex-shrink: 0;
}

.cart-item-info {
    flex: 1;
}

.cart-item-title {
    font-weight: bold;
    margin-bottom: 0.5rem;
    color: #333;
}

.cart-item-price {
    color: #dc3545;
    font-weight: bold;
}

.cart-item-quantity {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-right: 1rem;
}

.cart-item-subtotal {
    font-weight: bold;
    margin-right: 2rem;
    color: #333;
    min-width: 80px;
    text-align: right;
}

.quantity-input {
    width: 70px;
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    text-align: center;
}

.update-form, .remove-form {
    display: flex;
    align-items: center;
}

.remove-form {
    margin-left: auto;
}

.cart-actions {
    display: flex;
    justify-content: space-between;
    margin-top: 2rem;
    margin-bottom: 2rem;
}

.order-form {
    margin-top: 2rem;
    padding: 1rem;
    border: 1px solid #e9ecef;
    border-radius: 4px;
}

.order-form h2 {
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
    color: #333;
}

.cart-total {
    margin: 2rem 0;
    padding: 1rem;
    background-color: #f8f9fa;
    border-radius: 4px;
    display: flex;
    justify-content: space-between;
    font-size: 1.25rem;
}

.total-label {
    font-weight: bold;
}

.total-amount {
    font-weight: bold;
    color: #e74c3c;
    font-size: 1.5rem;
}

.form-actions {
    margin-top: 2rem;
    text-align: right;
}

.payment-options {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

/* 购买页面特定样式 */
.checkout-steps {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 3rem;
    padding: 1rem 0;
    border-bottom: 2px solid #e9ecef;
}

.step {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
    position: relative;
}

.step-number {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: #e9ecef;
    color: #666;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    margin-bottom: 0.5rem;
    transition: all 0.3s ease;
}

.step-title {
    font-size: 0.9rem;
    color: #666;
    text-align: center;
}

.step-active .step-number {
    background-color: #007bff;
    color: white;
}

.step-active .step-title {
    color: #007bff;
    font-weight: bold;
}

.step-divider {
    height: 2px;
    background-color: #e9ecef;
    flex: 1;
    position: relative;
    margin: 0 1rem;
}

.checkout-content {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 2rem;
}

.cart-items-section {
    grid-column: 1 / -1;
}

.checkout-forms {
    grid-column: 1;
}

.order-summary {
    grid-column: 2;
    grid-row: 2;
    background-color: #f8f9fa;
    border-radius: 8px;
    padding: 1.5rem;
    position: sticky;
    top: 2rem;
}

.cart-items-section h2,
.checkout-forms h2,
.order-summary h2 {
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
    color: #333;
    border-bottom: 1px solid #e9ecef;
    padding-bottom: 0.75rem;
}

.shipping-info-section,
.payment-section {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background-color: #fafafa;
    border-radius: 8px;
}

.payment-option {
    display: flex;
    align-items: center;
    padding: 1rem;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    margin-bottom: 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.payment-option:hover {
    border-color: #007bff;
}

.payment-option input[type="radio"] {
    margin-right: 1rem;
    width: 18px;
    height: 18px;
}

.payment-details {
    flex: 1;
}

.payment-icon {
    font-weight: bold;
    margin-bottom: 0.25rem;
}

.payment-description {
    font-size: 0.9rem;
    color: #666;
}

.credit-card-form {
    padding: 1.5rem;
    background-color: #f8f9fa;
    border-radius: 8px;
    margin-bottom: 2rem;
}

.coupon-section {
    margin-top: 1.5rem;
}

.coupon-input-wrapper {
    display: flex;
    gap: 0.5rem;
}

.coupon-input {
    flex: 1;
}

.apply-coupon {
    white-space: nowrap;
}

.summary-content {
    margin-bottom: 1.5rem;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.75rem;
    padding: 0.5rem 0;
}

.discount-row {
    color: #28a745;
}

.summary-divider {
    height: 1px;
    background-color: #e9ecef;
    margin: 1rem 0;
}

.total-row {
    font-weight: bold;
    font-size: 1.1rem;
    padding-top: 0.75rem;
}

.terms-agreement {
    margin-bottom: 1.5rem;
    padding: 1rem;
    background-color: #f0f7ff;
    border-radius: 4px;
}

.terms-label {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: #666;
}

.terms-label input[type="checkbox"] {
    margin-top: 0.25rem;
}

.terms-link {
    color: #007bff;
    text-decoration: none;
}

.terms-link:hover {
    text-decoration: underline;
}

.place-order-btn {
    width: 100%;
    padding: 1rem;
    font-size: 1.1rem;
    font-weight: bold;
}

/* 响应式设计 */
@media (max-width: 992px) {
    .checkout-content {
        grid-template-columns: 1fr;
    }
    
    .order-summary {
        grid-column: 1;
        grid-row: auto;
        position: static;
    }
    
    .checkout-steps {
        flex-wrap: wrap;
    }
    
    .step {
        margin-bottom: 1rem;
    }
    
    .step-divider {
        display: none;
    }
}

@media (max-width: 768px) {
    .cart-item {
        flex-wrap: wrap;
    }
    
    .cart-item-info {
        flex: 1 1 100%;
        margin-bottom: 1rem;
    }
    
    .cart-item-quantity,
    .cart-item-subtotal {
        margin-right: 1rem;
        margin-bottom: 1rem;
    }
    
    .remove-form {
        margin-left: auto;
        margin-bottom: 0;
    }
    
    .coupon-input-wrapper {
        flex-direction: column;
    }
    
    .apply-coupon {
        width: 100%;
    }
}

/* CSS重置和标准化 - 确保跨浏览器一致性 */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* 为常见元素添加标准化样式 */
button, input, select, textarea {
    font-family: inherit;
    font-size: inherit;
    line-height: inherit;
}

/* 商品详情页面样式 */
.back-link {
    display: inline-block;
    margin-bottom: 2rem;
    color: #007bff;
    text-decoration: none;
    font-size: 1rem;
    transition: all 0.2s ease;
    -webkit-transition: all 0.2s ease;
    -moz-transition: all 0.2s ease;
    -ms-transition: all 0.2s ease;
    -o-transition: all 0.2s ease;
}

.back-link:hover {
    text-decoration: underline;
    transform: translateX(-3px);
    -webkit-transform: translateX(-3px);
    -moz-transform: translateX(-3px);
    -ms-transform: translateX(-3px);
    -o-transform: translateX(-3px);
}

.product-detail {
    display: -webkit-flex;
    display: -moz-flex;
    display: -ms-flex;
    display: -o-flex;
    display: flex;
    gap: 3rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
    -webkit-flex-wrap: wrap;
    -moz-flex-wrap: wrap;
    -ms-flex-wrap: wrap;
    -o-flex-wrap: wrap;
    align-items: flex-start;
    -webkit-align-items: flex-start;
    -moz-align-items: flex-start;
    -ms-align-items: flex-start;
    -o-align-items: flex-start;
    background-color: #ffffff;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.05);
    -webkit-box-shadow: 0 4px 20px rgba(0,0,0,0.05);
    -moz-box-shadow: 0 4px 20px rgba(0,0,0,0.05);
    -ms-box-shadow: 0 4px 20px rgba(0,0,0,0.05);
    -o-box-shadow: 0 4px 20px rgba(0,0,0,0.05);
    transition: box-shadow 0.3s ease;
    -webkit-transition: box-shadow 0.3s ease;
    -moz-transition: box-shadow 0.3s ease;
    -ms-transition: box-shadow 0.3s ease;
    -o-transition: box-shadow 0.3s ease;
}

.product-detail:hover {
    box-shadow: 0 6px 30px rgba(0,0,0,0.08);
    -webkit-box-shadow: 0 6px 30px rgba(0,0,0,0.08);
    -moz-box-shadow: 0 6px 30px rgba(0,0,0,0.08);
    -ms-box-shadow: 0 6px 30px rgba(0,0,0,0.08);
    -o-box-shadow: 0 6px 30px rgba(0,0,0,0.08);
}

.product-image {
    flex: 1;
    -webkit-flex: 1;
    -moz-flex: 1;
    -ms-flex: 1;
    -o-flex: 1;
    min-width: 250px;
    text-align: center;
    padding: 2rem;
    background-color: #ffffff;
    border-radius: 10px;
    display: -webkit-flex;
    display: -moz-flex;
    display: -ms-flex;
    display: -o-flex;
    display: flex;
    justify-content: center;
    -webkit-justify-content: center;
    -moz-justify-content: center;
    -ms-justify-content: center;
    -o-justify-content: center;
    align-items: center;
    -webkit-align-items: center;
    -moz-align-items: center;
    -ms-align-items: center;
    -o-align-items: center;
    min-height: 350px;
    border: 1px solid #e9ecef;
    position: relative;
    overflow: hidden;
}

.product-image::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.8) 0%, rgba(255,255,255,0) 100%);
    background: -webkit-linear-gradient(135deg, rgba(255,255,255,0.8) 0%, rgba(255,255,255,0) 100%);
    background: -moz-linear-gradient(135deg, rgba(255,255,255,0.8) 0%, rgba(255,255,255,0) 100%);
    background: -ms-linear-gradient(135deg, rgba(255,255,255,0.8) 0%, rgba(255,255,255,0) 100%);
    background: -o-linear-gradient(135deg, rgba(255,255,255,0.8) 0%, rgba(255,255,255,0) 100%);
    pointer-events: none;
}

.product-icon-large {
    font-size: 10rem;
    margin-bottom: 1rem;
    transition: transform 0.3s ease;
    -webkit-transition: transform 0.3s ease;
    -moz-transition: transform 0.3s ease;
    -ms-transition: transform 0.3s ease;
    -o-transition: transform 0.3s ease;
}

.product-image:hover .product-icon-large {
    transform: scale(1.05);
    -webkit-transform: scale(1.05);
    -moz-transform: scale(1.05);
    -ms-transform: scale(1.05);
    -o-transform: scale(1.05);
}

.product-info {
    flex: 2;
    -webkit-flex: 2;
    -moz-flex: 2;
    -ms-flex: 2;
    -o-flex: 2;
    min-width: 320px;
    display: -webkit-flex;
    display: -moz-flex;
    display: -ms-flex;
    display: -o-flex;
    display: flex;
    -webkit-flex-direction: column;
    -moz-flex-direction: column;
    -ms-flex-direction: column;
    -o-flex-direction: column;
    flex-direction: column;
}

.product-title {
    font-size: 2.25rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: #1a202c;
    line-height: 1.3;
    position: relative;
    padding-bottom: 0.75rem;
}

.product-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 4px;
    background-color: #007bff;
    border-radius: 2px;
    -webkit-border-radius: 2px;
    -moz-border-radius: 2px;
    -ms-border-radius: 2px;
    -o-border-radius: 2px;
}

.product-desc {
    font-size: 1.15rem;
    line-height: 1.7;
    margin-bottom: 2.5rem;
    color: #4a5568;
    background-color: #f7fafc;
    padding: 1.5rem;
    border-radius: 8px;
    -webkit-border-radius: 8px;
    -moz-border-radius: 8px;
    -ms-border-radius: 8px;
    -o-border-radius: 8px;
    border-left: 4px solid #007bff;
}

.product-meta {
    display: -webkit-flex;
    display: -moz-flex;
    display: -ms-flex;
    display: -o-flex;
    display: flex;
    -webkit-flex-wrap: wrap;
    -moz-flex-wrap: wrap;
    -ms-flex-wrap: wrap;
    -o-flex-wrap: wrap;
    flex-wrap: wrap;
    gap: 2rem;
    margin: 2rem 0;
    padding: 2rem;
    background-color: #f8fafc;
    border-radius: 10px;
    -webkit-border-radius: 10px;
    -moz-border-radius: 10px;
    -ms-border-radius: 10px;
    -o-border-radius: 10px;
    border: 1px solid #e2e8f0;
    transition: all 0.3s ease;
    -webkit-transition: all 0.3s ease;
    -moz-transition: all 0.3s ease;
    -ms-transition: all 0.3s ease;
    -o-transition: all 0.3s ease;
}

.product-meta:hover {
    background-color: #f1f5f9;
    transform: translateY(-2px);
    -webkit-transform: translateY(-2px);
    -moz-transform: translateY(-2px);
    -ms-transform: translateY(-2px);
    -o-transform: translateY(-2px);
}

.product-price {
    color: #dc3545;
    font-weight: 700;
    font-size: 2rem;
    background-color: rgba(220, 53, 69, 0.05);
    padding: 0.5rem 1rem;
    border-radius: 6px;
    -webkit-border-radius: 6px;
    -moz-border-radius: 6px;
    -ms-border-radius: 6px;
    -o-border-radius: 6px;
    border: 1px solid rgba(220, 53, 69, 0.2);
}

.product-stock {
    color: #28a745;
    font-size: 1.15rem;
    font-weight: 500;
    background-color: rgba(40, 167, 69, 0.05);
    padding: 0.5rem 1rem;
    border-radius: 6px;
    -webkit-border-radius: 6px;
    -moz-border-radius: 6px;
    -ms-border-radius: 6px;
    -o-border-radius: 6px;
    border: 1px solid rgba(40, 167, 69, 0.2);
}

.product-category {
    color: #6c757d;
    font-size: 1.15rem;
    font-weight: 500;
    background-color: rgba(108, 117, 125, 0.05);
    padding: 0.5rem 1rem;
    border-radius: 6px;
    -webkit-border-radius: 6px;
    -moz-border-radius: 6px;
    -ms-border-radius: 6px;
    -o-border-radius: 6px;
    border: 1px solid rgba(108, 117, 125, 0.2);
}

.add-to-cart-form {
    margin-top: auto;
    padding: 2rem;
    background: linear-gradient(135deg, #f8fafc 0%, #edf2f7 100%);
    background: -webkit-linear-gradient(135deg, #f8fafc 0%, #edf2f7 100%);
    background: -moz-linear-gradient(135deg, #f8fafc 0%, #edf2f7 100%);
    background: -ms-linear-gradient(135deg, #f8fafc 0%, #edf2f7 100%);
    background: -o-linear-gradient(135deg, #f8fafc 0%, #edf2f7 100%);
    border-radius: 12px;
    -webkit-border-radius: 12px;
    -moz-border-radius: 12px;
    -ms-border-radius: 12px;
    -o-border-radius: 12px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    -webkit-box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    -moz-box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    -ms-box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    -o-box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
    -webkit-transition: all 0.3s ease;
    -moz-transition: all 0.3s ease;
    -ms-transition: all 0.3s ease;
    -o-transition: all 0.3s ease;
}

.add-to-cart-form:hover {
    box-shadow: 0 6px 20px rgba(0,0,0,0.08);
    -webkit-box-shadow: 0 6px 20px rgba(0,0,0,0.08);
    -moz-box-shadow: 0 6px 20px rgba(0,0,0,0.08);
    -ms-box-shadow: 0 6px 20px rgba(0,0,0,0.08);
    -o-box-shadow: 0 6px 20px rgba(0,0,0,0.08);
    transform: translateY(-2px);
    -webkit-transform: translateY(-2px);
    -moz-transform: translateY(-2px);
    -ms-transform: translateY(-2px);
    -o-transform: translateY(-2px);
}

.quantity-selector {
    display: -webkit-flex;
    display: -moz-flex;
    display: -ms-flex;
    display: -o-flex;
    display: flex;
    -webkit-align-items: center;
    -moz-align-items: center;
    -ms-align-items: center;
    -o-align-items: center;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 2px solid #e2e8f0;
}

.quantity-label {
    font-weight: 600;
    min-width: 60px;
    color: #2d3748;
    font-size: 1.05rem;
}

.quantity-input {
    width: 100px;
    padding: 1rem;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    -webkit-border-radius: 8px;
    -moz-border-radius: 8px;
    -ms-border-radius: 8px;
    -o-border-radius: 8px;
    font-size: 1.1rem;
    text-align: center;
    font-weight: 500;
    transition: all 0.3s ease;
    -webkit-transition: all 0.3s ease;
    -moz-transition: all 0.3s ease;
    -ms-transition: all 0.3s ease;
    -o-transition: all 0.3s ease;
    background-color: #ffffff;
    /* 为IE和Edge添加特殊样式 */
    -ms-appearance: none;
    -moz-appearance: textfield;
    appearance: textfield;
}

.quantity-input:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 4px rgba(0,123,255,0.15);
    -webkit-box-shadow: 0 0 0 4px rgba(0,123,255,0.15);
    -moz-box-shadow: 0 0 0 4px rgba(0,123,255,0.15);
    -ms-box-shadow: 0 0 0 4px rgba(0,123,255,0.15);
    -o-box-shadow: 0 0 0 4px rgba(0,123,255,0.15);
    transform: scale(1.03);
    -webkit-transform: scale(1.03);
    -moz-transform: scale(1.03);
    -ms-transform: scale(1.03);
    -o-transform: scale(1.03);
}

/* Chrome, Safari, Edge, Opera */
.quantity-input::-webkit-inner-spin-button,
.quantity-input::-webkit-outer-spin-button {
    opacity: 1;
    height: 30px;
    width: 20px;
    cursor: pointer;
}

/* Firefox */
.quantity-input[type=number] {
    -moz-appearance: textfield;
    appearance: textfield;
}

.add-to-cart-form .btn-primary {
    width: 100%;
    padding: 1.25rem 3rem;
    font-size: 1.2rem;
    font-weight: 600;
    border-radius: 10px;
    -webkit-border-radius: 10px;
    -moz-border-radius: 10px;
    -ms-border-radius: 10px;
    -o-border-radius: 10px;
    border: none;
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    background: -webkit-linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    background: -moz-linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    background: -ms-linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    background: -o-linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    color: white;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    -webkit-transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    -moz-transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    -ms-transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    -o-transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0,123,255,0.3);
    -webkit-box-shadow: 0 4px 15px rgba(0,123,255,0.3);
    -moz-box-shadow: 0 4px 15px rgba(0,123,255,0.3);
    -ms-box-shadow: 0 4px 15px rgba(0,123,255,0.3);
    -o-box-shadow: 0 4px 15px rgba(0,123,255,0.3);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    /* 为IE添加特殊样式 */
    filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#007bff', endColorstr='#0056b3', GradientType=1);
}

.add-to-cart-form .btn-primary::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 300px;
    height: 300px;
    background: linear-gradient(45deg, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0) 70%);
    background: -webkit-linear-gradient(45deg, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0) 70%);
    background: -moz-linear-gradient(45deg, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0) 70%);
    background: -ms-linear-gradient(45deg, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0) 70%);
    background: -o-linear-gradient(45deg, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0) 70%);
    border-radius: 50%;
    -webkit-border-radius: 50%;
    -moz-border-radius: 50%;
    -ms-border-radius: 50%;
    -o-border-radius: 50%;
    transform: translate(-50%, -50%) scale(0);
    -webkit-transform: translate(-50%, -50%) scale(0);
    -moz-transform: translate(-50%, -50%) scale(0);
    -ms-transform: translate(-50%, -50%) scale(0);
    -o-transform: translate(-50%, -50%) scale(0);
    opacity: 0;
    transition: transform 0.6s, opacity 0.6s;
    -webkit-transition: transform 0.6s, opacity 0.6s;
    -moz-transition: transform 0.6s, opacity 0.6s;
    -ms-transition: transform 0.6s, opacity 0.6s;
    -o-transition: transform 0.6s, opacity 0.6s;
}

.add-to-cart-form .btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    -webkit-transform: translateY(-2px);
    -moz-transform: translateY(-2px);
    -ms-transform: translateY(-2px);
    -o-transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0,123,255,0.4);
    -webkit-box-shadow: 0 8px 25px rgba(0,123,255,0.4);
    -moz-box-shadow: 0 8px 25px rgba(0,123,255,0.4);
    -ms-box-shadow: 0 8px 25px rgba(0,123,255,0.4);
    -o-box-shadow: 0 8px 25px rgba(0,123,255,0.4);
    background: linear-gradient(135deg, #0056b3 0%, #004085 100%);
    background: -webkit-linear-gradient(135deg, #0056b3 0%, #004085 100%);
    background: -moz-linear-gradient(135deg, #0056b3 0%, #004085 100%);
    background: -ms-linear-gradient(135deg, #0056b3 0%, #004085 100%);
    background: -o-linear-gradient(135deg, #0056b3 0%, #004085 100%);
    /* 为IE添加特殊样式 */
    filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#0056b3', endColorstr='#004085', GradientType=1);
}

.add-to-cart-form .btn-primary:hover:not(:disabled)::before {
    transform: translate(-50%, -50%) scale(1);
    -webkit-transform: translate(-50%, -50%) scale(1);
    -moz-transform: translate(-50%, -50%) scale(1);
    -ms-transform: translate(-50%, -50%) scale(1);
    -o-transform: translate(-50%, -50%) scale(1);
    opacity: 1;
}

.add-to-cart-form .btn-primary:active:not(:disabled) {
    transform: translateY(0);
    -webkit-transform: translateY(0);
    -moz-transform: translateY(0);
    -ms-transform: translateY(0);
    -o-transform: translateY(0);
    box-shadow: 0 4px 15px rgba(0,123,255,0.3);
    -webkit-box-shadow: 0 4px 15px rgba(0,123,255,0.3);
    -moz-box-shadow: 0 4px 15px rgba(0,123,255,0.3);
    -ms-box-shadow: 0 4px 15px rgba(0,123,255,0.3);
    -o-box-shadow: 0 4px 15px rgba(0,123,255,0.3);
}

.add-to-cart-form .btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    -webkit-transform: none;
    -moz-transform: none;
    -ms-transform: none;
    -o-transform: none;
    background: linear-gradient(135deg, #6c757d 0%, #545b62 100%);
    background: -webkit-linear-gradient(135deg, #6c757d 0%, #545b62 100%);
    background: -moz-linear-gradient(135deg, #6c757d 0%, #545b62 100%);
    background: -ms-linear-gradient(135deg, #6c757d 0%, #545b62 100%);
    background: -o-linear-gradient(135deg, #6c757d 0%, #545b62 100%);
    box-shadow: none;
    -webkit-box-shadow: none;
    -moz-box-shadow: none;
    -ms-box-shadow: none;
    -o-box-shadow: none;
    /* 为IE添加特殊样式 */
    filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#6c757d', endColorstr='#545b62', GradientType=1);
}

.related-products {
    margin-top: 2rem;
}

.related-products h3 {
    margin-bottom: 1rem;
}

.related-product-card {
    border: 1px solid #e9ecef;
    border-radius: 4px;
    -webkit-border-radius: 4px;
    -moz-border-radius: 4px;
    -ms-border-radius: 4px;
    -o-border-radius: 4px;
    padding: 1rem;
    background-color: white;
    transition: box-shadow 0.2s ease;
    -webkit-transition: box-shadow 0.2s ease;
    -moz-transition: box-shadow 0.2s ease;
    -ms-transition: box-shadow 0.2s ease;
    -o-transition: box-shadow 0.2s ease;
}

.related-product-card:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    -webkit-box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    -moz-box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    -ms-box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    -o-box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.related-product-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.related-product-title {
    font-size: 1rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.related-product-price {
    color: #dc3545;
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.related-product-link {
    display: inline-block;
    padding: 0.5rem 1rem;
    background-color: #007bff;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    -webkit-border-radius: 4px;
    -moz-border-radius: 4px;
    -ms-border-radius: 4px;
    -o-border-radius: 4px;
    font-size: 0.9rem;
    transition: background-color 0.2s ease;
    -webkit-transition: background-color 0.2s ease;
    -moz-transition: background-color 0.2s ease;
    -ms-transition: background-color 0.2s ease;
    -o-transition: background-color 0.2s ease;
}

.related-product-link:hover {
    background-color: #0056b3;
}

/* 响应式布局 - 大屏幕 */
@media (max-width: 1200px) {
    .product-detail {
        gap: 2rem;
        padding: 1.5rem;
    }
    
    .product-title {
        font-size: 2rem;
    }
    
    .product-icon-large {
        font-size: 8rem;
    }
}

/* 响应式布局 - 中等屏幕 */
@media (max-width: 992px) {
    .product-detail {
        flex-direction: column;
        align-items: center;
    }
    
    .product-image {
        width: 100%;
        max-width: 400px;
        min-height: 250px;
    }
    
    .product-info {
        min-width: 100%;
    }
    
    .product-meta {
        gap: 1rem;
    }
    
    .product-price,
    .product-stock,
    .product-category {
        font-size: 1.2rem;
        padding: 0.5rem;
    }
}

/* 响应式布局 - 小屏幕 */
@media (max-width: 768px) {
    .back-link {
        margin-bottom: 1.5rem;
        font-size: 0.9rem;
    }
    
    .product-title {
        font-size: 1.75rem;
    }
    
    .product-desc {
        font-size: 1rem;
        padding: 1rem;
    }
    
    .add-to-cart-form {
        padding: 1.5rem;
    }
    
    .quantity-selector {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .quantity-input {
        width: 100%;
        max-width: 150px;
    }
    
    .add-to-cart-form .btn-primary {
        font-size: 1.1rem;
        padding: 1rem 2rem;
    }
}

/* 响应式布局 - 移动设备 */
@media (max-width: 480px) {
    .product-detail {
        padding: 1rem;
        border-radius: 8px;
        -webkit-border-radius: 8px;
        -moz-border-radius: 8px;
        -ms-border-radius: 8px;
        -o-border-radius: 8px;
    }
    
    .product-image {
        padding: 1rem;
        min-height: 200px;
    }
    
    .product-icon-large {
        font-size: 6rem;
    }
    
    .product-title {
        font-size: 1.5rem;
    }
    
    .product-meta {
        flex-direction: column;
        gap: 0.75rem;
        padding: 1rem;
    }
    
    .add-to-cart-form {
        padding: 1rem;
    }
    
    .add-to-cart-form .btn-primary {
        font-size: 1rem;
        padding: 0.75rem 1.5rem;
        letter-spacing: 0;
    }
    
    .quantity-input {
        padding: 0.75rem;
        font-size: 1rem;
    }
}

/* YXCS风格的产品页面样式 */
.yxcs-product-container {
    width: 100%;
    margin-top: 20px;
}

.yxcs-product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 15px;
    width: 100%;
    justify-items: center;
}

.yxcs-product-card {
    background-color: white;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 15px;
    display: flex;
    flex-direction: column;
    min-height: 300px;
}

/* 标题区域背景颜色 */
.yxcs-product-header {
    color: white;
    padding: 10px 15px;
    border-radius: 4px;
    margin-bottom: 15px;
    text-align: center;
}

.yxcs-red {
    background-color: #dc3545;
}

.yxcs-blue {
    background-color: #007bff;
}

.yxcs-orange {
    background-color: #fd7e14;
}

.yxcs-product-title {
    margin: 0;
    font-size: 16px;
    font-weight: bold;
    color: white;
}

/* 价格信息 */
.yxcs-price-info {
    margin-bottom: 15px;
}

.yxcs-price-info p {
    margin: 5px 0;
    font-size: 14px;
    color: #333;
}

/* 库存信息 */
.yxcs-stock-info {
    margin-bottom: 15px;
}

.yxcs-stock-info p {
    margin: 5px 0;
    font-size: 14px;
    color: #333;
}

/* 交易号输入区域 */
.yxcs-transaction-info {
    margin-bottom: 15px;
}

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

.yxcs-transaction-input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    box-sizing: border-box;
}

/* 操作按钮 */
.yxcs-actions {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.yxcs-btn {
    flex: 1;
    padding: 10px 15px;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: bold;
    color: white;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.yxcs-btn-green {
    background-color: #28a745;
}

.yxcs-btn-green:hover {
    background-color: #218838;
}

.yxcs-btn-blue {
    background-color: #007bff;
}

.yxcs-btn-blue:hover {
    background-color: #0056b3;
}

.yxcs-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* 附加信息 */
.yxcs-additional-info {
    margin-top: auto;
    padding-top: 10px;
    border-top: 1px solid #eee;
}

.yxcs-additional-info p {
    margin: 0;
    font-size: 12px;
    color: #6c757d;
}

/* 响应式设计 */
@media (max-width: 1200px) {
    .yxcs-product-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

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

/* 订单成功页面样式 */
.order-info {
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 2rem;
    max-width: 600px;
    margin: 2rem auto;
}

.order-info h3 {
    margin-top: 0;
    margin-bottom: 1rem;
    color: #2c3e50;
}

.order-details {
    list-style: none;
    padding: 0;
    margin: 0;
}

.order-detail-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    padding: 0.5rem 0;
    border-bottom: 1px solid #e9ecef;
}

.order-detail-item:last-child {
    border-bottom: none;
    font-weight: bold;
}

.detail-label {
    color: #6c757d;
}

.detail-value {
    color: #2c3e50;
}

.actions {
    margin-top: 2rem;
}

/* 管理员后台样式补充 */
.admin-container {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 200px;
    background-color: #2c3e50;
    color: white;
    padding: 1rem;
}

.sidebar-logo {
    font-size: 1.2rem;
    font-weight: bold;
    margin-bottom: 1.5rem;
    display: block;
    text-align: center;
    padding: 0.5rem;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

.sidebar-menu {
    list-style: none;
    padding: 0;
    margin: 0;
}

.menu-item {
    margin-bottom: 0.5rem;
}

.menu-link {
    display: block;
    padding: 0.75rem;
    text-decoration: none;
    color: white;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.menu-link:hover {
    background-color: #34495e;
}

.menu-link.active {
    background-color: #007bff;
}

.main-content {
    flex: 1;
    background-color: #2c3e50;
    padding: 1rem;
}

.header {
    background-color: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.header-title {
    margin: 0;
    font-size: 1.5rem;
    color: #2c3e50;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.user-name {
    font-weight: bold;
    color: #2c3e50;
}

.management-section {
    background-color: white;
    padding: 1rem;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

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

.section-title {
    margin: 0;
    font-size: 1.2rem;
    color: #2c3e50;
}

.products-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1rem;
}

.products-table th,
.products-table td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid #e9ecef;
    color: white;
}

.products-table th {
    background-color: #34495e;
    font-weight: bold;
    color: white;
}

.products-table tr:hover {
    background-color: #34495e;
}

.action-buttons {
    display: flex;
    gap: 0.5rem;
}

.modal {
    display: none;
    position: fixed;
    z-index: 1;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.4);
}

.modal-content {
    background-color: #fefefe;
    margin: 15% auto;
    padding: 20px;
    border: 1px solid #888;
    width: 80%;
    max-width: 600px;
    border-radius: 4px;
}

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

.close {
    color: #aaa;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close:hover,
.close:focus {
    color: black;
    text-decoration: none;
    cursor: pointer;
}

.docs-section {
    margin-bottom: 2rem;
}

.docs-section h3 {
    margin-top: 0;
    margin-bottom: 1rem;
    color: #2c3e50;
}

.doc-card {
    background-color: white;
    padding: 1.5rem;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    margin-bottom: 1rem;
}

.doc-card h4 {
    margin-top: 0;
    margin-bottom: 0.5rem;
    color: #007bff;
}

.products-section {
    margin-top: 1rem;
    padding: 1rem;
    border: 1px solid #e9ecef;
    border-radius: 4px;
    background-color: white;
}