#shop-panel.hidden {
  display: none !important;
}

#shop-panel > .panel-body.shop-body {
  pointer-events: auto;
  display: flex;
  flex: 1 1 auto;
  align-items: stretch;
  min-width: 0;
  min-height: 0;
  padding: 0;
  overflow: hidden;
}

#shop-panel .shop-left {
  width: 320px;
  min-width: 320px;
  max-width: 320px;
  padding: 12px;
  gap: 10px;
  justify-content: flex-start;
  background: rgba(8, 15, 24, 0.68);
}

#shop-panel #shop-keeper {
  width: 100%;
  max-width: 280px;
  height: 220px;
  margin-bottom: 0;
}

#shop-ring-display {
  width: 100%;
  justify-content: center;
  margin: 0;
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(11, 27, 42, 0.85);
  box-sizing: border-box;
}

#shop-panel .shop-right {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-width: 0;
  min-height: 0;
  padding: 12px;
  gap: 10px;
}

#shop-panel .mode-tabs {
  margin: 0;
  width: 100%;
  flex: 0 0 auto;
}

#shop-panel .mode-tabs .mode-btn {
  cursor: pointer;
}

#shop-panel .shop-mode.active {
  gap: 10px;
}


#shop-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 10px;
  align-content: start;
}

#shop-panel .shop-item {
  width: 100%;
  min-height: 72px;
  padding: 10px 12px;
  margin-bottom: 0;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
  cursor: pointer;
  text-align: left;
  transition: transform 0.08s ease, box-shadow 0.08s ease, background 0.08s ease;
}

#shop-panel .shop-item:hover {
  background: #4f7398;
}

#shop-panel .shop-item.in-cart {
  background: #1f3449;
  border-color: #ffd60a;
  box-shadow: inset 0 3px 10px rgba(0, 0, 0, 0.45);
  transform: translateY(2px);
}

#shop-panel .shop-item:active {
  transform: translateY(2px);
}

#shop-panel .shop-item-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1 1 auto;
  gap: 4px;
}

#shop-panel .shop-item-name {
  font-weight: 700;
}

#shop-panel .shop-item-price {
  font-size: 13px;
  color: #ffd60a;
}

#shop-panel .shop-item-qty {
  flex: 0 0 auto;
  min-width: 42px;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(255, 214, 10, 0.2);
  color: #ffe98c;
  font-weight: 700;
  text-align: center;
}

#shop-cart {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
  padding: 10px;
  border: 2px solid rgba(65, 90, 119, 0.9);
  border-radius: 10px;
  background: rgba(13, 27, 42, 0.92);
  box-sizing: border-box;
}

.shop-cart-title {
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 8px;
  text-align: center;
}

.shop-cart-list {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-right: 2px;
}

.shop-cart-empty {
  color: #a9bdd6;
  font-size: 14px;
  text-align: center;
  padding: 20px 8px;
}

.shop-cart-item {
  display: grid;
  grid-template-columns: auto 32px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  padding: 8px;
  border-radius: 8px;
  background: rgba(27, 38, 59, 0.95);
}

.shop-cart-remove {
  border: none;
  border-radius: 6px;
  background: rgba(160, 38, 38, 0.95);
  color: #fff;
  padding: 6px 8px;
  cursor: pointer;
  font-weight: 700;
}

.shop-cart-remove:hover {
  background: rgba(188, 48, 48, 0.98);
}

.shop-cart-sprite {
  width: 28px;
  height: 28px;
  image-rendering: pixelated;
  object-fit: none;
  object-position: 0 0;
}

.shop-cart-item-info {
  min-width: 0;
}

.shop-cart-item-name {
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.shop-cart-item-price {
  color: #ffd60a;
  font-size: 13px;
}

.shop-cart-footer {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.shop-cart-total {
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  text-align: center;
}

#shop-cart-buy {
  width: 100%;
  min-height: 40px;
  font-size: 16px;
  font-weight: 700;
}

#shop-cart-buy:disabled {
  opacity: 0.45;
  cursor: default;
}

#shop-panel[data-shop-mode="sell"] #shop-cart-buy {
  opacity: 0.45;
}

.shop-confirm-body {
  overflow: auto;
}

.shop-confirm-summary {
  display: flex;
  flex-direction: column;
  gap: 10px;
  text-align: left;
}

.shop-confirm-summary-title {
  text-align: center;
  font-size: 17px;
  font-weight: 700;
}

.shop-confirm-list {
  margin: 0;
  padding-left: 18px;
  max-height: 180px;
  overflow: auto;
}

.shop-confirm-list li {
  margin-bottom: 6px;
}

.shop-confirm-total {
  text-align: center;
}
