/* === PackVault Store Shared Styles === */
/* Matches landing page design: dark theme, gold accent, Space Grotesk + DM Sans */

* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --bg-deep: #0a0a0f;
  --bg-card: #12121a;
  --bg-surface: #1a1a26;
  --accent: #f7c948;
  --accent-glow: rgba(247, 201, 72, 0.15);
  --accent-dim: #d4a72c;
  --text-primary: #f0f0f5;
  --text-secondary: #9090a8;
  --text-muted: #5e5e78;
  --border: rgba(255,255,255,0.06);
  --red-tag: #ff4d6a;
  --green-tag: #34d399;
  --blue-tag: #60a5fa;
}

body {
  font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg-deep);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  min-height: 100vh;
}

a { color: inherit; text-decoration: none; }

/* === NAV === */
.store-nav {
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 100;
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(10,10,15,0.9);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}

.nav-left {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav-logo {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 1.4rem;
  letter-spacing: -0.03em;
  color: var(--text-primary);
  text-decoration: none;
}
.nav-logo span { color: var(--accent); }

.nav-links {
  display: flex;
  gap: 1.5rem;
  list-style: none;
}
.nav-links a {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: color 0.2s;
}
.nav-links a:hover,
.nav-links a.active {
  color: var(--accent);
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.nav-search {
  display: flex;
  align-items: center;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.5rem 0.75rem;
  gap: 0.5rem;
  transition: border-color 0.2s;
}
.nav-search:focus-within {
  border-color: rgba(247,201,72,0.3);
}
.nav-search svg {
  width: 16px;
  height: 16px;
  color: var(--text-muted);
  flex-shrink: 0;
}
.nav-search input {
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 0.85rem;
  font-family: inherit;
  outline: none;
  width: 180px;
}
.nav-search input::placeholder {
  color: var(--text-muted);
}

.cart-btn {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.5rem 0.85rem;
  color: var(--text-primary);
  font-size: 0.9rem;
  font-family: inherit;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}
.cart-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.cart-btn svg {
  width: 18px;
  height: 18px;
}
.cart-count {
  position: absolute;
  top: -6px;
  right: -6px;
  background: var(--accent);
  color: var(--bg-deep);
  font-size: 0.65rem;
  font-weight: 700;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.cart-count.hidden { display: none; }

/* === MAIN CONTENT === */
.store-main {
  padding-top: 5rem;
  min-height: 100vh;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* === PAGE HEADER === */
.page-header {
  padding: 2.5rem 0 2rem;
}
.page-header h1 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-bottom: 0.25rem;
}
.page-header p {
  color: var(--text-secondary);
  font-size: 1rem;
}

/* === FILTERS BAR === */
.filters-bar {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 2rem;
}

.filter-chip {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 500;
  font-size: 0.8rem;
  padding: 0.45rem 1rem;
  border-radius: 100px;
  border: 1px solid var(--border);
  background: var(--bg-surface);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}
.filter-chip:hover {
  border-color: rgba(247,201,72,0.3);
  color: var(--text-primary);
}
.filter-chip.active {
  border-color: var(--accent);
  background: var(--accent-glow);
  color: var(--accent);
}

.filter-chip .count {
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-left: 0.25rem;
}
.filter-chip.active .count {
  color: var(--accent-dim);
}

.sort-select {
  margin-left: auto;
  font-family: inherit;
  font-size: 0.8rem;
  padding: 0.45rem 0.75rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg-surface);
  color: var(--text-secondary);
  cursor: pointer;
  outline: none;
}
.sort-select:focus {
  border-color: rgba(247,201,72,0.3);
}

/* === PRODUCT GRID === */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.25rem;
  padding-bottom: 4rem;
}

.product-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  transition: all 0.25s;
  cursor: pointer;
  position: relative;
}
.product-card:hover {
  border-color: rgba(247,201,72,0.2);
  transform: translateY(-2px);
}

.product-card-img {
  width: 100%;
  height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-surface);
  font-size: 3rem;
  color: var(--text-muted);
  position: relative;
}
.product-card-img .game-badge {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.2rem 0.6rem;
  border-radius: 6px;
  background: rgba(10,10,15,0.8);
  color: var(--text-secondary);
  border: 1px solid var(--border);
}
.product-card-img .save-badge {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.2rem 0.55rem;
  border-radius: 6px;
  background: var(--green-tag);
  color: var(--bg-deep);
}

.product-card-body {
  padding: 1.1rem 1.25rem 1.25rem;
}
.product-card-body .set-name {
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.3rem;
}
.product-card-body h3 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.3;
  margin-bottom: 0.75rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-card-pricing {
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
}
.product-card-pricing .our-price {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--green-tag);
}
.product-card-pricing .market-price {
  font-size: 0.85rem;
  color: var(--text-muted);
  text-decoration: line-through;
}

.product-card-actions {
  display: flex;
  padding: 0 1.25rem 1.25rem;
  gap: 0.5rem;
}

.btn-add-cart {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.6rem;
  border-radius: 8px;
  border: 1px solid var(--accent);
  background: var(--accent-glow);
  color: var(--accent);
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 600;
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.2s;
}
.btn-add-cart:hover {
  background: var(--accent);
  color: var(--bg-deep);
}
.btn-add-cart svg {
  width: 16px;
  height: 16px;
}

/* === CATEGORY BADGES === */
.type-badge {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  margin-bottom: 0.5rem;
}
.type-badge.sealed { background: rgba(96,165,250,0.15); color: var(--blue-tag); border: 1px solid rgba(96,165,250,0.2); }
.type-badge.single { background: rgba(247,201,72,0.15); color: var(--accent); border: 1px solid rgba(247,201,72,0.2); }
.type-badge.pre-order { background: rgba(255,77,106,0.15); color: var(--red-tag); border: 1px solid rgba(255,77,106,0.2); }

/* === PRODUCT DETAIL === */
.product-detail {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  padding: 2rem 0 4rem;
}

.product-image {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 400px;
  font-size: 5rem;
  color: var(--text-muted);
}

.product-info { padding-top: 0.5rem; }
.product-info .breadcrumb {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}
.product-info .breadcrumb a {
  color: var(--text-secondary);
  transition: color 0.2s;
}
.product-info .breadcrumb a:hover { color: var(--accent); }

.product-info h1 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin-bottom: 0.5rem;
}

.product-meta {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}
.product-meta .meta-chip {
  font-size: 0.75rem;
  font-weight: 500;
  padding: 0.25rem 0.7rem;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--bg-surface);
  color: var(--text-secondary);
}

.price-block {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}
.price-block .our-price {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 2rem;
  font-weight: 700;
  color: var(--green-tag);
}
.price-block .market-price {
  font-size: 1rem;
  color: var(--text-muted);
  text-decoration: line-through;
  margin-left: 0.75rem;
}
.price-block .savings-line {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.5rem;
  font-size: 0.85rem;
  color: var(--green-tag);
  font-weight: 500;
}
.price-block .savings-tag {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  background: var(--green-tag);
  color: var(--bg-deep);
}

.qty-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.25rem;
}
.qty-control {
  display: flex;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}
.qty-control button {
  width: 36px;
  height: 36px;
  border: none;
  background: var(--bg-surface);
  color: var(--text-primary);
  font-size: 1.1rem;
  cursor: pointer;
  transition: background 0.2s;
}
.qty-control button:hover { background: var(--bg-card); }
.qty-control .qty-value {
  width: 40px;
  text-align: center;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 600;
  font-size: 0.95rem;
  background: var(--bg-deep);
  color: var(--text-primary);
  border: none;
  border-left: 1px solid var(--border);
  border-right: 1px solid var(--border);
  padding: 0.4rem 0;
}

.btn-primary {
  width: 100%;
  padding: 0.85rem;
  border-radius: 10px;
  border: none;
  background: var(--accent);
  color: var(--bg-deep);
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: -0.01em;
  cursor: pointer;
  transition: all 0.2s;
}
.btn-primary:hover {
  background: var(--accent-dim);
  transform: translateY(-1px);
}
.btn-primary:active {
  transform: translateY(0);
}

.btn-secondary {
  width: 100%;
  padding: 0.75rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-secondary);
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s;
  margin-top: 0.5rem;
}
.btn-secondary:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.product-description {
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}
.product-description h3 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
}
.product-description p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.7;
}

/* === RELATED PRODUCTS === */
.related-section {
  padding: 3rem 0 4rem;
  border-top: 1px solid var(--border);
}
.related-section h2 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 1.5rem;
}

/* === CART PAGE === */
.cart-layout {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 2rem;
  padding: 1rem 0 4rem;
}

.cart-items { min-height: 200px; }

.cart-empty {
  text-align: center;
  padding: 4rem 2rem;
}
.cart-empty .icon { font-size: 3rem; margin-bottom: 1rem; }
.cart-empty h2 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}
.cart-empty p {
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
}
.cart-empty a {
  display: inline-block;
  padding: 0.7rem 1.5rem;
  border-radius: 8px;
  background: var(--accent);
  color: var(--bg-deep);
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 600;
  transition: background 0.2s;
}
.cart-empty a:hover { background: var(--accent-dim); }

.cart-item {
  display: flex;
  gap: 1.25rem;
  padding: 1.25rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  margin-bottom: 0.75rem;
  align-items: center;
}

.cart-item-img {
  width: 80px;
  height: 80px;
  border-radius: 8px;
  background: var(--bg-surface);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: var(--text-muted);
  flex-shrink: 0;
}

.cart-item-info {
  flex: 1;
  min-width: 0;
}
.cart-item-info h3 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 0.2rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cart-item-info .item-meta {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.cart-item-qty {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.cart-item-qty button {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--bg-surface);
  color: var(--text-primary);
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}
.cart-item-qty button:hover {
  border-color: var(--accent);
}
.cart-item-qty span {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 600;
  min-width: 24px;
  text-align: center;
}

.cart-item-price {
  text-align: right;
  flex-shrink: 0;
}
.cart-item-price .line-total {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 1rem;
  color: var(--green-tag);
}
.cart-item-price .unit-price {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.cart-item-remove {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0.25rem;
  transition: color 0.2s;
  flex-shrink: 0;
}
.cart-item-remove:hover { color: var(--red-tag); }

/* Cart Summary */
.cart-summary {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.5rem;
  position: sticky;
  top: 6rem;
  height: fit-content;
}
.cart-summary h2 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 1.25rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}

.summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.4rem 0;
  font-size: 0.9rem;
}
.summary-row .label { color: var(--text-secondary); }
.summary-row .value { font-weight: 500; }
.summary-row.savings .value { color: var(--green-tag); font-weight: 600; }
.summary-row.total {
  padding-top: 1rem;
  margin-top: 0.75rem;
  border-top: 1px solid var(--border);
  font-size: 1.1rem;
}
.summary-row.total .value {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  color: var(--accent);
  font-size: 1.25rem;
}

.checkout-btn {
  width: 100%;
  margin-top: 1.5rem;
  padding: 0.85rem;
  border-radius: 10px;
  border: none;
  background: var(--accent);
  color: var(--bg-deep);
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.2s;
}
.checkout-btn:hover {
  background: var(--accent-dim);
  transform: translateY(-1px);
}
.checkout-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.continue-shopping {
  display: block;
  text-align: center;
  margin-top: 0.75rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  transition: color 0.2s;
}
.continue-shopping:hover { color: var(--accent); }

/* === ORDER SUCCESS === */
.success-page {
  text-align: center;
  padding: 5rem 2rem;
  max-width: 600px;
  margin: 0 auto;
}
.success-page .check-icon {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: rgba(52,211,153,0.15);
  border: 2px solid var(--green-tag);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
  font-size: 2rem;
}
.success-page h1 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}
.success-page p {
  color: var(--text-secondary);
  font-size: 1.05rem;
  margin-bottom: 0.5rem;
}
.success-page .order-number {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  color: var(--accent);
  font-size: 1.2rem;
}

/* === EMPTY STATE === */
.empty-state {
  text-align: center;
  padding: 4rem 2rem;
  color: var(--text-muted);
}
.empty-state .icon { font-size: 3rem; margin-bottom: 1rem; }

/* === LOADING === */
.loading-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.25rem;
}
.skeleton-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
}
.skeleton-img {
  height: 200px;
  background: linear-gradient(90deg, var(--bg-surface) 25%, var(--bg-card) 50%, var(--bg-surface) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}
.skeleton-body { padding: 1.25rem; }
.skeleton-line {
  height: 12px;
  border-radius: 6px;
  background: linear-gradient(90deg, var(--bg-surface) 25%, var(--bg-card) 50%, var(--bg-surface) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  margin-bottom: 0.5rem;
}
.skeleton-line.short { width: 60%; }
.skeleton-line.price { width: 40%; margin-top: 0.75rem; }

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* === TOAST === */
.toast-container {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.toast {
  background: var(--bg-card);
  border: 1px solid var(--green-tag);
  border-radius: 10px;
  padding: 0.85rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-primary);
  box-shadow: 0 8px 30px rgba(0,0,0,0.4);
  animation: slideIn 0.3s ease;
  max-width: 320px;
}
.toast.leaving {
  animation: slideOut 0.3s ease forwards;
}
@keyframes slideIn {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}
@keyframes slideOut {
  from { transform: translateX(0); opacity: 1; }
  to { transform: translateX(100%); opacity: 0; }
}

/* === FOOTER === */
.store-footer {
  padding: 2rem;
  text-align: center;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.8rem;
}
.store-footer a {
  color: var(--text-secondary);
  text-decoration: none;
}

/* === RESPONSIVE === */
@media (max-width: 768px) {
  .store-nav { padding: 0.75rem 1rem; }
  .nav-links { display: none; }
  .nav-search { display: none; }
  .container { padding: 0 1rem; }
  .product-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 0.75rem; }
  .product-card-img { height: 150px; }
  .product-detail { grid-template-columns: 1fr; gap: 1.5rem; }
  .product-image { min-height: 280px; }
  .cart-layout { grid-template-columns: 1fr; }
  .cart-item { flex-wrap: wrap; }
  .filters-bar { overflow-x: auto; flex-wrap: nowrap; padding-bottom: 1rem; }
  .sort-select { margin-left: 0; }
  .page-header h1 { font-size: 1.5rem; }
}

@media (max-width: 480px) {
  .product-grid { grid-template-columns: 1fr 1fr; }
  .product-card-body h3 { font-size: 0.85rem; }
  .product-card-pricing .our-price { font-size: 1rem; }
}
