/* Torteria 40 – Catalogo fotografico */
.tq40-page {
	--tq40-sand: #e5cbb3;
	--tq40-sand-light: #f4ece4;
	--tq40-ink: #211b17;
	--tq40-paper: #fffdfb;
	--tq40-magenta: #a20b86;
	--tq40-serif: Georgia, "Times New Roman", serif;
	--tq40-sans: "Helvetica Neue", Arial, sans-serif;
	width: 100%;
	overflow: hidden;
	color: var(--tq40-ink);
	background: var(--tq40-paper);
	font-family: var(--tq40-sans);
}
.tq40-page *,
.tq40-page *::before,
.tq40-page *::after { box-sizing: border-box; }
.tq40-page a { color: inherit; text-decoration: none; }

.tq40-hero {
	position: relative;
	min-height: 650px;
	margin: 30px 3.5% 0;
	background: var(--tq40-sand);
}
.tq40-hero__top {
	position: relative;
	z-index: 4;
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	padding: 22px 26px;
}
.tq40-logo {
	display: flex;
	align-items: center;
	width: clamp(230px, 30vw, 390px);
	min-height: 54px;
	padding: 8px 13px;
	background: #fff;
	line-height: 0;
}
.tq40-logo img { display: block; width: 100%; height: auto; }
.tq40-menu-mark {
	display: grid;
	gap: 6px;
	padding: 10px 3px;
	border: 0;
	background: transparent;
	color: inherit;
	cursor: pointer;
	-webkit-tap-highlight-color: transparent;
}
.tq40-menu-mark span {
	display: block;
	width: 25px;
	height: 1px;
	background: var(--tq40-ink);
	transition: transform .35s ease, opacity .25s ease;
}
.tq40-menu-mark:focus-visible,
.tq40-site-menu button:focus-visible,
.tq40-site-menu a:focus-visible {
	outline: 2px solid #D8BFE8;
	outline-offset: 5px;
}

.tq40-hero__eyebrow {
	position: relative;
	z-index: 1;
	margin: 20px 0 18px;
	font-size: 9px;
	font-weight: 700;
	letter-spacing: 2.5px;
	text-align: center;
}
.tq40-hero__title {
	position: relative;
	z-index: 1;
	margin: 0 auto;
	color: #fffdfb;
	font-family: var(--tq40-serif);
	font-size: clamp(76px, 10.5vw, 145px);
	font-weight: 700;
	line-height: .78;
	letter-spacing: .015em;
	text-align: center;
}
.tq40-hero__title em { 
	font-weight: 400; 
	color: #56375F;
}
.tq40-hero__ornament {
	position: absolute;
	z-index: 3;
	top: 55%;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 14px;
	font-family: var(--tq40-serif);
	font-size: 8px;
	letter-spacing: 1px;
	writing-mode: vertical-rl;
}
.tq40-hero__ornament i { width: 1px; height: 65px; background: var(--tq40-ink); }
.tq40-hero__ornament--left { left: 4%; }
.tq40-hero__ornament--right { right: 4%; }

.tq40-hero__image-wrap {
	position: absolute;
	z-index: 2;
	right: 0;
	bottom: -95px;
	left: 0;
	display: flex;
	align-items: flex-end;
	justify-content: center;
	height: 300px;
	background: linear-gradient(to bottom, transparent 0 62%, var(--tq40-paper) 62% 100%);
}
.tq40-hero__image-wrap img {
	display: block;
	width: min(56%, 510px);
	max-height: 345px;
	object-fit: contain;
	object-position: center bottom;
	filter: drop-shadow(0 18px 16px rgb(48 32 18 / 12%));
}
.tq40-hero--inner { min-height: 390px; }
.tq40-hero--inner .tq40-hero__title { padding-top: 22px; font-size: clamp(64px, 9vw, 112px); }

/* Cover singola nella hero delle categorie: non interferisce con lo slider della home */
.tq40-hero--category {
	min-height: 650px;
	padding-bottom: 34px;
}

.tq40-hero--category .tq40-hero__title {
	margin-bottom: 30px;
}

.tq40-hero__category-cover {
	position: relative;
	z-index: 2;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: clamp(210px, 27vw, 310px);
	padding: 0 12%;
}

.tq40-hero__category-cover img {
	display: block;
	width: auto;
	max-width: min(56%, 510px);
	height: 100%;
	max-height: 310px;
	object-fit: contain;
	object-position: center;
	filter: drop-shadow(0 18px 16px rgb(0 0 0 / 16%));
}


.tq40-intro {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: center;
	margin: 155px 3.5% 0;
	padding: 90px 24px 110px;
	background: var(--tq40-sand);
	text-align: center;
}

.tq40-flower {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 58px;
	height: 58px;
	margin-bottom: 18px;
	border: 1px solid var(--tq40-ink);
	border-radius: 50%;
	font-family: var(--tq40-serif);
	font-size: 36px;
	line-height: 1;
}
.tq40-flower--small { width: 48px; height: 48px; font-size: 29px; }
.tq40-flower__icon {
	display: block;
	width: 30px;
	height: 30px;
	fill: none;
	stroke: currentColor;
	stroke-width: 1.15;
	stroke-linecap: round;
	stroke-linejoin: round;
	flex: 0 0 auto;
}
.tq40-flower--small .tq40-flower__icon {
	width: 25px;
	height: 25px;
}


.tq40-eyebrow {
	margin: 0 0 15px;
	font-size: 9px;
	font-weight: 700;
	letter-spacing: 2px;
}
.tq40-intro h2,
.tq40-catalog-intro h2,
.tq40-sweet h2 {
	margin: 0;
	font-family: var(--tq40-serif);
	font-size: clamp(36px, 4vw, 52px);
	font-weight: 700;
	line-height: 1.03;
}
.tq40-intro h2 em,
.tq40-catalog-intro h2 em,
.tq40-sweet h2 em { font-weight: 400; }
.tq40-intro > p:not(.tq40-eyebrow) {
	max-width: 480px;
	margin: 20px 0 0;
	font-size: 14px;
	line-height: 1.7;
}
.tq40-text-link,
.tq40-light-link {
	display: inline-flex;
	align-items: center;
	gap: 18px;
	margin-top: 25px;
	padding-bottom: 7px;
	border-bottom: 1px solid currentColor;
	font-size: 10px;
	font-weight: 700;
	letter-spacing: 1.3px;
}
.tq40-text-link span,
.tq40-light-link span { font-size: 16px; }

.tq40-departments {
	position: relative;
	z-index: 2;
	margin: -55px 7% 125px;
}
.tq40-departments__grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 36px;
}
.tq40-department-card {
	display: flex;
	flex-direction: column;
	align-items: stretch;
	min-width: 0;
	text-align: center;
}
.tq40-department-card__image {
	display: flex;
	align-items: center;
	justify-content: center;
	height: clamp(220px, 30vw, 390px);
	overflow: hidden;
	background: var(--tq40-sand-light);
}
.tq40-department-card__image img {
	width: 100%;
	height: 100%;
	object-fit: contain;
	transition: transform .45s ease;
}
.tq40-department-card:hover .tq40-department-card__image img { transform: scale(1.04); }
.tq40-image-placeholder__symbol {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 100%;
	color: #a98b70;
	font-family: var(--tq40-serif);
	font-size: clamp(70px, 10vw, 130px);
}
.tq40-department-card__body {
	display: flex;
	flex-direction: column;
	align-items: center;
	padding: 30px 22px 34px;
}
.tq40-department-card__body h2 {
	margin: 0;
	font-family: var(--tq40-serif);
	font-size: clamp(34px, 4vw, 50px);
}
.tq40-department-card__body > p:not(.tq40-eyebrow) {
	max-width: 310px;
	margin: 10px 0 20px;
	font-size: 13px;
	line-height: 1.55;
}
.tq40-outline-link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	min-height: 35px;
	padding: 8px 13px;
	border: 1px solid var(--tq40-ink);
	box-shadow: 2px 2px 0 var(--tq40-ink);
	font-size: 9px;
	font-weight: 700;
	letter-spacing: 1.1px;
	transition: color .2s ease, background .2s ease, box-shadow .2s ease, transform .2s ease;
}
.tq40-outline-link:hover {
	color: #fff;
	background: var(--tq40-ink);
	box-shadow: none;
	transform: translate(2px, 2px);
}

.tq40-catalog-intro {
	display: flex;
	flex-direction: column;
	align-items: center;
	margin: 95px 7% 55px;
	text-align: center;
}
.tq40-breadcrumb {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: 9px;
	margin-bottom: 52px;
	font-size: 11px;
}
.tq40-breadcrumb a { text-decoration: underline; text-underline-offset: 3px; }
.tq40-catalog-intro h2 { font-size: clamp(38px, 5vw, 60px); }
.tq40-catalog-intro > p:not(.tq40-eyebrow) {
	max-width: 500px;
	margin: 18px 0 0;
	font-size: 14px;
	line-height: 1.65;
}
.tq40-catalog-intro--detail { margin-bottom: 42px; }
.tq40-catalog-intro--detail .tq40-breadcrumb { margin-bottom: 42px; }

.tq40-category-grid,
.tq40-product-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 58px 30px;
	margin: 0 8% 130px;
}
.tq40-category-card,
.tq40-product-card {
	display: flex;
	flex-direction: column;
	align-items: center;
	min-width: 0;
	text-align: center;
}
.tq40-category-card__image,
.tq40-product-card__image {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: clamp(155px, 19vw, 230px);
	margin-bottom: 13px;
	overflow: hidden;
	background: #fff;
}
.tq40-category-card__image img,
.tq40-product-card__image img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: contain;
	transition: transform .35s ease;
}
.tq40-category-card:hover img,
.tq40-product-card:hover img { transform: scale(1.05); }
.tq40-category-card h3,
.tq40-product-card h3 {
	max-width: 100%;
	margin: 0 0 14px;
	font-family: var(--tq40-serif);
	font-size: clamp(19px, 2vw, 25px);
	line-height: 1.15;
}
.tq40-category-card .tq40-outline-link { margin-top: auto; }
.tq40-product-grid--single { grid-template-columns: minmax(180px, 320px); justify-content: center; }
.tq40-product-grid--single .tq40-product-card__image { height: 300px; }

.tq40-sweet {
	display: flex;
	flex-direction: column;
	align-items: center;
	margin: 0 3.5%;
	padding: 95px 24px 105px;
	background: var(--tq40-sand);
	text-align: center;
}
.tq40-sweet > p:not(.tq40-eyebrow) {
	max-width: 470px;
	margin: 20px 0 0;
	font-size: 14px;
	line-height: 1.65;
}
.tq40-light-link { margin-top: 26px; }

.tq40-footer {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 20px;
	padding: 30px 8%;
	font-family: var(--tq40-serif);
	font-size: 12px;
}
.tq40-footer p { margin: 0; }
.tq40-footer div { display: flex; align-items: center; gap: 18px; font-family: var(--tq40-sans); font-size: 11px; }
.tq40-footer a { font-size: 21px; }

/* Tablet */
@media (max-width: 800px) {
	.tq40-hero { min-height: 560px; margin: 18px 18px 0; }
	.tq40-hero__top { padding: 18px 20px; }
	.tq40-logo { width: clamp(205px, 36vw, 300px); }
	.tq40-hero__title { font-size: clamp(76px, 13vw, 110px); }
	.tq40-hero__image-wrap { bottom: -70px; height: 250px; }
	.tq40-hero__image-wrap img { width: min(68%, 430px); max-height: 285px; }
	.tq40-hero--category { min-height: 590px; }
	.tq40-hero__category-cover { height: 260px; }
	.tq40-hero__category-cover img { max-width: 68%; max-height: 260px; }

	.tq40-intro { margin: 115px 18px 0; padding: 75px 24px 105px; }
	.tq40-departments { margin: -48px 5% 95px; }
	.tq40-departments__grid { gap: 22px; }
	.tq40-category-grid,
	.tq40-product-grid { margin-right: 6%; margin-left: 6%; gap: 42px 20px; }
	.tq40-category-card__image,
	.tq40-product-card__image { height: 180px; }
}

/* Mobile */
@media (max-width: 560px) {
	.tq40-hero { min-height: 475px; margin: 10px 10px 0; }
	.tq40-hero__top { padding: 14px; }
	.tq40-logo { width: min(64%, 250px); min-height: 0; padding: 7px 9px; }
	.tq40-hero__eyebrow { margin-top: 38px; font-size: 8px; }
	.tq40-hero__title { font-size: clamp(62px, 17vw, 92px); line-height: .82; }
	.tq40-hero__ornament { top: 59%; font-size: 6px; }
	.tq40-hero__ornament i { height: 40px; }
	.tq40-hero__ornament--left { left: 3%; }
	.tq40-hero__ornament--right { right: 3%; }
	.tq40-hero__image-wrap { bottom: -42px; height: 205px; background: linear-gradient(to bottom, transparent 0 55%, var(--tq40-paper) 55% 100%); }
	.tq40-hero__image-wrap img { width: 84%; max-height: 225px; }
	.tq40-hero--inner { min-height: 350px; }
	.tq40-hero--inner .tq40-hero__title { padding-top: 22px; font-size: clamp(58px, 15vw, 80px); }
	.tq40-hero--category { min-height: 530px; padding-bottom: 24px; }
	.tq40-hero--category .tq40-hero__title { margin-bottom: 22px; }
	.tq40-hero__category-cover { height: 205px; padding: 0 8%; }
	.tq40-hero__category-cover img { max-width: 84%; max-height: 205px; }

	.tq40-intro { margin: 90px 10px 0; padding: 62px 22px 95px; }
	.tq40-intro h2,
	.tq40-catalog-intro h2,
	.tq40-sweet h2 { font-size: clamp(33px, 9vw, 44px); }
	.tq40-intro > p:not(.tq40-eyebrow),
	.tq40-sweet > p:not(.tq40-eyebrow) { font-size: 13px; }
	.tq40-departments { margin: -38px 6% 75px; }
	.tq40-departments__grid { grid-template-columns: 1fr; gap: 28px; }
	.tq40-department-card__image { height: 250px; }
	.tq40-department-card__body { padding: 24px 15px 28px; }
	.tq40-catalog-intro { margin: 70px 7% 38px; }
	.tq40-breadcrumb { margin-bottom: 35px; font-size: 10px; }
	.tq40-catalog-intro--detail .tq40-breadcrumb { margin-bottom: 32px; }
	.tq40-category-grid,
	.tq40-product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 34px 14px; margin: 0 6% 85px; }
	.tq40-category-card__image,
	.tq40-product-card__image { height: clamp(125px, 39vw, 185px); margin-bottom: 10px; }
	.tq40-category-card h3,
	.tq40-product-card h3 { font-size: 18px; margin-bottom: 11px; }
	.tq40-outline-link { min-height: 31px; padding: 7px 9px; font-size: 8px; letter-spacing: .8px; }
	.tq40-product-grid--single { grid-template-columns: minmax(160px, 260px); }
	.tq40-product-grid--single .tq40-product-card__image { height: 245px; }
	.tq40-sweet { margin: 0 10px; padding: 70px 22px 78px; }
	.tq40-footer { padding: 24px 6%; font-size: 10px; }
	.tq40-footer div { gap: 11px; }
}

@media (prefers-reduced-motion: reduce) {
	.tq40-page *,
	.tq40-page *::before,
	.tq40-page *::after { transition-duration: .01ms; }
}


/* Gallery Masonry: altezze calcolate sul rapporto reale delle immagini */
.tq40-gallery {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	grid-auto-rows: 1px;
	grid-auto-flow: dense;
	gap: clamp(12px, 1.5vw, 22px);
	margin: 0 7% 130px;
	align-items: start;
}

.tq40-gallery--three-columns {
	grid-template-columns: repeat(3, minmax(0, 1fr));
}

.tq40-gallery__item {
	position: relative;
	width: 100%;
	min-width: 0;
	min-height: 0;
	margin: 0;
	background: transparent;
	border: 0;
	overflow: hidden;
	align-self: start;
	grid-row-end: span 1;
}

.tq40-gallery__link {
	display: block;
	width: 100%;
	line-height: 0;
	cursor: zoom-in;
}

.tq40-gallery__item img {
	display: block;
	width: 100%;
	height: auto;
	min-height: 0;
	object-fit: contain;
	opacity: 0;
	transition: opacity .25s ease, transform .5s ease;
}

.tq40-gallery__item:not(.is-loading) img {
	opacity: 1;
}

.tq40-gallery__item.is-loading {
	min-height: 180px;
	grid-row-end: span 16;
	background: rgba(191, 164, 213, .06);
}

.tq40-gallery__item.is-loading::before {
	content: "";
	position: absolute;
	top: 50%;
	left: 50%;
	width: 28px;
	height: 28px;
	margin: -14px 0 0 -14px;
	border: 2px solid rgba(191, 164, 213, .25);
	border-top-color: #bfa4d5;
	border-radius: 50%;
	animation: tq40-gallery-spin .75s linear infinite;
	z-index: 1;
}

@keyframes tq40-gallery-spin {
	to { transform: rotate(360deg); }
}

.tq40-gallery__item:hover img {
	transform: scale(1.025);
}

.tq40-gallery__item.has-error {
	min-height: 100px;
	grid-row-end: span 8;
	background: rgba(191, 164, 213, .08);
}

.tq40-gallery__empty {
	grid-column: 1 / -1;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	min-height: 250px;
	padding: 35px 20px;
	background: var(--tq40-sand-light);
	text-align: center;
}

.tq40-gallery__empty .tq40-image-placeholder__symbol {
	width: auto;
	height: auto;
	font-size: 72px;
}

.tq40-gallery__empty p {
	margin: 12px 0 0;
	font-size: 13px;
	line-height: 1.6;
}

@media (max-width: 768px) {
	.tq40-gallery,
	.tq40-gallery--three-columns {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		margin-right: 6%;
		margin-left: 6%;
	}
}

@media (max-width: 560px) {
	.tq40-gallery,
	.tq40-gallery--three-columns {
		grid-template-columns: minmax(0, 1fr);
		gap: 12px;
		margin: 0 6% 85px;
	}
}
.tq40-lightbox {
	position: fixed;
	inset: 0;
	z-index: 99999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 4vh 4vw;
	background: rgba(10, 8, 13, .94);
	opacity: 0;
	visibility: hidden;
	transition: opacity .25s ease, visibility .25s ease;
}

.tq40-lightbox.is-open {
	opacity: 1;
	visibility: visible;
}

.tq40-lightbox__image {
	display: block;
	max-width: 92vw;
	max-height: 92vh;
	width: auto;
	height: auto;
	object-fit: contain;
}

.tq40-lightbox__close {
	position: absolute;
	top: 18px;
	right: 24px;
	width: 44px;
	height: 44px;
	border: 0;
	border-radius: 50%;
	background: rgba(255, 255, 255, .14);
	color: #fff;
	font-size: 32px;
	line-height: 1;
	cursor: pointer;
}


.tq40-lightbox__nav {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	width: 48px;
	height: 48px;
	display: flex;
	align-items: center;
	justify-content: center;
	border: 1px solid rgba(255, 255, 255, .35);
	border-radius: 50%;
	background: rgba(255, 255, 255, .14);
	color: #fff;
	font-size: 22px;
	line-height: 1;
	cursor: pointer;
	transition: background .2s ease, border-color .2s ease;
}

.tq40-lightbox__nav:hover {
	background: rgba(255, 255, 255, .28);
	border-color: rgba(255, 255, 255, .7);
}

.tq40-lightbox__prev { left: 24px; }
.tq40-lightbox__next { right: 24px; }

@media (max-width: 600px) {
	.tq40-lightbox { padding: 60px 12px; }
	.tq40-lightbox__image { max-width: 100%; max-height: 78vh; }
	.tq40-lightbox__nav { width: 40px; height: 40px; font-size: 18px; }
	.tq40-lightbox__prev { left: 10px; }
	.tq40-lightbox__next { right: 10px; }
}

body.tq40-lightbox-open { overflow: hidden; }

@media (prefers-reduced-motion: reduce) {
	.tq40-gallery__item img,
	.tq40-lightbox { transition-duration: .01ms; }
}













/* ==========================================
   TORTERIA 40 — DARK THEME
   Palette nero + viola pastello
========================================== */

.tq40-page.tq40-page--dark {
	--tq40-sand: #21182A;
	--tq40-sand-light: #2B2035;
	--tq40-ink: #F4EEF8;
	--tq40-paper: #100D14;
	--tq40-magenta: #C69BDD;

	--tq40-dark-accent: #BFA4D5;
	--tq40-dark-muted: #C7B8D0;
	--tq40-dark-border: rgba(191, 164, 213, .24);

	color: #F4EEF8;
	background: #100D14;
}

/* Sfondo generale anche fuori dal main */
body:has(.tq40-page--dark),
body:has(.tq40-page--dark) #page,
body:has(.tq40-page--dark) .site,
body:has(.tq40-page--dark) .site-content,
body:has(.tq40-page--dark) .content-area {
	background: #100D14;
	color: #F4EEF8;
}

/* Colori globali */
.tq40-page--dark {
	color: #F4EEF8;
	background-color: #100D14;
}

.tq40-page--dark a {
	color: inherit;
}

/* HERO */
.tq40-page--dark .tq40-hero {
	background: linear-gradient(
		135deg,
		#291D32 0%,
		#17121E 55%,
		#302039 100%
	);
	border: 1px solid var(--tq40-dark-border);
}

.tq40-page--dark .tq40-hero__title {
	color: #F8F1FA;
}

.tq40-page--dark .tq40-hero__eyebrow,
.tq40-page--dark .tq40-eyebrow {
	color: #D8BFE8;
}

.tq40-page--dark .tq40-menu-mark span,
.tq40-page--dark .tq40-hero__ornament i {
	background: #E9DDF0;
}

.tq40-page--dark .tq40-hero__ornament {
	color: #E9DDF0;
}

.tq40-page--dark .tq40-hero__image-wrap {
	background: linear-gradient(
		to bottom,
		transparent 0 62%,
		#100D14 62% 100%
	);
}

/* LOGO: mantiene il fondo bianco originale */
.tq40-page--dark .tq40-logo {
	background: #FFFFFF;
	border: 1px solid #FFFFFF;
}

/* INTRO E SEZIONI EVIDENZIATE */
.tq40-page--dark .tq40-intro,
.tq40-page--dark .tq40-sweet {
	background: linear-gradient(
		135deg,
		#291D32 0%,
		#1C1523 55%,
		#302039 100%
	);
}

.tq40-page--dark .tq40-flower {
	color: #D8B5E8;
	border-color: #B58BCB;
	background: rgba(191, 164, 213, .08);
}

/* TITOLI */
.tq40-page--dark .tq40-intro h2,
.tq40-page--dark .tq40-catalog-intro h2,
.tq40-page--dark .tq40-sweet h2 {
	color: #F7F0F8;
}

.tq40-page--dark .tq40-intro h2 em,
.tq40-page--dark .tq40-sweet h2 em {
	color: #CBA9E2;
}

.tq40-page--dark .tq40-catalog-intro h2 em {
	color: #56375f;
}

/* TESTI */
.tq40-page--dark .tq40-intro > p:not(.tq40-eyebrow),
.tq40-page--dark .tq40-catalog-intro > p:not(.tq40-eyebrow),
.tq40-page--dark .tq40-sweet > p:not(.tq40-eyebrow),
.tq40-page--dark .tq40-department-card__body > p:not(.tq40-eyebrow),
.tq40-page--dark .tq40-gallery__empty p {
	color: #D5C9DC;
}

/* SEZIONI E GRIGLIE */
.tq40-page--dark .tq40-departments,
.tq40-page--dark .tq40-category-grid,
.tq40-page--dark .tq40-product-grid,
.tq40-page--dark .tq40-gallery {
	background: transparent;
}

/* CARD E CONTENITORI IMMAGINI */
.tq40-page--dark .tq40-department-card__image,

.tq40-page--dark .tq40-product-card__image,
.tq40-page--dark .tq40-gallery__item,
.tq40-page--dark .tq40-gallery__empty {
	background: linear-gradient(
		145deg,
		#2C2036 0%,
		#19131F 100%
	);
	border: 1px solid var(--tq40-dark-border);
}

.tq40-page--dark .tq40-category-card__image {
	
	background: transparent;
	border: 1px solid var(--tq40-dark-border);
	
}



/* Immagini: conserva la trasparenza originale */
.tq40-page--dark .tq40-gallery__item img,
.tq40-page--dark .tq40-category-card__image img,
.tq40-page--dark .tq40-product-card__image img,
.tq40-page--dark .tq40-department-card__image img {
	background: transparent;
}

/* PLACEHOLDER */
.tq40-page--dark .tq40-image-placeholder__symbol {
	color: #C5A0D9;
}

/* TITOLI CARD */
.tq40-page--dark .tq40-category-card h3,
.tq40-page--dark .tq40-product-card h3,
.tq40-page--dark .tq40-department-card__body h2 {
	color: #F5EDF8;
}

/* BREADCRUMB */
.tq40-page--dark .tq40-breadcrumb,
.tq40-page--dark .tq40-breadcrumb a {
	color: #CBBBD5;
}

.tq40-page--dark .tq40-breadcrumb a:hover {
	color: #E1BFF3;
}

/* PULSANTI */
.tq40-page--dark .tq40-outline-link {
	color: #F5EDF8;
	background: #291D32;
	border-color: #BFA4D5;
	box-shadow: 2px 2px 0 #8F6AA8;
}

.tq40-page--dark .tq40-outline-link:hover {
	color: #17111D;
	background: #D8BFE8;
	border-color: #D8BFE8;
	box-shadow: none;
}

/* LINK */
.tq40-page--dark .tq40-text-link,
.tq40-page--dark .tq40-light-link {
	color: #DCC4EB;
	border-color: #BFA4D5;
}

.tq40-page--dark .tq40-text-link:hover,
.tq40-page--dark .tq40-light-link:hover {
	color: #FFFFFF;
}

/* FOOTER */
.tq40-page--dark .tq40-footer {
	color: #E9DDF0;
	background: #100D14;
	border-top: 1px solid var(--tq40-dark-border);
}

.tq40-page--dark .tq40-footer a:hover {
	color: #D8B5E8;
}

/* ACCESSIBILITÀ */
.tq40-page--dark a:focus-visible {
	outline: 2px solid #D8BFE8;
	outline-offset: 4px;
}

/* RIDUZIONE ANIMAZIONI */
@media (prefers-reduced-motion: reduce) {
	.tq40-page--dark *,
	.tq40-page--dark *::before,
	.tq40-page--dark *::after {
		transition-duration: .01ms;
	}
}



/* HERO IMAGE SLIDER — aggiunta isolata, senza modificare il layout esistente */
.tq40-hero-slider {
	position: absolute;
}
.tq40-hero-slider .tq40-hero-slider__slides {
	position: relative;
	display: grid;
	align-items: end;
	justify-items: center;
	width: 100%;
	height: 100%;
	padding-bottom: 25px;
}




.tq40-hero-slider .tq40-hero-slider__slides img {
    grid-area: 1 / 1;
    width: min(56%, 510px);
    max-height: 345px;
    object-fit: contain;
    object-position: center bottom;

    opacity: 0;
    transform: scale(1.02);

    transition:
        opacity 1s ease-in-out,
        transform 1.4s ease-in-out;

    pointer-events: none;
}

.tq40-hero-slider .tq40-hero-slider__slides img.is-active {
    opacity: 1;
    transform: scale(1);
}





.tq40-hero-slider .tq40-hero-slider__dots {
	position: absolute;
	z-index: 4;
	bottom: 7px;
	left: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 7px;
	transform: translateX(-50%);
}
.tq40-hero-slider .tq40-hero-slider__dots button {
	display: block;
	width: 6px;
	height: 6px;
	min-width: 6px;
	min-height: 6px;
	padding: 0;
	border: 1px solid #D8BFE8;
	border-radius: 50%;
	background: transparent;
	cursor: pointer;
	transition: background-color .2s ease, transform .2s ease;
}
.tq40-hero-slider .tq40-hero-slider__dots button.is-active {
	background: #D8BFE8;
	transform: scale(1.15);
}
.tq40-hero-slider .tq40-hero-slider__dots button:focus-visible {
	outline: 2px solid #D8BFE8;
	outline-offset: 3px;
}
@media (max-width: 800px) {
	.tq40-hero-slider .tq40-hero-slider__slides img {
		width: min(68%, 430px);
		max-height: 285px;
	}
}
@media (max-width: 560px) {
	.tq40-hero-slider .tq40-hero-slider__slides img {
		width: 84%;
		max-height: 225px;
	}
	.tq40-hero-slider .tq40-hero-slider__slides {
		padding-bottom: 22px;
	}
	.tq40-hero-slider .tq40-hero-slider__dots {
		bottom: 5px;
	}
}
@media (prefers-reduced-motion: reduce) {
	.tq40-hero-slider .tq40-hero-slider__slides img,
	.tq40-hero-slider .tq40-hero-slider__dots button {
		transition: none;
	}
}


/* La Masonry mantiene le proporzioni originali delle fotografie anche nel tema scuro. */
.tq40-page--dark .tq40-gallery__item {
	background: transparent;
	border: 0;
}











/* MENU FULL-WIDTH — overlay coordinato con il tema scuro */
.tq40-site-menu {
	position: fixed;
	inset: 0;
	z-index: 100000;
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	width: 100%;
	min-height: 100vh;
	min-height: 100dvh;
	padding: clamp(22px, 4vw, 54px) clamp(22px, 7vw, 100px) clamp(24px, 4vw, 48px);
	background: radial-gradient(ellipse at 78% 18%, #342440 0%, #21182A 42%, #100D14 100%);
	color: #F4EEF8;
	opacity: 0;
	visibility: hidden;
	transform: translateY(-14px);
	transition: opacity .45s ease, transform .55s cubic-bezier(.2,.7,.2,1), visibility .45s;
	overflow-y: auto;
	overscroll-behavior: contain;
}
.tq40-site-menu.is-open {
	opacity: 1;
	visibility: visible;
	transform: translateY(0);
}
.tq40-site-menu__top {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
}
.tq40-site-menu__brand {
	display: inline-flex;
	align-items: baseline;
	gap: 5px;
	padding: 9px 13px;
	background: #fff;
	color: #2B2035 !important;
	font-family: var(--tq40-serif);
	font-size: 13px;
	letter-spacing: 1.1px;
	text-decoration: none;
}
.tq40-site-menu__brand em {
	color: #B66CCB;
	font-size: 19px;
}
.tq40-site-menu__close {
	display: grid;
	place-items: center;
	width: 48px;
	height: 48px;
	padding: 0;
	border: none;
	border-radius: 50%;
	background: transparent;
	color: #F4EEF8;
	font: 300 34px/1 var(--tq40-sans);
	cursor: pointer;
	transition: background .25s ease, transform .25s ease;
}
.tq40-site-menu__close:hover {
	
	transform: rotate(90deg);
}
.tq40-site-menu__content {
	display: flex;
	flex-direction: column;
	width: min(100%, 1050px);
	margin: auto;
	padding: 8vh 0;
}
.tq40-site-menu__content > .tq40-eyebrow {
	margin: 0 0 clamp(22px, 4vh, 42px);
	text-align: left;
}
.tq40-site-menu__link {
	display: grid;
	grid-template-columns: 54px minmax(0, 1fr) 36px;
	align-items: center;
	gap: clamp(12px, 2vw, 24px);
	padding: clamp(17px, 2.8vw, 30px) 0;
	border-bottom: 1px solid rgba(191,164,213,.3);
	color: #F7F0F8 !important;
	font-family: var(--tq40-serif);
	font-size: 40px;
	line-height: 1.05;
	text-decoration: none;
	transition: color .25s ease, padding-left .35s ease;
}
.tq40-site-menu__link:first-of-type { border-top: 1px solid rgba(191,164,213,.3); }
.tq40-site-menu__link > span {
	color: #BFA4D5;
	font-family: var(--tq40-sans);
	font-size: 11px;
	letter-spacing: 1.5px;
}

/* Icone vettoriali: evita la resa emoji dei caratteri Unicode su iOS/Safari */
.tq40-page .tq40-arrow-icon {
	display: inline-block;
	width: 1em;
	height: 1em;
	overflow: visible;
	vertical-align: -0.12em;
	fill: none;
	stroke: currentColor;
	stroke-width: 1.7;
	stroke-linecap: round;
	stroke-linejoin: round;
}
.tq40-page .tq40-site-menu__link > i .tq40-arrow-icon {
	width: 1em;
	height: 1em;
}

.tq40-site-menu__link > i {
	justify-self: end;
	color: #CBA9E2;
	font-family: var(--tq40-sans);
	font-size: clamp(22px, 3vw, 38px);
	font-style: normal;
	transition: transform .3s ease;
}
.tq40-site-menu__link:hover {
	padding-left: 12px;
	color: #DCC4EB !important;
}
.tq40-site-menu__link:hover > i { transform: translate(5px, -5px); }
.tq40-site-menu__footer {
	margin: 0;
	color: #BFA4D5;
	font-size: 9px;
	font-weight: 700;
	letter-spacing: 2px;
}
body.tq40-menu-open { overflow: hidden; }

@media (max-width: 560px) {
	.tq40-site-menu { padding: 18px 22px 24px; }
	.tq40-site-menu__brand { font-size: 11px; }
	.tq40-site-menu__close { width: 42px; height: 42px; font-size: 30px; }
	.tq40-site-menu__content { padding: 5vh 0; }
	.tq40-site-menu__link {
		grid-template-columns: 30px minmax(0, 1fr) 24px;
		gap: 10px;
		font-size: clamp(32px, 9vw, 48px);
	}
	.tq40-site-menu__link > span { font-size: 9px; }
}

@media (prefers-reduced-motion: reduce) {
	.tq40-site-menu,
	.tq40-site-menu__link,
	.tq40-site-menu__close,
	.tq40-menu-mark span { transition-duration: .01ms; }
}


/* Animazioni d'ingresso condivise tra Home/Catalogo, Contatti e Il nostro locale. */
.tq40-page .tq40-reveal {
	opacity: 0;
	transform: translate3d(0, 24px, 0);
	transition:
		opacity .75s cubic-bezier(.22, .61, .36, 1),
		transform .75s cubic-bezier(.22, .61, .36, 1);
	transition-delay: var(--tq40-reveal-delay, 0ms);
	will-change: opacity, transform;
}

.tq40-page .tq40-reveal.is-visible {
	opacity: 1;
	transform: translate3d(0, 0, 0);
}

@media (prefers-reduced-motion: reduce) {
	.tq40-page .tq40-reveal,
	.tq40-page .tq40-reveal.is-visible {
		opacity: 1;
		transform: none;
		transition: none;
		will-change: auto;
	}
}



/* =========================================================
   TORTERIA 40 — PALETTE CHIARA COORDINATA ALLA REFERENCE
   Modifica esclusivamente i colori: layout e spaziature invariati.
   ========================================================= */
.tq40-page.tq40-page--dark {
    --tq40-sand: #E1C9B1;
    --tq40-sand-light: #F3EAE0;
    --tq40-ink: #211B17;
    --tq40-paper: #FFFFFF;
    --tq40-magenta: #56375F;
    --tq40-dark-accent: #56375F;
    --tq40-dark-muted: #4B3A32;
    --tq40-dark-border: rgba(52, 36, 64, .22);
    color: #211B17;
    background: #FFFFFF;
}

/* Fondo generale della página */
body:has(.tq40-page--dark),
body:has(.tq40-page--dark) #page,
body:has(.tq40-page--dark) .site,
body:has(.tq40-page--dark) .site-content,
body:has(.tq40-page--dark) .content-area {
    background: #FFFFFF;
    color: #211B17;
}
.tq40-page--dark {
    color: #211B17;
    background-color: #FFFFFF;
}

/* Hero: beige più profondo per mantenere il titolo bianco leggibile */
.tq40-page--dark .tq40-hero {
    background: #e1c9b1;
    border: 1px solid rgba(52, 36, 64, .16);
}
.tq40-page--dark .tq40-hero__title {
    color: #FFFFFF;
}
.tq40-page--dark .tq40-hero__eyebrow,
.tq40-page--dark .tq40-eyebrow,
.tq40-page--dark .tq40-hero__ornament {
    color: #FFFFFF;
}
.tq40-page--dark .tq40-menu-mark span,
.tq40-page--dark .tq40-hero__ornament i {
    background: #FFFFFF;
}
.tq40-page--dark .tq40-hero__image-wrap {
    background: linear-gradient(to bottom, transparent 0 62%, #FFFFFF 62% 100%);
}
.tq40-page--dark .tq40-logo {
    background: #FFFFFF;
    border: 1px solid #FFFFFF;
}

/* Pannelli beige chiaro: titoli e testi scuri per contrasto AA */
.tq40-page--dark .tq40-intro,
.tq40-page--dark .tq40-sweet {
    background: #E1C9B1;
}
.tq40-page--dark .tq40-flower {
    color: #342440;
    border-color: #342440;
    background: rgba(52, 36, 64, .04);
}
.tq40-page--dark .tq40-intro h2,

.tq40-page--dark .tq40-sweet h2 {
    color: white;
}
.tq40-page--dark .tq40-intro h2 em,
.tq40-page--dark .tq40-catalog-intro h2 em,
.tq40-page--dark .tq40-sweet h2 em {
    color: #56375F;
}
.tq40-page--dark .tq40-intro > p:not(.tq40-eyebrow),
.tq40-page--dark .tq40-catalog-intro > p:not(.tq40-eyebrow),
.tq40-page--dark .tq40-sweet > p:not(.tq40-eyebrow),
.tq40-page--dark .tq40-department-card__body > p:not(.tq40-eyebrow),
.tq40-page--dark .tq40-gallery__empty p {
    color: #342C27;
}

/* Aree bianche e schede */
.tq40-page--dark .tq40-departments,
.tq40-page--dark .tq40-category-grid,
.tq40-page--dark .tq40-product-grid,
.tq40-page--dark .tq40-gallery {
    background: transparent;
}
.tq40-page--dark .tq40-department-card__image,
.tq40-page--dark .tq40-product-card__image,
.tq40-page--dark .tq40-gallery__item,
.tq40-page--dark .tq40-gallery__empty {
    background: transparent;
    border: none;
}
.tq40-page--dark .tq40-category-card__image {
    background: transparent;
    border: 1px solid rgba(52, 36, 64, .18);
}
.tq40-page--dark .tq40-gallery__item img,
.tq40-page--dark .tq40-category-card__image img,
.tq40-page--dark .tq40-product-card__image img,
.tq40-page--dark .tq40-department-card__image img {
    background: transparent;
}
.tq40-page--dark .tq40-image-placeholder__symbol {
    color: #56375F;
}
.tq40-page--dark .tq40-category-card h3,
.tq40-page--dark .tq40-product-card h3,
.tq40-page--dark .tq40-department-card__body h2 {
    color: #342440;
}
.tq40-page--dark .tq40-breadcrumb,
.tq40-page--dark .tq40-breadcrumb a {
    color: #4B3A32;
}
.tq40-page--dark .tq40-breadcrumb a:hover {
    color: #56375F;
}

/* Link e pulsanti */
.tq40-page--dark .tq40-outline-link {
    color: #342440;
    background: #FFFFFF;
    border-color: #56375F;
    box-shadow: 2px 2px 0 #806047;
}
.tq40-page--dark .tq40-outline-link:hover {
    color: #FFFFFF;
    background: #56375F;
    border-color: #56375F;
    box-shadow: none;
}
.tq40-page--dark .tq40-text-link,
.tq40-page--dark .tq40-light-link {
    color: #56375F;
    border-color: #806047;
}
.tq40-page--dark .tq40-text-link:hover,
.tq40-page--dark .tq40-light-link:hover {
    color: #342440;
}

/* Footer chiaro, uguale su tutte le pagine */
.tq40-page--dark .tq40-footer {
    color: #342440;
    background: #FFFFFF;
    border-top: 1px solid rgba(52, 36, 64, .2);
}
.tq40-page--dark .tq40-footer a:hover {
    color: #56375F;
}

/* Pagina Contatti e Il nostro locale: palette applicata anche agli stili inline */
.tq40-page.tq40-page--dark.tq40-contact-page,
.tq40-page.tq40-page--dark.tq40-locale-page {
    color: #211B17;
    background: #FFFFFF;
}
.tq40-page.tq40-page--dark.tq40-contact-page .tq40-contact-content,
.tq40-page.tq40-page--dark.tq40-locale-page .tq40-contact-content,
.tq40-page.tq40-page--dark.tq40-locale-page .tq40-locale-content {
    color: #211B17;
}
.tq40-page.tq40-page--dark.tq40-contact-page .tq40-contact-intro h2,
.tq40-page.tq40-page--dark.tq40-locale-page .tq40-contact-intro h2,
.tq40-page.tq40-page--dark.tq40-locale-page .tq40-locale-intro h2,


.tq40-page.tq40-page--dark.tq40-locale-page .tq40-contact-info-item h3,
.tq40-page.tq40-page--dark.tq40-locale-page .tq40-contact-form-title {
    color: white;
}

.tq40-page.tq40-page--dark.tq40-contact-page .tq40-contact-form-title {
	color: #56375f;
}


.tq40-page.tq40-page--dark.tq40-contact-page .tq40-contact-info-item h3 {
	color: #56375f;
}




.tq40-page.tq40-page--dark.tq40-contact-page .tq40-contact-intro h2 em,
.tq40-page.tq40-page--dark.tq40-locale-page .tq40-contact-intro h2 em,
.tq40-page.tq40-page--dark.tq40-locale-page .tq40-locale-intro h2 em {
    color: #56375f;
}
.tq40-page.tq40-page--dark.tq40-contact-page .tq40-contact-kicker,
.tq40-page.tq40-page--dark.tq40-contact-page .tq40-contact-label,
.tq40-page.tq40-page--dark.tq40-contact-page .tq40-contact-number,
.tq40-page.tq40-page--dark.tq40-locale-page .tq40-contact-kicker,
.tq40-page.tq40-page--dark.tq40-locale-page .tq40-contact-label,
.tq40-page.tq40-page--dark.tq40-locale-page .tq40-contact-number,
.tq40-page.tq40-page--dark.tq40-contact-page .tq40-contact-note,
.tq40-page.tq40-page--dark.tq40-locale-page .tq40-contact-note {
    color: #56375F;
}
.tq40-page.tq40-page--dark.tq40-contact-page .tq40-contact-intro > p,
.tq40-page.tq40-page--dark.tq40-locale-page .tq40-contact-intro > p,
.tq40-page.tq40-page--dark.tq40-locale-page .tq40-locale-intro > p:last-child,
.tq40-page.tq40-page--dark.tq40-contact-page .tq40-contact-value,
.tq40-page.tq40-page--dark.tq40-locale-page .tq40-contact-value,
.tq40-page.tq40-page--dark.tq40-contact-page .tq40-contact-form-intro,
.tq40-page.tq40-page--dark.tq40-locale-page .tq40-contact-form-intro {
    color: #342C27;
}
.tq40-page.tq40-page--dark.tq40-contact-page a.tq40-contact-value:hover,
.tq40-page.tq40-page--dark.tq40-locale-page a.tq40-contact-value:hover {
    color: #56375F;
}
.tq40-page.tq40-page--dark.tq40-contact-page .tq40-contact-info,
.tq40-page.tq40-page--dark.tq40-contact-page .tq40-contact-info-item,
.tq40-page.tq40-page--dark.tq40-locale-page .tq40-contact-info,
.tq40-page.tq40-page--dark.tq40-locale-page .tq40-contact-info-item {
    border-color: rgba(52, 36, 64, .24);
}
.tq40-page.tq40-page--dark.tq40-contact-page .tq40-contact-form-wrap,
.tq40-page.tq40-page--dark.tq40-locale-page .tq40-contact-form-wrap {
    background: #F8F4EF;
    border-color: rgba(52, 36, 64, .24);
}
.tq40-page.tq40-page--dark.tq40-contact-page .tq40-contact-form label,
.tq40-page.tq40-page--dark.tq40-locale-page .tq40-contact-form label {
    color: #56375F;
}
.tq40-page.tq40-page--dark.tq40-contact-page .tq40-contact-form input:not([type="checkbox"]),
.tq40-page.tq40-page--dark.tq40-contact-page .tq40-contact-form textarea,
.tq40-page.tq40-page--dark.tq40-locale-page .tq40-contact-form input:not([type="checkbox"]),
.tq40-page.tq40-page--dark.tq40-locale-page .tq40-contact-form textarea {
    background: #FFFFFF;
    color: #211B17;
    border-color: rgba(52, 36, 64, .35);
}
.tq40-page.tq40-page--dark.tq40-contact-page .tq40-contact-form input::placeholder,
.tq40-page.tq40-page--dark.tq40-contact-page .tq40-contact-form textarea::placeholder,
.tq40-page.tq40-page--dark.tq40-locale-page .tq40-contact-form input::placeholder,
.tq40-page.tq40-page--dark.tq40-locale-page .tq40-contact-form textarea::placeholder {
    color: #62565E;
}
.tq40-page.tq40-page--dark.tq40-contact-page .tq40-privacy-row,
.tq40-page.tq40-page--dark.tq40-locale-page .tq40-privacy-row {
    color: #342C27;
}
.tq40-page.tq40-page--dark.tq40-contact-page .tq40-privacy-row a,
.tq40-page.tq40-page--dark.tq40-locale-page .tq40-privacy-row a {
    color: #56375F;
}
.tq40-page.tq40-page--dark.tq40-contact-page .tq40-contact-submit,
.tq40-page.tq40-page--dark.tq40-locale-page .tq40-contact-submit {
    color: #342440;
    background: #FFFFFF;
    border-color: #56375F;
}
.tq40-page.tq40-page--dark.tq40-contact-page .tq40-contact-submit:hover,
.tq40-page.tq40-page--dark.tq40-locale-page .tq40-contact-submit:hover {
    color: #FFFFFF;
    background: #56375F;
    border-color: #56375F;
}
.tq40-page.tq40-page--dark.tq40-contact-page .tq40-contact-feedback,
.tq40-page.tq40-page--dark.tq40-locale-page .tq40-contact-feedback {
    color: #342440;
    border-color: rgba(52, 36, 64, .35);
}

/* Gallery locale */
.tq40-page.tq40-page--dark.tq40-locale-page .tq40-locale-intro h2 {
    color: #342440;
}
.tq40-page.tq40-page--dark.tq40-locale-page .tq40-locale-intro h2 em {
    color: #56375F;
}
.tq40-page.tq40-page--dark.tq40-locale-page .tq40-locale-intro > p:last-child {
    color: #342C27;
}
.tq40-page.tq40-page--dark.tq40-locale-page .tq40-locale-gallery__item {
    background: #F3EAE0;
}

/* Il menu resta volutamente scuro, per mantenere la sua identità e la leggibilità. */
.tq40-page--dark a:focus-visible {
    outline: 2px solid #56375F;
    outline-offset: 4px;
}

.tq40-page.tq40-page--dark.tq40-contact-page .tq40-contact-copyright,
.tq40-page.tq40-page--dark.tq40-locale-page .tq40-contact-copyright {
    color: #4B3A32;
}

