:root {
  --color-black: #000;
  --color-white: #fff;
  --color-yellow: #fffaea;
  --color-grey: #707070;
  --color-darkgrey: #383838;
  --color-green: #53b22d;
  --color-blue: #eef2f8;
}

/* Variantion of advertisement.  */
.ads.yellow {
  background-color: var(--color-yellow);
}

.ads.grey {
  background-color: var(--color-darkgrey);
}

/* Special case: Desing with image on category. */
.ads.cat-img {
  padding-top: 0;
}

.ads.cat-img .ads__box.active-banner {
  display: flex;
  flex-direction: column;
}

.ads.cat-img .item .item-img {
  display: none;
}

.ads.cat-img .ads__box-cat1 .cat-img {
  position: absolute;
  left: -24px;
  top: 0;
  height: 100%;
  width: calc(100% + 48px);
  z-index: 0;
  object-fit: cover;
}

.ads.cat-img .ads__box-cat1 {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  margin-bottom: 22px;
}

.ads.cat-img .ads__box-cat1 .title {
  position: relative;
  color: var(--color-white);
  font-size: 48px;
  font-weight: 500;
  text-align: center;
  margin: 58px 0;
}

/* Special case: Desing with image. */
.ads.cat-no {
  padding-bottom: 0;
}

.ads.cat-no .item {
  display: flex;
  flex-direction: column-reverse;
  gap: 5px;
}

.ads.cat-no .item .item-title {
  color: var(--color-white);
}

.ads.cat-no .item .item-button {
  color: var(--color-black);
  background-color: var(--color-white);
  padding: 8px 45px;
}

.ads.cat-no .item .item-button a {
  color: var(--color-black);
}

.ads.cat-no .all-access {
  margin-bottom: 13px;
}

.ads.cat-no .all-access .icon {
  fill: var(--color-white);
  stroke: var(--color-white);
  color: var(--color-white);
  max-width: 72px;
  height: 23px;
}

.ads.cat-no .ads__box.active-banner {
  display: flex;
  flex-direction: column;
}

.ads.cat-no .item .item-img {
  display: block;
  position: relative;
  left: 0;
  bottom: -24px;
  height: 100%;
  width: 100%;
  z-index: 0;
  object-fit: cover;
  width: 94%;
  margin: auto;
}

.ads.cat-no nav {
  display: none;
}

.ads.cat-no nav .navigation--possition {
  color: var(--color-white);
}

.ads.cat-no nav .icon {
  stroke: var(--color-white);
}

.ads.cat-no .item-img__wrap {
  overflow: hidden;
}

/* Default .ads template. */
.ads {
  padding: 21px 24px;
  position: relative;
}

.ads__box {
  display: none;
}

.ads__box.active-banner {
  display: flex;
}

.ads .item .item-img,
.ads .ads__box-cat1,
.ads__box-cat2 {
  display: none;
  overflow: hidden;
}

.ads .ads__box.active-banner.right .ads__box-cat1 .title,
.ads .ads__box.active-banner.right .ads__box-cat1 .cat-img,
.cat-no .ads__box.active-banner.right .item-img,
.ads .ads__box.active-banner.right .ads__box-cat2 .title {
  animation: slide-out 1s;
}

.ads .ads__box.active-banner.left .ads__box-cat1 .title,
.ads .ads__box.active-banner.left .ads__box-cat1 .cat-img,
.cat-no .ads__box.active-banner.left .item-img,
.ads .ads__box.active-banner.left .ads__box-cat2 .title {
  animation: slide-in 1s;
}

.all-access {
  display: flex;
  justify-content: flex-start;
  position: relative;
  top: -7px;
}

.all-access .icon {
  max-width: 58px;
  height: 21px;
  width: 100%;
  position: relative;
}

.divider--vertical {
  height: 18px;
  width: 1px;
  margin: 0px 8px;
  display: block;
  position: relative;
  background-color: var(--color-black);
}

.all-access h5 {
  margin: 0;
  margin-top: 3px;
  line-height: 21px;
  font-size: 12px;
  position: relative;
  color: var(--color-black);
}

.ads .item .item-title {
  margin: 0;
  margin-top: -3px;
  font-size: 20px;
  font-weight: 500;
  color: var(--color-black);
}

.ads .item .item-price {
  display: flex;
  font-size: 14px;
  line-height: 1.43;
  font-weight: bold;
  gap: 10px;
  margin: 8px 0;
}

.ads .item .old-price {
  color: var(--color-grey);
  text-decoration: line-through;
}

.ads .item .valid-price {
  color: var(--color-green);
}

.ads .item .item-text {
  margin: 8px 0 10px;
  font-size: 15px;
  line-height: 1.17;
  color: var(--color-grey);
}

.ads .item .item-button {
  display: inline;
  padding: 11px 49px;
  background-color: var(--color-black);
  font-size: 16px;
  line-height: 1.43;
  font-weight: 600;
}

.ads .item .item-button a {
  color: var(--color-white);
}

.ads nav {
  display: flex;
  position: absolute;
  bottom: 24px;
  right: 22px;
}

.ads nav .icon {
  height: 15px;
  width: 15px;
  padding: 0;
  box-sizing: content-box;
  cursor: pointer;
  opacity: 1;
  transition: opacity 0.3s;
}

.ads nav .icon:hover,
.ads nav .icon:focus {
  opacity: 0.45;
}

.ads nav .navigation--possition {
  font-size: 12px;
  color: var(--color-grey);
  position: relative;
  top: -2px;
  left: -9px;
}

.ads nav {
  display: none;
}

.ads.cat-img nav {
  display: flex;
}

/* Responsive design.  */
@media (min-width: 768px) {
  .ads.cat-no {
    padding: 25px 48px 0px;
  }

  .ads.cat-no .item {
    flex-direction: row;
    gap: 31px;
  }

  .ads.cat-no .item .item-img {
    width: 320px;
    max-width: 100%;
    bottom: 0;
  }

  .ads.cat-no .item .item__wrap {
    position: relative;
    top: -3px;
  }

  .ads.cat-no .item .item-title {
    font-size: 22px;
  }

  .ads.cat-no .item .item-button {
    padding: 11px 55px;
    position: relative;
    top: -9px;
  }

  .ads.cat-no .item .item-button a {
    font-size: 16px;
  }

  .ads.cat-img {
    padding: 0;
  }

  .ads.cat-img .ads__box-cat1 .title {
    margin: 87px 0;
  }

  .ads.cat-img .ads__box.active-banner {
    flex-direction: row;
    gap: 48px;
  }

  .ads.cat-img .ads__box-cat1 {
    flex: 0 0 47%;
    margin-bottom: 0;
  }

  .ads.cat-img .item {
    margin-top: 21px;
  }

  .ads {
    padding: 21px 24px 25px;
  }

  .ads__box {
    gap: 24px;
  }

  .ads .ads__box-cat1,
  .ads .ads__box-cat2 {
    text-align: center;
  }

  .ads .ads__box-cat1 .title,
  .ads .ads__box-cat2 .title {
    font-size: 36px;
    font-weight: 500;
    line-height: 1.22;
  }

  .ads .ads__box-cat1 {
    display: flex;
    flex: 0 0 220px;
    align-items: center;
    justify-content: center;
  }

  .ads .item {
    display: flex;
    flex-direction: row;
    gap: 20px;
  }

  .ads .item .item__wrap {
    position: relative;
  }

  .ads .item .item-img {
    position: relative;
    position: relative;
    bottom: -25px;
    display: flex;
    max-width: 132px;
    object-fit: contain;
  }

  .ads .item .item-text {
    margin: 8px 0 25px;
    font-size: 14px;
  }

  .ads .item .item-button {
    padding: 12px 56px;
  }

  .ads nav {
    display: flex;
  }
}

@media (min-width: 1200px) {
  .ads.cat-img .ads__box-cat1 .cat-img {
    left: 0;
    width: 100%;
  }

  .ads.cat-no .item {
    justify-content: center;
  }

  .ads.cat-no .item .item-img {
    width: 480px;
    margin: 0;
  }

  .ads.cat-no .item .item__wrap {
    max-width: 320px;
  }

  .ads.cat-no {
    padding-top: 16px;
  }

  .ads.cat-no .item .item__wrap {
    margin-top: 35px;
  }

  .ads.cat-no .all-access {
    margin-bottom: 20px;
  }

  .ads.cat-no .item .item-title {
    font-size: 24px;
  }

  .ads.cat-no .all-access .icon {
    max-width: 90px;
    height: 30px;
  }

  .ads .ads__box {
    overflow: hidden;
  }

  .all-access {
    top: 0;
  }

  .ads.cat-no nav {
    display: flex;
    position: absolute;
    right: 25px;
    bottom: 25px;
  }
}

@media (min-width: 1440px) {
  .ads.cat-img .ads__box-cat1 .title {
    font-size: 80px;
  }

  .ads.cat-img .ads__box-cat1 {
    flex: 0 0 50%;
  }

  .ads.cat-img .ads__box.active-banner {
    gap: 32px;
  }

  .ads.cat-img .item {
    margin-top: 25px;
    max-width: 345px;
  }

  .ads.cat-img nav {
    right: 3%;
  }

  .ads {
    padding: 24px 24px 0 24px;
  }

  .ads__box {
    gap: 50px;
  }

  .ads .item {
    gap: 24px;
  }

  .ads .ads__box-cat1,
  .ads .ads__box-cat2 {
    flex: 0 0 265px;
  }

  .ads .ads__box-cat1 .title,
  .ads .ads__box-cat2 .title {
    font-size: 40px;
  }

  .ads .ads__box-cat2 {
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .all-access .icon {
    max-width: 77px;
    height: 24px;
  }

  .ads .item .divider--vertical {
    height: 24px;
    margin: 0px 12px;
    top: 0px;
  }

  .all-access h5 {
    margin-top: 6px;
    font-size: 16px;
  }

  .ads .item .item-img {
    max-width: 176px;
    bottom: 0px;
  }

  .ads .item .item-title {
    font-size: 24px;
    margin: 15px 0px 8px;
  }

  .ads .item nav {
    bottom: 32px;
  }

  .ads nav {
    bottom: 30px;
    right: 28%;
  }
}

/* Animation.  */
@keyframes fade-in {
  0% {
    opacity: 0;
  }

  100% {
    opacity: 1;
  }
}

@-webkit-keyframes slide-in {
  0% {
    -webkit-transform: translate(-100%);
            transform: translate(-100%);
  }

  20% {
    -webkit-transform: translate(0);
            transform: translate(0);
  }

  100% {
    -webkit-transform: translate(0);
            transform: translate(0);
  }
}
@keyframes slide-in {
  0% {
    -webkit-transform: translate(-100%);
            transform: translate(-100%);
  }

  20% {
    -webkit-transform: translate(0);
            transform: translate(0);
  }

  100% {
    -webkit-transform: translate(0);
            transform: translate(0);
  }
}

@-webkit-keyframes slide-out {
  0% {
    -webkit-transform: translate(100%);
            transform: translate(100%);
  }

  20% {
    -webkit-transform: translate(0);
            transform: translate(0);
  }

  100% {
    -webkit-transform: translate(0);
            transform: translate(0);
  }
}
@keyframes slide-out {
  0% {
    -webkit-transform: translate(100%);
            transform: translate(100%);
  }

  20% {
    -webkit-transform: translate(0);
            transform: translate(0);
  }

  100% {
    -webkit-transform: translate(0);
            transform: translate(0);
  }
}
