/* ==========================================================================
   Vedmax Quick Buy popup
   ========================================================================== */
.vm-qb { position: fixed; inset: 0; z-index: 99999; display: flex; align-items: center; justify-content: center; padding: 24px; }
.vm-qb[hidden] { display: none; }
.vm-qb__overlay {
	position: absolute; inset: 0; background: rgba(12, 40, 20, .55); backdrop-filter: blur(6px);
	opacity: 0; transition: opacity .28s;
}
.vm-qb__dialog {
	position: relative; width: min(1020px, 100%); max-height: calc(100vh - 48px);
	display: grid; grid-template-columns: 1fr 1.1fr; background: #fff; border-radius: 24px; overflow: hidden;
	box-shadow: 0 40px 80px -20px rgba(0,0,0,.45); outline: none;
	opacity: 0; transform: translateY(24px) scale(.97); transition: opacity .28s, transform .35s var(--vm-ease);
}
.vm-qb.is-open .vm-qb__overlay { opacity: 1; }
.vm-qb.is-open .vm-qb__dialog { opacity: 1; transform: none; }

.vm-qb__close {
	position: absolute; top: 14px; right: 14px; z-index: 3; width: 42px; height: 42px; border-radius: 50%;
	border: 0; background: #fff; color: var(--vm-ink); font-size: 26px; line-height: 1; cursor: pointer;
	box-shadow: 0 4px 14px rgba(0,0,0,.12); transition: transform .2s, background .2s; padding: 0;
}
.vm-qb__close:hover { transform: rotate(90deg); background: var(--vm-cream); }

/* Loader */
.vm-qb__loader { display: none; position: absolute; inset: 0; z-index: 2; background: rgba(255,255,255,.85); place-items: center; }
.vm-qb.is-loading .vm-qb__loader { display: grid; }
.vm-qb__loader span { width: 42px; height: 42px; border-radius: 50%; border: 4px solid var(--vm-green-soft); border-top-color: var(--vm-green); animation: vm-spin .8s linear infinite; }

/* Media column */
.vm-qb__media { background: var(--vm-cream); padding: 28px; display: flex; flex-direction: column; gap: 14px; overflow-y: auto; }
.vm-qb__main-img { flex: 1; display: grid; place-items: center; background: #fff; border-radius: 18px; padding: 16px; min-height: 280px; }
.vm-qb__main-img img { max-width: 100%; max-height: 420px; object-fit: contain; animation: vm-fade .35s; }
.vm-qb__thumbs { display: flex; gap: 10px; flex-wrap: wrap; }
.vm-qb__thumbs button { width: 64px; height: 64px; padding: 4px; border-radius: 12px; border: 2px solid transparent; background: #fff; cursor: pointer; transition: border-color .2s; }
.vm-qb__thumbs button.is-active, .vm-qb__thumbs button:hover { border-color: var(--vm-green); }
.vm-qb__thumbs img { width: 100%; height: 100%; object-fit: contain; }
.vm-qb__note { display: flex; gap: 10px; font-size: 13px; background: #fff; border: 1px solid var(--vm-line); border-radius: 14px; padding: 12px 14px; color: var(--vm-muted); }
.vm-qb__note strong { color: var(--vm-ink); }

/* Info column */
.vm-qb__info { padding: 34px 34px 28px; overflow-y: auto; }
.vm-qb__label { font-size: 12px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--vm-green); margin: 0 50px 8px 0; }
.vm-qb__title { font-family: var(--vm-font-head); font-size: clamp(24px, 2.6vw, 34px); line-height: 1.15; margin: 0 0 6px; color: var(--vm-green-dark); }
.vm-qb__tagline { font-style: italic; color: var(--vm-magenta); font-weight: 500; margin: 0 0 12px; }
.vm-qb__tagline:empty, .vm-qb__label:empty { display: none; }
.vm-qb__rating { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; font-size: 13px; color: var(--vm-muted); margin-bottom: 18px; }
.vm-star { background: #fff4dc; color: #a36a12; font-weight: 700; padding: 4px 10px; border-radius: 999px; }
.vm-qb__ayush { color: var(--vm-green); font-weight: 600; }

.vm-qb__price-card {
	display: flex; justify-content: space-between; align-items: center; gap: 16px;
	border: 1.5px solid var(--vm-line); border-radius: 18px; padding: 18px 20px; background: linear-gradient(180deg, #fff, var(--vm-cream));
}
.vm-qb__prices { display: flex; align-items: baseline; flex-wrap: wrap; gap: 10px; }
.vm-qb__price { font-size: 30px; font-weight: 700; color: var(--vm-ink); display: inline-block; }
.vm-qb__price.vm-pop { animation: vm-pop .3s var(--vm-ease); }
.vm-qb__regular { color: var(--vm-muted); font-size: 16px; }
.vm-qb__save { background: var(--vm-magenta); color: #fff; font-size: 12px; font-weight: 600; padding: 5px 10px; border-radius: 999px; }
.vm-qb__ship { margin: 6px 0 0; font-size: 13px; color: var(--vm-muted); }

/* Quantity stepper */
.vm-qty { display: inline-flex; align-items: center; border: 1.5px solid var(--vm-line); border-radius: 999px; background: #fff; flex: none; }
.vm-qty__btn { width: 42px; height: 46px; border: 0; background: none; font-size: 20px; cursor: pointer; color: var(--vm-green-dark); padding: 0; border-radius: 999px; transition: background .2s; }
.vm-qty__btn:hover:not(:disabled) { background: var(--vm-green-soft); }
.vm-qty__btn:disabled { opacity: .35; cursor: not-allowed; }
.vm-qty__input { width: 40px; border: 0 !important; text-align: center; font-weight: 600; font-size: 16px; background: none !important; padding: 0 !important; box-shadow: none !important; -moz-appearance: textfield; }
.vm-qty__input::-webkit-outer-spin-button, .vm-qty__input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

.vm-qb__actions { display: grid; grid-template-columns: 1fr 1.4fr; gap: 12px; margin-top: 18px; }
.vm-qb__actions .vm-btn { width: 100%; min-height: 54px; position: relative; }
.vm-qb__msg { min-height: 20px; margin: 8px 0 0; font-size: 14px; font-weight: 500; }
.vm-qb__msg.is-success { color: var(--vm-green); }
.vm-qb__msg.is-error { color: #c0392b; }
.vm-qb__msg.is-info { color: var(--vm-gold); }

.vm-qb__pay { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 12px; color: var(--vm-muted); margin: 6px 0 20px; }
.vm-qb__pay > span:first-child { margin-right: 4px; }
.vm-pay-chip { border: 1px solid var(--vm-line); border-radius: 6px; padding: 3px 8px; font-weight: 600; font-size: 11px; color: var(--vm-ink); background: #fff; }

.vm-qb__tabs { display: flex; gap: 22px; border-bottom: 1px solid var(--vm-line); margin-bottom: 14px; }
.vm-qb__tabs button {
	background: none; border: 0; padding: 10px 0; font: 500 14px var(--vm-font-body); color: var(--vm-muted);
	cursor: pointer; position: relative; border-radius: 0;
}
.vm-qb__tabs button.is-active { color: var(--vm-green-dark); font-weight: 600; }
.vm-qb__tabs button.is-active::after { content: ''; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--vm-green); }
.vm-qb__panel { display: none; font-size: 14px; color: var(--vm-ink); animation: vm-fade .3s; }
.vm-qb__panel.is-active { display: block; }
.vm-qb__panel ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.vm-qb__panel li { position: relative; padding-left: 22px; }
.vm-qb__panel li::before { content: ''; position: absolute; left: 4px; top: .55em; width: 8px; height: 8px; border-radius: 50%; background: var(--vm-green); }
.vm-qb__details { display: inline-block; margin-top: 16px; font-size: 14px; font-weight: 600; }

@keyframes vm-fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes vm-pop { 50% { transform: scale(1.08); } }

/* Mobile: bottom sheet */
@media (max-width: 768px) {
	.vm-qb { padding: 0; align-items: flex-end; }
	.vm-qb__dialog {
		grid-template-columns: 1fr; max-height: 92vh; border-radius: 24px 24px 0 0; overflow-y: auto;
		transform: translateY(100%);
	}
	.vm-qb__dialog::before { content: ''; position: sticky; top: 8px; display: block; width: 44px; height: 5px; border-radius: 9px; background: var(--vm-line); margin: 8px auto -13px; z-index: 4; grid-column: 1; }
	.vm-qb__media, .vm-qb__info { overflow: visible; }
	.vm-qb__media { padding: 22px 18px 12px; }
	.vm-qb__main-img { min-height: 200px; }
	.vm-qb__main-img img { max-height: 240px; }
	.vm-qb__info { padding: 8px 18px calc(24px + env(safe-area-inset-bottom)); }
	.vm-qb__price-card { padding: 14px; }
	.vm-qb__price { font-size: 24px; }
	.vm-qb__actions { position: sticky; bottom: 0; background: #fff; padding: 10px 0; margin-top: 10px; z-index: 2; }
	.vm-qb__note { display: none; }
}
