@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Playfair+Display:wght@600;700;800&display=swap');


* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}


body {
  font-family: "DM Sans", sans-serif;
  background: #f7f3eb;
  color: #202020;
}


/* NAVBAR */

.navbar {
  height: 78px;
  background: #ffffff;
  border-bottom: 1px solid #e4ded3;

  display: flex;
  align-items: center;
  justify-content: space-between;

  padding: 0 7%;

  position: sticky;
  top: 0;
  z-index: 100;
}


.logo {
  display: flex;
  flex-direction: column;
  line-height: 1;
}


.logo span {
  font-family: "Playfair Display", serif;
  font-size: 28px;
  font-weight: 800;
}


.logo small {
  font-size: 11px;
  letter-spacing: 2px;
  margin-top: 4px;
  color: #777;
}


.nav-links {
  display: flex;
  gap: 30px;
}


.nav-links a {
  color: #333;
  text-decoration: none;
  font-weight: 600;
}


.nav-links a:hover {
  color: #b46a35;
}


.cart-button {
  border: none;
  background: #202020;
  color: white;

  padding: 11px 18px;
  border-radius: 30px;

  cursor: pointer;
  font-weight: 600;
}


#cart-count {
  background: #e8a45b;
  color: #202020;

  border-radius: 50%;
  padding: 2px 7px;
  margin-left: 4px;
}


/* HERO */

.hero {
  min-height: 590px;

  display: flex;
  align-items: center;
  justify-content: space-between;

  padding: 80px 10%;

  background:
    radial-gradient(circle at 80% 40%, #e9d8bd, transparent 30%),
    #f7f3eb;
}


.hero-text {
  max-width: 570px;
}


.small-title {
  color: #a55d2f;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 3px;
  margin-bottom: 15px;
}


.hero h1 {
  font-family: "Playfair Display", serif;
  font-size: clamp(55px, 7vw, 90px);
  line-height: .95;
  margin-bottom: 25px;
}


.hero h1 span {
  color: #b46a35;
}


.hero p {
  font-size: 18px;
  line-height: 1.7;
  color: #666;
  max-width: 500px;
}


.shop-button {
  display: inline-block;

  margin-top: 30px;

  background: #202020;
  color: white;

  padding: 15px 25px;
  border-radius: 30px;

  text-decoration: none;
  font-weight: 700;

  transition: .2s;
}


.shop-button:hover {
  transform: translateY(-3px);
}


/* FAKE BOOKS */

.hero-books {
  width: 390px;
  height: 390px;

  position: relative;
}


.fake-book {
  position: absolute;

  width: 170px;
  height: 235px;

  border-radius: 4px;

  box-shadow: 15px 20px 30px #0002;

  display: flex;
  align-items: center;
  justify-content: center;

  color: white;

  font-family: "Playfair Display", serif;
  font-size: 30px;
  font-weight: bold;
}


.book-one {
  background: #243c32;
  left: 20px;
  top: 70px;
  transform: rotate(-12deg);
}


.book-two {
  background: #b46a35;
  left: 115px;
  top: 35px;
  transform: rotate(5deg);
}


.book-three {
  background: #4d5667;
  left: 205px;
  top: 85px;
  transform: rotate(15deg);
}


/* STORE */

main {
  padding: 100px 8%;
}


.store-header {
  text-align: center;
  max-width: 700px;
  margin: auto;
}


.store-header h2,
.about h2 {
  font-family: "Playfair Display", serif;
  font-size: 48px;
  margin-bottom: 15px;
}


.store-header p {
  color: #777;
  line-height: 1.6;
}


/* SEARCH */

.search-container {
  max-width: 600px;
  margin: 45px auto 25px;
}


.search-container input {
  width: 100%;

  padding: 17px 20px;

  border: 1px solid #ddd;
  border-radius: 30px;

  font-size: 16px;

  outline: none;
}


.search-container input:focus {
  border-color: #b46a35;
}


/* CATEGORY TABS */

.categories {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;

  margin-bottom: 50px;
}


.category {
  border: 1px solid #ddd;
  background: white;

  padding: 11px 20px;

  border-radius: 30px;

  cursor: pointer;

  font-weight: 600;

  transition: .2s;
}


.category:hover {
  border-color: #b46a35;
}


.category.active {
  background: #202020;
  color: white;
  border-color: #202020;
}


/* BOOK GRID */

.book-grid {
  display: grid;

  grid-template-columns:
    repeat(auto-fill, minmax(220px, 1fr));

  gap: 30px;

  max-width: 1200px;
  margin: auto;
}


.book-card {
  background: white;

  border-radius: 12px;

  overflow: hidden;

  box-shadow: 0 8px 25px #0000000c;

  cursor: pointer;

  transition: .25s;
}


.book-card:hover {
  transform: translateY(-8px);

  box-shadow: 0 15px 35px #00000018;
}


.book-card img {
  width: 100%;
  height: 300px;

  object-fit: cover;

  display: block;
}


.book-info {
  padding: 20px;
}


.book-category {
  font-size: 11px;

  color: #a55d2f;

  font-weight: 700;

  text-transform: uppercase;

  letter-spacing: 1px;
}


.book-info h3 {
  font-family: "Playfair Display", serif;

  font-size: 22px;

  margin: 7px 0;
}


.author {
  color: #777;
  font-size: 14px;
}


.price {
  font-size: 18px;

  font-weight: 700;

  margin-top: 15px;
}


/* ABOUT */

.about {
  background: #202020;

  color: white;

  padding: 100px 10%;

  display: flex;
  justify-content: center;
}


.about > div {
  max-width: 800px;
}


.about h2 {
  font-size: 50px;
}


.about p:not(.small-title) {
  color: #cfcfcf;

  line-height: 1.8;

  margin-top: 15px;
}


/* MODALS */

.modal {
  display: none;

  position: fixed;

  inset: 0;

  background: #0009;

  z-index: 500;

  align-items: center;
  justify-content: center;

  padding: 20px;
}


.modal.show {
  display: flex;
}


.modal-box {
  background: white;

  max-width: 800px;
  width: 100%;

  border-radius: 15px;

  padding: 35px;

  display: flex;

  gap: 35px;

  position: relative;
}


.modal-box img {
  width: 270px;
  height: 380px;

  object-fit: cover;

  border-radius: 5px;
}


.modal-info {
  flex: 1;

  display: flex;
  flex-direction: column;
  justify-content: center;
}


.modal-info span {
  color: #a55d2f;

  font-weight: bold;

  font-size: 12px;

  text-transform: uppercase;
}


.modal-info h2 {
  font-family: "Playfair Display", serif;

  font-size: 40px;

  margin: 10px 0;
}


.modal-info p {
  color: #666;

  line-height: 1.6;

  margin-bottom: 15px;
}


.modal-info h3 {
  font-size: 25px;

  margin-bottom: 20px;
}


.close {
  position: absolute;

  right: 18px;
  top: 15px;

  border: none;

  background: none;

  font-size: 30px;

  cursor: pointer;

  z-index: 5;
}


/* BUTTONS */

.add-button,
.checkout-button {
  border: none;

  background: #202020;

  color: white;

  padding: 14px 20px;

  border-radius: 30px;

  cursor: pointer;

  font-weight: 700;
}


.add-button:hover,
.checkout-button:hover {
  background: #b46a35;
}


/* CART */

.cart-box {
  background: white;

  width: 500px;
  max-width: 100%;

  padding: 35px;

  border-radius: 15px;

  position: relative;
}


.cart-box h2 {
  font-family: "Playfair Display", serif;

  font-size: 35px;

  margin-bottom: 25px;
}


.cart-item {
  display: flex;

  justify-content: space-between;

  align-items: center;

  border-bottom: 1px solid #eee;

  padding: 15px 0;
}


.cart-item button {
  border: none;

  background: #eee;

  padding: 5px 9px;

  border-radius: 5px;

  cursor: pointer;
}


.cart-total {
  font-size: 20px;

  font-weight: bold;

  margin: 25px 0;
}


/* FOOTER */

footer {
  background: #111;

  color: white;

  padding: 40px 8%;

  display: flex;

  justify-content: space-between;

  align-items: center;
}


.footer-logo {
  font-family: "Playfair Display", serif;

  font-size: 25px;
}


.footer-logo small {
  display: block;

  font-family: "DM Sans", sans-serif;

  font-size: 10px;

  letter-spacing: 2px;

  color: #aaa;
}


/* MOBILE */

@media (max-width: 750px) {

  .nav-links {
    display: none;
  }


  .hero {
    text-align: center;

    flex-direction: column;

    gap: 50px;
  }


  .hero-books {
    transform: scale(.8);
  }


  .modal-box {
    flex-direction: column;

    align-items: center;

    max-height: 90vh;

    overflow-y: auto;
  }


  .modal-box img {
    width: 200px;
    height: 280px;
  }


  footer {
    flex-direction: column;

    gap: 15px;

    text-align: center;
  }

}
