/* ==================== 基础样式 ==================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    color: #333;
    background: #f5f6f8;
    line-height: 1.6;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

button {
    cursor: pointer;
    border: none;
    outline: none;
    font-family: inherit;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ==================== 顶部信息栏 ==================== */
.top-bar {
    background: #1f5c4a;
    color: #fff;
    font-size: 13px;
    padding: 6px 0;
}

.top-bar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.top-bar-left {
    display: flex;
    align-items: center;
    gap: 8px;
}

.top-bar-right {
    display: flex;
    gap: 20px;
}

.top-bar-right a:hover {
    color: #c9a55a;
}

/* ==================== 头部 ==================== */
.header {
    background: #fff;
    padding: 20px 0;
    border-bottom: 1px solid #eee;
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #1f5c4a, #2e8b6e);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 24px;
    font-weight: bold;
}

.logo-text h1 {
    font-size: 22px;
    color: #1f5c4a;
    font-weight: 700;
}

.logo-text p {
    font-size: 12px;
    color: #999;
    letter-spacing: 2px;
}

.header-info {
    text-align: right;
}

.header-info h3 {
    font-size: 16px;
    color: #1f5c4a;
}

.header-info p {
    font-size: 12px;
    color: #999;
}

.header-actions {
    display: flex;
    gap: 10px;
}

.btn {
    padding: 8px 20px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s;
    display: inline-block;
}

.btn-outline {
    border: 1px solid #1f5c4a;
    color: #1f5c4a;
    background: #fff;
}

.btn-outline:hover {
    background: #1f5c4a;
    color: #fff;
}

.btn-primary {
    background: #1f5c4a;
    color: #fff;
}

.btn-primary:hover {
    background: #164336;
}

.btn-gold {
    background: #c9a55a;
    color: #fff;
}

.btn-gold:hover {
    background: #b08d45;
}

/* ==================== 导航栏 ==================== */
.nav {
    background: #fff;
    border-bottom: 1px solid #eee;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.nav .container {
    display: flex;
    align-items: center;
}

.category-btn {
    background: #1f5c4a;
    color: #fff;
    padding: 14px 24px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
}

.category-btn:hover {
    background: #164336;
}

.category-btn .icon {
    font-size: 18px;
}

.nav-menu {
    display: flex;
    flex: 1;
}

.nav-menu a {
    padding: 14px 28px;
    font-size: 15px;
    color: #333;
    font-weight: 500;
    position: relative;
    transition: color 0.3s;
}

.nav-menu a:hover,
.nav-menu a.active {
    color: #1f5c4a;
}

.nav-menu a.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 30px;
    height: 3px;
    background: #1f5c4a;
    border-radius: 2px;
}

.nav-cart {
    padding: 14px 20px;
    color: #333;
    font-size: 15px;
    display: flex;
    align-items: center;
    gap: 6px;
    position: relative;
}

.nav-cart:hover {
    color: #1f5c4a;
}

.cart-badge {
    position: absolute;
    top: 10px;
    right: 6px;
    background: #e74c3c;
    color: #fff;
    font-size: 11px;
    min-width: 18px;
    height: 18px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 5px;
    font-weight: bold;
}

/* ==================== Banner ==================== */
.banner {
    background: linear-gradient(135deg, #1f5c4a 0%, #2e8b6e 100%);
    padding: 60px 0;
    position: relative;
    overflow: hidden;
}

.banner .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.banner-content {
    color: #fff;
    max-width: 550px;
}

.banner-tag {
    display: inline-block;
    background: rgba(201, 165, 90, 0.9);
    color: #fff;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 13px;
    margin-bottom: 20px;
}

.banner-content h2 {
    font-size: 42px;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 16px;
}

.banner-content p {
    font-size: 16px;
    opacity: 0.9;
    margin-bottom: 12px;
}

.banner-desc {
    font-size: 14px !important;
    opacity: 0.75 !important;
}

.banner-buttons {
    margin-top: 30px;
    display: flex;
    gap: 15px;
}

.banner-buttons .btn {
    padding: 12px 32px;
    font-size: 15px;
}

.banner-image {
    width: 420px;
    height: 280px;
    background: rgba(255,255,255,0.1);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid rgba(255,255,255,0.2);
}

.banner-image-icon {
    font-size: 100px;
    opacity: 0.6;
}

/* ==================== 服务特色 ==================== */
.features {
    background: #fff;
    padding: 40px 0;
}

.features .container {
    display: flex;
    justify-content: space-around;
}

.feature-item {
    text-align: center;
    padding: 10px 20px;
}

.feature-icon {
    width: 50px;
    height: 50px;
    margin: 0 auto 12px;
    background: #f0f7f4;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: #1f5c4a;
}

.feature-item h4 {
    font-size: 14px;
    color: #333;
    margin-bottom: 4px;
}

.feature-item p {
    font-size: 12px;
    color: #999;
}

/* ==================== 板块标题 ==================== */
.section-title {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 25px;
}

.section-tag {
    background: #1f5c4a;
    color: #fff;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 13px;
}

.section-title h3 {
    font-size: 22px;
    color: #333;
    font-weight: 700;
}

.section-title .en {
    font-size: 13px;
    color: #c9a55a;
    letter-spacing: 1px;
}

.section-more {
    margin-left: auto;
    font-size: 13px;
    color: #999;
}

.section-more:hover {
    color: #1f5c4a;
}

/* ==================== 公司介绍 ==================== */
.about {
    padding: 50px 0;
}

.about .container {
    background: #fff;
    border-radius: 8px;
    padding: 40px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.05);
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: center;
}

.about-text p {
    color: #666;
    font-size: 15px;
    margin-bottom: 14px;
    text-align: justify;
}

.about-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.stat-card {
    text-align: center;
    padding: 25px 15px;
    background: linear-gradient(135deg, #f0f7f4, #e8f2ee);
    border-radius: 8px;
}

.stat-number {
    font-size: 36px;
    font-weight: 700;
    color: #1f5c4a;
}

.stat-label {
    font-size: 13px;
    color: #666;
    margin-top: 5px;
}

/* ==================== 产品分类板块 ==================== */
.product-section {
    padding: 40px 0;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 16px;
}

.product-card {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s;
    cursor: pointer;
    box-shadow: 0 1px 6px rgba(0,0,0,0.06);
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
}

.product-img {
    width: 100%;
    height: 160px;
    background: linear-gradient(135deg, #f5f7f6, #e8edea);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    color: #1f5c4a;
    position: relative;
    overflow: hidden;
}

.product-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.product-img-fallback {
    position: absolute;
    font-size: 48px;
}

.product-tag {
    position: absolute;
    top: 10px;
    left: 10px;
    background: #e74c3c;
    color: #fff;
    font-size: 11px;
    padding: 3px 8px;
    border-radius: 3px;
}

.product-info {
    padding: 14px;
}

.product-title {
    font-size: 14px;
    color: #333;
    margin-bottom: 10px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    height: 40px;
}

.product-price-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.product-price {
    color: #e74c3c;
    font-size: 18px;
    font-weight: 700;
}

.product-price::before {
    content: '¥';
    font-size: 14px;
}

.product-action {
    background: #f0f7f4;
    color: #1f5c4a;
    padding: 5px 14px;
    font-size: 12px;
    border-radius: 4px;
    transition: all 0.3s;
}

.product-action:hover {
    background: #1f5c4a;
    color: #fff;
}

/* ==================== 侧边分类（产品页） ==================== */
.category-sidebar {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    min-height: 300px;
}

.sidebar-header {
    background: #1f5c4a;
    color: #fff;
    padding: 14px 20px;
    font-weight: 500;
}

.sidebar-list li {
    padding: 12px 20px;
    border-bottom: 1px solid #f0f0f0;
    font-size: 14px;
    color: #333;
    cursor: pointer;
    transition: all 0.2s;
}

.sidebar-list li:hover {
    background: #f0f7f4;
    color: #1f5c4a;
    padding-left: 26px;
}

/* ==================== 产品详情页 ==================== */
.product-detail {
    padding: 40px 0;
}

.detail-layout {
    display: grid;
    grid-template-columns: 450px 1fr;
    gap: 40px;
    background: #fff;
    border-radius: 8px;
    padding: 40px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.05);
}

.detail-image {
    width: 100%;
    height: 400px;
    background: linear-gradient(135deg, #f5f7f6, #e8edea);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 120px;
    color: #1f5c4a;
    overflow: hidden;
}

.detail-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.detail-info h1 {
    font-size: 24px;
    color: #333;
    margin-bottom: 12px;
    line-height: 1.4;
}

.detail-subtitle {
    color: #999;
    font-size: 14px;
    margin-bottom: 20px;
}

.detail-price-box {
    background: #fff8f8;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.detail-price {
    color: #e74c3c;
    font-size: 32px;
    font-weight: 700;
}

.detail-price::before {
    content: '¥';
    font-size: 18px;
}

.detail-meta {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 25px;
    padding: 20px 0;
    border-top: 1px dashed #eee;
    border-bottom: 1px dashed #eee;
}

.meta-item {
    font-size: 14px;
}

.meta-item label {
    color: #999;
    margin-right: 8px;
}

.meta-item span {
    color: #333;
}

.quantity-box {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 25px;
}

.quantity-label {
    font-size: 14px;
    color: #666;
}

.quantity-control {
    display: flex;
    align-items: center;
    border: 1px solid #ddd;
    border-radius: 4px;
    overflow: hidden;
}

.quantity-btn {
    width: 36px;
    height: 36px;
    background: #f5f5f5;
    color: #333;
    font-size: 18px;
}

.quantity-btn:hover {
    background: #eee;
}

.quantity-input {
    width: 50px;
    height: 36px;
    text-align: center;
    border: none;
    border-left: 1px solid #ddd;
    border-right: 1px solid #ddd;
    font-size: 14px;
}

.detail-actions {
    display: flex;
    gap: 15px;
}

.detail-actions .btn {
    padding: 14px 40px;
    font-size: 16px;
}

/* ==================== 购物车页面 ==================== */
.cart-section {
    padding: 40px 0;
}

.cart-table {
    width: 100%;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0,0,0,0.05);
}

.cart-table-header {
    display: grid;
    grid-template-columns: 60px 2fr 1fr 100px 120px 80px;
    padding: 16px 20px;
    background: #f8f9fa;
    font-size: 14px;
    color: #666;
    font-weight: 500;
    border-bottom: 1px solid #eee;
}

.cart-item {
    display: grid;
    grid-template-columns: 60px 2fr 1fr 100px 120px 80px;
    padding: 20px;
    align-items: center;
    border-bottom: 1px solid #f0f0f0;
}

.cart-item:last-child {
    border-bottom: none;
}

.cart-item-img {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #f5f7f6, #e8edea);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    color: #1f5c4a;
    overflow: hidden;
}

.cart-item-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.cart-item-name {
    font-size: 14px;
    color: #333;
    padding: 0 15px;
}

.cart-item-price {
    color: #e74c3c;
    font-weight: 500;
}

.cart-item .quantity-control {
    width: fit-content;
}

.cart-item-subtotal {
    color: #e74c3c;
    font-weight: 700;
    font-size: 16px;
}

.cart-item-remove {
    color: #999;
    cursor: pointer;
    font-size: 14px;
    background: none;
}

.cart-item-remove:hover {
    color: #e74c3c;
}

.cart-empty {
    text-align: center;
    padding: 80px 20px;
    color: #999;
}

.cart-empty-icon {
    font-size: 64px;
    margin-bottom: 20px;
    opacity: 0.4;
}

.cart-footer {
    background: #fff;
    border-radius: 8px;
    padding: 25px 30px;
    margin-top: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 12px rgba(0,0,0,0.05);
}

.cart-total {
    font-size: 15px;
    color: #666;
}

.cart-total span {
    color: #e74c3c;
    font-size: 24px;
    font-weight: 700;
    margin-left: 10px;
}

/* ==================== 地址表单 ==================== */
.checkout-section {
    padding: 40px 0;
}

.checkout-layout {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 25px;
}

.checkout-card {
    background: #fff;
    border-radius: 8px;
    padding: 30px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.05);
    margin-bottom: 20px;
}

.checkout-card h3 {
    font-size: 18px;
    color: #333;
    margin-bottom: 25px;
    padding-bottom: 12px;
    border-bottom: 2px solid #1f5c4a;
    display: inline-block;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
    margin-bottom: 18px;
}

.form-group {
    margin-bottom: 18px;
}

.form-group label {
    display: block;
    font-size: 14px;
    color: #333;
    margin-bottom: 8px;
    font-weight: 500;
}

.form-group label .required {
    color: #e74c3c;
    margin-left: 3px;
}

.form-input {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.3s;
    font-family: inherit;
}

.form-input:focus {
    outline: none;
    border-color: #1f5c4a;
}

select.form-input {
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23999' stroke-width='2'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px;
    padding-right: 40px;
}

.order-summary {
    background: #fff;
    border-radius: 8px;
    padding: 30px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.05);
    position: sticky;
    top: 20px;
    align-self: start;
    height: fit-content;
}

.order-summary h3 {
    font-size: 18px;
    color: #333;
    margin-bottom: 20px;
}

.summary-item {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px dashed #eee;
    font-size: 14px;
}

.summary-item:last-of-type {
    border-bottom: none;
}

.summary-item .label {
    color: #666;
}

.summary-total {
    display: flex;
    justify-content: space-between;
    padding: 20px 0;
    border-top: 2px solid #1f5c4a;
    margin-top: 10px;
    font-size: 16px;
    font-weight: 500;
}

.summary-total .amount {
    color: #e74c3c;
    font-size: 28px;
    font-weight: 700;
}

.submit-order-btn {
    width: 100%;
    padding: 16px;
    font-size: 17px;
    font-weight: 600;
    margin-top: 15px;
}

/* ==================== 登录页面 ==================== */
.login-page {
    min-height: calc(100vh - 200px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 50px 20px;
}

.login-box {
    width: 420px;
    background: #fff;
    border-radius: 12px;
    padding: 40px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
}

.login-box h2 {
    text-align: center;
    font-size: 24px;
    color: #1f5c4a;
    margin-bottom: 10px;
}

.login-box .subtitle {
    text-align: center;
    color: #999;
    font-size: 14px;
    margin-bottom: 30px;
}

.login-form .form-group {
    margin-bottom: 20px;
}

.login-form .form-input {
    padding: 14px 15px;
    font-size: 15px;
}

.login-form .btn {
    width: 100%;
    padding: 14px;
    font-size: 16px;
    margin-top: 10px;
}

.login-links {
    display: flex;
    justify-content: space-between;
    margin-top: 20px;
    font-size: 13px;
}

.login-links a {
    color: #1f5c4a;
}

.login-links a:hover {
    text-decoration: underline;
}

/* ==================== Toast 提示 ==================== */
.toast {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0,0,0,0.85);
    color: #fff;
    padding: 12px 30px;
    border-radius: 6px;
    font-size: 14px;
    z-index: 9999;
    animation: toastFade 2.5s ease forwards;
}

@keyframes toastFade {
    0% { opacity: 0; transform: translate(-50%, -50%) scale(0.9); }
    15% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
    85% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
    100% { opacity: 0; transform: translate(-50%, -50%) scale(0.9); }
}

/* ==================== 页脚 ==================== */
.footer {
    background: #1f5c4a;
    color: #fff;
    padding: 50px 0 20px;
    margin-top: 50px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

.footer-col h4 {
    font-size: 16px;
    margin-bottom: 18px;
    color: #fff;
}

.footer-col p {
    font-size: 13px;
    color: rgba(255,255,255,0.7);
    margin-bottom: 8px;
    line-height: 1.8;
}

.footer-col ul li {
    margin-bottom: 10px;
}

.footer-col ul li a {
    font-size: 13px;
    color: rgba(255,255,255,0.7);
    transition: color 0.3s;
}

.footer-col ul li a:hover {
    color: #c9a55a;
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.15);
    padding-top: 20px;
    text-align: center;
    font-size: 12px;
    color: rgba(255,255,255,0.5);
}

/* ==================== 面包屑 ==================== */
.breadcrumb {
    padding: 20px 0 10px;
    font-size: 13px;
    color: #666;
}

.breadcrumb a {
    color: #666;
}

.breadcrumb a:hover {
    color: #1f5c4a;
}

.breadcrumb span {
    margin: 0 8px;
    color: #ccc;
}

/* ==================== 响应式 ==================== */
@media (max-width: 1024px) {
    .product-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    .about-content {
        grid-template-columns: 1fr;
    }
    .detail-layout {
        grid-template-columns: 1fr;
    }
    .checkout-layout {
        grid-template-columns: 1fr;
    }
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .product-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .form-row {
        grid-template-columns: 1fr;
    }
    .banner-content h2 {
        font-size: 28px;
    }
    .features {
        flex-wrap: wrap;
    }
}
