/* =========================================================
   TLA 網站強化樣式：Logo 載入動畫、燈箱、物件相簿
   主色取自 Logo 月桂葉金色
   ========================================================= */
:root {
	--tla-gold: #d0b040;
	--tla-gold-light: #ecd98f;
	--tla-gold-dark: #8c6d1f;
	--tla-ink: #2b2b2b;
	--tla-paper: #fffdf7;
}

/* ---------------------------------------------------------
   1. 載入動畫
   --------------------------------------------------------- */
#loader-wrapper.tla-loader {
	position: fixed;
	inset: 0;
	z-index: 100000;
	display: flex;
	align-items: center;
	justify-content: center;
	background: radial-gradient(circle at 50% 42%, #ffffff 0%, var(--tla-paper) 45%, #f5eedb 100%);
	opacity: 1;
	visibility: visible;
	transition: opacity .55s ease, visibility 0s linear .55s;
	/* 保險：就算 JS 失敗，10 秒後也會自動消失 */
	animation: tla-loader-failsafe 0s linear 10s forwards;
}
#loader-wrapper.tla-loader.tla-done,
body.loaded #loader-wrapper.tla-loader {
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
}
@keyframes tla-loader-failsafe { to { opacity: 0; visibility: hidden; pointer-events: none; } }

.tla-loader__inner {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 22px;
	transition: transform .55s cubic-bezier(.2, .7, .2, 1);
}
.tla-done .tla-loader__inner,
body.loaded .tla-loader .tla-loader__inner { transform: scale(1.06); }

.tla-loader__emblem {
	position: relative;
	width: 190px;
	height: 190px;
	display: flex;
	align-items: center;
	justify-content: center;
}

/* 外圈：金色圓環描繪，呼應 Logo 的月桂花環 */
.tla-loader__ring {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	transform: rotate(-90deg);
	overflow: visible;
}
.tla-loader__track {
	fill: none;
	stroke: rgba(208, 176, 64, .18);
	stroke-width: 2;
}
.tla-loader__arc {
	fill: none;
	stroke: var(--tla-gold);
	stroke-width: 3;
	stroke-linecap: round;
	stroke-dasharray: 352;
	stroke-dashoffset: 352;
	transform-origin: 60px 60px;
	animation: tla-ring 1.8s cubic-bezier(.65, 0, .35, 1) infinite;
}
@keyframes tla-ring {
	0%   { stroke-dashoffset: 352; transform: rotate(0deg); }
	50%  { stroke-dashoffset: 90;  transform: rotate(180deg); }
	100% { stroke-dashoffset: 352; transform: rotate(360deg); }
}

/* Logo：由下往上「長出」，像月桂葉生長，之後輕微呼吸 */
.tla-loader__logo {
	position: relative;
	width: 128px;
	height: auto;
	display: block;
	clip-path: inset(100% 0 0 0);
	animation:
		tla-grow .95s cubic-bezier(.25, .8, .25, 1) .1s forwards,
		tla-breathe 2.4s ease-in-out 1.1s infinite;
}
@keyframes tla-grow {
	0%   { clip-path: inset(100% 0 0 0); opacity: .2; }
	100% { clip-path: inset(0 0 0 0);    opacity: 1; }
}
@keyframes tla-breathe {
	0%, 100% { transform: scale(1); }
	50%      { transform: scale(1.035); }
}

/* 光澤：只在 Logo 的形狀上掃過（以 Logo 為遮罩） */
.tla-loader__shine {
	position: absolute;
	left: 50%;
	top: 50%;
	width: 128px;
	height: 117px;
	transform: translate(-50%, -50%);
	pointer-events: none;
	background: linear-gradient(105deg, transparent 35%, rgba(255, 255, 255, .85) 50%, transparent 65%);
	background-size: 300% 100%;
	background-position: 150% 0;
	-webkit-mask-size: contain;
	mask-size: contain;
	-webkit-mask-repeat: no-repeat;
	mask-repeat: no-repeat;
	-webkit-mask-position: center;
	mask-position: center;
	animation: tla-shine 2.4s ease-in-out 1s infinite;
	opacity: .9;
}
@keyframes tla-shine {
	0%   { background-position: 150% 0; }
	55%, 100% { background-position: -50% 0; }
}

.tla-loader__name {
	font-size: 15px;
	letter-spacing: .32em;
	padding-left: .32em;
	color: var(--tla-gold-dark);
	font-weight: 600;
	opacity: 0;
	animation: tla-fade-up .6s ease .55s forwards;
	font-family: "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", sans-serif;
}
.tla-loader__dots { display: flex; gap: 7px; height: 8px; }
.tla-loader__dots i {
	width: 7px; height: 7px; border-radius: 50%;
	background: var(--tla-gold);
	animation: tla-dot 1.2s ease-in-out infinite;
}
.tla-loader__dots i:nth-child(2) { animation-delay: .15s; }
.tla-loader__dots i:nth-child(3) { animation-delay: .3s; }
@keyframes tla-dot {
	0%, 80%, 100% { transform: scale(.5); opacity: .35; }
	40%           { transform: scale(1);  opacity: 1; }
}
@keyframes tla-fade-up {
	from { opacity: 0; transform: translateY(6px); }
	to   { opacity: 1; transform: none; }
}

@media (max-width: 575px) {
	.tla-loader__emblem { width: 160px; height: 160px; }
	.tla-loader__logo, .tla-loader__shine { width: 108px; height: auto; }
	.tla-loader__shine { height: 99px; }
	.tla-loader__name { font-size: 13px; letter-spacing: .22em; }
}

/* ---------------------------------------------------------
   2. 燈箱
   --------------------------------------------------------- */
html.tla-lb-open, html.tla-lb-open body { overflow: hidden !important; }

.tla-zoomable { cursor: zoom-in; }
.tla-zoomable:focus-visible { outline: 3px solid var(--tla-gold); outline-offset: 3px; }

.tla-lb {
	position: fixed;
	inset: 0;
	z-index: 100001;
	display: flex;
	flex-direction: column;
	background: rgba(14, 12, 8, .94);
	opacity: 0;
	visibility: hidden;
	transition: opacity .28s ease, visibility 0s linear .28s;
	-webkit-tap-highlight-color: transparent;
	font-family: "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", sans-serif;
}
.tla-lb.is-open { opacity: 1; visibility: visible; transition: opacity .28s ease; }

.tla-lb__stage {
	position: relative;
	flex: 1 1 auto;
	min-height: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 56px 72px 12px;
	touch-action: pan-y pinch-zoom;
}
.tla-lb__figure {
	margin: 0;
	max-width: 100%;
	max-height: 100%;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	transform: scale(.96);
	opacity: 0;
	transition: transform .32s cubic-bezier(.2, .7, .2, 1), opacity .25s ease;
}
.tla-lb__figure.is-ready { transform: none; opacity: 1; }
.tla-lb__img {
	display: block;
	max-width: 100%;
	max-height: calc(100vh - 190px);
	width: auto;
	height: auto;
	object-fit: contain;
	border-radius: 4px;
	box-shadow: 0 18px 60px rgba(0, 0, 0, .5);
	user-select: none;
	-webkit-user-drag: none;
}
.tla-lb__video {
	position: relative;
	width: min(1100px, calc(100vw - 144px), calc((100vh - 190px) * 16 / 9));
	aspect-ratio: 16 / 9;
	background: #000;
	border-radius: 4px;
	overflow: hidden;
	box-shadow: 0 18px 60px rgba(0, 0, 0, .5);
}
.tla-lb__video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.tla-lb__caption {
	color: #f2ead2;
	font-size: 14px;
	line-height: 1.5;
	margin-top: 12px;
	text-align: center;
	max-width: 900px;
	padding: 0 8px;
}
.tla-lb__caption:empty { display: none; }

.tla-lb__spinner {
	position: absolute;
	left: 50%; top: 50%;
	width: 42px; height: 42px;
	margin: -21px 0 0 -21px;
	border-radius: 50%;
	border: 3px solid rgba(208, 176, 64, .25);
	border-top-color: var(--tla-gold);
	animation: tla-spin .8s linear infinite;
	display: none;
}
.tla-lb.is-loading .tla-lb__spinner { display: block; }
@keyframes tla-spin { to { transform: rotate(360deg); } }

.tla-lb__btn {
	position: absolute;
	z-index: 2;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 48px;
	height: 48px;
	border: 0;
	border-radius: 50%;
	background: rgba(255, 255, 255, .08);
	color: #fff;
	cursor: pointer;
	transition: background .2s ease, transform .2s ease;
	padding: 0;
}
.tla-lb__btn:hover, .tla-lb__btn:focus-visible { background: rgba(208, 176, 64, .85); outline: none; }
.tla-lb__btn svg { width: 24px; height: 24px; stroke: currentColor; fill: none; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.tla-lb__close { top: 12px; right: 14px; }
.tla-lb__prev { left: 14px; top: 50%; transform: translateY(-50%); }
.tla-lb__next { right: 14px; top: 50%; transform: translateY(-50%); }
.tla-lb__prev:active { transform: translateY(-50%) scale(.92); }
.tla-lb__next:active { transform: translateY(-50%) scale(.92); }
.tla-lb.is-single .tla-lb__prev, .tla-lb.is-single .tla-lb__next, .tla-lb.is-single .tla-lb__thumbs { display: none; }

.tla-lb__counter {
	position: absolute;
	top: 22px;
	left: 20px;
	color: #e9dfbf;
	font-size: 14px;
	letter-spacing: .08em;
}
.tla-lb.is-single .tla-lb__counter { display: none; }

.tla-lb__thumbs {
	flex: 0 0 auto;
	display: flex;
	gap: 8px;
	padding: 10px 16px 16px;
	overflow-x: auto;
	justify-content: safe center;
	scrollbar-width: thin;
}
.tla-lb__thumb {
	position: relative;
	flex: 0 0 auto;
	width: 64px;
	height: 48px;
	padding: 0;
	border: 2px solid transparent;
	border-radius: 4px;
	overflow: hidden;
	background: #222;
	cursor: pointer;
	opacity: .55;
	transition: opacity .2s ease, border-color .2s ease;
}
.tla-lb__thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tla-lb__thumb:hover { opacity: .9; }
.tla-lb__thumb.is-active { opacity: 1; border-color: var(--tla-gold); }
.tla-lb__thumb.is-video::after {
	content: "";
	position: absolute;
	left: 50%; top: 50%;
	margin: -7px 0 0 -5px;
	border-style: solid;
	border-width: 7px 0 7px 11px;
	border-color: transparent transparent transparent #fff;
	filter: drop-shadow(0 0 2px rgba(0, 0, 0, .8));
}

@media (max-width: 767px) {
	.tla-lb__stage { padding: 56px 8px 8px; }
	.tla-lb__prev, .tla-lb__next { top: auto; bottom: 8px; transform: none; width: 44px; height: 44px; background: rgba(0, 0, 0, .45); }
	.tla-lb__prev:active, .tla-lb__next:active { transform: scale(.92); }
	.tla-lb__img { max-height: calc(100vh - 170px); }
	.tla-lb__video { width: calc(100vw - 16px); }
	.tla-lb__thumbs { display: none; }
	.tla-lb__stage { padding-bottom: 60px; }
}

/* ---------------------------------------------------------
   3. YouTube 預覽圖（取代直接嵌入的 iframe，點擊後以燈箱播放）
   --------------------------------------------------------- */
.tla-yt {
	position: relative;
	display: block;
	width: 100%;
	aspect-ratio: 16 / 9;
	margin: 0 auto 1em;
	padding: 0;
	border: 0;
	border-radius: 6px;
	overflow: hidden;
	background: #111 center / cover no-repeat;
	cursor: pointer;
	box-shadow: 0 6px 20px rgba(0, 0, 0, .12);
}
.tla-yt::before {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(180deg, rgba(0, 0, 0, .05) 40%, rgba(0, 0, 0, .55) 100%);
	transition: background .25s ease;
}
.tla-yt:hover::before { background: linear-gradient(180deg, rgba(0, 0, 0, .15) 30%, rgba(0, 0, 0, .65) 100%); }
.tla-play {
	position: absolute;
	left: 50%;
	top: 50%;
	width: 68px;
	height: 68px;
	margin: -34px 0 0 -34px;
	border-radius: 50%;
	background: rgba(208, 176, 64, .92);
	box-shadow: 0 6px 22px rgba(0, 0, 0, .35), 0 0 0 6px rgba(255, 255, 255, .25);
	transition: transform .25s ease, background .25s ease;
}
.tla-play::after {
	content: "";
	position: absolute;
	left: 27px;
	top: 21px;
	border-style: solid;
	border-width: 13px 0 13px 21px;
	border-color: transparent transparent transparent #fff;
}
.tla-yt:hover .tla-play, .tla-gallery__item:hover .tla-play { transform: scale(1.08); background: var(--tla-gold-dark); }
.tla-yt__title {
	position: absolute;
	left: 14px;
	right: 14px;
	bottom: 12px;
	color: #fff;
	font-size: 15px;
	text-align: left;
	text-shadow: 0 1px 3px rgba(0, 0, 0, .6);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

/* ---------------------------------------------------------
   4. 物件相簿（商品 / 物件頁）
   --------------------------------------------------------- */
.tla-gallery { margin: 22px 0 8px; }
.tla-gallery__title {
	display: flex;
	align-items: center;
	gap: 10px;
	font-size: 17px;
	font-weight: 600;
	color: var(--tla-ink);
	margin: 0 0 12px;
}
.tla-gallery__title::before {
	content: "";
	width: 4px;
	height: 18px;
	border-radius: 2px;
	background: var(--tla-gold);
}
.tla-gallery__title small { font-weight: 400; color: #888; font-size: 13px; }
.tla-gallery__grid {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
	gap: 8px;
}
.tla-gallery__grid li { margin: 0; padding: 0; }
.tla-gallery__item {
	position: relative;
	display: block;
	aspect-ratio: 4 / 3;
	border-radius: 6px;
	overflow: hidden;
	background: #eee;
}
.tla-gallery__item img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: transform .35s ease;
}
.tla-gallery__item:hover img { transform: scale(1.06); }
.tla-gallery__grid li.is-video { grid-column: span 2; grid-row: span 2; }
.tla-gallery__grid li.is-video .tla-gallery__item { aspect-ratio: auto; height: 100%; min-height: 150px; background: #1d1a14; }
.tla-gallery__item--video .tla-play { width: 54px; height: 54px; margin: -27px 0 0 -27px; }
.tla-gallery__item--video .tla-play::after { left: 21px; top: 16px; border-width: 11px 0 11px 17px; }
.tla-gallery__badge {
	position: absolute;
	left: 8px;
	bottom: 8px;
	padding: 2px 8px;
	border-radius: 10px;
	background: rgba(0, 0, 0, .6);
	color: #fff;
	font-size: 12px;
}

@media (prefers-reduced-motion: reduce) {
	.tla-loader__logo { animation: none; clip-path: none; }
	.tla-loader__arc, .tla-loader__shine, .tla-loader__dots i { animation-duration: 3s; }
	.tla-lb, .tla-lb__figure, .tla-gallery__item img { transition: none; }
}

/* ---------------------------------------------------------
   5. 行動版修正：輪播初始化前，大圖不撐開版面（原模板問題）
   --------------------------------------------------------- */
.tt-mobile-product-slider img,
.tt-post-content img { max-width: 100%; height: auto; }
.tt-mobile-product-slider:not(.slick-initialized) > div + div { display: none; }
.tt-post-content iframe { max-width: 100%; }

/* 長者友善：燈箱按鈕放大、關閉鈕顯示文字 */
.tla-lb__counter { font-size: 17px; }
.tla-lb__caption { font-size: 17px; }
.tla-lb__btn { width: 56px; height: 56px; }
.tla-lb__close { width: auto; padding: 0 20px; border-radius: 999px; gap: 6px; background: rgba(255, 255, 255, .16); font: inherit; font-size: 17px; color: #FFFFFF; }
.tla-lb__close::after { content: "關閉"; }
@media (max-width: 767px) {
	.tla-lb__prev, .tla-lb__next { width: 60px; height: 60px; bottom: 14px; background: rgba(255, 255, 255, .18); }
	.tla-lb__stage { padding-bottom: 84px; }
}

/* 表單錯誤提示（入會申請等） */
.bao-field-error { margin: 6px 0 14px; color: #B42318; font-size: 16px; font-weight: 700; line-height: 1.5; }
.bao-field-error::before { content: "⚠ "; }
input[aria-invalid="true"], textarea[aria-invalid="true"] { border-color: #B42318 !important; box-shadow: 0 0 0 3px rgba(180, 35, 24, .15) !important; }
.bao-form-alert { margin: 0 0 24px; padding: 16px 20px; border: 2px solid #B42318; border-radius: 12px; background: #FEF3F2; color: #7A271A; font-size: 17px; line-height: 1.7; }
.bao-form-alert ul { margin: 8px 0 0; padding-left: 1.2em; }
.bao-form-alert a { color: #7A271A; text-decoration: underline; }
#member .form-control { font-size: 18px; min-height: 52px; }
#member .control-label { font-size: 17px; }
#member .form-control { color: #17171A; background-color: #FFFFFF; border: 1.5px solid #A9A9B2; border-radius: 12px; }
#member .form-control::placeholder { color: #8A8A93; }
#member .form-control:focus { border-color: #C9A23A; box-shadow: 0 0 0 4px rgba(201, 162, 58, .2); }
