/*
Theme Name: DigiCart Theme
Author: DigiCart
Description: A premium, high-performance WordPress theme for digital products.
Version: 1.1.0
Text Domain: digicart-theme
*/

:root {
	/* Colors */
	--color-primary: #4F46E5;
	--color-primary-dark: #4338ca;
	--color-secondary: #06b6d4;
	--color-background: #F9FAFB;
	--color-surface: #FFFFFF;
	--color-text-main: #1E293B;
	--color-text-muted: #64748B;
	--color-border: #E2E8F0;
	--color-accent: #F59E0B;

	/* Typography */
	--font-family-base: 'Inter', system-ui, -apple-system, sans-serif;
	--font-family-heading: 'Outfit', sans-serif;

	/* Spacing */
	--spacing-sm: 1rem;
	--spacing-md: 1.5rem;
	--spacing-lg: 2rem;
	--radius-md: 0.75rem;
	--radius-lg: 1rem;
	--shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1);
}

/* Animation Keyframes */
@keyframes gradient-text {
	0% {
		background-position: 0% 50%;
	}

	50% {
		background-position: 100% 50%;
	}

	100% {
		background-position: 0% 50%;
	}
}

.animate-text {
	background: linear-gradient(to right, var(--color-primary), var(--color-secondary), var(--color-accent), var(--color-primary));
	background-size: 300% auto;
	color: transparent;
	-webkit-background-clip: text;
	background-clip: text;
	animation: gradient-text 3s linear infinite;
}

/* =========================================
   1. STRUCTURAL RESETS (FULL WIDTH FIX)
   ========================================= */
html {
	margin: 0;
	padding: 0;
	/* overflow-x: hidden; - Removed to prevent sticky conflict */
}

body {
	margin: 0;
	padding: 0;
	width: 100%;
	min-height: 100vh;
	font-family: var(--font-family-base);
	color: var(--color-text-main);
	background-color: var(--color-background);
	line-height: 1.6;
	/* overflow-x: hidden; - Removed to prevent scroll issues */
	padding-top: 80px;
	/* Space for Fixed Header (Main Only) */
}

/* The Main Wrapper */
.site {
	width: 100%;
	max-width: 100%;
	overflow: visible;
}

/* Ensure sections stretch */
.site-header,
.site-main,
.site-footer {
	width: 100%;
	max-width: 100%;
	float: none;
	clear: both;
}

/* =========================================
   2. HEADER & NAVIGATION
   ========================================= */
.sticky-header-wrapper {
	position: fixed;
	/* Nuclear Option: Guarantees stickiness */
	top: 0;
	left: 0;
	width: 100%;
	z-index: 99999;
	box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
	/* Shadow for depth */
}

.site-header {
	background: rgba(255, 255, 255, 0.98);
	/* Less transparent for fixed */
	backdrop-filter: blur(10px);
	border-bottom: 1px solid var(--color-border);
	padding: 1rem 0;
}

/* Admin Bar Fix: Push FLUSH to top */
body.admin-bar .sticky-header-wrapper {
	top: 32px;
}

@media screen and (max-width: 782px) {
	body {
		padding-top: 70px;
		/* Slightly less padding on mobile */
	}

	body.admin-bar .sticky-header-wrapper {
		top: 46px;
	}
}

/* Inner Container */
.container {
	max-width: 1200px;
	margin: 0 auto;
	padding: 0 var(--spacing-sm);
	padding: 0 var(--spacing-sm);
	box-sizing: border-box;
}

/* Navigation Styles */
.main-navigation {
	margin-left: auto;
	display: block;
}

.main-navigation ul {
	display: flex;
	list-style: none;
	margin: 0;
	padding: 0;
	gap: 2rem;
}

.main-navigation ul li a {
	font-weight: 500;
	color: var(--color-text-main);
	font-size: 1rem;
}

.main-navigation ul li a:hover,
.main-navigation ul li.current-menu-item a,
.main-navigation ul li.current_page_item a {
	color: var(--color-primary);
	font-weight: 700;
}

/* =========================================
   3. COMPONENTS
   ========================================= */
a {
	color: var(--color-primary);
	text-decoration: none;
	transition: color 0.2s;
}

a:hover {
	color: var(--color-primary-dark);
}

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

.btn {
	display: inline-flex;
	align-items: center;
	padding: 0.75rem 1.5rem;
	font-weight: 600;
	border-radius: var(--radius-md);
	cursor: pointer;
	border: none;
}

.btn-primary {
	background-color: var(--color-primary);
	color: white;
}

.btn-primary:hover {
	background-color: var(--color-primary-dark);
	box-shadow: var(--shadow-md);
}

/* =========================================
   4. WORDPRESS ALIGNMENTS
   ========================================= */
.alignwide {
	max-width: 1200px;
	margin-left: auto;
	margin-right: auto;
}

.alignfull {
	width: 100vw;
	max-width: 100vw;
	margin-left: calc(50% - 50vw);
	margin-right: calc(50% - 50vw);
}

/* =========================================
   5. FONT AWESOME FIXES
   ========================================= */
/* Force font-weight for solid icons to ensure they render */
.fas,
.fa-solid {
	font-weight: 900 !important;
	font-family: "Font Awesome 6 Free" !important;
	-moz-osx-font-smoothing: grayscale;
	-webkit-font-smoothing: antialiased;
	display: inline-block;
	font-style: normal;
	font-variant: normal;
	text-rendering: auto;
	line-height: 1;
}

.fab,
.fa-brands {
	font-weight: 400 !important;
	font-family: "Font Awesome 6 Brands" !important;
}

/* =========================================
   6. PRODUCT LOOP DIALOG (Theme Style)
   ========================================= */
.products .product {
	display: flex;
	flex-direction: column;
	height: 100%;
	background: #fff;
	border: 1px solid #E5E7EB;
	border-radius: 12px;
	padding: 1.5rem;
	transition: all 0.3s ease;
	text-align: center;
}

.products .product:hover {
	transform: translateY(-5px);
	box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
	border-color: var(--color-primary);
}

.products .product a img {
	margin-bottom: 1rem;
	border-radius: 8px;
	align-self: center;
}

.products .product h2 {
	font-size: 1.1rem;
	font-weight: 700;
	margin-bottom: 0.5rem;
	line-height: 1.4;
	color: var(--color-text-main);
}

.products .product .price {
	font-size: 1.25rem;
	color: var(--color-primary);
	font-weight: 800;
	margin-bottom: 1rem;
}

/* Button Wrapper to push to bottom */
.products .product .button-group {
	margin-top: auto;
}

.woocommerce a.button.add_to_cart_button,
.product_type_simple {
	display: block !important;
	width: 100% !important;
	box-sizing: border-box;
	/* Ensure padding doesn't overflow */
	text-align: center;
	border-radius: 50px !important;
	padding: 12px 20px !important;
	font-size: 14px !important;
	font-weight: 600 !important;
	cursor: pointer;
	text-decoration: none;
	transition: all 0.2s;
	margin-left: auto;
	margin-right: auto;
}

/* Add to Cart (Secondary - Style: Outline) */
.woocommerce a.button.add_to_cart_button {
	background-color: transparent !important;
	border: 2px solid var(--color-primary) !important;
	color: var(--color-primary) !important;
	margin-bottom: 8px;
	/* Gap between buttons */
}

.woocommerce a.button.add_to_cart_button:hover {
	background-color: var(--color-background) !important;
}

/* Buy Now (Primary - Style: Solid Theme Color) */
.button.product_type_simple:not(.add_to_cart_button) {
	background-color: var(--color-primary) !important;
	border: 2px solid var(--color-primary) !important;
	color: #ffffff !important;
	margin-bottom: 0 !important;
	/* No space below */
}

.button.product_type_simple:not(.add_to_cart_button):hover {
	background-color: var(--color-primary-dark) !important;
	border-color: var(--color-primary-dark) !important;
}

/* Feature Cards */
.feature-box {
	background: #ffffff;
	padding: 2rem;
	border-radius: var(--radius-lg);
	box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
	border: 1px solid var(--color-border);
	transition: transform 0.2s ease;
}

.feature-box:hover {
	transform: translateY(-5px);
	box-shadow: var(--shadow-md);
	border-color: var(--color-primary);
}