/* ==========================================================================
   Ninja — product card "C3" (woocommerce/content-product.php) + wishlist
   Navy frame cut at -14deg (bottom-right, 56px run on a 14px rise), white photo
   with a cut corner, sale badge, heart, brand / name / prices, then "Size" +
   "Add" side by side. The sizes open over the bottom of the photo.
   Behaviour: assets/js/cards.js.
   ========================================================================== */

ul.products li.product.nk-pc { display: flex; }
.nk-pc__frame {
	position: relative;
	display: flex;
	flex-direction: column;
	width: 100%;
	padding: 7px 7px 12px;
	background: var(--c-surface);
	border: 1px solid var(--c-line);
	clip-path: polygon(0 0, 100% 0, 100% calc(100% - 14px), calc(100% - 56px) 100%, 0 100%);
}

/* Photo */
.nk-pc__top { position: relative; }
.nk-pc__media {
	position: relative;
	display: block;
	aspect-ratio: 1;
	overflow: hidden;
	background: #fff;
	clip-path: polygon(0 0, 100% 0, 100% 80%, 80% 100%, 0 100%);
}
ul.products li.product .nk-pc__img,
.nk-pc__img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	margin: 0;
	padding: 9%;
	box-sizing: border-box;
	aspect-ratio: auto;
	background: none;
	object-fit: contain;
	mix-blend-mode: multiply;
	transition: opacity .35s, transform .45s var(--ease-katana);
}
.nk-pc__img--2 { opacity: 0; transform: translateX(10%); }
@media (hover: hover) and (pointer: fine) {
	.nk-pc__frame.has-alt:hover .nk-pc__img--2 { opacity: 1; transform: none; }
	.nk-pc__frame.has-alt:hover .nk-pc__img:not(.nk-pc__img--2) { opacity: 0; transform: translateX(-10%); }
}

.nk-pc__off {
	position: absolute;
	z-index: 2;
	top: 8px;
	left: 8px;
	padding: 5px 10px 5px 7px;
	background: var(--c-bg);
	color: var(--c-text);
	font: 600 11px/1 var(--f-display);
	letter-spacing: .06em;
	clip-path: polygon(0 0, 100% 0, calc(100% - 7px) 100%, 0 100%);
	pointer-events: none;
}
.nk-pc__off--out { background: var(--c-muted); color: var(--c-accent-ink); }

.nk-pc__wish {
	position: absolute;
	z-index: 3;
	top: 6px;
	right: 6px;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 38px;
	height: 38px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: rgba(255, 255, 255, .92);
	cursor: pointer;
}
.nk-pc__wish svg { width: 18px; height: 18px; fill: none; stroke: var(--c-accent-ink); stroke-width: 1.8; transition: fill .2s, stroke .2s, transform .3s var(--ease-out); }
.nk-pc__wish[aria-pressed="true"] svg { fill: var(--c-highlight); stroke: var(--c-highlight); transform: scale(1.12); }
.nk-pc__wish:focus-visible { outline: 2px solid var(--c-highlight); outline-offset: 2px; }

/* Sizes over the bottom of the photo */
.nk-pc__sizes {
	position: absolute;
	z-index: 4;
	left: 0;
	right: 0;
	bottom: 0;
	padding: 10px 8px;
	background: rgba(12, 9, 80, .95);
}
.nk-pc__sizes[hidden] { display: none; }
.nk-pc__sizes-label { margin: 0 0 6px; color: var(--c-muted); font: 600 9px/1.3 var(--f-body); letter-spacing: .16em; text-transform: uppercase; }
.nk-pc__sizes-list { display: flex; flex-wrap: wrap; gap: 4px; margin: 0; padding: 0; list-style: none; }
.nk-pc__sizes .nk-size {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 36px;
	height: 36px;
	padding: 0 5px;
	border: 1px solid var(--c-line);
	background: var(--c-surface-2);
	color: var(--c-text);
	font: 500 13px/1 var(--f-display);
	cursor: pointer;
}
.nk-pc__sizes .nk-size[aria-pressed="true"] { background: var(--c-accent); border-color: var(--c-accent); color: var(--c-accent-ink); }
.nk-pc__sizes .nk-size:focus-visible { outline: 2px solid var(--c-highlight); outline-offset: -3px; }

/* Text */
.nk-pc__body { display: flex; flex: 1; flex-direction: column; padding-top: 10px; }
.nk-pc__brand { margin: 0 0 2px; color: var(--c-highlight); font: 600 10px/1.3 var(--f-body); letter-spacing: .16em; text-transform: uppercase; }
ul.products li.product .nk-pc__name,
.nk-pc__name {
	display: -webkit-box;
	margin: 0 0 4px;
	padding: 0;
	overflow: hidden;
	font: 600 13px/1.3 var(--f-body);
	letter-spacing: 0;
	text-transform: none;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
}
.nk-pc__name a { color: var(--c-text); }
.nk-pc__name a:hover { color: var(--c-highlight); }
.nk-pc__price { margin: 0 0 8px; color: var(--c-text); font: 600 14px/1.3 var(--f-display); }
.nk-pc__price del { display: block; color: var(--c-muted); font-size: .8em; font-weight: 500; }
.nk-pc__price ins { color: var(--c-highlight); text-decoration: none; }
.nk-pc__price .screen-reader-text { position: absolute !important; }
.nk-pc__flag { display: block; margin: -4px 0 8px; color: var(--c-highlight); font: 700 10px/1.3 var(--f-body); letter-spacing: .08em; text-transform: uppercase; }
.nk-pc__msg { margin: 0 0 6px; color: #ff9aa8; font: 600 10px/1.3 var(--f-body); letter-spacing: .06em; }
.nk-pc__msg:empty { display: none; }

/* Buttons */
.nk-pc__ctl { display: flex; gap: 6px; margin-top: auto; }
.nk-pc__size {
	flex: 1;
	min-width: 0;
	min-height: 42px;
	padding: 0 6px;
	border: 1px solid var(--c-line);
	background: var(--c-surface-2);
	color: var(--c-text);
	font: 600 12px/1 var(--f-display);
	letter-spacing: .1em;
	text-transform: uppercase;
	white-space: nowrap;
	cursor: pointer;
	clip-path: polygon(0 0, 100% 0, 100% 70%, calc(100% - 10px) 100%, 0 100%);
}
.nk-pc__size[aria-expanded="true"] { border-color: var(--c-highlight); }
.nk-pc__size.is-picked { background: var(--c-accent); border-color: var(--c-accent); color: var(--c-accent-ink); }
.nk-pc__size.is-error { border-color: #ff9aa8; color: #ff9aa8; }
.nk-pc__add { flex: 1; min-width: 0; min-height: 42px; padding: 0 6px; font-size: 12px; }
.nk-pc__add--wide { flex: 1 1 100%; }
.nk-pc__add.is-done { background: var(--c-highlight); }
.nk-pc__add[aria-busy="true"] { opacity: .7; cursor: progress; }

@media (min-width: 768px) {
	.nk-pc__frame { padding: 9px 9px 16px; }
	ul.products li.product .nk-pc__name,
	.nk-pc__name { font-size: 15px; }
	.nk-pc__price { font-size: 16px; }
}
@media (prefers-reduced-motion: reduce) {
	.nk-pc__img,
	.nk-pc__wish svg { transition: none; }
}

/* Capsule heart count (same bubble as the bag count) + a short pulse */
.nk-wish-link { position: relative; }
.nk-wish-link.nk-pulse,
.cart-link.nk-pulse { animation: nk-wish-pulse .4s var(--ease-out); }
@keyframes nk-wish-pulse { 40% { transform: scale(1.15); } }

/* Wishlist page */
.nk-wishpage .page-header { margin-bottom: 24px; }
.nk-wish-empty { padding: 32px 0; color: var(--c-muted); }
.nk-wish-empty[hidden] { display: none; }
.nk-wish-empty .nk-btn-k { width: auto; display: inline-flex; padding: 0 40px; margin-top: 12px; }

/* Touch: the second photo after a first tap */
.nk-pc__frame.is-alt .nk-pc__img--2 { opacity: 1; transform: none; }
.nk-pc__frame.is-alt .nk-pc__img:not(.nk-pc__img--2) { opacity: 0; transform: translateX(-10%); }

/* The card inside homepage rails / grids */
.nk-tabs__card.nk-pc,
.nk-run__item.nk-pc { display: flex; }
/* Brand run on phones: the set of three stacks as rows — photo left, text and
   Size + Add right. The sizes open over the whole row. From 768px: 3 columns. */
@media (max-width: 767px) {
	.nk-run .nk-run__grid { grid-template-columns: minmax(0, 1fr); gap: 10px; }
	.nk-run .nk-run__grid .nk-pc__frame {
		display: grid;
		grid-template-columns: 42% minmax(0, 1fr);
		grid-template-rows: 1fr auto;
		column-gap: 12px;
		padding: 7px 7px 8px;
	}
	.nk-run .nk-run__grid .nk-pc__top { position: static; grid-row: 1 / 3; }
	.nk-run .nk-run__grid .nk-pc__body { grid-column: 2; padding: 4px 40px 0 0; }
	.nk-run .nk-run__grid .nk-pc__ctl { grid-column: 2; padding-right: 10px; }
	.nk-run .nk-run__grid .nk-pc__wish { top: 8px; right: 8px; width: 34px; height: 34px; }
	.nk-run .nk-run__grid .nk-pc__off { top: 12px; left: 12px; }
	.nk-run .nk-run__grid .nk-pc__name { font-size: 14px; }
	.nk-run .nk-run__grid .nk-pc__price { font-size: 15px; }
	.nk-run .nk-run__grid .nk-pc__price del { display: inline; margin-right: 6px; }
	.nk-run .nk-run__grid .nk-pc__sizes { padding: 12px 10px; }
}
