/* ---------- hover / interactive states ---------- */
.hv-red        { transition: color .2s; }
.hv-red:hover  { color: #DA1E28; }
.hv-dark:hover { background: #17120F; color: #fff; border-color: #17120F; }
.hv-megabtn:hover { color: #DA1E28; }
.nav-active {
	color: #DA1E28 !important;
	position: relative;
}
.nav-active::after {
	content: "";
	position: absolute;
	left: 16px;
	right: 16px;
	bottom: -8px;
	height: 2px;
	background: #DA1E28;
	border-radius: 1px;
}
.hv-border       { transition: border-color .2s; border-radius: 6px; }
.hv-border:hover { border-color: #17120F; }
.hv-dark { border-radius: 6px; }
.hv-fade:hover   { opacity: .92; }
.case-media           { transition: transform .25s ease, box-shadow .25s ease; }
.case-media-img       { transition: filter .3s ease; }
.case-media:hover { transform: translateY(-4px); box-shadow: 0 12px 24px rgba(23, 18, 15, 0.14); }
.case-media:hover .case-media-img  { filter: brightness(0.9); }
.case-tag-link { transition: background .15s ease, color .15s ease; }
.case-tag-link:hover { background: rgb(218, 30, 40); color: #ffffff; }
.hero-primary       { transition: background .2s; border-radius: 8px; }
.hero-primary:hover { background: #DA1E28; }
.cart-add-btn { border-radius: 6px; }
/* Homepage hero's own CTA only (see inc_index_hero.jsp) -- filled brand red by
   default instead of black, so it needs its own hover shade (a plain
   .hero-primary:hover would be the same red as the resting state, i.e. no
   visible hover feedback). Must come after .hero-primary:hover above so it
   wins the tie on specificity via source order. */
.hero-primary-red:hover { background: #B81A22; }
/* Homepage section "MORE" links (更多商品/更多案例/全部分類/更多文章 →) -- a red
   outline pill button that fills solid red with white text on hover. */
.all-cat-btn       { transition: background .2s, color .2s, font-size .2s; }
.all-cat-btn:hover { background: #DA1E28 !important; color: #fff !important; font-size: 18px; }

/* about-section carousel controls */
.about-arrow {
	position: absolute; top: 50%; transform: translateY(-50%);
	width: 40px; height: 40px; border-radius: 50%; border: none; padding: 0; cursor: pointer;
	background: rgba(23,18,15,0.5); color: #fff; display: flex; align-items: center; justify-content: center;
	opacity: 0; transition: opacity .2s ease, background .2s ease; z-index: 3;
}
.about-media:hover .about-arrow { opacity: 1; }
.about-arrow:hover  { background: #DA1E28; }
.about-arrow-prev { left: 14px; }
.about-arrow-next { right: 14px; }
/* height:24px is the real hit target (PageSpeed "target-size" wants >=24px --
   the previous approach, a 3px button with an invisible ::before hit-area
   overlay, LOOKED right but axe/Lighthouse measure the element's own
   boundingRect, which a pseudo-element doesn't change). The visible thin bar
   is now ::after, sized independently of the button's real box, so the
   button can be a proper touch target without the progress track looking
   any thicker. */
.about-timeline-seg {
	flex: 1; height: 24px; padding: 0; margin: 0; border: none; background: none; cursor: pointer; position: relative;
}
.about-timeline-seg::after {
	content: ''; position: absolute; left: 0; right: 0; top: calc(50% - 1.5px); height: 3px; border-radius: 2px;
	background: rgba(255,255,255,0.35); pointer-events: none;
}
.about-timeline-seg:hover::after { background: rgba(255,255,255,0.55); }
/* transform:scaleX (not width) so this animates on the compositor instead of
   forcing layout+paint every frame -- see "Avoid non-composited animations" in
   PageSpeed. transform-origin:left keeps the fill growing left-to-right like a
   width animation would, just via a GPU-only property. top/height (not inset,
   now that the parent button is taller than the visible bar) keep it aligned
   with the ::after track above. */
.about-timeline-fill { position: absolute; left: 0; top: calc(50% - 1.5px); width: 100%; height: 3px; border-radius: 2px; transform: scaleX(0); transform-origin: left; background: #fff; }
/* animation (not transition) so JS can pause/resume it in place via animationPlayState,
   keeping the bar's fill exactly in sync with when the slide actually advances */
.about-timeline-fill.is-running { animation: about-timeline-fill 4.5s linear forwards; }
@keyframes about-timeline-fill { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.cta-white, .cta-outline { border-radius: 8px; }
.cta-white:hover   { background: #17120F; color: #fff; }
.cta-outline:hover { border-color: #fff; background: rgba(255,255,255,0.08); }
.soc:hover     { border-color: #DA1E28; }
.footbtn:hover { border-color: #DA1E28; color: #fff; }
.hv-white:hover { color: #fff; }
.chip       { transition: border-color .15s, color .15s; }
.chip:hover { border-color: #DA1E28; color: #DA1E28; }
.rail        { transition: background .15s, color .15s; }
.rail:hover, .rail.active { color: #DA1E28; background: rgba(23,18,15,0.05); }
.mega-item        { display: inline-block; padding: 3px 7px; margin: -3px -7px; border-radius: 2px; color: #4a443f; transition: background .15s, color .15s; }
.mega-item:hover  { color: #DA1E28; background: rgba(23,18,15,0.05); }
/* Resting color for an .hv-red link whose hover would otherwise be blocked by
   an inline color (inline styles always beat a stylesheet :hover rule) --
   used by leaf category links in the footer sitemap. */
.hv-red-muted { color: #4a443f; }
/* Sub-category buttons shown under a group page's title (product_group.jsp) --
   one per direct child category, e.g. "健康 | 抗疫禮品" under
   "防疫保健 · 居家生活". */
.subgroup-btn {
	display: inline-flex; align-items: center;
	padding: 10px 18px; border: 1px solid rgba(23,18,15,0.16); border-radius: 999px;
	color: #17120F; font-weight: 600; font-size: 13.5px;
	text-decoration: none; transition: border-color .15s, color .15s, background .15s;
}
.subgroup-btn:hover { border-color: #DA1E28; color: #DA1E28; background: rgba(218,30,40,0.05); }
.subgroup-btn.is-active { background: #DA1E28; border-color: #DA1E28; color: #fff; }
.subgroup-btn.is-active:hover { background: #DA1E28; color: #fff; }

/* #tag filter bar (see knowledge/gift_promotion_info.jsp) -- always red-on-white,
   unlike .subgroup-btn which is neutral until hovered/active. */
.kn-tag-btn {
	display: inline-flex; align-items: center;
	padding: 8px 18px; border: 1px solid #DA1E28; border-radius: 999px;
	color: #DA1E28; font-weight: 600; font-size: 13.5px;
	text-decoration: none; transition: background .15s, color .15s;
}
.kn-tag-btn:hover { background: rgba(218,30,40,0.08); }
.kn-tag-btn.is-active { background: #DA1E28; color: #fff; }
.kn-tag-btn.is-active:hover { background: #DA1E28; color: #fff; }
.hv-bg       { transition: background .15s; }
.hv-bg:hover { background: #F6F3EE; color: #DA1E28; }

/* category card hover choreography */
.cat-card .cimg { transition: transform .5s ease; }
.cat-card .cov  { transition: opacity .3s ease, transform .3s ease; }
.cat-card .cttl { transition: color .2s; }
.cat-card .carr { transition: transform .25s ease; }
.cat-card        { border-color: rgba(23,18,15,0.14); transition: border-color .25s ease; }
.cat-card:hover  { border-color: #DA1E28; }
.cat-card:hover .cimg { transform: scale(1.06); }
.cat-card:hover .cov  { opacity: 1; transform: translateY(0); }
.cat-card:hover .cttl { color: #DA1E28; }
.cat-card:hover .carr { transform: translate(3px,-3px); }

/* product card hover */
.prod-card       { border-color: rgba(23,18,15,0.14); transition: border-color .25s ease; }
.prod-card:hover { border-color: #DA1E28; }
.prod-card .prod-name { transition: color .2s; }
.prod-card:hover .prod-name { color: #DA1E28; }

/* homepage popular-product card hover (see productCardHTML in main.js) */
.pop-card        { border-color: rgba(23,18,15,0.14); transition: border-color .25s ease; }
.pop-card:hover  { border-color: #DA1E28; }

/* popular product card flip */
.pflip           { perspective: 1200px; }
.pflip-inner      { position: relative; width: 100%; height: 100%; transition: transform .6s cubic-bezier(.4,.15,.2,1); transform-style: preserve-3d; }
.pflip:hover .pflip-inner { transform: rotateY(180deg); }
.pflip-face       { position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.pflip-back       { transform: rotateY(180deg); }

/* journal card hover */
.jrnl .rg-jt       { transition: color .2s; }
.jrnl:hover .rg-jt { color: #DA1E28; }
.kn-card .rg-jt       { transition: color .2s; }
.kn-card:hover .rg-jt { color: #DA1E28; }
.kn-read-btn                 { text-decoration: underline; text-decoration-color: transparent; transition: text-decoration-color .2s; }
.kn-card:hover .kn-read-btn  { text-decoration-color: #DA1E28; }
/* Journal cards with a background image (see inc_index_journal.jsp) need
   white text over the dark overlay instead of the plain-card dark text, and
   a lighter hover tint since #DA1E28 loses contrast on a photo. Must come
   after the plain .jrnl rules above to win the tie via source order. */
.jrnl-img .rg-jt       { color: #fff; }
.jrnl-img:hover .rg-jt { color: #ffb4b8; }

/* scroll-reveal (stat row) */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity .6s ease, transform .6s ease; }
.reveal.is-in { opacity: 1; transform: translateY(0); }

/* LINE QR hover popup */
.line-qr-hover { position: relative; cursor: pointer; }
.line-qr-pop {
	position: absolute;
	left: 50%;
	top: calc(100% + 20px);
	transform: translateX(-50%) translateY(-4px);
	width: 150px;
	background: #fff;
	border: 1px solid rgba(23,18,15,0.14);
	box-shadow: 0 20px 34px -18px rgba(0,0,0,0.3);
	padding: 10px;
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
	transition: opacity .15s ease, transform .15s ease;
	z-index: 80;
}
.line-qr-pop img { display: block; width: 130px; height: 130px; max-width: none; }
.line-qr-hover:hover .line-qr-pop {
	opacity: 1;
	visibility: visible;
	transform: translateX(-50%) translateY(0);
}

/* floating widget stack (right edge, vertically centered, always visible) --
   LINE QR button plus (below it) the quote-cart shortcut. */
.float-stack {
	position: fixed;
	top: 50%;
	right: 0;
	transform: translateY(-50%);
	z-index: 90;
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	gap: 10px;
}
.line-float {
	text-decoration: none;
}
.line-float-btn {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 5px;
	background: #06C755;
	padding: 14px 10px;
	border-radius: 10px 0 0 10px;
	box-shadow: 0 12px 24px -10px rgba(23,18,15,0.35);
	transition: background .2s, padding .2s;
}
.line-float:hover .line-float-btn { background: #05a648; padding-right: 16px; }
.line-float-txt {
	font-family: "Noto Sans TC", "Noto Sans TC Fallback", sans-serif;
	font-size: 11px;
	font-weight: 700;
	line-height: 1.3;
	text-align: center;
	white-space: nowrap;
	color: #fff;
}
.line-float .line-qr-pop {
	left: auto;
	right: calc(100% + 14px);
	top: 50%;
	transform: translateY(-50%) translateX(6px);
	text-align: center;
}
.line-float:hover .line-qr-pop {
	transform: translateY(-50%) translateX(0);
}
.line-float-pop-txt {
	display: block;
	margin-top: 8px;
	font-size: 12px;
	color: #4a443f;
	font-family: "Noto Sans TC", "Noto Sans TC Fallback", sans-serif;
}
@media (max-width: 640px) {
	.line-float-txt { display: none; }
	.line-float-btn { padding: 12px 9px; border-radius: 50% 0 0 50%; }
}

.cart-float {
	text-decoration: none;
}
.cart-float-btn {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 5px;
	background: #DA1E28;
	padding: 14px 10px;
	border-radius: 10px 0 0 10px;
	box-shadow: 0 12px 24px -10px rgba(23,18,15,0.35);
	transition: background .2s, padding .2s;
}
.cart-float:hover .cart-float-btn { background: #b8181f; padding-right: 16px; }
/* First-visit nudge toward "加入詢價清單" -- gated to once per browser via
   localStorage in main.js (initCartPulseHint), so returning visitors who
   already know the button is there don't get pulsed at forever. Finite
   iteration-count (not infinite) so it settles down on its own either way. */
@keyframes cart-float-pulse {
	0%   { box-shadow: 0 12px 24px -10px rgba(23,18,15,0.35), 0 0 0 0 rgba(218,30,40,0.55); }
	70%  { box-shadow: 0 12px 24px -10px rgba(23,18,15,0.35), 0 0 0 16px rgba(218,30,40,0); }
	100% { box-shadow: 0 12px 24px -10px rgba(23,18,15,0.35), 0 0 0 0 rgba(218,30,40,0); }
}
.cart-float-btn.pulse { animation: cart-float-pulse 1.8s ease-out 3; }
.cart-float-txt {
	font-family: "Noto Sans TC", "Noto Sans TC Fallback", sans-serif;
	font-size: 11px;
	font-weight: 700;
	line-height: 1.3;
	text-align: center;
	white-space: nowrap;
	color: #fff;
}
@media (max-width: 640px) {
	.cart-float-txt { display: none; }
	.cart-float-btn { padding: 12px 9px; border-radius: 50% 0 0 50%; }
}

/* back-to-top button (bottom-right, appears after scrolling) */
.back-to-top {
	position: fixed;
	right: 22px;
	bottom: 22px;
	z-index: 90;
	display: flex;
	align-items: center;
	justify-content: center;
	background: #fff;
	border: 1px solid rgba(23,18,15,0.16);
	border-radius: 50%;
	width: 52px;
	height: 52px;
	padding: 0;
	cursor: pointer;
	box-shadow: 0 12px 24px -10px rgba(23,18,15,0.35);
	opacity: 0;
	visibility: hidden;
	transform: translateY(10px);
	transition: opacity .2s ease, transform .2s ease, visibility .2s ease, background .2s ease, border-color .2s ease;
}
.back-to-top.is-visible { opacity: 1; visibility: visible; transform: translateY(0); }
.back-to-top:hover { background: #DA1E28; border-color: #DA1E28; }
.back-to-top:hover svg { stroke: #fff; }
@media (max-width: 640px) {
	.back-to-top { right: 14px; bottom: 14px; width: 46px; height: 46px; }
}

/* ---------- knowledge article body (migrated WordPress HTML) ---------- */
.kn-prose { font-size: 15px; line-height: 1.9; color: rgb(74, 68, 63); }
.kn-prose h2 { font-family: "Noto Sans TC", "Noto Sans TC Fallback", sans-serif; font-weight: 900; font-size: 24px; letter-spacing: -0.01em; color: rgb(23, 18, 15); margin: 40px 0 16px; }
.kn-prose h3 { font-family: "Noto Sans TC", "Noto Sans TC Fallback", sans-serif; font-weight: 700; font-size: 19px; color: rgb(23, 18, 15); margin: 32px 0 14px; }
.kn-prose h4 { font-family: "Noto Sans TC", "Noto Sans TC Fallback", sans-serif; font-weight: 700; font-size: 16px; color: rgb(23, 18, 15); margin: 24px 0 10px; }
.kn-prose p { margin: 0 0 18px; }
.kn-prose ul, .kn-prose ol { margin: 0 0 18px; padding-left: 22px; }
.kn-prose li { margin-bottom: 8px; }
.kn-prose li p { margin-bottom: 0; }
.kn-prose a { color: #DA1E28; }
.kn-prose img { max-width: 100%; height: auto; border-radius: 8px; }
.kn-prose > h2:first-child { margin-top: 0; }

.kn-prose .rank-math-block { margin-top: 40px; padding-top: 28px; border-top: 1px solid rgba(23, 18, 15, 0.1); }
.kn-prose .rank-math-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.kn-prose .rank-math-list-item { border: 1px solid rgba(23, 18, 15, 0.1); border-radius: 8px; padding: 16px 20px; }
.kn-prose .rank-math-question { font-family: "Noto Sans TC", "Noto Sans TC Fallback", sans-serif; font-weight: 700; font-size: 15px; color: rgb(23, 18, 15); margin: 0 0 8px; }
.kn-prose .rank-math-answer p { font-size: 14px; margin: 0; color: rgb(74, 68, 63); }
