/* ============================================================
   Petshop header — Alfies index.html / styles.css (.main-header, .header-row, .search, .cat-nav)
   Colours: var(--theme-*) from theme.css / store settings
============================================================ */

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ----- Scrolling announcement (settings.showAnnouncement) — all viewports ----- */
.t1-header--petshop .t1-header-announcement {
  width: 100%;
  background: var(--theme-announcement-bg, #1a2b4b);
  color: var(--theme-text-inverse, #fff);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.03em;
  overflow: hidden;
  white-space: nowrap;
  padding: 6px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.t1-header--petshop .t1-header-announcement-inner {
  display: inline-block;
  white-space: nowrap;
  will-change: transform;
  animation: t1-petshop-announcement-scroll 22s linear infinite;
}

.t1-header--petshop .t1-header-announcement-inner > div {
  display: inline;
  padding: 0 2.25em;
}

.t1-header--petshop .t1-header-announcement-inner > div:not(:last-child)::after {
  content: '\00a0·\00a0';
  opacity: 0.65;
}

@keyframes t1-petshop-announcement-scroll {
  0% {
    transform: translateX(100vw);
  }
  100% {
    transform: translateX(-100%);
  }
}

.t1-header--petshop {
  position: relative;
  --ps-header-ink: var(--theme-header-bg, #1a2b4b);
  --ps-header-ink-deep: var(--theme-header-nav-bg, #152238);
  --ps-header-ink-mid: var(--theme-header-bg, #1a2b4b);
  --ps-header-ink-nav: var(--theme-header-nav-bg, #152238);
  --ps-teal: var(--theme-header-bg, #1a2b4b);
  --ps-teal-mid: var(--theme-header-nav-bg, #152238);
  --ps-cat-nav-active: var(--theme-primary, #179e4a);
  --ps-green: var(--theme-primary, #00b651);
  --ps-green-dk: var(--theme-accent-dark, #009647);
}

/* Sticky (settings.header.sticky) — see StoreHeaderRenderer */
.t1-header--petshop.main-header.header--sticky {
  position: sticky;
  top: 0;
  z-index: 200;
  /* Own compositor layer: fewer full repaints when strip visibility toggles */
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}

/* Collapse strips when stuck — avoid display:none jump (smooth height with JS hysteresis) */
.t1-header--petshop.is-header-stuck .t1-header-top-strip,
.t1-header--petshop.is-header-stuck .t1-header-bottom-strip {
  /* Hide visually without changing layout (prevents scrollY jitter / flicker). */
  opacity: 0;
  transform: translateY(-100%);
  pointer-events: none;
}

/* ----- Top strip — desktop viewports only ----- */
@media (max-width: 768px) {
  .t1-header--petshop .top-strip.t1-header-top-strip[data-header-top-strip] {
    display: none !important;
  }
}

.t1-header--petshop .top-strip.t1-header-top-strip {
  background: var(--theme-top-strip-bg, #013230);
  color: var(--theme-text-inverse, #fff);
  font-size: 11px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0.02em;
  padding: 7px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  max-height: 5.5rem;
  transition:
    max-height 0.22s cubic-bezier(0.4, 0, 0.2, 1),
    opacity 0.18s ease,
    padding 0.22s cubic-bezier(0.4, 0, 0.2, 1),
    border-bottom-width 0.22s ease;
}

.t1-header--petshop .top-strip.t1-header-top-strip .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  width: min(1160px, calc(100% - 32px));
  max-width: 100%;
  margin: 0 auto;
}

.t1-header--petshop .top-strip.t1-header-top-strip > .container > div {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.t1-header--petshop .top-strip.t1-header-top-strip > .container > div[data-top-strip-col="1"] {
  justify-content: flex-start;
}

.t1-header--petshop .top-strip.t1-header-top-strip > .container > div[data-top-strip-col="3"] {
  justify-content: flex-end;
}

.t1-header--petshop .top-strip.t1-header-top-strip .icon-svg {
  flex-shrink: 0;
  opacity: 0.85;
  color: currentColor;
}

/* ----- Alfies .main-header shell (styles.css § header / §6) ----- */
.t1-header--petshop.main-header {
  background: var(--ps-teal);
  color: #fff;
  box-shadow:
    0 2px 0 rgba(255, 255, 255, 0.04) inset,
    0 1px 8px rgba(0, 0, 0, 0.18);
}

.t1-header--petshop.main-header > .container {
  width: min(1160px, calc(100% - 32px));
  max-width: 100%;
  margin: 0 auto;
}

/* .header-row — Alfies grid logo | search | icons */
.t1-header--petshop .header-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 18px;
  align-items: center;
  padding: 13px 0;
}

.t1-header--petshop .logo.logo-img-link {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  font-size: clamp(18px, 2.4vw, 26px);
  font-weight: 900;
  color: var(--ps-green);
  letter-spacing: -0.03em;
  line-height: 1;
  white-space: nowrap;
  transition: opacity 0.15s ease;
}

.t1-header--petshop .logo.logo-img-link:hover {
  opacity: 0.85;
}

.t1-header--petshop .logo-img {
  max-height: 70px;
  width: auto;
  display: block;
}

.t1-header--petshop .site-logo-text,
.t1-header--petshop [data-header-logo-text] {
  display: inline-block;
  font-size: clamp(18px, 2.4vw, 26px);
  font-weight: 900;
  color: inherit;
  letter-spacing: -0.03em;
  line-height: 1.1;
  white-space: nowrap;
}

/* Alfies .search — frosted glass pill, transparent submit (no green block) */
.t1-header--petshop .search {
  display: flex;
  align-items: center;
  border-radius: 22px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.09);
  border: 1.5px solid rgba(255, 255, 255, 0.14);
  height: 40px;
  max-width: min(640px, 100%);
  margin: 0 auto;
  width: 100%;
  transition:
    background 0.2s ease,
    border-color 0.2s ease;
}

.t1-header--petshop .search:focus-within {
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.35);
}

.t1-header--petshop .search input {
  flex: 1;
  border: 0;
  outline: none;
  height: 100%;
  padding: 0 14px;
  font-size: 13.5px;
  min-width: 0;
  background: transparent;
  color: #fff;
}

.t1-header--petshop .search input::placeholder {
  color: rgba(255, 255, 255, 0.46);
}

.t1-header--petshop .search button {
  flex-shrink: 0;
  align-self: stretch;
  border: 0;
  cursor: pointer;
  background: transparent;
  color: rgba(255, 255, 255, 0.65);
  padding: 0 13px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: color 0.15s ease;
  border-left: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 0;
}

.t1-header--petshop .search button:hover {
  color: #fff;
}

.t1-header--petshop .search .icon-svg {
  display: block;
  color: currentColor;
}

/* Alfies .icons / .icon — icon + label on one row */
.t1-header--petshop .icons {
  display: flex;
  gap: 18px;
  align-items: center;
  font-size: 13px;
  justify-content: flex-end;
}

.t1-header--petshop .icons .icon {
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  gap: 6px;
  text-align: left;
  color: rgba(255, 255, 255, 0.8);
  font-weight: 500;
  opacity: 0.95;
  cursor: pointer;
  transition:
    color 0.15s ease,
    opacity 0.15s ease;
}

.t1-header--petshop .icons .icon:hover {
  opacity: 1;
  color: #fff;
}

.t1-header--petshop .icons .icon-svg {
  display: block;
  flex-shrink: 0;
  margin: 0;
  color: currentColor;
}

.t1-header--petshop .icons .icon a {
  color: inherit;
  font-weight: inherit;
  font-size: inherit;
  text-decoration: none;
}

.t1-header--petshop .icons .icon a:hover {
  text-decoration: underline;
}

.t1-header--petshop .icons > a.icon {
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  color: inherit;
}

.t1-header--petshop .icons > a.icon > div {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  flex-wrap: wrap;
  color: inherit;
  font-weight: inherit;
  font-size: inherit;
}

.t1-header--petshop .basket-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--theme-search-button-bg, var(--ps-green));
  color: #fff;
  font-size: 10px;
  font-weight: 900;
  margin-left: 4px;
  vertical-align: middle;
  line-height: 1;
}

/* Alfies nav.cat-nav — same bar tone as main header */
.t1-header--petshop nav.cat-nav {
  background: var(--ps-teal);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.t1-header--petshop nav.cat-nav > .container {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 16px;
  width: min(1160px, calc(100% - 32px));
  max-width: 100%;
  margin: 0 auto;
  padding: 7px 0;
  font-size: 12px;
  font-weight: 700;
}

.t1-header--petshop nav.cat-nav .container > [data-slot="menu"] {
  flex: 1 1 auto;
  min-width: 0;
}

.t1-header--petshop .t1-header-menu {
  background: transparent;
  border: none;
}

.t1-header--petshop .t1-menu-item {
  position: relative;
}

.t1-header--petshop .t1-submenu {
  background: var(--theme-surface, #fff);
  z-index: 50;
}

.t1-header--petshop .t1-submenu-link {
  color: var(--theme-text, #0f2f2c);
}

.t1-header-menu-scroll {
  width: 100%;
  margin: 0;
  overflow: visible;
}

@media (max-width: 768px) {
  .t1-header-menu-scroll {
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
  }

  .t1-header-menu-scroll::-webkit-scrollbar {
    height: 4px;
  }

  .t1-header-menu-scroll::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.25);
    border-radius: 4px;
  }
}

.t1-header-menu-scroll .t1-menu-list.cat-nav-list {
  display: flex;
  flex-wrap: nowrap;
  gap: 6px 16px;
  align-items: center;
  padding: 0;
  margin: 0;
  list-style: none;
  min-width: min-content;
}

.t1-header-menu-scroll .t1-menu-link.cat-nav-link {
    font-size: 14px !important;
    font-weight: 500 !important;
    color: rgba(255, 255, 255, .72) !important;
    padding: 5px 11px !important;
    border-radius: 18px !important;
    white-space: nowrap !important;
    transition: background 160ms, color 160ms !important;
    border: none !important;
    background: transparent !important;
    cursor: pointer !important;
    text-decoration: none !important;
    line-height: 1.4 !important
}

.t1-header-menu-scroll .t1-menu-link.cat-nav-link:hover {
    color: var(--theme-nav-link-hover, #fff) !important;
    background: rgba(255, 255, 255, .08) !important;
}

/* Active link: green pill + white text (all pages including Shop All) */
.t1-header-menu-scroll .t1-menu-item.is-active > .t1-menu-link.cat-nav-link,
.t1-header-menu-scroll .t1-menu-link.cat-nav-link.is-active,
.t1-header-menu-scroll .t1-menu-item.is-active > .t1-menu-link.cat-nav-link:hover,
.t1-header-menu-scroll .t1-menu-link.cat-nav-link.is-active:hover {
  color: #fff !important;
  opacity: 1;
  font-weight: 600 !important;
  text-decoration: none !important;
  background: var(--ps-cat-nav-active, var(--theme-primary, #00b72f)) !important;
  box-shadow: none;
}

.t1-header-menu-scroll .t1-menu-item.is-active > .t1-menu-link.cat-nav-link::after,
.t1-header-menu-scroll .t1-menu-link.cat-nav-link.is-active::after {
  content: none !important;
}

/* Older pages without data-menu-variant — same green pill */
.t1-header-menu-scroll .t1-menu-item:not([data-menu-variant]).is-active > .t1-menu-link.cat-nav-link {
  color: #fff !important;
  opacity: 1;
  font-weight: 600 !important;
  text-decoration: none !important;
  background: var(--ps-cat-nav-active, var(--theme-primary, #00b72f)) !important;
}

/*
 * Offers page: hide every menu item after Offers (category chips etc.).
 * Class set in header.liquid (theme) and reinforced in header.js.
 */
.t1-header--petshop.ps-nav-offers-trim .t1-header-menu-scroll .t1-menu-item:has(
    > .t1-menu-link.cat-nav-link[href="/offers"]
  ) ~ .t1-menu-item,
.t1-header--petshop.ps-nav-offers-trim .t1-mobile-menu .t1-menu-mobile-list li:has(
    > a[href="/offers"]
  ) ~ li {
  display: none !important;
}

/* Legacy body class from RenderPageService — same Offers trim behaviour */
body.ps-nav-hide-cat-strip .t1-header-menu-scroll .t1-menu-item:has(
    > .t1-menu-link.cat-nav-link[href="/offers"]
  ) ~ .t1-menu-item {
  display: none !important;
}

/* ----- Promo bar ----- */
.t1-header--petshop .promo-bar.t1-header-bottom-strip {
  background: var(--theme-promo-bar-bg, #d5ece0);
  color: var(--theme-promo-bar-text, #0b3328);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
  padding: 8px 14px;
  border-bottom: 1px solid var(--theme-border, #b8d8c7);
  text-align: center;
  line-height: 1.4;
  max-height: 5.5rem;
  transition:
    max-height 0.22s cubic-bezier(0.4, 0, 0.2, 1),
    opacity 0.18s ease,
    padding 0.22s cubic-bezier(0.4, 0, 0.2, 1),
    border-bottom-width 0.22s ease;
}

.t1-header--petshop .promo-bar.t1-header-bottom-strip [data-bottom-strip-text] {
  display: block;
}

@media (max-width: 600px) {
  .t1-header--petshop .promo-bar.t1-header-bottom-strip {
    font-size: 12px;
    padding: 6px 10px;
  }
}

/* ----- Responsive header-row (Alfies / crowded layout) ----- */
@media (max-width: 980px) {
  .t1-header--petshop .header-row {
    grid-template-columns: 1fr;
  }

  .t1-header--petshop .logo.logo-img-link {
    order: 1;
  }

  .t1-header--petshop .search {
    order: 2;
    max-width: none;
    margin: 0;
  }

  .t1-header--petshop .icons {
    order: 3;
    justify-content: flex-start;
  }
}

@media (max-width: 768px) {
  .t1-header--petshop .header-row {
    grid-template-columns: 1fr auto;
    grid-template-rows: auto auto;
    padding: 12px 0 14px;
    gap: 12px;
  }

  .t1-header--petshop .logo.logo-img-link {
    grid-column: 1;
    grid-row: 1;
  }

  .t1-header--petshop .icons {
    grid-column: 2;
    grid-row: 1;
    gap: 12px;
  }

  .t1-header--petshop .search {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .t1-header--petshop .mobile-menu-toggle {
    display: inline-flex !important;
  }

  .t1-header--petshop .cat-nav {
    display: none;
  }

  .t1-header--petshop.is-mobile-open .t1-mobile-menu {
    display: block !important;
  }

  .t1-header--petshop .t1-mobile-menu {
    display: none;
  }
}

@media (max-width: 480px) {
  .t1-header--petshop .logo-img {
    max-height: 46px;
  }
}

.t1-header--petshop .t1-mobile-menu {
  background: var(--theme-header-bg, var(--ps-header-ink, #1a2b4b));
}

.t1-mobile-menu {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.t1-header--petshop .mobile-menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  padding: 8px;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.t1-header--petshop .mobile-menu-toggle span {
  display: block;
  height: 2px;
  width: 100%;
  background: var(--theme-text-inverse, #fff);
  border-radius: 2px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.t1-header--petshop.is-mobile-open .mobile-menu-toggle span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.t1-header--petshop.is-mobile-open .mobile-menu-toggle span:nth-child(2) {
  opacity: 0;
}

.t1-header--petshop.is-mobile-open .mobile-menu-toggle span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.t1-header--petshop .t1-menu-mobile-list {
  list-style: none;
  margin: 0;
  padding: 8px 16px 16px;
}

.t1-header--petshop .t1-menu-mobile-list a {
  display: block;
  padding: 12px 4px;
  color: var(--theme-text-inverse, #fff);
  text-decoration: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  font-weight: 600;
  border-radius: 8px;
}

.t1-header--petshop .t1-menu-mobile-list li.is-active > a,
.t1-header--petshop .t1-menu-mobile-list a.is-active {
  color: #fff;
  background: var(--ps-cat-nav-active, var(--theme-primary, #00b72f));
  padding-left: 10px;
  padding-right: 10px;
}

.ps-scroll-to-top {
  position: fixed;
  right: 18px;
  bottom: 18px;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  background: var(--theme-primary, #00b72f);
  color: #fff;
  display: grid;
  place-items: center;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 80;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.18);
}

.ps-scroll-to-top.visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.ps-scroll-to-top svg {
  width: 20px;
  height: 20px;
}

@media (prefers-reduced-motion: reduce) {
  .t1-header--petshop .top-strip.t1-header-top-strip,
  .t1-header--petshop .promo-bar.t1-header-bottom-strip {
    transition: none;
  }
}


/* ENGINE: bare shared menu-desktop fallback inside petshop cat-nav */
.t1-header--petshop nav.cat-nav [data-slot="menu"] > ul.t1-menu,
.t1-header--petshop nav.cat-nav ul.t1-menu[data-header-menu-desktop] {
  display: flex;
  flex-wrap: nowrap;
  gap: 6px 16px;
  align-items: center;
  padding: 0;
  margin: 0;
  list-style: none;
  min-width: min-content;
  overflow-x: auto;
}
.t1-header--petshop nav.cat-nav ul.t1-menu > .t1-menu-item > .t1-menu-link {
  font-size: 14px !important;
  font-weight: 500 !important;
  color: rgba(255, 255, 255, .72) !important;
  padding: 5px 11px !important;
  border-radius: 18px !important;
  white-space: nowrap !important;
  text-decoration: none !important;
  background: transparent !important;
}
.t1-header--petshop nav.cat-nav ul.t1-menu > .t1-menu-item.is-active > .t1-menu-link,
.t1-header--petshop nav.cat-nav ul.t1-menu > .t1-menu-item > .t1-menu-link.is-active {
  color: #fff !important;
  background: var(--ps-cat-nav-active, var(--theme-primary, #00b72f)) !important;
}