/* ============================================================
   KARST Mobile Detailing — Styles
   Palette: #0A0A0A (near-black), #FFFFFF, #CE1126 (accent red)
   ============================================================ */

/* ── Reset & base ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --black: #0A0A0A;
  --dark: #111111;
  --dark-card: #161616;
  --dark-border: #222222;
  --white: #FFFFFF;
  --gray: #AAAAAA;
  --gray-light: #CCCCCC;
  --red: #CE1126;
  --red-hover: #E0162B;
  --red-dark: #9E0D1E;
  --font-main: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-display: 'Oswald', 'Inter', sans-serif;
  --header-h: 70px;
  --section-pad: 80px;
  --max-w: 1200px;
  --radius: 8px;
  --transition: 0.3s ease;
}

html { scroll-behavior: smooth; scroll-padding-top: var(--header-h); }

body {
  font-family: var(--font-main);
  background: var(--black);
  color: var(--white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--red); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--red-hover); }

.container { max-width: var(--max-w); margin: 0 auto; padding: 0 24px; }

/* ── Utility ── */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }
.accent { color: var(--red); }
.note { font-size: 0.8rem; color: var(--gray); margin-top: 8px; }
.mock-badge { font-size: 0.65rem; background: var(--red); color: var(--white); padding: 2px 6px; border-radius: 3px; margin-left: 6px; vertical-align: middle; }

/* ── Buttons ── */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 14px 32px;
  font-family: var(--font-main); font-size: 1rem; font-weight: 600;
  border: none; border-radius: var(--radius); cursor: pointer;
  transition: all var(--transition); text-transform: uppercase; letter-spacing: 0.5px;
}
.btn-primary { background: var(--red); color: var(--white); }
.btn-primary:hover { background: var(--red-hover); color: var(--white); transform: translateY(-2px); box-shadow: 0 6px 20px rgba(206,17,38,0.4); }
.btn-outline { background: transparent; color: var(--white); border: 2px solid var(--white); }
.btn-outline:hover { background: var(--white); color: var(--black); }
a.btn:hover { text-decoration: none; }
.btn-sm { padding: 10px 20px; font-size: 0.875rem; }

/* ── Header / Nav ── */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  height: var(--header-h);
  background: rgba(10,10,10,0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--dark-border);
  transition: background var(--transition);
}
.header-inner {
  max-width: var(--max-w); margin: 0 auto; padding: 0 24px;
  display: flex; align-items: center; justify-content: space-between;
  height: 100%;
}
.logo { height: 50px; width: auto; }
.nav-links { display: flex; align-items: center; gap: 32px; list-style: none; }
.nav-links a {
  color: var(--gray-light); font-size: 0.9rem; font-weight: 500;
  text-transform: uppercase; letter-spacing: 0.5px;
  transition: color var(--transition); text-decoration: none;
}
.nav-links a:hover, .nav-links a.active { color: var(--white); }

.hamburger {
  display: none; background: none; border: none; cursor: pointer; padding: 8px;
}
.hamburger span {
  display: block; width: 24px; height: 2px; background: var(--white);
  margin: 6px 0; transition: all var(--transition);
}
.hamburger.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 6px); }
.hamburger.active span:nth-child(2) { opacity: 0; }
.hamburger.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -6px); }

/* ── Mobile nav ── */
@media (max-width: 768px) {
  .hamburger { display: block; }
  .nav-links {
    position: fixed; top: var(--header-h); left: 0; right: 0;
    background: rgba(10,10,10,0.98); backdrop-filter: blur(12px);
    flex-direction: column; gap: 0; padding: 0;
    max-height: 0; overflow: hidden; transition: max-height 0.4s ease;
  }
  .nav-links.open { max-height: 400px; border-bottom: 1px solid var(--dark-border); }
  .nav-links li { width: 100%; }
  .nav-links a { display: block; padding: 16px 24px; border-bottom: 1px solid var(--dark-border); }
  .nav-links .btn { margin: 16px 24px; width: calc(100% - 48px); justify-content: center; }
}

/* ── Hero ── */
.hero {
  position: relative; min-height: 100vh; display: flex; align-items: center;
  justify-content: center; text-align: center; overflow: hidden;
  padding: calc(var(--header-h) + 40px) 24px 60px;
}
.hero-video-wrap {
  position: absolute; inset: 0; z-index: 0;
}
.hero-video {
  width: 100%; height: 100%; object-fit: cover;
}
.hero-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(10,10,10,0.7) 0%, rgba(10,10,10,0.85) 100%);
  z-index: 1;
}
.hero-content { position: relative; z-index: 2; max-width: 800px; }
.hero h1 {
  font-family: var(--font-display); font-size: clamp(2.2rem, 6vw, 4rem);
  font-weight: 700; text-transform: uppercase; line-height: 1.15;
  margin-bottom: 16px; letter-spacing: 1px;
}
.hero h1 .accent-line { display: block; color: var(--red); font-size: 0.55em; margin-top: 8px; letter-spacing: 3px; }
.hero p { font-size: clamp(1rem, 2.5vw, 1.25rem); color: var(--gray-light); margin-bottom: 32px; max-width: 600px; margin-left: auto; margin-right: auto; }
.hero-ctas { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }

/* ── Section styling ── */
.section { padding: var(--section-pad) 0; }
.section-dark { background: var(--dark); }
.section-title {
  font-family: var(--font-display); font-size: clamp(1.8rem, 4vw, 2.5rem);
  text-transform: uppercase; text-align: center; margin-bottom: 16px;
  letter-spacing: 1px;
}
.section-subtitle { text-align: center; color: var(--gray); max-width: 600px; margin: 0 auto 48px; font-size: 1.05rem; }
.section-divider { width: 60px; height: 3px; background: var(--red); margin: 0 auto 48px; border-radius: 2px; }

/* ── Services / Price Calculator ── */
.calculator-wrap { max-width: 800px; margin: 0 auto; }

.calc-steps { display: flex; justify-content: center; gap: 8px; margin-bottom: 40px; }
.calc-step-indicator {
  display: flex; align-items: center; gap: 8px;
  font-size: 0.85rem; color: var(--gray); font-weight: 500;
}
.calc-step-indicator .step-num {
  width: 32px; height: 32px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--dark-card); border: 2px solid var(--dark-border);
  font-weight: 700; font-size: 0.85rem; transition: all var(--transition);
}
.calc-step-indicator.active .step-num { background: var(--red); border-color: var(--red); color: var(--white); }
.calc-step-indicator.completed .step-num { background: var(--red-dark); border-color: var(--red-dark); }
.calc-step-indicator.completed { color: var(--gray-light); cursor: pointer; }
.calc-step-indicator.completed:hover .step-num { background: var(--red); border-color: var(--red); }
.calc-step-indicator.completed:hover { color: var(--white); }
.calc-step-indicator.active { color: var(--white); }
.step-connector { width: 40px; height: 2px; background: var(--dark-border); align-self: center; }

.calc-section { display: none; animation: fadeIn 0.3s ease; }
.calc-section.active { display: block; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

.calc-label { font-size: 1.1rem; font-weight: 600; margin-bottom: 20px; text-align: center; }

.option-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
@media (max-width: 500px) { .option-grid { grid-template-columns: 1fr; } }

.option-card {
  background: var(--dark-card); border: 2px solid var(--dark-border);
  border-radius: var(--radius); padding: 24px 16px; text-align: center;
  cursor: pointer; transition: all var(--transition);
}
.option-card:hover { border-color: var(--gray); }
.option-card.selected { border-color: var(--red); background: rgba(206,17,38,0.08); }
.option-card .option-icon { margin-bottom: 12px; display: flex; justify-content: center; }
.option-card .option-icon svg { width: 48px; height: 48px; color: var(--red); }
.option-card.selected .option-icon svg { color: var(--white); }
.option-card .option-name { font-weight: 600; font-size: 1rem; margin-bottom: 4px; }
.option-card .option-price { color: var(--red); font-weight: 700; font-size: 1.2rem; }
.option-card .option-desc { font-size: 0.8rem; color: var(--gray); margin-top: 4px; }

/* vehicle icons */
.vehicle-icon { margin-bottom: 12px; display: flex; justify-content: center; }
.vehicle-icon svg { width: 56px; height: 36px; color: var(--red); }
.option-card.selected .vehicle-icon svg { color: var(--white); }

/* Add-ons */
.addon-list { display: flex; flex-direction: column; gap: 12px; }
.addon-item {
  display: flex; align-items: center; justify-content: space-between;
  background: var(--dark-card); border: 2px solid var(--dark-border);
  border-radius: var(--radius); padding: 16px 20px;
  cursor: pointer; transition: all var(--transition);
}
.addon-item:hover { border-color: var(--gray); }
.addon-item.selected { border-color: var(--red); background: rgba(206,17,38,0.08); }
.addon-item.disabled { opacity: 0.35; pointer-events: none; }
.addon-item .addon-name { font-weight: 500; }
.addon-item .addon-price { color: var(--red); font-weight: 700; white-space: nowrap; }
.addon-check {
  width: 22px; height: 22px; border-radius: 4px;
  border: 2px solid var(--dark-border); margin-right: 14px;
  display: flex; align-items: center; justify-content: center;
  transition: all var(--transition); flex-shrink: 0;
}
.addon-item.selected .addon-check { background: var(--red); border-color: var(--red); }
.addon-item.selected .addon-check::after { content: "✓"; color: var(--white); font-size: 0.8rem; font-weight: 700; }
.addon-left { display: flex; align-items: center; }

/* Summary */
.calc-summary {
  background: var(--dark-card); border: 2px solid var(--dark-border);
  border-radius: var(--radius); padding: 24px; margin-top: 32px;
}
.summary-row { display: flex; justify-content: space-between; padding: 8px 0; font-size: 0.95rem; }
.summary-row.base { border-bottom: 1px solid var(--dark-border); padding-bottom: 12px; margin-bottom: 4px; }
.summary-total {
  display: flex; justify-content: space-between; padding-top: 16px;
  margin-top: 8px; border-top: 2px solid var(--red);
  font-size: 1.3rem; font-weight: 700;
}
.summary-total .price { color: var(--red); }
.calc-summary .btn { width: 100%; justify-content: center; margin-top: 20px; }

/* ── Specialty tiles ── */
.specialty-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; margin-top: 48px; max-width: 800px; margin-left: auto; margin-right: auto; }
@media (max-width: 600px) { .specialty-grid { grid-template-columns: 1fr; } }
.specialty-card {
  background: var(--dark-card); border: 2px solid var(--dark-border);
  border-radius: var(--radius); padding: 32px 24px; text-align: center;
}
.specialty-card h3 { font-family: var(--font-display); font-size: 1.3rem; margin-bottom: 8px; text-transform: uppercase; }
.specialty-card .rate { color: var(--red); font-weight: 700; font-size: 1.1rem; margin-bottom: 12px; }
.specialty-card .desc { color: var(--gray); font-size: 0.9rem; margin-bottom: 16px; }
.rv-calc { display: flex; align-items: center; gap: 12px; justify-content: center; flex-wrap: wrap; margin-bottom: 16px; }
.rv-calc input {
  width: 80px; padding: 10px; border: 2px solid var(--dark-border);
  border-radius: var(--radius); background: var(--black); color: var(--white);
  font-size: 1rem; text-align: center; font-family: var(--font-main);
}
.rv-calc input:focus { outline: none; border-color: var(--red); }
.rv-estimate { color: var(--red); font-weight: 700; font-size: 1.2rem; min-width: 80px; }

/* ── Gallery Carousel ── */
.carousel-wrap {
  position: relative; max-width: 900px; margin: 0 auto;
}
.carousel-track-container {
  overflow: hidden; border-radius: var(--radius);
  border: 2px solid var(--dark-border);
}
.carousel-track {
  display: flex; transition: transform 0.5s ease;
}
.carousel-slide {
  min-width: 100%; position: relative;
}
.carousel-slide img {
  width: 100%; aspect-ratio: 16/10; object-fit: cover; display: block;
}
.carousel-slide video {
  width: 100%; aspect-ratio: 16/10; object-fit: cover; display: block;
  background: var(--black);
}
.carousel-btn {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 10;
  width: 48px; height: 48px; border-radius: 50%;
  background: rgba(206,17,38,0.85); border: none; color: var(--white);
  font-size: 1.4rem; cursor: pointer; display: flex;
  align-items: center; justify-content: center;
  transition: background var(--transition);
}
.carousel-btn:hover { background: var(--red); }
.carousel-prev { left: -24px; }
.carousel-next { right: -24px; }
@media (max-width: 768px) {
  .carousel-prev { left: 8px; }
  .carousel-next { right: 8px; }
}
.carousel-dots {
  display: flex; justify-content: center; gap: 10px;
  margin-top: 20px;
}
.carousel-dot {
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--dark-border); border: none; cursor: pointer;
  transition: background var(--transition);
}
.carousel-dot.active { background: var(--red); }
.carousel-dot.is-video { border: 2px solid var(--red); background: transparent; }
.carousel-dot.is-video.active { background: var(--red); }

/* Before/after slider */
.ba-slider-wrap {
  max-width: 800px; margin: 0 auto 48px; position: relative;
  border-radius: var(--radius); overflow: hidden;
  border: 2px solid var(--dark-border); user-select: none;
  display: none; /* hidden until there are before/after pairs */
}
.ba-slider-wrap.has-pairs { display: block; }
.ba-slider-wrap img { width: 100%; display: block; }
.ba-after { position: absolute; inset: 0; overflow: hidden; }
.ba-after img { position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: cover; }
.ba-handle {
  position: absolute; top: 0; bottom: 0; width: 4px; background: var(--red);
  cursor: ew-resize; z-index: 10;
}
.ba-handle::after {
  content: ""; position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--red); border: 3px solid var(--white);
  box-shadow: 0 2px 10px rgba(0,0,0,0.5);
}
.ba-label {
  position: absolute; top: 16px; padding: 4px 12px; font-size: 0.75rem;
  font-weight: 700; text-transform: uppercase; letter-spacing: 1px;
  background: rgba(10,10,10,0.7); border-radius: 4px;
}
.ba-label-before { left: 16px; }
.ba-label-after { right: 16px; }

/* ── Lightbox ── */
.lightbox {
  position: fixed; inset: 0; z-index: 2000;
  background: rgba(0,0,0,0.95); display: none;
  align-items: center; justify-content: center;
  padding: 40px;
}
.lightbox.active { display: flex; }
.lightbox img { max-width: 90vw; max-height: 85vh; border-radius: var(--radius); object-fit: contain; }
.lightbox-close {
  position: absolute; top: 20px; right: 24px;
  background: none; border: none; color: var(--white);
  font-size: 2rem; cursor: pointer; padding: 8px;
  line-height: 1; transition: color var(--transition);
}
.lightbox-close:hover { color: var(--red); }
.lightbox-nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  background: rgba(206,17,38,0.8); border: none; color: var(--white);
  width: 48px; height: 48px; border-radius: 50%; cursor: pointer;
  font-size: 1.2rem; display: flex; align-items: center; justify-content: center;
  transition: background var(--transition);
}
.lightbox-nav:hover { background: var(--red); }
.lightbox-prev { left: 20px; }
.lightbox-next { right: 20px; }

/* ── Map ── */
.map-section .map-container { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; align-items: start; }
@media (max-width: 768px) { .map-section .map-container { grid-template-columns: 1fr; } }
#service-map { height: 400px; border-radius: var(--radius); border: 2px solid var(--dark-border); }
.town-list h3 { font-family: var(--font-display); font-size: 1.2rem; text-transform: uppercase; margin-bottom: 16px; }
.town-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.town-tag {
  background: var(--dark-card); border: 1px solid var(--red);
  padding: 6px 14px; border-radius: 20px; font-size: 0.85rem;
  color: var(--white);
}
.town-tag.muted {
  border-color: #444; color: #888;
}
.map-note { margin-top: 24px; padding: 16px; background: rgba(206,17,38,0.08); border-left: 3px solid var(--red); border-radius: 0 var(--radius) var(--radius) 0; font-size: 0.95rem; }

/* ── Reviews ── */
.reviews-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 24px; }
.review-card {
  background: var(--dark-card); border: 1px solid var(--dark-border);
  border-radius: var(--radius); padding: 32px 24px;
}
.review-stars { color: #FFB800; font-size: 1.1rem; margin-bottom: 12px; letter-spacing: 2px; }
.review-quote { font-size: 1rem; line-height: 1.7; margin-bottom: 16px; font-style: italic; color: var(--gray-light); }
.review-author { font-weight: 600; font-size: 0.95rem; }
.review-meta { font-size: 0.8rem; color: var(--gray); margin-top: 4px; }

/* ── Booking ── */
.booking-section { background: var(--dark); }
.booking-wrap { max-width: 700px; margin: 0 auto; }
.booking-plugin-embed {
  min-height: 200px; background: var(--dark-card); border: 2px dashed var(--dark-border);
  border-radius: var(--radius); display: flex; align-items: center; justify-content: center;
  color: var(--gray); font-size: 0.9rem; padding: 40px; text-align: center; margin-bottom: 32px;
}
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 600px) { .form-grid { grid-template-columns: 1fr; } }
.form-group { display: flex; flex-direction: column; }
.form-group.full-width { grid-column: 1 / -1; }
.form-group label { font-size: 0.85rem; font-weight: 600; margin-bottom: 6px; color: var(--gray-light); }
.form-group input, .form-group select, .form-group textarea {
  padding: 12px 16px; border: 2px solid var(--dark-border);
  border-radius: var(--radius); background: var(--black); color: var(--white);
  font-size: 0.95rem; font-family: var(--font-main);
  transition: border-color var(--transition);
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus { outline: none; border-color: var(--red); }
.form-group textarea { resize: vertical; min-height: 100px; }
.form-group select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23AAAAAA' d='M6 8L1 3h10z'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 36px; }
.form-addons-summary { background: var(--dark-card); border-radius: var(--radius); padding: 16px; margin-bottom: 16px; font-size: 0.9rem; color: var(--gray-light); grid-column: 1 / -1; }
.form-addons-summary strong { color: var(--white); }
.booking-form .btn { width: 100%; justify-content: center; margin-top: 8px; }

.contact-alternatives {
  text-align: center; margin-top: 32px; padding-top: 32px;
  border-top: 1px solid var(--dark-border);
}
.contact-alternatives p { color: var(--gray); margin-bottom: 16px; }
.contact-methods { display: flex; gap: 24px; justify-content: center; flex-wrap: wrap; }
.contact-method {
  display: flex; align-items: center; gap: 8px;
  color: var(--white); font-weight: 500;
}
.contact-method svg { width: 20px; height: 20px; fill: var(--red); }

/* ── Footer ── */
.site-footer {
  background: var(--black); border-top: 1px solid var(--dark-border);
  padding: 48px 0 24px;
}
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 40px; margin-bottom: 40px; }
@media (max-width: 768px) { .footer-grid { grid-template-columns: 1fr; gap: 32px; } }
.footer-brand .logo { height: 100px; width: auto; margin-bottom: 16px; }
.footer-brand p { color: var(--gray); font-size: 0.9rem; max-width: 300px; }
.footer-col h4 { font-family: var(--font-display); text-transform: uppercase; font-size: 0.9rem; letter-spacing: 1px; margin-bottom: 16px; color: var(--white); }
.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 8px; }
.footer-col a { color: var(--gray); font-size: 0.9rem; }
.footer-col a:hover { color: var(--white); }
.footer-bottom { text-align: center; padding-top: 24px; border-top: 1px solid var(--dark-border); color: var(--gray); font-size: 0.8rem; }

/* ── Leaflet overrides ── */
.leaflet-container { background: var(--dark) !important; }
.leaflet-tile-pane { filter: brightness(0.7) saturate(0.8) contrast(1.1); }

/* ── Scroll animations ── */
.fade-up {
  opacity: 0; transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.fade-up.visible { opacity: 1; transform: none; }

/* ── Package descriptions inside cards ── */
.package-includes { list-style: none; text-align: left; margin-top: 12px; font-size: 0.78rem; color: var(--gray); }
.package-includes li { padding: 3px 0; padding-left: 16px; position: relative; }
.package-includes li::before { content: "✓"; position: absolute; left: 0; color: var(--red); font-weight: 700; }
