/* ============================================================
   FURIO98RACING — Custom CSS
   Mirrors the original React/Tailwind design exactly
   ============================================================ */

/* Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Barlow:ital,wght@0,400;0,600;0,700;0,900;1,400;1,700;1,900&family=Barlow+Condensed:ital,wght@0,700;0,800;0,900;1,700;1,800;1,900&display=swap');

/* ── Design Tokens ── */
:root {
  --background: #fafafa;
  --foreground: #252535;
  --card: #f2f2f2;
  --primary: #d4410b;
  --primary-foreground: #ffffff;
  --secondary: #2d4dbf;
  --secondary-foreground: #ffffff;
  --muted: #f0f0f3;
  --muted-foreground: #7a7a8a;
  --border: #dddde6;
  --track: #1a1a22;
  --track-muted: #8888a0;
  --track-foreground: #ffffff;
  --radius: 4px;
  --font-sans: 'Barlow', sans-serif;
  --font-display: 'Barlow Condensed', sans-serif;
  --hero-shade: linear-gradient(90deg, rgba(10,10,10,.94) 0%, rgba(10,10,10,.65) 35%, transparent 72%);
  --mobile-shade: linear-gradient(0deg, rgba(10,10,10,.96), rgba(10,10,10,.25));
  --story-shade: linear-gradient(0deg, rgba(10,10,10,.80), transparent 75%);
}

/* ── Base Reset ── */
*, *::before, *::after { box-sizing: border-box; border-color: var(--border); letter-spacing: 0; }
body { margin: 0; background: var(--background); color: var(--foreground); font-family: var(--font-sans); }
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 800; line-height: 1; }
button, a, input, select { -webkit-tap-highlight-color: transparent; }
button, a { touch-action: manipulation; }
::selection { background: var(--primary); color: var(--primary-foreground); }
a { text-decoration: none; color: inherit; }

/* ── Layout ── */
.site-container { width: min(calc(100% - 96px), 1320px); margin-inline: auto; }

/* ── Typography helpers ── */
.eyebrow { font-size: 11px; font-weight: 700; text-transform: uppercase; }
.section-title { font-family: var(--font-display); font-weight: 800; font-size: 43px; text-transform: uppercase; line-height: 1; margin: 0; }
.section-kicker { color: var(--primary); font-size: 11px; font-weight: 700; text-transform: uppercase; margin-bottom: 12px; display: block; }
.text-muted { color: var(--muted-foreground) !important; }
.text-primary-color { color: var(--primary) !important; }
.text-track-muted { color: var(--track-muted) !important; }

/* ── Brand Logo ── */
.brand { display: inline-flex; align-items: center; text-decoration: none; }
.brand-logo { height: 44px; width: auto; display: block; mix-blend-mode: screen; }

/* ── Announcement Bar ── */
.announcement-bar { background: #090707; color: var(--track-muted); border-bottom: 1px solid rgba(136,136,160,.2); height: 32px; font-size: 10px; font-weight: 600; display: none; }
@media (min-width: 641px) { .announcement-bar { display: block; } }
.announcement-bar .flag-icon { color: var(--primary); font-size: 11px; }

/* ── Header / Nav ── */
.site-header { background: #090707; color: var(--track-foreground); position: relative; z-index: 30; }
.site-header .inner { height: 84px; display: flex; align-items: center; justify-content: space-between; }
.nav-link { font-size: 11px; font-weight: 600; text-transform: uppercase; padding: 32px 0; border-bottom: 2px solid transparent; color: var(--track-muted); text-decoration: none; transition: color .2s, border-color .2s; }
.nav-link:hover { color: #fff; }
.nav-link.active { color: #fff; }
.nav-links { display: flex; align-items: center; gap: 32px; list-style: none; margin: 0; padding: 0; }
.nav-chevron { display: inline-block; margin-left: 3px; vertical-align: middle; font-size: 10px; }

/* Mobile nav */
.mobile-nav { background: var(--track); border-top: 1px solid rgba(136,136,160,.2); padding: 16px 24px; display: none; flex-direction: column; }
.mobile-nav.open { display: flex; }
.mobile-nav a { padding: 12px 0; font-size: 14px; text-transform: uppercase; color: var(--track-foreground); border-bottom: 1px solid rgba(136,136,160,.1); }
.mobile-nav a.cta { color: var(--primary); border: none; }

/* ── Buttons ── */
.btn-racing {
  border-radius: 0; min-height: 46px; padding: 0 25px;
  font-size: 12px; font-weight: 700; text-transform: uppercase;
  background: var(--primary); color: var(--primary-foreground);
  border: 2px solid var(--primary); display: inline-flex; align-items: center; gap: 6px;
  cursor: pointer; transition: opacity .2s; font-family: var(--font-sans); letter-spacing: 0;
}
.btn-racing:hover { opacity: .88; color: var(--primary-foreground); }
.btn-racing-outline {
  border-radius: 0; min-height: 46px; padding: 0 25px;
  font-size: 12px; font-weight: 700; text-transform: uppercase;
  background: transparent; color: #fff;
  border: 2px solid rgba(255,255,255,.35); display: inline-flex; align-items: center; gap: 6px;
  cursor: pointer; transition: border-color .2s, color .2s; font-family: var(--font-sans); letter-spacing: 0;
}
.btn-racing-outline:hover { border-color: #fff; color: #fff; }
.btn-nav {
  background: transparent; border: none; color: var(--track-muted);
  cursor: pointer; display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; font-size: 12px; font-weight: 700; text-transform: uppercase;
  font-family: var(--font-sans);
}
.btn-nav:hover { color: #fff; }
.btn-outline {
  border-radius: 0; min-height: 46px; padding: 0 25px;
  font-size: 12px; font-weight: 700; text-transform: uppercase;
  background: transparent; color: var(--foreground);
  border: 1px solid var(--border); display: inline-flex; align-items: center; gap: 6px;
  cursor: pointer; transition: background .2s, border-color .2s; font-family: var(--font-sans); letter-spacing: 0;
}
.btn-outline:hover { background: var(--muted); }
.btn-outline.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.btn-icon {
  background: transparent; border: 2px solid rgba(255,255,255,.35); color: #fff;
  width: 36px; height: 32px; display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer; transition: border-color .2s;
}
.btn-icon:hover { border-color: #fff; }

/* ── Hero ── */
.hero { position: relative; height: 570px; overflow: hidden; background: var(--track); color: var(--primary-foreground); }
.hero-image { position: absolute; width: 100%; height: 100%; object-fit: cover; object-position: center; }
.hero::after { content: ''; position: absolute; inset: 0; background: var(--hero-shade); pointer-events: none; }
.hero-content { position: relative; z-index: 1; padding-top: 72px; }
.hero h1 { font-family: var(--font-display); font-size: 91px; font-style: italic; text-transform: uppercase; line-height: .88; margin: 24px 0; color: #fff; }
.hero-brand { font-family: var(--font-display); font-size: 15px; font-weight: 700; color: #fff; }
.hero-brand::before { content: ''; display: inline-block; width: 28px; height: 2px; background: var(--primary); vertical-align: middle; margin-right: 12px; }
.hero-bottom { position: absolute; z-index: 2; bottom: 24px; left: 0; right: 0; }
.hero-number { font: 600 12px var(--font-sans); color: #fff; }
.hero-slide { display: none; }
.hero-slide.active { display: block; }

/* ── Feature Bar ── */
.feature-bar { background: var(--muted); border-bottom: 1px solid var(--border); }
.feature-item { display: flex; align-items: center; gap: 12px; }
.feature-item svg, .feature-item .fi-icon { color: var(--primary); flex-shrink: 0; }
.feature-label { font-size: 11px; font-weight: 700; }
.feature-sub { font-size: 10px; color: var(--muted-foreground); margin-top: 2px; }

/* ── Category cards ── */
.category-link { display: block; color: inherit; text-decoration: none; }
.category-link:hover { color: inherit; }
.category-image-wrap { position: relative; overflow: hidden; background: var(--muted); }
.category-image { width: 100%; aspect-ratio: 32/9; max-height: 220px; object-fit: cover; transition: transform .5s; display: block; }
.category-link:hover .category-image { transform: scale(1.04); }
.category-badge { position: absolute; top: 16px; left: 16px; font-size: 12px; font-weight: 600; color: var(--muted-foreground); background: var(--background); padding: 4px 8px; }
.category-footer { display: flex; justify-content: space-between; align-items: center; padding: 20px 0 16px; border-bottom: 1px solid var(--border); }
.category-sub { font-size: 9px; font-weight: 700; color: var(--muted-foreground); margin-bottom: 8px; text-transform: uppercase; }
.category-label { font-family: var(--font-display); font-size: 27px; text-transform: uppercase; font-weight: 800; line-height: 1; }
.category-arrow { color: var(--primary); }

/* ── Product cards ── */
.product-link { display: block; color: inherit; text-decoration: none; }
.product-link:hover { color: inherit; }
.product-image-wrap { position: relative; overflow: hidden; background: var(--card); }
.product-image { width: 100%; aspect-ratio: 4/3; max-height: 240px; object-fit: cover; transition: transform .5s; display: block; }
.product-link:hover .product-image { transform: scale(1.035); }
.featured-badge { position: absolute; top: 12px; left: 12px; background: var(--secondary); color: var(--secondary-foreground); font-size: 9px; font-weight: 700; padding: 3px 8px; }
.product-tag { font-size: 9px; font-weight: 700; color: var(--primary); text-transform: uppercase; margin-top: 20px; display: block; }
.product-name { font-family: var(--font-display); font-size: 23px; font-weight: 800; line-height: 1; margin: 8px 0 0; }
.product-more { font-size: 10px; font-weight: 600; display: flex; align-items: center; gap: 8px; margin-top: 16px; text-transform: uppercase; }

/* ── Story section ── */
.story { position: relative; height: 470px; color: var(--primary-foreground); overflow: hidden; }
.story::after { content: ''; position: absolute; inset: 0; background: var(--story-shade); }
.story img { width: 100%; height: 100%; object-fit: cover; object-position: center 45%; }
.story-content { position: absolute; bottom: 48px; left: 0; right: 0; z-index: 1; }
.story h2 { font-family: var(--font-display); font-size: 64px; font-style: italic; text-transform: uppercase; color: #fff; line-height: 1; margin: 0 0 24px; }

/* ── Page Heading ── */
.page-heading { padding: 65px 0; background: var(--track); color: var(--primary-foreground); }
.page-heading h1 { font-family: var(--font-display); font-size: 64px; text-transform: uppercase; margin-top: 16px; color: #fff; line-height: 1; }
.breadcrumb-item, .breadcrumb-item a { font-size: 12px; color: var(--track-muted); }
.breadcrumb-item.active { color: #fff; }

/* ── Forms ── */
.form-input { min-height: 46px; width: 100%; border: 1px solid var(--border); padding: 12px; background: var(--background); border-radius: 0; font-family: var(--font-sans); font-size: 14px; outline: none; }
.form-input:focus { border-color: var(--primary); }
.form-label { font-size: 12px; font-weight: 700; text-transform: uppercase; display: block; margin-bottom: 4px; }
textarea.form-input { min-height: 144px; resize: vertical; }
select.form-input { appearance: none; cursor: pointer; }

/* ── Racing line accent ── */
.racing-line { height: 4px; background: linear-gradient(90deg, var(--primary) 0% 67%, var(--secondary) 67%); }

/* ── Footer ── */
.site-footer { background: var(--track); color: var(--track-foreground); }
.footer-heading { font-family: var(--font-display); font-size: 18px; font-weight: 700; margin: 0 0 20px; color: #fff; }
.footer-link { font-size: 12px; color: var(--track-muted); display: block; margin-bottom: 12px; text-decoration: none; }
.footer-link:hover { color: #fff; }
.footer-tagline { color: var(--track-muted); font-size: 14px; max-width: 280px; margin-top: 24px; line-height: 1.6; }
.footer-bottom { border-top: 1px solid rgba(136,136,160,.2); }
.footer-copy { font-size: 10px; color: var(--track-muted); }
.footer-dots { display: flex; align-items: center; gap: 8px; font-size: 10px; color: var(--track-muted); }
.dot-red { width: 8px; height: 8px; background: var(--primary); display: inline-block; }
.dot-blue { width: 8px; height: 8px; background: var(--secondary); display: inline-block; }

/* ── By-Bike brand buttons ── */
.bike-btn {
  height: 144px; width: 100%; border-radius: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px;
  border: 1px solid var(--border); background: transparent; cursor: pointer;
  font-family: var(--font-display); font-size: 24px; font-weight: 700; text-transform: uppercase;
  color: var(--foreground); transition: background .2s, border-color .2s, color .2s;
}
.bike-btn:hover, .bike-btn.active { background: var(--primary); border-color: var(--primary); color: #fff; }

/* ── Product detail table ── */
.detail-table { font-size: 14px; }
.detail-table div { display: flex; justify-content: space-between; padding: 12px 0; }
.detail-table .val { color: var(--muted-foreground); }

/* ── Filter buttons ── */
.filter-btn {
  border-radius: 0; height: 36px; padding: 0 16px;
  font-size: 10px; font-weight: 700; text-transform: uppercase;
  background: transparent; color: var(--foreground);
  border: 1px solid var(--border);
  cursor: pointer; transition: background .15s; font-family: var(--font-sans);
}
.filter-btn:hover { background: var(--muted); }
.filter-btn.active { background: var(--primary); color: #fff; border-color: var(--primary); }

/* ── Search input ── */
.search-wrap { position: relative; }
.search-wrap .search-icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--muted-foreground); pointer-events: none; }
.search-wrap input { padding-left: 40px; height: 46px; border: 1px solid var(--border); background: var(--background); border-radius: 0; font-size: 14px; font-family: var(--font-sans); outline: none; }
.search-wrap input:focus { border-color: var(--primary); }

/* ── Contact draft box ── */
.draft-box { background: var(--muted); padding: 16px; font-size: 12px; white-space: pre-wrap; font-family: var(--font-sans); }

/* ── Responsive ── */
@media (min-width: 1600px) {
  .hero { height: 650px; }
  .hero-content { padding-top: 105px; }
}
@media (max-width: 1024px) {
  .site-container { width: calc(100% - 48px); }
  .hero h1 { font-size: 78px; }
  .hero { height: 540px; }
  .nav-links { display: none; }
}
@media (max-width: 640px) {
  .site-container { width: calc(100% - 36px); }
  .hero { height: 610px; }
  .hero-image { object-position: 65% center; }
  .hero::after { background: var(--mobile-shade); }
  .hero-content { padding-top: 175px; }
  .hero h1 { font-size: 66px; }
  .section-title { font-size: 35px; }
  .story { height: 460px; }
  .story h2 { font-size: 49px; }
  .story-content { bottom: 32px; }
  .page-heading { padding: 45px 0; }
  .page-heading h1 { font-size: 48px; }
  .btn-racing-outline.hero-story-btn { display: none; }
  .announcement-bar .precision { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation: none !important; transition: none !important; }
}

/* ── Floating WhatsApp button ── */
.floating-wa {
  position: fixed; bottom: 24px; right: 24px; z-index: 9999;
  width: 54px; height: 54px; background: #25d366; color: #fff;
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-size: 26px; box-shadow: 0 4px 16px rgba(0,0,0,.25);
  transition: transform .2s, box-shadow .2s; text-decoration: none;
}
.floating-wa:hover { transform: scale(1.08); box-shadow: 0 6px 24px rgba(0,0,0,.3); color: #fff; }

/* ── Cookie bar ── */
.cookie-bar {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 9998;
  background: var(--track); border-top: 1px solid rgba(136,136,160,.2);
  padding: 12px 0; color: var(--track-foreground);
}

/* ── Footer social links ── */
.footer-social { color: var(--track-muted); transition: color .2s; }
.footer-social:hover { color: var(--primary); }

/* ── Admin-only utility (hidden from public build) ── */
.admin-only { display: none !important; }

/* ── Product detail tabs ── */
.tab-btn {
  background: transparent; border: none; border-bottom: 2px solid transparent;
  font-size: 12px; font-weight: 700; text-transform: uppercase; font-family: var(--font-sans);
  padding: 12px 20px 10px; cursor: pointer; color: var(--muted-foreground);
  transition: color .2s, border-color .2s;
}
.tab-btn:hover { color: var(--foreground); }
.tab-btn.active { color: var(--foreground); border-bottom-color: var(--primary); }

/* ── Thumbnail buttons ── */
.thumb-btn {
  background: none; border: 2px solid transparent; padding: 2px; cursor: pointer;
  transition: border-color .2s;
}
.thumb-btn.active { border-color: var(--primary); }
.thumb-btn:hover  { border-color: var(--foreground); }

/* ── Sticky mobile action bar ── */
.sticky-mobile-bar {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 500;
  display: flex; gap: 0;
}
.sticky-mobile-bar .flex-1 { flex: 1; }

/* ── Product detail availability badges ── */
.badge { font-family: var(--font-sans); letter-spacing: .04em; }

/* ═══════════════════════════════════════════════════════════
   SEARCH OVERLAY
═══════════════════════════════════════════════════════════ */

/* Backdrop */
.search-overlay {
  position: fixed; inset: 0; z-index: 2000;
  background: rgba(10,10,10,.82);
  backdrop-filter: blur(4px);
  opacity: 0; pointer-events: none;
  transition: opacity .22s ease;
  overflow-y: auto;
}
.search-overlay.open {
  opacity: 1; pointer-events: all;
}

/* Inner panel (slides down from top) */
.search-overlay-inner {
  background: var(--track);
  transform: translateY(-18px);
  transition: transform .22s ease;
  min-height: 260px;
  padding-bottom: 40px;
}
.search-overlay.open .search-overlay-inner {
  transform: translateY(0);
}

/* Input row */
.search-overlay-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-top: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid rgba(136,136,160,.2);
}
.search-overlay-input-wrap {
  flex: 1;
  position: relative;
  display: flex;
  align-items: center;
}
.search-overlay-icon {
  position: absolute;
  left: 0;
  font-size: 18px;
  color: var(--track-muted);
  pointer-events: none;
}
#searchOverlayInput {
  width: 100%;
  background: transparent;
  border: none;
  outline: none;
  color: #fff;
  font-size: 22px;
  font-family: var(--font-display);
  font-weight: 700;
  padding: 4px 36px 4px 30px;
  caret-color: var(--primary);
}
#searchOverlayInput::placeholder { color: rgba(136,136,160,.55); }

.search-overlay-clear {
  position: absolute; right: 0;
  background: none; border: none;
  color: var(--track-muted); cursor: pointer;
  font-size: 16px; padding: 4px;
  display: flex; align-items: center;
  transition: color .15s;
}
.search-overlay-clear:hover { color: #fff; }

.search-overlay-close {
  background: none; border: 1px solid rgba(136,136,160,.35);
  color: var(--track-muted); cursor: pointer;
  padding: 6px 12px; font-family: var(--font-sans);
  display: flex; align-items: center; gap: 6px;
  transition: color .15s, border-color .15s; white-space: nowrap;
  flex-shrink: 0;
}
.search-overlay-close:hover { color: #fff; border-color: #fff; }

/* Results area */
.search-overlay-results {
  padding-top: 24px;
}

/* Section labels */
.search-section-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .1em;
  color: var(--track-muted);
  margin-bottom: 12px;
  text-transform: uppercase;
}

/* Quick chips (default state) */
.search-quick-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.search-quick-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 16px;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(136,136,160,.2);
  color: var(--track-muted);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  text-decoration: none;
  transition: background .15s, color .15s, border-color .15s;
}
.search-quick-chip:hover {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

/* Result list */
.search-result-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

/* Individual result row */
.search-result-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 12px;
  text-decoration: none;
  color: var(--track-foreground);
  border-radius: 2px;
  transition: background .12s;
}
.search-result-item:hover {
  background: rgba(255,255,255,.07);
  color: #fff;
}

/* Thumbnail */
.search-result-img {
  width: 52px; height: 52px;
  flex-shrink: 0;
  overflow: hidden;
  background: rgba(255,255,255,.06);
  display: flex; align-items: center; justify-content: center;
}
.search-result-img img {
  width: 100%; height: 100%;
  object-fit: cover; display: block;
}
.search-result-img--icon {
  color: var(--track-muted);
}

/* Text content */
.search-result-info { flex: 1; min-width: 0; }
.search-result-name {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 800;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.search-result-name mark {
  background: none;
  color: var(--primary);
  font-style: normal;
}
.search-result-meta {
  display: flex;
  gap: 10px;
  font-size: 11px;
  color: var(--track-muted);
  margin-top: 3px;
  flex-wrap: wrap;
}
.search-result-tag {
  color: var(--primary);
  font-weight: 700;
  text-transform: uppercase;
}
.search-result-arrow {
  color: var(--track-muted);
  font-size: 14px;
  flex-shrink: 0;
  opacity: 0;
  transition: opacity .12s;
}
.search-result-item:hover .search-result-arrow { opacity: 1; }

/* See all link */
.search-see-all {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--primary);
  text-decoration: none;
  margin-top: 10px;
  padding: 6px 0;
}
.search-see-all:hover { color: #fff; }

/* Empty state */
.search-empty {
  text-align: center;
  padding: 40px 0;
  color: var(--track-muted);
  font-size: 14px;
  line-height: 1.8;
}

/* Loading spinner */
.search-loading {
  color: var(--track-muted);
  font-size: 13px;
  padding: 24px 0;
  display: flex;
  align-items: center;
  gap: 10px;
}
.spin {
  display: inline-block;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Responsive */
@media (max-width: 640px) {
  #searchOverlayInput { font-size: 17px; }
  .search-result-name  { font-size: 14px; }
  .search-result-img   { width: 42px; height: 42px; }
  .search-overlay-close span { display: none !important; }
}
