/*--------------------------------------------------------------
Jumstore – product card stylesheet
Grid + carousel wrappers, card, badges, quick actions, price,
swatches, stock progress, list view.
--------------------------------------------------------------*/

/* Grids & carousel
--------------------------------------------------------------*/
.jum-product-grid {
	display: grid;
	gap: 16px;
}

.jum-product-grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.jum-product-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.jum-product-grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.jum-product-grid--5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.jum-product-grid--6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }

.jum-product-carousel > .jum-card {
	flex: 0 0 236px;
}

/* Card
--------------------------------------------------------------*/
.jum-card {
	position: relative;
	background: var(--jum-card);
	border: 1px solid var(--jum-border-soft);
	border-radius: var(--jum-radius-md);
	overflow: hidden;
	transition: box-shadow 0.22s ease, transform 0.22s ease, border-color 0.22s ease;
	display: flex;
	flex-direction: column;
}

.jum-card:hover {
	transform: translateY(-3px);
	border-color: transparent;
	box-shadow: var(--jum-shadow-lg);
}

.jum-card__media {
	position: relative;
	background: var(--jum-soft);
	aspect-ratio: 1 / 1;
	overflow: hidden;
}

.jum-card__media > a {
	display: flex;
	width: 100%;
	height: 100%;
	align-items: center;
	justify-content: center;
	padding: 16px;
	position: relative;
}

.jum-card__img {
	max-width: 100%;
	max-height: 100%;
	width: auto;
	height: auto;
	object-fit: contain;
	transition: transform 0.3s ease, opacity 0.3s ease;
}

.jum-card:hover .jum-card__img {
	transform: scale(1.05);
}

/* Hover image swap */
.jum-card__img--hover {
	position: absolute;
	inset: 16px;
	margin: auto;
	opacity: 0;
}

.jum-card:hover .jum-card__img--hover {
	opacity: 1;
}

.jum-card:hover .jum-card__media > a > .jum-card__img:first-child {
	opacity: 0;
}

.jum-card__media > a > .jum-card__img:only-child {
	opacity: 1 !important;
}

/* Badges */
.jum-badges {
	position: absolute;
	top: 12px;
	left: 12px;
	z-index: 3;
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 6px;
}

/* Quick actions */
.jum-card__actions {
	position: absolute;
	top: 12px;
	right: 12px;
	z-index: 3;
	display: flex;
	flex-direction: column;
	gap: 8px;
	opacity: 0;
	transform: translateX(8px);
	transition: opacity 0.2s ease, transform 0.2s ease;
}

.jum-card:hover .jum-card__actions,
.jum-card:focus-within .jum-card__actions {
	opacity: 1;
	transform: translateX(0);
}

.jum-card__action {
	width: 36px;
	height: 36px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: #fff;
	border-radius: 50%;
	box-shadow: var(--jum-shadow);
	color: var(--jum-text);
	transition: background-color 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.jum-card__action:hover {
	background: var(--jum-primary);
	color: #fff;
	transform: scale(1.08);
}

.jum-card__action .jum-icon {
	width: 17px;
	height: 17px;
}

.jum-card__action.is-active {
	background: var(--jum-red);
	color: #fff;
}

/* Slide-up CTA */
.jum-card__cta {
	position: absolute;
	left: 12px;
	right: 12px;
	bottom: 12px;
	z-index: 3;
	transform: translateY(140%);
	transition: transform 0.24s ease;
}

.jum-card:hover .jum-card__cta,
.jum-card:focus-within .jum-card__cta {
	transform: translateY(0);
}

.jum-card__cta .jum-btn {
	width: 100%;
	height: 42px;
	font-size: 13px;
}

/* Body */
.jum-card__body {
	display: flex;
	flex-direction: column;
	gap: 5px;
	padding: 13px 15px 17px;
}

.jum-card__cat {
	font-size: 12px;
	color: var(--jum-muted);
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.jum-card__title {
	margin: 0;
	font-size: 14.5px;
	font-weight: 600;
	line-height: 1.4;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	min-height: 2.8em;
}

.jum-card__title a:hover {
	color: var(--jum-primary);
}

.jum-card__rating {
	display: flex;
	align-items: center;
}

.jum-card__price {
	display: flex;
	align-items: baseline;
	gap: 9px;
	flex-wrap: wrap;
	font-size: 17px;
	font-weight: 800;
}

.jum-card__price ins {
	text-decoration: none;
	color: var(--jum-text);
}

.jum-card__price del {
	font-size: 13.5px;
	font-weight: 500;
	color: var(--jum-muted);
}

.jum-card__price del + ins,
.jum-card__price ins + del ~ ins {
	color: var(--jum-red);
}

.jum-card__price .amount {
	color: inherit;
}

/* Swatches */
.jum-swatches {
	display: flex;
	align-items: center;
	gap: 6px;
	margin-top: 2px;
}

.jum-swatches__dot {
	width: 16px;
	height: 16px;
	border-radius: 50%;
	border: 2px solid #fff;
	box-shadow: 0 0 0 1px var(--jum-border);
}

.jum-swatches__chip {
	font-size: 11px;
	font-weight: 600;
	color: var(--jum-muted);
	background: var(--jum-soft);
	border: 1px solid var(--jum-border-soft);
	border-radius: var(--jum-radius-pill);
	padding: 1px 8px;
}

/* Stock progress */
.jum-progress {
	margin-top: 6px;
}

.jum-progress__track {
	display: block;
	height: 7px;
	background: var(--jum-border-soft);
	border-radius: var(--jum-radius-pill);
	overflow: hidden;
}

.jum-progress__fill {
	display: block;
	height: 100%;
	background: linear-gradient(90deg, var(--jum-primary), var(--jum-red));
	border-radius: var(--jum-radius-pill);
}

.jum-progress__label {
	display: block;
	font-size: 11.5px;
	font-weight: 600;
	color: var(--jum-muted);
	margin-top: 5px;
}

/* List view
--------------------------------------------------------------*/
.jum-card--list {
	flex-direction: row;
	align-items: stretch;
}

.jum-card--list .jum-card__media {
	flex: 0 0 230px;
	aspect-ratio: auto;
	min-height: 230px;
}

.jum-card--list .jum-card__body {
	flex: 1;
	padding: 20px;
	gap: 8px;
}

.jum-card--list .jum-card__title {
	font-size: 17px;
	min-height: 0;
}

.jum-card--list .jum-card__excerpt {
	font-size: 13.5px;
	color: var(--jum-muted);
}

.jum-card__side {
	flex: 0 0 200px;
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 12px;
	padding: 20px;
	border-left: 1px solid var(--jum-border-soft);
}

.jum-card__side .jum-card__price {
	font-size: 19px;
}

.jum-card__side-actions .jum-card__actions {
	position: static;
	flex-direction: row;
	opacity: 1;
	transform: none;
}
