/* ════════════════════════════════════════════════════════════
 * Rosyvely Uplift — UI polish, missing styles, responsive fixes
 * Loads LAST. Refines the showroom look (warm cream + burgundy
 * + gold) and ensures the page works on phone, tablet, desktop.
 * ════════════════════════════════════════════════════════════ */

:root {
  --rv-uplift-shadow-soft: 0 6px 24px rgba(26, 22, 18, 0.06);
  --rv-uplift-shadow-hover: 0 24px 60px rgba(26, 22, 18, 0.14);
  --rv-uplift-ring: 0 0 0 3px rgba(184, 146, 58, 0.32);
  --rv-uplift-gold: #b8923a;
  --rv-uplift-gold-soft: rgba(184, 146, 58, 0.18);
}

/* —— Global readability + smoother transitions —— */
html {
  text-size-adjust: 100%;
  -webkit-text-size-adjust: 100%;
}

body {
  text-rendering: optimizeLegibility;
}

::selection {
  background: var(--accent, #9e2a3a);
  color: #fff;
}

/* Stronger, brand-aware focus ring on all interactive elements */
:where(a, button, input, select, textarea, [tabindex]):focus-visible {
  outline: 2px solid var(--accent-gold, var(--rv-uplift-gold));
  outline-offset: 3px;
  border-radius: 6px;
}

/* Soften the floating ambient orbs from motion layer so they don't
   wash over the content too much on small screens. */
@media (max-width: 767px) {
  body::before,
  body::after {
    opacity: 0.28 !important;
    filter: blur(60px) !important;
  }
}

/* —— Header refinements —— */
.site-header__inner {
  align-items: center;
}

.site-header .logo {
  line-height: 1.2;
}

.site-header .logo.logo--rosyvely {
  display: inline-flex;
  align-items: baseline;
  gap: 0.18em;
  white-space: nowrap;
}

.site-header .logo.logo--rosyvely .logo__furniture {
  font-size: 0.62em;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-soft, #2d4a5e);
  font-weight: 500;
  align-self: center;
  margin-left: 0.35em;
  padding: 0.2em 0.6em;
  border: 1px solid var(--line, #e0d6c8);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.55);
}

@media (max-width: 600px) {
  .site-header .logo.logo--rosyvely .logo__furniture {
    display: none;
  }
}

/* Tablet header */
@media (min-width: 768px) and (max-width: 1023px) {
  .site-header__inner {
    padding-block: 0.6rem;
    gap: 1rem;
  }
}

/* —— Hero refinements —— */
.home-hero {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  isolation: isolate;
  padding-block: clamp(4rem, 10vw, 7rem) clamp(3rem, 7vw, 5rem);
  overflow: hidden;
}

.home-hero__media {
  position: absolute;
  inset: 0;
  z-index: -1;
}

.home-hero__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.home-hero__scrim {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 60% 50% at 50% 45%, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.22) 70%),
    linear-gradient(
      180deg,
      rgba(20, 14, 8, 0.18) 0%,
      rgba(20, 14, 8, 0.52) 55%,
      rgba(20, 14, 8, 0.82) 100%
    );
}

.home-hero__content {
  position: relative;
  z-index: 1;
  text-align: center;
  color: #fff;
  margin-inline: auto;
  max-width: 50rem;
  padding-inline: clamp(1rem, 4vw, 1.5rem);
}

.home-hero__title {
  text-wrap: balance;
  font-size: clamp(2rem, 5.6vw, 3.6rem);
  font-weight: 600;
  margin-bottom: 1.1rem;
  text-shadow: 0 2px 30px rgba(0, 0, 0, 0.45);
}

.home-hero__lead {
  color: rgba(255, 255, 255, 0.92);
  margin-inline: auto;
  max-width: 40ch;
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.35);
}

.home-hero__actions {
  margin-top: clamp(1.5rem, 4vw, 2.25rem);
}

.home-hero__badges {
  margin-top: 1.5rem;
  justify-content: center;
}

.home-hero__caption {
  margin-top: 1.75rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.62);
}

@media (max-width: 600px) {
  .home-hero {
    padding-block: clamp(3rem, 18vw, 5rem) clamp(2rem, 10vw, 3.5rem);
    min-height: clamp(28rem, 80vh, 36rem);
  }

  .home-hero__lead {
    font-size: 1rem;
  }

  .home-hero__actions .btn {
    flex: 1 1 auto;
    min-width: 0;
  }
}

/* —— Marquee strip (was unstyled) —— */
.rv-marquee {
  position: relative;
  overflow: hidden;
  padding: 0.85rem 0;
  background: linear-gradient(90deg, var(--brand-blue, #1c2834) 0%, #243341 50%, var(--brand-blue, #1c2834) 100%);
  color: rgba(255, 255, 255, 0.92);
  border-block: 1px solid rgba(255, 255, 255, 0.08);
  user-select: none;
}

.rv-marquee::before,
.rv-marquee::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 6rem;
  z-index: 1;
  pointer-events: none;
}

.rv-marquee::before {
  left: 0;
  background: linear-gradient(90deg, var(--brand-blue, #1c2834), transparent);
}

.rv-marquee::after {
  right: 0;
  background: linear-gradient(270deg, var(--brand-blue, #1c2834), transparent);
}

.rv-marquee__track {
  display: inline-flex;
  align-items: center;
  gap: 2.5rem;
  white-space: nowrap;
  animation: rvMarqueeScroll 38s linear infinite;
  will-change: transform;
}

.rv-marquee__item {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-serif, "Cormorant Garamond", serif);
  font-size: clamp(1rem, 2vw, 1.3rem);
  font-weight: 500;
  letter-spacing: 0.06em;
  color: rgba(255, 255, 255, 0.9);
}

.rv-marquee__item::after {
  content: "✦";
  display: inline-block;
  margin-left: 2.5rem;
  color: var(--accent-gold, var(--rv-uplift-gold));
  font-size: 0.8em;
  opacity: 0.75;
}

.rv-marquee__item:last-child::after {
  content: none;
}

@keyframes rvMarqueeScroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

@media (prefers-reduced-motion: reduce) {
  .rv-marquee__track {
    animation: none;
    justify-content: center;
    flex-wrap: wrap;
    white-space: normal;
    gap: 0.85rem 1.5rem;
    padding-inline: 1rem;
  }
}

/* —— Trust strip polish —— */
.home-trust {
  background: linear-gradient(180deg, var(--bg-elevated, #fffcf8) 0%, var(--bg, #f6f2eb) 100%);
}

.home-trust__item {
  padding-block: 1.5rem 1.25rem;
  transition: transform 0.3s var(--ease-out, cubic-bezier(0.22, 1, 0.36, 1));
}

.home-trust__item:hover {
  transform: translateY(-3px);
}

.home-trust__icon {
  font-family: var(--font-serif, "Cormorant Garamond", serif);
  font-weight: 600;
  font-size: 1.6rem;
  box-shadow: 0 6px 16px rgba(184, 146, 58, 0.18);
}

/* —— Showcase marquee header cleanup —— */
.home-showcase__status:empty,
.home-showcase__status[aria-live]:empty {
  display: none;
}

/* Hide loading text once track has content */
.home-showcase__track:not(:empty) ~ .home-showcase__status,
.home-showcase:has(.home-showcase__track:not(:empty)) .home-showcase__status {
  display: none;
}

/* —— Featured/categories grid header —— */
.home-categories__header {
  text-align: center;
  max-width: 36rem;
  margin: 0 auto clamp(1.75rem, 4vw, 2.5rem);
}

.home-categories {
  padding-bottom: clamp(3rem, 7vw, 4.5rem);
}

@media (max-width: 480px) {
  .home-categories__grid,
  .home-categories__grid--8 {
    gap: 0.6rem;
  }

  .home-cat-tile__label {
    padding: 1rem 0.85rem;
    font-size: 1.1rem;
  }
}

/* —— Financing card improvements —— */
.home-financing__card {
  min-height: 100%;
}

.home-financing__cta {
  margin-top: auto;
}

@media (min-width: 768px) and (max-width: 900px) {
  .home-financing__grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .home-financing__card--featured {
    grid-column: span 2;
  }
}

/* —— CTA band fallbacks (in case old markup is still used) —— */
.home-cta-band__inner {
  position: relative;
  z-index: 1;
  display: grid;
  gap: clamp(1.5rem, 4vw, 2.5rem);
  padding: clamp(2rem, 5vw, 3.25rem);
  color: inherit;
}

.home-cta-band__meta {
  list-style: none;
  margin: 0 0 1.5rem;
  padding: 0;
  display: grid;
  gap: 0.65rem;
}

.home-cta-band__meta li {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding: 0.65rem 0.85rem;
  border-radius: var(--radius, 14px);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.14);
}

.home-cta-band__meta-label {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.6);
}

.home-cta-band__meta-link {
  color: #fff;
  font-weight: 600;
  text-decoration: none;
}

.home-cta-band__meta-link:hover {
  color: #e8c878;
}

.home-cta-band__btn-primary {
  background: linear-gradient(135deg, #25d366 0%, #128c7e 100%) !important;
  border: none !important;
  color: #fff !important;
}

/* Ensure CTA band map area has a usable height even before image loads */
.home-cta-band__map {
  min-height: 8.5rem;
  background: rgba(255, 255, 255, 0.04);
}

/* —— Card product (tame the over-aggressive motion-layer hover) —— */
.card-product {
  background: var(--bg-elevated, #fffcf8);
}

.card-product:hover {
  transform: translateY(-5px) !important;
  box-shadow:
    0 20px 48px rgba(26, 22, 18, 0.14),
    0 0 0 1px rgba(184, 146, 58, 0.18) inset !important;
}

@media (hover: none) {
  .card-product:hover {
    transform: none !important;
    box-shadow: var(--rv-uplift-shadow-soft) !important;
  }
}

/* —— Mobile floating action bar (was unstyled!) —— */
.rv-mobile-bar {
  position: fixed;
  inset: auto 0 0 0;
  z-index: 2147483645;
  display: none;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  padding: 0.45rem 0.55rem calc(0.45rem + env(safe-area-inset-bottom, 0));
  background: rgba(255, 252, 248, 0.92);
  backdrop-filter: blur(16px) saturate(1.2);
  -webkit-backdrop-filter: blur(16px) saturate(1.2);
  border-top: 1px solid var(--line, #e0d6c8);
  box-shadow: 0 -6px 24px rgba(26, 22, 18, 0.1);
}

.rv-mobile-bar__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.7rem 0.5rem;
  margin: 0.15rem;
  border-radius: 12px;
  font-family: var(--font-sans, "DM Sans", system-ui, sans-serif);
  font-size: 0.86rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-decoration: none;
  color: #fff;
  transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
  min-height: 2.85rem;
  -webkit-tap-highlight-color: transparent;
}

.rv-mobile-bar__btn:active {
  transform: scale(0.97);
}

.rv-mobile-bar__btn--call {
  background: linear-gradient(135deg, var(--accent, #9e2a3a) 0%, #7a2230 100%);
  box-shadow: 0 6px 18px rgba(158, 42, 58, 0.32);
}

.rv-mobile-bar__btn--call:hover {
  filter: brightness(1.05);
  color: #fff;
}

.rv-mobile-bar__btn--wa {
  background: linear-gradient(135deg, #25d366 0%, #128c7e 100%);
  box-shadow: 0 6px 18px rgba(18, 140, 126, 0.32);
}

.rv-mobile-bar__btn--wa:hover {
  filter: brightness(1.05);
  color: #fff;
}

.rv-mobile-bar__icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

@media (max-width: 600px) {
  body:not(.na-page--admin):not(.page-product-detail) .rv-mobile-bar {
    display: grid;
  }

  /* Lift content + chat FAB only when the bar is actually present */
  body:has(.rv-mobile-bar):not(.na-page--admin) main {
    padding-bottom: calc(5.5rem + env(safe-area-inset-bottom, 0)) !important;
  }

  body:has(.rv-mobile-bar) .rv-chat {
    bottom: calc(5.25rem + env(safe-area-inset-bottom, 0)) !important;
  }
}

/* —— Site footer credit tweak —— */
.site-footer__bar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem 1rem;
  padding-top: 1.25rem;
  margin-top: clamp(1.5rem, 4vw, 2.5rem);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.82rem;
}

.site-footer__credit {
  margin: 0;
  color: rgba(255, 255, 255, 0.55);
}

.site-footer__credit a {
  color: rgba(255, 255, 255, 0.85);
  text-decoration: none;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.4);
}

.site-footer__credit a:hover {
  color: #e8c878;
  border-bottom-color: #e8c878;
}

.site-footer__grid > div {
  min-width: 0;
}

.site-footer__grid strong {
  display: block;
  margin: 0 0 0.6rem;
  font-family: var(--font-serif, "Cormorant Garamond", serif);
  font-weight: 600;
  font-size: 1.05rem;
  color: #fff;
  letter-spacing: 0.01em;
}

.site-footer__grid a {
  display: inline-block;
  padding: 0.25rem 0;
  line-height: 1.55;
}

.site-footer__grid p {
  margin: 0.35rem 0 0;
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.92rem;
  line-height: 1.55;
}

/* —— Contact page improvements —— */
.contact-page__inner {
  width: min(100% - 1.5rem, 44rem) !important;
}

.page-contact .contact-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  padding: 1.5rem 1.15rem !important;
}

.page-contact .contact-tile__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  margin-bottom: 0.35rem;
  border: 1px solid var(--line, #e0d6c8);
}

.page-contact .contact-tile__icon svg {
  width: 22px;
  height: 22px;
}

.page-contact .contact-tile__label {
  margin: 0;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-family: var(--font-sans, "DM Sans", system-ui, sans-serif);
}

.page-contact .contact-tile__value {
  font-size: 1rem;
  line-height: 1.45;
  color: var(--ink, #1a1612);
}

.page-contact .contact-tile__value a {
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease, color 0.2s ease;
}

.page-contact .contact-tile__value a:hover {
  border-bottom-color: var(--accent, #9e2a3a);
}

.page-contact .contact-hero__actions .btn {
  min-width: 9rem;
  padding-inline: 1.25rem;
}

.page-contact .contact-btn__icon {
  flex-shrink: 0;
}

/* Hide unused map aside layout on the centered contact view */
.page-contact .contact-aside .contact-map-card {
  border-radius: var(--radius, 18px);
  overflow: hidden;
  border: 1px solid var(--line, #e0d6c8);
  background: var(--bg-elevated, #fffcf8);
  box-shadow: var(--shadow-sm, 0 2px 16px rgba(26, 22, 18, 0.06));
}

.page-contact .contact-aside .contact-map-card__img-link {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
}

.page-contact .contact-aside .contact-map-card__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s var(--ease-out, cubic-bezier(0.22, 1, 0.36, 1));
}

.page-contact .contact-aside .contact-map-card__img-link:hover .contact-map-card__img {
  transform: scale(1.04);
}

.page-contact .contact-aside .contact-map-card__badge {
  position: absolute;
  top: 0.85rem;
  left: 0.85rem;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.96);
  color: var(--ink, #1a1612);
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.page-contact .contact-aside .contact-map-card__body {
  padding: 1.15rem 1.25rem 1.25rem;
}

.page-contact .contact-aside .contact-map-card__title {
  margin: 0 0 0.35rem;
  font-family: var(--font-serif, "Cormorant Garamond", serif);
  font-size: 1.4rem;
  font-weight: 600;
}

.page-contact .contact-aside .contact-map-card__addr {
  margin: 0 0 1rem;
  color: var(--ink-muted, #6d6458);
  font-size: 0.95rem;
  line-height: 1.55;
}

.page-contact .contact-directions__title {
  margin: 0.5rem 0 0.25rem;
  font-family: var(--font-serif, "Cormorant Garamond", serif);
  font-size: 1.05rem;
  font-weight: 600;
}

.page-contact .contact-directions__hint {
  margin: 0 0 0.65rem;
  font-size: 0.88rem;
  color: var(--ink-muted, #6d6458);
}

.page-contact .contact-directions__pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.page-contact .contact-directions__pills a {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
  background: var(--bg, #f6f2eb);
  color: var(--ink, #1a1612);
  border: 1px solid var(--line, #e0d6c8);
  font-size: 0.84rem;
  font-weight: 500;
  text-decoration: none;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.page-contact .contact-directions__pills a:hover {
  background: var(--ink, #1a1612);
  border-color: var(--ink, #1a1612);
  color: #fff;
}

/* —— Tablet refinements (768-1023) —— */
@media (min-width: 768px) and (max-width: 1023px) {
  .home-categories__grid,
  .home-categories__grid--8 {
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 0.9rem;
  }

  .home-cat-tile__label {
    font-size: 1.2rem;
    padding: 1rem;
  }

  .home-trust__grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .site-footer__grid {
    grid-template-columns: 1.2fr 1fr 1fr 1fr;
  }
}

@media (min-width: 1024px) {
  .home-trust {
    padding-block: clamp(3rem, 5vw, 4rem);
  }

  .home-trust__grid {
    max-width: 980px;
    margin-inline: auto;
  }
}

/* —— Section breathing room —— */
.home-financing,
.home-categories,
.home-showcase {
  scroll-margin-top: calc(var(--header-h, 4.5rem) + 1rem);
}

/* —— Small phone fine-tuning —— */
@media (max-width: 380px) {
  .home-hero__title {
    font-size: 1.7rem;
  }

  .home-hero__lead {
    font-size: 0.95rem;
  }

  .rv-mobile-bar__btn {
    font-size: 0.78rem;
    padding-inline: 0.4rem;
  }

  .home-hero__badges li {
    font-size: 0.72rem;
    padding: 0.32rem 0.7rem;
  }
}

/* —— Print —— */
@media print {
  .site-header,
  .site-footer,
  .rv-mobile-bar,
  .rv-chat,
  .rv-marquee,
  body::before,
  body::after {
    display: none !important;
  }

  body {
    background: #fff !important;
    color: #000 !important;
  }

  .home-hero {
    min-height: auto;
    padding-block: 1rem;
  }
}
