/* PixelBlush Store - Shared Styles */
* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --pink: #ff6b9d;
  --blush: #ffb3c6;
  --lavender: #c8a2ff;
  --purple: #9b5de5;
  --dark: #1a0a2e;
  --darker: #0d0518;
  --soft-white: #fef0f5;
  --pixel-green: #a8e6cf;
  --card-bg: rgba(26, 10, 46, 0.6);
  --card-border: rgba(155, 93, 229, 0.15);
  --text-muted: rgba(254, 240, 245, 0.5);
  --text-faint: rgba(254, 240, 245, 0.3);
}

body {
  font-family: 'Outfit', sans-serif;
  background: var(--darker);
  color: var(--soft-white);
  overflow-x: hidden;
  min-height: 100vh;
}

.pixel-font { font-family: 'Space Mono', monospace; }

/* Pixel grid background */
.pixel-bg {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background-image:
    linear-gradient(rgba(155, 93, 229, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(155, 93, 229, 0.03) 1px, transparent 1px);
  background-size: 24px 24px;
  z-index: 0;
  pointer-events: none;
}

/* Float shapes */
.float-shape {
  position: fixed;
  border-radius: 4px;
  opacity: 0.1;
  animation: float 8s ease-in-out infinite;
  pointer-events: none;
  z-index: 0;
}
.float-shape:nth-child(2) { width: 12px; height: 12px; background: var(--pink); top: 15%; left: 8%; animation-delay: 0s; }
.float-shape:nth-child(3) { width: 8px; height: 8px; background: var(--lavender); top: 25%; right: 12%; animation-delay: 2s; }
.float-shape:nth-child(4) { width: 16px; height: 16px; background: var(--pixel-green); top: 60%; left: 5%; animation-delay: 4s; }
.float-shape:nth-child(5) { width: 10px; height: 10px; background: var(--blush); top: 70%; right: 8%; animation-delay: 1s; }
.float-shape:nth-child(6) { width: 14px; height: 14px; background: var(--purple); top: 40%; left: 85%; animation-delay: 3s; }

@keyframes float {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-20px) rotate(45deg); }
}

/* ==================== NAV ==================== */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 0.9rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(13, 5, 24, 0.9);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(155, 93, 229, 0.1);
}

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

.logo {
  font-size: 1.4rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--pink), var(--lavender));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-decoration: none;
  letter-spacing: -0.5px;
}

.logo-pixel {
  display: inline-block;
  width: 8px;
  height: 8px;
  background: var(--pink);
  border-radius: 2px;
  margin-right: 2px;
  vertical-align: middle;
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.nav-links {
  display: flex;
  gap: 0.3rem;
}

.nav-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.85rem;
  padding: 0.4rem 0.8rem;
  border-radius: 8px;
  transition: all 0.2s;
  font-weight: 500;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--soft-white);
  background: rgba(255, 107, 157, 0.1);
}

.nav-links a.active {
  color: var(--pink);
}

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

.cart-btn {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--soft-white);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 500;
  padding: 0.5rem 1rem;
  border-radius: 10px;
  border: 1px solid var(--card-border);
  background: var(--card-bg);
  transition: all 0.2s;
}

.cart-btn:hover {
  border-color: var(--pink);
  background: rgba(255, 107, 157, 0.1);
}

.cart-btn svg {
  width: 18px;
  height: 18px;
}

.cart-count {
  position: absolute;
  top: -6px;
  right: -6px;
  background: var(--pink);
  color: white;
  font-size: 0.65rem;
  font-weight: 700;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  display: none;
}

.cart-count.show { display: flex; }

/* ==================== PAGE WRAPPER ==================== */
.page {
  position: relative;
  z-index: 1;
  padding-top: 70px;
  min-height: 100vh;
}

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

/* ==================== PAGE HEADER ==================== */
.page-header {
  padding: 3rem 0 2rem;
}

.page-header h1 {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  letter-spacing: -1px;
  background: linear-gradient(135deg, var(--soft-white), var(--blush));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.page-header p {
  color: var(--text-muted);
  margin-top: 0.5rem;
  font-size: 1.05rem;
}

/* ==================== CATEGORY FILTERS ==================== */
.filters {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.filter-btn {
  font-family: 'Space Mono', monospace;
  font-size: 0.75rem;
  padding: 0.5rem 1.2rem;
  border-radius: 20px;
  border: 1px solid var(--card-border);
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.filter-btn:hover {
  border-color: rgba(255, 107, 157, 0.4);
  color: var(--soft-white);
}

.filter-btn.active {
  background: linear-gradient(135deg, var(--pink), var(--purple));
  border-color: transparent;
  color: white;
  font-weight: 700;
}

/* Search */
.search-wrap {
  position: relative;
  margin-bottom: 2rem;
  max-width: 400px;
}

.search-wrap input {
  width: 100%;
  padding: 0.7rem 1rem 0.7rem 2.5rem;
  border-radius: 12px;
  border: 1px solid var(--card-border);
  background: var(--card-bg);
  color: var(--soft-white);
  font-family: 'Outfit', sans-serif;
  font-size: 0.9rem;
  outline: none;
  transition: border-color 0.2s;
}

.search-wrap input::placeholder { color: var(--text-faint); }
.search-wrap input:focus { border-color: var(--pink); }

.search-wrap svg {
  position: absolute;
  left: 0.8rem;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  color: var(--text-faint);
}

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

.product-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 16px;
  overflow: hidden;
  transition: transform 0.3s, border-color 0.3s, box-shadow 0.3s;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  display: block;
}

.product-card:hover {
  transform: translateY(-6px);
  border-color: rgba(255, 107, 157, 0.3);
  box-shadow: 0 12px 40px rgba(255, 107, 157, 0.1);
}

.product-image {
  height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 4rem;
  position: relative;
  overflow: hidden;
}

.product-image::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 40px;
  background: linear-gradient(transparent, rgba(13, 5, 24, 0.8));
}

.product-info {
  padding: 1.2rem 1.4rem 1.4rem;
}

.product-category-tag {
  font-family: 'Space Mono', monospace;
  font-size: 0.6rem;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--lavender);
  margin-bottom: 0.5rem;
  display: block;
}

.product-name {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  line-height: 1.3;
}

.product-price {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.price-current {
  font-family: 'Space Mono', monospace;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--pink);
}

.price-compare {
  font-family: 'Space Mono', monospace;
  font-size: 0.8rem;
  color: var(--text-faint);
  text-decoration: line-through;
}

.featured-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  background: linear-gradient(135deg, var(--pink), var(--purple));
  color: white;
  font-family: 'Space Mono', monospace;
  font-size: 0.6rem;
  font-weight: 700;
  padding: 0.3rem 0.6rem;
  border-radius: 6px;
  letter-spacing: 1px;
  text-transform: uppercase;
  z-index: 2;
}

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

.detail-image {
  height: 400px;
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 8rem;
  position: relative;
  overflow: hidden;
  border: 1px solid var(--card-border);
}

.detail-info h1 {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  margin-bottom: 0.5rem;
}

.detail-category {
  font-family: 'Space Mono', monospace;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--lavender);
  margin-bottom: 1.5rem;
}

.detail-price {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin-bottom: 1.5rem;
}

.detail-price .price-current {
  font-size: 1.8rem;
}

.detail-price .price-compare {
  font-size: 1.1rem;
}

.detail-description {
  color: var(--text-muted);
  line-height: 1.8;
  font-size: 1.05rem;
  margin-bottom: 2rem;
}

.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 2rem;
}

.detail-tags span {
  font-family: 'Space Mono', monospace;
  font-size: 0.65rem;
  padding: 0.3rem 0.8rem;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-muted);
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.qty-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.qty-control {
  display: flex;
  align-items: center;
  border: 1px solid var(--card-border);
  border-radius: 10px;
  overflow: hidden;
}

.qty-btn {
  width: 40px;
  height: 40px;
  background: var(--card-bg);
  border: none;
  color: var(--soft-white);
  font-size: 1.2rem;
  cursor: pointer;
  transition: background 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.qty-btn:hover { background: rgba(255, 107, 157, 0.15); }

.qty-value {
  width: 50px;
  text-align: center;
  font-family: 'Space Mono', monospace;
  font-size: 1rem;
  font-weight: 700;
  background: transparent;
  border: none;
  color: var(--soft-white);
}

.qty-label {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* ==================== BUTTONS ==================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.9rem 2rem;
  border-radius: 12px;
  border: none;
  font-family: 'Outfit', sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--pink), var(--purple));
  color: white;
  box-shadow: 0 4px 20px rgba(255, 107, 157, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 25px rgba(255, 107, 157, 0.4);
}

.btn-secondary {
  background: var(--card-bg);
  color: var(--soft-white);
  border: 1px solid var(--card-border);
}

.btn-secondary:hover {
  border-color: var(--pink);
  background: rgba(255, 107, 157, 0.1);
}

.btn-lg {
  padding: 1rem 2.5rem;
  font-size: 1.05rem;
  border-radius: 14px;
}

.btn-full { width: 100%; }

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
}

/* ==================== CART ==================== */
.cart-container {
  max-width: 800px;
}

.cart-items {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 2rem;
}

.cart-item {
  display: grid;
  grid-template-columns: 80px 1fr auto auto;
  gap: 1.2rem;
  align-items: center;
  padding: 1.2rem;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 14px;
  transition: border-color 0.2s;
}

.cart-item:hover {
  border-color: rgba(155, 93, 229, 0.3);
}

.cart-item-image {
  width: 80px;
  height: 80px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
}

.cart-item-info h3 {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 0.3rem;
}

.cart-item-info .cart-item-price {
  font-family: 'Space Mono', monospace;
  font-size: 0.85rem;
  color: var(--pink);
}

.cart-item-qty {
  display: flex;
  align-items: center;
  gap: 0;
}

.cart-item-qty .qty-btn {
  width: 32px;
  height: 32px;
  font-size: 1rem;
}

.cart-item-qty .qty-value {
  width: 36px;
  font-size: 0.85rem;
}

.cart-item-total {
  font-family: 'Space Mono', monospace;
  font-size: 1rem;
  font-weight: 700;
  color: var(--soft-white);
  min-width: 70px;
  text-align: right;
}

.cart-remove {
  background: none;
  border: none;
  color: var(--text-faint);
  cursor: pointer;
  padding: 0.3rem;
  border-radius: 6px;
  transition: all 0.2s;
  font-size: 1rem;
}

.cart-remove:hover { color: #ff4757; background: rgba(255, 71, 87, 0.1); }

/* Cart summary */
.cart-summary {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 16px;
  padding: 2rem;
}

.cart-summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.6rem 0;
  font-size: 0.95rem;
}

.cart-summary-row.total {
  border-top: 1px solid var(--card-border);
  margin-top: 0.5rem;
  padding-top: 1rem;
  font-size: 1.15rem;
  font-weight: 700;
}

.cart-summary-row.total .amount {
  font-family: 'Space Mono', monospace;
  color: var(--pink);
  font-size: 1.3rem;
}

.cart-summary .label { color: var(--text-muted); }
.cart-summary .amount { font-family: 'Space Mono', monospace; font-weight: 600; }

.cart-actions {
  display: flex;
  gap: 1rem;
  margin-top: 1.5rem;
}

/* Empty states */
.empty-state {
  text-align: center;
  padding: 6rem 2rem;
}

.empty-state .emoji {
  font-size: 4rem;
  margin-bottom: 1rem;
  display: block;
}

.empty-state h2 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.empty-state p {
  color: var(--text-muted);
  margin-bottom: 2rem;
}

/* ==================== SUCCESS PAGE ==================== */
.success-page {
  text-align: center;
  padding: 6rem 2rem;
  max-width: 600px;
  margin: 0 auto;
}

.success-page .check-circle {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--pixel-green), var(--lavender));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  margin: 0 auto 2rem;
  animation: popIn 0.5s ease;
}

@keyframes popIn {
  0% { transform: scale(0); }
  70% { transform: scale(1.1); }
  100% { transform: scale(1); }
}

.success-page h1 {
  font-size: 2.5rem;
  font-weight: 800;
  margin-bottom: 1rem;
  background: linear-gradient(135deg, var(--pixel-green), var(--lavender));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.success-page p {
  color: var(--text-muted);
  font-size: 1.1rem;
  line-height: 1.7;
  margin-bottom: 2rem;
}

/* ==================== FOOTER ==================== */
.store-footer {
  padding: 3rem 2rem;
  text-align: center;
  border-top: 1px solid rgba(155, 93, 229, 0.1);
  margin-top: 4rem;
}

.store-footer p {
  font-family: 'Space Mono', monospace;
  font-size: 0.7rem;
  color: var(--text-faint);
  letter-spacing: 1px;
}

/* ==================== LOADING ==================== */
.loading-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.5rem;
}

.skeleton-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 16px;
  overflow: hidden;
}

.skeleton-image {
  height: 200px;
  background: linear-gradient(90deg, rgba(155, 93, 229, 0.05) 0%, rgba(155, 93, 229, 0.1) 50%, rgba(155, 93, 229, 0.05) 100%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}

.skeleton-info { padding: 1.2rem 1.4rem; }

.skeleton-line {
  height: 12px;
  border-radius: 6px;
  background: rgba(155, 93, 229, 0.08);
  margin-bottom: 0.8rem;
  animation: shimmer 1.5s infinite;
}

.skeleton-line:last-child { width: 50%; margin-bottom: 0; }

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

/* ==================== TOAST ==================== */
.toast {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  background: var(--dark);
  border: 1px solid var(--pink);
  color: var(--soft-white);
  padding: 1rem 1.5rem;
  border-radius: 12px;
  font-size: 0.9rem;
  font-weight: 500;
  z-index: 200;
  transform: translateY(100px);
  opacity: 0;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
}

.toast.show {
  transform: translateY(0);
  opacity: 1;
}

/* ==================== BACK LINK ==================== */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.85rem;
  margin-bottom: 1.5rem;
  transition: color 0.2s;
}

.back-link:hover { color: var(--pink); }

/* ==================== RESPONSIVE ==================== */
@media (max-width: 768px) {
  nav { padding: 0.8rem 1rem; }
  .nav-links { display: none; }
  .container { padding: 0 1rem; }
  .product-grid { grid-template-columns: repeat(2, 1fr); gap: 0.8rem; }
  .product-image { height: 150px; font-size: 3rem; }
  .product-info { padding: 0.8rem 1rem 1rem; }
  .product-name { font-size: 0.85rem; }
  .price-current { font-size: 0.95rem; }

  .product-detail { grid-template-columns: 1fr; gap: 1.5rem; }
  .detail-image { height: 280px; font-size: 6rem; }

  .cart-item { grid-template-columns: 60px 1fr auto; gap: 0.8rem; }
  .cart-item-total { display: none; }
  .cart-item-image { width: 60px; height: 60px; font-size: 1.5rem; }

  .cart-actions { flex-direction: column; }
  .filters { gap: 0.3rem; }
  .filter-btn { padding: 0.4rem 0.8rem; font-size: 0.65rem; }
}

@media (max-width: 480px) {
  .product-grid { grid-template-columns: repeat(2, 1fr); gap: 0.6rem; }
  .product-image { height: 130px; font-size: 2.5rem; }
  .product-info { padding: 0.6rem 0.8rem 0.8rem; }
  .product-name { font-size: 0.8rem; }
  .price-current { font-size: 0.85rem; }
  .price-compare { display: none; }
}

/* Mobile nav menu */
.nav-menu-btn {
  display: none;
  background: none;
  border: none;
  color: var(--soft-white);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0.3rem;
}

@media (max-width: 768px) {
  .nav-menu-btn { display: block; }
}
