/**
 * Undress AI Sites — Main styles (light redesign)
 */

/* ===========================
   CSS VARIABLES
   =========================== */
:root {
	--color-primary: #D42B3A;
	--color-secondary: #475F94;
	--color-accent: #475F94;
	--color-bg: #F0F2F8;
	--color-card: #F9F9F9;
	--color-border: #DDE1EA;
	--color-text: #1A1A2E;
	--color-text-muted: #6B7280;
	--color-header-bg: #516171;
	--radius-card: 14px;
	--shadow-card: 0 2px 12px rgba(81, 97, 113, 0.15);
	--font-main: 'Inter', sans-serif;
}

/* ===========================
   RESET / BASE
   =========================== */
*,
*::before,
*::after {
	box-sizing: border-box;
}

body {
	margin: 0;
	padding-top: 0;
	font-family: var(--font-main);
	background: var(--color-bg);
	color: var(--color-text);
	line-height: 1.5;
	-webkit-font-smoothing: antialiased;
}

a {
	color: var(--color-primary);
	text-decoration: none;
}
a:hover {
	text-decoration: underline;
}

img {
	max-width: 100%;
	height: auto;
	display: block;
}

.container {
	width: 100%;
	max-width: 1200px;
	margin: 0 auto;
	padding: 0 20px;
}

/* Main content — offset for sticky header + logo overflow */
.site-main,
main,
.categories-section,
.site-intro-section {
	/* Extra top space to account for logo overflow from sticky header */
	/* First section gets padding-top to clear the overflowing logo */
}

/* First section after header: enough space to clear sticky header + overflowing logo */
.categories-section:first-of-type,
.site-intro-section:first-of-type {
	padding-top: 60px;  /* ridotto su desktop: meno spazio tra hero e category box */
}

/* ===========================
   HAMBURGER — desktop hidden, mobile only
   =========================== */
.hamburger {
	display: none;
}

@media (max-width: 768px) {
	.hamburger {
		display: flex;
		flex-direction: column;
		justify-content: center;
		gap: 5px;
		width: 40px;
		height: 40px;
		padding: 0;
		background: rgba(255, 255, 255, 0.15);
		border: 1px solid rgba(255, 255, 255, 0.3);
		border-radius: 8px;
		cursor: pointer;
		z-index: 200;
		position: relative;
		flex-shrink: 0;
	}
	.hamburger:hover {
		background: rgba(255, 255, 255, 0.25);
	}
}

.hamburger-line {
	display: block;
	width: 22px;
	height: 2px;
	margin: 0 auto;
	background: #fff;
	border-radius: 1px;
	transition: transform 0.25s, opacity 0.25s;
}
.hamburger[aria-expanded="true"] .hamburger-line:nth-child(1) {
	transform: translateY(7px) rotate(45deg);
}
.hamburger[aria-expanded="true"] .hamburger-line:nth-child(2) {
	opacity: 0;
}
.hamburger[aria-expanded="true"] .hamburger-line:nth-child(3) {
	transform: translateY(-7px) rotate(-45deg);
}

/* ===========================
   MOBILE DRAWER
   =========================== */
.mobile-drawer-overlay {
	position: fixed;
	inset: 0;
	z-index: 1000;
	background: rgba(0, 0, 0, 0.45);
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.3s, visibility 0.3s;
}
.mobile-drawer-overlay.is-open {
	opacity: 1;
	visibility: visible;
}

.mobile-drawer {
	position: fixed;
	top: 0;
	right: 0;
	z-index: 1001;
	width: min(300px, 85vw);
	height: 100vh;
	background: var(--color-card);
	border-left: 1px solid var(--color-border);
	padding: 60px 24px 24px;
	overflow-y: auto;
	transform: translateX(100%);
	transition: transform 0.3s ease;
	box-shadow: -4px 0 24px rgba(81, 97, 113, 0.12);
}
.mobile-drawer.is-open {
	transform: translateX(0);
}

.mobile-menu-list,
.mobile-menu-categories-list {
	list-style: none;
	margin: 0 0 20px;
	padding: 0;
}
.mobile-menu-list a,
.mobile-menu-categories-list a {
	display: block;
	padding: 10px 0;
	color: var(--color-text);
	font-weight: 500;
	border-bottom: 1px solid var(--color-border);
}
.mobile-menu-list a:hover,
.mobile-menu-categories-list a:hover {
	color: var(--color-secondary);
	text-decoration: none;
}
.mobile-menu-categories-heading {
	font-size: 11px;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	color: var(--color-text-muted);
	margin: 0 0 8px;
	font-weight: 600;
}
.mobile-drawer-footer {
	font-size: 12px;
	color: var(--color-text-muted);
	margin-top: 24px;
	padding-top: 16px;
	border-top: 1px solid var(--color-border);
}
.mobile-drawer-footer a {
	color: var(--color-secondary);
}

/* ===========================
   HEADER — liquid glass (Blue Slate #516171), sticky only on desktop
   =========================== */
header.header {
	position: sticky;
	top: 0;
	width: 100%;
	z-index: 200;
	overflow: visible;

	/* Liquid glass effect — #1A3A7A */
	background: rgba(26, 58, 122, 0.82);
	backdrop-filter: blur(28px) saturate(200%) brightness(1.06);
	-webkit-backdrop-filter: blur(28px) saturate(200%) brightness(1.06);

	/* Glass border — top highlight like real glass */
	border-top: 1px solid rgba(255, 255, 255, 0.45);
	border-bottom: 1px solid rgba(255, 255, 255, 0.18);

	/* Subtle inner glow */
	box-shadow:
		0 2px 24px rgba(26, 58, 122, 0.25),
		inset 0 1px 0 rgba(255, 255, 255, 0.28),
		inset 0 -1px 0 rgba(255, 255, 255, 0.06);
}

/* Noise texture overlay for authentic liquid glass */
header.header::before {
	content: '';
	position: absolute;
	inset: 0;
	background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.04'/%3E%3C/svg%3E");
	pointer-events: none;
	z-index: 0;
	border-radius: inherit;
}

header.header > * {
	position: relative;
	z-index: 1;
}

/* Mobile: header NOT sticky — scrolls with page */
@media (max-width: 768px) {
	header.header {
		position: relative;
	}
}

/* Top bar: su desktop nascosta del tutto; su mobile visibile (tranne in homepage) */
.header-topbar {
	display: none; /* desktop: default nascosta */
}
@media (max-width: 768px) {
	.header-topbar {
		display: flex;
		align-items: center;
		justify-content: space-between;
		padding: 10px 16px 0;
		max-width: 1200px;
		margin: 0 auto;
	}
}

@media (max-width: 768px) {
	.header-topbar {
		padding: 10px 16px 0;
	}
}

/* Desktop nav */
.header-nav {
	display: flex;
	align-items: center;
	gap: 24px;
	flex-wrap: wrap;
}
.header-nav a {
	color: rgba(255, 255, 255, 0.88);
	font-size: 13px;
	font-weight: 500;
	text-decoration: none;
	transition: color 0.2s;
	white-space: nowrap;
}
.header-nav a:hover {
	color: #fff;
	text-decoration: none;
}

/* Logo — half-overflowing below header */
.site-logo {
	position: relative;
	z-index: 10;
	margin-bottom: -36px;   /* exactly half the logo height — tune this */
	flex-shrink: 0;
}

.site-logo img,
.site-logo .custom-logo {
	height: 72px;
	width: auto;
	display: block;
	filter: drop-shadow(0 6px 16px rgba(0, 0, 0, 0.22));
	transition: transform 0.2s;
}

.site-logo img:hover,
.site-logo .custom-logo:hover {
	transform: scale(1.04);
}

/* Spacer at header bottom: for category pages matches .site-logo; for front page hero matches .hero-logo-col overflow */
.header-logo-spacer {
	height: 60px;  /* ridotto su desktop: meno spazio tra hero e contenuto sotto */
}

@media (max-width: 768px) {
	.site-logo {
		margin-bottom: -22px;
	}
	.site-logo img,
	.site-logo .custom-logo {
		height: 48px;
	}
	.header-logo-spacer {
		height: 22px;
	}
}

/* ── HERO: logo + card centered and optimized as a single block ── */
.header-hero {
	max-width: 1200px;
	margin: 0 auto;
	padding: 4px 40px 0;
	display: flex;
	align-items: flex-end;
	justify-content: center;
	gap: 16px;
}

/* Left: logo overflowing below header; margin-top negativo per ridurre spazio sopra */
.hero-logo-col {
	flex-shrink: 0;
	align-self: flex-end;
	margin-top: -20px;
	margin-bottom: -120px;
	position: relative;
	z-index: 2;
}
.hero-logo-col .custom-logo-link {
	display: block;
	line-height: 0;
}
.hero-logo-col .custom-logo,
.hero-logo-col .hero-logo-img {
	display: block;
	width: auto;
	height: auto;
	max-height: 380px;
	filter: drop-shadow(0 8px 24px rgba(0, 0, 0, 0.28));
}

/* Right: white card with title + subtitle + CTA */
.hero-text-col {
	flex: 0 1 auto;
	display: flex;
	justify-content: center;
	align-items: flex-end;
	padding-bottom: 8px;
	max-width: 560px;
}
.hero-text-card {
	background: #ffffff;
	backdrop-filter: none;
	-webkit-backdrop-filter: none;
	color: #1A1A2E;
	border: 1px solid rgba(255, 255, 255, 0.25);
	border-radius: 20px;
	padding: 14px 18px 12px;
	max-width: 560px;
	width: 100%;
}
.hero-text-card .cat-header-long {
	max-height: 280px;
	overflow-y: auto;
}

/* Pagina category: hero card più larga (730px), contenuto compatto e scroll ~150px */
.uas-review-category-page .hero-text-col {
	max-width: 730px;
}
.uas-review-category-page .hero-text-card {
	max-width: 730px;
}
.uas-review-category-page .hero-text-card .cat-header-long {
	max-height: 120px;
	font-size: 12px;
	line-height: 1.4;
	margin: 0 0 0.3em 0;
	color: #333;
}
.uas-review-category-page .hero-text-card .cat-header-long p {
	margin: 0 0 0.3em 0;
}
.uas-review-category-page .hero-text-card .cat-header-long p:last-child {
	margin-bottom: 0;
}

.hero-text-card h1 {
	font-size: clamp(18px, 2.4vw, 28px);
	font-weight: 900;
	color: var(--color-text);
	line-height: 1.15;
	margin: 0 0 10px;
	letter-spacing: -0.01em;
	text-transform: uppercase;
}
.hero-text-card .hero-subtitle {
	font-size: 13px;
	color: var(--color-text-muted);
	line-height: 1.6;
	margin: 0 0 18px;
}
.hero-text-card .hero-cta {
	display: inline-block;
	background: var(--color-primary);
	color: #fff;
	padding: 10px 26px;
	border-radius: 50px;
	font-weight: 700;
	font-size: 14px;
	text-decoration: none;
	box-shadow: 0 4px 14px rgba(212, 43, 58, 0.30);
	transition: transform 0.2s, box-shadow 0.2s;
}
.hero-text-card .hero-cta:hover {
	transform: translateY(-2px);
	box-shadow: 0 6px 22px rgba(212, 43, 58, 0.45);
	text-decoration: none;
	color: #fff;
}

@media (max-width: 768px) {
	.header-hero {
		flex-direction: column;
		align-items: center;
		padding: 6px 16px 0;
		gap: 10px;
	}
	.hero-logo-col {
		align-self: center;
		margin-bottom: -50px;
		order: -1;
	}
	.hero-logo-col .custom-logo-link {
		display: block;
	}
	.hero-logo-col .custom-logo,
	.hero-logo-col .hero-logo-img {
		max-height: 180px;
		width: auto;
		height: auto;
	}
	.hero-text-col {
		width: 100%;
		max-width: 100%;
		justify-content: center;
		padding-bottom: 16px;
	}
	.hero-text-card {
		padding: 12px 14px 10px;
		max-width: 100%;
		width: 100%;
		box-sizing: border-box;
	}
	.hero-text-card .cat-header-long {
		max-height: 160px;
	}
	.cat-updated-badge {
		display: none;
	}
	.hero-text-card h1 {
		font-size: 20px;
	}
	.hero-text-card .hero-subtitle {
		font-size: 14px;
	}
	/* Homepage mobile: hamburger in alto a sinistra (fixed), come esempio screenshot */
	.header-hero .hamburger--hero {
		position: fixed;
		top: 1rem;
		left: 1rem;
		z-index: 201;
		margin: 0;
	}
	/* Homepage mobile: nascondi la topbar (hamburger è dentro .header-hero, fixed) */
	.home .header-topbar {
		display: none;
	}
	/* Pagina category mobile: logo nella stessa barra dell'hamburger (topbar), niente logo hero sotto */
	.uas-review-category-page .header-hero .hero-logo-col {
		display: none;
	}
	.uas-review-category-page .header-topbar .site-logo {
		margin-bottom: 0; /* logo dentro la barra, senza overflow */
	}
}

/* Badge bar: centered directly below header (front page only) */
.hero-badge-below {
	text-align: center;
	padding: 10px 20px 14px;
	background: var(--color-bg);
}
.hero-badge-below .hero-badge {
	display: inline-block;
	background: rgba(212, 43, 58, 0.12);
	color: var(--color-primary);
	border: 1px solid rgba(212, 43, 58, 0.45);
	padding: 5px 16px;
	border-radius: 20px;
	font-size: 12px;
	font-weight: 600;
	letter-spacing: 0.04em;
}

/* Category header inside .header */
.header-text-wrap {
	max-width: 860px;
	margin: 0 auto;
	padding: 28px 40px 0;
	width: 100%;
}

.about--category {
	margin: 0;
}
.about-box--category {
	background: transparent;
	border: none;
	padding: 0;
}
.about-title {
	margin: 0 0 10px;
	font-size: 1.6rem;
	font-weight: 800;
	color: #fff;
	letter-spacing: -0.01em;
}
.about-desc-inner {
	max-height: 320px;
	overflow: hidden;
	position: relative;
	transition: max-height 0.4s ease;
	color: rgba(255, 255, 255, 0.85);
	font-size: 14px;
	line-height: 1.65;
}
.about-desc-inner.is-expanded {
	max-height: none;
}
.about-desc-inner p {
	color: rgba(255, 255, 255, 0.85);
	margin: 0 0 10px;
}
.about-desc-inner p:last-child {
	margin-bottom: 0;
}
.about-desc-inner strong {
	color: #fff;
}
.about-desc-inner a {
	color: rgba(255, 255, 255, 0.9);
	text-decoration: underline;
}
.read-more-toggle {
	background: transparent;
	border: none;
	color: rgba(255, 255, 255, 0.7);
	cursor: pointer;
	font-size: 13px;
	font-weight: 600;
	margin-top: 8px;
	padding: 0;
	transition: color 0.2s;
}
.read-more-toggle:hover {
	color: #fff;
	text-decoration: none;
}

/* ===========================
   CATEGORIES GRID (homepage)
   =========================== */
.categories-section {
	padding: 40px 0 52px;
}
.categories-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
	gap: 20px;
}
/* Homepage: carousel orizzontale solo desktop (≥769px); mobile = griglia come prima */
@media (min-width: 769px) {
	#categories .categories-grid {
		display: flex !important;
		flex-wrap: nowrap !important;
		overflow-x: scroll !important;
		overflow-y: hidden;
		gap: 20px;
		scroll-snap-type: x proximity;
		-webkit-overflow-scrolling: touch;
		overscroll-behavior-x: contain;
		overscroll-behavior-y: auto;
		padding: 4px 0 16px;
		scrollbar-width: thin;
		scrollbar-color: var(--color-border) transparent;
	}
	#categories .categories-grid::-webkit-scrollbar {
		height: 6px;
	}
	#categories .categories-grid::-webkit-scrollbar-track {
		background: var(--color-border);
		border-radius: 4px;
	}
	#categories .categories-grid::-webkit-scrollbar-thumb {
		background: var(--color-text-muted);
		border-radius: 4px;
	}
	#categories .categories-grid > .category-widget {
		flex: 0 0 320px;
		min-width: 320px;
		scroll-snap-align: start;
	}
}
.category-widget {
	background: var(--color-card);
	border: 1.5px solid var(--color-border);
	border-radius: var(--radius-card);
	overflow: hidden;
	box-shadow: var(--shadow-card);
	transition: box-shadow 0.2s, transform 0.2s;
}
.category-widget:hover {
	box-shadow: 0 6px 24px rgba(81, 97, 113, 0.16);
	transform: translateY(-2px);
}
.category-widget__head {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	padding: 10px 14px;
	background: var(--color-secondary);
	border-radius: calc(var(--radius-card) - 1px) calc(var(--radius-card) - 1px) 0 0;
}
.category-widget__icon {
	width: 22px;
	height: 22px;
	object-fit: contain;
	flex-shrink: 0;
}
.category-widget__title {
	margin: 0;
	font-size: 13px;
	font-weight: 700;
	flex: 0 1 auto;
	text-align: center;
}
.category-widget__title a {
	color: #fff;
	text-decoration: none;
}
.category-widget__title a:hover {
	text-decoration: underline;
}
.category-widget__updated {
	display: none; /* nascosto ovunque; titolo centrato */
	font-size: 10px;
	background: rgba(255, 255, 255, 0.18);
	padding: 3px 7px;
	border-radius: 20px;
	color: #fff;
	font-weight: 600;
	white-space: nowrap;
}
.category-widget__body {
	padding: 0;
}
.tool-row {
	display: flex;
	align-items: center;
	gap: 8px;
	flex-wrap: wrap;
	padding: 7px 12px;
	border-bottom: 1px solid var(--color-border);
	font-size: 13px;
	color: var(--color-text);
	background: var(--color-card);
	transition: background 0.15s;
}
.tool-row:last-child {
	border-bottom: none;
}
.tool-row:hover {
	background: rgba(81, 97, 113, 0.08);
}
.tool-row__logo {
	width: 26px;
	height: 26px;
	border-radius: 4px;
	object-fit: cover;
	flex-shrink: 0;
	border: 1px solid var(--color-border);
}
.tool-row__name {
	flex: 1;
	min-width: 0;
	font-weight: 600;
	color: var(--color-text);
	text-decoration: none;
}
.tool-row__name:hover {
	color: var(--color-secondary);
	text-decoration: underline;
}
.tool-row__score {
	background: var(--color-accent);
	color: #fff;
	padding: 2px 8px;
	border-radius: 20px;
	font-size: 11px;
	font-weight: 700;
}
.tag-free {
	font-size: 10px;
	padding: 2px 7px;
	background: #D1FAE5;
	color: #065F46;
	border-radius: 20px;
	font-weight: 600;
}
.tag-badge {
	font-size: 10px;
	padding: 2px 7px;
	background: var(--color-primary);
	color: #fff;
	border-radius: 20px;
	font-weight: 600;
}
.tool-row .tag-badge {
	display: none;
}
.category-widget__footer {
	padding: 10px 14px;
	background: var(--color-card);
	border-top: 1px solid var(--color-border);
}
.category-widget__link {
	display: block;
	text-align: center;
	padding: 7px 14px;
	border: 1.5px solid var(--color-secondary);
	color: var(--color-secondary);
	border-radius: 8px;
	font-size: 12px;
	font-weight: 600;
	transition: background 0.2s, color 0.2s;
	text-decoration: none;
}
.category-widget__link:hover {
	background: var(--color-secondary);
	color: #fff;
	text-decoration: none;
}

/* ===========================
   SITE INTRO SECTION
   =========================== */
.site-intro-section {
	padding: 48px 0 72px;
}
.site-intro-inner {
	max-width: 900px;
	margin: 0 auto;
	max-height: 520px;
	overflow-y: auto;
	background: var(--color-card);
	border: 1.5px solid var(--color-border);
	border-radius: var(--radius-card);
	padding: 36px 44px;
	box-shadow: var(--shadow-card);
	scrollbar-width: thin;
	scrollbar-color: var(--color-secondary) var(--color-border);
	line-height: 1.75;
	font-size: 15px;
	color: var(--color-text);
}

.site-intro-inner::-webkit-scrollbar { width: 6px; }
.site-intro-inner::-webkit-scrollbar-track { background: var(--color-border); border-radius: 4px; }
.site-intro-inner::-webkit-scrollbar-thumb { background: var(--color-secondary); border-radius: 4px; }

.site-intro-inner h2 {
	font-size: 18px;
	font-weight: 700;
	color: var(--color-secondary);
	margin: 32px 0 10px;
	padding-bottom: 6px;
	border-bottom: 1.5px solid var(--color-primary);
	line-height: 1.3;
}
.site-intro-inner h2:first-child { margin-top: 0; }
.site-intro-inner h3 {
	font-size: 15px;
	font-weight: 700;
	color: var(--color-text);
	margin: 24px 0 8px;
}
.site-intro-inner p {
	margin: 0 0 14px;
	color: var(--color-text);
}
.site-intro-inner p:last-child { margin-bottom: 0; }
.site-intro-inner strong {
	color: var(--color-text);
	font-weight: 700;
}
.site-intro-inner a {
	color: var(--color-secondary);
	text-decoration: underline;
	text-underline-offset: 3px;
}
.site-intro-inner a:hover { color: var(--color-primary); }
.site-intro-inner ul,
.site-intro-inner ol {
	margin: 0 0 16px;
	padding-left: 20px;
}
.site-intro-inner ul li,
.site-intro-inner ol li {
	margin-bottom: 6px;
	color: var(--color-text);
}
.site-intro-inner ul li::marker { color: var(--color-primary); }
.site-intro-inner ol li::marker { color: var(--color-secondary); font-weight: 700; }
.site-intro-inner hr {
	border: none;
	border-top: 1px solid var(--color-border);
	margin: 28px 0;
}

/* Table inside wysiwyg */
.site-intro-inner p:empty,
.site-intro-inner p:has(> br:only-child) {
	margin: 0; padding: 0; height: 0;
	min-height: 0; overflow: hidden; line-height: 0;
}
/* Tabelle in content: site-intro e cat-header-long */
.site-intro-inner table,
.hero-text-card .cat-header-long table {
	width: 100%;
	border-collapse: collapse;
	margin: 12px 0 24px;
	font-size: 13px;
}
.site-intro-inner p + table,
.site-intro-inner h2 + table,
.site-intro-inner h3 + table,
.hero-text-card .cat-header-long p + table {
	margin-top: 8px;
}
.site-intro-inner thead tr,
.hero-text-card .cat-header-long thead tr { background: var(--color-primary); }
.site-intro-inner thead th,
.hero-text-card .cat-header-long thead th {
	padding: 10px 14px;
	text-align: left;
	font-weight: 700;
	color: #fff;
	font-size: 12px;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	border: 1px solid rgba(255, 255, 255, 0.2);
}
/* Prima riga tbody: stesso stile delle altre righe (niente intestazione rossa) */
.site-intro-inner tbody tr:first-child td,
.hero-text-card .cat-header-long tbody tr:first-child td {
	background: transparent;
	color: var(--color-text);
	font-weight: inherit;
	font-size: inherit;
	text-transform: none;
}
.site-intro-inner tbody tr,
.hero-text-card .cat-header-long tbody tr {
	border-bottom: 1px solid var(--color-border);
	transition: background 0.15s;
}
.site-intro-inner tbody tr:hover,
.hero-text-card .cat-header-long tbody tr:hover { background: rgba(81, 97, 113, 0.04); }
.site-intro-inner tbody td,
.hero-text-card .cat-header-long tbody td {
	padding: 10px 14px;
	color: var(--color-text);
	vertical-align: middle;
	font-size: 13px;
	text-align: left;
	border: 1px solid var(--color-border);
}
.site-intro-inner tbody td:first-child,
.hero-text-card .cat-header-long tbody td:first-child {
	text-align: center;
	font-weight: 600;
	min-width: 2.2em;
}
.site-intro-inner tbody tr:nth-child(even) td,
.hero-text-card .cat-header-long tbody tr:nth-child(even) td {
	background: rgba(0, 0, 0, 0.02);
}

/* Safety net: orphan <br> */
.site-intro-inner > br,
.site-intro-inner ul > br,
.site-intro-inner ol > br,
.site-intro-inner li > br:first-child,
.site-intro-inner li > br:last-child {
	display: none;
}

/* ===========================
   BREADCRUMB
   =========================== */
.breadcrumb-wrap {
	padding: 12px 20px 16px;
	font-size: 13px;
	color: var(--color-text-muted);
}
.breadcrumb-wrap a {
	color: var(--color-text-muted);
}
.breadcrumb-wrap a:hover {
	color: var(--color-secondary);
}

@media (min-width: 769px) {
	.uas-review-category-page .breadcrumb-wrap {
		text-align: center;
	}
}

/* ===========================
   BRAND BOXES (category page)
   =========================== */
.category-brands-sec {
	padding: 16px 0 56px;
}
/* Horizontal scroll carousel (category page) — like bestpirnsites.com */
.category-brands-sec .category-brands {
	display: flex;
	flex-wrap: nowrap;
	overflow-x: scroll;
	overflow-y: hidden;
	scroll-snap-type: x proximity;
	-webkit-overflow-scrolling: touch;
	touch-action: pan-x pan-y;
	overscroll-behavior-x: contain;
	gap: 20px;
	padding: 4px 10px 14px;
	scrollbar-width: thin;
	scrollbar-color: var(--color-border) transparent;
	transform: translateZ(0);
	-webkit-transform: translateZ(0);
}
.category-brands-sec .category-brands::-webkit-scrollbar {
	height: 8px;
}
.category-brands-sec .category-brands::-webkit-scrollbar-track {
	background: var(--color-border);
	border-radius: 4px;
}
.category-brands-sec .category-brands::-webkit-scrollbar-thumb {
	background: var(--color-text-muted);
	border-radius: 4px;
}
.category-brands-sec .category-brands::-webkit-scrollbar-thumb:hover {
	background: var(--color-text);
}
.category-brands-sec .category-brands > .brand-box,
.category-brands-sec .category-brands > .brand-card {
	flex: 0 0 320px;
	min-width: 320px;
	scroll-snap-align: start;
	scroll-snap-stop: always;
}
@media (max-width: 768px) {
	.category-brands-sec .category-brands > .brand-box,
	.category-brands-sec .category-brands > .brand-card {
		flex: 0 0 min(320px, 88vw);
		min-width: min(320px, 88vw);
	}
	.category-brands-sec .category-brands {
		padding: 4px 12px 14px;
	}
}

.brand-box {
	background: var(--color-card);
	border: 1.5px solid var(--color-border);
	border-radius: var(--radius-card);
	overflow: hidden;
	box-shadow: var(--shadow-card);
	transition: box-shadow 0.2s, transform 0.2s;
}
.brand-box:hover {
	box-shadow: 0 6px 28px rgba(81, 97, 113, 0.14);
	transform: translateY(-2px);
}

/* Flip card (brand-card): fronte = info tool, retro = carousel samples */
.brand-card {
	background: var(--color-card);
	border: 1.5px solid var(--color-border);
	border-radius: var(--radius-card);
	box-shadow: var(--shadow-card);
	transition: box-shadow 0.2s;
	min-height: 380px;
}
.brand-card:hover {
	box-shadow: 0 6px 28px rgba(81, 97, 113, 0.14);
}
.brand-card.flip-card {
	perspective: 1000px;
	overflow: hidden;
}
.brand-card.flip-card .flip-card-inner {
	position: relative;
	width: 100%;
	min-height: 380px;
	transition: transform 0.6s ease;
	transform-style: preserve-3d;
}
.brand-card.flip-card.flipped .flip-card-inner {
	transform: rotateY(180deg);
}
.brand-card .flip-card-front,
.brand-card .flip-card-back {
	position: relative;
	width: 100%;
	backface-visibility: hidden;
	-webkit-backface-visibility: hidden;
}
.brand-card .flip-card-back {
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	transform: rotateY(180deg);
	display: flex;
	flex-direction: column;
	min-width: 0;
	padding: 18px;
	background: var(--color-card);
	border-radius: var(--radius-card);
}
.brand-card.no-flip .flip-card-back {
	display: none;
}
.brand-card .close-samples {
	align-self: flex-start;
	background: transparent;
	border: 1px solid var(--color-border);
	color: var(--color-text-muted);
	padding: 6px 12px;
	border-radius: 6px;
	font-size: 12px;
	cursor: pointer;
	margin-bottom: 10px;
	transition: color 0.2s, border-color 0.2s;
}
.brand-card .close-samples:hover {
	color: var(--color-primary);
	border-color: var(--color-primary);
}
.brand-card .samples-title {
	font-size: 14px;
	font-weight: 700;
	margin: 0 0 12px;
	color: var(--color-text);
}
.brand-card .samples-carousel {
	display: flex;
	gap: 0;
	overflow-x: scroll;
	overflow-y: hidden;
	padding: 8px 0;
	scroll-snap-type: x mandatory;
	-webkit-overflow-scrolling: touch;
	touch-action: auto;
	overscroll-behavior-x: contain;
	flex: 1 1 auto;
	min-width: 0;
	width: 100%;
	max-width: 100%;
	box-sizing: border-box;
	min-height: 200px;
	position: relative;
	z-index: 10;
}
.brand-card .samples-carousel img {
	width: 100%;
	min-width: 100%;
	height: auto;
	max-height: 280px;
	object-fit: contain;
	flex-shrink: 0;
	scroll-snap-align: start;
	scroll-snap-stop: always;
	border-radius: 8px;
	border: 1px solid var(--color-border);
	background: #fff;
	display: block;
}
.brand-card .samples-note {
	font-size: 11px;
	color: var(--color-text-muted);
	margin: 10px 0 0;
	line-height: 1.4;
}

.brand-box-content {
	padding: 22px;
}
.brand-box-link {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 10px;
	margin-bottom: 12px;
	text-decoration: none;
}
.brand-box-link:hover { text-decoration: none; }
.brand-box-name {
	font-size: 1.2rem;
	font-weight: 700;
	color: var(--color-text);
	order: 1;
	text-align: center;
}
.brand-box-image-wrap {
	order: 2;
}
.brand-box-image {
	width: 140px;
	height: 140px;
	object-fit: contain;
	border-radius: 10px;
	border: 1px solid var(--color-border);
	background: #fff;
}
.brand-box-badge {
	display: inline-block;
	background: var(--color-primary);
	color: #fff;
	font-size: 11px;
	font-weight: 700;
	padding: 3px 10px;
	border-radius: 20px;
	margin-bottom: 12px;
}
.brand-box-meta {
	display: flex;
	align-items: center;
	gap: 10px;
	flex-wrap: wrap;
	margin-bottom: 14px;
	font-size: 13px;
	color: var(--color-text-muted);
}
.brand-box-score {
	background: var(--color-accent);
	color: #fff;
	font-weight: 700;
	font-size: 12px;
	padding: 2px 10px;
	border-radius: 20px;
}
.brand-box-pricing {
	background: rgba(81, 97, 113, 0.10);
	color: var(--color-secondary);
	font-size: 11px;
	font-weight: 600;
	padding: 2px 9px;
	border-radius: 20px;
}
.brand-box-text {
	font-size: 14px;
	color: var(--color-text-muted);
	margin-bottom: 18px;
	line-height: 1.65;
	max-height: 140px;
	overflow-y: auto;
	padding-right: 4px;
}
.brand-box-text::-webkit-scrollbar { width: 6px; }
.brand-box-text::-webkit-scrollbar-track { background: var(--color-border); border-radius: 4px; }
.brand-box-text::-webkit-scrollbar-thumb { background: var(--color-text-muted); border-radius: 4px; }
.brand-box-text p:last-child { margin-bottom: 0; }
.brand-box-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
}
.brand-box-btn {
	display: inline-block;
	padding: 10px 18px;
	border-radius: 50px;
	font-size: 13px;
	font-weight: 600;
	text-decoration: none;
	cursor: pointer;
	border: none;
	transition: background 0.2s, color 0.2s, transform 0.2s, box-shadow 0.2s;
}
.brand-box-btn-visit {
	background: #D1FAE5;
	color: #065F46;
	box-shadow: 0 2px 8px rgba(6, 95, 70, 0.2);
}
.brand-box-btn-visit:hover {
	transform: translateY(-1px);
	background: #A7F3D0;
	box-shadow: 0 3px 12px rgba(6, 95, 70, 0.25);
	text-decoration: none;
	color: #065F46;
}
.brand-box-btn-samples {
	background: transparent;
	border: 1.5px solid var(--color-secondary);
	color: var(--color-secondary);
	padding: 9px 16px;
	border-radius: 50px;
	font-size: 13px;
	font-weight: 600;
	cursor: pointer;
	transition: background 0.2s, color 0.2s;
}
.brand-box-btn-samples:hover {
	background: var(--color-secondary);
	color: #fff;
}

/* ===========================
   LIGHTBOX
   =========================== */
.uais-lightbox {
	position: fixed;
	inset: 0;
	z-index: 9999;
	display: flex;
	align-items: center;
	justify-content: center;
}
.uais-lightbox[hidden] { display: none !important; }
.uais-lightbox-overlay {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.88);
	cursor: pointer;
}
.uais-lightbox-container {
	position: relative;
	z-index: 1;
	background: #fff;
	border: 1.5px solid var(--color-border);
	border-radius: var(--radius-card);
	width: min(92vw, 680px);
	max-height: 90vh;
	display: flex;
	flex-direction: column;
	overflow: hidden;
	box-shadow: 0 0 48px rgba(81, 97, 113, 0.25);
}
.uais-lightbox-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 14px 18px;
	border-bottom: 1px solid var(--color-border);
	background: var(--color-secondary);
}
.uais-lightbox-title {
	font-size: 14px;
	font-weight: 700;
	color: #fff;
}
.uais-lightbox-close {
	background: transparent;
	border: none;
	color: rgba(255, 255, 255, 0.7);
	font-size: 26px;
	cursor: pointer;
	line-height: 1;
	padding: 0 4px;
}
.uais-lightbox-close:hover { color: #fff; }
.uais-lightbox-track-wrap {
	overflow: hidden;
	flex: 1;
	position: relative;
	min-height: 200px;
}
.uais-lightbox-track {
	display: flex;
	transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
	height: 100%;
}
.uais-lightbox-slide {
	min-width: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
	background: #111;
}
.uais-lightbox-slide img {
	max-width: 100%;
	max-height: 60vh;
	object-fit: contain;
	border-radius: 6px;
	user-select: none;
	-webkit-user-drag: none;
}
.uais-lightbox-nav {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 20px;
	padding: 12px 18px;
	border-top: 1px solid var(--color-border);
}
.uais-lb-prev,
.uais-lb-next {
	background: var(--color-primary);
	color: #fff;
	border: none;
	border-radius: 50%;
	width: 36px;
	height: 36px;
	font-size: 16px;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: opacity 0.2s, transform 0.2s;
}
.uais-lb-prev:hover,
.uais-lb-next:hover { transform: scale(1.1); }
.uais-lb-prev:disabled,
.uais-lb-next:disabled { opacity: 0.3; cursor: default; transform: none; }
.uais-lb-counter {
	font-size: 13px;
	color: var(--color-text-muted);
	min-width: 50px;
	text-align: center;
}
.uais-lightbox-disclaimer {
	text-align: center;
	font-size: 11px;
	color: var(--color-text-muted);
	padding: 8px 18px 12px;
	margin: 0;
	border-top: 1px solid var(--color-border);
}

/* ===========================
   FOOTER
   =========================== */
.footer {
	margin-top: 48px;
	padding: 22px 0;
	border-top: 1px solid var(--color-border);
	background: var(--color-card);
}
.footer-bottom .container {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
}
.footer-legal-links {
	font-size: 13px;
}
.footer-legal-links a {
	color: var(--color-text-muted);
}
.footer-legal-links a:hover {
	color: var(--color-secondary);
}
.copyright-text {
	margin: 0;
	font-size: 13px;
	color: var(--color-text-muted);
}

/* ===========================
   SCROLL TO TOP
   =========================== */
.scroll-to-top-btn {
	position: fixed;
	bottom: 24px;
	right: 24px;
	z-index: 999;
	width: 44px;
	height: 44px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: var(--color-secondary);
	color: #fff;
	border: none;
	border-radius: 50%;
	cursor: pointer;
	box-shadow: 0 4px 14px rgba(81, 97, 113, 0.35);
	transition: opacity 0.2s, transform 0.2s;
}
.scroll-to-top-btn:hover {
	opacity: 0.9;
	transform: translateY(-2px);
}
.scroll-to-top-btn[hidden] { display: none !important; }

/* ===========================
   MOBILE RESPONSIVE
   =========================== */
@media (max-width: 768px) {
	.header-topbar {
		padding: 10px 16px 0;
	}
	.site-logo {
		margin-bottom: -22px;
	}
	.site-logo img,
	.site-logo .custom-logo {
		height: 48px;
	}
	.header-logo-spacer {
		height: 50px;
	}
	.categories-section:first-of-type,
	.site-intro-section:first-of-type {
		padding-top: 72px;
	}
	.hero-badge-below {
		padding: 8px 16px 12px;
	}
	.header-nav {
		display: none; /* hidden on mobile — drawer used instead */
	}
	.header-text-wrap {
		padding: 20px 16px 0;
	}
	/* Homepage mobile: griglia a colonna singola (come prima) */
	#categories .categories-grid {
		display: grid !important;
		grid-template-columns: 1fr !important;
		flex-wrap: wrap !important;
		overflow-x: visible !important;
		overflow-y: visible !important;
		scroll-snap-type: none !important;
		padding: 0 !important;
		margin: 0 !important;
		touch-action: auto;
	}
	#categories .categories-grid > .category-widget {
		flex: none !important;
		min-width: 0 !important;
		max-width: none !important;
		scroll-snap-align: unset;
	}
	/* .category-brands: carousel orizzontale, regole in .category-brands-sec sopra */
	.site-intro-inner {
		padding: 22px 18px;
		max-height: 420px;
		font-size: 14px;
	}
	.site-intro-inner h2 {
		font-size: 16px;
	}
	.site-intro-inner table,
	.hero-text-card .cat-header-long table {
		font-size: 12px;
		display: block;
		overflow-x: auto;
		white-space: nowrap;
	}
	.brand-box-image {
		width: 90px;
		height: 90px;
	}
	.footer-bottom .container {
		flex-direction: column;
		text-align: center;
	}
}

/* ===========================
   COOKIE POLICY PAGE (page-cookie-policy.php)
   =========================== */
.cookie-policy-page {
	padding: 0;
	margin: 0;
	background: #e8eef2;
	font-size: 16px;
	line-height: 1.65;
	color: #333;
}
.cookie-policy-page__inner {
	padding: 24px 16px 48px;
}
.cookie-policy-page__wrap {
	max-width: 800px;
	margin: 0 auto;
}
.cookie-policy-page__site-header {
	text-align: center;
	margin-bottom: 28px;
}
.cookie-policy-page__logo {
	display: inline-block;
	width: 56px;
	height: 56px;
	background: linear-gradient(145deg, #006ba1, #004d73);
	border-radius: 12px;
	margin-bottom: 12px;
	vertical-align: middle;
}
.cookie-policy-page__site-name {
	font-size: 1.35rem;
	font-weight: 700;
	color: #1a1a2e;
	margin: 0 0 4px;
	letter-spacing: -0.02em;
}
.cookie-policy-page__tagline {
	font-size: 0.8rem;
	color: #6b7280;
	margin: 0;
}
.cookie-policy-page__card {
	background: #fff;
	border-radius: 12px;
	box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
	padding: 36px 40px 40px;
	border: 1px solid #dde4ea;
}
.cookie-policy-page__title {
	font-size: 1.75rem;
	font-weight: 800;
	color: #006ba1;
	margin: 0 0 8px;
	line-height: 1.2;
}
.cookie-policy-page__updated {
	font-size: 0.9rem;
	color: #6b7280;
	margin: 0 0 24px;
}
.cookie-policy-page__h2 {
	font-size: 1.15rem;
	font-weight: 700;
	color: #006ba1;
	margin: 28px 0 12px;
}
.cookie-policy-page__card > p:first-of-type + .cookie-policy-page__h2,
.cookie-policy-page__card > .cookie-policy-page__updated + p + .cookie-policy-page__h2 {
	margin-top: 20px;
}
.cookie-policy-page__card p {
	margin: 0 0 14px;
}
.cookie-policy-page__list {
	margin: 0 0 16px;
	padding-left: 1.35em;
}
.cookie-policy-page__list li {
	margin-bottom: 8px;
}
.cookie-policy-page__list li strong {
	color: #1a1a2e;
}
.cookie-policy-page__card a {
	color: #006ba1;
	text-decoration: underline;
	text-underline-offset: 2px;
}
.cookie-policy-page__card a:hover {
	color: #004d73;
}
.cookie-policy-page__footer {
	margin-top: 32px;
	padding-top: 24px;
	border-top: 1px solid #e5e7eb;
	text-align: center;
	font-size: 0.9rem;
}
.cookie-policy-page__footer > a:not(.cookie-policy-page__btn-home) {
	color: #6b7280;
	text-decoration: none;
	margin: 0 10px;
}
.cookie-policy-page__footer > a:not(.cookie-policy-page__btn-home):hover {
	color: #006ba1;
	text-decoration: underline;
}
.cookie-policy-page__sep {
	color: #cbd5e1;
	user-select: none;
}
.cookie-policy-page__btn-home {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	margin-top: 20px;
	padding: 12px 22px;
	background: #006ba1;
	color: #fff !important;
	font-weight: 600;
	font-size: 0.95rem;
	text-decoration: none !important;
	border-radius: 8px;
	transition: background 0.2s;
}
.cookie-policy-page__btn-home:hover {
	background: #004d73;
	color: #fff !important;
}
.cookie-policy-page__disclaimer {
	font-size: 0.85rem;
	color: #6b7280;
	margin-top: 20px;
	padding: 14px 16px;
	background: #f8fafc;
	border-radius: 8px;
	border-left: 3px solid #006ba1;
}
@media (max-width: 600px) {
	.cookie-policy-page__card {
		padding: 24px 20px 28px;
	}
	.cookie-policy-page {
		font-size: 15px;
	}
	.cookie-policy-page__inner {
		padding: 16px 12px 32px;
	}
}
