/*
 * Basecamp — Custom Styles
 * Loft-industrial aesthetic with wood tones and nature-inspired details.
 */

/* ============================================
   Base & Utility
   ============================================ */

::selection {
	background-color: var(--wp--preset--color--driftwood);
	color: var(--wp--preset--color--white);
}

img {
	max-width: 100%;
	height: auto;
}

/* Smooth scroll for anchor links */
html {
	scroll-behavior: smooth;
}

/* ============================================
   Header / Navigation
   ============================================ */

.wp-block-navigation .wp-block-navigation-item a {
	position: relative;
	transition: color 0.3s ease;
}

.wp-block-navigation .wp-block-navigation-item a::after {
	content: '';
	position: absolute;
	bottom: -4px;
	left: 0;
	width: 0;
	height: 2px;
	background-color: var(--wp--preset--color--forest);
	transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.wp-block-navigation .wp-block-navigation-item a:hover::after {
	width: 100%;
}

/* Mini cart badge */
.wc-block-mini-cart__badge {
	background-color: var(--wp--preset--color--forest) !important;
}

/* ============================================
   Product Cards
   ============================================ */

.basecamp-product-card {
	transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
	            box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1);
	overflow: hidden;
}

.basecamp-product-card:hover {
	transform: translateY(-6px);
	box-shadow: 0 16px 48px rgba(62, 39, 35, 0.12);
}

.basecamp-product-card img {
	transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.basecamp-product-card:hover img {
	transform: scale(1.05);
}

.basecamp-product-card .wp-block-woocommerce-product-image {
	overflow: hidden;
}

/* Eco badge on product cards */
.basecamp-eco-badge {
	display: inline-block;
	position: absolute;
	top: 12px;
	left: 12px;
	background-color: var(--wp--preset--color--forest);
	color: var(--wp--preset--color--white);
	font-family: var(--wp--preset--font-family--dm-sans);
	font-size: var(--wp--preset--font-size--x-small);
	font-weight: 500;
	letter-spacing: 0.04em;
	padding: 0.35rem 0.75rem;
	border-radius: var(--wp--custom--border-radius--small);
	z-index: 2;
}

/* Low stock warning */
.basecamp-low-stock-warning {
	color: var(--wp--preset--color--driftwood);
	font-size: var(--wp--preset--font-size--small);
	font-weight: 500;
	margin-top: 0.25rem;
}

/* ============================================
   Brand Cards
   ============================================ */

.basecamp-brand-card {
	transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.basecamp-brand-card:hover {
	transform: translateY(-4px);
	box-shadow: 0 12px 36px rgba(62, 39, 35, 0.1);
}

/* ============================================
   Category Cards
   ============================================ */

.basecamp-category-card .wp-block-cover:hover img {
	transform: scale(1.08);
}

.basecamp-category-card .wp-block-cover img {
	transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ============================================
   Block Styles
   ============================================ */

/* Outline Timber button */
.is-style-outline-timber .wp-block-button__link {
	background-color: transparent;
	border: 2px solid var(--wp--preset--color--timber);
	color: var(--wp--preset--color--timber);
}

.is-style-outline-timber .wp-block-button__link:hover {
	background-color: var(--wp--preset--color--timber);
	color: var(--wp--preset--color--white);
}

/* Forest Fill button */
.is-style-forest-fill .wp-block-button__link {
	background-color: var(--wp--preset--color--forest);
	color: var(--wp--preset--color--white);
}

.is-style-forest-fill .wp-block-button__link:hover {
	background-color: #1B5E20;
}

/* Loft Card group style */
.is-style-loft-card {
	box-shadow: 0 2px 8px rgba(62, 39, 35, 0.08);
	transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.is-style-loft-card:hover {
	transform: translateY(-4px);
	box-shadow: 0 8px 24px rgba(62, 39, 35, 0.12);
}

/* Wood Panel group style */
.is-style-wood-panel {
	background: linear-gradient(
		135deg,
		var(--wp--preset--color--linen) 0%,
		var(--wp--preset--color--canvas) 50%,
		var(--wp--preset--color--linen) 100%
	);
	border: 1px solid var(--wp--preset--color--sandstone);
	position: relative;
}

.is-style-wood-panel::before {
	content: '';
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background-image: repeating-linear-gradient(
		90deg,
		transparent,
		transparent 60px,
		rgba(62, 39, 35, 0.03) 60px,
		rgba(62, 39, 35, 0.03) 61px
	);
	pointer-events: none;
}

/* Feature Grid columns style */
.is-style-feature-grid > .wp-block-column {
	padding: var(--wp--preset--spacing--40);
	border-radius: var(--wp--custom--border-radius--medium);
	background-color: var(--wp--preset--color--white);
	box-shadow: 0 2px 8px rgba(62, 39, 35, 0.06);
	transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.is-style-feature-grid > .wp-block-column:hover {
	transform: translateY(-4px);
	box-shadow: 0 8px 24px rgba(62, 39, 35, 0.1);
}

/* Rounded Shadow image */
.is-style-rounded-shadow img {
	border-radius: var(--wp--custom--border-radius--large) !important;
	box-shadow: 0 16px 48px rgba(62, 39, 35, 0.16);
}

/* Rope separator */
.is-style-rope {
	border: none !important;
	height: 4px !important;
	background: repeating-linear-gradient(
		90deg,
		var(--wp--preset--color--driftwood) 0px,
		var(--wp--preset--color--driftwood) 8px,
		transparent 8px,
		transparent 16px
	) !important;
}

/* ============================================
   WooCommerce Overrides
   ============================================ */

.woocommerce-breadcrumb {
	font-family: var(--wp--preset--font-family--dm-sans);
	font-size: var(--wp--preset--font-size--x-small);
	color: var(--wp--preset--color--fog);
}

.woocommerce-breadcrumb a {
	color: var(--wp--preset--color--driftwood);
	text-decoration: none;
}

.woocommerce-breadcrumb a:hover {
	color: var(--wp--preset--color--timber);
}

/* Product price */
.wc-block-components-product-price,
.price {
	font-family: var(--wp--preset--font-family--dm-sans);
	font-weight: 700;
	color: var(--wp--preset--color--timber);
}

.price del {
	color: var(--wp--preset--color--fog);
	font-weight: 400;
}

.price ins {
	text-decoration: none;
	color: var(--wp--preset--color--forest);
}

/* Sale badge */
.woocommerce span.onsale,
.wc-block-components-sale-badge {
	background-color: var(--wp--preset--color--forest);
	color: var(--wp--preset--color--white);
	font-family: var(--wp--preset--font-family--dm-sans);
	font-size: var(--wp--preset--font-size--x-small);
	font-weight: 500;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	border-radius: var(--wp--custom--border-radius--small);
	padding: 0.35rem 0.75rem;
}

/* Add to cart button */
.single_add_to_cart_button,
.wc-block-components-product-button__button {
	background-color: var(--wp--preset--color--timber) !important;
	color: var(--wp--preset--color--white) !important;
	font-family: var(--wp--preset--font-family--dm-sans);
	font-weight: 500;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	border-radius: var(--wp--custom--border-radius--small) !important;
	padding: 0.875rem 2rem;
	transition: background-color 0.3s ease, transform 0.2s ease;
}

.single_add_to_cart_button:hover,
.wc-block-components-product-button__button:hover {
	background-color: var(--wp--preset--color--walnut) !important;
	transform: translateY(-1px);
}

/* Product tabs */
.woocommerce-tabs .tabs li a {
	font-family: var(--wp--preset--font-family--dm-sans);
	font-size: var(--wp--preset--font-size--small);
	font-weight: 500;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: var(--wp--preset--color--steel);
}

.woocommerce-tabs .tabs li.active a {
	color: var(--wp--preset--color--timber);
	border-bottom-color: var(--wp--preset--color--timber);
}

/* WooCommerce notices */
.woocommerce-message,
.woocommerce-info {
	border-top-color: var(--wp--preset--color--forest);
	background-color: var(--wp--preset--color--linen);
}

.woocommerce-error {
	border-top-color: #C62828;
}

/* Star ratings */
.woocommerce .star-rating span::before {
	color: var(--wp--preset--color--driftwood);
}

/* ============================================
   Store Availability (ConnectPOS)
   ============================================ */

.basecamp-store-availability {
	margin-top: 1.5rem;
	padding: 1rem;
	background-color: var(--wp--preset--color--linen);
	border-radius: var(--wp--custom--border-radius--medium);
}

.basecamp-store-availability__title {
	font-family: var(--wp--preset--font-family--dm-sans);
	font-size: var(--wp--preset--font-size--small);
	font-weight: 600;
	margin-bottom: 0.75rem;
}

.basecamp-store-availability__store {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 0.5rem 0;
	border-bottom: 1px solid var(--wp--preset--color--sandstone);
}

.basecamp-store-availability__store:last-child {
	border-bottom: none;
}

.basecamp-store-availability__name {
	font-family: var(--wp--preset--font-family--dm-sans);
	font-size: var(--wp--preset--font-size--small);
	font-weight: 500;
}

.basecamp-store-availability__status {
	font-family: var(--wp--preset--font-family--dm-sans);
	font-size: var(--wp--preset--font-size--x-small);
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.06em;
}

.basecamp-store-availability--in-stock .basecamp-store-availability__status {
	color: var(--wp--preset--color--forest);
}

.basecamp-store-availability--out-of-stock .basecamp-store-availability__status {
	color: #C62828;
}

/* Product brand link */
.basecamp-product-brand {
	margin-bottom: 0.25rem;
}

.basecamp-brand-link {
	font-family: var(--wp--preset--font-family--dm-sans);
	font-size: var(--wp--preset--font-size--small);
	font-weight: 500;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	color: var(--wp--preset--color--driftwood);
	text-decoration: none;
}

.basecamp-brand-link:hover {
	color: var(--wp--preset--color--timber);
}

/* Size guide link */
.basecamp-size-guide-link {
	display: inline-block;
	margin-top: 0.75rem;
	font-family: var(--wp--preset--font-family--dm-sans);
	font-size: var(--wp--preset--font-size--small);
	color: var(--wp--preset--color--driftwood);
	text-decoration: underline;
	text-decoration-style: dashed;
	text-underline-offset: 3px;
}

.basecamp-size-guide-link:hover {
	color: var(--wp--preset--color--timber);
}

/* ============================================
   Express Checkout (Viva Payments)
   ============================================ */

.basecamp-express-checkout {
	margin-bottom: 2rem;
}

.basecamp-express-checkout__title {
	font-family: var(--wp--preset--font-family--dm-sans);
	font-size: var(--wp--preset--font-size--small);
	font-weight: 500;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	text-align: center;
	color: var(--wp--preset--color--steel);
	margin-bottom: 1rem;
}

.basecamp-express-checkout__buttons {
	display: flex;
	gap: 0.75rem;
	justify-content: center;
}

.basecamp-express-checkout__divider {
	text-align: center;
	margin-top: 1.5rem;
	position: relative;
}

.basecamp-express-checkout__divider::before {
	content: '';
	position: absolute;
	top: 50%;
	left: 0;
	right: 0;
	height: 1px;
	background-color: var(--wp--preset--color--sandstone);
}

.basecamp-express-checkout__divider span {
	background-color: var(--wp--preset--color--canvas);
	padding: 0 1rem;
	position: relative;
	z-index: 1;
	font-family: var(--wp--preset--font-family--dm-sans);
	font-size: var(--wp--preset--font-size--x-small);
	color: var(--wp--preset--color--fog);
	text-transform: uppercase;
	letter-spacing: 0.06em;
}

/* Payment icons */
.basecamp-payment-icon {
	height: 24px;
	width: auto;
}

/* ============================================
   Responsive Adjustments
   ============================================ */

@media (max-width: 781px) {
	.basecamp-product-card:hover {
		transform: none;
	}

	.basecamp-brand-card:hover {
		transform: none;
	}

	.basecamp-express-checkout__buttons {
		flex-direction: column;
	}
}

/* ============================================
   Animations (scroll-triggered via JS)
   ============================================ */

.basecamp-fade-in {
	opacity: 0;
	transform: translateY(20px);
	transition: opacity 0.6s ease, transform 0.6s ease;
}

.basecamp-fade-in.is-visible {
	opacity: 1;
	transform: translateY(0);
}

.basecamp-slide-up {
	opacity: 0;
	transform: translateY(40px);
	transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1),
	            transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.basecamp-slide-up.is-visible {
	opacity: 1;
	transform: translateY(0);
}

/* Staggered animation delays for grid items */
.basecamp-stagger > *:nth-child(1) { transition-delay: 0s; }
.basecamp-stagger > *:nth-child(2) { transition-delay: 0.1s; }
.basecamp-stagger > *:nth-child(3) { transition-delay: 0.2s; }
.basecamp-stagger > *:nth-child(4) { transition-delay: 0.3s; }
.basecamp-stagger > *:nth-child(5) { transition-delay: 0.4s; }
.basecamp-stagger > *:nth-child(6) { transition-delay: 0.5s; }

/* ============================================
   Print Styles
   ============================================ */

@media print {
	.wp-block-navigation,
	.wc-block-mini-cart,
	.basecamp-express-checkout,
	.basecamp-payment-trust,
	.wp-block-social-links {
		display: none !important;
	}
}
