/*
Theme Name: Tricon Company Store
Theme URI: https://store.triconhomes.com/
Description: WooCommerce theme for Tricon Company Store.
Author: Creative Slice
Author URI: https://creativeslice.com/
Version: 2026.02.09-2313
Text Domain: tricon-company-store
*/

/* Tricon store style overrides */

body {
	text-rendering: optimizeSpeed;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	--card-border-radius: var(--wp--preset--border-radius--xl, var(--wp--custom--radius--xl, 12px));
}

/*--------------------------------------------------------------
# Links & Typography
--------------------------------------------------------------*/

a {
	text-decoration-thickness: 1px !important;
	text-underline-offset: 0.1em;
}

a:not(:is(:hover, :focus)) {
	text-decoration-color: color-mix(in srgb, currentColor, transparent 75%);
}


.is-style-subheading {
	font-family: var(--wp--preset--font-family--body) !important;
	font-weight: 600;
	letter-spacing: normal;
}

p.is-style-intro {
	font-family: var(--wp--preset--font-family--heading);
	font-size: clamp(24px, 1.5rem + ((1vw - 4.8px) * 0.833), 30px);
	font-weight: 400;
	letter-spacing: normal;
	line-height: 1.27;
}

/*--------------------------------------------------------------
# WooCommerce overrides
--------------------------------------------------------------*/

.wc-block-components-product-name {
    font-weight: 500;
}
.wp-element-button:hover {
    background-color: var(--wp--preset--color--secondary-dark);
    color: var(--wp--preset--color--white);
}

/* Cart
.wp-block-woocommerce-cart-items-block,
.wp-block-woocommerce-cart-order-summary-block {
    background: white;
}
*/


/*--------------------------------------------------------------
# Header Template
--------------------------------------------------------------*/
.transparent-header.site-header-part.wp-block-template-part {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	z-index: 100;
	--wp--preset--color--primary: white;
}
.transparent-header .wc-block-mini-cart__icon {
	fill: white;
}

/*--------------------------------------------------------------
# WooCommerce Blocks Form Inputs - Checkout form
--------------------------------------------------------------*/

.wc-block-components-form.wc-block-checkout__form,
.wp-block-woocommerce-checkout-order-summary-block {
    background: white;
    padding: var(--wp--preset--spacing--50);
    border: none;
    border-radius: var(--card-border-radius, 12px);
    box-shadow: var(--wp--preset--shadow--card,0 1px 2px rgba(10,13,18,.05));
}
.wp-block-woocommerce-checkout-order-summary-block {
    padding: 1px;
}

/* h2 section titles */
.wc-block-components-title.wc-block-components-title {
    /*font-family: var(--wp--preset--font-family--body) !important;*/
    font-size: var(--wp--preset--font-size--large) !important;
    font-weight: 500;
}

body.woocommerce-checkout :is(input, select, textarea) {
    background-color: var(--wp--preset--color--gray-lightest) !important;
    color: var(--wp--preset--color--primary) !important;
    border: 1px solid var(--wp--preset--color--gray-lighter) !important;
    border-radius: 4px !important;
}

body.woocommerce-checkout :is(input, select, textarea):focus {
    background-color: var(--wp--preset--color--white) !important;
}

/* small input label */
.wc-blocks-components-select .wc-blocks-components-select__label,
.wc-block-components-text-input label {
    color: var(--wp--preset--color--gray-light) !important;
}


/* Side Panel */
.wc-block-components-product-metadata {
    color: var(--wp--preset--color--gray) !important;
}

/*--------------------------------------------------------------
# Card styles for homes and blog posts
--------------------------------------------------------------*/

.card.is-home,
.card.is-community {
	scroll-margin-top: calc(64px + 127px);

	@media screen and (min-width: 1024px) {
		scroll-margin-top: calc(64px + 67px);
	}

	@media screen and (min-width: 1200px) {
		scroll-margin-top: calc(72px + 67px);
	}
}

.card {
	background: var(--wp--preset--color--white);
	border: 1px solid var(--wp--preset--color--gray-lighter);
	box-shadow: var(--wp--preset--shadow--card, 0px 1px 2px rgba(10, 13, 18, 0.05));
	border-radius: var(--card-border-radius);
	display: flex;
	flex: 1;
	flex-direction: column;
	align-items: flex-start;
	gap: 0;
	align-self: stretch;
	position: relative;
	padding: 0;
	max-width: 384px;
	min-width: 320px;
	width: 100%;

	& abbr {
		text-decoration: none;
	}

	& .card-photo {
		position: relative;
		aspect-ratio: 3 / 2;
		width: 100%;
		background: var(--wp--preset--color--gray-lighter);
		border-radius: var(--card-border-radius) var(--card-border-radius) 0 0;
		overflow: hidden;

		& figure {
			width: 100%;
			height: 100%;

			& img {
				width: 100%;
				height: 100%;
				object-fit: cover;
			}
		}

		& .badge {
			margin: 0 !important;
			position: absolute;
			top: 16px;
			left: 16px;
			z-index: 1;
		}
	}

	& .card-content {
		display: flex;
		flex-direction: column;
		flex: 1;
		gap: 16px;
		justify-content: flex-start;
		margin: 0;
		padding: 20px;
		width: 100%;

		& > * {
			margin-block-start: 0;
		}
	}

	& .card-head {
		display: flex;
		flex-direction: column;
		justify-content: flex-start;
		gap: 8px;
	}

	& .card-head-content {
		display: flex;
		flex-direction: column;
		gap: 4px;
		line-height: 1;
	}

	& .card-title {
		color: var(--wp--preset--color--primary);
		font-family: var(--wp--preset--font-family--heading);
		font-size: var(--wp--preset--font-size--large);
		font-weight: 500;

		& span {
			font-family: var(--wp--preset--font-family--body);
			font-weight: 400;
		}

		& a[href] {
			text-decoration: none;
			color: var(--wp--preset--color--primary);
			outline: none;

			&::after {
				content: "";
				position: absolute;
				z-index: 10;
				inset: 0;
			}

			&:hover::after {
				outline: 1px solid var(--wp--preset--color--primary);
				outline-offset: 1px;
				border-radius: var(--card-border-radius);
			}

			&:active::after,
			&:focus::after {
				outline: 2px solid var(--wp--preset--color--primary);
				outline-offset: 3px;
				border-radius: var(--card-border-radius);
			}
		}
	}

	& .card-subtitle {
		color: var(--wp--preset--color--gray);
		font-weight: 500;
		font-size: 14px;
		line-height: 20px;
	}

	& .card-body {
		overflow: hidden;
		display: -webkit-box;
		-webkit-box-orient: vertical;
		-webkit-line-clamp: 2;
		line-clamp: 2;
		color: var(--wp--preset--color--gray-dark, #44403c);
		font-size: var(--wp--preset--font-size--small);
		line-height: 150%;
	}

	& .card-overview {
		display: flex;
		flex-direction: row;
		align-items: center;
		justify-content: flex-start;
		padding: 0;
		gap: var(--wp--preset--spacing--40);
		color: var(--wp--preset--color--primary, #232d65);
		font-weight: 500;
		font-size: var(--wp--preset--font-size--small);
		line-height: 150%;

		& .card-overview-item {
			display: flex;
			flex-direction: row;
			align-items: center;
			gap: 6px;

			& svg {
				stroke: currentColor;
				width: 20px;
				height: 20px;
			}
		}
	}

	& .card-tags {
		display: flex;
		flex-direction: row;
		flex-wrap: wrap;
		gap: 6px;
	}

	& .badge.specials {
		max-width: 100%;

		& .badge-icon svg {
			fill: white;
		}

		& .badge-text {
			max-width: calc(100% - 20px - 4px);
			white-space: nowrap;
			overflow: hidden;
			text-overflow: ellipsis;
		}
	}

	& .card-footer {
		z-index: 100;
	}

	&.isComparing,
	&.isSelected {
		& .card-title,
		& .card-address-title {
			& a[href] {
				&::after {
					outline: 2px solid var(--wp--preset--color--primary);
					outline-offset: 3px;
					border-radius: var(--card-border-radius);
				}
			}
		}
	}
}

@container (width > 660px) {
	.card.is-community {
		flex-direction: row;
		flex-wrap: nowrap;
		align-items: stretch;
		justify-content: stretch;
		max-width: 100% !important;
		width: 100%;
		flex-basis: 100%;

		& .card-photo {
			aspect-ratio: auto;
			width: 244px;
			max-height: 100%;
			height: 240px;
			border-radius: var(--card-border-radius) 0 0 var(--card-border-radius);
			flex-shrink: 0;
		}

		& .card-content {
			flex-shrink: 1;
			width: calc(100% - 244px);
		}
	}
}


/*--------------------------------------------------------------
# WooCommerce Product Grid Cards
--------------------------------------------------------------*/

li.wc-block-product {
	background: var(--wp--preset--color--white);
	border: 1px solid var(--wp--preset--color--gray-lighter);
	box-shadow: var(--wp--preset--shadow--card, 0px 1px 2px rgba(10, 13, 18, 0.05));
	border-radius: var(--card-border-radius);
	display: flex;
	flex-direction: column;
	position: relative;
	width: 100%;
	align-self: stretch;

	/* Image container - works for both shop archive and product collection */
	& .wc-block-components-product-image {
		position: relative;
		aspect-ratio: 1 / 1;
		width: 100%;
		background: var(--wp--preset--color--gray-lighter);
		border-radius: var(--card-border-radius) var(--card-border-radius) 0 0;
		overflow: hidden;
		margin: 0;

		& img {
			width: 100%;
			height: 100%;
			object-fit: cover;
			object-position: center top;
		}

	}

	/* Content area */
	& .card-content {
		display: flex;
		flex-direction: column;
		flex: 1;
		font-size: var(--wp--preset--font-size--medium);
		gap: 8px;
		justify-content: flex-start;
		margin: 0;
		padding: 20px;
		width: 100%;
		position: static;

		& > * {
			margin-block-start: 0;
		}
	}

	/* Title with clickable card overlay */
	& .card-title {
		color: var(--wp--preset--color--primary);
		font-family: var(--wp--preset--font-family--body);
		font-size: var(--wp--preset--font-size--medium);

		& a[href] {
			text-decoration: none;
			color: inherit;

			&::after {
				content: "";
				position: absolute;
				inset: 0;
				z-index: 1;
			}

			&:hover::after {
				outline: 1px solid var(--wp--preset--color--blue-light);
				outline-offset: 1px;
				border-radius: var(--card-border-radius);
			}

			&:focus::after {
				outline: 2px solid var(--wp--preset--color--blue-light);
				outline-offset: 3px;
				border-radius: var(--card-border-radius);
			}
		}
	}

	/* Category text */
	& .card-body {
		color: var(--wp--preset--color--gray-dark, #44403c);
		font-size: var(--wp--preset--font-size--x-small);
		line-height: 150%;

		& a {
			color: inherit;
			text-decoration: none;
		}
	}

	/* Price */
	& .card-home-price {
		font-size: var(--wp--preset--font-size--small);
		color: var(--wp--preset--color--secondary);
		font-weight: 500;

		/* Sale price styling */
		& del {
			color: var(--wp--preset--color--gray);
			font-weight: 400;
		}

		& ins {
			text-decoration: none;
		}
	}
}

/* Sale badge - global style for product grids and single product */
.wc-block-components-product-sale-badge {
	background-color: var(--wp--preset--color--secondary, #e85c4a);
	color: white;
	font-size: 14px;
	font-weight: 600;
	padding: 4px 12px;
	border-radius: 6px;
}

/* Sale badge positioning in product grid cards */
li.wc-block-product .wc-block-components-product-sale-badge {
	position: absolute;
	top: 16px;
	left: 16px;
	z-index: 1;
}


/* Product Carousel override 22% */
@container carousel (min-width: 960px) {
    .is-product-collection-layout-carousel .wc-block-product {
        min-width: 320px;
    }
}

/*--------------------------------------------------------------
# Query loop cards
--------------------------------------------------------------*/

.wp-block-post .card {
	position: relative;
	margin-top: 5px;

	& a[href] {
		text-decoration: none;
		color: var(--wp--preset--color--primary);
		outline: none;

		&::after {
			content: "";
			position: absolute;
			z-index: 10;
			inset: 0;
		}

		&:hover::after {
			outline: 1px solid var(--wp--preset--color--blue-light);
			outline-offset: 1px;
			border-radius: var(--card-border-radius);
		}

		&:active::after,
		&:focus::after {
			outline: 2px solid var(--wp--preset--color--blue-light);
			outline-offset: 3px;
			border-radius: var(--card-border-radius);
		}
	}
}


/*--------------------------------------------------------------
# ARROW button style
--------------------------------------------------------------*/
.wp-block-button.is-style-arrow,
.wp-block-button.is-style-back-arrow {
	color: var(--wp--preset--color--secondary);

	& a,
	& button,
	& .wp-block-button__link {
		position: relative;
		color: currentColor;
		background-color: transparent;
		border: none;
		border-radius: 0;
		box-shadow: none !important;
		padding: 0 30px 0 0;
		text-align: left;
		font-weight: 600;
		transition: color 0.3s ease-in-out;

		&::before,
		&::after {
			content: "";
			position: absolute;
			pointer-events: none;
		}

		/* line of arrow */
		&::after {
			left: 100%;
			top: 50%;
			background-color: currentColor;
			transition: width 0.3s ease-in-out, color 0.3s ease-in-out;
			width: 14px;
			height: 2px;
			transform: translateX(-22px) translateY(-50%);
		}

		/* head of arrow */
		&::before {
			top: 50%;
			right: 8px;
			width: 10px;
			height: 10px;
			border-top: 2px solid currentColor;
			border-right: 2px solid currentColor;
			transform: translateY(-50%) rotate(45deg);
			transition: right 0.3s ease-in-out, width 0.3s ease-in-out, height 0.3s ease-in-out;
		}

		&:hover {
			color: var(--wp--preset--color--secondary-dark) !important;

			&::before {
				right: 2px;
			}

			&::after {
				width: 20px;
			}
		}
	}
}

.wp-block-button.is-style-back-arrow {
	& a,
	& button,
	& .wp-block-button__link {
		padding: 0 0 0 30px;

		/* line of arrow */
		&::after {
			left: auto;
			right: 100%;
			transform: translateX(22px) translateY(-50%);
		}

		/* head of arrow */
		&::before {
			left: 8px;
			right: auto;
			transform: translateY(-50%) rotate(-135deg);
			transition: left 0.3s ease-in-out, width 0.3s ease-in-out, height 0.3s ease-in-out;
		}

		&:hover {
			&::before {
				left: 2px;
				right: auto;
			}
		}
	}
}
