/* ============================================================
   ABD Gallery Shop — Front End
   Brand system: Gold #C9A96E · Ink #1A1814 · Cream #F2EFE9
   Type: Cormorant Garamond (display) · Montserrat (UI)
   ============================================================ */

.abd-gs-gallery {
	--abd-gs-gold: #C9A96E;
	--abd-gs-ink: #1A1814;
	--abd-gs-cream: #F2EFE9;
	--abd-gs-cols: 3;
	--abd-gs-gap: 14px;
	position: relative;
	font-family: 'Montserrat', sans-serif;
}

/* ---------- Header ---------- */

.abd-gs-gallery__header {
	text-align: center;
	margin: 0 0 40px;
}

.abd-gs-gallery__eyebrow {
	font-family: 'Montserrat', sans-serif;
	font-size: 11px;
	font-weight: 500;
	letter-spacing: 4px;
	text-transform: uppercase;
	color: var(--abd-gs-gold);
	margin: 0 0 10px;
}

.abd-gs-gallery__title {
	font-family: 'Cormorant Garamond', serif;
	font-weight: 500;
	font-size: clamp(30px, 4vw, 44px);
	line-height: 1.15;
	color: var(--abd-gs-ink);
	margin: 0 0 12px;
}

.abd-gs-gallery__desc {
	font-size: 15px;
	font-weight: 300;
	line-height: 1.8;
	color: color-mix(in srgb, var(--abd-gs-ink) 72%, white);
	max-width: 640px;
	margin: 0 auto 18px;
}

.abd-gs-gallery__rule {
	display: inline-block;
	width: 56px;
	height: 1px;
	background: var(--abd-gs-gold);
}

/* ---------- Grid ---------- */

.abd-gs-grid {
	display: grid;
	grid-template-columns: repeat(var(--abd-gs-cols), 1fr);
	gap: var(--abd-gs-gap);
}

@media (max-width: 1024px) {
	.abd-gs-grid { grid-template-columns: repeat(min(var(--abd-gs-cols), 2), 1fr); }
}
@media (max-width: 640px) {
	.abd-gs-grid { grid-template-columns: 1fr; }
}

.abd-gs-item {
	margin: 0;
}

.abd-gs-item__frame {
	position: relative;
	overflow: hidden;
	aspect-ratio: 3 / 4;
	background: var(--abd-gs-cream);
}

.abd-gs-item__frame img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: transform 1.1s cubic-bezier(0.19, 1, 0.22, 1);
}

.abd-gs-item:hover .abd-gs-item__frame img {
	transform: scale(1.045);
}

.abd-gs-gallery--protected img {
	-webkit-user-drag: none;
	user-select: none;
}

/* ---------- Overlay ---------- */

.abd-gs-item__overlay {
	position: absolute;
	inset: 0;
	display: flex;
	flex-direction: column;
	justify-content: flex-end;
	align-items: center;
	gap: 8px;
	padding: 22px 16px;
	text-align: center;
	background: linear-gradient(to top,
		rgba(26, 24, 20, 0.82) 0%,
		rgba(26, 24, 20, 0.35) 45%,
		rgba(26, 24, 20, 0) 75%);
	opacity: 0;
	transition: opacity 0.45s ease;
}

.abd-gs-gallery--hover-always .abd-gs-item__overlay,
.abd-gs-item:hover .abd-gs-item__overlay,
.abd-gs-item:focus-within .abd-gs-item__overlay {
	opacity: 1;
}

/* Touch devices: overlay always visible */
@media (hover: none) {
	.abd-gs-item__overlay { opacity: 1; }
}

.abd-gs-item__title {
	font-family: 'Cormorant Garamond', serif;
	font-size: 20px;
	font-weight: 500;
	font-style: italic;
	color: var(--abd-gs-cream);
	line-height: 1.2;
}

.abd-gs-item__price {
	font-size: 12px;
	font-weight: 500;
	letter-spacing: 2.5px;
	color: var(--abd-gs-gold);
}

.abd-gs-item__price .woocommerce-Price-amount {
	color: inherit;
}

.abd-gs-item__actions {
	display: flex;
	gap: 8px;
	margin-top: 6px;
}

/* ---------- Buttons ---------- */

.abd-gs-btn {
	appearance: none;
	border: 1px solid transparent;
	cursor: pointer;
	font-family: 'Montserrat', sans-serif;
	font-size: 11px;
	font-weight: 500;
	letter-spacing: 2.5px;
	text-transform: uppercase;
	text-decoration: none;
	padding: 11px 22px;
	line-height: 1;
	transition: background 0.3s ease, color 0.3s ease, border-color 0.3s ease;
	border-radius: 0;
}

.abd-gs-btn--gold {
	background: var(--abd-gs-gold);
	color: var(--abd-gs-ink);
	border-color: var(--abd-gs-gold);
}

.abd-gs-btn--gold:hover:not(:disabled) {
	background: transparent;
	color: var(--abd-gs-gold);
}

.abd-gs-btn--ghost {
	background: transparent;
	color: var(--abd-gs-cream);
	border-color: rgba(242, 239, 233, 0.55);
}

.abd-gs-btn--ghost:hover {
	border-color: var(--abd-gs-cream);
	background: rgba(242, 239, 233, 0.12);
	color: var(--abd-gs-cream);
}

.abd-gs-btn:disabled {
	opacity: 0.75;
	cursor: default;
}

.abd-gs-item.is-in-cart .abd-gs-add {
	background: transparent;
	color: var(--abd-gs-gold);
	border-color: var(--abd-gs-gold);
}

.abd-gs-btn:focus-visible {
	outline: 2px solid var(--abd-gs-gold);
	outline-offset: 2px;
}

/* ---------- Toast ---------- */

.abd-gs-toast {
	position: fixed;
	left: 50%;
	bottom: 28px;
	transform: translateX(-50%) translateY(8px);
	z-index: 99998;
	display: flex;
	align-items: center;
	gap: 18px;
	background: var(--abd-gs-ink);
	color: var(--abd-gs-cream);
	padding: 15px 24px;
	font-size: 12px;
	letter-spacing: 1.5px;
	text-transform: uppercase;
	box-shadow: 0 12px 40px rgba(26, 24, 20, 0.35);
	opacity: 0;
	transition: opacity 0.35s ease, transform 0.35s ease;
	pointer-events: none;
}

.abd-gs-toast.is-visible {
	opacity: 1;
	transform: translateX(-50%) translateY(0);
	pointer-events: auto;
}

.abd-gs-toast__link {
	color: var(--abd-gs-gold);
	text-decoration: none;
	border-bottom: 1px solid var(--abd-gs-gold);
	padding-bottom: 1px;
	white-space: nowrap;
}

.abd-gs-toast__link:hover {
	color: var(--abd-gs-cream);
	border-color: var(--abd-gs-cream);
}

/* ---------- Lightbox ---------- */

.abd-gs-lightbox {
	position: fixed;
	inset: 0;
	z-index: 99999;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	background: rgba(26, 24, 20, 0.96);
	padding: 48px 20px 80px;
	opacity: 0;
	transition: opacity 0.3s ease;
}

.abd-gs-lightbox.is-open {
	opacity: 1;
}

.abd-gs-lightbox img {
	max-width: min(1100px, 92vw);
	max-height: calc(100vh - 180px);
	object-fit: contain;
	box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5);
}

.abd-gs-lightbox__bar {
	margin-top: 22px;
	display: flex;
	align-items: center;
	gap: 16px;
}

.abd-gs-lightbox__price {
	font-family: 'Montserrat', sans-serif;
	font-size: 13px;
	letter-spacing: 2.5px;
	color: #C9A96E;
}

.abd-gs-lightbox__close {
	position: absolute;
	top: 22px;
	right: 26px;
	background: none;
	border: none;
	color: #F2EFE9;
	font-size: 34px;
	line-height: 1;
	cursor: pointer;
	font-family: 'Cormorant Garamond', serif;
	transition: color 0.25s ease;
}

.abd-gs-lightbox__close:hover { color: #C9A96E; }

.abd-gs-lightbox__nav {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	background: none;
	border: none;
	color: rgba(242, 239, 233, 0.7);
	font-size: 44px;
	font-family: 'Cormorant Garamond', serif;
	cursor: pointer;
	padding: 20px 14px;
	transition: color 0.25s ease;
}

.abd-gs-lightbox__nav:hover { color: #C9A96E; }
.abd-gs-lightbox__nav--prev { left: 14px; }
.abd-gs-lightbox__nav--next { right: 14px; }

@media (prefers-reduced-motion: reduce) {
	.abd-gs-item__frame img,
	.abd-gs-item__overlay,
	.abd-gs-toast,
	.abd-gs-lightbox { transition: none; }
	.abd-gs-item:hover .abd-gs-item__frame img { transform: none; }
}

/* ---------- Cart / order surfaces ---------- */

.abd-gs-cart-gallery {
	font-size: 0.85em;
	color: #8a8378;
	font-style: italic;
}

.abd-gs-download-box {
	background: #1A1814;
	padding: 44px 36px;
	text-align: center;
	margin: 0 0 36px;
}

.abd-gs-download-box__eyebrow {
	font-family: 'Montserrat', sans-serif;
	font-size: 11px;
	font-weight: 500;
	letter-spacing: 4px;
	text-transform: uppercase;
	color: #C9A96E;
	margin: 0 0 8px;
}

.abd-gs-download-box__title {
	font-family: 'Cormorant Garamond', serif;
	font-weight: 500;
	font-size: 32px;
	color: #F2EFE9;
	margin: 0 0 10px;
}

.abd-gs-download-box__text {
	font-family: 'Montserrat', sans-serif;
	font-size: 14px;
	font-weight: 300;
	line-height: 1.8;
	color: rgba(242, 239, 233, 0.8);
	max-width: 520px;
	margin: 0 auto 22px;
}

.abd-gs-download-box .abd-gs-btn--gold {
	display: inline-block;
}

.abd-gs-download-box__note {
	font-family: 'Montserrat', sans-serif;
	font-size: 11px;
	letter-spacing: 1px;
	color: rgba(242, 239, 233, 0.5);
	margin: 16px 0 0;
}

.abd-gs-empty {
	font-family: 'Montserrat', sans-serif;
	font-size: 14px;
	color: #8a8378;
	text-align: center;
	padding: 30px;
	border: 1px dashed #d8d2c6;
}

/* ============================================================
   v2 additions: multi-select, popover, badges
   ============================================================ */

/* ---------- Multi-select checkbox ---------- */

.abd-gs-select {
	position: absolute;
	top: 12px;
	left: 12px;
	z-index: 3;
	width: 30px;
	height: 30px;
	border: 1px solid rgba(242, 239, 233, 0.85);
	background: rgba(26, 24, 20, 0.4);
	color: transparent;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0;
	transition: background 0.25s ease, border-color 0.25s ease, opacity 0.3s ease;
	opacity: 0;
}

.abd-gs-select svg { width: 16px; height: 16px; }

.abd-gs-gallery--multiselect .abd-gs-item:hover .abd-gs-select,
.abd-gs-gallery--multiselect .abd-gs-item.is-selected .abd-gs-select,
.abd-gs-gallery--multiselect .abd-gs-item:focus-within .abd-gs-select {
	opacity: 1;
}

@media (hover: none) {
	.abd-gs-gallery--multiselect .abd-gs-select { opacity: 1; }
}

.abd-gs-item.is-selected .abd-gs-select {
	background: var(--abd-gs-gold);
	border-color: var(--abd-gs-gold);
	color: var(--abd-gs-ink);
}

.abd-gs-item.is-selected .abd-gs-item__frame {
	outline: 2px solid var(--abd-gs-gold);
	outline-offset: -2px;
}

/* ---------- Selection bar ---------- */

.abd-gs-selectbar {
	position: sticky;
	bottom: 18px;
	z-index: 20;
	margin-top: 22px;
	display: flex;
	align-items: center;
	gap: 18px;
	background: var(--abd-gs-ink);
	color: var(--abd-gs-cream);
	padding: 14px 22px;
	box-shadow: 0 14px 44px rgba(26, 24, 20, 0.35);
}

.abd-gs-selectbar__count {
	font-size: 12px;
	letter-spacing: 2px;
	text-transform: uppercase;
}

.abd-gs-selectbar__total {
	font-family: 'Cormorant Garamond', serif;
	font-size: 22px;
	color: var(--abd-gs-gold);
}

.abd-gs-selectbar__actions {
	margin-left: auto;
	display: flex;
	gap: 10px;
}

.abd-gs-btn--darkghost {
	background: transparent;
	color: var(--abd-gs-cream);
	border-color: rgba(242, 239, 233, 0.4);
}

.abd-gs-btn--darkghost:hover {
	border-color: var(--abd-gs-cream);
	color: var(--abd-gs-cream);
}

@media (max-width: 640px) {
	.abd-gs-selectbar { flex-wrap: wrap; gap: 10px; }
	.abd-gs-selectbar__actions { margin-left: 0; width: 100%; }
	.abd-gs-selectbar__actions .abd-gs-btn { flex: 1; }
}

/* ---------- Print options popover ---------- */

.abd-gs-popover {
	position: absolute;
	inset: auto 10px 10px 10px;
	z-index: 5;
	background: var(--abd-gs-cream);
	box-shadow: 0 18px 50px rgba(26, 24, 20, 0.4);
	padding: 14px;
	animation: abd-gs-pop 0.22s ease;
}

@keyframes abd-gs-pop {
	from { opacity: 0; transform: translateY(6px); }
	to   { opacity: 1; transform: translateY(0); }
}

.abd-gs-popover__heading {
	font-family: 'Montserrat', sans-serif;
	font-size: 10px;
	font-weight: 600;
	letter-spacing: 3px;
	text-transform: uppercase;
	color: var(--abd-gs-gold);
	margin: 0 0 10px;
	text-align: center;
}

.abd-gs-popover__opt {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 12px;
	width: 100%;
	background: transparent;
	border: none;
	border-top: 1px solid rgba(26, 24, 20, 0.08);
	padding: 10px 4px;
	cursor: pointer;
	font-family: 'Montserrat', sans-serif;
	font-size: 12.5px;
	color: var(--abd-gs-ink);
	text-align: left;
	transition: background 0.2s ease, padding-left 0.2s ease;
}

.abd-gs-popover__opt:first-of-type { border-top: none; }

.abd-gs-popover__opt em {
	font-style: normal;
	font-size: 12px;
	letter-spacing: 1px;
	color: var(--abd-gs-gold);
	white-space: nowrap;
}

.abd-gs-popover__opt:hover {
	background: rgba(201, 169, 110, 0.14);
	padding-left: 10px;
}

@media (prefers-reduced-motion: reduce) {
	.abd-gs-popover { animation: none; }
}

/* ---------- Protection shield & lightbox affordance (2.3.4) ---------- */

.abd-gs-shield {
	position: absolute;
	inset: 0;
	z-index: 1;
}

.abd-gs-item__overlay { z-index: 2; }

.abd-gs-gallery[data-lightbox="1"] .abd-gs-item__frame { cursor: zoom-in; }

.abd-gs-lightbox { z-index: 999999; }

/* ---------- Video items (2.4.0) ---------- */

.abd-gs-item__frame video {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.abd-gs-item__play {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	z-index: 1;
	width: 54px;
	height: 54px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba(26, 24, 20, 0.55);
	border: 1px solid rgba(242, 239, 233, 0.7);
	border-radius: 50%;
	color: var(--abd-gs-cream);
	font-size: 16px;
	padding-left: 4px;
	pointer-events: none;
	transition: opacity 0.3s ease;
}

.abd-gs-item--video:hover .abd-gs-item__play { opacity: 0; }

.abd-gs-lightbox__video {
	max-width: min(1100px, 92vw);
	max-height: calc(100vh - 180px);
	box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5);
}

/* ---------- Package redemption bar (2.5.0) ---------- */

.abd-gs-package {
	display: flex;
	align-items: center;
	justify-content: center;
	margin: 0 0 26px;
	font-family: 'Montserrat', sans-serif;
}

.abd-gs-package__toggle {
	background: none;
	border: none;
	border-bottom: 1px solid var(--abd-gs-gold);
	color: var(--abd-gs-gold);
	font-family: 'Montserrat', sans-serif;
	font-size: 11px;
	font-weight: 500;
	letter-spacing: 2px;
	text-transform: uppercase;
	padding: 0 0 3px;
	cursor: pointer;
	transition: color 0.25s ease, border-color 0.25s ease;
}

.abd-gs-package__toggle:hover { color: var(--abd-gs-ink); border-color: var(--abd-gs-ink); }

.abd-gs-package__fields { display: inline-flex; gap: 8px; align-items: center; }

.abd-gs-package__input {
	border: 1px solid #d8d2c6;
	background: transparent;
	padding: 10px 14px;
	font-family: 'Montserrat', sans-serif;
	font-size: 13px;
	letter-spacing: 2px;
	text-transform: uppercase;
	width: 160px;
}

.abd-gs-package__input:focus { outline: none; border-color: var(--abd-gs-gold); }

.abd-gs-package__status {
	display: inline-flex;
	align-items: center;
	gap: 14px;
	background: var(--abd-gs-ink);
	color: var(--abd-gs-cream);
	padding: 12px 20px;
}

.abd-gs-package__label {
	font-size: 12px;
	letter-spacing: 2px;
	text-transform: uppercase;
	color: var(--abd-gs-gold);
}

.abd-gs-package__clear {
	background: none;
	border: none;
	color: rgba(242, 239, 233, 0.6);
	font-size: 18px;
	line-height: 1;
	cursor: pointer;
	padding: 0;
	transition: color 0.2s ease;
}

.abd-gs-package__clear:hover { color: var(--abd-gs-cream); }
