/**
 * Ruixinte Flange International - Custom Styles
 * Additional styles for enhanced user experience
 */

/* ==========================================================================
   Base Styles
   ========================================================================== */

:root {
	--transition-speed: 0.3s;
	--shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
	--shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
	--shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
	--shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* Smooth scrolling */
html {
	scroll-behavior: smooth;
}

/* Box model reset */
*,
*::before,
*::after {
	box-sizing: border-box;
}

/* Image optimization */
img {
	max-width: 100%;
	height: auto;
	display: block;
}

/* ==========================================================================
   Shadow Utilities
   ========================================================================== */

.has-shadow-sm {
	box-shadow: var(--shadow-sm);
}

.has-shadow-md {
	box-shadow: var(--shadow-md);
}

.has-shadow-lg {
	box-shadow: var(--shadow-lg);
}

.has-shadow-xl {
	box-shadow: var(--shadow-xl);
}

/* ==========================================================================
   Button Enhancements
   ========================================================================== */

.wp-block-button__link {
	transition: all var(--transition-speed) ease;
	text-decoration: none !important;
}

.wp-block-button__link:hover {
	transform: translateY(-2px);
	box-shadow: var(--shadow-lg);
}

.wp-block-button__link:active {
	transform: translateY(0);
}

/* Button outline variant */
.is-style-outline .wp-block-button__link {
	background: transparent !important;
	border: 2px solid currentColor;
}

.is-style-outline .wp-block-button__link:hover {
	background: currentColor !important;
}

/* ==========================================================================
   Navigation Enhancements
   ========================================================================== */

.wp-block-navigation__responsive-container-open {
	background-color: var(--wp--preset--color--primary);
	color: var(--wp--preset--color--base);
	padding: 0.5rem 1rem;
	border-radius: 4px;
	border: none;
	cursor: pointer;
	transition: all var(--transition-speed) ease;
}

.wp-block-navigation__responsive-container-open:hover {
	background-color: var(--wp--preset--color--secondary);
}

/* Navigation links */
.wp-block-navigation-item a {
	transition: color var(--transition-speed) ease;
}

.wp-block-navigation-item a:hover {
	color: var(--wp--preset--color--secondary) !important;
}

/* ==========================================================================
   Cover Block Enhancements
   ========================================================================== */

.wp-block-cover {
	position: relative;
	overflow: hidden;
}

.wp-block-cover::before {
	content: '';
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: linear-gradient(to bottom, rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.3));
	pointer-events: none;
}

/* ==========================================================================
   Card & Group Enhancements
   ========================================================================== */

.wp-block-group {
	transition: all var(--transition-speed) ease;
}

/* Hover effects for card-like groups */
.wp-block-column .wp-block-group:hover {
	transform: translateY(-5px);
	box-shadow: var(--shadow-xl);
}

/* ==========================================================================
   Typography Enhancements
   ========================================================================== */

/* Improved heading spacing */
.wp-block-heading {
	word-wrap: break-word;
	overflow-wrap: break-word;
}

/* Links in content */
.wp-block-post-content a {
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: 2px;
	transition: all var(--transition-speed) ease;
}

.wp-block-post-content a:hover {
	text-decoration-thickness: 2px;
}

/* ==========================================================================
   Image & Media Enhancements
   ========================================================================== */

.wp-block-image {
	margin-bottom: var(--wp--preset--spacing--50);
}

.wp-block-image img {
	transition: transform var(--transition-speed) ease;
}

.wp-block-image:hover img {
	transform: scale(1.02);
}

.wp-block-post-featured-image img {
	transition: transform var(--transition-speed) ease;
	object-fit: cover;
}

.wp-block-post-featured-image:hover img {
	transform: scale(1.05);
}

/* ==========================================================================
   Form Enhancements
   ========================================================================== */

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="url"],
textarea,
select {
	width: 100%;
	padding: 0.75rem 1rem;
	border: 1px solid var(--wp--preset--color--light-gray);
	border-radius: 4px;
	font-family: inherit;
	font-size: 1rem;
	transition: all var(--transition-speed) ease;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="tel"]:focus,
input[type="url"]:focus,
textarea:focus,
select:focus {
	outline: none;
	border-color: var(--wp--preset--color--primary);
	box-shadow: 0 0 0 3px rgba(0, 61, 122, 0.1);
}

/* ==========================================================================
   Loading & Animation
   ========================================================================== */

@keyframes fadeIn {
	from {
		opacity: 0;
		transform: translateY(20px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

.fade-in {
	animation: fadeIn 0.6s ease-out;
}

/* ==========================================================================
   Responsive Utilities
   ========================================================================== */

@media (max-width: 781px) {
	/* Mobile navigation */
	.wp-block-navigation__responsive-container.is-menu-open {
		padding: 1.5rem;
	}
	
	/* Reduce spacing on mobile */
	.wp-block-cover {
		min-height: 400px !important;
	}
	
	/* Stack columns on mobile */
	.wp-block-columns {
		flex-wrap: wrap;
	}
	
	.wp-block-column {
		flex-basis: 100% !important;
		margin-bottom: var(--wp--preset--spacing--50);
	}
}

@media (min-width: 782px) and (max-width: 1024px) {
	/* Tablet adjustments */
	.wp-block-columns {
		gap: var(--wp--preset--spacing--50) !important;
	}
}

/* ==========================================================================
   Accessibility Enhancements
   ========================================================================== */

/* Skip to content link */
.skip-link {
	position: absolute;
	top: -40px;
	left: 0;
	background: var(--wp--preset--color--primary);
	color: var(--wp--preset--color--base);
	padding: 0.5rem 1rem;
	text-decoration: none;
	z-index: 100;
}

.skip-link:focus {
	top: 0;
}

/* Focus styles */
a:focus,
button:focus,
input:focus,
textarea:focus,
select:focus {
	outline: 2px solid var(--wp--preset--color--primary);
	outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
	.wp-block-button__link {
		border: 2px solid currentColor;
	}
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.01ms !important;
		scroll-behavior: auto !important;
	}
}

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

@media print {
	/* Hide non-content elements */
	.wp-block-navigation,
	.wp-block-button,
	.wp-block-search {
		display: none;
	}
	
	/* Optimize colors for print */
	* {
		background: transparent !important;
		color: black !important;
		box-shadow: none !important;
	}
	
	a {
		text-decoration: underline;
	}
	
	/* Show URLs after links */
	a[href]::after {
		content: " (" attr(href) ")";
	}
}

/* ==========================================================================
   Custom Product Styles
   ========================================================================== */

.product-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
	gap: var(--wp--preset--spacing--60);
	margin: var(--wp--preset--spacing--70) 0;
}

.product-card {
	border: 1px solid var(--wp--preset--color--light-gray);
	border-radius: 8px;
	overflow: hidden;
	transition: all var(--transition-speed) ease;
}

.product-card:hover {
	transform: translateY(-5px);
	box-shadow: var(--shadow-lg);
}

.product-card img {
	width: 100%;
	height: 250px;
	object-fit: cover;
}

.product-card-content {
	padding: var(--wp--preset--spacing--50);
}

.product-card-title {
	font-size: var(--wp--preset--font-size--large);
	font-weight: 600;
	margin-bottom: var(--wp--preset--spacing--30);
	color: var(--wp--preset--color--primary);
}

.product-card-description {
	font-size: var(--wp--preset--font-size--medium);
	color: var(--wp--preset--color--medium-gray);
	line-height: 1.6;
}

/* ==========================================================================
   Utility Classes
   ========================================================================== */

.text-center {
	text-align: center;
}

.text-left {
	text-align: left;
}

.text-right {
	text-align: right;
}

.mt-0 { margin-top: 0 !important; }
.mb-0 { margin-bottom: 0 !important; }
.pt-0 { padding-top: 0 !important; }
.pb-0 { padding-bottom: 0 !important; }

.d-none {
	display: none;
}

.d-block {
	display: block;
}

.d-flex {
	display: flex;
}
