/* ============================
   移动端专项优化
   ============================ */

/* 微信浏览器优化 */
@supports (-webkit-touch-callout: none) {
    body {
        -webkit-text-size-adjust: 100%;
        -webkit-touch-callout: none;
    }
}

/* 安全区域适配 */
@supports (padding-top: env(safe-area-inset-top)) {
    .navbar {
        padding-top: env(safe-area-inset-top);
    }

    .footer {
        padding-bottom: env(safe-area-inset-bottom);
    }

    .back-to-top {
        bottom: calc(30px + env(safe-area-inset-bottom));
    }
}

/* 触摸优化 */
@media (hover: none) and (pointer: coarse) {
    /* 禁用hover效果 */
    .product-card:hover,
    .tea-card:hover,
    .news-card:hover,
    .philosophy-card:hover,
    .highlight-card:hover {
        transform: none;
        box-shadow: var(--shadow);
    }

    /* 增大点击区域 */
    .nav-menu a {
        padding: 15px 20px;
        min-height: 48px;
        display: flex;
        align-items: center;
    }

    .filter-btn {
        padding: 12px 24px;
        min-height: 44px;
    }

    .btn {
        padding: 16px 36px;
        min-height: 48px;
    }

    .map-link,
    .map-link-footer,
    .map-link-cta {
        padding: 8px 0;
        display: inline-flex;
        align-items: center;
    }

    .news-link,
    .faq-question {
        min-height: 48px;
        display: flex;
        align-items: center;
    }
}

/* 小屏幕手机 (320px-375px) */
@media (max-width: 375px) {
    :root {
        --section-padding: 60px 0;
    }

    .container {
        padding: 0 15px;
    }

    /* 导航栏 */
    .navbar {
        padding: 12px 0;
    }

    .logo-text {
        font-size: 16px;
        letter-spacing: 1px;
    }

    .logo-icon {
        width: 40px;
        height: 40px;
        font-size: 22px;
    }

    /* 英雄区域 */
    .hero {
        min-height: 100svh;
    }

    .hero-title {
        font-size: 36px;
        letter-spacing: 4px;
    }

    .hero-tagline {
        font-size: 16px;
        letter-spacing: 3px;
    }

    .hero-subtitle {
        font-size: 13px;
        letter-spacing: 2px;
    }

    .hero-desc {
        font-size: 14px;
        line-height: 1.8;
    }

    .hero-buttons {
        flex-direction: column;
        align-items: center;
        gap: 12px;
    }

    .hero-buttons .btn {
        width: 100%;
        max-width: 240px;
    }

    .hero-scroll {
        bottom: 20px;
    }

    /* 区域标题 */
    .section-header h2 {
        font-size: 24px;
        letter-spacing: 2px;
    }

    .section-tag {
        font-size: 12px;
        padding: 5px 16px;
    }

    /* 品牌简介 */
    .brand-content h3 {
        font-size: 20px;
    }

    .brand-stats {
        grid-template-columns: repeat(3, 1fr);
        gap: 10px;
    }

    .stat-number {
        font-size: 24px;
    }

    .stat-label {
        font-size: 12px;
    }

    /* 企业理念卡片 */
    .philosophy-card {
        padding: 25px 20px;
    }

    .card-icon {
        width: 50px;
        height: 50px;
    }

    .card-icon svg {
        width: 22px;
        height: 22px;
    }

    .philosophy-card h4 {
        font-size: 16px;
    }

    .philosophy-card p {
        font-size: 13px;
    }

    /* 产品网格 */
    .product-grid {
        gap: 15px;
    }

    .product-placeholder {
        height: 200px;
    }

    .product-info {
        padding: 15px;
    }

    .product-info h4 {
        font-size: 16px;
    }

    .product-desc {
        font-size: 13px;
    }

    /* 茶叶区域 */
    .tea-content {
        padding: 20px;
    }

    .tea-content h4 {
        font-size: 18px;
    }

    .tea-desc {
        font-size: 13px;
    }

    .tea-tags span {
        padding: 5px 12px;
        font-size: 11px;
    }

    /* 茶道文化 */
    .culture-text h2 {
        font-size: 22px;
    }

    .feature {
        gap: 15px;
    }

    .feature-icon {
        width: 50px;
        height: 50px;
        font-size: 24px;
    }

    .feature h5 {
        font-size: 15px;
    }

    .feature p {
        font-size: 13px;
    }

    /* 联系我们 */
    .contact-info h3,
    .contact-form-wrapper h3 {
        font-size: 22px;
    }

    .contact-form-wrapper {
        padding: 25px 20px;
    }

    .form-group input,
    .form-group select,
    .form-group textarea {
        padding: 12px 15px;
        font-size: 14px;
    }

    /* 协会部分 */
    .association-text h2 {
        font-size: 24px;
    }

    .artists-list {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .artist-item {
        padding: 10px;
    }

    .artist-name {
        font-size: 14px;
    }

    .highlight-card {
        padding: 20px 15px;
    }

    .highlight-icon {
        font-size: 28px;
    }

    .highlight-card h4 {
        font-size: 16px;
    }

    .highlight-card p {
        font-size: 12px;
    }

    /* 页脚 */
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .footer-brand {
        text-align: center;
    }

    .footer-links,
    .footer-contact {
        text-align: center;
    }

    .footer-links h5,
    .footer-contact h5 {
        font-size: 16px;
    }

    .footer-bottom {
        font-size: 12px;
    }

    /* 返回顶部 */
    .back-to-top {
        width: 44px;
        height: 44px;
        bottom: 20px;
        right: 20px;
    }

    .back-to-top svg {
        width: 18px;
        height: 18px;
    }
}

/* 中等屏幕手机 (376px-480px) */
@media (min-width: 376px) and (max-width: 480px) {
    .hero-title {
        font-size: 42px;
        letter-spacing: 5px;
    }

    .hero-tagline {
        font-size: 18px;
    }

    .product-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .product-placeholder {
        height: 240px;
    }
}

/* 平板竖屏 (481px-768px) */
@media (min-width: 481px) and (max-width: 768px) {
    .hero-title {
        font-size: 48px;
        letter-spacing: 6px;
    }

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

    .product-placeholder {
        height: 220px;
    }

    .tea-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* 移动端菜单动画优化 */
@media (max-width: 768px) {
    .nav-menu {
        transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    }

    .nav-toggle span {
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    }

    .nav-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }

    .nav-toggle.active span:nth-child(2) {
        opacity: 0;
    }

    .nav-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -6px);
    }

    /* 遮罩层 */
    .nav-menu.active::before {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: -1;
    }

    /* 表单优化 */
    .form-group input,
    .form-group select,
    .form-group textarea {
        font-size: 16px; /* 防止iOS自动缩放 */
    }

    /* 图片自适应 */
    .placeholder-img {
        min-height: 180px;
    }

    /* 滚动优化 */
    .comparison-table-wrapper {
        -webkit-overflow-scrolling: touch;
    }

    /* 按钮反馈 */
    .btn:active,
    .filter-btn:active,
    .nav-menu a:active {
        opacity: 0.8;
        transform: scale(0.98);
    }
}

/* 深色模式支持 (可选) */
@media (prefers-color-scheme: dark) {
    /* 保持原有设计，不强制深色模式 */
}

/* 减少动画 (无障碍) */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .hero-scroll .scroll-arrow {
        animation: none;
    }

    .particle {
        display: none;
    }
}

/* 打印样式 */
@media print {
    .navbar,
    .hero-particles,
    .back-to-top,
    .hero-scroll,
    .cta {
        display: none !important;
    }

    body {
        color: #000;
        background: #fff;
    }

    .hero {
        min-height: auto;
        padding: 40px 0;
        background: #f5f5f5;
    }

    .section-header h2 {
        color: #333;
    }
}
