/* comewood teaser — logo + endless product carousel */

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: #ffffff;
}

.cw-page {
  background-color: #ffffff;
  color: #111111;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* ---------- Logo ---------- */

.cw-head {
  display: flex;
  justify-content: center;
  padding: 48px 24px 8px;
}

.cw-logo {
  display: inline-block;
  padding: 8px 0;
  text-decoration: none;
}

.cw-logo-img {
  display: block;
  width: 560px;
  max-width: 86vw;
  height: auto;
}

/* ---------- Carousel ---------- */

.cw-carousel {
  width: 100%;
  flex-grow: 1;
  display: flex;
  align-items: center;
  overflow: hidden;
  padding: 32px 0 64px;
}

.cw-track {
  display: flex;
  align-items: center;
  width: max-content;
  animation: cw-scroll 80s linear infinite;   /* speed: bigger number = slower */
  will-change: transform;
}

.cw-product {
  height: 60vh;
  max-height: 600px;
  width: auto;
  max-width: none;
  margin-right: 180px;                        /* gap between products */
  flex-shrink: 0;
}

/* moves the track left by exactly one set, then starts over — endless */
@keyframes cw-scroll {
  from { transform: translate3d(0, 0, 0); }
  to   { transform: translate3d(-50%, 0, 0); }
}

/* ---------- Dragging / swiping (script.js takes over the movement) ---------- */

.cw-js .cw-track { animation: none; }

.cw-carousel {
  touch-action: pan-y;            /* sideways swipes move the carousel, up/down still scrolls the page */
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
}

.cw-carousel.cw-dragging { cursor: grabbing; }

.cw-product {
  pointer-events: none;           /* stops the browser dragging the picture itself */
  -webkit-user-drag: none;
}

/* ---------- Phones ---------- */

@media screen and (max-width: 767px) {
  .cw-head { padding-top: 32px; }
  .cw-logo-img { width: 340px; }
  .cw-product { height: 48vh; margin-right: 90px; }
  .cw-track { animation-duration: 40s; }          /* phone speed: smaller number = faster */
}
