/* ================= BOOKS PAGE SPECIFIC ================= */

.section-title{
  margin:0 0 16px 0;
  font-family:'Cormorant Garamond',serif;
  font-size:48px;
  line-height:1.05;
  font-weight:600;
  text-align:center;
  letter-spacing:.02em;
}

.section-intro{
  max-width:68ch;
  margin:0 auto 34px auto;
  color:var(--muted);
  line-height:1.75;
  text-align:center;
  font-size:16px;
}

/* HERO WITH SLIDESHOW */
.hero{
  position: relative;
  overflow: hidden;
  min-height: 720px;
  display: flex;
  align-items: center;
  color: #f6f2ec;
  background: #1b1716;
}

.hero-slideshow{
  position: absolute;
  inset: 0;
  z-index: 0;
}

.slide{
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 1.2s ease-in-out;
  transform: scale(1.03);
}

.slide.active{
  opacity: 1;
}

.hero-overlay{
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(90deg, rgba(20,16,14,0.82) 0%, rgba(20,16,14,0.65) 45%, rgba(20,16,14,0.55) 100%),
    linear-gradient(180deg, rgba(0,0,0,0.18) 0%, rgba(0,0,0,0.35) 100%);
}

.hero-inner{
  position: relative;
  z-index: 2;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 100px 20px 90px 20px;
  width: 100%;
}

.hero-inner.single-column{
  display: block;
}

.hero-copy{
  max-width: 620px;
}

.hero-kicker{
  display:inline-block;
  margin-bottom:14px;
  padding:8px 12px;
  border:1px solid rgba(255,255,255,.20);
  border-radius:999px;
  font-size:13px;
  letter-spacing:.08em;
  text-transform:uppercase;
  background:rgba(255,255,255,.06);
}

.hero-title{
  font-family:'Cormorant Garamond',serif;
  font-size:64px;
  font-weight:600;
  line-height:1.02;
  margin:0 0 18px 0;
  letter-spacing:.02em;
}

.hero-sub{
  margin:0 0 26px 0;
  font-size:17px;
  line-height:1.75;
  color:rgba(255,255,255,.92);
  max-width:54ch;
}

.hero-actions{
  display:flex;
  gap:14px;
  flex-wrap:wrap;
}

@media(max-width: 820px){
  .hero{
    min-height: 620px;
  }

  .hero-title{
    font-size: 46px;
  }

  .hero-inner{
    padding: 80px 20px;
  }
}

@media(max-width: 680px){
  .hero-title{
    font-size: 40px;
  }

  .hero-actions{
    flex-direction: column;
    align-items: stretch;
  }

  .hero-actions .btn{
    width: 100%;
  }
}

/* BOOKS SECTION */
.books-section{
  background:var(--cream);
}

.books-carousel{
  position:relative;
  display:flex;
  align-items:center;
  gap:14px;
}

.books-viewport{
  overflow:hidden;
  width:100%;
}

.books-track{
  display:flex;
  gap:24px;
  scroll-snap-type:x mandatory;
  scroll-behavior:smooth;
}

.book-card{
  flex:0 0 calc((100% - 48px) / 3);
  background:rgba(255,255,255,.52);
  border:1px solid var(--line);
  border-radius:20px;
  padding:18px;
  box-shadow:var(--shadow);
  transition:transform .25s ease, box-shadow .25s ease, border-color .25s ease;
  cursor:pointer;
  position:relative;
  overflow:hidden;
  scroll-snap-align:start;
}

.carousel-btn{
  width:42px;
  height:42px;
  border:none;
  border-radius:50%;
  background:#1f1b1a;
  color:#fff;
  font-size:22px;
  line-height:1;
  cursor:pointer;
  display:flex;
  align-items:center;
  justify-content:center;
  flex-shrink:0;
  transition:.2s ease;
}

.carousel-btn:hover{
  background:var(--accent);
  transform:translateY(-1px);
}

.carousel-btn:disabled{
  opacity:.35;
  cursor:not-allowed;
  transform:none;
}

.carousel-dots{
  margin-top:16px;
  display:flex;
  justify-content:center;
  gap:8px;
}

.carousel-dots button{
  width:10px;
  height:10px;
  border-radius:50%;
  border:none;
  background:rgba(36,31,30,.25);
  cursor:pointer;
  padding:0;
}

.carousel-dots button.active{
  background:var(--accent);
}

.book-card::before{
  content:"";
  position:absolute;
  inset:0;
  background:linear-gradient(180deg, rgba(255,255,255,.08), transparent 35%);
  pointer-events:none;
}

.book-card:hover{
  transform:translateY(-8px);
  box-shadow:var(--shadow-strong);
  border-color:rgba(182,122,60,.22);
}

.book-cover-wrap{
  border-radius:16px;
  overflow:hidden;
  border:1px solid rgba(0,0,0,.08);
  background:#f1ece4;
  margin-bottom:16px;
  position:relative;
}

.book-cover-wrap img{
  width:100%;
  aspect-ratio: 4 / 5.6;
  object-fit:cover;
  transition:transform .35s ease;
}

.book-card:hover .book-cover-wrap img{
  transform:scale(1.035);
}

.book-card h3{
  margin:0 0 8px 0;
  font-family:'Cormorant Garamond',serif;
  font-size:34px;
  line-height:1.02;
  font-weight:600;
}

.book-author{
  margin:0 0 10px 0;
  color:#6d5b4f;
  font-weight:600;
  font-size:14px;
}

.book-text{
  margin:0 0 18px 0;
  color:var(--muted);
  line-height:1.7;
  font-size:14px;
}

.book-actions{
  display:flex;
  gap:12px;
  flex-wrap:wrap;
}

.book-open{
  min-width:130px;
}

/* COLLECTION NOTE */
.collection-note{
  margin-top:34px;
  background:rgba(255,255,255,.7);
  border:1px solid var(--line);
  border-radius:20px;
  padding:24px;
  box-shadow:var(--shadow);
  text-align:center;
}

.collection-note h3{
  margin:0 0 10px 0;
  font-family:'Cormorant Garamond',serif;
  font-size:34px;
  font-weight:600;
}

.collection-note p{
  margin:0;
  color:var(--muted);
  line-height:1.7;
  max-width:70ch;
  margin-inline:auto;
}

/* MODAL */
.modal{
  display:none;
  position:fixed;
  inset:0;
  z-index:120;
  background:rgba(15,12,11,.72);
  padding:28px 18px;
  overflow:auto;
}

.modal.show{
  display:block;
  animation:fadeIn .3s ease;
}

.modal-dialog{
  max-width:980px;
  margin:48px auto;
  background:linear-gradient(180deg, #f8f4ed 0%, #efe8dc 100%);
  border-radius:24px;
  border:1px solid rgba(36,31,30,.10);
  box-shadow:0 24px 60px rgba(0,0,0,.26);
  overflow:hidden;
  position:relative;
}

.modal-close{
  position:absolute;
  top:14px;
  right:16px;
  width:42px;
  height:42px;
  border:none;
  border-radius:50%;
  background:rgba(36,31,30,.08);
  color:#1b1b1b;
  font-size:24px;
  line-height:1;
  cursor:pointer;
  z-index:2;
  transition:.2s ease;
}

.modal-close:hover{
  background:rgba(182,122,60,.18);
  transform:translateY(-1px);
}

.modal-body{
  display:grid;
  grid-template-columns:1.05fr .95fr;
  gap:0;
}

.modal-gallery{
  padding:34px 26px 30px 30px;
  background:
    radial-gradient(circle at top left, rgba(182,122,60,.08), transparent 54%),
    rgba(255,255,255,.42);
  border-right:1px solid rgba(36,31,30,.08);
}

.modal-gallery h3{
  margin:0 0 18px 0;
  font-family:'Cormorant Garamond',serif;
  font-size:34px;
  font-weight:600;
  color:var(--ink);
}

.modal-covers{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:18px;
}

.modal-cover-card{
  background:#fff;
  border:1px solid rgba(36,31,30,.08);
  border-radius:18px;
  padding:14px;
  box-shadow:var(--shadow);
}

.modal-cover-card img{
  width:100%;
  aspect-ratio:4 / 5.8;
  object-fit:cover;
  border-radius:12px;
}

.cover-label{
  margin:12px 0 0 0;
  font-size:13px;
  font-weight:600;
  color:#6d5b4f;
  text-align:center;
  letter-spacing:.04em;
  text-transform:uppercase;
}

.modal-text{
  padding:34px 34px 34px 28px;
  display:flex;
  flex-direction:column;
  justify-content:center;
}

.modal-kicker{
  display:inline-block;
  margin-bottom:10px;
  font-size:13px;
  letter-spacing:.08em;
  text-transform:uppercase;
  color:#7c5e46;
  font-weight:600;
}

.modal-title{
  margin:0 0 10px 0;
  font-family:'Cormorant Garamond',serif;
  font-size:52px;
  line-height:1;
  font-weight:600;
}

.modal-author{
  margin:0 0 18px 0;
  color:#6d5b4f;
  font-weight:600;
  font-size:15px;
}

.modal-desc{
  margin:0 0 22px 0;
  color:var(--muted);
  line-height:1.8;
  font-size:15px;
}

.book-meta{
  display:grid;
  gap:12px;
  margin-bottom:22px;
}

.meta-box{
  background:rgba(255,255,255,.66);
  border:1px solid rgba(36,31,30,.08);
  border-radius:14px;
  padding:14px 16px;
}

.meta-label{
  display:block;
  font-size:12px;
  text-transform:uppercase;
  letter-spacing:.08em;
  color:#7c5e46;
  margin-bottom:6px;
  font-weight:600;
}

.meta-value{
  font-size:15px;
  color:#2a211d;
}

.price{
  font-family:'Cormorant Garamond',serif;
  font-size:38px;
  font-weight:600;
  margin:0 0 18px 0;
  color:#2a211d;
}

.modal-actions{
  display:flex;
  gap:12px;
  flex-wrap:wrap;
  margin-top:8px;
}

/* PLACEHOLDER BACK COVER */
.placeholder-back{
  width:100%;
  aspect-ratio:4 / 5.8;
  border-radius:12px;
  border:1px solid rgba(36,31,30,.08);
  background:
    linear-gradient(180deg, rgba(182,122,60,.10), rgba(182,122,60,.03)),
    linear-gradient(135deg, #f4eee3 0%, #e8dece 100%);
  display:flex;
  flex-direction:column;
  justify-content:space-between;
  padding:20px;
  color:#4b3d33;
}

.placeholder-top{
  font-family:'Cormorant Garamond',serif;
  font-size:30px;
  line-height:1;
  font-weight:600;
}

.placeholder-copy{
  font-size:14px;
  line-height:1.7;
  color:#6f6053;
}

.placeholder-bottom{
  font-size:12px;
  letter-spacing:.08em;
  text-transform:uppercase;
  color:#7c5e46;
  font-weight:600;
}

/* REVEAL ANIMATION */
.reveal{
  opacity:0;
  transform:translateY(24px);
  transition:opacity .55s ease, transform .55s ease;
}

.reveal.show{
  opacity:1;
  transform:translateY(0);
}

@keyframes fadeIn{
  from{opacity:0;}
  to{opacity:1;}
}

/* RESPONSIVE */
@media(max-width:980px){
  .book-card{ flex:0 0 calc((100% - 24px) / 2); }

  .hero-title{
    font-size:54px;
  }

  .modal-body{
    grid-template-columns:1fr;
  }

  .modal-gallery{
    border-right:none;
    border-bottom:1px solid rgba(36,31,30,.08);
  }
}

@media(max-width:820px){
  .hero-inner{
    grid-template-columns:1fr;
    padding:68px 20px;
  }

  .hero-title{
    font-size:46px;
  }

  .modal-dialog{
    margin:22px auto;
  }
}

@media(max-width:680px){
  .book-card{ flex:0 0 100%; }

  .books-carousel{ gap:10px; }

  .carousel-btn{
    width:36px;
    height:36px;
    font-size:18px;
  }

  .hero-actions,
  .book-actions,
  .modal-actions{
    flex-direction:column;
    align-items:stretch;
  }

  .btn{
    width:100%;
  }

  .section-title{
    font-size:38px;
  }

  .hero-title{
    font-size:40px;
  }

  .modal-covers{
    grid-template-columns:1fr;
  }

  .modal-gallery{
    padding:26px 18px;
  }

  .modal-text{
    padding:28px 20px 28px 20px;
  }

  .modal-title{
    font-size:40px;
  }
}

/* ================= DECORATIVE ELEMENTS ================= */
.books-section {
  position: relative;
}

.decoration {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  opacity: 0.7;
  pointer-events: none;
  z-index: 1;
}

.decoration img {
  display: block;
  width: 100%;
  height: auto;
}

.decoration-left {
  left: -60px;
  width: 120px;
  top: 35%;
}

.decoration-right {
  right: -60px;
  width: 140px;
  top: 55%;
  transform: translateY(-50%) scaleX(-1);
}

@media (max-width: 1200px) {
  .decoration-left {
    left: -40px;
    width: 100px;
  }

  .decoration-right {
    right: -40px;
    width: 110px;
  }
}

@media (max-width: 980px) {
  .decoration-left,
  .decoration-right {
    opacity: 0.4;
  }

  .decoration-left {
    left: -30px;
    width: 80px;
  }

  .decoration-right {
    right: -30px;
    width: 90px;
  }
}

@media (max-width: 768px) {
  .decoration-left,
  .decoration-right {
    display: none;
  }
}
