* {
  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;
  overflow-x: hidden;
}

/* Header */
.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  background-color: #fff;
  border-bottom: 1px solid #e5e5e5;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.header-right {
  display: flex;
  gap: 12px;
}

.table-info {
  font-size: 16px;
  font-weight: 500;
  color: #333;
}

.icon {
  width: 24px;
  height: 24px;
  color: #666;
}

.icon-btn {
  background: none;
  border: none;
  padding: 4px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.icon-btn:hover {
  opacity: 0.7;
}

/* Tabs */
.tabs {
  display: flex;
  background-color: #fff;
  border-bottom: 1px solid #e5e5e5;
  padding: 0 16px;
}

.tab {
  padding: 12px 16px;
  background: none;
  border: none;
  font-size: 15px;
  color: #999;
  cursor: pointer;
  position: relative;
  transition: color 0.2s;
}

.tab.active {
  color: #333;
  font-weight: 500;
}

.tab.active::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background-color: #333;
}

/* Main Container */
.main-container {
  display: flex;
  height: calc(100vh - 140px);
  background-color: #fff;
}

/* Sidebar */
.sidebar {
  width: 80px;
  background-color: #f8f8f8;
  border-right: 1px solid #e5e5e5;
  overflow-y: auto;
  flex-shrink: 0;
}

.category-btn {
  width: 100%;
  padding: 16px 8px;
  background: none;
  border: none;
  font-size: 13px;
  color: #666;
  cursor: pointer;
  text-align: center;
  transition: all 0.2s;
  border-left: 3px solid transparent;
}

.category-btn:hover {
  background-color: #fff;
}

.category-btn.active {
  background-color: #fff;
  color: #333;
  font-weight: 500;
  border-left-color: #ff6b35;
}

/* Product List */
.product-list {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
}

.category-header {
  font-size: 13px;
  color: #999;
  padding: 8px 0;
  margin-bottom: 12px;
}

.product-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid #f0f0f0;
}

.product-content {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
}

.product-image {
  width: 100px;
  height: 100px;
  object-fit: cover;
  border-radius: 8px;
  flex-shrink: 0;
}

.product-details {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.product-name {
  font-size: 16px;
  font-weight: 500;
  color: #333;
}

.product-info {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  padding-left: 12px;
}

.product-price {
  font-size: 16px;
  font-weight: 500;
  color: #333;
}

.select-btn {
  padding: 8px 20px;
  background-color: #ff6b35;
  color: #fff;
  border: none;
  border-radius: 20px;
  font-size: 14px;
  cursor: pointer;
  transition: background-color 0.2s;
  flex-shrink: 0;
}

.select-btn:hover {
  background-color: #ff5722;
}

.select-btn:active {
  transform: scale(0.98);
}

/* Cart Bar */
.cart-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  background-color: #2c2c2c;
  color: #999;
  border-radius: 24px 24px 0 0;
  margin: 0 12px;
}

.cart-icon {
  width: 24px;
  height: 24px;
  color: #fff;
}

.cart-text {
  font-size: 15px;
  color: #999;
}

/* Scrollbar Styling */
.sidebar::-webkit-scrollbar,
.product-list::-webkit-scrollbar {
  width: 4px;
}

.sidebar::-webkit-scrollbar-track,
.product-list::-webkit-scrollbar-track {
  background: transparent;
}

.sidebar::-webkit-scrollbar-thumb,
.product-list::-webkit-scrollbar-thumb {
  background: #ddd;
  border-radius: 2px;
}

.sidebar::-webkit-scrollbar-thumb:hover,
.product-list::-webkit-scrollbar-thumb:hover {
  background: #ccc;
}

/* Responsive */
@media (max-width: 768px) {
  .sidebar {
    width: 60px;
  }

  .category-btn {
    font-size: 12px;
    padding: 12px 4px;
  }

  .product-image {
    width: 80px;
    height: 80px;
  }

  .product-name {
    font-size: 14px;
  }

  .product-price {
    font-size: 14px;
  }
}
