/* ============================================================================
 * 香港藥房 · 藥行搜尋 — 佈景主題整合樣式
 * ----------------------------------------------------------------------------
 * 這個檔案只在「含目錄短代碼的頁面」載入（由外掛條件式 enqueue），
 * 所以在此放開主題的欄寬限制是安全的，不會影響網站其他頁面。
 *
 * 上線實測主題結構：
 *   .main > .container > .content-wrap > .content > article.single-content
 *         > .article-content > #hkpApp
 * 目錄被關在窄欄裡，右側還留著空的側欄位 → 兩側大片空白。
 * ==========================================================================*/

/* ---- 1) 隱藏主題重複的頁面標題橫幅 ----
 * 目錄自己已有標題列，主題的 .banner-page 會多出一條重複的標題與可點擊區。*/
.banner-page,
.page-title,
.breadcrumb {
	display: none !important;
}

/* ---- 1.5) 隱藏主題頁首，讓目錄標題列貼齊最上方 ----
 * 客戶要求：不要上面那條黑色頁首，直接把目錄的綠色標題列移到最頂。
 * 註：主題頁首是 position:fixed（高 70px）並以 body margin-top 預留空間，
 *     所以必須同時把那個間距歸零，否則頂端會留下一條空白。*/
.header {
	display: none !important;
}
body {
	margin-top: 0 !important;
}
.main {
	padding-top: 0 !important;
}
/* 主題在文章容器留了 20px 內距，會讓綠色標題列與頂端之間留一條縫 */
.single-content {
	padding-top: 0 !important;
	padding-left: 0 !important;
	padding-right: 0 !important;
}

/* ---- 2) 放開內容欄寬度，讓目錄撐滿整個畫面 ---- */
.main > .container,
.main .container.clearfix {
	max-width: 100% !important;
	width: 100% !important;
	padding-left: 16px !important;
	padding-right: 16px !important;
	box-sizing: border-box;
}
.content-wrap {
	display: block !important;
	max-width: 100% !important;
	width: 100% !important;
	float: none !important;
}
.content,
article.single-content,
.article-content {
	max-width: 100% !important;
	width: 100% !important;
	float: none !important;
	margin-left: 0 !important;
	margin-right: 0 !important;
	padding-left: 0 !important;
	padding-right: 0 !important;
	box-sizing: border-box;
}

/* ---- 3) 空的側欄不佔位 ---- */
.content-wrap > .sidebar,
.content-wrap > aside,
.content .sidebar {
	display: none !important;
}

/* ---- 4) 目錄容器本身：吃滿可用寬度 ---- */
#hkpApp {
	width: 100% !important;
	max-width: 100% !important;
	margin-left: 0 !important;
	margin-right: 0 !important;
}

/* ---- 4.5) 隱藏主題的會員／登入區塊 ----
 * 客戶表示網站轉型後不再需要 VIP／登入／註冊入口。
 * 這是安全的還原點：拿掉這條規則就會恢復。*/
.nav-right {
	display: none !important;
}

/* ---- 5) 桌面上卡片可再多一欄，充分利用變寬後的空間 ---- */
@media (min-width: 1400px) {
	#hkpApp .grid {
		grid-template-columns: repeat(4, minmax(0, 1fr));
	}
}

/* ---- 6) 隱藏主題頁尾與舊站殘留 UI ----
 * 客戶要求：網站轉型後只保留藥房目錄，舊站的頁尾、版權、浮動工具列全部隱藏。
 * 注意：我們自己的頁腳是 <footer class="site-footer">（在 #hkpApp 內），
 *       所以用 :not(.site-footer) 排除，不會被誤刪。*/
.footer-widgets,
.footer-widget,
.footer-widget-content,
.footer-logo,
.footer-links,
.copyright,
.footer-fixed-nav,
.rollbar,
.sitetips-default {
	display: none !important;
}
footer:not(.site-footer) {
	display: none !important;
}
/* 主題為手機底部固定導覽預留的 50px 間距，一併歸零 */
@media (max-width: 768px) {
	body {
		margin-bottom: 0 !important;
	}
}
