/* ============================================================
   ExamPro — visual refinements (loaded after style.css)
   Sections: tokens · header · hero · stats · sections/cards ·
             steps/CTA · footer · LINE login · shop filter · motion
   ============================================================ */

:root {
	--primary-deep:  #12264d;
	--accent-soft:   #fff4cc;
	--line-green:    #06c755;
	--line-green-dk: #05a948;
	--shadow-sm:     0 1px 2px rgba(18,38,77,.06), 0 2px 8px rgba(18,38,77,.05);
	--shadow:        0 4px 14px rgba(18,38,77,.08), 0 12px 32px rgba(18,38,77,.07);
	--shadow-lg:     0 10px 24px rgba(18,38,77,.12), 0 24px 56px rgba(18,38,77,.12);
	--ease:          cubic-bezier(.2,.7,.2,1);
}

body { background: linear-gradient(180deg, #f4f7fc 0, var(--bg) 480px); }

::selection { background: var(--primary-border); color: var(--primary-deep); }

:focus-visible {
	outline: 3px solid rgba(34,113,177,.45);
	outline-offset: 2px;
	border-radius: 4px;
}

/* ── Header ───────────────────────────────────────────────── */
.site-header {
	background: rgba(255,255,255,.86);
	-webkit-backdrop-filter: saturate(180%) blur(14px);
	backdrop-filter: saturate(180%) blur(14px);
	box-shadow: 0 1px 0 var(--border);
	transition: box-shadow .25s var(--ease), background .25s var(--ease);
}
.site-header.scrolled { box-shadow: 0 6px 24px rgba(18,38,77,.10); background: rgba(255,255,255,.94); }

.logo-icon { box-shadow: 0 6px 14px rgba(34,113,177,.32); }

.main-nav a { position: relative; }
.main-nav a::after {
	content: '';
	position: absolute;
	left: 14px; right: 14px; bottom: 3px;
	height: 2px;
	background: var(--accent);
	border-radius: 2px;
	transform: scaleX(0);
	transition: transform .25s var(--ease);
}
.main-nav a:hover::after,
.main-nav .current-menu-item a::after { transform: scaleX(1); }

.btn-login, .btn-register, .btn-cart { transition: transform .2s var(--ease), box-shadow .2s var(--ease), background .2s; }
.btn-register { box-shadow: 0 4px 12px rgba(34,113,177,.30); }
.btn-register:hover { transform: translateY(-1px); box-shadow: 0 8px 18px rgba(34,113,177,.36); opacity: 1; }
.btn-login:hover { transform: translateY(-1px); }

.header-user {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 4px 14px 4px 4px;
	border: 2px solid var(--primary-border);
	border-radius: 50px;
	font-weight: 700;
	font-size: .9rem;
	color: var(--primary);
	max-width: 190px;
}
.header-user:hover { background: var(--primary-pale); color: var(--primary); }
.header-user img { width: 30px; height: 30px; border-radius: 50%; object-fit: cover; }
.header-user span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ── Hero ─────────────────────────────────────────────────── */
.hero {
	background:
		radial-gradient(900px 420px at 85% -10%, rgba(248,180,0,.22), transparent 60%),
		radial-gradient(700px 500px at 0% 110%, rgba(58,111,216,.55), transparent 60%),
		linear-gradient(135deg, var(--primary-deep) 0%, var(--primary) 45%, var(--primary-mid) 100%);
	padding: 88px 0 128px;
}
.hero::before {
	inset: 0; top: 0; right: 0;
	width: auto; height: auto;
	border-radius: 0;
	background-image: radial-gradient(rgba(255,255,255,.12) 1px, transparent 1.5px);
	background-size: 26px 26px;
	-webkit-mask-image: linear-gradient(180deg, #000 0, transparent 85%);
	mask-image: linear-gradient(180deg, #000 0, transparent 85%);
}
.hero::after { display: none; }

.hero-badge {
	background: rgba(255,255,255,.12);
	-webkit-backdrop-filter: blur(6px);
	backdrop-filter: blur(6px);
	box-shadow: inset 0 0 0 1px rgba(255,255,255,.18);
}
.hero h1 { font-size: clamp(2.1rem, 5.4vw, 3.4rem); letter-spacing: -.01em; text-shadow: 0 2px 24px rgba(0,0,0,.25); }
.hero h1 span {
	background: linear-gradient(90deg, #ffd24d, #f8b400 60%, #ffcf5a);
	-webkit-background-clip: text; background-clip: text;
	-webkit-text-fill-color: transparent; color: transparent;
}
.hero p { color: rgba(255,255,255,.88); max-width: 600px; margin-left: auto; margin-right: auto; }

.hero-search {
	border-radius: 16px;
	padding: 6px;
	box-shadow: 0 18px 50px rgba(0,0,0,.28), 0 0 0 4px rgba(255,255,255,.12);
	transition: box-shadow .25s var(--ease);
}
.hero-search:focus-within { box-shadow: 0 18px 50px rgba(0,0,0,.30), 0 0 0 4px rgba(248,180,0,.55); }
.hero-search input { border-radius: 12px; padding: 14px 18px; }
.hero-search button { border-radius: 12px; padding: 14px 26px; }
.hero-search button:hover { transform: translateY(-1px); }

/* ── Stats bar floats over the hero edge ─────────────────── */
.stats-bar { background: transparent; box-shadow: none; padding: 0; margin-top: -56px; position: relative; z-index: 2; }
.stats-grid {
	background: var(--white);
	border-radius: var(--radius-lg);
	box-shadow: var(--shadow-lg);
	padding: 26px 8px;
	border: 1px solid rgba(195,213,240,.6);
}
.stat-number {
	background: linear-gradient(135deg, var(--primary), var(--primary-light));
	-webkit-background-clip: text; background-clip: text;
	-webkit-text-fill-color: transparent;
	font-variant-numeric: tabular-nums;
}

/* ── Sections ─────────────────────────────────────────────── */
.section { padding: 76px 0; }
.section-alt { background: linear-gradient(180deg, #fff 0, #f7faff 100%); }

.section-header h2 { position: relative; padding-bottom: 14px; }
.section-header h2::after {
	content: '';
	display: block;
	width: 48px; height: 4px;
	margin: 12px auto 0;
	border-radius: 4px;
	background: linear-gradient(90deg, var(--accent), #ffd24d);
}
.section-label { box-shadow: inset 0 0 0 1px var(--primary-border); }

.category-card { border-width: 1px; box-shadow: var(--shadow-sm); transition: transform .25s var(--ease), box-shadow .25s var(--ease), border-color .25s; }
.category-card:hover { box-shadow: var(--shadow); border-color: var(--primary-border); }
.category-icon { background: linear-gradient(135deg, var(--primary-pale), #dbe8ff); border-radius: 14px; transition: transform .25s var(--ease); }
.category-card:hover .category-icon { transform: scale(1.08) rotate(-3deg); }

.exam-card { border-radius: 16px; box-shadow: var(--shadow-sm); }
.exam-card:hover { box-shadow: var(--shadow-lg); border-color: var(--primary-border); transform: translateY(-6px); }
.exam-card-title { letter-spacing: -.005em; }
.btn-buy { border-radius: 10px; }

/* ── Steps / CTA ──────────────────────────────────────────── */
.step-number { box-shadow: 0 10px 24px rgba(34,113,177,.22); }
.step-item { transition: transform .25s var(--ease); }
.step-item:hover { transform: translateY(-4px); }

.cta-banner { position: relative; overflow: hidden; }
.cta-banner::before {
	content: '';
	position: absolute; inset: 0;
	background: radial-gradient(600px 240px at 90% 0, rgba(248,180,0,.20), transparent 70%);
	pointer-events: none;
}
.cta-banner .container { position: relative; }
.btn-white, .btn-ghost { transition: transform .2s var(--ease), background .2s, color .2s, border-color .2s; }
.btn-white:hover, .btn-ghost:hover { transform: translateY(-2px); }

/* ── Footer ───────────────────────────────────────────────── */
.site-footer { background: linear-gradient(180deg, var(--primary) 0, var(--primary-deep) 100%); position: relative; }
.site-footer::before {
	content: '';
	position: absolute; left: 0; right: 0; top: 0; height: 3px;
	background: linear-gradient(90deg, var(--accent), #ffd24d 40%, var(--primary-light));
}
.footer-col a { position: relative; }
.footer-col a:hover { padding-left: 4px; }

/* ── Notices ──────────────────────────────────────────────── */
.woocommerce-message, .woocommerce-info, .woocommerce-error { box-shadow: var(--shadow-sm); }

/* ============================================================
   LOGIN PAGE + LINE LOGIN
   ============================================================ */
html body.woocommerce-account:not(.logged-in) {
	background:
		radial-gradient(700px 360px at 50% -80px, rgba(34,113,177,.14), transparent 70%),
		var(--bg);
}
html body.woocommerce-account:not(.logged-in) #customer_login.is-single {
	grid-template-columns: minmax(0, 480px) !important;
	justify-content: center !important;
}
.woocommerce-account:not(.logged-in) .u-column1,
.woocommerce-account:not(.logged-in) .u-column2 {
	border-radius: var(--radius-lg);
	box-shadow: var(--shadow);
	border-color: rgba(195,213,240,.7);
}

.line-login-wrap { margin: 0 0 6px; }
.line-login-btn {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	width: 100%;
	padding: 13px 20px;
	background: var(--line-green);
	color: #fff !important;
	border-radius: var(--radius);
	font-size: 1.02rem;
	font-weight: 800;
	font-family: inherit;
	text-decoration: none !important;
	box-shadow: 0 6px 16px rgba(6,199,85,.32);
	transition: transform .2s var(--ease), box-shadow .2s var(--ease), background .2s;
}
.line-login-btn:hover { background: var(--line-green-dk); transform: translateY(-2px); box-shadow: 0 10px 24px rgba(6,199,85,.40); color: #fff !important; }
.line-login-icon { flex-shrink: 0; }
.line-admin-hint { margin: 0 0 18px; padding: 10px 14px; background: var(--accent-soft); border-radius: var(--radius-sm); font-size: .85rem; color: #8a5a00; }
.mobile-nav-actions .line-login-btn { padding: 11px; }
.line-login-btn--inline { width: auto; display: inline-flex; padding: 13px 32px; }
.line-login-hint { text-align: center; font-size: .8rem; color: var(--text-light); margin: 10px 0 0; }

.login-divider { display: flex; align-items: center; gap: 12px; margin: 18px 0 22px; color: var(--text-light); font-size: .82rem; }
.login-divider::before, .login-divider::after { content: ''; flex: 1; height: 1px; background: var(--border); }

/* Link panel in My Account → Account details */
.line-link-panel {
	margin-top: 28px;
	padding: 20px 22px;
	background: #f1fcf5;
	border: 1px solid #c8f0d6;
	border-radius: var(--radius);
}
.line-link-panel h3 { font-size: 1.05rem; margin-bottom: 8px; color: #067a37; }
.line-link-panel .line-login-btn { width: auto; display: inline-flex; padding: 11px 22px; margin-top: 6px; }
.line-link-status { margin: 0 0 8px; color: var(--text-mid); }
.line-link-status.is-linked { color: #067a37; font-weight: 700; }
.line-link-warn { color: #8a5a00; background: var(--accent-soft); padding: 10px 14px; border-radius: var(--radius-sm); font-size: .9rem; }
.line-unlink-btn { display: inline-block; margin-top: 4px; font-size: .88rem; color: var(--danger); font-weight: 600; }

/* ============================================================
   SHOP FILTER
   ============================================================ */
.shop-layout { grid-template-columns: 280px minmax(0, 1fr); gap: 32px; align-items: start; }

.shop-sidebar { position: sticky; top: calc(var(--header-h) + 16px); max-height: calc(100vh - var(--header-h) - 32px); overflow-y: auto; scrollbar-width: thin; padding-right: 2px; }

.filter-panel {
	background: var(--white);
	border: 1px solid var(--border);
	border-radius: var(--radius-lg);
	box-shadow: var(--shadow-sm);
	padding: 0 0 4px;
	overflow: hidden;
}

.filter-head {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 16px 18px 12px;
	color: var(--primary);
	font-size: 1rem;
}
.filter-head strong { flex: 1; }
.filter-reset { font-size: .8rem; font-weight: 600; color: var(--text-light); }
.filter-reset:hover { color: var(--danger); }
.filter-close { display: none; width: 34px; height: 34px; border: none; border-radius: 50%; background: var(--bg); color: var(--text-mid); font-size: 1rem; }

.filter-search { padding: 0 18px 14px; }
.filter-search input {
	width: 100%;
	padding: 11px 14px 11px 40px;
	border: 1.5px solid var(--border);
	border-radius: 12px;
	font-family: inherit;
	font-size: .92rem;
	background: var(--bg) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23718096' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.5-3.5'/%3E%3C/svg%3E") no-repeat 13px center / 18px;
	transition: border-color .15s, box-shadow .15s, background-color .15s;
}
.filter-search input:focus { outline: none; background-color: #fff; border-color: var(--primary-light); box-shadow: 0 0 0 3px rgba(34,113,177,.15); }

.filter-group { border-top: 1px solid var(--border); padding: 0 18px; }
.filter-group > summary {
	list-style: none;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 14px 0;
	font-size: .82rem;
	font-weight: 800;
	letter-spacing: .06em;
	text-transform: uppercase;
	color: var(--primary);
	user-select: none;
}
.filter-group > summary::-webkit-details-marker { display: none; }
.filter-group > summary::after {
	content: '';
	width: 8px; height: 8px;
	border-right: 2px solid var(--text-light);
	border-bottom: 2px solid var(--text-light);
	transform: rotate(45deg);
	transition: transform .2s var(--ease);
	margin-right: 4px;
}
.filter-group[open] > summary::after { transform: rotate(-135deg); }
.filter-group > :last-child { margin-bottom: 16px; }

/* Checkbox rows */
.filter-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.filter-list .filter-list { margin: 2px 0 4px 18px; padding-left: 10px; border-left: 2px solid var(--primary-pale); }
.filter-row { display: flex; align-items: center; gap: 4px; }

.filter-check {
	flex: 1;
	min-width: 0;
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 7px 8px;
	border-radius: 8px;
	cursor: pointer;
	font-size: .9rem;
	color: var(--text-mid);
	transition: background .15s, color .15s;
}
.filter-check:hover { background: var(--primary-pale); color: var(--primary); }
.filter-check input { position: absolute; opacity: 0; pointer-events: none; }
.filter-check .box {
	flex-shrink: 0;
	width: 18px; height: 18px;
	border: 2px solid var(--border-dark);
	border-radius: 5px;
	background: #fff;
	position: relative;
	transition: background .15s, border-color .15s;
}
.filter-check .box::after {
	content: '';
	position: absolute;
	left: 4px; top: 0;
	width: 5px; height: 10px;
	border: solid #fff;
	border-width: 0 2px 2px 0;
	transform: rotate(45deg) scale(0);
	transition: transform .15s var(--ease);
}
.filter-check input:checked + .box { background: var(--primary-light); border-color: var(--primary-light); }
.filter-check input:checked + .box::after { transform: rotate(45deg) scale(1); }
.filter-check input:focus-visible + .box { box-shadow: 0 0 0 3px rgba(34,113,177,.3); }
.filter-check input:checked ~ .lbl { color: var(--primary); font-weight: 700; }
.filter-check .lbl { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; line-height: 1.35; }
.filter-check .cnt {
	flex-shrink: 0;
	font-size: .7rem;
	font-weight: 700;
	padding: 1px 8px;
	border-radius: 50px;
	background: var(--bg);
	color: var(--text-light);
}
.filter-check input:checked ~ .cnt { background: var(--primary-border); color: var(--primary); }

/* Sub-category tree */
.filter-children { display: none; }
.filter-item.is-open > .filter-children { display: flex; }
html:not(.js) .filter-children { display: flex; }
.filter-expand {
	flex-shrink: 0;
	width: 28px; height: 28px;
	border: none; background: none;
	border-radius: 8px;
	position: relative;
}
.filter-expand:hover { background: var(--primary-pale); }
.filter-expand::before {
	content: '';
	position: absolute; left: 10px; top: 9px;
	width: 7px; height: 7px;
	border-right: 2px solid var(--text-light);
	border-bottom: 2px solid var(--text-light);
	transform: rotate(45deg);
	transition: transform .2s var(--ease);
}
.filter-item.is-open > .filter-row > .filter-expand::before { transform: rotate(-135deg); top: 12px; }

/* Pills (price type, tags) */
.filter-radios, .filter-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.filter-pill input { position: absolute; opacity: 0; pointer-events: none; }
.filter-pill span {
	display: inline-block;
	padding: 6px 14px;
	border: 1.5px solid var(--border);
	border-radius: 50px;
	font-size: .84rem;
	font-weight: 600;
	color: var(--text-mid);
	background: #fff;
	cursor: pointer;
	transition: all .15s var(--ease);
}
.filter-pill span:hover { border-color: var(--primary-border); background: var(--primary-pale); color: var(--primary); }
.filter-pill input:checked + span { background: var(--primary); border-color: var(--primary); color: #fff; box-shadow: 0 4px 10px rgba(30,58,110,.25); }
.filter-pill input:focus-visible + span { box-shadow: 0 0 0 3px rgba(34,113,177,.3); }

.filter-range { display: flex; align-items: center; gap: 8px; margin-top: 12px; }
.filter-range input {
	flex: 1;
	min-width: 0;
	padding: 9px 10px;
	border: 1.5px solid var(--border);
	border-radius: 10px;
	font-family: inherit;
	font-size: .88rem;
	-moz-appearance: textfield;
}
.filter-range input::-webkit-outer-spin-button, .filter-range input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.filter-range input:focus { outline: none; border-color: var(--primary-light); box-shadow: 0 0 0 3px rgba(34,113,177,.15); }
.filter-range .unit { color: var(--text-light); font-weight: 700; }

/* Apply button: the form auto-applies with JS, so the button is only needed on mobile / no-JS */
.filter-foot { padding: 4px 18px 14px; }
.filter-apply {
	width: 100%;
	padding: 12px;
	border: none;
	border-radius: 12px;
	background: linear-gradient(135deg, var(--primary), var(--primary-mid));
	color: #fff;
	font-family: inherit;
	font-weight: 800;
	font-size: .95rem;
	box-shadow: 0 6px 16px rgba(30,58,110,.25);
}
.filter-panel.is-ajax .filter-foot { display: none; }

/* Active chips */
.active-filter-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 18px; }
.filter-chip {
	display: inline-flex; align-items: center; gap: 6px;
	padding: 5px 8px 5px 14px;
	background: var(--primary-pale);
	border: 1px solid var(--primary-border);
	border-radius: 50px;
	color: var(--primary);
	font-size: .82rem; font-weight: 700;
	transition: background .15s, border-color .15s;
}
.filter-chip .remove {
	display: inline-flex; align-items: center; justify-content: center;
	width: 18px; height: 18px;
	border-radius: 50%;
	background: rgba(30,58,110,.12);
	font-size: .9rem; line-height: 1; opacity: 1;
}
.filter-chip:hover { background: #fde8e8; border-color: #f5b5b5; color: #a12626; }
.filter-chip:hover .remove { background: #f5b5b5; }
.filter-clear { font-size: .82rem; font-weight: 600; color: var(--text-light); text-decoration: underline; margin-left: 4px; }

.filter-empty-actions { text-align: center; margin-top: 16px; }
.filter-clear-btn { display: inline-block; padding: 10px 24px; border-radius: 10px; background: var(--primary); color: #fff !important; font-weight: 700; }

.filter-toggle {
	display: none;
	align-items: center;
	gap: 8px;
	padding: 9px 16px;
	border: 1.5px solid var(--primary-border);
	border-radius: 10px;
	background: #fff;
	color: var(--primary);
	font-family: inherit;
	font-weight: 700;
	font-size: .9rem;
}
.filter-toggle-count {
	min-width: 20px; height: 20px; padding: 0 6px;
	border-radius: 10px;
	background: var(--accent);
	color: var(--primary-deep);
	font-size: .72rem; font-weight: 800;
	display: inline-flex; align-items: center; justify-content: center;
}
.filter-toggle-count[hidden] { display: none; }

.filter-overlay { position: fixed; inset: 0; background: rgba(10,20,40,.5); opacity: 0; pointer-events: none; transition: opacity .25s; z-index: 1098; }

/* Results loading state */
.shop-main { transition: opacity .15s; }
.shop-main.is-loading { opacity: .45; pointer-events: none; }

.shop-toolbar { border-radius: 14px; box-shadow: var(--shadow-sm); }

/* Mobile: filter becomes a bottom sheet */
@media (max-width: 768px) {
	html body .shop-layout { display: block; }
	html body .shop-sidebar {
		display: block;
		position: fixed;
		left: 0; right: 0; bottom: 0; top: auto;
		max-height: 88vh;
		padding: 0;
		overflow-y: auto;
		background: #fff;
		border-radius: 22px 22px 0 0;
		box-shadow: 0 -12px 40px rgba(10,20,40,.25);
		transform: translateY(105%);
		transition: transform .3s var(--ease);
		z-index: 1099;
		-webkit-overflow-scrolling: touch;
	}
	.filter-panel { border: none; border-radius: 22px 22px 0 0; box-shadow: none; }
	.filter-head { position: sticky; top: 0; background: #fff; z-index: 2; border-bottom: 1px solid var(--border); }
	.filter-close { display: inline-flex; align-items: center; justify-content: center; }
	.filter-panel.is-ajax .filter-foot { display: block; position: sticky; bottom: 0; background: linear-gradient(180deg, rgba(255,255,255,0), #fff 30%); padding-top: 14px; }
	.filter-toggle { display: inline-flex; }
	body.filter-open { overflow: hidden; }
	body.filter-open .shop-sidebar { transform: translateY(0); }
	body.filter-open .filter-overlay { opacity: 1; pointer-events: auto; }

	.hero { padding: 64px 0 108px; }
	.stats-grid { grid-template-columns: repeat(2, 1fr); row-gap: 14px; }
	.stat-item:nth-child(2) { border-right: none; }
	.section { padding: 56px 0; }
}

/* ============================================================
   MOTION
   ============================================================ */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
.reveal.is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; scroll-behavior: auto !important; }
	.reveal { opacity: 1; transform: none; }
}
