/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f4f4f4;
}

header {
    background-color: #333;
    color: #fff;
    padding: 1rem;
    text-align: center;
}

header h1 {
    margin-bottom: 1rem;
}

nav a {
    color: #fff;
    text-decoration: none;
    margin: 0 1rem;
}

nav a:hover {
    text-decoration: underline;
}

main {
    padding: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

footer {
    background-color: #333;
    color: #fff;
    text-align: center;
    padding: 1rem;
    margin-top: 2rem;
}

/* 按钮样式 */
.btn {
    display: inline-block;
    padding: 0.5rem 1rem;
    background-color: #333;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    text-decoration: none;
}

.btn:hover {
    background-color: #555;
}

.delete-btn {
    background-color: #dc3545;
}

.delete-btn:hover {
    background-color: #c82333;
}

/* 表单样式 */
.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 4px;
}

/* 商品列表样式 */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.product-item {
    background-color: #fff;
    padding: 1rem;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.product-item img {
    max-width: 100%;
    height: auto;
    margin-bottom: 1rem;
}

.product-item .price {
    font-size: 1.2rem;
    font-weight: bold;
    color: #e74c3c;
    margin: 1rem 0;
}

/* 商品详情样式 */
.product-detail {
    background-color: #fff;
    padding: 2rem;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.product-info {
    display: flex;
    gap: 2rem;
}

.product-info img {
    max-width: 400px;
    height: auto;
}

/* 购物车样式 */
.cart table {
    width: 100%;
    border-collapse: collapse;
    background-color: #fff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.cart th,
.cart td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

.cart th {
    background-color: #f8f9fa;
}

/* 结算样式 */
.checkout {
    background-color: #fff;
    padding: 2rem;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.payment-method {
    margin-bottom: 2rem;
}

.order-summary {
    margin-bottom: 2rem;
    padding: 1rem;
    background-color: #f8f9fa;
    border-radius: 4px;
}

/* 登录样式 */
.login-container {
    max-width: 400px;
    margin: 2rem auto;
    padding: 2rem;
    background-color: #fff;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* 后台样式 */
.dashboard {
    background-color: #fff;
    padding: 2rem;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.stats {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
    margin-top: 2rem;
}

.stat-item {
    background-color: #f8f9fa;
    padding: 1rem;
    border-radius: 4px;
    text-align: center;
}

/* 分类管理样式 */
.categories-management,
.products-management,
.payment-channels-management {
    background-color: #fff;
    padding: 2rem;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.add-category,
.add-product,
.add-channel {
    margin-bottom: 2rem;
    padding: 1rem;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.category-list,
.product-list,
.channel-list {
    margin-top: 2rem;
}

.category-list table,
.product-list table,
.channel-list table {
    width: 100%;
    border-collapse: collapse;
}

.category-list th,
.category-list td,
.product-list th,
.product-list td,
.channel-list th,
.channel-list td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

.category-list th,
.product-list th,
.channel-list th {
    background-color: #f8f9fa;
}

/* 模态框样式 */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.4);
}

.modal-content {
    background-color: #fff;
    margin: 15% auto;
    padding: 2rem;
    border: 1px solid #888;
    width: 80%;
    max-width: 600px;
    border-radius: 4px;
}

.close-btn {
    background-color: #6c757d;
}

.close-btn:hover {
    background-color: #5a6268;
}
