/* Store styles — clean, professional light theme
   Extends the base layout. Light mode for digital product trust. */

/* Variables */
.store-root {
  --store-bg: #f8f7f4;
  --store-surface: #ffffff;
  --store-border: #e8e5e0;
  --store-text: #1a1a1a;
  --store-text-muted: #6b6b6b;
  --store-accent: #2563eb;
  --store-accent-hover: #1d4ed8;
  --store-success: #16a34a;
  --store-danger: #dc2626;
  --store-radius: 10px;
  --store-shadow: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --store-shadow-hover: 0 4px 12px rgba(0,0,0,0.08), 0 2px 4px rgba(0,0,0,0.04);
  font-family: 'DM Sans', system-ui, sans-serif;
  background: var(--store-bg);
  color: var(--store-text);
  min-height: 100vh;
}

/* Store nav */
.store-nav {
  background: var(--store-surface);
  border-bottom: 1px solid var(--store-border);
  padding: 0 40px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: var(--store-shadow);
}
.store-nav-brand {
  font-size: 18px;
  font-weight: 600;
  color: var(--store-text);
  text-decoration: none;
}
.store-nav-brand:hover { color: var(--store-accent); }
.store-nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
  list-style: none;
}
.store-nav-links a {
  font-size: 14px;
  color: var(--store-text-muted);
  text-decoration: none;
  transition: color 0.15s;
}
.store-nav-links a:hover { color: var(--store-text); }
.store-nav-cart {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 500;
  color: var(--store-text);
  text-decoration: none;
  background: var(--store-bg);
  border: 1px solid var(--store-border);
  border-radius: 8px;
  padding: 8px 16px;
  transition: all 0.15s;
}
.store-nav-cart:hover { background: var(--store-surface); border-color: var(--store-accent); }
.store-nav-cart .badge {
  background: var(--store-accent);
  color: white;
  border-radius: 10px;
  padding: 1px 7px;
  font-size: 11px;
  font-weight: 600;
}

/* Hero band — top product hero */
.store-hero-band {
  background: #1a2e1a;
  padding: 64px 40px;
  position: relative;
  overflow: hidden;
}
.store-hero-band::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
  pointer-events: none;
}
.store-hero-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 48px;
  align-items: center;
  position: relative;
  z-index: 1;
}
.store-hero-content { display: flex; flex-direction: column; }
.store-hero-format {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #86efac;
  margin-bottom: 12px;
}
.store-hero-title {
  font-size: 42px;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: #ffffff;
  margin: 0 0 16px;
  line-height: 1.15;
}
.store-hero-desc {
  font-size: 17px;
  color: rgba(255,255,255,0.7);
  line-height: 1.6;
  margin: 0 0 32px;
}
.store-hero-actions { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.btn-hero-buy {
  background: #ffffff;
  color: #1a2e1a;
  border: none;
  border-radius: 8px;
  padding: 14px 28px;
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.15s;
}
.btn-hero-buy:hover { background: #86efac; }
.btn-hero-details {
  color: rgba(255,255,255,0.65);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  border-bottom: 1px solid rgba(255,255,255,0.3);
  padding-bottom: 1px;
  transition: color 0.15s;
}
.btn-hero-details:hover { color: rgba(255,255,255,0.9); }
.store-hero-thumb {
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,0.4);
  aspect-ratio: 3/4;
}
.store-hero-thumb img { width: 100%; height: 100%; object-fit: cover; }
.store-hero-placeholder {
  background: rgba(255,255,255,0.08);
  display: flex;
  align-items: center;
  justify-content: center;
}
.store-hero-placeholder span { font-size: 48px; opacity: 0.6; }

/* Container */
.store-container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 40px;
}

/* Hero band */
.store-hero {
  background: var(--store-surface);
  border-bottom: 1px solid var(--store-border);
  padding: 80px 40px;
  text-align: center;
}
.store-hero h1 {
  font-size: 40px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
  color: var(--store-text);
}
.store-hero p {
  font-size: 18px;
  color: var(--store-text-muted);
  max-width: 540px;
  margin: 0 auto 32px;
  line-height: 1.6;
}
.store-hero .btn-primary {
  background: var(--store-accent);
  color: white;
  border: none;
  border-radius: 8px;
  padding: 14px 32px;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  display: inline-block;
  cursor: pointer;
  transition: background 0.15s;
}
.store-hero .btn-primary:hover { background: var(--store-accent-hover); }

/* Section */
.store-section {
  padding: 64px 40px;
}
.store-section h2 {
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-bottom: 32px;
}

/* Product grid */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 24px;
}
.product-card {
  background: var(--store-surface);
  border: 1px solid var(--store-border);
  border-radius: var(--store-radius);
  overflow: hidden;
  box-shadow: var(--store-shadow);
  transition: transform 0.15s, box-shadow 0.15s;
  display: flex;
  flex-direction: column;
}
.product-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--store-shadow-hover);
}
.product-thumb {
  width: 100%;
  aspect-ratio: 4/3;
  background: var(--store-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.product-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.product-thumb .placeholder-icon {
  font-size: 40px;
  color: #d1d5db;
}
.product-info {
  padding: 20px;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.product-format {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--store-accent);
  margin-bottom: 6px;
}
.product-name {
  font-size: 16px;
  font-weight: 600;
  color: var(--store-text);
  margin-bottom: 8px;
  line-height: 1.3;
}
.product-name a {
  color: inherit;
  text-decoration: none;
}
.product-name a:hover { color: var(--store-accent); }
.product-desc {
  font-size: 13px;
  color: var(--store-text-muted);
  line-height: 1.5;
  flex: 1;
  margin-bottom: 16px;
}
.product-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
}
.product-price {
  font-size: 20px;
  font-weight: 700;
  color: var(--store-text);
}
.btn-add-cart {
  background: var(--store-text);
  color: white;
  border: none;
  border-radius: 6px;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
  text-decoration: none;
  display: inline-block;
}
.btn-add-cart:hover { background: var(--store-accent); }

/* Product detail page */
.product-detail {
  max-width: 900px;
  margin: 0 auto;
  padding: 60px 40px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: start;
}
.product-detail-image {
  border-radius: var(--store-radius);
  overflow: hidden;
  background: var(--store-bg);
  border: 1px solid var(--store-border);
  aspect-ratio: 4/3;
  display: flex;
  align-items: center;
  justify-content: center;
}
.product-detail-image img { width: 100%; height: 100%; object-fit: cover; }
.product-detail-image .placeholder-icon { font-size: 60px; color: #d1d5db; }
.product-detail-info { display: flex; flex-direction: column; }
.product-detail-info .format-badge {
  display: inline-block;
  background: #eff6ff;
  color: var(--store-accent);
  border: 1px solid #bfdbfe;
  border-radius: 4px;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  width: fit-content;
  margin-bottom: 16px;
}
.product-detail-info h1 {
  font-size: 30px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
  line-height: 1.2;
}
.product-detail-info .price {
  font-size: 36px;
  font-weight: 700;
  color: var(--store-text);
  margin-bottom: 24px;
}
.product-detail-info .description {
  font-size: 15px;
  color: var(--store-text-muted);
  line-height: 1.7;
  margin-bottom: 32px;
}
.btn-buy {
  background: var(--store-accent);
  color: white;
  border: none;
  border-radius: 8px;
  padding: 16px 40px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
  text-align: center;
  text-decoration: none;
  display: inline-block;
  width: 100%;
}
.btn-buy:hover { background: var(--store-accent-hover); }
.btn-buy-direct {
  background: var(--store-text);
  color: white;
  border: none;
  border-radius: 8px;
  padding: 16px 40px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s;
  text-align: center;
  text-decoration: none;
  display: inline-block;
  width: 100%;
}
.btn-buy-direct:hover { background: #2d5a27; }
.btn-add-cart-page {
  background: white;
  color: var(--store-text);
  border: 2px solid var(--store-border);
  border-radius: 8px;
  padding: 14px 40px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.15s;
  text-align: center;
  display: inline-block;
  width: 100%;
}
.btn-add-cart-page:hover { border-color: var(--store-accent); }
.format-note {
  font-size: 12px;
  color: var(--store-text-muted);
  text-align: center;
  margin-top: 12px;
}

/* Cart */
.cart-page {
  max-width: 800px;
  margin: 0 auto;
  padding: 60px 40px;
}
.cart-page h1 {
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 40px;
}
.cart-empty {
  text-align: center;
  padding: 80px 40px;
  background: var(--store-surface);
  border: 1px solid var(--store-border);
  border-radius: var(--store-radius);
}
.cart-empty h2 { font-size: 24px; margin-bottom: 12px; }
.cart-empty p { color: var(--store-text-muted); margin-bottom: 24px; }
.cart-item {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 20px 0;
  border-bottom: 1px solid var(--store-border);
}
.cart-item-thumb {
  width: 80px;
  height: 60px;
  border-radius: 6px;
  overflow: hidden;
  background: var(--store-bg);
  border: 1px solid var(--store-border);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.cart-item-thumb img { width: 100%; height: 100%; object-fit: cover; }
.cart-item-info { flex: 1; }
.cart-item-info h3 { font-size: 16px; font-weight: 600; margin-bottom: 4px; }
.cart-item-info .cart-item-format { font-size: 12px; color: var(--store-text-muted); }
.cart-item-price { font-size: 16px; font-weight: 600; margin-right: 16px; }
.cart-item-remove {
  background: none;
  border: none;
  color: var(--store-danger);
  font-size: 13px;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 4px;
}
.cart-item-remove:hover { background: #fef2f2; }
.cart-summary {
  margin-top: 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.cart-total { font-size: 22px; font-weight: 700; }
.btn-checkout {
  background: var(--store-accent);
  color: white;
  border: none;
  border-radius: 8px;
  padding: 14px 32px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  transition: background 0.15s;
}
.btn-checkout:hover { background: var(--store-accent-hover); }

/* Checkout page */
.checkout-page {
  max-width: 700px;
  margin: 0 auto;
  padding: 60px 40px;
}
.checkout-page h1 {
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 40px;
}
.checkout-summary {
  background: var(--store-surface);
  border: 1px solid var(--store-border);
  border-radius: var(--store-radius);
  padding: 28px;
  margin-bottom: 32px;
}
.checkout-summary h3 { font-size: 16px; font-weight: 600; margin-bottom: 16px; }
.checkout-item {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  font-size: 14px;
  border-bottom: 1px solid var(--store-border);
}
.checkout-item:last-of-type { border-bottom: none; }
.checkout-total {
  display: flex;
  justify-content: space-between;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 2px solid var(--store-border);
  font-size: 18px;
  font-weight: 700;
}
.checkout-form { display: flex; flex-direction: column; gap: 16px; }
.checkout-form label { font-size: 14px; font-weight: 500; display: block; margin-bottom: 6px; }
.checkout-form input[type="email"] {
  width: 100%;
  border: 1px solid var(--store-border);
  border-radius: 8px;
  padding: 12px 16px;
  font-size: 15px;
  font-family: inherit;
  background: var(--store-surface);
  transition: border-color 0.15s;
}
.checkout-form input[type="email"]:focus { outline: none; border-color: var(--store-accent); }
.btn-proceed-payment {
  background: var(--store-accent);
  color: white;
  border: none;
  border-radius: 8px;
  padding: 16px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  width: 100%;
  transition: background 0.15s;
}
.btn-proceed-payment:hover { background: var(--store-accent-hover); }
.checkout-error {
  background: #fef2f2;
  border: 1px solid var(--store-danger);
  color: var(--store-text);
  border-radius: var(--store-radius);
  padding: 12px 16px;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
#checkout-error[hidden] { display: none !important; }
.checkout-error-dismiss {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 20px;
  line-height: 1;
  color: var(--store-danger);
  padding: 0 4px;
}
.stripe-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 12px;
  font-size: 12px;
  color: var(--store-text-muted);
}

/* Success page */
.success-page {
  max-width: 640px;
  margin: 0 auto;
  padding: 80px 40px;
  text-align: center;
}
.success-icon {
  width: 72px;
  height: 72px;
  background: #dcfce7;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 28px;
  font-size: 36px;
  color: var(--store-success);
}
.success-page h1 { font-size: 28px; font-weight: 700; margin-bottom: 12px; }
.success-page p { font-size: 16px; color: var(--store-text-muted); margin-bottom: 40px; }
.download-list {
  background: var(--store-surface);
  border: 1px solid var(--store-border);
  border-radius: var(--store-radius);
  overflow: hidden;
  text-align: left;
  margin-bottom: 32px;
}
.download-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 24px;
  border-bottom: 1px solid var(--store-border);
}
.download-item:last-child { border-bottom: none; }
.download-item-name { font-size: 15px; font-weight: 600; }
.download-item-format { font-size: 12px; color: var(--store-text-muted); }
.btn-download {
  background: var(--store-accent);
  color: white;
  border: none;
  border-radius: 6px;
  padding: 8px 20px;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.15s;
  display: inline-block;
}
.btn-download:hover { background: var(--store-accent-hover); }

/* 404 / error */
.store-404 {
  max-width: 500px;
  margin: 0 auto;
  padding: 100px 40px;
  text-align: center;
}
.store-404 h1 { font-size: 64px; font-weight: 700; color: var(--store-border); margin-bottom: 16px; }
.store-404 h2 { font-size: 24px; font-weight: 700; margin-bottom: 12px; }
.store-404 p { color: var(--store-text-muted); margin-bottom: 32px; }
.btn-back {
  display: inline-block;
  background: var(--store-text);
  color: white;
  border: none;
  border-radius: 8px;
  padding: 12px 28px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
}

/* Responsive */
@media (max-width: 768px) {
  .store-nav { padding: 0 20px; }
  .store-nav-links { display: none; }
  .store-container { padding: 0 20px; }
  .store-hero { padding: 60px 20px; }
  .store-hero h1 { font-size: 30px; }
  .store-section { padding: 40px 20px; }
  .product-detail { grid-template-columns: 1fr; gap: 32px; padding: 40px 20px; }
  .product-detail-info h1 { font-size: 24px; }
  .product-detail-info .price { font-size: 28px; }
  .cart-page, .checkout-page, .success-page { padding: 40px 20px; }
  .product-grid { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 16px; }
}