/* ═══════════════════════════════════════════════════════════════════
   SmartShelf Design System
   Based on the landing page design tokens
   ═══════════════════════════════════════════════════════════════════ */

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

:root {
  --ink: #0a0a0a;
  --paper: #fafaf8;
  --accent: #1a6b3c;
  --accent-dark: #0d4a28;
  --accent-light: #e8f5ee;
  --muted: #6b6b6b;
  --border: #e0e0dc;
  --warm: #f5f0e8;
  --white: #ffffff;
  --radius: 14px;
  --radius-sm: 8px;
  --shadow: 0 2px 12px rgba(0,0,0,0.06);
  --shadow-lg: 0 8px 40px rgba(0,0,0,0.08);
}

body {
  font-family: 'DM Sans', sans-serif;
  color: var(--ink);
  background: var(--paper);
  line-height: 1.6;
  overflow-x: hidden;
}

h1, h2, h3, h4 {
  font-family: 'Space Grotesk', sans-serif;
  line-height: 1.15;
}

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

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

nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 48px;
  max-width: 1200px;
  margin: 0 auto;
}

.logo {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 1.5rem;
  color: var(--ink);
  letter-spacing: -0.5px;
}

.logo span {
  color: var(--accent);
}

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

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

.nav-links a:hover,
.nav-links a.active {
  color: var(--ink);
}

.nav-cta {
  background: var(--ink) !important;
  color: var(--white) !important;
  padding: 10px 24px;
  border-radius: 10px;
  font-weight: 600 !important;
  font-size: 0.9rem !important;
  transition: background 0.2s !important;
}

.nav-cta:hover {
  background: var(--accent) !important;
}

/* ─── Store Hero ───────────────────────────────────────────────── */

.store-hero {
  max-width: 1200px;
  margin: 0 auto;
  padding: 64px 48px 48px;
  text-align: center;
}

.store-hero h1 {
  font-size: 3rem;
  font-weight: 700;
  letter-spacing: -2px;
  margin-bottom: 16px;
}

.store-hero h1 em {
  font-style: normal;
  color: var(--accent);
}

.store-hero-sub {
  font-size: 1.15rem;
  color: var(--muted);
  max-width: 560px;
  margin: 0 auto;
  line-height: 1.7;
}

/* ─── Store Section ────────────────────────────────────────────── */

.store-section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 32px 48px 48px;
}

.section-header {
  margin-bottom: 32px;
}

.section-header h2 {
  font-size: 1.8rem;
  letter-spacing: -0.5px;
  margin-bottom: 8px;
}

.section-header p {
  color: var(--muted);
  font-size: 1rem;
}

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

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

.product-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
  display: flex;
  flex-direction: column;
}

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

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

.product-card-icon {
  font-size: 4rem;
  opacity: 0.6;
}

.badge {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.badge-digital {
  background: var(--accent);
  color: var(--white);
}

.badge-affiliate {
  background: var(--white);
  color: var(--ink);
  border: 1px solid var(--border);
}

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

.product-card-brand {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--accent);
  margin-bottom: 6px;
}

.product-card-body h3 {
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: -0.3px;
  margin-bottom: 8px;
  line-height: 1.3;
}

.product-card-body p {
  font-size: 0.88rem;
  color: var(--muted);
  line-height: 1.5;
  flex: 1;
  margin-bottom: 16px;
}

.product-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

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

.product-card-rating {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.8rem;
}

/* ─── Stars ────────────────────────────────────────────────────── */

.stars {
  display: inline-flex;
  gap: 1px;
}

.star-filled {
  color: #f59e0b;
}

.star-half {
  color: #f59e0b;
  opacity: 0.6;
}

.star-empty {
  color: #d1d5db;
}

.review-count {
  color: var(--muted);
  font-size: 0.8rem;
}

/* ─── Trust Section ────────────────────────────────────────────── */

.store-trust {
  max-width: 1200px;
  margin: 0 auto;
  padding: 48px;
}

.trust-items {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  background: var(--warm);
  border-radius: var(--radius);
  padding: 40px;
}

.trust-item {
  text-align: center;
}

.trust-icon {
  font-size: 2rem;
  display: block;
  margin-bottom: 12px;
}

.trust-item h4 {
  font-size: 1rem;
  margin-bottom: 6px;
}

.trust-item p {
  font-size: 0.85rem;
  color: var(--muted);
  line-height: 1.5;
}

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

.product-detail {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px 48px 0;
}

.product-breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 32px;
}

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

.product-breadcrumb span {
  color: var(--border);
}

.product-layout {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 56px;
  align-items: start;
}

.product-image-main {
  border-radius: var(--radius);
  aspect-ratio: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  position: relative;
}

.product-image-icon {
  font-size: 6rem;
  opacity: 0.7;
}

.product-image-label {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 600;
  font-size: 1.1rem;
  color: white;
  opacity: 0.8;
}

.product-brand-tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--accent);
  background: var(--accent-light);
  padding: 5px 14px;
  border-radius: 20px;
  margin-bottom: 12px;
}

.product-info-col h1 {
  font-size: 2.2rem;
  font-weight: 700;
  letter-spacing: -1px;
  margin-bottom: 16px;
}

.product-meta {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-bottom: 20px;
}

.product-rating {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.9rem;
}

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

.product-short-desc {
  font-size: 1.05rem;
  color: var(--muted);
  line-height: 1.7;
  margin-bottom: 24px;
}

.product-features-quick {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 32px;
}

.feature-tag {
  background: var(--accent-light);
  color: var(--accent-dark);
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  font-weight: 500;
}

/* ─── CTA Buttons ──────────────────────────────────────────────── */

.product-cta {
  display: inline-block;
  padding: 16px 40px;
  border-radius: 12px;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 1.1rem;
  text-align: center;
  transition: all 0.2s;
  cursor: pointer;
  border: none;
}

.cta-buy {
  background: var(--accent);
  color: var(--white);
}

.cta-buy:hover {
  background: var(--accent-dark);
  transform: translateY(-1px);
  box-shadow: 0 4px 20px rgba(26, 107, 60, 0.3);
}

.cta-affiliate {
  background: var(--ink);
  color: var(--white);
}

.cta-affiliate:hover {
  background: #1a1a1a;
  transform: translateY(-1px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.cta-note {
  font-size: 0.82rem;
  color: var(--muted);
  margin-top: 12px;
}

/* ─── Product Details Section ──────────────────────────────────── */

.product-details-section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 48px;
}

.detail-block {
  margin-bottom: 40px;
}

.detail-block h2 {
  font-size: 1.6rem;
  letter-spacing: -0.5px;
  margin-bottom: 20px;
}

.product-description p {
  color: var(--muted);
  line-height: 1.8;
  margin-bottom: 12px;
}

.pros-cons-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  margin-bottom: 40px;
}

.pros-block, .cons-block {
  padding: 28px;
  border-radius: var(--radius);
}

.pros-block {
  background: var(--accent-light);
}

.cons-block {
  background: #fef3cd;
}

.pros-block h3, .cons-block h3 {
  font-size: 1.05rem;
  margin-bottom: 16px;
}

.pros-block ul, .cons-block ul {
  list-style: none;
}

.pros-block li, .cons-block li {
  padding: 8px 0;
  padding-left: 8px;
  font-size: 0.92rem;
  color: var(--ink);
  line-height: 1.5;
}

.pros-block li::before {
  content: '+ ';
  color: var(--accent);
  font-weight: 700;
}

.cons-block li::before {
  content: '- ';
  color: #d97706;
  font-weight: 700;
}

/* ─── Specifications ───────────────────────────────────────────── */

.specs-block {
  margin-bottom: 40px;
}

.specs-block h3 {
  font-size: 1.2rem;
  margin-bottom: 16px;
}

.specs-table {
  width: 100%;
  border-collapse: collapse;
}

.specs-table tr {
  border-bottom: 1px solid var(--border);
}

.specs-table td {
  padding: 12px 16px;
  font-size: 0.9rem;
}

.specs-table td:first-child {
  font-weight: 600;
  color: var(--ink);
  width: 40%;
}

.specs-table td:last-child {
  color: var(--muted);
}

/* ─── Related Products ─────────────────────────────────────────── */

.related-section {
  padding-top: 0;
}

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

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

.success-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 48px;
  box-shadow: var(--shadow-lg);
}

.success-icon {
  font-size: 3rem;
  margin-bottom: 16px;
}

.success-card h1 {
  font-size: 2rem;
  letter-spacing: -1px;
  margin-bottom: 12px;
}

.success-card > p {
  color: var(--muted);
  margin-bottom: 24px;
}

.success-details {
  background: var(--accent-light);
  border-radius: var(--radius-sm);
  padding: 20px;
  margin-bottom: 24px;
}

.success-detail-row {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  font-size: 0.9rem;
}

.success-detail-row span:first-child {
  color: var(--muted);
}

.success-detail-row span:last-child {
  font-weight: 600;
}

.success-note {
  font-size: 0.82rem;
  color: var(--muted);
  margin-bottom: 24px;
}

/* ─── Error Page ───────────────────────────────────────────────── */

.error-page {
  max-width: 600px;
  margin: 0 auto;
  padding: 120px 48px;
  text-align: center;
}

.error-page h1 {
  font-size: 2rem;
  margin-bottom: 12px;
}

.error-page p {
  color: var(--muted);
}

.error-page a {
  color: var(--accent);
  font-weight: 500;
}

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

footer {
  background: var(--ink);
  color: rgba(255,255,255,0.7);
  padding: 0;
}

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

.footer-brand .logo {
  color: white;
  margin-bottom: 12px;
  display: inline-block;
}

.footer-brand .logo span {
  color: #4ade80;
}

.footer-brand p {
  font-size: 0.9rem;
  line-height: 1.6;
  max-width: 320px;
}

.footer-links {
  display: flex;
  gap: 48px;
}

.footer-links h4 {
  color: white;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-bottom: 16px;
}

.footer-links a {
  display: block;
  font-size: 0.88rem;
  padding: 4px 0;
  color: rgba(255,255,255,0.6);
  transition: color 0.2s;
}

.footer-links a:hover {
  color: white;
}

.footer-bottom {
  text-align: center;
  padding: 24px 48px;
  font-size: 0.8rem;
  color: rgba(255,255,255,0.4);
  border-top: 1px solid rgba(255,255,255,0.08);
  max-width: 1200px;
  margin: 0 auto;
}

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

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

  .nav-links {
    gap: 16px;
  }

  .nav-links a:not(.nav-cta) {
    display: none;
  }

  .store-hero {
    padding: 40px 20px 32px;
  }

  .store-hero h1 {
    font-size: 2rem;
  }

  .store-section {
    padding: 24px 20px 32px;
  }

  .product-grid {
    grid-template-columns: 1fr;
  }

  .trust-items {
    grid-template-columns: 1fr;
    padding: 24px;
    gap: 24px;
  }

  .store-trust {
    padding: 24px 20px;
  }

  .product-detail {
    padding: 16px 20px 0;
  }

  .product-layout {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .product-image-main {
    aspect-ratio: 16/10;
  }

  .product-info-col h1 {
    font-size: 1.6rem;
  }

  .product-price {
    font-size: 1.4rem;
  }

  .product-details-section {
    padding: 24px 20px;
  }

  .pros-cons-grid {
    grid-template-columns: 1fr;
  }

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

  .footer-links {
    gap: 32px;
  }

  .success-page {
    padding: 40px 20px;
  }

  .success-card {
    padding: 32px 20px;
  }
}

@media (max-width: 480px) {
  .store-hero h1 {
    font-size: 1.7rem;
  }

  .product-meta {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .product-features-quick {
    gap: 6px;
  }

  .feature-tag {
    font-size: 0.75rem;
    padding: 4px 10px;
  }

  .product-cta {
    width: 100%;
    text-align: center;
  }
}
