/* ---- APP NAV ---- */
.app-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10, 10, 15, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
  height: 60px;
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav-brand {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--fg);
  text-decoration: none;
  letter-spacing: -0.02em;
}

.nav-links {
  display: flex;
  gap: 24px;
  flex: 1;
}

.nav-link {
  font-size: 0.9rem;
  color: var(--fg-muted);
  text-decoration: none;
  transition: color 0.15s;
}

.nav-link:hover { color: var(--fg); }

.nav-cart {
  position: relative;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.85rem;
  color: var(--fg-muted);
  transition: border-color 0.15s, color 0.15s;
}

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

.cart-count {
  background: var(--accent);
  color: #000;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 0.7rem;
  min-width: 18px;
  height: 18px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
}

.app-main { min-height: calc(100vh - 60px - 97px); }

/* ---- BUTTONS ---- */
.btn-primary {
  display: inline-block;
  background: var(--accent);
  color: #0a0a0f;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 0.95rem;
  padding: 14px 28px;
  border-radius: var(--radius);
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: opacity 0.15s, transform 0.1s;
  letter-spacing: -0.01em;
}

.btn-primary:hover { opacity: 0.88; transform: translateY(-1px); }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }
.btn-primary.btn-added { background: #00d4ff; }

.btn-ghost {
  display: inline-block;
  background: transparent;
  color: var(--fg-muted);
  font-size: 0.9rem;
  padding: 10px 20px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  cursor: pointer;
  text-decoration: none;
  transition: border-color 0.15s, color 0.15s;
}

.btn-ghost:hover { border-color: var(--fg-muted); color: var(--fg); }

/* ---- CATALOG ---- */
.catalog-header {
  border-bottom: 1px solid var(--border);
  padding: 64px 24px 48px;
}

.catalog-header-inner {
  max-width: var(--max-w);
  margin: 0 auto;
}

.catalog-badge {
  display: inline-block;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.15em;
  color: var(--accent);
  border: 1px solid rgba(61, 255, 184, 0.3);
  padding: 5px 14px;
  border-radius: 100px;
  margin-bottom: 20px;
  background: var(--accent-dim);
}

.catalog-header h1 {
  font-size: clamp(2rem, 4vw, 3.2rem);
  margin-bottom: 12px;
}

.catalog-sub {
  font-size: 1rem;
  color: var(--fg-muted);
  max-width: 540px;
}

.catalog-body {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 48px 24px 80px;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.product-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  text-decoration: none;
  color: var(--fg);
  transition: border-color 0.2s, transform 0.15s;
  display: block;
}

.product-card:hover {
  border-color: rgba(61, 255, 184, 0.25);
  transform: translateY(-2px);
}

.product-img-wrap {
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
  background: var(--bg-elevated);
}

.product-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}

.product-card:hover .product-img-wrap img { transform: scale(1.04); }

.product-badge-sale,
.product-badge-ai {
  position: absolute;
  top: 10px;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 4px 10px;
  border-radius: 100px;
}

.product-badge-sale {
  left: 10px;
  background: rgba(255, 80, 80, 0.9);
  color: #fff;
}

.product-badge-ai {
  right: 10px;
  background: rgba(61, 255, 184, 0.9);
  color: #0a0a0f;
}

.product-info { padding: 16px; }

.product-tags {
  display: flex;
  gap: 6px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}

.product-tag {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--accent);
  background: var(--accent-dim);
  border: 1px solid rgba(61, 255, 184, 0.2);
  padding: 2px 8px;
  border-radius: 100px;
  text-transform: uppercase;
}

.product-name {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 10px;
  line-height: 1.3;
  font-family: 'Space Grotesk', sans-serif;
}

.product-pricing {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

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

.product-compare {
  font-size: 0.85rem;
  color: var(--fg-dim);
  text-decoration: line-through;
}

/* ---- PRODUCT DETAIL ---- */
.product-page-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 40px 24px 80px;
}

.back-link {
  display: inline-block;
  color: var(--fg-muted);
  text-decoration: none;
  font-size: 0.9rem;
  margin-bottom: 36px;
  transition: color 0.15s;
}

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

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

.product-detail-img {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 1;
  background: var(--bg-elevated);
}

.product-detail-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ai-badge {
  position: absolute;
  bottom: 16px;
  left: 16px;
  background: rgba(10, 10, 15, 0.85);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(61, 255, 184, 0.3);
  color: var(--accent);
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 100px;
}

.product-tag-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.product-detail-name {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  margin-bottom: 20px;
}

.product-detail-pricing {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 24px;
}

.detail-price {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 2rem;
  font-weight: 700;
  color: var(--fg);
}

.detail-compare {
  font-size: 1.1rem;
  color: var(--fg-dim);
  text-decoration: line-through;
}

.detail-save {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  color: #ff6b6b;
  background: rgba(255, 107, 107, 0.1);
  padding: 3px 10px;
  border-radius: 100px;
}

.product-detail-desc {
  color: var(--fg-muted);
  font-size: 1rem;
  line-height: 1.7;
  margin-bottom: 28px;
}

.shipping-note {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--fg-muted);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 16px;
  margin-bottom: 28px;
}

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

.qty-selector {
  display: flex;
  align-items: center;
  gap: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.qty-btn {
  background: var(--bg-elevated);
  border: none;
  color: var(--fg);
  width: 36px;
  height: 46px;
  font-size: 1.2rem;
  cursor: pointer;
  transition: background 0.15s;
}

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

.qty-selector input {
  width: 52px;
  text-align: center;
  background: var(--bg);
  border: none;
  border-left: 1px solid var(--border);
  border-right: 1px solid var(--border);
  color: var(--fg);
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  height: 46px;
  outline: none;
}

.qty-small { height: 32px; }
.qty-small .qty-btn { width: 28px; height: 32px; font-size: 1rem; }
.qty-small input { width: 36px; height: 32px; font-size: 0.85rem; }

.btn-add-cart { flex: 1; text-align: center; }

.trust-badges {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.trust-badge {
  font-size: 0.8rem;
  color: var(--fg-muted);
}

/* ---- CART PAGE ---- */
.cart-page { padding: 48px 24px 80px; }

.cart-page-inner {
  max-width: 900px;
  margin: 0 auto;
}

.cart-page h1 {
  font-size: clamp(1.8rem, 3.5vw, 2.6rem);
  margin-bottom: 40px;
}

.cart-layout {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 40px;
  align-items: start;
}

.cart-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
  gap: 12px;
}

.cart-item-name {
  color: var(--fg);
  text-decoration: none;
  font-weight: 500;
  flex: 1;
  min-width: 0;
}

.cart-item-name:hover { color: var(--accent); }

.cart-item-controls {
  display: flex;
  align-items: center;
  gap: 16px;
}

.cart-item-price {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 600;
  min-width: 64px;
  text-align: right;
}

.cart-remove {
  background: none;
  border: none;
  color: var(--fg-dim);
  cursor: pointer;
  font-size: 0.9rem;
  transition: color 0.15s;
  padding: 4px;
}

.cart-remove:hover { color: #ff6b6b; }

.cart-summary {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  position: sticky;
  top: 80px;
}

.cart-summary h2 {
  font-size: 1.1rem;
  margin-bottom: 20px;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.9rem;
  color: var(--fg-muted);
  margin-bottom: 12px;
}

.summary-total {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--fg);
  margin-top: 8px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  margin-bottom: 16px;
}

.free-ship-note {
  font-size: 0.8rem;
  color: var(--accent);
  margin-bottom: 16px;
  text-align: center;
}

.btn-checkout { width: 100%; text-align: center; display: block; }

/* ---- CHECKOUT ---- */
.checkout-page { padding: 48px 24px 80px; }

.checkout-inner {
  max-width: 1000px;
  margin: 0 auto;
}

.checkout-page h1 {
  font-size: clamp(1.8rem, 3.5vw, 2.4rem);
  margin-bottom: 40px;
}

.checkout-layout {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 48px;
  align-items: start;
}

.form-section { margin-bottom: 36px; }

.form-section h2 {
  font-size: 1rem;
  color: var(--fg-muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 20px;
  font-family: 'Space Grotesk', sans-serif;
}

.form-group { margin-bottom: 16px; }

.form-group label {
  display: block;
  font-size: 0.85rem;
  color: var(--fg-muted);
  margin-bottom: 6px;
}

.form-group input,
.form-group select {
  width: 100%;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--fg);
  padding: 12px 14px;
  font-size: 0.95rem;
  font-family: 'DM Sans', sans-serif;
  transition: border-color 0.15s;
  outline: none;
}

.form-group input:focus,
.form-group select:focus { border-color: var(--accent); }

.form-group select { appearance: none; cursor: pointer; }

.form-row { display: grid; grid-template-columns: 1fr 80px 100px; gap: 12px; }
.form-group-sm {}

.form-error {
  background: rgba(255, 80, 80, 0.1);
  border: 1px solid rgba(255, 80, 80, 0.3);
  border-radius: 8px;
  padding: 12px 16px;
  font-size: 0.9rem;
  color: #ff6b6b;
  margin-bottom: 16px;
}

.btn-place-order { width: 100%; text-align: center; display: block; }

.checkout-summary {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  position: sticky;
  top: 80px;
}

.checkout-summary h2 { font-size: 1.1rem; margin-bottom: 20px; }

.co-item {
  display: flex;
  justify-content: space-between;
  font-size: 0.9rem;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
}

.co-item-name { color: var(--fg-muted); flex: 1; margin-right: 12px; }
.co-item-price { font-family: 'Space Grotesk', sans-serif; font-weight: 600; }
.summary-divider { height: 1px; background: var(--border); margin: 16px 0; }

/* ---- ORDER CONFIRMATION ---- */
.confirm-page { padding: 80px 24px; text-align: center; }

.confirm-inner {
  max-width: 560px;
  margin: 0 auto;
}

.confirm-check {
  width: 72px;
  height: 72px;
  background: var(--accent-dim);
  border: 2px solid rgba(61, 255, 184, 0.4);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  color: var(--accent);
  margin: 0 auto 28px;
}

.confirm-page h1 { font-size: clamp(1.8rem, 3.5vw, 2.8rem); margin-bottom: 12px; }

.confirm-sub {
  color: var(--fg-muted);
  font-size: 1rem;
  margin-bottom: 36px;
}

.confirm-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 28px;
  text-align: left;
}

.confirm-row {
  display: flex;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.9rem;
}

.confirm-row:last-child { border-bottom: none; }

.confirm-label { color: var(--fg-muted); }

.confirm-value {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 600;
}

.status-badge {
  background: var(--accent-dim);
  color: var(--accent);
  padding: 2px 10px;
  border-radius: 100px;
  font-size: 0.8rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.confirm-items {
  text-align: left;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 28px;
}

.confirm-items h2 { font-size: 1rem; margin-bottom: 16px; color: var(--fg-muted); }

.confirm-item {
  display: flex;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.9rem;
  gap: 8px;
}

.confirm-item:last-child { border-bottom: none; }
.ci-name { flex: 1; }
.ci-qty { color: var(--fg-muted); }
.ci-price { font-family: 'Space Grotesk', sans-serif; font-weight: 600; }

.confirm-note {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  font-size: 0.9rem;
  color: var(--fg-muted);
  text-align: left;
}

/* ---- ERROR PAGE ---- */
.error-page { padding: 80px 24px; text-align: center; }
.error-inner { max-width: 400px; margin: 0 auto; }
.error-page h1 { font-size: 3rem; margin-bottom: 12px; }
.error-msg { color: var(--fg-muted); }

/* ---- EMPTY STATE ---- */
.empty-state { text-align: center; padding: 60px 24px; color: var(--fg-muted); }

/* ---- RESPONSIVE ---- */
@media (max-width: 900px) {
  .product-grid { grid-template-columns: repeat(2, 1fr); }
  .product-detail { grid-template-columns: 1fr; gap: 32px; }
  .cart-layout { grid-template-columns: 1fr; }
  .checkout-layout { grid-template-columns: 1fr; }
  .cart-summary { position: static; }
  .checkout-summary { position: static; order: -1; }
}

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