/*
Theme Name: Eleone
Theme URI: https://eleone.co
Author: Hunain Zaheer
Author URI: https://hunainzaheer.online
Description: Custom B2B catalogue theme for Eleone Sewing Corporation & Boots Co. Motorcycle footwear, gloves, apparel and accessories. Includes a product catalogue with filters, editable homepage sections, and a wholesale enquiry (RFQ) form. No checkout, cart or pricing.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 7.1
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: eleone
Tags: custom-menu, featured-images, translation-ready
*/

/*
Design CSS (compiled Tailwind + custom styles) is enqueued from assets/css/app.css.
Small theme-level helpers below.
*/
.eleone-container { max-width: 1600px; margin-left: auto; margin-right: auto; padding-left: 1.5rem; padding-right: 1.5rem; }
.eleone-screen-reader-text { border: 0; clip: rect(1px,1px,1px,1px); clip-path: inset(50%); height: 1px; width: 1px; margin: -1px; overflow: hidden; padding: 0; position: absolute !important; }
.eleone-form-notice { padding: 1rem; margin: 1rem 0; font-weight: 700; border: 1px solid; }
.eleone-form-notice.is-success { background: #f0fdf4; border-color: #16a34a; color: #166534; }
.eleone-form-notice.is-error { background: #fef2f2; border-color: #dc2626; color: #991b1b; }

/* Catalogue facet checkbox (visual, server-rendered links) */
.eleone-facet-check {
	width: 1rem;
	height: 1rem;
	flex: 0 0 1rem;
	border: 1px solid #d1d5db;
	border-radius: 0.25rem;
	background: #fff;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	position: relative;
}
.eleone-facet-option.is-active .eleone-facet-check {
	background: #000;
	border-color: #000;
}
.eleone-facet-option.is-active .eleone-facet-check::after {
	content: "";
	width: 8px;
	height: 4px;
	border-left: 2px solid #fff;
	border-bottom: 2px solid #fff;
	transform: rotate(-45deg) translate(0, -1px);
}

/* Primary nav when a custom menu is assigned (design-preserving top-level styling) */
.eleone-primary-menu {
	display: flex;
	align-items: center;
	gap: 2rem;
	list-style: none;
	margin: 0;
	padding: 0;
}
.eleone-primary-menu > li {
	list-style: none;
	margin: 0;
}
.eleone-primary-menu > li > a {
	display: inline-block;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.2em;
	text-transform: uppercase;
	color: #fff;
	padding: 0.5rem 0;
	transition: color 0.2s ease;
}
.eleone-primary-menu > li > a:hover {
	color: rgb(225 255 1);
}
.eleone-primary-menu .sub-menu {
	display: none;
}

/* Full-width Elementor page canvas */
.eleone-full-width-page {
	width: 100%;
}

/* Keep the mobile navigation off desktop while retaining it on phones. */
@media (min-width: 768px) {
	nav > .md\:hidden {
		display: none !important;
	}
}

/* Match the review hero: one main banner and two equal stacked side blocks. */
.eleone-hero + div {
	height: 70vh;
}
.eleone-hero + div > a,
.eleone-hero + div > div {
	height: 50%;
	min-height: 0;
}
@media (min-width: 1024px) {
	.eleone-hero + div {
		height: 85vh;
	}
}

/* Centre the slider indicators inside the bottom of the main hero. */
.eleone-hero > .bottom-6 {
	position: absolute;
	top: auto;
	bottom: 24px;
	left: 50%;
	right: auto;
	transform: translateX(-50%);
	z-index: 30;
}

/* Restore the existing desktop Products dropdown on hover and keyboard focus. */
@media (min-width: 768px) {
	nav .group:hover > .top-full,
	nav .group:focus-within > .top-full {
		opacity: 1;
		visibility: visible;
		pointer-events: auto;
		transform: translateY(0);
	}
}

/* WordPress-managed primary menu: preserve the existing header and dropdown. */
.eleone-primary-menu > li {
	position: relative;
	padding: 16px 0;
}
.eleone-primary-menu > li > a {
	display: flex;
	align-items: center;
	gap: 6px;
	white-space: nowrap;
}
.eleone-primary-menu > li:hover > a,
.eleone-primary-menu > li:focus-within > a {
	color: rgb(225 255 1);
}
.eleone-menu-chevron {
	width: 14px;
	height: 14px;
	transition: transform 0.2s;
}
.eleone-primary-menu > li:hover .eleone-menu-chevron,
.eleone-primary-menu > li:focus-within .eleone-menu-chevron {
	transform: rotate(180deg);
}
.eleone-menu-dropdown {
	position: absolute;
	top: 100%;
	left: 0;
	padding-top: 12px;
	width: 320px;
	z-index: 50;
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
	transform: translateY(8px);
	transition: opacity 0.2s, transform 0.2s, visibility 0.2s;
}
.eleone-primary-menu > li:hover > .eleone-menu-dropdown,
.eleone-primary-menu > li:focus-within > .eleone-menu-dropdown {
	opacity: 1;
	visibility: visible;
	pointer-events: auto;
	transform: translateY(0);
}
.eleone-menu-panel {
	background: #000;
	border: 1px solid rgba(255,255,255,0.15);
	box-shadow: 0 25px 50px -12px rgba(0,0,0,0.25);
	padding: 16px;
}
.eleone-menu-heading {
	display: flex;
	justify-content: space-between;
	align-items: center;
	font-size: 9px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.1em;
	color: rgb(225 255 1);
	margin-bottom: 12px;
	padding-bottom: 8px;
	border-bottom: 1px solid rgba(255,255,255,0.1);
}
.eleone-menu-count { font-size: 8px; color: #9ca3af; }
.eleone-primary-menu .sub-menu {
	display: block;
	list-style: none;
	margin: 0;
	padding: 0;
}
.eleone-primary-menu .sub-menu li { list-style: none; margin: 0; padding: 0; }
.eleone-primary-menu .sub-menu li + li { margin-top: 4px; }
.eleone-primary-menu .sub-menu a {
	display: block;
	padding: 10px;
	color: #fff;
	transition: background 0.2s;
}
.eleone-primary-menu .sub-menu a:hover,
.eleone-primary-menu .sub-menu a:focus-visible { background: rgba(255,255,255,0.05); }
.eleone-primary-menu .sub-menu .eleone-menu-label {
	display: block;
	font-size: 12px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.05em;
}
.eleone-primary-menu .sub-menu a:hover .eleone-menu-label,
.eleone-primary-menu .sub-menu a:focus-visible .eleone-menu-label { color: rgb(225 255 1); }
.eleone-menu-description {
	display: block;
	font-size: 10px;
	text-transform: uppercase;
	letter-spacing: 0.1em;
	color: #9ca3af;
	margin-top: 2px;
}
.eleone-mobile-nav-menu,
.eleone-mobile-nav-menu .sub-menu { list-style: none; margin: 0; padding: 0; }
.eleone-mobile-nav-menu > li + li { margin-top: 16px; }
.eleone-mobile-nav-menu > li > a {
	display: block;
	font-family: Anton, sans-serif;
	font-size: 20px;
	line-height: 28px;
	text-transform: uppercase;
	color: #fff;
}
.eleone-mobile-nav-menu > .menu-item-has-children {
	border-top: 1px solid rgba(255,255,255,0.1);
	border-bottom: 1px solid rgba(255,255,255,0.1);
	padding: 16px 0;
}
.eleone-mobile-nav-menu > .menu-item-has-children > a {
	font-family: Roboto, sans-serif;
	font-size: 10px;
	font-weight: 700;
	letter-spacing: 0.1em;
	line-height: 15px;
	color: rgb(225 255 1);
}
.eleone-mobile-nav-menu .sub-menu li { margin-top: 8px; }
.eleone-mobile-nav-menu .sub-menu a {
	display: block;
	font-family: Anton, sans-serif;
	font-size: 18px;
	line-height: 28px;
	text-transform: uppercase;
	color: #e5e7eb;
	padding-left: 8px;
	border-left: 2px solid transparent;
}
.eleone-mobile-nav-menu .sub-menu a:hover { border-left-color: #ed1c24; color: #fff; }
.eleone-mobile-nav-menu > li > a:hover { color: rgb(225 255 1); }

/* Compact single-product gallery; keep catalogue and homepage cards unchanged. */
.single-product .eleone-product-gallery {
	max-width: 600px;
	margin-inline: auto;
	align-items: flex-start;
}
.single-product .eleone-main-product-frame {
	width: 100%;
	max-width: 480px;
	min-width: 0;
	height: 480px;
	aspect-ratio: auto !important;
	padding: 24px !important;
	flex: 1 1 auto;
}
.single-product .eleone-main-product-frame #eleone-main-img,
.single-product .eleone-related-frame img {
	position: static;
	inset: auto;
	width: 100% !important;
	height: 100% !important;
	max-width: 100% !important;
	max-height: 100% !important;
	object-fit: contain !important;
	object-position: center !important;
}
.single-product .eleone-related-grid {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 24px;
	max-width: 1200px;
	width: 100%;
	margin-inline: auto;
}
.single-product .eleone-related-grid > a { min-width: 0; }
.single-product .eleone-related-frame {
	height: 240px;
	aspect-ratio: auto !important;
	padding: 16px !important;
}
@media (max-width: 767px) {
	.single-product .eleone-product-gallery { align-items: center; }
	.single-product .eleone-main-product-frame {
		height: 360px;
		max-width: 100%;
		flex: none;
		padding: 16px !important;
	}
	.single-product .eleone-product-gallery .eleone-thumbs { max-width: 100%; }
	.single-product .eleone-related-grid {
		grid-template-columns: none;
		grid-auto-flow: column;
		grid-auto-columns: 190px;
		gap: 16px;
		overflow-x: auto;
		padding-bottom: 12px;
		scroll-snap-type: x proximity;
	}
	.single-product .eleone-related-grid > a { scroll-snap-align: start; }
	.single-product .eleone-related-frame { height: 200px; }
}

/* Compact, readable description bullets on every single-product page. */
.single-product #primary .review-specs li,
.single-product #primary section li.text-sm {
	font-size: 14px;
	line-height: 1.6;
	letter-spacing: 0.015em;
	text-transform: none;
	gap: 8px;
}
.single-product #primary section li.text-sm > .text-eleone-red {
	font-size: 12px;
	line-height: 22.4px;
	flex-shrink: 0;
}

/* Smaller complete certificate boxes; retain original page headings and text. */
.page-id-455 #primary .grid { max-width: 960px; margin-inline: auto; gap: 20px; }
.page-id-455 #primary .grid > div { padding: 18px; }
.page-id-455 #primary .grid > div > div:first-child > a {
 display: flex; align-items: center; justify-content: center;
 height: 220px; aspect-ratio: auto; margin-bottom: 18px;
}
.page-id-455 #primary .grid img {
 max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain;
}
@media (max-width: 767px) {
 .page-id-455 #primary .grid { max-width: 360px; }
 .page-id-455 #primary .grid > div { padding: 16px; }
}

/* Preserve existing section spacing inside the Elementor page canvas. */
.elementor-widget-eleone_section { margin: 0 !important; width: 100%; }
.elementor-widget-eleone_section > .elementor-widget-container { margin: 0; padding: 0; }
.elementor-widget-eleone_section .eleone-hero-slide img { height: 100%; }
