/**
 * Selectors are deliberately doubled up (.ggd-shop .ggd-shop__x) — Hello
 * Elementor's global h1-h6 and control styles outrank single-class rules and
 * were blowing out type and tiling the icon backgrounds.
 */

.ggd-shop {
	--s-blue: var(--e-global-color-primary, #1D4ED8);
	--s-navy: var(--e-global-color-secondary, #1E3A8A);
	--s-tint: var(--e-global-color-be216fc, #EFF6FF);
	--s-ink: var(--e-global-color-text, #0F172A);
	--s-muted: var(--e-global-color-55d9783, #475569);
	--s-faint: var(--e-global-color-79860d8, #94A3B8);
	--s-white: var(--e-global-color-fba0803, #FFFFFF);
	--s-paper: var(--e-global-color-ced7ef0, #F8FAFC);
	--s-line: var(--e-global-color-2da9a21, #1E40AF2E);
	--s-line-soft: var(--e-global-color-ca37f13, #1E40AF1A);

	display: grid;
	grid-template-columns: 236px minmax(0, 1fr);
	gap: 2.5rem;
	align-items: start;

	/* Sits flat on the page. Colours are still set explicitly on every element
	   so nothing inherits from the theme. */
	color: var(--s-ink);
}

.ggd-shop *,
.ggd-shop *::before,
.ggd-shop *::after {
	box-sizing: border-box;
}

.ggd-shop__filtertoggle {
	display: none;
}

/* ---- sidebar ---- */

.ggd-shop .ggd-shop__group {
	padding-bottom: 1.1rem;
	margin-bottom: 1.1rem;
	border-bottom: 1px solid var(--s-line-soft);
}

.ggd-shop .ggd-shop__group:last-of-type {
	padding-bottom: 0;
	border-bottom: 0;
}

.ggd-shop h4.ggd-shop__grouptitle {
	margin: 0 0 0.6rem;
	font-family: inherit;
	font-size: 11px;
	font-weight: 500;
	line-height: 1.4;
	color: var(--s-faint);
	text-transform: uppercase;
	letter-spacing: 0.09em;
}

.ggd-shop .ggd-shop__check {
	display: flex;
	gap: 0.55rem;
	align-items: center;
	padding: 0.28rem 0;
	font-size: 14px;
	line-height: 1.4;
	color: var(--s-muted);
	cursor: pointer;
}

.ggd-shop .ggd-shop__check input {
	flex: 0 0 auto;
	width: 16px;
	height: 16px;
	margin: 0;
	accent-color: var(--s-blue);
	cursor: pointer;
}

.ggd-shop .ggd-shop__check:hover span {
	color: var(--s-ink);
}

.ggd-shop .ggd-shop__check em {
	margin-left: auto;
	font-size: 12px;
	font-style: normal;
	color: var(--s-faint);
	font-variant-numeric: tabular-nums;
}

.ggd-shop .ggd-shop__check.is-empty {
	opacity: 0.35;
}

.ggd-shop__price-inputs {
	display: flex;
	gap: 0.4rem;
	align-items: center;
}

.ggd-shop .ggd-shop__num {
	width: 100%;
	min-width: 0;
	height: 36px;
	padding: 0 0.55rem;
	font-family: inherit;
	font-size: 13px;
	color: var(--s-ink);
	background: var(--s-white);
	border: 1px solid var(--s-line);
	border-radius: 8px;
}

.ggd-shop .ggd-shop__num:focus {
	border-color: var(--s-blue);
	outline: none;
	box-shadow: 0 0 0 3px var(--s-tint);
}

.ggd-shop__dash {
	color: var(--s-faint);
}

.ggd-shop .ggd-shop__reset {
	width: 100%;
	padding: 0.55rem;
	margin-top: 1.1rem;
	font-family: inherit;
	font-size: 13px;
	font-weight: 500;
	color: var(--s-blue);
	cursor: pointer;
	background: var(--s-tint);
	border: 1px solid var(--s-line-soft);
	border-radius: 8px;
}

.ggd-shop .ggd-shop__reset:hover {
	background: var(--s-white);
	border-color: var(--s-line);
}

/* ---- toolbar ---- */

.ggd-shop__toolbar {
	display: flex;
	flex-wrap: wrap;
	gap: 0.85rem;
	align-items: center;
	justify-content: space-between;
	padding-bottom: 0.9rem;
	margin-bottom: 1.4rem;
	border-bottom: 1px solid var(--s-line-soft);
}

.ggd-shop p.ggd-shop__count {
	margin: 0;
	font-size: 13px;
	line-height: 1.4;
	color: var(--s-muted);
}

.ggd-shop__controls {
	display: flex;
	gap: 0.6rem;
	align-items: center;
}

.ggd-shop .ggd-shop__sort {
	height: 40px;
	padding: 0 2.1rem 0 0.8rem;
	font-family: inherit;
	font-size: 13px;
	color: var(--s-ink);
	cursor: pointer;
	background-color: var(--s-white);
	background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23475569' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 0.65rem center;
	background-size: 15px 15px;
	border: 1px solid var(--s-line);
	border-radius: 9px;
	appearance: none;
}

.ggd-shop__views {
	display: flex;
	gap: 3px;
	padding: 3px;
	background: var(--s-paper);
	border: 1px solid var(--s-line-soft);
	border-radius: 9px;
}

.ggd-shop .ggd-shop__views .ggd-shop__view {
	width: 32px;
	height: 32px;
	padding: 0;
	cursor: pointer;
	background-color: transparent;
	background-repeat: no-repeat;
	background-position: center center;
	background-size: 16px 16px;
	border: 0;
	border-radius: 7px;
	transition: background-color 0.15s ease;
}

.ggd-shop .ggd-shop__views .ggd-shop__view[data-view="grid"] {
	background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23475569' stroke-width='2'%3E%3Crect x='3' y='3' width='7' height='7' rx='1.5'/%3E%3Crect x='14' y='3' width='7' height='7' rx='1.5'/%3E%3Crect x='3' y='14' width='7' height='7' rx='1.5'/%3E%3Crect x='14' y='14' width='7' height='7' rx='1.5'/%3E%3C/svg%3E");
}

.ggd-shop .ggd-shop__views .ggd-shop__view[data-view="list"] {
	background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23475569' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M4 6h16M4 12h16M4 18h16'/%3E%3C/svg%3E");
}

.ggd-shop .ggd-shop__views .ggd-shop__view:hover {
	background-color: var(--s-white);
}

.ggd-shop .ggd-shop__views .ggd-shop__view.is-active {
	background-color: var(--s-blue);
}

.ggd-shop .ggd-shop__views .ggd-shop__view.is-active[data-view="grid"] {
	background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23FFFFFF' stroke-width='2'%3E%3Crect x='3' y='3' width='7' height='7' rx='1.5'/%3E%3Crect x='14' y='3' width='7' height='7' rx='1.5'/%3E%3Crect x='3' y='14' width='7' height='7' rx='1.5'/%3E%3Crect x='14' y='14' width='7' height='7' rx='1.5'/%3E%3C/svg%3E");
}

.ggd-shop .ggd-shop__views .ggd-shop__view.is-active[data-view="list"] {
	background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23FFFFFF' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M4 6h16M4 12h16M4 18h16'/%3E%3C/svg%3E");
}

/* ---- grid + cards ---- */

.ggd-shop__grid {
	display: grid;
	gap: 1rem;
}

.ggd-shop__grid.is-grid {
	grid-template-columns: repeat(auto-fill, minmax(215px, 1fr));
}

.ggd-shop__grid.is-list {
	grid-template-columns: 1fr;
}

.ggd-shop .ggd-shop__card {
	display: flex;
	flex-direction: column;
	overflow: hidden;
	background: var(--s-white);
	border: 1px solid var(--s-line-soft);
	border-radius: 12px;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.ggd-shop .ggd-shop__card:hover {
	border-color: var(--s-line);
	box-shadow: 0 4px 16px rgba(15, 23, 42, 0.07);
}

.ggd-shop .ggd-shop__media {
	display: block;
	padding: 0.9rem;
	background: var(--s-paper);
}

.ggd-shop .ggd-shop__media img {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 1;
	mix-blend-mode: multiply;
	object-fit: contain;
}

.ggd-shop__body {
	display: flex;
	flex: 1;
	flex-direction: column;
	gap: 0.3rem;
	align-items: flex-start;
	padding: 0.85rem 0.9rem 0.9rem;
}

.ggd-shop .ggd-shop__cat {
	font-size: 10px;
	font-weight: 500;
	line-height: 1.4;
	color: var(--s-faint);
	text-transform: uppercase;
	letter-spacing: 0.08em;
}

.ggd-shop h3.ggd-shop__name {
	margin: 0;
	font-family: inherit;
	font-size: 14px;
	font-weight: 500;
	line-height: 1.4;
	letter-spacing: 0;
}

.ggd-shop h3.ggd-shop__name a {
	color: var(--s-ink);
	text-decoration: none;
}

.ggd-shop h3.ggd-shop__name a:hover {
	color: var(--s-blue);
}

.ggd-shop .ggd-shop__price {
	display: flex;
	gap: 0.4rem;
	align-items: baseline;
	margin-top: 0.1rem;
	font-size: 15px;
	font-weight: 500;
	color: var(--s-ink);
}

.ggd-shop .ggd-shop__was {
	font-size: 13px;
	font-weight: 400;
	color: var(--s-faint);
	text-decoration: line-through;
}

.ggd-shop .ggd-shop__add {
	width: 100%;
	margin-top: 0.7rem;
	padding: 0.55rem 1rem;
	font-family: inherit;
	font-size: 13px;
	font-weight: 500;
	line-height: 1.4;
	color: var(--s-white);
	text-align: center;
	cursor: pointer;
	background: var(--s-blue);
	border: 0;
	border-radius: 8px;
	transition: background-color 0.15s ease;
}

.ggd-shop .ggd-shop__add:hover {
	background: var(--s-navy);
}

.ggd-shop .ggd-shop__add.is-loading {
	opacity: 0.6;
}

.ggd-shop .ggd-shop__add.is-done {
	background: #15803D;
}

.ggd-shop .ggd-shop__oos {
	margin-top: 0.7rem;
	padding: 0.55rem 0;
	font-size: 12px;
	color: var(--s-faint);
}

/* list view */

.ggd-shop__grid.is-list .ggd-shop__card {
	display: grid;
	grid-template-columns: 130px minmax(0, 1fr) auto;
	gap: 1.25rem;
	align-items: center;
	padding-right: 1.25rem;
}

.ggd-shop__grid.is-list .ggd-shop__media {
	padding: 0.6rem;
}

.ggd-shop__grid.is-list .ggd-shop__body {
	flex-direction: column;
	gap: 0.25rem;
	padding: 1rem 0;
}

.ggd-shop__grid.is-list h3.ggd-shop__name {
	font-size: 16px;
}

.ggd-shop__grid.is-list .ggd-shop__add {
	width: auto;
	margin-top: 0.5rem;
	padding: 0.55rem 1.4rem;
}

/* ---- empty + pager ---- */

.ggd-shop .ggd-shop__none {
	padding: 3.5rem 1rem;
	font-size: 14px;
	color: var(--s-muted);
	text-align: center;
}

.ggd-shop .ggd-shop__link {
	font: inherit;
	color: var(--s-blue);
	text-decoration: underline;
	cursor: pointer;
	background: none;
	border: 0;
}

.ggd-shop__pager {
	display: flex;
	flex-wrap: wrap;
	gap: 0.35rem;
	justify-content: center;
	margin-top: 1.75rem;
}

.ggd-shop .ggd-shop__page {
	min-width: 38px;
	height: 38px;
	padding: 0 0.7rem;
	font-family: inherit;
	font-size: 13px;
	color: var(--s-ink);
	cursor: pointer;
	background: var(--s-white);
	border: 1px solid var(--s-line-soft);
	border-radius: 8px;
	transition: background-color 0.15s ease, border-color 0.15s ease;
}

.ggd-shop .ggd-shop__page:hover {
	background: var(--s-tint);
	border-color: var(--s-line);
}

.ggd-shop .ggd-shop__page.is-active {
	font-weight: 500;
	color: var(--s-white);
	background: var(--s-blue);
	border-color: var(--s-blue);
}

.ggd-shop__gap {
	align-self: center;
	padding: 0 0.15rem;
	color: var(--s-faint);
}

/* ---- cart drawer ---- */

.ggd-cart {
	position: fixed;
	inset: 0;
	z-index: 99998;
	visibility: hidden;
	background: rgba(15, 23, 42, 0.5);
	opacity: 0;
	transition: opacity 0.2s ease, visibility 0.2s ease;
}

.ggd-cart.is-open {
	visibility: visible;
	opacity: 1;
}

.ggd-cart__panel {
	position: absolute;
	top: 0;
	right: 0;
	bottom: 0;
	display: flex;
	flex-direction: column;
	width: min(400px, 100%);
	color: var(--e-global-color-text, #0F172A);
	background: var(--e-global-color-fba0803, #FFFFFF);
	transform: translateX(100%);
	transition: transform 0.25s ease;
}

.ggd-cart.is-open .ggd-cart__panel {
	transform: translateX(0);
}

.ggd-cart__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 1.1rem 1.25rem;
	font-size: 15px;
	border-bottom: 1px solid var(--e-global-color-ca37f13, #1E40AF1A);
}

.ggd-cart__close {
	width: 32px;
	height: 32px;
	padding: 0;
	cursor: pointer;
	background-color: var(--e-global-color-ced7ef0, #F8FAFC);
	background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23475569' stroke-width='2.25' stroke-linecap='round'%3E%3Cpath d='M6 6l12 12M18 6L6 18'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: center center;
	background-size: 15px 15px;
	border: 0;
	border-radius: 8px;
}

.ggd-cart__body {
	flex: 1;
	padding: 1.25rem;
	overflow-y: auto;
}

@media (max-width: 900px) {
	.ggd-shop {
		grid-template-columns: 1fr;
		gap: 1rem;
	}

	.ggd-shop .ggd-shop__filtertoggle {
		display: block;
		width: 100%;
		padding: 0.75rem;
		font-family: inherit;
		font-size: 14px;
		font-weight: 500;
		color: var(--s-ink);
		cursor: pointer;
		background: var(--s-paper);
		border: 1px solid var(--s-line);
		border-radius: 9px;
	}

	.ggd-shop__filterbody {
		display: none;
		padding-top: 1.1rem;
	}

	.ggd-shop__filterbody.is-open {
		display: block;
	}

	.ggd-shop__grid.is-list .ggd-shop__card {
		grid-template-columns: 96px minmax(0, 1fr);
		gap: 0.9rem;
		padding-right: 0.9rem;
	}
}
