/*
Theme Name: Healthy Food Astra Child
Theme URI: https://healthyfood-hk.com
Author: Healthy Food Retails and Wholesale Company
Description: 健康派的 Astra 子主題，配合 WooCommerce 使用。
Version: 1.2.4
Requires at least: 6.4
Requires PHP: 7.4
Template: astra
Text Domain: healthy-food-astra-child
*/

:root {
  --hf-leaf: #2f6b45;
  --hf-leaf-deep: #254b35;
  --hf-orange: #e8873a;
  --hf-slate: #52645a;
  --hf-sage: #8b9d83;
  --hf-moss: #606c38;
  --hf-clay: #b08b6e;
  --hf-terracotta: #c66b3d;
  --hf-ochre: #c08e3a;
  --hf-sand: #e8dcc7;
  --hf-oat: #d4b895;
  --hf-ink: #25382b;
  --hf-ink-soft: #526052;
  --hf-line: rgba(37, 75, 53, 0.24);
  --hf-display: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Georgia, "Songti TC", serif;
  --hf-body: "Avenir Next", Avenir, "Gill Sans", "PingFang TC", "Microsoft JhengHei", sans-serif;
  --hf-ease: cubic-bezier(0.22, 1, 0.36, 1);
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--hf-sand);
  color: var(--hf-ink);
  font-family: var(--hf-body);
}

body::before {
  content: "";
  position: fixed;
  z-index: 9999;
  inset: 0;
  opacity: 0.018;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.7'/%3E%3C/svg%3E");
}

a {
  transition: color 360ms var(--hf-ease), background-color 360ms var(--hf-ease), border-color 360ms var(--hf-ease), transform 360ms var(--hf-ease);
}

:focus-visible {
  outline: 3px solid var(--hf-orange);
  outline-offset: 4px;
}

.home #primary.hf-site {
  width: 100%;
  max-width: none;
  margin: 0;
}

.home .site-content > .ast-container {
  width: 100%;
  max-width: none;
  padding-inline: 0;
}

.site-primary-header-wrap {
  width: 100%;
  max-width: none;
  padding-inline: clamp(20px, 3vw, 48px);
}

.ast-primary-header-bar,
.site-primary-header-wrap {
  background: rgba(232, 220, 199, 0.96);
}

.ast-primary-header-bar {
  min-height: 80px;
  border-bottom-color: var(--hf-line);
}

.site-header-primary-section-left .site-logo-img {
  display: none !important;
}

.site-branding .site-title {
  display: block !important;
  margin: 0;
  line-height: 1;
}

.site-branding .site-title a {
  width: 248px;
  height: 58px;
  display: block;
  overflow: hidden;
  background: url("assets/brand/logo-header.svg") left center / contain no-repeat;
  color: transparent;
  font-size: 0;
}

.site-branding .site-description {
  display: none !important;
}

.main-header-menu > .menu-item > .menu-link {
  color: var(--hf-ink);
  font-family: var(--hf-body);
  font-size: 14px;
  font-weight: 650;
  letter-spacing: 0.015em;
}

@media (min-width: 922px) {
  .main-header-menu {
    flex-wrap: nowrap;
    align-items: center;
  }

  .main-header-menu > .hf-menu-item > .menu-link {
    padding-inline: clamp(8px, 1vw, 15px);
    white-space: nowrap;
  }
}

.main-header-menu > .menu-item > .menu-link:hover,
.main-header-menu > .current-menu-item > .menu-link,
.main-header-menu > .current-menu-ancestor > .menu-link {
  color: var(--hf-orange);
}

.main-header-menu .hf-cart-menu-item > .hf-cart-link {
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  margin-left: 4px;
  padding: 8px 10px;
  border: 1px solid var(--hf-leaf);
  border-radius: 999px;
  background: var(--hf-leaf);
  color: var(--hf-sand);
  line-height: 1;
}

.main-header-menu .hf-cart-menu-item > .hf-cart-link:hover,
.main-header-menu .hf-cart-menu-item.current-menu-item > .hf-cart-link {
  border-color: var(--hf-leaf-deep);
  background: var(--hf-leaf-deep);
  color: var(--hf-sand);
}

.hf-cart-icon,
.hf-cart-icon svg {
  width: 19px;
  height: 19px;
  display: block;
}

.hf-cart-icon svg {
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.hf-cart-label {
  white-space: nowrap;
}

.hf-cart-count {
  min-width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding-inline: 5px;
  border-radius: 999px;
  background: var(--hf-orange);
  color: var(--hf-ink);
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
}

.main-header-menu-toggle,
.ast-mobile-menu-trigger-outline,
.ast-mobile-menu-trigger-minimal {
  min-width: 44px;
  min-height: 44px;
  pointer-events: auto !important;
  touch-action: manipulation;
}

.ast-header-button-1 .ast-custom-button {
  border-color: var(--hf-leaf);
  border-radius: 24px;
  background: var(--hf-leaf);
  color: var(--hf-sand);
}

.healthy-food-organic .site-footer {
  display: none;
}

.hf-global-footer {
  padding: clamp(64px, 8vw, 108px) 24px 24px;
  overflow: hidden;
  border-radius: 32px 32px 0 0;
  background: var(--hf-leaf-deep);
  color: var(--hf-sand);
}

.hf-global-footer__inner {
  width: min(100%, 1392px);
  margin-inline: auto;
  display: grid;
  grid-template-columns: minmax(260px, 0.82fr) minmax(460px, 1.18fr);
  gap: clamp(48px, 8vw, 124px);
}

.hf-global-footer__logo {
  width: min(100%, 330px);
  display: block;
}

.hf-global-footer__logo img {
  width: 100%;
  height: auto;
  display: block;
}

.hf-global-footer__name {
  margin: 28px 0 0;
  color: var(--hf-sand);
  font-family: var(--hf-display);
  font-size: clamp(24px, 2.5vw, 38px);
  line-height: 1.1;
}

.hf-global-footer__name-en,
.hf-global-footer__description {
  margin: 8px 0 0;
  color: rgba(232, 220, 199, 0.7);
  font-size: 13px;
  line-height: 1.55;
}

.hf-global-footer__links {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 28px;
}

.hf-global-footer__links nav {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 11px;
}

.hf-global-footer__links p {
  margin: 0 0 10px;
  color: var(--hf-oat);
  font-weight: 700;
}

.hf-global-footer__links a,
.hf-global-footer__links span {
  color: rgba(232, 220, 199, 0.76);
  font-size: 13px;
  line-height: 1.5;
}

.hf-global-footer__links a:hover,
.hf-global-footer__links a:focus {
  color: var(--hf-sand);
}

.hf-global-footer__bottom {
  width: min(100%, 1392px);
  margin: 56px auto 0;
  padding-top: 20px;
  border-top: 1px solid rgba(232, 220, 199, 0.2);
}

.hf-global-footer__bottom p {
  margin: 0;
  color: rgba(232, 220, 199, 0.58);
  font-size: 12px;
  line-height: 1.6;
}

.healthy-food-public-info .site-main > .page,
.healthy-food-public-info .site-main > article {
  width: min(calc(100% - 40px), 1040px);
  margin: clamp(40px, 6vw, 84px) auto;
  padding: clamp(28px, 6vw, 76px);
  border-radius: 32px;
  background: var(--hf-oat);
}

.hf-public-page {
  max-width: 820px;
  margin-inline: auto;
  color: var(--hf-ink);
  font-size: 16px;
  line-height: 1.78;
}

.hf-public-page h2,
.hf-public-page h3 {
  color: var(--hf-ink);
  font-family: var(--hf-display);
  font-weight: 500;
}

.hf-public-page h2 {
  margin: 2.1em 0 0.6em;
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1.08;
}

.hf-public-page h2:first-child,
.hf-review-note + h2,
.hf-review-note + p + h2 {
  margin-top: 0;
}

.hf-public-page h3 {
  margin: 1.8em 0 0.5em;
  font-size: 24px;
}

.hf-public-page p,
.hf-public-page li {
  color: var(--hf-ink-soft);
}

.hf-public-page a {
  color: var(--hf-leaf-deep);
  text-underline-offset: 0.2em;
}

.hf-public-page code,
.hf-to-confirm {
  padding: 0.15em 0.45em;
  border-radius: 8px;
  background: rgba(232, 135, 58, 0.16);
  color: var(--hf-ink);
  font-family: var(--hf-body);
}

.hf-review-note {
  margin-bottom: 36px;
  padding: 20px 22px;
  border: 1px solid rgba(198, 107, 61, 0.52);
  border-radius: 20px;
  background: rgba(232, 220, 199, 0.72);
  color: var(--hf-ink);
}

.hf-review-note strong {
  color: var(--hf-terracotta);
}

/* Internal review notes and placeholder effective dates are never public UI. */
.hf-review-note,
.hf-review-note + p {
  display: none;
}

.hf-public-page table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  overflow: hidden;
  border: 1px solid var(--hf-line);
  border-radius: 18px;
}

.hf-public-page th,
.hf-public-page td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--hf-line);
  text-align: left;
  vertical-align: top;
}

.hf-public-page tr:last-child td {
  border-bottom: 0;
}

@media (max-width: 920px) {
  .hf-global-footer__inner {
    grid-template-columns: 1fr;
  }

  .hf-global-footer__links {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .main-header-menu .hf-cart-menu-item > .hf-cart-link {
    box-sizing: border-box;
    width: calc(100% - 40px) !important;
    max-width: calc(100% - 40px);
    display: flex !important;
    margin: 12px 20px 16px;
  }
}

@media (max-width: 600px) {
  .site-branding .site-title a {
    width: 174px;
    height: 48px;
    background-image: url("assets/brand/logo-mobile.svg");
  }

  .hf-global-footer {
    padding-inline: 20px;
  }

  .hf-global-footer__links {
    grid-template-columns: 1fr;
  }

  .healthy-food-public-info .site-main > .page,
  .healthy-food-public-info .site-main > article {
    width: min(calc(100% - 24px), 1040px);
    padding: 28px 20px;
    border-radius: 24px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
