/* PokéMarket – TCGplayer-style sample view */

:root {
  --bg-page: #f2f2f2;
  --bg-white: #ffffff;
  --bg-nav: #000000;
  --text-primary: #1a1a1a;
  --text-secondary: #6b7280;
  --text-muted: #9ca3af;
  --accent: #2d50ff;
  --accent-hover: #1e3dd4;
  --accent-gradient: linear-gradient(135deg, #0084ff 0%, #a3e635 100%);
  --accent-gradient-hover: linear-gradient(135deg, #0076e5 0%, #8ecf2b 100%);
  --market-green: #2e7d32;
  --border: #e5e7eb;
  --border-card: #d1d5db;
  --promo-bg: #0a1628;
  --promo-accent: #5eb8ff;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.06);
  --radius-pill: 999px;
  --radius-card: 4px;
  --font: "Inter", system-ui, -apple-system, sans-serif;
  --grid-cols: 5;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  font-size: 14px;
}

body {
  margin: 0;
  font-family: var(--font);
  color: var(--text-primary);
  background: var(--bg-page);
  line-height: 1.4;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font-family: inherit;
  cursor: pointer;
}

.site-header {
  background: var(--bg-white);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-top {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  max-width: 1440px;
  margin: 0 auto;
  padding: 0.75rem 1.5rem;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

.logo-mark {
  width: 28px;
  height: 28px;
  background: url('../assets/image/logo.png') no-repeat center;
  background-size: cover;
  border-radius: 4px;
}

.logo-text {
  font-weight: 800;
  font-size: 1.6rem;
  letter-spacing: -0.04em;
  font-style: italic;
  display: inline-flex;
  align-items: baseline;
}

.logo-kartu {
  color: #1a202c;
  /* charcoal black */
}

.logo-dex {
  color: #9cdb11;
  /* vibrant lime-green */
}

.logo-id {
  color: #1a202c;
  /* charcoal black */
}

.shipping {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.85rem;
  color: var(--text-secondary);
  white-space: nowrap;
}

.shipping strong {
  color: var(--text-primary);
}

.icon-pin {
  width: 16px;
  height: 16px;
  fill: var(--text-secondary);
}

.search-area-wrap {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  flex: 1;
  max-width: 700px;
}

.search-form {
  flex: 1;
  display: flex;
  max-width: 640px;
  border: 1px solid var(--border);
  border-radius: 4px;
  overflow: hidden;
  background: var(--bg-white);
}

.search-category select {
  border: none;
  border-right: 1px solid var(--border);
  padding: 0.6rem 1.75rem 0.6rem 0.75rem;
  font-size: 0.9rem;
  font-weight: 500;
  background: var(--bg-white);
}

.search-form input {
  flex: 1;
  border: none;
  padding: 0.6rem 0.75rem;
  font-size: 0.9rem;
  min-width: 0;
}

.search-btn {
  border: none;
  background: transparent;
  padding: 0 0.75rem;
  display: flex;
  align-items: center;
}

.search-btn svg {
  width: 22px;
  height: 22px;
  fill: var(--text-secondary);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-left: auto;
}

.sign-in {
  font-size: 0.9rem;
  font-weight: 500;
  padding: 0.35rem 0.5rem;
}

.icon-btn {
  border: none;
  background: transparent;
  padding: 0.4rem;
  border-radius: 4px;
  display: flex;
}

.icon-btn svg {
  width: 24px;
  height: 24px;
  fill: var(--text-primary);
}

.main-nav {
  background: var(--bg-nav);
}

.main-nav ul {
  list-style: none;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  gap: 0 1.25rem;
  max-width: 1440px;
}

.main-nav a {
  display: block;
  padding: 0.65rem 0;
  color: #fff;
  font-size: 0.85rem;
  font-weight: 500;
  opacity: 0.9;
}

.main-nav a.active {
  opacity: 1;
  border-bottom: 2px solid #fff;
  margin-bottom: -2px;
}

.page-main {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 1.5rem 3rem;
}

.content-tabs {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: var(--header-height, 57px);
  z-index: 99;
  background: var(--bg-page);
  padding-top: 0.5rem;
  padding-bottom: 0.25rem;
  margin-top: 0;
}

.tab {
  border: none;
  background: none;
  padding: 0.85rem 0.5rem;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-secondary);
  border-bottom: 2px solid transparent;
  display: inline-flex;
  align-items: center;
  transition: color 0.15s ease-in-out, border-bottom-color 0.15s ease-in-out;
}

.tab:hover {
  color: var(--accent);
}

.tab.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.tab-icon-svg {
  width: 18px;
  height: 18px;
  margin-right: 6px;
  display: inline-block;
  vertical-align: middle;
}

.tab-icon-svg.cart-svg {
  color: #2d50ff;
  /* Blue shopping cart */
}

.tab-icon-svg.gavel-svg {
  color: #9cdb11;
  /* Lime green gavel */
}

.tab-icon-svg.chart-svg {
  color: #2d50ff;
  /* Blue bar chart */
}

.tab-separator {
  color: #9cdb11;
  /* Lime green separator */
  font-weight: 400;
  font-size: 1.1rem;
  user-select: none;
  margin: 0 0.25rem;
}

.filter-bar-wrap {
  position: relative;
}

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  padding: 1rem 0;
}

.filter-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.4rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  background: var(--bg-white);
  font-size: 0.85rem;
}

.filter-pill.filter-applied {
  border-color: var(--accent);
  color: var(--accent);
}

.filter-clear {
  border: none;
  background: none;
  color: var(--accent);
  font-size: 0.85rem;
}

.filter-dropdown {
  position: absolute;
  z-index: 50;
  min-width: 220px;
  max-width: 320px;
  max-height: 280px;
  overflow-y: auto;
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: 6px;
  box-shadow: var(--shadow-sm), 0 8px 24px rgba(0, 0, 0, 0.12);
  padding: 0.35rem 0;
}

.filter-dropdown[hidden] {
  display: none;
}

.filter-dropdown-title {
  margin: 0;
  padding: 0.5rem 0.85rem 0.35rem;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-secondary);
}

.filter-option {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  border: none;
  background: none;
  text-align: left;
  padding: 0.5rem 0.85rem;
  font-size: 0.85rem;
}

.filter-option-checkbox {
  width: 14px;
  height: 14px;
  border: 1px solid #d1d5db;
  border-radius: 3px;
  display: inline-block;
  flex-shrink: 0;
  position: relative;
  background: #fff;
  transition: background-color 0.1s ease, border-color 0.1s ease;
}

.filter-option.is-selected .filter-option-checkbox {
  background: var(--accent);
  border-color: var(--accent);
}

.filter-option.is-selected .filter-option-checkbox::after {
  content: "";
  position: absolute;
  top: 1px;
  left: 4px;
  width: 3px;
  height: 6px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.filter-option:hover,
.filter-option:focus-visible {
  background: #f3f4f6;
}

.filter-option.is-selected {
  color: var(--accent);
  font-weight: 600;
}

.page-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.page-ellipsis {
  padding: 0 0.25rem;
  color: var(--text-secondary);
}

.product-grid.view-list {
  grid-template-columns: 1fr;
}

.product-grid.view-list .product-card {
  max-width: 100%;
}

.product-grid.view-list .card-image-wrap {
  width: 96px;
}

.product-grid.view-list .card-image,
.product-grid.view-list .card-image.placeholder {
  width: 96px;
  max-height: 134px;
  height: 134px;
}

.results-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.results-count {
  display: none !important;
}

.sort-view {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-left: auto;
}

.sort-label {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.sort-select {
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 0.35rem 0.65rem;
  font-size: 0.85rem;
}

.view-toggle {
  display: flex;
  border: 1px solid var(--border);
  border-radius: 4px;
  overflow: hidden;
}

.view-btn {
  border: none;
  background: var(--bg-white);
  padding: 0.4rem 0.55rem;
  display: flex;
}

.view-btn svg {
  width: 18px;
  height: 18px;
  fill: var(--text-muted);
}

.view-btn.active {
  background: var(--accent);
}

.view-btn.active svg {
  fill: #fff;
}

.promo-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(90deg, var(--promo-bg) 0%, #152238 60%, #1a3050 100%);
  border-radius: 6px;
  padding: 1rem 1.5rem;
  margin-bottom: 1.25rem;
  min-height: 72px;
  overflow: hidden;
  position: relative;
}

.promo-eyebrow {
  margin: 0 0 0.2rem;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--promo-accent);
}

.promo-title {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
  color: #fff;
}

.promo-cta {
  display: inline-block;
  margin-top: 0.35rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--promo-accent);
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(var(--grid-cols), 1fr);
  gap: 0.75rem;
}

.grid-message {
  grid-column: 1 / -1;
  margin: 2rem 0;
  text-align: center;
  color: var(--text-secondary);
  font-size: 1rem;
}

.db-missing-note {
  margin: 0;
  padding: 1rem;
  border: 1px dashed var(--border);
  border-radius: 6px;
  color: var(--text-secondary);
  background: #fafafa;
  font-size: 0.9rem;
}

.product-card {
  display: flex;
  flex-direction: column;
  background: var(--bg-white);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-card);
  padding: 0.55rem;
  min-height: 190px;
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  transition: transform 0.2s, box-shadow 0.2s;
  position: relative;
}

.product-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.product-card:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.card-image-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  background: #f9fafb;
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 0.45rem;
  border: none;
  padding: 0;
}

.card-image-wrap:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.card-image {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.card-image.placeholder {
  aspect-ratio: 1;
  height: 100%;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.55rem;
  font-weight: 700;
  text-align: center;
  color: rgba(255, 255, 255, 0.9);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
  padding: 0.25rem;
  line-height: 1.2;
}

.card-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.card-title {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0 0 0.25rem 0;
  line-height: 1.25;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  height: 2.5em;
}

.card-meta {
  margin: 0;
  font-size: 0.75rem;
  color: var(--text-secondary);
  line-height: 1.35;
}

.card-listings {
  margin: auto 0 0.2rem;
  font-size: 0.7rem;
  color: var(--text-muted);
}

.card-price {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--accent);
  margin: 0;
}

.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  gap: 0.25rem;
}

.cart-btn-sm {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: none;
  background: var(--accent-gradient);
  color: #fff;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
}

.cart-btn-sm:hover {
  background: var(--accent-gradient-hover);
  transform: scale(1.05);
}

.cart-btn-sm:active {
  transform: scale(0.95);
}

.cart-btn-sm.edit-btn-sm {
  background: #4b5563;
}

.cart-btn-sm.edit-btn-sm:hover {
  background: #374151;
}

.cart-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: none;
  background: var(--accent-gradient);
  color: #fff;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
}

.cart-btn:hover {
  background: var(--accent-gradient-hover);
  transform: scale(1.05);
}

.cart-btn:active {
  transform: scale(0.95);
}

.cart-btn.edit-btn {
  background: #4b5563;
}

.cart-btn.edit-btn:hover {
  background: #374151;
}

.card-market {
  margin: 0.1rem 0 0;
  font-size: 0.7rem;
  color: var(--text-secondary);
}

.card-market strong {
  color: var(--market-green);
}

.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  margin-top: 2rem;
}

.page-btn,
.page-num {
  border: 1px solid var(--border);
  background: var(--bg-white);
  min-width: 36px;
  height: 36px;
  border-radius: 4px;
}

.page-num.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.cart-fab {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: none;
  background: var(--accent-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  cursor: pointer;
  transition: transform 0.2s ease, background-color 0.2s ease;
}

.cart-fab:hover {
  transform: scale(1.05);
}

.cart-fab svg {
  width: 26px;
  height: 26px;
  fill: #fff;
}

body.detail-open {
  overflow: hidden;
}

.detail-overlay {
  position: fixed;
  inset: 0;
  z-index: 130;
  background: rgba(10, 15, 25, 0.78);
  display: none;
  place-items: center;
  padding: 1.25rem;
}

.detail-overlay.is-open {
  display: grid;
}

.detail-modal {
  width: min(1320px, 100%);
  max-height: 92vh;
  overflow: auto;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 22px 52px rgba(0, 0, 0, 0.38);
  padding: 1rem;
  position: relative;
}

.detail-close {
  position: absolute;
  top: 0.45rem;
  right: 0.6rem;
  border: none;
  background: transparent;
  font-size: 1.7rem;
  width: 34px;
  height: 34px;
  border-radius: 4px;
  color: #374151;
  z-index: 50;
  cursor: pointer;
}

.detail-close:hover {
  background: #f3f4f6;
}

.detail-header-grid {
  display: grid;
  grid-template-columns: 340px 1fr 300px;
  gap: 1rem;
}

.detail-header-grid-2col {
  grid-template-columns: 1fr 300px;
}

.detail-image-panel {
  position: relative;
  border: 1px solid var(--border);
  background: #f8fafc;
  border-radius: 6px;
  min-height: 460px;
  display: grid;
  place-items: center;
  padding: 0.8rem;
}

/* Thumbnail row */
.detail-thumb {
  width: 64px;
  height: auto;
  border-radius: 4px;
  cursor: pointer;
  border: 2px solid transparent;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
  transition: border-color 0.15s ease, transform 0.1s ease;
  flex-shrink: 0;
}

.detail-thumb:hover {
  border-color: #94a3b8;
  transform: scale(1.05);
}

.detail-thumb.detail-thumb-active {
  border-color: var(--accent, #3b82f6);
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
}

/* Multi-image upload widget */
.listing-image-upload-widget {
  border: 1px dashed var(--border);
  border-radius: 8px;
  padding: 0.75rem;
  background: #fafafa;
}

.listing-image-preview-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.listing-image-tile {
  position: relative;
  width: 80px;
  height: 80px;
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: #f3f4f6;
}

.listing-image-tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.listing-image-tile-new {
  border-color: #93c5fd;
  background: #eff6ff;
}

.listing-image-remove {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: none;
  background: rgba(0, 0, 0, 0.65);
  color: #fff;
  font-size: 0.75rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: background 0.1s ease;
}

.listing-image-remove:hover {
  background: #dc2626;
}

/* Drag handle */
.listing-image-drag-handle {
  position: absolute;
  bottom: 2px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.85);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
  cursor: grab;
  line-height: 1;
  pointer-events: none;
  user-select: none;
}

/* Drag states */
.listing-image-tile[draggable="true"] {
  cursor: grab;
}

.listing-image-tile-dragging {
  opacity: 0.4;
  transform: scale(0.95);
}

.listing-image-tile-over {
  outline: 2px solid var(--accent, #3b82f6);
  outline-offset: 2px;
  background: #eff6ff;
}

.listing-image-add-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.4rem 0.75rem;
  border: 1px dashed #94a3b8;
  border-radius: 6px;
  font-size: 0.82rem;
  color: #6b7280;
  cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease;
}

.listing-image-add-btn:hover {
  border-color: var(--accent, #3b82f6);
  color: var(--accent, #3b82f6);
}

.detail-card-image.card-image {
  width: min(300px, 100%);
  max-height: 440px;
  height: auto;
  object-fit: contain;
}

.detail-card-image.card-image.placeholder {
  width: min(300px, 100%);
  height: 440px;
  font-size: 1rem;
}

.detail-main-panel {
  padding: 0.2rem 0.2rem 0;
}

.detail-title {
  margin: 0;
  font-size: 2rem;
  line-height: 1.1;
  letter-spacing: -0.03em;
}

.detail-subtitle {
  margin: 0.35rem 0 1rem;
  color: #6b7280;
  font-size: 0.95rem;
}

.detail-meta-label {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.55rem;
}

.detail-specs {
  margin: 0;
}

.detail-specs div {
  display: grid;
  grid-template-columns: 170px 1fr;
  gap: 0.45rem;
  margin-bottom: 0.4rem;
}

.detail-specs dt {
  font-weight: 700;
}

.detail-specs dd {
  margin: 0;
  color: #1f2937;
}

.detail-buy-panel {
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.9rem;
  height: fit-content;
}

.buy-condition {
  font-size: 0.9rem;
  color: #4b5563;
}

.buy-price-row {
  margin-top: 0.2rem;
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
}

.buy-price {
  font-size: 2rem;
  line-height: 1;
}

.buy-shipping {
  color: #6b7280;
  font-size: 0.86rem;
}

.buy-seller {
  margin: 0.5rem 0 0.8rem;
  font-size: 0.86rem;
  color: #4b5563;
}

.buy-stock {
  margin: 0 0 0.8rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: #4b5563;
}

.other-listings {
  margin-top: 0.9rem;
  width: 100%;
  border: 1px solid var(--border);
  background: #fff;
  border-radius: 6px;
  padding: 0.65rem 0.5rem;
  font-weight: 600;
  color: #1f2937;
}

.buy-foot-links {
  margin-top: 0.7rem;
  display: flex;
  gap: 1rem;
  font-size: 0.82rem;
  color: #4b5563;
}

.buy-foot-links a {
  text-decoration: underline;
}

.detail-bottom-grid {
  margin-top: 1rem;
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 1rem;
}

.detail-card {
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #fff;
  padding: 0.85rem;
}

.detail-card h3 {
  margin: 0 0 0.7rem;
  font-size: 1.05rem;
}

.chart-box {
  height: 260px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #ffffff;
  position: relative;
  overflow: visible;
}

.price-chart-svg {
  width: 100%;
  height: 100%;
  display: block;
  overflow: visible;
  user-select: none;
}

.chart-grid-line {
  stroke: #f3f4f6;
  stroke-width: 1px;
}

.chart-axis-text {
  font-size: 0.65rem;
  fill: #9ca3af;
  font-family: inherit;
}

.chart-trend-line {
  stroke: var(--accent, #2d50ff);
  stroke-width: 2.5px;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.chart-area-fill {
  fill: url(#chart-gradient);
  opacity: 0.12;
}

.chart-tracker-line {
  stroke: #d1d5db;
  stroke-width: 1px;
  stroke-dasharray: 4, 4;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s ease;
}

.chart-tracker-dot {
  fill: var(--accent, #2d50ff);
  stroke: #ffffff;
  stroke-width: 2px;
  r: 5;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s ease;
}

.chart-tooltip {
  position: absolute;
  padding: 0.45rem 0.6rem;
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  font-size: 0.72rem;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s ease;
  z-index: 10;
  white-space: nowrap;
}

.chart-tooltip-date {
  font-weight: 500;
  color: #6b7280;
  margin-bottom: 0.15rem;
}

.chart-tooltip-price {
  font-weight: 700;
  color: var(--accent, #2d50ff);
}

.chart-range {
  margin-top: 0.65rem;
  display: flex;
  gap: 0.4rem;
}

.chart-range button {
  border: 1px solid var(--border);
  background: #fff;
  border-radius: 4px;
  font-size: 0.75rem;
  padding: 0.25rem 0.55rem;
  cursor: pointer;
  transition: all 0.15s ease;
}

.chart-range button:hover:not(.active) {
  background: #f9fafb;
  border-color: #d1d5db;
}

.chart-range button.active {
  background: #111827;
  border-color: #111827;
  color: #fff;
}

.detail-side-stack {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.compare-row {
  display: flex;
  justify-content: space-between;
  margin: 0.5rem 0;
  font-size: 0.9rem;
}

.price-points div,
.snapshot-grid div {
  display: flex;
  justify-content: space-between;
  padding: 0.3rem 0;
  border-bottom: 1px solid #f3f4f6;
  font-size: 0.86rem;
}

.price-points div:last-child,
.snapshot-grid div:last-child {
  border-bottom: none;
}

.snapshot-grid {
  display: grid;
  grid-template-columns: 1fr;
}

.detail-listings-section {
  margin-top: 1rem;
}

.listings-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.7rem;
}

.listings-header h3 {
  margin: 0;
  font-size: 2rem;
  line-height: 1;
}

.listings-subtitle {
  margin: 0.2rem 0 0;
  font-size: 1rem;
  color: #4b5563;
}

.listings-controls {
  display: flex;
  gap: 0.8rem;
}

.listings-controls label {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  font-size: 0.78rem;
  font-weight: 700;
  color: #374151;
}

.listings-controls select {
  border: 1px solid var(--border);
  border-radius: 6px;
  height: 38px;
  min-width: 130px;
  padding: 0 0.6rem;
}

.listing-rows {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.listing-row {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.7rem;
  display: grid;
  grid-template-columns: 2.2fr 2.7fr 1.3fr 1.5fr;
  gap: 0.9rem;
  align-items: center;
  background: #fff;
}

.listing-seller strong,
.listing-offer strong {
  display: block;
  font-size: 0.93rem;
}

.listing-seller span,
.listing-offer .listing-ship {
  color: #6b7280;
  font-size: 0.8rem;
}

.listing-offer .listing-price {
  display: block;
  color: #15803d;
  font-size: 1.9rem;
  font-weight: 800;
  line-height: 1;
  margin: 0.15rem 0;
}

.listing-stock-info {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  text-align: right;
}

.listing-stock-info span {
  color: #4b5563;
  font-size: 0.9rem;
  font-weight: 600;
}

@media (max-width: 1280px) {
  :root {
    --grid-cols: 4;
  }
}

@media (max-width: 1024px) {
  :root {
    --grid-cols: 3;
  }

  .shipping {
    display: none;
  }
}

@media (max-width: 768px) {
  :root {
    --grid-cols: 2;
  }

  .header-top {
    flex-wrap: wrap;
  }

  .search-area-wrap {
    order: 3;
    flex: 1 1 100%;
    max-width: none;
    display: flex;
    align-items: center;
    gap: 0.75rem;
  }

  .search-form {
    flex: 1;
    max-width: none;
  }

  .detail-header-grid,
  .detail-header-grid-2col {
    grid-template-columns: 1fr;
  }

  .detail-bottom-grid {
    grid-template-columns: 1fr;
  }

  .detail-image-panel {
    min-height: 320px;
  }

  .detail-specs div {
    grid-template-columns: 1fr;
    gap: 0.2rem;
  }

  .listings-header {
    flex-direction: column;
    align-items: stretch;
  }

  .listings-controls {
    flex-wrap: wrap;
  }

  .listing-row {
    grid-template-columns: 1fr;
  }

}

@media (max-width: 480px) {
  :root {
    --grid-cols: 1;
  }
}

/* User Auth Styles */
.header-user-info {
  font-size: 0.9rem;
  color: var(--text-primary);
  margin-right: 0.5rem;
  font-weight: 500;
}

.sign-in-btn,
.logout-btn {
  font-size: 0.9rem;
  font-weight: 600;
  padding: 0.45rem 1rem;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.sign-in-btn {
  background: var(--accent-gradient);
  color: #fff;
  border: none;
}

.sign-in-btn:hover {
  background: var(--accent-gradient-hover);
}

.logout-btn {
  background-color: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border);
}

.logout-btn:hover {
  background-color: #f3f4f6;
  color: var(--text-primary);
}

.cart-btn {
  position: relative;
  border: 1px solid var(--border);
  background: var(--bg-white);
  padding: 0.45rem;
  border-radius: 4px;
  display: flex;
  cursor: pointer;
}

.cart-btn:hover {
  background: #f9fafb;
}

.cart-btn svg {
  width: 20px;
  height: 20px;
  fill: var(--text-primary);
}

.cart-badge {
  position: absolute;
  top: -6px;
  right: -6px;
  background-color: #ef4444;
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  min-width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  border: 2px solid #fff;
}

/* Auth Modal Overlay */
.auth-overlay {
  position: fixed;
  inset: 0;
  z-index: 150;
  background: rgba(10, 15, 25, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
}

.auth-overlay[hidden] {
  display: none;
}

.auth-modal {
  width: 100%;
  max-width: 440px;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  padding: 1.75rem;
  position: relative;
  animation: authFadeIn 0.25s ease-out;
}

@keyframes authFadeIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.auth-close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  border: none;
  background: transparent;
  font-size: 1.5rem;
  cursor: pointer;
  color: #9ca3af;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
}

.auth-close:hover {
  background-color: #f3f4f6;
  color: #4b5563;
}

.auth-tabs {
  display: flex;
  border-bottom: 2px solid #f3f4f6;
  margin-bottom: 1.5rem;
}

.auth-tab {
  flex: 1;
  border: none;
  background: none;
  padding: 0.75rem 0;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text-secondary);
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  text-align: center;
  cursor: pointer;
}

.auth-tab.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.auth-field {
  margin-bottom: 1.25rem;
}

.auth-field label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 0.35rem;
  color: #374151;
}

.auth-field input {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 0.55rem 0.75rem;
  font-size: 0.9rem;
  transition: border-color 0.15s ease;
}

.auth-field input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(45, 80, 255, 0.15);
}

.auth-remember-container {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
  user-select: none;
}

.auth-remember-container input[type="checkbox"] {
  width: auto;
  cursor: pointer;
  accent-color: var(--accent);
}

.auth-remember-container label {
  font-size: 0.85rem;
  font-weight: 500;
  color: #374151;
  cursor: pointer;
  margin-bottom: 0;
}

.auth-submit-btn {
  width: 100%;
  background: var(--accent-gradient);
  color: #fff;
  border: none;
  border-radius: 4px;
  padding: 0.65rem;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: background-color 0.15s ease;
  margin-top: 0.5rem;
}

.auth-submit-btn:hover {
  background-color: var(--accent-hover);
}

.auth-alert-error {
  background-color: #fee2e2;
  border: 1px solid #fca5a5;
  color: #b91c1c;
  padding: 0.65rem 0.85rem;
  border-radius: 4px;
  font-size: 0.85rem;
  margin-bottom: 1rem;
  font-weight: 500;
}

/* ── PIN Activation Overlay ─────────────────────────────────────────────── */
.pin-overlay {
  position: fixed;
  inset: 0;
  z-index: 160;
  background: rgba(10, 15, 25, 0.72);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  backdrop-filter: blur(2px);
  animation: fadeIn 0.2s ease;
}

.pin-overlay[hidden] {
  display: none;
}

.pin-modal {
  width: min(420px, 100%);
  background: #ffffff;
  border-radius: 14px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.25);
  padding: 2rem 2rem 1.5rem;
  text-align: center;
  animation: modalPop 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes modalPop {
  from {
    opacity: 0;
    transform: scale(0.92);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

.pin-modal-icon {
  font-size: 2.5rem;
  margin-bottom: 0.65rem;
  line-height: 1;
}

.pin-modal-title {
  margin: 0 0 0.5rem;
  font-size: 1.35rem;
  font-weight: 700;
  color: #1f2937;
}

.pin-modal-desc {
  margin: 0 0 1.5rem;
  font-size: 0.88rem;
  color: #6b7280;
  line-height: 1.5;
}

.pin-modal .auth-field {
  text-align: left;
}

.pin-modal-footer {
  margin-top: 1.25rem;
  font-size: 0.82rem;
  color: #6b7280;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
}

.pin-resend-btn {
  border: none;
  background: none;
  color: var(--accent);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  padding: 0;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.pin-resend-btn:hover {
  color: var(--accent-hover);
}

.pin-resend-btn:disabled {
  color: var(--text-muted);
  cursor: not-allowed;
  text-decoration: none;
}

/* Cart Drawer Styles */
.cart-drawer-overlay {
  position: fixed;
  inset: 0;
  z-index: 140;
  background: rgba(10, 15, 25, 0.6);
  display: flex;
  justify-content: flex-end;
}

.cart-drawer-overlay[hidden] {
  display: none;
}

.cart-drawer {
  width: min(580px, 100%);
  height: 100%;
  background-color: #fff;
  box-shadow: -4px 0 25px rgba(0, 0, 0, 0.15);
  display: flex;
  flex-direction: column;
  animation: cartSlideIn 0.25s ease-out;
}

@keyframes cartSlideIn {
  from {
    transform: translateX(100%);
  }

  to {
    transform: translateX(0);
  }
}

.cart-drawer-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.cart-drawer-header h2 {
  margin: 0;
  font-size: 1.3rem;
  font-weight: 700;
}

.cart-drawer-close {
  border: none;
  background: transparent;
  font-size: 1.6rem;
  cursor: pointer;
  color: #9ca3af;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
}

.cart-drawer-close:hover {
  background-color: #f3f4f6;
  color: #4b5563;
}

.cart-drawer-content {
  flex: 1;
  overflow-y: auto;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.cart-empty-msg {
  text-align: center;
  color: var(--text-secondary);
  margin-top: 3rem;
  font-size: 0.95rem;
}

.cart-item-row {
  display: flex;
  gap: 1rem;
  border-bottom: 1px solid #f3f4f6;
  padding-bottom: 1.25rem;
}

.cart-item-row:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.cart-item-img {
  width: 54px;
  height: 75px;
  object-fit: contain;
  border-radius: 3px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  background-color: #f8fafc;
}

.cart-item-details {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.cart-item-name {
  font-size: 0.9rem;
  font-weight: 700;
  margin: 0 0 0.15rem;
  line-height: 1.2;
}

.cart-item-meta {
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin: 0 0 0.45rem;
}

.cart-item-seller {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin: 0 0 0.45rem;
}

.cart-item-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
}

.cart-item-price {
  font-size: 0.95rem;
  font-weight: 700;
  color: #111827;
}

.cart-item-qty {
  display: flex;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 4px;
  overflow: hidden;
  height: 28px;
}

.cart-item-qty button {
  border: none;
  background-color: #f9fafb;
  width: 24px;
  height: 100%;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cart-item-qty button:hover {
  background-color: #f3f4f6;
}

.cart-item-qty span {
  width: 32px;
  text-align: center;
  font-size: 0.85rem;
  font-weight: 600;
}

.cart-item-remove-btn {
  background: none;
  border: none;
  color: #9ca3af;
  cursor: pointer;
  padding: 0.25rem;
  margin-left: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: all 0.15s ease;
}

.cart-item-remove-btn svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.cart-item-remove-btn:hover {
  color: #ef4444;
  background-color: #fee2e2;
}

.cart-drawer-footer {
  padding: 1.5rem;
  border-top: 1px solid var(--border);
  background-color: #f9fafb;
}

.cart-subtotal-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
}

.cart-subtotal-row span {
  font-size: 1rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.cart-subtotal-row strong {
  font-size: 1.4rem;
  font-weight: 800;
  color: #111827;
}

.checkout-btn {
  width: 100%;
  background: var(--accent-gradient);
  color: #fff;
  border: none;
  border-radius: 4px;
  padding: 0.75rem;
  font-weight: 700;
  font-size: 1.05rem;
  cursor: pointer;
  text-align: center;
  transition: background-color 0.15s ease;
}

.checkout-btn:hover {
  background-color: #e68a00;
}

/* Toast Notifications */
.toast-container {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.toast {
  background-color: #1f2937;
  color: #fff;
  padding: 0.75rem 1.25rem;
  border-radius: 6px;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  font-size: 0.9rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  animation: toastSlideIn 0.25s ease-out forwards;
}

@keyframes toastSlideIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.toast.fade-out {
  animation: toastFadeOut 0.25s ease-in forwards;
}

@keyframes toastFadeOut {
  from {
    opacity: 1;
    transform: translateY(0);
  }

  to {
    opacity: 0;
    transform: translateY(10px);
  }
}

/* Modal and Buy Panel buttons */
.buy-panel-cart-btn {
  width: 100%;
  background: var(--accent-gradient);
  color: #fff;
  border: none;
  border-radius: 4px;
  padding: 0.75rem 1rem;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  margin-top: 1rem;
  transition: background-color 0.15s ease;
}

.buy-panel-cart-btn:hover {
  background-color: #e68a00;
}

.listing-row-cart-btn {
  background: var(--accent-gradient);
  color: #fff;
  border: none;
  border-radius: 4px;
  padding: 0.5rem 0.75rem;
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  transition: background 0.15s ease;
  width: 100%;
  text-align: center;
}

.listing-row-cart-btn:hover {
  background: var(--accent-gradient-hover);
}

.quick-add-btn {
  background: var(--accent-gradient);
  color: #fff;
  border: none;
  border-radius: 4px;
  padding: 0.25rem 0.5rem;
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
  width: 100%;
  text-align: center;
  transition: background 0.15s ease, transform 0.1s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.quick-add-btn:hover {
  background: var(--accent-gradient-hover);
}

.quick-add-btn:active {
  transform: scale(0.95);
}

.listing-row-cart-btn.edit-listing-btn,
.quick-add-btn.edit-listing-btn {
  background-color: #6b7280;
  color: #fff;
}

.listing-row-cart-btn.edit-listing-btn:hover,
.quick-add-btn.edit-listing-btn:hover {
  background-color: #4b5563;
}

/* Card Grading Badges */
.grading-badge {
  position: absolute;
  top: 6px;
  left: 6px;
  background: rgba(15, 23, 42, 0.9);
  /* slate-900 with opacity */
  color: #ffffff;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.15);
  pointer-events: none;
  z-index: 5;
}

.detail-image-panel .detail-grading-badge {
  top: 12px;
  left: 12px;
  font-size: 0.8rem;
  padding: 0.25rem 0.55rem;
  border-radius: 6px;
}

/* Inline Title Grading Badges */
.title-grading-badge {
  display: inline-block;
  font-size: 0.725rem;
  font-weight: 700;
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  margin-left: 0.5rem;
  vertical-align: middle;
  line-height: 1.25;
  background: #f3f4f6;
  color: #374151;
  border: 1px solid #d1d5db;
  text-transform: uppercase;
}

/* Premium Styling for PSA 10 (Gold) */
.title-grading-badge.badge-psa10 {
  background: linear-gradient(135deg, #ffd700 0%, #f3e5ab 55%, #d4af37 100%);
  color: #1a1a1a;
  border: 1px solid #c59b27;
  box-shadow: 0 1px 4px rgba(212, 175, 55, 0.4);
  animation: grading-shine 3s infinite ease-in-out;
}

/* Premium Styling for PSA 9 (Silver) */
.title-grading-badge.badge-psa9 {
  background: linear-gradient(135deg, #cfcfcf 0%, #ffffff 55%, #b0b0b0 100%);
  color: #1a1a1a;
  border: 1px solid #9c9c9c;
  box-shadow: 0 1px 4px rgba(156, 156, 156, 0.35);
}

@keyframes grading-shine {

  0%,
  100% {
    filter: brightness(1);
  }

  50% {
    filter: brightness(1.12);
  }
}

/* Card Listings Grading Badges */
.card-listings.title-grading-badge {
  margin: auto 0 0.25rem 0;
  align-self: flex-start;
  font-size: 0.65rem;
}

/* Detail Buy Panel Condition Grading Badge */
.buy-condition .title-grading-badge {
  margin-left: 0;
  font-size: 0.8rem;
  padding: 0.2rem 0.5rem;
}

/* Golden-ish Border for PSA 9 and 10 Card Images */
.card-image.grade-gold-border {
  border: 3.5px solid #ffd700 !important;
  /* Bolder gold */
  box-shadow: 0 0 14px rgba(255, 215, 0, 0.85), inset 0 0 4px rgba(255, 255, 255, 0.4) !important;
  animation: border-sparkle 2.5s infinite ease-in-out;
}

@keyframes border-sparkle {

  0%,
  100% {
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.7), inset 0 0 2px rgba(255, 255, 255, 0.3);
    border-color: #ffd700;
  }

  50% {
    box-shadow: 0 0 18px rgba(255, 215, 0, 0.95), inset 0 0 6px rgba(255, 255, 255, 0.5);
    border-color: #fffbeb;
    /* golden off-white shine */
  }
}

/* ── Checkout Overlay ─────────────────────────────── */
.checkout-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(3px);
  z-index: 9200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  animation: fadeIn 0.2s ease;
}

.checkout-overlay[hidden] {
  display: none !important;
}

.checkout-modal {
  background: #fff;
  border-radius: 16px;
  width: 100%;
  max-width: 560px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.22);
  position: relative;
  overflow: hidden;
  animation: slideUp 0.25s ease;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(24px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.checkout-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 2rem;
  height: 2rem;
  border: none;
  background: #f3f4f6;
  border-radius: 50%;
  font-size: 1.2rem;
  line-height: 1;
  color: #374151;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
  transition: background 0.15s;
}

.checkout-close:hover {
  background: #e5e7eb;
}

.checkout-step {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}

.checkout-step[hidden] {
  display: none !important;
}

.checkout-header {
  padding: 1.5rem 1.75rem 1rem;
  border-bottom: 1px solid #f3f4f6;
}

.checkout-steps-indicator {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin-bottom: 0.75rem;
}

.checkout-step-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #d1d5db;
  transition: background 0.2s;
}

.checkout-step-dot.active {
  background: var(--accent, #2d50ff);
}

.checkout-step-dot.done {
  background: #22c55e;
}

.checkout-step-line {
  flex: 1;
  height: 2px;
  background: #d1d5db;
  border-radius: 2px;
  max-width: 40px;
  transition: background 0.2s;
}

.checkout-step-line.active {
  background: #22c55e;
}

.checkout-title {
  font-size: 1.15rem;
  font-weight: 700;
  margin: 0 0 0.15rem;
  color: #111;
}

.checkout-subtitle {
  font-size: 0.82rem;
  color: #6b7280;
  margin: 0;
}

.checkout-body {
  flex: 1;
  overflow-y: auto;
  padding: 1.25rem 1.75rem;
}

.checkout-order-summary {
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 0.85rem 1rem;
  margin-bottom: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.checkout-summary-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.82rem;
}

.checkout-summary-item img {
  width: 36px;
  height: 36px;
  object-fit: contain;
  border-radius: 4px;
  background: #fff;
  border: 1px solid #e5e7eb;
}

.checkout-summary-item-name {
  font-weight: 500;
  flex: 1;
}

.checkout-summary-item-price {
  color: var(--accent, #2d50ff);
  font-weight: 600;
  white-space: nowrap;
}

.checkout-section-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #9ca3af;
  margin-bottom: 0.6rem;
}

.checkout-form {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.checkout-field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.checkout-field {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.checkout-field label {
  font-size: 0.8rem;
  font-weight: 500;
  color: #374151;
}

.checkout-optional {
  color: #9ca3af;
  font-weight: 400;
}

.checkout-field input,
.checkout-field textarea,
.checkout-field select {
  padding: 0.55rem 0.75rem;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-size: 0.85rem;
  font-family: inherit;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
  resize: vertical;
}

.checkout-field input:focus,
.checkout-field textarea:focus {
  border-color: var(--accent, #2d50ff);
  box-shadow: 0 0 0 3px rgba(45, 80, 255, 0.1);
}

.checkout-field input.error {
  border-color: #ef4444;
}

.checkout-footer {
  padding: 1rem 1.75rem 1.5rem;
  border-top: 1px solid #f3f4f6;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.checkout-total-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.9rem;
}

.checkout-total-row strong {
  font-size: 1.1rem;
  color: var(--accent, #2d50ff);
}

.checkout-next-btn,
.checkout-confirm-btn {
  background: var(--accent-gradient);
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 0.75rem 1.5rem;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  width: 100%;
  transition: background 0.15s, transform 0.1s;
}

.checkout-next-btn:hover,
.checkout-confirm-btn:hover {
  background: var(--accent-gradient-hover);
}

.checkout-next-btn:active,
.checkout-confirm-btn:active {
  transform: scale(0.98);
}

.checkout-back-btn {
  background: #f3f4f6;
  color: #374151;
  border: none;
  border-radius: 10px;
  padding: 0.75rem 1.25rem;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.15s;
}

.checkout-back-btn:hover {
  background: #e5e7eb;
}

/* Review step */
.checkout-review-address {
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 0.85rem 1rem;
  font-size: 0.85rem;
  line-height: 1.6;
  color: #374151;
}

.checkout-review-items {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.checkout-review-item {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 0.65rem 0.9rem;
  font-size: 0.83rem;
}

.checkout-review-item img {
  width: 40px;
  height: 40px;
  object-fit: contain;
  border-radius: 4px;
  background: #fff;
  border: 1px solid #e5e7eb;
}

.checkout-review-item-info {
  flex: 1;
}

.checkout-review-item-name {
  font-weight: 600;
}

.checkout-review-item-sub {
  color: #6b7280;
  font-size: 0.78rem;
}

.checkout-review-item-price {
  font-weight: 700;
  color: var(--accent, #2d50ff);
  white-space: nowrap;
}

/* Success step */
.checkout-step-success {
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 1rem;
  padding: 3rem 2rem;
}

.checkout-success-icon {
  width: 72px;
  height: 72px;
  background: #22c55e;
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  font-weight: 700;
  box-shadow: 0 8px 24px rgba(34, 197, 94, 0.35);
  animation: popIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes popIn {
  from {
    transform: scale(0.4);
    opacity: 0;
  }

  to {
    transform: scale(1);
    opacity: 1;
  }
}

.checkout-success-msg {
  color: #111;
}

.checkout-subtitle {
  font-size: 0.82rem;
  color: #6b7280;
  margin: 0;
}

.checkout-body {
  flex: 1;
  overflow-y: auto;
  padding: 1.25rem 1.75rem;
}

.checkout-order-summary {
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 0.85rem 1rem;
  margin-bottom: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.checkout-summary-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.82rem;
}

.checkout-summary-item img {
  width: 36px;
  height: 36px;
  object-fit: contain;
  border-radius: 4px;
  background: #fff;
  border: 1px solid #e5e7eb;
}

.checkout-summary-item-name {
  font-weight: 500;
  flex: 1;
}

.checkout-summary-item-price {
  color: var(--accent, #2d50ff);
  font-weight: 600;
  white-space: nowrap;
}

.checkout-section-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #9ca3af;
  margin-bottom: 0.6rem;
}

.checkout-form {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.checkout-field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.checkout-field {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.checkout-field label {
  font-size: 0.8rem;
  font-weight: 500;
  color: #374151;
}

.checkout-optional {
  color: #9ca3af;
  font-weight: 400;
}

.checkout-field input,
.checkout-field textarea,
.checkout-field select {
  padding: 0.55rem 0.75rem;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-size: 0.85rem;
  font-family: inherit;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
  resize: vertical;
}

.checkout-field input:focus,
.checkout-field textarea:focus {
  border-color: var(--accent, #2d50ff);
  box-shadow: 0 0 0 3px rgba(45, 80, 255, 0.1);
}

.checkout-field input.error {
  border-color: #ef4444;
}

.checkout-footer {
  padding: 1rem 1.75rem 1.5rem;
  border-top: 1px solid #f3f4f6;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.checkout-total-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.9rem;
}

.checkout-total-row strong {
  font-size: 1.1rem;
  color: var(--accent, #2d50ff);
}

.checkout-next-btn,
.checkout-confirm-btn {
  background: var(--accent-gradient);
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 0.75rem 1.5rem;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  width: 100%;
  transition: background 0.15s, transform 0.1s;
}

.checkout-next-btn:hover,
.checkout-confirm-btn:hover {
  background: var(--accent-gradient-hover);
}

.checkout-next-btn:active,
.checkout-confirm-btn:active {
  transform: scale(0.98);
}

.checkout-back-btn {
  background: #f3f4f6;
  color: #374151;
  border: none;
  border-radius: 10px;
  padding: 0.75rem 1.25rem;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.15s;
}

.checkout-back-btn:hover {
  background: #e5e7eb;
}

/* Review step */
.checkout-review-address {
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 0.85rem 1rem;
  font-size: 0.85rem;
  line-height: 1.6;
  color: #374151;
}

.checkout-review-items {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.checkout-review-item {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 0.65rem 0.9rem;
  font-size: 0.83rem;
}

.checkout-review-item img {
  width: 40px;
  height: 40px;
  object-fit: contain;
  border-radius: 4px;
  background: #fff;
  border: 1px solid #e5e7eb;
}

.checkout-review-item-info {
  flex: 1;
}

.checkout-review-item-name {
  font-weight: 600;
}

.checkout-review-item-sub {
  color: #6b7280;
  font-size: 0.78rem;
}

.checkout-review-item-price {
  font-weight: 700;
  color: var(--accent, #2d50ff);
  white-space: nowrap;
}

/* Success step */
.checkout-step-success {
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 1rem;
  padding: 3rem 2rem;
}

.checkout-success-icon {
  width: 72px;
  height: 72px;
  background: #22c55e;
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  font-weight: 700;
  box-shadow: 0 8px 24px rgba(34, 197, 94, 0.35);
  animation: popIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes popIn {
  from {
    transform: scale(0.4);
    opacity: 0;
  }

  to {
    transform: scale(1);
    opacity: 1;
  }
}

.checkout-success-msg {
  font-size: 0.9rem;
  color: #6b7280;
  margin: 0;
  max-width: 300px;
}

.checkout-step-success .checkout-confirm-btn {
  max-width: 200px;
}

/* Payment Selection */
.checkout-payment-options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
  gap: 0.6rem;
  margin-bottom: 1.25rem;
}

.checkout-payment-option {
  position: relative;
  cursor: pointer;
}

.checkout-payment-option input[type="radio"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.payment-option-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 0.75rem 0.5rem;
  text-align: center;
  background-color: #fff;
  transition: all 0.2s ease;
  min-height: 70px;
}

.payment-option-card:hover {
  border-color: #d1d5db;
  background-color: #f9fafb;
}

.checkout-payment-option input[type="radio"]:checked+.payment-option-card {
  border-color: var(--accent, #2d50ff);
  background-color: rgba(45, 80, 255, 0.04);
  box-shadow: 0 0 0 2px rgba(45, 80, 255, 0.15);
}

.payment-option-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: #1f2937;
}

.checkout-payment-option input[type="radio"]:checked+.payment-option-card .payment-option-title {
  color: var(--accent, #2d50ff);
}

/* Transaction filter bar */
.tx-filter-bar {
  display: flex;
  flex-wrap: nowrap;
  gap: 1rem;
  padding: 0 1.5rem;
  overflow-x: auto;
  scrollbar-width: none;
  border-bottom: 1px solid #e5e7eb;
  background: #ffffff;
  flex-shrink: 0;
}

.tx-filter-bar::-webkit-scrollbar {
  display: none;
}

.tx-filter-pill {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  padding: 0.85rem 0.1rem 0.75rem;
  border: none;
  background: none;
  color: #6b7280;
  font-size: 0.8rem;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  white-space: nowrap;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: color 0.15s, border-color 0.15s;
}

.tx-filter-pill:hover {
  color: #374151;
}

.tx-filter-pill.active {
  color: var(--accent, #2d50ff);
  border-bottom-color: var(--accent, #2d50ff);
  font-weight: 600;
}

.tx-filter-count {
  font-size: 0.72rem;
  font-weight: 400;
  color: #9ca3af;
  margin-left: 0.2rem;
}

.tx-filter-count::before {
  content: "(";
}

.tx-filter-count::after {
  content: ")";
}

.tx-filter-pill.active .tx-filter-count {
  color: var(--accent, #2d50ff);
  font-weight: 500;
}

/* Transaction history styles */

.tx-card {
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 1rem;
  margin-bottom: 1rem;
  background-color: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.tx-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
  font-size: 0.82rem;
  color: #6b7280;
  border-bottom: 1px solid #f3f4f6;
  padding-bottom: 0.5rem;
}

.tx-id {
  font-weight: 700;
  color: #1f2937;
}

.tx-date {
  font-size: 0.78rem;
}

.tx-method {
  display: inline-block;
  background-color: #f3f4f6;
  color: #374151;
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
}

.tx-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.5rem;
  font-size: 0.8rem;
}

.tx-item img {
  width: 32px;
  height: 32px;
  object-fit: contain;
  border-radius: 4px;
  background: #fff;
  border: 1px solid #e5e7eb;
}

.tx-item-name {
  flex: 1;
  font-weight: 500;
}

.tx-item-qty {
  color: #6b7280;
}

.tx-item-price {
  font-weight: 600;
  color: #111;
}

.tx-card-footer {
  margin-top: 0.75rem;
  border-top: 1px solid #f3f4f6;
  padding-top: 0.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
}

.tx-total-label {
  font-weight: 500;
  color: #4b5563;
}

.tx-total-amount {
  font-weight: 700;
  color: var(--accent, #2d50ff);
}

/* Status Badges */
.tx-status-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.55rem;
  border-radius: 9999px;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.tx-status-waiting {
  background-color: #fef3c7;
  color: #d97706;
}

/* amber */
.tx-status-confirmed {
  background-color: #dbeafe;
  color: #2563eb;
}

/* blue */
.tx-status-processed {
  background-color: #e0f2fe;
  color: #0284c7;
}

/* sky */
.tx-status-shipping {
  background-color: #f3e8ff;
  color: #7c3aed;
}

/* purple */
.tx-status-received {
  background-color: #d1fae5;
  color: #059669;
}

/* emerald */
.tx-status-done {
  background-color: #d1fae5;
  color: #059669;
}

/* emerald */
.tx-status-cancelled {
  background-color: #fee2e2;
  color: #b91c1c;
}

/* red */
.tx-status-unknown {
  background-color: #f3f4f6;
  color: #4b5563;
}

/* gray */


/* -- Profile Overlay ------------------------------- */
.profile-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(3px);
  z-index: 9100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.profile-overlay[hidden] {
  display: none !important;
}

.profile-modal {
  background: #fff;
  border-radius: 16px;
  width: 100%;
  max-width: 600px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.22);
  position: relative;
  overflow: hidden;
  animation: slideUp 0.25s ease;
}

.profile-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 2rem;
  height: 2rem;
  border: none;
  background: #f3f4f6;
  border-radius: 50%;
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 2;
  transition: background 0.15s;
}

.profile-close:hover {
  background: #e5e7eb;
}

.profile-tabs {
  border-bottom: 1px solid #e5e7eb;
}

.profile-tabs-scroll {
  display: flex;
  padding: 0 1.5rem;
  margin-right: 3.5rem;
  gap: 0;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.profile-tabs-scroll::-webkit-scrollbar {
  display: none;
}

.profile-tab {
  padding: 1rem 1.1rem 0.85rem;
  border: none;
  background: none;
  font-size: 0.88rem;
  font-weight: 500;
  color: #6b7280;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: color 0.15s, border-color 0.15s;
  flex-shrink: 0;
}

.profile-tab.active {
  color: var(--accent, #2d50ff);
  border-bottom-color: var(--accent, #2d50ff);
}

.profile-tab:hover:not(.active) {
  color: #374151;
}

.profile-panel {
  flex: 1;
  overflow-y: auto;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.profile-panel[hidden] {
  display: none !important;
}

#ppanel-transactions {
  padding: 1rem 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  height: 70vh;
  min-height: 70vh;
}

@media (max-width: 540px) {
  #ppanel-transactions {
    height: 55vh;
    min-height: 55vh;
  }
}

/* Avatar */
.profile-photo-section {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid #f3f4f6;
}

.profile-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--accent, #2d50ff);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  font-weight: 700;
  color: #fff;
  overflow: hidden;
  flex-shrink: 0;
  position: relative;
}

.profile-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  inset: 0;
}

.profile-username {
  font-weight: 600;
  font-size: 0.95rem;
  color: #111;
}

.profile-photo-label {
  display: inline-block;
  margin-top: 0.3rem;
  font-size: 0.78rem;
  color: var(--accent, #2d50ff);
  cursor: pointer;
  font-weight: 500;
}

.profile-photo-label:hover {
  text-decoration: underline;
}

/* Form */
.profile-form {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.profile-field {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.profile-field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.profile-field label {
  font-size: 0.8rem;
  font-weight: 500;
  color: #374151;
}

.profile-field input,
.profile-field textarea,
.profile-field select {
  padding: 0.55rem 0.75rem;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-size: 0.85rem;
  font-family: inherit;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
  resize: vertical;
}

.profile-field input:focus,
.profile-field textarea:focus {
  border-color: var(--accent, #2d50ff);
  box-shadow: 0 0 0 3px rgba(45, 80, 255, 0.1);
}

.profile-save-btn {
  background: var(--accent-gradient);
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 0.65rem 1.25rem;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  width: 100%;
  transition: background 0.15s, transform 0.1s;
  margin-top: 0.25rem;
}

.profile-save-btn:hover {
  background: var(--accent-gradient-hover);
}

.profile-save-btn:active {
  transform: scale(0.98);
}

.profile-logout-icon-btn {
  margin-left: auto;
  background: #fee2e2;
  color: #ef4444;
  border: none;
  border-radius: 50%;
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s;
}

.profile-logout-icon-btn:hover {
  background: #fca5a5;
  color: #b91c1c;
}

.profile-logout-icon-btn:active {
  transform: scale(0.95);
}

.profile-cancel-btn {
  background: #f3f4f6;
  color: #374151;
  border: none;
  border-radius: 10px;
  padding: 0.65rem 1rem;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.15s;
}

.profile-cancel-btn:hover {
  background: #e5e7eb;
}

.profile-alert-error {
  background: #fef2f2;
  color: #dc2626;
  border: 1px solid #fecaca;
  border-radius: 8px;
  padding: 0.55rem 0.75rem;
  font-size: 0.82rem;
}

.profile-alert-success {
  background: #f0fdf4;
  color: #16a34a;
  border: 1px solid #bbf7d0;
  border-radius: 8px;
  padding: 0.55rem 0.75rem;
  font-size: 0.82rem;
}

.profile-alert-error[hidden],
.profile-alert-success[hidden] {
  display: none !important;
}

/* Address list */
.profile-addr-card {
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 0.85rem 1rem;
  font-size: 0.83rem;
  line-height: 1.55;
  position: relative;
}

.profile-addr-card.is-default {
  border-color: var(--accent, #2d50ff);
}

.profile-addr-label {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #6b7280;
  margin-bottom: 0.3rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.profile-addr-default-badge {
  background: var(--accent, #2d50ff);
  color: #fff;
  border-radius: 999px;
  padding: 0.1rem 0.5rem;
  font-size: 0.65rem;
  font-weight: 700;
}

.profile-addr-name {
  font-weight: 600;
  color: #111;
}

.profile-addr-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.6rem;
}

.profile-addr-btn {
  border: none;
  border-radius: 6px;
  padding: 0.3rem 0.65rem;
  font-size: 0.75rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s;
}

.profile-addr-btn-default {
  background: #eff6ff;
  color: var(--accent, #2d50ff);
}

.profile-addr-btn-default:hover {
  background: #dbeafe;
}

.profile-addr-btn-delete {
  background: #fef2f2;
  color: #dc2626;
}

.profile-addr-btn-delete:hover {
  background: #fee2e2;
}

.profile-add-addr-btn {
  border: 2px dashed #d1d5db;
  background: none;
  border-radius: 10px;
  padding: 0.75rem;
  font-size: 0.85rem;
  font-weight: 500;
  color: #6b7280;
  cursor: pointer;
  width: 100%;
  text-align: center;
  transition: border-color 0.15s, color 0.15s;
}

.profile-add-addr-btn:hover {
  border-color: var(--accent, #2d50ff);
  color: var(--accent, #2d50ff);
}

.profile-addr-form-wrap {
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 1rem;
  background: #fafafa;
}

.profile-addr-form-wrap[hidden] {
  display: none !important;
}

.profile-addr-form-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: #374151;
  margin-bottom: 0.85rem;
}

/* Profile button in header */
.profile-btn {
  background: none;
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 0.3rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
}

.profile-btn:hover {
  background: #f3f4f6;
}

.profile-btn-avatar {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--accent, #2d50ff);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
  font-weight: 700;
  color: #fff;
  overflow: hidden;
  flex-shrink: 0;
}

.profile-photo-actions {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-top: 0.3rem;
}

.profile-photo-remove-btn {
  background: none;
  border: none;
  padding: 0;
  font-size: 0.78rem;
  color: #dc2626;
  cursor: pointer;
  font-weight: 500;
  font-family: inherit;
}

.profile-photo-remove-btn:hover {
  text-decoration: underline;
}

.profile-photo-remove-btn[hidden] {
  display: none !important;
}

/* Load More Transactions Styling */
.tx-load-more-container {
  display: flex;
  justify-content: center;
  margin: 1.5rem 0 1rem 0;
  width: 100%;
}

.tx-load-more-btn {
  background: #ffffff;
  color: var(--accent, #2d50ff);
  border: 1px solid var(--accent, #2d50ff);
  padding: 0.6rem 1.8rem;
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  outline: none;
  box-shadow: 0 2px 4px rgba(45, 80, 255, 0.05);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.tx-load-more-btn:hover {
  background: var(--accent, #2d50ff);
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(45, 80, 255, 0.2);
  transform: translateY(-1px);
}

.tx-load-more-btn:active {
  transform: translateY(0);
}

.tx-load-more-btn:disabled {
  background: #f3f4f6;
  color: #9ca3af;
  border-color: #e5e7eb;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* --- Auctions Tab Styles --- */
#auction-grid:not(.view-list) {
  grid-template-columns: repeat(var(--auction-grid-cols, 6), 1fr) !important;
  gap: 0.5rem !important;
}

#dashboard-auctions-grid {
  display: flex !important;
  flex-wrap: nowrap !important;
  gap: 1rem !important;
  padding: 0.25rem 0.1rem;
}

#dashboard-auctions-grid .auction-card {
  flex: 0 0 145px !important;
  width: 145px !important;
}

.auction-card {
  position: relative;
  padding: 0.55rem !important;
  min-height: auto !important;
}

.auction-card .card-title {
  font-size: 0.825rem !important;
  font-weight: 600 !important;
  margin: 0 0 0.2rem 0 !important;
  line-height: 1.25 !important;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  height: 2.5em;
}

.auction-card .card-meta {
  font-size: 0.72rem !important;
  margin-bottom: 0.3rem !important;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.auction-card .auction-bid-info-wrap {
  margin: 0.15rem 0 !important;
  gap: 4px !important;
  display: flex !important;
  align-items: baseline !important;
}

.auction-card .auction-price-val {
  font-size: 0.95rem !important;
  font-weight: 700 !important;
  margin: 0 !important;
}

.auction-card .auction-price-label,
.auction-card .auction-bid-count {
  font-size: 0.65rem !important;
}

.auction-card .auction-timer-row {
  margin-top: 0.2rem !important;
  font-size: 0.75rem !important;
}

.auction-card .auction-seller-info {
  margin-top: 0.35rem !important;
  font-size: 0.72rem !important;
}

.auction-card .auction-actions-wrap {
  display: flex !important;
  flex-direction: row !important;
  gap: 4px !important;
  padding-top: 0.35rem !important;
  margin-top: auto !important;
}

.auction-card .auction-bid-btn,
.auction-card .auction-buyout-btn,
.auction-card .auction-edit-btn,
.auction-card .auction-winner-pay-btn {
  flex: 1 1 0% !important;
  font-size: 0.68rem !important;
  padding: 5px 2px !important;
  border-radius: 4px !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  text-align: center !important;
}

/* Status Badge */
.auction-status-badge {
  position: absolute;
  top: 4px;
  left: 4px;
  padding: 2px 6px;
  font-size: 0.65rem;
  font-weight: 700;
  border-radius: 4px;
  color: #fff;
  letter-spacing: 0.05em;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
  z-index: 5;
}

.auction-status-badge.live {
  background: #10b981;
  /* Green */
  animation: pulse-live 2s infinite;
}

.auction-status-badge.ended {
  background: #3b82f6;
  /* Blue for ended with winner */
}

.auction-status-badge.closed {
  background: #ef4444;
  /* Red for ended/no bid or cancelled */
}

@keyframes pulse-live {
  0% {
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.6);
  }

  70% {
    box-shadow: 0 0 0 5px rgba(16, 185, 129, 0);
  }

  100% {
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
  }
}

/* Timer row */
.auction-timer-row {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 0.35rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent);
}

.auction-timer-row.ended {
  color: var(--text-secondary);
}

.auction-timer-row svg {
  color: currentColor;
}

/* Bid Info Wrap */
.auction-bid-info-wrap {
  margin: 0.25rem 0;
  display: flex;
  align-items: baseline;
  gap: 6px;
  flex-wrap: nowrap;
}

.auction-price-label {
  font-size: 0.7rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  white-space: nowrap;
}

.auction-price-val {
  font-size: 1.15rem;
  font-weight: 700;
  margin: 0;
  white-space: nowrap;
}

.auction-bid-count {
  font-size: 0.7rem;
  color: var(--text-secondary);
  white-space: nowrap;
}

.auction-seller-info {
  margin-top: 0.35rem !important;
}

/* Buttons Container */
.auction-actions-wrap {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: auto;
  /* Push buttons to the bottom */
  padding-top: 0.5rem;
}

/* Bid and Buyout Buttons */
.auction-bid-btn,
.auction-buyout-btn,
.auction-edit-btn {
  border: none;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 6px 10px;
  border-radius: 4px;
  cursor: pointer;
  text-align: center;
  transition: background 0.2s, transform 0.1s;
}

.auction-edit-btn {
  background: #f3f4f6;
  color: #1f2937;
  border: 1px solid var(--border);
}

.auction-edit-btn:hover {
  background: #e5e7eb;
}

.auction-edit-btn:active {
  transform: scale(0.97);
}

.auction-bid-btn {
  background: var(--accent);
  color: #fff;
}

.auction-bid-btn:hover {
  background: var(--accent-hover, #1e3dd4);
}

.auction-bid-btn:active {
  transform: scale(0.97);
}

.auction-buyout-btn {
  background: #f59e0b;
  /* Amber */
  color: #fff;
}

.auction-buyout-btn:hover {
  background: #d97706;
}

.auction-buyout-btn:active {
  transform: scale(0.97);
}

/* Active state for auction filter pills */
.filter-pill.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.auction-status-badge.upcoming {
  background: #8b5cf6;
  /* Violet */
}

/* Winner payment button & winner card styles */
.auction-winner-pay-btn {
  background: linear-gradient(135deg, #16a34a, #15803d);
  color: #fff;
  border: none;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 6px 10px;
  border-radius: 4px;
  cursor: pointer;
  text-align: center;
  transition: background 0.2s, transform 0.1s;
  width: 100%;
}

.auction-winner-pay-btn:hover {
  background: linear-gradient(135deg, #15803d, #166534);
}

.auction-winner-pay-btn:active {
  transform: scale(0.97);
}

.auction-winner-card {
  border: 2px solid #16a34a !important;
  box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.15) !important;
}

/* Recommendations Layout & Cards */
.main-layout-wrap {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin-top: 1rem;
}

@media (min-width: 1024px) {
  .main-layout-wrap {
    flex-direction: row;
    align-items: flex-start;
  }
}

.main-content-col {
  flex: 1;
  min-width: 0;
}

.sidebar-col {
  width: 100%;
  flex-shrink: 0;
}

@media (min-width: 1024px) {
  .sidebar-col {
    width: 320px;
    position: sticky;
    top: 80px;
  }
}

.recommendations-box {
  background: var(--bg-white);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-card);
  padding: 1.25rem;
  box-shadow: var(--shadow-sm);
}

.recommendations-title {
  margin: 0 0 1rem 0;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
  border-bottom: 2px solid var(--border);
  padding-bottom: 0.5rem;
  position: relative;
}

.recommendations-title::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 40px;
  height: 2px;
  background: var(--accent);
}

.recommendations-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
}

@media (max-width: 1023px) {
  .recommendations-list {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    scroll-snap-type: x mandatory !important;
    gap: 0.75rem !important;
    padding-bottom: 0.5rem !important;
  }

  .recommendations-list .product-card-sm {
    flex: 0 0 160px !important;
    scroll-snap-align: start !important;
    margin: 0 !important;
  }
}

.recommendations-list .product-card-sm {
  padding: 0.5rem;
  min-height: auto;
  border-radius: var(--radius-card);
  max-width: 180px;
  margin: 0 auto;
  width: 100%;
}

.recommendations-list .product-card-sm .card-image-wrap-sm {
  margin-bottom: 0.4rem;
  border-radius: 6px;
}

.recommendations-list .product-card-sm .card-title-sm {
  font-size: 0.775rem;
  height: 2.5em;
  margin-bottom: 0.25rem;
  line-height: 1.25;
}

.recommendations-list .product-card-sm .card-price-sm {
  font-size: 0.8rem;
}

.recommendations-list .product-card-sm .cart-btn-sm {
  width: 24px;
  height: 24px;
}

.recommendations-list .product-card-sm .cart-btn-sm svg {
  width: 12px !important;
  height: 12px !important;
}

.recommendations-list .product-card-sm .title-grading-badge {
  font-size: 0.525rem !important;
  padding: 0.1rem 0.25rem !important;
  top: 3px !important;
  right: 3px !important;
}

.recommendations-list .product-card-sm .sold-out-badge-sm {
  font-size: 0.55rem !important;
  padding: 2px 5px !important;
  top: 3px !important;
  left: 3px !important;
}

.rec-card {
  display: flex;
  gap: 0.75rem;
  padding: 0.75rem;
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
}

.rec-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  border-color: var(--accent);
  background: #fff;
}

.rec-image-wrap {
  width: 50px;
  height: 70px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f1f5f9;
  border-radius: 4px;
  overflow: hidden;
}

.rec-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform 0.2s ease;
}

.rec-card:hover .rec-image {
  transform: scale(1.08);
}

.rec-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.rec-name {
  margin: 0;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.2;
}

.rec-meta {
  margin: 2px 0;
  font-size: 0.7rem;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rec-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 4px;
}

.rec-price {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
}

.rec-quick-add {
  background: var(--accent-gradient);
  color: #fff;
  border: none;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
}

.rec-quick-add:hover {
  background: var(--accent-gradient-hover);
}

.rec-quick-add:active {
  transform: scale(0.95);
}

.rec-error,
.rec-empty {
  color: var(--text-secondary);
  font-size: 0.85rem;
  margin: 0;
  text-align: center;
  padding: 1rem 0;
}

.rec-grading-badge {
  margin: 2px 0 !important;
  font-size: 0.6rem !important;
  padding: 0.1rem 0.35rem !important;
}

/* Compact Auction Detail Modal */
.auction-detail-modal {
  width: min(920px, 100%) !important;
  max-height: 85vh !important;
  padding: 1.25rem 1.5rem !important;
}

.auction-detail-modal .detail-header-grid {
  grid-template-columns: 300px 1fr 240px !important;
  gap: 1.25rem !important;
}



.auction-detail-modal .detail-title {
  font-size: 1.6rem !important;
  margin-bottom: 0.25rem !important;
}

.auction-detail-modal .detail-subtitle {
  margin: 0.25rem 0 0.75rem !important;
  font-size: 0.85rem !important;
}

.auction-detail-modal .detail-meta-label {
  font-size: 0.9rem !important;
  margin-bottom: 0.35rem !important;
}

.auction-detail-modal .detail-specs div {
  grid-template-columns: 135px 1fr !important;
  gap: 0.35rem !important;
  margin-bottom: 0.25rem !important;
  font-size: 0.85rem !important;
}

.auction-detail-modal .detail-buy-panel {
  padding: 0.75rem !important;
}

.auction-detail-modal .buy-price {
  font-size: 1.6rem !important;
}

.auction-detail-modal .buy-panel-cart-btn {
  padding: 0.5rem !important;
  font-size: 0.9rem !important;
  margin-bottom: 0.35rem !important;
}

.auction-detail-modal .detail-listings-section {
  margin-top: 1rem !important;
  padding-top: 1rem !important;
}

.auction-detail-modal .detail-listings-section h3 {
  margin: 0 0 0.5rem 0 !important;
  font-size: 1.1rem !important;
}

@media (max-width: 768px) {
  .auction-detail-modal .detail-header-grid {
    grid-template-columns: 1fr !important;
  }

}

/* ── MOBILE COMPATIBILITY & RESPONSIVENESS OVERRIDES ── */

/* 1. Header & Authentication Bar Section */
@media (max-width: 540px) {
  .header-top {
    padding: 0.5rem 0.75rem !important;
    gap: 0.5rem !important;
  }

  .logo-text {
    font-size: 1.25rem !important;
  }

  .logo-mark {
    width: 24px !important;
    height: 24px !important;
  }

  .header-user-name {
    font-size: 0.8rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: inline-block;
    vertical-align: middle;
  }

  .tab-icon-svg {
    display: none !important;
  }

  .tab-separator {
    margin: 0 !important;
  }
}

@media (max-width: 480px) {
  .cart-btn {
    padding: 0.4rem !important;
  }

  .profile-btn {
    width: 32px !important;
    height: 32px !important;
  }
}

/* 2. Two-Row Filter Bar on Mobile */
@media (max-width: 768px) {
  .filter-bar-wrap {
    overflow: visible !important;
  }

  .filter-bar {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 0.4rem 0.5rem !important;
    padding: 0.75rem 0.25rem !important;
  }

  .filter-pill,
  .filter-clear {
    flex: 1 1 calc(25% - 0.5rem) !important;
    min-width: 65px !important;
    display: inline-flex !important;
    justify-content: center !important;
    align-items: center !important;
    text-align: center !important;
    font-size: 0.72rem !important;
    padding: 0.4rem 0.2rem !important;
    white-space: normal !important;
    line-height: 1.15 !important;
  }
}

/* 3. Content Tabs Stacked Layout */
@media (max-width: 768px) {
  .content-tabs {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 0.75rem !important;
    padding-bottom: 0.5rem !important;
  }

  .content-tabs>div {
    justify-content: flex-start !important;
    width: 100% !important;
    gap: 0.75rem !important;
    overflow-x: auto !important;
    flex-wrap: nowrap !important;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 0.25rem !important;
  }

  .content-tabs>div::-webkit-scrollbar {
    display: none;
  }

  .tab {
    padding: 0.65rem 0.35rem !important;
    font-size: 0.85rem !important;
    flex-shrink: 0 !important;
  }

  .tab-separator {
    flex-shrink: 0 !important;
  }

  .tab-icon-svg {
    width: 16px !important;
    height: 16px !important;
    margin-right: 4px !important;
  }

  #tab-actions-container,
  .tab-actions {
    justify-content: center !important;
    width: 100% !important;
    margin-bottom: 0 !important;
  }

  .tab-actions button.add-btn {
    width: 100% !important;
    justify-content: center !important;
    padding: 0.65rem 1rem !important;
  }
}

/* 4. Results Toolbar Stacked Controls */
@media (max-width: 768px) {
  .results-toolbar {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 0.75rem !important;
  }

  .sort-view {
    width: 100% !important;
    justify-content: flex-end !important;
    flex-wrap: wrap !important;
  }

  .sort-select {
    flex: 1 !important;
    min-width: 110px !important;
  }
}

/* 5. Form Field Rows Stacked Layout */
@media (max-width: 600px) {

  .checkout-field-row,
  .profile-field-row {
    grid-template-columns: 1fr !important;
    gap: 0.75rem !important;
  }
}

/* 6. Detail Modal Breakpoints & Tablet Support */
@media (max-width: 1024px) {

  .detail-header-grid,
  .detail-header-grid-2col,
  .auction-detail-modal .detail-header-grid {
    grid-template-columns: 1fr !important;
  }

  .detail-bottom-grid {
    grid-template-columns: 1fr !important;
  }

  .detail-image-panel,
  .auction-detail-modal .detail-image-panel {
    min-height: 300px !important;
    max-height: 380px !important;
  }

  .detail-card-image.card-image {
    max-height: 280px !important;
    width: auto !important;
    object-fit: contain !important;
  }

  .detail-specs div {
    grid-template-columns: 1fr !important;
    gap: 0.25rem !important;
  }

  .detail-side-stack {
    margin-top: 1rem !important;
  }

  .listings-header {
    flex-direction: column !important;
    align-items: stretch !important;
  }

  .listings-controls {
    flex-wrap: wrap !important;
  }

  .listing-row {
    grid-template-columns: 1fr !important;
    gap: 0.5rem !important;
  }

  .listing-stock-info {
    justify-content: flex-start !important;
    text-align: left !important;
  }
}

@media (max-width: 480px) {
  .detail-overlay {
    padding: 0.5rem !important;
  }

  .detail-modal {
    padding: 0.75rem !important;
    border-radius: 8px !important;
  }

  .detail-title {
    font-size: 1.5rem !important;
  }

  .buy-price {
    font-size: 1.6rem !important;
  }

  .listings-header h3 {
    font-size: 1.5rem !important;
  }

  .cart-drawer-header {
    padding: 1rem !important;
  }

  .cart-drawer-content {
    padding: 1rem !important;
  }

  .cart-drawer-footer {
    padding: 1rem !important;
  }
}

/* ── ADDITIONAL RESPONSE COLUMN AND GRID SPACING ADJUSTMENTS ── */

:root {
  --auction-grid-cols: 8;
}

@media (max-width: 1280px) {
  :root {
    --auction-grid-cols: 7;
  }
}

@media (max-width: 1024px) {
  :root {
    --auction-grid-cols: 6;
  }
}

@media (max-width: 768px) {
  :root {
    --auction-grid-cols: 5;
  }

  .search-area-wrap {
    margin-top: 0.5rem !important;
  }

  .detail-image-panel .title-grading-badge {
    right: auto !important;
    left: 0.75rem !important;
  }
}

@media (max-width: 600px) {
  :root {
    --grid-cols: 2 !important;
    /* change to 2 to make marketplace cards smaller on mobile too */
    --auction-grid-cols: 4 !important;
    /* 4 columns on mobile to keep them compact */
  }
}

/* ── Dashboard Styles ── */
.dashboard-container {
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
  width: 100%;
  margin-top: 1.5rem;
  margin-bottom: 3rem;
  animation: fadeIn 0.4s ease-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.dashboard-hero {
  display: grid;
  grid-template-columns: 1.8fr 1.2fr;
  gap: 2rem;
  background: linear-gradient(135deg, #0f172a 0%, #1e1b4b 100%);
  border-radius: 12px;
  padding: 2.5rem;
  color: #ffffff;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
  position: relative;
  overflow: hidden;
}

.dashboard-hero::before {
  content: "";
  position: absolute;
  top: -50%;
  right: -20%;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.25) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.dashboard-hero-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 1rem;
}

.dashboard-hero-content h1 {
  margin: 0;
  font-size: 2.5rem;
  font-weight: 800;
  line-height: 1.2;
  background: linear-gradient(to right, #ffffff, #a5b4fc);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.dashboard-hero-content p {
  margin: 0;
  font-size: 1.1rem;
  color: #cbd5e1;
  max-width: 500px;
  line-height: 1.6;
}

.dashboard-hero-buttons {
  display: flex;
  gap: 1rem;
  margin-top: 0.75rem;
}

.dashboard-btn {
  padding: 0.85rem 1.75rem;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: 8px;
  border: none;
  transition: all 0.2s ease;
}

.dashboard-btn.primary {
  background: var(--accent-gradient);
  color: #ffffff;
}

.dashboard-btn.primary:hover {
  background: var(--accent-gradient-hover);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(45, 80, 255, 0.3);
}

.dashboard-btn.secondary {
  background: var(--accent-gradient);
  color: #ffffff;
}

.dashboard-btn.secondary:hover {
  background: var(--accent-gradient-hover);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(45, 80, 255, 0.3);
}

.dashboard-hero-stats {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  gap: 2rem;
  background: rgba(255, 255, 255, 0.04);
  padding: 1.5rem;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(8px);
}

.dashboard-hero-stats-col {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  flex: 1;
}

.stat-card {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.stat-num {
  font-size: 1.8rem;
  font-weight: 700;
  color: #818cf8;
}

.stat-label {
  font-size: 0.85rem;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Personalized Hub */
.dashboard-personalized {
  background: var(--bg-white);
  border-radius: 12px;
  border: 1px solid var(--border);
  padding: 1.75rem;
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.dash-user-welcome {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.dash-user-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--accent);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 1.25rem;
  color: #ffffff;
}

.dash-user-info-text h3 {
  margin: 0;
  font-size: 1.3rem;
  font-weight: 700;
}

.dash-user-info-text p {
  margin: 0.2rem 0 0;
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.dash-user-stats-grid {
  display: flex;
  gap: 2.5rem;
}

.dash-user-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  padding: 0.25rem 0.5rem;
  border-radius: 6px;
  transition: background 0.2s;
}

.dash-user-stat:hover {
  background: var(--bg-page);
}

.dash-user-stat .num {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--accent);
}

.dash-user-stat .label {
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-top: 0.15rem;
}

.dash-user-actions {
  display: flex;
  gap: 0.75rem;
}

.dash-action-btn {
  padding: 0.65rem 1.25rem;
  font-size: 0.85rem;
  font-weight: 600;
  border-radius: 6px;
  border: none;
  background: var(--bg-page);
  color: var(--text-primary);
  transition: all 0.2s;
}

.dash-action-btn:hover {
  background: var(--border);
}

.dash-action-btn.accent {
  background: var(--accent-gradient);
  color: #ffffff;
}

.dash-action-btn.accent:hover {
  background: var(--accent-gradient-hover);
}

/* ── Point System / Tier Badge ─────────────────────────────────────────── */

.dash-user-tier-badge-wrap {
  position: relative;
  width: 76px;
  height: 76px;
  margin-left: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  cursor: help;
}

.tier-progress-circle {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.tier-progress-bg {
  fill: none;
  stroke: var(--border);
  stroke-width: 3.5;
}

.tier-progress-fill {
  fill: none;
  stroke: var(--tier-color);
  stroke-width: 3.5;
  stroke-linecap: round;
  transition: stroke-dashoffset 0.6s ease;
}

.dash-user-tier-badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 66px;
  height: 66px;
  border-radius: 50%;
  background: linear-gradient(145deg, color-mix(in srgb, var(--tier-color) 12%, var(--bg-white)), color-mix(in srgb, var(--tier-color) 4%, var(--bg-white)));
  border: 1px solid color-mix(in srgb, var(--tier-color) 20%, transparent);
  text-align: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
}

.dash-user-tier-badge .tier-icon {
  font-size: 1.3rem;
  line-height: 1;
}

.dash-user-tier-badge .tier-name {
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--tier-color);
  text-transform: uppercase;
  letter-spacing: 0.2px;
  margin-top: 1px;
}

.dash-user-tier-badge .tier-pts {
  font-size: 0.58rem;
  color: var(--text-secondary);
  font-weight: 600;
  margin-top: -1px;
}

/* Auction Ban Warning */
.auction-ban-warning {
  background: linear-gradient(135deg, #fef2f2, #fee2e2);
  border: 1.5px solid #fca5a5;
  border-radius: 8px;
  padding: 0.65rem 1rem;
  margin: 0.5rem 0;
  font-size: 0.85rem;
  font-weight: 600;
  color: #991b1b;
  text-align: center;
  animation: banPulse 2s ease-in-out infinite;
}

@keyframes banPulse {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.85;
  }
}

/* Point History */
.dash-point-history {
  display: none;
  margin-top: 0.75rem;
  border-top: 1px solid var(--border);
  padding-top: 0.75rem;
}

.dash-point-history h4 {
  margin: 0 0 0.5rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-primary);
}

.dash-point-history-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.point-history-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.45rem 0.5rem;
  border-bottom: 1px solid color-mix(in srgb, var(--border) 50%, transparent);
  transition: background 0.15s;
}

.point-history-item:last-child {
  border-bottom: none;
}

.point-history-item:hover {
  background: var(--bg-page);
  border-radius: 4px;
}

.point-history-info {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.point-history-type {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-primary);
}

.point-history-date {
  font-size: 0.7rem;
  color: var(--text-muted);
}

.point-history-value {
  font-size: 0.9rem;
  font-weight: 700;
  min-width: 45px;
  text-align: right;
}

.point-history-value.point-positive {
  color: #16a34a;
}

.point-history-value.point-negative {
  color: #ef4444;
}

.point-history-empty {
  font-size: 0.82rem;
  color: var(--text-muted);
  text-align: center;
  padding: 1rem 0;
}

/* Header Tier Badge */
.header-tier-badge-wrap {
  position: relative;
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  vertical-align: middle;
  margin-left: 0.45rem;
  cursor: help;
}

.header-progress-circle {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.header-progress-bg {
  fill: none;
  stroke: var(--border);
  stroke-width: 2.8;
}

.header-progress-fill {
  fill: none;
  stroke: var(--tier-color);
  stroke-width: 2.8;
  stroke-linecap: round;
  transition: stroke-dashoffset 0.6s ease;
}

.header-tier-badge-icon {
  font-size: 1.15rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
}

/* Sections */
.dashboard-section {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  border-bottom: 2px solid var(--border);
  padding-bottom: 0.5rem;
}

.section-header h2 {
  margin: 0;
  font-size: 1.4rem;
  font-weight: 700;
}

.section-link-btn {
  background: none;
  border: none;
  color: var(--accent);
  font-weight: 600;
  font-size: 0.9rem;
  padding: 0;
}

.section-link-btn:hover {
  color: var(--accent-hover);
  text-decoration: underline;
}

.dashboard-loading {
  text-align: center;
  padding: 3rem;
  color: var(--text-secondary);
  font-style: italic;
}

/* Sets Scroll list */
.sets-scroll-container {
  overflow-x: auto;
  padding-bottom: 0.5rem;
}

.sets-scroll-container::-webkit-scrollbar {
  height: 6px;
}

.sets-scroll-container::-webkit-scrollbar-thumb {
  background-color: var(--border-card);
  border-radius: 3px;
}

.sets-scroll-track {
  display: flex;
  gap: 1.25rem;
}

.set-pill-card {
  flex: 0 0 160px;
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.25rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}

.set-pill-card:hover {
  border-color: var(--accent);
  transform: translateY(-3px);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.05);
}

.set-icon-wrap {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: #f8fafc;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  border: 1px solid var(--border);
}

.set-pill-card h4 {
  margin: 0;
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.3;
  color: var(--text-primary);
}

.set-pill-card span {
  font-size: 0.75rem;
  color: var(--text-secondary);
  background: var(--bg-page);
  padding: 2px 6px;
  border-radius: 4px;
}

/* Last Visited Scroll */
.last-visited-scroll {
  overflow-x: auto;
  padding-bottom: 0.5rem;
}

.last-visited-scroll::-webkit-scrollbar {
  height: 6px;
}

.last-visited-scroll::-webkit-scrollbar-thumb {
  background-color: var(--border-card);
  border-radius: 3px;
}

.last-visited-track {
  display: flex;
  gap: 1rem;
  padding: 0.25rem 0.1rem;
}

.last-visited-card {
  flex: 0 0 145px;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  background: var(--bg-white);
  border: 1px solid var(--border-card);
  border-radius: 10px;
  padding: 0.9rem 0.75rem 0.75rem;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
  position: relative;
  overflow: hidden;
}

.last-visited-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
  border-color: var(--accent);
}

.last-visited-img-wrap {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 90px;
  border-radius: 6px;
  overflow: hidden;
  background: var(--bg-page);
}

.last-visited-img-wrap .card-image {
  width: 62px;
  height: 88px;
  object-fit: cover;
  border-radius: 4px;
}

.last-visited-img-wrap .card-image.placeholder {
  width: 62px;
  height: 88px;
  font-size: 0.45rem;
}

.last-visited-name {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.25;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.last-visited-meta {
  font-size: 0.68rem;
  color: var(--text-secondary);
  line-height: 1.3;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.last-visited-price {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--accent);
  margin-top: auto;
}

.last-visited-time {
  position: absolute;
  top: 0.4rem;
  right: 0.5rem;
  font-size: 0.6rem;
  color: var(--text-muted);
  background: var(--bg-page);
  padding: 1px 4px;
  border-radius: 4px;
}

@media (max-width: 768px) {
  .dashboard-hero {
    grid-template-columns: 1fr;
    padding: 1.75rem;
  }

  .dashboard-hero-content h1 {
    font-size: 2rem;
  }

  .dashboard-hero-stats {
    flex-direction: row;
    gap: 1.5rem;
  }

  .dashboard-personalized {
    flex-direction: column;
    align-items: stretch;
    gap: 1.5rem;
  }

  .dash-user-stats-grid {
    justify-content: space-around;
  }
}

@media (max-width: 480px) {
  .dashboard-hero-stats {
    flex-direction: column;
    gap: 1.25rem;
  }
}

/* Language Switcher */
.lang-switch {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: var(--text-secondary);
  background: var(--bg-page);
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
}

.lang-btn {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.15s ease, opacity 0.15s ease;
}

.lang-btn:hover {
  transform: scale(1.1);
}

.lang-btn:active {
  transform: scale(0.95);
}

.lang-btn.active {
  opacity: 1;
}

.flag-svg {
  width: 20px;
  height: 20px;
  display: block;
  pointer-events: none;
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}

.lang-separator {
  color: var(--border-card);
  font-size: 0.75rem;
  opacity: 0.6;
}

@media (max-width: 540px) {
  .lang-switch {
    margin-left: 0;
  }
}

/* Custom Searchable Select Dropdown */
.searchable-select-wrap {
  position: relative;
  width: 100%;
}

/* Visually hide original select, but keep it focusable & accessible for HTML5 validation */
.searchable-select-wrap select {
  position: absolute !important;
  top: 0;
  left: 0;
  width: 100% !important;
  height: 100% !important;
  opacity: 0 !important;
  pointer-events: none !important;
  z-index: -1 !important;
}

.searchable-select-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.65rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 0.9rem;
  background-color: var(--bg-white);
  color: var(--text-primary);
  cursor: pointer;
  text-align: left;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  user-select: none;
}

.searchable-select-trigger:focus-visible {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(45, 80, 255, 0.15);
}

.searchable-select-trigger:disabled {
  background-color: var(--bg-page);
  color: var(--text-secondary);
  cursor: not-allowed;
  border-color: var(--border-card);
}

.searchable-select-trigger::after {
  content: "";
  display: inline-block;
  width: 0.5rem;
  height: 0.5rem;
  border-right: 2px solid var(--text-secondary);
  border-bottom: 2px solid var(--text-secondary);
  transform: rotate(45deg);
  margin-top: -2px;
  transition: transform 0.2s ease;
}

.searchable-select-wrap.open .searchable-select-trigger::after {
  transform: rotate(-135deg);
  margin-top: 4px;
}

.searchable-select-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 1000;
  margin-top: 0.35rem;
  background-color: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: var(--shadow-lg), 0 10px 25px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  display: none;
  flex-direction: column;
  animation: dropdownFadeIn 0.15s ease-out;
}

.searchable-select-wrap.open .searchable-select-dropdown {
  display: flex;
}

@keyframes dropdownFadeIn {
  from {
    opacity: 0;
    transform: translateY(-5px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.searchable-select-search-wrap {
  padding: 0.5rem 0.75rem;
  border-bottom: 1px solid var(--border);
  background-color: var(--bg-page);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.searchable-select-search-wrap svg {
  width: 1rem;
  height: 1rem;
  fill: var(--text-secondary);
}

.searchable-select-search-input {
  width: 100%;
  border: none;
  background: transparent;
  font-size: 0.85rem;
  padding: 0.25rem 0;
  color: var(--text-primary);
}

.searchable-select-search-input:focus {
  outline: none;
}

.searchable-select-options {
  max-height: 220px;
  overflow-y: auto;
  padding: 0.25rem 0;
}

/* Scrollbar styling */
.searchable-select-options::-webkit-scrollbar {
  width: 6px;
}

.searchable-select-options::-webkit-scrollbar-track {
  background: transparent;
}

.searchable-select-options::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 3px;
}

.searchable-select-options::-webkit-scrollbar-thumb:hover {
  background: var(--text-secondary);
}

.searchable-select-option {
  padding: 0.6rem 0.85rem;
  font-size: 0.85rem;
  color: var(--text-primary);
  cursor: pointer;
  transition: background-color 0.1s ease;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.searchable-select-option:hover,
.searchable-select-option.highlighted {
  background-color: rgba(45, 80, 255, 0.06);
}

.searchable-select-option.selected {
  background-color: rgba(45, 80, 255, 0.08);
  font-weight: 600;
  color: var(--accent);
}

.searchable-select-option-meta {
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.searchable-select-no-results {
  padding: 1rem;
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

/* Loading state for card elements when fetching detail modal */
.product-card.is-loading,
.rec-card.is-loading,
.last-visited-card.is-loading {
  position: relative;
  pointer-events: none !important;
  opacity: 0.7;
}

.product-card.is-loading::after,
.rec-card.is-loading::after,
.last-visited-card.is-loading::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 28px;
  height: 28px;
  margin-top: -14px;
  margin-left: -14px;
  border: 3px solid rgba(0, 0, 0, 0.1);
  border-top-color: var(--accent, #3b82f6);
  border-radius: 50%;
  animation: card-spinner 0.6s linear infinite;
  z-index: 10;
}

@keyframes card-spinner {
  to {
    transform: rotate(360deg);
  }
}

/* Zoom & Pan controls for detail card image */
.detail-image-panel {
  overflow: hidden !important;
  /* Ensure zoomed image doesn't bleed out */
}

.detail-card-image.card-image {
  transition: transform 0.15s ease-out;
  transform-origin: center center;
  user-select: none;
  -webkit-user-drag: none;
}

.detail-card-image.card-image.is-zoomed {
  transition: none !important;
  /* Dragging should be instantaneous/lag-free */
}

.detail-zoom-controls {
  position: absolute;
  bottom: 0.75rem;
  right: 0.75rem;
  display: flex;
  gap: 0.35rem;
  z-index: 10;
}

.detail-zoom-btn {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  color: var(--text-primary);
  font-size: 1rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.1s ease, box-shadow 0.15s ease;
  user-select: none;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.detail-zoom-btn.zoom-reset {
  width: auto;
  padding: 0 0.6rem;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
}

.detail-zoom-btn:hover {
  background: #ffffff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
  transform: translateY(-1px);
}

.detail-zoom-btn:active {
  transform: translateY(0) scale(0.95);
}

/* Real Image Badge Style */
.real-image-badge {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  background: rgba(16, 185, 129, 0.9);
  /* Premium Emerald Green */
  color: #ffffff;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  padding: 0.25rem 0.55rem;
  border-radius: 4px;
  letter-spacing: 0.05em;
  z-index: 5;
  pointer-events: none;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
  line-height: 1.1;
}

/* ══════════════════════════════════════════════════════
   CHARTS / GRAFIK SECTION
   ══════════════════════════════════════════════════════ */

#charts-section {
  padding-top: 1rem;
}

/* ── Hero Header ─────────────────────────────────────── */
.charts-header {
  margin-bottom: 1.5rem;
}

.charts-hero {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.25rem 1.5rem;
  background: linear-gradient(135deg, #0a1628 0%, #111e40 50%, #0d2745 100%);
  border-radius: 10px;
  position: relative;
  overflow: hidden;
}

.charts-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 80% 50%, rgba(45, 80, 255, 0.18) 0%, transparent 60%);
  pointer-events: none;
}

.charts-hero-icon {
  width: 52px;
  height: 52px;
  background: rgba(45, 80, 255, 0.18);
  border: 1px solid rgba(45, 80, 255, 0.35);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: #5eb8ff;
}

.charts-hero-icon svg {
  width: 26px;
  height: 26px;
}

.charts-hero-title {
  margin: 0 0 0.2rem;
  font-size: 1.4rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.02em;
}

.charts-hero-sub {
  margin: 0;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.55);
}

/* ── Controls Bar ────────────────────────────────────── */
.charts-controls-bar {
  display: flex;
  align-items: flex-end;
  gap: 1.5rem;
  flex-wrap: wrap;
  padding: 1.25rem 1.5rem;
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: 8px;
  margin-bottom: 1.25rem;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
}

.charts-control-group {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  flex: 1;
  min-width: 200px;
}

.charts-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
}

.charts-select-wrap {
  position: relative;
}

.charts-select {
  width: 100%;
  appearance: none;
  border: 1.5px solid var(--border);
  border-radius: 6px;
  padding: 0.6rem 2.5rem 0.6rem 0.85rem;
  font-size: 0.9rem;
  font-family: var(--font);
  background: var(--bg-white);
  color: var(--text-primary);
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.charts-select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(45, 80, 255, 0.1);
}

.charts-select-arrow {
  position: absolute;
  right: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  fill: var(--text-muted);
  pointer-events: none;
}

/* ── Custom Searchable Select ────────────────────────── */
.charts-select-searchable-wrap {
  position: relative;
  width: 100%;
}

.searchable-select-control {
  position: relative;
  width: 100%;
}

.searchable-select-input {
  width: 100%;
  box-sizing: border-box;
  text-overflow: ellipsis;
  cursor: text !important;
}

.searchable-select-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 100;
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: 6px;
  margin-top: 4px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
  max-height: 260px;
  overflow-y: auto;
}

.searchable-select-item {
  padding: 0.65rem 0.85rem;
  font-size: 0.85rem;
  color: var(--text-primary);
  cursor: pointer;
  transition: background 0.1s ease, color 0.1s ease;
  border-bottom: 1px solid rgba(0, 0, 0, 0.02);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.searchable-select-item:last-child {
  border-bottom: none;
}

.searchable-select-item:hover,
.searchable-select-item.highlighted {
  background: rgba(45, 80, 255, 0.05);
  color: var(--accent);
}

.searchable-select-item.selected {
  background: var(--accent);
  color: #fff;
}

.searchable-select-no-results {
  padding: 0.85rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  text-align: center;
}

.charts-range-group {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.charts-range-pills {
  display: flex;
  gap: 0.35rem;
}

.charts-range-pill {
  border: 1.5px solid var(--border);
  background: var(--bg-white);
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 600;
  font-family: var(--font);
  padding: 0.55rem 1rem;
  cursor: pointer;
  color: var(--text-secondary);
  transition: all 0.15s ease;
}

.charts-range-pill:hover:not(.active) {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(45, 80, 255, 0.04);
}

.charts-range-pill.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  box-shadow: 0 2px 8px rgba(45, 80, 255, 0.3);
}

/* ── Card Preview Strip ──────────────────────────────── */
.charts-card-preview {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.25rem;
  background: linear-gradient(90deg, rgba(45, 80, 255, 0.04) 0%, transparent 100%);
  border: 1px solid rgba(45, 80, 255, 0.12);
  border-radius: 8px;
  margin-bottom: 1.25rem;
}

.charts-card-img-wrap {
  flex-shrink: 0;
}

.charts-card-thumb {
  width: 48px !important;
  height: 68px !important;
  object-fit: cover;
  border-radius: 4px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.charts-card-name {
  margin: 0 0 0.2rem;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
}

.charts-card-meta {
  margin: 0;
  font-size: 0.8rem;
  color: var(--text-secondary);
}

/* ── Main Area Layout ────────────────────────────────── */
.charts-main-area {
  display: grid;
  grid-template-columns: 1fr 220px;
  gap: 1.25rem;
  align-items: start;
}

@media (max-width: 900px) {
  .charts-main-area {
    grid-template-columns: 1fr;
  }
}

/* ── Chart Wrap (left column) ───────────────────────── */
.charts-chart-wrap {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  min-height: 360px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* Empty State */
.charts-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3rem 2rem;
  gap: 0.75rem;
  text-align: center;
}

.charts-empty-icon {
  font-size: 3rem;
  line-height: 1;
  opacity: 0.6;
}

.charts-empty-msg {
  margin: 0;
  font-size: 0.95rem;
  color: var(--text-secondary);
  max-width: 320px;
}

/* Loading Spinner */
.charts-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3rem 2rem;
  gap: 1rem;
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.charts-spinner {
  width: 36px;
  height: 36px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: charts-spin 0.8s linear infinite;
}

@keyframes charts-spin {
  to {
    transform: rotate(360deg);
  }
}

/* Plot Area */
.charts-plot {
  display: flex;
  flex-direction: column;
  padding: 1.25rem;
}

.charts-plot-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.charts-plot-title {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
}

.charts-data-badge {
  background: rgba(45, 80, 255, 0.08);
  color: var(--accent);
  border: 1px solid rgba(45, 80, 255, 0.2);
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.2rem 0.6rem;
  white-space: nowrap;
}

.charts-chart-box {
  height: 320px !important;
  border-radius: 8px;
  background: linear-gradient(180deg, #fafbff 0%, #ffffff 100%);
  border: 1px solid #eef0f8;
}

/* No data fallback inside chart box */
.charts-no-data {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  gap: 0.65rem;
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.charts-no-data-icon {
  font-size: 2.5rem;
  opacity: 0.5;
}

/* Data dots on the trend line */
.charts-data-dot {
  fill: var(--accent, #2d50ff);
  stroke: #fff;
  stroke-width: 2px;
  transition: r 0.1s ease;
}

/* Quantity label in tooltip */
.charts-tooltip-qty {
  font-size: 0.68rem;
  color: var(--text-muted);
  margin-top: 0.1rem;
}

/* ── Sidebar (right column) ─────────────────────────── */
.charts-sidebar {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.charts-stat-card {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.85rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  transition: box-shadow 0.15s ease;
}

.charts-stat-card:hover {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.07);
}

.charts-stat-label {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

.charts-stat-value {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

.charts-stat-low {
  color: var(--market-green);
}

.charts-stat-high {
  color: #dc2626;
}

/* ── Dashboard Marketplace Small Cards layout ── */
#dashboard-fresh-grid {
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 0.75rem;
}

.product-card-sm {
  display: flex;
  flex-direction: column;
  background: var(--bg-white);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-card);
  padding: 0.55rem;
  min-height: 190px;
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  transition: transform 0.2s, box-shadow 0.2s;
  position: relative;
}

.product-card-sm:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.product-card-sm .card-image-wrap-sm {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  background: #f9fafb;
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 0.45rem;
}

.product-card-sm .card-image-wrap-sm img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.product-card-sm .card-title-sm {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0 0 0.25rem 0;
  line-height: 1.25;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  height: 2.5em;
}

.product-card-sm .card-footer-sm {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  gap: 0.25rem;
}

.product-card-sm .card-price-sm {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--accent);
  margin: 0;
}

.product-card-sm .cart-btn-sm {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: none;
  background: var(--accent-gradient);
  color: #fff;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
}

.product-card-sm .cart-btn-sm:hover {
  background: var(--accent-gradient-hover);
  transform: scale(1.05);
}

.product-card-sm .cart-btn-sm:active {
  transform: scale(0.95);
}

.product-card-sm .cart-btn-sm.edit-btn-sm {
  background: #4b5563;
}

.product-card-sm .cart-btn-sm.edit-btn-sm:hover {
  background: #374151;
}

.product-card-sm .sold-out-badge-sm {
  position: absolute;
  top: 4px;
  left: 4px;
  background-color: #ef4444;
  color: #ffffff;
  padding: 2px 6px;
  font-size: 0.6rem;
  font-weight: bold;
  border-radius: 3px;
  z-index: 2;
  text-transform: uppercase;
}

/* ── Recently Viewed Card compact styling overrides ── */
.product-card-sm.last-visited-card {
  flex: 0 0 145px;
  min-height: 190px;
  padding: 0.55rem;
}

.product-card-sm .card-image-wrap-sm .last-visited-time {
  position: absolute;
  top: 4px;
  left: 4px;
  right: auto;
  font-size: 0.55rem;
  font-weight: 500;
  color: var(--text-muted);
  background: var(--bg-page);
  border: 1px solid var(--border-card);
  padding: 1px 4px;
  border-radius: 4px;
  z-index: 2;
}

.product-card-sm .card-image-wrap-sm .sold-out-badge-sm~.last-visited-time {
  top: 24px;
}

/* ── List View overrides for vertical product-cards ── */
.product-grid.view-list .product-card {
  flex-direction: row !important;
  min-height: auto !important;
  padding: 0.65rem !important;
  gap: 0.65rem !important;
}

.product-grid.view-list .product-card .card-image-wrap {
  width: 96px !important;
  aspect-ratio: auto !important;
  height: 134px !important;
  margin-bottom: 0 !important;
  flex-shrink: 0 !important;
}

.product-grid.view-list .product-card .card-image-wrap img {
  width: 96px !important;
  height: 134px !important;
  object-fit: cover !important;
}

.product-grid.view-list .product-card .card-title {
  height: auto !important;
  font-size: 0.95rem !important;
  font-weight: 700 !important;
  -webkit-line-clamp: unset !important;
  overflow: visible !important;
}

.product-grid.view-list .product-card .card-footer {
  margin-top: auto !important;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

.charts-stat-value {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

.charts-stat-low {
  color: var(--market-green);
}

.charts-stat-high {
  color: #dc2626;
}

/* ── Dashboard Marketplace Small Cards layout ── */
#dashboard-fresh-grid {
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 0.75rem;
}

.product-card-sm {
  display: flex;
  flex-direction: column;
  background: var(--bg-white);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-card);
  padding: 0.55rem;
  min-height: 190px;
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  transition: transform 0.2s, box-shadow 0.2s;
  position: relative;
}

.product-card-sm:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.product-card-sm .card-image-wrap-sm {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  background: #f9fafb;
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 0.45rem;
}

.product-card-sm .card-image-wrap-sm img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.product-card-sm .card-title-sm {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0 0 0.25rem 0;
  line-height: 1.25;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  height: 2.5em;
}

.product-card-sm .card-footer-sm {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  gap: 0.25rem;
}

.product-card-sm .card-price-sm {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--accent);
  margin: 0;
}

.product-card-sm .cart-btn-sm {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: none;
  background: var(--accent-gradient);
  color: #fff;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
}

.product-card-sm .cart-btn-sm:hover {
  background: var(--accent-gradient-hover);
  transform: scale(1.05);
}

.product-card-sm .cart-btn-sm:active {
  transform: scale(0.95);
}

.product-card-sm .cart-btn-sm.edit-btn-sm {
  background: #4b5563;
}

.product-card-sm .cart-btn-sm.edit-btn-sm:hover {
  background: #374151;
}

.product-card-sm .sold-out-badge-sm {
  position: absolute;
  top: 4px;
  left: 4px;
  background-color: #ef4444;
  color: #ffffff;
  padding: 2px 6px;
  font-size: 0.6rem;
  font-weight: bold;
  border-radius: 3px;
  z-index: 2;
  text-transform: uppercase;
}

/* ── Recently Viewed Card compact styling overrides ── */
.product-card-sm.last-visited-card {
  flex: 0 0 145px;
  min-height: 190px;
  padding: 0.55rem;
}

.product-card-sm .card-image-wrap-sm .last-visited-time {
  position: absolute;
  top: 4px;
  left: 4px;
  right: auto;
  font-size: 0.55rem;
  font-weight: 500;
  color: var(--text-muted);
  background: var(--bg-page);
  border: 1px solid var(--border-card);
  padding: 1px 4px;
  border-radius: 4px;
  z-index: 2;
}

.product-card-sm .card-image-wrap-sm .sold-out-badge-sm~.last-visited-time {
  top: 24px;
}

/* ── List View overrides for vertical product-cards ── */
.product-grid.view-list .product-card {
  flex-direction: row !important;
  min-height: auto !important;
  padding: 0.65rem !important;
  gap: 0.65rem !important;
}

.product-grid.view-list .product-card .card-image-wrap {
  width: 96px !important;
  aspect-ratio: auto !important;
  height: 134px !important;
  margin-bottom: 0 !important;
  flex-shrink: 0 !important;
}

.product-grid.view-list .product-card .card-image-wrap img {
  width: 96px !important;
  height: 134px !important;
  object-fit: cover !important;
}

.product-grid.view-list .product-card .card-title {
  height: auto !important;
  font-size: 0.95rem !important;
  font-weight: 700 !important;
  -webkit-line-clamp: unset !important;
  overflow: visible !important;
}

.product-grid.view-list .product-card .card-footer {
  margin-top: auto !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: space-between !important;
}

.product-grid.view-list .product-card .card-price {
  font-size: 1.15rem !important;
  font-weight: 700 !important;
}

/* Hide marketplace filter bar, but keep auction filter bar */
.filter-bar-wrap:not(#auction-filter-bar-wrap) {
  display: none !important;
}

/* ── Filter Drawer overlay & side-panel drawer ── */
.filter-drawer-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  z-index: 9999;
  display: flex;
  justify-content: flex-end;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.filter-drawer-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.filter-drawer {
  width: 400px;
  height: 100%;
  background: #121212;
  color: #ffffff;
  display: flex;
  flex-direction: column;
  box-shadow: -5px 0 25px rgba(0, 0, 0, 0.5);
  transform: translateX(100%);
  transition: transform 0.3s ease-in-out;
}

.filter-drawer.active {
  transform: translateX(0);
}

@media (max-width: 480px) {
  .filter-drawer {
    width: 100%;
  }
}

.filter-drawer-header {
  padding: 1.25rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #262626;
  background: #1c1c1c;
}

.drawer-close-btn {
  background: #262626;
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  cursor: pointer;
  transition: background 0.2s;
}

.drawer-close-btn:hover {
  background: #404040;
}

.drawer-title {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 700;
  color: #fff;
}

.drawer-reset-btn {
  background: transparent;
  border: none;
  color: #a3a3a3;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  padding: 0.25rem 0.5rem;
  transition: color 0.2s;
}

.drawer-reset-btn:hover {
  color: #fff;
}

.filter-drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 1.5rem;
}

.drawer-section {
  border-bottom: 1px solid #262626;
  padding-bottom: 1.25rem;
  margin-bottom: 1.25rem;
}

.drawer-section-title {
  margin: 0 0 0.85rem 0;
  font-size: 1.05rem;
  font-weight: 600;
  color: #e5e5e5;
}

.drawer-options-list {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  padding: 0.25rem 0;
}

.drawer-radio-label,
.drawer-checkbox-label {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-size: 0.925rem;
  color: #d4d4d4;
  cursor: pointer;
  user-select: none;
}

.drawer-radio-label input[type="radio"],
.drawer-checkbox-label input[type="checkbox"] {
  accent-color: #3b82f6;
  width: 16px;
  height: 16px;
  cursor: pointer;
}

/* Accordion styles */
.drawer-accordion {
  padding-bottom: 0.5rem;
}

.drawer-accordion-btn {
  width: 100%;
  background: transparent;
  border: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: #fff;
  font-size: 1.05rem;
  font-weight: 600;
  cursor: pointer;
  padding: 0.75rem 0;
  text-align: left;
}

.drawer-accordion-btn .chevron-icon {
  color: #a3a3a3;
  transition: transform 0.2s;
}

.drawer-accordion-btn .chevron-icon.rotated {
  transform: rotate(90deg);
}

.drawer-accordion-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.25s ease-out;
  padding-left: 0.25rem;
}

.drawer-accordion-content.expanded {
  max-height: 250px;
  overflow-y: auto;
  margin-top: 0.5rem;
  padding-bottom: 0.5rem;
}

/* Toggle switch stylings */
.drawer-toggle-section {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0 1.25rem;
}

.drawer-toggle-label {
  font-size: 1.05rem;
  font-weight: 600;
  color: #e5e5e5;
}

.drawer-switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
}

.drawer-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.drawer-switch-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #3f3f46;
  transition: .2s;
  border-radius: 24px;
}

.drawer-switch-slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: .2s;
  border-radius: 50%;
}

.drawer-switch input:checked+.drawer-switch-slider {
  background-color: #3b82f6;
}

.drawer-switch input:checked+.drawer-switch-slider:before {
  transform: translateX(20px);
}

/* Footer & Action button */
.filter-drawer-footer {
  padding: 1.25rem 1.5rem;
  border-top: 1px solid #262626;
  background: #1c1c1c;
}

.drawer-apply-btn {
  width: 100%;
  padding: 0.85rem;
  border-radius: 24px;
  background: #3b82f6;
  color: #fff;
  border: none;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
}

.drawer-apply-btn:hover {
  background: #2563eb;
}

.drawer-apply-btn:active {
  transform: scale(0.98);
}

.drawer-empty-msg {
  color: #737373;
  font-size: 0.875rem;
  margin: 0.5rem 0;
  font-style: italic;
}

/* Sort & Filter Trigger button in toolbar */
.filter-trigger-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 1rem;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: var(--bg-white);
  color: var(--text-primary);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.filter-trigger-btn:hover {
  background: var(--bg-page);
  border-color: var(--text-secondary);
}

/* Offer Feature Styles */
.offer-modal-card-info {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  background: #f9fafb;
  border-radius: 8px;
  margin-bottom: 1.25rem;
  border: 1px solid #e5e7eb;
}

.offer-modal-card-info img {
  width: 60px;
  height: auto;
  border-radius: 4px;
  object-fit: contain;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
}

.offer-modal-card-details {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.offer-modal-card-name {
  font-weight: 700;
  color: #1f2937;
  font-size: 0.95rem;
}

.offer-modal-card-price {
  color: #6b7280;
  font-size: 0.85rem;
}

.offer-tabs {
  display: flex;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid #e5e7eb;
  background: #f9fafb;
}

.offer-tabs button {
  flex: 1;
  text-align: center;
  cursor: pointer;
}

.offer-card {
  display: flex;
  flex-direction: column;
  padding: 1rem;
  border-radius: 8px;
  border: 1px solid #e5e7eb;
  background: #fff;
  margin-bottom: 1rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  transition: all 0.2s;
}

.offer-card:hover {
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.08);
  border-color: #d1d5db;
}

.offer-card-main {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
}

.offer-card-img {
  width: 50px;
  height: auto;
  border-radius: 4px;
  object-fit: contain;
}

.offer-card-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.offer-card-title {
  font-weight: 600;
  color: #111827;
  font-size: 0.9rem;
}

.offer-card-meta {
  font-size: 0.75rem;
  color: #6b7280;
}

.offer-price-details {
  margin-top: 0.5rem;
  font-size: 0.85rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  padding: 0.5rem 0.75rem;
  background: #f9fafb;
  border-radius: 6px;
}

.offer-price-label {
  color: #6b7280;
}

.offer-price-val {
  font-weight: 700;
  color: #111827;
}

.offer-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.5rem;
  border-radius: 9999px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  width: fit-content;
}

.offer-badge.status-0 {
  background: #fef3c7;
  color: #d97706;
}

.offer-badge.status-1 {
  background: #d1fae5;
  color: #059669;
}

.offer-badge.status-2 {
  background: #fee2e2;
  color: #dc2626;
}

.offer-badge.status-3 {
  background: #dbeafe;
  color: #2563eb;
}

.offer-badge.status-4 {
  background: #f3f4f6;
  color: #4b5563;
}

.offer-badge.status-5 {
  background: #e0f2fe;
  color: #0284c7;
}

.offer-badge.status-6 {
  background: #f3f4f6;
  color: #9ca3af;
}

.offer-msg-box {
  font-size: 0.8rem;
  color: #4b5563;
  background: #f3f4f6;
  padding: 0.5rem;
  border-radius: 6px;
  margin-top: 0.5rem;
  border-left: 3px solid #d1d5db;
  word-break: break-word;
}

.offer-msg-box.counter-msg {
  border-left-color: #3b82f6;
  background: #eff6ff;
}

.offer-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.offer-action-btn {
  flex: 1;
  padding: 0.4rem 0.75rem;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
  border: 1px solid transparent;
  transition: all 0.2s;
  user-select: none;
}

.offer-action-btn.accept {
  background: #10b981;
  color: #fff;
}

.offer-action-btn.accept:hover {
  background: #059669;
}

.offer-action-btn.decline {
  background: #ef4444;
  color: #fff;
}

.offer-action-btn.decline:hover {
  background: #dc2626;
}

.offer-action-btn.counter {
  background: #3b82f6;
  color: #fff;
}

.offer-action-btn.counter:hover {
  background: #2563eb;
}

.offer-action-btn.cancel {
  background: #6b7280;
  color: #fff;
}

.offer-action-btn.cancel:hover {
  background: #555d6b;
}

.offer-action-btn.checkout {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  font-weight: 700;
}

.offer-action-btn.checkout:hover {
  background: linear-gradient(135deg, #d97706, #b45309);
}

.offer-counter-form {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 0.75rem;
  padding: 0.75rem;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  background: #f9fafb;
}

.offer-counter-form input {
  padding: 0.35rem 0.5rem;
  border: 1px solid #d1d5db;
  border-radius: 4px;
  font-size: 0.85rem;
}

.offer-counter-form textarea {
  padding: 0.35rem 0.5rem;
  border: 1px solid #d1d5db;
  border-radius: 4px;
  font-size: 0.85rem;
  resize: none;
}

.offer-counter-form-buttons {
  display: flex;
  gap: 0.5rem;
}

/* ── Unified Noteworthy Close Buttons ── */
.detail-close,
.auth-close,
.cart-drawer-close,
.checkout-close,
.profile-close {
  background: #f3f4f6 !important;
  color: #1f2937 !important;
  border-radius: 10px !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 1.4rem !important;
  font-weight: 700 !important;
  line-height: 1 !important;
  border: 1px solid rgba(0, 0, 0, 0.05) !important;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.detail-close {
  width: 36px !important;
  height: 36px !important;
  top: 0.2rem !important;
  right: 0.2rem !important;
}

.auth-close {
  width: 32px !important;
  height: 32px !important;
  top: 0.75rem !important;
  right: 0.75rem !important;
}

.cart-drawer-close {
  width: 32px !important;
  height: 32px !important;
}

.checkout-close {
  width: 36px !important;
  height: 36px !important;
  top: 1rem !important;
  right: 1rem !important;
}

.profile-close {
  width: 36px !important;
  height: 36px !important;
  top: 0.2rem !important;
  right: 0.2rem !important;
}

.detail-close:hover,
.auth-close:hover,
.cart-drawer-close:hover,
.checkout-close:hover,
.profile-close:hover {
  background: #ef4444 !important;
  color: #ffffff !important;
  border-color: #ef4444 !important;
  transform: scale(1.1) !important;
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.25) !important;
}

/* ── Feeds Tab Styles ── */
.feed-card {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.25rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.feed-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.feed-card-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.feed-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--bg-page);
  color: var(--accent);
  font-weight: 700;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1.5px solid var(--border);
  overflow: hidden;
}

.feed-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.feed-user-info {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.feed-user-name {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text-primary);
}

.feed-action-text {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.feed-time {
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.feed-badge {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.25rem 0.6rem;
  border-radius: var(--radius-pill);
}

.feed-badge.listing {
  background: rgba(45, 80, 255, 0.08);
  color: var(--accent);
}

.feed-badge.auction {
  background: rgba(16, 185, 129, 0.08);
  color: #10b981;
}

.feed-body {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: var(--bg-page);
  padding: 0.75rem;
  border-radius: 8px;
  border: 1px solid var(--border-card);
}

.feed-card-img {
  width: 60px;
  height: 84px;
  object-fit: cover;
  border-radius: 4px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.feed-card-details {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.feed-card-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
}

.feed-card-meta {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.feed-card-price-row {
  display: flex;
  align-items: baseline;
  gap: 0.35rem;
  margin-top: 0.25rem;
}

.feed-price-label {
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.feed-price-value {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
}

.feed-btn {
  border: none;
  background: var(--accent);
  color: #fff;
  padding: 0.45rem 1rem;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.15s;
}

.feed-btn:hover {
  opacity: 0.9;
}

/* ── Feed Post Creator Styles ── */
.feed-create-card {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.25rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.feed-create-header {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}

.feed-create-header textarea {
  flex: 1;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.75rem;
  font-family: inherit;
  font-size: 0.9rem;
  resize: vertical;
  background: var(--bg-page);
  color: var(--text-primary);
  outline: none;
  transition: border-color 0.15s;
}

.feed-create-header textarea:focus {
  border-color: var(--accent);
}

.feed-create-footer {
  display: flex;
  justify-content: flex-end;
}

.feed-guest-prompt {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.5rem;
  text-align: center;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}

.feed-guest-prompt p {
  color: var(--text-secondary);
  font-size: 0.92rem;
  margin: 0;
}

/* User Post Content Styles */
.feed-post-content {
  font-size: 0.95rem;
  color: var(--text-primary);
  line-height: 1.5;
  white-space: pre-wrap;
  padding: 0.25rem 0.5rem;
}

.feed-badge.post {
  background: rgba(124, 58, 237, 0.08);
  color: #7c3aed;
}

/* Post Actions Row */
.feed-card-actions {
  display: flex;
  gap: 1.5rem;
  border-top: 1px solid var(--border);
  padding-top: 0.75rem;
  margin-top: 0.25rem;
}

.feed-action-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 0.82rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  cursor: pointer;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  transition: background 0.15s, color 0.15s;
}

.feed-action-btn:hover {
  background: var(--bg-page);
  color: var(--text-primary);
}

.feed-action-btn.active {
  color: var(--accent);
}

.feed-action-btn svg.action-icon {
  width: 16px;
  height: 16px;
}

/* ── Feeds Layout & Sidebar Styles ── */
.feeds-layout {
  display: flex;
  gap: 2rem;
  align-items: flex-start;
  width: 100%;
}

.feeds-sidebar {
  width: 220px;
  flex-shrink: 0;
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
}

.feeds-main-content {
  flex: 1;
  max-width: 800px;
}

.feeds-sidebar-title {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 0.05em;
  margin-bottom: 0.75rem;
  padding-left: 0.5rem;
}

.feeds-channel-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.feeds-channel-item {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.65rem 0.75rem;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-secondary);
  transition: background 0.15s, color 0.15s;
}

.feeds-channel-item:hover {
  background: var(--bg-page);
  color: var(--text-primary);
}

.feeds-channel-item.active {
  background: rgba(45, 80, 255, 0.08);
  color: var(--accent);
}

.channel-icon {
  font-size: 1.1rem;
}

/* Post Creator Category Dropdown */
.feed-create-selector-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.feed-channel-select {
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.35rem 0.5rem;
  font-family: inherit;
  font-size: 0.82rem;
  background: var(--bg-page);
  color: var(--text-primary);
  outline: none;
}

@media (max-width: 768px) {
  .feeds-layout {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 1.25rem !important;
  }

  .feeds-sidebar {
    width: 100% !important;
  }

  .feeds-channel-list {
    flex-direction: row !important;
    overflow-x: auto;
    padding-bottom: 0.25rem;
    scrollbar-width: none;
  }

  .feeds-channel-list::-webkit-scrollbar {
    display: none;
  }

  .feeds-channel-item {
    flex-shrink: 0;
  }
}