/* Lista želja: brojač u headeru, modal poslije dodavanja, stranica liste */

/* ---------- Brojač u headeru (broj upisuje JS plugina) ---------- */
.gsm-header__wishlist {
	position: relative;
}

.gsm-wishlist-count {
	display: none;
	position: absolute;
	top: -6px;
	left: 14px;
	min-width: 16px;
	height: 16px;
	padding: 0 4px;
	border-radius: 100px;
	background: var(--gsm-orange);
	color: var(--gsm-white);
	font-size: 11px;
	font-weight: 500;
	line-height: 16px;
	text-align: center;
	box-sizing: border-box;
}

.gsm-wishlist-count.wishlist-counter-with-products {
	display: block;
}

/* ---------- Modal ---------- */
/* TI modal: .tinv-modal je fixed preko cijelog ekrana, .tinv-cell centrira sadržaj vertikalno. */
.tinv-wishlist .gsm-wl-modal .tinv-overlay {
	background: var(--gsm-dark);
}

.tinv-wishlist .gsm-wl-modal.tinv-modal-open .tinv-overlay {
	opacity: .6;
}

.tinv-wishlist .gsm-wl-modal .tinv-modal-inner {
	width: calc(100% - 32px);
	max-width: 440px;
	padding: 28px;
	border-radius: 16px;
	background: var(--gsm-white);
	box-shadow: 0 24px 60px rgba(11, 17, 24, .25);
	font-family: var(--gsm-font);
	text-align: left;
	box-sizing: border-box;
	animation: gsm-wl-pop .2s ease-out;
}

@keyframes gsm-wl-pop {
	from {
		transform: translateY(8px) scale(.98);
		opacity: 0;
	}
}

.tinv-wishlist .gsm-wl-modal .gsm-wl-modal__x {
	position: absolute;
	top: 14px;
	right: 14px;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 34px;
	height: 34px;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: transparent;
	color: #6b7079;
	cursor: pointer;
	transition: background-color .2s, color .2s;
}

.tinv-wishlist .gsm-wl-modal .gsm-wl-modal__x:hover {
	background: var(--gsm-light);
	color: var(--gsm-text);
}

.gsm-wl-modal__x svg {
	width: 18px;
	height: 18px;
}

.tinv-wishlist .gsm-wl-modal .gsm-wl-modal__status {
	display: flex;
	align-items: center;
	gap: 10px;
	margin: 0 40px 20px 0;
	color: var(--gsm-text);
	font-family: var(--gsm-font-heading);
	font-size: 18px;
	font-weight: 700;
	line-height: 1.3;
}

.gsm-wl-modal__heart {
	display: flex;
	align-items: center;
	justify-content: center;
	flex: 0 0 36px;
	width: 36px;
	height: 36px;
	border-radius: 50%;
	background: #fff1e6;
	color: var(--gsm-orange);
}

.gsm-wl-modal__heart svg {
	width: 18px;
	height: 18px;
}

.gsm-wl-modal__product {
	display: flex;
	align-items: center;
	gap: 16px;
	padding: 14px;
	border: 1px solid #e9ebef;
	border-radius: 12px;
}

.gsm-wl-modal__thumb {
	flex: 0 0 72px;
	width: 72px;
	height: 72px;
	border-radius: 8px;
	background: var(--gsm-white);
	overflow: hidden;
}

/* TI daje svakoj slici u modalu display:block + margin-bottom 25px */
.tinv-wishlist .gsm-wl-modal .gsm-wl-modal__thumb img {
	width: 100%;
	height: 100%;
	margin: 0;
	object-fit: contain;
}

.tinv-wishlist .gsm-wl-modal .gsm-wl-modal__name {
	display: -webkit-box;
	margin: 0 0 4px;
	overflow: hidden;
	color: var(--gsm-text);
	font-size: 15px;
	font-weight: 600;
	line-height: 1.35;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
}

.tinv-wishlist .gsm-wl-modal .gsm-wl-modal__price {
	margin: 0;
	color: var(--gsm-text);
	font-size: 15px;
	font-weight: 700;
}

/* TI boji iznos u modalu zeleno; kao na kartici – narandžasto */
.tinv-wishlist .gsm-wl-modal .gsm-wl-modal__price .amount {
	color: var(--gsm-orange);
}

.gsm-wl-modal__price del {
	margin-right: 6px;
	color: #9aa0a9;
	font-weight: 400;
}

.gsm-wl-modal__price ins {
	text-decoration: none;
}

.tinv-wishlist .gsm-wl-modal .gsm-wl-modal__text {
	margin: 4px 40px 0 0;
	color: var(--gsm-text);
	font-size: 16px;
	font-weight: 600;
	line-height: 1.5;
}

.gsm-wl-modal__actions {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 10px;
	margin-top: 20px;
}

.gsm-wl-modal__actions .gsm-btn {
	min-width: 0;
	height: 48px;
}

.tinv-wishlist .gsm-wl-modal .gsm-wl-modal__ghost {
	height: 48px;
	margin: 0;
	padding: 0 16px;
	border: 1px solid #dfe2e7;
	border-radius: var(--gsm-radius);
	background: var(--gsm-white);
	color: var(--gsm-text);
	font-family: var(--gsm-font);
	font-size: 14px;
	font-weight: 600;
	letter-spacing: 0;
	text-transform: none;
	cursor: pointer;
	transition: border-color .2s, color .2s;
}

.tinv-wishlist .gsm-wl-modal .gsm-wl-modal__ghost:hover {
	border-color: var(--gsm-orange);
	background: var(--gsm-white);
	color: var(--gsm-orange);
}

/* Samo poruka bez dugmeta za listu: "Nastavi kupovinu" preko cijele širine */
.gsm-wl-modal__actions > :only-child {
	grid-column: 1 / -1;
}

@media (max-width: 480px) {
	.tinv-wishlist .gsm-wl-modal .tinv-modal-inner {
		padding: 22px 18px 18px;
	}

	.gsm-wl-modal__actions {
		grid-template-columns: minmax(0, 1fr);
	}
}

/* ---------- Stranica Lista želja ---------- */
.gsm-wl {
	padding: 24px 0 64px;
}

.gsm-wl__head {
	max-width: 720px;
	margin: 20px 0 24px;
}

.gsm-wl .gsm-wl__title {
	margin: 0 0 10px;
	color: var(--gsm-text);
	font-family: var(--gsm-font-heading);
	font-size: 36px;
	font-weight: 700;
	line-height: 44px;
	letter-spacing: 0;
	text-transform: none;
}

.gsm-wl .gsm-wl__title::after {
	content: '';
	display: block;
	width: 44px;
	height: 4px;
	margin-top: 8px;
	border-radius: 8px;
	background: var(--gsm-orange);
}

.gsm-wl__lead {
	margin: 0;
	color: #4a4f57;
	font-size: 16px;
	line-height: 1.6;
}

.gsm-wl__lead a {
	color: var(--gsm-orange);
	font-weight: 600;
}

.gsm-wl-list__bar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	margin-bottom: 14px;
}

.gsm-wl-list .gsm-wl-list__count {
	margin: 0;
	color: #6b7079;
	font-size: 14px;
	font-weight: 600;
}

/* Lista (ul.gsm-wl-items jer OceanWP stilizuje ul u .woocommerce) */
ul.gsm-wl-items {
	display: grid;
	gap: 12px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.gsm-wl-item {
	display: grid;
	grid-template-columns: 96px minmax(0, 1fr) 180px auto;
	align-items: center;
	gap: 24px;
	margin: 0;
	padding: 16px 20px 16px 16px;
	border: 1px solid #e9ebef;
	border-radius: 14px;
	background: var(--gsm-white);
	transition: border-color .2s, box-shadow .2s;
}

.gsm-wl-item:hover {
	border-color: #dcdfe4;
	box-shadow: 0 6px 20px rgba(11, 17, 24, .06);
}

.gsm-wl-item__thumb {
	display: block;
	width: 96px;
	height: 96px;
	border-radius: 10px;
	overflow: hidden;
}

.gsm-wl-item__thumb img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: contain;
}

.gsm-wl-item__info {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 4px;
	min-width: 0;
}

.gsm-wl-item__cat {
	color: #7a808a;
	font-size: 12px;
	font-weight: 500;
}

.gsm-wl-item__name {
	color: var(--gsm-text);
	font-size: 16px;
	font-weight: 600;
	line-height: 1.4;
	text-decoration: none;
}

.gsm-wl-item__name:hover {
	color: var(--gsm-orange);
}

.gsm-wl-item__info .variation {
	margin: 0;
	color: #6b7079;
	font-size: 13px;
}

.gsm-wl-item__stock {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	margin-top: 2px;
	color: #1f9d55;
	font-size: 13px;
	font-weight: 500;
}

.gsm-wl-item__stock::before {
	content: '';
	width: 7px;
	height: 7px;
	border-radius: 50%;
	background: currentColor;
}

.gsm-wl-item__stock.is-outofstock {
	color: #d93a3f;
}

.gsm-wl-item__stock.is-onbackorder {
	color: #c27800;
}

.gsm-wl-item__price {
	color: var(--gsm-text);
	font-size: 18px;
	font-weight: 700;
	text-align: right;
}

/* TI boji iznose zeleno; kao na kartici proizvoda – narandžasto */
.tinv-wishlist .gsm-wl-item__price .amount {
	color: var(--gsm-orange);
}

.tinv-wishlist .gsm-wl-item__price del .amount {
	color: #9aa0a9;
}

.gsm-wl-item__price del {
	display: block;
	color: #9aa0a9;
	font-size: 14px;
	font-weight: 400;
}

.gsm-wl-item__price ins {
	color: var(--gsm-orange);
	text-decoration: none;
}

.gsm-wl-item__price .gsm-price-request {
	color: #4a4f57;
	font-size: 15px;
	font-weight: 600;
}

.gsm-wl-item__actions {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	gap: 8px;
}

/* Dugmad (jak selektor: OceanWP/TI stilizuju button u .woocommerce i .tinv-wishlist) */
.gsm-wl-list .gsm-wl-item .gsm-wl-item__btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	min-width: 168px;
	height: 44px;
	margin: 0;
	padding: 0 18px;
	border: 1px solid var(--gsm-orange);
	border-radius: var(--gsm-radius);
	background: var(--gsm-orange);
	color: var(--gsm-white);
	font-family: var(--gsm-font);
	font-size: 14px;
	font-weight: 600;
	line-height: 1;
	letter-spacing: 0;
	text-transform: none;
	text-decoration: none;
	white-space: nowrap;
	cursor: pointer;
	box-sizing: border-box;
	transition: background-color .2s, border-color .2s, color .2s;
}

.gsm-wl-list .gsm-wl-item .gsm-wl-item__btn:hover {
	border-color: var(--gsm-orange-dark);
	background: var(--gsm-orange-dark);
	color: var(--gsm-white);
}

.gsm-wl-list .gsm-wl-item .gsm-wl-item__btn.is-outline {
	background: var(--gsm-white);
	color: var(--gsm-orange);
}

.gsm-wl-list .gsm-wl-item .gsm-wl-item__btn.is-outline:hover {
	background: #fff1e6;
	color: var(--gsm-orange-dark);
}

.gsm-wl-item__btn svg {
	width: 18px;
	height: 18px;
}

.gsm-wl-list .gsm-wl-item .gsm-wl-item__remove {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	margin: 0;
	padding: 0;
	border: 1px solid #e3e5e9;
	border-radius: var(--gsm-radius);
	background: var(--gsm-white);
	color: #6b7079;
	cursor: pointer;
	transition: border-color .2s, color .2s, background-color .2s;
}

.gsm-wl-list .gsm-wl-item .gsm-wl-item__remove:hover {
	border-color: #f3c4c6;
	background: #fdecec;
	color: #d93a3f;
}

.gsm-wl-item__remove svg {
	width: 18px;
	height: 18px;
}

/* Prazna lista: .gsm-empty u base.css */

/* Potvrda "dodato u korpu" (js/wishlist.js) */
.gsm-wl-toast {
	position: fixed;
	bottom: 24px;
	left: 50%;
	z-index: 9999;
	padding: 14px 20px;
	border-radius: 12px;
	background: var(--gsm-dark);
	color: var(--gsm-white);
	font-size: 14px;
	font-weight: 500;
	box-shadow: 0 12px 32px rgba(11, 17, 24, .3);
	transform: translate(-50%, 20px);
	opacity: 0;
	visibility: hidden;
	transition: opacity .2s, transform .2s, visibility .2s;
}

.gsm-wl-toast.is-visible {
	transform: translate(-50%, 0);
	opacity: 1;
	visibility: visible;
}

.gsm-wl-toast a {
	margin-left: 8px;
	color: var(--gsm-orange);
	font-weight: 700;
}

@media (max-width: 900px) {
	.gsm-wl-item {
		grid-template-columns: 88px minmax(0, 1fr);
		gap: 6px 16px;
		padding: 14px;
	}

	.gsm-wl-item__thumb {
		grid-row: 1 / span 2;
		width: 88px;
		height: 88px;
	}

	.gsm-wl-item__price {
		text-align: left;
	}

	.gsm-wl-item__actions {
		grid-column: 1 / -1;
		margin-top: 8px;
	}

	.gsm-wl-list .gsm-wl-item .gsm-wl-item__btn {
		flex: 1;
		min-width: 0;
	}
}

@media (max-width: 767px) {
	.gsm-wl {
		padding-top: 16px;
	}

	.gsm-wl .gsm-wl__title {
		font-size: 28px;
		line-height: 34px;
	}

	.gsm-wl__lead {
		font-size: 15px;
	}

	.gsm-wl-item__name {
		font-size: 15px;
	}

	.gsm-wl-item__price {
		font-size: 16px;
	}

	.gsm-wl-toast {
		right: 16px;
		left: 16px;
		transform: translateY(20px);
	}

	.gsm-wl-toast.is-visible {
		transform: none;
	}
}
