/* rr-service-redesign.css — Production styles for Interior Detail & Full Detail (EN/ES)
 * Works seamlessly in both dark (default) and light ([data-theme="light"]) modes
 * using Rotes & Roses semantic CSS variables (--background, --card, --secondary, --border, --foreground, --muted-foreground, --primary, --primary-foreground).
 */

/* Ensure sticky jumpbar works reliably without horizontal overflow or .city-hub-strip occlusion */
body:has(.rr-svc-jumpbar) main {
  overflow-x: clip;
}
body:has(.rr-svc-jumpbar) .city-hub-strip {
  position: relative !important;
  top: auto !important;
  z-index: 38 !important;
}

/* ==========================================================================
   1. Spacious Hero with Vertical Stacking (eyebrow always stacks above grid)
   ========================================================================== */
.rr-svc-hero > .relative.mx-auto {
  min-height: clamp(26rem, 54vh, 36rem);
  padding-block: clamp(3.5rem, 7vw, 5.75rem);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}
.rr-svc-hero > .relative.mx-auto > .grid {
  width: 100%;
}
.rr-svc-hero > .relative.mx-auto > p {
  width: 100%;
  margin: 0;
}

@media (max-width: 760px) {
  .rr-svc-hero > .relative.mx-auto {
    min-height: clamp(23rem, 50vh, 30rem);
    padding-block: 3.25rem 2.75rem;
  }
}

/* ==========================================================================
   2. Ceramic-Coating-Style Sticky Horizontal Pill Jumpbar (ZERO see-through gap)
   ========================================================================== */
.rr-svc-jumpbar {
  position: sticky;
  top: var(--rr-hdr-h, 4rem);
  margin-top: -1px;
  z-index: 35;
  background: hsl(var(--background));
  border-bottom: 1px solid hsl(var(--border));
}
.rr-svc-jumpbar__inner {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  padding-block: 0.55rem;
}
.rr-svc-jumpbar__inner::-webkit-scrollbar {
  display: none;
}
.rr-svc-jumpbar a {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  min-height: 2.5rem;
  padding: 0 0.95rem;
  border-radius: 9999px;
  background: hsl(var(--card));
  border: 1px solid hsl(var(--border));
  color: hsl(var(--foreground));
  font-size: 0.825rem;
  font-weight: 600;
  white-space: nowrap;
  text-decoration: none;
  transition: border-color 180ms ease, color 180ms ease, background-color 180ms ease, transform 180ms cubic-bezier(0.22, 1, 0.36, 1);
}
@media (hover: hover) and (pointer: fine) {
  .rr-svc-jumpbar a:hover {
    border-color: hsl(var(--primary));
    color: hsl(var(--primary));
  }
}
.rr-svc-jumpbar a:focus-visible {
  outline: 2px solid hsl(var(--primary));
  outline-offset: 2px;
}
.rr-svc-jumpbar a.is-active {
  border-color: hsl(var(--primary));
  background: hsl(var(--primary) / 0.14);
  color: hsl(var(--primary));
}
:root:not([data-theme="light"]) .rr-svc-jumpbar a:hover,
:root:not([data-theme="light"]) .rr-svc-jumpbar a.is-active,
:root:not([data-theme="light"]) .rr-svc-kicker,
:root:not([data-theme="light"]) .rr-svc-save {
  color: #F0486D;
}

/* Scroll margin for all jump targets */
#compare-packages,
#customer-job,
#interior-fixes,
#express-signature,
#executive-signature,
#service-proof {
  scroll-margin-top: calc(var(--rr-hdr-h, 4rem) + 4.25rem);
}

/* ==========================================================================
   3. Elevated Package Cards (#compare-packages)
   ========================================================================== */
.rr-svc-pricing {
  padding-block: clamp(2.5rem, 5vw, 4.5rem);
  background: hsl(var(--background));
  border-bottom: 1px solid hsl(var(--border));
}

/* Clean meta row inside packages section header (Auto detailing + 5.0 on Google) */
.rr-svc-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1.5rem;
  flex-wrap: wrap;
  margin-bottom: clamp(1.25rem, 2.5vw, 1.85rem);
  padding-bottom: 1rem;
  border-bottom: 1px solid hsl(var(--border));
}
.rr-svc-meta-row .rr-rating {
  margin: 0 !important;
}

.rr-svc-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.5rem 2rem;
  flex-wrap: wrap;
  margin-bottom: clamp(1.5rem, 3vw, 2.25rem);
}
.rr-svc-kicker {
  margin: 0 0 0.5rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: hsl(var(--primary));
}
.rr-svc-head h2 {
  font-size: clamp(2.1rem, 4vw, 3.35rem);
  line-height: 1.04;
  margin: 0;
  color: hsl(var(--foreground));
}
.rr-svc-sub {
  margin: 0.7rem 0 0;
  max-width: 56ch;
  color: hsl(var(--muted-foreground));
  font-size: 0.98rem;
  line-height: 1.55;
}

/* Segmented Vehicle Size Toggle (Interior Detail) */
.rr-svc-sizes {
  display: grid;
  gap: 0.45rem;
  max-width: 100%;
}
.rr-svc-sizes__label {
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: hsl(var(--muted-foreground));
}
.rr-svc-sizes__group {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 4px;
  border-radius: 999px;
  border: 1px solid hsl(var(--border));
  background: hsl(var(--secondary));
}
.rr-svc-sizes__group button {
  min-height: 38px;
  padding: 0 14px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: hsl(var(--muted-foreground));
  font-size: 0.84rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 150ms ease, color 150ms ease, box-shadow 150ms ease;
}
.rr-svc-sizes__group button:focus-visible {
  outline: 2px solid hsl(var(--primary));
  outline-offset: 2px;
}
.rr-svc-sizes__group button.is-active {
  background: hsl(var(--card));
  color: hsl(var(--foreground));
  box-shadow: 0 1px 4px rgb(0 0 0 / 0.18);
}

/* 2-col Card Grid (2x1 on Interior, 2x2 on Full Detail) */
.rr-svc-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(1rem, 2.4vw, 1.75rem);
  align-items: stretch;
}
.rr-svc-card {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
  min-width: 0;
  padding: clamp(1.4rem, 2.8vw, 2.15rem);
  border-radius: 14px;
  border: 1px solid hsl(var(--border));
  background: hsl(var(--card));
  box-shadow: 0 10px 30px -22px rgb(0 0 0 / 0.25);
}
.rr-svc-card--featured {
  border-color: hsl(var(--primary));
  box-shadow: 0 14px 36px -22px color-mix(in srgb, hsl(var(--primary)) 45%, transparent);
}
.rr-svc-card:target {
  outline: 2px solid hsl(var(--primary));
  outline-offset: 4px;
}
.rr-svc-card__top {
  padding-bottom: 1.05rem;
  border-bottom: 1px solid hsl(var(--border));
}
.rr-svc-save {
  margin: 0 0 0.45rem;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: hsl(var(--primary));
}
.rr-svc-card__title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
}
.rr-svc-card__title-row h3 {
  margin: 0;
  font-size: clamp(1.55rem, 2.4vw, 2.05rem);
  line-height: 1.08;
  color: hsl(var(--foreground));
}
.rr-svc-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 999px;
  background: hsl(var(--primary));
  color: hsl(var(--primary-foreground));
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  white-space: nowrap;
}
.rr-svc-card__meta {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-top: 0.8rem;
}
.rr-svc-card__price {
  margin: 0;
  font-size: 0.92rem;
  color: hsl(var(--muted-foreground));
}
.rr-svc-card__price strong {
  color: hsl(var(--foreground));
  font-size: clamp(1.75rem, 2.8vw, 2.35rem);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.035em;
  margin-left: 0.22em;
}
.rr-svc-card__time {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 999px;
  border: 1px solid hsl(var(--border));
  background: hsl(var(--secondary));
  color: hsl(var(--foreground));
  font-size: 0.8rem;
  font-weight: 600;
}
.rr-svc-card__desc {
  margin: 0;
  color: hsl(var(--muted-foreground));
  font-size: 0.95rem;
  line-height: 1.55;
}
.rr-svc-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.62rem;
}
.rr-svc-list--rest {
  margin-top: 0.55rem;
}
.rr-svc-fold {
  border-top: 1px solid hsl(var(--border));
  padding-top: 0.2rem;
}
.rr-svc-fold > summary {
  list-style: revert;
  cursor: pointer;
  padding: 0.65rem 0;
  font-weight: 600;
  font-size: 0.9rem;
  color: hsl(var(--foreground));
}
.rr-svc-fold > summary::marker {
  color: hsl(var(--primary));
}
.rr-svc-fold > summary:focus-visible {
  outline: 2px solid hsl(var(--primary));
  outline-offset: 2px;
}
.rr-svc-table-fold {
  margin-top: 1.35rem;
  border-top: 1px solid hsl(var(--border));
  padding-top: 0.25rem;
}
.rr-svc-card__foot {
  margin-top: auto;
  padding-top: 0.5rem;
}
.rr-svc-footnote {
  margin: 0 0 0.85rem;
  font-size: 0.78rem;
  line-height: 1.45;
  color: hsl(var(--muted-foreground));
}
.rr-svc-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 46px;
  padding: 0 22px;
  border-radius: 999px;
  border: 1px solid hsl(var(--primary));
  background: transparent;
  color: hsl(var(--foreground));
  font-size: 0.94rem;
  font-weight: 700;
  text-decoration: none;
  transition: background 150ms ease, color 150ms ease, filter 150ms ease;
}
.rr-svc-cta:hover,
.rr-svc-cta--primary {
  background: hsl(var(--primary));
  color: hsl(var(--primary-foreground));
}
.rr-svc-cta--primary:hover {
  filter: brightness(1.06);
}
.rr-svc-cta:focus-visible {
  outline: 2px solid hsl(var(--primary));
  outline-offset: 3px;
}

@media (max-width: 760px) {
  .rr-svc-grid {
    grid-template-columns: 1fr;
  }
  .rr-svc-sizes__group {
    border-radius: 14px;
  }
  .rr-svc-cta {
    width: 100%;
  }
}

/* ==========================================================================
   4. Balanced 3-Slider Proof Grid (Interior Detail) — Pixel-Flush 2-Col >= 640px
   ========================================================================== */
@media (min-width: 640px) {
  html.rr-v2 .rr-proof-grid.rr-proof-balanced,
  .rr-proof-grid.rr-proof-balanced {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) !important;
    grid-template-rows: 1fr 1fr !important;
    gap: 1.1rem 1.5rem !important;
    align-items: stretch !important;
    max-width: 58rem !important;
    margin-inline: auto;
  }
  .rr-proof-grid.rr-proof-balanced > .rr-proof-card:nth-child(1) {
    grid-column: 1;
    grid-row: 1 / span 2;
    display: flex;
    flex-direction: column;
  }
  .rr-proof-grid.rr-proof-balanced > .rr-proof-card:nth-child(1) .rr-ba-slider {
    width: 100%;
  }
  .rr-proof-grid.rr-proof-balanced > .rr-proof-card:nth-child(2) {
    grid-column: 2;
    grid-row: 1;
    position: relative;
    min-height: 0 !important;
    height: auto !important;
  }
  .rr-proof-grid.rr-proof-balanced > .rr-proof-card:nth-child(3) {
    grid-column: 2;
    grid-row: 2;
    position: relative;
    min-height: 0 !important;
    height: auto !important;
  }
  .rr-proof-grid.rr-proof-balanced > .rr-proof-card:nth-child(2) .rr-ba-slider,
  .rr-proof-grid.rr-proof-balanced > .rr-proof-card:nth-child(3) .rr-svc-ba {
    position: absolute !important;
    inset: 0 !important;
    width: 100% !important;
    height: 100% !important;
    aspect-ratio: auto !important;
    margin: 0 !important;
  }
  .rr-proof-grid.rr-proof-balanced > .rr-proof-card:nth-child(2) .rr-ba-slider img {
    height: 100% !important;
    width: 100% !important;
    object-fit: cover !important;
    object-position: center 60%;
  }
  .rr-proof-grid.rr-proof-balanced > .rr-proof-card:nth-child(3) .rr-svc-ba img {
    height: 100% !important;
    width: 100% !important;
    object-fit: cover !important;
  }
}

/* Universal F-150 footwell crop across ALL screen sizes (mobile, tablet, desktop) */
.rr-proof-third .rr-svc-ba__before {
  object-position: center 82% !important;
}
.rr-proof-third .rr-svc-ba__after {
  object-position: center 74% !important;
}

/* Reusable Interactive Before/After Slider (matches rr-v2.css red AFTER pill & crimson handle) */
.rr-svc-ba {
  position: relative;
  overflow: hidden;
  border-radius: var(--rr-radius-card, 14px);
  border: 1px solid var(--rr-line-strong, hsl(var(--border)));
  box-shadow: var(--rr-shadow-card, 0 10px 30px -22px rgb(0 0 0 / 0.35));
  background: #0a0a0c;
  user-select: none;
  touch-action: pan-y pinch-zoom;
  aspect-ratio: 16 / 10;
}
.rr-svc-ba:has(.rr-svc-ba__range:focus-visible) {
  outline: 2px solid hsl(var(--primary));
  outline-offset: 3px;
}
.rr-svc-ba--bio {
  aspect-ratio: 4 / 5;
}
.rr-svc-ba img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  pointer-events: none;
  opacity: 1 !important;
}
.rr-svc-ba__before {
  clip-path: inset(0 calc(100% - var(--pos, 50%)) 0 0);
}
.rr-svc-ba__line {
  position: absolute;
  top: 0;
  bottom: 0;
  left: var(--pos, 50%);
  width: 2px;
  background: #fff;
  box-shadow: 0 0 12px rgb(0 0 0 / 0.8);
  pointer-events: none;
  transform: translateX(-1px);
  z-index: 2;
}
.rr-svc-ba__handle {
  position: absolute;
  top: 50%;
  left: var(--pos, 50%);
  transform: translate(-50%, -50%);
  width: 42px;
  height: 42px;
  border-radius: 999px;
  background: hsl(var(--primary));
  color: #fff;
  border: 2px solid #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 0;
  box-shadow: 0 8px 20px rgb(0 0 0 / 0.55);
  pointer-events: none;
  z-index: 3;
}
.rr-svc-ba__handle svg {
  display: block;
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}
.rr-svc-ba__tag {
  position: absolute;
  top: 0.75rem;
  padding: 0.25rem 0.68rem;
  border-radius: 999px;
  background: rgb(8 8 9 / 0.76);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  pointer-events: none;
  z-index: 3;
}
.rr-svc-ba__tag--before {
  left: 0.75rem;
}
.rr-svc-ba__tag--after {
  right: 0.75rem;
  background: hsl(var(--primary) / 0.92);
}
.rr-svc-ba__range {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: ew-resize;
  z-index: 5;
}

/* ==========================================================================
   5. Two-Column Steam + Extraction Process Cards (Interior Detail)
   ========================================================================== */
.rr-process-pair {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.5rem;
  align-items: stretch;
}
.rr-process-card {
  display: flex;
  flex-direction: column;
  max-width: none !important;
  width: 100% !important;
  border-radius: 12px;
  overflow: hidden;
}
.rr-process-card .process-steam-media,
.rr-process-photo {
  aspect-ratio: 16 / 10;
  width: 100%;
  overflow: hidden;
  position: relative;
  background: hsl(var(--card));
}
.rr-process-card .process-steam-media img,
.rr-process-card .process-steam-media video,
.rr-process-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  opacity: 1 !important;
}
.rr-process-card .process-steam-media img.poster-fallback {
  position: absolute;
  inset: 0;
  z-index: 1;
}
.rr-process-card .process-steam-media video {
  position: relative;
  z-index: 2;
}
.rr-process-card figcaption {
  flex: 1;
}

/* ==========================================================================
   6. Biohazard Floor Before/After Showcase (Side-by-side >= 768px, Slider < 768px)
   ========================================================================== */
.rr-bio-inline-fig.rr-bio-fig-wide {
  max-width: none !important;
  width: 100% !important;
  margin-top: 2rem;
}
.rr-bio-desktop {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem;
  max-width: 56rem;
  margin-inline: auto;
}
.rr-bio-pane {
  position: relative;
  overflow: hidden;
  border-radius: 12px;
  border: 1px solid hsl(var(--border));
  background: hsl(var(--card));
}
.rr-bio-pane img {
  width: 100%;
  aspect-ratio: 4 / 4.6;
  max-height: min(68vh, 34rem);
  object-fit: cover;
  display: block;
}
.rr-bio-label {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  padding: 0.25rem 0.68rem;
  border-radius: 999px;
  background: rgb(8 8 9 / 0.76);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  pointer-events: none;
  z-index: 3;
}
.rr-bio-label--after {
  left: auto;
  right: 0.75rem;
  background: hsl(var(--primary) / 0.92);
}
.rr-bio-mobile {
  display: none;
}
.rr-bio-showcase figcaption {
  margin-top: 0.85rem;
  max-width: 68ch;
  font-size: 0.88rem;
  line-height: 1.55;
  color: hsl(var(--muted-foreground));
}

@media (max-width: 767px) {
  .rr-process-pair {
    grid-template-columns: 1fr;
  }
  .rr-bio-desktop {
    display: none;
  }
  .rr-bio-mobile {
    display: block;
  }
}

@media (max-width: 480px) {
  .rr-svc-sizes__group {
    flex-wrap: nowrap;
    width: 100%;
    max-width: 100%;
  }
  .rr-svc-sizes__group button {
    flex: 1 1 auto;
    padding: 0 8px;
    font-size: 0.76rem;
    white-space: nowrap;
  }
}
