/* AB Garage Door Gallery
   Change the colors here to match your theme. */
.abgd-gallery {
	--abgd-accent: #e6b03a;          /* active pill + badge */
	--abgd-accent-text: #ffffff;     /* text on active pill */
	--abgd-badge-text: #2b2b2b;      /* text on image badge */
	--abgd-text: #2f2f2f;
	--abgd-muted: #4a4a4a;
	--abgd-pill-bg: #ffffff;
	--abgd-pill-border: #e3e3e3;
	--abgd-divider: #e5e5e5;
	--abgd-radius: 10px;
	--abgd-gap: 22px;

	width: 100%;
	color: var(--abgd-text);
	font-family: inherit;
	box-sizing: border-box;
}
.abgd-gallery *,
.abgd-gallery *::before,
.abgd-gallery *::after { box-sizing: border-box; }

/* ---------- Filters ---------- */
.abgd-filters {
	text-align: center;
	padding: 24px 16px 30px;
	border-bottom: 1px solid var(--abgd-divider);
}
.abgd-filter + .abgd-filter { margin-top: 26px; }

.abgd-gallery .abgd-filter-title {
	margin: 0 0 14px;
	font-size: 15px;
	font-weight: 600;
	line-height: 1.3;
	color: var(--abgd-text);
	text-transform: none;
	letter-spacing: 0;
}

.abgd-pills {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 11px 12px;
	max-width: 860px;
	margin: 0 auto;
}

.abgd-gallery .abgd-pill {
	appearance: none;
	margin: 0;
	padding: 6px 14px;
	min-height: 26px;
	border: 1px solid var(--abgd-pill-border);
	border-radius: 999px;
	background: var(--abgd-pill-bg);
	color: var(--abgd-text);
	font: inherit;
	font-size: 12px;
	font-weight: 500;
	line-height: 1.2;
	text-transform: none;
	letter-spacing: 0;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
	cursor: pointer;
	transition: background-color .2s ease, color .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.abgd-gallery .abgd-pill[hidden] { display: none; }
.abgd-gallery .abgd-pill:hover {
	border-color: var(--abgd-accent);
	box-shadow: 0 2px 6px rgba(0, 0, 0, 0.14);
}
.abgd-gallery .abgd-pill.is-active,
.abgd-gallery .abgd-pill.is-active:hover {
	background: var(--abgd-accent);
	border-color: var(--abgd-accent);
	color: var(--abgd-accent-text);
}
.abgd-gallery .abgd-pill:focus-visible {
	outline: 2px solid var(--abgd-accent);
	outline-offset: 2px;
}

.abgd-count {
	margin: 26px 0 0;
	font-size: 13px;
	color: var(--abgd-muted);
}

/* ---------- Grid ---------- */
.abgd-grid {
	display: grid;
	grid-template-columns: repeat(var(--abgd-columns, 4), minmax(0, 1fr));
	gap: var(--abgd-gap);
	max-width: 1240px;
	margin: 0 auto;
	padding: 48px 20px 10px;
}

.abgd-item {
	margin: 0;
	padding: 0;
	border-radius: var(--abgd-radius);
	overflow: hidden;
	background: #f2f2f2;
	box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
	animation: abgd-fade .35s ease both;
}
.abgd-item[hidden] { display: none; }

.abgd-item-link {
	position: relative;
	display: block;
	aspect-ratio: 1 / 1;
	overflow: hidden;
	text-decoration: none;
}
.abgd-gallery .abgd-item-img {
	display: block;
	width: 100%;
	height: 100%;
	max-width: none;
	object-fit: cover;
	transition: transform .45s ease;
}
.abgd-item-link:hover .abgd-item-img { transform: scale(1.04); }
.abgd-item-link:focus-visible { outline: 3px solid var(--abgd-accent); outline-offset: -3px; }

.abgd-badge {
	position: absolute;
	z-index: 2;
	top: 11px;
	left: 11px;
	padding: 2px 9px;
	border-radius: 999px;
	background: var(--abgd-accent);
	color: var(--abgd-badge-text);
	font-size: 10px;
	font-weight: 700;
	line-height: 1.4;
	pointer-events: none;
}

.abgd-empty {
	text-align: center;
	color: var(--abgd-muted);
	padding: 30px 16px;
	margin: 0;
}

.abgd-more-wrap {
	text-align: center;
	padding: 28px 16px 10px;
}
.abgd-gallery .abgd-load-more {
	appearance: none;
	padding: 11px 26px;
	border: 0;
	border-radius: 999px;
	background: var(--abgd-accent);
	color: var(--abgd-accent-text);
	font: inherit;
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
	box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
}
.abgd-gallery .abgd-load-more:hover { filter: brightness(.95); }
.abgd-gallery .abgd-load-more[hidden] { display: none; }

@keyframes abgd-fade {
	from { opacity: 0; transform: translateY(6px); }
	to   { opacity: 1; transform: none; }
}

/* ---------- Hover info ---------- */
.abgd-overlay {
	position: absolute;
	inset: 0;
	z-index: 1;
	display: flex;
	flex-direction: column;
	justify-content: flex-end;
	gap: 5px;
	padding: 14px 12px 13px;
	background: linear-gradient(to top, rgba(10, 10, 10, 0.88) 0%, rgba(10, 10, 10, 0.55) 40%, rgba(10, 10, 10, 0.25) 100%);
	color: #fff;
	text-align: left;
	opacity: 0;
	transition: opacity .25s ease;
	pointer-events: none;
}
.abgd-item-link:hover .abgd-overlay,
.abgd-item-link:focus-visible .abgd-overlay { opacity: 1; }

.abgd-ov-title {
	font-size: 12px;
	font-weight: 700;
	line-height: 1.3;
	color: #fff;
}
.abgd-ov-loc {
	display: flex;
	align-items: center;
	gap: 6px;
	font-size: 10.5px;
	font-weight: 600;
	color: #f1f1f1;
}
.abgd-ov-loc .abgd-pin { flex: none; color: #d9d9d9; }
.abgd-ov-col {
	font-size: 10px;
	font-weight: 600;
	color: #9b9b9b;
}

/* ---------- Numbered pagination ---------- */
.abgd-pagination {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	align-items: center;
	gap: 8px;
	padding: 32px 16px 10px;
}
.abgd-pagination[hidden] { display: none; }
.abgd-gallery .abgd-page {
	appearance: none;
	min-width: 34px;
	height: 34px;
	padding: 0 12px;
	margin: 0;
	border: 1px solid var(--abgd-pill-border);
	border-radius: 999px;
	background: var(--abgd-pill-bg);
	color: var(--abgd-text);
	font: inherit;
	font-size: 13px;
	font-weight: 500;
	line-height: 32px;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
	cursor: pointer;
}
.abgd-gallery .abgd-page:hover { border-color: var(--abgd-accent); }
.abgd-gallery .abgd-page.is-active {
	background: var(--abgd-accent);
	border-color: var(--abgd-accent);
	color: var(--abgd-accent-text);
	cursor: default;
}
.abgd-gallery .abgd-page:disabled { opacity: .45; cursor: default; }
.abgd-gallery .abgd-page:focus-visible { outline: 2px solid var(--abgd-accent); outline-offset: 2px; }
.abgd-dots { color: var(--abgd-muted); font-size: 13px; padding: 0 2px; }

/* ---------- Popup (lightbox) ---------- */
.abgd-lightbox {
	--abgd-accent: #e6b03a;
	position: fixed;
	inset: 0;
	z-index: 999999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 70px 24px 24px;
	background: rgba(80, 80, 80, 0.985);
	font-family: inherit;
	overflow-y: auto;
}
.abgd-lightbox[hidden] { display: none; }

.abgd-lb-stage {
	display: flex;
	flex-direction: column;
	align-items: center;
	width: 100%;
	max-width: 1000px;
	margin: auto;
}
.abgd-lb-img {
	display: block;
	max-width: 100%;
	max-height: calc(100vh - 250px);
	width: auto;
	height: auto;
	margin: 0 auto;
	box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
}
.abgd-lightbox.info-hidden .abgd-lb-img { max-height: calc(100vh - 150px); }

.abgd-lb-info {
	width: 430px;
	max-width: 100%;
	margin-top: 20px;
	padding: 14px 12px 12px;
	border-radius: 8px;
	background: #1c1c1c;
	color: #fff;
	text-align: left;
	box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
}
.abgd-lb-info[hidden] { display: none; }

.abgd-lightbox .abgd-lb-title {
	margin: 0 0 12px;
	padding: 0;
	font-size: 12.5px;
	font-weight: 700;
	line-height: 1.35;
	color: #fff;
	text-transform: none;
	letter-spacing: 0;
}
.abgd-lb-loc {
	display: flex;
	align-items: center;
	gap: 7px;
	margin: 0 0 11px;
	font-size: 11px;
	color: #cfcfcf;
}
.abgd-lb-loc[hidden] { display: none; }
.abgd-lb-loc .abgd-pin { flex: none; color: var(--abgd-accent); }

.abgd-lb-tags {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
}
.abgd-lb-tags:empty { display: none; }
.abgd-lb-tag {
	display: inline-block;
	padding: 3px 8px;
	border: 1px solid #6e6e6e;
	border-radius: 999px;
	font-size: 9.5px;
	font-weight: 700;
	line-height: 1.3;
	color: #fff;
}
.abgd-lb-tag.is-style {
	background: var(--abgd-accent);
	border-color: var(--abgd-accent);
	color: #2b2b2b;
}

.abgd-lightbox button {
	appearance: none;
	margin: 0;
	font: inherit;
	cursor: pointer;
}
.abgd-lightbox .abgd-lb-toggle {
	margin-top: 12px;
	padding: 7px 15px;
	border: 0;
	border-radius: 999px;
	background: #1c1c1c;
	color: #fff;
	font-size: 10px;
	font-weight: 700;
	line-height: 1.2;
}
.abgd-lightbox .abgd-lb-toggle:hover { background: #000; }
.abgd-lightbox .abgd-lb-toggle[hidden] { display: none; }

.abgd-lightbox .abgd-lb-close {
	position: fixed;
	top: 16px;
	right: 18px;
	width: 36px;
	height: 36px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: rgba(40, 40, 40, 0.75);
	color: #fff;
	font-size: 15px;
	line-height: 36px;
	text-align: center;
}
.abgd-lightbox .abgd-lb-close:hover { background: #111; }
.abgd-lightbox button:focus-visible { outline: 2px solid var(--abgd-accent); outline-offset: 2px; }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
	.abgd-grid { grid-template-columns: repeat(min(3, var(--abgd-columns, 4)), minmax(0, 1fr)); }
}
@media (max-width: 768px) {
	.abgd-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; padding-top: 32px; }
	.abgd-pills { gap: 9px; }
	.abgd-lightbox { padding: 64px 12px 16px; }
	.abgd-lb-img { max-height: calc(100vh - 290px); }
}
@media (max-width: 420px) {
	.abgd-grid { grid-template-columns: 1fr; }
}
@media (hover: none) {
	/* Touch screens: keep a light version of the info visible */
	.abgd-overlay { opacity: 1; background: linear-gradient(to top, rgba(10, 10, 10, 0.8) 0%, rgba(10, 10, 10, 0) 55%); }
	.abgd-ov-col { display: none; }
}

@media (prefers-reduced-motion: reduce) {
	.abgd-item { animation: none; }
	.abgd-gallery .abgd-item-img,
	.abgd-overlay { transition: none; }
}
