/* ============================================================
   Colin Shop — version 2: the luxury department store
   ============================================================ */

.store {
  margin: 0;
  background: #ffffff;
  color: #000000;
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 15px;
  line-height: 22px;
  -webkit-font-smoothing: antialiased;
}

.store a {
  color: inherit;
  text-decoration: none;
}

/* ---------- Header: floats above the page as you scroll ---------- */
.store-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10;
  display: flex;
  justify-content: center;
  align-items: baseline;
  gap: 28px; /* Colin and Shop float close on either side of the logo */
  padding: 12px 32px 0;
  height: 32px;
  background: transparent; /* no bar: the words sit right on top of the pictures */
  pointer-events: none;     /* so the empty space doesn't block clicks on pictures */
}

.store-header a {
  pointer-events: auto;
}

/* Floating words get a white copy 1px down and to the right, so they stay readable over pictures */
.store-header a,
.store-toolbar button,
.store-side {
  text-shadow: 1px 1px 0 #ffffff;
}

.store-logo {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

/* Colin and Shop: standard blue links, so people know to click them */
.store .store-header-side,
.store .store-header-side:visited {
  color: #0000ee;
  text-decoration: underline;
  font-size: 15px;
}

.store-logo:hover {
  text-decoration: underline;
}

/* ---------- Three columns: filters, products, sort ---------- */
.store-layout {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr) 200px;
  gap: 48px;
  padding: 56px 32px 64px; /* just enough room for the floating header */
}

/* The filter column scrolls with the page, no scrolling box of its own.
   The short sort column stays put as you scroll (desktop). */
.store-side {
  align-self: start;
}

.store-sort {
  position: sticky;
  top: 56px;
}

.store-side h2 {
  margin: 28px 0 10px;
  font-size: 15px;
  font-weight: 500;
}

.store-side ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.store-side button {
  text-shadow: inherit; /* buttons ignore the outline unless told to take it from their list */
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.store-side button:hover,
.store-side button.is-chosen {
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* Categories and designers line up with the screenshot: categories in capitals */
#category-list button {
  text-transform: uppercase;
}

.store-sale {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}

.store-sale input {
  width: 14px;
  height: 14px;
  margin: 0;
  accent-color: #000000;
}

.store-filters h2:first-of-type {
  margin-top: 32px;
}

/* The sort column sits at the top on the right */
.store-sort h2 {
  margin-top: 0;
}

/* ---------- The product grid ---------- */
.store-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr)); /* three across on desktop */
  gap: 48px 32px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.store-item a {
  display: block;
}

/* Pictures are 4 wide by 5 tall, filling the frame */
.store-pictures {
  position: relative;
  display: block;
  aspect-ratio: 4 / 5;
  margin-bottom: 14px;
  overflow: hidden;
}

.store-pictures img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.store-hover-img {
  opacity: 0;
}

@media (hover: hover) {
  .store-item.has-hover a:hover .store-hover-img { opacity: 1; }
  .store-item.has-hover a:hover .store-main-img { opacity: 0; }
}

.store-name,
.store-price {
  display: block;
}

.store-item a:hover .store-name {
  text-decoration: underline;
}

/* Bright red: "Sold out", and the second price when SALE is ticked */
.store-red {
  color: #ff0000;
}

.store-price s {
  color: #000000;
}

.store-empty {
  margin: 0;
}

/* ---------- Narrower screens ---------- */
.store-toolbar {
  display: none;
}

/* Medium screens (narrow windows, tablets): all three columns stay,
   just slimmer, with two products across */
@media (max-width: 1100px) {
  .store-layout {
    grid-template-columns: 170px minmax(0, 1fr) 150px;
    gap: 28px;
  }

  .store-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 40px 20px;
  }
}

/* Phones: filters and sort fold away behind two buttons; two products across */
@media (max-width: 800px) {
  .store-header {
    gap: 16px;
    padding: 10px 16px 0;
    height: 30px;
  }

  .store-logo {
    font-size: 18px;
  }

  .store-toolbar {
    position: fixed;
    top: 40px;
    left: 0;
    right: 0;
    z-index: 9;
    display: flex;
    justify-content: space-between;
    padding: 8px 16px;
    background: transparent; /* floats over the pictures, like the header */
    pointer-events: none;
  }

  .store-toolbar button {
    padding: 0;
    border: 0;
    background: none;
    color: #000000;
    font: inherit;
    text-decoration: underline;
    cursor: pointer;
    pointer-events: auto;
  }

  .store-layout {
    display: block;
    padding: 84px 16px 48px;
  }

  /* The opened lists float over the pictures too: no background,
     just the words with their white offset. Filter on the left, Sort on the right. */
  .store-side {
    position: absolute; /* placed by the script right under the buttons; scrolls with the page */
    top: 72px;
    z-index: 8;
    display: none;
    width: max-content;
    max-width: 70vw;
    background: transparent;
    /* A 2px white outline behind every word, so the lists read clearly over pictures */
    text-shadow:
      2px 0 0 #fff, -2px 0 0 #fff, 0 2px 0 #fff, 0 -2px 0 #fff,
      2px 2px 0 #fff, -2px -2px 0 #fff, 2px -2px 0 #fff, -2px 2px 0 #fff,
      1px 2px 0 #fff, 2px 1px 0 #fff, -1px 2px 0 #fff, -2px 1px 0 #fff,
      1px -2px 0 #fff, 2px -1px 0 #fff, -1px -2px 0 #fff, -2px -1px 0 #fff;
  }

  .store-sort {
    position: absolute;
  }

  .store-filters {
    left: 16px;
  }

  .store-sort {
    right: 16px;
    text-align: right;
  }

  .store-sort button {
    text-align: right;
  }

  .store-side.is-open {
    display: block;
  }

  .store-side h2:first-of-type,
  .store-sort h2 {
    margin-top: 12px;
  }

  .store-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 32px 16px;
  }
}

/* A soft grey shows in a picture's place until it loads (or if it's missing) */
.store-pictures {
  background: #f2f2f2;
}

/* ---------- Bio, works and services pages ---------- */

/* Desktop: three across, always (the bio's 3 x 3 picture is laid out on purpose) */
.gallery-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
}

/* The bio shows its web pictures on computers and its mobile pictures on phones */
.gallery-mobile {
  display: none;
}

@media (max-width: 800px) {
  .gallery-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  .gallery-web {
    display: none;
  }

  .gallery-mobile {
    display: grid;
  }
}

a.store-pictures {
  display: block;
}

/* A picture split in two: the top half and the bottom half are separate links */
.tile-half {
  position: absolute;
  left: 0;
  right: 0;
  z-index: 1;
}

.tile-top {
  top: 0;
  height: 50%;
}

.tile-bottom {
  bottom: 0;
  height: 50%;
}

/* The "back" tile: a blank box with a very thick black frame and a big blue link */
.store-item .back-box {
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  aspect-ratio: 4 / 5;
  margin-bottom: 14px;
  border: 14px solid #000000;
  background: #ffffff;
}

.store .back-word {
  color: #0000ee;
  font-family: "Times New Roman", Times, serif;
  font-size: 44px;
  line-height: 1;
  text-decoration: underline;
}

/* "add poop" and "clean poop": look just like the sort list, a little below it */
.poop-buttons {
  margin-top: 28px !important;
}

/* The poop itself: dropped anywhere on the page, clicks pass straight through */
.poop {
  position: absolute;
  z-index: 5;
  width: 90px;
  height: auto;
  pointer-events: none;
}

/* "add poop" in the palette brown */
.store .store-side #add-poop {
  color: #52310b;
}
