/* ── Tokens ─────────────────────────────────────────────────────────────── */
:root {
  --bg:          #FFFF;
  --surface-2:   #D1F8EF;
  --border:      #A1E3F9;
  --accent:      #D1F8EF;
  --teal:        #2DD4BF;
  --danger:      #F87171;
  --text:        #578FCA;
  --text-muted:  #3674B5;
  --text-dim:    #3D4558;

  --font-display: 'Space Grotesk', sans-serif;
  --font-body:    'Inter', sans-serif;

  --radius-sm:   6px;
  --radius:      10px;
  --radius-lg:   16px;

  --transition:  0.2s ease;
}

/* ── Reset ───────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  font-size: 1rem;
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
main { flex: 1; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; }
ul { list-style: none; }

/* ── Scrollbar ───────────────────────────────────────────────────────────── */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: var(--surface); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }

/* ── Utility ─────────────────────────────────────────────────────────────── */
.eyebrow {
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--teal);
  margin-bottom: 0.5rem;
}
.muted { color: var(--text-muted); font-size: 0.9rem; }
.mono  { font-family: monospace; font-size: 0.85rem; color: var(--text-muted); }
.link-accent { color: var(--teal); }
.link-accent:hover { text-decoration: underline; }

/* ── Signal line (signature element) ────────────────────────────────────── */
.signal-line {
  height: 1px;
  width: 100%;
  background: var(--border);
  position: relative;
  overflow: hidden;
}
.signal-pulse {
  position: absolute;
  top: 0; left: -30%;
  height: 1px;
  width: 30%;
  background: linear-gradient(90deg, transparent, var(--teal), transparent);
  animation: pulse 3s ease-in-out infinite;
}
@keyframes pulse {
  0%   { left: -30%; opacity: 0; }
  10%  { opacity: 1; }
  90%  { opacity: 1; }
  100% { left: 100%; opacity: 0; }
}

/* ── Nav ─────────────────────────────────────────────────────────────────── */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: #A1E3F9;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2rem;
  height: 60px;
  max-width: 1200px;
  margin: 0 auto;
  gap: 1.5rem;
}
.nav-links, .nav-right {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex: 1;
}
.nav-right { justify-content: flex-end; }
.nav-link {
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: color var(--transition);
  letter-spacing: 0.03em;
}
.nav-link:hover, .nav-link.active { color: var(--text); }
.nav-logo-wrap { display: flex; align-items: center; }
.nav-logo { height: 28px; }
.nav-user {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-family: var(--font-display);
}

/* ── Buttons ─────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.6rem 1.4rem;
  border-radius: var(--radius);
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: background var(--transition), color var(--transition), transform 0.1s ease, box-shadow var(--transition);
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-primary {
  background: var(--teal);
  color: #0D1A18;
}
.btn-primary:hover { background: #5EE8D3; box-shadow: 0 0 20px rgba(45,212,191,0.35); }
.btn-ghost {
  background: var(--surface-2);
  color: var(--text-muted);
  border: 1px solid var(--border);
}
.btn-ghost:hover { color: var(--text); border-color: var(--text-muted); }
.btn-danger {
  background: transparent;
  color: var(--danger);
  border: 1px solid var(--danger);
}
.btn-danger:hover { background: rgba(248,113,113,0.1); }
.btn-sm  { padding: 0.35rem 0.85rem; font-size: 0.78rem; }
.btn-full { width: 100%; }

/* ── Alerts ──────────────────────────────────────────────────────────────── */
.alert {
  padding: 0.75rem 1rem;
  border-radius: var(--radius);
  font-size: 0.875rem;
  margin-bottom: 1.25rem;
  border-left: 3px solid;
}
.alert--success { background: rgba(45,212,191,0.1); border-color: var(--teal); color: var(--teal); }
.alert--error   { background: rgba(248,113,113,0.1); border-color: var(--danger); color: var(--danger); }

/* ── Hero ────────────────────────────────────────────────────────────────── */
.products-hero,
.contact-hero {
  max-width: 1200px;
  margin: 0 auto;
  padding: 3.5rem 2rem 1rem;
}
.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 5vw, 3.5rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--text);
}
.hero-title em {
  font-style: normal;
  color: var(--teal);
}

/* ── Category tabs ───────────────────────────────────────────────────────── */
.products-layout {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1.5rem 2rem 4rem;
}
.category-tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 2rem;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0;
}
.cat-tab {
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-muted);
  padding: 0.5rem 1rem 0.65rem;
  border-bottom: 2px solid transparent;
  transition: color var(--transition), border-color var(--transition);
  margin-bottom: -1px;
}
.cat-tab:hover { color: var(--text); }
.cat-tab--active { color: var(--teal); border-bottom-color: var(--teal); }

/* ── Product grid ────────────────────────────────────────────────────────── */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
}
.product-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: border-color var(--transition), transform var(--transition), box-shadow var(--transition);
  display: flex;
  flex-direction: column;
}
.product-card:hover {
  border-color: var(--teal);
  transform: translateY(-3px);
  box-shadow: 0 8px 30px rgba(45,212,191,0.1);
}
.product-card__img-wrap {
  aspect-ratio: 3/2;
  background: var(--surface-2);
  overflow: hidden;
}
.product-card__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.product-card:hover .product-card__img { transform: scale(1.03); }
.product-card__body {
  padding: 1.1rem 1.25rem;
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 0.35rem;
}
.product-card__name {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
}
.product-card__desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.5;
  flex: 1;
}
.product-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
}
.product-card__price {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--teal);
}
.product-card__cta {
  font-size: 0.8rem;
  color: var(--text-muted);
  transition: color var(--transition);
}
.product-card:hover .product-card__cta { color: var(--teal); }

/* ── Empty state ─────────────────────────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 5rem 2rem;
  color: var(--text-muted);
}
.empty-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
  color: var(--text-dim);
}
.empty-state h2 {
  font-family: var(--font-display);
  font-size: 1.4rem;
  margin-bottom: 0.5rem;
  color: var(--text);
}
.empty-state p { font-size: 0.9rem; }

/* ── Product page ────────────────────────────────────────────────────────── */
.product-page {
  max-width: 1100px;
  margin: 0 auto;
  padding: 2rem 2rem 5rem;
  display: grid;
  grid-template-rows: auto auto auto;
  gap: 1.5rem;
}
.product-page__viewer {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1rem;
}
.gallery-img-wrap {
  flex: 1;
  aspect-ratio: 16/9;
  background: var(--surface-2);
  border-radius: var(--radius);
  overflow: hidden;
}
.gallery-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.gallery-arrow {
  font-size: 2rem;
  color: var(--text-muted);
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface-2);
  user-select: none;
  transition: color var(--transition), border-color var(--transition);
  flex-shrink: 0;
}
.gallery-arrow:hover { color: var(--teal); border-color: var(--teal); }

.product-page__thumbnails {
  display: flex;
  gap: 0.6rem;
  overflow-x: auto;
}
.thumb {
  width: 80px;
  height: 60px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 2px solid var(--border);
  flex-shrink: 0;
  transition: border-color var(--transition);
}
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb--active, .thumb:hover { border-color: var(--teal); }

.product-page__info {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
}
.product-title {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 0.25rem;
}
.product-price {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--teal);
  margin-bottom: 1.25rem;
}
.product-divider {
  height: 1px;
  background: var(--border);
  margin: 1.25rem 0;
  position: relative;
  overflow: hidden;
}
.product-divider::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, var(--teal), transparent);
  width: 40%;
}
.product-ldesc {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.75;
  margin-bottom: 2rem;
}
.product-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

/* ── Contact ─────────────────────────────────────────────────────────────── */
.contact-grid {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 2rem 5rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.25rem;
}
.contact-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
}
.contact-card__heading {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 0.85rem;
}
.contact-card__text {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.7;
}
.contact-list { display: flex; flex-direction: column; gap: 1rem; }
.contact-list li { display: flex; flex-direction: column; gap: 0.2rem; }
.contact-list__label {
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-dim);
  font-family: var(--font-display);
}
.contact-list__link {
  font-size: 0.9rem;
  color: var(--text);
  transition: color var(--transition);
}
.contact-list__link:hover { color: var(--teal); }

/* ── Auth ────────────────────────────────────────────────────────────────── */
.auth-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 120px);
  padding: 2rem;
}
.auth-card {
  width: 100%;
  max-width: 400px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
}
.auth-title {
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 1.75rem;
}
.auth-form { display: flex; flex-direction: column; gap: 1rem; }

/* ── Form fields ─────────────────────────────────────────────────────────── */
.field { display: flex; flex-direction: column; gap: 0.4rem; }
.field--row { flex-direction: row; align-items: center; gap: 0.6rem; }
.field__label {
  font-size: 0.78rem;
  font-weight: 500;
  font-family: var(--font-display);
  letter-spacing: 0.04em;
  color: var(--text-muted);
  text-transform: uppercase;
}
.field__label--inline { text-transform: none; font-size: 0.875rem; color: var(--text); }
.field__input {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  padding: 0.6rem 0.85rem;
  font-size: 0.9rem;
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
  width: 100%;
}
.field__input:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(45,212,191,0.15);
}
.field__input::placeholder { color: var(--text-dim); }
.field__textarea { resize: vertical; min-height: 80px; }
.field__file {
  padding: 0.4rem 0.6rem;
  font-size: 0.82rem;
  cursor: pointer;
  margin-bottom: 0.3rem;
}
.field__checkbox { width: 16px; height: 16px; accent-color: var(--teal); cursor: pointer; }
select.field__input { cursor: pointer; }

/* ── Admin ───────────────────────────────────────────────────────────────── */
.admin-layout {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 2rem 5rem;
}
.admin-header { margin-bottom: 2rem; }
.admin-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}
.admin-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
}
.admin-section--wide { grid-column: 1 / -1; }
.admin-section__title {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.admin-form { display: flex; flex-direction: column; gap: 1rem; }

/* ── Table ───────────────────────────────────────────────────────────────── */
.admin-table-wrap { overflow-x: auto; }
.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}
.admin-table th {
  text-align: left;
  font-family: var(--font-display);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  padding: 0.5rem 0.75rem;
  border-bottom: 1px solid var(--border);
}
.admin-table td {
  padding: 0.7rem 0.75rem;
  border-bottom: 1px solid rgba(37,42,58,0.5);
  color: var(--text-muted);
}
.admin-table tr:hover td { background: var(--surface-2); }
.admin-table td:first-child { color: var(--text); }

/* ── Badge ───────────────────────────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.15rem 0.55rem;
  border-radius: 99px;
  background: var(--surface-2);
  font-size: 0.75rem;
  font-family: var(--font-display);
  color: var(--text-muted);
  border: 1px solid var(--border);
}
.badge--type { color: var(--teal); border-color: rgba(45,212,191,0.3); background: rgba(45,212,191,0.07); }

/* ── Footer ──────────────────────────────────────────────────────────────── */
.footer {
  border-top: 1px solid var(--border);
  padding: 1.5rem 2rem;
  margin-top: auto;
}
.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.footer-brand {
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
}
.footer-copy { font-size: 0.8rem; color: var(--text-muted); }
.footer-links { display: flex; gap: 1.25rem; }
.footer-link { font-size: 0.8rem; color: var(--text-muted); transition: color var(--transition); }
.footer-link:hover { color: var(--teal); }

/* ── Responsive ──────────────────────────────────────────────────────────── */
@media (min-width: 768px) {
  .admin-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 600px) {
  .nav-inner { padding: 0 1rem; }
  .products-hero, .contact-hero, .products-layout,
  .contact-grid, .product-page, .admin-layout { padding-left: 1rem; padding-right: 1rem; }
  .gallery-arrow { font-size: 1.4rem; padding: 0.4rem 0.5rem; }
  .product-actions { flex-direction: column; }
  .btn-full { width: 100%; }
  .footer-inner { flex-direction: column; align-items: flex-start; gap: 0.5rem; }
}

@media (prefers-reduced-motion: reduce) {
  .signal-pulse { animation: none; }
  * { transition-duration: 0.01ms !important; }
}
