* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Microsoft YaHei', sans-serif;
}

body {
    background-color: #f5f5f5;
}

a {
    text-decoration: none;
}


/* 头部样式 */
.header {
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    padding: 15px 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
}

.logo {
    color: white;
    font-size: 32px;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo img {
    height: 40px;
}

/*.nav {*/
/*    display: flex;*/
/*    gap: 30px;*/
/*}*/

/*.nav a {*/
/*    color: white;*/
/*    text-decoration: none;*/
/*    font-size: 20px;*/
/*    transition: opacity 0.3s;*/
/*}*/

/*.nav a:hover {*/
/*    opacity: 0.8;*/
/*}*/

.header-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

.cart-btn {
    background: none;
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 30px;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: background-color 0.3s;
}

.cart-count {
    background-color: white;
    color: #ff6b6b;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: bold;
}

.login-btn {
    background-color: white;
    color: #667eea;
    border: none;
    padding: 12px 30px;
    border-radius: 30px;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s;
}

.login-btn:hover {
    background-color: #f0f0f0;
}

.user-info {
    color: white;
    font-size: 16px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.balance {
    background-color: rgba(255,255,255,0.2);
    padding: 5px 15px;
    border-radius: 15px;
}

/* 搜索区域 */
.search-container {
    max-width: 1200px;
    margin: 30px auto;
    padding: 0 20px;
}

.search-box {
    background-color: white;
    padding: 20px;
    border-radius: 15px;
    box-shadow: 0 2px 15px rgba(0,0,0,0.05);
    display: flex;
    justify-content: center;
    gap: 15px;
}

.search-input {
    width: 60%;
    padding: 15px 25px;
    border: 2px solid #ddd;
    border-radius: 30px;
    font-size: 18px;
    outline: none;
    transition: border-color 0.3s;
}

.search-input:focus {
    border-color: #667eea;
}

.search-btn {
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 15px 40px;
    border-radius: 30px;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    transition: transform 0.3s;
}

.search-btn:hover {
    transform: scale(1.05);
}

/* 分类标签 */
.category-tabs {
    max-width: 1200px;
    margin: 0 auto 30px;
    padding: 0 20px;
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.category-tab {
    padding: 12px 30px;
    border: 2px solid #ddd;
    border-radius: 30px;
    background-color: white;
    font-size: 18px;
    cursor: pointer;
    transition: all 0.3s;
}

.category-tab.active {
    background-color: #667eea;
    color: white;
    border-color: #667eea;
}

.category-tab:hover {
    border-color: #667eea;
}

/* 商品列表 */
.product-container {
    max-width: 1200px;
    margin: 0 auto 50px;
    padding: 0 20px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
}

.product-card {
    background-color: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 2px 15px rgba(0,0,0,0.05);
    transition: transform 0.3s;
}

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

.product-image {
    width: 100%;
    height: 250px;
    background-color: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 80px;
}

.product-image img {
    max-height: 160px !important;
    width: auto !important;
    object-fit: contain !important;
}

.product-info {
    padding: 20px;
}

.product-name {
    font-size: 22px;
    font-weight: bold;
    margin-bottom: 10px;
    color: #333;
}

.product-desc {
    color: #666;
    font-size: 16px;
    margin-bottom: 15px;
    line-height: 1.5;
}

.product-price {
    font-size: 24px;
    color: #ff6b6b;
    font-weight: bold;
    margin-bottom: 15px;
}

.add-cart-btn {
    width: 100%;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 12px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: opacity 0.3s;
}

.add-cart-btn:hover {
    opacity: 0.9;
}

/* 表单样式 */
.form-container {
    max-width: 500px;
    margin: 50px auto;
    background-color: white;
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 2px 20px rgba(0,0,0,0.1);
}

.form-title {
    text-align: center;
    font-size: 28px;
    margin-bottom: 30px;
    color: #333;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 16px;
    color: #333;
}

.form-group input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
    outline: none;
    transition: border-color 0.3s;
}

.form-group input:focus {
    border-color: #667eea;
}

.submit-btn {
    width: 100%;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 15px;
    border-radius: 8px;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    margin-top: 20px;
    transition: opacity 0.3s;
}

.submit-btn:hover {
    opacity: 0.9;
}

.form-link {
    text-align: center;
    margin-top: 20px;
    font-size: 16px;
}

.form-link a {
    color: #667eea;
    text-decoration: none;
    font-weight: bold;
}

/* 购物车样式 */
.cart-container {
    max-width: 1200px;
    margin: 30px auto;
    padding: 0 20px;
}

.cart-title {
    font-size: 28px;
    margin-bottom: 30px;
    color: #333;
}

.cart-table {
    width: 100%;
    background-color: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 2px 15px rgba(0,0,0,0.05);
    margin-bottom: 30px;
}

.cart-table th {
    background-color: #667eea;
    color: white;
    padding: 15px;
    text-align: left;
    font-size: 16px;
}

.cart-table td {
    padding: 15px;
    border-bottom: 1px solid #eee;
}

.cart-product {
    display: flex;
    align-items: center;
    gap: 15px;
}

.cart-product img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 8px;
}

.quantity-control {
    display: flex;
    align-items: center;
    gap: 10px;
}

.quantity-btn {
    width: 30px;
    height: 30px;
    border: 1px solid #ddd;
    background-color: #f5f5f5;
    border-radius: 5px;
    cursor: pointer;
    font-size: 18px;
}

.quantity-input {
    width: 50px;
    text-align: center;
    border: 1px solid #ddd;
    border-radius: 5px;
    padding: 5px;
}

.cart-total {
    text-align: right;
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 20px;
    color: #333;
}

.checkout-btn {
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 15px 40px;
    border-radius: 8px;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    float: right;
    transition: opacity 0.3s;
}

.checkout-btn:hover {
    opacity: 0.9;
}

/* 订单样式 */
.order-container {
    max-width: 1200px;
    margin: 30px auto;
    padding: 0 20px;
}

.order-title {
    font-size: 28px;
    margin-bottom: 30px;
    color: #333;
}

.order-card {
    background-color: white;
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 15px rgba(0,0,0,0.05);
}

.order-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.order-no {
    font-size: 18px;
    font-weight: bold;
    color: #333;
}

.order-status {
    padding: 5px 15px;
    border-radius: 15px;
    font-size: 14px;
    font-weight: bold;
}

.status-0 { background-color: #fff3cd; color: #856404; }
.status-1 { background-color: #d1ecf1; color: #0c5460; }
.status-2 { background-color: #d4edda; color: #155724; }
.status-3 { background-color: #f8d7da; color: #721c24; }

.order-items {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.order-item {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid #f5f5f5;
}

.order-total {
    text-align: right;
    font-size: 20px;
    font-weight: bold;
    margin-top: 15px;
    color: #ff6b6b;
}

/* 商品详情页 */
.product-detail-container {
    max-width: 1200px;
    margin: 30px auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}

.product-detail-image {
    background-color: white;
    border-radius: 15px;
    padding: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 15px rgba(0,0,0,0.05);
}

.product-detail-image img {
    max-width: 100%;
    max-height: 400px;
}

.product-detail-info {
    background-color: white;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 2px 15px rgba(0,0,0,0.05);
}

.product-detail-name {
    font-size: 32px;
    font-weight: bold;
    margin-bottom: 15px;
    color: #333;
}

.product-detail-pharmacy {
    font-size: 18px;
    color: #666;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.product-detail-price {
    font-size: 36px;
    color: #ff6b6b;
    font-weight: bold;
    margin-bottom: 20px;
}

.product-detail-desc {
    font-size: 16px;
    color: #666;
    line-height: 1.8;
    margin-bottom: 30px;
}

.quantity-selector {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 30px;
}

.quantity-selector label {
    font-size: 18px;
    color: #333;
}

/* 结算页 */
.checkout-container {
    max-width: 1200px;
    margin: 30px auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 30px;
}

.checkout-items {
    background-color: white;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 2px 15px rgba(0,0,0,0.05);
}

.checkout-summary {
    background-color: white;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 2px 15px rgba(0,0,0,0.05);
    position: sticky;
    top: 30px;
}

.summary-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
    font-size: 16px;
}

.summary-total {
    display: flex;
    justify-content: space-between;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 2px solid #eee;
    font-size: 24px;
    font-weight: bold;
    color: #ff6b6b;
}

.balance-info {
    background-color: #f0f8ff;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 16px;
}

.pay-btn {
    width: 100%;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 15px;
    border-radius: 8px;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    transition: opacity 0.3s;
}

.pay-btn:hover {
    opacity: 0.9;
}

/* 通用样式 */
.clearfix::after {
    content: "";
    clear: both;
    display: table;
}

.message {
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 16px;
}

.message.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.message.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}