/* 全局重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.header {
    background: #fff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.logo {
    font-size: 24px;
    font-weight: bold;
    color: #2c3e50;
}

nav a {
    margin-left: 30px;
    text-decoration: none;
    color: #555;
    font-size: 16px;
    transition: color 0.3s;
}

nav a:hover {
    color: #3498db;
}

/* Hero */
.hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 80px 0;
    text-align: center;
}

.hero h1 {
    font-size: 48px;
    margin-bottom: 20px;
}

.hero p {
    font-size: 18px;
    opacity: 0.95;
    margin-bottom: 10px;
}

.hero .address {
    margin-top: 20px;
    font-size: 16px;
    opacity: 0.85;
}

/* Services Section */
.services-section {
    padding: 60px 0;
}

.services-section h2 {
    text-align: center;
    font-size: 36px;
    margin-bottom: 40px;
    color: #2c3e50;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
}

.product-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    transition: transform 0.3s, box-shadow 0.3s;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.product-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.card-body {
    padding: 20px;
}

.card-body h3 {
    font-size: 18px;
    margin-bottom: 10px;
    color: #2c3e50;
}

.price {
    font-size: 22px;
    color: #e74c3c;
    font-weight: bold;
    margin-bottom: 15px;
}

.btn {
    display: inline-block;
    background: #3498db;
    color: white;
    padding: 10px 24px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 14px;
    transition: background 0.3s;
}

.btn:hover {
    background: #2980b9;
}

/* Product Detail */
.product-detail {
    padding: 60px 0;
}

.product-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    background: white;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
}

.product-image img {
    width: 100%;
    border-radius: 8px;
}

.product-info h1 {
    font-size: 32px;
    margin-bottom: 20px;
    color: #2c3e50;
}

.price-large {
    font-size: 32px;
    color: #e74c3c;
    font-weight: bold;
    margin-bottom: 25px;
}

.description {
    font-size: 16px;
    line-height: 1.8;
    color: #666;
    margin-bottom: 30px;
}

.btn-large {
    padding: 15px 40px;
    font-size: 18px;
}

/* Checkout */
.checkout-section {
    padding: 60px 0;
}

.checkout-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}

.payment-info h2,
.customer-form h2 {
    font-size: 24px;
    margin-bottom: 20px;
    color: #2c3e50;
}

.info-box {
    background: white;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    margin-bottom: 20px;
}

.info-box p {
    padding: 10px 0;
    border-bottom: 1px solid #eee;
}

.info-box p:last-child {
    border-bottom: none;
}

.order-summary {
    background: white;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #333;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 15px;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #3498db;
}

.btn-block {
    width: 100%;
    padding: 15px;
    font-size: 18px;
    border: none;
    cursor: pointer;
}

.success-box {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
    padding: 30px;
    border-radius: 12px;
    text-align: center;
    margin-bottom: 40px;
}

.error {
    background: #f8d7da;
    color: #721c24;
    padding: 12px 15px;
    border-radius: 6px;
    margin-bottom: 20px;
}

/* Footer */
.footer {
    background: #2c3e50;
    color: white;
    padding: 40px 0;
    text-align: center;
}

.footer p {
    margin-bottom: 10px;
    opacity: 0.85;
}

/* Admin Styles */
.admin-wrapper {
    display: flex;
    min-height: 100vh;
}

.admin-sidebar {
    width: 250px;
    background: #2c3e50;
    color: white;
    padding: 30px 20px;
}

.admin-sidebar h2 {
    font-size: 20px;
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.admin-sidebar a {
    display: block;
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    padding: 12px 15px;
    margin-bottom: 5px;
    border-radius: 6px;
    transition: all 0.3s;
}

.admin-sidebar a:hover,
.admin-sidebar a.active {
    background: rgba(255,255,255,0.1);
    color: white;
}

.admin-content {
    flex: 1;
    padding: 30px;
    background: #f5f5f5;
}

.admin-table {
    width: 100%;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.admin-table th,
.admin-table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.admin-table th {
    background: #f8f9fa;
    font-weight: 600;
}

.status-0 { color: #f39c12; }
.status-1 { color: #27ae60; }
.status-2 { color: #e74c3c; }

/* Responsive */
@media (max-width: 768px) {
    .product-layout,
    .checkout-layout {
        grid-template-columns: 1fr;
    }
    
    .hero h1 {
        font-size: 32px;
    }
    
    .products-grid {
        grid-template-columns: 1fr;
    }
}