@charset "UTF-8";

/* ==================================================
   PHOTO GALLERY
================================================== */

.gallery-archive {
	width: 100%;
	padding-bottom: 8em;
}

.gallery-archive__inner {
	width: min(100% - 3em, 1200px);
	margin: 0 auto;
}


/* ==================================================
   PAGE TITLE
================================================== */

.gallery-archive .lower-pagettl {
	margin-bottom: 4em;
}

.gallery-archive .lower-pagettl .inner2 {
	width: 100%;
}



/* ==================================================
   FILTER
================================================== */

.gallery-filter {
	padding-bottom: 1.8em;
	border-bottom: 1px solid #aaa;
}

.gallery-filter__form {
	display: flex;
	align-items: center;
	gap: 1em;
}

.gallery-filter__select-wrap {
	position: relative;
	width: 12em;
}

.gallery-filter__select {
	width: 100%;
	height: 4rem;
	padding: 0 2.8em 0 1em;
	border: 1px solid #aaa;
	border-radius: .45em;
	background: #fff;
	color: #222;
	font-family: inherit;
	line-height: 1;
	cursor: pointer;
	appearance: none;
}

.gallery-filter__select-wrap::after {
	content: "";
	position: absolute;
	top: 50%;
	right: 1em;
	width: 0;
	height: 0;
	border-top: .4em solid #111;
	border-right: .3em solid transparent;
	border-left: .3em solid transparent;
	transform: translateY(-50%);
	pointer-events: none;
}

.gallery-filter__select:disabled {
	background: #f5f5f5;
	cursor: default;
}

.gallery-filter__submit {
	display: flex;
	width: 7.2em;
	height: 4rem;
	padding: 0 1em;
	border: 0;
	border-radius: .45em;
	background: #000;
	color: #fff;
	font-family: inherit;
	cursor: pointer;
	align-items: center;
	justify-content: center;
	transition: opacity .3s ease;
}

.gallery-filter__submit:hover {
	opacity: .7;
}


/* ==================================================
   BRAND LIST
================================================== */

.gallery-brand-list {
	margin-top: 3.5em;
}

.gallery-brand-group + .gallery-brand-group {
	margin-top: 4em;
}

.gallery-brand-group__title {
	margin: 0 0 .7em;
	font-weight: 400;
	line-height: 1.4;
}

.gallery-brand-group__terms {
	display: flex;
	flex-wrap: wrap;
	gap: 1em 1.2em;
}

.gallery-brand-term {
	display: flex;
	width: 9.5em;
	min-height: 2.8rem;
	padding: .9em 1em .9em 1.2em;
	border: 1px solid #aaa;
	border-radius: .45em;
	color: #222;
	line-height: 1.2;
	text-decoration: none;
	align-items: center;
	justify-content: space-between;
	gap: .5em;
	transition:
		background-color .3s ease,
		color .3s ease;
}

.gallery-brand-term:hover {
	background: #000;
	color: #fff;
}

.gallery-brand-term__name {
	display: block;
	min-width: 0;
}

.gallery-brand-term__arrow {
	display: block;
	width: 0;
	height: 0;
	border-top: .45em solid transparent;
	border-bottom: .45em solid transparent;
	border-left: .65em solid currentColor;
	flex: 0 0 auto;
}


/* 長い車種名 */

.gallery-brand-term:has(.gallery-brand-term__name) {
	width: auto;
	min-width: 9.5em;
}

.gallery-brand-term__name {
	white-space: nowrap;
}


/* ==================================================
   RESULT
================================================== */

.gallery-result {
	margin-top: 3.5em;
}

.gallery-result__brand {
	margin: 0 0 .8em;
	font-size: 3.4rem;
	font-family: var(--font-serif);
	font-weight: 400;
	line-height: 1.4;
}

.gallery-result__model {
	margin: 0 0 1em;
	font-family: var(--font-serif);
	font-size: 2.8rem;
	font-weight: 400;
	line-height: 1.4;
}


/* ==================================================
   GALLERY GRID
================================================== */

.gallery-result__grid {
	display: flex;
	flex-wrap: wrap;
	gap: 4em 2em;
}

.gallery-card {
	width: calc((100% - 4em) / 3);
}

.gallery-card__link {
	display: block;
	color: inherit;
	text-decoration: none;
}

.gallery-card__image {
	position: relative;
	width: 100%;
	overflow: hidden;
	background: #eee;
	aspect-ratio: 16 / 9;
}

.gallery-card__image img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform .4s ease;
}

.gallery-card__link:hover .gallery-card__image img {
	transform: scale(1.03);
}

.gallery-card__image > span {
	position: absolute;
	top: 50%;
	left: 50%;
	font-size: .75rem;
	transform: translate(-50%, -50%);
}

.gallery-card__info {
	margin-top: .8em;
}

.gallery-card__info p {
	margin: 0;
	line-height: 1.5;
}

.gallery-card__info span {
	font-weight: 400;
}

.gallery-result__empty {
	margin-top: 2em;
}


/* ==================================================
   PAGINATION
================================================== */

.gallery-result .navigation.pagination {
	margin-top: 5em;
}

.gallery-result .nav-links {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: .5em;
}

.gallery-result .page-numbers {
	display: flex;
	min-width: 2.5em;
	height: 2.5em;
	padding: 0 .7em;
	border: 1px solid #aaa;
	color: #222;
	font-size: .875rem;
	text-decoration: none;
	align-items: center;
	justify-content: center;
}

.gallery-result .page-numbers.current,
.gallery-result a.page-numbers:hover {
	background: #000;
	color: #fff;
	border-color: #000;
}

.gallery-card__link {
	display: block;
	width: 100%;
	margin: 0;
	padding: 0;
	border: 0;
	background: none;
	color: inherit;
	font-family: inherit;
	text-align: left;
	cursor: pointer;
}

.gallery-modal {
	position: fixed;
	z-index: 9999;
	inset: 0;
	display: flex;
	padding: 3em;
	opacity: 0;
	visibility: hidden;
	align-items: center;
	justify-content: center;
	transition:
		opacity .3s ease,
		visibility .3s ease;
}

.gallery-modal.is-open {
	opacity: 1;
	visibility: visible;
}

.gallery-modal__overlay {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, .75);
}

.gallery-modal__content {
	position: relative;
	z-index: 1;
	width: min(100%, 1140px);
	max-height: 90vh;
	padding: 2.5em;
	overflow-y: auto;
	background: #fff;
}

.gallery-modal__close {
	position: absolute;
	z-index: 2;
	top: 0.8em;
	right: 0.8em;
	width: 2.5rem;
	height: 2.5rem;
	padding: 0;
	border: 0;
	background: none;
	cursor: pointer;
}

.gallery-modal__close span {
	position: absolute;
	top: 50%;
	left: 50%;
	width: 1.8rem;
	height: 1px;
	background: #111;
}

.gallery-modal__close span:first-child {
	transform: translate(-50%, -50%) rotate(45deg);
}

.gallery-modal__close span:last-child {
	transform: translate(-50%, -50%) rotate(-45deg);
}

.gallery-modal__image img {
	display: block;
	width: 100%;
	height: auto;
}

.gallery-modal__info {
	margin-top: 1em;
}

.gallery-modal__info p {
	margin: 0;
	font-size: 1.4rem;
	line-height: 1.6;
}

body.is-gallery-modal-open {
	overflow: hidden;
}

@media screen and (max-width: 767px) {

	.gallery-modal {
		padding: 1em;
	}

	.gallery-modal__content {
		padding: 2.5em 1em 1.5em;
	}

}



/* ==================================================
   TABLET
================================================== */

@media screen and (max-width: 1024px) {

	.gallery-card {
		width: calc((100% - 2em) / 2);
	}

}


/* ==================================================
   SP
================================================== */

@media screen and (max-width: 767px) {

	.gallery-archive {
		padding-bottom: 5em;
	}

	.gallery-archive__inner {
		width: min(100% - 2em, 1200px);
	}

	.gallery-archive .lower-pagettl {
		margin-bottom: 2.5em;
	}

	.gallery-archive .lower-pagettl h1 {
		font-size: 1.75rem;
	}


	/* FILTER */

	.gallery-filter__form {
		flex-wrap: wrap;
		gap: .8em;
	}

	.gallery-filter__select-wrap {
		width: calc(50% - .4em);
	}

	.gallery-filter__submit {
		width: 7em;
	}


	/* BRAND */

	.gallery-brand-list {
		margin-top: 2.5em;
	}

	.gallery-brand-group + .gallery-brand-group {
		margin-top: 3em;
	}

	.gallery-brand-group__title {
		font-size: 1.5rem;
	}

	.gallery-brand-group__terms {
		gap: .8em;
	}

	.gallery-brand-term,
	.gallery-brand-term:has(.gallery-brand-term__name) {
		width: calc(50% - .4em);
		min-width: 0;
	}


	/* RESULT */

	.gallery-result {
		margin-top: 2.5em;
	}

	.gallery-result__brand {
		font-size: 1.5rem;
	}

	.gallery-result__model {
		font-size: 1.25rem;
	}


	/* CARDS */

	.gallery-result__grid {
		gap: 2.5em;
	}

	.gallery-card {
		width: 100%;
	}

}