:root {
  --books-primary: #e83c66;
  --books-dark: #0b1e28;
  --books-bg: #f6f6f6;
  --books-line: #d1d1d1;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  width: 100%;
  overflow-x: clip;
}

body.books-page {
  background: #ffffff;
  color: #000000;
  font-family: "Open Sans", sans-serif;
}

img {
  display: block;
  max-width: 100%;
}

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

button,
input {
  font: inherit;
}

.books-canvas {
  margin: 0 auto;
  max-width: 100%;
  width: 100%;
}

.top-news {
  background: var(--books-primary);
  color: #ffffff;
}

.top-news-inner,
.contact-strip-inner,
.header-inner {
  margin: 0 auto;
  width: min(1346px, calc(100% - 40px));
}

.top-news-inner {
  align-items: center;
  display: flex;
  justify-content: space-between;
  min-height: 44px;
}

.top-news-left {
  align-items: center;
  display: inline-flex;
  font-size: 12px;
  font-weight: 400;
  gap: 8px;
  line-height: 18px;
}

.top-news-right {
  align-items: center;
  display: inline-flex;
  gap: 16px;
}

.top-news-right a {
  align-items: center;
  display: inline-flex;
  font-family: "Poppins", sans-serif;
  font-size: 16px;
  font-weight: 500;
  gap: 6px;
  line-height: 20px;
}

.top-news-close {
  align-items: center;
  background: transparent;
  border: 0;
  color: inherit;
  cursor: pointer;
  display: inline-flex;
  justify-content: center;
  padding: 0;
}

.contact-strip {
  background: #0b1e28;
  border-bottom: 1px solid #0b1e28;
  color: #f6f6f6;
}

.contact-strip-inner {
  align-items: center;
  display: flex;
  justify-content: center;
  min-height: 48px;
}

.contact-links {
  align-items: center;
  display: flex;
  gap: 24px;
}

.contact-links a {
  align-items: center;
  display: inline-flex;
  font-size: 12px;
  font-weight: 400;
  gap: 8px;
  line-height: 18px;
}

.social-links {
  display: inline-flex;
  gap: 12px;
  margin-left: 24px;
}

.social-links a {
  align-items: center;
  border-radius: 10px;
  display: inline-flex;
  height: 32px;
  justify-content: center;
  width: 32px;
}

.site-header {
  background: #f6f6f6;
  border-bottom: 1px solid #ececec;
}

.header-inner {
  align-items: center;
  display: flex;
  min-height: 80px;
  padding: 16px 0;
}

.brand {
  display: inline-flex;
  margin-right: 32px;
}

.main-nav {
  align-items: center;
  display: flex;
  gap: 32px;
  margin-right: auto;
}

.main-nav a {
  align-items: center;
  display: inline-flex;
  font-size: 14px;
  font-weight: 400;
  gap: 4px;
  line-height: 20px;
  padding: 10px 0;
}

.main-nav a.is-active {
  border-bottom: 2px solid var(--books-primary);
}

.nav-actions {
  align-items: center;
  display: inline-flex;
  gap: 24px;
}

.btn-cart {
  align-items: center;
  background: #fcf0f3;
  border-radius: 12px;
  display: inline-flex;
  height: 48px;
  justify-content: center;
  width: 72px;
}

.btn-login {
  align-items: center;
  background: var(--books-primary);
  border-radius: 12px;
  color: #ffffff;
  display: inline-flex;
  font-family: "Poppins", sans-serif;
  font-size: 16px;
  font-weight: 500;
  gap: 6px;
  height: 48px;
  justify-content: center;
  min-width: 146px;
  padding: 0 24px;
}

.books-main {
  background: var(--books-bg);
  overflow: hidden;
  padding: 72px 0 48px;
}

.books-hero,
.books-topic,
.books-bottom-cta {
  margin-left: auto;
  margin-right: auto;
  width: min(1124px, calc(100% - 40px));
}

.search-icon {
  height: 89px;
  margin: 0 auto;
  width: 89px;
}

.hero-title {
  color: #000000;
  font-size: 31px;
  font-weight: 600;
  line-height: 1.22;
  margin: 42px 0 0;
  text-align: center;
}

.hero-subtitle {
  color: #000000;
  font-size: 18px;
  font-weight: 400;
  line-height: 1.5;
  margin: 20px 0 0;
  text-align: center;
}

.mood-buttons {
  display: flex;
  gap: 29px;
  justify-content: center;
  margin-top: 48px;
}

.mood-button {
  align-items: center;
  background: var(--books-primary);
  border: 1px solid var(--books-line);
  border-radius: 12px;
  box-shadow: 0 4px 6px rgba(16, 24, 40, 0.1);
  color: #ffffff;
  display: inline-flex;
  font-size: 22px;
  font-weight: 700;
  height: 98px;
  justify-content: center;
  letter-spacing: -0.4457px;
  line-height: 26.743px;
  text-align: center;
  text-decoration: none;
  transition: transform 220ms ease, box-shadow 220ms ease;
  width: 251px;
}

.mood-button:hover {
  box-shadow: 0 8px 16px rgba(16, 24, 40, 0.16);
  transform: translateY(-3px);
}

.mood-button:focus-visible {
  outline: 3px solid rgba(232, 60, 102, 0.28);
  outline-offset: 4px;
}

.books-topic {
  margin-top: 108px;
  scroll-margin-top: 36px;
}

.books-topic + .books-topic {
  margin-top: 148px;
}

.topic-bubbles {
  align-items: flex-start;
  display: flex;
  justify-content: space-between;
}

.topic-bubble {
  position: relative;
}

.topic-bubble-left {
  border-radius: 26.666px;
  border: 0;
  margin-top: -10px;
  min-height: 160px;
  padding: 28px 28px 22px;
  width: 511.98px;
}

.topic-bubble-yellow {
  background: #fcbf31;
}

.topic-bubble-pink {
  background: #e83c66;
}

.topic-bubble-left h2 {
  color: #0b1e28;
  font-size: 39.618px;
  font-weight: 600;
  letter-spacing: -0.7924px;
  line-height: 47.542px;
  margin: 0;
}

.topic-bubble-left h3 {
  color: #000000;
  font-size: 48.422px;
  font-weight: 700;
  letter-spacing: -0.9684px;
  line-height: 58.107px;
  margin: 0;
}

.topic-bubble-left .topic-light {
  color: #ffffff;
}

.topic-bubble-left .topic-medium {
  font-size: 33.345px;
  letter-spacing: -0.6669px;
  line-height: 40.014px;
}

.topic-bubble-left .topic-long {
  font-size: 31px;
  letter-spacing: -0.62px;
  line-height: 1.18;
}

.topic-bubble-right {
  background: #000000;
  border-radius: 25.246px;
  border: 0;
  margin-top: 52px;
  min-height: 158px;
  padding: 22px 24px 18px;
  width: 484.731px;
}

.topic-bubble-right h4 {
  color: #ffffff;
  font-size: 28.132px;
  font-weight: 700;
  letter-spacing: -0.5626px;
  line-height: 33.759px;
  margin: 0;
}

.topic-bubble-right p {
  color: #ffffff;
  font-size: 21px;
  font-weight: 400;
  letter-spacing: -0.5626px;
  line-height: 1.36;
  margin: 6px 0 0;
}

.topic-bubble-pointer {
  display: none;
}

.topic-bubble-left::after {
  background: inherit;
  bottom: -28px;
  clip-path: polygon(0 50%, 100% 0, 100% 100%);
  content: "";
  height: 34px;
  position: absolute;
  right: 0;
  width: 33px;
}

.topic-bubble-right::after {
  background: #000000;
  bottom: -18px;
  clip-path: polygon(0 0, 100% 50%, 0 100%);
  content: "";
  height: 34px;
  left: 0;
  position: absolute;
  width: 34px;
}

.topic-tag {
  align-items: center;
  background: var(--books-primary);
  border-radius: 24px;
  color: #ffffff;
  display: flex;
  font-size: 14px;
  font-weight: 400;
  gap: 8px;
  height: 32px;
  line-height: 20px;
  margin-top: 32px;
  padding: 0 12px;
  width: fit-content;
}

.topic-tag-center {
  margin-left: auto;
  margin-right: auto;
}

.topic-tag-left {
  margin-left: auto;
  margin-right: auto;
}

.books-grid {
  align-items: stretch;
  display: flex;
  gap: clamp(24px, 7vw, 112px);
  justify-content: flex-start;
  margin-top: 18px;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  padding: 2px 2px 18px;
  scroll-padding-inline: 2px;
  scroll-snap-type: x proximity;
  scrollbar-color: rgba(232, 60, 102, 0.58) rgba(11, 30, 40, 0.12);
  scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
}

.books-carousel {
  position: relative;
}

.books-carousel-arrow {
  align-items: center;
  background: #ffffff;
  border: 2px solid #000000;
  border-radius: 999px;
  box-shadow: 0 8px 18px rgba(16, 24, 40, 0.14);
  cursor: pointer;
  display: inline-flex;
  height: 44px;
  justify-content: center;
  position: absolute;
  top: calc(50% + 8px);
  transform: translateY(-50%);
  transition: background-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
  width: 44px;
  z-index: 2;
}

.books-carousel-arrow::before {
  border-right: 3px solid #000000;
  border-top: 3px solid #000000;
  content: "";
  display: block;
  height: 12px;
  width: 12px;
}

.books-carousel-arrow:hover,
.books-carousel-arrow:focus-visible {
  background: #fcf0f3;
  box-shadow: 0 10px 22px rgba(232, 60, 102, 0.2);
}

.books-carousel-arrow:focus-visible {
  outline: 3px solid rgba(232, 60, 102, 0.28);
  outline-offset: 3px;
}

.books-carousel-arrow-prev {
  left: -22px;
}

.books-carousel-arrow-prev::before {
  transform: rotate(-135deg);
}

.books-carousel-arrow-next {
  right: -22px;
}

.books-carousel-arrow-next::before {
  transform: rotate(45deg);
}

.books-carousel-arrow[disabled] {
  cursor: default;
  opacity: 0.34;
  pointer-events: none;
}

.books-grid::-webkit-scrollbar {
  height: 8px;
}

.books-grid::-webkit-scrollbar-track {
  background: rgba(11, 30, 40, 0.12);
  border-radius: 999px;
}

.books-grid::-webkit-scrollbar-thumb {
  background: rgba(232, 60, 102, 0.72);
  border-radius: 999px;
}

.book-card {
  align-items: center;
  display: flex;
  flex: 0 0 228px;
  flex-direction: column;
  height: 100%;
  scroll-snap-align: start;
  width: 228px;
}

.book-card-badge {
  align-items: center;
  background: var(--books-primary);
  border-radius: 999px;
  color: #ffffff;
  display: inline-flex;
  font-size: 13px;
  font-weight: 700;
  gap: 6px;
  height: 24px;
  justify-content: center;
  line-height: 1;
  margin: 0 auto 5px;
  padding: 0 12px;
  white-space: nowrap;
}

.book-card-badge img {
  display: block;
  flex: 0 0 auto;
}

.book-card-badge-empty {
  opacity: 0;
  visibility: hidden;
}

.book-cover-link {
  border-radius: 10px;
  display: block;
  line-height: 0;
  margin: 0 auto;
  width: 172px;
}

.book-cover {
  height: 243px;
  margin: 0 auto;
  object-fit: cover;
  transition: transform 180ms ease;
  width: 172px;
}

.book-cover-link .book-cover {
  margin: 0;
}

.book-cover-link:hover .book-cover {
  transform: translateY(-2px);
}

.book-desc {
  color: #000000;
  flex: 1 1 auto;
  font-size: 17.5px;
  font-weight: 400;
  line-height: 1.3;
  margin: 10px 0 0;
  text-align: center;
  width: 100%;
}

.book-title-link {
  color: inherit;
  text-decoration: none;
  transition: color 180ms ease;
}

.book-title-link:hover,
.book-title-link:focus {
  color: var(--books-primary);
}

.book-cover-link:focus-visible,
.book-title-link:focus-visible {
  outline: 3px solid rgba(232, 60, 102, 0.32);
  outline-offset: 4px;
}

.book-price {
  color: #000000;
  font-size: 17px;
  font-weight: 400;
  line-height: 1.25;
  margin: 2px auto 0;
  text-align: center;
  width: 100%;
}

.book-btn {
  align-items: center;
  background: #ffffff;
  border: 3px solid #000000;
  border-radius: 10px;
  box-shadow: 0 4px 4px rgba(0, 0, 0, 0.25);
  color: #000000;
  display: inline-flex;
  font-size: 19px;
  font-weight: 400;
  height: 40px;
  justify-content: center;
  letter-spacing: 0;
  line-height: 1.2;
  margin: 10px auto 0;
  transition: transform 180ms ease;
  width: 190px;
}

.book-btn:hover {
  transform: translateY(-2px);
}

.book-btn.is-disabled,
.book-btn[aria-disabled="true"] {
  cursor: not-allowed;
  opacity: 0.62;
  pointer-events: none;
  transform: none;
}

.book-btn.is-added {
  background: #000000;
  color: #ffffff;
}

.books-bottom-cta {
  margin-top: 150px;
  text-align: center;
}

.books-bottom-cta p {
  color: #000000;
  font-size: 31.366px;
  font-weight: 600;
  letter-spacing: -0.6273px;
  line-height: 37.639px;
  margin: 0;
}

.books-bottom-cta h2 {
  color: #000000;
  font-size: 31.366px;
  font-weight: 800;
  letter-spacing: -0.6273px;
  line-height: 37.639px;
  margin: 21px 0 0;
}

.books-bottom-cta a {
  align-items: center;
  background: var(--books-primary);
  border-radius: 101.333px;
  color: #ffffff;
  display: inline-flex;
  font-family: "Poppins", sans-serif;
  font-size: 25.333px;
  font-weight: 500;
  gap: 9.5px;
  height: 76px;
  justify-content: center;
  margin-top: 39px;
  padding: 19px 38px;
  transition: transform 220ms ease, box-shadow 220ms ease;
}

.books-bottom-cta a:hover {
  box-shadow: 0 12px 20px rgba(232, 60, 102, 0.28);
  transform: translateY(-3px);
}

.site-footer {
  background: #0b1e28;
  padding: 48px 120px;
}

.footer-container {
  display: flex;
  flex-direction: column;
  gap: 48px;
  margin: 0 auto;
  max-width: 1200px;
}

.footer-top {
  display: grid;
  gap: 32px;
  grid-template-columns: 492px 1fr;
}

.footer-newsletter {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.footer-newsletter p {
  color: #f6f6f6;
  font-size: 16px;
  font-weight: 400;
  line-height: 24px;
  margin: 0;
}

.footer-newsletter-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 279px;
}

.footer-newsletter-form label {
  color: #ffffff;
  display: flex;
  flex-direction: column;
  font-size: 14px;
  font-weight: 500;
  gap: 4px;
  line-height: 20px;
}

.footer-newsletter-form input {
  background: transparent;
  border: 1px solid #b0b0b0;
  border-radius: 6px;
  color: #ffffff;
  min-height: 48px;
  padding: 14px 16px;
}

.footer-newsletter-form input::placeholder {
  color: #888888;
}

.footer-newsletter-btn {
  align-items: center;
  background: var(--books-primary);
  border: 0;
  border-radius: 64px;
  color: #ffffff;
  cursor: pointer;
  display: inline-flex;
  font-family: "Poppins", sans-serif;
  font-size: 16px;
  font-weight: 500;
  gap: 6px;
  justify-content: center;
  min-height: 44px;
  padding: 12px 24px;
  width: fit-content;
}

.footer-newsletter-note {
  color: #f6f6f6;
  font-size: 12px;
  line-height: 18px;
}

.footer-links-grid {
  display: grid;
  gap: 32px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.footer-links-col {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-links-col h4 {
  color: #f6f6f6;
  font-size: 16px;
  font-weight: 400;
  line-height: 24px;
  margin: 0 0 4px;
}

.footer-links-col a,
.footer-contact-address {
  color: #f6f6f6;
  font-size: 16px;
  line-height: 24px;
}

.footer-contact-link {
  align-items: center;
  display: flex;
  gap: 12px;
}

.footer-contact-icon {
  align-items: center;
  background: #344b63;
  border-radius: 10px;
  display: inline-flex;
  height: 40px;
  justify-content: center;
  width: 40px;
}

.footer-contact-address {
  display: grid;
  grid-template-columns: 40px 1fr;
}

.footer-contact-address span:first-child {
  grid-row: 1 / 3;
}

.footer-bottom {
  align-items: center;
  border-top: 1px solid #344b63;
  display: flex;
  justify-content: space-between;
  padding-top: 33px;
}

.footer-copy {
  color: #f6f6f6;
  font-size: 14px;
  line-height: 20px;
  margin: 0;
}

.footer-social {
  display: flex;
  gap: 12px;
}

.footer-social a {
  align-items: center;
  background: #344b63;
  border-radius: 10px;
  display: inline-flex;
  height: 36px;
  justify-content: center;
  width: 36px;
}

.footer-legal {
  display: flex;
  gap: 24px;
}

.footer-legal a {
  color: #f6f6f6;
  font-size: 14px;
  line-height: 20px;
}

.fade-in-up {
  animation: fadeInUp 720ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.books-topic.fade-in-up:nth-of-type(2) {
  animation-delay: 70ms;
}

.books-topic.fade-in-up:nth-of-type(3) {
  animation-delay: 120ms;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translate3d(0, 24px, 0);
  }

  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

@media (max-width: 1280px) {
  .topic-bubble-left::after,
  .topic-bubble-right::after {
    display: none;
  }

  .mood-buttons {
    gap: 16px;
    margin-top: 36px;
  }

  .mood-button {
    font-size: 20px;
    width: 230px;
  }

  .books-topic {
    margin-top: 82px;
  }

  .books-topic + .books-topic {
    margin-top: 118px;
  }

  .topic-bubbles {
    gap: 20px;
  }

  .topic-bubble-left,
  .topic-bubble-right {
    margin-top: 0;
    width: calc(50% - 10px);
  }

  .topic-bubble-left h2 {
    font-size: 34px;
    line-height: 1.2;
  }

  .topic-bubble-left h3 {
    font-size: 40px;
    line-height: 1.16;
  }

  .topic-bubble-right h4,
  .topic-bubble-right p {
    font-size: 24px;
    line-height: 1.24;
  }

  .books-grid {
    gap: clamp(32px, 6vw, 72px);
    justify-content: flex-start;
  }

  .book-card {
    flex-basis: 232px;
    width: 232px;
  }

  .book-desc {
    font-size: 17px;
    line-height: 1.35;
  }

  .book-btn {
    display: flex;
    font-size: 20px;
    margin-left: auto;
    margin-right: auto;
    width: 198px;
  }

  .books-carousel-arrow-prev {
    left: -10px;
  }

  .books-carousel-arrow-next {
    right: -10px;
  }

  .site-footer {
    padding-left: 32px;
    padding-right: 32px;
  }
}

@media (max-width: 920px) {
  .top-news-inner,
  .contact-strip-inner,
  .header-inner,
  .books-hero,
  .books-topic,
  .books-bottom-cta {
    width: calc(100% - 24px);
  }

  .top-news-right a {
    display: none;
  }

  .contact-strip-inner {
    justify-content: space-between;
  }

  .contact-links {
    gap: 10px;
  }

  .contact-links a {
    font-size: 11px;
  }

  .social-links {
    margin-left: 10px;
  }

  .header-inner {
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 10px;
    min-height: auto;
    padding: 12px 0;
  }

  .brand {
    margin-right: 0;
  }

  .main-nav {
    column-gap: 12px;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    order: 3;
    row-gap: 8px;
    width: 100%;
  }

  .main-nav a {
    font-size: 14px;
    line-height: 18px;
    padding: 2px 0;
  }

  .nav-actions {
    gap: 8px;
    margin-left: auto;
  }

  .btn-cart {
    height: 40px;
    width: 52px;
  }

  .btn-login {
    font-size: 14px;
    height: 40px;
    min-width: 110px;
    padding: 0 12px;
  }

  .books-main {
    padding-top: 60px;
  }

  .hero-title {
    font-size: 31px;
    margin-top: 26px;
  }

  .hero-subtitle {
    font-size: 18px;
    line-height: 1.45;
    margin-top: 14px;
  }

  .mood-buttons {
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 26px;
  }

  .mood-button {
    font-size: 16px;
    height: 68px;
    line-height: 1.2;
    width: calc(50% - 6px);
  }

  .mood-button:last-child {
    width: 100%;
  }

  .books-topic {
    margin-top: 36px;
  }

  .books-topic + .books-topic {
    margin-top: 54px;
  }

  .topic-bubbles {
    align-items: stretch;
    flex-direction: column;
  }

  .topic-bubble-left,
  .topic-bubble-right {
    margin-top: 0;
    min-height: auto;
    padding: 22px 18px;
    width: 100%;
  }

  .topic-bubble-pointer {
    display: none;
  }

  .topic-bubble-left h2 {
    font-size: 28px;
  }

  .topic-bubble-left h3 {
    font-size: 34px;
  }

  .topic-bubble-left .topic-medium {
    font-size: 30px;
  }

  .topic-bubble-right h4,
  .topic-bubble-right p {
    font-size: 20px;
  }

  .topic-tag {
    margin-top: 18px;
  }

  .topic-tag-left {
    margin-left: auto;
    margin-right: auto;
  }

  .books-grid {
    display: flex;
    gap: 22px;
    margin-top: 18px;
    padding-bottom: 16px;
  }

  .books-carousel-arrow {
    height: 38px;
    top: calc(50% + 6px);
    width: 38px;
  }

  .books-carousel-arrow::before {
    height: 10px;
    width: 10px;
  }

  .books-carousel-arrow-prev {
    left: 4px;
  }

  .books-carousel-arrow-next {
    right: 4px;
  }

  .book-card {
    flex: 0 0 min(320px, 82vw);
    width: min(320px, 82vw);
  }

  .book-cover {
    height: auto;
    max-width: 207px;
  }

  .book-desc {
    font-size: 16px;
    line-height: 1.45;
  }

  .book-price {
    font-size: 16px;
  }

  .book-btn {
    display: flex;
    font-size: 18px;
    height: 44px;
    margin-left: auto;
    margin-right: auto;
    width: 190px;
  }

  .books-bottom-cta {
    margin-top: 54px;
  }

  .books-bottom-cta p,
  .books-bottom-cta h2 {
    font-size: 24px;
    letter-spacing: -0.2px;
    line-height: 1.22;
  }

  .books-bottom-cta h2 {
    margin-top: 12px;
  }

  .books-bottom-cta a {
    font-size: 18px;
    height: 52px;
    margin-top: 16px;
    padding: 10px 22px;
  }

  .site-footer {
    padding: 26px 10px;
  }

  .footer-container {
    gap: 24px;
    width: 100%;
  }

  .footer-top {
    grid-template-columns: 1fr;
  }

  .footer-links-grid {
    gap: 20px;
    grid-template-columns: 1fr;
  }

  .footer-bottom {
    display: grid;
    gap: 14px;
    justify-items: center;
    text-align: center;
  }

  .footer-legal {
    flex-wrap: wrap;
    gap: 8px 14px;
    justify-content: center;
  }
}
