.rg-gifts,
.rg-modal {
	--rg-ink: #2f2923;
	--rg-muted: #6e655d;
	--rg-sand: #d8c7b3;
	--rg-cream: #f8f5f0;
	--rg-border: #e3dbd1;
	--rg-white: #fff;
	color: var(--rg-ink);
}

.rg-gifts {
	width: 100%;
	margin: 2rem auto;
}

.rg-gifts__grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 1.5rem;
}

.rg-card {
	display: grid;
	min-width: 0;
	min-height: 250px;
	grid-template-columns: minmax(0, 48%) minmax(0, 52%);
	align-items: stretch;
	border: 1px solid var(--rg-border);
	border-radius: 1px;
	background: var(--rg-white);
	overflow: hidden;
	transition: border-color 160ms ease;
}

.rg-card:hover { border-color: var(--rg-sand); }

.rg-card__media {
	position: relative;
	width: 100%;
	height: 100%;
	align-self: stretch;
	min-width: 0;
	background: var(--rg-white);
	overflow: hidden;
}

.rg-gallery {
	position: relative;
	width: 100%;
	min-width: 0;
	background: var(--rg-white);
	overflow: hidden;
}

.rg-gallery--card { position: absolute; inset: 0; width: 100%; height: 100%; min-height: 0; }
.rg-gallery__slide { width: 100%; height: 100%; }
.rg-gallery__slide[hidden] { display: none; }

.rg-gallery__open {
	display: block;
	width: 100%;
	height: 100%;
	margin: 0;
	border: 0;
	border-radius: 0;
	background: transparent !important;
	color: inherit;
	padding: 0;
	box-shadow: none !important;
	cursor: pointer;
}

.rg-gallery__open:hover,
.rg-gallery__open:focus,
.rg-gallery__open:active {
	border: 0;
	background: transparent !important;
	color: inherit;
	box-shadow: none !important;
	filter: none !important;
	outline: 0;
}

.rg-gallery__open:focus-visible {
	border: 0;
	background: transparent !important;
	box-shadow: none !important;
	filter: none !important;
	outline: 2px solid var(--rg-sand);
	outline-offset: -2px;
}

.rg-card__image,
.rg-image-placeholder.rg-card__image {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: contain;
	object-position: center;
	background: var(--rg-white);
}

.rg-gallery--portrait .rg-card__image,
.rg-gallery--portrait .rg-modal__image { object-fit: contain; }

.rg-gallery__open:hover .rg-card__image,
.rg-gallery__open:focus-visible .rg-card__image { transform: none; }

.rg-card__media > .rg-image-placeholder { width: 100%; height: 100%; min-height: 250px; }

.rg-image-placeholder {
	display: grid;
	place-items: center;
	background: var(--rg-cream);
	color: var(--rg-sand);
	font-size: 3rem;
}

.rg-gallery__nav {
	appearance: none;
	position: absolute;
	top: 50%;
	z-index: 3;
	display: grid;
	width: 2rem;
	height: 2rem;
	place-items: center;
	transform: translateY(-50%);
	border: 1px solid rgba(47, 41, 35, 0.18);
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.92);
	color: var(--rg-ink);
	padding: 0;
	font: inherit;
	font-size: 1.45rem;
	line-height: 1;
	cursor: pointer;
	box-shadow: 0 2px 12px rgba(47, 41, 35, 0.1);
}

.rg-gallery__nav--prev { left: 0.55rem; }
.rg-gallery__nav--next { right: 0.55rem; }
.rg-gallery__nav:hover,
.rg-gallery__nav:focus-visible { border-color: var(--rg-ink); }

.rg-gallery__caption {
	position: absolute;
	left: 0.55rem;
	right: 0.55rem;
	bottom: 0.5rem;
	z-index: 2;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.5rem;
	pointer-events: none;
	color: var(--rg-ink);
	font-size: 0.69rem;
	font-weight: 600;
	letter-spacing: 0.06em;
	text-transform: uppercase;
}

.rg-gallery__caption > span {
	background: rgba(255, 255, 255, 0.9);
	padding: 0.24rem 0.4rem;
}

.rg-card__body {
	display: flex;
	min-width: 0;
	flex-direction: column;
	align-items: flex-start;
	padding: 1.05rem 1.05rem 1.1rem;
}

.rg-card__meta {
	display: flex;
	width: 100%;
	align-items: baseline;
	margin-bottom: 0.55rem;
}

.rg-card__price {
	color: var(--rg-ink);
	font-size: 1rem;
	font-weight: 650;
	letter-spacing: 0.015em;
	white-space: nowrap;
}

.rg-card__title {
	margin: 0;
	font-size: clamp(1rem, 1.5vw, 1.2rem);
	font-weight: 500;
	letter-spacing: 0.045em;
	line-height: 1.25;
	text-transform: uppercase;
}

.rg-card__excerpt {
	margin: 0.65rem 0 0;
	color: var(--rg-muted);
	font-size: 0.9rem;
	line-height: 1.5;
}

.rg-stock {
	display: inline-flex;
	align-items: center;
	gap: 0.45rem;
	margin-top: 0.85rem;
	padding: 0;
	font-size: 0.8rem;
	font-weight: 600;
	line-height: 1.25;
}

.rg-stock::before {
	width: 0.45rem;
	height: 0.45rem;
	border-radius: 50%;
	background: currentColor;
	content: "";
	flex: 0 0 auto;
}

.rg-stock--available { color: #356344; }
.rg-stock--low { color: #8a641b; }
.rg-stock--sold { color: #8a3d3d; }

.rg-card__button {
	appearance: none;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	margin-top: auto;
	border: 1px solid var(--rg-border);
	border-radius: 0;
	background: var(--rg-white);
	color: var(--rg-ink);
	padding: 0.72rem 0.9rem;
	font: inherit;
	font-size: 0.73rem;
	font-weight: 500;
	letter-spacing: 0.1em;
	line-height: 1;
	text-transform: uppercase;
	cursor: pointer;
	transition: border-color 150ms ease, background-color 150ms ease;
}

.rg-stock + .rg-card__button { margin-top: 1.1rem; }
.rg-card__button:hover,
.rg-card__button:focus-visible { border-color: var(--rg-ink); background: var(--rg-cream); }

.rg-gifts__empty {
	grid-column: 1 / -1;
	margin: 0;
	border: 1px solid var(--rg-border);
	background: var(--rg-cream);
	padding: 1.5rem;
	text-align: center;
}

body.rg-modal-open { overflow: hidden; }

.rg-modal {
	width: min(1120px, calc(100vw - 2rem));
	height: min(90vh, 920px);
	max-height: min(90vh, 920px);
	position: fixed;
	inset: 0;
	z-index: 99999;
	margin: auto;
	border: 1px solid var(--rg-border);
	border-radius: 2px;
	background: var(--rg-white);
	padding: 0;
	box-shadow: 0 24px 70px rgba(47, 41, 35, 0.22);
	overflow: hidden;
}

.rg-modal::backdrop { background: rgba(38, 32, 27, 0.58); }
.rg-modal[open] { animation: rg-modal-in 150ms ease-out; }

@keyframes rg-modal-in {
	from { opacity: 0; transform: translateY(8px); }
	to { opacity: 1; transform: translateY(0); }
}

.rg-modal__panel {
	position: relative;
	display: grid;
	grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
	height: 100%;
	min-height: 0;
}

.rg-modal__close {
	position: absolute;
	top: 0.85rem;
	right: 0.85rem;
	z-index: 5;
	display: grid;
	width: 2.6rem;
	height: 2.6rem;
	place-items: center;
	border: 1px solid var(--rg-border);
	border-radius: 0;
	background: rgba(255, 255, 255, 0.94);
	color: var(--rg-ink);
	padding: 0;
	font: inherit;
	font-size: 1.7rem;
	font-weight: 300;
	line-height: 1;
	cursor: pointer;
}

.rg-modal__close:hover,
.rg-modal__close:focus-visible { border-color: var(--rg-ink); }

.rg-modal__media {
	min-width: 0;
	height: 100%;
	min-height: 0;
	background: var(--rg-white);
	overflow: hidden;
}

.rg-gallery--modal { width: 100%; height: 100%; min-height: 0; }
.rg-modal__image,
.rg-image-placeholder.rg-modal__image {
	display: block;
	width: 100%;
	height: 100%;
	min-height: 0;
	object-fit: contain;
	object-position: center;
	background: var(--rg-white);
}

.rg-gallery--modal .rg-gallery__nav { width: 2.6rem; height: 2.6rem; font-size: 1.8rem; }
.rg-gallery--modal .rg-gallery__nav--prev { left: 1rem; }
.rg-gallery--modal .rg-gallery__nav--next { right: 1rem; }
.rg-gallery--modal .rg-gallery__caption { left: 1rem; right: 1rem; bottom: 0.85rem; font-size: 0.75rem; }

.rg-modal__content { min-height: 0; overflow-y: auto; padding: clamp(2rem, 3.4vw, 3.25rem); }
.rg-modal__meta { display: flex; align-items: baseline; margin-bottom: 0.8rem; }
.rg-modal__price {
	color: var(--rg-ink);
	font-size: 1.22rem;
	font-weight: 700;
	letter-spacing: 0.015em;
	white-space: nowrap;
}

.rg-modal__title {
	margin: 0;
	font-size: clamp(1.55rem, 3vw, 2.15rem);
	font-weight: 500;
	letter-spacing: 0.04em;
	line-height: 1.18;
	text-transform: uppercase;
}

.rg-modal__description { margin-top: 1.25rem; color: var(--rg-muted); line-height: 1.65; }
.rg-modal__description > :first-child { margin-top: 0; }
.rg-modal__description > :last-child { margin-bottom: 0; }

.rg-modal__stock { margin-top: 1.65rem; }
.rg-modal__stock > h3 {
	margin: 0 0 1rem;
	font-size: 0.9rem;
	font-weight: 600;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

.rg-size-group + .rg-size-group { margin-top: 1.25rem; }
.rg-size-group h4 {
	margin: 0 0 0.45rem;
	font-size: 0.92rem;
	font-weight: 700;
}

.rg-size-list { display: grid; margin: 0; padding: 0; list-style: none; }
.rg-size-list li {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	border-top: 1px solid var(--rg-border);
	padding: 0.72rem 0;
}
.rg-size-list li:last-child { border-bottom: 1px solid var(--rg-border); }
.rg-size-list__label { font-weight: 600; }
.rg-size-list__availability { display: flex; align-items: center; justify-content: flex-end; gap: 0.75rem; }
.rg-size-list__availability > strong { min-width: 2ch; text-align: right; font-size: 0.95rem; }
.rg-size-list .rg-stock { margin-top: 0; text-align: right; }

.rg-modal__pickup {
	margin-top: 1.65rem;
	border-top: 1px solid var(--rg-border);
	background: var(--rg-cream);
	padding: 1.1rem 1.2rem;
}
.rg-modal__pickup > strong { display: block; margin-bottom: 0.3rem; font-size: 0.78rem; letter-spacing: 0.09em; text-transform: uppercase; }
.rg-modal__pickup p { margin: 0; line-height: 1.55; }

@media (max-width: 980px) {
	.rg-gifts__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 800px) {
	.rg-modal { width: min(640px, calc(100vw - 1rem)); height: auto; max-height: 94vh; overflow: auto; }
	.rg-modal__panel { grid-template-columns: 1fr; height: auto; min-height: 0; }
	.rg-modal__media { height: min(52vh, 460px); min-height: 300px; }
	.rg-gallery--modal { height: 100%; min-height: 0; }
	.rg-modal__image,
	.rg-image-placeholder.rg-modal__image { height: 100%; min-height: 0; object-fit: contain; }
	.rg-modal__content { overflow: visible; padding: 1.9rem 1.35rem 1.5rem; }
}

@media (max-width: 640px) {
	.rg-gifts__grid { grid-template-columns: 1fr; gap: 1rem; }
	.rg-card { min-height: 220px; grid-template-columns: minmax(0, 44%) minmax(0, 56%); }
	.rg-card__body { padding: 1rem; }
	.rg-card__title { font-size: 1rem; }
	.rg-card__excerpt { font-size: 0.86rem; }
	.rg-card__button { font-size: 0.7rem; padding: 0.68rem 0.78rem; }
	.rg-gallery__caption { font-size: 0.64rem; }
	.rg-gallery__nav { width: 1.85rem; height: 1.85rem; }
	.rg-modal__meta { margin-bottom: 0.65rem; }
	.rg-modal__price { font-size: 1.12rem; }
	.rg-size-list__availability { gap: 0.5rem; }
}

@media (max-width: 400px) {
	.rg-card { grid-template-columns: 42% minmax(0, 1fr); }
	.rg-card__excerpt { display: none; }
	.rg-gallery--card .rg-gallery__caption > span:first-child { display: none; }
}

@media (prefers-reduced-motion: reduce) {
	.rg-card__image,
	.rg-card__button,
	.rg-modal[open] { animation: none; transition: none; }
}
