@font-face {
  font-family: "Rubik";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/assets/fonts/rubik-400-latin.woff2") format("woff2");
  unicode-range:
    U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191,
    U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Rubik";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/assets/fonts/rubik-400-latin-ext.woff2") format("woff2");
  unicode-range:
    U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020,
    U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: "Rubik";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/assets/fonts/rubik-700-latin.woff2") format("woff2");
  unicode-range:
    U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191,
    U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Rubik";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/assets/fonts/rubik-700-latin-ext.woff2") format("woff2");
  unicode-range:
    U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020,
    U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* Dead Wallet — the whole site's styles.
 *
 * A direct port of the WordPress theme's SCSS (themes/modest_theme_maker) to
 * plain CSS: SCSS variables became custom properties, the breakpoint mixins
 * became the media queries they expanded to, and the nesting is now native
 * CSS nesting, so the structure reads the same with no compiler in the way.
 *
 * Dropped in the port, all of it dead: vendor prefixes for gradients and the
 * IE `filter:` fallback, the Roboto font (downloaded by the old theme but
 * never referenced), WordPress's alignleft/aligncenter image classes, the
 * admin-only edit button, and the price badge the theme had commented out.
 *
 * Breakpoints, from the old mixins:
 *   smallest 340px · small 430px · medium 740px
 */

:root {
  --dw-white: #fff;
  --dw-dark: #222;
  --dw-light: #ccc;
  --dw-gold: #ffa500;
}

/* ---------- globals ---------- */

html,
body {
  margin: 0;
  padding: 0;
}

/* Dimming layer behind the open category drawer. */
body.overlay {
  position: relative;

  &::after {
    content: "";
    position: absolute;
    inset: -20px 0 0 0;
    background: rgb(34 34 34 / 95%);
  }
}

h1,
h2,
h3,
h4,
h5,
h6,
p {
  margin: 0;
  padding: 0;
}

img {
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
}

iframe {
  border: 0;
}

hr {
  outline: 0;
  border: 0;
  height: 1px;
  margin: 10px 0;

  &.dark {
    background: var(--dw-white);
    background-image: linear-gradient(to right, var(--dw-white), var(--dw-dark), var(--dw-white));
  }

  &.light {
    background: var(--dw-dark);
    background-image: linear-gradient(to right, var(--dw-dark), var(--dw-white), var(--dw-dark));
  }
}

/* ---------- header ---------- */

.header {
  position: relative;
  padding: 0 20px;
  margin: 0 auto;

  @media (min-width: 430px) {
    padding: 0 40px;
  }

  @media (min-width: 740px) {
    padding: 0 30px;
    margin: 0 auto;
    max-width: 1138px;
  }

  /* A <button> rather than the theme's div-with-onclick, so it is reachable
     by keyboard; the reset below keeps it looking identical. */
  .openCats {
    appearance: none;
    border: 0;
    font: inherit;
    color: inherit;
    /* A <button> is border-box by UA default; the width below is the theme's
       and assumes the content-box a <div> would have given it. */
    box-sizing: content-box;
    width: 20px;
    position: absolute;
    top: 13px;
    background-color: var(--dw-white);
    padding: 8px 6px;
    line-height: 0;
    cursor: pointer;
    z-index: 1003;
    user-select: none;

    @media (min-width: 430px) {
      top: 29px;
    }

    /* The button is an SVG; without an explicit width it collapses. */
    img {
      width: 100%;
      height: auto;
    }
  }

  .logo {
    max-width: 200px;
    width: 100%;
    margin: 10px auto -10px;

    @media (min-width: 430px) {
      max-width: 300px;
    }

    &.wordmark {
      max-width: 970px;
    }

    a img {
      width: 100%;
      height: auto;
    }
  }

  #categories {
    display: none;
    color: var(--dw-white);
    position: absolute;
    z-index: 1002;
    top: 40px;
    bottom: 0;
    left: 0;
    right: 0;
    text-align: center;
    text-transform: uppercase;

    a {
      display: block;
    }

    ul {
      position: absolute;
      list-style: none;
      width: 100%;
      padding: 0;
      margin: 0;
      font-size: 2em;

      li {
        display: block;
        margin: 10px;

        a {
          padding: 10px 0;

          @media (min-width: 740px) {
            padding: 20px 0;
          }
        }
      }
    }
  }

  #search {
    position: relative;
    width: 150px;
    margin: -27px auto 17px;
    line-height: 1.1;

    @media (min-width: 430px) {
      margin-top: -11px;
    }

    input {
      border-radius: 0;
      appearance: none;
    }

    input.search-field {
      box-sizing: content-box;
      height: 24px;
      width: 100%;
      text-transform: uppercase;
      background-color: transparent;
      border: 0;
      outline: 0;
      color: var(--dw-white);
      text-align: center;
      margin: 0;
      padding: 2px 0;
      border-bottom: 2px solid var(--dw-white);
    }

    input.search-submit {
      color: var(--dw-dark);
      position: absolute;
      right: -30px;
      bottom: 0;
      border: 0;
      outline: 0;
      margin: 0 0 0 -2px;
      padding: 0;
      width: 30px;
      height: 30px;
      background-color: var(--dw-white);
      cursor: pointer;
    }
  }
}

/* ---------- footer ---------- */

.footer {
  position: relative;
  width: 100%;
  overflow: hidden;
  color: var(--dw-white);
  background-color: var(--dw-dark);

  .widget-area {
    position: relative;
    padding: 30px;
    margin: 0 auto;
    font-size: 1.4em;
    overflow: hidden;

    @media (min-width: 740px) {
      margin: 0 auto;
      max-width: 1138px;
    }

    h2 {
      font-size: 1em;
      font-weight: 700;
      text-transform: uppercase;
      letter-spacing: 0.4px;
      padding-bottom: 6px;
      border-bottom: 2px solid var(--dw-white);
    }

    p {
      font-size: 1em;
      margin-bottom: 0;
    }

    ul {
      list-style: none;
      width: 100%;
      padding: 0;
      margin: 10px 0;

      /* Sub-categories are listed for crawlers but not shown. */
      &.children {
        display: none;
      }

      li {
        display: block;
        margin: 5px 0;

        a {
          display: block;
          padding: 0;
        }
      }
    }

    .widget-box {
      text-align: left;
      position: relative;
      padding-bottom: 20px;

      @media (min-width: 740px) {
        float: left;
        margin-left: 53px;
        width: calc(33.33% - 36px);

        &:first-of-type {
          margin-left: 0;
        }
      }

      .widget-box__btn {
        display: block;
        width: 100%;
        text-align: center;
        padding: 10px 0;
        margin: 14px 0 0;
        background-color: var(--dw-white);
        color: var(--dw-dark);
        font-size: 0.9em;
        text-transform: uppercase;
        border-radius: 2px;
      }

      p {
        margin: 8px 0;
      }
    }
  }

  .copyright,
  .disclaimer {
    width: 90%;
    max-width: 940px;
    margin: 20px auto;
  }
}

/* ---------- typography ---------- */

body {
  font-family: "Rubik", sans-serif;
  font-size: 12px;
  -webkit-font-smoothing: antialiased;
}

a {
  text-decoration: none;
}

p {
  margin: 10px 0 15px;
  font-size: 1.4em;
  line-height: 1.4;
  letter-spacing: 0.1px;
}

ul {
  padding-left: 25px;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  margin: 10px 0;
  font-family: "Rubik", sans-serif;
  font-weight: normal;
  line-height: 1;
}

h1 {
  font-size: 4em;
}

h2 {
  font-size: 2em;
}

h3 {
  font-size: 3em;
}

h4 {
  font-size: 2em;
}

h5 {
  font-size: 1em;
}

.pagination {
  font-size: 2rem;
}

.page_error {
  padding: 40px 30px 30px;

  .shrug {
    font-size: 2em;
  }
}

.copyright,
.disclaimer {
  font-size: 0.5rem;

  p {
    text-align: center;
  }
}

#search {
  input.search-field,
  input.search-submit {
    font-size: 2.1em;
    font-family: "Rubik", sans-serif;
  }

  input.search-submit {
    font-size: 2em;
    text-transform: uppercase;
  }
}

/* ---------- layout ---------- */

.container {
  width: 100%;
}

.section {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  overflow: hidden;
}

.center {
  text-align: center;
}

.product_box {
  text-align: left;
  position: relative;
  margin: 20px;

  @media (min-width: 430px) {
    margin: 20px 40px 30px;
  }

  @media (min-width: 740px) {
    margin: 20px 10px;
    width: calc(50% - 42px);
    display: inline-block;
  }

  a.product_img_link {
    position: relative;
    display: block;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
  }

  & > a {
    line-height: 0;
  }

  /* Holds the card's 3:2 aspect box open while the image loads. */
  .product_image_bg {
    position: relative;
    line-height: 0;
    width: 100%;
    padding-bottom: 66.66666%;
    height: auto;
    display: block;
    background-color: #f2f2f2;
    background-size: 100%;
    background-repeat: no-repeat;
  }

  .product_image {
    position: absolute;
    top: 0;
    left: 0;
    display: block;
    line-height: 0;
    width: 100%;
  }

  .product_meta {
    position: relative;
    overflow: hidden;
  }

  .product_description {
    position: relative;
    padding: 10px 20px;
    background-color: var(--dw-dark);
    overflow: hidden;
    height: 150px;
    color: var(--dw-white);

    .cat_breadcrumbs {
      display: inline-block;
      font-size: 1.4em;
      text-transform: uppercase;
      color: var(--dw-gold);
      margin: 10px 0;
      border-bottom: 2px solid var(--dw-gold);
    }

    h2,
    p {
      @media (min-width: 740px) {
        float: left;
      }
    }

    h2 {
      margin: 0;

      a:hover {
        color: var(--dw-gold);
      }
    }

    p a {
      color: var(--dw-gold);
    }

    /* Fades the clipped blurb out rather than cutting a line in half. */
    &::after {
      content: "";
      position: absolute;
      width: 100%;
      height: 30px;
      bottom: 0;
      left: 0;
      background: linear-gradient(to bottom, rgb(34 34 34 / 0%) 0%, rgb(34 34 34 / 50%) 60%, rgb(34 34 34 / 100%) 100%);
    }
  }

  .product_buttons {
    width: 100%;
    color: var(--dw-white);
    margin: 0 auto;
    padding: 5px 0 10px;
    background-color: var(--dw-dark);
    text-align: center;
    overflow: hidden;

    .view_btn:hover,
    .buy_btn:hover {
      color: var(--dw-gold);
    }

    .view_btn {
      float: left;
      width: calc(50% - 2px);

      &.full-btn {
        width: 100%;
      }
    }

    .buy_btn {
      float: right;
      width: calc(50% - 1px);
      border-left: 1px solid var(--dw-white);
    }

    a {
      display: block;
      padding: 10px 0;
    }
  }

  p,
  ul {
    max-width: 90%;
  }

  ul,
  li {
    font-size: 1.4em;
  }

  ul ul,
  ul li {
    font-size: 1em;
  }

  li {
    line-height: 1.4;
    letter-spacing: 0.1px;
    margin: 3px 0;
  }

  h1 {
    font-size: 2em;

    .single & {
      font-size: 3em;
      margin: 15px 0 20px;
    }
  }

  h1,
  h2 {
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--dw-white);
    font-weight: 700;
    margin: 0;
    padding: 0;
    width: 100%;
  }

  .product_buttons a {
    font-size: 1.3em;
    text-transform: uppercase;
    font-weight: 700;
  }

  /* The lead card: full width, with its meta overlaid to a fixed height. */
  &.main {
    @media (min-width: 740px) {
      width: calc(100% - 62px);
      margin: 20px auto 0;
      display: block;
    }

    .product_meta {
      @media (min-width: 740px) {
        background-color: var(--dw-dark);
        height: 272px;
      }
    }

    .product_description,
    .product_buttons {
      @media (min-width: 740px) {
        position: absolute;
        width: calc(100% - 40px);
        left: 0;
      }
    }

    .product_buttons {
      @media (min-width: 740px) {
        bottom: 0;
        width: 100%;
      }
    }

    .product_description {
      @media (min-width: 740px) {
        top: 0;
        height: 168px;
      }

      h2,
      p {
        @media (min-width: 740px) {
          float: none;
        }
      }
    }

    /* With an ad alongside, the blurb narrows to make room for it. */
    &.companion {
      .product_description {
        @media (min-width: 740px) {
          width: calc(100% - 400px);
        }
      }

      .product_buttons {
        @media (min-width: 740px) {
          width: calc(100% - 360px);
        }
      }
    }
  }
}

/* Related products sit three to a row rather than two. */
.related .product_box {
  @media (min-width: 740px) {
    width: calc(33.33% - 36px);
  }
}

.pagination {
  max-width: 1200px;
  margin: 20px 20px 40px;

  @media (min-width: 430px) {
    margin-bottom: 50px;
  }

  @media (min-width: 740px) {
    margin: 60px;
  }

  .page-numbers.current {
    color: var(--dw-light);
  }

  a.next,
  a.prev {
    line-height: 0.83;
    position: relative;
    display: inline-block;
    height: 27px;
    width: 27px;
    margin-bottom: -4px;
    background-color: var(--dw-white);

    /* The label stays for screen readers; the arrow is drawn in CSS. */
    span {
      font-size: 0;
    }
  }

  a.next {
    margin-left: 4px;
    border-left: 2px solid var(--dw-dark);

    &::after {
      content: "";
      position: absolute;
      top: 7px;
      left: 9px;
      width: 0;
      height: 0;
      border-top: 6px solid transparent;
      border-bottom: 6px solid transparent;
      border-left: 10px solid var(--dw-dark);
    }
  }

  a.prev {
    margin-right: 4px;
    border-right: 2px solid var(--dw-dark);

    &::after {
      content: "";
      position: absolute;
      top: 7px;
      right: 9px;
      width: 0;
      height: 0;
      border-top: 6px solid transparent;
      border-bottom: 6px solid transparent;
      border-right: 10px solid var(--dw-dark);
    }
  }
}

/* ---------- single product page ---------- */

.single .product_box.main .product_meta {
  position: relative;
  height: auto;

  .product_description {
    position: relative;
    height: auto;

    &.buttons {
      @media (min-width: 740px) {
        padding-bottom: 70px;
      }
    }

    /* No clipping on the full post, so no fade. */
    &::after {
      content: none;
    }

    /* Images inside the post body. Replaces WordPress's
       `alignnone size-full`, the only combination the content ever used. */
    .product_content img {
      width: 100%;
      height: auto;
      margin: 20px 0;
    }

    .product_tags {
      color: var(--dw-white);
      margin: 22px 0 0;
      text-transform: uppercase;
      letter-spacing: 0;
      line-height: 1.3;

      @media (min-width: 740px) {
        margin: 40px 0 10px;
        max-width: 50%;
      }

      .product_tags--title {
        margin-bottom: 4px;
        font-weight: bold;
        font-size: 1.1em;
      }

      a {
        display: inline-block;
        margin-right: 3px;

        &:hover {
          color: var(--dw-gold);
        }
      }
    }
  }
}


/* The element itself is a hook for the build, not a box: `display: contents`
   keeps it out of the layout so the floats inside behave as they did when this
   markup was a bare <div>. */
ad-slot {
  display: contents;
}

.product_box.main.companion .main_companion {
  display: none;
  position: relative;
  float: right;

  @media (min-width: 340px) {
    display: block;
    width: 100%;
    padding: 10px 0;
    margin-top: 6px;
  }

  @media (min-width: 430px) {
    background-color: #eee;
    margin-top: 30px;
  }

  @media (min-width: 740px) {
    width: auto;
    background-color: transparent;
    padding: 0;
    margin-top: 0;
  }

  .mc_outer {
    position: relative;

    @media (min-width: 740px) {
      margin-top: 11px;
      margin-right: 11px;
    }
  }

  /* Rotated to run up the side of the unit once there is room for it. */
  .mc_message {
    @media (min-width: 340px) {
      color: var(--dw-dark);
      letter-spacing: 0.4px;
      margin: 0 0 4px;
      text-align: center;
    }

    @media (min-width: 430px) {
      position: absolute;
      bottom: -10px;
      left: 10px;
      transform-origin: left;
      transform: rotate(-90deg);
    }

    @media (min-width: 740px) {
      color: #eee;
      bottom: -8px;
      left: -10px;
    }
  }

  iframe {
    display: block;
    margin: 0 auto;

    @media (min-width: 740px) {
      margin: 0;
    }
  }

  .buy {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 298px;
    height: 248px;
    margin: auto;
    background-color: var(--dw-white);
    border: 1px solid var(--dw-dark);

    a {
      display: block;
      padding: 118px 50px;
    }
  }
}

