/* STORE-02 — store.dealparse.tech stylesheet.
   Design tokens reused from P01 "Parse" identity (CANONICAL-SITE.md).
   RTL-first: logical properties (margin-inline, padding-inline, text-align: start)
   so the same CSS works for dir=rtl (AR) and dir=ltr (EN). */
:root {
  --color-bg: #0A0F1E;
  --color-bg-alt: #111827;
  --color-bg-card: #1A2744;
  --color-accent: #00F0FF;
  --color-accent-dim: #0099CC;
  --color-text: #FFFFFF;
  --color-text-dim: #8892B0;
  --color-text-muted: #8494B8; /* WCAG AA verified on cards (P01 audit 2026-10-18) */
  --color-border: #1E3355;
  --color-border-subtle: #162240;
  --color-success: #00FF88;
  --color-warning: #FFB800;
  --font-mono: 'JetBrains Mono', 'Fira Code', 'Cascadia Code', 'Consolas', monospace;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-ar: 'Noto Kufi Arabic', 'Cairo', 'Segoe UI', Tahoma, sans-serif;
  --container-max: 1100px;
  --radius: 4px;
  --radius-lg: 8px;
  --transition: 150ms ease;
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; background: var(--color-bg); }
body {
  font-family: var(--font-sans);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.7;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}
html[lang="ar"] body { font-family: var(--font-ar); }
.container { max-width: var(--container-max); margin: 0 auto; padding: 0 1.5rem; }
h1, h2, h3 { font-weight: 600; line-height: 1.3; }
h1 { font-size: clamp(2rem, 5vw, 3rem); }
h2 { font-size: clamp(1.4rem, 3.5vw, 1.9rem); }
a { color: var(--color-accent); text-decoration: none; }
a:hover { text-decoration: underline; }
.dim { color: var(--color-text-dim); }

/* Header */
.header {
  background: rgba(10, 15, 30, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--color-border-subtle);
  position: sticky; top: 0; z-index: 100;
}
.nav { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.nav-logo { font-family: var(--font-mono); font-weight: 700; font-size: 1.1rem; color: var(--color-text); }
.nav-links { display: flex; gap: 1.25rem; align-items: center; }
.lang-switch { border: 1px solid var(--color-border); padding: 0.25rem 0.75rem; border-radius: var(--radius); }

/* Hero */
.hero { padding: 3.5rem 0 2rem; text-align: start; }
.hero .tagline { color: var(--color-text-dim); font-size: 1.15rem; margin-top: 0.5rem; }

/* Search */
.searchbar { margin: 1rem 0 2rem; }
.searchbar input {
  width: 100%; max-width: 420px;
  background: var(--color-bg-alt); border: 1px solid var(--color-border);
  color: var(--color-text); padding: 0.65rem 1rem;
  border-radius: var(--radius-lg); font-size: 1rem;
}
.searchbar input:focus { outline: 2px solid var(--color-accent-dim); }

/* Catalog */
.cat-section { margin-bottom: 2.5rem; }
.cat-section h2 { margin-bottom: 1rem; border-bottom: 1px solid var(--color-border-subtle); padding-bottom: 0.5rem; }
.cat-section:has(.card[hidden]) h2 { /* handled by JS: hide empty sections while filtering */ }
.card {
  background: var(--color-bg-card); border: 1px solid var(--color-border);
  border-radius: var(--radius-lg); padding: 1.25rem; margin-bottom: 1rem;
  transition: border-color var(--transition);
}
.card:hover { border-color: var(--color-accent-dim); }
.card h3 { margin-bottom: 0.4rem; }
.card .price { font-family: var(--font-mono); color: var(--color-success); margin: 0.5rem 0; }
.btn-buy {
  display: inline-block; background: var(--color-accent); color: #04101a;
  font-weight: 700; padding: 0.6rem 1.6rem; border-radius: var(--radius);
  transition: background var(--transition);
}
.btn-buy:hover { background: var(--color-accent-dim); text-decoration: none; }
.not-available { color: var(--color-warning); font-size: 0.95rem; }
.empty-note { color: var(--color-text-dim); padding: 2rem 0; }

/* Product page */
.product-page { padding: 2rem 1.5rem 3rem; max-width: 760px; margin: 0 auto; }
.product-page h1 { margin: 1rem 0; }
.specs { width: 100%; border-collapse: collapse; margin: 1.25rem 0; }
.specs th, .specs td { text-align: start; padding: 0.55rem 0.75rem; border: 1px solid var(--color-border); }
.specs th { background: var(--color-bg-alt); color: var(--color-text-dim); width: 35%; font-weight: 500; }
.price.big { font-size: 1.5rem; margin: 1rem 0; }

/* Footer */
.footer { padding: 2rem 1.5rem 3rem; border-top: 1px solid var(--color-border-subtle); margin-top: 2rem; }
.build-note { font-family: var(--font-mono); font-size: 0.75rem; }

@media (max-width: 640px) {
  .nav-links { gap: 0.75rem; }
  .hero { padding: 2rem 0 1rem; }
}
