/* Global Just Flowers header and footer. */

:root {
  --jf-chrome-ink: #173a2c;
  --jf-chrome-leaf: #2d7555;
  --jf-chrome-leaf-deep: #1d513c;
  --jf-chrome-rose: #a93f58;
  --jf-chrome-cream: #fcfaf6;
  --jf-chrome-petal: #f7eee2;
  --jf-chrome-paper: #ffffff;
  --jf-chrome-gold: #e5b85e;
  --jf-chrome-muted: #65766d;
  --jf-chrome-line: rgba(23, 58, 44, 0.13);
  --jf-chrome-serif: Georgia, Cambria, "Times New Roman", Times, serif;
  --jf-chrome-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
}

.jf-chrome-shell {
  width: min(1260px, calc(100% - 40px));
  margin-inline: auto;
}

.jf-site-header,
.jf-site-footer,
.jf-site-header *,
.jf-site-footer * {
  box-sizing: border-box;
}

.jf-site-header a,
.jf-site-footer a {
  text-decoration: none;
}

/* Keep Woostify's configured mobile quick-access bar available. It is restyled
   below to match the custom header/footer rather than being suppressed. */
.woostify-sticky-footer-bar {
  display: none !important;
}

@media (max-width: 991px) {
  body {
    padding-bottom: 5.15rem;
  }

  .woostify-sticky-footer-bar.woostify-sticky-on-mobile {
    display: block !important;
    min-height: 4.75rem;
    padding: 0.45rem 0.25rem 0.5rem !important;
    border-top: 1px solid rgba(23, 58, 44, 0.14) !important;
    background: rgba(255, 255, 255, 0.98) !important;
    box-shadow: 0 -8px 24px rgba(23, 58, 44, 0.09);
    z-index: 220 !important;
  }

  .woostify-sticky-footer-bar.woostify-sticky-on-mobile ul.woostify-item-list {
    display: flex !important;
    align-items: stretch;
    justify-content: space-around;
  }

  .woostify-sticky-footer-bar.woostify-sticky-on-mobile ul.woostify-item-list li.woostify-item-list__item {
    flex: 1 1 0 !important;
  }

  .woostify-sticky-footer-bar.woostify-sticky-on-mobile ul.woostify-item-list li.woostify-item-list__item a {
    display: inline-flex !important;
    flex-direction: column;
    align-items: center;
    gap: 0.28rem;
    color: var(--jf-chrome-leaf-deep) !important;
    font-family: var(--jf-chrome-sans);
    font-size: 0.64rem !important;
    font-weight: 750;
    line-height: 1.15 !important;
  }

  .woostify-sticky-footer-bar.woostify-sticky-on-mobile .woostify-item-list-item__icon {
    color: var(--jf-chrome-ink) !important;
    font-size: 1.35rem !important;
  }

  .woostify-sticky-footer-bar.woostify-sticky-on-mobile svg {
    width: 1.35rem;
    height: 1.35rem;
  }

  .woostify-sticky-footer-bar.woostify-sticky-on-mobile svg path {
    fill: var(--jf-chrome-ink) !important;
  }

  .woostify-sticky-footer-bar.woostify-sticky-on-mobile .shop-cart-count,
  .woostify-sticky-footer-bar.woostify-sticky-on-mobile .theme-item-count {
    display: grid !important;
    place-items: center;
    min-width: 1.1rem;
    height: 1.1rem;
    padding: 0 0.2rem;
    border-radius: 999px;
    background: var(--jf-chrome-rose) !important;
    color: var(--jf-chrome-paper) !important;
    font-family: var(--jf-chrome-sans);
    font-size: 0.62rem !important;
    font-weight: 800;
  }
}

.jf-site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid var(--jf-chrome-line);
  background: var(--jf-chrome-paper);
  box-shadow: 0 7px 24px rgba(23, 58, 44, 0.055);
  color: var(--jf-chrome-ink);
  font-family: var(--jf-chrome-sans);
}

body.admin-bar .jf-site-header {
  top: 32px;
}

.jf-header-announcement {
  background: var(--jf-chrome-ink);
  color: rgba(255, 255, 255, 0.9);
}

.jf-header-announcement__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  min-height: 2.4rem;
}

.jf-header-announcement p {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0;
  font-size: 0.7rem;
  font-weight: 750;
  letter-spacing: 0.025em;
  line-height: 1.35;
}

.jf-header-announcement__spark,
.jf-footer-eyebrow > span {
  width: 0.55rem;
  height: 0.55rem;
  flex: 0 0 auto;
  border-radius: 50% 50% 50% 0;
  background: var(--jf-chrome-gold);
  transform: rotate(-45deg);
}

.jf-header-announcement__links {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.jf-header-announcement a {
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.7rem;
  font-weight: 700;
}

.jf-header-announcement a:hover {
  color: var(--jf-chrome-gold);
}

.jf-header-main {
  position: relative;
  background: var(--jf-chrome-paper);
}

.jf-header-main__inner {
  display: grid;
  grid-template-columns: minmax(150px, 0.72fr) minmax(0, 1fr) auto;
  align-items: center;
  gap: 1.6rem;
  min-height: 5.65rem;
}

.jf-header-brand {
  min-width: 0;
}

.jf-brand {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  color: var(--jf-chrome-ink);
}

.jf-brand__image {
  display: block;
  width: clamp(9.5rem, 15vw, 12rem);
  max-height: 4.8rem;
  object-fit: contain;
  object-position: left center;
}

.jf-primary-nav {
  justify-self: end;
}

.jf-primary-nav__list {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: clamp(0.85rem, 1.6vw, 1.55rem);
  margin: 0;
  padding: 0;
  list-style: none;
}

.jf-primary-nav__list a {
  color: var(--jf-chrome-ink);
  font-size: 0.82rem;
  font-weight: 780;
  line-height: 1.35;
  white-space: nowrap;
  transition: color 160ms ease;
}

.jf-primary-nav__list a:hover,
.jf-primary-nav__list a:focus-visible {
  color: var(--jf-chrome-rose);
}

.jf-primary-nav__mobile-links,
.jf-header-menu-toggle {
  display: none;
}

.jf-header-actions {
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.jf-header-action {
  position: relative;
  display: grid;
  place-items: center;
  width: 2.45rem;
  height: 2.45rem;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 50%;
  background: transparent;
  color: var(--jf-chrome-ink);
  cursor: pointer;
  transition: background-color 160ms ease, color 160ms ease, border-color 160ms ease;
}

.jf-header-action:hover,
.jf-header-action:focus-visible {
  border-color: rgba(45, 117, 85, 0.18);
  background: #f2f6ef;
  color: var(--jf-chrome-rose);
}

.jf-header-action svg,
.jf-header-menu-toggle svg,
.jf-site-search svg,
.jf-footer-button svg,
.jf-footer-brand__delivery svg {
  display: block;
  width: 1.22rem;
  height: 1.22rem;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.jf-header-basket {
  margin-left: 0.15rem;
}

.jf-cart-count {
  position: absolute;
  top: -0.12rem;
  right: -0.12rem;
  display: grid;
  place-items: center;
  min-width: 1.12rem;
  height: 1.12rem;
  padding: 0 0.2rem;
  border-radius: 999px;
  background: var(--jf-chrome-rose);
  color: var(--jf-chrome-paper);
  font-size: 0.62rem;
  font-weight: 800;
  line-height: 1;
}

.jf-site-search {
  position: absolute;
  top: 100%;
  right: 0;
  left: 0;
  z-index: 20;
  border-top: 1px solid var(--jf-chrome-line);
  border-bottom: 1px solid var(--jf-chrome-line);
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 16px 32px rgba(23, 58, 44, 0.11);
}

.jf-site-search[hidden] {
  display: none !important;
}

.jf-site-search__inner {
  display: flex;
  align-items: end;
  gap: 1.3rem;
  padding: 1.45rem 0;
}

.jf-site-search__form {
  flex: 1;
}

.jf-site-search__form > label {
  display: block;
  margin-bottom: 0.5rem;
  color: var(--jf-chrome-ink);
  font-size: 0.75rem;
  font-weight: 800;
}

.jf-site-search__field {
  display: flex;
  overflow: hidden;
  border: 1px solid var(--jf-chrome-line);
  border-radius: 0.8rem;
  background: var(--jf-chrome-paper);
}

.jf-site-search__field input {
  min-width: 0;
  flex: 1;
  height: 3rem;
  padding: 0.7rem 1rem;
  border: 0;
  background: transparent;
  color: var(--jf-chrome-ink);
  font: inherit;
}

.jf-site-search__field button {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.7rem 1.1rem;
  border: 0;
  background: var(--jf-chrome-leaf);
  color: var(--jf-chrome-paper);
  font: inherit;
  font-size: 0.8rem;
  font-weight: 800;
  cursor: pointer;
}

.jf-site-search__field button svg,
.jf-footer-button svg {
  width: 1rem;
  height: 1rem;
}

.jf-site-search__close {
  display: grid;
  place-items: center;
  width: 2.8rem;
  height: 2.8rem;
  padding: 0;
  border: 1px solid var(--jf-chrome-line);
  border-radius: 50%;
  background: var(--jf-chrome-paper);
  color: var(--jf-chrome-ink);
  cursor: pointer;
}

/* Footer */
.jf-site-footer {
  color: var(--jf-chrome-ink);
  font-family: var(--jf-chrome-sans);
}

.jf-footer-cta {
  overflow: hidden;
  background: var(--jf-chrome-rose);
  color: var(--jf-chrome-paper);
}

.jf-footer-cta__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2.5rem;
  min-height: 14.5rem;
  padding: 3rem 0;
}

.jf-footer-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  margin: 0 0 0.9rem;
  color: rgba(255, 255, 255, 0.86);
  font-size: 0.69rem;
  font-weight: 800;
  letter-spacing: 0.125em;
  text-transform: uppercase;
}

.jf-footer-cta h2 {
  max-width: 15ch;
  margin: 0;
  color: var(--jf-chrome-paper);
  font-family: var(--jf-chrome-serif);
  font-size: clamp(2.1rem, 4vw, 3.8rem);
  font-weight: 400;
  letter-spacing: -0.045em;
  line-height: 1.02;
}

.jf-footer-cta__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
}

.jf-footer-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  min-height: 3rem;
  padding: 0.75rem 1.15rem;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 800;
  transition: transform 160ms ease, background-color 160ms ease, border-color 160ms ease;
}

.jf-footer-button:hover {
  transform: translateY(-2px);
}

.jf-footer-button--cream {
  background: var(--jf-chrome-petal);
  color: var(--jf-chrome-ink);
}

.jf-footer-button--cream:hover {
  background: var(--jf-chrome-paper);
  color: var(--jf-chrome-ink);
}

.jf-footer-button--outline {
  border-color: rgba(255, 255, 255, 0.58);
  color: var(--jf-chrome-paper);
}

.jf-footer-button--outline:hover {
  border-color: var(--jf-chrome-paper);
  background: rgba(255, 255, 255, 0.12);
  color: var(--jf-chrome-paper);
}

.jf-footer-main {
  padding: clamp(3.4rem, 6vw, 5.8rem) 0;
  background: #f2eee5;
}

.jf-footer-main__grid {
  display: grid;
  grid-template-columns: minmax(180px, 1.15fr) minmax(150px, 0.9fr) minmax(140px, 0.82fr) minmax(150px, 0.9fr) minmax(220px, 1.25fr);
  gap: 2.5rem;
}

.jf-footer-brand__link .jf-brand__image {
  width: min(11.5rem, 100%);
  max-height: 6rem;
}

.jf-footer-brand > p {
  max-width: 29ch;
  margin: 1rem 0;
  color: var(--jf-chrome-muted);
  font-size: 0.86rem;
  line-height: 1.7;
}

.jf-footer-brand__delivery {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  color: var(--jf-chrome-leaf-deep);
  font-size: 0.78rem;
  font-weight: 800;
}

.jf-footer-brand__delivery svg {
  width: 1rem;
  height: 1rem;
}

.jf-footer-column h2,
.jf-footer-payments h2 {
  margin: 0 0 1rem;
  color: var(--jf-chrome-ink);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.jf-footer-column address,
.jf-footer-column ul,
.jf-footer-payments p {
  margin: 0;
  padding: 0;
  color: var(--jf-chrome-muted);
  font-size: 0.84rem;
  font-style: normal;
  line-height: 1.85;
  list-style: none;
}

.jf-footer-column ul {
  margin-top: 0.8rem;
}

.jf-footer-column a {
  color: var(--jf-chrome-muted);
  transition: color 160ms ease;
}

.jf-footer-column a:hover,
.jf-footer-brand__delivery:hover {
  color: var(--jf-chrome-rose);
}

.jf-footer-payments img {
  display: block;
  width: 100%;
  max-width: 16rem;
  height: auto;
}

.jf-footer-payments__paypal {
  max-width: 9.6rem !important;
  margin-top: 0.8rem;
}

.jf-footer-payments p {
  max-width: 29ch;
  margin-top: 1rem;
  font-size: 0.78rem;
  line-height: 1.6;
}

.jf-footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.13);
  background: var(--jf-chrome-ink);
  color: rgba(255, 255, 255, 0.72);
}

.jf-footer-bottom__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 4rem;
}

.jf-footer-bottom p,
.jf-footer-bottom a {
  margin: 0;
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.74rem;
}

.jf-footer-bottom a:hover {
  color: var(--jf-chrome-gold);
}

.jf-footer-bottom__inner > div {
  display: flex;
  gap: 1rem;
}

/* Focus remains visible throughout the custom chrome. */
.jf-site-header a:focus-visible,
.jf-site-header button:focus-visible,
.jf-site-footer a:focus-visible {
  outline: 3px solid #e6b75d;
  outline-offset: 3px;
}

@media (max-width: 1120px) {
  .jf-header-main__inner {
    gap: 1rem;
  }

  .jf-primary-nav__list {
    gap: 0.85rem;
  }

  .jf-primary-nav__list a {
    font-size: 0.76rem;
  }

  .jf-footer-main__grid {
    grid-template-columns: minmax(190px, 1.2fr) repeat(3, minmax(130px, 0.8fr));
  }

  .jf-footer-payments {
    grid-column: 1 / -1;
  }

  .jf-footer-payments img {
    max-width: 18rem;
  }
}

@media (max-width: 880px) {
  body.admin-bar .jf-site-header {
    top: 46px;
  }

  .jf-header-announcement__links {
    display: none;
  }

  .jf-header-announcement__inner {
    justify-content: center;
    min-height: 2.25rem;
    text-align: center;
  }

  .jf-header-main__inner {
    grid-template-columns: minmax(0, 1fr) auto auto;
    gap: 0.35rem;
    min-height: 4.75rem;
  }

  .jf-brand__image {
    width: 8.5rem;
    max-height: 3.7rem;
  }

  .jf-header-menu-toggle {
    display: grid;
    place-items: center;
    width: 2.55rem;
    height: 2.55rem;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: var(--jf-chrome-ink);
    cursor: pointer;
  }

  .jf-header-menu-toggle:hover,
  .jf-header-menu-toggle:focus-visible {
    background: #f2f6ef;
    color: var(--jf-chrome-rose);
  }

  .jf-header-menu-toggle__icon svg {
    width: 1.42rem;
    height: 1.42rem;
  }

  .jf-primary-nav {
    position: absolute;
    top: 100%;
    right: 0;
    left: 0;
    display: none;
    padding: 0.8rem 1rem 1.1rem;
    border-top: 1px solid var(--jf-chrome-line);
    border-bottom: 1px solid var(--jf-chrome-line);
    background: var(--jf-chrome-paper);
    box-shadow: 0 16px 28px rgba(23, 58, 44, 0.1);
  }

  .jf-site-header.is-menu-open .jf-primary-nav {
    display: block;
  }

  .jf-primary-nav__list {
    display: grid;
    gap: 0;
    width: min(100%, 40rem);
    margin-inline: auto;
  }

  .jf-primary-nav__list li {
    border-bottom: 1px solid rgba(23, 58, 44, 0.1);
  }

  .jf-primary-nav__list a {
    display: block;
    padding: 0.9rem 0.35rem;
    font-size: 0.9rem;
  }

  .jf-primary-nav__mobile-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin: 1rem 0.35rem 0;
  }

  .jf-primary-nav__mobile-links a {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.65rem 0.8rem;
    border-radius: 999px;
    background: #f2f6ef;
    color: var(--jf-chrome-leaf-deep);
    font-size: 0.78rem;
    font-weight: 800;
  }

  .jf-primary-nav__mobile-links svg {
    width: 1rem;
    height: 1rem;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.8;
  }

  .jf-header-account {
    display: none;
  }

  .jf-site-search__inner {
    padding: 1.1rem 0;
  }

  .jf-footer-cta__inner {
    min-height: 0;
  }

  .jf-footer-main__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .jf-footer-brand,
  .jf-footer-payments {
    grid-column: 1 / -1;
  }
}

@media (max-width: 560px) {
  .jf-chrome-shell {
    width: min(100% - 32px, 1260px);
  }

  .jf-header-announcement p {
    justify-content: center;
    font-size: 0.64rem;
    text-align: center;
  }

  .jf-header-announcement__spark {
    display: none;
  }

  .jf-header-main__inner {
    min-height: 4.45rem;
  }

  .jf-brand__image {
    width: 7.6rem;
    max-height: 3.35rem;
  }

  .jf-header-action,
  .jf-header-menu-toggle {
    width: 2.35rem;
    height: 2.35rem;
  }

  .jf-header-search-toggle {
    display: none;
  }

  .jf-site-search__inner {
    align-items: start;
  }

  .jf-site-search__field {
    display: grid;
    overflow: visible;
    border: 0;
    background: transparent;
  }

  .jf-site-search__field input {
    border: 1px solid var(--jf-chrome-line);
    border-radius: 0.7rem;
  }

  .jf-site-search__field button {
    justify-content: center;
    margin-top: 0.55rem;
    border-radius: 0.7rem;
  }

  .jf-footer-cta__inner {
    display: grid;
    gap: 1.7rem;
    padding: 3.2rem 0;
  }

  .jf-footer-cta h2 {
    max-width: 12ch;
  }

  .jf-footer-cta__actions {
    display: grid;
  }

  .jf-footer-button {
    width: 100%;
  }

  .jf-footer-main__grid {
    grid-template-columns: 1fr;
    gap: 2.2rem;
  }

  .jf-footer-brand,
  .jf-footer-payments {
    grid-column: auto;
  }

  .jf-footer-payments img {
    max-width: min(100%, 19rem);
  }

  .jf-footer-bottom__inner {
    display: grid;
    justify-content: stretch;
    gap: 0.45rem;
    padding: 1.1rem 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .jf-site-header *,
  .jf-site-header *::before,
  .jf-site-header *::after,
  .jf-site-footer *,
  .jf-site-footer *::before,
  .jf-site-footer *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
