/* Product page: "Product information" / "Customer photos" tabs and the photo grid (Views/Product/_ProductDescription.cshtml) */

.xpt {
	clear: both;
	margin: 30px 0 0;
	text-align: left;
	scroll-margin-top: 80px; /* a link with #fotky scrolls here: keep the tabs clear of the pinned cart */
}
.xpt-tabs {
	display: flex;
	flex-wrap: nowrap;
	gap: 32px;
	margin: 0 0 24px;
	border-bottom: 1px solid #e2e2e2;
}
.xpt-tab {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	flex: 0 1 auto;
	margin: 0 0 -1px;
	padding: 12px 2px 11px;
	border: 0;
	border-bottom: 3px solid transparent;
	border-radius: 0;
	background: none;
	font-family: inherit;
	font-size: 16px;
	font-weight: 700;
	line-height: 1.3;
	color: #666;
	text-align: center;
	white-space: nowrap;
	cursor: pointer;
	transition: color .15s ease, border-color .15s ease;
}
.xpt-tab:hover {
	color: #222;
	border-bottom-color: #d6d6d6;
}
.xpt-tab.xpt-active {
	color: #222;
	border-bottom-color: #b61d22;
}
.xpt-tab:focus {
	outline: none;
}
.xpt-tab:focus-visible {
	outline: 2px solid #b61d22;
	outline-offset: 2px;
}
.xpt-count {
	display: inline-block;
	min-width: 22px;
	padding: 2px 7px;
	border-radius: 11px;
	background: #ececec;
	font-size: 12px;
	font-weight: 700;
	line-height: 16px;
	color: #444;
	transition: background-color .15s ease, color .15s ease;
}
.xpt-tab.xpt-active .xpt-count {
	background: #b61d22;
	color: #fff;
}
.xpt-panel[hidden] {
	display: none !important;
}
.xpt .full-description {
	margin-top: 0;
}

/* grid of square, equally cropped thumbnails: 2 per row on phones, 3 on tablets, 5 in the full-width desktop column (min. 200px) */
.xcp-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
	gap: 14px;
	margin: 0;
	padding: 0;
	list-style: none;
}
.xcp-cell {
	margin: 0;
	padding: 0;
	list-style: none;
}
.xcp-item {
	position: relative;
	display: block;
	overflow: hidden;
	border-radius: 10px;
	background: #f2f2f2;
	box-shadow: 0 1px 3px rgba(0, 0, 0, .1);
	transition: box-shadow .2s ease;
}
.xcp-item:before {
	content: "";
	display: block;
	padding-top: 100%; /* square, also where aspect-ratio is not supported */
}
.xcp-item img {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	max-width: none;
	object-fit: cover;
	transition: transform .35s ease;
}
.xcp-item:after {
	content: "";
	position: absolute;
	right: 8px;
	bottom: 8px;
	width: 32px;
	height: 32px;
	border-radius: 50%;
	background: rgba(255, 255, 255, .92) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23b61d22' stroke-width='2.2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='6.5'/%3E%3Cpath d='M16 16l4.5 4.5M8.5 11h5M11 8.5v5'/%3E%3C/svg%3E") center / 18px no-repeat;
	box-shadow: 0 1px 4px rgba(0, 0, 0, .2);
	opacity: 0;
	transform: scale(.85);
	transition: opacity .2s ease, transform .2s ease;
}
.xcp-item:hover,
.xcp-item:focus-visible {
	box-shadow: 0 6px 18px rgba(0, 0, 0, .18);
}
.xcp-item:hover img,
.xcp-item:focus-visible img {
	transform: scale(1.05);
}
.xcp-item:hover:after,
.xcp-item:focus-visible:after {
	opacity: 1;
	transform: scale(1);
}
.xcp-item:focus {
	outline: none;
}
.xcp-item:focus-visible {
	outline: 3px solid #b61d22;
	outline-offset: 2px;
}

@media (max-width: 600px) {
	.xpt {
		margin-top: 24px;
	}
	.xpt-tabs {
		gap: 0;
		margin-bottom: 16px;
	}
	.xpt-tab {
		flex: 1 1 50%;
		gap: 6px;
		padding: 12px 6px 11px;
		font-size: 15px;
		white-space: normal;
	}
	.xcp-grid {
		grid-template-columns: repeat(2, 1fr);
		gap: 10px;
	}
	.xcp-item {
		border-radius: 8px;
	}
	/* touch screens: no hover, the magnifier stays visible as the hint that the photo opens */
	.xcp-item:after {
		opacity: 1;
		transform: none;
		width: 28px;
		height: 28px;
		background-size: 16px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.xpt-tab,
	.xpt-count,
	.xcp-item,
	.xcp-item img,
	.xcp-item:after {
		transition: none;
	}
}

/* product without customer photos: a short note in the tab */
.xcp-empty {
	margin: 0;
	padding: 28px 16px;
	border: 1px dashed #d6d6d6;
	border-radius: 10px;
	background: #fafafa;
	font-size: 15px;
	color: #666;
	text-align: center;
}
