.points-mall,
.points-mall-admin {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.points-mall {
  box-sizing: border-box;
  width: 100%;
  max-width: 1200px;
  margin-inline: auto;
  padding-inline: 0;
}

.points-mall-admin {
  width: 100%;
}

.points-mall-hero,
.points-mall-admin-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  border: 1px solid hsl(var(--border));
  background:
    linear-gradient(135deg, hsl(var(--card)) 0%, hsl(var(--muted)) 100%),
    radial-gradient(circle at 85% 20%, rgba(20, 184, 166, 0.18), transparent 32%);
  border-radius: 0.75rem;
  padding: 1.25rem;
  margin-bottom: 1rem;
}

.points-mall-hero h1,
.points-mall-admin-header h1 {
  margin: 0;
  color: hsl(var(--foreground));
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  font-weight: 800;
  line-height: 1.05;
}

.points-mall-hero p,
.points-mall-admin-header p {
  margin: 0.45rem 0 0;
  max-width: 42rem;
  color: hsl(var(--muted-foreground));
}

.points-mall-kicker {
  color: hsl(var(--muted-foreground));
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.points-mall-hero-actions,
.points-mall-toolbar,
.points-mall-row,
.points-mall-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.points-mall-user-card {
  display: grid;
  min-width: 11rem;
  gap: 0.25rem;
  border: 1px solid hsl(var(--border));
  border-radius: 0.75rem;
  background: hsl(var(--background) / 0.78);
  padding: 0.75rem 0.9rem;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
}

.points-mall-user-card span {
  color: hsl(var(--muted-foreground));
  font-size: 0.72rem;
  font-weight: 700;
}

.points-mall-user-card strong {
  color: hsl(var(--foreground));
  font-size: 0.95rem;
  font-weight: 800;
  line-height: 1.2;
}

.points-mall-user-card em {
  color: #7c3aec;
  font-size: 1rem;
  font-style: normal;
  font-weight: 650;
}

.points-mall-toolbar {
  align-items: stretch;
}

.points-mall-tabs {
  display: flex;
  width: 100%;
  flex-direction: column;
  gap: 0;
}

.points-mall-tabs-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.points-mall-tabs-header .points-mall-toolbar {
  margin: 0;
  flex-shrink: 0;
}

.points-mall-tabs-list {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.125rem;
  width: fit-content;
  max-width: 100%;
  min-height: 3rem;
  border-radius: 0.5rem;
  background: hsl(var(--muted));
  padding: 0.1875rem;
  color: hsl(var(--muted-foreground));
  overflow-x: auto;
}

.points-mall-tab-trigger {
  position: relative;
  display: inline-flex;
  min-height: calc(3rem - 0.375rem);
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  gap: 0.375rem;
  border: 1px solid transparent;
  border-radius: 0.375rem;
  background: transparent;
  padding: 0.125rem 0.625rem;
  color: hsl(var(--foreground) / 0.6);
  font: inherit;
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1.25rem;
  white-space: nowrap;
  cursor: pointer;
  transition: color 0.15s ease, background-color 0.15s ease, box-shadow 0.15s ease;
}

.points-mall-tab-trigger:hover {
  color: hsl(var(--foreground));
}

.points-mall-tab-trigger.is-active {
  background: hsl(var(--background));
  color: hsl(var(--foreground));
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08);
}

.points-mall-tab-panel {
  width: 100%;
  min-width: 0;
  margin-top: 1rem;
}

.points-mall-toolbar > * {
  flex: 1;
  max-width: 18rem;
  min-height: 2.5rem;
}

.points-mall-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
}

@media (max-width: 1000px) {
  .points-mall-grid {
    grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
  }
}

.points-mall-card {
  overflow: hidden;
}

.points-mall-cover {
  width: 100%;
  aspect-ratio: 16 / 10;
  border-radius: 0.5rem;
  object-fit: cover;
}

.points-mall-image-placeholder,
.points-mall-image-preview {
  display: grid;
  place-items: center;
  width: 100%;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border: 1px solid hsl(var(--border));
  border-radius: 0.5rem;
  background:
    linear-gradient(135deg, hsl(var(--muted)) 0%, hsl(var(--card)) 54%, rgba(20, 184, 166, 0.14) 100%);
  color: hsl(var(--muted-foreground));
}

.points-mall-image-placeholder {
  gap: 0.25rem;
}

.points-mall-image-placeholder span {
  display: grid;
  place-items: center;
  width: 3rem;
  height: 3rem;
  border-radius: 999px;
  background: hsl(var(--foreground));
  color: hsl(var(--background));
  font-size: 1rem;
  font-weight: 900;
}

.points-mall-image-placeholder small {
  font-size: 0.75rem;
  font-weight: 700;
}

.points-mall-image-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.points-mall-product-footer,
.points-mall-order-item {
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 0.75rem;
}

.points-mall-price {
  color: hsl(var(--foreground));
  font-size: 1.5rem;
  font-weight: 800;
}

.points-mall-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.points-mall-address-layout,
.points-mall-admin-layout {
  display: grid;
  grid-template-columns: minmax(18rem, 0.8fr) minmax(0, 1.2fr);
  gap: 1rem;
}

.points-mall-form-grid,
.points-mall-admin-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem;
}

.points-mall-form-grid label,
.points-mall-admin-field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  color: hsl(var(--foreground));
  font-size: 0.875rem;
  font-weight: 600;
}

.points-mall-field-wide,
.points-mall-admin-form > textarea,
.points-mall-admin-form > button,
.points-mall-switches,
.points-mall-check,
.points-mall-admin-image-field {
  grid-column: 1 / -1;
}

.points-mall-admin-image-field {
  display: grid;
  grid-template-columns: minmax(8rem, 12rem) minmax(0, 1fr) auto;
  gap: 0.75rem;
  align-items: end;
}

.points-mall-admin-image-field > span {
  grid-column: 1 / -1;
  color: hsl(var(--foreground));
  font-size: 0.875rem;
  font-weight: 600;
}

.points-mall-admin-image-field .points-mall-image-preview,
.points-mall-admin-image-field .points-mall-image-placeholder {
  aspect-ratio: 16 / 10;
}

.points-mall-modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 1rem;
  background: rgba(15, 23, 42, 0.58);
}


/* Checkout dialog header */
.points-mall-checkout-header {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  margin-bottom: 1rem;
}

.points-mall-checkout-cover {
  width: 12rem;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-radius: 0.5rem;
  border: 1px solid hsl(var(--border));
  flex-shrink: 0;
}

.points-mall-image-placeholder--checkout {
  width: 12rem;
  aspect-ratio: 16 / 10;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-radius: 0.5rem;
  border: 1px solid hsl(var(--border));
  background: hsl(var(--muted) / 0.35);
  color: hsl(var(--muted-foreground));
  gap: 0.15rem;
}

.points-mall-image-placeholder--checkout span {
  font-size: 1.6rem;
  font-weight: 800;
  line-height: 1;
}

.points-mall-image-placeholder--checkout small {
  font-size: 0.6rem;
  font-weight: 600;
  text-transform: uppercase;
}

.points-mall-checkout-meta {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  min-width: 0;
  flex: 1;
}

.points-mall-checkout-title {
  font-size: 1.5rem;
  font-weight: 800;
  line-height: 1.25;
  margin: 0;
  color: hsl(var(--foreground));
}

.points-mall-checkout-desc {
  width: 100%;
  padding: 0.95rem 1rem;
  margin: 0 0 1rem 0;
  border: 1px solid hsl(var(--border));
  border-radius: 0.5rem;
  background: hsl(var(--muted) / 0.28);
  font-size: 0.95rem;
  color: hsl(var(--muted-foreground));
  line-height: 1.65;
  white-space: pre-wrap;
}

.points-mall-checkout-meta .points-mall-level-tag,
.points-mall-checkout-meta .points-mall-bypass-hint,
.points-mall-checkout-price {
  font-size: 0.95rem;
  line-height: 1.5;
  margin: 0;
}

.points-mall-checkout-meta .points-mall-level-tag {
  font-weight: 600;
  color: #d97706;
}

.points-mall-checkout-meta .points-mall-bypass-hint {
  font-weight: 600;
  color: #ef4444;
}

.points-mall-checkout-price {
  font-weight: 800;
  color: #7c3aec;
}

/* Exchange form frame */
.points-mall-checkout-frame {
  border: 1px solid hsl(var(--border));
  border-radius: 0.5rem;
  background: hsl(var(--card));
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 0;
}

.points-mall-checkout-hint {
  font-size: 0.95rem;
  color: hsl(var(--muted-foreground));
  margin: 0;
  line-height: 1.6;
}

@media (max-width: 760px) {
  .points-mall {
    padding-inline: 1rem;
  }

  .points-mall-checkout-header {
    flex-direction: column;
    align-items: center;
  }

  .points-mall-checkout-cover,
  .points-mall-image-placeholder--checkout {
    width: 6rem;
    aspect-ratio: 16 / 10;
  }

  .points-mall-checkout-meta {
    align-items: center;
    text-align: center;
  }

  .points-mall-checkout-title {
    font-size: 1.35rem;
  }

  .points-mall-detail-list p {
    grid-template-columns: 1fr;
    gap: 0.25rem;
  }
}

.points-mall-dialog {
  position: relative;
  width: min(42rem, 100%);
  max-height: min(42rem, 90vh);
  overflow: auto;
  border: 1px solid hsl(var(--border));
  border-radius: 0.75rem;
  background: hsl(var(--background));
  padding: 1.25rem;
  box-shadow: 0 24px 80px rgba(15, 23, 42, 0.28);
}

.points-mall-dialog-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 3rem;
  padding-right: 2.5rem;
}

.points-mall-dialog-close {
  position: absolute;
  top: 0.85rem;
  right: 0.85rem;
  z-index: 2;
  width: 2rem;
  height: 2rem;
  min-width: 2rem;
  border-color: hsl(var(--border));
  border-radius: 999px;
  background: hsl(var(--background));
  color: hsl(var(--foreground));
  padding: 0;
  font-size: 1.25rem;
  font-weight: 800;
  line-height: 1;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.14);
}

.points-mall-dialog-close:hover {
  background: hsl(var(--foreground));
  color: hsl(var(--background));
}

.points-mall-dialog-body,
.points-mall-detail-list,
.points-mall-admin-orders {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 1rem;
}

.points-mall-order-detail-header {
  display: grid;
  gap: 0.35rem;
  padding: 1rem;
  border: 1px solid hsl(var(--border));
  border-radius: 0.5rem;
  background: hsl(var(--muted) / 0.28);
  margin: 0 0 1rem;
}

.points-mall-order-detail-header span {
  color: hsl(var(--muted-foreground));
  font-size: 0.85rem;
  font-weight: 700;
}

.points-mall-order-detail-header strong {
  color: hsl(var(--foreground));
  font-size: 1.05rem;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.points-mall-detail-list {
  gap: 0.75rem;
  margin-top: 0;
}

.points-mall-detail-list p {
  display: grid;
  grid-template-columns: minmax(5.5rem, 7rem) minmax(0, 1fr);
  align-items: start;
  gap: 0.75rem;
  margin: 0;
  padding: 0.85rem 1rem;
  border: 1px solid hsl(var(--border));
  border-radius: 0.5rem;
  background: hsl(var(--card));
  font-size: 0.95rem;
  line-height: 1.6;
}

.points-mall-detail-list p > span:first-child {
  color: hsl(var(--muted-foreground));
  font-weight: 700;
}

.points-mall-detail-list strong,
.points-mall-detail-list p > span:not(:first-child),
.points-mall-detail-list code {
  color: hsl(var(--foreground));
  overflow-wrap: anywhere;
  font-weight: 650;
}

.points-mall-card-secret-wrapper {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  overflow-wrap: anywhere;
  min-width: 0;
}

.points-mall-copy-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 1.75rem;
  padding: 0 0.625rem;
  font-size: 0.75rem;
  font-weight: 500;
  line-height: 1;
  border: 1px solid hsl(var(--border));
  border-radius: calc(var(--radius) - 0.125rem);
  background: hsl(var(--background));
  color: hsl(var(--foreground));
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 0.15s, color 0.15s;
}

.points-mall-copy-btn:hover {
  background: hsl(var(--accent));
  color: hsl(var(--accent-foreground));
}

.points-mall-copy-btn:active {
  transform: scale(0.96);
}

.points-mall-dialog-footer {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid hsl(var(--border));
}


.points-mall-header-entry {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  border: 1px solid hsl(var(--border));
  border-radius: 999px;
  padding: 0.35rem 0.65rem;
  color: hsl(var(--foreground));
  font-size: 0.875rem;
  font-weight: 650;
  text-decoration: none;
}

.points-mall-header-entry__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 999px;
  background: hsl(var(--foreground));
  color: hsl(var(--background));
}

.points-mall-home-entry {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  border: 1px solid hsl(var(--border));
  border-radius: 0.75rem;
  padding: 1rem;
  background: hsl(var(--card));
  color: hsl(var(--foreground));
  text-decoration: none;
}

.points-mall-home-entry__label {
  color: hsl(var(--muted-foreground));
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.points-mall-admin .points-mall-stats {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.75rem;
}

.points-mall-stat {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.points-mall-stat span {
  color: hsl(var(--muted-foreground));
  font-size: 0.75rem;
}

.points-mall-stat strong {
  color: hsl(var(--foreground));
  font-size: 1.6rem;
}

.points-mall-switches,
.points-mall-check {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
}

.points-mall-switches label,
.points-mall-check {
  align-items: center;
  color: hsl(var(--foreground));
  font-size: 0.875rem;
  font-weight: 600;
}

.points-mall-ship-box {
  display: grid;
  grid-template-columns: 10rem 1fr 1fr 1fr auto;
  gap: 0.75rem;
  align-items: center;
  border: 1px solid hsl(var(--border));
  border-radius: 0.5rem;
  padding: 0.75rem;
}

@media (max-width: 760px) {
  .points-mall-hero,
  .points-mall-admin-header,
  .points-mall-product-footer,
  .points-mall-order-item {
    align-items: center;
    flex-direction: column;
  }

  .points-mall-hero-actions,
  .points-mall-user-card {
    width: 100%;
  }

  .points-mall-address-layout,
  .points-mall-admin-layout,
  .points-mall-form-grid,
  .points-mall-admin-form,
  .points-mall-admin .points-mall-stats,
  .points-mall-ship-box,
  .points-mall-admin-image-field {
    grid-template-columns: 1fr;
  }

  .points-mall-toolbar > * {
    max-width: none;
    flex: 1;
    min-height: 2.5rem;
  }

  .points-mall-tabs-list {
    width: 100%;
  }

  .points-mall-tabs-header .points-mall-toolbar {
    flex: 1;
    min-width: 0;
  }
}

/* Level tag on product cards */
.points-mall-level-tag {
  font-size: 0.75rem;
  font-weight: 600;
  color: #d97706;
  margin: 0 0 0.15rem;
}

.points-mall-cover-wrap {
  position: relative;
  overflow: hidden;
}

.points-mall-cover-btn {
  display: block;
  width: 100%;
  padding: 0;
  border: none;
  background: none;
  cursor: pointer;
}

.points-mall-cover-btn.is-soldout {
  cursor: default;
  opacity: 0.55;
}

.points-mall-soldout-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.45);
  color: #fff;
  font-size: 1rem;
  font-weight: 700;
  border-radius: calc(var(--radius) - 0.125rem);
  z-index: 2;
  pointer-events: none;
}

.points-mall-cover-btn img {
  display: block;
}

.points-mall-cover-badge {
  position: absolute;
  padding: 0.15rem 0.45rem;
  border-radius: 0.3rem;
  font-size: 0.68rem;
  font-weight: 700;
  color: #fff;
  line-height: 1.4;
  z-index: 1;
}

.points-mall-cover-type {
  top: 0.4rem;
  left: 0.4rem;
  background: #7c3aed;
}

.points-mall-cover-level {
  top: 0.4rem;
  right: 0.4rem;
  background: #d97706;
}

.points-mall-product-price {
  color: #7c3aec;
  font-size: 1rem;
  font-weight: 800;
}

.points-mall-user-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.points-mall-level-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  border-radius: 999px;
  padding: 0.125rem 0.5rem;
  font-size: 0.7rem;
  font-weight: 600;
  border: 1px solid;
  white-space: nowrap;
}

@media (max-width: 760px) {
  .points-mall-header-entry > span:last-child {
    display: none;
  }
}

.points-mall-bypass-hint {
  font-size: 0.75rem;
  font-weight: 600;
  color: #ef4444;
  margin: 0;
}
