/* Products Page Specific Styles */
.product-filters {
	display: flex;
	flex-wrap: wrap;
	gap: 1rem;
	margin-bottom: 2rem;
	justify-content: center;
}

.filter-btn {
	padding: 0.8rem 1.5rem;
	border: 2px solid var(--primary);
	background: transparent;
	color: var(--primary);
	border-radius: var(--button-radius);
	cursor: pointer;
	transition: var(--transition);
	font-weight: 600;
}

.filter-btn:hover,
.filter-btn.active {
	background: var(--primary);
	color: white;
}

.product-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
	gap: 2rem;
	margin-bottom: 100px;
}

.product-card {
	background: var(--website-bg);
	border-radius: var(--border-radius);
	box-shadow: var(--shadow);
	overflow: hidden;
	transition: var(--transition);
	position: relative;
	border: 2px solid transparent;
}

.product-card:hover {
	transform: translateY(-5px);
	box-shadow: var(--shadow-hover);
}

.product-card.selected {
	border-color: var(--accent);
}

.product-select-checkbox {
	position: absolute;
	top: 1rem;
	left: 1rem;
	width: 20px;
	height: 20px;
	z-index: 2;
	opacity: 0;
	cursor: pointer;
}

.selected-indicator {
	position: absolute;
	top: 1rem;
	left: 1rem;
	width: 20px;
	height: 20px;
	border: 2px solid var(--border);
	border-radius: 3px;
	background: var(--website-bg);
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 1;
	transition: var(--transition);
}

.product-select-checkbox:checked + .selected-indicator {
	background: var(--accent);
	border-color: var(--accent);
	color: white;
}

.product-select-checkbox:checked + .selected-indicator i {
	display: block;
}

.selected-indicator i {
	display: none;
	font-size: 0.8rem;
}

.product-image {
	height: 200px;
	overflow: hidden;
	cursor: pointer;
}

.product-image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: var(--transition);
}

.product-card:hover .product-image img {
	transform: scale(1.1);
}

.product-info {
	padding: 1.5rem;
}

.product-info h3 {
	color: var(--primary);
	margin-bottom: 0.5rem;
	font-size: 1.2rem;
}

.quantity-selector {
	margin: 1rem 0;
}

.quantity-selector label {
	display: block;
	margin-bottom: 0.5rem;
	font-weight: 600;
	color: var(--text-dark);
}

.quantity-input {
	width: 100%;
	padding: 0.5rem;
	border: 1px solid var(--border);
	border-radius: var(--border-radius);
	background: var(--website-bg);
	color: var(--font-color);
}

.view-details-btn {
	width: 100%;
	background: var(--primary);
	color: white;
	border: none;
	padding: 0.8rem;
	border-radius: var(--button-radius);
	cursor: pointer;
	transition: var(--transition);
	font-weight: 600;
}

.view-details-btn:hover {
	background: var(--primary-light);
}

/* Bulk Enquiry Bar */
.bulk-enquiry-bar {
	position: fixed;
	bottom: -100px;
	left: 0;
	right: 0;
	background: var(--primary);
	color: var(--header-font-color);
	padding: 1rem 0;
	transition: var(--transition);
	z-index: 1000;
	box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
}

.bulk-enquiry-bar.active {
	bottom: 0;
}

.bulk-enquiry-content {
	display: flex;
	justify-content: space-between;
	align-items: center;
	max-width: 1200px;
	margin: 0 auto;
	padding: 0 20px;
}

.selected-products-count {
	font-size: 1.1rem;
	font-weight: 600;
}

.bulk-enquiry-actions {
	display: flex;
	gap: 1rem;
}

.btn-clear-selection {
	background: transparent;
	border: 2px solid var(--header-font-color);
	color: var(--header-font-color);
	padding: 0.8rem 1.5rem;
	border-radius: var(--button-radius);
	cursor: pointer;
	transition: var(--transition);
	font-weight: 600;
}

.btn-clear-selection:hover {
	background: var(--header-font-color);
	color: var(--primary);
}

.btn-send-bulk-enquiry {
	background: var(--accent);
	color: white;
	border: none;
	padding: 0.8rem 1.5rem;
	border-radius: var(--button-radius);
	cursor: pointer;
	transition: var(--transition);
	font-weight: 600;
}

.btn-send-bulk-enquiry:hover {
	background: var(--secondary);
	transform: translateY(-2px);
}

/* Product Modal */
.product-modal {
	display: none;
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba(0, 0, 0, 0.8);
	z-index: 2000;
	overflow-y: auto;
}

.modal-content {
	background: var(--website-bg);
	margin: 2rem auto;
	max-width: 900px;
	border-radius: var(--border-radius);
	position: relative;
	animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
	from {
		opacity: 0;
		transform: translateY(-50px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

.close-modal {
	position: absolute;
	top: 1rem;
	right: 1rem;
	font-size: 2rem;
	color: var(--text-light);
	cursor: pointer;
	z-index: 3;
	width: 40px;
	height: 40px;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.9);
}

.close-modal:hover {
	color: var(--secondary);
	background: white;
}

.modal-body {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 2rem;
	padding: 2rem;
}

/* Simple Image Magnifier */
.image-magnifier-container {
	position: relative;
	width: 100%;
	height: 400px;
	overflow: hidden;
	cursor: zoom-in;
}

.magnifier-target {
	width: 100%;
	height: 100%;
	object-fit: contain;
	transition: transform 0.3s ease;
}

.magnifier-lens {
	position: absolute;
	width: 200px;
	height: 200px;
	border: 3px solid var(--accent);
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.3);
	pointer-events: none;
	opacity: 0;
	transition: opacity 0.3s ease;
	box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
	z-index: 10;
	display: none;
}

.image-magnifier-container:hover .magnifier-lens {
	opacity: 1;
}

.image-magnifier-container.active .magnifier-lens {
	display: block;
}

.zoom-indicator {
	position: absolute;
	bottom: 10px;
	left: 10px;
	background: rgba(0, 0, 0, 0.7);
	color: white;
	padding: 8px 12px;
	border-radius: var(--border-radius);
	font-size: 0.8rem;
	z-index: 5;
	opacity: 0;
	transition: opacity 0.3s ease;
}

.image-magnifier-container:hover .zoom-indicator {
	opacity: 1;
}

.zoom-indicator i {
	margin-right: 5px;
}

/* Enhanced modal image styles */
.modal-main-image {
	position: relative;
	margin-bottom: 1rem;
}

.modal-thumbnails {
	display: flex;
	gap: 0.5rem;
	justify-content: center;
	flex-wrap: wrap;
	margin-top: 1rem;
}

.modal-thumbnail {
	width: 60px;
	height: 60px;
	border-radius: var(--border-radius);
	overflow: hidden;
	cursor: pointer;
	opacity: 0.7;
	transition: var(--transition);
	border: 2px solid transparent;
}

.modal-thumbnail:hover,
.modal-thumbnail.active {
	opacity: 1;
	border-color: var(--accent);
	transform: scale(1.05);
}

.modal-thumbnail img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.modal-details h2 {
	color: var(--primary);
	margin-bottom: 1rem;
}

.modal-description {
	margin-bottom: 1.5rem;
	line-height: 1.6;
	color: var(--text-light);
}

.modal-specs {
	margin-bottom: 1.5rem;
}

.modal-specs h3 {
	color: var(--primary-light);
	margin-bottom: 1rem;
}

.spec-item {
	display: flex;
	justify-content: space-between;
	padding: 0.5rem 0;
	border-bottom: 1px solid var(--border);
}

.spec-item:last-child {
	border-bottom: none;
}

.spec-item span:first-child {
	font-weight: 600;
	color: var(--text-dark);
}

.spec-item span:last-child {
	color: var(--text-light);
}

.modal-quantity {
	margin: 1.5rem 0;
}

.modal-quantity label {
	display: block;
	margin-bottom: 0.5rem;
	font-weight: 600;
	color: var(--text-dark);
}

.modal-quantity input {
	width: 100px;
	padding: 0.5rem;
	border: 1px solid var(--border);
	border-radius: var(--border-radius);
	background: var(--website-bg);
	color: var(--font-color);
}

.modal-actions {
	display: flex;
	gap: 1rem;
	flex-wrap: wrap;
}

.btn-enquiry {
	background: var(--accent);
	color: white;
	border: none;
	padding: 1rem 1.5rem;
	border-radius: var(--button-radius);
	cursor: pointer;
	transition: var(--transition);
	font-weight: 600;
	flex: 1;
	min-width: 200px;
}

.btn-enquiry:hover {
	background: var(--secondary);
}

.btn-contact {
	background: var(--primary);
	color: white;
	text-decoration: none;
	padding: 1rem 1.5rem;
	border-radius: var(--button-radius);
	transition: var(--transition);
	font-weight: 600;
	text-align: center;
	flex: 1;
	min-width: 200px;
}

.btn-contact:hover {
	background: var(--primary-light);
	color: white;
}

/* Product Card Styles - Overlay Version */
.product-card {
	position: relative;
	background: var(--website-bg);
	border-radius: 12px;
	box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
	overflow: hidden;
	transition: all 0.3s ease;
	border: 1px solid var(--border);
	height: 300px;
}

.product-card:hover {
	transform: translateY(-5px);
	box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.product-image {
	position: relative;
	width: 100%;
	height: 100%;
	overflow: hidden;
}

.product-image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.3s ease;
}

.product-card:hover .product-image img {
	transform: scale(1.05);
}

/* Overlay that appears on hover */
.product-overlay {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: linear-gradient(to bottom,
	rgba(0,0,0,0.7) 0%,
	rgba(0,0,0,0.8) 100%);
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: center;
	opacity: 0;
	visibility: hidden;
	transition: all 0.3s ease;
	padding: 20px;
	text-align: center;
	color: white;
}

.product-card:hover .product-overlay {
	opacity: 1;
	visibility: visible;
}

/* Overlay Content */
.overlay-content {
	transform: translateY(20px);
	transition: transform 0.3s ease 0.1s;
	width: 100%;
}

.product-card:hover .overlay-content {
	transform: translateY(0);
}

.overlay-content h3 {
	font-size: 1.3rem;
	font-weight: 600;
	margin-bottom: 10px;
	color: white;
}

.overlay-content p {
	color: rgba(255,255,255,0.9);
	font-size: 0.9rem;
	line-height: 1.5;
	margin-bottom: 20px;
	max-height: 60px;
	overflow: hidden;
}

/* Overlay Buttons */
.overlay-buttons {
	display: flex;
	flex-direction: column;
	gap: 10px;
	width: 100%;
}

.view-details-btn {
	background: var(--primary);
	color: white;
	border: none;
	padding: 12px 20px;
	border-radius: var(--button-radius);
	font-weight: 500;
	cursor: pointer;
	transition: all 0.3s ease;
	font-size: 0.9rem;
	width: 100%;
}

.view-details-btn:hover {
	background: var(--primary-light);
	transform: translateY(-2px);
}

/* Quantity Selector in Overlay */
.quantity-selector {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	margin: 15px 0;
	opacity: 0;
	transform: translateY(10px);
	transition: all 0.3s ease 0.2s;
}

.product-card:hover .quantity-selector {
	opacity: 1;
	transform: translateY(0);
}

.quantity-selector label {
	font-size: 0.9rem;
	color: rgba(255,255,255,0.9);
	font-weight: 500;
}

.quantity-input {
	width: 80px;
	padding: 5px 10px;
	border: 1px solid rgba(255,255,255,0.3);
	border-radius: 4px;
	font-size: 0.9rem;
	background: rgba(255,255,255,0.1);
	color: white;
}

.quantity-input::placeholder {
	color: rgba(255,255,255,0.7);
}

/* Product Selection */
.product-select-checkbox {
	position: absolute;
	top: 15px;
	left: 15px;
	z-index: 20;
	width: 20px;
	height: 20px;
	cursor: pointer;
	opacity: 0;
	transition: opacity 0.3s ease;
}

.product-card:hover .product-select-checkbox {
	opacity: 1;
}

.selected-indicator {
	position: absolute;
	top: 15px;
	right: 15px;
	background: var(--primary);
	color: white;
	width: 24px;
	height: 24px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 12px;
	opacity: 0;
	transition: all 0.3s ease;
	z-index: 20;
}

.product-select-checkbox:checked + .selected-indicator {
	opacity: 1;
}

/* INDEX.PHP SPECIFIC STYLES - Different overlay style */
.index-page .product-card {
	height: 280px;
	background: linear-gradient(135deg, var(--background-light) 0%, var(--website-bg) 100%);
}

.index-page .product-overlay {
	background: linear-gradient(135deg,
	rgba(var(--primary-rgb), 0.85) 0%,
	rgba(var(--secondary-rgb), 0.85) 100%);
}

.index-page .view-details-btn {
	background: rgba(255,255,255,0.2);
	border: 2px solid white;
	backdrop-filter: blur(10px);
}

.index-page .view-details-btn:hover {
	background: white;
	color: var(--primary);
}

/* Quick Enquiry Button for Index Overlay */
.quick-enquiry-btn {
	background: transparent;
	color: white;
	border: 2px solid white;
	padding: 10px 20px;
	border-radius: var(--button-radius);
	font-weight: 500;
	cursor: pointer;
	transition: all 0.3s ease;
	text-decoration: none;
	display: inline-block;
	font-size: 0.9rem;
	width: 100%;
	text-align: center;
	backdrop-filter: blur(10px);
}

.quick-enquiry-btn:hover {
	background: white;
	color: var(--primary);
}

/* Mobile Responsive */
@media (max-width: 768px) {
	.product-grid {
		grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
		gap: 1rem;
	}

	.modal-body {
		grid-template-columns: 1fr;
		gap: 1rem;
		padding: 1rem;
	}

	.modal-main-image {
		height: 300px;
	}

	.image-magnifier-container {
		height: 300px;
		cursor: default;
	}

	.magnifier-lens {
		display: none !important;
	}

	.zoom-indicator {
		display: none;
	}

	.bulk-enquiry-content {
		flex-direction: column;
		gap: 1rem;
		text-align: center;
	}

	.modal-actions {
		flex-direction: column;
	}

	.btn-enquiry,
	.btn-contact {
		min-width: auto;
	}

	.product-grid {
		grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
		gap: 20px;
	}

	.product-card {
		height: 250px;
	}

	.index-page .product-card {
		height: 230px;
	}
}

@media (max-width: 480px) {
	.product-filters {
		flex-direction: column;
		align-items: center;
	}

	.filter-btn {
		width: 200px;
		text-align: center;
	}

	.product-grid {
		grid-template-columns: 1fr;
	}

	.overlay-content {
		padding: 15px;
	}

	.overlay-content h3 {
		font-size: 1.1rem;
	}

	.overlay-content p {
		font-size: 0.8rem;
		margin-bottom: 15px;
	}
}

/* Touch device detection */
.touch-device .magnifier-lens {
	display: none !important;
}

.touch-device .zoom-indicator {
	display: none;
}
/* Force dynamic colors for filter buttons */
.filter-btn {
	border: 2px solid var(--primary) !important;
	background: transparent !important;
	color: var(--primary) !important;
}

.filter-btn.active {
	background: var(--primary) !important;
	color: var(--header-font-color) !important;
}

.filter-btn:hover {
	background: var(--primary-light) !important;
	border-color: var(--primary-light) !important;
	color: var(--header-font-color) !important;
}
/* Products Page Mobile Styles */
@media (max-width: 768px) {
	.product-filters {
		flex-direction: row;
		overflow-x: auto;
		padding-bottom: 10px;
		justify-content: flex-start;
		-webkit-overflow-scrolling: touch;
	}

	.filter-btn {
		flex-shrink: 0;
		white-space: nowrap;
		padding: 0.6rem 1.2rem;
		font-size: 0.9rem;
	}

	.product-grid {
		grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
		gap: 1rem;
		margin-bottom: 80px;
	}

	.product-card {
		height: 280px;
	}

	/* Bulk enquiry bar mobile */
	.bulk-enquiry-bar {
		padding: 0.8rem 0;
	}

	.bulk-enquiry-content {
		flex-direction: column;
		gap: 0.8rem;
		text-align: center;
	}

	.bulk-enquiry-actions {
		width: 100%;
		justify-content: center;
	}

	/* Product modal mobile */
	.modal-content {
		margin: 1rem;
		width: calc(100% - 2rem);
	}

	.modal-body {
		grid-template-columns: 1fr;
		gap: 1rem;
		padding: 1rem;
	}

	.image-magnifier-container {
		height: 250px;
	}

	.modal-actions {
		flex-direction: column;
	}

	.btn-enquiry,
	.btn-contact {
		min-width: auto;
		width: 100%;
	}
}

@media (max-width: 480px) {
	.product-grid {
		grid-template-columns: 1fr;
	}

	.product-card {
		height: 250px;
	}

	.overlay-content h3 {
		font-size: 1.1rem;
	}

	.overlay-content p {
		font-size: 0.8rem;
	}

	.quantity-selector {
		flex-direction: column;
		gap: 5px;
	}

	.quantity-input {
		width: 100%;
	}
}
/* Products Page Touch Support */
@media (max-width: 768px) {
	/* Make product cards more interactive on touch */
	.product-card {
		cursor: pointer;
	}

	/* Ensure overlay is always functional */
	.product-overlay {
		pointer-events: none; /* Allow clicks to pass through to buttons */
	}

	.overlay-buttons,
	.quantity-selector {
		pointer-events: auto; /* Make interactive elements clickable */
	}

	/* Improve button visibility */
	.view-details-btn {
		background: var(--primary) !important;
		border: 2px solid var(--primary) !important;
		color: white !important;
	}

	.quick-enquiry-btn {
		background: transparent !important;
		border: 2px solid white !important;
		color: white !important;
		margin-top: 8px;
	}

	/* Make quantity input more touch-friendly */
	.quantity-input {
		height: 40px;
		font-size: 16px; /* Prevents zoom on iOS */
		min-width: 80px;
	}
}

/* Touch-specific styles */
@media (hover: none) {
	.product-card {
		transition: transform 0.2s ease;
	}

	.product-card:active {
		transform: scale(0.98);
	}

	/* Disable hover transforms */
	.product-card:hover .product-image img {
		transform: none;
	}
}