.site-main.bag-main {
   max-width: none !important;
   padding-inline: 0 !important;
}

.bag-page-header {
   background-color: #000;
   padding: 24px;
   .entry-title {
      color: #FFF !important;
      text-align: center;
      margin: 0;
   }
}

.bag-main .page-content {
   max-width: 1140px;
   margin-inline: auto;
   padding-inline: 24px;
   padding-block: 50px;
}

.bag-single-page-content {
   display: grid;
   gap: 24px;
   grid-template-columns: minmax(0, 1fr);
}

.bag-details {
   font-size: 13px;
   h3 {
      font-family: var(--aa-font-body) !important;
      font-weight: 700 !important;
      font-size: 16px !important;
   }
   p {
      margin: 5px 0 0 0;
   }
   a {
      color: #000 !important;
      &:hover {
         text-decoration: underline !important;
      }
   }
   .item:not(:first-child) {
      margin-top: 24px;
   }
   .item-treatment-details {
      font-size: 12px;
   }
}

.bag-gallery-group {
   display: grid;
   gap: 0;
   grid-template-columns: repeat(2, minmax(0, 1fr));
   img {
      display: block;
      aspect-ratio: 3/4.5;
      object-fit: cover;
      max-width: unset;
      width: 100%;
   }
   figure {
      margin: 0;
      position: relative;
      &:before {
         background-color: #FFF;
         display: block;
         position: absolute;
         padding: .5em 1em;
         font-size: 10px;
         text-transform: uppercase;
         border-radius: 2rem;
         top: 12px;
         z-index: 5;
         color: var(--aa-maroon);
      }
      &:nth-child(1) {
         border-right: 3px solid #FFF;
         &:before {
            content: 'Before';
            left: 12px;
         }
      }
      &:nth-child(2) {
         border-left: 3px solid #FFF;
         &:before {
            content: 'After';
            right: 12px;
         }
      }
   }
   figcaption {
      font-style: normal;
      font-weight: 700;
      font-size: 12px;
      background-color: #000;
      color: #FFF;
      padding: 12px 24px;
   }
}

/* Case without images */
.bag-gallery-placeholder {
   aspect-ratio: 3/4.5;
   background-color: #E5E5E5;
}

.bag-gallery-swiper {
   &:not(.is-ready) .swiper-wrapper {
      display: grid;
      gap: 24px;
   }
   &:not(.is-ready) .bag-gallery-controls {
      display: none;
   }
   a {
      display: block;
   }
}

.bag-gallery-controls {
   display: flex;
   align-items: center;
   justify-content: center;
   gap: 16px;
   margin-top: 16px;
   button {
      background: none;
      border: 0;
      color: #000;
      cursor: pointer;
      font-size: 18px;
      padding: 4px 8px;
      &.swiper-button-disabled {
         opacity: .3;
         cursor: default;
      }
      &.swiper-button-lock {
         display: none;
      }
   }
}

.bag-go-archive {
   margin-top: 24px !important;
   font-size: 14px;
   opacity: .5;
   a {
      color: #000 !important;
      &:hover {
         text-decoration: underline !important;
      }
   }
}

@media (min-width: 992px) {
   .bag-single-page-content {
      grid-template-columns: repeat(3, minmax(0, 1fr));
      gap: 48px;
   }
   .bag-navigation,
   .bag-gallery {
      order: 1;
      grid-column: 2 / span 2;
   }
}

.bag-navigation {
   display: flex;
   justify-content: space-between;
   order: 2;
   font-size: 14px;
   a {
      color: #000 !important;
      &:hover {
         text-decoration: underline !important;
      }
   }
}

.bag-grid {
   display: grid;
   gap: 36px;
   grid-template-columns: repeat(auto-fill, minmax(min(19rem, 100%), 1fr));
}

.bag-card {
   background: var(--aa-sage);
   a {
      display: block;
      position: relative;
      opacity: 1 !important;
      height: 100%;
      &:after {
         content: 'View details';
         position: absolute;
         top: 0;
         left: 0;
         width: 100%;
         height: 100%;
         background-color: rgba(0, 0, 0, .75);
         z-index: 9;
         color: #FFF;
         text-align: center;
         align-content: center;
         font-size: 12px;
         opacity: 0;
         transition: opacity .5s ease-out;
      }
      &:hover {
         &:after {
            opacity: 1;
         }
      }
   }
   img {
      display: block;
   }
   .bag-gallery-group {
      figure {
         &:before {
            font-size: 8px !important;
         }
      }
   }
   h2 {
      font-family: var(--aa-font-body) !important;
      font-weight: 700 !important;
      font-size: 16px !important;
      color: var(--aa-ink) !important;
      padding: 12px;
      margin: 0 !important;
   }
}

@media (min-width: 1200px) {
   .bag-grid {
      gap: 48px 36px;
   }
}

.bag-main .pagination {
   padding-top: 24px;
   margin-bottom: 0;
   .nav-links {
      width: 100%;
      display: block;
      text-align: center;
      display: flex;
      gap: 16px;
      justify-content: center;
      a {
         &:hover {
            text-decoration: underline !important;
         }
      }
   }
}