/**
 * Theme Name:        TBS Affiliate Neon
 * Author:            Toni Schlack
 * Author URI:        https://tonischlack.de/
 * Description:       A dark neon WordPress theme for blogs, content sites, and WooCommerce stores. It includes animated neon navigation, responsive grids, wide page templates, custom color controls, widget areas, and block-editor support.
 * Version:           3.1.3
 * Requires at least: 6.7
 * Tested up to:      7.0
 * Requires PHP:      7.4
 * License:           GNU General Public License v2 or later
 * License URI:       https://www.gnu.org/licenses/gpl-2.0.html
 * Text Domain:       tbs-affiliate-neon
 * Domain Path:       /languages
 * Tags:              blog, e-commerce, one-column, two-columns, three-columns, right-sidebar, custom-colors, custom-logo, featured-images, full-width-template, threaded-comments, wide-blocks
 */

:root {
	--tbs-neon-primary: #ff3df2;
	--tbs-neon-secondary: #29e6ff;
	--tbs-neon-accent: #7dff6a;
	--tbs-neon-bg: #080c22;
	--tbs-neon-bg-alt: #111733;
	--tbs-neon-surface: #151c3b;
	--tbs-neon-surface-soft: #1b2348;
	--tbs-neon-text: #f5f7ff;
	--tbs-neon-muted: #b8c0da;
	--tbs-neon-border: rgba(41, 230, 255, 0.35);
	--tbs-neon-shadow: 0 18px 48px rgba(0, 0, 0, 0.35);
	--tbs-neon-radius: 16px;
	--tbs-neon-content: 1200px;
	--tbs-neon-wide: 1680px;
	--tbs-neon-sidebar: 360px;
}

html {
	box-sizing: border-box;
	scroll-behavior: smooth;
}

*,
*::before,
*::after {
	box-sizing: inherit;
}

body {
	margin: 0;
	background: linear-gradient(135deg, var(--tbs-neon-bg) 0%, var(--tbs-neon-bg-alt) 100%);
	color: var(--tbs-neon-text);
	font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
	font-size: 1rem;
	line-height: 1.7;
	text-rendering: optimizeLegibility;
}

body {
	--tbs-admin-bar-offset: 0px;
}

body.admin-bar {
	--tbs-admin-bar-offset: 32px;
}

@media (max-width: 782px) {
	body.admin-bar {
		--tbs-admin-bar-offset: 46px;
	}
}

/* WordPress changes the front-end toolbar to non-fixed positioning below 600px. */
@media (max-width: 600px) {
	body.admin-bar {
		--tbs-admin-bar-offset: 0px;
	}
}

#wpadminbar {
	z-index: 100000 !important;
}

img,
svg,
video,
iframe {
	max-width: 100%;
}

img {
	height: auto;
}

button,
input,
select,
textarea {
	font: inherit;
}

a {
	color: var(--tbs-neon-secondary);
	text-underline-offset: 0.18em;
}

a:hover,
a:focus {
	color: var(--tbs-neon-accent);
}

:focus-visible {
	outline: 3px solid var(--tbs-neon-accent);
	outline-offset: 3px;
}

h1,
h2,
h3,
h4,
h5,
h6 {
	color: var(--tbs-neon-secondary);
	line-height: 1.2;
	text-wrap: balance;
}

p,
ul,
ol,
blockquote,
pre,
table {
	margin-top: 0;
	margin-bottom: 1.5rem;
}

pre,
code,
kbd,
samp {
	font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

pre {
	overflow-x: auto;
	padding: 1rem;
	background: #050817;
	border: 1px solid var(--tbs-neon-border);
	border-radius: 10px;
}

hr {
	border: 0;
	border-top: 1px solid var(--tbs-neon-border);
	margin: 2.5rem 0;
}

/* Accessibility */
.screen-reader-text {
	clip: rect(1px, 1px, 1px, 1px);
	clip-path: inset(50%);
	height: 1px;
	overflow: hidden;
	position: absolute !important;
	width: 1px;
	word-wrap: normal !important;
}

.screen-reader-text:focus {
	clip: auto !important;
	clip-path: none;
	display: block;
	height: auto;
	left: 0.75rem;
	top: 0.75rem;
	width: auto;
	z-index: 100000;
	padding: 0.75rem 1rem;
	background: #ffffff;
	color: #111111;
	border-radius: 6px;
	font-weight: 700;
}

#primary {
	scroll-margin-top: 8rem;
}

/* Header and animated neon navigation */
@keyframes tbs-neon-header-glow {
	0%, 100% { box-shadow: 0 0 18px rgba(41, 230, 255, 0.22), 0 10px 30px rgba(0, 0, 0, 0.32); }
	50% { box-shadow: 0 0 30px rgba(255, 61, 242, 0.24), 0 10px 34px rgba(0, 0, 0, 0.38); }
}

@keyframes tbs-neon-page-enter {
	from { opacity: 0; transform: translateY(12px); }
	to { opacity: 1; transform: translateY(0); }
}

.site-header {
	position: sticky;
	top: var(--tbs-admin-bar-offset);
	z-index: 9990;
	background: linear-gradient(90deg, rgba(8, 12, 34, 0.98), rgba(17, 23, 51, 0.97));
	border-bottom: 2px solid var(--tbs-neon-secondary);
	box-shadow: 0 0 22px rgba(41, 230, 255, 0.26), 0 10px 30px rgba(0, 0, 0, 0.32);
	backdrop-filter: blur(14px);
	animation: tbs-neon-header-glow 6s ease-in-out infinite;
}

.site-header__inner {
	width: min(calc(100% - 2rem), var(--tbs-neon-wide));
	min-height: 92px;
	margin-inline: auto;
	position: relative;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1.75rem;
}

.site-branding {
	min-width: 0;
	line-height: 1.15;
}

.custom-logo-link {
	display: inline-flex;
	align-items: center;
	transition: transform 0.3s ease, filter 0.3s ease;
}

.custom-logo-link:hover,
.custom-logo-link:focus-visible {
	transform: translateY(-2px) scale(1.02);
	filter: drop-shadow(0 0 12px rgba(41, 230, 255, 0.55));
}

.custom-logo {
	max-height: 64px;
	width: auto;
}

.site-title {
	margin: 0;
	font-size: clamp(1.45rem, 2.7vw, 2.15rem);
	font-weight: 850;
	letter-spacing: 0.01em;
}

.site-title a {
	display: inline-block;
	background: linear-gradient(90deg, var(--tbs-neon-primary), var(--tbs-neon-secondary));
	-webkit-background-clip: text;
	background-clip: text;
	color: transparent;
	text-decoration: none;
	transition: filter 0.3s ease, transform 0.3s ease;
}

.site-title a:hover,
.site-title a:focus-visible {
	transform: translateY(-1px);
	filter: drop-shadow(0 0 10px rgba(41, 230, 255, 0.7));
}

.site-description {
	margin: 0.25rem 0 0;
	color: #ffffff;
	font-size: 0.82rem;
	font-weight: 650;
	letter-spacing: 0.045em;
}

.main-navigation {
	margin-left: auto;
}

.header-search {
	position: relative;
	flex: 0 1 230px;
	min-width: 150px;
	margin: 0;
}

.header-search .header-search__field {
	height: 44px;
	padding: 0.65rem 2.75rem 0.65rem 0.85rem;
	border-color: rgba(41, 230, 255, 0.48);
	background: rgba(5, 9, 29, 0.9);
	box-shadow: inset 0 0 14px rgba(41, 230, 255, 0.05);
}

.header-search .header-search__field:focus {
	border-color: var(--tbs-neon-primary);
	box-shadow: 0 0 18px rgba(255, 61, 242, 0.2);
	outline: none;
}

.header-search__submit {
	position: absolute;
	top: 4px;
	right: 4px;
	width: 36px;
	height: 36px;
	padding: 0;
	border: 0;
	border-radius: 7px;
	background: linear-gradient(135deg, var(--tbs-neon-primary), var(--tbs-neon-secondary));
	color: #07101d;
	font-size: 1.35rem;
	font-weight: 900;
	cursor: pointer;
}

.site-search-bar {
	width: min(calc(100% - 2rem), var(--tbs-neon-wide));
	margin: 1rem auto 0;
}

.site-search-bar__form {
	display: flex;
	gap: 0.65rem;
	align-items: center;
	padding: 0.75rem;
	border: 1px solid rgba(41, 230, 255, 0.38);
	border-radius: 12px;
	background: rgba(8, 12, 34, 0.88);
	box-shadow: 0 0 20px rgba(41, 230, 255, 0.1);
}

.site-search-bar__form input[type="search"] {
	min-width: 0;
	margin: 0;
}

.site-search-bar__form button {
	flex: 0 0 auto;
	min-height: 44px;
}

.main-navigation ul {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	align-items: center;
	flex-wrap: nowrap;
	gap: 0.35rem;
}

.main-navigation li {
	position: relative;
}

.main-navigation a {
	position: relative;
	display: block;
	padding: 0.7rem 0.9rem;
	border-radius: 8px;
	color: var(--tbs-neon-text);
	font-weight: 700;
	text-decoration: none;
	transition: color 0.3s ease, text-shadow 0.3s ease, background-color 0.3s ease, transform 0.3s ease;
}

.main-navigation a::after {
	position: absolute;
	left: 0.8rem;
	right: 0.8rem;
	bottom: 0.28rem;
	height: 2px;
	content: "";
	background: linear-gradient(90deg, var(--tbs-neon-primary), var(--tbs-neon-secondary));
	transform: scaleX(0);
	transform-origin: left center;
	transition: transform 0.35s ease;
}

.main-navigation a:hover,
.main-navigation a:focus-visible,
.main-navigation .current-menu-item > a,
.main-navigation .current_page_item > a,
.main-navigation .current-menu-ancestor > a {
	background: rgba(41, 230, 255, 0.08);
	color: var(--tbs-neon-secondary);
	text-shadow: 0 0 10px rgba(41, 230, 255, 0.8);
	transform: translateY(-2px);
}

.main-navigation a:hover::after,
.main-navigation a:focus-visible::after,
.main-navigation .current-menu-item > a::after,
.main-navigation .current_page_item > a::after,
.main-navigation .current-menu-ancestor > a::after {
	transform: scaleX(1);
}

.main-navigation .sub-menu {
	position: absolute;
	left: 0;
	top: calc(100% + 0.35rem);
	min-width: 245px;
	padding: 0.55rem;
	background: linear-gradient(180deg, rgba(21, 28, 59, 0.98), rgba(8, 12, 34, 0.98));
	border: 1px solid var(--tbs-neon-border);
	border-top: 2px solid var(--tbs-neon-secondary);
	border-radius: 12px;
	box-shadow: 0 18px 48px rgba(0, 0, 0, 0.46), 0 0 22px rgba(41, 230, 255, 0.2);
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
	transform: translateY(-10px) scale(0.98);
	transform-origin: top left;
	transition: opacity 0.22s ease, visibility 0.22s ease, transform 0.22s ease;
}

.main-navigation .sub-menu .sub-menu {
	left: calc(100% + 0.35rem);
	top: -0.55rem;
}

.main-navigation .sub-menu a {
	padding: 0.68rem 0.8rem;
	font-size: 0.94rem;
}

.main-navigation li:hover > .sub-menu,
.main-navigation li:focus-within > .sub-menu {
	opacity: 1;
	visibility: visible;
	pointer-events: auto;
	transform: translateY(0) scale(1);
}

.menu-toggle {
	display: none;
	align-items: center;
	justify-content: center;
	width: 48px;
	height: 48px;
	padding: 0;
	border: 1px solid var(--tbs-neon-border);
	border-radius: 12px;
	background: linear-gradient(135deg, rgba(255, 61, 242, 0.12), rgba(41, 230, 255, 0.12));
	color: var(--tbs-neon-secondary);
	box-shadow: 0 0 14px rgba(41, 230, 255, 0.15);
	cursor: pointer;
	transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.menu-toggle:hover,
.menu-toggle:focus-visible {
	transform: translateY(-2px);
	border-color: var(--tbs-neon-secondary);
	box-shadow: 0 0 20px rgba(41, 230, 255, 0.42);
}

.menu-toggle__icon,
.menu-toggle__icon::before,
.menu-toggle__icon::after {
	display: block;
	width: 23px;
	height: 2px;
	background: currentColor;
	content: "";
	transition: transform 0.25s ease, opacity 0.25s ease;
}

.menu-toggle__icon {
	position: relative;
}

.menu-toggle__icon::before {
	position: absolute;
	transform: translateY(-7px);
}

.menu-toggle__icon::after {
	position: absolute;
	transform: translateY(7px);
}

.menu-toggle[aria-expanded="true"] .menu-toggle__icon {
	background: transparent;
}

.menu-toggle[aria-expanded="true"] .menu-toggle__icon::before {
	transform: rotate(45deg);
}

.menu-toggle[aria-expanded="true"] .menu-toggle__icon::after {
	transform: rotate(-45deg);
}

/* Layout */
.site-main {
	width: min(calc(100% - 2rem), var(--tbs-neon-wide));
	margin-inline: auto;
	padding-block: clamp(2rem, 5vw, 4.5rem);
	animation: tbs-neon-page-enter 0.5s ease-out both;
}

.content-layout {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(350px, var(--tbs-neon-sidebar));
	gap: clamp(2rem, 4vw, 4rem);
	align-items: start;
}

.content-layout--no-sidebar {
	grid-template-columns: minmax(0, 1fr);
}

.content-area,
.widget-area {
	min-width: 0;
}

.page-header,
.entry-header,
.archive-header,
.search-header {
	margin-bottom: 2rem;
}

.page-title,
.entry-title,
.archive-title {
	margin: 0;
	font-size: clamp(2rem, 5vw, 3.7rem);
}

.entry-meta {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem 1rem;
	color: var(--tbs-neon-muted);
	font-size: 0.9rem;
}

.entry-content,
.page-content {
	font-size: clamp(1rem, 1vw + 0.65rem, 1.12rem);
}

.entry-content::after {
	content: "";
	display: table;
	clear: both;
}

.entry-content > :where(:not(.alignleft):not(.alignright):not(.alignfull)),
.page-content > :where(:not(.alignleft):not(.alignright):not(.alignfull)) {
	max-width: var(--tbs-neon-content);
	margin-left: auto;
	margin-right: auto;
}

.entry-content > .alignwide,
.page-content > .alignwide {
	max-width: var(--tbs-neon-wide);
}

.entry-content > .alignfull,
.page-content > .alignfull {
	width: 100vw;
	max-width: none;
	margin-left: calc(50% - 50vw);
	margin-right: calc(50% - 50vw);
}

.front-page-content > :where(:not(.alignleft):not(.alignright):not(.alignfull)) {
	max-width: var(--tbs-neon-wide);
}

.page-template-full-width .site-main,
.page-template-page-templatesfull-width-php .site-main,
.home .site-main,
.front-page .site-main {
	max-width: var(--tbs-neon-wide);
}

.entry-content .wp-block-group,
.entry-content .wp-block-columns,
.page-content .wp-block-group,
.page-content .wp-block-columns {
	gap: clamp(1.5rem, 3vw, 3rem);
}

.wp-block-image img {
	border-radius: 12px;
}

.wp-block-button__link,
.button,
button,
input[type="button"],
input[type="reset"],
input[type="submit"] {
	border: 1px solid transparent;
	border-radius: 999px;
	background: linear-gradient(90deg, var(--tbs-neon-primary), var(--tbs-neon-secondary));
	color: #07101d;
	font-weight: 800;
	text-decoration: none;
	cursor: pointer;
}

.wp-block-button__link,
.button,
button,
input[type="button"],
input[type="reset"],
input[type="submit"] {
	transition: transform 0.25s ease, filter 0.25s ease, box-shadow 0.25s ease;
}

.wp-block-button__link:hover,
.wp-block-button__link:focus-visible,
.button:hover,
.button:focus-visible,
button:hover,
button:focus-visible,
input[type="button"]:hover,
input[type="button"]:focus-visible,
input[type="reset"]:hover,
input[type="reset"]:focus-visible,
input[type="submit"]:hover,
input[type="submit"]:focus-visible {
	filter: brightness(1.12);
	color: #07101d;
	transform: translateY(-2px);
	box-shadow: 0 0 22px rgba(41, 230, 255, 0.35);
}

/* Cards and loops */
.posts-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: clamp(1.25rem, 2.5vw, 2.25rem);
}

.post-card {
	display: flex;
	min-width: 0;
	flex-direction: column;
	overflow: hidden;
	background: linear-gradient(180deg, var(--tbs-neon-surface-soft), var(--tbs-neon-surface));
	border: 1px solid rgba(255, 61, 242, 0.45);
	border-radius: var(--tbs-neon-radius);
	box-shadow: var(--tbs-neon-shadow);
	transition: transform 0.32s ease, border-color 0.32s ease, box-shadow 0.32s ease;
}

.post-card:hover,
.post-card:focus-within {
	transform: translateY(-9px);
	border-color: var(--tbs-neon-primary);
	box-shadow: 0 22px 46px rgba(0, 0, 0, 0.42), 0 0 26px rgba(255, 61, 242, 0.28);
}

.post-card__image {
	position: relative;
	display: block;
	aspect-ratio: 16 / 9;
	overflow: hidden;
	background: linear-gradient(135deg, rgba(255, 61, 242, 0.35), rgba(41, 230, 255, 0.35));
}

.post-card__image::after {
	position: absolute;
	left: -18%;
	top: -35%;
	width: 136%;
	height: 4px;
	content: "";
	background: linear-gradient(90deg, transparent, var(--tbs-neon-primary) 24%, #ffffff 50%, var(--tbs-neon-secondary) 76%, transparent);
	box-shadow: 0 0 10px var(--tbs-neon-primary), 0 0 22px var(--tbs-neon-secondary);
	opacity: 0;
	pointer-events: none;
	transform: rotate(-5deg);
}

@keyframes tbs-neon-card-laser {
	0% { top: -35%; opacity: 0; }
	12% { opacity: 0.95; }
	82% { opacity: 0.8; }
	100% { top: 135%; opacity: 0; }
}

@media (hover: hover) and (pointer: fine) {
	.post-card:hover .post-card__image::after,
	.post-card:focus-within .post-card__image::after {
		animation: tbs-neon-card-laser 0.95s cubic-bezier(0.22, 0.75, 0.3, 1);
	}
}

.post-card__image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.4s ease, filter 0.4s ease;
}

.post-card.product .post-card__image {
	padding: 0.65rem;
	background:
		radial-gradient(circle at 20% 15%, rgba(255, 61, 242, 0.22), transparent 42%),
		radial-gradient(circle at 82% 85%, rgba(41, 230, 255, 0.2), transparent 46%),
		linear-gradient(145deg, #151936, #0a1025);
}

.post-card.product .post-card__image img {
	object-fit: contain;
	padding: 0;
	border-radius: calc(var(--tbs-neon-radius) * 0.55);
	box-shadow: 0 0 0 1px rgba(41, 230, 255, 0.16), 0 14px 34px rgba(0, 0, 0, 0.3);
}

.post-card__price {
	margin-bottom: 0.75rem;
	color: var(--tbs-neon-accent);
	font-size: 1.15rem;
	font-weight: 850;
}

.tbs-neon-external-product-image {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 420px;
	padding: 1rem;
	border: 1px solid var(--tbs-neon-border);
	border-radius: var(--tbs-neon-radius);
	background:
		radial-gradient(circle at 20% 15%, rgba(255, 61, 242, 0.2), transparent 42%),
		radial-gradient(circle at 82% 85%, rgba(41, 230, 255, 0.18), transparent 46%),
		linear-gradient(145deg, #151936, #0a1025);
}

.tbs-neon-external-product-image img {
	display: block;
	width: 100%;
	max-height: 620px;
	object-fit: contain;
	border-radius: calc(var(--tbs-neon-radius) * 0.55);
	box-shadow: 0 0 0 1px rgba(41, 230, 255, 0.16), 0 14px 34px rgba(0, 0, 0, 0.3);
}

.post-card:hover .post-card__image img,
.post-card:focus-within .post-card__image img {
	transform: scale(1.075);
	filter: saturate(1.08);
}

.post-card__body {
	display: flex;
	flex: 1;
	flex-direction: column;
	padding: 1.35rem;
}

.post-card__title {
	margin: 0 0 0.8rem;
	font-size: clamp(1.1rem, 1.5vw, 1.35rem);
}

.post-card.product .post-card__title {
	display: -webkit-box;
	min-height: 6.25em;
	max-height: 6.25em;
	overflow: hidden;
	line-height: 1.25;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 5;
}

.post-card__title a {
	color: var(--tbs-neon-secondary);
	text-decoration: none;
	transition: color 0.25s ease, text-shadow 0.25s ease;
}

.post-card__title a:hover,
.post-card__title a:focus-visible {
	color: var(--tbs-neon-primary);
	text-shadow: 0 0 10px rgba(255, 61, 242, 0.7);
}

.post-card__meta {
	margin-bottom: 0.8rem;
	color: var(--tbs-neon-muted);
	font-size: 0.82rem;
}

.post-card__excerpt {
	color: var(--tbs-neon-text);
}

.post-card__more {
	margin-top: auto;
	font-weight: 750;
}

.front-page-posts {
	margin-top: 2.5rem;
}

.front-page-posts > h2 {
	margin-bottom: 1.25rem;
}

.pagination,
.posts-navigation,
.post-navigation {
	margin-top: 3rem;
}

.nav-links {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	gap: 1rem;
}

.post-navigation .nav-previous,
.post-navigation .nav-next {
	flex: 1 1 280px;
}

.post-navigation a {
	display: flex;
	min-height: 100%;
	flex-direction: column;
	gap: 0.45rem;
	padding: 1rem 1.15rem;
	border: 1px solid var(--tbs-neon-border);
	border-radius: 12px;
	background: var(--tbs-neon-surface);
	box-shadow: 0 0 22px rgba(0, 229, 255, 0.08);
	text-decoration: none;
}

.post-navigation a:hover,
.post-navigation a:focus-visible {
	border-color: var(--tbs-neon-primary);
	box-shadow: 0 0 24px rgba(255, 0, 229, 0.2);
}

.post-nav-card__label {
	color: var(--tbs-neon-secondary);
	font-size: 0.78rem;
	font-weight: 800;
	letter-spacing: 0.06em;
	text-transform: uppercase;
}

.post-nav-card__title {
	color: var(--tbs-neon-text);
	font-weight: 750;
}

.post-navigation .nav-next {
	text-align: right;
}

.page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 42px;
	min-height: 42px;
	padding: 0.4rem 0.75rem;
	border: 1px solid var(--tbs-neon-border);
	border-radius: 8px;
	background: var(--tbs-neon-surface);
	text-decoration: none;
}

.page-numbers.current {
	background: var(--tbs-neon-secondary);
	color: #07101d;
}

/* Sidebar and widgets */
.widget-area {
	position: sticky;
	top: 110px;
}

.widget {
	margin-bottom: 1.5rem;
	padding: 1.35rem;
	background: rgba(21, 28, 59, 0.92);
	border: 1px solid var(--tbs-neon-border);
	border-radius: var(--tbs-neon-radius);
	transition: transform 0.28s ease, border-color 0.28s ease, box-shadow 0.28s ease;
}

.widget:hover,
.widget:focus-within {
	transform: translateY(-3px);
	border-color: rgba(41, 230, 255, 0.62);
	box-shadow: 0 14px 34px rgba(0, 0, 0, 0.28), 0 0 18px rgba(41, 230, 255, 0.14);
}

.widget-title {
	margin-top: 0;
	font-size: 1.1rem;
}

.widget ul {
	list-style: none;
	margin: 0;
	padding: 0;
}

.widget li + li {
	margin-top: 0.65rem;
	padding-top: 0.65rem;
	border-top: 1px solid rgba(255, 255, 255, 0.08);
}

/* Forms */
input[type="text"],
input[type="email"],
input[type="url"],
input[type="password"],
input[type="search"],
input[type="number"],
select,
textarea {
	width: 100%;
	padding: 0.8rem 0.9rem;
	border: 1px solid var(--tbs-neon-border);
	border-radius: 8px;
	background: #0b1027;
	color: var(--tbs-neon-text);
}

label {
	display: inline-block;
	margin-bottom: 0.35rem;
	font-weight: 700;
}

/* Comments */
.comments-area {
	margin-top: 3rem;
	padding-top: 2rem;
	border-top: 1px solid var(--tbs-neon-border);
}

.comment-list {
	list-style: none;
	padding: 0;
}

.comment-list .children {
	list-style: none;
	margin-left: 1.5rem;
}

.comment-body {
	margin-bottom: 1rem;
	padding: 1.25rem;
	background: var(--tbs-neon-surface);
	border: 1px solid rgba(255, 255, 255, 0.08);
	border-radius: 12px;
}

.bypostauthor > .comment-body {
	border-left: 4px solid var(--tbs-neon-primary);
}

/* Tables and media */
table {
	width: 100%;
	border-collapse: collapse;
}

th,
td {
	padding: 0.75rem;
	border: 1px solid var(--tbs-neon-border);
	text-align: left;
}

.wp-caption {
	max-width: 100%;
}

.wp-caption-text,
.gallery-caption {
	color: var(--tbs-neon-muted);
	font-size: 0.875rem;
}

.alignleft {
	float: left;
	margin-right: 1.5rem;
	margin-bottom: 1rem;
}

.alignright {
	float: right;
	margin-left: 1.5rem;
	margin-bottom: 1rem;
}

.aligncenter {
	display: block;
	margin-left: auto;
	margin-right: auto;
}

.sticky {
	border-color: var(--tbs-neon-accent);
}


.tbs-right-sidebar {
	width: 100%;
	min-width: 350px;
	max-width: var(--tbs-neon-sidebar);
}

.tbs-right-sidebar .widget,
.tbs-right-sidebar .wp-block-widget,
.tbs-right-sidebar .widget_block {
	width: 100%;
	max-width: 100%;
	overflow: hidden;
}

.tbs-right-sidebar img,
.tbs-right-sidebar iframe,
.tbs-right-sidebar ins,
.tbs-right-sidebar .adsbygoogle,
.tbs-right-sidebar .search-form,
.tbs-right-sidebar .wp-block-search {
	width: 100%;
	max-width: 100%;
}

.tbs-right-sidebar input[type="search"],
.tbs-right-sidebar .wp-block-search__input {
	min-width: 0;
	width: 100%;
}

/* WooCommerce and price-comparison layouts */
.woocommerce .woocommerce-breadcrumb,
.woocommerce .woocommerce-result-count {
	color: var(--tbs-neon-muted);
}

/*
 * Keep product cards readable instead of forcing four narrow columns.
 * With a right sidebar the available width naturally resolves to three
 * columns; without a sidebar it resolves to four on wide screens.
 */
.woocommerce ul.products,
ul.products,
.wc-block-grid__products,
.wc-block-product-template,
.wp-block-woocommerce-product-collection .wc-block-product-template {
	display: grid !important;
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)) !important;
	gap: clamp(1.25rem, 2vw, 1.75rem) !important;
	width: 100% !important;
	max-width: none !important;
	margin: 0 !important;
	padding: 0 !important;
	list-style: none !important;
}

.woocommerce ul.products::before,
.woocommerce ul.products::after,
ul.products::before,
ul.products::after {
	display: none !important;
}

.woocommerce ul.products li.product,
ul.products li.product,
.wc-block-grid__product,
.wc-block-product-template .wc-block-product {
	float: none !important;
	width: 100% !important;
	max-width: none !important;
	min-width: 0 !important;
	margin: 0 !important;
	padding: 1rem !important;
	display: flex !important;
	flex-direction: column !important;
	background: var(--tbs-neon-surface) !important;
	border: 1px solid var(--tbs-neon-border) !important;
	border-radius: var(--tbs-neon-radius) !important;
	overflow: hidden !important;
	transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease !important;
}

.woocommerce ul.products li.product:hover,
.woocommerce ul.products li.product:focus-within,
ul.products li.product:hover,
ul.products li.product:focus-within,
.wc-block-grid__product:hover,
.wc-block-grid__product:focus-within,
.wc-block-product-template .wc-block-product:hover,
.wc-block-product-template .wc-block-product:focus-within {
	transform: translateY(-7px);
	border-color: var(--tbs-neon-primary) !important;
	box-shadow: 0 18px 38px rgba(0, 0, 0, 0.35), 0 0 22px rgba(255, 61, 242, 0.22);
}

.woocommerce ul.products li.product a,
ul.products li.product a,
.wc-block-grid__product a,
.wc-block-product-template .wc-block-product a {
	min-width: 0;
}

.woocommerce ul.products li.product a img,
ul.products li.product a img,
.wc-block-grid__product-image img,
.wc-block-components-product-image img,
.wc-block-product-template .wc-block-product img {
	display: block;
	width: 100% !important;
	max-width: 100% !important;
	height: clamp(190px, 18vw, 250px) !important;
	object-fit: contain !important;
	padding: 0.35rem;
	margin: 0 0 0.9rem !important;
	background: rgba(5, 8, 23, 0.65);
	border-radius: 10px;
	transition: transform 0.35s ease;
}

.woocommerce ul.products li.product:hover a img,
.woocommerce ul.products li.product:focus-within a img,
ul.products li.product:hover a img,
ul.products li.product:focus-within a img {
	transform: scale(1.035);
}

.woocommerce ul.products li.product .woocommerce-loop-product__title,
ul.products li.product .woocommerce-loop-product__title,
.wc-block-grid__product-title,
.wc-block-components-product-name,
.wc-block-product-template .wp-block-post-title {
	color: var(--tbs-neon-secondary) !important;
	font-size: clamp(0.95rem, 0.5vw + 0.82rem, 1.08rem) !important;
	line-height: 1.4 !important;
	overflow-wrap: anywhere;
	word-break: normal;
	hyphens: auto;
}

.woocommerce ul.products li.product .price,
ul.products li.product .price,
.wc-block-grid__product-price,
.wc-block-components-product-price,
.woocommerce div.product p.price,
.woocommerce div.product span.price {
	color: var(--tbs-neon-accent) !important;
	overflow-wrap: anywhere;
}

.woocommerce ul.products li.product .button,
ul.products li.product .button,
.wc-block-grid__product-add-to-cart,
.wc-block-components-product-button {
	margin-top: auto !important;
}

.woocommerce a.button,
.woocommerce button.button,
.woocommerce input.button,
.woocommerce #respond input#submit {
	background: linear-gradient(90deg, var(--tbs-neon-primary), var(--tbs-neon-secondary));
	color: #07101d;
}

/* Single-product pages: keep the gallery, summary and imported content readable. */
.single-product .content-layout {
	gap: clamp(1.5rem, 2.5vw, 2.75rem);
}

.single-product .content-area {
	container-name: tbs-single-product;
	container-type: inline-size;
}

.single-product .content-area,
.single-product .woocommerce,
.single-product .woocommerce div.product,
.single-product .woocommerce div.product div.images,
.single-product .woocommerce div.product div.summary {
	min-width: 0;
	max-width: 100%;
}

.single-product .woocommerce div.product {
	position: relative;
	display: grid;
	grid-template-columns: minmax(320px, 0.9fr) minmax(0, 1.1fr);
	gap: clamp(1.5rem, 3vw, 3rem);
	align-items: start;
	padding: clamp(1rem, 2vw, 2rem);
	background: rgba(21, 28, 59, 0.72);
	border: 1px solid var(--tbs-neon-border);
	border-radius: var(--tbs-neon-radius);
}

.single-product .woocommerce div.product div.images,
.single-product .woocommerce div.product div.summary {
	float: none !important;
	width: auto !important;
	margin: 0 !important;
}

.single-product .woocommerce div.product .onsale {
	z-index: 4;
}

.single-product .woocommerce div.product .product_title {
	margin-top: 0;
	color: var(--tbs-neon-secondary);
	font-size: clamp(1.35rem, 1.5vw + 0.75rem, 2.2rem);
	line-height: 1.25;
	overflow-wrap: anywhere;
	word-break: normal;
	hyphens: auto;
}

.single-product .woocommerce div.product div.images img,
.single-product .woocommerce div.product .woocommerce-product-gallery__image img {
	display: block;
	width: 100%;
	max-width: 100%;
	max-height: 640px;
	object-fit: contain;
	background: rgba(5, 8, 23, 0.65);
	border-radius: 12px;
}

.single-product .woocommerce div.product .flex-control-thumbs {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(72px, 1fr));
	gap: 0.65rem;
	margin-top: 0.75rem;
}

.single-product .woocommerce div.product .flex-control-thumbs li {
	float: none;
	width: auto;
}

.single-product .woocommerce div.product .summary > *,
.single-product .woocommerce-product-details__short-description > *,
.single-product .woocommerce-Tabs-panel > * {
	max-width: 100% !important;
}

.single-product .woocommerce-product-details__short-description,
.single-product .woocommerce-Tabs-panel,
.single-product .product_meta,
.single-product form.cart {
	overflow-wrap: anywhere;
	word-break: normal;
}

.single-product .woocommerce div.product .woocommerce-tabs,
.single-product .woocommerce div.product .related,
.single-product .woocommerce div.product .upsells {
	grid-column: 1 / -1;
	clear: both;
	width: 100%;
	max-width: 100%;
	min-width: 0;
}

.single-product .woocommerce div.product .woocommerce-tabs ul.tabs {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	padding-left: 0;
}

.single-product .woocommerce div.product .woocommerce-tabs ul.tabs::before {
	border-bottom-color: var(--tbs-neon-border);
}

.single-product .woocommerce div.product .woocommerce-tabs ul.tabs li {
	margin: 0;
	background: var(--tbs-neon-surface);
	border-color: var(--tbs-neon-border);
}

.single-product .woocommerce-product-details__short-description img,
.single-product .woocommerce-Tabs-panel img,
.single-product .woocommerce-product-details__short-description iframe,
.single-product .woocommerce-Tabs-panel iframe,
.single-product .woocommerce-product-details__short-description video,
.single-product .woocommerce-Tabs-panel video {
	max-width: 100% !important;
	height: auto !important;
}

.single-product .woocommerce-Tabs-panel table,
.single-product .woocommerce-product-details__short-description table,
.woocommerce table.shop_table {
	display: block;
	max-width: 100%;
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
}

.woocommerce-cart .cart-collaterals .cart_totals,
.woocommerce-checkout #payment {
	background: var(--tbs-neon-surface);
	color: var(--tbs-neon-text);
	border-color: var(--tbs-neon-border);
}

/* When the 350px sidebar leaves less than 1100px, stack gallery and summary. */
@container tbs-single-product (max-width: 1100px) {
	.single-product .woocommerce div.product {
		grid-template-columns: minmax(0, 1fr);
	}

	.single-product .woocommerce div.product div.images {
		width: min(100%, 760px) !important;
		margin-inline: auto !important;
	}
}

/* Compatibility styling for the TBS price-comparison plugin output. */
.tbsapc-widget {
	container-type: inline-size;
	width: 100%;
	max-width: 100%;
	min-width: 0;
	margin: 1.25rem 0;
	padding: 1rem;
	position: relative;
	background: rgba(21, 28, 59, 0.92);
	color: var(--tbs-neon-text);
	border: 1px solid var(--tbs-neon-border);
	border-radius: 12px;
}

.tbsapc-widget::before {
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	height: 3px;
	content: "";
	background: linear-gradient(90deg, var(--tbs-neon-primary), var(--tbs-neon-secondary), var(--tbs-neon-accent));
	border-radius: 12px 12px 0 0;
}

.tbsapc-header,
.tbsapc-offer,
.tbsapc-offer__shop,
.tbsapc-offer__pricing {
	min-width: 0;
}

.tbsapc-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.75rem;
	flex-wrap: wrap;
	margin-bottom: 1rem;
}

.tbsapc-title {
	font-weight: 800;
	letter-spacing: 0.02em;
}

.tbsapc-title,
.tbsapc-shop-name-text,
.tbsapc-shop-name-fallback,
.tbsapc-offer__price {
	color: var(--tbs-neon-text) !important;
	overflow-wrap: anywhere;
}

.tbsapc-badge {
	display: inline-block;
	padding: 0.2rem 0.65rem;
	border-radius: 999px;
	font-size: 0.78em;
	font-weight: 750;
}

.tbsapc-badge--best {
	background: rgba(125, 255, 106, 0.15);
	color: var(--tbs-neon-accent);
	border: 1px solid rgba(125, 255, 106, 0.5);
}

.tbsapc-offers,
.tbsapc-more-offers {
	display: flex;
	flex-direction: column;
	gap: 0.65rem;
	min-width: 0;
}

.tbsapc-offer {
	display: grid;
	grid-template-columns: minmax(100px, 140px) minmax(0, 1fr) auto;
	align-items: center;
	gap: 0.9rem;
	width: 100%;
	padding: 0.85rem;
	background: rgba(5, 8, 23, 0.72);
	border: 1px solid rgba(255, 255, 255, 0.12);
	border-radius: 9px;
	transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.tbsapc-offer:hover,
.tbsapc-offer:focus-within {
	transform: translateY(-2px);
	border-color: var(--tbs-neon-secondary);
	box-shadow: 0 10px 24px rgba(0, 0, 0, 0.25);
}

.tbsapc-offer--best {
	border-color: rgba(125, 255, 106, 0.5);
	background: linear-gradient(135deg, rgba(125, 255, 106, 0.08), rgba(5, 8, 23, 0.8));
}

.tbsapc-offer__shop {
	display: flex;
	align-items: center;
	gap: 0.55rem;
}

.tbsapc-shop-logo {
	display: block;
	width: auto;
	max-width: 110px;
	height: 30px;
	object-fit: contain;
	border-radius: 4px;
}

.tbsapc-shop-name-text,
.tbsapc-shop-name-fallback {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 70px;
	padding: 0.35rem 0.6rem;
	background: rgba(255, 255, 255, 0.08);
	border-radius: 5px;
	font-size: 0.85em;
	font-weight: 700;
	line-height: 1.25;
	text-align: center;
}

.tbsapc-offer__pricing {
	display: flex;
	flex-direction: column;
	gap: 0.15rem;
}

.tbsapc-offer__price {
	display: flex;
	align-items: baseline;
	flex-wrap: wrap;
	gap: 0.3rem;
	font-size: 1.12em;
	font-weight: 800;
}

.tbsapc-currency {
	padding: 0.05rem 0.35rem;
	background: rgba(255, 255, 255, 0.08);
	border-radius: 3px;
	color: var(--tbs-neon-muted);
	font-size: 0.72em;
}

.tbsapc-offer__btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 42px;
	padding: 0.65rem 1rem;
	white-space: nowrap;
	background: linear-gradient(90deg, var(--tbs-neon-primary), var(--tbs-neon-secondary));
	color: #07101d !important;
	border: 0;
	border-radius: 7px;
	font-weight: 750;
	text-decoration: none;
}

.tbsapc-show-more {
	width: 100%;
	margin-top: 0.3rem;
	padding: 0.6rem 0.85rem;
	background: rgba(255, 255, 255, 0.04);
	color: var(--tbs-neon-text);
	border: 1px dashed var(--tbs-neon-border);
	border-radius: 7px;
	cursor: pointer;
}

.tbsapc-more-offers {
	display: none;
	margin-top: 0.4rem;
}

.tbsapc-offer__delivery,
.tbsapc-offer__total,
.tbsapc-disclaimer,
.tbsapc-offer__grundpreis {
	color: var(--tbs-neon-muted) !important;
	overflow-wrap: anywhere;
}

.tbsapc-ebay-badge,
.tbsapc-free-shipping-badge {
	display: inline-block;
	padding: 0.15rem 0.5rem;
	border-radius: 999px;
	font-size: 0.75em;
	font-weight: 700;
}

@container (max-width: 700px) {
	.tbsapc-offer {
		grid-template-columns: minmax(0, 1fr);
	}

	.tbsapc-offer__btn {
		width: 100%;
	}
}

@media (max-width: 760px) {
	.tbsapc-offer {
		grid-template-columns: minmax(0, 1fr);
	}

	.tbsapc-offer__btn {
		width: 100%;
	}
}

/* Footer */
.site-footer {
	margin-top: clamp(3rem, 8vw, 7rem);
	padding: 3rem 0 1.5rem;
	background: #050817;
	border-top: 1px solid rgba(255, 61, 242, 0.45);
}

.footer-widgets,
.site-footer__bottom {
	width: min(calc(100% - 2rem), var(--tbs-neon-wide));
	margin-inline: auto;
}

.footer-widgets {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 1.5rem;
}

.site-footer__bottom {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	margin-top: 2rem;
	padding-top: 1.25rem;
	border-top: 1px solid rgba(255, 255, 255, 0.08);
	color: var(--tbs-neon-muted);
	font-size: 0.875rem;
}

.footer-navigation ul {
	display: flex;
	flex-wrap: wrap;
	gap: 0.8rem 1.2rem;
	list-style: none;
	margin: 0;
	padding: 0;
}

/* Collapse oversized desktop menus instead of allowing them to wrap over the page. */
.site-header.nav-overflow .site-header__inner {
	min-height: 76px;
}

.site-header.nav-overflow .menu-toggle {
	display: inline-flex;
	flex: 0 0 auto;
}

.site-header.nav-overflow .main-navigation {
	position: absolute;
	left: 1rem;
	right: 1rem;
	top: calc(100% + 0.5rem);
	display: block;
	max-height: calc(100vh - var(--tbs-admin-bar-offset) - 110px);
	overflow-y: auto;
	margin: 0;
	padding: 0.85rem;
	background: linear-gradient(180deg, rgba(21, 28, 59, 0.99), rgba(8, 12, 34, 0.99));
	border: 1px solid var(--tbs-neon-border);
	border-top: 2px solid var(--tbs-neon-secondary);
	border-radius: 14px;
	box-shadow: 0 20px 48px rgba(0, 0, 0, 0.5), 0 0 22px rgba(41, 230, 255, 0.2);
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
	transform: translateY(-12px) scale(0.985);
	transform-origin: top center;
	transition: opacity 0.25s ease, visibility 0.25s ease, transform 0.25s ease;
}

.site-header.nav-overflow .main-navigation.is-open {
	opacity: 1;
	visibility: visible;
	pointer-events: auto;
	transform: translateY(0) scale(1);
}

.site-header.nav-overflow .main-navigation ul,
.site-header.nav-overflow .main-navigation .sub-menu {
	position: static;
	display: block;
	min-width: 0;
	padding: 0;
	background: transparent;
	border: 0;
	box-shadow: none;
	opacity: 1;
	visibility: visible;
	pointer-events: auto;
	transform: none;
}

.site-header.nav-overflow .main-navigation a {
	padding: 0.78rem 0.85rem;
}

.site-header.nav-overflow .main-navigation .sub-menu a {
	padding-left: 1.75rem;
	color: var(--tbs-neon-muted);
}

/* Responsive */
@media (max-width: 1180px) {
	.content-layout {
		grid-template-columns: minmax(0, 1fr);
	}

	.widget-area {
		position: static;
		width: 100%;
		max-width: none;
	}

	.tbs-right-sidebar {
		min-width: 0;
		max-width: none;
	}
}

@media (max-width: 1100px) {
	.posts-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.site-header__inner {
		min-height: 76px;
	}

	.menu-toggle {
		display: inline-flex;
		flex: 0 0 auto;
	}

	.header-search {
		order: 3;
		flex: 1 1 100%;
		width: 100%;
		padding-bottom: 0.65rem;
	}

	.site-header__inner {
		flex-wrap: wrap;
	}

	.main-navigation {
		position: absolute;
		left: 1rem;
		right: 1rem;
		top: calc(100% + 0.5rem);
		display: block;
		max-height: calc(100vh - 110px);
		overflow-y: auto;
		margin: 0;
		padding: 0.85rem;
		background: linear-gradient(180deg, rgba(21, 28, 59, 0.99), rgba(8, 12, 34, 0.99));
		border: 1px solid var(--tbs-neon-border);
		border-top: 2px solid var(--tbs-neon-secondary);
		border-radius: 14px;
		box-shadow: 0 20px 48px rgba(0, 0, 0, 0.5), 0 0 22px rgba(41, 230, 255, 0.2);
		opacity: 0;
		visibility: hidden;
		pointer-events: none;
		transform: translateY(-12px) scale(0.985);
		transform-origin: top center;
		transition: opacity 0.25s ease, visibility 0.25s ease, transform 0.25s ease;
	}

	.main-navigation.is-open {
		opacity: 1;
		visibility: visible;
		pointer-events: auto;
		transform: translateY(0) scale(1);
	}

	.main-navigation ul,
	.main-navigation .sub-menu {
		position: static;
		display: block;
		min-width: 0;
		padding: 0;
		background: transparent;
		border: 0;
		box-shadow: none;
		opacity: 1;
		visibility: visible;
		pointer-events: auto;
		transform: none;
	}

	.main-navigation a {
		padding: 0.78rem 0.85rem;
	}

	.main-navigation a::after {
		left: 0.85rem;
		right: 0.85rem;
	}

	.main-navigation .sub-menu a {
		padding-left: 1.75rem;
		color: var(--tbs-neon-muted);
	}
}

@media (max-width: 560px) {
	.site-search-bar__form {
		align-items: stretch;
		flex-direction: column;
	}

	.site-search-bar__form button {
		width: 100%;
	}
}

@media (max-width: 680px) {
	.site-main {
		width: min(calc(100% - 1.25rem), var(--tbs-neon-wide));
	}

	.posts-grid,
	.footer-widgets {
		grid-template-columns: minmax(0, 1fr);
	}

	.woocommerce ul.products,
	ul.products,
	.wc-block-grid__products,
	.wc-block-product-template {
		grid-template-columns: minmax(0, 1fr) !important;
	}

	.site-footer__bottom {
		align-items: flex-start;
		flex-direction: column;
	}

	.alignleft,
	.alignright {
		float: none;
		margin-left: auto;
		margin-right: auto;
	}
}

@media (prefers-reduced-motion: reduce) {
	html {
		scroll-behavior: auto;
	}

	*,
	*::before,
	*::after {
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.01ms !important;
	}

	.post-card__image::after {
		display: none;
	}
}

/* Neon laser highlight for featured and editorial images. */
.post-thumbnail,
.entry-content figure,
.wp-block-post-featured-image {
	position: relative;
	overflow: hidden;
}

.post-thumbnail::after,
.entry-content figure::after,
.wp-block-post-featured-image::after {
	background: linear-gradient(105deg, transparent 32%, rgba(255, 61, 242, 0.18) 43%, rgba(41, 230, 255, 0.9) 50%, rgba(255, 255, 255, 0.85) 52%, rgba(41, 230, 255, 0.22) 58%, transparent 68%);
	content: "";
	inset: 0;
	pointer-events: none;
	position: absolute;
	transform: translateX(-125%);
	z-index: 2;
}

.post-thumbnail:hover::after,
.post-thumbnail:focus-within::after,
.entry-content figure:hover::after,
.entry-content figure:focus-within::after,
.wp-block-post-featured-image:hover::after,
.wp-block-post-featured-image:focus-within::after {
	animation: tbs-neon-card-laser 0.95s cubic-bezier(0.22, 0.75, 0.3, 1);
}

@media (prefers-reduced-motion: reduce) {
	.post-thumbnail::after,
	.entry-content figure::after,
	.wp-block-post-featured-image::after {
		display: none;
	}
}
