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

/* ============================================================
   FORESTWINDER — SHARED VARIABLES
   ============================================================ */

:root {
  --background: #203126;
  --panel: #f7f5f0;
  --panel-2: #ece9e0;
  --text-light: #f4f1e8;
  --text-dark: #101010;
  --muted: #6d726d;
  --border: #d8d4c9;
  --site-max-width: 1824px;
}


/* ============================================================
   GLOBAL
   ============================================================ */

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  background: var(--background);
  color: var(--text-light);
}

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

button {
  font: inherit;
}


/* ============================================================
   BRANDED ALL-CAPS TYPOGRAPHY
   Same typography as the FORESTWINDER logo.

   The homepage tagline and E30 "coming soon" intentionally use
   their own lowercase display treatment and are excluded here.
   ============================================================ */

.brand,
.main-nav > a,
.nav-button,
.cart-button,
.cart-header h2,
.home-featured-product strong,
.e38-hero-title h1,
.catalog-heading h2,
.product-preview-info h3,
.product-detail-info h1,
.product-details-section h2,
.product-sidebar-box h2,
.site-footer-minimal {
  font-family: "Chiron Sung HK", serif;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}


/* ============================================================
   SHARED HEADER / TOOLBAR
   Used by the homepage, chassis pages, and product pages.
   The black bar spans the full screen; its contents stay at 90%.
   ============================================================ */

.site-header {
  position: relative;
  width: 100%;
  z-index: 100;
  background: #000000;
  border: 0;
  border-bottom: 1px solid #242424;
}

.header-inner {
  width: 95%;
  max-width: var(--site-max-width);
  margin: 0 auto;
  padding: 18px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  color: #f5f1e8;
  font-size: 1.2rem;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 28px;
  margin: 0;
  padding: 0;
  min-height: auto;
  border: 0;
}

.main-nav > a,
.nav-button {
  color: #f5f1e8;
  font-size: 0.95rem;
  background: transparent;
  border: 0;
  padding: 10px 0;
  cursor: pointer;
}

.main-nav > a:hover,
.nav-button:hover {
  opacity: 0.7;
}


/* ============================================================
   CHASSIS DROPDOWN
   ============================================================ */

.dropdown {
  position: relative;
}

.dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: -16px;
  min-width: 150px;
  padding: 8px 0;
  background: #000000;
  border: 1px solid #333333;
  z-index: 200;
}

.dropdown:hover .dropdown-menu {
  display: block;
}

.dropdown-menu a {
  display: block;
  width: 100%;
  padding: 12px 16px;
  color: #f5f1e8;
  font-size: 0.95rem;
  background: #000000;
}

.dropdown-menu a:hover {
  background: #1a1a1a;
}


/* ============================================================
   CART BUTTON
   ============================================================ */

.cart-button {
  color: #f5f1e8;
  background: transparent;
  border: 1px solid #777777;
  padding: 9px 13px;
  cursor: pointer;
}

.cart-button:hover {
  border-color: #f5f1e8;
}


/* ============================================================
   CART DRAWER
   ============================================================ */

.cart-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  opacity: 0;
  visibility: hidden;
  transition: 0.2s;
  z-index: 199;
}

.cart-overlay.active {
  opacity: 1;
  visibility: visible;
}

.cart-drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: min(420px, 100%);
  height: 100%;
  background: #ffffff;
  color: var(--text-dark);
  transform: translateX(100%);
  transition: transform 0.25s ease;
  z-index: 200;
  display: flex;
  flex-direction: column;
}

.cart-drawer.active {
  transform: translateX(0);
}

.cart-header {
  padding: 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.cart-header h2 {
  margin: 0;
}

.icon-button {
  border: 0;
  background: transparent;
  font-size: 2rem;
  cursor: pointer;
}

.cart-items {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
}

.empty-cart {
  color: var(--muted);
}

.cart-item {
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
}

.cart-item-name {
  font-weight: 700;
  margin-bottom: 6px;
}

.cart-item-variant {
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
}

.cart-item-meta {
  color: var(--muted);
  font-size: 0.92rem;
}

.remove-item {
  border: 0;
  background: transparent;
  color: var(--muted);
  text-decoration: underline;
  cursor: pointer;
}

.cart-footer {
  padding: 20px;
  border-top: 1px solid var(--border);
}

.cart-total {
  display: flex;
  justify-content: space-between;
  margin-bottom: 16px;
  font-size: 1.1rem;
}

.checkout-button {
  width: 100%;
  padding: 14px 20px;
  background: var(--panel);
  color: var(--text-dark);
  border: 1px solid var(--panel);
  cursor: pointer;
}

.checkout-note {
  font-size: 0.8rem;
  text-align: center;
  color: var(--muted);
}


/* ============================================================
   HOMEPAGE
   ============================================================ */

.home-page {
  min-height: 100vh;
  background: var(--background);
}

.home-hero {
  position: relative;
  height: calc(100vh - 73px);
  width: 95%;
  max-width: var(--site-max-width);
  margin: 0 auto;
  background-image:
    linear-gradient(
      rgba(0, 0, 0, 0.16),
      rgba(0, 0, 0, 0.24)
    ),
    url("/images/home.JPEG");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  display: flex;
  align-items: center;
  justify-content: center;
}

.home-overlay {
  text-align: center;
  padding: 30px;
  transform: translateY(-250px);
}

.home-overlay h1 {
  margin: 0;
  font-family: "Chiron Sung HK", serif;
  color: #f5f1e8;
  font-size: 4rem;
  line-height: 0.95;
  font-weight: 700;
  letter-spacing: -0.03em;
  text-transform: lowercase;
  text-shadow: 0 3px 20px rgba(0, 0, 0, 0.45);
}

/* Small featured-product shortcut at the bottom of the hero image. */
.home-featured-product {
  position: absolute;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  width: min(390px, calc(100% - 48px));
  padding: 16px 18px;
  background: rgba(0, 0, 0, 0.88);
  color: #f5f1e8;
  border: 1px solid rgba(255, 255, 255, 0.28);
  display: grid;
  gap: 5px;
  transition: transform 0.15s ease, border-color 0.15s ease;
}

.home-featured-product:hover {
  transform: translate(-50%, -2px);
  border-color: rgba(255, 255, 255, 0.65);
}

.featured-label {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.18em;
}

.home-featured-product strong {
  line-height: 1.3;
}

.featured-link {
  margin-top: 3px;
  font-size: 0.86rem;
  color: #d6d6d0;
}


/* ============================================================
   E30 PAGE — COMING SOON
   ============================================================ */

.chassis-page {
  min-height: 100vh;
  background: var(--background);
}

.coming-soon-page {
  width: 95%;
  max-width: var(--site-max-width);
  min-height: calc(100vh - 73px);
  margin: 0 auto;
  background-image:
    linear-gradient(
      rgba(0, 0, 0, 0.22),
      rgba(0, 0, 0, 0.35)
    ),
    url("/images/e30.JPEG");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  display: flex;
  align-items: center;
  justify-content: center;
}

.coming-soon-overlay {
  text-align: center;
  color: #f5f1e8;
  padding: 30px;
}

.chassis-name {
  margin: 0 0 10px;
  font-size: 0.85rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
}

.coming-soon-overlay h1 {
  margin: 0;
  font-family: "Chiron Sung HK", serif;
  font-size: 8rem;
  font-weight: 700;
  line-height: 1;
  text-transform: lowercase;
  text-shadow: 0 3px 20px rgba(0, 0, 0, 0.5);
}


/* ============================================================
   E30 PAGE — MATCHED TO E38 LAYOUT
   ============================================================ */

.e30-hero {
  width: 95%;
  max-width: var(--site-max-width);
  min-height: 340px;
  margin: 0 auto;
  position: relative;
  background-image:
    linear-gradient(rgba(0, 0, 0, 0.18), rgba(0, 0, 0, 0.36)),
    url("/images/e30.JPEG");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.e30-hero-title {
  position: absolute;
  left: 28px;
  bottom: 24px;
}

.e30-hero-title span {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.22em;
}

.e30-hero-title h1 {
  margin: 2px 0 0;
  font-family: "Chiron Sung HK", serif;
  font-size: 7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 0.9;
  text-transform: uppercase;
}

.e30-coming-section {
  width: 95%;
  max-width: var(--site-max-width);
  margin: 0 auto;
  padding: 48px 28px 80px;
  background: var(--background);
  color: var(--text-light);
}

.e30-coming-section h2 {
  margin: 0;
  font-family: "Chiron Sung HK", serif;
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}


/* ============================================================
   E38 CHASSIS PAGE
   The chassis image is separate from all product photography.
   Expected image: /images/e38.JPEG
   ============================================================ */

.e38-hero {
  width: 95%;
  max-width: var(--site-max-width);
  min-height: 340px;
  margin: 0 auto;
  position: relative;
  background-image:
    linear-gradient(rgba(0, 0, 0, 0.18), rgba(0, 0, 0, 0.36)),
    url("/images/e38.JPEG");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.e38-hero-title {
  position: absolute;
  left: 28px;
  bottom: 24px;
}

.e38-hero-title span {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.22em;
}

.e38-hero-title h1 {
  margin: 2px 0 0;
  font-size: 7rem;
  line-height: 0.9;
}

.chassis-catalog {
  width: 95%;
  max-width: var(--site-max-width);
  margin: 0 auto;
  padding: 48px 28px 80px;
  color: var(--text-light);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  background: var(--background);
}

.catalog-heading {
  grid-column: 1 / -1;
  margin-bottom: 0;
}

.catalog-heading h2 {
  margin: 0;
  font-size: 2rem;
}

.product-preview-card {
  width: 100%;
  max-width: none;
  background: #f5f3ed;
  color: var(--text-dark);
  border: 2px solid #000000;
  display: grid;
  grid-template-columns: 1fr;
  transition: transform 0.15s ease;
}

.product-preview-card:hover {
  transform: translateY(-2px);
}

.product-preview-image {
  aspect-ratio: 1 / 1;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  background: var(--panel-2);
}

.product-preview-image img {
  width: 100%;
  max-width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.product-preview-info {
  min-width: 0;
  padding: 26px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.product-preview-chassis {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.product-preview-info h3 {
  margin: 8px 0 10px;
  font-size: 1.45rem;
}

.product-preview-info p {
  margin: 0 0 18px;
  color: var(--muted);
  line-height: 1.5;
}

.product-preview-link {
  font-size: 0.9rem;
  font-weight: 700;
}


/* ============================================================
   PRODUCT DETAIL PAGE
   Expected product image:
   /images/e38-window-regulator-wheel-kit.JPEG
   ============================================================ */

.product-page {
  min-height: 100vh;
  background: var(--background);
  color: var(--text-dark);
}

.product-detail-page {
  width: 95%;
  max-width: var(--site-max-width);
  margin: 0 auto;
  padding: 32px 0 80px;
}

.product-detail {
  display: grid;
  grid-template-columns: minmax(0, 55fr) minmax(0, 45fr);
  background: #ffffff;
  border: 1px solid var(--border);
}

.product-detail-image {
  min-width: 0;
  min-height: 0;
  align-self: start;
  background: var(--panel-2);
  display: flex;
  flex-direction: column;
}

.product-carousel-main {
  position: relative;
  width: 100%;
  aspect-ratio: 3 / 2;
  flex: none;
  min-height: 0;
  overflow: hidden;
}

.product-carousel-main > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.product-carousel-arrow {
  position: absolute;
  top: 50%;
  width: 44px;
  height: 44px;
  transform: translateY(-50%);
  border: 1px solid rgba(255, 255, 255, 0.55);
  background: rgba(0, 0, 0, 0.58);
  color: #ffffff;
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
}

.product-carousel-arrow:hover {
  background: rgba(0, 0, 0, 0.78);
}

.product-carousel-prev {
  left: 14px;
}

.product-carousel-next {
  right: 14px;
}

.product-carousel-thumbnails {
  display: flex;
  gap: 8px;
  padding: 10px;
  background: #ffffff;
  border-top: 1px solid var(--border);
}

.product-carousel-thumb {
  width: 64px;
  height: 64px;
  padding: 0;
  border: 2px solid transparent;
  background: var(--panel-2);
  opacity: 0.65;
  overflow: hidden;
  cursor: pointer;
}

.product-carousel-thumb.active {
  border-color: var(--background);
  opacity: 1;
}

.product-carousel-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.product-detail-info {
  padding: 40px 44px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

.product-chassis {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.product-detail-info h1 {
  margin: 0 0 16px;
  font-size: 2.3rem;
  line-height: 1.08;
}

.product-options {
  display: flex;
  gap: 10px;
  margin: 0 0 20px;
}

.product-option-button {
  width: fit-content;
  background: #ffffff;
  color: var(--text-dark);
  border: 1px solid var(--background);
  padding: 13px 23px;
  cursor: pointer;
  font-family: "Chiron Sung HK", serif;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.product-option-button:hover {
  opacity: 0.85;
}

.product-option-button.active {
  background: var(--background);
  color: #ffffff;
  border: 0;
  padding: 14px 24px;
}

.product-detail-price {
  margin: 0 0 18px;
  font-size: 1.5rem;
  font-weight: 700;
}

.product-detail-description {
  margin: 0 0 14px;
  color: var(--muted);
  line-height: 1.6;
}

.product-kit-includes {
  margin: 0 0 22px;
  color: var(--text-dark);
  line-height: 1.6;
}

.add-to-cart {
  width: fit-content;
  background: var(--background);
  color: #ffffff;
  border: 0;
  padding: 14px 24px;
  cursor: pointer;
}

.product-details-layout {
  margin-top: 28px;
  display: grid;
  grid-template-columns: minmax(0, 1.8fr) minmax(280px, 0.8fr);
  gap: 28px;
  align-items: start;
}

.product-details-section {
  padding: 34px;
  background: #ffffff;
  border: 1px solid var(--border);
}

.product-details-section h2,
.product-sidebar-box h2 {
  margin: 0 0 12px;
}

.product-details-section p {
  margin: 0;
  max-width: 760px;
  color: var(--muted);
  line-height: 1.7;
}

.product-details-section p + p {
  margin-top: 1.7em;
}

.product-details-sidebar {
  display: grid;
  gap: 28px;
}

.product-sidebar-box {
  padding: 28px;
  background: #ffffff;
  border: 1px solid var(--border);
}

.wheels-sold-count {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin: 10px 0 12px;
}

.wheels-sold-count strong {
  font-size: 1.8rem;
}

.wheels-sold-count span {
  color: var(--muted);
}

.wheels-sold-progress {
  width: 100%;
  height: 18px;
  overflow: hidden;
  background: var(--panel-2);
  border: 1px solid var(--border);
}

.wheels-sold-progress-fill {
  width: 4.8%;
  height: 100%;
  background: var(--background);
}

.faq-item + .faq-item {
  margin-top: 26px;
}

.faq-item h3 {
  margin: 0 0 10px;
  font-size: 1rem;
}

.faq-answer-space {
  min-height: 64px;
  border-bottom: 1px solid var(--border);
}



/* ============================================================
   ABOUT / CONTACT PAGE
   ============================================================ */

.about-page {
  min-height: 100vh;
  background: var(--background);
  color: var(--text-dark);
}

.about-contact-page {
  width: 95%;
  max-width: var(--site-max-width);
  min-height: calc(100vh - 73px);
  margin: 0 auto;
  padding: 56px 0 90px;
  background: #f5f3ed;
}

.about-contact-panel {
  width: calc(100% - 56px);
  margin: 0 28px;
  padding: 38px;
  background: #ffffff;
  border: 1px solid var(--border);
}

.about-contact-panel h1 {
  margin: 0 0 22px;
  font-family: "Chiron Sung HK", serif;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.about-contact-panel p {
  max-width: 720px;
  color: var(--muted);
  line-height: 1.7;
}

.about-contact-panel a {
  color: var(--text-dark);
  text-decoration: underline;
}


/* ============================================================
   MINIMAL FOOTER
   ============================================================ */

.site-footer-minimal {
  width: 100%;
  background: #000000;
  color: #f5f1e8;
  padding: 18px 28px;
  font-size: 0.9rem;
}


/* ============================================================
   MOBILE
   ============================================================ */

@media (max-width: 760px) {
  html {
    font-size: 14px;
  }

  .brand {
    flex: 0 0 auto;
    font-size: 0;
    white-space: nowrap;
  }

  .brand::after {
    content: "[FW]";
    font-size: 1rem;
  }

  .header-inner {
    padding: 10px 0;
  }

  .main-nav {
    gap: 10px;
    min-width: 0;
  }

  .main-nav > a,
  .nav-button,
  .cart-button {
    white-space: nowrap;
  }

  .main-nav > a,
  .nav-button {
    font-size: 0.8rem;
  }

  .cart-button {
    padding: 7px 9px;
    font-size: 0.8rem;
  }

  .home-hero {
    height: calc(100vh - 65px);
  }

  .home-overlay h1 {
    font-size: clamp(3rem, 14vw, 6rem);
  }

  .home-featured-product {
    left: 50%;
    bottom: 16px;
    width: calc(100% - 32px);
    transform: translateX(-50%);
  }

  .e30-hero,
  .e38-hero {
    width: 95%;
    min-height: 280px;
  }

  .e30-coming-section {
    width: 95%;
    padding: 36px 18px 60px;
  }

  .chassis-catalog {
    width: 95%;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding: 36px 18px 60px;
  }

  .product-preview-card {
    grid-template-columns: 1fr;
  }

  .product-preview-image {
    aspect-ratio: 1 / 1;
    min-height: 0;
  }

  .product-detail-page {
    width: 95%;
    padding: 36px 0 60px;
  }

  .product-detail {
    grid-template-columns: 1fr;
  }

  .product-detail-image {
    min-height: 0;
  }

  .product-carousel-main {
    min-height: 0;
  }

  .product-carousel-thumb {
    width: 58px;
    height: 58px;
  }

  .product-detail-info {
    padding: 30px 22px;
  }

  .product-details-layout {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .product-details-sidebar {
    gap: 20px;
  }

  .coming-soon-page {
    width: 95%;
  }

  .about-contact-page {
    width: 95%;
    padding: 36px 0 60px;
  }

  .about-contact-panel {
    width: calc(100% - 36px);
    margin: 0 18px;
    padding: 28px 22px;
  }
}
