/* =============================
  Canprint /stores/ v4.2 FULL (Scoped)
  - Softer tags (amber bg + dark text)
  - Spacing + proportions refined
  - Desktop 3 columns
  - Equal height cards
  - Mobile-first (full-width buttons)
============================== */

.cp-stores-v42{
  --main: var(--canprint-main, #1C3B47);
  --main-dark: var(--canprint-main-dark, #162D36);

  --accent-tag-bg: #FFF4D6;
  --accent-tag-text: #855C00;

  --direct-tag-bg: #E8F4FA;
  --direct-tag-text: #1E5A78;

  --text: #1e293b;
  --muted: #64748b;

  --bg: #f8fafc;
  --soft: #f0f4f6;

  --card: #ffffff;
  --line: rgba(2,6,23,.08);
  --shadow: 0 6px 22px rgba(2,6,23,.06);

  --r: 22px;

  font-family: system-ui,-apple-system,"Noto Sans TC","PingFang TC","Microsoft JhengHei",sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.65;
}
.cp-stores-v42 *{box-sizing:border-box}
.cp-stores-v42 a{ text-decoration:none!important; }

.cp-stores-v42 .cp-wrap{max-width:1160px;margin:0 auto;padding:34px 16px}
@media(min-width:900px){ .cp-stores-v42 .cp-wrap{padding:44px 20px} }

/* ===== Header / Nav ===== */
.cp-stores-v42 .cp-header{text-align:center;margin-bottom:26px}
.cp-stores-v42 .cp-h1{font-size:30px;font-weight:900;color:var(--main);margin:0 0 10px}
@media(min-width:900px){ .cp-stores-v42 .cp-h1{font-size:38px} }

.cp-stores-v42 .cp-sub{max-width:820px;margin:0 auto;color:var(--muted);font-size:14.5px;line-height:1.7}
.cp-stores-v42 .cp-nav{
  display:flex;flex-wrap:wrap;justify-content:center;gap:10px;
  margin-top:16px;
}
.cp-stores-v42 .cp-nav a{
  padding:10px 18px;
  background:#fff;
  border:1px solid var(--line);
  border-radius:999px;
  color:var(--main)!important;
  font-size:14px;
  font-weight:800;
  transition:.18s ease;
  white-space:nowrap;
}
.cp-stores-v42 .cp-nav a:hover{
  background:var(--main);
  color:#fff!important;
  border-color:var(--main);
}

/* ===== Section Title ===== */
.cp-stores-v42 .cp-secTitle{
  margin:26px 0 14px;
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:12px;
  flex-wrap:wrap;
}
.cp-stores-v42 .cp-h2{margin:0;font-size:18px;font-weight:900;color:#0f172a}
@media(min-width:900px){ .cp-stores-v42 .cp-h2{font-size:22px} }
.cp-stores-v42 .cp-note{margin:0;color:var(--muted);font-size:13.5px}

/* ===== Grid ===== */
.cp-stores-v42 .cp-grid{
  display:grid;
  grid-template-columns:repeat(auto-fill, minmax(310px, 1fr));
  gap:24px;
  align-items:stretch;
}
@media(min-width:1024px){
  .cp-stores-v42 .cp-grid{grid-template-columns:repeat(3,1fr); gap:28px;}
}

/* ===== Card ===== */
.cp-stores-v42 .cp-card{
  background:var(--card);
  border:1px solid var(--line);
  border-radius:var(--r);
  padding:22px;
  box-shadow:var(--shadow);
  display:flex;
  flex-direction:column;
  height:100%;
  transition:transform .18s ease, box-shadow .18s ease;
}
@media(min-width:900px){ .cp-stores-v42 .cp-card{padding:28px;} }
.cp-stores-v42 .cp-card:hover{transform:translateY(-4px); box-shadow:0 12px 30px rgba(2,6,23,.10);}

.cp-stores-v42 .cp-tag{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:6px 12px;
  border-radius:10px;
  font-size:13px;
  font-weight:900;
  margin-bottom:14px;
  border:1px solid transparent;
  width:fit-content;
  max-width:100%;
}
.cp-stores-v42 .tag-direct{
  background:var(--direct-tag-bg);
  color:var(--direct-tag-text);
  border-color:rgba(30,90,120,.18);
}
.cp-stores-v42 .tag-partner{
  background:var(--accent-tag-bg);
  color:var(--accent-tag-text);
  border-color:rgba(133,92,0,.18);
}

.cp-stores-v42 .cp-name{font-size:18px;font-weight:900;margin:0 0 12px;color:#0f172a}
@media(min-width:900px){ .cp-stores-v42 .cp-name{font-size:20px} }

.cp-stores-v42 .cp-list{
  list-style:none;
  padding:0;
  margin:0 0 16px 0;
  font-size:14.5px;
}
.cp-stores-v42 .cp-list li{
  margin-bottom:10px;
  display:grid;
  grid-template-columns:78px 1fr;
  gap:10px;
  align-items:flex-start;
}
.cp-stores-v42 .cp-list b{color:var(--muted);font-weight:700;font-size:12.5px}
.cp-stores-v42 .cp-list span{color:var(--text)}
.cp-stores-v42 .cp-meta{color:var(--muted);font-size:14px;margin:0 0 14px;line-height:1.7}

/* ===== Buttons (lock states) ===== */
.cp-stores-v42 .cp-actions{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:12px;
  margin-top:auto;
}
@media(max-width:520px){
  .cp-stores-v42 .cp-actions{grid-template-columns:1fr;}
}

.cp-stores-v42 .cp-btn{
  padding:12px 12px;
  border-radius:12px;
  text-align:center;
  font-weight:900;
  font-size:14px;
  border:1px solid transparent;
  transition:.15s ease;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  width:100%;
}

.cp-stores-v42 .btn-main,
.cp-stores-v42 .btn-main:visited{
  background:var(--main)!important;
  color:#fff!important;
  border-color:var(--main)!important;
}
.cp-stores-v42 .btn-main:hover,
.cp-stores-v42 .btn-main:focus{
  background:var(--main-dark)!important;
  border-color:var(--main-dark)!important;
  color:#fff!important;
}

.cp-stores-v42 .btn-outline,
.cp-stores-v42 .btn-outline:visited{
  background:#fff!important;
  border-color:rgba(2,6,23,.12)!important;
  color:var(--main)!important;
}
.cp-stores-v42 .btn-outline:hover,
.cp-stores-v42 .btn-outline:focus{
  background:#f1f5f9!important;
  border-color:rgba(2,6,23,.16)!important;
  color:var(--main)!important;
}

/* mobile icon */
.cp-stores-v42 .cp-icon{width:18px;height:18px;display:inline-block;flex:0 0 auto;}
@media(min-width:900px){ .cp-stores-v42 .cp-only-mobile{display:none!important;} }

/* ===== Special recruitment card ===== */
.cp-stores-v42 .cp-cardRecruit{
  background:var(--soft);
  border:2px dashed #cbd5e1;
  justify-content:center;
  text-align:center;
}
.cp-stores-v42 .cp-cardRecruit .cp-name{justify-content:center}
.cp-stores-v42 .cp-emoji{font-size:32px;margin-bottom:12px}

/* ===== Join box ===== */
.cp-stores-v42 .cp-join-box{
  background:#fff;
  border:2px solid rgba(255,244,214,.95);
  border-radius:var(--r);
  padding:26px;
  margin-top:34px;
  box-shadow:var(--shadow);
}
@media(min-width:900px){ .cp-stores-v42 .cp-join-box{padding:40px;} }

.cp-stores-v42 .cp-join-h2{font-size:20px;color:var(--main);margin:0 0 18px;text-align:center;font-weight:900}
@media(min-width:900px){ .cp-stores-v42 .cp-join-h2{font-size:26px;margin-bottom:22px;} }

.cp-stores-v42 .cp-join-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit, minmax(240px, 1fr));
  gap:16px;
}
@media(min-width:900px){ .cp-stores-v42 .cp-join-grid{gap:20px;} }

.cp-stores-v42 .cp-join-item{
  padding:18px;
  background:var(--bg);
  border-radius:16px;
  border:1px solid rgba(2,6,23,.08);
  height:100%;
}
.cp-stores-v42 .cp-join-item h3{
  font-size:16px;margin:0 0 8px;
  color:var(--accent-tag-text);
  font-weight:900;
}
.cp-stores-v42 .cp-join-item p{margin:0;font-size:14px;color:var(--muted);line-height:1.7}
.cp-stores-v42 .cp-join-item b{color:#0f172a}

/* ===== FAQ ===== */
.cp-stores-v42 .cp-faq{
  background:#fff;
  border:1px solid var(--line);
  border-radius:var(--r);
  padding:18px;
  box-shadow:var(--shadow);
}
@media(min-width:900px){ .cp-stores-v42 .cp-faq{padding:24px;} }
.cp-stores-v42 .cp-faq details{border-top:1px solid var(--line);padding:10px 0}
.cp-stores-v42 .cp-faq details:first-child{border-top:0}
.cp-stores-v42 .cp-faq summary{cursor:pointer;font-weight:900;color:#0f172a}
.cp-stores-v42 .cp-faq p{margin:8px 0 0;color:var(--muted);line-height:1.7}

/* =========================================================
   v1.2.0 additions: search, load-more, overflow hide, no-result
   ========================================================= */

/* 搜尋列 */
.cp-stores-v42 .cp-search{
  position:relative;
  margin:18px auto 0;
  max-width:520px;
}
.cp-stores-v42 .cp-search input[type="search"]{
  width:100%;
  padding:12px 42px 12px 16px;
  border:1px solid var(--line);
  border-radius:14px;
  background:#fff;
  font-size:15px;
  font-weight:600;
  color:var(--text);
  box-shadow:0 2px 10px rgba(2,6,23,.04);
  outline:none;
  transition:border-color .15s ease, box-shadow .15s ease;
}
.cp-stores-v42 .cp-search input[type="search"]:focus{
  border-color:var(--main);
  box-shadow:0 0 0 3px rgba(28,59,71,.12);
}
.cp-stores-v42 .cp-search-clear{
  position:absolute;
  right:8px; top:50%;
  transform:translateY(-50%);
  width:30px; height:30px;
  border:0; border-radius:50%;
  background:transparent;
  color:var(--muted);
  font-size:22px; line-height:1;
  cursor:pointer;
  display:none;
}
.cp-stores-v42 .cp-search-clear:hover{ background:#f1f5f9; color:var(--text); }
.cp-stores-v42.is-searching .cp-search-clear{ display:inline-block; }

/* 溢出隱藏（預設超過上限的卡片不顯示） */
.cp-stores-v42 .cp-card.is-overflow-hidden{ display:none; }
/* 搜尋模式下，只看 is-search-hidden；溢出隱藏暫時失效，讓所有命中結果都看得到 */
.cp-stores-v42.is-searching .cp-card.is-overflow-hidden{ display:flex; }
.cp-stores-v42 .cp-card.is-search-hidden{ display:none !important; }

/* 「查看更多」按鈕 */
.cp-stores-v42 .cp-loadmore-wrap{
  display:flex; justify-content:center;
  margin-top:18px;
}
.cp-stores-v42 .cp-loadmore{
  width:auto; min-width:240px;
  padding:12px 22px;
}
.cp-stores-v42.is-searching .cp-loadmore-wrap{ display:none; }

/* 整個區塊在搜尋無結果時隱藏 */
.cp-stores-v42 .cp-region.is-empty{ display:none; }

/* 全頁無結果提示 */
.cp-stores-v42 .cp-no-result{
  text-align:center;
  margin:30px auto;
  padding:18px 22px;
  max-width:560px;
  background:#fff;
  border:1px dashed #cbd5e1;
  border-radius:14px;
  color:var(--muted);
  font-size:14.5px;
}

/* =========================================================
   v1.3.0 additions: section intro, recruitment cards, CTA
   ========================================================= */

/* H2 區塊下的補充說明段 */
.cp-stores-v42 .cp-section-intro{
  max-width:880px;
  margin:0 auto 18px;
  color:var(--muted);
  font-size:14.5px;
  line-height:1.8;
  text-align:center;
  padding:0 8px;
}

/* 招募中區塊 wrapper（讓背景與真實店家區塊有區別） */
.cp-stores-v42 .cp-region-recruit{
  margin-top:8px;
  padding:6px 0 4px;
}
.cp-stores-v42 .cp-region-recruit .cp-secTitle .cp-h2{
  color:var(--accent-tag-text);
}

/* 招募卡 CTA 變體：強調合作邀請風格 */
.cp-stores-v42 .cp-cardRecruit--cta{
  background:linear-gradient(180deg, #FFFAEC 0%, #FFFFFF 100%);
  border:2px dashed rgba(133,92,0,.28);
  text-align:left;
  justify-content:flex-start;
}
.cp-stores-v42 .cp-cardRecruit--cta .cp-emoji{
  font-size:30px;
  margin-bottom:8px;
  text-align:left;
}
.cp-stores-v42 .cp-cardRecruit--cta .cp-name{
  text-align:left;
  margin-bottom:10px;
}
.cp-stores-v42 .cp-cardRecruit--cta .cp-recruit-area{
  background:rgba(133,92,0,.08);
  border-radius:10px;
  padding:8px 12px;
  margin:0 0 10px;
  font-size:13.5px;
  color:var(--text);
}
.cp-stores-v42 .cp-cardRecruit--cta .cp-recruit-area b{
  color:var(--accent-tag-text);
  font-weight:800;
  display:inline-block;
  margin-right:4px;
}
.cp-stores-v42 .cp-cardRecruit--cta .cp-recruit-extra{
  margin-top:auto;
  font-size:12.5px;
  color:var(--muted);
  border-top:1px dashed rgba(2,6,23,.08);
  padding-top:10px;
  line-height:1.6;
}

/* 合作申請 CTA box（取代原 join-box 的內部說明 + 按鈕 layout） */
.cp-stores-v42 .cp-join-intro{
  text-align:center;
  margin:0 auto 20px;
  max-width:760px;
  color:var(--muted);
  font-size:14.5px;
  line-height:1.85;
}
.cp-stores-v42 .cp-join-cta{
  text-align:center;
  margin-top:22px;
}
.cp-stores-v42 .cp-join-btn{
  display:inline-flex;
  width:auto;
  min-width:240px;
  padding:15px 34px;
  font-size:16px;
  border-radius:14px;
}

/* v1.4.0: empty-region pointer + 14-region nav layout */
.cp-stores-v42 .cp-region-empty{
  margin:0 auto 14px;
  padding:14px 16px;
  background:#fff;
  border:1px dashed rgba(2,6,23,.14);
  border-radius:14px;
  color:var(--muted);
  font-size:14px;
  line-height:1.7;
  text-align:center;
}
.cp-stores-v42 .cp-region-empty a{
  color:var(--main)!important;
  font-weight:800;
  border-bottom:1px solid rgba(28,59,71,.3);
}
.cp-stores-v42 .cp-region-empty a:hover{
  border-bottom-color:var(--main);
}

/* 14 個 nav chip 在桌機要能輕鬆換行；手機端調 padding 縮小 */
@media(max-width:520px){
  .cp-stores-v42 .cp-nav{ gap:6px; }
  .cp-stores-v42 .cp-nav a{ padding:8px 12px; font-size:13px; }
}
