/**
 * HiGuppy stability layer.
 *
 * This file intentionally loads last. Keep it focused on neutralizing XStore
 * duplicate controls and recurring mobile shell issues.
 */

:root {
	--hg-stability-page-bg: #f7fbff;
	--hg-stability-footer-bg: #061f3f;
}

html:has(body.hg-checkout-flow-active.higuppy-site-shell),
body.hg-checkout-flow-active.higuppy-site-shell,
body.hg-checkout-flow-active.higuppy-site-shell:not(:has(.hg-collections)):not(.page-id-2262):not(.hg-blog-active),
body.hg-checkout-flow-active.higuppy-site-shell:not(:has(.hg-collections)):not(.page-id-2262):not(.hg-blog-active)::before {
	background: linear-gradient(
		180deg,
		#eaf6ff 0,
		#eaf6ff 160px,
		#f2faff 300px,
		#f8fcff 520px,
		#fff 100%
	) !important;
	background-color: #eaf6ff !important;
}

body.higuppy-site-shell .page-wrapper,
body.higuppy-site-shell .template-container,
body.higuppy-site-shell .template-content,
body.higuppy-site-shell .content-page,
body.higuppy-site-shell main,
body.higuppy-site-shell .main-content,
body.higuppy-site-shell .site-main,
body.higuppy-site-shell .woocommerce,
body.hg-homepage-active .page-wrapper,
body.hg-homepage-active .template-container,
body.hg-homepage-active .template-content,
body.hg-homepage-active .content-page,
body.hg-homepage-active main,
body.hg-homepage-active .main-content,
body.hg-homepage-active .site-main {
	background: transparent !important;
}

.hg-footer-bridge {
	background: var(--hg-stability-page-bg) !important;
}

.hg-site-footer {
	margin-bottom: 0 !important;
	background-color: var(--hg-stability-footer-bg) !important;
}

body.woocommerce-shop .filter-content .higuppy-shop-filter-btn,
body.post-type-archive-product .filter-content .higuppy-shop-filter-btn,
body.tax-product_cat .filter-content .higuppy-shop-filter-btn,
body.hg-shop-page-active .filter-content .higuppy-shop-filter-btn {
	display: inline-flex !important;
	align-items: center !important;
	justify-content: center !important;
	flex: 0 0 auto !important;
	min-width: 50px !important;
	min-height: 44px !important;
	margin: 0 !important;
	padding: 8px 10px !important;
	border: 1px solid var(--hg-shop-border, #e6ecf7) !important;
	border-radius: 12px !important;
	background: #fff !important;
	color: var(--hg-shop-blue, #1747b8) !important;
	box-shadow: none !important;
	font-size: var(--hg-font-size-body);
	font-weight: var(--hg-font-weight-ui);
	line-height: 1;
}

body.woocommerce-shop .et-toggle-mob-sidebars-wrapper,
body.post-type-archive-product .et-toggle-mob-sidebars-wrapper,
body.tax-product_cat .et-toggle-mob-sidebars-wrapper,
body.hg-shop-page-active .et-toggle-mob-sidebars-wrapper,
body.woocommerce-shop .et-toggle-mob-sidebars-inner,
body.post-type-archive-product .et-toggle-mob-sidebars-inner,
body.tax-product_cat .et-toggle-mob-sidebars-inner,
body.hg-shop-page-active .et-toggle-mob-sidebars-inner,
body.woocommerce-shop .et-toggle-mob-sidebar,
body.post-type-archive-product .et-toggle-mob-sidebar,
body.tax-product_cat .et-toggle-mob-sidebar,
body.hg-shop-page-active .et-toggle-mob-sidebar {
	display: none !important;
	visibility: hidden !important;
	pointer-events: none !important;
}

body.woocommerce-shop .sidebar.sidebar-left.is-higuppy-filter-open,
body.post-type-archive-product .sidebar.sidebar-left.is-higuppy-filter-open,
body.tax-product_cat .sidebar.sidebar-left.is-higuppy-filter-open,
body.hg-shop-page-active .sidebar.sidebar-left.is-higuppy-filter-open {
	display: block !important;
	position: fixed !important;
	left: 0 !important;
	right: auto !important;
	margin-left: 0 !important;
	width: min(86vw, 340px) !important;
	transform: translate3d(0, 0, 0) !important;
	visibility: visible !important;
	opacity: 1 !important;
	pointer-events: auto !important;
}

@media (max-width: 767px) {
	body.woocommerce-shop .products-loop,
	body.post-type-archive-product .products-loop,
	body.tax-product_cat .products-loop,
	body.hg-shop-page-active .products-loop {
		align-items: start !important;
	}

	body.woocommerce-shop .products-loop > .product,
	body.post-type-archive-product .products-loop > .product,
	body.tax-product_cat .products-loop > .product,
	body.hg-shop-page-active .products-loop > .product {
		align-self: start !important;
		height: auto !important;
		min-height: 0 !important;
		margin-bottom: 0 !important;
		padding-bottom: 0 !important;
	}

	body.woocommerce-shop .products-loop .product .content-product,
	body.post-type-archive-product .products-loop .product .content-product,
	body.tax-product_cat .products-loop .product .content-product,
	body.hg-shop-page-active .products-loop .product .content-product {
		height: auto !important;
		min-height: 0 !important;
		margin-bottom: 0 !important;
		padding-bottom: 0 !important;
	}

	body.woocommerce-shop .products-loop .product .content-product .product-details,
	body.post-type-archive-product .products-loop .product .content-product .product-details,
	body.tax-product_cat .products-loop .product .content-product .product-details,
	body.hg-shop-page-active .products-loop .product .content-product .product-details {
		padding-bottom: 3px !important;
	}

	body.woocommerce-shop .products-loop .product .swiper-button-prev,
	body.woocommerce-shop .products-loop .product .swiper-button-next,
	body.woocommerce-shop .products-loop .product .slick-arrow,
	body.woocommerce-shop .products-loop .product .owl-prev,
	body.woocommerce-shop .products-loop .product .owl-next,
	body.woocommerce-shop .products-loop .product .et-swiper-elementor-nav,
	body.post-type-archive-product .products-loop .product .swiper-button-prev,
	body.post-type-archive-product .products-loop .product .swiper-button-next,
	body.post-type-archive-product .products-loop .product .slick-arrow,
	body.post-type-archive-product .products-loop .product .owl-prev,
	body.post-type-archive-product .products-loop .product .owl-next,
	body.post-type-archive-product .products-loop .product .et-swiper-elementor-nav,
	body.hg-shop-page-active .products-loop .product .swiper-button-prev,
	body.hg-shop-page-active .products-loop .product .swiper-button-next,
	body.hg-shop-page-active .products-loop .product .slick-arrow,
	body.hg-shop-page-active .products-loop .product .owl-prev,
	body.hg-shop-page-active .products-loop .product .owl-next,
	body.hg-shop-page-active .products-loop .product .et-swiper-elementor-nav {
		display: none !important;
	}
}

/* Collections: one continuous sky under floating header + hero (beats navy / #f7fbff). */
html:has(.hg-collections),
html:has(body.page-id-2262),
body.higuppy-site-shell:has(.hg-collections),
body.page-id-2262.higuppy-site-shell {
	--hg-stability-page-bg: #eaf6ff;
	background: #eaf6ff !important;
}

body.higuppy-site-shell:has(.hg-collections) .page-wrapper,
body.higuppy-site-shell:has(.hg-collections) .template-container,
body.higuppy-site-shell:has(.hg-collections) .template-content,
body.higuppy-site-shell:has(.hg-collections) .content-page,
body.higuppy-site-shell:has(.hg-collections) main,
body.higuppy-site-shell:has(.hg-collections) .main-content,
body.higuppy-site-shell:has(.hg-collections) .site-main,
body.higuppy-site-shell:has(.hg-collections) .wp-site-blocks,
body.page-id-2262.higuppy-site-shell main,
body.page-id-2262.higuppy-site-shell .wp-site-blocks {
	background: transparent !important;
}

body.higuppy-site-shell:has(.hg-collections) .hg-footer-bridge,
body.page-id-2262.higuppy-site-shell .hg-footer-bridge {
	background: #eaf6ff !important;
}


/* WooCommerce success notice — one component for Product, Shop, categories and Cart. */
html body.higuppy-site-shell :is(.woocommerce-message, .wc-block-components-notice-banner.is-success) {
  position: relative !important;
  box-sizing: border-box !important;
  width: var(--hg-layout-width, min(1280px, calc(100% - 32px))) !important;
  max-width: var(--hg-layout-max, 1280px) !important;
  min-height: 0 !important;
  margin: 12px auto 16px !important;
  padding: 12px 12px 12px 14px !important;
  border: 1px solid #b9d8c4 !important;
  border-radius: 14px !important;
  background: #f1faf4 !important;
  background-image: none !important;
  color: #203d32 !important;
  box-shadow: 0 10px 28px rgba(31, 66, 53, .08) !important;
  font-size: 15px !important;
  line-height: 1.45 !important;
  overflow: visible !important;
  transition: opacity .18s ease, transform .18s ease !important;
}

html body.higuppy-site-shell .wc-block-components-notice-banner.is-success {
  display: grid !important;
  grid-template-columns: 28px minmax(0,1fr) 32px !important;
  align-items: center !important;
  gap: 12px !important;
}

html body.higuppy-site-shell .wc-block-components-notice-banner.is-success > svg {
  display: block !important;
  grid-column: 1 !important;
  width: 28px !important;
  height: 28px !important;
  min-width: 28px !important;
  min-height: 28px !important;
  margin: 0 !important;
  padding: 5px !important;
  border-radius: 50% !important;
  background: #3cab68 !important;
  fill: #fff !important;
  color: #fff !important;
}

html body.higuppy-site-shell .wc-block-components-notice-banner.is-success .wc-block-components-notice-banner__content {
  display: grid !important;
  grid-column: 2 !important;
  grid-template-columns: minmax(0,1fr) auto !important;
  align-items: center !important;
  gap: 10px 14px !important;
  min-width: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  color: #203d32 !important;
}

html body.higuppy-site-shell :is(.woocommerce-message, .wc-block-components-notice-banner.is-success) :is(a.wc-forward, a.button.wc-forward, .wc-forward.wp-element-button) {
  position: static !important;
  float: none !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  justify-self: end !important;
  box-sizing: border-box !important;
  width: auto !important;
  min-width: 98px !important;
  max-width: none !important;
  height: 38px !important;
  min-height: 38px !important;
  max-height: 38px !important;
  margin: 0 !important;
  padding: 0 14px !important;
  border: 1px solid #285644 !important;
  border-radius: 10px !important;
  background: #285644 !important;
  background-color: #285644 !important;
  background-image: none !important;
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
  box-shadow: none !important;
  font-size: 13px !important;
  font-weight: 750 !important;
  line-height: 1 !important;
  text-decoration: none !important;
  white-space: nowrap !important;
  transform: none !important;
}

html body.higuppy-site-shell :is(.woocommerce-message, .wc-block-components-notice-banner.is-success) :is(a.wc-forward, a.button.wc-forward, .wc-forward.wp-element-button):hover,
html body.higuppy-site-shell :is(.woocommerce-message, .wc-block-components-notice-banner.is-success) :is(a.wc-forward, a.button.wc-forward, .wc-forward.wp-element-button):focus-visible {
  border-color: #173f34 !important;
  background: #173f34 !important;
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
  text-decoration: none !important;
}

html body.higuppy-site-shell :is(.hg-product-notice-dismiss, .hg-shop-notice-dismiss, .wc-block-components-notice-banner__dismiss) {
  position: static !important;
  grid-column: 3 !important;
  align-self: center !important;
  display: grid !important;
  place-items: center !important;
  box-sizing: border-box !important;
  width: 32px !important;
  height: 32px !important;
  min-width: 32px !important;
  min-height: 32px !important;
  max-width: 32px !important;
  max-height: 32px !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 1px solid #cbdacf !important;
  border-radius: 50% !important;
  background: #fff !important;
  background-image: none !important;
  color: #355447 !important;
  box-shadow: none !important;
  cursor: pointer !important;
  font-size: 18px !important;
  font-weight: 700 !important;
  line-height: 1 !important;
  transform: none !important;
}

html body.higuppy-site-shell :is(.hg-product-notice-dismiss, .hg-shop-notice-dismiss, .wc-block-components-notice-banner__dismiss) > span {
  display: block !important;
  width: auto !important;
  height: auto !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  color: inherit !important;
  font: inherit !important;
  line-height: 1 !important;
}

html body.higuppy-site-shell :is(.woocommerce-message, .wc-block-components-notice-banner.is-success).is-hg-dismissing {
  opacity: 0 !important;
  transform: translateY(-5px) !important;
}

@media (max-width: 640px) {
  html body.higuppy-site-shell :is(.woocommerce-message, .wc-block-components-notice-banner.is-success) {
    width: calc(100% - 32px) !important;
    margin: 10px 16px 14px !important;
    padding: 12px !important;
  }

  html body.higuppy-site-shell .wc-block-components-notice-banner.is-success {
    grid-template-columns: 28px minmax(0,1fr) 32px !important;
    align-items: start !important;
    gap: 10px !important;
  }

  html body.higuppy-site-shell .wc-block-components-notice-banner.is-success .wc-block-components-notice-banner__content {
    grid-template-columns: 1fr !important;
    gap: 9px !important;
    font-size: 14px !important;
  }

  html body.higuppy-site-shell :is(.woocommerce-message, .wc-block-components-notice-banner.is-success) :is(a.wc-forward, a.button.wc-forward, .wc-forward.wp-element-button) {
    justify-self: start !important;
    min-width: 0 !important;
    height: 36px !important;
    min-height: 36px !important;
    max-height: 36px !important;
    padding: 0 12px !important;
  }
}
