/* iTouch Shop Grid */
.itsg-shop {
	--itsg-ink: #3c3c3c;
	--itsg-muted: #7a7a7a;
	--itsg-line: #e6e6e6;
	--itsg-sale: #d51f1f;
	--itsg-buy: #5a31f4; /* Buy Now button colour */
	--itsg-dark: #1b1b1b;
	--itsg-body: "Poppins", system-ui, -apple-system, "Segoe UI", sans-serif;
	--itsg-head: "Jost", "Poppins", system-ui, sans-serif;
	font-family: var(--itsg-body);
	color: var(--itsg-ink);
	background: #fff;
	width: 100%;
	box-sizing: border-box;
}
.itsg-shop *, .itsg-shop *::before, .itsg-shop *::after,
.itsg-modal *, .itsg-modal *::before, .itsg-modal *::after { box-sizing: border-box; }
.itsg-shop button { font-family: inherit; cursor: pointer; }
.itsg-shop a { color: inherit; text-decoration: none; }
.itsg-shop ul { list-style: none; margin: 0; padding: 0; }

/* ---------- Top bar ---------- */
.itsg-bar {
	position: relative;
	display: grid;
	grid-template-columns: 1fr auto 1fr;
	align-items: center;
	height: 56px;
	border-bottom: 1px solid var(--itsg-line);
	z-index: 20;
	background: #fff;
}
.itsg-views { display: flex; height: 100%; }
.itsg-view {
	width: 50px; height: 100%;
	background: none; border: 0;
	color: #b9b9b9;
	display: flex; align-items: center; justify-content: center;
	padding: 0;
}
.itsg-view:first-child { border-right: 1px solid var(--itsg-line); width: 74px; }
.itsg-view:hover, .itsg-view.is-active { color: #222; }
.itsg-count {
	font-family: var(--itsg-head);
	font-size: 11px; letter-spacing: .22em; text-transform: uppercase;
	color: var(--itsg-muted);
}
.itsg-sort { justify-self: end; height: 100%; position: relative; }
.itsg-sort__toggle {
	height: 100%; padding: 0 32px;
	background: none; border: 0; border-left: 1px solid var(--itsg-line);
	font-family: var(--itsg-head);
	font-size: 11px; letter-spacing: .22em; text-transform: uppercase;
	color: var(--itsg-muted);
	display: flex; align-items: center; gap: 12px;
}
.itsg-sort__toggle svg { transition: transform .2s; transform: rotate(180deg); }
.itsg-sort.is-open .itsg-sort__toggle svg { transform: none; }
.itsg-sort__menu {
	display: none;
	position: absolute; right: 0; top: 100%;
	min-width: 210px;
	background: var(--itsg-dark);
	padding: 18px 20px 14px;
}
.itsg-sort.is-open .itsg-sort__menu { display: block; }
.itsg-sort__menu a {
	display: block; padding: 8px 10px;
	color: #bdbdbd; font-size: 14px;
}
.itsg-sort__menu a:hover, .itsg-sort__menu a.is-current { color: #fff; }

/* ---------- Layout ---------- */
.itsg-layout {
	display: grid;
	grid-template-columns: 290px minmax(0, 1fr);
	gap: 0 24px;
	padding: 24px 40px 80px;
	max-width: 1920px; margin: 0 auto;
}
.itsg-heading {
	font-family: var(--itsg-head);
	font-size: 28px; font-weight: 500; line-height: 1.6;
	letter-spacing: .01em; color: #4a4a4a;
	margin: 12px 0 48px;
	max-width: 7em;
}
.itsg-desc { font-size: 13px; color: var(--itsg-muted); margin: -24px 0 36px; }

/* ---------- Filters ---------- */
.itsg-shop .itsg-fgroup { border-bottom: 1px solid var(--itsg-line); padding: 20px 0 26px; }
.itsg-shop .itsg-fgroup + .itsg-fgroup { padding-top: 26px; }
.itsg-shop .itsg-fgroup:last-child { border-bottom: 0; }
.itsg-shop .itsg-filters button.itsg-fgroup__head,
.itsg-shop .itsg-filters button.itsg-fgroup__head:hover,
.itsg-shop .itsg-filters button.itsg-fgroup__head:focus {
	all: unset;
	box-sizing: border-box;
	width: 100%;
	display: flex; justify-content: space-between; align-items: center;
	cursor: pointer;
	font-family: var(--itsg-head);
	font-size: 12px; line-height: 1.4; letter-spacing: .24em; text-transform: uppercase;
	color: var(--itsg-muted);
	padding-right: 6px;
}
.itsg-shop .itsg-filters button.itsg-fgroup__head:focus-visible { outline: 2px solid #333; outline-offset: 4px; }
.itsg-shop .itsg-fgroup__head span { border: 0; text-decoration: none; box-shadow: none; }
.itsg-shop .itsg-fgroup__head svg { flex: none; transition: transform .2s; }
.itsg-shop .itsg-fgroup:not(.is-open) .itsg-fgroup__head svg { transform: rotate(180deg); }
.itsg-shop .itsg-fgroup__body { padding-top: 24px; }
.itsg-shop .itsg-fgroup:not(.is-open) .itsg-fgroup__body { display: none; }

.itsg-shop .itsg-toggle { display: flex; align-items: center; gap: 14px; cursor: pointer; font-size: 15px; color: var(--itsg-muted); margin: 0; }
.itsg-shop .itsg-toggle input { position: absolute; opacity: 0; pointer-events: none; width: 1px; height: 1px; }
.itsg-shop .itsg-toggle__track {
	width: 38px; height: 18px; border-radius: 10px;
	background: #e3e3e3; position: relative; transition: background .2s; flex: none;
}
.itsg-shop .itsg-toggle__track::after {
	content: ""; position: absolute; left: 2px; top: 2px;
	width: 14px; height: 14px; border-radius: 50%;
	background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.25); transition: transform .2s;
}
.itsg-shop .itsg-toggle input:checked + .itsg-toggle__track { background: #333; }
.itsg-shop .itsg-toggle input:checked + .itsg-toggle__track::after { transform: translateX(20px); }
.itsg-shop .itsg-toggle input:focus-visible + .itsg-toggle__track { outline: 2px solid #333; outline-offset: 2px; }

/* Price slider */
.itsg-shop .itsg-range { position: relative; height: 14px; margin: 0 7px 26px; }
.itsg-shop .itsg-range__track { position: absolute; left: 0; right: 0; top: 6px; height: 2px; background: #d6d6d6; }
.itsg-shop .itsg-range__fill { position: absolute; top: 0; height: 2px; background: #444; }
.itsg-shop .itsg-range input[type=range] {
	-webkit-appearance: none !important; appearance: none !important;
	position: absolute !important; left: -7px !important; top: 0 !important;
	width: calc(100% + 14px) !important; height: 14px !important;
	margin: 0 !important; padding: 0 !important;
	background: transparent !important; border: 0 !important; border-radius: 0 !important;
	box-shadow: none !important; outline: 0 !important;
	pointer-events: none;
}
.itsg-shop .itsg-range input[type=range]::-webkit-slider-runnable-track { background: transparent !important; border: 0 !important; box-shadow: none !important; height: 14px; }
.itsg-shop .itsg-range input[type=range]::-moz-range-track { background: transparent !important; border: 0 !important; box-shadow: none !important; height: 14px; }
.itsg-shop .itsg-range input[type=range]::-webkit-slider-thumb {
	-webkit-appearance: none; appearance: none; pointer-events: auto;
	width: 14px; height: 14px; border-radius: 50%;
	background: #444; border: 0; box-shadow: none; cursor: pointer; margin-top: 0;
}
.itsg-shop .itsg-range input[type=range]::-moz-range-thumb {
	pointer-events: auto; width: 14px; height: 14px; border-radius: 50%;
	background: #444; border: 0; box-shadow: none; cursor: pointer;
}
.itsg-shop .itsg-range input[type=range]:focus-visible::-webkit-slider-thumb { outline: 2px solid #333; outline-offset: 2px; }

.itsg-shop .itsg-price-inputs { display: flex; align-items: center; gap: 14px; }
.itsg-shop .itsg-price-inputs label {
	display: flex; align-items: center; flex: 1 1 0; min-width: 0; margin: 0;
	height: 52px; padding: 0 14px;
	border: 1px solid #e3e3e3; background: #fff;
	font-size: 14px; color: var(--itsg-muted);
}
.itsg-shop .itsg-price-inputs label span { flex: none; margin-right: 6px; }
.itsg-shop .itsg-price-inputs label input {
	flex: 1 1 auto; width: 100% !important; min-width: 0;
	height: auto !important; min-height: 0 !important; line-height: 1.2;
	margin: 0 !important; padding: 0 !important;
	border: 0 !important; border-radius: 0 !important; box-shadow: none !important; outline: 0 !important;
	background: transparent !important;
	text-align: right; font: inherit; font-size: 14px; color: var(--itsg-muted);
	-moz-appearance: textfield; appearance: textfield;
}
.itsg-shop .itsg-price-inputs label:focus-within { border-color: #999; }
.itsg-shop .itsg-price-inputs input::-webkit-outer-spin-button,
.itsg-shop .itsg-price-inputs input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.itsg-shop .itsg-price-inputs em { font-style: normal; font-size: 16px; color: #555; flex: none; }

/* ---------- Grid ---------- */
.itsg-grid { display: grid; gap: 80px 40px; grid-template-columns: repeat(4, minmax(0, 1fr)); padding-top: 12px; }
.itsg-grid[data-view="6"] { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 56px 24px; }

.itsg-card { position: relative; }
.itsg-media { position: relative; aspect-ratio: 1 / 1; background: #fff; overflow: hidden; }
.itsg-media__link { display: block; position: absolute; inset: 0; }
.itsg-img { position: absolute; inset: 0; display: block; transition: opacity .35s ease; }
.itsg-img img { width: 100%; height: 100%; object-fit: contain; display: block; }
.itsg-img--hover { opacity: 0; background: #fff; }
.itsg-img--hover img { object-fit: cover; }

.itsg-badge {
	position: absolute; left: 0; top: 0; z-index: 3;
	background: var(--itsg-sale); color: #fff;
	font-family: var(--itsg-head);
	font-size: 11px; letter-spacing: .16em; text-transform: uppercase;
	padding: 3px 7px; line-height: 1.5;
}
.itsg-badge--soldout { background: #ececec; color: #666; }

.itsg-plus {
	position: absolute; right: 0; bottom: 0; z-index: 4;
	width: 40px; height: 40px;
	background: #fff; color: #333;
	border: 1px solid var(--itsg-line);
	display: flex; align-items: center; justify-content: center;
	padding: 0;
	opacity: 0; transform: translateY(6px);
	transition: opacity .25s, transform .25s, background .2s, color .2s;
}
.itsg-plus:hover { background: #222; color: #fff; border-color: #222; }
.itsg-plus:focus-visible { opacity: 1; transform: none; outline: 2px solid #222; outline-offset: 2px; }

@media (hover: hover) {
	.itsg-card.has-hover:hover .itsg-img--hover { opacity: 1; }
	.itsg-card:hover .itsg-plus { opacity: 1; transform: none; }
}
@media (hover: none) {
	.itsg-plus { opacity: 1; transform: none; }
}

.itsg-info { text-align: center; padding-top: 26px; }
.itsg-name {
	margin: 0 0 12px;
	font-family: var(--itsg-head); font-weight: 400;
	font-size: 12px; letter-spacing: .24em; text-transform: uppercase;
	color: #5a5a5a; line-height: 1.6;
}
.itsg-price { font-family: var(--itsg-head); font-size: 13px; letter-spacing: .14em; text-transform: uppercase; color: var(--itsg-muted); }
.itsg-price del { margin-left: 4px; opacity: 1; color: var(--itsg-muted); }
.itsg-price ins { text-decoration: none; color: inherit; background: none; }
.itsg-price.is-sale, .itsg-price.is-sale ins, .itsg-price.is-sale .itsg-from { color: var(--itsg-sale); }
.itsg-price.is-sale del, .itsg-price.is-sale del * { color: var(--itsg-muted); }

/* Swatches (shared by grid + modal) */
.itsg-swatches { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px 10px; margin-top: 16px; max-width: 320px; margin-inline: auto; }
.itsg-sw {
	width: 18px; height: 18px; padding: 0; border-radius: 50%;
	background: none; border: 1px solid transparent;
	display: inline-flex; align-items: center; justify-content: center;
}
.itsg-sw span {
	display: block; width: 16px; height: 16px; border-radius: 50%;
	background-color: #ddd;
	background-image: linear-gradient(var(--c, #ddd), var(--c, #ddd));
	box-shadow: inset 0 0 0 1px rgba(0,0,0,.12);
}
.itsg-sw.is-active { border-color: #333; }

/* Compact view (3rd icon): 6 columns, images only, filters stay visible */
.itsg-shop .itsg-grid[data-view="list"] { display: grid !important; grid-template-columns: repeat(6, minmax(0, 1fr)) !important; gap: 48px 24px; padding-top: 24px; }
.itsg-shop .itsg-grid[data-view="list"] .itsg-card { width: auto; max-width: none; margin: 0; float: none; }
.itsg-grid[data-view="list"] .itsg-info { display: none; }

/* Pagination / empty */
.itsg-pagination { margin-top: 70px; text-align: center; font-family: var(--itsg-head); letter-spacing: .1em; }
.itsg-pagination .page-numbers { display: inline-block; padding: 8px 12px; color: var(--itsg-muted); }
.itsg-pagination .current { color: #111; border-bottom: 1px solid #111; }
.itsg-empty { padding: 60px 0; color: var(--itsg-muted); }
.itsg-empty a { text-decoration: underline; }

/* ---------- Modal ---------- */
body.itsg-lock { overflow: hidden; }
.itsg-modal {
	--itsg-ink: #3c3c3c; --itsg-muted: #7a7a7a; --itsg-line: #e6e6e6; --itsg-sale: #d51f1f; --itsg-buy: #5a31f4;
	--itsg-body: "Poppins", system-ui, sans-serif; --itsg-head: "Jost", "Poppins", system-ui, sans-serif;
	position: fixed; inset: 0; z-index: 99999;
	display: none; align-items: center; justify-content: center;
	background: rgba(0,0,0,.45);
	padding: 20px;
	font-family: var(--itsg-body); color: var(--itsg-ink);
}
.itsg-modal.is-open { display: flex; animation: itsg-fade .2s ease; }
@keyframes itsg-fade { from { opacity: 0; } to { opacity: 1; } }
.itsg-modal__box {
	position: relative; background: #fff;
	width: 100%; max-width: 890px; max-height: 92vh; overflow: auto;
	padding: 44px 40px 52px;
}
.itsg-modal__close { position: absolute; right: 24px; top: 24px; width: 32px; height: 32px; background: none; border: 0; padding: 0; color: #222; cursor: pointer; z-index: 5; }
.itsg-modal__loading { padding: 120px 0; text-align: center; color: var(--itsg-muted); font-family: var(--itsg-head); letter-spacing: .2em; font-size: 12px; text-transform: uppercase; }

.itsg-qv { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 56px; align-items: start; }
.itsg-qv__gallery { position: relative; }
.itsg-qv__slides {
	display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none;
	aspect-ratio: 1 / 1;
}
.itsg-qv__slides::-webkit-scrollbar { display: none; }
.itsg-qv__slide { flex: 0 0 100%; scroll-snap-align: center; display: flex; align-items: center; justify-content: center; }
.itsg-qv__slide img { max-width: 100%; max-height: 100%; width: 100%; height: 100%; object-fit: contain; }
.itsg-qv__dots { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 18px; padding: 0 10px; }
.itsg-qv__dots button { width: 6px; height: 6px; padding: 0; border: 0; border-radius: 50%; background: #c9c9c9; cursor: pointer; }
.itsg-qv__dots button.is-active { background: #333; }

.itsg-qv__brand { font-family: var(--itsg-head); font-size: 11px; letter-spacing: .22em; text-transform: uppercase; color: #8a6d4a; margin-top: 18px; }
.itsg-qv__title { font-family: var(--itsg-head); font-weight: 400; font-size: 24px; letter-spacing: .14em; text-transform: uppercase; color: #4a4a4a; margin: 12px 36px 12px 0; line-height: 1.35; }
.itsg-qv__price { font-family: var(--itsg-head); font-size: 18px; letter-spacing: .1em; color: var(--itsg-sale); }
.itsg-qv__price ins { text-decoration: none; background: none; color: inherit; }
.itsg-qv__price del { color: var(--itsg-muted); font-size: 15px; margin-left: 8px; }
.itsg-qv__reviews { display: flex; align-items: center; gap: 10px; margin-top: 18px; font-size: 14px; color: var(--itsg-muted); }
.itsg-qv__reviews a { text-decoration: none; color: var(--itsg-muted); }
.itsg-qv__reviews a:hover { color: #111; }
.itsg-qv hr { border: 0; border-top: 1px solid var(--itsg-line); margin: 22px 0; }

.itsg-qv__attr { margin-bottom: 22px; }
.itsg-qv__attr-label { font-size: 15px; margin-bottom: 12px; color: #555; }
.itsg-qv__swatches { display: flex; flex-wrap: wrap; gap: 12px; }
.itsg-qv .itsg-sw { width: 34px; height: 34px; }
.itsg-qv .itsg-sw span { width: 28px; height: 28px; }
.itsg-qv select.itsg-attr-input { width: 100%; height: 44px; border: 1px solid #d9d9d9; padding: 0 12px; background: #fff; font: inherit; color: #444; border-radius: 0; }

.itsg-qty { display: inline-flex; align-items: center; height: 44px; border: 1px solid #d9d9d9; margin: 6px 0 32px; }
.itsg-qty__btn { width: 38px; height: 100%; border: 0; background: none; font-size: 18px; color: #777; cursor: pointer; padding: 0; }
.itsg-qty__btn:hover { color: #111; }
.itsg-qty__input { width: 52px; height: 100%; border: 0; text-align: center; font: inherit; font-size: 13px; background: none; -moz-appearance: textfield; padding: 0; box-shadow: none; color: #333; }
.itsg-qty__input::-webkit-outer-spin-button, .itsg-qty__input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

.itsg-btn {
	display: flex; align-items: center; justify-content: center;
	width: 100%; height: 46px; margin-bottom: 14px; padding: 0 16px;
	font-family: var(--itsg-head); font-size: 13px; letter-spacing: .24em; text-transform: uppercase;
	border-radius: 0; cursor: pointer; text-decoration: none; transition: background .2s, color .2s, opacity .2s;
}
.itsg-btn--outline { background: #fff; color: #444; border: 1px solid #d9d9d9; }
.itsg-btn--outline:hover { background: #222; color: #fff; border-color: #222; }
.itsg-btn--buy { background: var(--itsg-buy); color: #fff; border: 1px solid var(--itsg-buy); font-family: var(--itsg-body); font-weight: 500; letter-spacing: .08em; font-size: 14px; }
.itsg-btn--buy:hover { opacity: .9; }
.itsg-btn.is-loading { opacity: .6; pointer-events: none; }
.itsg-btn[disabled] { opacity: .5; pointer-events: none; }

.itsg-qv__msg { min-height: 20px; font-size: 13px; color: var(--itsg-muted); text-align: center; margin-bottom: 8px; }
.itsg-qv__msg.is-error { color: var(--itsg-sale); }
.itsg-qv__msg a { text-decoration: underline; margin-left: 6px; color: inherit; }
.itsg-qv__soldout { color: var(--itsg-sale); font-size: 14px; }
.itsg-qv__details { display: inline-block; margin-top: 10px; font-size: 15px; color: #444; text-decoration: none; border-bottom: 1px solid #444; padding-bottom: 1px; }

/* Gallery arrows */
.itsg-qv__stage { position: relative; }
.itsg-modal .itsg-qv__nav {
	position: absolute; top: 50%; transform: translateY(-50%); z-index: 3;
	width: 40px; height: 40px; padding: 0; margin: 0;
	display: flex; align-items: center; justify-content: center;
	background: rgba(255,255,255,.92) !important; color: #333 !important;
	border: 1px solid #e3e3e3 !important; border-radius: 50% !important;
	box-shadow: 0 1px 4px rgba(0,0,0,.12) !important;
	cursor: pointer; transition: background .2s, color .2s;
}
.itsg-modal .itsg-qv__nav:hover { background: #222 !important; color: #fff !important; border-color: #222 !important; }
.itsg-qv__nav--prev { left: 10px; }
.itsg-qv__nav--next { right: 10px; }

/* Quantity buttons: guard against theme button styles */
.itsg-modal .itsg-qty .itsg-qty__btn {
	display: flex; align-items: center; justify-content: center;
	min-width: 38px; width: 38px; height: 100%; margin: 0; padding: 0;
	background: none !important; border: 0 !important; border-radius: 0 !important; box-shadow: none !important;
	color: #777 !important; font-size: 18px; line-height: 1; cursor: pointer;
}
.itsg-modal .itsg-qty .itsg-qty__btn:hover { color: #111 !important; }

/* ---------- Responsive ---------- */
@media (max-width: 1200px) {
	.itsg-grid, .itsg-grid[data-view="6"] { grid-template-columns: repeat(3, minmax(0, 1fr)); }
	.itsg-layout { grid-template-columns: 240px minmax(0, 1fr); padding-inline: 24px; }
}
@media (max-width: 860px) {
	.itsg-layout { grid-template-columns: 1fr; padding: 16px 16px 60px; }
	.itsg-heading { max-width: none; margin: 8px 0 24px; font-size: 24px; }
	.itsg-side { display: block; }
	.itsg-grid, .itsg-grid[data-view="6"] { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 48px 16px; }
	.itsg-bar { grid-template-columns: auto 1fr auto; }
	.itsg-count { text-align: center; font-size: 10px; letter-spacing: .14em; }
	.itsg-sort__toggle { padding: 0 16px; }
	.itsg-view:first-child { width: 50px; }
	.itsg-modal { padding: 0; align-items: flex-end; }
	.itsg-modal__box { max-height: 94vh; padding: 56px 20px 32px; }
	.itsg-qv { grid-template-columns: 1fr; gap: 20px; }
	.itsg-qv__title { font-size: 20px; }
}
@media (max-width: 1360px) {
	.itsg-shop .itsg-grid[data-view="list"] { grid-template-columns: repeat(4, minmax(0, 1fr)) !important; gap: 36px 16px; }
}
@media (max-width: 760px) {
	.itsg-shop .itsg-grid[data-view="list"] { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; }
}
@media (max-width: 480px) {
	.itsg-shop .itsg-grid[data-view="list"] { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
}
@media (prefers-reduced-motion: reduce) {
	.itsg-shop *, .itsg-modal * { transition: none !important; animation: none !important; }
}
