/* Tablet: increase catalog density while retaining large product photography. */
@media (min-width: 701px) {
	ul.products {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: var(--bf-space-md);
	}

	ul.products li.product .jupiterx-wc-loop-product-image,
	.single-product div.product .woocommerce-product-gallery__image {
		aspect-ratio: 4 / 5;
	}

	ul.products li.product .posted_in {
		display: block;
	}

	ul.products li.product .woocommerce-loop-product__title {

/* Keep tall mobile product photos contained by the live gallery frame. */
@media (max-width: 430px) {
  body.single-product div.product .woocommerce-product-gallery__image img {
    max-height: 100% !important;
  }
}

		min-height: 2.7em;
		font-size: clamp(0.94rem, 1.15vw, 1.05rem);
	}

	ul.products li.product .price {
		font-size: 1.1rem;
	}

	ul.products li.product a.button,
	ul.products li.product .button {
		padding: var(--bf-space-sm) var(--bf-space-md);
		font-size: 0.92rem;
	}

	ul.products li.product .tinv-wraper {
		top: 18px;
		right: 18px;
	}

	ul.products li.product .bf-balloon-product-badges {
		top: 20px;
		left: 20px;
		max-width: calc(100% - 76px);
	}

	.single-product div.product {
		grid-template-columns: minmax(0, 1fr) minmax(0, 0.92fr);
		gap: var(--bf-space-lg);
	}

	.single-product div.product .product_title {
		font-size: clamp(1.55rem, 4vw, 2.05rem);
	}

	.single-product div.product .summary > .price {
		font-size: clamp(1.4rem, 2.5vw, 1.8rem);
	}
}

/* Desktop: use the wider catalog and two-column product presentation. */
@media (min-width: 1025px) {
	ul.products {
		grid-template-columns: repeat(4, minmax(0, 1fr));
		gap: clamp(var(--bf-space-md), 2vw, calc(var(--bf-space-lg) + var(--bf-space-xs)));
	}

	.single-product div.product {
		grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
		gap: clamp(32px, 5vw, 76px);
	}

	.single-product div.product .woocommerce-product-gallery {
		padding: var(--bf-space-sm);
	}

	.single-product div.product .product_title {
		font-size: clamp(1.7rem, 2.8vw, 2.55rem);
	}

	.single-product div.product .summary > .price {
		font-size: clamp(1.45rem, 2vw, 1.9rem);
	}

	.single-product div.product .single_add_to_cart_button {
		width: auto;
	}
}

@media (max-width: 360px) {
	ul.products li.product .posted_in {
		font-size: 0.7rem;
	}
}

/* Keep the native WooCommerce submit control available while long required
 * variation/personalization fields are completed on a phone. */
@media (max-width: 700px) {
	/* This Elementor page has its own three-track rule; target its verified loop. */
	body.page-id-1369 .elementor-element.elementor-element-889215f .raven-wc-products-custom ul.products {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: clamp(8px, 2.5vw, 12px);
	}

	/* Elementor's page-level rule sets 15px!important on each Raven product.
	 * At the observed 122.5px card width, that leaves only 86.5px for the
	 * photo and CTA. Restore compact token spacing only on this verified grid. */
	body.page-id-1369 .elementor-1369 .elementor-element.elementor-element-889215f.raven-products-gerenal-layout-grid.raven-products-content-layout-under-image .raven-wc-products-custom ul.products li.product {
		padding: var(--bf-space-xs) !important;
		border: 1px solid var(--bf-border) !important;
		border-radius: var(--bf-radius-md) !important;
		box-shadow: var(--bf-shadow-soft) !important;
		background: var(--bf-surface) !important;
		overflow: hidden;
	}

	/* JupiterX/Raven applies a second framed surface and overlay typography to
	 * this specific grid. Flatten that inner frame and restore a readable flow. */
	body.page-id-1369 .elementor-1369 .elementor-element.elementor-element-889215f.raven-products-gerenal-layout-grid.raven-products-content-layout-under-image .raven-wc-products-custom ul.products li.product .jupiterx-product-container,
	body.page-id-1369 .elementor-1369 .elementor-element.elementor-element-889215f.raven-products-gerenal-layout-grid.raven-products-content-layout-under-image .raven-wc-products-custom ul.products li.product .woo-height {
		width: 100% !important;
		min-width: 0 !important;
		min-height: 0 !important;
		height: auto !important;
		padding: 0 !important;
		border: 0 !important;
		border-radius: 0 !important;
		background: transparent !important;
		box-shadow: none !important;
	}

	body.page-id-1369 .elementor-1369 .elementor-element.elementor-element-889215f.raven-products-gerenal-layout-grid.raven-products-content-layout-under-image .raven-wc-products-custom ul.products li.product .woocommerce-LoopProduct-link {
	width: 100% !important;
	min-width: 0 !important;
	display: flex !important;
	flex-direction: column !important;
	gap: 0 !important;
	}

	body.page-id-1369 .elementor-1369 .elementor-element.elementor-element-889215f.raven-products-gerenal-layout-grid.raven-products-content-layout-under-image .raven-wc-products-custom ul.products li.product .jupiterx-wc-loop-product-image {
	width: 100% !important;
	height: auto !important;
	min-height: 0 !important;
	aspect-ratio: 4 / 5 !important;
	margin: 0 0 var(--bf-space-sm) !important;
	border: 0 !important;
	border-radius: var(--bf-radius-sm) !important;
	background: var(--bf-surface-soft) !important;
	overflow: hidden !important;
	position: relative !important;
	order: 0 !important;
	}

	body.page-id-1369 .elementor-1369 .elementor-element.elementor-element-889215f.raven-products-gerenal-layout-grid.raven-products-content-layout-under-image .raven-wc-products-custom ul.products li.product .jupiterx-wc-loop-product-image img {
	width: 100% !important;
	height: 100% !important;
	max-height: none !important;
	object-fit: contain !important;
	object-position: center !important;
	}

	body.page-id-1369 .elementor-1369 .elementor-element.elementor-element-889215f.raven-products-gerenal-layout-grid.raven-products-content-layout-under-image .raven-wc-products-custom ul.products li.product .posted_in {
	position: static !important;
	width: 100% !important;
	height: auto !important;
	min-height: 0 !important;
	margin: 0 0 4px !important;
	padding: 0 2px !important;
	background: transparent !important;
	color: var(--bf-muted) !important;
	display: block !important;
	font-size: 0.68rem !important;
	line-height: 1.3 !important;
	order: 1 !important;
	text-align: left !important;
	}

	body.page-id-1369 .elementor-1369 .elementor-element.elementor-element-889215f.raven-products-gerenal-layout-grid.raven-products-content-layout-under-image .raven-wc-products-custom ul.products li.product .woocommerce-loop-product__title {
	position: static !important;
	inset: auto !important;
	width: 100% !important;
	height: auto !important;
	min-height: 2.6em !important;
	max-height: none !important;
	margin: 0 2px var(--bf-space-xs) !important;
	padding: 0 !important;
	background: transparent !important;
	color: var(--bf-text) !important;
	display: block !important;
	font-size: clamp(0.78rem, 3.5vw, 0.9rem) !important;
	font-weight: 650 !important;
	line-height: 1.3 !important;
	text-align: left !important;
	text-decoration: none !important;
	white-space: normal !important;
	word-break: normal !important;
	overflow-wrap: anywhere !important;
	transform: none !important;
	order: 2 !important;
	}

	body.page-id-1369 .elementor-1369 .elementor-element.elementor-element-889215f.raven-products-gerenal-layout-grid.raven-products-content-layout-under-image .raven-wc-products-custom ul.products li.product .price {
	position: static !important;
	width: 100% !important;
	min-height: 1.4em !important;
	margin: auto 2px var(--bf-space-sm) !important;
	padding: 0 !important;
	background: transparent !important;
	color: var(--bf-text) !important;
	display: block !important;
	font-size: 1rem !important;
	font-weight: 750 !important;
	line-height: 1.3 !important;
	text-align: left !important;
	white-space: normal !important;
	transform: none !important;
	order: 3 !important;
	}

	body.page-id-1369 .elementor-1369 .elementor-element.elementor-element-889215f.raven-products-gerenal-layout-grid.raven-products-content-layout-under-image .raven-wc-products-custom ul.products li.product a.button,
	body.page-id-1369 .elementor-1369 .elementor-element.elementor-element-889215f.raven-products-gerenal-layout-grid.raven-products-content-layout-under-image .raven-wc-products-custom ul.products li.product .button {
	position: static !important;
	inset: auto !important;
	width: 100% !important;
	min-width: 0 !important;
	min-height: 44px !important;
	margin: auto 0 0 !important;
	padding: 8px 6px !important;
	border-radius: var(--bf-radius-pill) !important;
	font-size: 0.75rem !important;
	line-height: 1.2 !important;
	white-space: normal !important;
	word-break: normal !important;
	overflow-wrap: anywhere !important;
	order: 4 !important;
	}

	body.page-id-1369 .elementor-1369 .elementor-element.elementor-element-889215f.raven-products-gerenal-layout-grid.raven-products-content-layout-under-image .raven-wc-products-custom ul.products li.product .tinv-wraper {
	position: absolute !important;
	top: 8px !important;
	right: 8px !important;
	z-index: 3 !important;
	width: 36px !important;
	height: 36px !important;
	margin: 0 !important;
	}

	body.page-id-1369 .elementor-1369 .elementor-element.elementor-element-889215f.raven-products-gerenal-layout-grid.raven-products-content-layout-under-image .raven-wc-products-custom ul.products li.product .tinvwl_add_to_wishlist_button {
	width: 36px !important;
	height: 36px !important;
	min-width: 36px !important;
	min-height: 36px !important;
	padding: 0 !important;
	border-radius: 50% !important;
	display: grid !important;
	place-items: center !important;
	background: var(--bf-surface) !important;
	}

	body.page-id-1369 .elementor-1369 .elementor-element.elementor-element-889215f.raven-products-gerenal-layout-grid.raven-products-content-layout-under-image .raven-wc-products-custom ul.products li.product .tinvwl_add_to_wishlist-text {
	display: none !important;
	}

	body.page-id-1369 .elementor-1369 .elementor-element.elementor-element-889215f.raven-products-gerenal-layout-grid.raven-products-content-layout-under-image .raven-wc-products-custom ul.products li.product .bf-balloon-product-badges {
	position: absolute !important;
	top: 8px !important;
	left: 8px !important;
	max-width: calc(100% - 52px) !important;
	gap: 4px !important;
	margin: 0 !important;
	flex-direction: column !important;
	align-items: flex-start !important;
	}

	body.page-id-1369 .elementor-1369 .elementor-element.elementor-element-889215f.raven-products-gerenal-layout-grid.raven-products-content-layout-under-image .raven-wc-products-custom ul.products li.product .bf-balloon-badge {
	max-width: 100% !important;
	padding: 4px 7px !important;
	font-size: 0.58rem !important;
	line-height: 1.15 !important;
	box-shadow: var(--bf-shadow-soft) !important;
	}

	/* The JupiterX page header repeats the product title before the gallery.
	 * On phones, keep the native product title after the large product image. */
	body.single-product .jupiterx-main-header {
		display: none;
	}

	body.single-product {
		padding-bottom: 84px;
	}

	body.single-product div.product .summary .single_add_to_cart_button {
		position: fixed;
		z-index: 998;
		inset: auto 84px calc(12px + env(safe-area-inset-bottom)) 12px !important;
		width: auto;
		max-width: none;
		margin: 0;
		box-shadow: var(--bf-shadow-cta);
	}

	/* Pair the Mini Ajax Cart opener with the sticky purchase action. This keeps
	 * it off the product image and clear of the preserved WhatsApp control. */
	body.single-product .majc-main-wrapper .majc-toggle-button.majc-round {
		top: auto !important;
		right: 12px !important;
		bottom: calc(12px + env(safe-area-inset-bottom)) !important;
		left: auto !important;
		width: 60px;
		height: 60px;
		transform: none !important;
	}

	body.single-product .majc-main-wrapper:has(.majc-empty-cart:not([style*="display: none"])) .majc-toggle-button.majc-round,
	body.single-product .majc-main-wrapper:has(.majc-empty-cart:not([style*="display:none"])) .majc-toggle-button.majc-round {
		width: 48px;
		height: 48px;
	}

	body.single-product .majc-main-wrapper {
		top: auto !important;
		bottom: calc(84px + env(safe-area-inset-bottom)) !important;
	}

	body.single-product #ht-ctc-chat {
		bottom: calc(84px + env(safe-area-inset-bottom)) !important;
	}

	body:not(.single-product) .majc-main-wrapper {
		top: auto !important;
		bottom: calc(16px + env(safe-area-inset-bottom)) !important;
	}
	body:not(.single-product) .majc-main-wrapper .majc-toggle-button.majc-round {
		top: auto !important;
		right: 12px !important;
		bottom: calc(12px + env(safe-area-inset-bottom)) !important;
		left: auto !important;
		width: 56px;
		height: 56px;
		transform: none !important;
	}
	body:not(.single-product) .majc-main-wrapper:has(.majc-empty-cart:not([style*="display: none"])) .majc-toggle-button.majc-round,
	body:not(.single-product) .majc-main-wrapper:has(.majc-empty-cart:not([style*="display:none"])) .majc-toggle-button.majc-round {
		width: 48px;
		height: 48px;
		opacity: 0.78;
	}
}

@media (min-width: 701px) and (max-width: 1024px) {
	body.page-id-1369 .elementor-element.elementor-element-889215f .raven-wc-products-custom ul.products {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
}

@media (min-width: 1025px) {
	body.page-id-1369 .elementor-element.elementor-element-889215f .raven-wc-products-custom ul.products {
		grid-template-columns: repeat(4, minmax(0, 1fr));
	}
}

@media (prefers-reduced-motion: reduce) {
	ul.products li.product,
	ul.products li.product img,
	ul.products li.product .button,
	.single-product div.product .single_add_to_cart_button {
		scroll-behavior: auto !important;
		transition-duration: 0.01ms !important;
		animation-duration: 0.01ms !important;
		transform: none !important;
	}
}


/* Raven nests the native add-to-cart link inside the image grid. Flatten only
 * its generic wrappers at this verified page so image, product details and
 * the original WooCommerce CTA share one mobile card flow. */
@media (max-width: 700px) {
  body.page-id-1369 .elementor-1369 .elementor-element.elementor-element-889215f.raven-products-gerenal-layout-grid.raven-products-content-layout-under-image .raven-wc-products-custom ul.products li.product .jupiterx-wc-loop-product-image-wrapper,
  body.page-id-1369 .elementor-1369 .elementor-element.elementor-element-889215f.raven-products-gerenal-layout-grid.raven-products-content-layout-under-image .raven-wc-products-custom ul.products li.product .jupiterx-wc-loop-product-image { display: contents !important; }
  body.page-id-1369 .elementor-1369 .elementor-element.elementor-element-889215f.raven-products-gerenal-layout-grid.raven-products-content-layout-under-image .raven-wc-products-custom ul.products li.product .woo-height { display: flex !important; flex-direction: column !important; }
  body.page-id-1369 .elementor-1369 .elementor-element.elementor-element-889215f.raven-products-gerenal-layout-grid.raven-products-content-layout-under-image .raven-wc-products-custom ul.products li.product .jupiterx-wc-loop-product-image > .woocommerce-LoopProduct-link { order: 0 !important; width: 100% !important; height: auto !important; min-height: 0 !important; aspect-ratio: 4 / 5 !important; margin: 0 0 var(--bf-space-sm) !important; display: block !important; position: relative !important; overflow: hidden !important; border-radius: var(--bf-radius-sm) !important; background: var(--bf-surface-soft) !important; }
  body.page-id-1369 .elementor-1369 .elementor-element.elementor-element-889215f.raven-products-gerenal-layout-grid.raven-products-content-layout-under-image .raven-wc-products-custom ul.products li.product .jupiterx-wc-loop-product-image > .woocommerce-LoopProduct-link img { position: static !important; width: 100% !important; height: 100% !important; max-height: none !important; object-fit: contain !important; object-position: center !important; }
  body.page-id-1369 .elementor-1369 .elementor-element.elementor-element-889215f.raven-products-gerenal-layout-grid.raven-products-content-layout-under-image .raven-wc-products-custom ul.products li.product .woo-height > .woocommerce-LoopProduct-link { order: 1 !important; height: auto !important; flex: 1 1 auto !important; }
  body.page-id-1369 .elementor-1369 .elementor-element.elementor-element-889215f.raven-products-gerenal-layout-grid.raven-products-content-layout-under-image .raven-wc-products-custom ul.products li.product .jupiterx-wc-loop-product-image > .button { order: 2 !important; flex: 0 0 auto !important; margin: var(--bf-space-sm) 0 0 !important; }
}

/* Keep the two floating controls apart on catalog pages. */
@media (max-width: 700px) {
  body:not(.single-product) #ht-ctc-chat { bottom: calc(80px + env(safe-area-inset-bottom)) !important; }
}


@media (max-width: 700px) {
  body.page-id-1369 .elementor-1369 .elementor-element.elementor-element-889215f.raven-products-gerenal-layout-grid.raven-products-content-layout-under-image .raven-wc-products-custom ul.products li.product .jupiterx-wc-loop-product-image > .button { opacity: 1 !important; visibility: visible !important; transform: none !important; }
}


/* Avoid floating controls covering product photography and card CTAs. */
@media (max-width: 700px) {
  body:not(.single-product):has(ul.products) #ht-ctc-chat,
  body:not(.single-product):has(ul.products) .majc-main-wrapper:has(.majc-empty-cart:not([style*="display: none"])),
  body:not(.single-product):has(ul.products) .majc-main-wrapper:has(.majc-empty-cart:not([style*="display:none"])) { display: none !important; }
}


/* Typography refinement from the rendered 320px product cards: keep labels readable before compacting layout. */
@media (max-width: 700px) {
  body.woocommerce ul.products li.product .woocommerce-loop-product__title,
  body.woocommerce-page ul.products li.product .woocommerce-loop-product__title,
  body.single-product .related ul.products li.product .woocommerce-loop-product__title,
  body.single-product .upsells ul.products li.product .woocommerce-loop-product__title {
    min-height: 2.7em !important;
    font-size: clamp(14px, 3.5vw, 15.2px) !important;
    line-height: 1.35 !important;
    overflow-wrap: anywhere !important;
  }
  body.woocommerce ul.products li.product .price,
  body.woocommerce-page ul.products li.product .price,
  body.single-product .related ul.products li.product .price,
  body.single-product .upsells ul.products li.product .price {
    font-size: 16px !important;
    line-height: 1.3 !important;
  }
  body.woocommerce ul.products li.product .posted_in,
  body.woocommerce-page ul.products li.product .posted_in {
    font-size: 12px !important;
    line-height: 1.35 !important;
  }
  body.woocommerce ul.products li.product a.button,
  body.woocommerce ul.products li.product .button,
  body.woocommerce-page ul.products li.product a.button,
  body.woocommerce-page ul.products li.product .button,
  body.single-product .related ul.products li.product a.button,
  body.single-product .related ul.products li.product .button,
  body.single-product .upsells ul.products li.product a.button,
  body.single-product .upsells ul.products li.product .button {
    min-height: 48px !important;
    padding: 9px 6px !important;
    font-size: 14px !important;
    line-height: 1.25 !important;
    white-space: normal !important;
    overflow-wrap: anywhere !important;
  }
  body.woocommerce ul.products li.product .bf-balloon-badge,
  body.woocommerce-page ul.products li.product .bf-balloon-badge {
    font-size: 11px !important;
    line-height: 1.2 !important;
  }
}

@media (max-width: 700px) {
  body.woocommerce ul.products li.product .tinv-wraper,
  body.woocommerce-page ul.products li.product .tinv-wraper {
    top: 8px !important;
    right: 8px !important;
    width: 36px !important;
    height: 36px !important;
  }
  body.woocommerce ul.products li.product .tinvwl_add_to_wishlist_button,
  body.woocommerce-page ul.products li.product .tinvwl_add_to_wishlist_button {
    width: 36px !important;
    height: 36px !important;
    min-width: 36px !important;
    min-height: 36px !important;
    padding: 0 !important;
    border-radius: 50% !important;
    display: grid !important;
    place-items: center !important;
  }
  body.woocommerce ul.products li.product .tinvwl_add_to_wishlist-text,
  body.woocommerce-page ul.products li.product .tinvwl_add_to_wishlist-text {
    display: none !important;
  }
  body.woocommerce ul.products li.product .bf-balloon-product-badges,
  body.woocommerce-page ul.products li.product .bf-balloon-product-badges {
    max-width: calc(100% - 48px) !important;
  }
}

@media (max-width: 700px) {
  body.woocommerce ul.products::before,
  body.woocommerce ul.products::after,
  body.woocommerce-page ul.products::before,
  body.woocommerce-page ul.products::after {
    display: none !important;
  }
}

@media (max-width: 700px) {
  body.woocommerce ul.products,
  body.woocommerce-page ul.products {
    align-items: start !important;
  }
}

@media (max-width: 700px) {
  body.single-product div.product .summary {
    display: flex !important;
    flex-direction: column !important;
  }
  body.single-product div.product .summary > * { order: 5; }
  body.single-product div.product .summary > .jupiterx-product-badges { order: 0; }
  body.single-product div.product .summary > .product_title { order: 1; }
  body.single-product div.product .summary > .price { order: 2; }
  body.single-product div.product .summary > .bf-balloon-delivery-note { order: 3; }
  body.single-product div.product .summary > form.cart { order: 4; }
  body.single-product div.product .summary > .product_meta { order: 6; }
  body.single-product div.product .summary > .jupiterx-social-share { order: 7; }
}

.woocommerce ul.products li.product .price,
.woocommerce-page ul.products li.product .price {
  font-size: clamp(16px, 1.1vw, 18px) !important;
  line-height: 1.3 !important;
}

/* Keep Balloon galleries large on phones without letting thumbnail rows push purchase information below the fold. */
@media (max-width: 430px) {
  body.single-product div.product .woocommerce-product-gallery__image {
    aspect-ratio: 1.18 / 1 !important;
  }
  body.single-product div.product .flex-control-thumbs li {
    width: 64px !important;
    min-width: 64px !important;
  }
  body.single-product div.product .flex-control-thumbs img {
    height: 64px !important;
  }
}

/* The theme's legacy percentage widths and floats shrink grid children on tablet/desktop.
 * Let the single-product gallery and summary fill their measured grid tracks. */
@media (min-width: 701px) {
  body.single-product div.product .woocommerce-product-gallery,
  body.single-product div.product .summary {
    float: none !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
  }
}


/* Keep the mobile purchase control, WhatsApp and Mini Ajax Cart in one dock
 * row so they do not float over the delivery/pickup notice. Preserve 44px+
 * touch targets and the large product photograph; save height through spacing. */
@media (max-width: 700px) {
  body.single-product div.product .woocommerce-product-gallery {
    margin-bottom: 12px !important;
  }

  body.single-product div.product .flex-control-thumbs li {
    width: 48px !important;
    min-width: 48px !important;
  }

  body.single-product div.product .flex-control-thumbs img {
    height: 48px !important;
  }

  body.single-product div.product .summary .single_add_to_cart_button {
    inset: auto 124px calc(12px + env(safe-area-inset-bottom)) 12px !important;
    min-height: 52px;
    padding: 8px 6px;
    font-size: clamp(14.5px, 4vw, 16px);
    line-height: 1.2;
  }

  body.single-product #ht-ctc-chat {
    right: 64px !important;
    bottom: calc(12px + env(safe-area-inset-bottom)) !important;
    width: 48px !important;
    height: 48px !important;
  }

  body.single-product .majc-main-wrapper .majc-toggle-button.majc-round {
    right: 12px !important;
    bottom: calc(12px + env(safe-area-inset-bottom)) !important;
    width: 48px !important;
    height: 48px !important;
  }

  body.single-product .majc-main-wrapper:has(.majc-empty-cart:not([style*="display: none"])) .majc-toggle-button.majc-round,
  body.single-product .majc-main-wrapper:has(.majc-empty-cart:not([style*="display:none"])) .majc-toggle-button.majc-round {
    top: auto !important;
    right: 12px !important;
    bottom: calc(12px + env(safe-area-inset-bottom)) !important;
    width: 48px !important;
    height: 48px !important;
  }
}


/* Leave the commercial notice fully above the fixed action dock on phones. */
@media (max-width: 700px) {
  body.single-product div.product {
    row-gap: 0 !important;
  }

  body.single-product div.product .woocommerce-product-gallery {
    margin-bottom: 0 !important;
  }

  body.single-product div.product .summary > .product_title {
    margin-bottom: 4px !important;
  }

  body.single-product div.product .summary > .price {
    margin-bottom: 8px !important;
  }

  body.single-product div.product .summary > .bf-balloon-delivery-note {
    margin: 4px 0 8px !important;
    padding: 6px 12px !important;
    align-items: center;
  }
}


/* Add a small breathing gap above the mobile dock at 430px without reducing type or touch targets. */
@media (max-width: 430px) {
  body.single-product div.product .woocommerce-product-gallery__image {
    aspect-ratio: 1.22 / 1 !important;
  }
}


/* Keep the closed Mini Ajax Cart drawer contents clipped to its off-canvas panel on phones. */
@media (max-width: 700px) {
  body.single-product .majc-main-wrapper .majc-cart-popup {
    overflow-x: hidden !important;
  }
}


/* Preserve the full Balloon composition in phone galleries; avoid the theme crop. */
@media (max-width: 430px) {
  body.single-product div.product .woocommerce-product-gallery__image {
    aspect-ratio: 1.05 / 1 !important;
  }
  body.single-product div.product .woocommerce-product-gallery__image img {
    object-fit: contain !important;
    object-position: center !important;
  }
}


/* Fit the entire portrait product photograph inside the phone gallery frame. */
@media (max-width: 430px) {
  body.single-product div.product .woocommerce-product-gallery__image img {
    width: 100% !important;
    height: 100% !important;
    max-height: none !important;
    object-fit: contain !important;
    object-position: center !important;
  }
}


/* Keep enough clearance between the delivery note and the fixed purchase dock. */
@media (max-width: 430px) {
  body.single-product div.product .woocommerce-product-gallery__image {
    aspect-ratio: 1.2 / 1 !important;
  }
}

/* At 400–430px, the longer FR/PT pickup notice meets the bottom purchase dock. Recover a little room by adjusting only the gallery frame; preserve type, touch targets and the full source photo. */
@media (min-width: 400px) and (max-width: 430px) {
  body.single-product div.product .woocommerce-product-gallery__image {
    aspect-ratio: 1.3 / 1 !important;
  }
}

/* Keep long delivery notices clear of the fixed purchase dock from phone-width up to narrow tablet width. Show the full photo with contained scaling. */
@media (min-width: 431px) and (max-width: 640px) {
  body.single-product div.product .woocommerce-product-gallery__image {
    aspect-ratio: auto !important;
    height: clamp(270px, 50vw, 300px) !important;
  }
}

/* Use side-by-side gallery and summary once both columns can retain comfortable reading width. */
@media (min-width: 641px) and (max-width: 700px) {
  body.single-product div.product {
    grid-template-columns: minmax(0, 1.05fr) minmax(230px, 0.95fr) !important;
    gap: var(--bf-space-md) !important;
  }
  body.single-product div.product .woocommerce-product-gallery__image {
    aspect-ratio: 4 / 5 !important;
    height: auto !important;
  }
}


/* Keep the real WooCommerce variation CTA reachable at first fold on tablet and desktop without cloning add-to-cart behavior. */
@media (min-width: 701px) {
	body.single-product:has(form.variations_form) {
		padding-bottom: 96px !important;
	}
	body.single-product div.product form.variations_form .single_add_to_cart_button {
		position: fixed !important;
		inset: auto auto calc(16px + env(safe-area-inset-bottom)) 50% !important;
		z-index: 998;
		width: min(360px, calc(100vw - 48px));
		max-width: 360px;
		min-height: 52px;
		margin: 0;
		padding: 12px 20px;
		transform: translateX(-50%) !important;
		font-size: 16px;
		line-height: 1.2;
		box-shadow: var(--bf-shadow-cta);
	}
}


/* Keep the fixed Mini Ajax Cart launcher clear of the gallery at narrow tablet widths. */
@media (min-width: 701px) and (max-width: 900px) {
	body.single-product .majc-main-wrapper .majc-toggle-button.majc-round {
		top: auto !important;
		right: auto !important;
		bottom: calc(16px + env(safe-area-inset-bottom)) !important;
		left: 12px !important;
		width: 48px !important;
		height: 48px !important;
	}
}


/* Put the commercial essentials and required choices before secondary copy so the fixed native CTA does not cover the variation label or selector. */
@media (min-width: 701px) {
	body.single-product div.product .summary {
		display: flex !important;
		flex-direction: column !important;
	}
	body.single-product div.product .summary > * {
		order: 5;
	}
	body.single-product div.product .summary > .jupiterx-product-badges { order: 0; }
	body.single-product div.product .summary > .product_title { order: 1; }
	body.single-product div.product .summary > .price { order: 2; }
	body.single-product div.product .summary > .bf-balloon-delivery-note { order: 3; }
	body.single-product div.product .summary > form.cart { order: 4; }
	body.single-product div.product .summary > .product_meta { order: 6; }
	body.single-product div.product .summary > .jupiterx-social-share { order: 7; }
}

/* Desktop/tablet: keep the native CTA in the form flow so it never covers customization fields. The mobile purchase dock remains unchanged. */
@media (min-width: 701px) {
	body.single-product:has(form.variations_form) {
		padding-bottom: 0 !important;
	}
	body.single-product div.product form.variations_form .single_add_to_cart_button {
		position: static !important;
		inset: auto !important;
		transform: none !important;
		width: 100% !important;
		max-width: none !important;
		margin: var(--bf-space-md) 0 0 !important;
	}
}


/* Mobile variation selector: keep the native option and fixed purchase CTA visible together. */
@media (max-width: 700px) {
	body.single-product div.product .woocommerce-product-gallery { margin-bottom: 0 !important; }
	body.single-product div.product .summary > .price { margin-bottom: 4px !important; }
	body.single-product div.product .summary > .bf-balloon-delivery-note { margin: 4px 0 0 !important; }
	body.single-product div.product form.variations_form table.variations tr {
		display: grid !important;
		grid-template-columns: minmax(60px, 32%) minmax(0, 1fr) !important;
		column-gap: 12px;
		align-items: center;
	}
	body.single-product div.product form.variations_form table.variations th.label {
		width: auto !important;
		padding: 0 !important;
		text-align: left;
	}
	body.single-product div.product form.variations_form table.variations td.value {
		width: auto !important;
		min-width: 0 !important;
		padding: 0 !important;
	}
	body.single-product div.product form.variations_form table.variations select {
		width: 100% !important;
		min-height: 52px;
		margin-right: 0 !important;
	}
	body.single-product div.product form.variations_form .reset_variations {
		display: inline-flex;
		min-height: 44px;
		align-items: center;
		margin-top: 4px;
	}
}


/* Keep the variation label aligned with the top of its native select. */
@media (max-width: 700px) {
	body.single-product div.product form.variations_form table.variations tr {
		align-items: start;
	}
}


/* Wider phones: preserve the full portrait photo while recovering room for the variation choice above the fixed purchase dock. */
@media (min-width: 361px) and (max-width: 700px) {
	body.single-product div.product .woocommerce-product-gallery { padding: 4px !important; }
	body.single-product div.product .woocommerce-product-gallery__image { aspect-ratio: 1.5 / 1 !important; }
	body.single-product div.product .summary { padding-top: 2px !important; padding-bottom: 2px !important; }
	body.single-product div.product .summary > .price { margin-bottom: 2px !important; }
	body.single-product div.product .summary > .bf-balloon-delivery-note { margin-top: 2px !important; padding-top: 4px !important; padding-bottom: 4px !important; }
}


/* At 401–700px, the wider gallery grows with the viewport; cap its height so the option never enters the sticky CTA area. */
@media (min-width: 401px) and (max-width: 700px) {
	body.single-product div.product .woocommerce-product-gallery__image { aspect-ratio: 1.7 / 1 !important; }
}



/* Live mobile archive QA at 320px showed 90px product photos and a narrow CTA because the theme adds 20px inner padding. Reclaim the card width while keeping the two-column grid. */
@media (max-width: 700px) {
	body.archive.woocommerce ul.products li.product,
	body.archive.woocommerce-page ul.products li.product {
		padding: var(--bf-space-xs) !important;
	}

	body.archive.woocommerce ul.products li.product > .jupiterx-product-container,
	body.archive.woocommerce ul.products li.product > .woo-height,
	body.archive.woocommerce-page ul.products li.product > .jupiterx-product-container,
	body.archive.woocommerce-page ul.products li.product > .woo-height {
		padding: 0 !important;
	}
}


/* Bouquet gallery: preserve the full photo, add restrained desktop hover zoom, and retain the native touch lightbox. */
@media (hover: hover) and (pointer: fine) and (min-width: 701px) {
  body.single-product div.product .woocommerce-product-gallery__image {
    overflow: hidden !important;
  }

  body.single-product div.product .woocommerce-product-gallery__image img {
    object-fit: contain !important;
    transition: transform 220ms ease-out;
    transform: scale(1);
    transform-origin: center;
  }

  body.single-product div.product .woocommerce-product-gallery__image a:hover img,
  body.single-product div.product .woocommerce-product-gallery__image a:focus-visible img {
    transform: scale(1.04);
  }
}

@media (hover: none), (pointer: coarse), (max-width: 700px) {
  body.single-product div.product .woocommerce-product-gallery__image img {
    transform: none !important;
  }
}


/* Keep the native variable-product action available above the fold on desktop.
 * A full-width dock surface avoids hiding the long customization form beneath
 * the button; bottom padding lets shoppers scroll the last fields above it. */
@media (min-width: 701px) and (hover: hover) and (pointer: fine) {
	body.single-product:has(form.variations_form) {
		padding-bottom: 88px !important;
	}

	body.single-product:has(form.variations_form)::after {
		content: "";
		position: fixed;
		z-index: 997;
		inset: auto 0 0;
		height: 80px;
		background: var(--bf-surface);
		border-top: 1px solid var(--bf-border);
		box-shadow: var(--bf-shadow-soft);
		pointer-events: none;
	}

	body.single-product:has(form.variations_form) div.product form.variations_form .single_add_to_cart_button {
		position: fixed !important;
		z-index: 998;
		inset: auto 84px 12px auto !important;
		width: min(360px, calc(100vw - 120px)) !important;
		min-height: 52px;
		margin: 0 !important;
		box-shadow: var(--bf-shadow-cta);
	}
}


/* The theme main content forms a z-index stacking context; attach the dock
 * surface to the product stack so its native CTA can paint above the surface. */
@media (min-width: 701px) and (hover: hover) and (pointer: fine) {
	body.single-product:has(form.variations_form)::after {
		content: none !important;
		display: none !important;
	}

	body.single-product:has(form.variations_form) div.product::after {
		content: "";
		position: fixed;
		z-index: 997;
		inset: auto 0 0;
		height: 80px;
		background: var(--bf-surface);
		border-top: 1px solid var(--bf-border);
		box-shadow: var(--bf-shadow-soft);
		pointer-events: none;
	}
}


/* Hide only the duplicate theme product title; preserve the breadcrumb and WooCommerce product H1. */
@media (min-width: 701px) {
  body.single-product .jupiterx-main-header-post-title { display: none; }
}


/* Equalize each mobile product grid row and align the purchase CTAs. */
@media (max-width: 700px) {
  body.single-product ul.products,
  body.woocommerce ul.products,
  body.woocommerce-page ul.products {
    align-items: stretch !important;
  }

  body.single-product ul.products li.product > .jupiterx-product-container,
  body.woocommerce ul.products li.product > .jupiterx-product-container,
  body.woocommerce-page ul.products li.product > .jupiterx-product-container {
    min-height: 100%;
  }

  body.single-product ul.products li.product > .jupiterx-product-container > .button,
  body.woocommerce ul.products li.product > .jupiterx-product-container > .button,
  body.woocommerce-page ul.products li.product > .jupiterx-product-container > .button {
    margin-top: auto !important;
  }
}


/* Keep tall mobile product photos contained by the live gallery frame. */
@media (max-width: 430px) {
  body.single-product div.product .woocommerce-product-gallery__image img {
    max-height: 100% !important;
  }
}


/* Mobile: preserve the full portrait product image in the gallery. */
@media (max-width: 430px) {
  body.single-product div.product .woocommerce-product-gallery__image {
    aspect-ratio: auto !important;
    height: auto !important;
    overflow: visible !important;
  }
  body.single-product div.product .woocommerce-product-gallery__image img {
    display: block !important;
    width: auto !important;
    height: auto !important;
    max-width: 100% !important;
    max-height: 400px !important;
    margin-inline: auto !important;
    object-fit: contain !important;
  }
}


/* Desktop gallery zoom. */
@media (hover: hover) and (pointer: fine) and (min-width: 701px) {
  body.single-product div.product .woocommerce-product-gallery__image { overflow: hidden !important; }
  body.single-product div.product .woocommerce-product-gallery__image img { transition: transform 220ms ease-out; transform: scale(1); transform-origin: center; }
  body.single-product div.product .woocommerce-product-gallery__image a:hover img,
  body.single-product div.product .woocommerce-product-gallery__image a:focus-visible img { transform: scale(1.04); }
}
@media (prefers-reduced-motion: reduce) {
  body.single-product div.product .woocommerce-product-gallery__image img { transition: none !important; }
}

/* Desktop CTA remains in the purchase form flow so it cannot cover copy. */
@media (min-width: 701px) {
  body.single-product:has(form.variations_form) { padding-bottom: 0 !important; }
  body.single-product:has(form.variations_form)::after,
  body.single-product:has(form.variations_form) div.product::after { content: none !important; display: none !important; background: none !important; box-shadow: none !important; }
  body.single-product:has(form.variations_form) div.product form.variations_form .single_add_to_cart_button { position: static !important; inset: auto !important; transform: none !important; width: 100% !important; max-width: none !important; min-height: 52px; margin: 12px 0 0 !important; }
}

/* Keep the product image prominent while leaving  the delivery notice clear of the fixed CTA at phone widths. */
@media (max-width: 430px) {
	  body.single-product div.product .woocommerce-product-gallery__image img {
		      max-height: clamp(300px, 92vw, 360px) !important;
	  }
}

/* Improve clearance between the delivery note and fixed mobile CTA. */
@media (max-width: 430px) {
  body.single-product div.product .woocommerce-product-gallery__image img {
    max-height: clamp(300px, 87vw, 350px) !important;
  }
}
