.crp-home-photo-modal {
	position: fixed;
	inset: 0;
	z-index: 99995;
}

.crp-home-photo-modal__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(5, 3, 10, 0.75);
	backdrop-filter: blur(2px);
}

.crp-home-photo-modal__dialog {
	position: relative;
	margin: 2vh auto;
	width: min(1240px, 96vw);
	max-height: 96vh;
	overflow: auto;
	border-radius: 16px;
	background: #130d1c;
	border: 1px solid rgba(255, 255, 255, 0.1);
}

.crp-home-photo-modal__topbar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 10px;
}

.crp-home-photo-modal__close,
.crp-home-photo-modal__back {
	border: 0;
	background: rgba(255, 255, 255, 0.08);
	color: #fff;
	border-radius: 9px;
	padding: 8px 10px;
	cursor: pointer;
}

.crp-home-photo-modal__all {
	padding: 0 12px 14px;
}

.crp-home-photo-modal__all-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(128px, 1fr));
	gap: 8px;
}

.crp-home-photo-modal__all-item {
	border: 1px solid rgba(255, 255, 255, 0.14);
	border-radius: 10px;
	padding: 0;
	background: transparent;
	cursor: pointer;
	overflow: hidden;
	aspect-ratio: 1 / 1;
}

.crp-home-photo-modal__all-item img,
.crp-home-photo-modal__all-video {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.crp-home-photo-modal__all-video {
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 11px;
	background: rgba(255, 255, 255, 0.08);
	color: rgba(255, 255, 255, 0.86);
	position: relative;
	overflow: hidden;
}

.crp-home-photo-modal__all-video img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.crp-home-photo-modal__all-video-label {
	position: absolute;
	left: 6px;
	bottom: 6px;
	padding: 1px 6px;
	border-radius: 999px;
	background: rgba(0, 0, 0, 0.6);
	color: #fff;
	font-size: 10px;
	font-weight: 700;
	letter-spacing: 0.03em;
}

.crp-home-photo-modal__all-item.is-active {
	border-color: var(--color-primary, #9b59b6);
	box-shadow: 0 0 0 3px rgba(155, 89, 182, 0.42);
}

.crp-home-photo-modal__detail {
	display: grid;
	grid-template-columns: minmax(0, 2fr) minmax(290px, 1fr);
	gap: 14px;
	padding: 0 12px 12px;
}

.crp-home-photo-modal__frame {
	background: rgba(255, 255, 255, 0.05);
	border-radius: 12px;
	overflow: hidden;
	min-height: 360px;
	display: flex;
	align-items: center;
	justify-content: center;
	position: relative;
}

.crp-home-photo-modal__media {
	width: 100%;
	height: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
}

.crp-home-photo-modal__media img,
.crp-home-photo-modal__media video {
	width: 100%;
	height: auto;
	max-height: 76vh;
	object-fit: contain;
	display: block;
}

.crp-home-photo-modal__nav {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	width: 42px;
	height: 42px;
	border-radius: 999px;
	border: 1px solid rgba(255, 255, 255, 0.24);
	background: rgba(10, 6, 16, 0.62);
	color: #fff;
	font-size: 28px;
	line-height: 1;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	z-index: 2;
}

.crp-home-photo-modal__nav:hover,
.crp-home-photo-modal__nav:focus-visible {
	background: rgba(10, 6, 16, 0.86);
	border-color: rgba(255, 255, 255, 0.42);
}

.crp-home-photo-modal__nav--prev {
	left: 12px;
}

.crp-home-photo-modal__nav--next {
	right: 12px;
}

.crp-home-photo-modal__meta {
	display: flex;
	flex-direction: column;
	gap: 10px;
	padding: 12px;
	background: rgba(255, 255, 255, 0.03);
	border: 1px solid rgba(255, 255, 255, 0.12);
	border-radius: 12px;
}

.crp-home-photo-modal__counter {
	color: rgba(255, 255, 255, 0.7);
	font-size: 12px;
	margin: 0;
}

.crp-home-photo-modal__product-card {
	display: grid;
	grid-template-columns: 84px minmax(0, 1fr);
	gap: 10px;
	align-items: center;
	padding: 10px;
	border: 1px solid rgba(255, 255, 255, 0.12);
	border-radius: 10px;
	background: rgba(255, 255, 255, 0.03);
}

.crp-home-photo-modal__product-thumb-link {
	display: block;
}

.crp-home-photo-modal__product-thumb {
	width: 84px;
	height: 84px;
	object-fit: cover;
	display: block;
	border-radius: 8px;
	background: rgba(255, 255, 255, 0.08);
}

.crp-home-photo-modal__product-info {
	min-width: 0;
	display: grid;
	gap: 4px;
}

.crp-home-photo-modal__product {
	color: var(--color-primary-light, #ffb7c0);
	font-weight: 700;
	text-decoration: none;
	font-size: 18px;
	line-height: 1.35;
}

.crp-home-photo-modal__price {
	margin: 0;
	font-size: 15px;
	font-weight: 700;
	color: rgba(255, 255, 255, 0.94);
}

.crp-home-photo-modal__stock {
	margin: 0;
	font-size: 12px;
	color: rgba(255, 255, 255, 0.72);
}

.crp-home-photo-modal__review-meta {
	margin: 0;
	font-size: 12px;
	color: rgba(255, 255, 255, 0.72);
}

.crp-home-photo-modal__rating {
	color: #ff9900;
	letter-spacing: 0.5px;
	font-weight: 700;
	margin: 0;
}

.crp-home-photo-modal__title {
	margin: 2px 0 0;
	font-size: 18px;
	line-height: 1.35;
	color: rgba(255, 255, 255, 0.96);
}

.crp-home-photo-modal__excerpt {
	margin: 0;
	color: rgba(255, 255, 255, 0.86);
	font-size: 14px;
	line-height: 1.5;
}

.crp-home-photo-modal__actions {
	display: flex;
	gap: 8px;
	flex-wrap: wrap;
	margin-top: auto;
}

.crp-home-photo-modal__actions .crp-load-more {
	min-width: 44px;
}

.crp-home-photo-modal__actions .crp-load-more.is-disabled {
	opacity: 0.75;
}

@media (max-width: 767px) {
	.crp-home-photo-modal__dialog {
		margin: 0;
		width: 100vw;
		max-height: 100vh;
		border-radius: 0;
	}

	.crp-home-photo-modal__detail {
		grid-template-columns: 1fr;
	}

	.crp-home-photo-modal__frame {
		min-height: 240px;
	}

	.crp-home-photo-modal__nav {
		width: 36px;
		height: 36px;
		font-size: 24px;
	}
}
