/* ==========================================================================
   Books Grid & Detail View - JooHee Yoon Minimal Aesthetic
   ========================================================================== */

/* Books 3-Column Grid */
#books-grid-wrapper,
#works-grid-wrapper {
  margin: 0 var(--page-margin);
}

.minimal-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  column-gap: 3.5rem;
  row-gap: 4.5rem;
  margin-bottom: 5rem;
}

.book-item,
.work-item {
  display: flex;
  flex-direction: column;
  cursor: pointer;
  position: relative;
}

.book-thumb-wrapper,
.work-thumb-wrapper {
  width: 100%;
  aspect-ratio: 3 / 4;
  background-color: #fafafa;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
}

.book-thumb-wrapper img,
.work-thumb-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: opacity 0.25s ease, transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.book-item:hover .book-thumb-wrapper img,
.work-item:hover .work-thumb-wrapper img {
  opacity: 0.85;
  transform: scale(1.015);
}

.book-caption,
.work-caption {
  margin-top: 1.25rem;
  font-family: var(--font-en);
}

.book-group-tag {
  display: block;
  font-family: var(--font-en);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-light);
  margin-bottom: 4px;
}

.book-title {
  font-family: var(--font-ko);
  font-size: 14.5px;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 3px;
  letter-spacing: -0.01em;
}

.work-title {
  font-family: var(--font-en);
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: 0.05em;
  margin-top: 2px;
}

.book-sub,
.work-sub {
  font-size: 12px;
  color: var(--text-light);
  letter-spacing: 0.02em;
}

/* ==========================================================================
   Book Detail View (JooHee Yoon /pages/books/ style)
   ========================================================================== */
.book-detail-container {
  margin: 0 var(--page-margin) 6rem var(--page-margin);
}

.back-nav {
  margin-bottom: 2.5rem;
}

.back-nav button {
  font-family: var(--font-en);
  font-size: 13.5px;
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0;
  transition: color 0.2s ease;
}

.back-nav button:hover {
  color: var(--text-primary);
}

.detail-main-layout {
  display: grid;
  grid-template-columns: minmax(320px, 440px) 1fr;
  gap: 4.5rem;
  align-items: flex-start;
  margin-bottom: 5rem;
}

.detail-cover {
  width: 100%;
  background-color: #fafafa;
}

.detail-cover img {
  width: 100%;
  height: auto;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
}

.detail-info {
  font-family: var(--font-en);
}

.detail-title {
  font-family: var(--font-ko);
  font-size: 26px;
  font-weight: 600;
  margin-bottom: 6px;
  letter-spacing: -0.02em;
}

.detail-title-en {
  font-size: 15px;
  color: var(--text-light);
  font-style: italic;
  margin-bottom: 2rem;
}

.detail-meta {
  font-size: 13.5px;
  color: var(--text-muted);
  line-height: 1.8;
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--line-color);
}

.detail-meta-row {
  display: flex;
  margin-bottom: 4px;
}

.detail-meta-label {
  width: 90px;
  color: var(--text-light);
  font-size: 12.5px;
}

.detail-meta-val {
  color: var(--text-primary);
}

.detail-desc {
  font-family: var(--font-ko);
  font-size: 14.5px;
  line-height: 1.9;
  color: #333333;
  margin-bottom: 2rem;
}

.detail-desc p {
  margin-bottom: 1rem;
}

/* Artist Statement / Commentary Box */
.artist-statement-box {
  margin-top: 2rem;
  padding: 1.8rem 2rem;
  background-color: #fafafa;
  border-left: 3px solid #222222;
  font-family: var(--font-ko);
}

.artist-statement-label {
  font-family: var(--font-en);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-primary);
  margin-bottom: 0.8rem;
  display: block;
}

.artist-statement-text {
  font-size: 14px;
  line-height: 1.9;
  color: #2c2c2c;
  white-space: pre-line;
}

/* Edit Slot Placeholder for Future Customization */
.author-notes-slot {
  margin-top: 2rem;
  padding: 1.5rem;
  background-color: #fdfdfd;
  border: 1px dashed #e0e0e0;
  border-radius: 4px;
  font-family: var(--font-ko);
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.7;
}

.author-notes-slot .slot-badge {
  display: inline-block;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #888888;
  margin-bottom: 6px;
  font-weight: 600;
}

/* Inner Page Spreads Showcase */
.detail-spreads-section {
  margin-top: 4.5rem;
  border-top: 1px solid var(--line-color);
  padding-top: 4rem;
}

.spreads-heading {
  font-family: var(--font-en);
  font-size: 13px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-light);
  margin-bottom: 2.5rem;
  text-align: center;
}

.spread-gallery {
  display: flex;
  flex-direction: column;
  gap: 4rem;
}

.spread-item {
  width: 100%;
}

.spread-item img {
  width: 100%;
  height: auto;
  display: block;
  background-color: #fcfcfc;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.04);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.spread-item img:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.07);
}

.spread-caption {
  margin-top: 1rem;
  font-size: 13px;
  color: var(--text-muted);
  font-family: var(--font-ko);
  text-align: center;
  letter-spacing: -0.01em;
}

.spread-placeholder-box {
  width: 100%;
  aspect-ratio: 16 / 9;
  background-color: #f9f9f9;
  border: 1px dashed #d8d8d8;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: #888888;
  font-family: var(--font-ko);
  font-size: 13px;
  margin-bottom: 2.5rem;
  transition: border-color 0.2s ease;
}

.spread-placeholder-box:hover {
  border-color: #999999;
}

.spread-placeholder-box span.icon {
  font-size: 26px;
  opacity: 0.7;
}

/* Responsive Grid */
@media screen and (max-width: 1024px) {
  .minimal-grid {
    grid-template-columns: repeat(2, 1fr);
    column-gap: 2.5rem;
    row-gap: 3.5rem;
  }
}

@media screen and (max-width: 768px) {
  .minimal-grid {
    grid-template-columns: 1fr;
    row-gap: 3rem;
  }

  .detail-main-layout {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }
}

/* Lightbox Modal for Artworks */
.artwork-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.artwork-modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.artwork-modal-container {
  max-width: 90vw;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
}

.artwork-modal-img {
  max-width: 100%;
  max-height: 80vh;
  object-fit: contain;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
}

.artwork-modal-caption {
  margin-top: 1.25rem;
  text-align: center;
  font-family: var(--font-en);
}

.artwork-modal-title {
  font-family: var(--font-ko);
  font-size: 16px;
  font-weight: 500;
  color: var(--text-primary);
}

.artwork-modal-sub {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 4px;
}

.artwork-modal-close {
  position: absolute;
  top: -45px;
  right: 0;
  background: none;
  border: none;
  font-size: 32px;
  font-weight: 300;
  cursor: pointer;
  color: var(--text-primary);
  line-height: 1;
}
