:root {
	--footer-bg: #ffffff;
	--footer-text: #6b7280;
	--footer-heading: #1f2937;
	--footer-border: #e5e7eb;
	--footer-top-border: rgba(0, 0, 0, 0.15);
	--footer-bg-bottom: #f9fafb;
	--primary-color: #4338ca; /* Fallback if not defined elsewhere */
}

/* Base Footer Styles */
.webcommerce-footer {
	background-color: var(--footer-bg);
	border-top: 3px solid var(--footer-top-border);
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	margin-top: 60px;
	width: 100%;
}

.footer-main {
	padding: 60px 0 40px;
}

.footer-container {
	max-width: 1280px;
	margin: 0 auto;
	padding: 0 24px;
	width: 100%;
	box-sizing: border-box;
}

/* Grid Layout */
.footer-grid {
	display: grid;
	grid-template-columns: 2fr 1fr 1fr 1fr 1.5fr 1.5fr;
	gap: 32px;
	align-items: start;
}

/* Typography & General Elements */
.footer-heading {
	color: var(--footer-heading);
	font-size: 0.875rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	margin: 0 0 20px 0;
}

.footer-description {
	color: var(--footer-text);
	font-size: 0.9375rem;
	line-height: 1.6;
	margin: 12px 0 24px;
	max-width: 300px;
}

.footer-links {
	list-style: none;
	padding: 0;
	margin: 0;
}

.footer-links li {
	margin-bottom: 12px;
}

.footer-link {
	color: var(--footer-text);
	text-decoration: none;
	font-size: 0.9375rem;
	transition: color 0.2s ease;
	display: inline-block;
}

.footer-link:hover {
	color: var(--primary-color);
}

/* Company Column Specifics */
.company-column {
	padding-right: 20px;
}

.footer-logo {
	height: 40px;
	width: auto;
	object-fit: contain;
	display: block;
}

.footer-brand {
	font-size: 1.5rem;
	font-weight: 800;
	color: var(--footer-heading);
	margin: 0;
}

/* Social Icons */
.footer-social {
	display: flex;
	gap: 12px;
	flex-wrap: wrap;
}

.social-link {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	background-color: #f3f4f6;
	color: #4b5563;
	border-radius: 50%;
	text-decoration: none;
	transition: all 0.2s ease;
	font-size: 16px;
}

.social-link:hover {
	background-color: var(--primary-color);
	color: white;
	transform: translateY(-2px);
}

/* Payment & Shipping Logos */
.logo-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 8px;
}

.logo-item {
	background-color: #ffffff;
	border: 1px solid #e5e7eb;
	border-radius: 6px;
	padding: 4px;
	display: flex;
	align-items: center;
	justify-content: center;
	height: 36px;
	width: 100%;
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.logo-item:hover {
	border-color: #d1d5db;
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.logo-img {
	max-width: 100%;
	max-height: 24px;
	object-fit: contain;
}

.logo-text {
	font-size: 10px;
	color: var(--footer-text);
	text-align: center;
	line-height: 1.1;
	overflow: hidden;
	white-space: nowrap;
	text-overflow: ellipsis;
	padding: 0 2px;
}

/* Footer Bottom */
.footer-bottom {
	background-color: var(--footer-bg-bottom);
	border-top: 1px solid var(--footer-border);
	padding: 24px 0;
}

.footer-bottom-content {
	display: flex;
	justify-content: space-between;
	align-items: center;
	flex-wrap: wrap;
	gap: 16px;
}

.copyright-text {
	color: var(--footer-text);
	font-size: 0.875rem;
	margin: 0;
}

.powered-by {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 0.875rem;
	color: #9ca3af;
}

.powered-by img {
	height: 20px;
	width: auto;
}

.powered-text {
	color: var(--footer-text);
	font-weight: 500;
}

/* Responsive - Tablet (768px - 1199px) */
@media (max-width: 1199px) {
	.footer-grid {
		grid-template-columns: repeat(3, 1fr);
		gap: 40px 24px; /* Larger row gap */
	}

	.company-column {
		grid-column: 1 / -1; /* Spans full width */
		padding-right: 0;
		border-bottom: 1px solid var(--footer-border);
		padding-bottom: 32px;
		margin-bottom: 8px;
		max-width: 600px; /* Prevent text line from getting too long */
	}
	
	.footer-description {
		max-width: 100%;
	}

	.logo-grid {
		grid-template-columns: repeat(3, 1fr);
	}
}

/* Responsive - Mobile (<768px) */
@media (max-width: 767px) {
	.webcommerce-footer {
		margin-top: 40px;
	}

	.footer-main {
		padding: 40px 0 24px;
	}

	.footer-grid {
		grid-template-columns: 1fr;
		gap: 32px;
	}

	.company-column {
		grid-column: span 1;
		border-bottom: none;
		padding-bottom: 0;
		margin-bottom: 0;
		text-align: center;
		display: flex;
		flex-direction: column;
		align-items: center;
	}

	.footer-description {
		text-align: center;
		margin: 16px 0 20px;
	}

	.footer-heading {
		margin-bottom: 16px;
		font-size: 0.9375rem; /* Slightly larger for headings on mobile */
	}

	.footer-link {
		padding: 4px 0; /* Easier to tap */
		display: block;
	}

	.logo-grid {
		grid-template-columns: repeat(4, 1fr); /* 4 logos per row on mobile */
	}

	.footer-bottom-content {
		flex-direction: column;
		text-align: center;
		gap: 12px;
	}
}

@media (max-width: 480px) {
	.logo-grid {
		grid-template-columns: repeat(3, 1fr);
	}
}

/* Dark Mode Support */
.dark-mode .webcommerce-footer {
	--footer-bg: #1f2937;
	--footer-text: #9ca3af;
	--footer-heading: #f3f4f6;
	--footer-border: #374151;
	--footer-top-border: rgba(255, 255, 255, 0.1);
	--footer-bg-bottom: #111827;
}

.dark-mode .social-link {
	background-color: #374151;
	color: #d1d5db;
}

.dark-mode .social-link:hover {
	background-color: var(--primary-color);
	color: #ffffff;
}

.dark-mode .logo-item {
	background-color: #374151;
	border-color: #4b5563;
}

.dark-mode .logo-item:hover {
	border-color: #6b7280;
}

/* Helper to ensure icons work if FontAwesome is loaded */
.social-link i {
	font-family: "FontAwesome", sans-serif;
}
