/**
 * AS Wedding Registry - Frontend styles
 *
 * @package AS_Gift_Registry
 */

/* Add to Registry button */
.asgr-add-to-registry-wrapper {
	margin-top: 0.75em;
}
.asgr-add-to-registry-row {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	flex-wrap: wrap;
}
.asgr-add-to-registry.asgr-loading {
	opacity: 0.7;
	position: relative;
}
.asgr-add-to-registry.asgr-loading::after {
	content: '';
	display: inline-block;
	width: 1em;
	height: 1em;
	margin-left: 0.5em;
	vertical-align: middle;
	border: 2px solid currentColor;
	border-right-color: transparent;
	border-radius: 50%;
	animation: asgr-spin 0.6s linear infinite;
}
@keyframes asgr-spin {
	to { transform: rotate(360deg); }
}
.asgr-add-to-registry-wrapper .asgr-add-to-registry-message {
	display: block;
	margin-top: 0.25em;
	font-size: 0.9em;
}
.asgr-add-to-registry-message.asgr-success {
	color: #0a0;
}
.asgr-add-to-registry-message.asgr-error {
	color: #c00;
}

/* Registry public page - Brand: #FFFFFF, #F7F7F7, #2E3192, #DD3432 */
.asgr-registry-public {
	--asgr-white: #FFFFFF;
	--asgr-off-white: #F7F7F7;
	--asgr-navy: #2E3192;
	--asgr-cta: #DD3432;
	--asgr-cta-hover: #c42d2b;
	--asgr-text: #1a1a2e;
	--asgr-text-muted: #475569;
	max-width: 1200px;
	margin: 0 auto;
	padding: 1.5rem;
	background: var(--asgr-white);
}

.asgr-registry-public .woocommerce-message {
	background: var(--asgr-off-white);
	border-left: 4px solid var(--asgr-navy);
	padding: 1rem 1.25rem;
	margin-bottom: 1.5rem;
}

/* Registry hero: image background, details left bottom, share right */
.asgr-registry-hero {
	background-size: cover;
	background-position: center;
	background-repeat: no-repeat;
	min-height: 420px;
	display: flex;
	align-items: flex-end;
	margin-bottom: 3rem;
}

.asgr-registry-hero-content {
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: 2rem;
	width: 100%;
	padding: 2.5rem 2rem;
}

.asgr-registry-hero-details {
	flex: 1;
	min-width: 0;
}

.asgr-registry-badge {
	display: block;
	font-size: 0.7rem;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.12em;
	color: rgba(255, 255, 255, 0.9);
	margin-bottom: 0.35em;
}

.asgr-registry-couple-names {
	margin: 0;
	font-size: 2rem;
	font-weight: 600;
	letter-spacing: -0.02em;
	line-height: 1.2;
	color: #fff;
}

.asgr-registry-event-date {
	margin: 0.25em 0 0;
	font-size: 1rem;
	font-weight: 400;
	color: rgba(255, 255, 255, 0.9);
	line-height: 1.4;
}

.asgr-registry-guest-message {
	margin: 0.5em 0 0;
	padding: 0;
	background: transparent;
	border: none;
}

.asgr-registry-guest-message p {
	margin: 0;
	font-size: 0.9375rem;
	font-weight: 400;
	line-height: 1.6;
	color: rgba(255, 255, 255, 0.85);
}

.asgr-registry-secondary-actions {
	flex-shrink: 0;
	padding: 1.25rem 1.5rem;
	background: rgba(255, 255, 255, 0.95);
	backdrop-filter: blur(8px);
}

.asgr-registry-secondary-actions .asgr-share-buttons {
	margin: 0;
}

.asgr-registry-secondary-actions .asgr-share-label {
	color: var(--asgr-text-muted);
	font-size: 0.8125rem;
}

.asgr-registry-secondary-actions .button,
.asgr-registry-secondary-actions a.button {
	background: #fff !important;
	border: 1px solid #e5e5e5 !important;
	color: var(--asgr-text) !important;
	margin-right: 0.5rem;
	margin-bottom: 0.25rem;
}

.asgr-registry-secondary-actions .button:hover,
.asgr-registry-secondary-actions a.button:hover {
	background: #fafafa !important;
	border-color: #d0d0d0 !important;
}

/* Hero without an uploaded cover: readable names on a light card, not white-on-empty overlay */
.asgr-registry-hero--no-photo {
	min-height: 0;
	align-items: stretch;
	padding: 1.5rem 0 0;
	margin-bottom: 2rem;
	background-size: cover;
}
.asgr-registry-hero--no-photo .asgr-registry-hero-content {
	align-items: stretch;
	padding: 0 2rem 2rem;
	gap: 1rem;
}
.asgr-registry-hero--no-photo .asgr-registry-hero-details {
	background: rgba(255, 255, 255, 0.98);
	padding: 1.5rem 1.75rem;
	border-radius: 10px;
	box-shadow: 0 8px 32px rgba(15, 23, 42, 0.12);
}
.asgr-registry-hero--no-photo .asgr-registry-badge {
	color: var(--asgr-navy);
	opacity: 0.75;
}
.asgr-registry-hero--no-photo .asgr-registry-couple-names {
	color: var(--asgr-navy);
}
.asgr-registry-hero--no-photo .asgr-registry-event-date {
	color: var(--asgr-text-muted);
}
.asgr-registry-hero--no-photo .asgr-registry-guest-message p {
	color: var(--asgr-text-muted);
}
.asgr-registry-hero--no-photo .asgr-registry-secondary-actions {
	border-radius: 10px;
	box-shadow: 0 4px 20px rgba(15, 23, 42, 0.08);
}

.asgr-registry-items h2 {
	margin-bottom: 1.5rem;
	color: var(--asgr-navy);
	font-size: 1.5rem;
	font-weight: 600;
}

.asgr-registry-items > p {
	color: var(--asgr-text-muted);
	line-height: 1.6;
}

.asgr-registry-items-list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
	gap: 1.5rem;
}

.asgr-registry-item {
	position: relative;
	background: var(--asgr-white);
	border: 1px solid rgba(46, 49, 146, 0.12);
	overflow: hidden;
	display: flex;
	flex-direction: column;
	transition: border-color 0.2s ease, box-shadow 0.25s ease, transform 0.25s ease;
	cursor: default;
}

.asgr-registry-item-remove {
	position: absolute;
	top: 0.75rem;
	right: 0.75rem;
	z-index: 2;
	padding: 0.35rem 0.6rem;
	font-size: 0.75rem;
	background: rgba(255, 255, 255, 0.95);
	border: 1px solid rgba(0, 0, 0, 0.1);
	color: #666;
	cursor: pointer;
	transition: color 0.2s ease, background 0.2s ease;
}
.asgr-registry-item-remove:hover {
	color: var(--asgr-cta, #DD3432);
	background: #fff;
}
.asgr-registry-item-remove.asgr-loading {
	opacity: 0.7;
	pointer-events: none;
}

.asgr-registry-item:hover {
	border-color: rgba(46, 49, 146, 0.25);
	box-shadow: 0 8px 24px rgba(46, 49, 146, 0.08);
	transform: translateY(-2px);
}

.asgr-registry-item-image {
	aspect-ratio: 1;
	overflow: hidden;
	background: var(--asgr-off-white);
}

.asgr-registry-item-image a {
	display: block;
	cursor: pointer;
}

.asgr-registry-item-image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.25s ease;
}

.asgr-registry-item:hover .asgr-registry-item-image img {
	transform: scale(1.03);
}

.asgr-registry-item-details {
	padding: 1.25rem;
	flex: 1;
	display: flex;
	flex-direction: column;
}

.asgr-registry-item-title {
	margin: 0 0 0.5em;
	font-size: 1rem;
	font-weight: 600;
	color: var(--asgr-text);
}

.asgr-registry-item-title a {
	text-decoration: none;
	color: inherit;
	transition: color 0.2s ease;
	cursor: pointer;
}

.asgr-registry-item-title a:hover {
	color: var(--asgr-navy);
}

.asgr-registry-item-price {
	margin: 0 0 0.5em;
	font-weight: 600;
	color: var(--asgr-navy);
}

.asgr-registry-item-remaining {
	margin: 0 0 1rem;
	font-size: 0.875rem;
	color: var(--asgr-text-muted);
}

.asgr-registry-gift-message-row {
	margin: 0 0 1rem;
}
.asgr-registry-gift-message-row label {
	display: block;
	margin-bottom: 0.35rem;
	font-weight: 500;
	color: var(--asgr-text);
}
.asgr-gift-message-input {
	width: 100%;
	padding: 0.5rem 0.75rem;
	border: 1px solid rgba(46, 49, 146, 0.2);
	font-size: 0.9375rem;
	resize: vertical;
	min-height: 3em;
}
.asgr-gift-message-input:focus {
	outline: none;
	border-color: var(--asgr-navy);
}

.asgr-registry-quantity-row {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	margin: 0 0 1rem;
}
.asgr-registry-quantity-row label {
	font-weight: 500;
	color: var(--asgr-text);
}
.asgr-registry-qty-input {
	width: 4em;
	padding: 0.35rem 0.5rem;
	border: 1px solid rgba(46, 49, 146, 0.2);
}

.asgr-registry-add-to-cart .button,
.asgr-registry-cta {
	width: 100%;
	margin-top: auto;
	background: var(--asgr-cta) !important;
	border-color: var(--asgr-cta) !important;
	color: var(--asgr-white) !important;
	padding: 0.75rem 1rem;
	font-weight: 600;
	transition: background 0.2s ease, opacity 0.2s ease;
	cursor: pointer;
}

.asgr-registry-add-to-cart .button:hover,
.asgr-registry-cta:hover {
	background: var(--asgr-cta-hover) !important;
	border-color: var(--asgr-cta-hover) !important;
	opacity: 0.95;
}

/* Password gate */
.asgr-registry-password-gate {
	max-width: 420px;
	margin: 3rem auto;
	padding: 2.5rem;
	background: var(--asgr-white);
	border: 1px solid rgba(46, 49, 146, 0.15);
}

.asgr-password-gate-title {
	margin: 0 0 0.5rem;
	color: var(--asgr-navy);
	font-size: 1.25rem;
	font-weight: 600;
}

.asgr-password-gate-desc {
	margin: 0 0 1.5rem;
	color: var(--asgr-text-muted);
	font-size: 0.9375rem;
	line-height: 1.5;
}

.asgr-password-form label {
	display: block;
	margin-bottom: 0.5rem;
	font-weight: 500;
	color: var(--asgr-text);
}

.asgr-password-form .asgr-password-input,
.asgr-password-form input[type="password"] {
	width: 100%;
	padding: 0.75rem 1rem;
	margin-bottom: 1.25rem;
	border: 1px solid rgba(46, 49, 146, 0.2);
	font-size: 1rem;
	transition: border-color 0.2s ease;
}

.asgr-password-form input[type="password"]:focus {
	outline: none;
	border-color: var(--asgr-navy);
}

.asgr-registry-add-to-cart .button:focus,
.asgr-registry-cta:focus {
	outline: none;
}

/* Cover photo upload - modern drag-drop */
.asgr-cover-upload-row label {
	display: block;
	margin-bottom: 0.5rem;
}
.asgr-cover-upload {
	position: relative;
}
.asgr-cover-input {
	position: absolute;
	width: 0.1px;
	height: 0.1px;
	opacity: 0;
	overflow: hidden;
	z-index: -1;
}
.asgr-cover-dropzone {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	min-height: 180px;
	padding: 2rem;
	border: 2px dashed #d0d0d0;
	background: #fafafa;
	cursor: pointer;
	transition: border-color 0.2s ease, background 0.2s ease;
}
.asgr-cover-dropzone:hover,
.asgr-cover-dropzone.asgr-cover-dragover {
	border-color: var(--asgr-navy, #2E3192);
	background: #f5f5ff;
}
.asgr-cover-dropzone:focus {
	outline: none;
	border-color: var(--asgr-navy, #2E3192);
	box-shadow: 0 0 0 2px rgba(46, 49, 146, 0.2);
}
.asgr-cover-dropzone-icon {
	display: block;
	width: 48px;
	height: 48px;
	margin-bottom: 1rem;
	background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%23999'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M4 16l4.586-4.586a2 2 0 012.828 0L16 16m-2-2l1.586-1.586a2 2 0 012.828 0L20 14m-6-6h.01M6 20h12a2 2 0 002-2V6a2 2 0 00-2-2H6a2 2 0 00-2 2v12a2 2 0 002 2z'/%3E%3C/svg%3E") center/contain no-repeat;
}
.asgr-cover-dropzone-text {
	font-size: 1rem;
	font-weight: 500;
	color: #333;
	margin-bottom: 0.25rem;
}
.asgr-cover-dropzone-or {
	font-size: 0.875rem;
	color: #888;
	margin-bottom: 0.25rem;
}
.asgr-cover-dropzone-browse {
	font-size: 0.9375rem;
	font-weight: 600;
	color: var(--asgr-navy, #2E3192);
	text-decoration: underline;
	text-underline-offset: 0.15em;
	margin-bottom: 0.5rem;
}
.asgr-cover-dropzone-hint {
	font-size: 0.75rem;
	color: #999;
}
.asgr-cover-upload.asgr-has-cover .asgr-cover-dropzone {
	display: none;
}
.asgr-cover-preview-wrap {
	margin-top: 0;
}
.asgr-cover-preview-inner {
	position: relative;
	max-width: 320px;
}
.asgr-cover-preview-img {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 4 / 3;
	object-fit: cover;
	border: 1px solid #e5e5e5;
}
.asgr-cover-preview-actions {
	display: flex;
	gap: 0.75rem;
	margin-top: 0.75rem;
}
.asgr-cover-change,
.asgr-cover-remove {
	font-size: 0.875rem;
	font-weight: 500;
	cursor: pointer;
}
.asgr-cover-change {
	background: none;
	border: none;
	padding: 0;
	color: var(--asgr-navy, #2E3192);
	text-decoration: underline;
}
.asgr-cover-change:hover {
	opacity: 0.85;
}
.asgr-cover-remove {
	display: inline-block;
	color: #666;
}
.asgr-cover-remove input {
	margin-right: 0.35em;
}

@media (max-width: 768px) {
	.asgr-registry-public {
		padding: 1rem;
	}
	.asgr-registry-hero {
		min-height: 360px;
	}
	.asgr-registry-hero--no-photo {
		min-height: 0;
		padding-top: 1rem;
		margin-bottom: 1.5rem;
	}
	.asgr-registry-hero--no-photo .asgr-registry-hero-content {
		padding: 0 1.25rem 1.25rem;
	}
	.asgr-registry-hero--no-photo .asgr-registry-hero-details {
		padding: 1.15rem 1.25rem;
	}
	.asgr-registry-hero-content {
		flex-direction: column;
		align-items: flex-start;
		padding: 2rem 1.25rem;
		gap: 1rem;
	}
	.asgr-registry-secondary-actions {
		width: 100%;
		padding: 0.75rem 0.85rem;
		border-radius: 8px;
		box-sizing: border-box;
	}
	.asgr-registry-secondary-actions .asgr-share-buttons {
		display: grid;
		grid-template-columns: repeat(3, minmax(0, 1fr));
		gap: 0.35rem;
		width: 100%;
	}
	.asgr-registry-secondary-actions .asgr-share-label {
		grid-column: 1 / -1;
		margin: 0 0 0.15rem;
		font-size: 0.6875rem;
		font-weight: 600;
		text-transform: uppercase;
		letter-spacing: 0.08em;
	}
	.asgr-registry-secondary-actions .asgr-share-copy-feedback {
		grid-column: 1 / -1;
		margin: 0;
		font-size: 0.6875rem;
		line-height: 1.3;
		text-align: center;
	}
	.asgr-registry-secondary-actions .button,
	.asgr-registry-secondary-actions a.button {
		width: 100%;
		min-height: 0;
		margin: 0 !important;
		padding: 0.4rem 0.25rem !important;
		font-size: 0.6875rem !important;
		font-weight: 500 !important;
		line-height: 1.25 !important;
		text-align: center;
		white-space: normal;
		border-radius: 4px !important;
	}
	.asgr-registry-couple-names {
		font-size: 1.5rem;
	}
	.asgr-registry-items-list {
		grid-template-columns: 1fr;
	}
}

@media (max-width: 380px) {
	.asgr-registry-secondary-actions .asgr-share-buttons {
		grid-template-columns: 1fr 1fr;
	}
	.asgr-registry-secondary-actions .asgr-share-copy {
		grid-column: 1 / -1;
	}
}

/* Couples grid */
.asgr-couples-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
	gap: 1.5em;
	margin: 1em 0;
}

.asgr-couples-card {
	display: block;
	text-decoration: none;
	color: inherit;
	background: #fff;
	overflow: hidden;
	transition: box-shadow 0.2s ease;
}
.asgr-couples-card:hover {
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

.asgr-couples-card-img-wrap {
	position: relative;
	aspect-ratio: 3 / 4;
	overflow: hidden;
	background: #f5f5f5;
}
.asgr-couples-card-img-wrap--placeholder {
	background: #ffffff;
}
.asgr-couples-card-img-wrap .asgr-couples-card-img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.3s ease;
}
.asgr-couples-card:hover .asgr-couples-card-img {
	transform: scale(1.02);
}

.asgr-couples-card-content {
	padding: 1.25em 1.5em;
	text-align: center;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 0.25em;
}

.asgr-couples-card-names {
	margin: 0;
	font-size: 1.1em;
	font-weight: 600;
	line-height: 1.3;
	color: #1a1a1a;
	letter-spacing: -0.01em;
}

.asgr-couples-card-meta {
	margin: 0;
	font-size: 0.8125em;
	font-weight: 400;
	color: #6b6b6b;
	line-height: 1.4;
}

.asgr-couples-card-meta-sep {
	opacity: 0.7;
	font-weight: 300;
}

.asgr-couples-card-date,
.asgr-couples-card-location {
	margin: 0;
	color: inherit;
}

.asgr-couples-card-cta {
	display: inline-block;
	margin-top: 0.5em;
	font-size: 0.8125em;
	font-weight: 500;
	color: #1a1a1a;
	text-decoration: underline;
	text-underline-offset: 0.2em;
	transition: opacity 0.2s ease;
}
.asgr-couples-card:hover .asgr-couples-card-cta {
	opacity: 0.7;
}

/* Flat registry cards (search / [asgr_search_results] directory list) */
.asgr-couples-card--flat {
	border: 1px solid rgba(26, 26, 46, 0.12);
	border-radius: 10px;
	box-shadow: none;
	height: 100%;
	display: flex;
	flex-direction: column;
	background: #fff;
}

.asgr-couples-card--flat:hover {
	box-shadow: none;
	border-color: rgba(46, 49, 146, 0.35);
}

.asgr-couples-card--flat .asgr-couples-card-img-wrap {
	aspect-ratio: 4 / 3;
}

.asgr-couples-card--flat .asgr-couples-card-img-wrap--placeholder {
	background: #f1f5f9;
}

.asgr-couples-card--flat:hover .asgr-couples-card-img {
	transform: none;
}

.asgr-couples-card--flat .asgr-couples-card-content {
	padding: 1rem 1.15rem 1.25rem;
	text-align: left;
	align-items: flex-start;
	flex: 1;
}

.asgr-couples-card--flat .asgr-couples-card-names {
	font-size: 1rem;
	color: #1a1a2e;
}

.asgr-couples-card--flat .asgr-couples-card-meta {
	color: #64748b;
}

.asgr-couples-card--flat .asgr-couples-card-cta {
	margin-top: auto;
	padding-top: 0.65rem;
	font-size: 0.8125rem;
	font-weight: 600;
	color: #2e3192;
	text-decoration: none;
}

.asgr-couples-card--flat:hover .asgr-couples-card-cta {
	opacity: 1;
	text-decoration: underline;
}

/* ============================================
   Registry search — inline field + button
   ============================================ */
.asgr-registry-search {
	margin: 1em 0;
}

/* Outer flex row — field stretches, button stays fixed */
.asgr-search-fields {
	display: flex;
	flex-direction: row;
	align-items: stretch;
	flex-wrap: nowrap;
	gap: 0;
	margin: 0 0 1em;
	width: 100%;
}

/* Strip all WooCommerce block formatting off the p.form-row wrapper */
.asgr-search-fields .form-row.asgr-search-field-wrap {
	flex: 1 1 auto;
	min-width: 0;
	width: auto !important;
	margin: 0 !important;
	padding: 0 !important;
	float: none !important;
	clear: none !important;
}

/* Make the woocommerce-input-wrapper fill the row */
.asgr-search-fields .form-row.asgr-search-field-wrap .woocommerce-input-wrapper {
	display: block;
	width: 100%;
}

/* The actual input — full width, flush right border so it joins the button */
.asgr-search-fields .form-row.asgr-search-field-wrap .input-text,
.asgr-search-fields .asgr-search-input {
	display: block;
	width: 100%;
	height: 100%;
	margin: 0;
	padding: 0.65em 1em;
	border: 1px solid rgba(46, 49, 146, 0.2);
	border-right: none;
	border-radius: 4px 0 0 4px;
	box-sizing: border-box;
	font-size: 0.9375rem;
	line-height: 1.5;
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.asgr-search-fields .form-row.asgr-search-field-wrap .input-text:focus,
.asgr-search-fields .asgr-search-input:focus {
	outline: none;
	border-color: var(--asgr-navy, #2E3192);
	box-shadow: inset 0 0 0 1px var(--asgr-navy, #2E3192);
	position: relative;
	z-index: 1;
}

/* Hide the WooCommerce label — placeholder does the job */
.asgr-search-fields .form-row.asgr-search-field-wrap label {
	display: none !important;
}

/* Submit button — attached to the right of the input */
.asgr-search-submit {
	flex: 0 0 auto;
	margin: 0;
	padding: 0.65em 1.5em;
	border: 1px solid var(--asgr-navy, #2E3192);
	border-radius: 0 4px 4px 0;
	background: var(--asgr-navy, #2E3192);
	color: #fff;
	font-size: 0.9375rem;
	font-weight: 600;
	line-height: 1.5;
	cursor: pointer;
	white-space: nowrap;
	transition: background 0.2s ease, border-color 0.2s ease;
}
.asgr-search-submit:hover {
	background: #252880;
	border-color: #252880;
}
.asgr-search-submit:focus {
	outline: none;
	box-shadow: 0 0 0 2px rgba(46, 49, 146, 0.3);
}

/* Reset button if present */
.asgr-search-reset {
	flex: 0 0 auto;
	margin-left: 0.5rem;
	padding: 0.65em 1em;
	border: 1px solid #d0d0d0;
	border-radius: 4px;
	background: #fff;
	color: #555;
	font-size: 0.9375rem;
	cursor: pointer;
	white-space: nowrap;
	transition: border-color 0.2s ease, color 0.2s ease;
}
.asgr-search-reset:hover {
	border-color: #aaa;
	color: #333;
}

.asgr-search-results .asgr-search-results-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr));
	gap: 1.25rem;
	margin-top: 1em;
	margin-bottom: 1em;
	align-items: stretch;
}

@media (min-width: 900px) {
	.asgr-search-results .asgr-search-results-grid {
		gap: 1.5rem;
	}
}

/* ============================================
   Display Mode 1: Full Grid (Find a Registry)
   ============================================ */
.asgr-grid {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 1.5rem;
	margin: 1em 0;
}

.asgr-grid-cols-4 {
	grid-template-columns: repeat(4, 1fr);
}

@media (max-width: 1100px) {
	.asgr-grid,
	.asgr-grid-cols-4 {
		grid-template-columns: repeat(3, 1fr);
	}
}
@media (max-width: 768px) {
	.asgr-grid,
	.asgr-grid-cols-4 {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 1rem;
	}
}
@media (max-width: 480px) {
	.asgr-grid,
	.asgr-grid-cols-4 {
		gap: 0.75rem;
	}
}

/* Couples carousel (Splide): mobile — contain width, shorter image ratio, centered card cap */
#asgr-couples-carousel.splide {
	box-sizing: border-box;
	max-width: 100%;
	overflow: hidden;
}
#asgr-couples-carousel .splide__slide .asgr-couples-card {
	width: 100%;
	max-width: 100%;
	min-width: 0;
	margin-inline: auto;
}
#asgr-couples-carousel .splide__slide {
	box-sizing: border-box;
	min-width: 0;
}

@media (max-width: 768px) {
	#asgr-couples-carousel .asgr-couples-card-img-wrap {
		/* 3:4 at full phone width is very tall; use wider aspect for a shorter block */
		aspect-ratio: 4 / 3;
		max-height: min(52vh, 320px);
	}
	#asgr-couples-carousel .asgr-couples-card-img-wrap .asgr-couples-card-img {
		object-position: center center;
	}
	#asgr-couples-carousel .splide__slide .asgr-couples-card {
		max-width: min(100%, 28rem);
	}
	#asgr-couples-carousel .asgr-couples-card-content {
		padding: 1rem 1.1rem 1.15rem;
	}
	#asgr-couples-carousel .asgr-couples-card-names {
		font-size: 1rem;
	}
	#asgr-couples-carousel .splide__arrow {
		width: 2.25rem;
		height: 2.25rem;
	}
	#asgr-couples-carousel .splide__arrow svg {
		width: 1.15em;
		height: 1.15em;
	}
}

@media (max-width: 480px) {
	#asgr-couples-carousel .asgr-couples-card-img-wrap {
		aspect-ratio: 5 / 4;
		max-height: min(48vh, 260px);
	}
	#asgr-couples-carousel .asgr-couples-card-meta {
		font-size: 0.78rem;
	}
	#asgr-couples-carousel .asgr-couples-card-cta {
		font-size: 0.78rem;
	}
}

/* My Account dashboard */
.asgr-registry-dashboard {
	max-width: 900px;
	margin: 0 auto;
	padding: 0 0 2rem;
}

.asgr-dashboard-header {
	margin-bottom: 1.5rem;
}

.asgr-dashboard-intro {
	margin: 0 0 1rem;
	color: var(--asgr-text-muted, #475569);
	line-height: 1.5;
}

.asgr-dashboard-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	margin: 0;
}

.asgr-dashboard-share-box {
	background: var(--asgr-off-white, #F7F7F7);
	border: 1px solid rgba(46, 49, 146, 0.12);
	border-radius: 8px;
	padding: 1.25rem 1.5rem;
	margin-bottom: 2rem;
}

.asgr-dashboard-share-title {
	margin: 0 0 0.35rem;
	font-size: 1rem;
	font-weight: 600;
	color: var(--asgr-text, #1a1a2e);
}

.asgr-dashboard-share-desc {
	margin: 0 0 1rem;
	font-size: 0.875rem;
	color: var(--asgr-text-muted, #475569);
	line-height: 1.5;
}

.asgr-dashboard-share-box .asgr-share-buttons {
	margin: 0;
}

.asgr-dashboard-items {
	margin-top: 2rem;
}

.asgr-dashboard-items-title {
	margin: 0 0 1rem;
	font-size: 1.125rem;
	font-weight: 600;
	color: var(--asgr-text, #1a1a2e);
}

.asgr-dashboard-empty {
	text-align: center;
	padding: 2.5rem 1.5rem;
	background: var(--asgr-off-white, #F7F7F7);
	border: 1px dashed rgba(46, 49, 146, 0.2);
	border-radius: 8px;
}

.asgr-dashboard-empty-text {
	margin: 0 0 1rem;
	color: var(--asgr-text-muted, #475569);
}

.asgr-dashboard-items-list {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
	gap: 1.25rem;
	list-style: none;
	margin: 0;
	padding: 0;
}

.asgr-dashboard-item {
	position: relative;
	display: flex;
	flex-direction: column;
	background: var(--asgr-white, #fff);
	border: 1px solid rgba(46, 49, 146, 0.12);
	border-radius: 8px;
	overflow: hidden;
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.asgr-dashboard-item:hover {
	border-color: rgba(46, 49, 146, 0.25);
	box-shadow: 0 4px 12px rgba(46, 49, 146, 0.08);
}

.asgr-dashboard-item--fulfilled {
	opacity: 0.85;
}

.asgr-dashboard-item-remove {
	position: absolute;
	top: 0.5rem;
	right: 0.5rem;
	z-index: 2;
	padding: 0.3rem 0.5rem;
	font-size: 0.75rem;
	background: rgba(255, 255, 255, 0.95);
	border: 1px solid rgba(0, 0, 0, 0.1);
	border-radius: 4px;
	color: #666;
	cursor: pointer;
	transition: color 0.2s ease, background 0.2s ease;
}

.asgr-dashboard-item-remove:hover {
	color: var(--asgr-cta, #DD3432);
	background: #fff;
}

.asgr-dashboard-item-image {
	aspect-ratio: 1;
	overflow: hidden;
	background: var(--asgr-off-white, #F7F7F7);
}

.asgr-dashboard-item-image a {
	display: block;
	height: 100%;
}

.asgr-dashboard-item-image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.asgr-dashboard-item-details {
	padding: 1rem;
	flex: 1;
	display: flex;
	flex-direction: column;
	gap: 0.25rem;
}

.asgr-dashboard-item-title {
	margin: 0;
	font-size: 0.9375rem;
	font-weight: 600;
	line-height: 1.3;
}

.asgr-dashboard-item-title a {
	color: inherit;
	text-decoration: none;
}

.asgr-dashboard-item-title a:hover {
	text-decoration: underline;
}

.asgr-dashboard-item-price {
	margin: 0;
	font-size: 0.875rem;
	font-weight: 500;
	color: var(--asgr-navy, #2E3192);
}

.asgr-dashboard-item-status {
	margin: 0;
	font-size: 0.8125rem;
	color: var(--asgr-text-muted, #475569);
}

.asgr-dashboard-item-badge {
	display: inline-block;
	padding: 0.2rem 0.5rem;
	font-size: 0.75rem;
	font-weight: 500;
	background: rgba(34, 197, 94, 0.15);
	color: #15803d;
	border-radius: 4px;
}

.asgr-dashboard-item-link {
	font-size: 0.8125rem;
	margin-top: 0.5rem;
	color: var(--asgr-navy, #2E3192);
	text-decoration: none;
}

.asgr-dashboard-item-link:hover {
	text-decoration: underline;
}

/* Share buttons */
.asgr-share-buttons {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.5rem;
}

.asgr-share-label {
	margin-right: 0.25rem;
	font-size: 0.875rem;
}

.asgr-share-copy-feedback {
	font-size: 0.875rem;
	color: #22c55e;
}

/* Return to registry link in cart */
.asgr-return-to-registry {
	margin-bottom: 1rem;
}

/* Empty state CTAs */
.asgr-empty-state {
	text-align: center;
	padding: 3rem 2rem;
	background: var(--asgr-off-white);
	border: 1px dashed rgba(46, 49, 146, 0.25);
	transition: border-color 0.2s ease, background 0.2s ease;
}
.asgr-empty-state:hover {
	border-color: rgba(46, 49, 146, 0.2);
}
.asgr-empty-state-title {
	margin: 0 0 0.5rem;
	font-size: 1.25rem;
	font-weight: 600;
	color: var(--asgr-text);
}
.asgr-empty-state-desc {
	margin: 0 0 1.5rem;
	color: var(--asgr-text-muted);
	line-height: 1.5;
}
.asgr-empty-state .asgr-registry-cta {
	display: inline-block;
	width: auto;
	text-decoration: none;
}