/*
Theme Name: Astra Child
Theme URI: https://cocap.me/
Description: Child theme for Astra, customized for Capsule Archive
Author: Your Name
Author URI: https://cocap.me/
Template: astra
Version: 1.0.0
*/

/* ------------------------------
   Capsule Archive Page Styles
   ------------------------------ */

/* 父容器 */
.capsule-archive-container {
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 18px;
  box-sizing: border-box;
}

/* 篩選器 & 統計 */
.capsule-filter { margin-bottom: 12px; text-align: right; }
.capsule-count { margin-bottom: 12px; font-size: 14px; color:#444; }

/* Grid */
.capsule-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: flex-start;
  justify-content: flex-start;
}

/* 膠囊卡片固定寬度 */
.capsule-item {
  flex: 0 0 100px !important;
  width: 100px !important;
  text-align: center;
  box-sizing: border-box;
}

/* 圖片固定大小，透明背景 */
.capsule-img {
  width: 100px !important;
  height: auto !important;
  max-width: none !important;
  display: block !important;
  margin: 0 auto;
  border-radius: 6px;
  box-shadow: none ;
  /* background: none; <-- 移除背景，保留透明度 */
}

/* 名稱小字（次要資訊） */
.capsule-title {
  margin-top: 6px;
  font-size: 11px;
  color: #666;
  line-height: 1.3;
  text-align: center;
  display: -webkit-box;
  -webkit-line-clamp: 3;        /* 限制三行 */
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* 沒有圖的佔位 */
.capsule-placeholder {
  width: 100px;
  height: 100px;
  background:#eee;
  border-radius:6px;
  line-height:100px;
  color:#888;
  font-size: 12px;
  text-align: center;
}

/* 回到全部膠囊按鈕 */
.capsule-back-btn {
  display: inline-block;
  padding: 6px 12px;
  margin-left: 10px;
  background: #eee;
  border-radius: 4px;
  font-size: 13px;
  color: #333;
  text-decoration: none;
  transition: background 0.2s ease;
}
.capsule-back-btn:hover {
  background: #ddd;
}

/* 手機小螢幕置中 */
@media (max-width: 800px) {
  .capsule-grid {
    justify-content: center;
  }
}
