/*
 * VIP theme - modern blue tech.
 * Standalone sheet layered over Bootstrap; it does not load site.css.
 */

:root {
  color-scheme: light;

  --bg: #eef3fb;
  --bg-deep: #0a1730;
  --surface: #ffffff;
  --surface-muted: #f6f9ff;

  --brand: #1d4ed8;
  --brand-bright: #3b82f6;
  --brand-glow: #38bdf8;
  --brand-soft: rgba(59, 130, 246, 0.1);
  --brand-line: rgba(59, 130, 246, 0.28);

  --ink: #0b1f3d;
  --ink-soft: #5a6f8c;
  --ink-invert: #eaf2ff;

  --rule: #dde6f5;
  --rule-strong: #c3d3ec;

  --font-body: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, 'SF Mono', Menlo, Consolas, monospace;

  --shadow-sm: 0 1px 2px rgba(11, 31, 61, 0.06);
  --shadow-md: 0 2px 4px rgba(11, 31, 61, 0.05), 0 12px 28px rgba(11, 31, 61, 0.08);
  --shadow-lg: 0 4px 10px rgba(11, 31, 61, 0.06), 0 24px 60px rgba(11, 31, 61, 0.12);

  --radius: 12px;
  --radius-sm: 8px;

  /* Height of the sticky search/export bar. The table header pins directly
   * below it, so both rules read from this one value. */
  --toolbar-h: 5rem;
}

html {
  font-size: 16px;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  /* Flat, untinted background. The sticky toolbar paints this exact colour, so
   * any gradient here would show as a band behind it while scrolling. */
  background-color: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 0.95rem;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

.site-shell,
.content-shell {
  width: 100%;
  max-width: 1600px;
  margin: 0 auto;
}

/* Header ------------------------------------------------------------------ */

.site-header {
  position: relative;
  overflow: hidden;
  background-color: var(--bg-deep);
  background-image:
    radial-gradient(620px 200px at 8% 120%, rgba(56, 189, 248, 0.32), transparent 70%),
    linear-gradient(105deg, #0a1730 0%, #12305e 52%, #1b4894 100%);
  box-shadow: var(--shadow-md);
}

/* Faint circuit grid, purely decorative. */
.site-header::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(148, 197, 255, 0.09) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 197, 255, 0.09) 1px, transparent 1px);
  background-size: 46px 46px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.85), transparent);
  -webkit-mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.85), transparent);
  pointer-events: none;
}

.header-beam {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--brand-glow) 22%, #a5b4fc 55%, var(--brand-glow) 78%, transparent);
  opacity: 0.9;
}

.site-header .navbar {
  position: relative;
  z-index: 1;
  padding-top: 1.05rem;
  padding-bottom: 1.05rem;
}

.site-header .navbar-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0;
}

.brand-mark {
  font-size: 1.28rem;
  font-weight: 700;
  letter-spacing: -0.015em;
  color: #ffffff;
}

.brand-tagline {
  display: inline-flex;
  align-items: center;
  padding: 0.22rem 0.55rem;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--brand-glow), var(--brand-bright));
  color: #05122b;
  font-size: 0.64rem;
  font-weight: 800;
  letter-spacing: 0.2em;
  text-indent: 0.2em;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.25), 0 6px 16px rgba(56, 189, 248, 0.4);
}

.site-header .navbar-toggler {
  border-color: rgba(165, 205, 255, 0.35);
  padding: 0.3rem 0.55rem;
}

.site-header .navbar-toggler-icon {
  filter: invert(1) brightness(1.8);
}

.site-header .navbar-toggler:focus {
  box-shadow: 0 0 0 0.2rem rgba(56, 189, 248, 0.35);
}

.site-header .nav-link {
  position: relative;
  color: rgba(224, 238, 255, 0.78);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.4rem 0;
  margin-left: 1.5rem;
  transition: color 0.18s ease;
}

.site-header .nav-link::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--brand-glow), #a5b4fc);
  transform: scaleX(0);
  transition: transform 0.2s ease;
}

.site-header .nav-link:hover,
.site-header .nav-link:focus,
.site-header .nav-link.active {
  color: #ffffff;
}

.site-header .nav-link:hover::after,
.site-header .nav-link:focus::after,
.site-header .nav-link.active::after {
  transform: scaleX(1);
}

/* Page head --------------------------------------------------------------- */

.site-main {
  flex: 1 0 auto;
}

.page-section {
  margin-bottom: 1.5rem;
}

.page-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 1.5rem;
  padding: 1.15rem 1.5rem;
  background-color: var(--surface);
  background-image: linear-gradient(180deg, rgba(59, 130, 246, 0.05), transparent 60%);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
}

.page-head-main {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.55rem;
}

.page-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.7rem;
  padding: 0.3rem 0.7rem 0.3rem 0.55rem;
  border: 1px solid var(--brand-line);
  border-radius: 999px;
  background-color: var(--brand-soft);
  color: var(--brand);
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.eyebrow-dot {
  width: 0.42rem;
  height: 0.42rem;
  border-radius: 50%;
  background-color: #22c55e;
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.18);
}

.page-lead {
  max-width: 62ch;
  margin: 0;
  font-size: 1.28rem;
  font-weight: 700;
  letter-spacing: -0.015em;
  background: linear-gradient(120deg, var(--ink) 25%, var(--brand) 85%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* Contact ----------------------------------------------------------------- */

.head-phone-line {
  color: var(--ink-soft);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.head-phone {
  margin-left: 0.4rem;
  color: var(--brand);
  font-family: var(--font-mono);
  font-size: 1.02rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0;
  text-decoration: none;
  text-transform: none;
  white-space: nowrap;
}

.head-phone:hover,
.head-phone:focus {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.empty-state {
  padding: 2rem 0;
  text-align: center;
  color: var(--ink-soft);
}

/* Search and exports ------------------------------------------------------
 * The toolbar pins to the viewport at top 0 and the table header pins right
 * below it at --toolbar-h. Both live inside .price-panel, which spans the whole
 * list, so they stay pinned for its full length.
 */

.price-panel {
  position: relative;
}

.price-toolbar {
  position: sticky;
  top: 0;
  z-index: 3;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem;
  height: var(--toolbar-h);
  margin-bottom: 0;
  /* Fully opaque and identical to the page background, so the bar is invisible
   * against the page whether it is pinned or not. */
  background-color: var(--bg);
}

.search-field {
  position: relative;
  flex: 1 1 20rem;
  min-width: 0;
}

.search-icon {
  position: absolute;
  top: 50%;
  left: 0.95rem;
  transform: translateY(-50%);
  width: 1.05rem;
  height: 1.05rem;
  color: var(--ink-soft);
  pointer-events: none;
  transition: color 0.18s ease;
}

.search-icon svg {
  width: 100%;
  height: 100%;
  display: block;
}

.search-field:focus-within .search-icon {
  color: var(--brand);
}

.form-control {
  background-color: var(--surface);
  border: 1px solid var(--rule-strong);
  border-radius: var(--radius-sm);
  color: var(--ink);
  box-shadow: var(--shadow-sm);
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.form-control:focus {
  background-color: var(--surface);
  border-color: var(--brand-bright);
  box-shadow: 0 0 0 0.22rem var(--brand-soft);
}

.form-control::placeholder {
  color: #93a3ba;
  opacity: 1;
}

#price-search {
  padding: 0.78rem 1rem 0.78rem 2.7rem;
  font-size: 1rem;
}

.export-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  flex: 0 0 auto;
}

.export-button {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.62rem 1.05rem;
  border: 1px solid var(--rule-strong);
  border-radius: var(--radius-sm);
  background-color: var(--surface);
  color: var(--ink);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease, color 0.18s ease;
}

.export-button:hover,
.export-button:focus {
  border-color: var(--brand-bright);
  color: var(--brand);
  box-shadow: 0 8px 20px rgba(29, 78, 216, 0.16);
  transform: translateY(-1px);
}

.export-button:focus-visible {
  outline: none;
  box-shadow: 0 0 0 0.22rem var(--brand-soft);
}

.export-icon {
  display: inline-flex;
  width: 0.95rem;
  height: 0.95rem;
  flex: 0 0 auto;
  color: var(--brand-bright);
}

.export-icon svg {
  width: 100%;
  height: 100%;
}

/* Export loading state ----------------------------------------------------
 * The spinner replaces the download glyph in place, so the button keeps its
 * width and the toolbar does not reflow while a file is being prepared.
 */

.export-button.is-loading {
  pointer-events: none;
  border-color: var(--brand-line);
  color: var(--ink-soft);
  background-color: var(--surface-muted);
  box-shadow: none;
  transform: none;
}

.export-button.is-loading .export-icon svg {
  display: none;
}

.export-button.is-loading .export-icon::after {
  content: '';
  width: 100%;
  height: 100%;
  border: 2px solid var(--brand-line);
  border-top-color: var(--brand);
  border-radius: 50%;
  animation: vip-spin 0.6s linear infinite;
}

@keyframes vip-spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes vip-pulse {
  50% {
    opacity: 0.35;
  }
}

.export-status {
  margin: 0.6rem 0 0;
  padding: 0.6rem 0.85rem;
  border: 1px solid var(--rule-strong);
  border-left: 3px solid var(--brand-bright);
  border-radius: var(--radius-sm);
  background-color: var(--surface);
  color: var(--ink-soft);
  font-size: 0.85rem;
}

.export-status-error {
  border-color: #f0c2c2;
  border-left-color: #c0392b;
  color: #922b21;
}

/* Price table -------------------------------------------------------------
 * The wrap is the scroll container so `position: sticky` on the header has
 * something that actually scrolls, and it keeps horizontal overflow on mobile.
 */

/* No inner scroll container: the grid sits directly on the page and the page
 * itself scrolls, so the sticky header below pins to the viewport. */
.price-table-wrap {
  background-color: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  /* Deliberately shallow. This element is as tall as the whole list, so a wide
   * ambient shadow would tint the page down both sides for its full length --
   * and the opaque sticky toolbar would punch a bright band through that tint. */
  box-shadow: var(--shadow-sm);
}

.price-table {
  margin-bottom: 0;
  border-collapse: separate;
  border-spacing: 0;
  color: var(--ink);
}

/* Sticky on thead, not th, so the gradient runs unbroken across all columns
 * instead of restarting inside every cell. Pins to the viewport as the page scrolls. */
.price-table thead {
  position: sticky;
  top: var(--toolbar-h);
  z-index: 2;
  background-color: var(--bg-deep);
  background-image: linear-gradient(100deg, #12305e, #1b4ed8 62%, #2563eb);
  box-shadow: inset 0 -2px 0 var(--brand-glow);
}

.price-table thead th {
  white-space: nowrap;
  background-color: transparent;
  color: #ffffff;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  padding: 0.9rem;
  border: 0;
}

.price-table tbody td {
  background-color: var(--surface);
  border: 0;
  border-bottom: 1px solid var(--rule);
  font-size: 0.92rem;
  line-height: 1.45;
  padding: 0.68rem 0.9rem;
  vertical-align: middle;
  transition: background-color 0.12s ease;
}

.price-table tbody tr:last-child td {
  border-bottom: 0;
}

/* No nth-child striping: the search hides rows, which would break the pattern. */
.price-table tbody tr:hover td {
  background-color: var(--brand-soft);
}

.price-table tbody tr:hover .col-number {
  color: var(--brand);
}

.price-cell {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  white-space: nowrap;
  color: var(--brand);
}

.col-number {
  width: 76px;
  color: var(--ink-soft);
  font-family: var(--font-mono);
  font-size: 0.84rem;
  font-variant-numeric: tabular-nums;
}

/* No min-width: long model names wrap instead of forcing the page to scroll
 * sideways, which would also break the sticky header. */
.col-model {
  width: auto;
}

.col-price {
  width: 150px;
}

/* Contact form (shared view, VIP styling) --------------------------------- */

.contact-form {
  max-width: 900px;
  padding: 1.85rem;
  background-color: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
}

.validation-summary ul {
  margin-bottom: 0;
  padding-left: 1.25rem;
}

.field-validation {
  display: block;
  margin-top: 0.3rem;
  font-size: 0.84rem;
}

.btn-dark {
  padding: 0.65rem 1.7rem;
  border: 0;
  border-radius: var(--radius-sm);
  background-image: linear-gradient(120deg, var(--brand), var(--brand-bright));
  color: #ffffff;
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  box-shadow: 0 8px 20px rgba(29, 78, 216, 0.28);
  transition: box-shadow 0.18s ease, transform 0.18s ease;
}

.btn-dark:hover,
.btn-dark:focus {
  background-image: linear-gradient(120deg, var(--brand-bright), var(--brand-glow));
  color: #ffffff;
  box-shadow: 0 12px 26px rgba(29, 78, 216, 0.36);
  transform: translateY(-1px);
}

.alert {
  border-radius: var(--radius-sm);
  font-size: 0.92rem;
}

/* Back to top -------------------------------------------------------------
 * Hidden via opacity/visibility rather than [hidden] so it can fade, and so it
 * leaves the tab order while hidden.
 */

.back-to-top {
  position: fixed;
  right: 1.5rem;
  bottom: 1.5rem;
  z-index: 5;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.9rem;
  height: 2.9rem;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background-image: linear-gradient(135deg, var(--brand), var(--brand-bright));
  color: #ffffff;
  box-shadow: 0 6px 18px rgba(29, 78, 216, 0.34);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s, box-shadow 0.18s ease;
}

.back-to-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: none;
}

.back-to-top:hover,
.back-to-top:focus-visible {
  background-image: linear-gradient(135deg, var(--brand-bright), var(--brand-glow));
  box-shadow: 0 10px 24px rgba(29, 78, 216, 0.42);
}

.back-to-top:focus-visible {
  outline: 2px solid var(--brand-glow);
  outline-offset: 3px;
}

.back-to-top svg {
  width: 1.1rem;
  height: 1.1rem;
}

/* Footer ------------------------------------------------------------------ */

.site-footer {
  position: relative;
  background-color: var(--bg-deep);
  background-image: linear-gradient(100deg, #0a1730, #12305e);
  color: rgba(214, 231, 255, 0.72);
}

.site-footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--brand-glow) 30%, #a5b4fc 70%, transparent);
}

.site-footer .small {
  color: inherit;
  letter-spacing: 0.03em;
}

/* Responsive -------------------------------------------------------------- */

@media (max-width: 991.98px) {
  /* Search and exports stack onto two rows here. */
  :root {
    --toolbar-h: 8rem;
  }

  .page-head {
    padding: 1rem 1.1rem;
  }

  .page-lead {
    font-size: 1.08rem;
  }

  .search-field {
    flex: 1 1 100%;
  }

  .export-actions {
    flex: 1 1 100%;
  }

  .price-table thead th,
  .price-table tbody td {
    padding: 0.6rem 0.65rem;
  }

  .col-number {
    width: 46px;
  }

  .col-price {
    width: 105px;
  }
}

@media (min-width: 992px) {
  .export-actions {
    justify-content: flex-end;
  }
}

@media (prefers-reduced-motion: reduce) {
  .site-header .nav-link::after,
  .head-phone,
  .export-button,
  .btn-dark,
  .form-control,
  .search-icon,
  .price-table tbody td {
    transition: none;
  }

  .head-phone:hover,
  .export-button:hover,
  .btn-dark:hover {
    transform: none;
  }

  .back-to-top {
    transition: opacity 0.01ms, visibility 0.01ms;
    transform: none;
  }

  /* Keep a visible busy signal without spinning. */
  .export-button.is-loading .export-icon::after {
    animation: vip-pulse 1.2s ease-in-out infinite;
  }
}
