/* ============================================
   responsive.css - 移动端适配 + 触摸交互
   ============================================ */

/* ========== 移动端间距精细调整 ========== */
@media (max-width: 720px) {
  /* 页面容器内边距 */
  .page-container { 
    padding: 1.5rem 1rem; 
  }
  
  /* 标题大小调整 */
  h1 { 
    font-size: 2.2rem; 
    letter-spacing: 4px; 
  }
  
  .subhead-serif {
    font-size: 1rem;
    letter-spacing: 1px;
  }
  
  .masthead-decoration {
    font-size: 0.75rem;
    letter-spacing: 4px;
  }
  
  /* 导航间距 */
  .nav-line {
    gap: 1.5rem;
    margin: 1.5rem 0 1.8rem;
  }
  
  .nav-line a {
    font-size: 1rem;
    letter-spacing: 2px;
    padding: 0.5rem 0.3rem;
  }
  
  /* 须知卡片 */
  .notice-grid {
    gap: 1.2rem;
    margin: 1.5rem 0 2rem;
  }
  
  .notice-item {
    padding: 1.5rem 1.2rem;
  }
  
  .notice-index {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
  }
  
  .notice-item p {
    font-size: 0.95rem;
    margin-bottom: 0.8rem;
  }
  
  .notice-quote {
    font-size: 0.85rem;
    margin-top: 0.8rem;
  }
  
  /* 价格组件 */
  .price-component {
    padding: 1.8rem 1.2rem;
    margin: 2rem 0;
  }
  
  .price-header {
    margin-bottom: 1.8rem;
  }
  
  .price-header h2 {
    font-size: 1.6rem;
    letter-spacing: 4px;
  }
  
  .price-table {
    gap: 1rem 0.5rem;
  }
  
  .price-card {
    min-width: 100px;
    padding: 0.3rem;
  }
  
  .size-label {
    font-size: 1rem;
    letter-spacing: 2px;
  }
  
  .price-number {
    font-size: 2rem;
  }
  
  .price-note {
    font-size: 0.75rem;
  }
  
  .price-footnote {
    margin-top: 1.5rem;
    font-size: 0.8rem;
  }
  
  /* 分类标签 */
  .section-label {
    font-size: 1.5rem;
    letter-spacing: 4px;
    margin-bottom: 1.2rem;
  }
  
  .tab-container {
    gap: 0.5rem 0.8rem;
    margin-bottom: 1.5rem;
  }
  
  .tab-btn {
    font-size: 0.9rem;
    letter-spacing: 2px;
    padding: 0.5rem 0.5rem;
  }
  
  /* 排序栏 */
  .sort-bar {
    gap: 1.5rem;
    margin-bottom: 1.2rem;
  }
  
  .sort-option {
    font-size: 0.85rem;
  }
  
  /* 蛋糕网格 */
  .cake-masonry {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem 0.8rem;
  }
  
  .cake-caption {
    padding: 0.8rem 0.6rem 1rem;
  }
  
  .cake-name {
    font-size: 1rem;
  }
  
  .cake-desc {
    font-size: 0.75rem;
  }
  
  /* 音乐按钮 */
  .audio-btn {
    padding: 4px 14px;
    font-size: 0.8rem;
  }
  
  /* 底部元素 */
  footer {
    margin-top: 2.5rem;
    padding-top: 1.2rem;
    font-size: 0.75rem;
  }
  
  /* 浮动按钮 */
  .wechat-float {
    bottom: 16px;
    right: 16px;
    padding: 8px 16px 8px 20px;
  }
  
  .wechat-float span {
    font-size: 0.85rem;
    letter-spacing: 1px;
  }
  
  .to-top {
    bottom: 16px;
    left: 16px;
    width: 40px;
    height: 40px;
    font-size: 22px;
  }
  
  /* 二维码弹窗 */
  .qr-modal-panel {
    bottom: 80px;
    right: 16px;
    padding: 1.2rem 1.5rem;
  }
  
  .qr-svg-box {
    width: 120px;
    height: 120px;
  }
  
  .close-modal {
    padding: 4px 18px;
    font-size: 0.85rem;
  }
}

/* ========== 触摸交互增强 ========== */

/* 基础触摸优化 */
.nav-line a,
.tab-btn,
.sort-option,
.wechat-float,
.to-top,
.close-modal,
.audio-btn,
.cake-card {
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  user-select: none;
  -webkit-user-select: none;
}

/* 导航链接 - 增大触摸区 */
.nav-line a {
  padding: 0.5rem 0.8rem;
  margin: -0.5rem -0.8rem;
}

/* 分类标签 - 触摸反馈 */
.tab-btn {
  transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
}

.tab-btn:active {
  transform: scale(0.96);
  color: #2f2721;
}

/* 排序选项 - 增大触摸区 */
.sort-option {
  padding: 0.5rem 0.8rem;
  margin: -0.5rem -0.8rem;
  transition: color 0.15s;
}

.sort-option:active {
  color: #a48e7c;
}

/* 蛋糕卡片 - 触摸反馈 */
.cake-card {
  transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1), 
              box-shadow 0.2s,
              background 0.15s;
}

.cake-card:active {
  transform: scale(0.98);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

/* 按钮触摸反馈 */
.audio-btn {
  transition: all 0.15s;
}

.audio-btn:active {
  transform: scale(0.96);
  background: #f4ede6;
}

/* 微信浮动按钮 */
.wechat-float {
  transition: transform 0.2s, box-shadow 0.2s;
}

.wechat-float:active {
  transform: scale(0.96);
  box-shadow: 0 6px 16px -8px rgba(60, 40, 20, 0.15);
}

/* 回顶部按钮 */
.to-top {
  transition: transform 0.2s, background 0.2s;
}

.to-top:active {
  transform: scale(0.9);
  background: #f3ede6;
}

/* 二维码弹窗关闭按钮 */
.close-modal {
  transition: all 0.15s;
}

.close-modal:active {
  background: #e8dfd6;
  border-color: #a48e7c;
  transform: scale(0.96);
}

/* 须知卡片触摸反馈 */
.notice-item {
  transition: transform 0.2s, background 0.2s, border-color 0.2s;
}

.notice-item:active {
  transform: scale(0.99);
  background: rgba(255, 255, 255, 0.9);
}

/* 触摸屏专属优化 */
@media (hover: none) {
  .cake-card:hover,
  .notice-item:hover,
  .tab-btn:hover,
  .wechat-float:hover {
    transform: none;
  }
  
  .cake-card:active {
    background: #faf4ed;
    border-color: #b9a692;
  }
}

/* 滚动平滑 */
html {
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
}

/* 防止iOS输入框自动缩放 */
input, textarea, select, button {
  font-size: 16px;
}

/* ========== 超小屏幕优化（宽度小于380px） ========== */
@media (max-width: 380px) {
  .cake-masonry {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  
  .tab-btn {
    font-size: 0.8rem;
    letter-spacing: 1px;
    padding: 0.4rem 0.3rem;
  }
  
  .tab-container {
    gap: 0.3rem 0.5rem;
  }
  
  .price-card {
    min-width: 70px;
  }
  
  .price-number {
    font-size: 1.6rem;
  }
  
  .size-label {
    font-size: 0.85rem;
  }
  
  h1 {
    font-size: 1.8rem;
    letter-spacing: 3px;
  }
  
  .nav-line {
    gap: 1rem;
  }
  
  .nav-line a {
    font-size: 0.9rem;
    letter-spacing: 1px;
  }
  
  .masthead-decoration {
    font-size: 0.65rem;
    letter-spacing: 3px;
  }
  
  .wechat-float {
    padding: 6px 12px 6px 16px;
  }
  
  .wechat-float span {
    font-size: 0.75rem;
  }
}

/* ========== 横屏优化 ========== */
@media (max-width: 720px) and (orientation: landscape) {
  .page-container {
    padding: 1rem 1.5rem;
  }
  
  .masthead {
    margin-bottom: 1.5rem;
    padding-bottom: 1.2rem;
  }
  
  .cake-masonry {
    grid-template-columns: repeat(3, 1fr);
  }
  
  .notice-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}