/* ═══════════════════════════════════════════════════════
   PakaloloPress Design System
   ═══════════════════════════════════════════════════════ */

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

:root {
  --deep-green: #0d1f17;
  --jungle: #1a3a2a;
  --palm: #2d5a3d;
  --coral: #ff6b4a;
  --sunset: #ff9a6c;
  --sand: #f5efe6;
  --cream: #faf7f2;
  --gold: #d4a843;
  --ocean: #1a4a5a;
  --smoke: rgba(255,255,255,0.06);
  --border: rgba(255,255,255,0.08);
  --text-muted: rgba(245,239,230,0.5);
  --text-secondary: rgba(245,239,230,0.7);
}

body {
  font-family: 'Outfit', sans-serif;
  background: var(--deep-green);
  color: var(--sand);
  overflow-x: hidden;
  line-height: 1.6;
  min-height: 100vh;
}

body::before {
  content: '';
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.03'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 1000;
}

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

/* ─── Navigation ──────────────────────────────────────── */

.store-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 40px;
  background: rgba(13,31,23,0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}

.nav-brand {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--sand);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav-links a {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: color 0.2s;
}

.nav-links a:hover {
  color: var(--coral);
}

.cart-link {
  position: relative;
  display: flex;
  align-items: center;
  gap: 6px;
}

.cart-link svg {
  width: 20px;
  height: 20px;
}

.cart-badge {
  position: absolute;
  top: -8px;
  right: -10px;
  background: var(--coral);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: scale(0);
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.cart-badge.visible {
  opacity: 1;
  transform: scale(1);
}

/* ─── Page Container ──────────────────────────────────── */

.page-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px;
  min-height: calc(100vh - 140px);
}

/* ─── Page Header ─────────────────────────────────────── */

.page-header {
  margin-bottom: 48px;
}

.page-header h1 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: 12px;
  letter-spacing: -0.02em;
}

.page-header p {
  font-size: 1.1rem;
  color: var(--text-muted);
  max-width: 500px;
}

/* ─── Category Filters ────────────────────────────────── */

.category-filters {
  display: flex;
  gap: 8px;
  margin-bottom: 40px;
  flex-wrap: wrap;
}

.filter-btn {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 10px 20px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s;
}

.filter-btn:hover {
  border-color: rgba(255,107,74,0.3);
  color: var(--sand);
}

.filter-btn.active {
  background: var(--coral);
  border-color: var(--coral);
  color: #fff;
}

/* ─── Product Grid ────────────────────────────────────── */

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
}

.product-card {
  background: var(--smoke);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  transition: all 0.3s ease;
  cursor: pointer;
  position: relative;
}

.product-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--coral), var(--gold));
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 2;
}

.product-card:hover::before {
  opacity: 1;
}

.product-card:hover {
  border-color: rgba(255,107,74,0.15);
  transform: translateY(-4px);
}

.product-card-image {
  width: 100%;
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 4rem;
  position: relative;
  overflow: hidden;
}

.product-card-image .bg-pattern {
  position: absolute;
  inset: 0;
  opacity: 0.15;
  background-image:
    radial-gradient(circle at 20% 30%, rgba(255,255,255,0.1) 0%, transparent 50%),
    radial-gradient(circle at 80% 70%, rgba(255,255,255,0.08) 0%, transparent 50%);
}

.product-card-image .emoji {
  position: relative;
  z-index: 1;
  filter: drop-shadow(0 4px 12px rgba(0,0,0,0.3));
}

.product-card-info {
  padding: 20px 24px 24px;
}

.product-card-category {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--coral);
  margin-bottom: 8px;
}

.product-card-name {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--sand);
  margin-bottom: 4px;
  line-height: 1.3;
}

.product-card-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 12px;
  line-height: 1.5;
}

.product-card-price {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--sand);
}

.product-card-price .compare {
  font-size: 0.9rem;
  color: var(--text-muted);
  text-decoration: line-through;
  margin-left: 8px;
  font-weight: 400;
}

.featured-badge {
  position: absolute;
  top: 16px;
  right: 16px;
  background: var(--gold);
  color: var(--deep-green);
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 4px;
  z-index: 2;
}

/* ─── Product Detail ──────────────────────────────────── */

.product-detail {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: start;
}

.product-image-main {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 8rem;
  position: relative;
  overflow: hidden;
  border: 1px solid var(--border);
}

.product-image-main .bg-pattern {
  position: absolute;
  inset: 0;
  opacity: 0.12;
  background-image:
    radial-gradient(circle at 20% 30%, rgba(255,255,255,0.1) 0%, transparent 50%),
    radial-gradient(circle at 80% 70%, rgba(255,255,255,0.08) 0%, transparent 50%);
}

.product-image-main .emoji {
  position: relative;
  z-index: 1;
  filter: drop-shadow(0 8px 24px rgba(0,0,0,0.4));
}

.product-info {
  padding-top: 10px;
}

.product-breadcrumb {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.product-breadcrumb a {
  color: var(--text-secondary);
  transition: color 0.2s;
}

.product-breadcrumb a:hover {
  color: var(--coral);
}

.product-info h1 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(1.8rem, 3vw, 2.5rem);
  font-weight: 700;
  line-height: 1.15;
  margin-bottom: 8px;
  letter-spacing: -0.02em;
}

.product-info .category-tag {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--coral);
  margin-bottom: 16px;
  display: inline-block;
}

.product-price-large {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 2rem;
  font-weight: 700;
  color: var(--sand);
  margin-bottom: 24px;
}

.product-description {
  font-size: 1rem;
  line-height: 1.8;
  color: var(--text-secondary);
  margin-bottom: 32px;
  border-top: 1px solid var(--border);
  padding-top: 24px;
}

/* Size Selector */

.size-selector {
  margin-bottom: 28px;
}

.size-selector label {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-secondary);
  display: block;
  margin-bottom: 12px;
}

.size-options {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.size-btn {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  min-width: 48px;
  height: 44px;
  padding: 0 16px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.size-btn:hover {
  border-color: var(--sand);
  color: var(--sand);
}

.size-btn.selected {
  background: var(--sand);
  border-color: var(--sand);
  color: var(--deep-green);
}

/* Quantity */

.quantity-selector {
  margin-bottom: 28px;
}

.quantity-selector label {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-secondary);
  display: block;
  margin-bottom: 12px;
}

.qty-controls {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}

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

.qty-btn:hover {
  background: var(--smoke);
}

.qty-value {
  width: 48px;
  text-align: center;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  color: var(--sand);
  border-left: 1px solid var(--border);
  border-right: 1px solid var(--border);
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Add to Cart Button */

.btn-add-cart {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  width: 100%;
  padding: 16px 32px;
  background: var(--coral);
  color: #fff;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.3s;
  position: relative;
  overflow: hidden;
}

.btn-add-cart:hover {
  background: #e55a3b;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(255,107,74,0.3);
}

.btn-add-cart:active {
  transform: translateY(0);
}

.btn-add-cart.added {
  background: var(--palm);
}

/* ─── Cart Page ───────────────────────────────────────── */

.cart-items {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 40px;
}

.cart-item {
  display: grid;
  grid-template-columns: 80px 1fr auto auto;
  gap: 20px;
  align-items: center;
  padding: 20px;
  background: var(--smoke);
  border: 1px solid var(--border);
  border-radius: 12px;
}

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

.cart-item-details h3 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  color: var(--sand);
  margin-bottom: 4px;
}

.cart-item-details .item-meta {
  font-size: 0.85rem;
  color: var(--text-muted);
}

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

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

.cart-item-qty .qty-value {
  width: 40px;
  height: 36px;
  font-size: 0.9rem;
  border-left: 1px solid var(--border);
  border-right: 1px solid var(--border);
}

.cart-item-price {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--sand);
  min-width: 70px;
  text-align: right;
}

.cart-item-remove {
  position: absolute;
  top: 12px;
  right: 12px;
}

.remove-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 0.8rem;
  padding: 4px 8px;
  border-radius: 4px;
  transition: all 0.2s;
}

.remove-btn:hover {
  color: var(--coral);
  background: rgba(255,107,74,0.1);
}

/* Cart Summary */

.cart-summary {
  max-width: 400px;
  margin-left: auto;
  padding: 32px;
  background: var(--smoke);
  border: 1px solid var(--border);
  border-radius: 12px;
}

.cart-summary-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 12px;
  font-size: 0.95rem;
  color: var(--text-secondary);
}

.cart-summary-row.total {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--sand);
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  margin-bottom: 24px;
}

.btn-checkout {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  width: 100%;
  padding: 16px 32px;
  background: var(--coral);
  color: #fff;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.3s;
}

.btn-checkout:hover {
  background: #e55a3b;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(255,107,74,0.3);
}

.btn-checkout:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.cart-empty {
  text-align: center;
  padding: 80px 40px;
}

.cart-empty .empty-icon {
  font-size: 4rem;
  margin-bottom: 16px;
  opacity: 0.3;
}

.cart-empty h2 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 8px;
}

.cart-empty p {
  color: var(--text-muted);
  margin-bottom: 24px;
}

.btn-shop {
  display: inline-block;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 14px 28px;
  background: var(--coral);
  color: #fff;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s;
  text-decoration: none;
}

.btn-shop:hover {
  background: #e55a3b;
  transform: translateY(-2px);
}

/* ─── Success Page ────────────────────────────────────── */

.success-container {
  text-align: center;
  padding: 80px 40px;
  max-width: 600px;
  margin: 0 auto;
}

.success-icon {
  font-size: 4rem;
  margin-bottom: 24px;
}

.success-container h1 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 2.2rem;
  font-weight: 700;
  margin-bottom: 16px;
}

.success-container p {
  font-size: 1.1rem;
  color: var(--text-secondary);
  margin-bottom: 12px;
  line-height: 1.7;
}

.order-number {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  color: var(--gold);
  background: rgba(212,168,67,0.1);
  padding: 12px 24px;
  border-radius: 8px;
  display: inline-block;
  margin: 20px 0 32px;
  border: 1px solid rgba(212,168,67,0.2);
}

/* ─── Store Footer ────────────────────────────────────── */

.store-footer {
  padding: 40px;
  text-align: center;
  border-top: 1px solid rgba(255,255,255,0.04);
  background: #061210;
  margin-top: auto;
}

.store-footer p {
  font-size: 0.85rem;
  color: rgba(245,239,230,0.25);
  font-family: 'Space Grotesk', sans-serif;
}

/* ─── Toast Notification ──────────────────────────────── */

.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: var(--palm);
  color: var(--sand);
  padding: 14px 24px;
  border-radius: 10px;
  font-size: 0.9rem;
  font-weight: 500;
  box-shadow: 0 8px 32px rgba(0,0,0,0.4);
  z-index: 9999;
  transform: translateY(100px);
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  display: flex;
  align-items: center;
  gap: 8px;
}

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

/* ─── Loading State ───────────────────────────────────── */

.loading {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 80px;
  color: var(--text-muted);
}

.loading::after {
  content: '';
  width: 24px;
  height: 24px;
  border: 2px solid var(--border);
  border-top-color: var(--coral);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin-left: 12px;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ─── Responsive ──────────────────────────────────────── */

@media (max-width: 768px) {
  .store-nav {
    padding: 14px 20px;
  }

  .nav-links {
    gap: 20px;
  }

  .page-container {
    padding: 24px 20px;
  }

  .product-detail {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .product-grid {
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  }

  .cart-item {
    grid-template-columns: 60px 1fr;
    gap: 12px;
    position: relative;
    padding-bottom: 48px;
  }

  .cart-item-image {
    width: 60px;
    height: 60px;
    font-size: 1.5rem;
  }

  .cart-item-qty {
    position: absolute;
    bottom: 16px;
    left: 20px;
  }

  .cart-item-price {
    position: absolute;
    bottom: 20px;
    right: 20px;
  }

  .cart-summary {
    margin-left: 0;
    max-width: 100%;
  }
}

@media (max-width: 480px) {
  .product-grid {
    grid-template-columns: 1fr;
  }

  .category-filters {
    gap: 6px;
  }

  .filter-btn {
    padding: 8px 14px;
    font-size: 0.75rem;
  }
}
