* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Microsoft YaHei', 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: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 30px 0;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

header h1 {
    font-size: 2.5em;
    margin-bottom: 10px;
}

.subtitle {
    font-size: 1.1em;
    opacity: 0.9;
}

/* Main Content */
main {
    padding: 40px 0;
}

.products h2 {
    text-align: center;
    font-size: 2em;
    margin-bottom: 30px;
    color: #333;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 30px;
}

.product-card {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.15);
}

.product-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
    cursor: pointer;
    transition: opacity 0.3s;
}

.product-image:hover {
    opacity: 0.9;
}

.product-info {
    padding: 20px;
}

.product-info h3 {
    margin-bottom: 10px;
}

.product-info h3 a {
    color: #333;
    text-decoration: none;
    font-size: 1.3em;
}

.product-info h3 a:hover {
    color: #667eea;
}

.product-desc {
    color: #666;
    margin-bottom: 15px;
    font-size: 0.95em;
    min-height: 40px;
}

.product-price {
    font-size: 1.5em;
    color: #e74c3c;
    font-weight: bold;
    margin-bottom: 15px;
}

.btn-buy {
    display: inline-block;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 12px 30px;
    text-decoration: none;
    border-radius: 5px;
    text-align: center;
    width: 100%;
    transition: opacity 0.3s;
}

.btn-buy:hover {
    opacity: 0.9;
}

/* Detail Page */
.detail-container {
    background: white;
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin: 30px auto;
    max-width: 1000px;
}

.detail-header {
    margin-bottom: 30px;
}

.detail-header h1 {
    font-size: 2.5em;
    color: #333;
    margin-bottom: 10px;
}

.detail-price {
    font-size: 2em;
    color: #e74c3c;
    font-weight: bold;
    margin: 20px 0;
}

.detail-images {
    margin: 30px 0;
}

.detail-images img {
    width: 100%;
    max-width: 600px;
    border-radius: 10px;
    margin: 10px 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.detail-content {
    margin: 30px 0;
    line-height: 1.8;
}

.detail-content h2 {
    color: #667eea;
    margin: 30px 0 15px 0;
    font-size: 1.5em;
}

.detail-content p {
    margin-bottom: 15px;
    color: #555;
}

.detail-content ul {
    margin-left: 30px;
    margin-bottom: 20px;
}

.detail-content li {
    margin-bottom: 10px;
    color: #555;
}

.reviews {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 2px solid #eee;
}

.reviews h2 {
    color: #667eea;
    margin-bottom: 20px;
}

.review-item {
    background: #f9f9f9;
    padding: 20px;
    margin-bottom: 20px;
    border-radius: 8px;
    border-left: 4px solid #667eea;
}

.review-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
}

.review-user {
    font-weight: bold;
    color: #333;
}

.review-date {
    color: #999;
    font-size: 0.9em;
}

.review-rating {
    color: #f39c12;
    margin: 10px 0;
}

.review-content {
    color: #555;
    line-height: 1.6;
}

.back-link {
    display: inline-block;
    margin: 20px 0;
    color: #667eea;
    text-decoration: none;
    font-size: 1.1em;
}

.back-link:hover {
    text-decoration: underline;
}

/* Order Page */
.order-container {
    background: white;
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin: 30px auto;
    max-width: 800px;
}

.order-container h1 {
    margin-bottom: 30px;
    color: #333;
}

.order-item {
    display: flex;
    align-items: center;
    padding: 20px;
    background: #f9f9f9;
    border-radius: 8px;
    margin-bottom: 20px;
}

.order-item img {
    width: 120px;
    height: 80px;
    object-fit: cover;
    border-radius: 5px;
    margin-right: 20px;
}

.order-item-info {
    flex: 1;
}

.order-item-info h3 {
    margin-bottom: 10px;
}

.order-item-price {
    font-size: 1.3em;
    color: #e74c3c;
    font-weight: bold;
}

.order-info {
    background: #f9f9f9;
    padding: 20px;
    border-radius: 8px;
    margin: 20px 0;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 15px;
}

.order-info-item {
    font-size: 1.1em;
    color: #333;
}

.order-info-item strong {
    color: #667eea;
    margin-right: 8px;
}

.order-info-item span {
    color: #e74c3c;
    font-weight: bold;
    font-family: 'Courier New', monospace;
}

.order-form {
    margin-top: 30px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #333;
    font-weight: bold;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1em;
    font-family: inherit;
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.btn-submit {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 15px 40px;
    border: none;
    border-radius: 5px;
    font-size: 1.1em;
    cursor: pointer;
    width: 100%;
    transition: opacity 0.3s;
}

.btn-submit:hover {
    opacity: 0.9;
}

.total-price {
    text-align: right;
    font-size: 1.5em;
    color: #e74c3c;
    font-weight: bold;
    margin: 20px 0;
    padding: 20px;
    background: #f9f9f9;
    border-radius: 8px;
}

/* Footer */
footer {
    background: #333;
    color: white;
    text-align: center;
    padding: 30px 0;
    margin-top: 50px;
}

footer p {
    margin: 5px 0;
}

/* 在线客服悬浮按钮（经典图标 + 提示气泡） */
.online-service {
    position: fixed;
    top: 50%;
    right: 20px;
    transform: translateY(-50%);
    z-index: 1000;
}

.online-service-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.online-service-icon svg {
    width: 26px;
    height: 26px;
    fill: #ffffff;
}

.online-service-inner {
    position: absolute;
    right: 58px;
    top: 50%;
    transform: translate(10px, -50%);
    opacity: 0;
    pointer-events: none;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 10px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.18);
    padding: 10px 14px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    min-width: 150px;
    transition: all 0.25s ease;
}

.online-service-title {
    font-size: 14px;
    font-weight: bold;
    color: #fff;
}

.online-service-item {
    font-size: 13px;
    color: #f4f5ff;
    text-decoration: none;
    display: block;
}

.online-service-item:hover {
    text-decoration: underline;
}

.online-service:hover .online-service-inner,
.online-service:focus-within .online-service-inner {
    transform: translate(0, -50%);
    opacity: 1;
    pointer-events: auto;
}

/* 返回顶部按钮 */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
    z-index: 1000;
}

.back-to-top:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
}

.back-to-top.show {
    display: flex;
}

.back-to-top svg {
    width: 24px;
    height: 24px;
    fill: white;
}

/* Responsive */
@media (max-width: 768px) {
    .product-grid {
        grid-template-columns: 1fr;
    }
    
    header h1 {
        font-size: 2em;
    }
    
    .detail-container,
    .order-container {
        padding: 20px;
    }
    
    .back-to-top {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
        font-size: 20px;
    }

    /* 移动端隐藏侧边在线客服，避免遮挡内容 */
    .online-service {
        display: none;
    }
}

