/* ===== 全局样式 ===== */
:root {
    --primary-color: rgba(30, 30, 140, 1);
    --secondary-color: #4a6bff;
    --text-dark: #333;
    --text-light: #777;
    --bg-light: #f8f9fa;
    --border-radius: 4px;
    --box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
  }
  
  * {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', 'PingFang SC', sans-serif;
  }
  
  body {
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--bg-light);
  }
  
  /* ===== 导航栏 ===== */
  .navbar {


    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    z-index: 1000;
    background-color:white;
    color: black;
  }
  .nav-links a {

    color: black;

}
  /* ===== 主内容布局 ===== */

        /* 新增的主布局样式 */
    .main-layout {
        display: flex;
        min-height: calc(100vh - 70px); /* 减去导航栏高度 */
    }
    
    .side-nav-container {
        width: 250px;
        background: white;
        box-shadow: 2px 0 10px rgba(0,0,0,0.05);
        position: sticky;
        top: 70px; /* 导航栏高度 */
        height: calc(100vh - 70px);
        overflow-y: auto;
    }
    
    .content-container {
        flex: 1;
        background-color: #f8f9fa;
    }
    
    @media (max-width: 992px) {
        .main-layout {
            flex-direction: column;
        }
        
        .side-nav-container {
            width: 100%;
            position: static;
            height: auto;
            margin-bottom: 20px;
        }
    }


  .main-wrapper {
    display: flex;
    min-height: calc(100vh - 80px); /* 减去导航栏高度 */
  }
  
  /* 侧边栏样式 */
  .side-nav {
    width: 250px;
    background-color: white;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.05);
    padding: 20px 0;
    position: sticky;
    top: 70px; /* 导航栏高度 */
    height: calc(100vh - 70px); /* 视口高度减去导航栏 */
    overflow-y: auto;
    flex-shrink: 0;
  }
  
  .nav-title {
    padding: 0 20px 15px;
    color: var(--primary-color);
    border-bottom: 1px solid #eee;
    margin-bottom: 15px;
  }
  
  .nav-menu {
    list-style: none;
  }
  
  .nav-item {
    margin-bottom: 5px;
  }
  
  .nav-link {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    color: var(--text-dark);
    text-decoration: none;
    transition: var(--transition);
  }
  
  .nav-link:hover {
    background-color: rgba(74, 107, 255, 0.1);
    color: var(--primary-color);
  }
  
  .nav-icon {
    margin-right: 10px;
    width: 20px;
    text-align: center;
  }
  
  .sub-menu {
    list-style: none;
    padding-left: 30px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
  }
  
  .nav-item:hover .sub-menu {
    max-height: 500px;
  }
  
  .sub-menu a {
    display: block;
    padding: 8px 0;
    color: var(--text-light);
    font-size: 14px;
    transition: var(--transition);
  }
  
  .sub-menu a:hover {
    color: var(--primary-color);
  }
  
  /* 主内容区域 */
  .main-content {
    flex-grow: 1;
    padding: 30px;
    background-color: var(--bg-light);
  }
  
  .container {
    max-width: auto;
    margin: 0 0;
    padding: 0;
  }
  
  h1 {
    color: var(--primary-color);
    margin-bottom: 30px;
    font-size: 2rem;
  }
  
  /* 表格样式 */
  table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 30px;
    box-shadow: var(--box-shadow);
    border-radius: var(--border-radius);
    overflow: hidden;
    background-color: white;
  }
  
  th, td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid #eee;
  }
  
  th {
    background-color: var(--primary-color);
    color: white;
    font-weight: 500;
  }
  
  tr:hover {
    background-color: rgba(74, 107, 255, 0.05);
  }
  
  .price {
    color: #e74c3c;
    font-weight: bold;
  }
  
  .stock {
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
  }
  
  .in-stock {
    background-color: rgba(46, 204, 113, 0.2);
    color: #2ecc71;
  }
  
  .out-of-stock {
    background-color: rgba(231, 76, 60, 0.2);
    color: #e74c3c;
  }
  
 
  
  /* ===== 响应式设计 ===== */
  @media (max-width: 992px) {
    .nav-links {
      display: none;
    }
    
    .hamburger {
      display: block;
    }
    
    .side-nav {
      width: 100%;
      position: static;
      height: auto;
      margin-bottom: 30px;
      top: 0;
    }
    
    .main-wrapper {
      flex-direction: column;
    }
  }
  
  @media (max-width: 768px) {
    .dropdown-content {
      width: 300px;
      grid-template-columns: 1fr;
    }
    
    table {
      display: block;
      overflow-x: auto;
    }
    
    .footer-main {
      grid-template-columns: 1fr;
    }
  }
  
  /* 动画 */
  @keyframes fadeIn {
    from {
      opacity: 0;
      transform: translateY(10px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }
  
  /* 移动端优化 */
@media (max-width: 768px) {
    .main-layout {
        flex-direction: column;
    }
    
    .side-nav-container {
        width: 100%;
        position: static;
        height: auto;
        margin-bottom: 20px;
    }
    
    .side-nav {
        width: 100%;
        height: auto;
        position: static;
    }
    
    /* 侧边栏改为横向滚动 */
    .nav-menu {
        display: flex;
        overflow-x: auto;
        padding: 10px 0;
    }
    
    .nav-item {
        flex: 0 0 auto;
        margin-right: 10px;
    }
    
    .nav-link {
        white-space: nowrap;
        padding: 8px 15px;
    }
    
    .sub-menu {
        display: none; /* 移动端隐藏子菜单 */
    }
    
    /* 表格响应式 */
    table {
        display: block;
        overflow-x: auto;
        font-size: 0.9rem;
    }
    
    th, td {
        padding: 10px;
        min-width: 100px;
    }
}
