/* Shop layout: header, home, browse, item cards with live previews, item popup, cart drawer. */

main { max-width: 1180px; }
body.no-scroll { overflow: hidden; }
.view { padding-bottom: 8px; }

/* ---------- header ---------- */
.shop-top {
  position: sticky;
  top: 0;
  z-index: 30;
  max-width: none;
  padding: 12px max(20px, calc((100vw - 1180px) / 2));
  background: rgba(12, 13, 17, 0.82);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
  gap: 10px;
}
.shop-top .brand { margin-right: 14px; }
.main-nav { display: flex; gap: 2px; margin-right: auto; }
.main-nav a { color: var(--muted); text-decoration: none; font-weight: 600; font-size: 14px; padding: 7px 12px; border-radius: 8px; }
.main-nav a:hover { color: var(--text); background: var(--card-2); }
.main-nav a.active { color: var(--text); background: var(--card-2); }
.top-right { display: flex; align-items: center; gap: 8px; }
a.chip { color: var(--text); text-decoration: none; }
.cart-btn { position: relative; width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--card-2); color: var(--text); display: grid; place-items: center; cursor: pointer; }
.cart-btn:hover { border-color: var(--accent); }
.cart-btn svg { width: 20px; height: 20px; }
.cart-count { position: absolute; top: -6px; right: -6px; min-width: 19px; height: 19px; padding: 0 5px; border-radius: 10px; background: var(--accent); color: var(--accent-ink); font-size: 11px; font-weight: 800; display: grid; place-items: center; }
.cart-btn.bump { animation: bump 0.35s ease; }
@keyframes bump { 40% { transform: scale(1.18); } }

/* ---------- shared bits ---------- */
.eyebrow { text-transform: uppercase; letter-spacing: 0.08em; font-size: 12px; font-weight: 700; color: var(--accent-2); margin: 0 0 6px; }
.link-btn { background: none; border: 0; padding: 0; color: var(--accent-2); font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; text-decoration: none; justify-self: start; }
.link-btn:hover { text-decoration: underline; }
.strip { margin-top: 40px; }
.strip-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.strip-head h2 { font-size: 22px; }

/* ---------- home hero ---------- */
.hero2 { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 48px; align-items: center; padding: 44px 0 12px; }
.hero2 h1 { font-size: clamp(32px, 4.6vw, 52px); font-weight: 780; letter-spacing: -0.03em; line-height: 1.05; }
.hero2 h1 em { font-style: normal; background: linear-gradient(90deg, var(--accent-2), #ff9bd6); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero2 .lead { color: var(--muted); font-size: 17px; margin: 16px 0 22px; max-width: 34em; }
.hero2-actions { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.smart-search { display: flex; align-items: center; gap: 8px; background: var(--card); border: 1px solid var(--line-2); border-radius: 14px; padding: 6px 6px 6px 14px; }
.smart-search:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(143, 125, 255, 0.18); }
.smart-search svg { width: 18px; height: 18px; color: var(--muted); flex: none; }
.smart-search input { border: 0; background: transparent; padding: 10px 2px; box-shadow: none !important; min-width: 0; }
.smart-search.small { padding: 2px 8px 2px 12px; border-radius: 10px; }
.smart-search.small input { padding: 8px 2px; }
.hero2-art { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; padding: 10px 6px 30px; }
.art { border-radius: 20px; overflow: hidden; border: 1px solid var(--line-2); box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45); cursor: pointer; transition: transform 0.2s ease; }
.art:hover { transform: translateY(-4px) rotate(0deg) !important; }
.art-0 { transform: rotate(-3deg); }
.art-1 { transform: translateY(26px) rotate(2deg); }
.art-2 { transform: translateY(-6px) rotate(2.5deg); }
.art-3 { transform: translateY(18px) rotate(-2deg); }

/* ---------- price facts ---------- */
.hero-stats { display: flex; gap: 10px; flex-wrap: wrap; margin: 22px 0 0; }
.stat-chip { display: grid; gap: 1px; padding: 10px 14px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; min-width: 120px; }
.stat-chip dt { color: var(--muted); font-size: 12px; order: 2; }
.stat-chip dd { margin: 0; font-size: 18px; font-weight: 750; letter-spacing: -0.01em; font-variant-numeric: tabular-nums; }
.price-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.price-tile { display: grid; gap: 4px; padding: 16px; background: var(--card); border: 1px solid var(--line); border-radius: 14px; color: var(--text); text-decoration: none; transition: border-color 0.15s, transform 0.15s; }
.price-tile:hover { border-color: var(--accent); transform: translateY(-2px); }
.price-from { font-size: 14px; color: var(--muted); }
.price-from strong { color: var(--text); font-size: 24px; font-weight: 760; letter-spacing: -0.02em; margin-left: 2px; }

/* ---------- steps ---------- */
.steps { list-style: none; counter-reset: s; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.steps li { counter-increment: s; background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 18px; display: grid; gap: 4px; align-content: start; }
.steps li::before { content: counter(s); width: 28px; height: 28px; border-radius: 50%; background: rgba(143, 125, 255, 0.15); color: var(--accent-2); display: grid; place-items: center; font-weight: 800; margin-bottom: 6px; }
.steps span { color: var(--muted); font-size: 14px; }

/* ---------- item card ---------- */
.grid-items { display: grid; grid-template-columns: repeat(auto-fill, minmax(176px, 1fr)); gap: 14px; }
.rail { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(176px, 196px); gap: 14px; overflow-x: auto; scroll-snap-type: x proximity; padding: 4px 2px 12px; scrollbar-width: thin; scrollbar-color: var(--line-2) transparent; }
.rail > * { scroll-snap-align: start; }
.rail.small { grid-auto-columns: 150px; }
.item-card { position: relative; display: flex; flex-direction: column; min-width: 0; background: var(--card); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; cursor: pointer; transition: transform 0.15s ease, border-color 0.15s, box-shadow 0.15s; }
.item-card:hover { transform: translateY(-3px); border-color: var(--line-2); box-shadow: 0 14px 34px rgba(0, 0, 0, 0.4); }
.item-card:focus-visible { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(143, 125, 255, 0.25); }
.item-body { padding: 10px 12px 12px; display: grid; gap: 2px; }
.item-type { font-size: 11px; font-weight: 750; letter-spacing: 0.05em; text-transform: uppercase; display: flex; align-items: center; gap: 6px; }
.item-type::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.t-decoration { color: #b8adff; }
.t-nameplate { color: #7cc4ff; }
.t-effect { color: #ff9bd6; }
.t-frame { color: #ffd27a; }
.t-bundle { color: #6ee7c8; }
.item-name { font-weight: 650; font-size: 14px; line-height: 1.3; min-height: 2.6em; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.item-col { color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.item-price { display: flex; align-items: baseline; gap: 6px; margin-top: 6px; flex-wrap: wrap; }
.item-price strong { font-size: 16px; font-variant-numeric: tabular-nums; }
.item-price s { color: var(--muted); font-size: 12px; }
.item-price .off { font-size: 11px; font-weight: 750; color: var(--ok); background: rgba(60, 207, 142, 0.12); border-radius: 999px; padding: 1px 7px; }
.item-price.big { margin-top: 8px; }
.item-price.big strong { font-size: 32px; letter-spacing: -0.02em; }
.item-price.big s { font-size: 16px; }
.item-price.big .off { font-size: 13px; }
.add-btn { position: absolute; top: 8px; right: 8px; width: 32px; height: 32px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, 0.2); background: rgba(12, 13, 17, 0.6); backdrop-filter: blur(6px); color: #fff; font-size: 20px; line-height: 1; cursor: pointer; opacity: 0; transform: scale(0.9); transition: 0.15s; }
.item-card:hover .add-btn, .item-card:focus-within .add-btn { opacity: 1; transform: none; }
.add-btn:hover { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
@media (hover: none) { .add-btn { opacity: 1; transform: none; } }
.item-card.skeleton { min-height: 280px; cursor: default; background: linear-gradient(90deg, var(--card) 0%, var(--card-2) 50%, var(--card) 100%); background-size: 200% 100%; animation: shimmer 1.2s linear infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* ---------- live previews ---------- */
.stage {
  --c1: #3b3552;
  --c2: #17181f;
  position: relative;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: #1b1d26;
  background: radial-gradient(120% 95% at 50% 0%, color-mix(in srgb, var(--c1) 55%, #15161d) 0%, color-mix(in srgb, var(--c2) 40%, #0e0f15) 100%);
}
.stage img { user-select: none; pointer-events: none; }
.stage-missing { font-size: 34px; font-weight: 800; color: var(--muted); }
.pv-avatar { position: relative; width: 50%; aspect-ratio: 1; }
.pv-face { position: absolute; inset: 0; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #a69aff, #5a4bd1 70%); box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35); }
.pv-deco { position: absolute; left: -10%; top: -10%; width: 120%; height: 120%; object-fit: contain; }
.pv-member { position: relative; width: 86%; height: 24%; min-height: 30px; display: flex; align-items: center; gap: 8px; padding: 0 10px; border-radius: 9px; overflow: hidden; background: #1f2029; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4); }
.pv-np { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.pv-dot { position: relative; z-index: 1; flex: none; height: 62%; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #a69aff, #5a4bd1 70%); }
.pv-name { position: relative; z-index: 1; color: #fff; font-weight: 650; font-size: 13px; text-shadow: 0 1px 3px rgba(0, 0, 0, 0.7); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pv-profile { position: relative; width: 62%; height: 86%; border-radius: 12px; overflow: hidden; background: #191a22; box-shadow: 0 12px 34px rgba(0, 0, 0, 0.45); }
.pv-banner { height: 30%; background: color-mix(in srgb, var(--c1) 75%, #26283a); }
.pv-pfp { position: absolute; left: 10%; top: 18%; width: 32%; aspect-ratio: 1; border-radius: 50%; border: 3px solid #191a22; background: radial-gradient(circle at 35% 30%, #a69aff, #5a4bd1 70%); }
.pv-lines { position: absolute; left: 10%; right: 12%; top: 58%; display: grid; gap: 7px; }
.pv-lines i { display: block; height: 6px; border-radius: 3px; background: rgba(255, 255, 255, 0.13); }
.pv-lines i:nth-child(1) { width: 62%; background: rgba(255, 255, 255, 0.24); }
.pv-lines i:nth-child(3) { width: 45%; }
.pv-effect { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.pv-frame { position: absolute; left: 0; top: 0; width: 100%; height: auto; }
.pv-plain { width: 84%; height: 84%; object-fit: contain; filter: drop-shadow(0 10px 22px rgba(0, 0, 0, 0.35)); }
.stage-bundle .pv-plain { width: 118%; height: 118%; }
.stage.big { border-radius: 16px; border: 1px solid var(--line-2); }
.stage.big .pv-name { font-size: 18px; }

/* ---------- item popup ---------- */
.modal-card.wide { width: min(900px, 100%); }
.item-detail { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 26px; align-items: start; }
.item-info { display: grid; gap: 10px; align-content: start; }
.item-title { font-size: 28px; font-weight: 760; letter-spacing: -0.02em; line-height: 1.15; }
.save-line { color: var(--ok); font-size: 14px; font-weight: 600; }
.item-info .btn-row { margin-top: 6px; }
.notes { margin: 8px 0 0; padding-left: 18px; color: var(--muted); font-size: 13px; display: grid; gap: 4px; }
.related { margin-top: 24px; padding-top: 18px; border-top: 1px solid var(--line); }
.related h3 { margin-bottom: 12px; }

/* ---------- browse ---------- */
.browse-head { display: flex; align-items: baseline; gap: 12px; margin: 26px 0 16px; flex-wrap: wrap; }
.browse-head h1 { font-size: 30px; font-weight: 760; letter-spacing: -0.02em; }
.toolbar { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 240px) minmax(0, 200px); gap: 10px; }
.toolbar select { padding: 9px 10px; cursor: pointer; }
.type-chips { display: flex; gap: 8px; flex-wrap: wrap; margin: 14px 0 12px; }
.type-chip { display: inline-flex; align-items: center; gap: 7px; font: inherit; font-size: 14px; font-weight: 600; color: var(--text); background: var(--card); border: 1px solid var(--line-2); border-radius: 999px; padding: 6px 14px; cursor: pointer; }
.type-chip span { color: var(--muted); font-size: 12px; font-weight: 600; }
.type-chip:hover { border-color: var(--accent); }
.type-chip.on { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.type-chip.on span { color: var(--accent-ink); opacity: 0.7; }
.applied { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.pill { display: inline-flex; align-items: center; gap: 8px; font: inherit; font-size: 13px; color: var(--text); background: rgba(143, 125, 255, 0.14); border: 1px solid rgba(143, 125, 255, 0.35); border-radius: 999px; padding: 4px 10px 4px 12px; cursor: pointer; }
.pill span { color: var(--accent-2); font-size: 11px; }
.pill:hover { border-color: var(--accent); }
.load-more { display: flex; justify-content: center; margin-top: 22px; }
.empty-state { grid-column: 1 / -1; display: grid; justify-items: center; gap: 12px; padding: 50px 0; color: var(--muted); }

/* ---------- account + login ---------- */
.account-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); margin-top: 16px; }
.plans-card + .account-grid { margin-top: 16px; }
.login-wrap { display: grid; place-items: center; padding: 48px 0 20px; }
.login-wrap .auth { width: min(420px, 100%); }
.auth-title { font-size: 22px; margin-bottom: 16px; }
.login-wrap .mini-plans { justify-content: center; margin-top: 18px; }

/* ---------- cart drawer ---------- */
.drawer-backdrop { position: fixed; inset: 0; z-index: 35; background: rgba(5, 6, 9, 0.6); backdrop-filter: blur(2px); }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; z-index: 36; width: min(420px, 100vw); display: flex; flex-direction: column; background: var(--card); border-left: 1px solid var(--line-2); box-shadow: -20px 0 60px rgba(0, 0, 0, 0.5); animation: slide-in 0.2s ease; }
@keyframes slide-in { from { transform: translateX(30px); opacity: 0; } }
.drawer-head { display: flex; justify-content: space-between; align-items: center; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.drawer-body { flex: 1; overflow: auto; padding: 4px 20px; }
.drawer-foot { display: grid; gap: 10px; padding: 16px 20px 20px; border-top: 1px solid var(--line); }
.cart-row { display: grid; grid-template-columns: 58px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
.cart-row .stage { width: 58px; border-radius: 10px; }
.cart-row .pv-name { display: none; }
.cart-row.blocked { opacity: 0.55; }
.cart-name { font-weight: 600; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cart-price { display: flex; align-items: center; gap: 2px; font-variant-numeric: tabular-nums; }
.sum-row { display: flex; justify-content: space-between; align-items: baseline; }
.sum-total { font-size: 22px; font-variant-numeric: tabular-nums; }
.cart-empty { display: grid; justify-items: center; gap: 14px; padding: 48px 0; color: var(--muted); }

/* ---------- footer ---------- */
.foot { max-width: 1180px; margin: 48px auto 0; padding: 22px 20px 40px; border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; display: grid; gap: 6px; }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .hero2 { grid-template-columns: 1fr; gap: 18px; padding-top: 28px; }
  .hero2-art { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; padding: 0 0 10px; }
  .art { border-radius: 14px; }
  .art-1, .art-2, .art-3 { transform: none; }
  .art-0 { transform: none; }
  .toolbar { grid-template-columns: 1fr 1fr; }
  .toolbar .smart-search { grid-column: 1 / -1; }
}
@media (max-width: 700px) {
  .item-detail { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .account-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .shop-top { flex-wrap: wrap; padding: 10px 16px; row-gap: 8px; }
  #adminLink { display: none; }
  .shop-top .brand { margin-right: auto; }
  .main-nav { order: 3; width: 100%; margin: 0; justify-content: space-between; }
  .main-nav a { flex: 1; text-align: center; }
  .grid-items { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .rail { grid-auto-columns: 46%; gap: 10px; }
  .item-body { padding: 8px 10px 10px; }
  .item-name { font-size: 13px; }
  .strip { margin-top: 30px; }
  .modal-card.wide { padding: 16px; }
  .item-title { font-size: 22px; }
  .foot { padding: 20px 16px 32px; }
}
