/* ============================================================
   FLORBLOOM PRODUCT PAGE — SAFE / SCOPED CSS
   Only styles the new Product Builder markup.
   Does NOT reset WooCommerce/theme globally.
   ============================================================ */

/* ---------- Main shell ---------- */

.florbloom-product-page {
	width: 100%;
	padding: 32px 0 72px;
	background: #fff;
	color: #211d24;
}

.florbloom-product-page__container {
	width: min(1240px, calc(100% - 48px));
	margin-left: auto;
	margin-right: auto;
}

/* ---------- Hero: desktop/laptop ---------- */

.florbloom-product-hero {
	display: grid !important;
	grid-template-columns: minmax(0, 1.08fr) minmax(360px, 0.92fr);
	gap: 48px;
	align-items: start;
	width: 100%;
}

.florbloom-product-hero__gallery,
.florbloom-product-hero__info {
	min-width: 0;
	width: 100%;
}

.florbloom-product-hero__gallery {
	position: sticky;
	top: 28px;
}

.florbloom-product-hero__info {
	padding-top: 2px;
}

/* ---------- Block wrapper ---------- */

.florbloom-product-block {
	width: 100%;
	margin-top: var(--fb-mt-d, 0px);
	margin-bottom: var(--fb-mb-d, 16px);
	font-size: var(--fb-fs-d, 16px);
	text-align: var(--fb-align, left);
}

.florbloom-product-block[data-show-desktop="no"] {
	display: none !important;
}

/* ---------- Gallery ---------- */

.florbloom-product-gallery {
	display: grid !important;
	grid-template-columns: 76px minmax(0, 1fr);
	gap: 12px;
	align-items: start;
	width: 100%;
}

.florbloom-product-gallery--desktop-right {
	grid-template-columns: minmax(0, 1fr) 76px;
}

.florbloom-product-gallery--desktop-bottom {
	grid-template-columns: 1fr;
}

.florbloom-product-gallery--desktop-bottom .florbloom-product-gallery__thumbs {
	grid-row: 2;
}

.florbloom-product-gallery--desktop-none {
	grid-template-columns: 1fr;
}

.florbloom-product-gallery__thumb-track {
	display: flex;
	flex-direction: column;
	gap: 9px;
	max-height: 560px;
	overflow-x: hidden;
	overflow-y: auto;
	scrollbar-width: thin;
}

.florbloom-product-gallery--desktop-bottom .florbloom-product-gallery__thumb-track {
	flex-direction: row;
	max-height: none;
	overflow-x: auto;
	overflow-y: hidden;
}

.florbloom-product-gallery__thumb {
	display: block !important;
	flex: 0 0 66px;
	width: 66px;
	height: 66px;
	padding: 0 !important;
	border: 1px solid #e4dfe8 !important;
	border-radius: 10px !important;
	background: #fff !important;
	overflow: hidden;
	cursor: pointer;
}

.florbloom-product-gallery__thumb.is-active {
	border: 2px solid #9871d0 !important;
	box-shadow: 0 0 0 2px rgba(152,113,208,.10);
}

.florbloom-product-gallery__thumb img {
	display: block !important;
	width: 100% !important;
	height: 100% !important;
	object-fit: cover !important;
	margin: 0 !important;
}

.florbloom-product-gallery__stage {
	position: relative !important;
	width: 100%;
	aspect-ratio: 1 / 1;
	overflow: hidden;
	border-radius: var(--fb-gallery-radius, 16px);
	background: #f7f5f8;
}

.florbloom-product-gallery--is-portrait .florbloom-product-gallery__stage {
	aspect-ratio: 4 / 5;
}

.florbloom-product-gallery--is-portrait-tall .florbloom-product-gallery__stage {
	aspect-ratio: 3 / 4;
}

.florbloom-product-gallery--is-auto .florbloom-product-gallery__stage {
	aspect-ratio: auto;
}

.florbloom-product-gallery__image {
	position: absolute !important;
	inset: 0;
	display: block !important;
	width: 100% !important;
	height: 100% !important;
	max-width: none !important;
	object-fit: contain !important;
	opacity: 0;
	visibility: hidden;
	background: #faf9fb;
	transition: opacity .22s ease;
	margin: 0 !important;
}

.florbloom-product-gallery__image.is-active {
	opacity: 1;
	visibility: visible;
}

.florbloom-product-gallery-fallback img {
	display: block !important;
	width: 100% !important;
	height: auto !important;
	margin: 0 !important;
}

/* ---------- Title / price / short description ---------- */

.florbloom-product-title {
	margin: 0 0 12px !important;
	padding: 0 !important;
	font-size: clamp(30px, 3vw, 46px) !important;
	line-height: 1.08 !important;
	letter-spacing: -.025em;
	font-weight: 750 !important;
	color: #211d24 !important;
}

.florbloom-product-price-wrap {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 10px;
	margin: 0 0 10px;
}

.florbloom-product-price {
	margin: 0;
}

.florbloom-product-price .price {
	margin: 0 !important;
	font-size: 28px !important;
	line-height: 1.15 !important;
	font-weight: 800 !important;
}

.florbloom-product-price ins {
	text-decoration: none !important;
	color: #9871d0 !important;
}

.florbloom-product-price del {
	color: #aaa2ae !important;
	font-size: .72em !important;
	margin-right: 7px;
}

.florbloom-product-discount {
	display: inline-flex;
	align-items: center;
	padding: 5px 9px;
	border-radius: 999px;
	background: #edf7ee;
	color: #317644;
	font-size: 11px;
	font-weight: 800;
	white-space: nowrap;
}

.florbloom-product-discount--soft {
	background: #f4edf8;
	color: #724b97;
}

.florbloom-product-short-description {
	margin-top: 9px;
	color: #5d5862;
	line-height: 1.7;
}

.florbloom-product-short-description__heading {
	margin: 0 0 7px !important;
	padding: 0 !important;
	font-size: 16px !important;
	line-height: 1.3 !important;
	font-weight: 700 !important;
	color: #2b2630 !important;
}

.florbloom-product-short-description__content p {
	margin: 0 0 7px !important;
}

.florbloom-product-short-description__content p:last-child {
	margin-bottom: 0 !important;
}

/* ---------- Body ---------- */

.florbloom-product-body {
	width: 100%;
	margin-top: 54px;
}

.florbloom-product-body > .florbloom-product-block {
	border-top: 1px solid #eeeaf0;
	padding-top: 28px;
}

.florbloom-product-body > .florbloom-product-block:first-child {
	border-top: 0;
	padding-top: 0;
}

/* ---------- Responsive: tablet/laptop ---------- */

@media (max-width: 1100px) {

	.florbloom-product-page {
		padding-top: 24px;
	}

	.florbloom-product-page__container {
		width: min(100%, calc(100% - 32px));
	}

	.florbloom-product-hero {
		grid-template-columns: minmax(0, 1fr) minmax(300px, .86fr);
		gap: 30px;
	}

	.florbloom-product-hero__gallery {
		position: static;
	}

	.florbloom-product-block {
		font-size: var(--fb-fs-t, 15px);
		margin-top: var(--fb-mt-t, 0px);
		margin-bottom: var(--fb-mb-t, 14px);
	}

	.florbloom-product-block[data-show-tablet="no"] {
		display: none !important;
	}

	.florbloom-product-gallery--tablet-right {
		grid-template-columns: minmax(0, 1fr) 70px;
	}

	.florbloom-product-gallery--tablet-bottom {
		grid-template-columns: 1fr;
	}

	.florbloom-product-gallery--tablet-bottom .florbloom-product-gallery__thumb-track {
		flex-direction: row;
		max-height: none;
		overflow-x: auto;
		overflow-y: hidden;
	}

	.florbloom-product-gallery__thumb {
		flex-basis: 60px;
		width: 60px;
		height: 60px;
	}

	.florbloom-product-title {
		font-size: clamp(28px, 4vw, 40px) !important;
	}
}

/* ---------- Responsive: mobile ---------- */

@media (max-width: 767px) {

	.florbloom-product-page {
		padding: 16px 0 50px;
	}

	.florbloom-product-page__container {
		width: calc(100% - 20px);
	}

	.florbloom-product-hero {
		display: block !important;
	}

	.florbloom-product-hero__gallery {
		width: 100%;
		margin-bottom: 24px;
	}

	.florbloom-product-hero__info {
		width: 100%;
	}

	.florbloom-product-block {
		font-size: var(--fb-fs-m, 14px);
		margin-top: var(--fb-mt-m, 0px);
		margin-bottom: var(--fb-mb-m, 12px);
	}

	.florbloom-product-block[data-show-mobile="no"] {
		display: none !important;
	}

	.florbloom-product-gallery {
		grid-template-columns: 1fr !important;
		gap: 10px;
	}

	.florbloom-product-gallery--mobile-none {
		grid-template-columns: 1fr !important;
	}

	.florbloom-product-gallery__stage {
		order: 1;
		width: 100%;
		aspect-ratio: 1 / 1;
		border-radius: 14px;
	}

	.florbloom-product-gallery__thumbs {
		order: 2;
		width: 100%;
	}

	.florbloom-product-gallery--mobile-none .florbloom-product-gallery__thumbs {
		display: none !important;
	}

	.florbloom-product-gallery__thumb-track,
	.florbloom-product-gallery--desktop-bottom .florbloom-product-gallery__thumb-track,
	.florbloom-product-gallery--tablet-bottom .florbloom-product-gallery__thumb-track {
		flex-direction: row !important;
		width: 100%;
		max-height: none;
		overflow-x: auto !important;
		overflow-y: hidden !important;
		scrollbar-width: none;
		padding-bottom: 3px;
	}

	.florbloom-product-gallery__thumb-track::-webkit-scrollbar {
		display: none;
	}

	.florbloom-product-gallery__thumb {
		flex: 0 0 58px;
		width: 58px;
		height: 58px;
	}

	.florbloom-product-title {
		font-size: 29px !important;
		line-height: 1.08 !important;
	}

	.florbloom-product-price .price {
		font-size: 24px !important;
	}

	.florbloom-product-body {
		margin-top: 42px;
	}
}

/* =========================================================
   FLORBLOOM PRODUCT BUILDER — CRITICAL HERO LAYOUT PATCH
   Paste at VERY END of product-live.css
   This is intentionally narrow and avoids global WooCommerce CSS.
   ========================================================= */

html body .florbloom-product-page .florbloom-product-hero {
	display: grid !important;
	grid-template-columns: minmax(0, 1.08fr) minmax(360px, .92fr) !important;
	gap: 48px !important;
	align-items: start !important;
	width: 100% !important;
}

html body .florbloom-product-page .florbloom-product-hero__gallery,
html body .florbloom-product-page .florbloom-product-hero__info {
	display: block !important;
	width: auto !important;
	min-width: 0 !important;
	max-width: none !important;
	float: none !important;
	clear: none !important;
}

html body .florbloom-product-page .florbloom-product-hero__gallery {
	grid-column: 1 !important;
	grid-row: 1 !important;
	position: sticky !important;
	top: 24px !important;
}

html body .florbloom-product-page .florbloom-product-hero__info {
	grid-column: 2 !important;
	grid-row: 1 !important;
	position: relative !important;
}

html body .florbloom-product-page .florbloom-product-gallery {
	display: grid !important;
	grid-template-columns: 76px minmax(0, 1fr) !important;
	width: 100% !important;
}

html body .florbloom-product-page .florbloom-product-gallery--desktop-right {
	grid-template-columns: minmax(0, 1fr) 76px !important;
}

html body .florbloom-product-page .florbloom-product-gallery--desktop-bottom {
	grid-template-columns: 1fr !important;
}

html body .florbloom-product-page .florbloom-product-gallery__stage {
	display: block !important;
	position: relative !important;
	width: 100% !important;
	max-width: none !important;
	float: none !important;
	clear: none !important;
}

/* Make sure the image itself cannot force the grid wider. */
html body .florbloom-product-page .florbloom-product-gallery__image {
	max-width: none !important;
}

/* Tablet: still two columns. */
@media (min-width: 768px) and (max-width: 1100px) {

	html body .florbloom-product-page .florbloom-product-hero {
		grid-template-columns: minmax(0, 1fr) minmax(300px, .86fr) !important;
		gap: 30px !important;
	}

	html body .florbloom-product-page .florbloom-product-hero__gallery {
		grid-column: 1 !important;
		grid-row: 1 !important;
		position: static !important;
	}

	html body .florbloom-product-page .florbloom-product-hero__info {
		grid-column: 2 !important;
		grid-row: 1 !important;
	}

	html body .florbloom-product-page .florbloom-product-gallery {
		grid-template-columns: 68px minmax(0, 1fr) !important;
	}

}

/* Phone: single column and horizontal thumbnails. */
@media (max-width: 767px) {

	html body .florbloom-product-page .florbloom-product-hero {
		display: block !important;
		width: 100% !important;
	}

	html body .florbloom-product-page .florbloom-product-hero__gallery,
	html body .florbloom-product-page .florbloom-product-hero__info {
		display: block !important;
		width: 100% !important;
	}

	html body .florbloom-product-page .florbloom-product-hero__gallery {
		margin-bottom: 24px !important;
		position: static !important;
	}

	html body .florbloom-product-page .florbloom-product-gallery {
		display: grid !important;
		grid-template-columns: 1fr !important;
		gap: 10px !important;
	}

	html body .florbloom-product-page .florbloom-product-gallery__stage {
		grid-row: 1 !important;
	}

	html body .florbloom-product-page .florbloom-product-gallery__thumbs {
		grid-row: 2 !important;
	}

	html body .florbloom-product-page .florbloom-product-gallery__thumb-track {
		display: flex !important;
		flex-direction: row !important;
		width: 100% !important;
		max-width: 100% !important;
		max-height: none !important;
		overflow-x: auto !important;
		overflow-y: hidden !important;
	}

}

/* ============================================================
   FLORBLOOM PREMIUM PRODUCT GALLERY V2
   Scoped to .florbloom-pg only.
   Append to END of product-live.css.
   ============================================================ */

.florbloom-pg,
.florbloom-pg * {
	box-sizing: border-box;
}

.florbloom-pg {
	width: 100%;
	position: relative;
}

.florbloom-pg__layout {
	display: grid;
	grid-template-columns: 74px minmax(0, 1fr);
	gap: 14px;
	width: 100%;
	align-items: start;
}

.florbloom-pg__rail {
	display: flex;
	flex-direction: column;
	gap: 9px;
	min-width: 0;
}

.florbloom-pg__thumbs {
	display: flex;
	flex-direction: column;
	gap: 9px;
	max-height: min(620px, 70vh);
	overflow-y: auto;
	overflow-x: hidden;
	scrollbar-width: none;
	padding: 2px;
}

.florbloom-pg__thumbs::-webkit-scrollbar {
	display: none;
}

.florbloom-pg__thumb {
	flex: 0 0 64px;
	width: 64px;
	height: 64px;
	padding: 0 !important;
	border: 1px solid #e5e0e8 !important;
	border-radius: 11px !important;
	background: #fff !important;
	overflow: hidden;
	cursor: pointer;
	opacity: .78;
	transition:
		opacity .2s ease,
		border-color .2s ease,
		box-shadow .2s ease,
		transform .2s ease;
}

.florbloom-pg__thumb:hover {
	opacity: 1;
	transform: translateY(-1px);
}

.florbloom-pg__thumb.is-active {
	opacity: 1;
	border: 2px solid #9871d0 !important;
	box-shadow: 0 0 0 3px rgba(152,113,208,.12);
}

.florbloom-pg__thumb img {
	display: block !important;
	width: 100% !important;
	height: 100% !important;
	object-fit: cover !important;
	margin: 0 !important;
	max-width: none !important;
}

.florbloom-pg__rail-arrow {
	display: flex !important;
	align-items: center;
	justify-content: center;
	width: 64px;
	height: 26px;
	padding: 0 !important;
	border: 1px solid #e7e2ea !important;
	border-radius: 8px !important;
	background: rgba(255,255,255,.96) !important;
	color: #504958 !important;
	cursor: pointer;
}

.florbloom-pg__rail-arrow:hover {
	border-color: #cbb8d8 !important;
	color: #7b5a9f !important;
}

.florbloom-pg__main {
	min-width: 0;
}

.florbloom-pg__stage {
	position: relative;
	width: 100%;
	aspect-ratio: 1 / 1;
	overflow: hidden;
	border-radius: var(--fb-pg-radius, 18px);
	background:
		linear-gradient(180deg, #faf8fb 0%, #f5f1f7 100%);
	border: 1px solid #eee9f0;
}

.florbloom-pg--portrait .florbloom-pg__stage {
	aspect-ratio: 4 / 5;
}

.florbloom-pg--auto .florbloom-pg__stage {
	aspect-ratio: auto;
	min-height: 420px;
}

.florbloom-pg__slide {
	position: absolute !important;
	inset: 0;
	display: flex !important;
	align-items: center;
	justify-content: center;
	width: 100% !important;
	height: 100% !important;
	padding: 0 !important;
	margin: 0 !important;
	border: 0 !important;
	border-radius: 0 !important;
	background: transparent !important;
	opacity: 0;
	visibility: hidden;
	cursor: zoom-in;
	transition: opacity .26s ease, visibility .26s ease;
}

.florbloom-pg__slide.is-active {
	opacity: 1;
	visibility: visible;
	z-index: 2;
}

.florbloom-pg__slide img {
	display: block !important;
	width: 100% !important;
	height: 100% !important;
	max-width: none !important;
	max-height: none !important;
	object-fit: contain !important;
	margin: 0 !important;
}

.florbloom-pg__nav {
	position: absolute !important;
	top: 50%;
	z-index: 5;
	display: flex !important;
	align-items: center;
	justify-content: center;
	width: 42px;
	height: 42px;
	padding: 0 !important;
	border: 1px solid rgba(32,25,39,.10) !important;
	border-radius: 50% !important;
	background: rgba(255,255,255,.92) !important;
	color: #29232f !important;
	font-size: 28px !important;
	line-height: 1 !important;
	cursor: pointer;
	box-shadow: 0 8px 24px rgba(35,24,45,.10);
	transform: translateY(-50%);
	transition:
		transform .2s ease,
		box-shadow .2s ease,
		background .2s ease;
}

.florbloom-pg__nav:hover {
	background: #fff !important;
	box-shadow: 0 12px 28px rgba(35,24,45,.14);
}

.florbloom-pg__nav.is-prev {
	left: 14px;
}

.florbloom-pg__nav.is-next {
	right: 14px;
}

.florbloom-pg__count {
	position: absolute;
	right: 14px;
	bottom: 14px;
	z-index: 5;
	display: inline-flex;
	align-items: center;
	gap: 5px;
	min-height: 30px;
	padding: 6px 10px;
	border: 1px solid rgba(255,255,255,.72);
	border-radius: 999px;
	background: rgba(30,24,36,.58);
	backdrop-filter: blur(8px);
	-webkit-backdrop-filter: blur(8px);
	color: #fff;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: .02em;
}

.florbloom-pg__empty {
	width: 100%;
	padding: 30px;
	border: 1px solid #eee9f0;
	border-radius: var(--fb-pg-radius, 18px);
	background: #f7f4f8;
	text-align: center;
}

.florbloom-pg__empty img {
	display: block;
	width: 100%;
	height: auto;
}

/* ------------------------------------------------------------
   Tablet
   ------------------------------------------------------------ */

@media (max-width: 1100px) {

	.florbloom-pg__layout {
		grid-template-columns: 64px minmax(0, 1fr);
		gap: 11px;
	}

	.florbloom-pg__thumb {
		flex-basis: 56px;
		width: 56px;
		height: 56px;
	}

	.florbloom-pg__rail-arrow {
		width: 56px;
	}

}

/* ------------------------------------------------------------
   Mobile
   ------------------------------------------------------------ */

@media (max-width: 767px) {

	.florbloom-pg__layout {
		display: grid;
		grid-template-columns: 1fr;
		gap: 10px;
	}

	.florbloom-pg__main {
		order: 1;
	}

	.florbloom-pg__rail {
		order: 2;
		display: grid;
		grid-template-columns: 1fr;
		gap: 6px;
	}

	.florbloom-pg__rail-arrow {
		display: none !important;
	}

	.florbloom-pg__thumbs {
		display: flex;
		flex-direction: row;
		gap: 9px;
		width: 100%;
		max-width: 100%;
		max-height: none;
		overflow-x: auto;
		overflow-y: hidden;
		scrollbar-width: none;
		padding: 2px 1px 5px;
	}

	.florbloom-pg__thumb {
		flex: 0 0 58px;
		width: 58px;
		height: 58px;
		border-radius: 9px !important;
	}

	.florbloom-pg__stage {
		border-radius: 14px;
	}

	.florbloom-pg__nav {
		width: 36px;
		height: 36px;
		font-size: 24px !important;
	}

	.florbloom-pg__nav.is-prev {
		left: 10px;
	}

	.florbloom-pg__nav.is-next {
		right: 10px;
	}

	.florbloom-pg__count {
		right: 10px;
		bottom: 10px;
		min-height: 27px;
		padding: 5px 8px;
	}

}