.viewed-history-page {
  padding: 20px 0 48px;
  min-height: 60dvh;
}

.vh-header-card {
  background: #ffffff;
  border: 1px solid #eceef2;
  border-radius: 10px;
  padding: 18px 22px;
  margin-bottom: 16px;
}

.vh-header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 14px;
}

.vh-title-group {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.vh-title {
  margin: 0;
  font-size: 20px;
  font-weight: 400;
  color: #1f2937;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.vh-count-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 10px;
  border-radius: 999px;
  background: #fff3eb;
  color: #ff5000;
  font-size: 12px;
  font-weight: 400;
}

.vh-header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.vh-search-form {
  display: flex;
  align-items: center;
  gap: 6px;
}

.vh-search-input {
  height: 34px;
  padding: 0 12px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 13px;
  color: #111827;
  width: 230px;
  outline: none;
}

.vh-search-input:focus {
  border-color: #ff5000;
}

.vh-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 34px;
  padding: 0 14px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 400;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.vh-btn-primary {
  background: #ff5000;
  color: #ffffff;
}

.vh-btn-primary:hover {
  background: #e64800;
  color: #ffffff;
}

.vh-btn-ghost {
  background: #f3f4f6;
  color: #4b5563;
  border-color: #e5e7eb;
}

.vh-btn-ghost:hover {
  background: #e5e7eb;
  color: #1f2937;
}

.vh-btn-danger-outline {
  background: #ffffff;
  color: #dc2626;
  border-color: #fecaca;
}

.vh-btn-danger-outline:hover {
  background: #fef2f2;
  border-color: #f87171;
}

.vh-tabs-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

.vh-platform-tabs {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.vh-tab-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 400;
  background: #f3f4f6;
  color: #4b5563;
  text-decoration: none;
  border: 1px solid transparent;
}

.vh-tab-pill:hover {
  background: #fff4ec;
  color: #ff5000;
}

.vh-tab-pill.is-active {
  background: #fff3eb;
  color: #ff5000;
  border-color: #ffd1b8;
  font-weight: 400;
}

.vh-tab-count {
  font-size: 11px;
  opacity: 0.85;
}

.vh-guest-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding: 12px 16px;
  margin-bottom: 16px;
  background: #fff7ed;
  border: 1px solid #fed7aa;
  border-radius: 8px;
  font-size: 13px;
  color: #9a3412;
}

.vh-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
}

.vh-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: #ffffff;
  border: 1px solid #eceef2;
  border-radius: 8px;
  overflow: hidden;
  transition: box-shadow 0.16s ease, transform 0.16s ease, border-color 0.16s ease;
}

.vh-card:hover {
  border-color: #ffd1b8;
  box-shadow: 0 6px 20px rgba(15, 23, 42, 0.08);
  transform: translateY(-2px);
}

.vh-card-media {
  position: relative;
  display: block;
  aspect-ratio: 1 / 1;
  background: #f8fafc;
  overflow: hidden;
}

.vh-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.vh-card-badges {
  position: absolute;
  top: 8px;
  left: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  pointer-events: none;
}

.vh-platform-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 7px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 400;
  color: #ffffff;
  letter-spacing: 0.2px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.18);
}

.vh-platform-1688 {
  background: #ff5000;
}

.vh-platform-taobao {
  background: #ff6a00;
}

.vh-platform-tmall {
  background: #e11d48;
}

.vh-origin-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 400;
  background: rgba(17, 24, 39, 0.78);
  color: #ffffff;
}

.vh-remove-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: none;
  background: rgba(15, 23, 42, 0.62);
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.15s ease, background 0.15s ease;
  z-index: 2;
}

.vh-card:hover .vh-remove-btn,
.vh-remove-btn:focus-visible {
  opacity: 1;
}

.vh-remove-btn:hover {
  background: #dc2626;
}

.vh-card-body {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  padding: 10px 12px 12px;
  gap: 6px;
}

.vh-card-title {
  font-size: 13px;
  line-height: 1.4;
  font-weight: 400;
  color: #1f2937;
  text-decoration: none;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 36px;
}

.vh-card-title:hover {
  color: #ff5000;
}

.vh-card-price-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 6px;
  flex-wrap: wrap;
}

.vh-price-vnd {
  font-size: 15px;
  font-weight: 400;
  color: #ff5000;
}

.vh-price-cny {
  font-size: 12px;
  color: #6b7280;
}

.vh-price-na {
  font-size: 12px;
  color: #9ca3af;
}

.vh-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 11px;
  color: #6b7280;
  margin-top: auto;
  padding-top: 6px;
  border-top: 1px solid #f3f4f6;
}

.vh-shop-name {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 62%;
}

.vh-viewed-time {
  white-space: nowrap;
  flex-shrink: 0;
}

.vh-card-footer-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
}

.vh-action-link {
  flex: 1 1 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  height: 30px;
  padding: 0 8px;
  border-radius: 5px;
  background: #fff3eb;
  color: #ff5000;
  font-size: 12px;
  font-weight: 400;
  text-decoration: none;
  border: 1px solid #ffd8c2;
}

.vh-action-link:hover {
  background: #ff5000;
  color: #ffffff;
  border-color: #ff5000;
}

.vh-ext-icon-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 5px;
  background: #f3f4f6;
  color: #4b5563;
  text-decoration: none;
  flex-shrink: 0;
}

.vh-ext-icon-link:hover {
  background: #e5e7eb;
  color: #111827;
}

.vh-empty-card {
  background: #ffffff;
  border: 1px solid #eceef2;
  border-radius: 10px;
  padding: 56px 20px;
  text-align: center;
  color: #6b7280;
}

.vh-empty-card h2 {
  margin: 12px 0 8px;
  font-size: 17px;
  color: #1f2937;
}

.vh-empty-card p {
  margin: 0 auto 18px;
  max-width: 480px;
  font-size: 13px;
  line-height: 1.5;
}

.vh-empty-actions {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}

.vh-pagination {
  margin-top: 24px;
  display: flex;
  justify-content: center;
  gap: 6px;
  flex-wrap: wrap;
}

.vh-page-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  height: 34px;
  padding: 0 10px;
  border-radius: 6px;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  color: #374151;
  font-size: 13px;
  text-decoration: none;
}

.vh-page-link.is-active {
  background: #ff5000;
  border-color: #ff5000;
  color: #ffffff;
  font-weight: 400;
}

@media (max-width: 1200px) {
  .vh-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 960px) {
  .vh-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .vh-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .vh-search-input {
    width: 160px;
  }

  .vh-remove-btn {
    opacity: 1;
  }
}

