/* ===================================================== */
/* ====================== HOME PAGE ==================== */
/* ===================================================== */

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

/* ================= BASE ================= */
body {
  font-family: "American Typewriter", serif;
  background-color: #f7efec;
  color: #1f2a44;
}

/* ================= CONTAINER ================= */
.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 32px;
}

/* ================= TOP BAR ================= */
.top-bar {
  width: 100%;
  padding: 24px 0;
}

.top-bar-inner {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
}

/* HOME */
.top-left {
  cursor: pointer;
  transition: transform 0.25s ease;
}


.top-left a,
.book {
  text-decoration: none;
  color: inherit;
}

/* SEARCH BOX */
.search-box {
  justify-self: center;
  display: flex;
  align-items: center;
  width: 260px;
  height: 34px;
  padding: 0 12px;
  border: 2px solid #1f2a44;
  background-color: transparent;
  cursor: pointer;
  transition: transform 0.25s ease;
}

.search-box img {
  height: 18px;
}

/* CART */
.cart-icon {
  cursor: pointer;
  transition: transform 0.25s ease;
}

.cart-icon img {
  height: 22px;
}

/* Hover top menu */
.top-left:hover,
.search-box:hover,
.cart-icon:hover {
  transform: scale(1.1);
}

/* ================= MAIN ================= */
main {
  display: flex;
  flex-direction: column;
}

/* ================= BOOKS SECTION (HOME) ================= */
.books-section {
  padding: 40px 0 12px;
  display: flex;
  justify-content: center;
}

.books-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  max-width: 900px;
}

/* ================= BOOK (HOME) ================= */
.book {
  display: inline-block;           
  justify-content: center;
}

.book img {
  display: block;
  max-width: 100%;
  transition: transform 0.25s ease;
}

/* ESCALA DESKTOP */
.book img { height: 80px; }
.book:nth-child(1) img { height: 60px; }
.book:nth-child(2) img { height: 160px; } 
.book:nth-child(3) img { height: 95px; }
.book:nth-child(6) img,
.book:nth-child(7) img { height: 48px; }

@media (hover: hover) {
  .book:hover img {
    transform: translateX(10px);
  }
}
/* ================= BOOK INNER (SOLUCIÓ SVG) ================= */
.book-inner {
  position: relative;
  z-index: 2;              
  display: flex;
  justify-content: center;
  align-items: center;
}
.books-section,
.books-container {
  position: relative;
  z-index: 1;
}

/* ================= CLAIM ================= */
.claim-section {
  text-align: center;
  padding: 46px 0 48px;
}

.claim-logo {
  display: block;
  margin: 0 auto 6px;
  height: 48px;
}

.claim-section p {
  font-size: 17px;
  opacity: 0.45;
}

/* ================= FOOTER ================= */
.footer {
  background-color: #a9b6c5;
  padding: 28px 0;
}

.footer-icons {
  display: flex;
  justify-content: center;
  gap: 14px;
}

.footer-icons img {
  height: 20px;
}

.footer-icons img {
  height: 20px;
  transition: filter 0.25s ease;
}

.footer-icons img:hover {
  filter: brightness(0) saturate(100%) invert(89%) sepia(24%)
          saturate(361%) hue-rotate(7deg) brightness(98%) contrast(95%);
}


/* ================= TABLET HOME ================= */
@media (max-width: 1023px) {
  .book img { height: 60px; }
  .book:nth-child(1) img { height: 45px; }
  .book:nth-child(2) img { height: 120px; }
  .book:nth-child(3) img { height: 75px; }
  .book:nth-child(6) img,
  .book:nth-child(7) img { height: 36px; }
  .claim-logo { height: 42px; }

  .books-container {
  
  transform-origin: center top;
  margin-top: 100px;
}
.claim-section p {
  font-size: 17px;
  opacity: 0.45;
  margin-bottom: 60px;
}

} 

/* ================= MOBILE HOME ================= */
@media (max-width: 475px) {
  .container { padding: 0 20px; }
  .book img { height: 36px; }
  .book:nth-child(1) img { height: 26px; }
  .book:nth-child(2) img { height: 72px; }
  .book:nth-child(3) img { height: 46px; }
  .book:nth-child(6) img,
  .book:nth-child(7) img { height: 22px; }
  .book:hover img { transform: translateX(6px); }
  .claim-logo { height: 34px; }

  .books-container {
  transform: scale(0.8);          /* ajusta: 0.8 – 1 */
  transform-origin: center top;
}
}

/* ===================================================== */
/* ================= CATALOGUE PAGE ==================== */
/* ===================================================== */

.catalogue-page {
  background-color: #fbf2ee;
  position: relative;
}

/* GRID DE FONDO */
.catalogue-page::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image: url("CSS/svg icons/greed.svg");
  background-repeat: repeat;
  background-size: 800px;
  opacity: 0.3;
  pointer-events: none;
  z-index: -1;
}

/* ================= TITLE ================= */
.catalogue-title {
  text-align: center;
  font-weight: 400;
  font-size: 50px;
  color: #8b2d3b;
  letter-spacing: 2px;
  margin: 80px 0 40px;
}

/* ================= CATEGORIES ================= */
.catalogue-categories {
  background: #1f2a44;
  display: flex;
  justify-content: center;
}

.catalogue-categories ul {
  display: flex;
  gap: 50px;
  padding: 16px 20px;
  list-style: none;
}

.catalogue-categories li {
  font-size: 15px;
  color: #efeda0;
  letter-spacing: 1px;
  cursor: pointer;
  transition: color 0.25s ease;
}

.catalogue-categories li:hover {
  color: #9EAABA;
}

/* ================= GRID ================= */
.catalogue-grid {
  max-width: 1200px;
  margin: 80px auto;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 60px 80px;
  padding: 0 30px;
}

/* ================= ITEM ================= */
.catalogue-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start; 
}

/* IMAGE */
.catalogue-item img {
  width: 80%;
  max-width: 260px;
  margin-bottom: 24px;
  transition: transform 0.25s ease;
}

.catalogue-item img:hover {
  transform: scale(1.05);
}

/* TEXT */
.book-info {
  display: flex;
  flex-direction: column;
  gap: 0; 
}

/* TÍTULO */
.catalogue-item h3 {
  display: block;
  width: 80%;
  max-width: 260px;

  margin: 0px; 
  font-weight: 400;
  font-size: 14px;
  letter-spacing: 1px;
  color: #2A3051;
  line-height: 1.3;

  text-align: left;
  white-space: normal;
  overflow-wrap: break-word;
}

/* AUTOR */
.catalogue-item .author {
  margin-top: -40px;
  font-family: sans-serif;
  font-size: 14px;
  color: #9aa3b2;
}

/* ACTIONS */
.actions {
  margin-top: 50px;
  display: flex;
  align-items: center;
  gap: 50px;
}

.plus-icon {
  font-size: 35px;
  transition: color 0.25s ease;
  cursor: pointer;
  text-decoration: none;
  color: #2A3051;
}

.plus-icon:hover {
  color: #9EAABA;
}

.add-btn {
  background: transparent;
  border: 1px solid #8b2d3b;
  color: #8b2d3b;
  font-size: 13px;
  padding: 6px 22px;
  cursor: pointer;
  transition: all 0.25s ease;
}

.add-btn:hover {
  background: #8b2d3b;
  color: #EFEDA0;
}

.catalogue-main h4 {
  text-align: center;
  font-weight: 400;
  color: #9EAABA;
  margin-bottom: 80px;
  cursor: pointer;
}

.catalogue-main h4:hover {
  transform: scale(1.1);
}

/* ================= TABLET CATALOGUE ================= */
@media (max-width: 1024px) {
  .catalogue-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .catalogue-categories ul {
    flex-wrap: wrap;
    max-width: 600px;
    gap: 24px 40px;
    justify-content: center;
  }
}

/* ================= MOBILE CATALOGUE ================= */
@media (max-width: 600px) {
  .catalogue-grid {
    grid-template-columns: 1fr;
  }

  .catalogue-categories ul {
    display: none;
  }

  .catalogue-categories::after {
    content: "FILTERS";
    padding: 20px 26px;
    color: #EFEDA0;
    cursor: pointer;
    transition: color 0.25s ease;
  }

  .catalogue-categories::after:hover {
    color: #9EAABA;
  }
}





/* ===================================================== */
/* ====================== ABOUT ======================== */
/* ===================================================== */

.about-page {
  background-color: #f7efec;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* ---------- TITLE ---------- */
.about-title {
  margin: 80px 0 40px;
  font-family: "American Typewriter", serif;
  font-weight: 400;
  font-size: 42px;
  letter-spacing: 3px;
  color: #9EAABA;
  text-align: center;
}

/* ---------- TEXT BLOCK ---------- */
.about-text {
  width: 100%;
  background-color: #a9b6c5;
  padding: 100px 20px;

}

.about-text p {
  max-width: 720px;
  margin: 0 auto 28px;
  text-align: center;

  font-family: sans-serif;
  font-size: 18px;
  line-height: 1.6;
  letter-spacing: 1px;

  color: #EFEDA0;
}

.about-text p:last-child {
  margin-bottom: 0;
}

/* ---------- ADDRESS ---------- */
.about-address {
  margin: 50px 20px 80px;
  text-align: center;

  font-family: "American Typewriter", serif;
  font-size: 16px;
  letter-spacing: 1px;

  color: #8b2d3b;
}
 


/* ---------- IMAGE ---------- */
.about-image {
  width: 100%;
  display: flex;
  justify-content: center;
  margin-bottom: 0px;
}

.about-image img {
  width: 100%;
  max-width: 900px;
  height: auto;
  display: block;
}

/* TABLET */

@media (max-width: 1024px) {

  .about-title {
    font-size: 36px;
    margin: 70px 0 36px;
  }

  .about-text {
    padding: 60px 24px;
  }

  .about-text p {
    font-size: 14px;
    max-width: 520px;
  }

  .about-address {
    font-size: 13px;
    margin-bottom: 70px;
    max-width: 520px;
  }

  .about-image img {
    max-width: 760px;
  }
}

/* MOBILE */

@media (max-width: 600px) {

  .about-title {
    font-size: 30px;
    margin: 60px 0 32px;
  }

  .about-text {
    padding: 50px 18px;
    max-width: 340px;
  }

  .about-text p {
    font-size: 12px;
    line-height: 1.55;
    max-width: 100%;
  }

  .about-address {
    font-size: 12px;
    margin: 40px 20px 60px;
    max-width: 340px;
  }


  .about-image img {
    max-width: 100%;
  }
}

/* ==================================================== */
/* ================= COLLECTIONS PAGE ================= */
/* ==================================================== */

.collection-page {
  position: relative;
  background-color: #fbf2ee;
}

/* ================= GRID DE FONS ================= */

.collection-page::before {
  content: "";
  position: fixed;
  inset: 0;

  background-image: url("CSS/svg icons/greed.svg");
  background-repeat: repeat;
  background-size: 800px;

  opacity: 0.3;
  pointer-events: none;
  z-index: -1;
}

/* ================= TITLE ================= */

.collection-title {
  text-align: center;
  font-size: 50px;
  letter-spacing: 2px;
  color: #9aa3b2;
  margin: 80px 0 40px;
  font-weight: 400; 
}

/* ================= SECTION ================= */

.collection-section {
  margin-bottom: 100px;
}

/* ================= COLLECTION BAR ================= */

.collection-bar {
  background: #b7c3cf;
  text-align: center;
  padding: 16px 0;

  font-family: sans-serif;
  font-size: 15px;
  letter-spacing: 1px;
  color: #1f2a44;
  font-weight: 400;
}

/* ================= ROW (HORIZONTAL SCROLL) ================= */

.collection-row {
  display: flex;
  gap: 80px;
  padding: 60px 60px;

  overflow-x: auto;
  scroll-snap-type: x mandatory;

  scroll-padding-left: 120px;
}


.collection-row::-webkit-scrollbar {
  display: none;
}
.collection-row {
  scrollbar-width: none;
}

/* ================= ITEM ================= */

.collection-row .catalogue-item {
  flex: 0 0 260px;          
  display: flex;
  flex-direction: column;
  scroll-snap-align: start;
}

/* ================= IMAGE ================= */

.collection-row .catalogue-item img {
  width: 100%;
  max-width: 240px;
  transition: transform 0.25s ease;
}

.collection-row .catalogue-item img:hover {
  transform: scale(1.05);
}

/* ================= TEXT ================= */

.collection-row .book-info {
  margin-bottom: 22px;
}

/* ================= ACTIONS (+ / ADD) ================= */

.collection-row .actions {
  margin-top: auto;
  display: flex;
  align-items: center;
  gap: 60px;
}

/* ================= TABLET COLLECTIONS================= */

@media (max-width: 1024px) {

  .collection-title {
    font-size: 42px;
  }

  .collection-row {
    gap: 60px;
    padding: 50px 40px;
    scroll-padding-left: 80px;
  }

  .collection-row .catalogue-item {
    flex: 0 0 240px;
  }
}

/* ================= MOBILE COLLECTIONS ================= */

@media (max-width: 600px) {

  .collection-title {
    font-size: 34px;
  }

  .collection-row {
    gap: 40px;
    padding: 40px 20px;
    scroll-padding-left: 40px;
  }

  .collection-row .catalogue-item {
    flex: 0 0 220px;
  }

  .collection-row .actions {
    gap: 40px;
  }
}

/* ==================================================== */
/* ==================== MAS PAGE ====================== */
/* ==================================================== */

.mas-page {
  background-color: #fbf2ee;
  font-family: "American Typewriter", serif;
  color: #1f2a44;
  line-height: 1.5;
}

/* ================= BACK BUTTON ================= */

.mas-page .back-btn {
  display: inline-block;
  margin: 40px;
  font-size: 40px;
  text-decoration: none;
  color: #1f2a44;
}


/* ================= BOOK + SYNOPSIS ================= */

.book-detail {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 60px 120px;

  display: grid;
  grid-template-columns: 360px 360px;
  column-gap: 50px;
  justify-content: center;
  align-items: flex-start;

}

/* ================= BOOK COVER ================= */

.book-cover {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.book-cover img {
  width: 100%;
  max-width: 360px;
  display: block;
  margin-bottom: 30px;
}

/* BUY BUTTON */

.buy-btn {
  background: transparent;
  border: 1px solid #8b2d3b;
  color: #8b2d3b;
  font-family: "American Typewriter", serif;
  font-size: 12px;
  letter-spacing: 1px;
  padding: 10px 34px;
  cursor: pointer;
  transition: all 0.25s ease;
}

.buy-btn:hover {
  background-color: #8b2d3b;
  color: #EFEDA0;
}

/* ================= BOOK INFO ================= */

.book-info {
  width: 360px;
}

.book-info h1 {
  font-size: 34px;
  font-weight: 400;
  margin-bottom: 14px;
}

.book-info h3 {
  font-size: 14px;
  font-weight: 400;
  letter-spacing: 1px;
  margin-bottom: 48px;
}

.book-info h4 {
  font-size: 13px;
  letter-spacing: 1px;
  margin-bottom: 18px;
  font-family: sans-serif;
  font-weight: 400;
}

.book-info p {
  font-size: 16px;
  line-height: 1.6;
  font-family: sans-serif;
}


/* ================= AUTHOR SECTION =================== */

.author-section {
  background: #a9b6c5;
  padding: 100px 60px;

  display: grid;
  grid-template-columns: 360px 360px;
  gap: 50px;
  justify-content: center;
  align-items: flex-start;
}

.author-photo img {
  width: 100%;
  max-width: 360px;
  display: block;
}

.author-text h2 {
  font-size: 36px;
  font-weight: 400;
  color: #EFEDA0;
  margin-bottom: 8px;
}

.author-text .author-role {
  display: block;
  font-size: 14px;
  letter-spacing: 1px;
  margin-bottom: 36px;
}

.author-text h4 {
  font-size: 13px;
  letter-spacing: 1px;
  margin-bottom: 18px;
  font-family: sans-serif;
  font-weight: 400;
}

.author-text p {
  font-size: 16px;
  line-height: 1.6;
  font-family: sans-serif;
  max-width: 360px;
}


/* ================= DESIGNER SECTION ================= */

.designer-section {
  background: #f1f2a6;
  padding: 120px 60px;
}

.designer-grid {
  max-width: 1200px;
  margin: 0 auto;

  display: grid;
  grid-template-columns: 260px 1fr 120px;
  column-gap: 60px;
  align-items: center;
}

/* LEFT */

.designer-left h3 {
  font-size: 20px;
  font-weight: 400;
  margin-bottom: 8px;
  color: #8b2d3b;
}

.designer-left span {
  font-size: 13px;
  letter-spacing: 1px;
  font-family: sans-serif;
}

/* CENTER */

.designer-center p {
  font-size: 16px;
  line-height: 1.7;
  margin: 0;
  font-family: sans-serif;
}

/* RIGHT */

.designer-right {
  text-align: right;
}

.more-link {
  font-size: 13px;
  letter-spacing: 1px;
  color: #8b2d3b;
  text-decoration: none;
  font-family: sans-serif;
}


/*  TABLET MAS */

@media (max-width: 1024px) {

  /* BOOK */
  .book-detail {
    grid-template-columns: 1fr;
    gap: 60px;
    padding: 40px 40px 80px;
    text-align: center;
  }

  .book-info {
    width: 100%;
     max-width: 520px;   
    margin-left: auto;
    margin-right: auto;
  }

  /* AUTHOR */
  .author-section {
    grid-template-columns: 1fr;
    gap: 60px;
    padding: 80px 40px;
    text-align: center;
  }

  .author-photo img {
    margin: 0 auto;
  }

  .author-text {
    text-align: center;
  }

  .author-text p {
    margin-left: auto;
    margin-right: auto;
    grid-template-columns: 1fr;
    
  }

  /* DESIGNER */
  .designer-grid {
    grid-template-columns: 1fr;
    row-gap: 40px;
    text-align: center;
    margin-left: auto;
    margin-right: auto;
    
  }

  .designer-right {
    text-align: center;
  }
}

/* MOBILE MAS */

@media (max-width: 600px) {

  .mas-page .back-btn {
    margin: 24px;
  }

  /* BOOK */
  .book-detail {
    padding: 20px 20px 60px;
  }

  .book-info h1 {
    font-size: 26px;
  }

  .book-info p {
    font-size: 13px;
  }

  /* AUTHOR */
  .author-section {
    padding: 60px 20px;
  }

  .author-text h2 {
    font-size: 30px;
  }

  .author-text p {
    font-size: 13px;
    margin-left: auto;
    margin-right: auto;
  }

  /* DESIGNER */
  .designer-section {
    padding: 80px 20px;
  }

  .designer-grid {
    row-gap: 32px;
  }
}


/* HOVER SCALE */

/* BACK ICON < */
.mas-page .back-btn {
  transition: transform 0.25s ease;
}

.mas-page .back-btn:hover {
  transform: scale(1.1);
}

/* MORE LINK (DESIGNER SECTION) */
.more-link {
  display: inline-block; /* necesario para transform */
  transition: transform 0.25s ease;
}

.more-link:hover {
  transform: scale(1.1);
}


