/* ── Reset & Base ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --bg: #0a0a0a;
  --bg-card: #141414;
  --text: #e8e8e8;
  --text-muted: #888;
  --accent: #ff6b2b;
  --accent-hover: #ff8a50;
  --success: #22c55e;
  --danger: #ef4444;
  --stellar: #6366f1;
  --border: #2a2a2a;
  --radius: 8px;
}

body {
  font-family: system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); }

img { max-width: 100%; height: auto; display: block; border-radius: var(--radius); }

/* ── Nav ── */
.site-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 2rem;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background: var(--bg);
  z-index: 100;
}
.logo { display: flex; align-items: center; }
.logo-img { height: 40px; width: auto; border-radius: 0; }
.logo-text { font-size: 1.5rem; font-weight: 800; letter-spacing: 2px; color: var(--text); }
.footer-text { font-size: 1rem; font-weight: 700; letter-spacing: 2px; color: var(--text-muted); }
.hero-logo-text { font-size: 4rem; font-weight: 900; letter-spacing: 8px; color: var(--accent); margin-bottom: 1rem; }
.nav-links { display: flex; gap: 1.5rem; }
.nav-links a { color: var(--text-muted); font-weight: 500; }
.nav-links a:hover { color: var(--text); }
.nav-actions { display: flex; align-items: center; gap: 1rem; }

/* ── Footer ── */
.site-footer { padding: 2rem; text-align: center; color: var(--text-muted); border-top: 1px solid var(--border); margin-top: 4rem; display: flex; flex-direction: column; align-items: center; gap: 0.75rem; }
.footer-logo { height: 32px; width: auto; opacity: 0.5; border-radius: 0; }

/* ── Hero ── */
.hero { position: relative; text-align: center; padding: 6rem 2rem 4rem; overflow: hidden; }
.hero-smoke { position: absolute; inset: 0; background: radial-gradient(ellipse at 50% 80%, rgba(255,107,43,0.08) 0%, transparent 70%); pointer-events: none; }
.hero-content { position: relative; z-index: 1; }
.hero-logo { height: 100px; width: auto; margin: 0 auto 1.5rem; border-radius: 0; filter: drop-shadow(0 0 30px rgba(255,107,43,0.3)); }
.hero-title { font-size: 3rem; font-weight: 900; letter-spacing: 6px; margin-bottom: 0.5rem; background: linear-gradient(135deg, var(--text) 0%, var(--accent) 100%); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.hero-sub { color: var(--text-muted); font-size: 1.125rem; max-width: 500px; margin: 0 auto 2rem; }
.hero-cta { margin-bottom: 1.5rem; }
.btn-lg { padding: 1rem 2.5rem; font-size: 1.125rem; }
.btn-outline { background: transparent; border: 1px solid var(--border); color: var(--text); padding: 0.6rem 1.5rem; border-radius: var(--radius); font-weight: 500; }
.btn-outline:hover { border-color: var(--accent); color: var(--accent); }
.hero-zmoke { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }
.zmoke-badge { background: var(--bg-card); border: 1px solid var(--border); border-radius: 999px; padding: 0.5rem 1rem; font-size: 0.875rem; color: var(--text-muted); }

/* ── Sections ── */
.section { max-width: 1200px; margin: 0 auto; padding: 3rem 2rem; }
.section-title { font-size: 1.5rem; font-weight: 700; margin-bottom: 1.5rem; text-align: center; letter-spacing: 2px; }
.section-cta { text-align: center; margin-top: 2rem; }
.zmoke-section { background: var(--bg-card); border-radius: var(--radius); margin-top: 2rem; }
.zmoke-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; }
.zmoke-card { text-align: center; padding: 1.5rem; }
.zmoke-icon { font-size: 2.5rem; display: block; margin-bottom: 0.75rem; }
.zmoke-card h3 { margin-bottom: 0.5rem; }
.zmoke-card p { color: var(--text-muted); font-size: 0.9rem; }

/* ── Buttons ── */
.btn { display: inline-block; padding: 0.75rem 1.5rem; border-radius: var(--radius); font-weight: 600; border: none; cursor: pointer; font-size: 1rem; text-align: center; transition: all 0.2s; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); }
.btn-primary.btn-success { background: var(--success); }
.btn-stellar { background: var(--stellar); color: #fff; }
.btn-stellar:hover { opacity: 0.9; }
.btn-disabled { background: var(--border); color: var(--text-muted); cursor: not-allowed; }
.btn-link { background: none; border: none; color: var(--text-muted); cursor: pointer; text-decoration: underline; font-size: 0.875rem; }

/* ── Product Grid (shop) ── */
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1.5rem; padding: 2rem; }

/* ── Sale Price ── */
.price-original {
  text-decoration: line-through;
  color: var(--text-muted);
  font-size: 0.9em;
  margin-right: 0.5rem;
}
.price-sale {
  color: #ef4444;
  font-weight: 700;
}

/* ── Breadcrumbs ── */
.breadcrumbs {
  padding: 1rem 2rem 0;
  font-size: 0.85rem;
  color: var(--text-muted);
  max-width: 1200px;
  margin: 0 auto;
}
.breadcrumbs a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s;
}
.breadcrumbs a:hover { color: var(--accent); }
.breadcrumbs span { color: var(--text); }

/* ── Category Nav Pills ── */
.category-nav {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin: 1.5rem 0;
}
.category-pill {
  padding: 0.4rem 1rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.85rem;
  transition: all 0.2s;
}
.category-pill:hover, .category-pill.active {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(255, 107, 43, 0.1);
}
.category-desc {
  color: var(--text-muted);
  margin-bottom: 1.5rem;
  max-width: 600px;
}
/* — Admin Link — */
.admin-link {
  font-size: 1.2rem;
  color: var(--text-muted);
  text-decoration: none;
  opacity: 0.6;
  transition: opacity 0.2s;
}
.admin-link:hover { opacity: 1; }

.category-hero {
  width: 100%;
  max-height: 300px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 1.5rem;
}
.product-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; transition: border-color 0.2s; }
.product-card:hover { border-color: var(--accent); }
.product-card img { width: 100%; aspect-ratio: 1; object-fit: cover; }
.product-card-info { padding: 1rem; }
.product-card-name { font-weight: 600; margin-bottom: 0.25rem; }
.product-card-price { color: var(--accent); font-weight: 700; font-size: 1.125rem; }
.product-card-zmoke { color: var(--text-muted); font-size: 0.875rem; }

/* ── PDP ── */
.pdp { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; padding: 2rem; max-width: 1100px; margin: 0 auto; }
.pdp-image img { width: 100%; aspect-ratio: 1; object-fit: cover; }
.pdp-placeholder { width: 100%; aspect-ratio: 1; background: var(--bg-card); display: flex; align-items: center; justify-content: center; border-radius: var(--radius); color: var(--text-muted); }
.pdp-info { display: flex; flex-direction: column; gap: 1rem; padding-top: 1rem; }
.pdp-info h1 { font-size: 2rem; }
.pdp-price { font-size: 1.5rem; color: var(--accent); font-weight: 700; }
.pdp-zmoke { color: var(--text-muted); }
.pdp-stock { font-size: 0.875rem; color: var(--success); }

/* ── Variant Pills (shop card) ── */
.variant-pills { display: flex; gap: 0.375rem; flex-wrap: wrap; margin: 0.5rem 0; }
.variant-pill { border: 2px solid var(--border); background: var(--bg); color: var(--text); border-radius: 50%; width: 28px; height: 28px; cursor: pointer; display: flex; align-items: center; justify-content: center; padding: 0; font-size: 0.7rem; transition: border-color 0.15s; }
.variant-pill.selected { border-color: var(--accent); }
.variant-pill.out-of-stock { opacity: 0.3; cursor: not-allowed; }
.variant-pill:hover:not(.out-of-stock) { border-color: var(--accent-hover); }
.color-swatch { display: block; width: 18px; height: 18px; border-radius: 50%; border: 1px solid rgba(255,255,255,0.15); }

/* ── Variant Picker (PDP) ── */
.variant-picker { margin: 1rem 0; }
.variant-label { font-size: 0.875rem; color: var(--text-muted); display: block; margin-bottom: 0.5rem; text-transform: capitalize; }
.variant-options { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.variant-option { border: 2px solid var(--border); background: var(--bg); color: var(--text); border-radius: var(--radius); min-width: 40px; height: 40px; cursor: pointer; display: flex; align-items: center; justify-content: center; padding: 0 0.75rem; font-size: 0.875rem; transition: border-color 0.15s; text-transform: capitalize; }
.variant-option.selected { border-color: var(--accent); }
.variant-option.out-of-stock { opacity: 0.3; cursor: not-allowed; }
.variant-option:hover:not(.out-of-stock) { border-color: var(--accent-hover); }
.variant-option .color-swatch { width: 24px; height: 24px; }

/* ── Product Card Extras ── */
.product-card-placeholder { width: 100%; aspect-ratio: 1; background: var(--bg-card); display: flex; align-items: center; justify-content: center; color: var(--text-muted); }
.btn-sm { padding: 0.5rem 1rem; font-size: 0.875rem; width: 100%; }
.pdp-continue { display: inline-block; margin-top: 1.5rem; color: var(--text-muted); font-size: 0.875rem; }
.pdp-continue:hover { color: var(--accent); }
.pdp-desc { color: var(--text-muted); line-height: 1.7; white-space: pre-wrap; }

/* ── Add to Cart ── */
.add-to-cart { display: flex; gap: 1rem; align-items: center; margin-top: 1rem; }
.qty-selector { display: flex; align-items: center; gap: 0.5rem; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 0.25rem 0.5rem; }
.qty-selector button { background: none; border: none; color: var(--text); cursor: pointer; font-size: 1.25rem; padding: 0.25rem 0.5rem; }
.qty-selector span { min-width: 2ch; text-align: center; }

/* ── Cart Drawer ── */
.cart-drawer-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.6); z-index: 200; }
.cart-drawer { position: fixed; right: 0; top: 0; bottom: 0; width: 380px; max-width: 90vw; background: var(--bg); border-left: 1px solid var(--border); display: flex; flex-direction: column; z-index: 201; }
.cart-header { display: flex; justify-content: space-between; align-items: center; padding: 1rem 1.5rem; border-bottom: 1px solid var(--border); }
.cart-header h2 { font-size: 1.25rem; }
.cart-header button { background: none; border: none; color: var(--text); cursor: pointer; font-size: 1.5rem; }
.cart-empty { padding: 2rem; text-align: center; color: var(--text-muted); }
.cart-items { list-style: none; flex: 1; overflow-y: auto; padding: 1rem 1.5rem; }
.cart-item { display: flex; gap: 1rem; padding: 0.75rem 0; border-bottom: 1px solid var(--border); }
.cart-item img { border-radius: 4px; object-fit: cover; }
.cart-item-info { flex: 1; display: flex; flex-direction: column; gap: 0.25rem; }
.cart-item-name { font-weight: 600; font-size: 0.9rem; }
.cart-item-price { color: var(--accent); font-weight: 600; }
.cart-item-qty { display: flex; align-items: center; gap: 0.5rem; font-size: 0.875rem; }
.cart-item-qty button { background: none; border: 1px solid var(--border); color: var(--text); cursor: pointer; border-radius: 4px; padding: 0.125rem 0.5rem; }
.cart-remove { color: var(--danger) !important; border-color: transparent !important; }
.cart-footer { padding: 1rem 1.5rem; border-top: 1px solid var(--border); display: flex; flex-direction: column; gap: 0.75rem; }
.cart-zmoke { color: var(--text-muted); font-size: 0.875rem; }
.cart-total { font-size: 1.25rem; font-weight: 700; }
.cart-checkout-btn { display: block; text-align: center; background: var(--accent); color: #fff; padding: 0.75rem; border-radius: var(--radius); font-weight: 600; }
.cart-checkout-btn:hover { background: var(--accent-hover); color: #fff; }
.cart-clear { background: none; border: none; color: var(--text-muted); cursor: pointer; font-size: 0.875rem; text-align: center; }

/* ── Cart Button (header) ── */
.cart-button { background: none; border: none; color: var(--text); cursor: pointer; font-size: 1.25rem; position: relative; }
.cart-badge { position: absolute; top: -6px; right: -8px; background: var(--accent); color: #fff; font-size: 0.7rem; font-weight: 700; border-radius: 50%; width: 18px; height: 18px; display: flex; align-items: center; justify-content: center; }

/* ── Auth ── */
.auth-login-btn { background: none; border: 1px solid var(--border); color: var(--text); padding: 0.4rem 1rem; border-radius: var(--radius); cursor: pointer; font-size: 0.875rem; }
.auth-login-btn:hover { border-color: var(--accent); }
.auth-user-btn { background: none; border: none; color: var(--text); cursor: pointer; font-size: 0.9rem; }
.auth-modal-overlay, .auth-dropdown-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.6); z-index: 300; display: flex; align-items: center; justify-content: center; }
.auth-modal { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 2rem; width: 400px; max-width: 90vw; position: relative; }
.auth-close { position: absolute; top: 0.75rem; right: 0.75rem; background: none; border: none; color: var(--text-muted); cursor: pointer; font-size: 1.25rem; }
.auth-modal h2 { margin-bottom: 1.5rem; }
.auth-input { display: block; width: 100%; padding: 0.75rem; margin-bottom: 0.75rem; background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius); color: var(--text); font-size: 1rem; }
.auth-input:focus { outline: none; border-color: var(--accent); }
.auth-error { color: var(--danger); font-size: 0.875rem; margin-bottom: 0.75rem; }
.auth-switch { margin-top: 1rem; font-size: 0.875rem; color: var(--text-muted); }
.auth-switch button { background: none; border: none; color: var(--accent); cursor: pointer; }
.auth-dropdown { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem; width: 240px; display: flex; flex-direction: column; gap: 0.5rem; }
.auth-email { font-size: 0.875rem; color: var(--text-muted); padding-bottom: 0.5rem; border-bottom: 1px solid var(--border); }
.auth-link { color: var(--text); font-size: 0.9rem; padding: 0.25rem 0; }
.auth-link:hover { color: var(--accent); }
.auth-logout { background: none; border: none; color: var(--danger); cursor: pointer; text-align: left; padding: 0.25rem 0; }

/* ── Checkout Table ── */
.checkout-page { max-width: 800px; margin: 0 auto; padding: 2rem; }
.checkout-empty { text-align: center; padding: 4rem 2rem; }
.cart-table { width: 100%; border-collapse: collapse; margin-bottom: 2rem; }
.cart-table th { text-align: left; padding: 0.75rem; border-bottom: 2px solid var(--border); color: var(--text-muted); font-size: 0.875rem; }
.cart-table td { padding: 0.75rem; border-bottom: 1px solid var(--border); }
.cart-product-cell { display: flex; align-items: center; gap: 1rem; }
.cart-product-cell img { border-radius: 4px; object-fit: cover; }
.remove-btn { background: none; border: none; color: var(--text-muted); cursor: pointer; font-size: 1rem; }
.remove-btn:hover { color: var(--danger); }
.cart-summary { display: flex; flex-direction: column; gap: 0.75rem; align-items: flex-end; }
.checkout-buttons { display: flex; gap: 1rem; }
.checkout-error { color: var(--danger); font-size: 0.875rem; }

/* ── Server Islands (nav) ── */
.user-nav-link { color: var(--text); font-size: 0.9rem; }
.user-nav-link:hover { color: var(--accent); }
.zmoke-nav-badge { color: var(--accent); font-size: 0.875rem; font-weight: 600; }

/* ── Account ── */
.account-loading, .account-login-prompt { text-align: center; padding: 4rem 2rem; }
.account-dashboard { display: flex; flex-direction: column; gap: 2rem; margin-top: 1.5rem; }
.account-header { padding-bottom: 1rem; border-bottom: 1px solid var(--border); }
.account-email { color: var(--text-muted); }
.account-wallet { color: var(--stellar); font-size: 0.875rem; font-family: monospace; }
.account-zmoke-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.5rem; }
.zmoke-amount { font-size: 2rem; font-weight: 700; color: var(--accent); }
.zmoke-pending { font-size: 0.875rem; color: var(--text-muted); }
.zmoke-value { font-size: 0.875rem; color: var(--success); }
.orders-table { width: 100%; border-collapse: collapse; }
.orders-table th { text-align: left; padding: 0.5rem; border-bottom: 2px solid var(--border); color: var(--text-muted); font-size: 0.875rem; }
.orders-table td { padding: 0.5rem; border-bottom: 1px solid var(--border); }
.status-pending { color: var(--text-muted); }
.status-processing { color: var(--accent); }
.status-completed { color: var(--success); }
.status-abandoned { color: var(--danger); }
.text-muted { color: var(--text-muted); }

/* ── Responsive ── */
@media (max-width: 768px) {
  .pdp { grid-template-columns: 1fr; gap: 1.5rem; }
  .site-nav { padding: 0.75rem 1rem; }
  .nav-links { gap: 1rem; font-size: 0.875rem; }
  .checkout-buttons { flex-direction: column; width: 100%; }
  .checkout-buttons .btn { width: 100%; }
}
