/* Tesla-inspired layout — full-bleed panels, minimal chrome */
:root {
  --bg: #fff;
  --ink: #171a20;
  --muted: #5c5e62;
  --line: rgba(23, 26, 32, 0.12);
  --white: #fff;
  --ghost: rgba(255, 255, 255, 0.75);
  --btn-dark: #3e6ae1; /* Tesla-like accent blue for primary CTA */
  --btn-dark-hover: #3457b1;
  --panel-overlay: linear-gradient(180deg, rgba(0,0,0,0.35) 0%, rgba(0,0,0,0.15) 40%, rgba(0,0,0,0.45) 100%);
  --font: "Noto Sans SC", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --header-h: 56px;
  --max: 1200px;
  --ease: cubic-bezier(0.5, 0, 0, 0.75);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; border: 0; background: none; cursor: pointer; color: inherit; }
ul { list-style: none; margin: 0; padding: 0; }
h1, h2, h3 { margin: 0; font-weight: 500; }

/* —— Header (Tesla translucent bar) —— */
.tsx-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 100;
  height: var(--header-h);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 0 24px;
  transition: background .3s, backdrop-filter .3s, color .3s;
  color: var(--white);
}
.is-home .tsx-header:not(.is-solid) {
  background: transparent;
}
.tsx-header.is-solid,
body:not(.is-home) .tsx-header {
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(12px);
  color: var(--ink);
  box-shadow: 0 1px 0 var(--line);
}
.tsx-logo {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.08em;
  justify-self: start;
}
.tsx-nav {
  display: flex;
  gap: 4px;
  justify-self: center;
}
.tsx-nav a {
  padding: 6px 14px;
  border-radius: 4px;
  font-size: 14px;
  font-weight: 500;
  transition: background .2s;
}
.tsx-nav a:hover,
.tsx-nav a.is-active { background: rgba(127,127,127,0.18); }
.tsx-aside {
  display: flex;
  align-items: center;
  gap: 8px;
  justify-self: end;
}
.tsx-aside-link,
.tsx-lang {
  padding: 6px 12px;
  border-radius: 4px;
  font-size: 14px;
  font-weight: 500;
}
.tsx-aside-link:hover,
.tsx-lang:hover { background: rgba(127,127,127,0.18); }
.tsx-burger {
  width: 36px; height: 36px;
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  padding: 8px;
  border-radius: 4px;
}
.tsx-burger span {
  display: block;
  height: 1.5px;
  background: currentColor;
}

.tsx-drawer {
  position: fixed;
  inset: 0;
  z-index: 120;
  background: rgba(0,0,0,0.4);
}
.tsx-drawer[hidden] { display: none; }
.tsx-drawer-inner {
  position: absolute;
  top: 0; right: 0; bottom: 0;
  width: min(360px, 88vw);
  background: #eee;
  color: var(--ink);
  padding: 72px 28px 40px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  animation: drawerIn .28s var(--ease);
}
@keyframes drawerIn {
  from { transform: translateX(12%); opacity: 0.6; }
  to { transform: none; opacity: 1; }
}
.tsx-drawer-inner a {
  padding: 14px 12px;
  border-radius: 4px;
  font-size: 18px;
  font-weight: 500;
}
.tsx-drawer-inner a:hover { background: rgba(0,0,0,0.06); }
.tsx-drawer-lang {
  margin-top: 24px;
  display: flex;
  gap: 8px;
}
.tsx-drawer-lang a {
  font-size: 14px !important;
  border: 1px solid var(--line);
}

/* —— Full-bleed panels —— */
.tsx-snap {
  scroll-snap-type: y proximity;
}
.tsx-panel {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: calc(var(--header-h) + 48px) 24px 28px;
  color: var(--white);
  overflow: hidden;
  text-align: center;
  scroll-snap-align: start;
  scroll-snap-stop: always;
}
.tsx-panel--short { min-height: 72vh; scroll-snap-align: none; }
.tsx-panel-media {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.tsx-panel-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.04);
  transition: transform 8s linear;
}
.tsx-panel.is-in .tsx-panel-media img {
  transform: scale(1.12);
}
.tsx-panel-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--panel-overlay);
}
.tsx-panel-media--dark::after {
  background: linear-gradient(180deg, rgba(0,0,0,0.55), rgba(0,0,0,0.72));
}
.tsx-panel-content,
.tsx-panel-actions,
.tsx-panel-bottom {
  position: relative;
  z-index: 1;
  width: 100%;
}
.tsx-panel-content--top { margin-top: 8px; }
.tsx-panel-content--center {
  margin: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.tsx-panel-bottom {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 28px;
  padding-bottom: 8px;
}
.tsx-title {
  font-size: clamp(36px, 6vw, 48px);
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.15;
}
.tsx-title--sm { font-size: clamp(28px, 4vw, 40px); }
.tsx-sub {
  margin: 10px 0 0;
  font-size: 18px;
  font-weight: 400;
  color: var(--ghost);
}
.tsx-panel-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: center;
  max-width: 520px;
  margin: 0 auto;
}
.tsx-panel-actions--inline { margin-top: 28px; }

/* Fade-up like Tesla */
.tsx-anim {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .7s var(--ease), transform .7s var(--ease);
}
.tsx-panel.is-in .tsx-anim,
.tsx-anim.is-in {
  opacity: 1;
  transform: none;
}
.tsx-panel.is-in .tsx-panel-actions.tsx-anim {
  transition-delay: .12s;
}

/* Chevron */
.tsx-chevron {
  width: 28px;
  height: 28px;
  border: 0;
  background: transparent;
  position: relative;
  opacity: 0.85;
  animation: chevronBob 1.6s ease-in-out infinite;
}
.tsx-chevron::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 40%;
  width: 12px;
  height: 12px;
  border-right: 2px solid #fff;
  border-bottom: 2px solid #fff;
  transform: translate(-50%, -50%) rotate(45deg);
}
@keyframes chevronBob {
  0%, 100% { transform: translateY(0); opacity: 0.55; }
  50% { transform: translateY(8px); opacity: 1; }
}

/* Stats panel */
.tsx-stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 28px;
  margin-top: 40px;
  width: min(900px, 100%);
}
.tsx-stats-row strong {
  display: block;
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 500;
  margin-bottom: 6px;
}
.tsx-stats-row span {
  font-size: 13px;
  color: rgba(255,255,255,0.65);
}

/* Buttons — Tesla pill style */
.tsx-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 220px;
  height: 40px;
  padding: 0 24px;
  border-radius: 4px;
  font-size: 14px;
  font-weight: 500;
  transition: background .2s, color .2s, transform .15s;
}
.tsx-btn--primary {
  background: var(--btn-dark);
  color: #fff;
}
.tsx-btn--primary:hover { background: var(--btn-dark-hover); }
.tsx-btn--ghost {
  background: rgba(255,255,255,0.65);
  color: var(--ink);
  backdrop-filter: blur(8px);
}
.tsx-btn--ghost:hover { background: rgba(255,255,255,0.82); }
.tsx-btn--dark {
  background: var(--ink);
  color: #fff;
}
.tsx-btn--dark:hover { background: #000; }
.tsx-btn--outline {
  background: transparent;
  color: var(--ink);
  border: 3px solid var(--ink);
}
.tsx-btn--outline:hover { background: var(--ink); color: #fff; }

/* Specs bar — legacy kept minimal */
.tsx-specs { display: none; }

@media (max-width: 980px) {
  .tsx-stats-row { grid-template-columns: 1fr 1fr; gap: 24px 16px; }
}
@media (max-width: 600px) {
  .tsx-stats-row { grid-template-columns: 1fr 1fr; }
  .tsx-panel { padding-bottom: 20px; }
  .tsx-chevron { margin-bottom: 4px; }
}

/* Content sections */
.tsx-section {
  padding: 88px 24px;
  background: #fff;
}
.tsx-wrap { max-width: var(--max); margin: 0 auto; }
.tsx-section-title {
  text-align: center;
  font-size: 32px;
  margin-bottom: 40px;
  font-weight: 500;
}
.tsx-center { text-align: center; margin-top: 40px; }
.tsx-product-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}
.tsx-product h3 {
  margin: 16px 0 8px;
  font-size: 18px;
  font-weight: 500;
}
.tsx-product p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}
.tsx-product-img {
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #f4f4f4;
  border-radius: 0;
}
.tsx-product-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .6s var(--ease);
}
.tsx-product:hover .tsx-product-img img { transform: scale(1.04); }

/* Inner page hero */
.tsx-page-hero {
  position: relative;
  min-height: 52vh;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  text-align: center;
  color: #fff;
  padding: calc(var(--header-h) + 40px) 24px 56px;
  overflow: hidden;
}
.tsx-page-hero-media {
  position: absolute;
  inset: 0;
}
.tsx-page-hero-media img {
  width: 100%; height: 100%;
  object-fit: cover;
}
.tsx-page-hero-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.25), rgba(0,0,0,0.5));
}
.tsx-page-hero-content { position: relative; z-index: 1; }
.tsx-page-hero h1 {
  font-size: clamp(32px, 5vw, 44px);
  font-weight: 500;
}
.tsx-page-hero p {
  margin: 8px 0 0;
  color: var(--ghost);
  font-size: 17px;
}

.tsx-page {
  padding: 64px 24px 96px;
}
.tsx-page .tsx-wrap { max-width: 1000px; }

/* Filter / products */
.tsx-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-bottom: 36px;
}
.tsx-filters a {
  padding: 8px 18px;
  border-radius: 20px;
  border: 1px solid var(--line);
  font-size: 13px;
  font-weight: 500;
}
.tsx-filters a.is-active,
.tsx-filters a:hover {
  background: var(--ink);
  color: #fff;
  border-color: var(--ink);
}
.tsx-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}
.tsx-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: start;
}

/* Detail */
.tsx-detail-img {
  background: #f4f4f4;
}
.tsx-detail-img img {
  width: 100%;
  aspect-ratio: 4/5;
  object-fit: cover;
}
.tsx-detail h1,
.tsx-detail h2 {
  font-size: 28px;
  font-weight: 500;
  margin-bottom: 12px;
}
.tsx-detail .muted { color: var(--muted); }
.tsx-detail .tsx-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}
.tsx-detail .tsx-actions .tsx-btn { min-width: 160px; }
.tsx-prose p {
  color: var(--muted);
  margin: 0 0 1em;
  font-size: 15px;
  line-height: 1.7;
}
.tsx-tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0; }
.tsx-tags span {
  font-size: 12px;
  padding: 4px 10px;
  border: 1px solid var(--line);
  border-radius: 20px;
  color: var(--muted);
}

/* Contact / form — clean */
.tsx-form {
  display: grid;
  gap: 14px;
}
.tsx-form label { display: grid; gap: 6px; font-size: 13px; font-weight: 500; }
.tsx-form input,
.tsx-form select,
.tsx-form textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 4px;
  font: inherit;
  background: #fff;
}
.tsx-form input:focus,
.tsx-form select:focus,
.tsx-form textarea:focus {
  outline: none;
  border-color: var(--ink);
}
.tsx-form-error {
  padding: 10px 12px;
  background: #fdecea;
  color: #b42318;
  border-radius: 4px;
  font-size: 13px;
}
.tsx-info-list { display: grid; gap: 18px; }
.tsx-info-list dt {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin-bottom: 4px;
}
.tsx-info-list dd { margin: 0; font-size: 16px; font-weight: 500; }

/* FAQ */
.tsx-faq details {
  border-bottom: 1px solid var(--line);
}
.tsx-faq summary {
  list-style: none;
  cursor: pointer;
  padding: 20px 0;
  font-size: 17px;
  font-weight: 500;
  display: flex;
  justify-content: space-between;
  gap: 16px;
}
.tsx-faq summary::-webkit-details-marker { display: none; }
.tsx-faq summary::after { content: "+"; font-weight: 400; color: var(--muted); }
.tsx-faq details[open] summary::after { content: "–"; }
.tsx-faq .tsx-faq-a {
  padding: 0 0 20px;
  color: var(--muted);
  max-width: 640px;
}

/* Gallery */
.tsx-gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.tsx-gallery button {
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
  padding: 0;
  background: #111;
}
.tsx-gallery img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .5s;
  opacity: 0.95;
}
.tsx-gallery button:hover img { transform: scale(1.05); opacity: 1; }

/* Steps */
.tsx-steps {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
  counter-reset: s;
}
.tsx-step {
  padding: 24px 16px;
  border-top: 1px solid var(--ink);
}
.tsx-step::before {
  counter-increment: s;
  content: "0" counter(s);
  display: block;
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 12px;
}
.tsx-step h3 { font-size: 16px; margin-bottom: 8px; }
.tsx-step p { margin: 0; font-size: 13px; color: var(--muted); }

/* Footer */
.tsx-footer {
  background: #fff;
  border-top: 1px solid var(--line);
  padding: 40px 24px 56px;
  text-align: center;
}
.tsx-footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 20px;
  margin-bottom: 20px;
}
.tsx-footer-links a {
  font-size: 12px;
  color: var(--muted);
  font-weight: 500;
}
.tsx-footer-links a:hover { color: var(--ink); }
.tsx-footer-meta,
.tsx-footer-copy {
  margin: 6px 0 0;
  font-size: 12px;
  color: var(--muted);
}
.tsx-footer-meta a:hover { text-decoration: underline; }

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(0,0,0,0.92);
  display: grid;
  place-items: center;
  padding: 40px 20px;
}
.lightbox[hidden] { display: none; }
.lightbox img {
  max-width: min(960px, 92vw);
  max-height: 80vh;
  object-fit: contain;
}
.lightbox-cap { color: rgba(255,255,255,0.75); margin-top: 12px; text-align: center; }
.lightbox-close {
  position: absolute;
  top: 16px; right: 20px;
  color: #fff;
  font-size: 32px;
}

.tsx-cta-band {
  margin-top: 48px;
  padding: 32px;
  background: #f4f4f4;
  text-align: center;
  border-radius: 0;
}
.tsx-cta-band h3 { font-size: 22px; margin-bottom: 8px; }
.tsx-cta-band p { color: var(--muted); margin: 0 0 20px; }
.tsx-pack {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 48px;
}
.tsx-pack article {
  padding: 24px;
  background: #f4f4f4;
}
.tsx-pack h3 { font-size: 16px; margin-bottom: 8px; }
.tsx-pack p { margin: 0; color: var(--muted); font-size: 14px; }

.tsx-lead {
  font-size: 18px;
  color: var(--muted);
  max-width: 640px;
  margin: 0 auto 40px;
  text-align: center;
  line-height: 1.6;
}

@media (max-width: 980px) {
  .tsx-nav, .tsx-aside-link { display: none; }
  .tsx-burger { display: flex; }
  .tsx-header { grid-template-columns: 1fr auto; }
  .tsx-product-row,
  .tsx-grid-3,
  .tsx-steps,
  .tsx-pack,
  .tsx-gallery { grid-template-columns: 1fr 1fr; }
  .tsx-grid-2 { grid-template-columns: 1fr; }
  .tsx-steps { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) {
  .tsx-btn { min-width: 100%; }
  .tsx-panel-actions { max-width: 100%; }
  .tsx-product-row,
  .tsx-grid-3,
  .tsx-gallery,
  .tsx-pack,
  .tsx-steps { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}
