/* Site overrides on top of the Urban template (main.css). Loaded after main.css. */

:root {
  /* Template grey #999 was 2.7-2.9:1 and the footer #bfbfbf 1.8:1.
     #666 is 5.7:1 on #fff and 5.5:1 on #fafafa (WCAG AA needs 4.5:1). */
  --text: #666666;
}

body,
.wrapper.style1,
#footer .copyright,
a {
  color: var(--text);
}

/* width/height attributes reserve space without fixing the height
   (the template only sets width:100% on .image.fit img) */
img {
  height: auto;
}

/* Products (.products grid in .wrapper.style2): 2 columns with captions on phones,
   the template's 3 columns without captions from 48em. The template clears after
   every "4u$" (3rd item), so the row breaks are set here per layout. */
.products .row > * {
  width: 50%;
  clear: none;
}

.products .row > :nth-child(odd) {
  clear: left;
}

.products .caption {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  padding: 0.25em 0.5em;
  background: rgba(0, 0, 0, 0.65); /* white on this is >= 7:1 even over a white photo */
  color: #fff;
  font-size: 0.8em;
  line-height: 1.4;
}

@media (min-width: 48em) {
  .products .row > * {
    width: 33.33333%;
  }

  .products .row > :nth-child(odd) {
    clear: none;
  }

  .products .row > :nth-child(3n+1) {
    clear: left;
  }

  .products .caption {
    display: none;
  }
}
