/* 基础样式 */
body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f4f4f4;
}

header {
    background-color: #333;
    padding: 10px 0;
}

header nav ul {
    list-style-type: none;
    margin: 0;
    padding: 0;
    text-align: center;
}

header nav ul li {
    display: inline;
    margin: 0 15px;
}

header nav ul li a {
    color: white;
    text-decoration: none;
    font-size: 18px;
}

footer {
    background-color: #333;
    color: white;
    text-align: center;
    padding: 10px;
}

/* 首页轮播图 */
.carousel {
    text-align: center;
}

.carousel-item img {
    width: 100%;
    height: auto;
}

/* 商品列表 */
.products {
    margin: 20px;
}

.product-list {
    display: flex;
    justify-content: space-around;
}

.product-item {
    background-color: white;
    padding: 10px;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.product-item img {
    width: 100%;
    height: auto;
    border-radius: 8px;
}

.product-item h3 {
    font-size: 18px;
}

.product-item p {
    font-size: 16px;
    color: #555;
}

.product-item .btn {
    display: inline-block;
    background-color: #007bff;
    color: white;
    padding: 8px 15px;
    text-decoration: none;
    border-radius: 5px;
    margin-top: 10px;
}

.product-item .btn:hover {
    background-color: #0056b3;
}

/* 登录表单 */
.login-form {
    width: 300px;
    margin: 40px auto;
    padding: 20px;
    background-color: white;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
}

.login-form h2 {
    text-align: center;
    margin-bottom: 20px;
}

.login-form label {
    display: block;
    margin-bottom: 5px;
}

.login-form input {
    width: 100%;
    padding: 8px;
    margin-bottom: 15px;
    border-radius: 5px;
    border: 1px solid #ccc;
}

.login-form .btn {
    width: 100%;
    padding: 10px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 5px;
}

.login-form .btn:hover {
    background-color: #0056b3;
}

/* 商品详情 */
.product-detail {
    display: flex;
    justify-content: center;
    padding: 20px;
    background-color: white;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    margin: 20px;
}

.product-image {
    flex: 1;
    margin-right: 20px;
}

.product-image img {
    width: 100%;
    height: auto;
}

.product-info {
    flex: 2;
}

.product-info h2 {
    margin-bottom: 10px;
}

.product-info p {
    margin-bottom: 10px;
}

.product-info .btn {
    background-color: #28a745;
}

.product-info .btn:hover {
    background-color: #218838;
}

/* 页面主体 */
h2 {
    font-size: 24px;
    color: #333;
    text-align: center;
    margin-bottom: 20px;
}

/* 去支付页面 */
.payment-page {
    padding: 20px;
    background-color: white;
    max-width: 900px;
    margin: 30px auto;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
}

.payment-info {
    flex: 1 1 50%;
    padding: 20px;
}

.payment-info h3 {
    font-size: 22px;
    color: #333;
    margin-bottom: 20px;
}

.payment-info p {
    font-size: 16px;
    color: #555;
}

.payment-image {
    flex: 1 1 100%;
    text-align: center;
    margin-top: 20px;
}

.payment-image img {
    width: 80%;
    max-width: 400px;
    border-radius: 8px;
}

.payment-methods {
    flex: 1 1 50%;
    background-color: #f9f9f9;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 0 8px rgba(0, 0, 0, 0.05);
}

.payment-methods h3 {
    font-size: 20px;
    margin-bottom: 10px;
    color: #333;
}

.payment-methods ul {
    list-style-type: none;
    padding: 0;
}

.payment-methods ul li {
    margin-bottom: 15px;
}

.payment-methods button {
    width: 100%;
    padding: 10px;
    background-color: #007bff;
    color: white;
    border: none;
    font-size: 16px;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.payment-methods button:hover {
    background-color: #0056b3;
}

/* 支付成功页面 */
.payment-success {
    padding: 20px;
    background-color: white;
    max-width: 900px;
    margin: 30px auto;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
}

.success-message {
    font-size: 16px;
    color: #333;
    margin-bottom: 20px;
    text-align: center;
    width: 100%;
}

.payment-success img {
    width: 80%;
    max-width: 400px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.next-actions {
    background-color: #f9f9f9;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 0 8px rgba(0, 0, 0, 0.05);
    width: 100%;
    text-align: center;
}

.next-actions h3 {
    font-size: 20px;
    margin-bottom: 10px;
    color: #333;
}

.next-actions ul {
    list-style-type: none;
    padding: 0;
}

.next-actions ul li {
    margin-bottom: 15px;
}

.next-actions button {
    width: 100%;
    padding: 10px;
    background-color: #28a745;
    color: white;
    border: none;
    font-size: 16px;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.next-actions button:hover {
    background-color: #218838;
}

/* 用户名显示 */
#userGreeting {
    color: #fff;
    font-size: 16px;
    padding: 10px;
    margin-left: auto;
}

/* 使页面更加美观的基本样式 */
button:focus {
    outline: none;
}

button:disabled {
    background-color: #dcdcdc;
    cursor: not-allowed;
}
