/* Shared editorial design tokens matching reference video */
:root {
  --bw-sand: #F1ECE1;
  --bw-sand-light: #F8F5EE;
  --bw-ink: #1A1A1A;
  --bw-ink-muted: #6E6A61;
  --bw-white: #FFFFFF;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  background-color: var(--bw-sand);
  color: var(--bw-ink);
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  overflow-x: hidden;
}

/* Primary & Secondary Pill Buttons */
.bw-btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  border-radius: 9999px;
  background-color: #1A1A1A;
  color: #FFFFFF;
  font-size: 0.875rem;
  font-weight: 500;
  padding: 0.75rem 1.5rem;
  transition: background-color 0.2s ease, transform 0.2s ease;
}

.bw-btn-primary:hover {
  background-color: #33312E;
  transform: translateY(-1px);
}

.bw-btn-white {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  border-radius: 9999px;
  background-color: #FFFFFF;
  color: #1A1A1A;
  font-size: 0.875rem;
  font-weight: 500;
  padding: 0.75rem 1.5rem;
  transition: background-color 0.2s ease, transform 0.2s ease;
}

.bw-btn-white:hover {
  background-color: #F1ECE1;
  transform: translateY(-1px);
}

.bw-btn-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  border-radius: 9999px;
  background-color: transparent;
  color: #1A1A1A;
  border: 1px solid rgba(26, 26, 26, 0.38);
  font-size: 0.875rem;
  font-weight: 500;
  padding: 0.7rem 1.45rem;
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

.bw-btn-outline:hover {
  background-color: rgba(26, 26, 26, 0.06);
  border-color: #1A1A1A;
}

.bw-btn-outline-light {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  border-radius: 9999px;
  background-color: transparent;
  color: #FFFFFF;
  border: 1px solid rgba(255, 255, 255, 0.6);
  font-size: 0.875rem;
  font-weight: 500;
  padding: 0.7rem 1.45rem;
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

.bw-btn-outline-light:hover {
  background-color: rgba(255, 255, 255, 0.14);
  border-color: #FFFFFF;
}

/* Pill Inputs matching Contact & Quote specification */
.bw-pill-input {
  width: 100%;
  background-color: #FFFFFF;
  border: 1px solid rgba(26, 26, 26, 0.16);
  border-radius: 9999px;
  padding: 0.75rem 1.25rem;
  font-size: 0.9rem;
  color: #1A1A1A;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.bw-pill-textarea {
  width: 100%;
  background-color: #FFFFFF;
  border: 1px solid rgba(26, 26, 26, 0.16);
  border-radius: 24px;
  padding: 0.9rem 1.25rem;
  font-size: 0.9rem;
  color: #1A1A1A;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.bw-pill-input:focus,
.bw-pill-textarea:focus {
  outline: none;
  border-color: #1A1A1A;
  box-shadow: 0 0 0 3px rgba(26, 26, 26, 0.08);
}

.bw-input-error {
  border-color: #DC2626 !important;
  background-color: #FEF2F2 !important;
}

/* Hero slide transition */
.bw-hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.65s ease;
}

.bw-hero-slide.is-active {
  opacity: 1;
  pointer-events: auto;
}

/* Editorial card hover */
.bw-image-card {
  background: #FFFFFF;
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid rgba(26, 26, 26, 0.07);
  box-shadow: 0 10px 28px -8px rgba(26, 26, 26, 0.08);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.bw-image-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 44px -12px rgba(26, 26, 26, 0.16);
}

/* Continuous Rotating Product Marquee Strip */
@keyframes bwMarqueeScroll {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}

.bw-marquee-track {
  display: flex;
  width: max-content;
  animation: bwMarqueeScroll 32s linear infinite;
}

.bw-marquee-wrap:hover .bw-marquee-track {
  animation-play-state: paused;
}

/* Fluid editorial serif type scale across 375px -> 768px -> 1440px */
.bw-fluid-hero {
  font-size: clamp(2.15rem, 4.6vw, 4.5rem);
  line-height: 1.05;
}

.bw-fluid-h1 {
  font-size: clamp(2.05rem, 3.8vw, 3.4rem);
  line-height: 1.1;
}

.bw-fluid-h2 {
  font-size: clamp(1.65rem, 2.8vw, 2.55rem);
  line-height: 1.15;
}

/* Prevent horizontal overflow across all viewports */
html,
body {
  max-width: 100%;
  overflow-x: clip;
}

/* Ensure floating WhatsApp button never overlaps footer links or phone home indicator */
#site-footer footer {
  padding-bottom: calc(5.25rem + env(safe-area-inset-bottom, 0px));
}

/* Mobile-first touch target & layout refinements (<= 767px) without altering desktop */
@media (max-width: 767px) {
  .bw-btn-primary,
  .bw-btn-white,
  .bw-btn-outline,
  .bw-btn-outline-light,
  .cat-btn,
  .bw-pill-input {
    min-height: 44px;
  }

  .etd-day {
    min-height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  #quick-quote-form button[type="submit"],
  #contact-form button[type="submit"],
  #quote-form button[type="submit"] {
    width: 100%;
    min-height: 46px;
  }

  /* Product detail page gallery becomes horizontal swipeable strip on mobile */
  [data-product-slug] .lg\:col-span-5 > .grid.grid-cols-3 {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    gap: 0.75rem;
    padding-bottom: 0.35rem;
  }

  [data-product-slug] .lg\:col-span-5 > .grid.grid-cols-3 > button {
    flex: 0 0 64%;
    scroll-snap-align: start;
  }
}

/* Smooth fluid serif heading scale across mobile (375px) & tablet (768px) without altering desktop */
@media (max-width: 1023px) {
  main h1.font-serif:not(.bw-fluid-hero) {
    font-size: clamp(2rem, 5.2vw, 3.1rem);
    line-height: 1.1;
  }

  main h2.font-serif {
    font-size: clamp(1.5rem, 3.8vw, 2.25rem);
    line-height: 1.15;
  }
}

