/* static/style.css - 完整版商城样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
}

/* 导航栏样式 */
nav {
    background: linear-gradient(135deg, #2c3e50, #34495e);
    color: white;
    padding: 1rem 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

nav h1 a {
    color: white;
    text-decoration: none;
    font-size: 1.8rem;
    font-weight: 700;
    transition: color 0.3s ease;
}

nav h1 a:hover {
    color: #3498db;
}

nav ul {
    display: flex;
    list-style: none;
    gap: 1.5rem;
    align-items: center;
}

nav ul li a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    transition: all 0.3s ease;
}

nav ul li a:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-1px);
}

/* 主容器样式 */
.container {
    width: 90%;
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0;
    min-height: calc(100vh - 200px);
}

/* 消息提示样式 */
.flash-messages {
    margin-bottom: 2rem;
}

.flash-message {
    padding: 1rem 1.5rem;
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    border-radius: 8px;
    margin-bottom: 1rem;
    box-shadow: 0 2px 10px rgba(52, 152, 219, 0.3);
    border-left: 4px solid #2980b9;
}

/* 首页样式 */
.welcome {
    text-align: center;
    padding: 4rem 2rem;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.welcome h2 {
    color: #2c3e50;
    margin-bottom: 1rem;
    font-size: 2.5rem;
    font-weight: 700;
}

.welcome p {
    color: #6c757d;
    font-size: 1.2rem;
    margin-bottom: 2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.auth-links, .user-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 2rem;
}

.user-info {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 8px;
    margin-top: 2rem;
}

.user-info h3 {
    color: #2c3e50;
    margin-bottom: 0.5rem;
}

/* 表单样式 */
.admin-form {
    max-width: 500px;
    margin: 0 auto;
    background: white;
    padding: 2.5rem;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.admin-form h2 {
    text-align: center;
    color: #2c3e50;
    margin-bottom: 2rem;
    font-size: 2rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #2c3e50;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: #f8f9fa;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: #3498db;
    background: white;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.form-group small {
    display: block;
    margin-top: 0.5rem;
    color: #6c757d;
    font-size: 0.875rem;
}

.form-actions {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

/* 商品网格布局 */
.products-header {
    text-align: center;
    margin-bottom: 3rem;
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.products-header h2 {
    color: #2c3e50;
    margin-bottom: 0.5rem;
    font-size: 2.2rem;
    font-weight: 700;
}

.products-header p {
    color: #6c757d;
    font-size: 1.1rem;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2rem;
    margin-top: 1rem;
    align-items: stretch;
}

/* 商品卡片样式 */
.product-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    overflow: hidden;
    border: 1px solid #e9ecef;
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
}

/* 商品图片区域 */
.product-image-container {
    position: relative;
    height: 220px;
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    border-bottom: 1px solid #e9ecef;
    flex-shrink: 0;
}

.product-image {
    max-width: 100%;
    max-height: 180px;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.product-card:hover .product-image {
    transform: scale(1.08);
}

.out-of-stock-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: #e74c3c;
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(231, 76, 60, 0.3);
}

/* 商品内容区域 */
.product-content {
    padding: 1.75rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.product-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 0.75rem;
    line-height: 1.4;
    min-height: 3.6rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-description {
    color: #6c757d;
    font-size: 0.95rem;
    line-height: 1.5;
    margin-bottom: 1.25rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 1;
    min-height: 2.85rem;
}

.product-meta {
    margin-bottom: 1.5rem;
    flex-shrink: 0;
}

.price-section {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.product-price {
    font-size: 1.6rem;
    font-weight: 800;
    color: #e74c3c;
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.product-stock {
    font-size: 0.9rem;
    color: #6c757d;
    background: #f8f9fa;
    padding: 0.25rem 0.75rem;
    border-radius: 15px;
}

/* 商品操作区域 */
.product-actions {
    border-top: 1px solid #e9ecef;
    padding-top: 1.25rem;
    margin-top: auto;
    flex-shrink: 0;
}

.add-to-cart-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.quantity-section {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.quantity-section label {
    font-size: 0.9rem;
    color: #6c757d;
    font-weight: 600;
    min-width: 40px;
}

.quantity-input {
    width: 80px;
    padding: 0.6rem;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    text-align: center;
    font-size: 1rem;
    font-weight: 600;
    background: white;
    transition: all 0.3s ease;
}

.quantity-input:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.add-to-cart-btn {
    background: linear-gradient(135deg, #27ae60, #229954);
    color: white;
    border: none;
    padding: 0.9rem 1.5rem;
    border-radius: 10px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    width: 100%;
}

.add-to-cart-btn:hover:not(.disabled) {
    background: linear-gradient(135deg, #229954, #1e8449);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(39, 174, 96, 0.4);
}

.add-to-cart-btn.disabled {
    background: #95a5a6;
    cursor: not-allowed;
    opacity: 0.7;
    transform: none !important;
    box-shadow: none !important;
}

.login-to-buy-btn {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    text-decoration: none;
    padding: 0.9rem 1.5rem;
    border-radius: 10px;
    font-weight: 700;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    font-size: 1rem;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    width: 100%;
}

.login-to-buy-btn:hover {
    background: linear-gradient(135deg, #2980b9, #1f618d);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(52, 152, 219, 0.4);
}

.btn-icon {
    font-size: 1.2rem;
}

/* 按钮基础样式 */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    padding: 0.75rem 1.5rem;
    text-decoration: none;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    transition: all 0.3s ease;
    text-align: center;
    line-height: 1;
}

.btn:hover {
    background: linear-gradient(135deg, #2980b9, #1f618d);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.3);
}

.btn-large {
    padding: 1rem 2rem;
    font-size: 1.1rem;
    border-radius: 10px;
}

.btn-small {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    border-radius: 6px;
}

.btn-secondary {
    background: linear-gradient(135deg, #6c757d, #5a6268);
}

.btn-secondary:hover {
    background: linear-gradient(135deg, #5a6268, #495057);
}

.btn-danger {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
}

.btn-danger:hover {
    background: linear-gradient(135deg, #c0392b, #a93226);
}

/* 购物车样式 */
.cart-header {
    text-align: center;
    margin-bottom: 2rem;
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.cart-header h2 {
    color: #2c3e50;
    margin-bottom: 0.5rem;
    font-size: 2.2rem;
}

.cart-container {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
    align-items: start;
}

.cart-items-section {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.cart-items-header {
    display: grid;
    grid-template-columns: 0.5fr 1.5fr 1fr 1fr 1fr 0.5fr;
    gap: 1rem;
    padding: 1rem 0;
    border-bottom: 2px solid #e9ecef;
    font-weight: 700;
    color: #2c3e50;
    font-size: 0.95rem;
}

.cart-items-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 1rem;
}

.cart-item {
    display: grid;
    grid-template-columns: 0.5fr 1.5fr 1fr 1fr 1fr 0.5fr;
    gap: 1rem;
    align-items: center;
    padding: 1.25rem;
    background: #f8f9fa;
    border-radius: 10px;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.cart-item:hover {
    background: white;
    border-color: #3498db;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.item-image {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    overflow: hidden;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #e9ecef;
}

.item-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 0.25rem;
}

.item-info {
    display: flex;
    flex-direction: column;
}

.item-name {
    font-weight: 600;
    color: #2c3e50;
    margin: 0;
    font-size: 1.05rem;
}

.item-price, .item-quantity, .item-total {
    font-weight: 600;
    color: #2c3e50;
    text-align: center;
    font-size: 1rem;
}

.item-total {
    color: #e74c3c;
    font-weight: 700;
    font-size: 1.1rem;
}

.remove-btn {
    color: #e74c3c;
    text-decoration: none;
    font-size: 1.3rem;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: white;
    border: 2px solid #e74c3c;
}

.remove-btn:hover {
    color: white;
    background: #e74c3c;
    transform: scale(1.1);
}

/* 购物车摘要 */
.cart-summary-section {
    position: sticky;
    top: 2rem;
}

.summary-card {
    background: white;
    border-radius: 12px;
    padding: 1.75rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    border: 1px solid #e9ecef;
}

.summary-card h3 {
    color: #2c3e50;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #e9ecef;
    font-size: 1.4rem;
    text-align: center;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
    border-bottom: 1px solid #f8f9fa;
    font-size: 1rem;
}

.summary-row.total {
    border-top: 2px solid #e9ecef;
    border-bottom: none;
    margin-top: 1rem;
    padding-top: 1.25rem;
    font-weight: 700;
    font-size: 1.2rem;
}

.total-amount {
    color: #e74c3c;
    font-size: 1.5rem;
    font-weight: 800;
}

.checkout-actions {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 2rem;
}

.checkout-btn {
    background: linear-gradient(135deg, #27ae60, #229954);
    color: white;
    text-decoration: none;
    padding: 1.25rem 2rem;
    border-radius: 10px;
    font-weight: 700;
    text-align: center;
    transition: all 0.3s ease;
    font-size: 1.1rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.checkout-btn:hover {
    background: linear-gradient(135deg, #229954, #1e8449);
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(39, 174, 96, 0.4);
}

.continue-shopping-btn {
    background: linear-gradient(135deg, #6c757d, #5a6268);
    color: white;
    text-decoration: none;
    padding: 1rem 1.5rem;
    border-radius: 10px;
    font-weight: 600;
    text-align: center;
    transition: all 0.3s ease;
}

.continue-shopping-btn:hover {
    background: linear-gradient(135deg, #5a6268, #495057);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(108, 117, 125, 0.3);
}

/* 表格样式 */
.orders-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.orders-table th, .orders-table td {
    padding: 1.25rem;
    text-align: left;
    border-bottom: 1px solid #e9ecef;
}

.orders-table th {
    background: linear-gradient(135deg, #2c3e50, #34495e);
    color: white;
    font-weight: 600;
    font-size: 0.95rem;
}

.orders-table tr:hover {
    background: #f8f9fa;
}

.orders-table tfoot {
    background: #f8f9fa;
    font-weight: 700;
}

/* 状态标签 */
.status-待付款 {
    color: #e67e22;
    font-weight: 700;
    background: #fef9e7;
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-size: 0.9rem;
}

.status-待发货 {
    color: #3498db;
    font-weight: 700;
    background: #ebf5fb;
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-size: 0.9rem;
}

.status-购物车 {
    color: #95a5a6;
    font-weight: 700;
    background: #f8f9fa;
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-size: 0.9rem;
}

/* 演示账户样式 */
.demo-accounts {
    margin-top: 2rem;
    padding: 1.5rem;
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border-radius: 10px;
    border-left: 4px solid #3498db;
}

.demo-accounts h3 {
    margin-bottom: 1rem;
    color: #2c3e50;
    font-size: 1.2rem;
}

.demo-accounts p {
    margin-bottom: 0.5rem;
    color: #495057;
}

/* 管理员样式 */
.admin-dashboard {
    max-width: 1200px;
    margin: 0 auto;
}

.admin-links {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.admin-actions {
    margin-bottom: 2rem;
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.stock-form {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.stock-input {
    width: 80px;
    padding: 0.5rem;
    border: 2px solid #e9ecef;
    border-radius: 6px;
    text-align: center;
    font-weight: 600;
    background: white;
}

.stock-input:focus {
    outline: none;
    border-color: #3498db;
}

.admin-products {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

/* 用户管理样式 */
.admin-users {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.admin-header {
    text-align: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #e9ecef;
}

.admin-header h2 {
    color: #2c3e50;
    margin-bottom: 0.5rem;
    font-size: 2.2rem;
}

.admin-header p {
    color: #6c757d;
    font-size: 1.1rem;
}

.users-table-container {
    margin-bottom: 2rem;
}

.current-user-badge {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    padding: 0.2rem 0.6rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-left: 0.5rem;
}

.role-badge {
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.role-admin {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    color: white;
}

.role-user {
    background: linear-gradient(135deg, #27ae60, #229954);
    color: white;
}

.user-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.users-summary {
    margin-top: 2rem;
}

.summary-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.stat-item {
    text-align: center;
    padding: 1.5rem;
    background: #f8f9fa;
    border-radius: 10px;
    border: 2px solid #e9ecef;
}

.stat-number {
    display: block;
    font-size: 2.5rem;
    font-weight: 800;
    color: #3498db;
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 0.9rem;
    color: #6c757d;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-header {
    text-align: center;
    margin-bottom: 2rem;
}

.form-header h2 {
    color: #2c3e50;
    margin-bottom: 0.5rem;
}

.form-header p {
    color: #6c757d;
}

.current-user-warning {
    background: linear-gradient(135deg, #fff3cd, #ffeaa7);
    border: 1px solid #ffecb5;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1.5rem;
}

.warning-message {
    color: #856404;
    font-size: 0.95rem;
}

/* 订单数量样式 */
.order-count {
    padding: 0.3rem 0.6rem;
    border-radius: 15px;
    font-size: 0.85rem;
    font-weight: 600;
}

.order-count.has-orders {
    background: linear-gradient(135deg, #ffeaa7, #fdcb6e);
    color: #856404;
}

.order-count.no-orders {
    background: linear-gradient(135deg, #d1ecf1, #bee5eb);
    color: #0c5460;
}

/* 图片预览样式 */
.current-image {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border-radius: 10px;
    border: 2px dashed #dee2e6;
}

.current-image label {
    display: block;
    margin-bottom: 1rem;
    font-weight: 600;
    color: #2c3e50;
    font-size: 1.1rem;
}

.image-preview {
    text-align: center;
}

.image-preview img {
    border-radius: 8px;
    border: 2px solid #dee2e6;
    max-width: 100%;
    height: auto;
    max-height: 300px;
    object-fit: contain;
}

/* 空状态样式 */
.empty-state, .empty-cart {
    text-align: center;
    padding: 4rem 2rem;
    color: #6c757d;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    margin: 2rem 0;
}

.empty-icon, .empty-cart-icon {
    font-size: 5rem;
    margin-bottom: 1.5rem;
    opacity: 0.3;
}

.empty-state h3, .empty-cart h3 {
    color: #2c3e50;
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.empty-state p, .empty-cart p {
    font-size: 1.1rem;
    margin-bottom: 2rem;
}

/* 链接样式 */
a {
    color: #3498db;
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: #2980b9;
}

/* 工具类 */
.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }

/* 加载状态 */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 响应式设计 */
@media (max-width: 768px) {
    .nav-container {
        flex-direction: column;
        gap: 1rem;
    }
    
    nav ul {
        flex-wrap: wrap;
        justify-content: center;
        gap: 1rem;
    }
    
    .container {
        width: 95%;
        margin: 1rem auto;
    }
    
    .products-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .cart-container {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .cart-items-header {
        display: none;
    }
    
    .cart-item {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 1rem;
        padding: 1.5rem;
    }
    
    .item-image {
        justify-self: center;
        width: 80px;
        height: 80px;
    }
    
    .admin-links {
        grid-template-columns: 1fr;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .auth-links, .user-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .btn {
        width: 100%;
        margin-bottom: 0.5rem;
    }
    
    .quantity-section {
        justify-content: center;
    }
    
    .add-to-cart-form {
        flex-direction: column;
    }
    
    .user-actions {
        flex-direction: column;
    }
    
    .user-actions .btn {
        width: 100%;
        margin-bottom: 0.5rem;
    }
    
    .summary-stats {
        grid-template-columns: 1fr;
    }
    
    .stat-item {
        padding: 1rem;
    }
    
    .stat-number {
        font-size: 2rem;
    }
}

@media (max-width: 480px) {
    .welcome {
        padding: 2rem 1rem;
    }
    
    .welcome h2 {
        font-size: 2rem;
    }
    
    .admin-form {
        padding: 1.5rem;
    }
    
    .product-content {
        padding: 1.25rem;
    }
    
    .cart-items-section, .summary-card {
        padding: 1rem;
    }
    
    .orders-table {
        font-size: 0.8rem;
    }
    
    .orders-table th,
    .orders-table td {
        padding: 0.75rem 0.5rem;
    }
}

/* 滚动条样式 */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #3498db, #2980b9);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #2980b9, #1f618d);
}