/* 字型 */
body { font-family: "Noto Sans TC", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Apple Color Emoji", "Segoe UI Emoji"; }

/* Hero */
.bg-hero { background:#0d6efd; background: linear-gradient(135deg,#0d6efd,#6610f2); }

/* 比例工具 */
.ratio-16x9 { aspect-ratio: 16 / 9; }
.object-cover { object-fit: cover; }
.object-contain { object-fit: contain; }

/* 首頁磚卡 hover */
.game-tile { transition: transform .15s ease, box-shadow .15s ease; }
.game-tile:hover { transform: translateY(-2px); box-shadow: 0 .5rem 1rem rgba(0,0,0,.1); }

/* 詳情頁縮圖樣式（請勿放在 items.json！） */
.thumb {
  border: 2px solid transparent;
  transition: transform .15s ease, border-color .15s ease, box-shadow .15s ease;
}
.thumb:hover {
  transform: scale(1.02);
  border-color: #ced4da;
  box-shadow: 0 0.25rem 0.75rem rgba(0,0,0,.05);
}
.thumb-active {
  border-color: #0d6efd !important;
  box-shadow: 0 0.5rem 1rem rgba(13,110,253,.15);
}

/* 購物車調整（避免行動版橫向捲動） */
.cart-item {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.cart-item strong {
  display: block;
  word-break: break-word;
}

.cart-item-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  flex-wrap: wrap;
  width: 100%;
}

.cart-item-qty-group {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

.cart-item-qty-group label {
  margin: 0;
  font-size: 0.875rem;
}

.cart-item-qty {
  width: 76px;
}

.cart-item-subtotal {
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
  min-width: 6rem;
  text-align: right;
}

.cart-item-remove {
  white-space: nowrap;
}

@media (max-width: 575.98px) {
  .cart-item-actions {
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
  }

  .cart-item-qty-group {
    justify-content: space-between;
  }

  .cart-item-qty {
    width: 64px;
  }

  .cart-item-subtotal {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    text-align: left;
    min-width: 0;
  }

  .cart-item-remove {
    width: 100%;
  }
}
