/* =========================================================
   IEG Inventory Grid  –  [ieg_inventory]
   ========================================================= */
.ieg-inventory {
	--ieg-red: #d6190f;
	--ieg-red-dark: #b91409;
	--ieg-dark: #2b2b2b;
	--ieg-text: #3a3a3a;
	--ieg-card: #e6e9ec;
	--ieg-card-stripe: #dde1e5;
	--ieg-select: #e9ebee;
	--ieg-gap: 20px;
	--ieg-cols: 3;
	font-family: inherit;
	color: var(--ieg-text);
	box-sizing: border-box;
	width: 100%;
}
.ieg-inventory *,
.ieg-inventory *::before,
.ieg-inventory *::after { box-sizing: inherit; }

.ieg-inventory ul {
	list-style: none;
	margin: 0;
	padding: 0;
}

/* ---------- Heading ---------- */
.ieg-inventory__head { text-align: center; margin: 0 0 24px; }
.ieg-inventory__title {
	margin: 0;
	font-size: 26px;
	line-height: 1.2;
	font-weight: 400;
	letter-spacing: .5px;
	text-transform: uppercase;
	color: var(--ieg-text);
}
.ieg-inventory__title-accent { color: var(--ieg-red); font-weight: 700; }
.ieg-inventory__rule {
	display: block;
	width: 44px;
	height: 2px;
	margin: 12px auto 10px;
	background: var(--ieg-red);
	opacity: .6;
}
.ieg-inventory__subtitle {
	margin: 0;
	font-size: 13px;
	font-weight: 700;
	color: var(--ieg-dark);
}

/* ---------- Filters ---------- */
.ieg-inventory__filters { margin: 0 0 32px; }
.ieg-inventory__filter-list {
	display: grid;
	grid-template-columns: repeat(var(--ieg-cols), minmax(0, 1fr));
	gap: var(--ieg-gap);
	align-items: stretch;
}
.ieg-inventory__filter { min-width: 0; }

.ieg-select {
	position: relative;
	height: 54px;
	border: 1px solid #c9cdd2;
	background: #fff;
	padding: 5px;
}
.ieg-select select {
	-webkit-appearance: none;
	-moz-appearance: none;
	appearance: none;
	width: 100%;
	height: 100%;
	margin: 0;
	padding: 0 60px 0 18px;
	border: 0;
	border-radius: 0;
	background: var(--ieg-select);
	color: var(--ieg-dark);
	font-size: 12px;
	font-weight: 700;
	letter-spacing: .5px;
	text-transform: uppercase;
	line-height: 1;
	cursor: pointer;
	outline: none;
}
.ieg-select select:focus-visible { box-shadow: 0 0 0 2px var(--ieg-red) inset; }
.ieg-select::after {
	content: "";
	position: absolute;
	top: 5px;
	right: 5px;
	bottom: 5px;
	width: 40px;
	background: var(--ieg-dark) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='10' viewBox='0 0 16 10'%3E%3Cpath fill='%23fff' d='M0 0h16L8 10z'/%3E%3C/svg%3E") no-repeat center;
	pointer-events: none;
}

/* red fill with a white gap and red outer border (matches design) */
.ieg-inventory__btn {
	display: block;
	width: 100%;
	height: 54px;
	margin: 0;
	padding: 0 18px;
	border: 0;
	border-radius: 0;
	background: var(--ieg-red);
	background-clip: padding-box;
	box-shadow: 0 0 0 5px #fff, 0 0 0 6px var(--ieg-red);
	cursor: pointer;
	font: inherit;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: .5px;
	line-height: 1;
	text-transform: uppercase;
	color: #fff;
	transition: background .2s;
}
.ieg-inventory__filter--submit { padding: 6px; }
.ieg-inventory__filter--submit .ieg-inventory__btn { height: 42px; }
.ieg-inventory__btn:hover,
.ieg-inventory__btn:focus-visible { background: var(--ieg-red-dark); }
.ieg-inventory__btn:focus-visible { outline: 2px solid var(--ieg-dark); outline-offset: 8px; }

/* ---------- Grid ---------- */
.ieg-inventory__grid {
	display: grid;
	grid-template-columns: repeat(var(--ieg-cols), minmax(0, 1fr));
	gap: var(--ieg-gap);
}
.ieg-inventory__item { min-width: 0; display: flex; }

.ieg-card {
	position: relative;
	display: flex;
	flex-direction: column;
	width: 100%;
	padding: 26px 26px 24px;
	background:
		linear-gradient(110deg, var(--ieg-card) 0 38%, var(--ieg-card-stripe) 38% 62%, var(--ieg-card) 62%);
	overflow: hidden;
}

.ieg-card__media {
	position: relative;
	display: block;
	text-decoration: none;
	overflow: hidden;
}
.ieg-card__frame {
	display: block;
	padding: 12px;
	background: #fff;
}
.ieg-card__img {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 1 / 1;
	object-fit: cover;
	transition: transform .35s ease;
}
.ieg-card__media:hover .ieg-card__img { transform: scale(1.03); }

/* hover overlay with Year / Serial / Condition / Category */
.ieg-card__overlay {
	position: absolute;
	inset: 12px;
	display: flex;
	align-items: center;
	padding: 20px;
	background: linear-gradient(180deg, rgba(0,0,0,.15), rgba(0,0,0,.65));
	color: #fff;
	opacity: 0;
	transition: opacity .3s ease;
	pointer-events: none;
}
.ieg-card__media:hover .ieg-card__overlay,
.ieg-card__media:focus-visible .ieg-card__overlay { opacity: 1; }
.ieg-card__specs li {
	font-size: 13px;
	line-height: 1.5;
	text-shadow: 0 1px 2px rgba(0,0,0,.6);
}
.ieg-card__specs strong { font-weight: 700; }

.ieg-card__title {
	position: relative;
	margin: 24px 0 0;
	padding: 2px 0 2px 10px;
	font-size: 17px;
	line-height: 1.4;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: .3px;
}
.ieg-card__title::before {
	content: "";
	position: absolute;
	left: -26px;
	top: 0;
	bottom: 0;
	width: 6px;
	background: var(--ieg-red);
}
.ieg-card__title a {
	color: var(--ieg-dark);
	text-decoration: none;
	transition: color .2s;
}
.ieg-card__title a:hover,
.ieg-card__title a:focus-visible { color: var(--ieg-red); text-decoration: underline; }
.ieg-card__price { margin-top: 10px; padding-left: 10px; font-weight: 700; color: var(--ieg-red); }

.ieg-inventory__empty { text-align: center; padding: 40px 0; font-weight: 700; }

/* ---------- Pagination ---------- */
.ieg-inventory__pagination { margin-top: 36px; text-align: center; }
.ieg-inventory__pagination .page-numbers {
	display: inline-flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 6px;
}
.ieg-inventory__pagination .page-numbers li { margin: 0; }
.ieg-inventory__pagination a.page-numbers,
.ieg-inventory__pagination span.page-numbers {
	display: inline-block;
	min-width: 40px;
	padding: 10px 12px;
	border: 1px solid #c9cdd2;
	background: #fff;
	color: var(--ieg-dark);
	font-weight: 700;
	text-decoration: none;
	line-height: 1;
}
.ieg-inventory__pagination span.page-numbers.current,
.ieg-inventory__pagination a.page-numbers:hover {
	background: var(--ieg-red);
	border-color: var(--ieg-red);
	color: #fff;
}

/* ---------- Loading state ---------- */
.ieg-inventory.is-loading .ieg-inventory__results { opacity: .45; pointer-events: none; transition: opacity .2s; }

/* ---------- Responsive ---------- */
@media (max-width: 991px) {
	.ieg-inventory__grid,
	.ieg-inventory__filter-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.ieg-inventory__filter--submit { grid-column: 1 / -1; }
	.ieg-card__title { font-size: 16px; }
}
@media (max-width: 600px) {
	.ieg-inventory__grid,
	.ieg-inventory__filter-list { grid-template-columns: 1fr; }
	.ieg-inventory__title { font-size: 22px; }
	.ieg-card { padding: 20px 20px 18px; }
	.ieg-card__title::before { left: -20px; }
	.ieg-card__overlay { opacity: 1; background: linear-gradient(180deg, rgba(0,0,0,0) 40%, rgba(0,0,0,.7)); align-items: flex-end; }
}
