/* ==========================================================================
   Powerline — storefront: top bar, store hero, category panel, tiles
   Colours come from tokens.css; nothing here declares a raw colour except
   white-on-dark alpha overlays.
   ========================================================================== */

/* --- Top contact bar ------------------------------------------------------ */

.topbar {
  background: var(--red-fill);
  color: var(--white);
  font-size: var(--fs-xs);
}

.topbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-5);
  min-height: 38px;
}

.topbar a {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  color: var(--white);
  text-decoration: none;
  white-space: nowrap;
}

.topbar a:hover {
  color: var(--white);
  text-decoration: underline;
}

.topbar svg {
  width: 14px;
  height: 14px;
  flex: none;
}

.topbar__msg {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-weight: 500;
}

.topbar__links {
  display: flex;
  align-items: center;
  gap: var(--sp-5);
}

@media (max-width: 860px) {
  .topbar__msg,
  .topbar__loc {
    display: none;
  }

  .topbar__inner,
  .topbar__links {
    width: 100%;
    justify-content: space-between;
  }
}

/* On phones the phone number stays and the email (also in the footer and on the contact page) goes. Two
   classes are needed: `.topbar a` sets display and would otherwise win over `.topbar__mail` alone, which
   kept the email visible and made the whole page wider than the screen. */
@media (max-width: 420px) {
  .topbar .topbar__mail {
    display: none;
  }

  .topbar__inner {
    justify-content: center;
  }
}

/* Between a phone and a tablet the contact links may wrap rather than push the page wider. */
@media (max-width: 560px) {
  .topbar__links {
    flex-wrap: wrap;
    gap: 0 var(--sp-4);
  }

  .topbar a {
    white-space: normal;
    overflow-wrap: anywhere;
  }
}

/* --- Store hero ----------------------------------------------------------- */

.store-hero {
  position: relative;
  background: var(--black-900);
  color: var(--on-dark-dim);
  overflow: hidden;
}

.store-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, rgb(255 255 255 / 0.05) 1px, transparent 1px);
  background-size: clamp(70px, 8vw, 118px) 100%;
  pointer-events: none;
}

.store-hero::after {
  content: "";
  position: absolute;
  top: -40%;
  right: -10%;
  width: min(720px, 80vw);
  aspect-ratio: 1;
  background: radial-gradient(
    circle at center,
    color-mix(in srgb, var(--red) 34%, transparent) 0%,
    transparent 66%
  );
  pointer-events: none;
}

.store-hero__inner {
  position: relative;
  z-index: 1;
  padding-block: clamp(2rem, 1.25rem + 2.6vw, 3.25rem);
}

.store-hero h1 {
  max-width: 22ch;
  color: var(--white);
  font-size: var(--fs-3xl);
}

.store-hero h1 em {
  font-style: normal;
  color: var(--red);
}

.store-hero__lede {
  max-width: 54ch;
  margin-top: var(--sp-3);
  font-size: var(--fs-base);
  line-height: 1.55;
}

.search {
  display: flex;
  align-items: center;
  max-width: 660px;
  margin-top: var(--sp-5);
  padding: 6px;
  background: var(--white);
  border-radius: var(--r-pill);
  box-shadow: var(--sh-xl);
}

.search:focus-within {
  outline: 3px solid color-mix(in srgb, var(--red) 55%, transparent);
  outline-offset: 2px;
}

.search svg {
  flex: none;
  width: 20px;
  height: 20px;
  margin-left: 1rem;
  color: var(--slate-light);
}

.search input {
  flex: 1;
  min-width: 0;
  padding: 0.8rem 0.9rem;
  background: none;
  border: 0;
  font-size: var(--fs-base);
  color: var(--ink);
}

.search input:focus {
  outline: none;
}

.search input::placeholder {
  color: var(--slate-light);
}

.search .btn {
  flex: none;
  padding: 0.8rem 1.7rem;
}

@media (max-width: 480px) {
  .search svg {
    display: none;
  }

  .search input {
    padding-left: 1rem;
  }

  .search .btn {
    padding-inline: 1.2rem;
  }
}

.store-hero__steps {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2) var(--sp-5);
  margin-top: var(--sp-4);
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: var(--ls-wide);
  text-transform: uppercase;
  color: var(--white);
}

.store-hero__steps li {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.store-hero__steps li::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--red);
}

/* --- Store layout: category panel + content ------------------------------- */

.store {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: clamp(1.5rem, 1rem + 2vw, 2.75rem);
  align-items: start;
  padding-block: var(--sp-8) var(--sp-10);
}

@media (max-width: 960px) {
  .store {
    grid-template-columns: 1fr;
    gap: var(--sp-6);
    padding-block: var(--sp-6) var(--sp-9);
  }
}

.panel {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
}

.panel + .panel {
  margin-top: var(--sp-4);
}

/* On desktop the panel stays in view while the product list scrolls. */
.store__side {
  position: sticky;
  top: calc(var(--header-h) + var(--sp-4));
  max-height: calc(100vh - var(--header-h) - var(--sp-6));
  overflow-y: auto;
}

@media (max-width: 960px) {
  .store__side {
    position: static;
    max-height: none;
    overflow: visible;
  }
}

.panel__title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--sp-4) var(--sp-5);
  font-family: var(--font-display);
  font-size: var(--fs-lg);
  font-weight: 700;
  letter-spacing: var(--ls-wide);
  text-transform: uppercase;
  color: var(--black);
  border-bottom: 1px solid var(--line);
  list-style: none;
  cursor: default;
}

.panel:not([open]) > .panel__title {
  border-bottom: 0;
}

.panel__title::-webkit-details-marker {
  display: none;
}

/* The chevron only appears where the panel can be collapsed (small screens). */
.panel__title svg {
  display: none;
  width: 18px;
  height: 18px;
  transition: transform var(--dur-mid) var(--ease-out);
}

@media (max-width: 960px) {
  .panel__title {
    cursor: pointer;
  }

  .panel__title svg {
    display: block;
  }

  details[open] > .panel__title svg {
    transform: rotate(180deg);
  }
}

.catnav {
  padding: var(--sp-2);
}

.catnav li + li {
  margin-top: 2px;
}

.catnav summary {
  list-style: none;
}

.catnav summary::-webkit-details-marker {
  display: none;
}

/* A row is either a plain link (.catnav__row on <a>) or a <summary> that holds a
   link plus a chevron. Clicking the link goes to the category page; clicking the
   chevron or the empty space opens and closes the subcategories. */
.catnav__row {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  min-height: 44px;
  padding: 0.4rem 0.75rem;
  border-radius: var(--r-md);
  color: var(--ink);
  font-size: var(--fs-sm);
  font-weight: 500;
  line-height: 1.3;
  text-decoration: none;
  cursor: pointer;
  transition:
    background-color var(--dur-fast) var(--ease-out),
    color var(--dur-fast) var(--ease-out);
}

summary.catnav__row > a {
  flex: 1;
  align-self: stretch;
  display: flex;
  align-items: center;
  color: inherit;
  text-decoration: none;
}

.catnav__row:hover,
summary.catnav__row > a:hover {
  color: var(--red-ink);
}

.catnav__row:hover {
  background: var(--mist);
}

.catnav__row svg {
  flex: none;
  width: 16px;
  height: 16px;
  color: var(--slate-light);
  transition: transform var(--dur-mid) var(--ease-out);
}

.catnav details[open] > summary svg {
  transform: rotate(90deg);
}

a.catnav__row[aria-current="page"],
.catnav details.is-current > summary.catnav__row {
  background: var(--red-fill);
  color: var(--white);
}

a.catnav__row[aria-current="page"]:hover,
.catnav details.is-current > summary.catnav__row:hover,
.catnav details.is-current > summary.catnav__row > a:hover {
  color: var(--white);
}

.catnav details.is-current > summary.catnav__row svg {
  color: var(--white);
}

.catnav__subs {
  margin: 2px 0 var(--sp-2) 1.1rem;
  padding-left: var(--sp-3);
  border-left: 2px solid var(--line);
}

.catnav__subs .catnav__row {
  min-height: 40px;
  font-weight: 400;
  color: var(--slate);
}

.catnav__subs a.catnav__row[aria-current="page"] {
  background: var(--red-100);
  color: var(--red-ink);
  font-weight: 600;
}

.store__head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--sp-3) var(--sp-5);
  margin-bottom: var(--sp-5);
}

.store__head h2 {
  font-size: var(--fs-2xl);
}

.store__head p {
  font-size: var(--fs-sm);
}

.store__section + .store__section {
  margin-top: var(--sp-9);
}

/* --- Category tiles -------------------------------------------------------- */

.cat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr));
  gap: var(--sp-4);
}

.cat-tile {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
  padding: var(--sp-5);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
  transition:
    transform var(--dur-mid) var(--ease-out),
    box-shadow var(--dur-mid) var(--ease-out),
    border-color var(--dur-mid) var(--ease-out);
}

.cat-tile::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  background: var(--red);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--dur-mid) var(--ease-out);
}

.cat-tile:hover {
  transform: translateY(-3px);
  border-color: transparent;
  box-shadow: var(--sh-lg);
}

.cat-tile:hover::before,
.cat-tile:focus-within::before {
  transform: scaleX(1);
}

.cat-tile__num {
  font-family: var(--font-display);
  font-size: var(--fs-sm);
  font-weight: 700;
  letter-spacing: var(--ls-wide);
  color: var(--red-ink);
}

.cat-tile h3 {
  font-size: var(--fs-lg);
  line-height: 1.1;
}

/* The title link stretches over the whole tile; the subcategory links sit above it. */
.cat-tile h3 a {
  color: inherit;
  text-decoration: none;
}

.cat-tile h3 a::after {
  content: "";
  position: absolute;
  inset: 0;
}

.cat-tile__subs {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
  margin-top: auto;
  padding-top: var(--sp-2);
}

.cat-tile__subs a {
  padding: 0.25rem 0.65rem;
  background: var(--mist);
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  font-size: var(--fs-xs);
  font-weight: 500;
  color: var(--slate);
  text-decoration: none;
  transition:
    background-color var(--dur-fast) var(--ease-out),
    color var(--dur-fast) var(--ease-out),
    border-color var(--dur-fast) var(--ease-out);
}

.cat-tile__subs a:hover {
  background: var(--red-fill);
  border-color: var(--red-fill);
  color: var(--white);
}

/* --- Empty state ----------------------------------------------------------- */

.empty {
  padding: var(--sp-9) var(--sp-6);
  background: var(--mist);
  border: 1px dashed var(--line-strong);
  border-radius: var(--r-lg);
  text-align: center;
}

.empty h3 {
  font-size: var(--fs-xl);
}

.empty p {
  max-width: 48ch;
  margin: var(--sp-3) auto 0;
  font-size: var(--fs-sm);
}

.empty .btn-row {
  justify-content: center;
  margin-top: var(--sp-5);
}

/* --- How it works strip ---------------------------------------------------- */

.process {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--sp-5);
  padding: var(--sp-6);
  background: var(--red-100);
  border-radius: var(--r-lg);
}

@media (max-width: 760px) {
  .process {
    grid-template-columns: 1fr;
  }
}

.process li {
  display: flex;
  gap: var(--sp-4);
  align-items: flex-start;
}

.process__n {
  flex: none;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--red-fill);
  font-family: var(--font-display);
  font-size: var(--fs-lg);
  font-weight: 700;
  color: var(--white);
}

.process strong {
  display: block;
  font-family: var(--font-display);
  font-size: var(--fs-lg);
  letter-spacing: var(--ls-wide);
  text-transform: uppercase;
  color: var(--black);
}

.process p {
  margin-top: 2px;
  font-size: var(--fs-sm);
  line-height: 1.55;
}

/* --- Search bar below the page banner (not part of the header) --------------- */

.search-band {
  padding-block: var(--sp-4);
  background: var(--white);
  border-bottom: 1px solid var(--line);
}

.search-band .search {
  max-width: none;
  margin-top: 0;
  box-shadow: none;
  border: 1px solid var(--line-strong, var(--line));
}
