/**
 * Product Quick View frontend styles.
 *
 * Location: /assets/css/frontend/product/quick-view.css
 *
 * @package SunTechPortal
 */

.stp-quick-view-shell,
.stp-quick-view-shell *,
.stp-quick-view-shell *::before,
.stp-quick-view-shell *::after {
	box-sizing: border-box;
}

html.stp-quick-view-open,
html.stp-quick-view-open body {
	overflow: hidden;
}

.stp-quick-view-shell[hidden] {
	display: none !important;
}

.stp-quick-view-shell {
	position: fixed;
	inset: 0;
	z-index: 1000000;
	display: grid;
	place-items: center;
	padding: 18px;
	color: #111827;
	font-size: 14px;
	line-height: 1.55;
}

.stp-quick-view-shell__overlay {
	position: absolute;
	inset: 0;
	background: rgba(15, 23, 42, 0.62);
	backdrop-filter: blur(3px);
}

.stp-quick-view-shell__dialog {
	position: relative;
	z-index: 1;
	width: min(900px, 94vw);
	max-height: min(600px, 88vh);
	overflow: hidden;
	background: #fff;
	border: 1px solid #e5e7eb;
	border-radius: 16px;
	box-shadow: 0 22px 58px rgba(15, 23, 42, 0.22);
}

.stp-quick-view-shell__close {
	position: absolute;
	top: 12px;
	right: 12px;
	z-index: 5;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 34px;
	height: 34px;
	margin: 0;
	padding: 0;
	color: #111827;
	background: #fff;
	border: 1px solid #e5e7eb;
	border-radius: 999px;
	font-size: 22px;
	font-weight: 700;
	line-height: 1;
	cursor: pointer;
}

.stp-quick-view-shell__close:hover,
.stp-quick-view-shell__close:focus {
	color: #fff;
	background: #ff5a00;
	border-color: #ff5a00;
	outline: none;
}

.stp-quick-view-shell__body {
	max-height: min(600px, 88vh);
	overflow: auto;
}

.stp-quick-view-shell.is-loading .stp-quick-view-shell__body {
	min-height: 260px;
}

.stp-quick-view-shell__loader,
.stp-quick-view-shell__error {
	display: grid;
	place-items: center;
	min-height: 260px;
	padding: 34px;
	color: #6b7280;
	font-weight: 800;
	text-align: center;
}

.stp-quick-view-shell__error {
	color: #b91c1c;
}

.stp-quick-view {
	display: grid;
	grid-template-columns: minmax(300px, 0.95fr) minmax(340px, 1.05fr);
	gap: 0;
	min-height: 420px;
}

.stp-quick-view__media {
	position: relative;
	display: grid;
	align-content: start;
	gap: 10px;
	padding: 28px 20px 18px;
	background: #fff;
	border-right: 1px solid #e5e7eb;
}

.stp-quick-view__back {
	position: absolute;
	top: 12px;
	left: 14px;
	z-index: 4;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 32px;
	padding: 7px 11px;
	color: #111827;
	background: #fff;
	border: 1px solid #e5e7eb;
	border-radius: 8px;
	font-size: 13px;
	font-weight: 800;
	line-height: 1;
	text-decoration: none;
	box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08);
}

.stp-quick-view__back:hover,
.stp-quick-view__back:focus {
	color: #ff5a00;
	border-color: #ff5a00;
	outline: none;
}

.stp-quick-view__image {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	aspect-ratio: 1 / 0.98;
	min-height: 300px;
	overflow: hidden;
	background: #fff;
	border: 1px solid #e5e7eb;
	border-radius: 12px;
}

.stp-quick-view__image img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: contain;
}

.stp-quick-view__placeholder {
	color: #6b7280;
	font-weight: 900;
	text-transform: uppercase;
	letter-spacing: 0.06em;
}

.stp-quick-view__thumbs {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	align-items: center;
}

.stp-quick-view__thumb {
	display: block;
	width: 58px;
	height: 58px;
	margin: 0;
	padding: 0;
	overflow: hidden;
	background: #fff;
	border: 1px solid #e5e7eb;
	border-radius: 8px;
	cursor: pointer;
}

.stp-quick-view__thumb:hover,
.stp-quick-view__thumb:focus,
.stp-quick-view__thumb.is-active {
	border-color: #ff5a00;
	outline: none;
}

.stp-quick-view__thumb img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: contain;
}

.stp-quick-view__content {
	display: grid;
	gap: 11px;
	align-content: start;
	padding: 36px 28px 24px;
}

.stp-quick-view__category {
	margin: 0;
	color: #4b5563;
	font-size: 12px;
	font-weight: 750;
	line-height: 1.3;
	text-transform: uppercase;
	letter-spacing: 0.04em;
}

.stp-quick-view__title {
	margin: 0;
	color: #111827;
	font-size: clamp(22px, 2.2vw, 29px);
	font-weight: 950;
	line-height: 1.12;
	letter-spacing: -0.035em;
}

.stp-quick-view__rating {
	display: flex;
	gap: 8px;
	align-items: center;
	color: #6b7280;
	font-size: 13px;
	font-weight: 750;
}

.stp-qv-stars {
	color: #ff5a00;
	letter-spacing: 1px;
}

.stp-quick-view__price {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	align-items: baseline;
	color: #111827;
	font-size: 28px;
	font-weight: 950;
	line-height: 1.1;
}

.stp-qv-price-regular {
	color: #6b7280;
	font-size: 16px;
	font-weight: 700;
	text-decoration-thickness: 2px;
}

.stp-quick-view__stock {
	display: flex;
	align-items: center;
	width: 100%;
	min-height: 36px;
	padding: 7px 13px;
	color: #166534;
	background: #ecfdf5;
	border: 1px solid #86efac;
	border-radius: 999px;
	font-size: 14px;
	font-weight: 900;
	line-height: 1.2;
}

.stp-quick-view__stock::before {
	margin-right: 8px;
	font-size: 16px;
	line-height: 1;
	content: "✓";
}

.stp-quick-view__stock--outofstock {
	color: #991b1b;
	background: #fef2f2;
	border-color: #fecaca;
}

.stp-quick-view__stock--outofstock::before {
	content: "!";
}

.stp-quick-view__excerpt {
	max-width: 540px;
	color: #374151;
	font-size: 14px;
	line-height: 1.7;
}

.stp-quick-view__excerpt p {
	margin: 0 0 9px;
}

.stp-quick-view__excerpt p:last-child {
	margin-bottom: 0;
}

.stp-quick-view__meta {
	color: #6b7280;
	font-size: 12px;
	font-weight: 750;
}

.stp-quick-view__meta strong {
	color: #111827;
	font-weight: 950;
}

.stp-quick-view__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	align-items: center;
	justify-content: flex-start;
	margin-top: 3px;
}

.stp-quick-view__qty {
	width: 70px;
	height: 46px;
	min-height: 46px;
	margin: 0;
	padding: 0 8px;
	color: #111827;
	background: #fff;
	border: 1px solid #d1d5db;
	border-radius: 8px;
	box-shadow: none;
	font-size: 15px;
	font-weight: 900;
	line-height: 1;
	text-align: center;
}

.stp-quick-view__button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	min-width: 118px;
	min-height: 46px;
	margin: 0;
	padding: 10px 15px;
	border-radius: 8px;
	font-size: 13px;
	font-weight: 950;
	line-height: 1.2;
	text-align: center;
	text-decoration: none;
	white-space: nowrap;
	cursor: pointer;
}

.stp-quick-view__button--cart {
	color: #fff;
	background: #ff5a00;
	border: 1px solid #ff5a00;
}

.stp-quick-view__button--cart:hover,
.stp-quick-view__button--cart:focus {
	color: #fff;
	background: #c2410c;
	border-color: #c2410c;
	outline: none;
}

.stp-quick-view__button--whatsapp {
	color: #fff;
	background: #16a34a;
	border: 1px solid #16a34a;
}

.stp-quick-view__button--whatsapp:hover,
.stp-quick-view__button--whatsapp:focus {
	color: #fff;
	background: #0f8a37;
	border-color: #0f8a37;
	outline: none;
}

.stp-quick-view__button--whatsapp img {
	display: block;
	width: 18px;
	height: 18px;
	object-fit: contain;
	filter: brightness(0) invert(1);
}

.stp-quick-view__button--view {
	color: #111827;
	background: #fff;
	border: 1px solid #d1d5db;
}

.stp-quick-view__button--view:hover,
.stp-quick-view__button--view:focus {
	color: #c2410c;
	border-color: #ff5a00;
	outline: none;
}

@media screen and (max-width: 820px) {
	.stp-quick-view-shell {
		padding: 12px;
	}

	.stp-quick-view-shell--sheet {
		place-items: end center;
	}

	.stp-quick-view-shell--sheet .stp-quick-view-shell__dialog {
		width: 100%;
		max-height: 88vh;
		border-radius: 18px 18px 0 0;
	}

	.stp-quick-view {
		grid-template-columns: 1fr;
	}

	.stp-quick-view__media {
		padding: 34px 16px 16px;
		border-right: 0;
		border-bottom: 1px solid #e5e7eb;
	}

	.stp-quick-view__image {
		min-height: 250px;
	}

	.stp-quick-view__content {
		padding: 22px 18px 20px;
	}
}

@media screen and (max-width: 620px) {
	.stp-quick-view__actions {
		display: grid;
		grid-template-columns: 70px minmax(0, 1fr);
	}

	.stp-quick-view__button {
		min-width: 0;
	}

	.stp-quick-view__button--whatsapp,
	.stp-quick-view__button--view {
		grid-column: 1 / -1;
	}
}
