/* ═══════════════════════════════════════════════
   Recess Pieces Store — Shared Styles
   Brand: warm, playful, family-first
   ═══════════════════════════════════════════════ */

:root {
  --peach: #FFB088;
  --coral: #FF6B6B;
  --warm-cream: #FFF8F0;
  --deep-brown: #2D1810;
  --soft-gold: #E8A838;
  --sage: #8FAE7E;
  --lavender: #C4A8D8;
  --sky: #7EC8E3;
  --text-secondary: #5C3D2E;
  --border-light: rgba(45, 24, 16, 0.1);
  --shadow-sm: 0 2px 8px rgba(45, 24, 16, 0.06);
  --shadow-md: 0 4px 20px rgba(45, 24, 16, 0.1);
  --shadow-lg: 0 8px 40px rgba(45, 24, 16, 0.12);
  --radius-sm: 12px;
  --radius-md: 20px;
  --radius-lg: 28px;
  --radius-full: 100px;
}

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

body {
  font-family: 'DM Sans', sans-serif;
  color: var(--deep-brown);
  background: var(--warm-cream);
  overflow-x: hidden;
  min-height: 100vh;
}

/* ─── Floating Background ─────────────────────── */
.shapes-bg {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}
.shape {
  position: absolute;
  border-radius: 50%;
  opacity: 0.06;
  animation: float 20s infinite ease-in-out;
}
.shape-1 { width: 400px; height: 400px; background: var(--coral); top: -100px; right: -100px; }
.shape-2 { width: 300px; height: 300px; background: var(--sage); bottom: 10%; left: -80px; animation-delay: -5s; }
.shape-3 { width: 250px; height: 250px; background: var(--lavender); top: 40%; right: 5%; animation-delay: -10s; }
.shape-4 { width: 350px; height: 350px; background: var(--soft-gold); bottom: -50px; right: 30%; animation-delay: -15s; }

@keyframes float {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  33% { transform: translateY(-30px) rotate(5deg); }
  66% { transform: translateY(20px) rotate(-3deg); }
}

.content {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ─── Navigation ──────────────────────────────── */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 248, 240, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-light);
  padding: 0 24px;
}

.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.nav-logo {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--deep-brown);
  text-decoration: none;
  letter-spacing: -0.5px;
}

.nav-logo .accent {
  background: linear-gradient(135deg, var(--coral), var(--peach));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

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

.nav-link {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 14px;
  font-weight: 600;
  color: var(--deep-brown);
  text-decoration: none;
  padding: 8px 16px;
  border-radius: var(--radius-full);
  transition: all 0.2s ease;
  letter-spacing: 0.3px;
}

.nav-link:hover {
  background: rgba(45, 24, 16, 0.06);
}

.nav-link.active {
  background: var(--deep-brown);
  color: var(--warm-cream);
}

.nav-cart {
  position: relative;
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 14px;
  font-weight: 600;
  color: var(--deep-brown);
  text-decoration: none;
  padding: 8px 16px;
  border-radius: var(--radius-full);
  transition: all 0.2s ease;
  border: 2px solid var(--border-light);
}

.nav-cart:hover {
  border-color: var(--coral);
  color: var(--coral);
}

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

.cart-badge {
  background: var(--coral);
  color: white;
  font-size: 11px;
  font-weight: 700;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: absolute;
  top: -4px;
  right: -4px;
}

.cart-badge.hidden { display: none; }

/* ─── Page Header ─────────────────────────────── */
.page-header {
  text-align: center;
  padding: 60px 24px 40px;
}

.page-header h1 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(2.2rem, 5vw, 3.5rem);
  font-weight: 700;
  letter-spacing: -1.5px;
  line-height: 1.1;
  margin-bottom: 12px;
}

.page-header .subtitle {
  font-size: 1.1rem;
  color: var(--text-secondary);
  max-width: 500px;
  margin: 0 auto;
  line-height: 1.5;
}

/* ─── Category Filter ─────────────────────────── */
.category-filter {
  display: flex;
  justify-content: center;
  gap: 8px;
  padding: 0 24px 48px;
  flex-wrap: wrap;
}

.filter-btn {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 13px;
  font-weight: 600;
  padding: 8px 20px;
  border-radius: var(--radius-full);
  border: 2px solid var(--border-light);
  background: transparent;
  color: var(--deep-brown);
  cursor: pointer;
  transition: all 0.2s ease;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.filter-btn:hover {
  border-color: var(--deep-brown);
}

.filter-btn.active {
  background: var(--deep-brown);
  color: var(--warm-cream);
  border-color: var(--deep-brown);
}

/* ─── Product Grid ────────────────────────────── */
.product-grid {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px 80px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
}

.product-card {
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: white;
  box-shadow: var(--shadow-sm);
  transition: all 0.3s ease;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
}

.product-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
}

.product-card-image {
  height: 280px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.product-card-image .emoji-display {
  font-size: 80px;
  filter: drop-shadow(0 4px 12px rgba(0,0,0,0.1));
  transition: transform 0.3s ease;
}

.product-card:hover .emoji-display {
  transform: scale(1.1) rotate(-3deg);
}

.product-card-badge {
  position: absolute;
  top: 16px;
  left: 16px;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.9);
  color: var(--deep-brown);
  backdrop-filter: blur(10px);
}

.product-card-body {
  padding: 24px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

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

.product-card-name {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: -0.5px;
  margin-bottom: 6px;
}

.product-card-tagline {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 16px;
  flex: 1;
}

.product-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

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

.product-card-price .compare {
  font-size: 0.85rem;
  font-weight: 500;
  color: #999;
  text-decoration: line-through;
  margin-left: 8px;
}

.btn {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 13px;
  font-weight: 700;
  padding: 10px 24px;
  border-radius: var(--radius-full);
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  letter-spacing: 0.3px;
  white-space: nowrap;
}

.btn-primary {
  background: var(--deep-brown);
  color: var(--warm-cream);
}

.btn-primary:hover {
  background: #1A0E08;
  transform: translateY(-1px);
}

.btn-secondary {
  background: transparent;
  color: var(--deep-brown);
  border: 2px solid var(--border-light);
}

.btn-secondary:hover {
  border-color: var(--deep-brown);
}

.btn-coral {
  background: var(--coral);
  color: white;
}

.btn-coral:hover {
  background: #E55555;
  transform: translateY(-1px);
}

.btn-lg {
  font-size: 15px;
  padding: 14px 32px;
}

.btn-full {
  width: 100%;
  justify-content: center;
}

/* ─── Product Detail ──────────────────────────── */
.product-detail {
  max-width: 1100px;
  margin: 0 auto;
  padding: 40px 24px 80px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: start;
}

.product-image-section {
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.product-image-section .emoji-display {
  font-size: 140px;
  filter: drop-shadow(0 8px 24px rgba(0,0,0,0.1));
}

.product-info-section {
  padding: 20px 0;
}

.product-info-section .category-label {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--coral);
  margin-bottom: 12px;
}

.product-info-section h1 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 2.5rem;
  font-weight: 700;
  letter-spacing: -1px;
  line-height: 1.1;
  margin-bottom: 8px;
}

.product-info-section .tagline {
  font-size: 1.1rem;
  color: var(--text-secondary);
  margin-bottom: 24px;
}

.product-price-row {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 32px;
}

.product-price {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 2rem;
  font-weight: 700;
}

.product-compare-price {
  font-size: 1.1rem;
  color: #999;
  text-decoration: line-through;
}

.product-save-badge {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 12px;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  background: #E8F5E8;
  color: #2D6B2D;
}

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

.product-options {
  margin-bottom: 32px;
}

.option-group {
  margin-bottom: 20px;
}

.option-label {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.5px;
  margin-bottom: 10px;
  display: block;
}

.option-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.option-chip {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 13px;
  font-weight: 600;
  padding: 8px 18px;
  border-radius: var(--radius-full);
  border: 2px solid var(--border-light);
  background: transparent;
  color: var(--deep-brown);
  cursor: pointer;
  transition: all 0.2s ease;
}

.option-chip:hover {
  border-color: var(--deep-brown);
}

.option-chip.selected {
  background: var(--deep-brown);
  color: var(--warm-cream);
  border-color: var(--deep-brown);
}

.quantity-selector {
  display: flex;
  align-items: center;
  gap: 16px;
}

.qty-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 2px solid var(--border-light);
  background: transparent;
  color: var(--deep-brown);
  font-size: 18px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.qty-btn:hover {
  border-color: var(--deep-brown);
  background: var(--deep-brown);
  color: var(--warm-cream);
}

.qty-value {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.2rem;
  font-weight: 700;
  min-width: 40px;
  text-align: center;
}

.product-actions {
  display: flex;
  gap: 12px;
}

/* ─── Cart Page ───────────────────────────────── */
.cart-container {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 24px 80px;
}

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

.cart-empty .empty-icon {
  font-size: 64px;
  margin-bottom: 20px;
  display: block;
}

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

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

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

.cart-item {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 20px;
  background: white;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

.cart-item-image {
  width: 100px;
  height: 100px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.cart-item-image .emoji-display {
  font-size: 44px;
}

.cart-item-info {
  flex: 1;
  min-width: 0;
}

.cart-item-name {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: -0.3px;
  margin-bottom: 4px;
}

.cart-item-options {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.cart-item-price {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 1rem;
}

.cart-item-quantity {
  display: flex;
  align-items: center;
  gap: 12px;
}

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

.cart-item-remove {
  background: none;
  border: none;
  color: #ccc;
  cursor: pointer;
  padding: 8px;
  border-radius: 50%;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

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

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

/* Cart Summary */
.cart-summary {
  background: white;
  border-radius: var(--radius-md);
  padding: 32px;
  box-shadow: var(--shadow-sm);
}

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

.cart-summary-row.total {
  border-top: 2px solid var(--border-light);
  margin-top: 8px;
  padding-top: 20px;
}

.cart-summary-row.total span:last-child {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
}

.cart-summary .btn {
  margin-top: 20px;
}

.cart-summary-note {
  text-align: center;
  font-size: 0.8rem;
  color: #999;
  margin-top: 12px;
}

/* ─── Checkout Success ────────────────────────── */
.success-container {
  max-width: 600px;
  margin: 0 auto;
  padding: 80px 24px;
  text-align: center;
}

.success-icon {
  font-size: 80px;
  margin-bottom: 24px;
  display: block;
}

.success-container h1 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 2.5rem;
  font-weight: 700;
  letter-spacing: -1px;
  margin-bottom: 12px;
}

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

/* ─── Footer ──────────────────────────────────── */
.store-footer {
  background: var(--deep-brown);
  padding: 60px 24px;
  margin-top: auto;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 48px;
}

.footer-brand {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--peach);
  margin-bottom: 12px;
}

.footer-tagline {
  font-size: 0.9rem;
  color: #8B7060;
  line-height: 1.6;
}

.footer-heading {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: #8B7060;
  margin-bottom: 16px;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer-links a {
  color: #D4C4B0;
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.2s ease;
}

.footer-links a:hover {
  color: var(--peach);
}

.footer-bottom {
  max-width: 1200px;
  margin: 40px auto 0;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  text-align: center;
}

.footer-bottom p {
  font-size: 13px;
  color: #6B5040;
  font-family: 'Space Grotesk', sans-serif;
}

.footer-bottom .brand {
  font-weight: 700;
  color: var(--peach);
}

/* ─── Toast Notification ──────────────────────── */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: var(--deep-brown);
  color: var(--warm-cream);
  padding: 16px 24px;
  border-radius: var(--radius-md);
  font-family: 'Space Grotesk', sans-serif;
  font-size: 14px;
  font-weight: 600;
  box-shadow: var(--shadow-lg);
  z-index: 1000;
  transform: translateY(120%);
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: center;
  gap: 10px;
}

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

/* ─── Loading State ───────────────────────────── */
.loading-grid {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px 80px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
}

.skeleton-card {
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: white;
  box-shadow: var(--shadow-sm);
}

.skeleton-image {
  height: 280px;
  background: linear-gradient(110deg, #f0e8df 8%, #f5ede4 18%, #f0e8df 33%);
  background-size: 200% 100%;
  animation: shimmer 1.5s linear infinite;
}

.skeleton-body {
  padding: 24px;
}

.skeleton-line {
  height: 14px;
  border-radius: 7px;
  background: linear-gradient(110deg, #f0e8df 8%, #f5ede4 18%, #f0e8df 33%);
  background-size: 200% 100%;
  animation: shimmer 1.5s linear infinite;
  margin-bottom: 10px;
}

.skeleton-line.short { width: 60%; }
.skeleton-line.medium { width: 80%; }
.skeleton-line.price { width: 30%; height: 20px; margin-top: 16px; }

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

/* ─── Mobile Menu ─────────────────────────────── */
.nav-mobile-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  color: var(--deep-brown);
}

.nav-mobile-toggle svg {
  width: 24px;
  height: 24px;
}

/* ─── Responsive ──────────────────────────────── */
@media (max-width: 768px) {
  .nav-mobile-toggle {
    display: flex;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: rgba(255, 248, 240, 0.98);
    backdrop-filter: blur(20px);
    padding: 16px 24px;
    flex-direction: column;
    gap: 4px;
    border-bottom: 1px solid var(--border-light);
    box-shadow: var(--shadow-md);
  }

  .nav-links.open {
    display: flex;
  }

  .nav-link, .nav-cart {
    width: 100%;
    justify-content: center;
  }

  .product-grid, .loading-grid {
    grid-template-columns: 1fr;
    padding: 0 16px 60px;
  }

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

  .product-image-section {
    aspect-ratio: 4/3;
  }

  .product-info-section h1 {
    font-size: 2rem;
  }

  .product-actions {
    flex-direction: column;
  }

  .cart-item {
    flex-wrap: wrap;
  }

  .cart-item-image {
    width: 72px;
    height: 72px;
  }

  .footer-inner {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .page-header {
    padding: 40px 16px 24px;
  }

  .category-filter {
    padding: 0 16px 32px;
  }

  .toast {
    left: 16px;
    right: 16px;
    bottom: 16px;
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .product-card-image {
    height: 220px;
  }

  .product-card-body {
    padding: 16px;
  }

  .cart-summary {
    padding: 24px 16px;
  }
}
