/**
 * Villages Collection Styles
 * 
 * This stylesheet contains all styles for the villages collection pages:
 * - /villages (archive page)
 * - /villages/{brand} (brand archive with filters)
 * - /villages/{brand}/view-all (view all products)
 * - /villages/{brand}/{category} (category archive)
 * 
 * @package Avada-Child-Theme
 */

/* ==========================================================================
   Brand Filter Pills
   ========================================================================== */

/**
 * Container for the filter pills navigation
 * Displays category filters horizontally with "NEW THIS YEAR" and "VIEW ALL" options
 */
.lemax-brand-filters {
	padding: 2rem 0;
	margin-bottom: 2rem;
	border-bottom: 1px solid #e0e0e0;
}

.lemax-brand-filters__container {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
	align-items: center;
	justify-content: flex-start;
}

/**
 * Individual filter pill button
 * Pill-shaped buttons for category navigation
 */
.lemax-brand-filters__pill {
	display: inline-block;
	padding: 0.625rem 1.25rem;
	background-color: #f5f5f5;
	color: #333;
	text-decoration: none;
	border-radius: 2rem;
	font-size: 0.875rem;
	font-weight: 500;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	transition: all 0.3s ease;
	border: 2px solid transparent;
	cursor: pointer;
}

.lemax-brand-filters__pill:hover {
	background-color: #e8e8e8;
	color: #000;
	text-decoration: none;
	transform: translateY(-2px);
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/**
 * Active state for filter pills
 * Highlights the currently selected filter
 */
.lemax-brand-filters__pill--active {
	background-color: #2c5f2d;
	color: #ffffff;
	border-color: #2c5f2d;
	font-weight: 600;
}

.lemax-brand-filters__pill--active:hover {
	background-color: #1e4220;
	border-color: #1e4220;
	color: #ffffff;
	transform: translateY(-2px);
	box-shadow: 0 4px 12px rgba(44, 95, 45, 0.3);
}

/* ==========================================================================
   Brand Hero Section
   ========================================================================== */

/**
 * Hero section at the top of brand pages
 * Contains brand image, title, description, and back link
 */
.lemax-brand-hero {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 3rem;
	margin-bottom: 3rem;
	padding-bottom: 3rem;
	border-bottom: 1px solid #e0e0e0;
}

.lemax-brand-hero__media {
	position: relative;
	overflow: hidden;
	border-radius: 8px;
}

.lemax-brand-hero__media img {
	width: 100%;
	height: auto;
	display: block;
	object-fit: cover;
}

.lemax-brand-hero__content {
	display: flex;
	flex-direction: column;
	justify-content: center;
}

.lemax-brand-hero__eyebrow {
	font-size: 0.875rem;
	text-transform: uppercase;
	letter-spacing: 2px;
	color: #666;
	margin-bottom: 0.5rem;
	font-weight: 500;
}

.lemax-brand-hero__title {
	font-size: 2.5rem;
	font-weight: 700;
	margin-bottom: 1rem;
	color: #1a1a1a;
	line-height: 1.2;
}

.lemax-brand-hero__description {
	font-size: 1rem;
	line-height: 1.6;
	color: #555;
	margin-bottom: 1.5rem;
}

.lemax-brand-hero__description p {
	margin-bottom: 1rem;
}

.lemax-brand-hero__description p:last-child {
	margin-bottom: 0;
}

/**
 * Back to villages link
 */
.lemax-brand-hero__back {
	display: inline-flex;
	align-items: center;
	color: #2c5f2d;
	text-decoration: none;
	font-weight: 500;
	transition: color 0.3s ease;
	margin-top: auto;
}

.lemax-brand-hero__back:hover {
	color: #1e4220;
	text-decoration: underline;
}

.lemax-brand-hero__back::before {
	content: '←';
	margin-right: 0.5rem;
	font-size: 1.2rem;
}

/* ==========================================================================
   Brand Categories Grid (Old Layout - Kept for Reference)
   ========================================================================== */

/**
 * Grid layout for category cards (if used elsewhere)
 */
.lemax-brand-categories {
	margin-bottom: 3rem;
}

.lemax-brand-categories header {
	margin-bottom: 2rem;
	text-align: center;
}

.lemax-brand-categories header h2 {
	font-size: 2rem;
	margin-bottom: 0.5rem;
}

.lemax-brand-categories header p {
	color: #666;
	font-size: 1rem;
}

.lemax-brand-categories__grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
	gap: 1.5rem;
}

.lemax-brand-categories__card {
	display: flex;
	flex-direction: column;
	padding: 1.5rem;
	background: #fff;
	border: 1px solid #e0e0e0;
	border-radius: 8px;
	text-decoration: none;
	transition: all 0.3s ease;
}

.lemax-brand-categories__card:hover {
	border-color: #2c5f2d;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
	transform: translateY(-4px);
	text-decoration: none;
}

.lemax-brand-categories__name {
	font-size: 1.125rem;
	font-weight: 600;
	color: #1a1a1a;
	margin-bottom: 0.5rem;
}

.lemax-brand-categories__count {
	font-size: 0.875rem;
	color: #666;
}

/* ==========================================================================
   Product Filters (Static Filters for Category Pages)
   ========================================================================== */

/**
 * Container for product feature filters
 * Shows filter options like "4.5V ADAPTOR", "ANIMATED", "LIGHTED", etc.
 */
.lemax-product-filters {
	padding: 1.5rem 0;
	margin-bottom: 2rem;
	border-bottom: 1px solid #e0e0e0;
}

.lemax-product-filters__header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 1.5rem;
}

.lemax-product-filters__label {
	font-size: 0.9375rem;
	font-weight: 600;
	color: #2c5f2d;
	text-transform: uppercase;
	letter-spacing: 0.5px;
}

.lemax-product-filters__clear {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 60px;
	height: 60px;
	background-color: #e8e8e8;
	border: none;
	border-radius: 50%;
	color: #333;
	font-size: 0.875rem;
	font-weight: 500;
	cursor: pointer;
	text-decoration: none;
	transition: all 0.3s ease;
	text-transform: uppercase;
	letter-spacing: 0.5px;
}

.lemax-product-filters__clear:hover {
	background-color: #d0d0d0;
	color: #000;
	text-decoration: none;
	transform: scale(1.05);
}

.lemax-product-filters__clear--disabled {
	opacity: 0.5;
	cursor: not-allowed;
	pointer-events: none;
}

.lemax-product-filters__container {
	display: flex;
	flex-wrap: wrap;
	gap: 1.5rem;
	align-items: flex-start;
}

/**
 * Individual filter item button
 * Contains an icon in circular container and text label below
 */
.lemax-product-filters__item {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 0.5rem;
	background: none;
	border: none;
	cursor: pointer;
	transition: all 0.3s ease;
	text-decoration: none;
	color: #333;
	padding: 8px;
}

.lemax-product-filters__item:hover {
	transform: translateY(-4px);
	text-decoration: none;
}

.lemax-product-filters__item--active .lemax-product-filters__text {
	color: #2c5f2d;
	font-weight: 600;
}

.lemax-product-filters__icon-wrapper {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 60px;
	height: 60px;
	background-color: #000;
	border: 2px solid #000;
	border-radius: 50%;
	transition: all 0.3s ease;
	padding: 12px;
	overflow: hidden;
	position: relative;
}

.lemax-product-filters__item:hover .lemax-product-filters__icon-wrapper {
	background-color: #333;
	border-color: #333;
	transform: scale(1.1);
}

.lemax-product-filters__item--active:hover {
	border-color: #d8e2d4;
	background-color: #d8e2d4;
    border-radius: 8px;
}

.lemax-product-filters__icon {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 100%;
	min-width: 0;
	min-height: 0;
}

.lemax-product-filters__icon img {
	width: auto;
	height: auto;
	max-width: 100%;
	max-height: 100%;
	object-fit: contain;
	display: block;
}

.lemax-product-filters__icon--placeholder {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 100%;
	color: #fff;
	font-size: 1.5rem;
	font-weight: 700;
	text-transform: uppercase;
}

.lemax-product-filters__item--active {
	border-color: #d8e2d4;
	background-color: #d8e2d4;
    border-radius: 8px;
}

.lemax-product-filters__text {
	font-size: 0.75rem;
	font-weight: 500;
	text-align: center;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	line-height: 1.2;
	color: #333;
	transition: color 0.3s ease;
}

/* ==========================================================================
   Product Features Display (Single Product Page)
   ========================================================================== */

/**
 * Product features section on single product pages
 * Shows features with icons
 */
.lemax-product-features {
	margin: 2rem 0;
	padding: 1.5rem 0;
	border-top: 1px solid #e0e0e0;
	border-bottom: 1px solid #e0e0e0;
}

.lemax-product-features__title {
	font-size: 1.25rem;
	font-weight: 600;
	margin-bottom: 1rem;
	color: #1a1a1a;
	text-transform: uppercase;
	letter-spacing: 1px;
}

.lemax-product-features__list {
	display: flex;
	flex-wrap: wrap;
	gap: 1rem;
	align-items: center;
}

.lemax-product-features__item {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	padding: 0.5rem 1rem;
	background-color: #f5f5f5;
	border-radius: 4px;
	font-size: 0.875rem;
	color: #333;
}

.lemax-product-features__icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 24px;
	height: 24px;
	flex-shrink: 0;
}

.lemax-product-features__icon img {
	width: 100%;
	height: 100%;
	object-fit: contain;
}

.lemax-product-features__name {
	font-weight: 500;
}

/* ==========================================================================
   Product Specifications (Custom Fields on Single Product Page)
   ========================================================================== */

/**
 * Product specifications display above add to cart button
 */
.lemax-product-specs {
	margin: 1.5rem 0;
	padding: 1.5rem;
	background-color: #f9f9f9;
	border: 1px solid #e0e0e0;
	border-radius: 8px;
}

.lemax-product-specs__item {
	display: flex;
	align-items: baseline;
	margin-bottom: 0.75rem;
	padding-bottom: 0.75rem;
	border-bottom: 1px solid #e8e8e8;
}

.lemax-product-specs__item:last-child {
	margin-bottom: 0;
	padding-bottom: 0;
	border-bottom: none;
}

.lemax-product-specs__label {
	font-weight: 600;
	color: #333;
	margin-right: 0.5rem;
	min-width: 140px;
	font-size: 0.9375rem;
}

.lemax-product-specs__value {
	color: #555;
	font-size: 0.9375rem;
	flex: 1;
}

/* ==========================================================================
   Product Loop Features (Feature Icons on Product Cards)
   ========================================================================== */

/**
 * Feature icons displayed on product cards in shop/archive loops
 */
.lemax-product-loop-features {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	align-items: center;
	justify-content: center;
	margin-top: 0.75rem;
	padding-top: 0.75rem;
	border-top: 1px solid #e0e0e0;
	position: relative;
	z-index: 1;
}

/* Ensure features stay inside product card */
li.product .lemax-product-loop-features {
	width: 100%;
	box-sizing: border-box;
}

.lemax-product-loop-features__icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	background-color: #f5f5f5;
	border-radius: 4px;
	padding: 4px;
	transition: all 0.3s ease;
	flex-shrink: 0;
}

.lemax-product-loop-features__icon:hover {
	background-color: #e8e8e8;
	transform: scale(1.1);
}

.lemax-product-loop-features__icon img {
	width: 100%;
	height: 100%;
	object-fit: contain;
	display: block;
}

/* ==========================================================================
   Brand Category Header (Category Archive Pages)
   ========================================================================== */

/**
 * Header section for category archive pages within a brand
 */
.lemax-brand-category-header {
	margin-bottom: 2rem;
	padding-bottom: 2rem;
	border-bottom: 1px solid #e0e0e0;
}

.lemax-brand-category-header__eyebrow {
	font-size: 0.875rem;
	text-transform: uppercase;
	letter-spacing: 2px;
	color: #666;
	margin-bottom: 0.5rem;
	font-weight: 500;
}

.lemax-brand-category-header h1 {
	font-size: 2rem;
	font-weight: 700;
	margin-bottom: 1rem;
	color: #1a1a1a;
}

.lemax-brand-category-header__description {
	font-size: 1rem;
	line-height: 1.6;
	color: #555;
	margin-bottom: 1rem;
}

.lemax-brand-category-header__back {
	display: inline-flex;
	align-items: center;
	color: #2c5f2d;
	text-decoration: none;
	font-weight: 500;
	transition: color 0.3s ease;
}

.lemax-brand-category-header__back:hover {
	color: #1e4220;
	text-decoration: underline;
}

.lemax-brand-category-header__back::before {
	content: '←';
	margin-right: 0.5rem;
	font-size: 1.2rem;
}

/* ==========================================================================
   Villages Archive Page
   ========================================================================== */

/**
 * Main container for villages archive page
 * Lists all available brands (villages)
 */
.lemax-villages {
	padding: 2rem 0;
}

.lemax-villages__grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
	gap: 2rem;
	margin-top: 2rem;
}

/**
 * Individual village/brand card
 */
.lemax-villages__card {
	background: #fff;
	border: 1px solid #e0e0e0;
	border-radius: 8px;
	overflow: hidden;
	transition: all 0.3s ease;
	display: flex;
	flex-direction: column;
}

.lemax-villages__card:hover {
	border-color: #2c5f2d;
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
	transform: translateY(-4px);
}

.lemax-villages__image {
	width: 100%;
	height: 250px;
	overflow: hidden;
	background: #f5f5f5;
}

.lemax-villages__image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.3s ease;
}

.lemax-villages__card:hover .lemax-villages__image img {
	transform: scale(1.05);
}

.lemax-villages__content {
	padding: 1.5rem;
	flex-grow: 1;
	display: flex;
	flex-direction: column;
}

.lemax-villages__title {
	font-size: 1.5rem;
	font-weight: 700;
	margin-bottom: 1rem;
	color: #1a1a1a;
	text-transform: uppercase;
	letter-spacing: 1px;
}

.lemax-villages__description {
	font-size: 0.9375rem;
	line-height: 1.6;
	color: #555;
	margin-bottom: 1.5rem;
	flex-grow: 1;
}

.lemax-villages__description p {
	margin-bottom: 0.75rem;
}

.lemax-villages__description p:last-child {
	margin-bottom: 0;
}

.lemax-villages__button {
	display: inline-block;
	padding: 0.75rem 1.5rem;
	background-color: #2c5f2d;
	color: #ffffff;
	text-decoration: none;
	border-radius: 4px;
	font-weight: 600;
	text-align: center;
	text-transform: uppercase;
	letter-spacing: 1px;
	font-size: 0.875rem;
	transition: all 0.3s ease;
	border: 2px solid #2c5f2d;
}

.lemax-villages__button:hover {
	background-color: #1e4220;
	border-color: #1e4220;
	color: #ffffff;
	text-decoration: none;
	transform: translateY(-2px);
	box-shadow: 0 4px 12px rgba(44, 95, 45, 0.3);
}

.lemax-villages__empty {
	text-align: center;
	padding: 3rem;
	color: #666;
	font-size: 1.125rem;
}

/* ==========================================================================
   Responsive Design
   ========================================================================== */

/**
 * Tablet and below (max-width: 768px)
 */
@media (max-width: 768px) {
	.lemax-brand-hero {
		grid-template-columns: 1fr;
		gap: 2rem;
	}

	.lemax-brand-hero__title {
		font-size: 2rem;
	}

	.lemax-brand-filters__container {
		gap: 0.5rem;
	}

	.lemax-brand-filters__pill {
		padding: 0.5rem 1rem;
		font-size: 0.8125rem;
	}

	.lemax-villages__grid {
		grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
		gap: 1.5rem;
	}

	.lemax-brand-categories__grid {
		grid-template-columns: 1fr;
	}

	.lemax-product-filters__container {
		gap: 0.75rem;
	}

	.lemax-product-filters__item {
		padding: 0.5rem 0.875rem;
		font-size: 0.8125rem;
	}

	.lemax-product-filters__icon {
		font-size: 1rem;
	}
}

/**
 * Mobile (max-width: 480px)
 */
@media (max-width: 480px) {
	.lemax-brand-hero__title {
		font-size: 1.75rem;
	}

	.lemax-brand-filters__container {
		justify-content: center;
	}

	.lemax-brand-filters__pill {
		padding: 0.5rem 0.875rem;
		font-size: 0.75rem;
	}

	.lemax-villages__grid {
		grid-template-columns: 1fr;
	}

	.lemax-villages__image {
		height: 200px;
	}
}

