/* Product card: image slider, discount tag, polish. Added-to-cart modal. */

/* Card ---------------------------------------------------------------- */
.zk-card { transition: box-shadow .25s, transform .25s, border-color .25s; }
.zk-card:hover { transform: translateY(-3px); }
.zk-card--flat:hover { transform: none; }

/* Image fills the top of the card edge to edge: pull it over the card padding. */
.zk-card { overflow: hidden; --zk-card-pad: 26px; }
.zk-card__media {
	position: relative; overflow: hidden; border-radius: 0; background: #fff;
	height: auto !important; aspect-ratio: 1 / 1;
	margin: calc(-1 * var(--zk-card-pad)) calc(-1 * var(--zk-card-pad)) 18px !important;
}
.zk-card__media img { object-fit: cover !important; }
/* Badges that used to sit above the image now float on it. */
.zk-card__top {
	position: absolute; z-index: 3; top: 12px; right: 12px; left: 12px;
	min-height: 0; pointer-events: none;
}
.zk-card__top > * { pointer-events: auto; }
.zk-card__rating { flex-direction: row; padding: 2px 8px; border-radius: 8px; background: rgba(255, 255, 255, .92); }
.zk-card__out { background: rgba(255, 255, 255, .92); }
.zk-card__media img,
.zk-card__media .zk-card__img { border: 0 !important; border-radius: 0 !important; box-shadow: none !important; }
.zk-card__media--slides .zk-card__img {
	position: absolute; inset: 0;
	opacity: 0; transform: none;
	transition: opacity .45s ease;
}
.zk-card__media--slides .zk-card__img.is-active { opacity: 1; }
.zk-card:hover .zk-card__media--slides .zk-card__img { transform: none; }

.zk-card__dots {
	position: absolute; bottom: 4px; left: 50%; transform: translateX(-50%);
	display: flex; gap: 4px; pointer-events: none;
}
.zk-card__dots i {
	display: block; width: 5px; height: 5px; border-radius: 999px;
	background: rgba(25, 36, 53, .18); transition: width .3s, background .3s;
}
.zk-card__dots i.is-active { width: 14px; background: var(--zk-primary); }

.zk-card__off {
	position: absolute; bottom: 10px; left: 10px;
	padding: 2px 8px; border-radius: 8px;
	background: var(--zk-primary); color: #fff;
	font-size: .78rem; font-weight: 800; line-height: 1.7;
}
/* The tag on the image replaces the small one next to the old price. */
.zk-card__was .zk-badge { display: none; }

.zk-card__title { margin-bottom: 8px !important; font-size: .84rem !important; line-height: 1.75 !important; min-height: 3.5em !important; }
.zk-card__title a, .zk-card__title a:hover, .zk-card__title a:focus { text-decoration: none !important; transition: color .2s; }

/* Specs ticker: one attribute at a time, each slides up from below. */
.zk-card__specs { position: relative; height: 1.9em; margin: 0 0 12px; padding: 0; overflow: hidden; list-style: none; font-size: .76rem; line-height: 1.9; color: var(--zk-muted, #667085); }
.zk-card__specs li {
	position: absolute; inset: 0; margin: 0;
	white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
	transform: translateY(100%); opacity: 0;
	transition: transform .5s ease, opacity .5s ease;
}
.zk-card__specs li.is-active { transform: none; opacity: 1; }
.zk-card__specs li.is-leaving { transform: translateY(-100%); opacity: 0; }
.zk-card__specs li span { color: var(--zk-ink-2, #344054); font-weight: 700; }
.zk-card__add.button { transition: background .2s, transform .15s; }
.zk-card__add.button:active { transform: scale(.94); }

/* Modal ----------------------------------------------------------------- */
.zk-cm { position: fixed; inset: 0; z-index: 9999; display: flex; align-items: center; justify-content: center; padding: 16px; }
.zk-cm[hidden] { display: none; }
.zk-cm__backdrop { position: absolute; inset: 0; background: rgba(16, 24, 40, .5); opacity: 0; transition: opacity .2s; }
.zk-cm__panel {
	position: relative; width: 100%; max-width: 520px; max-height: min(640px, calc(100vh - 32px));
	display: flex; flex-direction: column;
	background: #fff; border-radius: var(--zk-radius, 20px);
	box-shadow: 0 24px 64px rgba(16, 24, 40, .22);
	opacity: 0; transform: translateY(12px) scale(.98); transition: opacity .2s, transform .2s;
}
.zk-cm.is-open .zk-cm__backdrop { opacity: 1; }
.zk-cm.is-open .zk-cm__panel { opacity: 1; transform: none; }

.zk-cm__head { display: flex; align-items: center; gap: 10px; padding: 18px 20px 14px; border-bottom: 1px solid var(--zk-line, #f2f4f7); }
.zk-cm__check { display: grid; place-items: center; width: 30px; height: 30px; flex: none; border-radius: 999px; background: var(--zk-ok, #12b76a); color: #fff; }
.zk-cm__title { flex: 1; margin: 0; font-size: 1.02rem; font-weight: 800; color: var(--zk-ink, #192435); }
.zk-cm__x { display: grid; place-items: center; width: 36px; height: 36px; padding: 0; border: 0; border-radius: 10px; background: var(--zk-bg, #f7f8fa); color: var(--zk-muted, #667085); cursor: pointer; }
.zk-cm__x:hover { color: var(--zk-ink, #192435); }
.zk-cm__x .zk-ico { width: 18px; height: 18px; }

.zk-cm__body { flex: 1; overflow-y: auto; padding: 6px 20px; overscroll-behavior: contain; }
.zk-cm__list { margin: 0; padding: 0; list-style: none; }
.zk-cm__item { display: grid; grid-template-columns: 56px 1fr auto; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--zk-line, #f2f4f7); }
.zk-cm__item:last-child { border-bottom: 0; }
.zk-cm__item.is-new { margin: 0 -10px; padding: 12px 10px; border-radius: 12px; background: var(--zk-primary-soft, #fff1f3); border-bottom-color: transparent; }
.zk-cm__thumb { display: block; width: 56px; height: 56px; background: #fff; }
.zk-cm__thumb img { width: 100%; height: 100%; object-fit: contain; border-radius: 0; }
.zk-cm__info { min-width: 0; }
.zk-cm a.zk-cm__name, .zk-cm a.zk-cm__name:hover { color: var(--zk-ink-2, #344054); }
.zk-cm__name { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; color: var(--zk-ink-2, #344054); font-size: .86rem; font-weight: 700; line-height: 1.7; }
.zk-cm__meta { display: flex; align-items: center; gap: 8px; color: var(--zk-muted, #667085); font-size: .78rem; }
.zk-cm__meta b { padding: 0 7px; border-radius: 6px; background: var(--zk-primary, #ed1944); color: #fff; font-size: .7rem; font-weight: 800; line-height: 1.7; }
.zk-cm__price { display: flex; flex-direction: column; align-items: flex-end; white-space: nowrap; }
.zk-cm__price del { color: var(--zk-muted, #667085); font-size: .76rem; }
.zk-cm__price strong { color: var(--zk-ink, #192435); font-size: .95rem; font-weight: 800; }

.zk-cm__foot { padding: 14px 20px 18px; border-top: 1px solid var(--zk-line, #f2f4f7); }
.zk-cm__sum:empty { display: none; }
.zk-cm__sum { margin-bottom: 14px; }
.zk-cm__row { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: .9rem; color: var(--zk-ink-2, #344054); }
.zk-cm__row + .zk-cm__row { margin-top: 8px; }
.zk-cm__row strong { font-size: 1.05rem; font-weight: 800; color: var(--zk-ink, #192435); }
.zk-cm__row small { color: var(--zk-muted, #667085); font-size: .72rem; font-weight: 700; }
.zk-cm__row--save { padding: 8px 12px; border-radius: 12px; background: #ecfdf3; color: #067647; font-weight: 700; }
.zk-cm__row--save strong, .zk-cm__row--save small { color: #067647; }

.zk-cm__actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.zk-cm__btn {
	display: flex; align-items: center; justify-content: center; height: 46px; padding: 0 14px;
	border: 1px solid var(--zk-primary, #ed1944); border-radius: 12px;
	background: #fff; color: var(--zk-primary, #ed1944);
	font: inherit; font-size: .9rem; font-weight: 800; text-decoration: none; cursor: pointer;
}
.zk-cm__btn:hover { background: var(--zk-primary-soft, #fff1f3); color: var(--zk-primary, #ed1944); }
.zk-cm__btn--primary { background: var(--zk-primary, #ed1944); color: #fff; }
.zk-cm__btn--primary:hover { background: var(--zk-primary-2, #d0103a); color: #fff; }
.zk-cm__btn--ghost { grid-column: 1 / -1; height: 40px; border-color: transparent; color: var(--zk-muted, #667085); }
.zk-cm__btn--ghost:hover { background: var(--zk-bg, #f7f8fa); color: var(--zk-ink, #192435); }

.zk-cm__loading { height: 120px; background: linear-gradient(90deg, var(--zk-bg, #f7f8fa) 25%, #fff 50%, var(--zk-bg, #f7f8fa) 75%); background-size: 200% 100%; border-radius: 12px; margin: 12px 0; animation: zk-cm-shine 1.2s infinite linear; }
@keyframes zk-cm-shine { to { background-position: -200% 0; } }
.zk-cm__err { margin: 18px 0; color: var(--zk-muted, #667085); font-size: .9rem; }

@media (max-width: 767px) {
	.zk-card { --zk-card-pad: 16px; }
	.zk-card__title { font-size: .78rem !important; margin-bottom: 6px !important; }
	.zk-card__specs { font-size: .7rem; margin-bottom: 8px; }
	.zk-card__media { margin-bottom: 12px !important; }
	.zk-card__top { top: 8px; right: 8px; left: 8px; }
	.zk-card__off { bottom: 8px; left: 8px; }
	.zk-cm { align-items: flex-end; padding: 0; }
	.zk-cm__panel { max-width: none; max-height: 85vh; border-radius: 20px 20px 0 0; transform: translateY(40px); }
	.zk-cm__head, .zk-cm__body, .zk-cm__foot { padding-right: 16px; padding-left: 16px; }
	.zk-cm__foot { padding-bottom: calc(16px + env(safe-area-inset-bottom)); }
}

@media (prefers-reduced-motion: reduce) {
	.zk-card, .zk-card__media--slides .zk-card__img, .zk-cm__panel, .zk-cm__backdrop { transition: none; }
	.zk-card:hover { transform: none; }
}
