:root {
    --primary: #2563eb;
    --secondary: #4b5563;
    --success: #22c55e;
    --error: #ef4444;
    --background: #f8fafc;
    --text: #1e293b;
    --border: #e2e8f0;
}

/* 基础样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--text);
    background: var(--background);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 语言切换 */
.lang-switch {
    margin-left: 1rem;
}

.lang-btn {
    background: none;
    border: none;
    color: var(--text);
    cursor: pointer;
    font-size: 0.9rem;
    margin: 0 0.5rem;
    opacity: 0.7;
}

.lang-btn.active {
    opacity: 1;
    font-weight: 600;
    text-decoration: underline;
}

/* 头部 */
.header {
    background: white;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    padding: 1rem 0;
    margin-bottom: 2rem;
}

.nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
    text-decoration: none;
}

.nav a {
    color: var(--text);
    text-decoration: none;
    margin-left: 1.5rem;
    transition: color 0.2s;
}

.nav a:hover {
    color: var(--primary);
}

/* 商品列表 */
.product-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 2rem;
    max-width: 1024px;
    margin: 0 auto;
}

@media (min-width: 768px) {
    .product-list {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 767px) {
    .product-list {
        grid-template-columns: repeat(2, 1fr);
    }
}

.product-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
    transition: transform 0.2s;
}

.product-card:hover {
    transform: translateY(-3px);
}

.product-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.product-info {
    padding: 1rem;
}

.product-info h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.product-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1rem;
}

.price {
    color: var(--primary);
    font-size: 1.1rem;
    font-weight: 600;
}

.btn {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: var(--primary);
    color: white;
    border-radius: 8px;
    text-decoration: none;
    transition: opacity 0.2s;
    border: none;
    cursor: pointer;
    font-size: 0.9rem;
}

.btn:hover {
    opacity: 0.9;
}

/* 订单列表 */
.order-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.order-item {
    display: flex;
    gap: 1.5rem;
    padding: 1.5rem;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

.product-thumb {
    width: 120px;
    height: 120px;
    object-fit: cover;
    border-radius: 8px;
}

/* 商品详情页样式 */
.product-detail {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    margin: 2rem 0;
}

@media (min-width: 768px) {
    .product-detail {
        flex-direction: row;
    }
}

.product-images {
    flex: 1;
    max-width: 100%;
}

.main-image {
    margin-bottom: 1rem;
}

.detail-image {
    width: 100%;
    height: auto;
    max-width: 700px;
    border-radius: 8px;
}

.thumbnails {
    display: flex;
    gap: 0.5rem;
    overflow-x: auto;
    padding-bottom: 0.5rem;
}

.thumbnail {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 4px;
    cursor: pointer;
    border: 2px solid transparent;
}

.thumbnail:hover {
    border-color: var(--primary);
}

.product-content {
    flex: 1;
}

.product-content h1 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.description {
    margin: 1.5rem 0;
}

/* 管理后台 */
.admin-panel {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    padding: 2rem;
}

.tabs {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
}

.tab {
    padding: 0.75rem 1.5rem;
    background: var(--background);
    border-radius: 8px 8px 0 0;
    cursor: pointer;
    transition: background 0.2s;
}

.tab.active {
    background: var(--primary);
    color: white;
}

.tab-content {
    margin-bottom: 2rem;
}

.product-form {
    margin-bottom: 2rem;
}

/* 支付弹窗 */
.payment-box {
    text-align: center;
    padding: 2rem;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    margin: 2rem 0;
}

.qrcode {
    width: 260px;
    height: 260px;
    margin: 1.5rem 0;
    border: 1px solid var(--border);
    border-radius: 8px;
}

/* 表单样式 */
.auth-container {
    max-width: 400px;
    margin: 2rem auto;
    padding: 2rem;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

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

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 1rem;
}

.alert {
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
}

.alert-error {
    background: #fee2e2;
    color: #b91c1c;
}

/* 底部样式 */
.footer {
    text-align: center;
    padding: 2rem 0;
    color: var(--secondary);
    font-size: 0.9rem;
}
