/**
 * Styles of Significo Pro features printed inside the Significo theme's templates: the cookie banner,
 * live search results, share buttons, the section after posts, portfolio, the holding page, the header
 * wishlist count and off-canvas button, and the shop extras.
 * Loaded after the theme's stylesheets (they were part of the theme up to 1.0.0).
 */

/* Cookie banner (Privacy & cookies) */

.sg-consent {
	position: fixed;
	z-index: 99990;
	bottom: 16px;
	box-sizing: border-box;
	max-width: calc(100% - 32px);
	padding: 20px 24px;
	border-radius: var(--sg-radius);
	background: #12161c;
	box-shadow: 0 12px 40px rgb(0 0 0 / 0.25);
	color: #fff;
	font-size: 0.95rem;
	line-height: 1.5;
}

.sg-consent[hidden] {
	display: none;
}

.sg-consent--bar {
	right: 16px;
	left: 16px;
	max-width: none;
}

.sg-consent--left {
	left: 16px;
	width: 400px;
}

.sg-consent--right {
	right: 16px;
	width: 400px;
}

.sg-consent__inner {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 16px 24px;
}

.sg-consent--bar .sg-consent__inner {
	max-width: var(--sg-container);
	margin-inline: auto;
}

.sg-consent__text {
	flex: 1 1 320px;
	margin: 0;
}

.sg-consent .sg-consent__text a,
.sg-consent .sg-consent__text a:hover {
	color: #fff;
	text-decoration: underline;
}

.sg-consent__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
}

.sg-consent--left .sg-consent__actions,
.sg-consent--right .sg-consent__actions {
	width: 100%;
}

.sg-consent .sg-consent__button {
	flex: 1 0 auto;
	min-height: 44px;
	padding: 0.6em 1.4em;
	border: 2px solid #fff;
	border-radius: var(--sg-button-radius, var(--sg-radius));
	background: #fff;
	color: #12161c;
	font-weight: 600;
}

.sg-consent .sg-consent__button--decline {
	background: transparent;
	color: #fff;
}

.sg-consent .sg-consent__button:hover {
	background: #e5e7eb;
	color: #12161c;
}

.sg-consent .sg-consent__button--decline:hover {
	background: rgb(255 255 255 / 0.12);
	color: #fff;
}

.sg-consent :focus-visible,
.sg-focus--strong .sg-consent :focus-visible {
	outline: 3px solid #fff !important;
	outline-offset: 3px !important;
	box-shadow: 0 0 0 6px #12161c !important;
}

/* Fonts → Labels and buttons, and Accessibility → Underline links in text, reach the banner too. */
.sg-consent__button:not(.elementor *) {
	font-family: var(--sg-font-accent);
}

.sg-underline-links .sg-consent__text a:not(.button, .wp-block-button__link, .elementor-button, [role="button"]) {
	text-decoration: underline;
	text-decoration-thickness: 1px;
}

/* Live results in the header search */

.sg-search-overlay__status {
	min-height: 1.5em;
	margin: 16px 0 8px;
	color: var(--sg-color-muted);
	font-size: 0.9rem;
}

.sg-search-overlay__results {
	display: grid;
	gap: 4px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.sg-search-overlay__results a {
	display: flex;
	align-items: center;
	gap: 14px;
	padding: 10px 12px;
	border-radius: var(--sg-radius);
	color: inherit;
	text-decoration: none;
}

.sg-search-overlay__results a:hover,
.sg-search-overlay__results a:focus-visible {
	background: var(--sg-color-surface);
}

.sg-search-overlay__thumb {
	flex: none;
	width: 48px;
	height: 48px;
	border-radius: calc(var(--sg-radius) * 0.75);
	background: var(--sg-color-surface);
	object-fit: cover;
}

.sg-search-overlay__result-title {
	display: block;
	font-weight: 600;
}

.sg-search-overlay__result-type {
	display: block;
	color: var(--sg-color-muted);
	font-size: 0.85rem;
}

/* Share buttons */

.sg-share {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 12px;
}

.sg-share__label {
	color: var(--sg-color-heading);
	font-weight: 600;
}

.sg-share__list {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.sg-share__link,
:where(button).sg-share__link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	min-width: 40px;
	min-height: 40px;
	padding: 6px 12px;
	border: 1px solid var(--sg-color-line);
	border-radius: calc(999px * var(--sg-radius-scale, 1));
	background: #fff;
	color: var(--sg-color-heading);
	font-size: 0.9rem;
	line-height: 1;
	text-decoration: none;
}

.sg-share__link:has(.sg-share__icon) {
	padding: 0;
	width: 40px;
}

.sg-share__link:hover,
.sg-share__link:focus-visible,
:where(button).sg-share__link:hover {
	border-color: var(--sg-color-primary);
	background: var(--sg-color-primary);
	color: #fff;
}

.sg-share__link.is-copied {
	border-color: #1a7f37;
	background: #1a7f37;
	color: #fff;
}

.sg-share__icon {
	display: inline-flex;
}

.sg-share__icon svg {
	flex: none;
	width: 18px;
	height: 18px;
}

.sg-share__status {
	color: #1a7f37;
	font-size: 0.9rem;
}

.sg-share__status.is-error {
	color: #b32d2e;
}

/* Section layout after posts (Single post → Section at the end of posts): full width, down to the footer. */
.sg-post-after {
	margin-top: 72px;
}

.sg-main:has(> .sg-post-after:last-child) {
	padding-bottom: 0;
}

/* Portfolio */

.sg-filters {
	margin-bottom: 32px;
}

.sg-filters__list {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.sg-filters__link {
	display: inline-block;
	padding: 6px 16px;
	border: 1px solid var(--sg-color-line);
	border-radius: calc(999px * var(--sg-radius-scale, 1));
	color: var(--sg-color-heading);
	text-decoration: none;
}

.sg-filters__link:hover,
.sg-filters__link:focus-visible {
	border-color: var(--sg-color-primary);
	color: var(--sg-color-primary);
}

.sg-filters__link[aria-current] {
	border-color: var(--sg-color-primary);
	background: var(--sg-color-primary);
	color: #fff;
}

.sg-projects {
	--sg-cols: 3;
	display: grid;
	gap: 32px;
	grid-template-columns: minmax(0, 1fr);
}

.sg-projects--grid,
.sg-projects--masonry {
	grid-template-columns: repeat(auto-fill, minmax(max(220px, calc((100% - (var(--sg-cols) - 1) * 32px) / var(--sg-cols))), 1fr));
}

.sg-projects--masonry {
	align-items: start;
}

.sg-projects--list {
	gap: 56px;
}

.sg-project__link {
	display: block;
	position: relative;
	color: inherit;
	text-decoration: none;
}

.sg-project__media {
	display: block;
	overflow: hidden;
	border-radius: var(--sg-radius);
	background: var(--sg-color-surface);
}

.sg-project__media img,
.sg-project__placeholder {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: var(--sg-card-ratio, 4 / 3);
	object-fit: cover;
	transition: transform 0.4s ease;
}

.sg-project__link:hover .sg-project__media img,
.sg-project__link:focus-visible .sg-project__media img {
	transform: scale(1.04);
}

.sg-project__body {
	display: block;
	padding-top: 14px;
}

.sg-project__title {
	margin: 0 0 2px;
	font-size: 1.2rem;
}

.sg-projects--list .sg-project__title {
	font-size: clamp(1.5rem, 3vw, 2rem);
}

.sg-project__cats {
	display: block;
	color: var(--sg-color-muted);
	font-size: 0.9rem;
}

.sg-project__link:hover .sg-project__title,
.sg-project__link:focus-visible .sg-project__title {
	color: var(--sg-color-primary);
}

/* Title on hover: the text sits on a dark scrim over the image (always shown on touch screens). */
.sg-projects--overlay .sg-project__link {
	overflow: hidden;
	border-radius: var(--sg-radius);
}

.sg-projects--overlay .sg-project__body {
	display: flex;
	position: absolute;
	inset: 0;
	flex-direction: column;
	justify-content: flex-end;
	padding: 24px;
	border-radius: var(--sg-radius);
	background: linear-gradient(to top, rgb(0 0 0 / 0.82), rgb(0 0 0 / 0.35) 70%, rgb(0 0 0 / 0.15));
	opacity: 0;
	transition: opacity 0.25s ease;
}

.sg-projects--overlay .sg-project__title,
.sg-projects--overlay .sg-project__cats,
.sg-projects--overlay .sg-project__link:hover .sg-project__title,
.sg-projects--overlay .sg-project__link:focus-visible .sg-project__title {
	color: #fff;
}

.sg-projects--overlay .sg-project__link:hover .sg-project__body,
.sg-projects--overlay .sg-project__link:focus-visible .sg-project__body {
	opacity: 1;
}

.sg-projects--overlay .sg-project__link:focus-visible {
	outline: 3px solid var(--sg-color-accent);
	outline-offset: 3px;
}

@media (hover: none) {
	.sg-projects--overlay .sg-project__body {
		opacity: 1;
	}
}

.sg-entry--project .sg-post-nav {
	margin-top: 64px;
}

.sg-projects--masonry.is-masonry {
	grid-auto-rows: 2px;
	row-gap: 0;
}

.sg-projects--masonry.is-masonry > * {
	margin-bottom: 32px;
}

.sg-natural-media .sg-project__media img {
	aspect-ratio: auto;
}

/* Maintenance / coming soon holding page */

.sg-holding {
	display: grid;
	min-height: 100vh;
	place-items: center;
	padding: 48px min(var(--sg-gutter), 6vw);
	background: var(--sg-color-surface);
	text-align: center;
}

.sg-holding__inner {
	max-width: 640px;
}

.sg-holding__site {
	margin-bottom: 24px;
	color: var(--sg-color-muted);
	font-weight: 600;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

.sg-holding__title {
	font-size: clamp(2.2rem, 6vw, 3.6rem);
}

.sg-holding__text {
	font-size: 1.15rem;
}

.sg-countdown {
	margin-top: 32px;
}

.sg-countdown__clock {
	display: flex;
	justify-content: center;
	gap: 12px;
	margin-bottom: 16px;
}

.sg-countdown__unit {
	display: flex;
	flex-direction: column;
	min-width: 76px;
	padding: 14px 8px;
	border-radius: var(--sg-radius);
	background: #fff;
	box-shadow: 0 1px 2px rgb(0 0 0 / 0.06);
}

.sg-countdown__num {
	color: var(--sg-color-heading);
	font-family: var(--sg-font-heading);
	font-size: 2rem;
	font-variant-numeric: tabular-nums;
	font-weight: 700;
	line-height: 1.1;
}

.sg-countdown__label {
	color: var(--sg-color-muted);
	font-size: 0.75rem;
	letter-spacing: 0.06em;
	text-transform: uppercase;
}

.sg-countdown__text {
	color: var(--sg-color-muted);
}

/* Motion preferences */

@media (prefers-reduced-motion: reduce) {
	.sg-project__media img,
	.sg-projects--overlay .sg-project__body {
		transition: none;
	}

	.sg-project__link:hover .sg-project__media img,
	.sg-project__link:focus-visible .sg-project__media img {
		transform: none;
	}
}

.sg-motion--reduce .sg-project__media img,
.sg-motion--reduce .sg-projects--overlay .sg-project__body {
	transition: none;
}

.sg-motion--reduce .sg-project__link:hover .sg-project__media img {
	transform: none;
}

/* Tall project images stay within the screen. */
.sg-entry--project .sg-entry__media img {
	max-height: 80vh;
	object-fit: cover;
}

/* Maintenance mode with a page that isn't built with Elementor: room above and below. */
.sg-maintenance-mode .sg-main--full > .sg-entry__title {
	margin-top: clamp(48px, 12vh, 140px);
	margin-bottom: 24px;
}

.sg-maintenance-mode .sg-main--full > .sg-entry__content {
	padding-bottom: clamp(48px, 12vh, 140px);
}

/* sg-ui-guard: the share buttons keep their own shape and colors when Elementor's global button
   style (Site Settings → Buttons, or Theme Options → Buttons & forms) targets every <button>. */
:where(button).sg-share__link:not(#sg-ui) {
	padding: 6px 12px;
	border: 1px solid var(--sg-color-line);
	border-radius: calc(999px * var(--sg-radius-scale, 1));
	background: #fff;
	color: var(--sg-color-heading);
	font-size: 0.9rem;
}

:where(button).sg-share__link:hover:not(#sg-ui) {
	border-color: var(--sg-color-primary);
	background: var(--sg-color-primary);
	color: #fff;
}

.sg-share__link.is-copied:not(#sg-ui) {
	border-color: #1a7f37;
	background: #1a7f37;
	color: #fff;
}

/* Header extras printed by Significo Pro: wishlist count, off-canvas panel button. */
/* The wishlist badge has its own class: WooCommerce's cart fragments replace .sg-header-cart__count. */
.sg-header-wishlist__count {
	position: absolute;
	top: 3px;
	right: 0;
	min-width: 18px;
	height: 18px;
	padding: 0 5px;
	border-radius: calc(9px * var(--sg-radius-scale, 1));
	background: var(--sg-color-primary);
	color: #fff;
	font-size: 11px;
	font-weight: 700;
	line-height: 18px;
	text-align: center;
}

.sg-header-wishlist__count[data-count="0"] {
	display: none;
}

.sg-header-offcanvas {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	min-height: 44px;
	margin-left: 6px;
	padding: 0 10px;
	border: 0;
	border-radius: var(--sg-radius);
	background: transparent;
	color: inherit;
	font: inherit;
	font-size: 0.95rem;
	font-weight: 600;
	cursor: pointer;
	white-space: nowrap;
}

.sg-header-offcanvas:hover,
.sg-header-offcanvas:focus-visible {
	color: var(--sg-header-hover, var(--sg-color-accent));
}

.sg-header-offcanvas.sg-header-icon {
	padding: 0;
}

.sg-header-offcanvas--outline {
	padding-inline: 18px;
	border: 1px solid color-mix(in srgb, currentColor 30%, transparent);
	border-radius: 999px; /* A chosen pill shape, whatever the corner radius. */
}

.sg-header-offcanvas--outline:hover,
.sg-header-offcanvas--outline:focus-visible {
	border-color: currentColor;
}

.sg-header-offcanvas--outline.sg-header-icon {
	width: 44px;
	padding: 0;
}

@media (max-width: 420px) {
	.sg-site-header__actions .sg-header-offcanvas.has-icon {
		width: 36px;
		min-width: 36px;
		margin-left: 0;
	}
}

/* sg-ui-guard: the off-canvas button keeps its own shape and colors when Elementor's global button style
   targets every <button>. */
.sg-header-offcanvas:not(#sg-ui) {
	border: 0;
	background: transparent;
	color: inherit;
	font: inherit;
	font-size: 0.95rem;
	font-weight: 600;
	letter-spacing: normal;
	text-transform: none;
}

.sg-header-offcanvas:not(.sg-header-icon):not(#sg-ui) {
	padding: 0 10px;
	border-radius: var(--sg-radius);
}

.sg-header-offcanvas:not(.sg-header-icon):hover:not(#sg-ui),
.sg-header-offcanvas:not(.sg-header-icon):focus-visible:not(#sg-ui) {
	background: transparent;
	color: var(--sg-header-hover, var(--sg-color-accent));
}

.sg-header-offcanvas--outline:not(#sg-ui) {
	padding-inline: 18px;
	border: 1px solid color-mix(in srgb, currentColor 30%, transparent);
	border-radius: 999px;
}

.sg-header-offcanvas--outline:hover:not(#sg-ui),
.sg-header-offcanvas--outline:focus-visible:not(#sg-ui) {
	border-color: currentColor;
}

.sg-header-offcanvas--outline.sg-header-icon:not(#sg-ui) {
	padding: 0;
}

/* Shop extras on WooCommerce's own templates */

/* Significo Core's wishlist heart and quick view button over the card image (inc/woocommerce.php). */
.woocommerce ul.products li.product .sg-loop-extras {
	position: absolute;
	top: 12px;
	right: 12px;
	z-index: 3;
	display: flex;
	flex-direction: column;
	gap: 8px;
	align-items: flex-end;
}

.woocommerce ul.products li.product .sg-loop-extras__quick-view {
	padding: 7px 12px;
	font-size: 0.8rem;
}

@media (hover: hover) {
	.woocommerce ul.products li.product .sg-loop-extras__quick-view {
		opacity: 0;
		transform: translateY(-4px);
		transition: opacity 0.2s ease, transform 0.2s ease, background-color 0.2s ease;
	}

	.woocommerce ul.products li.product:hover .sg-loop-extras__quick-view,
	.woocommerce ul.products li.product .sg-loop-extras__quick-view:focus-visible,
	.woocommerce ul.products li.product .sg-loop-extras__quick-view[aria-expanded="true"] {
		opacity: 1;
		transform: none;
	}
}

.sg-product-wishlist {
	margin: 0 0 1.5em;
}

.sg-product-share {
	margin-top: 1.5em;
}

@media (prefers-reduced-motion: reduce) {
	.woocommerce ul.products li.product .sg-loop-extras__quick-view {
		transition: none;
	}
}

.sg-motion--reduce ul.products li.product .sg-loop-extras__quick-view {
	transition: none;
}
