/* PT Header Footer v1.1 — frontend */

:root {
	--pthf-accent: #1e40af;
	--pthf-bg: #ffffff;
	--pthf-text: #111827;
	--pthf-muted: #6b7280;
	--pthf-border: #e5e7eb;
	--pthf-soft: #f8fafc;
	--pthf-footer-bg: #0f172a;
	--pthf-footer-text: #cbd5e1;
	--pthf-radius: 8px;
	--pthf-shadow: 0 10px 30px rgba(15, 23, 42, .12);
	--pthf-font: inherit;
}

.pthf-root, .pthf-root *, .pthf-drawer, .pthf-drawer *, .pthf-search-overlay, .pthf-search-overlay * { box-sizing: border-box; }
.pthf-root { font-family: var(--pthf-font); }
.pthf-root img { max-width: 100%; height: auto; }

.pthf-container { max-width: 1280px; margin: 0 auto; padding: 0 20px; }

/* ---------- Sticky ---------- */
.pthf-root.pthf-sticky { position: sticky; top: 0; z-index: 999; }
body.admin-bar .pthf-root.pthf-sticky { top: 32px; }

/* ---------- Marquee bar ---------- */
.pthf-marquee {
	overflow: hidden;
	color: #fff;
	position: relative;
}
.pthf-marquee-track {
	display: flex;
	width: max-content;
	animation: pthf-scroll var(--pthf-mq-speed, 30s) linear infinite;
}
.pthf-marquee:hover .pthf-marquee-track { animation-play-state: paused; }
.pthf-marquee-group {
	display: flex;
	align-items: center;
	justify-content: space-around;
	gap: 56px;
	min-width: 100vw;
	padding: 9px 28px;
	flex-shrink: 0;
}
.pthf-marquee-item {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	font-size: 13px;
	font-weight: 600;
	letter-spacing: .02em;
	white-space: nowrap;
}
.pthf-marquee-item svg { width: 16px; height: 16px; flex-shrink: 0; }
@keyframes pthf-scroll { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) {
	.pthf-marquee-track { animation: none; }
}

/* ---------- RUO bar ---------- */
.pthf-ruo-bar {
	background: var(--pthf-accent);
	color: #fff;
	text-align: center;
	font-size: 14px;
	font-weight: 600;
	letter-spacing: .02em;
	padding: 9px 16px;
}
.pthf-ruo-icon { margin-right: 6px; }

/* ---------- Header shell ---------- */
.pthf-header { background: var(--pthf-bg); border-bottom: 1px solid var(--pthf-border); }
.pthf-row { display: flex; align-items: center; gap: 24px; min-height: 76px; }
.pthf-logo { display: flex; align-items: center; flex-shrink: 0; }
.pthf-logo img { max-height: 56px; width: auto; }
.pthf-site-name { font-size: 22px; font-weight: 700; color: var(--pthf-text); text-decoration: none; letter-spacing: .01em; }

/* ---------- Nav ---------- */
.pthf-nav { flex: 1; display: flex; justify-content: center; }
.pthf-nav-right { justify-content: flex-end; }
.pthf-menu, .pthf-menu ul { list-style: none; margin: 0; padding: 0; }
.pthf-menu { display: flex; gap: 4px; }
.pthf-menu > li { position: relative; }
.pthf-menu a {
	display: block;
	padding: 10px 14px;
	color: var(--pthf-text);
	text-decoration: none;
	font-size: 15px;
	font-weight: 500;
	border-radius: 6px;
	transition: color .15s ease, background .15s ease;
}
.pthf-menu a:hover { color: var(--pthf-accent); background: rgba(0, 0, 0, .035); }
.pthf-menu .sub-menu {
	position: absolute;
	top: 100%;
	left: 0;
	min-width: 210px;
	background: var(--pthf-bg);
	border: 1px solid var(--pthf-border);
	border-radius: var(--pthf-radius);
	box-shadow: var(--pthf-shadow);
	padding: 6px;
	opacity: 0;
	visibility: hidden;
	transform: translateY(6px);
	transition: all .18s ease;
	z-index: 60;
}
.pthf-menu > li:hover > .sub-menu { opacity: 1; visibility: visible; transform: translateY(0); }

/* ---------- Actions ---------- */
.pthf-actions { display: flex; align-items: center; gap: 6px; margin-left: auto; flex-shrink: 0; }
.pthf-actions-left { margin-left: 0; margin-right: auto; }
.pthf-action { position: relative; }
.pthf-icon-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 42px;
	height: 42px;
	border: 0;
	background: transparent;
	color: var(--pthf-text);
	cursor: pointer;
	border-radius: 50%;
	position: relative;
	text-decoration: none;
	transition: color .15s ease, background .15s ease;
}
.pthf-icon-btn:hover { color: var(--pthf-accent); background: rgba(0, 0, 0, .05); }
.pthf-icon-btn svg { width: 22px; height: 22px; }

.pthf-cart-btn .pthf-cart-count {
	position: absolute;
	top: 2px;
	right: 0;
}
.pthf-cart-count {
	min-width: 17px;
	height: 17px;
	padding: 0 4px;
	background: var(--pthf-accent);
	color: #fff;
	font-size: 11px;
	font-weight: 700;
	line-height: 17px;
	text-align: center;
	border-radius: 999px;
	display: inline-block;
}
.pthf-drawer-head .pthf-cart-count { background: transparent; color: inherit; font-size: inherit; min-width: 0; padding: 0; line-height: inherit; }

/* ---------- Account dropdown ---------- */
.pthf-account-drop {
	position: absolute;
	top: calc(100% + 10px);
	right: 0;
	width: 320px;
	background: var(--pthf-bg);
	border: 1px solid var(--pthf-border);
	border-radius: var(--pthf-radius);
	box-shadow: var(--pthf-shadow);
	padding: 20px;
	opacity: 0;
	visibility: hidden;
	transform: translateY(8px);
	transition: all .2s ease;
	z-index: 80;
}
.pthf-account.pthf-open .pthf-account-drop { opacity: 1; visibility: visible; transform: translateY(0); }
@media (hover: hover) {
	.pthf-account[data-trigger="hover"]:hover .pthf-account-drop { opacity: 1; visibility: visible; transform: translateY(0); }
}
.pthf-drop-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.pthf-drop-head strong { font-size: 17px; color: var(--pthf-text); }
.pthf-create-link { font-size: 13px; color: var(--pthf-accent); text-decoration: none; font-weight: 600; }
.pthf-account-drop form.login, .pthf-account-drop form#loginform { margin: 0; border: 0; padding: 0; }
.pthf-account-drop p { margin: 0 0 12px; }
.pthf-account-drop label { display: block; font-size: 13px; color: var(--pthf-muted); margin-bottom: 4px; }
.pthf-account-drop input[type="text"], .pthf-account-drop input[type="password"] {
	width: 100%;
	padding: 10px 12px;
	border: 1px solid var(--pthf-border);
	border-radius: 6px;
	font-size: 14px;
}
.pthf-account-drop button[type="submit"], .pthf-account-drop input[type="submit"] {
	width: 100%;
	padding: 11px 16px;
	background: var(--pthf-accent);
	color: #fff;
	border: 0;
	border-radius: 6px;
	font-size: 14px;
	font-weight: 700;
	cursor: pointer;
}
.pthf-account-drop .lost_password { text-align: right; }
.pthf-account-drop .lost_password a, .pthf-account-drop .woocommerce-LostPassword a { font-size: 13px; color: var(--pthf-accent); text-decoration: none; }

/* ---------- Centered header ---------- */
.pthf-style-centered .pthf-center-top { display: flex; align-items: center; min-height: 84px; position: relative; }
.pthf-style-centered .pthf-logo { position: absolute; left: 50%; transform: translateX(-50%); }
.pthf-style-centered .pthf-center-nav { border-top: 1px solid var(--pthf-border); }
.pthf-style-centered .pthf-nav { min-height: 50px; align-items: center; }

/* ---------- Burger / mobile ---------- */
.pthf-burger {
	display: none;
	flex-direction: column;
	justify-content: center;
	gap: 5px;
	width: 42px;
	height: 42px;
	border: 0;
	background: transparent;
	cursor: pointer;
	padding: 10px;
}
.pthf-burger span { display: block; height: 2px; width: 100%; background: var(--pthf-text); border-radius: 2px; transition: transform .2s ease, opacity .2s ease; }
.pthf-menu-open .pthf-burger span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.pthf-menu-open .pthf-burger span:nth-child(2) { opacity: 0; }
.pthf-menu-open .pthf-burger span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 900px) {
	.pthf-burger { display: flex; }
	.pthf-header { position: relative; }
	.pthf-header .pthf-nav {
		display: none;
		position: absolute;
		left: 0;
		right: 0;
		top: 100%;
		background: var(--pthf-bg);
		border-bottom: 1px solid var(--pthf-border);
		box-shadow: var(--pthf-shadow);
		padding: 10px 20px 16px;
		z-index: 90;
	}
	.pthf-header.pthf-menu-open .pthf-nav { display: block; }
	.pthf-menu { flex-direction: column; gap: 0; }
	.pthf-menu .sub-menu { position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none; border: 0; padding-left: 16px; }
	.pthf-style-centered .pthf-logo { position: static; transform: none; margin: 0 auto; }
	.pthf-account-drop { position: fixed; left: 12px; right: 12px; top: auto; bottom: 12px; width: auto; }
	.pthf-marquee-group { gap: 36px; }
}

/* ---------- Search overlay ---------- */
.pthf-search-overlay {
	position: fixed;
	inset: 0;
	background: rgba(15, 23, 42, .55);
	backdrop-filter: blur(3px);
	z-index: 100000;
	display: none;
	padding: 10vh 20px 0;
}
.pthf-search-overlay.pthf-open { display: block; }
.pthf-search-panel { max-width: 640px; margin: 0 auto; background: var(--pthf-bg); border-radius: var(--pthf-radius); box-shadow: var(--pthf-shadow); overflow: hidden; }
.pthf-search-form { display: flex; align-items: center; margin: 0; border-bottom: 1px solid var(--pthf-border); }
.pthf-search-input { flex: 1; border: 0; outline: none; padding: 18px 20px; font-size: 17px; background: transparent; color: var(--pthf-text); }
.pthf-search-close { border: 0; background: transparent; font-size: 28px; line-height: 1; padding: 0 18px; cursor: pointer; color: var(--pthf-muted); }
.pthf-search-results { max-height: 55vh; overflow-y: auto; }
.pthf-search-results:empty { display: none; }
.pthf-result { display: flex; align-items: center; gap: 14px; padding: 12px 20px; text-decoration: none; border-bottom: 1px solid var(--pthf-border); transition: background .12s ease; }
.pthf-result:hover { background: rgba(0, 0, 0, .035); }
.pthf-result img { width: 46px; height: 46px; object-fit: cover; border-radius: 6px; flex-shrink: 0; }
.pthf-result-title { color: var(--pthf-text); font-size: 15px; font-weight: 600; }
.pthf-result-price { margin-left: auto; color: var(--pthf-accent); font-weight: 700; font-size: 14px; white-space: nowrap; }
.pthf-result-empty, .pthf-result-all { display: block; padding: 14px 20px; font-size: 14px; color: var(--pthf-muted); text-align: center; text-decoration: none; }
.pthf-result-all { color: var(--pthf-accent); font-weight: 600; }

/* ---------- Cart drawer shell ---------- */
.pthf-drawer-overlay {
	position: fixed;
	inset: 0;
	background: rgba(15, 23, 42, .5);
	z-index: 100000;
	opacity: 0;
	visibility: hidden;
	transition: opacity .25s ease;
}
.pthf-drawer {
	position: fixed;
	top: 0;
	right: 0;
	bottom: 0;
	width: 420px;
	max-width: 94vw;
	background: var(--pthf-bg);
	z-index: 100001;
	transform: translateX(100%);
	transition: transform .28s ease;
	display: flex;
	flex-direction: column;
	box-shadow: -12px 0 40px rgba(15, 23, 42, .18);
	font-family: var(--pthf-font);
	color: var(--pthf-text);
}
body.pthf-drawer-open .pthf-drawer { transform: translateX(0); }
body.pthf-drawer-open .pthf-drawer-overlay { opacity: 1; visibility: visible; }

.pthf-drawer-head {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 16px 20px;
	border-bottom: 1px solid var(--pthf-border);
	font-size: 16px;
	font-weight: 700;
}
.pthf-drawer-close { border: 0; background: transparent; font-size: 28px; line-height: 1; cursor: pointer; color: var(--pthf-muted); }

.pthf-drawer-body { flex: 1; overflow-y: auto; padding: 6px 20px 14px; }
.pthf-drawer-foot { border-top: 1px solid var(--pthf-border); padding: 14px 20px 18px; background: var(--pthf-bg); }
.pthf-drawer.pthf-busy .pthf-drawer-body,
.pthf-drawer.pthf-busy .pthf-drawer-foot { opacity: .45; pointer-events: none; transition: opacity .15s ease; }

/* ---------- Cart items ---------- */
.pthf-cart-items { list-style: none; margin: 0; padding: 0; }
.pthf-ci { display: flex; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--pthf-border); align-items: flex-start; }
.pthf-ci:last-child { border-bottom: 0; }
.pthf-ci-thumb img { width: 64px; height: 64px; object-fit: cover; border-radius: 8px; border: 1px solid var(--pthf-border); display: block; }
.pthf-ci-info { flex: 1; min-width: 0; }
.pthf-ci-title { display: block; font-size: 14px; font-weight: 600; color: var(--pthf-text); text-decoration: none; line-height: 1.35; }
.pthf-ci-meta { font-size: 12px; color: var(--pthf-muted); margin-top: 2px; }
.pthf-ci-meta dl, .pthf-ci-meta dt, .pthf-ci-meta dd { display: inline; margin: 0; font-weight: 400; }
.pthf-ci-price { font-size: 12.5px; color: var(--pthf-muted); margin-top: 3px; }
.pthf-ci-price .woocommerce-Price-amount { color: var(--pthf-text); font-weight: 600; }
.pthf-ci-controls { display: flex; align-items: center; gap: 14px; margin-top: 9px; }
.pthf-qty { display: inline-flex; align-items: center; border: 1px solid var(--pthf-border); border-radius: 8px; overflow: hidden; background: var(--pthf-soft); }
.pthf-qty button {
	width: 30px;
	height: 30px;
	border: 0;
	background: transparent;
	cursor: pointer;
	font-size: 16px;
	line-height: 1;
	color: var(--pthf-text);
	transition: background .12s ease;
}
.pthf-qty button:hover { background: rgba(0, 0, 0, .06); }
.pthf-qty-num { min-width: 32px; text-align: center; font-weight: 700; font-size: 13.5px; background: var(--pthf-bg); align-self: stretch; display: inline-flex; align-items: center; justify-content: center; }
.pthf-qty-single { font-size: 12.5px; color: var(--pthf-muted); }
.pthf-ci-remove { border: 0; background: none; color: #dc2626; font-size: 12.5px; font-weight: 600; cursor: pointer; padding: 0; }
.pthf-ci-total { font-weight: 700; font-size: 14px; white-space: nowrap; padding-top: 2px; }

/* ---------- Upsell ---------- */
.pthf-upsell { margin-top: 18px; }
.pthf-upsell-label { font-size: 11px; letter-spacing: .09em; text-transform: uppercase; color: var(--pthf-muted); font-weight: 700; margin-bottom: 9px; }
.pthf-upsell-item { display: flex; align-items: center; gap: 10px; border: 1px solid var(--pthf-border); border-radius: 10px; padding: 8px 10px; margin-bottom: 8px; background: var(--pthf-soft); }
.pthf-upsell-thumb img { width: 44px; height: 44px; object-fit: cover; border-radius: 6px; display: block; }
.pthf-upsell-info { flex: 1; min-width: 0; }
.pthf-upsell-title { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pthf-upsell-price { font-size: 12.5px; color: var(--pthf-accent); font-weight: 700; }
.pthf-upsell-price del { color: var(--pthf-muted); font-weight: 400; margin-right: 4px; }
.pthf-upsell-add {
	width: 32px;
	height: 32px;
	border-radius: 8px;
	border: 0;
	background: var(--pthf-accent);
	color: #fff;
	font-size: 19px;
	line-height: 1;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	text-decoration: none;
	flex-shrink: 0;
}

/* ---------- Drawer foot ---------- */
.pthf-ship-bar { margin-bottom: 12px; }
.pthf-ship-text { font-size: 12.5px; font-weight: 600; margin-bottom: 6px; color: var(--pthf-text); }
.pthf-ship-text .woocommerce-Price-amount { color: var(--pthf-accent); }
.pthf-ship-track { height: 8px; border-radius: 99px; background: var(--pthf-border); overflow: hidden; }
.pthf-ship-fill { height: 100%; background: var(--pthf-accent); border-radius: 99px; transition: width .4s ease; }
.pthf-subtotal { display: flex; justify-content: space-between; align-items: center; font-size: 15px; margin-bottom: 12px; }
.pthf-btn-primary {
	display: block;
	text-align: center;
	background: var(--pthf-accent);
	color: #fff;
	padding: 13px;
	border-radius: 8px;
	font-weight: 700;
	text-decoration: none;
	font-size: 14.5px;
	transition: filter .15s ease;
}
.pthf-btn-primary:hover { filter: brightness(1.1); color: #fff; }
.pthf-drawer-links { display: flex; justify-content: space-between; margin-top: 11px; font-size: 12.5px; }
.pthf-drawer-links a, .pthf-drawer-links button { background: none; border: 0; color: var(--pthf-muted); cursor: pointer; text-decoration: none; padding: 0; font-size: 12.5px; }
.pthf-drawer-links a:hover, .pthf-drawer-links button:hover { color: var(--pthf-text); }
.pthf-cart-clear { color: #dc2626 !important; }
.pthf-drawer-empty { text-align: center; padding: 56px 0; color: var(--pthf-muted); }
.pthf-btn-outline { display: inline-block; margin-top: 12px; border: 1.5px solid var(--pthf-accent); color: var(--pthf-accent); padding: 10px 20px; border-radius: 8px; font-weight: 700; text-decoration: none; font-size: 14px; }

/* ---------- Footer ---------- */
.pthf-footer { background: var(--pthf-footer-bg); color: var(--pthf-footer-text); font-size: 14.5px; line-height: 1.7; }
.pthf-footer .pthf-logo img { max-height: 48px; filter: brightness(0) invert(1); }
.pthf-footer .pthf-site-name { color: #fff; }
.pthf-footer h4 { color: #fff; font-size: 15px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; margin: 0 0 14px; }
.pthf-cols { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 40px; padding-top: 56px; padding-bottom: 48px; }
.pthf-cols-3 { grid-template-columns: 1.2fr 1fr 1fr; }
.pthf-footer-menu, ul.pthf-footer-menu { list-style: none; margin: 0; padding: 0; }
.pthf-footer-menu li { margin-bottom: 8px; }
.pthf-footer-menu a { color: var(--pthf-footer-text); text-decoration: none; transition: color .15s ease; }
.pthf-footer-menu a:hover { color: #fff; }
.pthf-footer-disclaimer { background: rgba(255, 255, 255, .04); border-top: 1px solid rgba(255, 255, 255, .08); padding: 22px 0; font-size: 13px; color: #94a3b8; }
.pthf-footer-disclaimer.pthf-top { border-top: 0; border-bottom: 1px solid rgba(255, 255, 255, .08); padding: 32px 0; }
.pthf-footer-disclaimer h4 { margin-bottom: 8px; }
.pthf-footer-disclaimer p { margin: 0; }
.pthf-footer-bottom { border-top: 1px solid rgba(255, 255, 255, .08); padding: 18px 0; font-size: 13px; }
.pthf-footer.pthf-style-minimal .pthf-row { min-height: 0; padding: 28px 0; flex-wrap: wrap; }
.pthf-footer.pthf-style-minimal .pthf-footer-menu { display: flex; gap: 20px; flex: 1; justify-content: center; flex-wrap: wrap; }
.pthf-footer.pthf-style-minimal .pthf-footer-menu li { margin: 0; }
.pthf-copy { color: #94a3b8; }
.pthf-footer-disclaimer.pthf-slim { text-align: center; padding: 12px 0; }

@media (max-width: 900px) {
	.pthf-cols, .pthf-cols-3 { grid-template-columns: 1fr 1fr; gap: 32px; }
}
@media (max-width: 560px) {
	.pthf-cols, .pthf-cols-3 { grid-template-columns: 1fr; }
	.pthf-drawer { width: 100vw; max-width: 100vw; }
}
