/* ============================================================
   style.css — FirstV Market
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;500;600;700;800&family=Source+Sans+3:wght@400;500;600;700&display=swap');

:root {
  --bg-primary:     #000000;
  --bg-secondary:   #0a0a0a;
  --bg-tertiary:    #111111;
  --accent:         #3d7eff;
  --accent-h:       #6b9bff;
  --accent-muted:   rgba(61, 126, 255, 0.14);
  --text-primary:   #f2f4f7;
  --text-secondary: rgba(242, 244, 247, 0.68);
  --text-muted:     rgba(242, 244, 247, 0.42);
  --border-color:   rgba(255, 255, 255, 0.08);
  --border-hover:   rgba(61, 126, 255, 0.35);

  --glass-bg:     rgba(255, 255, 255, 0.035);
  --glass-bg-h:   rgba(255, 255, 255, 0.06);
  --glass-border: rgba(255, 255, 255, 0.08);

  --radius-sm:  6px;
  --radius-md:  10px;
  --radius-lg:  14px;
  --radius-xl:  18px;

  --shadow-sm:  0 2px 8px rgba(0,0,0,0.28);
  --shadow-md:  0 8px 24px rgba(0,0,0,0.36);
  --shadow-lg:  0 18px 48px rgba(0,0,0,0.45);

  --transition-fast: 0.15s ease;
  --transition-base: 0.25s ease;
  --transition-slow: 0.4s ease;

  --nav-h: 72px;
  --max-w: 1180px;

  /* legacy aliases used by other stylesheets */
  --accent-blue:   var(--accent);
  --accent-blue-h: var(--accent-h);
  --accent-purple: var(--accent);
  --accent-glow:   transparent;
  --shadow-blue:   transparent;
}

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: 'Source Sans 3', 'Segoe UI', sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
  opacity: 0;
  transition: opacity 0.45s ease;
}

body.page--loaded { opacity: 1; }

img { display: block; width: 100%; height: 100%; object-fit: cover; }

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

button { cursor: pointer; font-family: inherit; border: none; background: none; }

ul { list-style: none; }

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  border: 0;
}

#particle-canvas {
  position: fixed;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  opacity: 0.85;
  pointer-events: none;
}

.container {
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
}

.glass {
  background: var(--glass-bg);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
}

.section { padding: 72px 0; position: relative; z-index: 1; }

.modern-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  background: #000000;
}

/* ---- Navigation ---- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  background: rgba(0, 0, 0, 0.78);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--border-color);
  transition: background var(--transition-base);
}

.nav--scrolled { background: rgba(0, 0, 0, 0.94); }

.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
}

.nav__logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: 'Outfit', sans-serif;
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.nav__logo-img {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  object-fit: cover;
}

.nav__logo span { color: var(--accent-h); font-weight: 600; }

.nav__links {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav__link {
  padding: 8px 14px;
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  transition: color var(--transition-base), background var(--transition-base);
}

.nav__link:hover,
.nav__link--active {
  color: var(--text-primary);
  background: rgba(255,255,255,0.04);
}

.nav__cart {
  display: flex;
  align-items: center;
  gap: 6px;
  position: relative;
  margin-left: 6px;
  padding: 8px 14px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-primary);
}

.nav__cart:hover {
  border-color: var(--border-hover);
  background: var(--accent-muted);
}

.cart-badge {
  position: absolute;
  top: -7px;
  right: -7px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  background: var(--accent);
  border-radius: 999px;
  font-size: 0.65rem;
  font-weight: 700;
  color: #fff;
  display: none;
  align-items: center;
  justify-content: center;
}

.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
}

.menu-toggle__bar {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 999px;
  transition: transform var(--transition-base), opacity var(--transition-base);
}

.menu-toggle--active .menu-toggle__bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-toggle--active .menu-toggle__bar:nth-child(2) { opacity: 0; }
.menu-toggle--active .menu-toggle__bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  font-size: 0.92rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  transition: transform var(--transition-base), background var(--transition-base), border-color var(--transition-base);
  white-space: nowrap;
}

.btn--primary {
  background: var(--accent);
  color: #fff;
}

.btn--primary:hover { background: #2f6eef; transform: translateY(-1px); }

.btn--secondary {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border-color);
}

.btn--secondary:hover {
  border-color: var(--border-hover);
  background: var(--glass-bg);
}

.btn--ghost {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border-color);
}

.btn--ghost:hover {
  color: var(--text-primary);
  background: var(--glass-bg);
}

.btn--success { background: #1f8a5a !important; }

.btn--lg { padding: 14px 28px; font-size: 1rem; }
.btn--sm { padding: 8px 14px; font-size: 0.82rem; }

/* ---- Hero ---- */
.hero {
  min-height: 88vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: calc(var(--nav-h) + 48px) 24px 48px;
  position: relative;
  z-index: 1;
}

.hero__atmosphere {
  position: absolute;
  inset: 10% 10% auto;
  height: 420px;
  background:
    radial-gradient(circle at 30% 40%, rgba(61,126,255,0.16), transparent 45%),
    radial-gradient(circle at 70% 55%, rgba(255,255,255,0.04), transparent 40%);
  filter: blur(28px);
  pointer-events: none;
  z-index: -1;
}

.hero__brand {
  font-family: 'Outfit', sans-serif;
  font-size: clamp(2.6rem, 7vw, 4.8rem);
  font-weight: 800;
  letter-spacing: -0.05em;
  line-height: 1;
  margin-bottom: 18px;
  color: var(--text-primary);
}

.hero__title {
  font-family: 'Outfit', sans-serif;
  font-size: clamp(1.35rem, 3vw, 1.9rem);
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.25;
  color: var(--text-secondary);
  margin-bottom: 16px;
}

.hero__subtitle {
  font-size: clamp(0.98rem, 1.8vw, 1.08rem);
  color: var(--text-muted);
  max-width: 480px;
  line-height: 1.6;
  margin-bottom: 36px;
}

.hero__search {
  display: flex;
  gap: 10px;
  width: 100%;
  max-width: 520px;
}

.search-input-wrap { position: relative; flex: 1; }

.search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
}

.search-input {
  width: 100%;
  height: 50px;
  padding: 0 14px 0 42px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 0.95rem;
  font-family: inherit;
  outline: none;
  transition: border-color var(--transition-base), background var(--transition-base);
}

.search-input::placeholder { color: var(--text-muted); }

.search-input:focus {
  border-color: var(--border-hover);
  background: rgba(255,255,255,0.06);
}

.search-btn {
  height: 50px;
  padding: 0 22px;
  background: var(--accent);
  color: #fff;
  border-radius: var(--radius-md);
  font-size: 0.92rem;
  font-weight: 600;
  font-family: inherit;
  transition: background var(--transition-base), transform var(--transition-base);
}

.search-btn:hover { background: #2f6eef; transform: translateY(-1px); }

/* ---- Stats ---- */
.stats {
  padding: 0 0 64px;
  position: relative;
  z-index: 1;
}

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

.stat-card {
  padding: 22px 18px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  text-align: center;
  transition: border-color var(--transition-base), transform var(--transition-base);
}

.stat-card:hover {
  transform: translateY(-3px);
  border-color: var(--border-hover);
}

.stat-card__value {
  font-family: 'Outfit', sans-serif;
  font-size: 1.85rem;
  font-weight: 700;
  letter-spacing: -0.04em;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.stat-card__label {
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* ---- Sections / Products ---- */
.products { position: relative; z-index: 1; }

.section__header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 28px;
  gap: 16px;
}

.section__title {
  font-family: 'Outfit', sans-serif;
  font-size: clamp(1.45rem, 3vw, 1.9rem);
  font-weight: 700;
  letter-spacing: -0.03em;
}

.section__title-accent { color: var(--accent-h); }

.section__subtitle {
  font-size: 0.92rem;
  color: var(--text-muted);
  margin-top: 4px;
}

.category-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
}

.category-chip {
  padding: 8px 14px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-weight: 500;
  background: transparent;
  transition: background var(--transition-base), border-color var(--transition-base), color var(--transition-base);
}

.category-chip:hover {
  color: var(--text-primary);
  border-color: var(--border-hover);
}

.category-chip--active {
  background: var(--accent-muted);
  border-color: var(--border-hover);
  color: var(--text-primary);
}

.products-grid,
.reviews-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 18px;
}

.product-card {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: transform var(--transition-base), border-color var(--transition-base), box-shadow var(--transition-base);
}

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

.product-card__img-wrap {
  position: relative;
  height: 180px;
  overflow: hidden;
  background: var(--bg-secondary);
}

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

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

.product-card__img-placeholder { width: 100%; height: 100%; }

.product-card__overlay {
  position: absolute;
  inset: 0;
  background: rgba(8, 10, 14, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity var(--transition-base);
}

.product-card:hover .product-card__overlay { opacity: 1; }

.product-card__overlay-text {
  padding: 8px 16px;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: var(--radius-md);
  font-size: 0.84rem;
  font-weight: 600;
}

.product-card__body { padding: 18px; }

.product-card__category {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--accent-h);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 6px;
  display: block;
}

.product-card__name,
.product-card__title {
  font-family: 'Outfit', sans-serif;
  font-size: 1.05rem;
  font-weight: 650;
  margin-bottom: 6px;
  letter-spacing: -0.02em;
}

.product-card__desc {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 16px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.product-card__price {
  font-family: 'Outfit', sans-serif;
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.product-card__action { color: var(--text-muted); }

/* Reviews */
.review-card {
  padding: 24px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
}

.review-card__stars {
  color: #d4a017;
  font-size: 0.95rem;
  margin-bottom: 12px;
  letter-spacing: 1px;
}

.review-card__text {
  color: var(--text-secondary);
  font-size: 0.92rem;
  line-height: 1.65;
  margin-bottom: 18px;
}

.review-card__author {
  display: flex;
  align-items: center;
  gap: 10px;
}

.review-card__avatar {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: #2a4d8f;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 0.85rem;
  text-transform: lowercase;
}

.review-card__avatar--alt { background: #2f6b4f; }
.review-card__avatar--warm { background: #7a5a28; }

.review-card__name {
  font-weight: 650;
  font-size: 0.9rem;
}

.review-card__role {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* Empty / error */
.empty-state, .error-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 72px 24px;
  color: var(--text-secondary);
}

.empty-state h1,
.empty-state h2,
.empty-state h3 {
  font-family: 'Outfit', sans-serif;
  color: var(--text-primary);
  margin-bottom: 10px;
}

.empty-state p { margin-bottom: 20px; }

/* Toast */
.cart-toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: #151a21;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 0.88rem;
  font-weight: 550;
  box-shadow: var(--shadow-md);
  transform: translateY(16px);
  opacity: 0;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.cart-toast--visible {
  transform: translateY(0);
  opacity: 1;
}

/* Footer */
.footer {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--border-color);
  padding: 36px 0;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.footer__logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: 'Outfit', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.footer__logo-img {
  width: 22px;
  height: 22px;
  border-radius: 4px;
}

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

.divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border-color), transparent);
  margin: 0 24px;
}

.fade-in { opacity: 0; transform: translateY(10px); transition: opacity 0.45s ease, transform 0.45s ease; }
.fade-in.visible { opacity: 1; transform: translateY(0); }

/* Order modal (checkout email preview) */
.order-modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.72);
  backdrop-filter: blur(6px);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  transition: opacity 0.28s ease;
}

.order-modal--visible { opacity: 1; }

.order-modal__panel {
  background: #0a0a0a;
  border: 1px solid rgba(255,255,255,0.1);
  padding: 28px;
  border-radius: 12px;
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  overflow-y: auto;
  transform: translateY(14px);
  transition: transform 0.28s ease;
  box-shadow: var(--shadow-lg);
}

.order-modal__panel--compact { max-width: 420px; }

.order-modal--visible .order-modal__panel { transform: translateY(0); }

.order-modal__eyebrow {
  font-size: 0.78rem;
  color: #4ade80;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 14px;
}

.order-modal__title {
  font-family: 'Outfit', sans-serif;
  font-size: 1.35rem;
  font-weight: 700;
  margin-bottom: 12px;
}

.order-modal__greeting {
  color: #fff;
  font-size: 1rem;
  margin-bottom: 10px;
}

.order-modal__copy {
  color: #a8b0bd;
  font-size: 0.94rem;
  line-height: 1.55;
  margin-bottom: 14px;
}

.order-modal__copy--muted { color: var(--text-muted); font-size: 0.88rem; }
.order-modal__copy a { color: var(--accent-h); }

.order-modal__paybox {
  background: rgba(61,126,255,0.08);
  border-left: 3px solid var(--accent);
  padding: 14px 16px;
  margin-bottom: 20px;
  border-radius: 0 8px 8px 0;
}

.order-modal__paybox strong {
  display: block;
  color: #fff;
  margin-bottom: 10px;
  font-size: 0.92rem;
}

.order-modal__paybox ol {
  color: #a8b0bd;
  font-size: 0.88rem;
  line-height: 1.55;
  margin-left: 18px;
  list-style: decimal;
}

.order-modal__paybox li { margin-bottom: 8px; }
.order-modal__paybox a { color: var(--accent-h); }

.order-modal__signoff {
  margin-bottom: 18px;
  color: #a8b0bd;
  font-size: 0.9rem;
}

.order-modal__signoff strong { color: #fff; }

.order-modal__billing,
.order-modal__details {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 8px;
  padding: 14px;
  margin-bottom: 16px;
}

.order-modal__billing h4,
.order-modal__details h4 {
  color: #fff;
  margin-bottom: 10px;
  font-size: 0.95rem;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  padding-bottom: 8px;
}

.order-modal__billing p {
  color: #a8b0bd;
  font-size: 0.9rem;
  line-height: 1.5;
}

.order-modal__table-head,
.order-modal__totals > div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: #a8b0bd;
  font-size: 0.88rem;
}

.order-modal__table-head {
  margin-bottom: 8px;
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.order-modal__totals { margin-top: 12px; }
.order-modal__totals > div { margin-top: 8px; }
.order-modal__grand { color: #fff !important; font-size: 1.05rem !important; font-weight: 700; }

@media (max-width: 960px) {
  .stats__grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  :root { --nav-h: 64px; }
  .menu-toggle { display: flex; }

  .nav__links {
    display: none;
    position: fixed;
    top: var(--nav-h);
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 4px;
    padding: 16px;
    background: rgba(0,0,0,0.98);
    border-bottom: 1px solid var(--border-color);
  }

  .nav__links--open { display: flex; }
  .nav__link { width: 100%; padding: 12px 16px; }
  .nav__cart { width: 100%; justify-content: center; margin-left: 0; }
  .hero__search { flex-direction: column; }
  .search-btn { width: 100%; height: 48px; }
  .products-grid, .reviews-grid { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
  .section { padding: 56px 0; }
}

@media (max-width: 480px) {
  .products-grid, .reviews-grid { grid-template-columns: 1fr; }
  .cart-toast { left: 16px; right: 16px; bottom: 16px; }
}

/* Footer links use the original site palette; unset destinations are not fake links. */
.footer__links { display:flex;flex-wrap:wrap;justify-content:center;align-items:center;gap:12px 26px;margin-top:16px; }
.footer__link { display:inline-flex;align-items:center;min-height:44px;font-size:14px;color:var(--text-secondary);text-decoration:none; }
a.footer__link:hover { color:var(--accent-h);text-decoration:underline;text-underline-offset:4px; }
a.footer__link:focus-visible { outline:2px solid var(--accent);outline-offset:5px;border-radius:3px; }
.footer__link--pending { color:var(--text-muted);cursor:default; }

.legal-page{max-width:900px}.legal-page section{margin-top:32px}.legal-page p{line-height:1.8;font-size:16px}.legal-page a:not(.btn){color:var(--accent-h);text-decoration:underline;text-underline-offset:3px}.legal-notice{padding:20px;border:1px solid var(--border-hover);border-radius:12px;background:var(--accent-muted)}
