/**
 * Hero, sections, product cards, tree band, reviews, partners, messages.
 */

/* Hero ---------------------------------------------------------------- */
.hero {
  position: relative;
  display: grid;
  overflow: hidden;
  min-height: clamp(220px, 18vw + 160px, 380px);
  background: var(--brand-gradient);
  color: #fff;
  isolation: isolate;
}
.hero__image {
  position: absolute;
  z-index: -2;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hero::after {
  position: absolute;
  z-index: -1;
  inset: 0;
  background: linear-gradient(90deg, rgb(10 30 48 / 72%) 0%, rgb(10 30 48 / 45%) 55%, rgb(10 30 48 / 15%) 100%);
  content: "";
}
.hero__inner {
  display: flex;
  align-items: flex-end;
  padding-block: 2.5rem;
}
.hero__title {
  max-width: 18ch;
  margin: 0;
  color: #fff;
  text-shadow: 0 2px 18px rgb(0 0 0 / 25%);
}
.hero--front {
  min-height: min(82svh, 640px);
}
.hero--front .hero__inner {
  align-items: center;
  padding-block: 4rem;
}
.hero--front .hero__title {
  font-size: clamp(2.4rem, 1.5rem + 4vw, 4.4rem);
}
.hero__eyebrow {
  display: inline-block;
  margin-bottom: 1rem;
  padding: 0.3rem 0.85rem;
  border-radius: 999px;
  background: rgb(255 255 255 / 18%);
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  backdrop-filter: blur(6px);
}
.hero__text {
  max-width: 34rem;
  margin-top: 1rem;
  font-size: clamp(1.05rem, 1rem + 0.4vw, 1.25rem);
}
.hero__text p:last-child {
  margin: 0;
}
.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 2rem;
}
@media (max-width: 599px) {
  .hero--front {
    min-height: auto;
  }
  .hero--front .hero__inner {
    align-items: flex-end;
    padding-block: 7rem 2.5rem;
  }
  .hero::after {
    background: linear-gradient(0deg, rgb(10 30 48 / 80%) 0%, rgb(10 30 48 / 50%) 60%, rgb(10 30 48 / 25%) 100%);
  }
  .hero__actions .button {
    flex: 1 1 100%;
  }
}

/* Section headings for blocks inside the main column. */
.page-body__main > .block + .block,
.page-body__main > .block + [data-drupal-messages] {
  margin-top: var(--section);
}
.page-body__main > .block > .block__title,
.content-bottom .block__title {
  margin-bottom: 1.5rem;
}

/* Product cards ------------------------------------------------------- */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr));
  gap: clamp(1rem, 0.5rem + 1.5vw, 2rem);
}
/* Two cards per row on phones keeps the range visible without endless scrolling. */
@media (max-width: 599px) {
  .product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
  }
  .product-card__body {
    padding: 0.75rem 0.85rem 0.9rem;
  }
  .product-card__title {
    font-size: 1rem;
  }
  .product-card__price {
    font-size: 1.1rem;
  }
}
.product-card {
  height: 100%;
}
.product-card__link {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--surface);
  color: inherit;
  text-decoration: none;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s, box-shadow 0.2s;
}
.product-card__link:hover {
  color: inherit;
  box-shadow: var(--shadow);
  transform: translateY(-3px);
}
.product-card__media {
  overflow: hidden;
  background: var(--cyan-100);
  aspect-ratio: 1;
}
.product-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s;
}
.product-card__link:hover .product-card__media img {
  transform: scale(1.04);
}
.product-card__body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 0.35rem;
  padding: 1rem 1.15rem 1.25rem;
}
.product-card__title {
  margin: 0;
  font-size: 1.25rem;
}
.product-card__price {
  margin: auto 0 0;
  padding-top: 0.5rem;
  color: var(--ink);
  font: 600 1.3rem var(--font-display);
}
.product-card__price span {
  color: var(--ink-soft);
  font: 700 0.85rem var(--font-body);
}
.product-card__rating .rateit,
.product-card__rating {
  font-size: 0.85rem;
}

/* Front page "why" section (node body). */
.path-frontpage .page-body__main > .node--page,
.path-frontpage .page-body__main > .block > .node--page {
  max-width: none;
}
.path-frontpage .node--page {
  margin-top: var(--section);
}
.path-frontpage .node--page p {
  max-width: 46rem;
}
.path-frontpage .node--page ul {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
  gap: 1rem;
  margin: 2rem 0 0;
  padding: 0;
  list-style: none;
  text-align: left;
}
.path-frontpage .node--page li {
  margin: 0;
  padding: 1.5rem;
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}
.path-frontpage .node--page li strong {
  display: block;
  margin-bottom: 0.35rem;
  color: var(--ink);
  font: 600 1.2rem var(--font-display);
}
.path-frontpage .node--page li::before {
  display: grid;
  width: 48px;
  height: 48px;
  margin-bottom: 1rem;
  border-radius: 14px;
  background: var(--mint-100);
  content: "";
  /* Leaf icon. */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2317734a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M11 20A7 7 0 0 1 9.8 6.1C15.5 5 17 4.48 19 2c1 2 2 4.18 2 8 0 5.5-4.78 10-10 10Z'/%3E%3Cpath d='M2 21c0-3 1.85-5.36 5.08-6C9.5 14.52 12 13 13 12'/%3E%3C/svg%3E");
  background-position: center;
  background-repeat: no-repeat;
  background-size: 26px;
}

/* Tree progress band -------------------------------------------------- */
.content-bottom > .tree-band,
.tree-band {
  padding-block: var(--section);
  background: var(--mint-100);
}
.tree-band__inner {
  display: grid;
  gap: 2rem;
  align-items: center;
}
@media (min-width: 820px) {
  .tree-band__inner {
    grid-template-columns: 1.1fr 1fr;
    gap: 4rem;
  }
}
.tree-band .eyebrow {
  color: var(--mint-700);
}
.tree-band__meter {
  padding: clamp(1.5rem, 1rem + 2vw, 2.5rem);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}
.tree-band__count {
  margin: 0 0 1rem;
  font-family: var(--font-display);
}
.tree-band__count strong {
  color: var(--mint-700);
  font-size: clamp(3rem, 2rem + 4vw, 4.5rem);
  font-weight: 600;
  line-height: 1;
}
.tree-band__count span {
  color: var(--ink-soft);
  font-size: 1.4rem;
}
.meter {
  overflow: hidden;
  height: 14px;
  border-radius: 999px;
  background: #d4ebde;
}
.meter span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #2fae6c, var(--mint-700));
}
.tree-band__goal {
  margin: 0.75rem 0 0;
  color: var(--ink-soft);
  font-size: 0.95rem;
}
.tree-band #more-trees-widget {
  margin-top: 1.5rem;
}

/* Reviews ------------------------------------------------------------- */
.content-bottom > .block:not(.tree-band) {
  width: min(100% - 2 * var(--space), var(--container));
  margin: var(--section) auto 0;
}
.content-bottom > .block:last-child {
  margin-bottom: var(--section);
}
.view-reviews .view-content {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
  gap: 1.25rem;
}
.view-reviews .views-row {
  display: flex;
}
.review {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  width: 100%;
  margin: 0;
  padding: 1.5rem;
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}
.review__title {
  margin: 0;
  font: 600 1.2rem var(--font-display);
}
.review__text {
  flex: 1;
  margin: 0;
  color: var(--ink-soft);
}
.review__text p:last-child {
  margin: 0;
}
.review__by {
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 800;
}
.review__by span {
  color: var(--ink-soft);
  font-weight: 600;
}

/* Partners strip (footer top) ----------------------------------------- */
.site-footer__top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 1.25rem 2.5rem;
}
.site-footer__top::before {
  flex-basis: 100%;
  color: #8fa4b6;
  content: "Proud to work with";
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-align: center;
  text-transform: uppercase;
}
.site-footer__top .block p {
  margin: 0;
}
.site-footer__top a {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 1rem;
  border: 1px solid rgb(255 255 255 / 18%);
  border-radius: 999px;
  color: #fff;
  font-weight: 700;
  text-decoration: none;
}
.site-footer__top a:hover {
  border-color: #fff;
  color: #fff;
}

/* Messages, tabs, pager ----------------------------------------------- */
.messages-wrapper {
  margin-top: 1.5rem;
}
.messages {
  margin: 0 0 0.75rem;
  padding: 1rem 1.25rem 1rem 3rem;
  border-radius: var(--radius-sm);
  background: var(--mint-100) no-repeat 1rem 1.2rem / 1.2rem;
  color: var(--mint-700);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2317734a' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E");
}
.messages--warning {
  background-color: #fff7e0;
  color: #7a5500;
  background-image: none;
  padding-left: 1.25rem;
}
.messages--error {
  background-color: #fdecea;
  color: #a61b1b;
  background-image: none;
  padding-left: 1.25rem;
}
.messages a {
  color: inherit;
  font-weight: 700;
}
.messages ul {
  margin: 0;
  padding-left: 1rem;
}

.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1rem 0 0;
  padding: 0;
  list-style: none;
}
.tabs a {
  display: inline-block;
  padding: 0.35rem 0.9rem;
  border: 1.5px solid var(--line);
  border-radius: 999px;
  color: var(--ink-soft);
  font-size: 0.9rem;
  font-weight: 700;
  text-decoration: none;
}
.tabs a.is-active,
.tabs a:hover {
  border-color: var(--sky-600);
  color: var(--sky-700);
}

.pager__items {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin: 2rem 0 0;
  padding: 0;
  list-style: none;
}
.pager__item a {
  display: inline-block;
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
  background: var(--surface);
  text-decoration: none;
}

/* Related products keep card size rather than stretching to fill. */
.view-related-products .product-grid {
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr));
}
@media (max-width: 599px) {
  .view-related-products .product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Home: promises strip under the hero --------------------------------- */
#block-sweetzero-promises ul {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
  gap: 1rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
#block-sweetzero-promises li {
  display: grid;
  grid-template-columns: 44px 1fr;
  column-gap: 0.85rem;
  align-items: center;
  color: var(--ink-soft);
  font-size: 0.9rem;
  line-height: 1.35;
}
#block-sweetzero-promises li::before {
  grid-row: span 2;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--cyan-100) no-repeat center / 24px;
  content: "";
}
#block-sweetzero-promises strong {
  color: var(--ink);
  font-size: 1rem;
}
/* Icons: leaf, recycle, tree, heart. */
#block-sweetzero-promises li:nth-child(1)::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230670b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M11 20A7 7 0 0 1 9.8 6.1C15.5 5 17 4.48 19 2c1 2 2 4.18 2 8 0 5.5-4.78 10-10 10Z'/%3E%3Cpath d='M2 21c0-3 1.85-5.36 5.08-6C9.5 14.52 12 13 13 12'/%3E%3C/svg%3E"); }
#block-sweetzero-promises li:nth-child(2)::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230670b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7 19H4.8a1.8 1.8 0 0 1-1.6-2.7l3.9-6.7'/%3E%3Cpath d='M11 19h8.2a1.8 1.8 0 0 0 1.6-2.7l-1.2-2.1'/%3E%3Cpath d='m14 16-3 3 3 3'/%3E%3Cpath d='M8.3 13.6 7 9.1l-4.5 1.2'/%3E%3Cpath d='m9.3 5.6 1.1-1.9a1.8 1.8 0 0 1 3.1 0l3.9 6.7'/%3E%3Cpath d='m13.4 9.9 4.5 1.2 1.2-4.5'/%3E%3C/svg%3E"); }
#block-sweetzero-promises li:nth-child(3)::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230670b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m17 14 3 3.3a1 1 0 0 1-.7 1.7H4.7a1 1 0 0 1-.7-1.7L7 14h-.3a1 1 0 0 1-.7-1.7L9 9h-.2A1 1 0 0 1 8 7.3L12 3l4 4.3a1 1 0 0 1-.8 1.7H15l3 3.3a1 1 0 0 1-.7 1.7z'/%3E%3Cpath d='M12 22v-3'/%3E%3C/svg%3E"); }
#block-sweetzero-promises li:nth-child(4)::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230670b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M19 14c1.49-1.46 3-3.21 3-5.5A5.5 5.5 0 0 0 16.5 3c-1.76 0-3 .5-4.5 2-1.5-1.5-2.74-2-4.5-2A5.5 5.5 0 0 0 2 8.5c0 2.3 1.5 4.05 3 5.5l7 7Z'/%3E%3C/svg%3E"); }
.path-frontpage .content-top {
  padding-block: 2rem 0;
}
.path-frontpage .page-body {
  padding-top: clamp(2rem, 1.5rem + 2vw, 3.5rem);
}

/* Home: how it works -------------------------------------------------- */
#block-sweetzero-howitworks ol {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
  gap: 1.25rem;
  margin: 1.5rem 0 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}
#block-sweetzero-howitworks li {
  position: relative;
  padding: 1.5rem 1.5rem 1.5rem 4.75rem;
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink-soft);
  box-shadow: var(--shadow-sm);
  counter-increment: step;
}
#block-sweetzero-howitworks li::before {
  position: absolute;
  top: 1.4rem;
  left: 1.4rem;
  display: grid;
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 50%;
  background: var(--brand-gradient);
  color: #fff;
  content: counter(step);
  font: 600 1.2rem/1 var(--font-display);
  place-items: center;
}
#block-sweetzero-howitworks li strong {
  display: block;
  margin-bottom: 0.25rem;
  color: var(--ink);
  font: 600 1.2rem var(--font-display);
}

/* Home: party favours band -------------------------------------------- */
#block-sweetzero-favours {
  display: grid;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: var(--orange-100);
}
#block-sweetzero-favours > .field,
#block-sweetzero-favours > div {
  display: grid;
  gap: 0 3rem;
  align-items: center;
  padding: clamp(1.5rem, 1rem + 3vw, 3.5rem);
}
@media (min-width: 820px) {
  #block-sweetzero-favours > .field,
  #block-sweetzero-favours > div {
    grid-template-columns: 1.1fr 1fr;
  }
  #block-sweetzero-favours p:has(img) {
    grid-column: 2;
    grid-row: 1 / span 4;
  }
}
#block-sweetzero-favours h2,
#block-sweetzero-favours p {
  grid-column: 1;
}
#block-sweetzero-favours p:has(img) {
  margin: 1.5rem 0 0;
}
#block-sweetzero-favours img {
  width: 100%;
  border-radius: var(--radius);
  aspect-ratio: 4 / 3;
  object-fit: cover;
  box-shadow: var(--shadow);
}
#block-sweetzero-favours p:has(> a:only-child) a {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  padding: 0.6em 1.4em;
  border-radius: 999px;
  background: var(--orange-500);
  color: #fff;
  font-weight: 800;
  text-decoration: none;
}
#block-sweetzero-favours p:has(> a:only-child) a:hover {
  background: var(--orange-600);
}

/* Content-page sidebar ------------------------------------------------ */
#block-sweetzero-glance {
  position: sticky;
  top: calc(var(--header-h) + 1.5rem);
  padding: 1.75rem;
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}
#block-sweetzero-glance h2 {
  font-size: 1.4rem;
}
#block-sweetzero-glance ul {
  display: grid;
  gap: 0.75rem;
  margin: 0 0 1.5rem;
  padding: 0;
  list-style: none;
  color: var(--ink-soft);
  font-size: 0.95rem;
}
#block-sweetzero-glance li {
  padding-left: 1.9rem;
  background: no-repeat left 0.15rem / 1.25rem url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2317734a' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpath d='m8 12 3 3 5-6'/%3E%3C/svg%3E");
}
#block-sweetzero-glance strong {
  color: var(--ink);
}
#block-sweetzero-glance p {
  margin: 0 0 0.6rem;
}
#block-sweetzero-glance p a {
  display: flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--sky-600);
  border-radius: 999px;
  color: var(--sky-700);
  font-weight: 800;
  text-decoration: none;
}
#block-sweetzero-glance p:first-of-type a {
  border-color: var(--orange-500);
  background: var(--orange-500);
  color: #fff;
}
@media (max-width: 959px) {
  #block-sweetzero-glance {
    position: static;
  }
}

/* FAQ page: each question as a row ----------------------------------- */
.node--alias-faq h2 {
  margin-top: 2.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--line);
}
.node--alias-faq h3 {
  margin: 1.5rem 0 0.35rem;
  font-size: 1.15rem;
}
.node--alias-faq h3 + p {
  color: var(--ink-soft);
}

/* No "Read our FAQs" button on the FAQ page itself. */
body:has(.node--alias-faq) #block-sweetzero-glance p:has(a[href="/faq"]) {
  display: none;
}

/* Promises: compact 2×2 on phones, icon above the text. */
@media (max-width: 599px) {
  #block-sweetzero-promises ul {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.25rem 1rem;
  }
  #block-sweetzero-promises li {
    grid-template-columns: 1fr;
    row-gap: 0.15rem;
    font-size: 0.82rem;
  }
  #block-sweetzero-promises li::before {
    grid-row: auto;
    width: 38px;
    height: 38px;
    margin-bottom: 0.4rem;
    background-size: 20px;
  }
  #block-sweetzero-promises strong {
    font-size: 0.95rem;
  }
}

/* Local actions (e.g. "Write your own review") as a row of buttons. */
nav:has(> li) {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}
nav:has(> li) > li {
  list-style: none;
}
/* Commerce offers both "write a review" and "log in to review" to visitors
   who may review anonymously; show just the first. */
nav > li:has(a[href$="/add-review"]) ~ li:has(a[href$="/login-to-review"]),
nav > li:has(a[href$="/login-to-review"]):has(~ li a[href$="/add-review"]) {
  display: none;
}

/* Reviews page: card grid; filters in a compact row. */
.view-product-review-page .view-content {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
  gap: 1.25rem;
}
.view-product-review-page .views-row {
  display: flex;
}
.view-product-review-page .views-exposed-form {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0 1rem;
  margin-bottom: 1.5rem;
}
.view-product-review-page .views-exposed-form .form-item {
  flex: 1 1 12rem;
  margin-bottom: 1rem;
}
.view-product-review-page .views-exposed-form .form-actions {
  margin: 0 0 1rem;
}
.review__stars .field__label,
.review__stars > div > div:first-child:not(:only-child) {
  display: none;
}

/* Text-format tips are noise on public forms. */
.filter-wrapper,
.filter-guidelines,
.filter-help {
  display: none;
}

/* Account pages: one centred card. */
:is(.route--user-login, .route--user-register, .route--user-pass) .page-body__main {
  max-width: 32rem;
  padding: clamp(1.5rem, 1rem + 2vw, 2.5rem);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}
:is(.route--user-login, .route--user-register, .route--user-pass) .form-submit {
  width: 100%;
}
