/*
 * Terra Creta product section — levels 1, 2 and 3.
 *
 * Tokens are read off the live sites, not invented:
 *   titles    Caviar Dreams, as terracreta.com's own section titles (45px / 300 / #231F20)
 *   body      CF Asty Book 18/27 #333, as terracreta.com's text widgets
 *   captions  CF Asty 14-15px, centred, as terracreta.gr's category pages
 *   accent    #72BF44, the 2px tile border and nav green on terracreta.gr
 *   column    1140px, terracreta.com's container
 *
 * Everything is scoped under .dgtf so nothing reaches the Elementor header or footer.
 */

.dgtf {
	--tc-ink: #231f20;
	--tc-text: #333333;
	--tc-muted: #7a7a7a;
	--tc-green: #72bf44;
	--tc-olive: #598f1d;
	--tc-rule: #e4e4e0;
	--tc-dot-off: #d5d7cf;
	--tc-wrap: 1140px;
	--tc-gutter: 20px;
	--tc-title: "Caviar Dreams", "Century Gothic", "Avenir Next", Futura, sans-serif;
	--tc-body: "CF Asty", "Avenir Next", "Segoe UI", Roboto, Arial, sans-serif;

	display: block;
	color: var(--tc-text);
	font-family: var(--tc-body);
	font-weight: 200;
	font-size: 18px;
	line-height: 1.5;
	background: #ffffff;
}

.dgtf *,
.dgtf *::before,
.dgtf *::after {
	box-sizing: border-box;
}

/* Zero specificity via :where(), so every component rule below can size its own images.
   A plain `.dgtf img` outranked `.dgtf-awards__img` and let a badge render at full size. */
:where(.dgtf) img {
	max-width: 100%;
	height: auto;
}

/* The logo in the Elementor header overhangs the 97px bar down to about y=178 at the
   left edge, so the first line of content has to clear it. */
.dgtf-wrap {
	max-width: calc(var(--tc-wrap) + 2 * var(--tc-gutter));
	margin: 0 auto;
	padding-inline: var(--tc-gutter);
	padding-block: 110px 110px;
}

/* ------------------------------------------------------------------ shared */

.dgtf-back {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	margin-bottom: 28px;
	font-family: var(--tc-body);
	font-weight: normal;
	font-size: 13px;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--tc-muted);
	text-decoration: none;
	transition: color 0.2s ease;
}

.dgtf-back__arrow {
	font-size: 20px;
	line-height: 1;
	margin-top: -2px;
}

.dgtf-back:hover,
.dgtf-back:focus-visible {
	color: var(--tc-green);
}

.dgtf a:focus-visible,
.dgtf button:focus-visible {
	outline: 2px solid var(--tc-green);
	outline-offset: 3px;
}

.dgtf-title {
	margin: 0 0 18px;
	font-family: var(--tc-title);
	font-weight: normal;
	font-size: 40px;
	line-height: 1.12;
	letter-spacing: 0;
	color: var(--tc-ink);
	text-wrap: balance;
}

.dgtf-title--page {
	font-size: 45px;
	margin-bottom: 44px;
}

.dgtf-intro {
	max-width: 62ch;
	margin: -20px 0 44px;
	font-size: 18px;
	line-height: 1.5;
}

.dgtf-intro p,
.dgtf-desc p,
.dgtf-sub__text p {
	margin: 0 0 1em;
}

.dgtf-intro p:last-child,
.dgtf-desc p:last-child,
.dgtf-sub__text p:last-child {
	margin-bottom: 0;
}

/* ------------------------------------------------------------------ level 1 */

.dgtf-tiles {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 40px 32px;
}

.dgtf-tile__link {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 18px;
	text-decoration: none;
	color: inherit;
}

.dgtf-tile__media {
	display: block;
	width: 100%;
	max-width: 240px;
	aspect-ratio: 1 / 1;
	border: 2px solid var(--tc-green);
	overflow: hidden;
	background: #f4f4f1;
}

.dgtf-tile__img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.5s ease;
}

.dgtf-tile__name {
	max-width: 240px;
	font-family: var(--tc-body);
	font-weight: normal;
	font-size: 20px;
	line-height: 1.25;
	text-align: center;
	color: var(--tc-muted);
	transition: color 0.2s ease;
}

.dgtf-tile__link:hover .dgtf-tile__img {
	transform: scale(1.04);
}

.dgtf-tile__link:hover .dgtf-tile__name,
.dgtf-tile__link:focus-visible .dgtf-tile__name {
	color: var(--tc-green);
}

/* ------------------------------------------------------------------ level 2 */

.dgtf-cards {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
	gap: 56px 32px;
}

.dgtf-card__link {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 20px;
	height: 100%;
	text-decoration: none;
	color: inherit;
}

/* Bottles and jars of different heights stand on one baseline, as on .gr. */
.dgtf-card__media {
	display: flex;
	align-items: flex-end;
	justify-content: center;
	width: 100%;
	height: 380px;
	transition: transform 0.35s ease;
}

.dgtf-card__img {
	display: block;
	width: auto;
	max-width: 100%;
	max-height: 100%;
	object-fit: contain;
}

/* A page carrying several products shows them as a small family, just touching.
   Sized so three fit: 3 x 34% - 2 x 3% = 96%. The earlier 46% / -10% summed to ~118%
   and flexbox crushed the bottles until their labels were unreadable. */
.dgtf-card__media--family .dgtf-card__img {
	flex: 0 1 34%;
	min-width: 0;
	max-width: 34%;
	max-height: 82%;
}

.dgtf-card__media--family .dgtf-card__img + .dgtf-card__img {
	margin-left: -3%;
}

.dgtf-card__name {
	max-width: 240px;
	font-family: var(--tc-body);
	font-weight: normal;
	font-size: 15px;
	line-height: 1.35;
	text-align: center;
	color: var(--tc-ink);
	transition: color 0.2s ease;
}

.dgtf-card__link:hover .dgtf-card__media {
	transform: translateY(-6px);
}

.dgtf-card__link:hover .dgtf-card__name,
.dgtf-card__link:focus-visible .dgtf-card__name {
	color: var(--tc-green);
}

/* ------------------------------------------------------------------ level 3 */

.dgtf-product {
	display: grid;
	grid-template-columns: minmax(220px, 360px) minmax(0, 1fr);
	gap: 72px;
	align-items: start;
}

.dgtf-product--textonly {
	grid-template-columns: minmax(0, 1fr);
}

.dgtf-product__body {
	min-width: 0;
	padding-top: 8px;
}

.dgtf-note {
	margin: -6px 0 26px;
	font-weight: normal;
	font-size: 15px;
	letter-spacing: 0.04em;
	color: var(--tc-muted);
}

.dgtf-desc {
	max-width: 62ch;
	margin-top: 30px;
	font-size: 17px;
	line-height: 1.65;
}

/* packshot + view switcher */

.dgtf-pack__stage {
	display: flex;
	align-items: center;
	justify-content: center;
	height: 560px;
}

.dgtf-pack__img {
	display: block;
	width: auto;
	max-width: 100%;
	max-height: 100%;
	object-fit: contain;
}

.dgtf-pack__img[hidden] {
	display: none;
}

.dgtf-pack__thumbs {
	display: flex;
	justify-content: center;
	gap: 10px;
	margin-top: 22px;
}

.dgtf-pack__thumb {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 58px;
	height: 58px;
	padding: 5px;
	border: 1px solid var(--tc-rule);
	border-radius: 2px;
	background: #ffffff;
	cursor: pointer;
	transition: border-color 0.2s ease;
}

.dgtf-pack__thumb img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: contain;
}

.dgtf-pack__thumb:hover {
	border-color: var(--tc-muted);
}

.dgtf-pack__thumb.is-active {
	border-color: var(--tc-green);
	box-shadow: inset 0 0 0 1px var(--tc-green);
}

/* awards — a column of ~100 px badges left of the bottle, 25 px apart, top-aligned with
   it, as on terracreta.gr's Grand Cru page. */

.dgtf-product--awards {
	grid-template-columns: minmax(300px, 470px) minmax(0, 1fr);
}

.dgtf-product__media {
	display: flex;
	align-items: flex-start;
	justify-content: center;
	gap: 44px;
}

.dgtf-product__media > .dgtf-pack {
	flex: 1 1 auto;
	min-width: 0;
}

.dgtf-awards {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 25px;
	flex: 0 0 100px;
}

.dgtf-awards__item {
	margin: 0;
}

.dgtf-awards__img {
	display: block;
	width: 100px;
	height: 100px;
	object-fit: contain;
}

/* Pages with no photo column keep a row of badges above the title. */
.dgtf-product__body > .dgtf-awards {
	flex-direction: row;
	flex-wrap: wrap;
	gap: 18px;
	margin-bottom: 28px;
}

.dgtf-product__body > .dgtf-awards .dgtf-awards__img {
	width: 86px;
	height: 86px;
}

/* organoleptic */

.dgtf-organo {
	margin-top: 8px;
	max-width: 360px;
}

.dgtf-organo__title {
	margin: 0 0 8px;
	font-family: var(--tc-body);
	font-weight: 200;
	font-size: 20px;
	line-height: 1.3;
	color: var(--tc-ink);
}

.dgtf-organo__table {
	width: 100%;
	margin: 0;
	border-collapse: collapse;
	border: 0;
}

/* Prefixed with .dgtf to outrank hello-elementor's zebra rule,
   `table tbody>tr:nth-child(odd)>td` (0,1,4). */
.dgtf .dgtf-organo__table > tbody > tr > th,
.dgtf .dgtf-organo__table > tbody > tr > td {
	padding: 9px 0;
	border: 0;
	border-bottom: 1px solid var(--tc-rule);
	background: transparent;
	vertical-align: middle;
}

.dgtf .dgtf-organo__table > tbody > tr:first-child > th,
.dgtf .dgtf-organo__table > tbody > tr:first-child > td {
	border-top: 1px solid var(--tc-rule);
}

.dgtf .dgtf-organo__table > tbody > tr > th {
	width: 118px;
	padding-right: 16px;
	font-weight: normal;
	font-size: 14px;
	text-align: left;
	color: var(--tc-muted);
}

.dgtf-dots {
	display: inline-flex;
	gap: 9px;
}

.dgtf-dot {
	display: block;
	width: 13px;
	height: 13px;
	border-radius: 50%;
	border: 1.5px solid var(--tc-dot-off);
	background: #ffffff;
}

.dgtf-dot.is-full {
	border-color: var(--tc-green);
	background: var(--tc-green);
}

.dgtf-dot.is-half {
	border-color: var(--tc-green);
	background: linear-gradient(90deg, var(--tc-green) 50%, #ffffff 50%);
}

/* ------------------------------------------------------------------ stacked sub-products */

.dgtf-subs {
	margin-top: 56px;
}

.dgtf-sep {
	display: flex;
	align-items: center;
	gap: 18px;
	margin: 0 0 48px;
}

.dgtf-sep::before,
.dgtf-sep::after {
	content: "";
	flex: 1 1 auto;
	height: 1px;
	background: var(--tc-rule);
}

.dgtf-sep__olives {
	flex: 0 0 auto;
	display: block;
}

.dgtf-sep__olives ellipse {
	fill: #b9c233;
	stroke: #8c9a1f;
	stroke-width: 1;
}

.dgtf-sub {
	display: grid;
	grid-template-columns: minmax(200px, 300px) minmax(0, 1fr);
	gap: 64px;
	align-items: center;
	margin-bottom: 56px;
}

.dgtf-sub .dgtf-pack__stage {
	height: 420px;
}

.dgtf-sub__name {
	margin: 0 0 14px;
	font-family: var(--tc-title);
	font-weight: normal;
	font-size: 30px;
	line-height: 1.15;
	color: var(--tc-ink);
}

.dgtf-sub__text {
	max-width: 62ch;
	font-size: 17px;
	line-height: 1.65;
}

/* ------------------------------------------------------------------ placeholders */

/* Stands in for a missing primary photo. Sized like the real thing so the layout does
   not shift when the photo arrives. */
.dgtf-pack__img.is-placeholder,
.dgtf-card__img.is-placeholder {
	width: auto;
	height: 86%;
}

.dgtf-card__media--family .dgtf-card__img.is-placeholder {
	height: 70%;
}

/* ------------------------------------------------------------------ responsive */

@media (max-width: 1024px) {
	/* Below desktop the header switches to a small logo and a menu button, so there is
	   no overhang to clear. */
	.dgtf-wrap {
		padding-block: 56px 90px;
	}

	.dgtf-tiles {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 44px 28px;
	}

	.dgtf-product {
		grid-template-columns: minmax(200px, 300px) minmax(0, 1fr);
		gap: 44px;
	}

	.dgtf-product--awards {
		grid-template-columns: minmax(260px, 380px) minmax(0, 1fr);
	}

	.dgtf-product__media {
		gap: 28px;
	}

	.dgtf-awards {
		flex-basis: 80px;
		gap: 20px;
	}

	.dgtf-awards__img {
		width: 80px;
		height: 80px;
	}

	.dgtf-pack__stage {
		height: 480px;
	}
}

@media (max-width: 767px) {
	.dgtf-wrap {
		padding-block: 36px 72px;
	}

	.dgtf-title {
		font-size: 32px;
	}

	.dgtf-title--page {
		font-size: 36px;
		margin-bottom: 32px;
	}

	.dgtf-tile__name {
		font-size: 17px;
	}

	.dgtf-cards {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 40px 18px;
	}

	.dgtf-card__media {
		height: 260px;
	}

	.dgtf-product,
	.dgtf-product--awards,
	.dgtf-sub {
		grid-template-columns: minmax(0, 1fr);
		gap: 28px;
	}

	.dgtf-product__media {
		flex-direction: column;
		align-items: center;
		gap: 22px;
	}

	.dgtf-product__media > .dgtf-pack {
		width: 100%;
	}

	.dgtf-product__media > .dgtf-awards {
		flex-direction: row;
		flex-wrap: wrap;
		justify-content: center;
		flex-basis: auto;
		gap: 14px;
	}

	.dgtf-awards__img {
		width: 72px;
		height: 72px;
	}

	.dgtf-pack__stage {
		height: 400px;
	}

	.dgtf-sub .dgtf-pack__stage {
		height: 340px;
	}

	.dgtf-organo {
		max-width: none;
	}
}

@media (max-width: 380px) {
	.dgtf-tiles {
		gap: 32px 14px;
	}

	.dgtf-cards {
		grid-template-columns: minmax(0, 1fr);
	}
}

@media (prefers-reduced-motion: reduce) {
	.dgtf *,
	.dgtf *::before,
	.dgtf *::after {
		transition: none !important;
		scroll-behavior: auto !important;
	}
}
