* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    background-color: #f5f5f5;
    color: #333;
}

/* 顶部导航栏 */
.header {
    background: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 12px 16px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* 顶部导航菜单 */
.header-nav {
    display: flex;
    align-items: center;
    gap: 32px;
}

.nav-link {
    text-decoration: none;
    color: #666;
    font-size: 16px;
    padding: 8px 0;
    position: relative;
    transition: color 0.3s;
}

.nav-link:hover {
    color: #7FBF8B;
}

.nav-link.active {
    color: #7FBF8B;
    font-weight: 500;
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: #7FBF8B;
}

.logo-img {
    width: 100px;
    height: 100px;
    object-fit: contain;
    border-radius: 50px;
}

.logo-text {
    display: flex;
    align-items: center;
    gap: 8px;
}

.logo-name {
    font-size: 20px;
    font-weight: bold;
    color: #2d5016;
}

.logo-separator {
    color: #999;
    font-size: 18px;
}

.logo-subtitle {
    font-size: 16px;
    color: #7FBF8B;
}

/* 主内容区 */
.main-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 16px;
}

/* Banner轮播图 */
.banner-section {
    position: relative;
    margin-bottom: 24px;
    border-radius: 12px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.banner-container {
    position: relative;
    width: 100%;
    aspect-ratio: 750 / 300;
    overflow: hidden;
}

.banner-wrapper {
    display: flex;
    transition: transform 0.5s ease;
    height: 100%;
}

.banner-item {
    min-width: 100%;
    height: 100%;
    position: relative;
}

.banner-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.banner-prev,
.banner-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    color: #fff;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s;
}

.banner-prev:hover,
.banner-next:hover {
    background: rgba(0, 0, 0, 0.7);
}

.banner-prev {
    left: 10px;
}

.banner-next {
    right: 10px;
}

.banner-dots {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 10;
}

.banner-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: background 0.3s;
}

.banner-dot.active {
    background: #fff;
}

/* 商品区域 */
.product-section {
    margin-bottom: 32px;
}

/* 智能选茶入口 */
.smart-recommend-banner {
    margin-bottom: 32px;
    background: linear-gradient(135deg, #7FBF8B 0%, #5a9f67 100%);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(127, 191, 139, 0.3);
}

.smart-banner-content {
    padding: 32px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
}

.smart-banner-text {
    flex: 1;
}

.smart-banner-title {
    font-size: 24px;
    font-weight: bold;
    color: #fff;
    margin-bottom: 8px;
}

.smart-banner-subtitle {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.9);
}

.smart-banner-btn {
    background: #fff;
    color: #7FBF8B;
    padding: 14px 32px;
    border-radius: 24px;
    font-size: 16px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    white-space: nowrap;
}

.smart-banner-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.section-header {
    margin-bottom: 16px;
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 16px;
}

.section-title {
    font-size: 20px;
    font-weight: bold;
    color: #2d5016;
    padding-left: 8px;
    border-left: 4px solid #7FBF8B;
    margin: 0;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 16px;
}

.product-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s, box-shadow 0.3s;
    cursor: pointer;
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.product-image {
    width: 100%;
    height: 160px;
    object-fit: cover;
    background: #f0f0f0;
}

.product-info {
    padding: 12px;
}

.product-name {
    font-size: 14px;
    font-weight: 500;
    color: #333;
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.4;
    height: 39px;
    word-break: break-all;
}

.product-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    flex-wrap: wrap;
}

.product-tags-mini {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.tag-mini {
    display: inline-block;
    font-size: 11px;
    padding: 3px 8px;
    border-radius: 10px;
    font-weight: 500;
}

.tag-mini.taste {
    background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%);
    color: #2e7d32;
}

.tag-mini.user {
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    color: #1565c0;
}

.product-price {
    font-size: 14px;
    font-weight: 600;
    color: #ff6b00;
}

.product-price::before {
    content: '价格：¥';
    font-size: 14px;
}

body.hide-price .product-price,
body.hide-price .product-detail-price {
    display: none;
}


/* 商品详情模态框 */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    overflow-y: auto;
}

.modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: #fff;
    border-radius: 12px;
    max-width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    margin: 20px;
}

.modal-close {
    position: absolute;
    right: 16px;
    top: 16px;
    font-size: 32px;
    font-weight: bold;
    color: #999;
    cursor: pointer;
    z-index: 10;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    transition: color 0.3s;
}

.modal-close:hover {
    color: #333;
}

.modal-body {
    padding: 24px;
}

.product-detail-image {
    width: 100%;
    max-height: 400px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 16px;
}

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

.product-detail-price {
    font-size: 20px;
    font-weight: normal;
    color: #666;
    margin-bottom: 16px;
}

.product-detail-price::before {
    content: '价格：¥';
    font-size: 20px;
}

.product-detail-description {
    font-size: 14px;
    color: #666;
    line-height: 1.6;
    margin-bottom: 16px;
}

/* 商品详情页面样式 */
.product-detail-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 16px;
}

.back-button {
    background: #fff;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    padding: 10px 20px;
    font-size: 16px;
    color: #6D5A4B;
    cursor: pointer;
    margin-bottom: 24px;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.back-button:hover {
    background: #E6F4EA;
    border-color: #7FBF8B;
    color: #7FBF8B;
}

.product-detail-card {
    background: #fff;
    border-radius: 12px;
    padding: 32px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    display: flex;
    gap: 32px;
    align-items: flex-start;
}

.product-detail-card .product-detail-image {
    width: 400px;
    max-height: 400px;
    object-fit: cover;
    border-radius: 12px;
    margin-bottom: 0;
    flex-shrink: 0;
}

.product-main-image-wrap {
    position: relative;
    width: 400px;
    flex-shrink: 0;
}

.product-main-image-wrap .product-detail-image {
    width: 100%;
}

.product-package-overlay {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 12px;
    pointer-events: auto;
    z-index: 2;
}

.package-selection-section {
    margin: 8px 0 20px;
    padding: 14px;
    border-radius: 12px;
    background: #f8fafc;
    border: 1px solid #e5e7eb;
}

.package-selection-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.package-selection-title {
    font-size: 16px;
    color: #1f2937;
    font-weight: 600;
}

.package-selection-btn {
    border: none;
    border-radius: 999px;
    background: #2f855a;
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    padding: 8px 14px;
    cursor: pointer;
}

.package-selection-empty {
    margin-top: 10px;
    font-size: 13px;
    color: #6b7280;
}

.package-selection-preview {
    margin-top: 10px;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.package-preview-item {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 8px;
}

.package-preview-label {
    font-size: 12px;
    color: #6b7280;
    margin-bottom: 6px;
}

.package-preview-image {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 8px;
    cursor: zoom-in;
}

.product-detail-info {
    display: flex;
    flex-direction: column;
}

.product-detail-info .product-detail-name {
    font-size: 32px;
    margin-bottom: 16px;
}

.product-detail-info .product-detail-price {
    font-size: 36px;
    margin-bottom: 24px;
}

/* 商品标签 */
.product-tags {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.tag-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 100px;
    font-size: 14px;
}

.taste-tag {
    background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%);
    color: #2e7d32;
}

.user-tag {
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    color: #1565c0;
}

.tag-icon {
    font-size: 18px;
}

.tag-text {
    font-weight: 500;
}

.product-detail-info .product-detail-description {
    flex: 1;
}

.product-detail-info .product-detail-description h3 {
    font-size: 20px;
    color: #6D5A4B;
    margin-bottom: 12px;
    font-weight: 600;
}

.product-detail-info .product-detail-description p {
    font-size: 16px;
    line-height: 1.8;
    color: #666;
}

/* 商品详情图 */
.product-detail-images {
    margin-top: 40px;
    background: #fff;
    border-radius: 12px;
    padding: 32px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.product-detail-images .detail-main-title {
    font-size: 24px;
    color: #2d5016;
    margin-bottom: 32px;
    font-weight: 600;
    text-align: center;
}

.detail-section {
    margin-bottom: 40px;
}

.detail-section:last-child {
    margin-bottom: 0;
}

.detail-section-title {
    font-size: 20px;
    color: #2d5016;
    margin-bottom: 8px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.title-icon {
    font-size: 24px;
}

.title-text {
    flex: 1;
}

.detail-section-desc {
    font-size: 14px;
    color: #999;
    margin-bottom: 16px;
    padding-left: 32px;
}

.detail-section-images {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.detail-image-wrap {
    position: relative;
    width: 100%;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.detail-image-wrap.ratio-3-4 {
    aspect-ratio: 3 / 4;
}

.detail-image-wrap.ratio-4-3 {
    aspect-ratio: 4 / 3;
}

.detail-section-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.2s ease;
}

.detail-section-image:hover {
    transform: scale(1.02);
}

.detail-images-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}

.package-modal {
    position: fixed;
    inset: 0;
    z-index: 1200;
    display: none;
}

.package-modal.show {
    display: block;
}

.package-modal-mask {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.48);
}

.package-modal-panel {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    background: #fff;
    border-radius: 16px 16px 0 0;
    padding: 16px;
    max-height: 72vh;
    overflow: auto;
}

.package-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.package-modal-header h3 {
    font-size: 18px;
    color: #1f2937;
}

.package-modal-close {
    border: 0;
    background: #f3f4f6;
    color: #374151;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
}

.image-viewer-modal {
    position: fixed;
    inset: 0;
    z-index: 1300;
    display: none;
}

.image-viewer-modal.show {
    display: block;
}

.image-viewer-mask {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);
}

.image-viewer-content {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.image-viewer-image {
    max-width: min(92vw, 920px);
    max-height: 88vh;
    border-radius: 12px;
    object-fit: contain;
    background: #fff;
}

.image-viewer-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.25);
    color: #fff;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
}

.package-options {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 12px;
}

.package-option {
    border: 2px solid #e5e7eb;
    background: #fff;
    border-radius: 10px;
    padding: 8px;
    text-align: left;
    cursor: pointer;
}

.package-option.active {
    border-color: #7FBF8B;
    box-shadow: 0 0 0 3px rgba(127, 191, 139, 0.18);
}

.package-option-image {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 8px;
}

.package-option-images {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.package-option-image-item {
    display: flex;
    flex-direction: column;
}

.package-option-image-label {
    font-size: 11px;
    color: #6b7280;
    margin-bottom: 4px;
}

.package-option-name {
    margin-top: 8px;
    color: #374151;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.4;
}

.package-option-empty {
    min-height: 110px;
    border: 1px dashed #cbd5e1;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    color: #64748b;
}

.detail-image {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease;
}

.detail-image:hover {
    transform: scale(1.02);
}

/* 响应式设计 - 商品详情 */
@media (max-width: 768px) {
    .product-detail-card {
        flex-direction: column;
        gap: 24px;
        padding: 24px;
    }

    .product-detail-card .product-detail-image {
        width: 100%;
        max-height: 300px;
    }

    .product-main-image-wrap {
        width: 100%;
    }

    .product-detail-info .product-detail-name {
        font-size: 24px;
    }

    .product-detail-info .product-detail-price {
        font-size: 28px;
    }
}

@media (max-width: 768px) {
    .product-detail-images {
        padding: 24px;
        margin-top: 24px;
    }
    
    .product-detail-images .detail-main-title {
        font-size: 20px;
        margin-bottom: 24px;
    }
    
    .detail-section {
        margin-bottom: 32px;
    }
    
    .detail-section-title {
        font-size: 18px;
    }
    
    .title-icon {
        font-size: 20px;
    }
    
    .detail-section-desc {
        font-size: 13px;
        padding-left: 28px;
    }
}

/* 加载状态 */
.loading {
    text-align: center;
    padding: 40px;
    color: #999;
}

.empty-state {
    text-align: center;
    padding: 40px;
    color: #999;
}

.empty-state-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.empty-state-btn {
    display: inline-block;
    margin-top: 16px;
    padding: 10px 24px;
    background: #7FBF8B;
    color: #fff;
    text-decoration: none;
    border-radius: 20px;
    transition: all 0.3s;
}

.empty-state-btn:hover {
    background: #6aaa76;
    transform: translateY(-2px);
}

/* 场景信息区域 */
.scene-info-section {
    margin-bottom: 32px;
}

.scene-info-card {
    background: linear-gradient(135deg, #E6F4EA 0%, #d4ead9 100%);
    border-radius: 12px;
    padding: 32px;
    display: flex;
    align-items: center;
    gap: 24px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.scene-info-icon {
    width: 80px;
    height: 80px;
    background: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.scene-info-content {
    flex: 1;
}

.scene-info-title {
    font-size: 28px;
    font-weight: bold;
    color: #2d5016;
    margin-bottom: 8px;
}

.scene-info-description {
    font-size: 16px;
    color: #666;
    line-height: 1.6;
}

/* 场景操作按钮 */
.section-header-with-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    gap: 16px;
}

.scene-actions {
    display: flex;
    gap: 12px;
}

.action-link {
    font-size: 14px;
    color: #7FBF8B;
    text-decoration: none;
    padding: 8px 16px;
    border: 1px solid #7FBF8B;
    border-radius: 20px;
    transition: all 0.3s;
    white-space: nowrap;
}

.action-link:hover {
    background: #7FBF8B;
    color: #fff;
}

/* 悬浮咨询按钮 */
.consult-button {
    position: fixed;
    bottom: 32px;
    right: 32px;
    background: linear-gradient(135deg, #7FBF8B 0%, #6aaa76 100%);
    color: #fff;
    padding: 14px 24px;
    border-radius: 50px;
    box-shadow: 0 4px 16px rgba(127, 191, 139, 0.4);
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    font-size: 16px;
    font-weight: 500;
    transition: all 0.3s;
    z-index: 999;
}

.consult-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(127, 191, 139, 0.5);
}

.consult-icon {
    font-size: 20px;
}

.consult-text {
    white-space: nowrap;
}

/* 页面内容切换 */
.page-content {
    display: none;
}

.page-content.active {
    display: block;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .header-content {
        gap: 8px;
    }

    .header-nav {
        gap: 24px;
    }

    .product-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 12px;
    }

    .banner-container {
        aspect-ratio: 750 / 300;
    }

    .section-title {
        font-size: 18px;
    }

    .smart-banner-content {
        flex-direction: column;
        text-align: center;
        padding: 24px;
    }

    .smart-banner-title {
        font-size: 20px;
    }

    .smart-banner-subtitle {
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .header-content {
        padding: 8px 12px;
    }

    .header-nav {
        gap: 16px;
    }

    .nav-link {
        font-size: 14px;
    }

    .logo-img {
        width: 40px;
        height: 40px;
    }

    .product-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }

    .banner-container {
        aspect-ratio: 750 / 300;
    }

    .logo-name {
        font-size: 18px;
    }

    .logo-subtitle {
        font-size: 14px;
    }

    .smart-banner-content {
        padding: 20px;
    }

    .smart-banner-title {
        font-size: 18px;
    }

    .smart-banner-subtitle {
        font-size: 13px;
    }

    .smart-banner-btn {
        padding: 12px 24px;
        font-size: 14px;
    }

    .scene-info-card {
        flex-direction: column;
        text-align: center;
        padding: 24px;
    }

    .scene-info-icon {
        width: 60px;
        height: 60px;
        font-size: 30px;
    }

    .scene-info-title {
        font-size: 22px;
    }

    .scene-info-description {
        font-size: 14px;
    }

    .scene-actions {
        flex-direction: column;
        width: 100%;
    }

    .action-link {
        text-align: center;
    }

    .section-header-with-actions {
        flex-direction: column;
        align-items: flex-start;
    }

    .consult-button {
        bottom: 20px;
        right: 20px;
        padding: 12px 20px;
        font-size: 14px;
    }

    .consult-icon {
        font-size: 18px;
    }

    .package-options {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .package-selection-preview {
        grid-template-columns: 1fr;
    }
}
