/* Quick View for OpenCart 3.0.x - RTL/LTR safe (logical properties), theme independent */
:root {
	--qv-primary: #e6396f;
	--qv-on-primary: #ffffff;
	--qv-text: #222;
	--qv-muted: #6b7280;
	--qv-border: #e5e7eb;
	--qv-radius: 12px;
	--qv-sbw: 0px;
}

/* ---------- button on product cards ---------- */
.qv-host { position: relative; }

.qv-btn {
	-webkit-appearance: none;
	appearance: none;
	box-sizing: border-box;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: .45em;
	margin: 0;
	border: 0;
	cursor: pointer;
	font: inherit;
	font-size: 13px;
	font-weight: 600;
	line-height: 1;
	text-decoration: none;
	white-space: nowrap;
	color: var(--qv-on-primary);
	background: var(--qv-primary);
	z-index: 5;
	opacity: 0;
	visibility: hidden;
	transition: opacity .2s ease, transform .2s ease, visibility .2s ease, filter .2s ease;
}
.qv-btn:hover { filter: brightness(.92); color: var(--qv-on-primary); }
.qv-btn svg { display: block; }
.qv-host:hover > .qv-btn,
.qv-btn:focus-visible { opacity: 1; visibility: visible; }

.qv-pos-center {
	position: absolute;
	top: 50%;
	left: 50%;
	padding: .8em 1.3em;
	border-radius: 999px;
	transform: translate(-50%, -40%);
}
.qv-host:hover > .qv-pos-center,
.qv-pos-center:focus-visible { transform: translate(-50%, -50%); }

.qv-pos-bottom {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	padding: .95em 1em;
	border-radius: 0;
	transform: translateY(100%);
}
.qv-host:hover > .qv-pos-bottom,
.qv-pos-bottom:focus-visible { transform: translateY(0); }

.qv-pos-corner {
	position: absolute;
	top: 10px;
	inset-inline-end: 10px;
	width: 38px;
	height: 38px;
	padding: 0;
	border-radius: 50%;
	transform: scale(.8);
	box-shadow: 0 2px 8px rgba(0, 0, 0, .25);
}
.qv-host:hover > .qv-pos-corner,
.qv-pos-corner:focus-visible { transform: scale(1); }
.qv-pos-corner .qv-btn-text {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
}

/* touch screens have no hover: keep the button visible */
@media (hover: none) {
	.qv-btn { opacity: 1; visibility: visible; }
	.qv-pos-center { top: auto; bottom: 10px; transform: translateX(-50%); padding: .65em 1.1em; }
	.qv-pos-bottom { transform: none; }
	.qv-pos-corner { transform: none; }
}

/* ---------- modal ---------- */
html.qv-lock { overflow: hidden; }
html.qv-lock body { padding-inline-end: var(--qv-sbw); }

.qv-overlay {
	position: fixed;
	inset: 0;
	z-index: 2147483000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
	box-sizing: border-box;
	background: rgba(15, 23, 42, .6);
	opacity: 0;
	transition: opacity .2s ease;
}
.qv-overlay[hidden] { display: none !important; }
.qv-overlay.is-open { opacity: 1; }

.qv-dialog {
	position: relative;
	box-sizing: border-box;
	width: 100%;
	max-width: 980px;
	max-height: 100%;
	overflow-y: auto;
	-webkit-overflow-scrolling: touch;
	background: #fff;
	color: var(--qv-text);
	border-radius: var(--qv-radius);
	box-shadow: 0 20px 60px rgba(0, 0, 0, .35);
	text-align: start;
	outline: 0;
	transform: translateY(16px) scale(.98);
	transition: transform .2s ease;
}
.qv-overlay.is-open .qv-dialog { transform: none; }

.qv-dialog *, .qv-dialog *::before, .qv-dialog *::after { box-sizing: border-box; }
.qv-dialog a { color: var(--qv-primary); }

.qv-close {
	position: absolute;
	top: 10px;
	inset-inline-end: 10px;
	z-index: 3;
	width: 38px;
	height: 38px;
	padding: 0;
	margin: 0;
	border: 0;
	border-radius: 50%;
	background: rgba(255, 255, 255, .95);
	box-shadow: 0 1px 6px rgba(0, 0, 0, .2);
	color: #111;
	font-size: 26px;
	line-height: 36px;
	cursor: pointer;
}
.qv-close:hover { background: #f3f4f6; }

.qv-loading, .qv-load-error { display: flex; align-items: center; justify-content: center; min-height: 260px; padding: 40px 24px; text-align: center; }
.qv-load-error { color: #b91c1c; font-size: 15px; }
.qv-spinner {
	width: 38px;
	height: 38px;
	border: 4px solid var(--qv-border);
	border-top-color: var(--qv-primary);
	border-radius: 50%;
	animation: qv-spin .8s linear infinite;
}
.qv-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
@keyframes qv-spin { to { transform: rotate(360deg); } }

/* ---------- product content ---------- */
.qv-grid {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
	gap: 32px;
	padding: 28px;
}

.qv-main {
	display: flex;
	align-items: center;
	justify-content: center;
	border: 1px solid var(--qv-border);
	border-radius: 10px;
	overflow: hidden;
	background: #fff;
}
.qv-main-img { display: block; max-width: 100%; height: auto; }

.qv-thumbs { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.qv-thumb {
	padding: 2px;
	margin: 0;
	border: 2px solid var(--qv-border);
	border-radius: 8px;
	background: #fff;
	cursor: pointer;
	line-height: 0;
}
.qv-thumb img { display: block; max-width: 100%; height: auto; border-radius: 5px; }
.qv-thumb.is-active, .qv-thumb:hover { border-color: var(--qv-primary); }

.qv-title { margin: 0 44px 10px 0; font-size: 24px; line-height: 1.3; font-weight: 700; color: var(--qv-text); }
[dir="rtl"] .qv-title { margin: 0 0 10px 44px; }

.qv-rating { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; font-size: 13px; }
.qv-stars { letter-spacing: 2px; font-size: 17px; line-height: 1; }
.qv-star { color: #d1d5db; }
.qv-star.is-on { color: #f59e0b; }

.qv-price { margin-bottom: 14px; }
.qv-price-new { font-size: 28px; font-weight: 700; color: var(--qv-text); }
.qv-price-old { margin-inline-start: 10px; font-size: 18px; color: var(--qv-muted); text-decoration: line-through; }
.qv-tax { margin-top: 2px; font-size: 13px; color: var(--qv-muted); }
.qv-discounts { margin: 8px 0 0; padding: 0; list-style: none; font-size: 13px; color: var(--qv-muted); }

.qv-meta { margin: 0 0 12px; padding: 0; list-style: none; font-size: 14px; }
.qv-meta li { margin: 3px 0; }
.qv-meta span { color: var(--qv-muted); }
.qv-in { color: #15803d; }
.qv-out { color: #b91c1c; }

.qv-desc { margin: 0 0 16px; font-size: 14px; line-height: 1.7; color: #4b5563; }

.qv-option { margin-bottom: 14px; }
.qv-label { display: block; margin-bottom: 6px; font-size: 14px; font-weight: 600; }
.qv-required > .qv-label::after { content: " *"; color: #dc2626; }
.qv-select, .qv-input {
	display: block;
	width: 100%;
	min-height: 42px;
	padding: 8px 12px;
	border: 1px solid #d1d5db;
	border-radius: 8px;
	background: #fff;
	color: var(--qv-text);
	font: inherit;
	font-size: 14px;
}
.qv-select:focus, .qv-input:focus, .qv-qty:focus { outline: 2px solid var(--qv-primary); outline-offset: 0; border-color: var(--qv-primary); }
.qv-choices { display: flex; flex-wrap: wrap; gap: 8px; }
.qv-choice {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	margin: 0;
	padding: 7px 12px;
	border: 1px solid #d1d5db;
	border-radius: 8px;
	font-size: 14px;
	font-weight: 400;
	cursor: pointer;
}
.qv-choice:hover { border-color: var(--qv-primary); }
.qv-choice img { display: block; width: 32px; height: 32px; object-fit: cover; border-radius: 4px; }
.qv-choice input { margin: 0; }
.qv-option.has-error .qv-select, .qv-option.has-error .qv-input, .qv-option.has-error .qv-choice { border-color: #dc2626; }
.qv-error { margin-top: 5px; font-size: 13px; color: #dc2626; }
.qv-error:empty { display: none; }

.qv-message { margin: 0 0 14px; padding: 11px 14px; border-radius: 8px; font-size: 14px; line-height: 1.5; }
.qv-message:empty { display: none; }
.qv-message.is-success { background: #ecfdf5; color: #065f46; border: 1px solid #a7f3d0; }
.qv-message.is-error { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }
.qv-message a { font-weight: 600; text-decoration: underline; }

.qv-note { margin: 0 0 10px; font-size: 13px; color: var(--qv-muted); }

.qv-actions { display: flex; flex-wrap: wrap; align-items: stretch; gap: 10px; }
.qv-stepper { display: inline-flex; align-items: stretch; border: 1px solid #d1d5db; border-radius: 8px; overflow: hidden; }
.qv-step {
	width: 38px;
	margin: 0;
	padding: 0;
	border: 0;
	background: #f9fafb;
	color: var(--qv-text);
	font-size: 20px;
	line-height: 1;
	cursor: pointer;
}
.qv-step:hover { background: #f3f4f6; }
.qv-qty {
	width: 54px;
	min-height: 44px;
	margin: 0;
	padding: 0 4px;
	border: 0;
	border-inline: 1px solid #d1d5db;
	border-radius: 0;
	text-align: center;
	font: inherit;
	font-size: 15px;
	-moz-appearance: textfield;
	appearance: textfield;
	background: #fff;
	color: var(--qv-text);
}
.qv-qty::-webkit-outer-spin-button, .qv-qty::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

.qv-add {
	flex: 1 1 150px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 44px;
	margin: 0;
	padding: 0 22px;
	border: 0;
	border-radius: 8px;
	background: var(--qv-primary);
	color: var(--qv-on-primary);
	font: inherit;
	font-size: 15px;
	font-weight: 700;
	text-decoration: none;
	cursor: pointer;
	transition: filter .15s ease;
}
.qv-dialog a.qv-add { color: var(--qv-on-primary); }
.qv-add:hover { filter: brightness(.92); }
.qv-add:disabled { opacity: .7; cursor: wait; }
.qv-add.is-busy::after {
	content: "";
	width: 16px;
	height: 16px;
	margin-inline-start: 10px;
	border: 2px solid currentColor;
	border-top-color: transparent;
	border-radius: 50%;
	animation: qv-spin .7s linear infinite;
}

.qv-icon-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	min-height: 44px;
	margin: 0;
	padding: 0;
	border: 1px solid #d1d5db;
	border-radius: 8px;
	background: #fff;
	color: var(--qv-text);
	cursor: pointer;
}
.qv-icon-btn:hover { border-color: var(--qv-primary); color: var(--qv-primary); }

.qv-details { display: inline-block; margin-top: 16px; font-size: 14px; font-weight: 600; text-decoration: underline; }

/* ---------- notification ---------- */
.qv-toast {
	position: fixed;
	z-index: 2147483001;
	inset-inline-end: 20px;
	top: 20px;
	max-width: min(380px, calc(100vw - 40px));
	padding: 14px 18px;
	border-radius: 10px;
	background: #ecfdf5;
	border: 1px solid #a7f3d0;
	color: #065f46;
	font-size: 14px;
	line-height: 1.5;
	box-shadow: 0 8px 30px rgba(0, 0, 0, .2);
	opacity: 0;
	transform: translateY(-10px);
	transition: opacity .25s ease, transform .25s ease;
}
.qv-toast.is-visible { opacity: 1; transform: none; }
.qv-toast a { color: inherit; font-weight: 600; text-decoration: underline; }

/* ---------- small screens ---------- */
@media (max-width: 767px) {
	.qv-overlay { padding: 0; align-items: flex-end; }
	.qv-dialog { max-width: none; max-height: 94vh; border-radius: 16px 16px 0 0; }
	.qv-grid { grid-template-columns: minmax(0, 1fr); gap: 18px; padding: 18px; }
	.qv-title { font-size: 20px; }
	.qv-price-new { font-size: 24px; }
	.qv-toast { inset-inline: 12px; max-width: none; top: 12px; }
}

@media (prefers-reduced-motion: reduce) {
	.qv-btn, .qv-overlay, .qv-dialog, .qv-toast { transition: none; }
	.qv-spinner, .qv-add.is-busy::after { animation-duration: 2s; }
}
