/* ============================================================
   boy or girl — Product Quick-View Modal
   ============================================================ */

/* ── <dialog> element base ─────────────────────────────────── */

#bog-product-modal {
	position: fixed;
	inset: 0;
	width: 100%;
	max-width: 100%;
	height: 100%;
	max-height: 100%;
	margin: 0;
	padding: 0;
	border: none;
	background: transparent;
	overflow: hidden;
	z-index: 9999;
	display: flex;
	align-items: center;
	justify-content: center;
}

/* Hide natively when closed */
#bog-product-modal:not([open]) {
	display: none;
}

/* ── Backdrop ──────────────────────────────────────────────── */

#bog-product-modal::backdrop {
	background: rgba(13, 9, 20, 0.82);
	backdrop-filter: blur(6px);
	-webkit-backdrop-filter: blur(6px);
}

.bog-modal-backdrop {
	position: fixed;
	inset: 0;
	background: rgba(13, 9, 20, 0.82);
	backdrop-filter: blur(6px);
	-webkit-backdrop-filter: blur(6px);
	z-index: -1;
	cursor: pointer;
}

/* ── Modal panel ───────────────────────────────────────────── */

.bog-modal-panel {
	position: relative;
	background: #1a1228;
	border: 1px solid rgba(255, 255, 255, 0.08);
	border-radius: 24px;
	box-shadow: 0 32px 80px rgba(0, 0, 0, 0.65);
	width: min(680px, calc(100vw - 2rem));
	max-height: calc(100vh - 2rem);
	overflow-y: auto;
	overscroll-behavior: contain;
	animation: bog-modal-in 0.28s cubic-bezier(0.34, 1.26, 0.64, 1) both;
}

@keyframes bog-modal-in {
	from { opacity: 0; transform: scale(0.92) translateY(16px); }
	to   { opacity: 1; transform: scale(1)    translateY(0);    }
}

/* ── Close button ──────────────────────────────────────────── */

.bog-modal-close {
	position: absolute;
	top: 1rem;
	right: 1rem;
	z-index: 2;
	width: 36px;
	height: 36px;
	border-radius: 50%;
	border: 1px solid rgba(255, 255, 255, 0.12);
	background: rgba(255, 255, 255, 0.06);
	color: rgba(253, 244, 231, 0.70);
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 1.1rem;
	line-height: 1;
	transition: background 0.2s ease, color 0.2s ease;
	padding: 0;
}

.bog-modal-close:hover,
.bog-modal-close:focus-visible {
	background: rgba(255, 255, 255, 0.14);
	color: #FDF4E7;
	outline: none;
}

/* ── Product image ─────────────────────────────────────────── */

.bog-modal-img-wrap {
	width: 100%;
	aspect-ratio: 4 / 3;
	overflow: hidden;
	border-radius: 20px 20px 0 0;
	background: #0d1a30;
	flex-shrink: 0;
	position: relative;
}

.bog-modal-img-wrap img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: opacity 0.3s ease;
}

/* ── Gallery navigation ──────────────────────────────────── */

.bog-modal-gallery {
	position: relative;
	width: 100%;
	height: 100%;
}

.bog-modal-gallery-nav {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	width: 36px;
	height: 36px;
	border-radius: 50%;
	border: 1px solid rgba(255, 255, 255, 0.15);
	background: rgba(0, 0, 0, 0.6);
	color: rgba(253, 244, 231, 0.8);
	cursor: pointer;
	display: none;
	align-items: center;
	justify-content: center;
	font-size: 1rem;
	line-height: 1;
	transition: all 0.2s ease;
	padding: 0;
	z-index: 2;
	opacity: 0;
	pointer-events: none;
}

/* Only show navigation when there are multiple images */
.bog-modal-gallery.has-multiple-images .bog-modal-gallery-nav {
	display: flex;
	opacity: 0;
	pointer-events: none;
}

.bog-modal-gallery.has-multiple-images:hover .bog-modal-gallery-nav {
	opacity: 1;
	pointer-events: auto;
}

.bog-modal-gallery-nav:hover {
	background: rgba(0, 0, 0, 0.8);
	color: #FDF4E7;
	border-color: rgba(255, 255, 255, 0.25);
}

.bog-modal-gallery-nav.prev {
	left: 12px;
}

.bog-modal-gallery-nav.next {
	right: 12px;
}

.bog-modal-gallery-indicators {
	position: absolute;
	bottom: 12px;
	left: 50%;
	transform: translateX(-50%);
	display: none;
	gap: 6px;
	z-index: 2;
}

/* Only show indicators when there are multiple images */
.bog-modal-gallery.has-multiple-images .bog-modal-gallery-indicators {
	display: flex;
}

.bog-modal-gallery-dot {
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.4);
	cursor: pointer;
	transition: background-color 0.2s ease;
}

.bog-modal-gallery-dot.active {
	background: #C8956C;
}

.bog-modal-gallery-counter {
	position: absolute;
	top: 12px;
	right: 12px;
	background: rgba(0, 0, 0, 0.6);
	color: rgba(253, 244, 231, 0.8);
	border-radius: 12px;
	padding: 4px 8px;
	font-size: 0.7rem;
	font-weight: 600;
	z-index: 2;
	display: none;
}

/* Only show counter when there are multiple images */  
.bog-modal-gallery.has-multiple-images .bog-modal-gallery-counter {
	display: block;
}

.bog-modal-no-img {
	width: 100%;
	height: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 5rem;
	background: linear-gradient(135deg, #1a1228 0%, #0d1a30 100%);
}

/* ── Body ──────────────────────────────────────────────────── */

.bog-modal-body {
	padding: 1.75rem 1.75rem 2rem;
}

/* Category pill */
.bog-modal-category {
	display: inline-block;
	font-size: 0.65rem;
	font-weight: 700;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: #C8956C;
	background: rgba(200, 149, 108, 0.12);
	border: 1px solid rgba(200, 149, 108, 0.22);
	border-radius: 100px;
	padding: 0.28rem 0.8rem;
	margin-bottom: 0.75rem;
	font-family: var(--bog-font, system-ui, sans-serif);
}

/* Name */
.bog-modal-name {
	font-size: clamp(1.2rem, 4vw, 1.65rem);
	font-weight: 900;
	color: #FDF4E7;
	letter-spacing: -0.035em;
	line-height: 1.1;
	margin: 0 0 0.65rem;
	font-family: var(--bog-font, system-ui, sans-serif);
}

/* Description */
.bog-modal-desc {
	font-size: 0.9rem;
	color: rgba(253, 244, 231, 0.57);
	line-height: 1.65;
	margin: 0 0 1.25rem;
	font-family: var(--bog-font, system-ui, sans-serif);
}

/* Price row */
.bog-modal-price-row {
	display: flex;
	align-items: baseline;
	gap: 0.35rem;
	margin-bottom: 1.5rem;
}

.bog-modal-price {
	font-size: 2rem;
	font-weight: 900;
	color: #FDF4E7;
	letter-spacing: -0.04em;
	font-variant-numeric: tabular-nums;
	font-family: var(--bog-font, system-ui, sans-serif);
}

.bog-modal-price-curr {
	font-size: 1.1rem;
	font-weight: 700;
	color: rgba(253, 244, 231, 0.50);
}

/* ── Included items (grouped children) ────────────────────── */

.bog-modal-includes {
	margin-bottom: 1.5rem;
}

.bog-modal-includes-title {
	font-size: 0.7rem;
	font-weight: 700;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: rgba(253, 244, 231, 0.38);
	margin: 0 0 0.85rem;
	font-family: var(--bog-font, system-ui, sans-serif);
	display: flex;
	align-items: center;
	gap: 0.4rem;
}

.bog-modal-includes-title::before {
	content: '✦';
	color: #C8956C;
	font-size: 0.55rem;
}

.bog-modal-includes-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
	gap: 0.65rem;
}

.bog-modal-inc-item {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 0.4rem;
	text-align: center;
	cursor: default;
}

.bog-modal-inc-img {
	width: 72px;
	height: 72px;
	border-radius: 12px;
	overflow: hidden;
	background: rgba(255, 255, 255, 0.05);
	border: 1px solid rgba(255, 255, 255, 0.09);
	display: flex;
	align-items: center;
	justify-content: center;
	transition: border-color 0.2s ease, transform 0.2s ease;
	flex-shrink: 0;
}

.bog-modal-inc-item:hover .bog-modal-inc-img {
	border-color: rgba(200, 149, 108, 0.45);
	transform: translateY(-2px);
}

.bog-modal-inc-img img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.bog-modal-inc-no-img {
	font-size: 2rem;
}

.bog-modal-inc-name {
	font-size: 0.68rem;
	color: rgba(253, 244, 231, 0.55);
	line-height: 1.3;
	font-family: var(--bog-font, system-ui, sans-serif);
	word-break: break-word;
}

.bog-modal-inc-price {
	font-size: 0.65rem;
	font-weight: 700;
	color: #C8956C;
	font-family: var(--bog-font, system-ui, sans-serif);
}

/* ── Divider ───────────────────────────────────────────────── */

.bog-modal-divider {
	height: 1px;
	background: rgba(255, 255, 255, 0.07);
	margin: 0 0 1.5rem;
}

/* ── Actions ───────────────────────────────────────────────── */

.bog-modal-actions {
	display: flex;
	flex-direction: column;
	gap: 0.65rem;
}

/* Messenger order CTA */
.bog-modal-cta-order {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.6rem;
	width: 100%;
	padding: 1rem 1.5rem;
	background: linear-gradient(135deg, #0a7cff 0%, #0062cc 100%);
	color: #fff;
	font-family: var(--bog-font, system-ui, sans-serif);
	font-size: 1rem;
	font-weight: 700;
	border-radius: 14px;
	text-decoration: none;
	box-shadow: 0 6px 24px rgba(10, 124, 255, 0.38);
	transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.bog-modal-cta-order:hover,
.bog-modal-cta-order:focus-visible {
	transform: translateY(-2px);
	box-shadow: 0 10px 32px rgba(10, 124, 255, 0.52);
	color: #fff;
	text-decoration: none;
}

/* View full page link */
.bog-modal-cta-view {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
	width: 100%;
	padding: 0.85rem 1.5rem;
	background: rgba(255, 255, 255, 0.05);
	border: 1px solid rgba(255, 255, 255, 0.09);
	color: rgba(253, 244, 231, 0.65);
	font-family: var(--bog-font, system-ui, sans-serif);
	font-size: 0.9rem;
	font-weight: 600;
	border-radius: 14px;
	text-decoration: none;
	transition: background 0.2s ease, color 0.2s ease;
}

.bog-modal-cta-view:hover,
.bog-modal-cta-view:focus-visible {
	background: rgba(255, 255, 255, 0.09);
	color: #FDF4E7;
	text-decoration: none;
}

/* ── Counter inside modal (builder items) ─────────────────── */

.bog-modal-counter {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 0.75rem;
	background: rgba(255, 255, 255, 0.06);
	border: 1px solid rgba(255, 255, 255, 0.09);
	border-radius: 14px;
	padding: 0.9rem 1.5rem;
}

.bog-modal-counter-label {
	flex: 1;
	font-size: 0.88rem;
	font-weight: 600;
	color: rgba(253, 244, 231, 0.65);
	font-family: var(--bog-font, system-ui, sans-serif);
}

.bog-modal-counter-controls {
	display: flex;
	align-items: center;
	gap: 0.6rem;
}

.bog-modal-btn-minus,
.bog-modal-btn-plus {
	width: 38px;
	height: 38px;
	border-radius: 50%;
	border: 1px solid rgba(255, 255, 255, 0.12);
	background: rgba(255, 255, 255, 0.06);
	color: #FDF4E7;
	cursor: pointer;
	font-size: 1.2rem;
	font-weight: 600;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: background 0.18s ease;
	padding: 0;
	line-height: 1;
}

.bog-modal-btn-minus:hover,
.bog-modal-btn-plus:hover {
	background: rgba(200, 149, 108, 0.20);
}

.bog-modal-count {
	min-width: 28px;
	text-align: center;
	font-size: 1.15rem;
	font-weight: 700;
	color: #FDF4E7;
	font-variant-numeric: tabular-nums;
	font-family: var(--bog-font, system-ui, sans-serif);
}

/* ── Scrollbar inside modal ────────────────────────────────── */

.bog-modal-panel::-webkit-scrollbar { width: 4px; }
.bog-modal-panel::-webkit-scrollbar-track { background: transparent; }
.bog-modal-panel::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.12); border-radius: 4px; }

/* ── Responsive ────────────────────────────────────────────── */

@media (max-width: 480px) {
	.bog-modal-panel {
		width: 100vw;
		max-height: 92vh;
		border-radius: 20px 20px 0 0;
		position: fixed;
		bottom: 0;
		left: 0;
		right: 0;
		align-self: flex-end;
		animation: bog-modal-sheet-in 0.3s cubic-bezier(0.34, 1.1, 0.64, 1) both;
	}

	#bog-product-modal {
		align-items: flex-end;
	}

	@keyframes bog-modal-sheet-in {
		from { transform: translateY(100%); opacity: 0.6; }
		to   { transform: translateY(0);    opacity: 1;   }
	}

	.bog-modal-img-wrap {
		aspect-ratio: 3 / 2;
		border-radius: 16px 16px 0 0;
	}

	.bog-modal-body {
		padding: 1.25rem 1.25rem 1.75rem;
	}

	.bog-modal-includes-grid {
		grid-template-columns: repeat(auto-fill, minmax(68px, 1fr));
	}

	.bog-modal-inc-img {
		width: 60px;
		height: 60px;
	}
}
