/* 移动端分类菜单样式 - 2025年修改 */

/* PC端分类菜单在移动端隐藏 */
@media (max-width: 768px) {
  #category-list {
    display: none !important;
  }
}

#category-list {
  height: 380px !important;
}

#category-list ul.parent_category li {
  flex: 1;
}

/* 移动端分类菜单基础样式 */
.mobile-category-list {
  display: none;
}

@media (max-width: 768px) {
  /* 移动端菜单默认隐藏，只有点击"全部分类"后才显示 */
 
  .mobile-category-list {
    display: none !important;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin: 10px 0;
    box-sizing: border-box;
    position: absolute;
    width: 96%;
    left: 2%;
    top: 0;
    transform: translateY(72px);
    z-index: 1000;
  }

  /* 当添加show类时才显示 */
  .mobile-category-list.show {
    display: block !important;
  }

  /* 移动端Tab栏样式 */
  .mobile-tab-bar {
    display: flex;
    background: #fff;
    border-bottom: 1px solid #eee;
    border-radius: 8px 8px 0 0;
  }

  .mobile-tab-item {
    flex: 1;
    text-align: center;
    padding: 15px 10px;
    cursor: pointer;
    transition: all 0.3s;
    border-bottom: 2px solid transparent;
    font-size: 14px;
    color: #666;
  }

  .mobile-tab-item:hover {
    background: #f8f9fa;
  }

  .mobile-tab-item.active {
    color: #01a7ac;
    border-bottom-color: #01a7ac;
    font-weight: 500;
  }

  /* Tab内容区域样式 */
  .mobile-tab-content {
    background: #fff;
    border-radius: 0 0 8px 8px;
  }

  .mobile-tab-panel {
    display: none;
    padding: 0;
  }

  .mobile-tab-panel.active {
    display: block;
  }

  .mobile-category-item {
    border-bottom: 1px solid #eee;
  }

  .mobile-category-item:last-child {
    border-bottom: none;
  }

  .mobile-category-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: #f8f9fa;
    cursor: pointer;
    transition: background-color 0.3s;
  }

  .mobile-category-header:hover {
    background: #e9ecef;
  }

  .mobile-category-header.active {
    background: #01a7ac;
    color: white;
  }

  .mobile-category-title {
    font-size: 16px;
    font-weight: 500;
  }

  .mobile-category-arrow {
    font-size: 18px;
    transition: transform 0.3s;
    cursor: pointer;
  }

  .mobile-category-header.active .mobile-category-arrow {
    transform: rotate(90deg);
  }

  .mobile-category-content {
    display: none;
    background: #fff;
  }

  .mobile-category-content.show {
    display: block;
  }

  .mobile-subcategory-item {
    border-bottom: 1px solid #f0f0f0;
  }

  .mobile-subcategory-item:last-child {
    border-bottom: none;
  }

  .mobile-subcategory-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 20px 12px 35px;
    background: #fafafa;
    cursor: pointer;
    transition: background-color 0.3s;
  }

  .mobile-subcategory-header:hover {
    background: #f0f0f0;
  }

  .mobile-subcategory-header.active {
    background: #e3f2fd;
    color: #1976d2;
  }

  .mobile-subcategory-title {
    font-size: 14px;
    font-weight: 400;
  }

  .mobile-subcategory-arrow {
    font-size: 16px;
    transition: transform 0.3s;
    cursor: pointer;
  }

  .mobile-subcategory-header.active .mobile-subcategory-arrow {
    transform: rotate(90deg);
  }

  .mobile-subcategory-content {
    display: none;
    background: #fff;
  }

  .mobile-subcategory-content.show {
    display: block;
  }

  .mobile-product-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 20px 10px 50px;
    border-bottom: 1px solid #f5f5f5;
    cursor: pointer;
    transition: background-color 0.3s;
  }

  .mobile-product-item:hover {
    background: #f8f9fa;
  }

  .mobile-product-item.active {
    background: #e8f5e8;
    color: #2e7d32;
  }

  .mobile-product-title {
    font-size: 13px;
    font-weight: 400;
  }

  .mobile-product-arrow {
    font-size: 14px;
    transition: transform 0.3s;
    cursor: pointer;
  }

  .mobile-product-item.active .mobile-product-arrow {
    transform: rotate(90deg);
  }

  .mobile-product-content {
    display: none;
    background: #fafafa;
  }

  .mobile-product-content.show {
    display: block;
  }

  .mobile-product-detail {
    padding: 8px 20px 8px 65px;
    border-bottom: 1px solid #f0f0f0;
    background: #fff;
  }

  .mobile-product-detail:last-child {
    border-bottom: none;
  }

  .mobile-product-name {
    font-size: 12px;
    color: #666;
  }

  .mobile-product-detail:hover {
    background: #f5f5f5;
  }
}
