body.cms-index-index [data-content-type="products"][data-appearance="carousel"] [data-role="glider-content"] {
  display: flex;
  gap: 1rem;
  align-items: stretch;
}

body.cms-index-index [data-content-type="products"][data-appearance="carousel"] [data-role="glider-content"].grid {
  grid-template-columns: none;
}

body.cms-index-index [data-content-type="products"][data-appearance="carousel"] .glider-track {
  display: flex;
  gap: 1rem;
}

/* Match Algolia PLP product image ratio (304/360) */
body.cms-index-index [data-content-type="products"][data-appearance="carousel"] .product-item-photo {
  width: 100%;
  aspect-ratio: 304/360;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-left: auto;
  margin-right: auto;
}

body.cms-index-index [data-content-type="products"][data-appearance="carousel"] .product-item-photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

body.cms-index-index [data-content-type="products"][data-appearance="carousel"] .product-info p.py-1.text-gray-400 {
  margin-bottom: 0.25rem;
  line-height: 1.2;
}

body.cms-index-index [data-content-type="products"][data-appearance="carousel"] .product-info .flex.py-1 {
  height: auto;
  align-items: center;
  gap: 0.25rem;
  margin-top: 0.25rem;
}

/* -------------------------------------------------------------------------- */
/* Homepage layout parity fixes (CE vs production)                             */
/* -------------------------------------------------------------------------- */

/* 1) Banner spacing: remove tall page-main margins on homepage */
body.cms-index-index .page-main,
body.cms-index-index .page-main-full-width {
  margin-top: 0 !important;
  margin-bottom: 0 !important;
}

/* 2) Sand-colored toolbar bar background: don’t rely on PB inline <style> */
body.cms-index-index .icons-links-bar,
body.cms-index-index .pagebuilder-column-group.icons-links-bar {
  background-color: #fdf8eb !important; /* live: --clr-sand */
  position: relative;
  z-index: 0;
}

/* 3) Break between puppy/kitten boxes (PB columns) */
body.cms-index-index [data-pb-style="MW2M9CC"] h2 {
  padding-top: 1rem !important;   /* was pt-6 */
  padding-bottom: 0.75rem !important; /* was pb-5 */
}

body.cms-index-index [data-pb-style="PG8EPYX"] {
  margin-top: 0 !important;  /* override my-2 */
  margin-bottom: 0 !important;
}

body.cms-index-index [data-pb-style="PG8EPYX"] > [data-content-type="column-line"] {
  /* Reduce outer gap (matches live tighter spacing) */
  margin-top: 0.25rem !important;
  margin-bottom: 0.25rem !important;
  /* Force flex so we can reliably space columns */
  display: flex !important;
  flex-wrap: wrap;
  column-gap: 3rem; /* bigger break between Puppy/Kitten */
  row-gap: 1.5rem;
}

@media (min-width: 768px) {
  /* PageBuilder columns can be float/inline-based; force reliable spacing by flattening wrappers */
  body.cms-index-index [data-pb-style="PG8EPYX"] > [data-content-type="column-line"] > .pagebuilder-column {
    display: contents;
  }

  body.cms-index-index [data-pb-style="PG8EPYX"] > [data-content-type="column-line"] {
    flex-wrap: nowrap;
    gap: 3rem !important;
  }

  body.cms-index-index [data-pb-style="PG8EPYX"] > [data-content-type="column-line"] figure {
    flex: 1 1 0%;
    margin: 0 !important;
  }
}

/* (intentionally blank) */

@media (max-width: 767px) {
  body.cms-index-index [data-pb-style="PG8EPYX"] .pagebuilder-column {
    width: 100% !important; /* ensure stacked layout when wrapping */
  }
}

/* 4) “Our Top Categories” (Glider) arrows: vertically center */
body.cms-index-index #top-categories-slider {
  position: relative;
}

body.cms-index-index #top-categories-slider .glider-contain {
  position: relative;
}

body.cms-index-index #top-categories-slider .glider-contain {
  position: relative;
  margin-bottom: 2.5rem;
}

body.cms-index-index #top-categories-slider .carousel-nav {
  position: absolute !important;
  inset: 0;
  padding: 0 !important;
  background: transparent !important;
  display: block !important;
  pointer-events: none;
  overflow: visible;
}

body.cms-index-index #top-categories-slider .glider-prev,
body.cms-index-index #top-categories-slider .glider-next {
  pointer-events: auto;
  top: 50% !important;
  --tw-translate-y: -50% !important;
  /* Preserve tailwind rotate (prev uses rotate-180) */
  transform: translate(var(--tw-translate-x), var(--tw-translate-y))
    rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y))
    scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y)) !important;
}

body.cms-index-index #top-categories-slider .glider-dots {
  pointer-events: auto;
  position: absolute;
  left: 0;
  right: 0;
  bottom: -2rem;
  justify-content: center;
}

/* 5) “Our Top Petflow Picks” (Glider) arrows: center on tiles, not nav row */
body.cms-index-index [data-content-type="products"][data-appearance="carousel"] .widget-product-carousel {
  position: relative;
}

body.cms-index-index [data-content-type="products"][data-appearance="carousel"] .widget-product-carousel .carousel-nav {
  position: absolute !important;
  inset: 0;
  padding: 0 !important;
  background: transparent !important;
  display: block !important;
  pointer-events: none; /* allow only buttons/dots to be interactive */
}

body.cms-index-index [data-content-type="products"][data-appearance="carousel"] .widget-product-carousel .glider-prev,
body.cms-index-index [data-content-type="products"][data-appearance="carousel"] .widget-product-carousel .glider-next {
  pointer-events: auto;
  position: absolute !important;
  top: 50% !important;
  --tw-translate-y: -50% !important;
  transform: translateY(-50%) !important;
  z-index: 30;
  width: 40px;
  height: 40px;
  border-radius: 9999px;
  background: rgba(226, 232, 240, 1);
  display: flex !important;
  align-items: center;
  justify-content: center;
}

body.cms-index-index [data-content-type="products"][data-appearance="carousel"] .widget-product-carousel .glider-prev {
  left: 1.5rem !important;
}

body.cms-index-index [data-content-type="products"][data-appearance="carousel"] .widget-product-carousel .glider-next {
  right: 1.5rem !important;
}

body.cms-index-index [data-content-type="products"][data-appearance="carousel"] .widget-product-carousel .glider-dots {
  pointer-events: auto;
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0.75rem;
  justify-content: center;
}

/* 6) Clearance tiles (dog/cat) need a visible gap like live (~12px) */
body.cms-index-index [data-pb-style="AGVFRVE"] > [data-content-type="column-line"] {
  display: flex !important;
  flex-wrap: nowrap;
  gap: 12px !important;
}

body.cms-index-index [data-pb-style="AGVFRVE"] > [data-content-type="column-line"] > .pagebuilder-column {
  flex: 1 1 0%;
  width: auto !important;
  margin: 0 !important; /* override md:mr-3 and mt-6 */
  min-width: 0;
}

.cmsp72-bg-petflow-yellow {
  background-color: var(--clr-yellow);
}

.petflow-essentials {
  margin-bottom: 1rem;
}

.petflow-essentials > h2 {
  margin-left: 1rem;
  font-size: 1.25rem;
  font-weight: 800;
  padding-top: 1.5rem;
  padding-bottom: 1.25rem;
}

@media (min-width: 768px) {
  .petflow-essentials > h2 {
    font-size: 1.5rem;
  }
}

.petflow-essentials-grid {
  max-width: 1440px;
  margin: 0 auto;
  margin-top: 0.5rem;
}

@media (min-width: 1280px) {
  .petflow-essentials-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 2rem;
    align-items: stretch;
  }
}

.petflow-essentials-card {
  background-color: var(--clr-yellow);
}

@media (max-width: 1279px) {
  .petflow-essentials-card + .petflow-essentials-card {
    margin-top: 2rem;
  }
}

.petflow-essentials-card-inner {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 2rem;
  padding: 1.5rem 3rem;
}

@media (max-width: 640px) {
  .petflow-essentials-card-inner {
    grid-template-columns: 1fr;
    padding: 1.5rem;
  }
}

.petflow-essentials-title {
  /* Match live: larger + wraps earlier */
  max-width: 60%;
  font-size: 1.75rem;
  line-height: 1.15;
  font-weight: 800;
  padding: 0.75rem 0;
}

@media (min-width: 640px) {
  .petflow-essentials-title {
    max-width: 55%;
    font-size: 2rem;
  }
}

.petflow-essentials-body {
  max-width: 55%;
  padding: 0.75rem 0;
  font-size: 1rem;
  line-height: 1.35;
}

@media (max-width: 640px) {
  .petflow-essentials-title,
  .petflow-essentials-body {
    max-width: 100%;
  }
}

.petflow-essentials-link {
  color: var(--clr-blue);
  text-decoration: underline;
  font-weight: 600;
}

.petflow-essentials-card-image {
  padding: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
}
