/* ==========================================================
   PiGamer Design System — tokens, base, header, footer, UI
   ========================================================== */
:root {
	--pg-navy: #07141A;
	--pg-teal-900: #0D2A33;
	--pg-teal-800: #0F3E4A;
	--pg-cyan: #00E5FF;
	--pg-teal: #12D4BF;
	--pg-cyan-light: #3DD8FF;
	--pg-white: #F5F7FA;
	--pg-gray: #8C97A6;
	--pg-gray-2: #B6C0CC;

	--pg-surface: rgba(13, 42, 51, .55);
	--pg-surface-solid: #0B222A;
	--pg-border: rgba(61, 216, 255, .14);
	--pg-border-strong: rgba(0, 229, 255, .45);
	--pg-glow: 0 0 0 1px rgba(0, 229, 255, .35), 0 18px 50px -18px rgba(0, 229, 255, .55);

	--pg-font: 'IBM Plex Sans Arabic', 'Sora', system-ui, sans-serif;
	--pg-font-display: 'Sora', 'IBM Plex Sans Arabic', system-ui, sans-serif;

	--pg-r-sm: 10px;
	--pg-r: 16px;
	--pg-r-lg: 24px;
	--pg-r-xl: 32px;

	--pg-container: 1240px;
	--pg-gutter: clamp(16px, 4vw, 32px);
	--pg-header-h: 76px;
	--pg-ease: cubic-bezier(.2, .8, .2, 1);
}

/* ---------- Base ---------- */
body.pg-site {
	background: var(--pg-navy);
	color: var(--pg-white);
	font-family: var(--pg-font);
	-webkit-font-smoothing: antialiased;
}
body.pg-site a { color: var(--pg-cyan-light); }
body.pg-site a:hover { color: var(--pg-cyan); }
body.pg-site h1, body.pg-site h2, body.pg-site h3, body.pg-site h4 { color: var(--pg-white); font-family: var(--pg-font); }
body.pg-site ::selection { background: var(--pg-cyan); color: var(--pg-navy); }
body.pg-site :focus-visible { outline: 2px solid var(--pg-cyan); outline-offset: 3px; border-radius: 6px; }

/* Astra wrappers: let our sections go full width */
.pg-site #page, .pg-site .site-content { background: var(--pg-navy); }
.pg-home .site-content > .ast-container { max-width: none; padding: 0; display: block; }
.pg-home #primary { margin: 0; padding: 0; }

.pg-container { width: 100%; max-width: var(--pg-container); margin-inline: auto; padding-inline: var(--pg-gutter); box-sizing: border-box; }
.pg-icon { flex-shrink: 0; }
.pg-num { font-family: var(--pg-font-display); }

/* ---------- Typography ---------- */
.pg-h2 { font-size: clamp(26px, 3.2vw, 40px); font-weight: 700; line-height: 1.25; margin: 0; letter-spacing: -.01em; }
.pg-h3 { font-size: clamp(20px, 2.2vw, 28px); font-weight: 700; line-height: 1.3; margin: 0; }
.pg-eyebrow {
	display: inline-flex; align-items: center; gap: 8px;
	font-size: 13px; font-weight: 600; letter-spacing: .02em;
	color: var(--pg-cyan); padding: 6px 12px; border-radius: 999px;
	background: rgba(0, 229, 255, .08); border: 1px solid rgba(0, 229, 255, .25);
}
.pg-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--pg-cyan); box-shadow: 0 0 10px var(--pg-cyan); animation: pg-blink 1.6s ease-in-out infinite; }
@keyframes pg-blink { 50% { opacity: .35; } }

/* ---------- Buttons ---------- */
.pg-btn {
	--pg-btn-bg: transparent; --pg-btn-fg: var(--pg-white); --pg-btn-bd: transparent;
	display: inline-flex; align-items: center; justify-content: center; gap: 10px;
	min-height: 48px; padding: 0 22px; border-radius: 14px;
	background: var(--pg-btn-bg); color: var(--pg-btn-fg) !important; border: 1.5px solid var(--pg-btn-bd);
	font: 700 16px/1 var(--pg-font); text-decoration: none; cursor: pointer;
	transition: transform .25s var(--pg-ease), box-shadow .25s var(--pg-ease), background .25s, border-color .25s;
	will-change: transform;
}
.pg-btn:hover { transform: translateY(-2px); }
.pg-btn:active { transform: translateY(0) scale(.98); }
.pg-btn--primary { --pg-btn-bg: var(--pg-cyan); --pg-btn-fg: #021015; box-shadow: 0 10px 30px -10px rgba(0, 229, 255, .7); }
.pg-btn--primary:hover { box-shadow: 0 0 0 4px rgba(0, 229, 255, .18), 0 16px 40px -10px rgba(0, 229, 255, .85); }
.pg-btn--ghost { --pg-btn-bg: rgba(13, 42, 51, .55); --pg-btn-bd: rgba(61, 216, 255, .35); backdrop-filter: blur(8px); }
.pg-btn--ghost:hover { --pg-btn-bd: var(--pg-cyan); }
.pg-btn--telegram { --pg-btn-bg: #2AA3E8; --pg-btn-fg: #fff; }
.pg-btn--lg { min-height: 58px; padding: 0 30px; font-size: 18px; border-radius: 16px; }
.pg-btn--sm { min-height: 44px; padding: 0 16px; font-size: 15px; }
.pg-btn--icon { width: 46px; min-height: 46px; padding: 0; border-radius: 14px; }
[dir="rtl"] .pg-btn .pg-icon[aria-hidden="true"]:last-child { transform: none; }
[dir="ltr"] .pg-btn--lg .pg-icon:last-child, [dir="ltr"] .pg-link .pg-icon { transform: scaleX(-1); }

.pg-iconbtn {
	width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center;
	border-radius: 12px; border: 1px solid var(--pg-border); background: rgba(13, 42, 51, .5);
	color: var(--pg-white) !important; cursor: pointer; transition: border-color .2s, background .2s;
}
.pg-iconbtn:hover { border-color: var(--pg-border-strong); background: rgba(0, 229, 255, .08); }
.pg-link { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; text-decoration: none; }

.pg-chip { display: inline-flex; align-items: center; padding: 4px 9px; border-radius: 8px; font-size: 12px; font-weight: 700; background: rgba(61, 216, 255, .1); color: var(--pg-cyan-light); border: 1px solid rgba(61, 216, 255, .2); }
.pg-chip--vf { background: rgba(230, 0, 0, .12); color: #ff8a8a; border-color: rgba(230, 0, 0, .3); }
.pg-chip--ip { background: rgba(122, 76, 255, .14); color: #c6b2ff; border-color: rgba(122, 76, 255, .35); }
.pg-chip--td { background: rgba(18, 212, 191, .12); color: #8af0e2; border-color: rgba(18, 212, 191, .3); }
.pg-badge { position: absolute; inset-block-start: 12px; inset-inline-start: 12px; padding: 5px 10px; border-radius: 8px; font-size: 12px; font-weight: 800; }
.pg-badge--sale { background: var(--pg-teal); color: #021015; }

/* ---------- Header ---------- */
.pg-header {
	position: fixed; inset-inline: 0; inset-block-start: 0; z-index: 999;
	height: var(--pg-header-h); display: flex; align-items: center;
	transition: height .35s var(--pg-ease), background .35s, backdrop-filter .35s, border-color .35s;
	border-bottom: 1px solid transparent;
}
.admin-bar .pg-header { inset-block-start: 32px; }
.pg-header.is-scrolled {
	height: 64px; background: rgba(7, 20, 26, .78);
	backdrop-filter: blur(14px) saturate(1.4); -webkit-backdrop-filter: blur(14px) saturate(1.4);
	border-bottom-color: var(--pg-border);
}
.pg-header__inner { display: flex; align-items: center; gap: 28px; }
.pg-logo { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--pg-white) !important; flex-shrink: 0; }
.pg-logo__mark { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--pg-cyan); color: #021015; box-shadow: 0 0 24px rgba(0, 229, 255, .55); }
.pg-logo__text { font-family: var(--pg-font-display); font-weight: 800; font-size: 22px; letter-spacing: .3px; }
.pg-logo__text b { color: var(--pg-cyan); font-weight: 800; }

.pg-nav { display: flex; gap: 4px; flex-grow: 1; }
.pg-nav__link {
	position: relative; padding: 10px 12px; border-radius: 10px;
	color: var(--pg-gray-2) !important; font-weight: 600; font-size: 15px; text-decoration: none; transition: color .2s;
}
.pg-nav__link::after {
	content: ""; position: absolute; inset-inline: 12px; bottom: 4px; height: 2px; border-radius: 2px;
	background: var(--pg-cyan); box-shadow: 0 0 10px var(--pg-cyan);
	transform: scaleX(0); transition: transform .3s var(--pg-ease);
}
.pg-nav__link:hover, .pg-nav__link.is-active { color: var(--pg-white) !important; }
.pg-nav__link:hover::after, .pg-nav__link.is-active::after { transform: scaleX(1); }

.pg-header__actions { display: flex; align-items: center; gap: 8px; margin-inline-start: auto; }
.pg-cart { position: relative; }
.pg-cart-count {
	min-width: 20px; height: 20px; padding: 0 5px; border-radius: 999px; display: inline-grid; place-items: center;
	background: #021015; color: var(--pg-cyan); font-size: 12px; font-weight: 800;
}
.pg-cart-count[data-count="0"] { display: none; }
.pg-lang .trp-language-switcher, .pg-lang .trp-ls-shortcode-current-language { background: transparent !important; }
.pg-show-sm { display: none !important; }

/* Mobile drawer */
.pg-drawer { position: fixed; inset: 0; z-index: 1000; background: rgba(2, 10, 14, .6); backdrop-filter: blur(6px); }
.pg-drawer[hidden] { display: none; }
.pg-drawer__panel {
	position: absolute; inset-block: 0; inset-inline-end: 0; width: min(86vw, 360px);
	background: var(--pg-surface-solid); border-inline-start: 1px solid var(--pg-border);
	padding: 72px 20px 24px; display: flex; flex-direction: column; gap: 4px;
	animation: pg-drawer-in .35s var(--pg-ease);
}
[dir="rtl"] .pg-drawer__panel { animation-name: pg-drawer-in-rtl; }
@keyframes pg-drawer-in { from { transform: translateX(100%); } }
@keyframes pg-drawer-in-rtl { from { transform: translateX(-100%); } }
.pg-drawer__close { position: absolute; inset-block-start: 16px; inset-inline-end: 16px; }
.pg-drawer__link { padding: 14px 12px; border-radius: 12px; color: var(--pg-white) !important; font-weight: 600; font-size: 17px; text-decoration: none; }
.pg-drawer__link:hover { background: rgba(0, 229, 255, .08); }
.pg-drawer__lang { margin-top: auto; }

/* ---------- Sections ---------- */
.pg-section { padding-block: clamp(36px, 6vw, 72px); }
.pg-section--tight { padding-block: 24px; }
.pg-section__head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 28px; }
.pg-section__head--center { justify-content: center; text-align: center; }

/* ---------- Footer ---------- */
.pg-footer { border-top: 1px solid var(--pg-border); background: #051015; margin-top: 40px; }
.pg-footer__grid { display: grid; grid-template-columns: minmax(0, 1.6fr) repeat(3, minmax(0, 1fr)); gap: 32px; padding-block: 48px 28px; }
.pg-footer__brand p { color: var(--pg-gray); line-height: 1.8; max-width: 340px; margin: 14px 0 18px; }
.pg-footer__col { display: flex; flex-direction: column; gap: 10px; }
.pg-footer__col h3 { font-size: 16px; margin: 0 0 6px; }
.pg-footer__col a { color: var(--pg-gray) !important; text-decoration: none; }
.pg-footer__col a:hover { color: var(--pg-cyan) !important; }
.pg-footer__pay { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding-block: 18px; border-top: 1px solid rgba(61, 216, 255, .08); color: var(--pg-gray); }
.pg-footer__bottom { text-align: center; color: #5F6B7A; font-size: 14px; padding: 18px; border-top: 1px solid rgba(61, 216, 255, .08); }

/* ---------- Reveal on scroll ---------- */
.pg-js [data-pg-reveal] { opacity: 0; transform: translateY(26px); transition: opacity .8s var(--pg-ease), transform .8s var(--pg-ease); }
.pg-js [data-pg-reveal].is-in { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
	.pg-nav { display: none; }
	.pg-show-sm { display: inline-flex !important; }
}
@media (max-width: 782px) {
	.admin-bar .pg-header { inset-block-start: 46px; }
}
@media (max-width: 700px) {
	.pg-hide-sm { display: none !important; }
	.pg-footer__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.pg-footer__brand { grid-column: 1 / -1; }
}

@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
	.pg-js [data-pg-reveal] { opacity: 1; transform: none; }
}
