/*
 * Terra theme — WooCommerce pages + Produse Terra (body.terra-theme).
 * Look & feel: teal → peach gradients, gold pill buttons, navy text, Urbanist (PT Serif accents).
 * The rest of the site keeps the Avada styles.
 */
body.terra-theme {
	--tt-navy: #153342;
	--tt-teal-dark: #267674;
	--tt-teal: #309491;
	--tt-teal-soft: #4c8b8c;
	--tt-gold: #cbb162;
	--tt-gold-dark: #b39a4f;
	--tt-terracotta: #b0663e;
	--tt-coral: #e47f55;
	--tt-peach: #e5b68c;
	--tt-sand: #ede5d6;
	--tt-cream: #fefcf9;
	--tt-mist: #d3ded9;
	--tt-mist-soft: #f2f6f5;
	--tt-radius: 22px;
	--tt-shadow: 0 18px 40px -24px rgba(21, 51, 66, .35);
	--tt-gradient: radial-gradient(120% 140% at 85% 30%, rgba(229, 182, 140, .95) 0%, rgba(201, 167, 134, .6) 30%, rgba(76, 139, 140, 0) 62%), linear-gradient(105deg, #45979b 0%, #2f6f71 38%, #778577 62%, #c2876a 100%);
	--tt-font: "Urbanist", "Helvetica Neue", Arial, sans-serif;
	--tt-serif: "PT Serif", Georgia, serif;
	--tt-arrow: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 52 14'%3E%3Cpath d='M0 7h49M43 1l7 6-7 6' fill='none' stroke='%23000' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");

	/* Avada variables, only inside Terra pages */
	--body_typography-font-family: var(--tt-font);
	--body_typography-color: var(--tt-navy);
	--h1_typography-font-family: var(--tt-font);
	--h2_typography-font-family: var(--tt-font);
	--h3_typography-font-family: var(--tt-font);
	--h4_typography-font-family: var(--tt-font);
	--h1_typography-color: var(--tt-navy);
	--h2_typography-color: var(--tt-navy);
	--h3_typography-color: var(--tt-navy);
	--h4_typography-color: var(--tt-navy);
	--h1_typography-font-weight: 500;
	--h2_typography-font-weight: 500;
	--h3_typography-font-weight: 500;
	--link_color: var(--tt-teal-dark);
	--link_hover_color: var(--tt-terracotta);
	--primary_color: var(--tt-teal-dark);
	--button_gradient_top_color: var(--tt-gold);
	--button_gradient_bottom_color: var(--tt-gold);
	--button_gradient_top_color_hover: var(--tt-navy);
	--button_gradient_bottom_color_hover: var(--tt-navy);
	--button_accent_color: var(--tt-navy);
	--button_accent_hover_color: var(--tt-gold);
	--button_border_color: var(--tt-navy);
	--button_border_hover_color: var(--tt-navy);
	--button_typography-font-family: var(--tt-font);
	--button_typography-font-weight: 500;
	--button_text_transform: none;
	--button_box_shadow: none;
	--form_border_color: var(--tt-mist);
	--form_focus_border_color: var(--tt-teal);
	--form_border_radius: 14px;
	--form_text_color: var(--tt-navy);
	--qty_bg_color: var(--tt-sand);
	--qty_bg_hover_color: var(--tt-gold);
	--woo_cart_bg_color: var(--tt-cream);
	--page_title_color: #fff;
	--page_title_height: auto;
	--page_title_font_size: clamp(34px, 4.4vw, 60px);
	--page_title_line_height: 1.08;
	--page_title_mobile_height: auto;
	--page_title_subheader_color: rgba(255, 255, 255, .85);
}

body.terra-theme,
body.terra-theme #main,
body.terra-theme #wrapper {
	background-color: var(--tt-cream);
}
body.terra-theme { overflow-x: hidden; }

body.terra-theme #main,
body.terra-theme #main p,
body.terra-theme #main li,
body.terra-theme #main td,
body.terra-theme #main th,
body.terra-theme #main label,
body.terra-theme #main input,
body.terra-theme #main select,
body.terra-theme #main textarea,
body.terra-theme #main button,
body.terra-theme .avada-page-titlebar-wrapper {
	font-family: var(--tt-font);
}
body.terra-theme #main { color: var(--tt-navy); font-size: 17px; }
body.terra-theme #main h1,
body.terra-theme #main h2,
body.terra-theme #main h3,
body.terra-theme #main h4,
body.terra-theme #main .product_title {
	font-family: var(--tt-font) !important;
	color: var(--tt-navy);
	font-weight: 500;
	letter-spacing: -0.01em;
}
body.terra-theme #main em { font-family: var(--tt-serif); font-style: italic; font-weight: 400; color: var(--tt-teal-dark); }
body.terra-theme #main a:not(.button):not(.terra-btn):not(.fusion-button) { color: var(--tt-teal-dark); }
body.terra-theme #main a:not(.button):not(.terra-btn):not(.fusion-button):hover { color: var(--tt-terracotta); }

/* ---------- page title bar = gradient hero ---------- */
body.terra-theme .avada-page-titlebar-wrapper .fusion-page-title-bar {
	position: relative;
	height: auto !important;
	min-height: 280px !important;
	padding: 80px 0 110px !important;
	border: 0 !important;
	display: flex !important;
	align-items: center;
	background: var(--tt-gradient) !important;
	overflow: hidden;
}
body.terra-theme .avada-page-titlebar-wrapper .fusion-page-title-bar::before {
	content: "";
	position: absolute;
	right: -60px;
	top: 50%;
	width: 520px;
	height: 520px;
	transform: translateY(-50%);
	background-color: var(--tt-peach);
	-webkit-mask: url(terra-mark-lines.png) center / contain no-repeat;
	mask: url(terra-mark-lines.png) center / contain no-repeat;
	opacity: .75;
	pointer-events: none;
}
body.terra-theme .avada-page-titlebar-wrapper .fusion-page-title-bar::after {
	content: "";
	position: absolute;
	left: -10%;
	right: -10%;
	bottom: -70px;
	height: 120px;
	border-radius: 50% 50% 0 0 / 100% 100% 0 0;
	background: var(--tt-cream);
}
body.terra-theme .fusion-page-title-bar .fusion-page-title-row { position: relative; z-index: 1; height: auto !important; width: 100%; }
body.terra-theme .fusion-page-title-bar .fusion-page-title-wrapper { height: auto !important; }
body.terra-theme .fusion-page-title-bar h1.entry-title {
	font-family: var(--tt-font) !important;
	font-size: clamp(34px, 4.4vw, 60px) !important;
	line-height: 1.08 !important;
	font-weight: 500 !important;
	letter-spacing: -0.015em;
	color: #fff !important;
}
body.terra-theme .fusion-page-title-bar .fusion-breadcrumbs,
body.terra-theme .fusion-page-title-bar .fusion-breadcrumbs a,
body.terra-theme .fusion-page-title-bar .fusion-breadcrumbs span { color: rgba(255, 255, 255, .85) !important; font-size: 15px; }
body.terra-theme .fusion-page-title-bar .fusion-breadcrumbs a:hover { color: var(--tt-gold) !important; }

/* Produse Terra: own hero instead of the title bar */
body.terra-kits-page .avada-page-titlebar-wrapper { display: none; }
body.terra-kits-page #main { padding-top: 0 !important; }

/* ---------- buttons: gold pill + arrow ---------- */
body.terra-theme #main .button,
body.terra-theme #main button.button,
body.terra-theme #main .single_add_to_cart_button,
body.terra-theme #main .checkout-button,
body.terra-theme #main #place_order,
body.terra-theme #main .wc-proceed-to-checkout .fusion-button,
body.terra-theme #main .woocommerce-content-box .fusion-button,
body.terra-theme .terra-btn {
	display: inline-flex !important;
	align-items: center;
	justify-content: center;
	gap: 14px;
	min-height: 52px;
	padding: 12px 30px !important;
	border: 1px solid var(--tt-navy) !important;
	border-radius: 999px !important;
	background: var(--tt-gold) !important;
	color: var(--tt-navy) !important;
	font-family: var(--tt-font) !important;
	font-size: 17px !important;
	font-weight: 500 !important;
	letter-spacing: 0 !important;
	line-height: 1.2 !important;
	text-transform: none !important;
	text-decoration: none !important;
	box-shadow: none !important;
	transition: background-color .2s, color .2s, transform .2s;
}
body.terra-theme #main .button:hover,
body.terra-theme #main .single_add_to_cart_button:hover,
body.terra-theme #main .checkout-button:hover,
body.terra-theme #main #place_order:hover,
body.terra-theme #main .wc-proceed-to-checkout .fusion-button:hover,
body.terra-theme .terra-btn:hover,
body.terra-theme .terra-btn:focus-visible {
	background: var(--tt-navy) !important;
	color: var(--tt-gold) !important;
}
body.terra-theme #main .single_add_to_cart_button::after,
body.terra-theme #main .checkout-button::after,
body.terra-theme #main #place_order::after,
body.terra-theme #main .wc-proceed-to-checkout .fusion-button::after,
body.terra-theme .terra-btn--gold::after,
body.terra-theme .terra-buy__direct::after {
	content: "";
	width: 46px;
	height: 12px;
	flex: none;
	background-color: currentColor;
	-webkit-mask: var(--tt-arrow) center / contain no-repeat;
	mask: var(--tt-arrow) center / contain no-repeat;
	transition: transform .2s;
}
body.terra-theme #main .button:hover::after,
body.terra-theme .terra-btn:hover::after { transform: translateX(4px); }
body.terra-theme .terra-btn--ghost {
	background: transparent !important;
	border-color: rgba(255, 255, 255, .8) !important;
	color: #fff !important;
}
body.terra-theme .terra-btn--ghost:hover { background: #fff !important; color: var(--tt-navy) !important; }
body.terra-theme #main a.remove { color: var(--tt-terracotta) !important; background: transparent !important; }
body.terra-theme #main a.remove:hover { background: var(--tt-terracotta) !important; color: #fff !important; }

/* ---------- forms ---------- */
body.terra-theme #main input[type="text"],
body.terra-theme #main input[type="email"],
body.terra-theme #main input[type="tel"],
body.terra-theme #main input[type="number"],
body.terra-theme #main input[type="password"],
body.terra-theme #main select,
body.terra-theme #main textarea,
body.terra-theme #main .select2-container .select2-selection {
	border: 1px solid var(--tt-mist) !important;
	border-radius: 14px !important;
	background: #fff !important;
	color: var(--tt-navy) !important;
	min-height: 50px;
}
body.terra-theme #main input:focus,
body.terra-theme #main select:focus,
body.terra-theme #main textarea:focus {
	border-color: var(--tt-teal) !important;
	box-shadow: 0 0 0 3px rgba(48, 148, 145, .18) !important;
	outline: 0;
}
body.terra-theme #main .quantity { border-radius: 999px; overflow: hidden; border: 1px solid var(--tt-mist); }
body.terra-theme #main .quantity input.qty { min-height: 44px; border: 0 !important; border-radius: 0 !important; }

/* ---------- cards & boxes ---------- */
body.terra-theme #main .woocommerce-content-box,
body.terra-theme #main .cart_totals,
body.terra-theme #main .woocommerce-checkout-review-order,
body.terra-theme #main .woocommerce-billing-fields,
body.terra-theme #main .woocommerce-additional-fields,
body.terra-theme #main .woocommerce-order,
body.terra-theme #main ul.products .fusion-product-wrapper {
	border: 1px solid var(--tt-sand) !important;
	border-radius: var(--tt-radius) !important;
	background: #fff !important;
	box-shadow: var(--tt-shadow);
}
body.terra-theme #main .woocommerce-billing-fields,
body.terra-theme #main .woocommerce-additional-fields,
body.terra-theme #main .woocommerce-checkout-review-order,
body.terra-theme #main .cart_totals { padding: 26px 28px !important; }
body.terra-theme #main ul.products .fusion-product-wrapper { overflow: hidden; }
body.terra-theme #main .shop_table { border: 0 !important; }
body.terra-theme #main .shop_table th {
	color: var(--tt-teal-dark) !important;
	font-size: 13px;
	font-weight: 600;
	letter-spacing: .08em;
	text-transform: uppercase;
}
body.terra-theme #main .shop_table td,
body.terra-theme #main .shop_table th { border-color: var(--tt-sand) !important; }
body.terra-theme #main .order-total .amount,
body.terra-theme #main .summary .price,
body.terra-theme #main .product .price { color: var(--tt-navy) !important; font-family: var(--tt-font); }
body.terra-theme #main .summary .price { font-size: 26px; font-weight: 500; }
body.terra-theme #main .woocommerce-product-gallery__image img,
body.terra-theme #main .woocommerce-product-gallery img { border-radius: var(--tt-radius); }
body.terra-theme #main .product-border { border-color: var(--tt-sand) !important; }
body.terra-theme #main .product_meta { color: rgba(21, 51, 66, .7); font-size: 14px; }

/* tabs */
body.terra-theme #main .woocommerce-tabs .tabs { border: 0 !important; display: flex; flex-wrap: wrap; gap: 8px; }
body.terra-theme #main .woocommerce-tabs .tabs li { border: 0 !important; }
body.terra-theme #main .woocommerce-tabs .tabs li a {
	border: 1px solid var(--tt-mist) !important;
	border-radius: 999px !important;
	background: #fff !important;
	color: var(--tt-navy) !important;
	padding: 10px 22px !important;
}
body.terra-theme #main .woocommerce-tabs .tabs li.active a { background: var(--tt-teal-dark) !important; border-color: var(--tt-teal-dark) !important; color: #fff !important; }
body.terra-theme #main .woocommerce-tabs .panel { border: 1px solid var(--tt-sand) !important; border-radius: var(--tt-radius); background: #fff; padding: 28px !important; }

/* notices */
body.terra-theme #main .woocommerce-message,
body.terra-theme #main .woocommerce-info,
body.terra-theme #main .woocommerce-error,
body.terra-theme #main .wc-block-components-notice-banner {
	border: 0 !important;
	border-left: 4px solid var(--tt-teal) !important;
	border-radius: 16px !important;
	background: var(--tt-mist-soft) !important;
	color: var(--tt-navy) !important;
}
body.terra-theme #main .woocommerce-error,
body.terra-theme #main .wc-block-components-notice-banner.is-error { border-left-color: var(--tt-coral) !important; }

/* payment box */
body.terra-theme #main .wc_payment_methods { border: 0 !important; background: transparent !important; }
body.terra-theme #main .wc_payment_methods li { padding: 16px 18px; border: 1px solid var(--tt-mist) !important; border-radius: 16px; background: var(--tt-mist-soft); }
body.terra-theme #main .payment_box { margin-top: 10px; border-radius: 12px; background: #fff !important; color: var(--tt-navy) !important; }
body.terra-theme #main .payment_box::before { display: none !important; }

/* ---------- Produse Terra hero ---------- */
.terra-hero {
	position: relative;
	width: 100vw;
	margin: 0 0 70px calc(50% - 50vw);
	padding: clamp(70px, 9vw, 130px) 20px clamp(110px, 12vw, 170px);
	background: var(--tt-gradient);
	color: #fff;
	overflow: hidden;
}
.terra-hero::after {
	content: "";
	position: absolute;
	left: -10%;
	right: -10%;
	bottom: -90px;
	height: 160px;
	border-radius: 50% 50% 0 0 / 100% 100% 0 0;
	background: var(--tt-cream);
}
.terra-hero__geo {
	position: absolute;
	right: max(-80px, calc(50% - 760px));
	top: 50%;
	width: min(600px, 66vw);
	aspect-ratio: 1104 / 1132;
	transform: translateY(-50%);
	background-color: var(--tt-peach);
	-webkit-mask: url(terra-mark-lines.png) center / contain no-repeat;
	mask: url(terra-mark-lines.png) center / contain no-repeat;
	opacity: .8;
	pointer-events: none;
}
.terra-hero__inner { position: relative; z-index: 1; max-width: 1180px; margin: 0 auto; }
.terra-hero__eyebrow {
	margin: 0 0 18px !important;
	color: var(--tt-gold) !important;
	font-size: 15px !important;
	font-weight: 600;
	letter-spacing: .14em;
	text-transform: uppercase;
}
body.terra-theme #main .terra-hero__title {
	max-width: 820px;
	margin: 0 0 26px;
	color: #fff !important;
	font-size: clamp(38px, 5.2vw, 68px);
	line-height: 1.07;
	font-weight: 500;
	letter-spacing: -0.015em;
}
.terra-hero__sub { max-width: 760px; margin: 0 0 38px !important; color: rgba(255, 255, 255, .92) !important; font-size: clamp(17px, 1.6vw, 21px) !important; line-height: 1.6; font-weight: 300; }
.terra-hero__sub strong { color: #fff; font-weight: 600; }
.terra-hero__ctas { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 56px; }
.terra-hero__stats { display: flex; flex-wrap: wrap; margin: 0; padding: 0; }
.terra-hero__stat { padding: 0 34px; border-left: 1px solid rgba(255, 255, 255, .7); }
.terra-hero__stat:first-child { padding-left: 0; border-left: 0; }
.terra-hero__stat dt { margin: 0; color: #fff; font-size: clamp(28px, 3vw, 40px); font-weight: 400; line-height: 1.15; }
.terra-hero__stat dd { margin: 4px 0 0; color: rgba(255, 255, 255, .88); font-size: 16px; font-weight: 300; }

body.terra-theme #main .terra-kits__heading { margin: 0 0 18px; font-size: clamp(30px, 3.4vw, 46px); text-align: center; }
body.terra-theme .terra-kits__intro { text-align: center; color: var(--tt-teal-dark); font-size: 18px; }
body.terra-theme .terra-kits__filter { justify-content: center; margin-bottom: 36px; }

@media (max-width: 800px) {
	body.terra-theme .avada-page-titlebar-wrapper .fusion-page-title-bar { padding: 46px 0 70px; min-height: 0; }
	body.terra-theme .avada-page-titlebar-wrapper .fusion-page-title-bar::before { width: 300px; height: 300px; right: -120px; opacity: .35; }
	.terra-hero__geo { opacity: .3; right: -40%; width: 120vw; }
	.terra-hero__stat { flex: 1 1 45%; padding: 14px 0 0; border-left: 0; }
	body.terra-theme #main .button,
	body.terra-theme #main .single_add_to_cart_button,
	body.terra-theme #main #place_order,
	body.terra-theme .terra-btn { width: 100%; }
}

/* single product */
body.terra-theme #main .woocommerce-product-gallery { opacity: 1 !important; }
body.terra-theme #main .summary h2.product_title { font-size: clamp(30px, 3vw, 44px) !important; line-height: 1.1 !important; margin-bottom: .4em; }
body.terra-theme #main .terra-kit__title { font-size: clamp(28px, 2.6vw, 40px); }

/* single product: gallery | summary side by side, everything else full width (no JS needed) */
@media (min-width: 900px) {
	body.terra-theme.single-product #main div.product {
		display: grid;
		grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
		column-gap: clamp(32px, 4vw, 64px);
		align-items: start;
	}
	body.terra-theme.single-product #main div.product > * { grid-column: 1 / -1; }
	body.terra-theme.single-product #main div.product > .avada-single-product-gallery-wrapper,
	body.terra-theme.single-product #main div.product > .woocommerce-product-gallery { grid-column: 1; width: auto !important; float: none !important; margin: 0 !important; }
	body.terra-theme.single-product #main div.product > .summary { grid-column: 2; width: auto !important; float: none !important; margin: 0 !important; padding-top: 10px; }
	body.terra-theme.single-product #main div.product > .summary .summary-container { padding: 0 !important; }
}
body.terra-theme.single-product #main div.product > .terra-kit { margin-top: 64px; }
body.terra-theme .avada-page-titlebar-wrapper .fusion-page-title-bar .fusion-page-title-row h1#awb-ptb-heading.entry-title { font-size: clamp(34px, 4.4vw, 60px) !important; font-weight: 500 !important; letter-spacing: -0.015em; line-height: 1.08 !important; margin-bottom: 10px !important; }
