/***********
  ** Override CSS goes here
  ** Typically added to live sites that aren't compiled anymore
  **
  ** Loaded render-blocking AFTER main.css (see resources/views/partials/head.blade.php),
  ** so equal-specificity rules here win without !important.
  ** Cloudflare caches this file for 1 year: bump ?z= in head.blade.php on every change.
  **
  ** Breakpoints match Bootstrap and the Splide sliders' "breakpoints" (max-width, inclusive):
  **   xs <=575.98 | sm 576-767.98 | md 768-991.98 | lg 992-1199.98 | xl >=1200 | xxl >=1400
************/

/* =========================================================
   General / headless menu
   ========================================================= */
@media (min-width: 992px) {
  .filter-navbar {
    border-bottom: 0;
  }
  .filter-navbar-main {
    background: #5D3FD3;
  }
  .filter-navbar-categories-wrapper .filter-navbar-category-button {
    transition: all 250ms ease-in-out;
    font-size: 18px;
    color: white;
  }
  .filter-navbar-categories-wrapper .filter-navbar-category-button:hover {
    color: #00CEC8;
  }
  .headless-openorclosed-wrapper .headless-oc-name {
    color: white;
  }
}

.headless-filter-pill {
  border: 0 !important;
}

@media (max-width: 768px) {
  .shop .headless-menu-navbar .headless-menu-navbar-searchbar-form.headless-menu-navbar-searchbar-form-menu {
    display: none !important;
  }
  .shop .headless-menu-navbar .headless-menu-navbar-cart {
    width: unset !important;
    margin-left: auto !important;
  }
}

.headless-location-modal-overlay {
  background-color: #000000 !important;
}
.headless-location-modal-content {
  height: 100vh;
  overflow-y: auto;
}

.menu-loading-spinner {
  stroke: white !important;
}
.menu-loading-text {
  color: white !important;
}
.range-headless .headless-pricing-type-special {
  color: black;
}

.headless-menu-navbar {
  padding: 8px 10px;
  height: 55px !important;
}
.headless-menu-navbar .headless-menu-navbar-wrapper {
  flex-wrap: nowrap !important;
}
.headless-menu-navbar .headless-menu-navbar-select {
  flex-basis: unset;
  width: auto;
  flex-grow: 1;
}
@media (min-width: 768px) {
  .range-headless .headless-menu-builder-section .headless-slider-wrap .headless-slider-prev {
    left: .5em;
  }
  .range-headless .headless-menu-builder-section .headless-slider-wrap .headless-slider-next {
    right: .5em;
  }
}

.headless-lns-icon svg {
  width: 34px !important;
  height: 34px !important;
}

.headless-products-list .headless-product-list-item {
  color: #0b0b0b !important;
}

/* =========================================================
   Hero
   ========================================================= */
.rpb-hero {
  min-height: auto;
}
@media (min-width: 1400px) {
  .rpb-hero .hexLarge {
    max-width: 340px !important;
    width: 35%;
  }
}
.cls-mh-clementon-hero {
  min-height: 280px;
}
.mobile-hero-btns {
  width: 311px;
  height: 134px;
  margin: auto;
}
.cls-order-now {
  width: 186px;
  height: 58px;
}
.cls-concentrates-btn {
  height: 58px;
  margin: auto;
}
@media (max-width: 575.98px) {
  .cls-order-now {
    width: 100%;
    margin-bottom: 5px;
  }
  .fs-xs-shrink-display-1 .display-1 {
    font-size: 32px !important;
  }
}
@media (min-width: 1400px) {
  .cls-concentrates-btn {
    width: 305px;
  }
}

/* =========================================================
   Header / nav (CWV)
   ========================================================= */
a.navbar-brand.me-0.py-0 {
  height: 65px;
  min-height: 65px;
  display: flex;
  align-items: center;
  width: 279px;
  flex-shrink: 0;
}
@media (max-width: 575.98px) {
  a.navbar-brand.me-0.py-0 {
    height: 45px;
    width: 193px;
  }
}
#navbarNavDropdown {
  min-height: 56px; /* Reserve minimum space for collapsed state */
}
section#topLevelNav {
  height: 134px;
}
@media (min-width: 768px) {
  section#topLevelNav {
    height: 150px;
  }
}
section#topLevelNav .d-flex.align-items-center {
  min-height: 54px;
}
@media (min-width: 1200px) {
  .menu-primary-navigation-container {
    display: flex;
    align-items: center;
    justify-content: end;
    flex-grow: 1;
  }
  .header-default {
    height: 95px;
  }
}

/* Logo dimensions - prevent CLS by reserving space before image loads.
   (.theme-logo width/height come from main.css: 45px tall, 65px at >=992, width auto.) */
.header-default .navbar-brand {
  height: 65px;
  width: 279px;
}
.header-default .navbar-brand, .header-default .theme-logo {
  flex-shrink: 0;
  display: flex;
  align-items: center;
}
.header-default .theme-logo {
  min-width: 193px;
}
@media (max-width: 575.98px) {
  .header-default .navbar-brand {
    height: 45px;
    width: 193px;
  }
  .header-default .navbar-brand, .header-default .theme-logo {
    display: flex !important;
  }
}

/* Navbar toggler */
.navbar-toggler {
  width: 44px;
  height: 54px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: end;
  flex-shrink: 0;
  min-width: 44px;
  min-height: 54px;
  margin-left: auto;
}
.navbar-toggler-icon {
  width: 1.5em;
  height: 1.5em;
  flex-shrink: 0;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255, 255, 255, 1%29' stroke-linecap='round' stroke-miterlap='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 100%;
}
.navbar-toggler-text {
  line-height: 1;
  white-space: nowrap;
  flex-shrink: 0;
}

/* Order button in nav: lock the inner headless div so it holds space during JS re-render */
.cls-nav-order-btn {
  width: 208px;
  height: 54px;
  align-items: center;
  justify-content: center;
  display: inline-flex;
}
.cls-nav-order-btn .range-headless {
  min-width: 175px;
  min-height: 52px; /* btn-sm natural height */
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

/* Notice bar */
.notice-overflow-scroll {
  z-index: 999 !important;
  padding: 0px;
  text-align: left;
  height: 36px !important;
  overflow-x: scroll;
  text-wrap: nowrap;
  white-space: nowrap;
  background: #FF2FA7;
  display: flex;
  align-items: center;
}
.notice-overflow-scroll .btn-close {
  display: none;
}

/* =========================================================
   Global layout / CLS helpers
   ========================================================= */
img {
  max-width: 100%;
  height: auto; /* aspect ratio comes from the width/height attributes */
}
div.wrap:nth-of-type(3) {
  contain: layout style paint;
}
.page-header.default-banner {
  overflow: hidden;
  position: relative;
  min-height: 120px;
}
.site-footer img.theme-logo {
  aspect-ratio: 550 / 200 !important;
  max-width: 100% !important;
}

/* Apply this to the specific row shifting horizontally */
.row.cls-horizontal-fix {
  /* Redefine the gutter variables here so the browser doesn't wait for inherited CSS,
     and lock the width using standard Bootstrap math (accommodates negative margins). */
  --bs-gutter-x: 1.5rem;
  --bs-gutter-y: 0;
  width: calc(100% + var(--bs-gutter-x));
}

/* Ensure the age gate and location picker NEVER affect document flow */
.age-gate-wrapper,
.location-picker-modal,
[class*="store-locator-overlay"] {
  position: fixed !important;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 9999;
  contain: strict;
  will-change: transform;
}

/* =========================================================
   Sliders (bootstrap-cards-slider = Splide v4)
   Splide adds .is-initialized to the root when it mounts. Before that, give slides
   the same width + gap Splide will set inline: calc((100% + gap) / perPage - gap).
   ========================================================= */
.bootstrap-cards-slider:not(.is-initialized) .splide__slide {
  margin-right: 1.5rem; /* matches "gap":"1.5rem" */
}

/* --- Homepage cards (pre-existing) --- */
@media (min-width: 768px) {
  .home .rpb-cards .splide__slide {
    min-height: 250px;
    min-width: 250px;
  }
  .home .rpb-flex-card-image {
    width: 135px !important;
    height: 75px !important;
  }
}
@media (max-width: 767.98px) {
  .home .rpb-cards .splide__slide {
    min-height: 180px;
  }
}
/* Ensure the internal background image container expands safely */
.rpb-cards .rpb-flex-card-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

/* --- Location pages: promo slider (.aspect-ratio-16x9 > .mso-homepage-promo-cards) ---
   Height comes from the .ratio-16x9 cards, so only the slide width needs locking.
   perPage: 2, 1 at <=575. (No container aspect-ratio/min-height: those didn't match
   the real slider height and a #splide01 rule made the slider grow 46px on mount.) */
.aspect-ratio-16x9 .rpb-cards .splide__slide {
  width: calc(50% - 0.75rem) !important;
}
@media (max-width: 575.98px) {
  .aspect-ratio-16x9 .rpb-cards .splide__slide {
    width: 100% !important;
  }
}

/* --- Mood cards ("Find your vibe") ---
   perPage: 5 | 4 at <=991 | 3 at <=767 | 1 at <=575 */
.rpb-mood-cards:not(.is-initialized) .splide__slide {
  width: calc((100% + 1.5rem) / 5 - 1.5rem);
}
@media (max-width: 991.98px) {
  .rpb-mood-cards:not(.is-initialized) .splide__slide {
    width: calc((100% + 1.5rem) / 4 - 1.5rem);
  }
}
@media (max-width: 767.98px) {
  .rpb-mood-cards:not(.is-initialized) .splide__slide {
    width: calc((100% + 1.5rem) / 3 - 1.5rem);
  }
}
@media (max-width: 575.98px) {
  .rpb-mood-cards:not(.is-initialized) .splide__slide {
    width: 100%;
  }
}
/* Icon row: FontAwesome swaps the empty <i class="h1"> for an <svg> after JS runs.
   Give the <i> the same 1em box + 1rem margin the svg gets, so the row height is
   identical before and after (works for the homepage .cls-mood-icon wrapper and
   the location pages' plain <p>). */
.rpb-mood-cards .card-body > :first-child {
  line-height: 0;
}
.rpb-mood-cards .card-body > :first-child > i,
.rpb-mood-cards .card-body > :first-child > svg {
  display: inline-block;
  width: 1em;
  height: 1em;
  margin-bottom: 1rem;
  vertical-align: top;
}
.cls-mood-icon {
  min-height: 66px;
}
.rpb-mood-cards .card-body > .cls-mood-icon:first-child > i,
.rpb-mood-cards .card-body > .cls-mood-icon:first-child > svg,
.cls-mood-icon svg {
  height: 49px;
  width: 49px;
}
/* Section floor: card (~150px) + pb-5 (72px) */
.cls-rpb-mood-cards {
  min-height: 220px;
}

/* =========================================================
   Headless menu sections
   ========================================================= */
/* Categories: the plugin's loading skeletons (mobile list + desktop grid of 340px cards)
   render ~2,000px tall for a frame, pushing everything below off-screen and back
   (~0.33 CLS). The reserved height below holds the space instead. */
.cls-headless-categories [class*="headless-loading-list"],
.cls-headless-categories .headless-menu-placeholder {
  display: none !important;
}
.cls-headless-categories {
  min-height: 175px; /* >=992: content is ~120px */
}
@media (max-width: 575.98px) {
  .cls-headless-categories {
    aspect-ratio: 335 / 257;
    width: 100%;
    min-height: 231px;
  }
  .cls-headless-categories [class*="headless-card"] {
    min-height: 231px;
  }
  .cls-headless-categories [class*="headless-card"] img {
    aspect-ratio: 187 / 210;
  }
}
@media (min-width: 576px) and (max-width: 767.98px) {
  .cls-headless-categories {
    min-height: 230px;
  }
}
@media (min-width: 768px) and (max-width: 991.98px) {
  .cls-headless-categories {
    /* 4 hex cards scale with width: measured 182px @768 -> 244px @990 */
    min-height: calc(28vw - 33px);
  }
}

.hg-featured-products {
  min-height: 435px;
}
@media (min-width: 576px) {
  .hg-featured-products {
    min-height: 300px;
  }
}
@media (min-width: 768px) {
  .hg-featured-products {
    min-height: 265px;
  }
}

/* Product rows: rows hide themselves when a store has no products, so they can't get
   a fixed reservation. Cap the plugin's loading skeleton (otherwise ~1,500px tall)
   at one row of placeholder cards so it can't push the rest of the page down. */
.cls-headless-products-container [class*="headless-loading-list"],
.cls-headless-products-container .headless-menu-placeholder {
  max-height: 340px;
  overflow: hidden;
}

/* MSO homepage product sliders */
.headless-products-wrap {
  min-height: 210px; /* desktop: 200px loaded + buffer */
}
@media (max-width: 991.98px) {
  .headless-products-wrap {
    min-height: 250px; /* mobile: 230px loaded + buffer */
  }
}
.cls-headless-products-container,
.cls-headless-products-container .headless-card-theme-v1 {
  width: 100%;
}
.container-fluid.headless-strain-card-wrap {
  min-height: 88px;
}
.new-drops {
  min-height: 159px !important;
}
@media (min-width: 1200px) {
  .new-drops {
    min-height: 780px !important;
  }
}

/* =========================================================
   Other page sections
   ========================================================= */
.rpb-customer-reviews {
  min-height: 465px;
}
.hg-images {
  aspect-ratio: 1176 / 325;
  width: 100%;
}
@media (max-width: 991.98px) {
  .hg-images {
    aspect-ratio: 931 / 525;
  }
}
@media (max-width: 575.98px) {
  .rpb-location-map .location-map-icon {
    height: 123px;
    width: 86px;
  }
}

/* =========================================================
   Font fallbacks (font-display: swap)
   Same selectors as main.css / critical CSS, with a metric-matched local fallback
   inserted so text doesn't reflow when the web font arrives. The fallback faces are
   defined inline in head.blade.php. Generated from main.css: if main.css is rebuilt
   with new font-family rules, add them here too.
   ========================================================= */
.age-gate-modal .modal-body,
.age-gate-modal .modal-footer,
.header-bottom-menu .navbar-nav .nav-link,
.header-default .navbar-nav .nav-link,
.header-topbar,
.rpb-blog-feed.feed-style-1 .blog-cats span,
.sidebar .menu li,
.sub-heading,
body {
  font-family: poppins, 'Poppins Fallback', sans-serif;
}
.coupon-wrapper .coupon-col .coupon-outer .coupon-inner .coupon-header .coupon-title,
.display-1,
.display-2,
.display-3,
.h1,
.h2,
.h3,
.h4,
.h5,
.h6,
.headless-card-theme-v1 .headless-shortcode-title-wrapper .headless-shortcode-title,
.headless-card-theme-v1 .headless-shortcode-title-wrapper .page-header.default-banner .headless-shortcode-title,
.headless-card-theme-v1 .headless-shortcode-title-wrapper .page-title .headless-shortcode-title,
.page-header.default-banner .h1,
.page-header.default-banner .h2,
.page-header.default-banner .headless-card-theme-v1 .headless-shortcode-title-wrapper .headless-shortcode-title,
.page-header.default-banner h1,
.page-header.default-banner h2,
.page-title .h1,
.page-title .h2,
.page-title .headless-card-theme-v1 .headless-shortcode-title-wrapper .headless-shortcode-title,
.page-title h1,
.page-title h2,
.range-headless .headless-shortcode-title.headless-related-products-title,
.rpb-headless-product-slider .headless-products-container .headless-product-card .headless-product-title span,
.sidebar-contact .sb-contact-title,
.woocommerce-products-header .products-header-title,
h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: fredoka-variable, 'Fredoka Fallback', sans-serif;
}
.alt-font {
  font-family: fredoka-variable, 'Fredoka Fallback', sans-serif !important;
}
@media print {
  .coupon-outer .coupon-inner .coupon-header .coupon-title {
    font-family: fredoka-variable, 'Fredoka Fallback', sans-serif;
  }
}
