@charset "utf-8";

/* ========================================================== */
/* ===== INDEX PAGE - AND Publishing Base =================== */
/* ========================================================== */

/* --- News Ticker（新書預告，垂直跑馬燈） --- */
.and-ticker-wrap {
  max-width: 1200px;
  width: 100%;
  margin: 30px auto;
  padding: 0 10px;
  box-sizing: border-box;
}
.ticker-section {
  display: flex;
  align-items: stretch;
  height: 75px;
  border: 1px solid #e4e4e4;
  border-radius: 24px;
  background: #ffffff;
  overflow: hidden;
  position: relative;
  z-index: 10;
  box-sizing: border-box;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.12), 0 2px 6px rgba(0, 0, 0, 0.06);
}
.ticker-label {
  flex: 0 0 100px;
  background: #3c3c3c;
  color: #ffffff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 20px;
  font-size: 15px;
  font-weight: normal;
  letter-spacing: 2px;
  white-space: nowrap;
}
.ticker-label-icon {
  display: block;
  font-size: 20px;
}
.ticker-viewport {
  flex: 1;
  min-width: 0;
  height: 100%;
  overflow: hidden;
  position: relative;
}
.ticker-list {
  list-style: none;
  margin: 0;
  padding: 0;
  position: relative;
  top: 0;
}
.ticker-item {
  display: flex;
  align-items: stretch;
  width: 100%;
  box-sizing: border-box;
}
.ticker-content {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 28px;
  overflow: hidden;
  background: #ffffff;
  min-width: 0;
}
.ticker-bullet {
  color: #1a1a1a;
  flex-shrink: 0;
}
.ticker-text {
  color: #333333;
  font-size: 15px;
  letter-spacing: 1px;
  line-height: 1.4;
  display: block;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  min-width: 0;
  text-decoration: none;
  transition: color 0.2s ease;
}
.ticker-text:hover {
  color: #f58220;
  text-decoration: none;
}
.ticker-more {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
  height: 32px;
  padding: 0 15px 0 20px;
  margin: auto 18px auto 0;
  background: #ffffff;
  color: #333333;
  border: 1px solid #bfbfbf;
  border-radius: 999px;
  font-size: 12px;
  letter-spacing: 0.5px;
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.ticker-more:hover {
  background: #333333;
  color: #ffffff;
  border-color: #333333;
  text-decoration: none;
}

/* --- Common Section Title --- */
.and-section-title {
  text-align: center;
  margin-bottom: 32px;
}
.and-section-title .en-title {
  font-family: "Marcellus", "Noto Serif HK", serif;
  font-style: normal;
  color: #fc8f4e;
  font-size: 34px;
  display: block;
  margin-bottom: 15px;
  letter-spacing: 2px;
  line-height: 1.2;
}
.and-section-title h2 {
  font-size: 26px;
  font-weight: normal;
  color: #222;
  letter-spacing: 3px;
  margin: 0;
}

/* 可選：大標題下方置中直灰線（有放 span.title-vline 才顯示） */
.and-section-title .title-vline {
  display: block;
  width: 1px;
  height: 60px;
  margin: 16px auto 0;
  background: #c8c8c8;
}

/* --- 前台共用 UI 按鈕：樣式定義於 css_main.css --- */

/* --- New Book Release (新書快報) --- */
.and-books-section {
  background: #fff;
  padding: 50px 0 90px;
}

/* 標題 + 控制列：垂直排列，各佔一行 */
.and-books-header {
  display: flex;
  flex-direction: column;
  margin-bottom: 28px;
}
.and-books-header .and-section-title {
  text-align: left;
  margin-bottom: 24px;
  /* border-left: 3px solid #f58220; */
  padding-left: 12px;
}
.and-books-header .and-section-title .en-title { font-size: 26px; }
.and-books-header .and-section-title h2 { font-size: 28px; }

/* 第二列：左箭頭 + 右 more */
.and-books-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 15px;
  border-left: 1px solid #e1e1e1;
}

.and-books-nav {
  display: flex;
  gap: 10px;
}

/* 只有一頁時的左右鈕：變淡並停用，但不隱藏。
   .and-books-controls 是 justify-content: space-between，只剩一個子元素時
   「更多新書」會被推到左邊，所以不能用 display:none。 */
.and-books-nav .and-ui-btn.is-disabled {
  opacity: 0.3;
  cursor: default;
  pointer-events: none;
}

/* 書籍網格：5 欄 × 2 列 = 10 本／頁（與 paged_fade_grid 預設 page-size=10 同步） */
.and-books-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 50px 22px;
}
#booksSliderWrap {
  min-height: 1px; /* 給 fadeOut／fadeIn 時避免高度瞬間塌掉過多抖動 */
}

/* 書籍卡片（對齊 publisher .and-book-list-card：3:4、contain、陰影） */
.and-book-card {
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  display: block;
}
.and-book-card:hover .book-cover-wrap {
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.14);
  transform: translateY(-3px);
}

.and-book-card .book-cover-wrap {
  width: 100%;
  aspect-ratio: 3 / 4;
  position: relative;
  overflow: hidden;
  background: #ffffff;
  border-radius: 16px;
  border: 1px solid #e9e9e4;
  padding: 10px;
  box-sizing: border-box;
  margin-bottom: 15px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  transition: box-shadow 0.25s ease, transform 0.25s ease;
}
.and-book-card .book-cover-wrap img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  transition: transform 0.3s ease;
}
.and-book-card:hover .book-cover-wrap img { transform: scale(1.04); }

.and-book-card .book-title {
  font-size: 15px;
  font-weight: normal;
  margin: 0;
  padding: 0;
  color: #1f1f1f;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  letter-spacing: 0;
  transition: color 0.2s ease;
}
.and-book-card .book-desc {
  display: none;
}

/* --- Events Section (活動專區) --- */
.and-events-section {
  background-color: #f5f7f6;
  background-image: url(../../images/events-top-bg.png), url(../../images/events-bottom-bg.png);
  background-position: center top, center bottom;
  background-repeat: no-repeat, no-repeat;
  background-size: 100% auto, 100% auto;
  padding: 20px 0 110px;
}
.and-events-header {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 28px;
  flex-wrap: wrap;
  gap: 12px;
}
.and-events-header .and-section-title {
  padding-left: 0;
  margin-bottom: 0;
  text-align: center;
}

.and-events-owl {
  width: 100%;
}
.and-events-owl .owl-stage-outer {
  overflow: hidden;
}
.and-events-owl .item {
  padding: 4px 0 8px;
  box-sizing: border-box;
}
/* 下方置中導覽列（箭頭 + 更多活動） */
.and-events-nav {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 18px;
  margin-top: 36px;
}
.and-events-nav-arrows {
  display: flex;
  gap: 10px;
}

/* --- Imprint (出版社品牌) --- */
.and-imprint-section {
  background: #ffffff;
  padding: 60px 0 80px;
}

/* Owl 輪播外層 */
.and-imprint-slider-wrap {
  position: relative;
  padding: 0 50px;
}
.and-imprint-owl {
  position: relative;
}
.and-imprint-owl .owl-stage-outer {
  padding: 0 0 28px;
}
.and-imprint-owl .item {
  padding: 0 8px;
}

/* Owl 左右導覽：與新書快報方塊按鈕同款 */
.and-imprint-owl .owl-nav {
  margin: 0;
}
.and-imprint-owl .owl-nav button.owl-prev,
.and-imprint-owl .owl-nav button.owl-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 46px;
  height: 46px;
  margin: 0;
  padding: 0;
  border: 1px solid #d8d8d8 !important;
  border-radius: 12px;
  background: #ffffff !important;
  color: #333333 !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: none;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}
.and-imprint-owl .owl-nav button.owl-prev { left: -50px; }
.and-imprint-owl .owl-nav button.owl-next { right: -50px; }
.and-imprint-owl .owl-nav button.owl-prev:hover,
.and-imprint-owl .owl-nav button.owl-next:hover {
  background: #333333 !important;
  border-color: #333333 !important;
  color: #ffffff !important;
}
.and-imprint-owl .owl-nav .and-imprint-nav-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}
.and-imprint-owl .owl-nav .and-dart-arrow {
  width: 9px;
  height: 12px;
}

/* --- Responsive --- */
@media screen and (max-width: 1100px) {
  .and-books-grid { grid-template-columns: repeat(4, 1fr); }
}
@media screen and (max-width: 900px) {
  .and-books-grid { grid-template-columns: repeat(3, 1fr); }
  .and-imprint-slider-wrap { padding: 0 40px; }
  .and-imprint-owl .owl-nav button.owl-prev { left: -40px; }
  .and-imprint-owl .owl-nav button.owl-next { right: -40px; }
}
@media screen and (max-width: 991px) {
  .and-ticker-wrap { padding: 0 15px; margin: 20px auto; }
  .ticker-section { height: 70px; }
  .ticker-label { flex: 0 0 120px; font-size: 13px; letter-spacing: 1px; padding: 0 10px; }
  .ticker-label-icon { width: 18px; height: 18px; }
  .ticker-content { padding: 0 16px; gap: 10px; }
  .ticker-text { font-size: 14px; }
  .ticker-more { height: 30px; padding: 0 14px; margin: auto 12px auto 0; font-size: 12px; }
}

@media screen and (max-width: 600px) {
  .and-books-grid {grid-template-columns: repeat(2, 1fr);gap: 30px 14px;}
  .and-imprint-section { padding: 40px 0 50px; }
  .and-imprint-slider-wrap { padding: 0 36px; }
  .and-imprint-owl .owl-nav button.owl-prev,
  .and-imprint-owl .owl-nav button.owl-next { width: 38px; height: 38px; }
  .and-imprint-owl .owl-nav button.owl-prev { left: -36px; }
  .and-imprint-owl .owl-nav button.owl-next { right: -36px; }
  .ticker-section { height: 60px; }
  .ticker-label { flex: 0 0 90px; font-size: 12px; padding: 0 8px; }
  .ticker-label-icon { display: none; }
  .ticker-more span:first-child { display: none; }
  .ticker-more { height: 28px; padding: 0 12px; margin: auto 10px auto 0; font-size: 11px; }
}

/* ============================================================
   手機版整體細調（≤ 768px / ≤ 480px）
   - 區塊 padding 縮小
   - 標題尺寸縮小
   - 書籍／快訊／部落卡片尺寸微調
   ============================================================ */
@media screen and (max-width: 768px) {
  /* 新書預告 */
  .and-ticker-wrap { padding: 0 12px; margin: 16px auto; }
  .ticker-section { height: 56px; border-radius: 18px; }
  .ticker-label {flex: 0 0 50px;font-size: 12px;letter-spacing: 0.5px;padding: 0 10px;}
  .ticker-content { padding: 0 12px; gap: 8px; }
  .ticker-text { font-size: 13px; letter-spacing: 0.5px; }
  .ticker-more { height: 28px; padding: 0 12px; font-size: 11px; margin: auto 10px auto 0; border-width: 1px; }

  /* 共用區塊標題 */
  .and-section-title { margin-bottom: 22px; }
  .and-section-title .en-title { font-size: 22px; }
  .and-section-title h2 { font-size: 20px; letter-spacing: 2px; }

  /* 新書快報 */
  .and-books-section { padding: 36px 0 42px; }
  .and-books-header { margin-bottom: 20px; }
  .and-books-header .and-section-title { margin-bottom: 16px; padding-left: 10px; }
  .and-books-header .and-section-title .en-title { font-size: 22px; }
  .and-books-header .and-section-title h2 { font-size: 22px; letter-spacing: 2px; }
  .and-books-controls { padding-left: 10px; gap: 10px; }
  .and-ui-btn--icon { width: 44px; height: 44px; font-size: 18px; }
  .and-ui-btn--more { padding: 10px 20px; font-size: 13px; letter-spacing: 0.5px; }
  .and-book-card .book-title { font-size: 14px; }
  .and-book-card .book-cover-wrap { border-radius: 12px; margin-bottom: 14px; }

  /* 活動專區 */
  .and-events-section { padding: 36px 0 42px; }
  .and-events-header { margin-bottom: 20px; }
  .and-events-header .and-section-title { padding-left: 0; margin-bottom: 0; text-align: center; }
  .and-events-header .and-section-title .en-title { font-size: 22px; }
  .and-events-header .and-section-title h2 { font-size: 22px; letter-spacing: 2px; }
  .and-events-nav { margin-top: 24px; gap: 14px; }

  /* 出版社品牌 */
  .and-imprint-section { padding: 40px 0 56px; }
  .and-imprint-slider-wrap { padding: 0 42px; }
}

@media screen and (max-width: 480px) {
  .and-books-section,
  .and-events-section { padding: 30px 0 36px; }

  /* 書籍卡片縮一點 */
  .and-book-card .book-title { font-size: 14px; line-height: 1.4; }

  /* 部落落格貼文：圖片改小、可讀性優先 */

  /* 快訊卡片微調 */

  /* 品牌 */

  /* Section title--lined */
}
