/* ================================================================
   Pets at Home – Header & Footer Scoped Styles
   Built from source CSS: cdn.petsathome.com
   ================================================================ */

/* --- Utilities (Tailwind compat) --- */
.hidden { display: none !important; }
.overflow-hidden { overflow: hidden; }
nav {all: unset;
}

/* Override pah.2024.1 body padding on mobile so nav sits under the URL bar (no white gap) */
@media (max-width: 47.999rem) {
  body:has(#pah-header) {
    padding-top: 0 !important;
  }
}
#pah-header a,
#pah-footer a {all: unset;
  box-sizing: border-box;
}

/* --- Header base --- */
#pah-header {
  background-color: #002828;
  position: relative;
  z-index: 100;
}

/* --- Scoped Custom Properties (source :root values) --- */
#pah-header,
#pah-footer {
  --c-brand-base: #00AA28;
  --c-brand-dark: #002828;
  --c-brand-hover: #00871E;
  --c-neutral-white: #FFFFFF;
  --c-neutral-smoke: #D6D6D6;
  --c-neutral-snow: #F9F9F9;
  --c-neutral-silver: #757575;
  --c-neutral-charcoal: #525252;
  --c-neutral-ash: #A8A8A8;
  --c-flavours-off-white: #FFFAF5;
  --c-subscription-base: #5537CD;
  --font-body: 'TT Commons Pro', -apple-system, system-ui, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
  --font-heading: 'Helpetica', 'TT Commons Pro', -apple-system, system-ui, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* --- Header Grid (grid-template-areas not available in Tailwind) --- */
#pah-header .pah-header-grid {
  display: grid;
  grid-template:
    "menuButton . logo account basket" 3.5rem
    "search search search search search" auto
    / 3.5rem 3.5rem auto 3.5rem 3.5rem;
  gap: 0.25rem;
  padding: 0.5rem 0.75rem 0.75rem;
  transition: padding-bottom 0.3s ease;
}
#pah-header .pah-header-grid:has(.pah-search-area.pah-hidden-up) {
  padding-bottom: 0.25rem;
}
@media (max-width: 1023px) {
  #pah-header .pah-header-grid {
    padding-left: 0.25rem;
    padding-right: 0.25rem;
  }
}
@media (min-width: 1024px) {
  #pah-header .pah-header-grid {
    padding: 1rem 0.75rem 0.5rem 0;
    grid-template-areas: "logo search account basket";
    grid-template-columns: max-content auto 3.5rem 3.5rem;
    grid-template-rows: auto;
    gap: 0 0.5rem;
    margin-bottom: 0;
  }
}

/* Grid area assignments */
#pah-header .pah-area-logo        { grid-area: logo; }
#pah-header .pah-area-search      { grid-area: search; }
#pah-header .pah-area-account     { grid-area: account; }
#pah-header .pah-area-basket      { grid-area: basket; }
#pah-header .pah-area-menu-button { grid-area: menuButton; }

/* --- Service Banner (USP bar) --- */
#pah-header .pah-service-banner {
  position: relative;
  min-height: 2.5rem;
  background-color: var(--c-brand-dark);
  color: var(--c-neutral-white);
  transition: margin-top 0.3s ease;
  z-index: 1003;
}
#pah-header .pah-service-banner.pah-hidden-up {
  margin-top: -2.5rem;
  overflow: hidden;
}
#pah-header .pah-service-banner-inner {
  background-color: inherit;
  position: absolute;
  inset: 0 0 auto;
  border-bottom: 1px solid var(--c-neutral-charcoal);
  z-index: 1000;
}
#pah-header .pah-service-banner-wrapper {
  min-height: 2.5rem;
  max-width: 90rem;
  margin-inline: auto;
  position: relative;
  cursor: pointer;
}
/* Hover underline on USP messages — underline each span; gap is always 0
   so the underlines join seamlessly (spacing comes from leading space in text) */
#pah-header .pah-service-banner-wrapper:hover .pah-usp-message span,
#pah-header .pah-service-banner-wrapper:focus-visible .pah-usp-message span {
  text-decoration: underline;
  text-underline-offset: 0.25rem;
  text-decoration-thickness: 1px;
  text-decoration-color: var(--c-neutral-white);
  text-decoration-skip-ink: none;
}
#pah-header .pah-usp-container {
  display: flex;
  width: 100%;
  overflow-x: hidden;
  min-height: 2.5rem;
  position: relative;
  align-items: center;
  justify-content: center;
  padding: 0 2.5rem 0 1rem;
}
@media (min-width: 1024px) {
  #pah-header .pah-usp-container {
    justify-content: space-between;
    padding: 0;
  }
}
#pah-header .pah-usp-message {
  display: none;
  white-space: nowrap;
  font-size: 0.875rem;
  line-height: 1.4285714286;
  padding: 0.5rem;
}
#pah-header .pah-usp-message:first-child {
  display: flex;
  align-items: center;
  gap: 0;
  padding-left:1rem;
  justify-content:start;
}
@media (min-width: 1024px) {
  #pah-header .pah-usp-message {
    display: flex;
    align-items: center;
    gap: 0;
    width:100%;
    justify-content:center;
    margin:0;
    padding:0.5rem;
  }
  /* Last message is 2nd-to-last child because .pah-usp-toggle is the actual last child */
  #pah-header .pah-usp-container .pah-usp-message:nth-last-child(2) {
    justify-content: end;
    padding-right: 5rem;
  }
}
#pah-header .pah-usp-toggle {
  position: absolute;
  right: 0.5rem;
  top: 50%;
  transform: translateY(-50%);
  z-index: 1;
}

/* --- USP Dropdown (overlays content, fixed at top; full-width bar + pah-wrapper) --- */
#pah-header .pah-usp-dropdown {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1004;
}
#pah-header .pah-usp-dropdown.pah-usp-dropdown-open,
#pah-header .pah-usp-dropdown[aria-hidden="false"] {
  display: block;
}
#pah-header .pah-usp-dropdown-bar {
  width: 100%;
  background-color: var(--c-neutral-white);
  color: #2A2A2A;
  border-bottom: none;
  box-shadow: 0 0.375rem 0.75rem rgba(0, 0, 0, 0.1);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
  transition: border-bottom 0.3s ease-in, box-shadow 0.3s ease-in;
}
#pah-header .pah-usp-dropdown-bar .pah-wrapper {
  padding: 0 1rem 0;
}
#pah-header .pah-usp-dropdown-header {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  min-height: 3.5rem;
  padding: 0.75rem 0 0.75rem;
}
@media (min-width: 1024px) {
  #pah-header .pah-usp-dropdown-header {
    padding-right: 4rem;
  }
}
#pah-header .pah-usp-dropdown-close {
  width: 2rem;
  height: 2rem;
  padding: 0;
  border: none;
  background: none;
  cursor: pointer;
  color: var(--c-neutral-charcoal);
  display: flex;
  align-items: center;
  justify-content: center;
}
#pah-header .pah-usp-dropdown-close:hover,
#pah-header .pah-usp-dropdown-close:focus-visible {
  color: var(--c-brand-dark);
  outline: 0.125rem solid #F0FEFF;
  outline-offset: 0.125rem;
}
#pah-header .pah-usp-dropdown-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem 2rem;
  padding: 0 1rem 2rem;
}
@media (min-width: 1024px) {
  #pah-header .pah-usp-dropdown-grid {
    grid-template-columns: repeat(3, auto);
    gap: 2.75rem;
    justify-content: space-between;
    padding: 0 5rem 2.5rem;
  }
}
#pah-header .pah-usp-dropdown-column {
  text-align: left;
}
#pah-header .pah-usp-dropdown-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--c-brand-dark);
  margin: 0 0 0.5rem;
  font-family: var(--font-body);
}
#pah-header .pah-usp-dropdown-column p {
  margin: 0 0 0.75rem;
  color: #2A2A2A;
}
#pah-header .pah-usp-dropdown-column a {
  color: #2A2A2A;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 0.25rem;
  text-decoration-thickness: 1.5px;
  cursor: pointer;
}
#pah-header .pah-usp-dropdown-column a:hover,
#pah-header .pah-usp-dropdown-column a:focus-visible {
  color: var(--c-brand-dark);
  text-decoration: none;
}

/* --- Search bar --- */
#pah-header .pah-search-wrap {
  display: flex;
  align-items: stretch;
  width: 100%;
  position: relative;
}
#pah-header .pah-search-input {
  width: 100%;
  background-color: var(--c-neutral-white);
  border: none;
  border-radius: 0.25rem;
  padding: 0.625rem 3rem 0.625rem 1rem;
  font-size: 1rem;
  line-height: 1.5;
  font-weight: 500;
  font-family: var(--font-body);
  color: #2A2A2A;
  outline: none;
  box-sizing: border-box;
}
#pah-header .pah-search-input::placeholder {
  color: var(--c-neutral-silver);
}
/* Hide native browser search cancel/clear button */
#pah-header .pah-search-input::-webkit-search-cancel-button,
#pah-header .pah-search-input::-webkit-search-decoration {
  -webkit-appearance: none;
  appearance: none;
  display: none;
}
#pah-header .pah-search-input::-ms-clear {
  display: none;
  width: 0;
  height: 0;
}
#pah-header .pah-search-input:focus-visible {
  outline: none;
}
/* Mobile: outline on the input itself (padding on search-area gives room for the outline) */
@media (max-width: 1023px) {
  #pah-header .pah-search-input:focus-visible {
    border-radius: 0.25rem;
    outline: 0.125rem solid #F0FEFF;
    outline-offset: 0.125rem;
  }
}
/* Desktop: outline on the whole wrap (input + search button) */
@media (min-width: 1024px) {
  #pah-header .pah-search-wrap:focus-within {
    outline: 0.125rem solid #F0FEFF;
    outline-offset: 0.125rem;
    border-radius: 0.25rem;
  }
}
/* Search clear/dismiss button */
#pah-header .pah-search-clear {
  position: absolute;
  right: 3.5rem;
  top: 50%;
  transform: translateY(-50%);
  display: none;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.25rem;
  z-index: 2;
}
#pah-header .pah-search-clear svg {
  width: 1.25rem;
  height: 1.25rem;
}
#pah-header .pah-search-clear:hover svg circle {
  fill: #525252;
}
@media (max-width: 1023px) {
  #pah-header .pah-search-clear {
    right: 0.75rem;
  }
}

#pah-header .pah-search-btn {
  background-color: var(--c-brand-base);
  width: 3rem;
  flex-shrink: 0;
  display: none;
  border-radius: 0 0.25rem 0.25rem 0;
  border: none;
  cursor: pointer;
  align-items: center;
  justify-content: center;
}
@media (min-width: 1024px) {
  #pah-header .pah-search-btn {
    display: flex;
  }
  #pah-header .pah-search-input {
    border-radius: 0.25rem 0 0 0.25rem;
  }
}
#pah-header .pah-search-btn:hover {
  background-color: var(--c-brand-hover);
}
#pah-header .pah-search-btn:active {
  transform: scale(0.98);
}

/* Search area scroll-away on mobile */
#pah-header .pah-search-area {
  padding: 0.25rem 0.75rem;
  overflow: visible;
}
#pah-header .pah-search-area.pah-hidden-up {
  visibility: hidden;
  height: 0;
  padding: 0;
  margin: 0;
  overflow: hidden;
}
@media (min-width: 768px) {
  #pah-header .pah-search-area {
    padding: 0;
  }
}
@media (min-width: 1024px) {
  #pah-header .pah-search-area {
    padding: 0;
    display: flex;
    align-items: center;
    width: auto;
    margin-right: 1rem;
    overflow: visible;
  }
  #pah-header .pah-search-area.pah-hidden-up {
    visibility: visible;
    height: auto;
    padding: 0;
  }
}

/* Mobile sticky header */
#pah-header.pah-sticky {
  position: sticky;
  top: 0;
  z-index: 100;
}

/* --- Nav List (slug menu) --- */
#pah-header .pah-nav-list {
  list-style: none;
  display: flex;
  margin: 0;
  gap: 0.5rem;
  width: 100%;
  justify-content: flex-start;
  position: relative;
  height: 3rem;
  padding: 0;
}
#pah-header .pah-nav-item {
  background: none;
  border: none;
  height: 3rem;
  gap: 0.5rem;
  display: flex;
  cursor: pointer;
  min-width: 2.5rem;
  border-radius: 0.5rem 0.5rem 0 0;
  color: var(--c-flavours-off-white);
  padding: 0.75rem;
  justify-content: center;
  align-items: center;
  text-decoration: none;
  font-size: 1rem;
  line-height: 1.5;
  font-weight: 500;
  white-space: nowrap;
  font-family: var(--font-body);
}
#pah-header .pah-nav-item span {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  white-space: nowrap;
}
#pah-header .pah-nav-item:hover,
#pah-header .pah-nav-item:focus-visible {
  text-decoration: underline;
  text-underline-offset: 0.25rem;
  text-decoration-thickness: 1.5px;
}
#pah-header .pah-nav-item:hover {
  color: var(--c-brand-dark);
  background-color: var(--c-neutral-white);
}
#pah-header .pah-nav-item:focus-visible {
  text-decoration: none;
  outline: 0.125rem solid #F0FEFF;
  outline-offset: -0.125rem;
}
#pah-header .pah-nav-item:active {
  text-decoration: none;
}
#pah-header .pah-nav-item[data-easy-repeat="true"] {
  padding: 1rem;
}
@media (min-width: 90rem) {
  #pah-header .pah-nav-list {
    gap: 1rem;
    padding-left: 0;
  }
  #pah-header .pah-nav-item {
    min-width: 5.5rem;
  }
}

/* Easy Repeat icon fill + purple hover */
#pah-header .pah-nav-item .pah-easy-repeat-svg {
  fill: var(--c-flavours-off-white);
}
#pah-header .pah-nav-item[data-easy-repeat="true"]:hover {
  background-color: var(--c-subscription-base);
  color: var(--c-neutral-white);
  text-decoration: none;
}
#pah-header .pah-nav-item[data-easy-repeat="true"]:hover .pah-easy-repeat-svg {
  fill: var(--c-neutral-white);
}

/* --- Action Buttons (account, basket, menu) --- */
#pah-header .pah-action-btn {
  fill: var(--c-flavours-off-white);
  text-decoration: none;
  cursor: pointer;
  background-color: transparent;
  border: none;
  align-items: center;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.5rem;
  align-self: center;
  border-radius: 0.5rem;
  min-width: 3.25rem;
  max-width: max-content;
  height: 3.5rem;
  padding: 0.5rem;
  color: var(--c-flavours-off-white);
  font-size: 0.75rem;
  line-height: 1.333;
  font-weight: 500;
  font-family: var(--font-body);
}
#pah-header .pah-action-btn > svg {
  width: 1.25rem;
  height: 1.25rem;
}
#pah-header .pah-action-btn:hover span {
  text-decoration: underline;
  text-underline-offset: 0.25rem;
  text-decoration-thickness: 1.5px;
}
#pah-header .pah-action-btn:focus-visible {
  outline: 0.125rem solid #F0FEFF;
  outline-offset: -0.125rem;
}

/* Hide menu button on desktop */
#pah-header .pah-menu-btn {
  display: flex;
}
@media (min-width: 1024px) {
  #pah-header .pah-menu-btn {
    display: none;
  }
}
/* Burger to X toggle */
#pah-header .pah-menu-btn .pah-icon-burger,
#pah-header .pah-menu-btn .pah-icon-close {
  transition: opacity 0.2s;
  width: 1.5rem;
  height: 1.5rem;
}
#pah-header .pah-menu-btn .pah-icon-close {
  display: none;
}
#pah-header .pah-menu-btn[aria-expanded="true"] .pah-icon-burger {
  display: none;
}
#pah-header .pah-menu-btn[aria-expanded="true"] .pah-icon-close {
  display: block;
}
/* Hide "Menu" label when nav is open */
#pah-header .pah-menu-btn[aria-expanded="true"] > span {
  display: none;
}

/* --- Header Logo --- */
#pah-header .pah-logo-svg {
  overflow: visible;
  width: 5rem;
  height: 2rem;
  fill: var(--c-brand-base);
}
@media (min-width: 768px) {
  #pah-header .pah-logo-svg {
    width: 5.5rem;
    height: 2.1875rem;
  }
}
#pah-header .pah-logo-area {
  display: flex;
  align-items: center;
  justify-content: center;
  height: fit-content;
  align-self: center;
}
@media (min-width: 1024px) {
  #pah-header .pah-logo-area {
    margin-right: 2rem;
    padding-left: 0.5rem;
  }
}
@media (min-width: 73.25rem) {
  #pah-header .pah-logo-area {
    margin-right: 3rem;
  }
}

/* --- Search container area --- */
@media (min-width: 1024px) {
  #pah-header .pah-search-area {
    padding: 0;
    display: flex;
    align-items: center;
    width: auto;
    margin-right: 1rem;
  }
}

/* --- Desktop Navigation Container --- */
#pah-header .pah-desktop-nav {
  display: none;
  position: relative;
}
@media (min-width: 1024px) {
  #pah-header .pah-desktop-nav {
    display: block;
    max-width: 90rem;
    margin: 0 auto;
    padding: 0;
  }
}

/* --- Mega Menu Dropdown --- */
#pah-header .pah-mega-menu {
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  background-color: var(--c-neutral-white);
  border-radius: 0 0 0.5rem 0.5rem;
  box-shadow: 0 0.375rem 0.75rem rgba(0,0,0,0.1);
  z-index: 999;
  max-width: 90rem;
  margin: 0 auto;
  color: #2A2A2A;
  padding: 1.5rem;
}
/* Grey overlay behind mega menu (lives OUTSIDE #pah-header to escape stacking context) */
.pah-mega-overlay {
  position: fixed;
  inset: 0;
  width: calc(100vw - (100vw - 100%));
  height: calc(100vh - (100vh - 100%));
  background-color: #000000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  z-index: 99;
}
.pah-mega-overlay.pah-mega-overlay-visible {
  opacity: 0.5;
}
#pah-header .pah-mega-heading {
  font-size: 0.875rem;
  font-weight: 700;
  line-height: 1.429;
  color: #2A2A2A;
  margin: 0 0 0.75rem;
  font-family: var(--font-body);
}
#pah-header .pah-mega-link {
  display: block;
  color: #2A2A2A;
  font-size: 1rem;
  line-height: 1.429;
  text-decoration: none;
  padding: 0.5rem 0;
}
#pah-header .pah-mega-link:hover,
#pah-header .pah-mega-link:focus-visible {
  text-decoration: underline;
  text-underline-offset: 0.25rem;
  text-decoration-thickness: 1.5px;
}

/* --- 3-Column Mega Menu --- */
#pah-header .pah-mega-3col {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1.5fr 1.5fr 2fr;
  height: 28rem;
  font-size: 1rem;
  font-weight: 500;
  overflow: hidden;
}
#pah-header .pah-mega-col1 {
  padding: 1.5rem 0;
  border-right: 1px solid #E8E8E8;
  overflow-y: auto;
}
#pah-header .pah-mega-col2 {
  padding: 1.5rem 0;
  border-right: 1px solid #E8E8E8;
  overflow-y: auto;
}
#pah-header .pah-mega-col3 {
  padding: 1.5rem 0;
  overflow-y: auto;
}
#pah-header .pah-mega-parent {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 0.5rem 3rem 0.5rem 1rem;
  color: #2A2A2A;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s;
  border-radius: 0.125rem;
  position: relative;
}
#pah-header .pah-mega-parent:hover,
#pah-header .pah-mega-parent.pah-active {
  text-decoration: underline;
  text-underline-offset: 3px;
  color: var(--c-brand-dark);
}
#pah-header .pah-mega-parent:hover::before,
#pah-header .pah-mega-parent.pah-active::before {
  content: "";
  position: absolute;
  inset: 0;
  right: 2rem;
  background: var(--c-neutral-smoke);
  border-radius: 0.125rem;
  z-index: -1;
}
#pah-header .pah-mega-parent svg {
  width: 0.6rem;
  height: 1.5rem;
  flex-shrink: 0;
  margin-left: 0.5rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1;
  stroke-linecap: round;
  stroke-linejoin: round;
}
#pah-header .pah-mega-sub,
#pah-header .pah-mega-ctx {
  display: none;
  padding: 0 1.5rem;
}
#pah-header .pah-mega-sub.pah-visible,
#pah-header .pah-mega-ctx.pah-visible {
  display: block;
}
#pah-header .pah-mega-sub .pah-mega-link,
#pah-header .pah-mega-ctx .pah-mega-link {
  display: block;
  padding: 0.4rem 0.5rem;
  color: #2A2A2A;
  text-decoration: none;
  cursor: pointer;
  border-radius: 0.125rem;
}
#pah-header .pah-mega-sub .pah-mega-link:hover,
#pah-header .pah-mega-ctx .pah-mega-link:hover,
#pah-header .pah-mega-sub .pah-mega-link:focus-visible,
#pah-header .pah-mega-ctx .pah-mega-link:focus-visible {
  text-decoration: underline;
  background-color: var(--c-neutral-smoke);
  border-radius: 0.125rem;
  cursor: pointer;
}
#pah-header .pah-mega-ctx .pah-mega-heading {
  font-size: 0.9375rem;
  font-weight: 700;
  color: #002828;
  margin: 0 0 0.25rem;
  padding: 0;
}
#pah-header .pah-mega-ctx .pah-mega-heading + .pah-mega-heading {
  margin-top: 1.25rem;
}
#pah-header .pah-mega-ctx .pah-mega-heading:last-of-type:not(:first-of-type) {
  padding-top: 2.5rem;
}
#pah-header .pah-mega-explore {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 0.75rem 1.5rem;
  background: #F5F5F5;
  border-top: 1px solid #E8E8E8;
  border-radius: 0 0 0.75rem 0.75rem;
  font-size: 0.875rem;
}
#pah-header .pah-mega-explore span {
  color: #555;
  font-weight: 500;
  white-space: nowrap;
}
#pah-header .pah-mega-explore a {
  color: #002828;
  text-decoration: none;
  font-weight: 500;
  white-space: nowrap;
}
#pah-header .pah-mega-explore a:hover {
  text-decoration: underline;
}
#pah-header .pah-mega-explore .pah-explore-sep {
  width: 1px;
  height: 1rem;
  background: #ccc;
  flex-shrink: 0;
}
#pah-header .pah-mega-explore-right {
  margin-left: auto;
  display: flex;
  gap: 1.5rem;
  align-items: center;
}

/* --- Mobile Drawer (slides in from left, below header) --- */
#pah-header .pah-mobile-drawer {
  position: fixed;
  top: var(--pah-header-height, 7.5rem);
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  overflow-y: auto;
  background-color: var(--c-neutral-white);
  z-index: 1001;
  color: #2A2A2A;
  transform: translateX(-100%);
  transition: transform 0.3s ease-in-out;
  /* Green scrollbar */
  scrollbar-color: var(--c-brand-base) transparent;
  scrollbar-width: thin;
}
#pah-header .pah-mobile-drawer.pah-drawer-open {
  transform: translateX(0);
}
#pah-header .pah-mobile-drawer::-webkit-scrollbar {
  width: 6px;
}
#pah-header .pah-mobile-drawer::-webkit-scrollbar-track {
  background: transparent;
}
#pah-header .pah-mobile-drawer::-webkit-scrollbar-thumb {
  background-color: var(--c-brand-base);
  border-radius: 3px;
}
#pah-header .pah-mobile-overlay {
  position: fixed;
  top: var(--pah-header-height, 7.5rem);
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0,0,0,0.5);
  z-index: 999;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}
#pah-header .pah-mobile-overlay.pah-overlay-visible {
  opacity: 1;
  pointer-events: auto;
}
/* Keep header content above overlay so it doesn't appear faded */
#pah-header .pah-header-grid {
  position: relative;
  z-index: 1003;
}

/* Mobile drill-down navigation */
#pah-header .pah-drilldown {
  position: relative;
  overflow: hidden;
}
#pah-header .pah-drilldown-panel {
  width: 100%;
  transition: transform 0.3s ease-in-out;
}
#pah-header .pah-drilldown-panel.pah-panel-hidden-right {
  position: absolute;
  top: 0;
  left: 0;
  transform: translateX(100%);
  pointer-events: none;
}
#pah-header .pah-drilldown-panel.pah-panel-hidden-left {
  position: absolute;
  top: 0;
  left: 0;
  transform: translateX(-100%);
  pointer-events: none;
}
#pah-header .pah-drilldown-panel.pah-panel-active {
  position: relative;
  transform: translateX(0);
  pointer-events: auto;
}
#pah-header .pah-drilldown-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 1.25rem 2rem;
  background: none;
  border: none;
  border-bottom: 1px solid #E8E8E8;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 500;
  color: #2A2A2A;
  font-family: var(--font-body);
  text-decoration: none;
  text-align: left;
}
#pah-header .pah-drilldown-item:hover,
#pah-header .pah-drilldown-item:focus-visible {
  background-color: #F9F9F9;
}
#pah-header .pah-drilldown-item svg {
  width: 0.5rem;
  height: 1rem;
  flex-shrink: 0;
  fill: none;
  stroke: #2A2A2A;
  stroke-width: 1.25;
}
#pah-header .pah-drilldown-back {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  width: 100%;
  padding: 1rem 2.5rem;
  background-color: var(--c-neutral-white);
  border: none;
  border-bottom: 1px solid #E8E8E8;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 700;
  color: #2A2A2A;
  font-family: var(--font-body);
  text-align: center;
}
#pah-header .pah-drilldown-back svg {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  width: 0.5rem;
  height: 1rem;
  flex-shrink: 0;
  fill: none;
  stroke: #2A2A2A;
  stroke-width: 1.25;
}
#pah-header .pah-drilldown-back:hover,
#pah-header .pah-drilldown-back:focus-visible {
  background-color: #F5F5F5;
}
/* Links without chevrons (Offers, Easy Repeat) get equal spacing */
#pah-header .pah-drilldown-link {
  display: block;
  width: 100%;
  padding: 1.25rem 2rem;
  border-bottom: 1px solid #E8E8E8;
  font-size: 1rem;
  font-weight: 500;
  color: #2A2A2A;
  font-family: var(--font-body);
  text-decoration: none;
  cursor: pointer;
}
#pah-header .pah-drilldown-link:hover,
#pah-header .pah-drilldown-link:focus-visible {
  background-color: #F9F9F9;
}
#pah-header .pah-drilldown-link[data-easy-repeat] {
  color: var(--c-subscription-base);
  display: flex;
  align-items: center;
}
#pah-header .pah-drilldown-easy-repeat-svg {
  width: auto;
  height: 1rem;
  fill: var(--c-subscription-base);
}

/* Shop By Brand / Shop By Life Stage sections in drill-down */
#pah-header .pah-drilldown-sb {
  background-color: var(--c-neutral-snow);
  padding: 1rem 0;
}
#pah-header .pah-drilldown-sb-heading {
  padding: 0.75rem 2rem 0.25rem;
  font-size: 1rem;
  line-height: 1.5;
  font-weight: 700;
  color: #002828;
  font-family: var(--font-body);
}
#pah-header .pah-drilldown-sb-link {
  display: block;
  padding: 0.75rem 2rem;
  font-size: 1rem;
  font-weight: 500;
  color: #2A2A2A;
  font-family: var(--font-body);
  text-decoration: none;
  cursor: pointer;
  border-bottom: 0;
}
#pah-header .pah-drilldown-sb-link:last-child {
  border-bottom: none;
}
#pah-header .pah-drilldown-sb-link:hover,
#pah-header .pah-drilldown-sb-link:focus-visible {
  background-color: #F0F0F0;
}

/* "More to Explore" section at the bottom of mobile nav root panel */
#pah-header .pah-drilldown-explore {
  background-color: var(--c-neutral-snow);
  padding: 1rem 0;
}
#pah-header .pah-drilldown-explore-heading {
  padding: 0.75rem 2rem 0.25rem;
  font-size: 1rem;
  line-height: 1.5;
  font-weight: 700;
  color: #002828;
  font-family: var(--font-body);
}
#pah-header .pah-drilldown-explore-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 2rem;
  font-size: 1rem;
  font-weight: 500;
  color: #2A2A2A;
  font-family: var(--font-body);
  text-decoration: none;
  cursor: pointer;
  border-bottom: 0;
}
#pah-header .pah-drilldown-explore-link:hover,
#pah-header .pah-drilldown-explore-link:focus-visible {
  background-color: #F0F0F0;
}
#pah-header .pah-drilldown-ext-icon {
  width: 1rem;
  height: 1rem;
  flex-shrink: 0;
  fill: #2A2A2A;
}

/* Mobile search transition */
#pah-mobile-search {
  transition: max-height 0.3s ease;
  overflow: hidden;
}

/* --- Footer --- */
#pah-footer {
  background-color: var(--c-brand-dark);
  position: relative;
  padding: 1.5rem 0;
  margin-top: auto;
}
@media (min-width: 1024px) {
  #pah-footer {
    padding: 4rem 0 7rem;
  }
}

/* --- Footer Wrapper --- */
#pah-footer .pah-wrapper {
  width: 100%;
  max-width: 90rem;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1rem;
  padding-right: 1rem;
}

#pah-header .pah-wrapper {
  width: 100%;
  max-width: 90rem;
  margin-left: auto;
  margin-right: auto;
}

/* --- Footer Columns --- */
#pah-footer .pah-footer-columns {
  display: grid;
  grid-template-columns: 1fr;
}
@media (min-width: 1024px) {
  #pah-footer .pah-footer-columns {
    grid-template-columns: repeat(5,minmax(1rem,1fr));
    gap: 1.5rem;
    padding: 0 0 3rem;
  }
}

/* Footer column headings */
#pah-footer .pah-footer-col-heading {
  font-size: 1rem;
  line-height: 1.5;
  font-weight: 700;
  color: var(--c-neutral-smoke);
  margin: 0 0 1.5rem;
  font-family: var(--font-body);
}

/* Footer column links */
#pah-footer .pah-footer-col-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
#pah-footer .pah-footer-col-links a,
#pah-footer .pah-footer-col-links span {
  color: white;
  font-size: 1rem;
  line-height: 1.429;
  font-weight: 500;
  text-decoration: none;
}
#pah-footer .pah-footer-col-links a:hover,
#pah-footer .pah-footer-col-links a:focus-visible {
  text-decoration: underline;
  text-underline-offset: 0.25rem;
  text-decoration-thickness: 1.5px;
}

/* Customer support links (green + underlined per reference screenshot) */
#pah-footer .pah-support-links a {
  color: var(--c-brand-base);
  text-decoration: underline;
  text-underline-offset: 0.25rem;
  text-decoration-thickness: 1.5px;
}
#pah-footer .pah-support-links a:hover {
  text-decoration: none;
}

/* --- Footer mobile accordion (< 1024px) --- */
#pah-footer .pah-footer-accordion-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 0.75rem 0;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1rem;
  line-height: 1.5;
  font-weight: 700;
  color: var(--c-neutral-smoke);
  font-family: var(--font-body);
}
#pah-footer .pah-footer-accordion-btn svg {
  width: 1rem;
  height: 1rem;
  fill: none;
  stroke: var(--c-neutral-smoke);
  stroke-width: 2;
  stroke-linecap: round;
  transition: transform 0.2s;
}
#pah-footer .pah-footer-accordion-btn[aria-expanded="true"] svg line:last-child {
  display: none;
}
#pah-footer .pah-footer-col-heading {
  display: none;
}
#pah-footer .pah-footer-col-links.pah-footer-collapsible {
  display: none;
  padding: 0;
}
#pah-footer .pah-footer-col-links.pah-footer-collapsible.pah-open {
  display: flex;
  gap:0.5rem;
}
@media (min-width: 1024px) {
  #pah-footer .pah-footer-accordion-btn {
    display: none;
  }
  #pah-footer .pah-footer-col-heading {
    display: block;
  }
  #pah-footer .pah-footer-col-links.pah-footer-collapsible {
    display: flex;
  }
}

/* --- Join now button (in Join our Pets Club column) --- */
#pah-footer .pah-footer-join-btn {
  display: none;
  margin-top: 1rem;
  padding: 0.625rem 1.25rem;
  background-color: var(--c-brand-base);
  color: var(--c-neutral-white);
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.5;
  font-family: var(--font-body);
  text-decoration: none;
  border: none;
  border-radius: 0.25rem;
  cursor: pointer;
  transition: background-color 0.2s;
}
#pah-footer .pah-footer-join-btn:hover,
#pah-footer .pah-footer-join-btn:focus-visible {
  background-color: var(--c-brand-hover);
  color: var(--c-neutral-white);
  text-decoration: none;
  outline: 0.125rem solid #F0FEFF;
  outline-offset: 0.125rem;
}
@media (min-width: 1024px) {
  #pah-footer .pah-footer-join-btn {
    display: inline-block;
  }
}

/* --- Footer Social Row (social icons + back to top, below Join now) --- */
#pah-footer .pah-social-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 1rem;
}

/* --- Footer App Download (mobile < 1024px only) --- */
#pah-footer .pah-app-download {
  text-align: center;
  margin-top: 1.5rem;
}
#pah-footer .pah-app-download-heading {
  color: white;
  font-size: 1rem;
  font-weight: 700;
  margin: 0 0 0.75rem;
  font-family: var(--font-body);
}
#pah-footer .pah-app-badges {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  justify-content: center;
}
#pah-footer .pah-app-badges img {
  height: 2.5rem;
  width: 8rem;
  object-fit: contain;
  object-position: center;
}
@media (min-width: 1024px) {
  #pah-footer .pah-app-download {
    display: none;
  }
  #pah-footer .pah-app-badges {
    justify-content: flex-start;
  }
}

/* --- Footer Bottom --- */
#pah-footer .pah-footer-bottom {
  color: var(--c-neutral-smoke);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 1rem;
}
@media (min-width: 1024px) {
  #pah-footer .pah-footer-bottom {
    flex-direction: row;
    justify-content: space-between;
    align-items: baseline;
    gap: 0;
  }
}

/* --- Footer Logo --- */
#pah-footer .pah-footer-logo {
  flex: 0 0 auto;
  width: 8.4375rem;
  height: auto;
  max-width: 20rem;
  margin-bottom: 0;
  fill: var(--c-brand-base);
  /* Preserve aspect ratio (viewBox 343×138) so logo doesn’t squash on mobile */
  aspect-ratio: 343 / 138;
  object-fit: contain;
}
@media (min-width: 1024px) {
  #pah-footer .pah-footer-logo {
    width: 20rem;
  }
}

/* --- Footer Legal --- */
#pah-footer .pah-legal {
  display: flex;
  gap: 0.5rem 1rem;
  flex-flow: row wrap;
  justify-content: center;
}
#pah-footer .pah-legal-nav {
  order: 0;
}
#pah-footer .pah-legal-links {
  display: flex;
  flex-grow: 1;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 0.5rem 1rem;
  justify-content: center;
  flex-wrap: wrap;
}
@media (min-width: 1024px) {
  #pah-footer .pah-legal {
    flex-wrap: nowrap;
    justify-content: flex-end;
  }
  #pah-footer .pah-legal-nav {
    order: 1;
  }
  #pah-footer .pah-legal-links {
    justify-content: flex-end;
  }
}
#pah-footer .pah-legal-links a {
  display: block;
  color: inherit;
  text-align: center;
  font-weight: 700;
  font-size: 0.875rem;
  line-height: 1.429;
  margin: 0;
  flex: 0 0 auto;
  white-space: nowrap;
  text-decoration: none;
}
#pah-footer .pah-legal-links a:hover,
#pah-footer .pah-legal-links a:focus-visible {
  text-decoration: underline;
  text-underline-offset: 0.25rem;
  text-decoration-thickness: 1.5px;
}
#pah-footer .pah-copyright {
  text-align: center;
  font-weight: 500;
  font-size: 0.875rem;
  line-height: 1.429;
  margin: 0;
}
@media (min-width: 1024px) {
  #pah-footer .pah-copyright {
    order: 0;
    white-space: nowrap;
  }
}

/* --- Footer Social Icons --- */
#pah-footer .pah-social-icons {
  display: flex;
  align-items: center;
  gap: 1rem;
}
#pah-footer .pah-social-icons a {
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}
#pah-footer .pah-social-icons svg {
  width: 1rem;
  height: 1rem;
  fill: var(--c-neutral-white);
}
#pah-footer .pah-social-icons a:hover svg {
  fill: var(--c-brand-base);
}

/* --- Back to Top Button --- */
#pah-footer .pah-back-to-top, #pah-footer .pah-back-to-top-mobile {
  width: 2.75rem;
  height: 2.75rem;
  flex-shrink: 0;
  border-radius: 50%;
  border: 1px solid var(--c-brand-base);
  background: transparent;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.2s, background-color 0.2s;
  display: none;
}
#pah-footer .pah-back-to-top:hover, #pah-footer .pah-back-to-top-mobile:hover {
  background-color: rgba(0,170,40,0.1);
}
#pah-footer .pah-back-to-top svg, #pah-footer .pah-back-to-top-mobile svg {
  width: 1rem;
  height: 1rem;
  stroke: var(--c-brand-base);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
}
@media (max-width: 1023px) {
  #pah-footer .pah-back-to-top-mobile {
    display: flex;
  }
}
@media (min-width: 1024px) {
  /* Desktop: pin scroll-to-top to the far right of the footer */
  #pah-footer .pah-back-to-top {
    position: absolute;
    right: 0rem;
    bottom: 0rem;
    display: flex;
  }
  #pah-footer .pah-back-to-top-mobile {
    display: none;
  }
}

/* --- Utility: visually hidden --- */
#pah-header .pah-sr-only,
#pah-footer .pah-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}
