/* View shop profile — editorial (pairs with tca-editorial-tokens.css) */

:root {
  --vs-top-h: var(--nav-h);
  --vs-cover-m: 10.5rem;
  --vs-cover-d: 14.5rem;
  --vs-page-max: 80rem;
  --vs-sidebar-w: 20rem;
}

body.vs-page.store-page {
  padding: 0;
  padding-bottom: calc(var(--dock-h) + env(safe-area-inset-bottom, 0px));
  background: var(--bg-deep);
}

/* Fixed page glow sits above flat bg and can read as a seam under the banner */
body.vs-page.store-page::before,
body.vs-page.store-page::after {
  display: none;
}

@media (max-width: 768px) {
  body.vs-page.store-page {
    padding-bottom: env(safe-area-inset-bottom, 0px);
  }
}

.vs-wrap {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: none;
  margin: 0;
  background: var(--bg-deep);
}

/* Top bar */
.vs-topbar {
  position: sticky;
  top: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  min-height: var(--vs-top-h);
  padding: 0 var(--space-md);
  background: oklch(20% 0.032 52 / 0.92);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(12px);
}

.vs-topbar__back,
.vs-topbar__cart {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  color: var(--text-secondary);
  text-decoration: none;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-raised);
  transition: color var(--dur-fast), border-color var(--dur-fast), background var(--dur-fast);
}

.vs-topbar__back:hover,
.vs-topbar__cart:hover {
  color: var(--gold);
  border-color: var(--border-strong);
  background: var(--bg-hover);
}

.vs-topbar__back:focus-visible,
.vs-topbar__cart:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

.vs-topbar__title {
  flex: 1;
  min-width: 0;
  margin: 0;
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.vs-topbar__cart {
  position: relative;
  color: var(--text-primary);
}

.vs-topbar__count {
  position: absolute;
  top: -0.2rem;
  right: -0.2rem;
  min-width: 1rem;
  height: 1rem;
  padding: 0 0.25rem;
  font-size: 0.625rem;
  font-weight: 700;
  line-height: 1rem;
  text-align: center;
  color: oklch(96% 0.02 85);
  background: var(--danger);
  border-radius: var(--radius-full);
}

/* Cover — one shade gradient; bottom band is solid --bg-deep before the clip edge */
.vs-hero {
  position: relative;
  z-index: 0;
  width: 100%;
  min-height: var(--vs-cover-m);
  height: var(--vs-cover-m);
  overflow: hidden;
  background-color: var(--bg-deep);
}

.vs-hero__img {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 58% 38%;
  display: block;
}

.vs-hero__img.is-broken {
  opacity: 0;
}

.vs-hero__shade {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    linear-gradient(180deg, oklch(12% 0.03 48 / 0.12) 0%, transparent 24%),
    linear-gradient(90deg, oklch(10% 0.03 48 / 0.55) 0%, oklch(10% 0.03 48 / 0.2) 42%, transparent 68%),
    linear-gradient(180deg, transparent 30%, var(--bg-deep) 100%);
}

.vs-hero__brand {
  position: absolute;
  z-index: 2;
  left: clamp(var(--space-md), 4vw, var(--space-xl));
  top: 50%;
  transform: translateY(-52%);
  max-width: min(11.5rem, 48%);
  pointer-events: none;
}

.vs-hero__brand-name {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 4.8vw, 1.875rem);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: 0.015em;
  color: var(--text-primary);
  text-shadow:
    0 1px 2px oklch(10% 0.03 48 / 0.9),
    0 4px 28px oklch(8% 0.02 48 / 0.75);
}

.vs-hero__brand-tag {
  display: block;
  margin-top: 0.3rem;
  font-family: var(--font-body);
  font-size: clamp(0.625rem, 2vw, 0.75rem);
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
  text-shadow: 0 1px 16px oklch(8% 0.02 48 / 0.85);
}

.vs-layout {
  position: relative;
  z-index: 1;
  margin-top: 0;
  padding-top: var(--space-sm);
  background: var(--bg-deep);
}

@media (min-width: 769px) {
  .vs-hero {
    min-height: var(--vs-cover-d);
    height: var(--vs-cover-d);
    border-radius: 0;
  }

  .vs-hero__img {
    object-position: 55% 40%;
  }

  .vs-hero__brand {
    max-width: min(13rem, 42%);
  }

  .vs-hero__brand-name {
    font-size: clamp(1.5rem, 3.2vw, 2.125rem);
  }

  .vs-layout {
    padding-top: var(--space-md);
  }
}

@media (min-width: 1024px) {
  body.vs-page.store-page {
    padding-bottom: calc(var(--dock-h) + var(--space-lg));
  }

  .vs-topbar {
    padding-inline: clamp(var(--space-lg), 3vw, var(--space-2xl));
  }

  .vs-hero {
    min-height: clamp(14rem, 28vh, 20rem);
    height: clamp(14rem, 28vh, 20rem);
  }

  .vs-hero__img {
    object-position: 52% 36%;
  }

  .vs-hero__brand {
    left: clamp(var(--space-lg), 3vw, var(--space-2xl));
    max-width: 14rem;
  }

  .vs-hero__brand-name {
    font-size: clamp(1.75rem, 2.4vw, 2.25rem);
  }

  .vs-layout {
    display: grid;
    grid-template-columns: var(--vs-sidebar-w) minmax(0, 1fr);
    gap: var(--space-xl);
    align-items: start;
    width: 100%;
    max-width: var(--vs-page-max);
    margin: 0 auto;
    padding: var(--space-md) clamp(var(--space-lg), 3vw, var(--space-2xl)) var(--space-2xl);
  }

  .vs-profile {
    margin-top: 0;
    padding: 0;
    position: sticky;
    top: calc(var(--vs-top-h) + var(--space-md));
  }

  .vs-profile__card {
    grid-template-columns: 1fr;
    grid-template-areas:
      'avatar'
      'intro'
      'stats'
      'actions';
    gap: var(--space-md);
    padding: var(--space-lg);
  }

  .vs-profile__avatar {
    width: 6.5rem;
    height: 6.5rem;
    justify-self: center;
  }

  .vs-profile__intro {
    text-align: center;
  }

  .vs-profile__badges {
    justify-content: center;
  }

  .vs-stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    max-width: none;
  }

  .vs-actions {
    flex-direction: column;
    max-width: none;
  }

  .vs-actions .btn,
  .vs-actions form {
    flex: 1 1 auto;
    min-width: 0;
  }

  .vs-rail {
    min-width: 0;
  }

  .vs-promo {
    margin: 0 0 var(--space-lg);
  }

  .vs-main {
    padding: 0;
    min-width: 0;
  }
}

@media (min-width: 1280px) {
  :root {
    --vs-page-max: 90rem;
    --vs-sidebar-w: 22rem;
  }

  .vs-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: var(--space-lg);
  }
}

@media (min-width: 1440px) {
  :root {
    --vs-page-max: 100rem;
  }

  .vs-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}

@media (min-width: 1680px) {
  :root {
    --vs-page-max: 112rem;
  }

  .vs-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: var(--space-xl);
  }

  .vs-suggest .vs-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

/* Profile */
.vs-profile {
  position: relative;
  z-index: 2;
  margin-top: 0;
  padding: 0 var(--space-md) var(--space-lg);
}

.vs-profile__card {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-areas:
    'avatar intro'
    'stats stats'
    'actions actions';
  gap: var(--space-md);
  align-items: start;
  padding: var(--space-lg);
  background: var(--bg-raised);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  box-shadow: 0 14px 44px oklch(6% 0.02 48 / 0.5);
}

.vs-profile__avatar {
  grid-area: avatar;
  width: 4.75rem;
  height: 4.75rem;
  object-fit: cover;
  border: 2px solid oklch(62% 0.11 72 / 0.45);
  border-radius: var(--radius-full);
  box-shadow: 0 6px 20px oklch(8% 0.02 48 / 0.4);
  background: var(--bg-muted);
}

.vs-profile__intro {
  grid-area: intro;
  min-width: 0;
}

.vs-profile__name {
  margin: 0 0 0.5rem;
  font-family: var(--font-display);
  font-size: clamp(1.125rem, 4.2vw, 1.5rem);
  font-weight: 700;
  line-height: 1.28;
  color: var(--text-primary);
  letter-spacing: -0.02em;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.vs-profile__badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 0.5rem;
}

.vs-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.2rem 0.5rem;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border-radius: var(--radius-sm);
}

.vs-badge--mall {
  color: oklch(96% 0.02 85);
  background: oklch(48% 0.16 25);
  border: 1px solid oklch(55% 0.14 25 / 0.5);
}

.vs-badge--ok {
  color: var(--success);
  background: oklch(62% 0.12 155 / 0.12);
  border: 1px solid oklch(52% 0.1 155 / 0.35);
}

.vs-badge--warn {
  color: var(--text-muted);
  background: var(--bg-muted);
  border: 1px solid var(--border);
}

.vs-profile__status {
  margin: 0 0 var(--space-sm);
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-muted);
}

.vs-profile__status--ok {
  color: var(--success);
}

.vs-profile__status--mall {
  color: var(--gold-soft);
}

.vs-profile__status--official {
  color: oklch(72% 0.12 75);
}

.vs-profile__desc {
  margin: var(--space-sm) 0 0;
  font-size: 0.875rem;
  line-height: 1.65;
  color: var(--text-secondary);
  white-space: pre-line;
  max-height: 5.5rem;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
}

.vs-stats {
  grid-area: stats;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  margin: 0;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--bg-muted);
}

.vs-stats__item {
  padding: 0.85rem 0.5rem;
  text-align: center;
}

.vs-stats__item + .vs-stats__item {
  border-left: 1px solid var(--border);
}

.vs-stats__value {
  display: block;
  font-family: var(--font-display);
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.2;
}

.vs-stats__value i {
  font-size: 0.75rem;
  color: var(--warning);
  margin-right: 0.15rem;
}

.vs-stats__label {
  display: block;
  margin-top: 0.2rem;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.vs-actions {
  grid-area: actions;
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  margin: 0;
}

.vs-actions .btn,
.vs-actions form {
  flex: 1 1 calc(50% - var(--space-sm));
  min-width: 9rem;
  margin: 0;
}

.vs-actions form {
  display: flex;
}

.vs-actions .btn {
  width: 100%;
  justify-content: center;
  min-height: 2.875rem;
  font-size: 0.875rem;
}

.vs-actions .btn-secondary {
  background: var(--bg-muted);
}

.vs-actions .btn-secondary:hover {
  background: var(--bg-hover);
}

@media (max-width: 480px) {
  .vs-actions {
    flex-direction: column;
  }

  .vs-actions .btn,
  .vs-actions form {
    flex: 1 1 100%;
    min-width: 0;
  }
}

@media (min-width: 769px) and (max-width: 1023px) {
  .vs-layout {
    max-width: var(--max-w);
    margin-left: auto;
    margin-right: auto;
    padding: var(--space-md) var(--space-lg) var(--space-2xl);
  }

  .vs-profile {
    margin-top: 0;
    padding: 0 0 var(--space-lg);
  }

  .vs-profile__card {
    grid-template-columns: 7.5rem 1fr;
    grid-template-areas:
      'avatar intro'
      'avatar stats'
      'avatar actions';
    gap: var(--space-md) var(--space-xl);
    padding: var(--space-xl);
  }

  .vs-profile__avatar {
    width: 7.5rem;
    height: 7.5rem;
  }

  .vs-profile__name {
    -webkit-line-clamp: 2;
    font-size: 1.625rem;
  }

  .vs-profile__desc {
    max-height: none;
    -webkit-line-clamp: unset;
    display: block;
  }

  .vs-stats {
    grid-template-columns: repeat(3, minmax(5.5rem, 1fr));
    max-width: 28rem;
    margin-top: var(--space-md);
  }

  .vs-actions {
    margin-top: var(--space-md);
    max-width: 24rem;
  }

}

/* VIP promo */
.vs-promo {
  display: block;
  margin: 0 var(--space-md) var(--space-lg);
  padding: var(--space-md) var(--space-lg);
  text-decoration: none;
  color: inherit;
  background: oklch(72% 0.14 75 / 0.1);
  border: 1px solid oklch(72% 0.14 75 / 0.35);
  border-radius: var(--radius-lg);
  transition: border-color var(--dur-fast), background var(--dur-fast);
}

.vs-promo:hover {
  background: oklch(72% 0.14 75 / 0.14);
  border-color: oklch(72% 0.14 75 / 0.5);
}

.vs-promo__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
}

.vs-promo__copy {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  min-width: 0;
}

.vs-promo__icon {
  flex-shrink: 0;
  font-size: 1.75rem;
  color: var(--gold);
}

.vs-promo__title {
  margin: 0 0 0.2rem;
  font-family: var(--font-display);
  font-size: 1.0625rem;
  font-weight: 700;
  color: var(--text-primary);
}

.vs-promo__text {
  margin: 0;
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.vs-promo__cta {
  flex-shrink: 0;
  padding: 0.5rem 1rem;
  font-size: 0.8125rem;
  font-weight: 700;
  color: oklch(18% 0.03 48);
  background: var(--gold);
  border-radius: var(--radius-full);
}

@media (min-width: 769px) and (max-width: 1023px) {
  .vs-promo {
    margin: 0 var(--space-lg) var(--space-xl);
  }
}

/* Catalog */
.vs-main {
  padding: 0 var(--space-md) var(--space-2xl);
}

@media (min-width: 769px) {
  .vs-main {
    padding: 0 var(--space-lg) var(--space-2xl);
  }
}

.vs-catalog-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-md);
  margin-bottom: var(--space-md);
  padding-bottom: var(--space-sm);
  border-bottom: 1px solid var(--border);
}

.vs-catalog-head h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
}

.vs-catalog-head__count {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-muted);
}

.vs-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-md);
}

@media (min-width: 640px) {
  .vs-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 1024px) {
  .vs-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--space-lg);
  }
}

/* Product card */
.vs-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  text-decoration: none;
  color: inherit;
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: border-color var(--dur-med) var(--ease-out), box-shadow var(--dur-med) var(--ease-out);
}

@media (hover: hover) and (pointer: fine) {
  .vs-card:hover {
    border-color: var(--border-strong);
    box-shadow: 0 12px 32px oklch(8% 0.02 48 / 0.35);
  }

  .vs-card:hover .vs-card__img {
    transform: scale(1.03);
  }
}

.vs-card--ritual {
  border-color: oklch(58% 0.1 72 / 0.45);
}

.vs-card--preorder {
  border-color: oklch(52% 0.08 300 / 0.4);
}

.vs-card__media {
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
  background: var(--bg-muted);
}

.vs-card__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform var(--dur-med) var(--ease-out);
}

.vs-card__ph {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  font-size: 2rem;
  color: var(--text-muted);
}

.vs-card__badges {
  position: absolute;
  top: var(--space-sm);
  left: var(--space-sm);
  right: var(--space-sm);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.25rem;
  pointer-events: none;
}

.vs-card__badge {
  padding: 0.2rem 0.45rem;
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  border-radius: var(--radius-sm);
}

.vs-card__badge--sale {
  margin-left: auto;
  color: oklch(96% 0.02 85);
  background: var(--danger);
}

.vs-card__badge--preorder {
  color: oklch(96% 0.02 85);
  background: oklch(48% 0.12 300);
}

.vs-card__badge--ritual {
  color: oklch(18% 0.03 48);
  background: var(--gold);
}

.vs-card__badge--suggest {
  color: var(--gold-soft);
  background: oklch(22% 0.03 48 / 0.85);
  border: 1px solid var(--border);
}

.vs-card__body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 0.35rem;
  padding: var(--space-sm) var(--space-md) var(--space-md);
}

.vs-card__title {
  margin: 0;
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1.4;
  color: var(--text-primary);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.8em;
}

.vs-card__price {
  margin: auto 0 0;
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  color: var(--gold);
}

.vs-card__price-old {
  margin-left: 0.35rem;
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-muted);
  text-decoration: line-through;
}

.vs-empty {
  grid-column: 1 / -1;
  padding: var(--space-2xl) var(--space-md);
  text-align: center;
  color: var(--text-muted);
  border: 1px dashed var(--border);
  border-radius: var(--radius-lg);
  background: var(--bg-raised);
}

.vs-empty i {
  display: block;
  margin-bottom: var(--space-sm);
  font-size: 2rem;
  opacity: 0.4;
}

.vs-suggest {
  margin-top: var(--space-2xl);
  padding-top: var(--space-xl);
  border-top: 1px solid var(--border);
}

.vs-suggest .vs-catalog-head h2 {
  font-size: 1.125rem;
}

/* Bottom nav (shared pattern) */
.vs-page .pd-bottom-nav {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 900;
  display: flex;
  align-items: center;
  justify-content: space-around;
  height: var(--dock-h);
  padding-bottom: env(safe-area-inset-bottom, 0);
  background: oklch(20% 0.032 52 / 0.96);
  border-top: 1px solid var(--border);
}

@media (max-width: 768px) {
  .vs-page .pd-bottom-nav {
    display: none;
  }
}

.vs-page .pd-bottom-nav .nav-item {
  position: relative;
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.15rem;
  padding: 0.35rem;
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--text-muted);
  text-decoration: none;
  transition: color var(--dur-fast);
}

.vs-page .pd-bottom-nav .nav-item.active {
  color: var(--gold);
}

.vs-page .pd-bottom-nav .nav-icon {
  font-size: 1.125rem;
}

@media (prefers-reduced-motion: reduce) {
  .vs-card,
  .vs-card__img,
  .vs-topbar__back,
  .vs-promo {
    transition: none;
  }
}
