@import url("https://font.emtech.cc/css/GenSekiGothicTC");
@import url("https://fonts.googleapis.com/css2?family=Hind:wght@400&family=Khand:wght@700&display=swap");

:root {
  --rock: #262C31;
  --sand: #EBEBE9;
  --orange: #FF8510;
  --green: #345339;
  --red: #823B35;
  --black: #000000;
  --white: #FFFFFF;
  --white-soft: rgba(255, 255, 255, 0.78);
  --white-line: rgba(255, 255, 255, 0.18);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--sand);
  color: var(--rock);
  font-family: "Hind", "GenSekiGothicTC", sans-serif;
  line-height: 1.65;
}

h1,
h2,
h3,
.brand,
.label,
.actions a,
button,
b {
  font-family: "Khand", "GenSekiGothicTC", sans-serif;
  font-weight: 700;
}

a {
  color: inherit;
}

/* ===== 全站頁首 ===== */
.site-header {
  position: relative;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 84px;
  padding: 0 4vw;
  background: var(--rock);
  color: var(--white);
  border-bottom: 3px solid var(--orange);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--white);
  font-size: 22px;
  text-decoration: none;
}

.brand img {
  width: 52px;
  height: 52px;
  object-fit: contain;
  background: transparent;
  border-radius: 50%;
}

.site-header nav {
  display: flex;
  align-items: center;
  gap: 26px;
}

.site-header nav a {
  color: var(--white);
  text-decoration: none;
}

.site-header nav a:hover,
.site-header nav a.active {
  color: var(--orange);
}

.site-header nav a.active {
  border-bottom: 2px solid var(--orange);
}

.site-header .ig {
  color: var(--orange);
}

.menu {
  display: none;
  padding: 0;
  border: 0;
  background: none;
  color: var(--white);
  font-size: 26px;
}

/* ===== 首頁 ===== */
body:has(.hero) {
  background: var(--rock);
  color: var(--white);
}

body:has(.hero) main,
.hero,
.hero-art,
.hero-copy,
.home-grid,
.brand-story {
  background: var(--rock);
  color: var(--white);
}

.hero {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  align-items: center;
  min-height: calc(100svh - 84px);
  overflow: hidden;
}

.hero-art {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 680px;
  padding: clamp(24px, 5vw, 72px);
  background: var(--rock) !important;
}

.hero-visual {
  display: block;
  width: min(88%, 720px);
  height: auto;
  max-height: 78vh;
  object-fit: contain;
  background: transparent !important;
  mix-blend-mode: normal;
  opacity: 1;
  filter: none;
}

.hero-logo {
  width: min(78%, 620px);
  height: auto;
  max-height: 78vh;
  object-fit: contain;
  background: transparent;
  mix-blend-mode: normal;
}

.hero-slogan {
  position: absolute;
  right: -4%;
  bottom: -5%;
  width: 43%;
  height: auto;
  object-fit: contain;
}

.hero-copy {
  padding: 8vw;
}

.label {
  color: var(--orange);
  letter-spacing: 0.16em;
}

.hero h1 {
  margin: 12px 0;
  color: var(--white);
  font-size: clamp(52px, 7vw, 100px);
  line-height: 1.02;
}

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

.hero-copy > p:not(.label) {
  color: var(--white-soft);
  font-size: 20px;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.actions a,
.actions a.outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 120px;
  padding: 13px 22px;
  border: 1px solid var(--orange);
  background: var(--orange);
  color: var(--rock);
  text-decoration: none;
  transition: background-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.actions a:hover,
.actions a.outline:hover {
  background: transparent;
  color: var(--white);
  transform: translateY(-2px);
}

.stripe {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  padding: 16px;
  background: var(--rock);
  color: var(--white);
  border-top: 1px solid var(--white-line);
  border-bottom: 1px solid var(--white-line);
  font: 700 28px "Khand", sans-serif;
  text-align: center;
}

.stripe span {
  color: var(--white);
}

.stripe span:nth-child(3) {
  color: var(--orange);
}

.wrap {
  width: min(92%, 1240px);
  margin: auto;
}

.home-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
  padding: 90px 0;
}

.feature {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 390px;
  padding: 48px;
  background: var(--rock) !important;
  color: var(--white) !important;
  border: 1px solid var(--white-line);
  border-top: 6px solid var(--orange);
}

.feature h2 {
  margin: 6px 0;
  color: var(--white);
  font-size: 52px;
}

.feature p,
.feature a {
  color: var(--white);
}

.feature a {
  width: max-content;
  border-bottom: 2px solid var(--orange);
  font-family: "Khand", sans-serif;
  text-decoration: none;
}

.brand-story {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  align-items: center;
  gap: 50px;
  padding: 80px 0;
  border-top: 1px solid var(--white-line);
}

.brand-story h2 {
  color: var(--white);
  font-size: 58px;
  line-height: 1.08;
}

.brand-story p {
  color: var(--white-soft);
}

.brand-story img {
  width: 100%;
  height: auto;
  object-fit: contain;
  background: transparent;
  mix-blend-mode: screen;
}

/* ===== 植株選購與活動頁 ===== */
.page-hero {
  padding: 90px 7vw;
  background: var(--green);
  color: var(--white);
  border-bottom: 9px solid var(--orange);
}

.page-hero.red {
  background: var(--red);
}

.page-hero h1 {
  margin: 0;
  font-size: clamp(58px, 8vw, 96px);
}

.section {
  padding: 65px 0 100px;
}

.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 30px;
}

.toolbar p {
  font-size: 18px;
}

button {
  padding: 9px 16px;
  border: 1px solid var(--rock);
  background: transparent;
  color: var(--rock);
}

button.active {
  background: var(--rock);
  color: var(--white);
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.card {
  overflow: hidden;
  background: var(--white);
  border-top: 6px solid var(--orange);
  box-shadow: 0 12px 30px rgba(38, 44, 49, 0.07);
}

.poster,
.media {
  position: relative;
  aspect-ratio: 9 / 16;
  overflow: hidden;
  background: var(--rock);
}

.poster img,
.media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.poster span {
  position: absolute;
  top: 14px;
  left: 14px;
  padding: 6px 11px;
  background: var(--orange);
  color: var(--rock);
  font-family: "Khand", "GenSekiGothicTC", sans-serif;
  font-weight: 700;
}

.poster-fallback {
  display: none;
  width: 100%;
  height: 100%;
  place-items: center;
  color: rgba(255, 255, 255, 0.6);
  font-family: "Khand", sans-serif;
  font-size: 28px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-align: center;
}

.card-body,
.pad {
  padding: 23px;
}

.card-body small,
.pad small {
  color: var(--red);
  letter-spacing: 0.12em;
}

.card-body h2,
.pad h3 {
  margin: 5px 0;
  font-size: 30px;
}

.meta {
  display: flex;
  justify-content: space-between;
  padding: 14px 0;
  border-block: 1px solid #DDDDDD;
}

.meta i {
  font-style: normal;
}

.card-body > a,
.pad > a {
  display: inline-block;
  margin-top: 18px;
  color: var(--green);
  font-weight: 700;
  text-decoration: none;
  border-bottom: 2px solid var(--orange);
}

.empty-state {
  grid-column: 1 / -1;
  padding: 48px 20px;
  border: 1px dashed rgba(38, 44, 49, 0.35);
  background: var(--white);
  text-align: center;
}

/* ===== 孤島植賞相容樣式 ===== */
.appreciation-hero {
  background: var(--rock);
  color: var(--white);
  border-bottom: 9px solid var(--orange);
}

.appreciation-hero > p:not(.label) {
  color: var(--white-soft);
  font-size: 18px;
}

.appreciation-toolbar {
  align-items: flex-end;
}

.filter-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.filter-group button {
  cursor: pointer;
}

.appreciation-card .poster {
  position: relative;
  aspect-ratio: 9 / 16;
  overflow: hidden;
  background: var(--rock);
}

.appreciation-card .poster img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: var(--rock);
}

.appreciation-card .card-body > p {
  min-height: 54px;
}

.appreciation-meta {
  margin: 18px 0 0;
  border-top: 1px solid #DDDDDD;
  border-bottom: 1px solid #DDDDDD;
}

.appreciation-meta > div {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 12px;
  padding: 10px 0;
}

.appreciation-meta > div + div {
  border-top: 1px solid #EEEEEE;
}

.appreciation-meta dt {
  color: var(--red);
  font-weight: 700;
}

.appreciation-meta dd {
  margin: 0;
}

/* ===== 商品資訊複製與私訊按鈕 ===== */
.product-inquiry {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  margin-top: 18px;
  padding: 9px 0;
  border: 0;
  border-bottom: 2px solid var(--orange);
  background: transparent;
  color: var(--green);
  font-family: "Khand", "GenSekiGothicTC", sans-serif;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
}

.product-inquiry:hover,
.product-inquiry:focus-visible {
  color: var(--orange);
  outline: none;
}

.product-inquiry:disabled {
  cursor: wait;
  opacity: 0.65;
}

/* ===== 商品資訊複製完成提示 ===== */
.copy-notice-open {
  overflow: hidden;
}

.product-copy-notice {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: grid;
  place-items: center;
  padding: 18px;
}

.copy-notice-backdrop {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: rgba(20, 24, 27, 0.76);
  cursor: pointer;
}

.copy-notice-card {
  position: relative;
  z-index: 1;
  width: min(100%, 430px);
  padding: 54px 26px 26px;
  background: var(--sand);
  border-top: 7px solid var(--orange);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.38);
  animation: copy-notice-show 0.22s ease both;
}

.copy-notice-close {
  position: absolute;
  top: 10px;
  right: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  min-width: 40px;
  max-width: 40px;
  height: 40px;
  min-height: 40px;
  max-height: 40px;
  margin: 0;
  padding: 0 0 2px;
  border: 1px solid var(--rock);
  border-radius: 0;
  background: transparent;
  color: var(--rock);
  font-family: Arial, sans-serif;
  font-size: 25px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
}

.copy-notice-close:hover,
.copy-notice-close:focus-visible {
  border-color: var(--orange);
  background: var(--orange);
  color: var(--rock);
  outline: none;
}

.copy-notice-label {
  margin: 0 0 5px;
  color: var(--red);
  font-family: "Khand", Arial, sans-serif;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
}

.copy-notice-card h2 {
  margin: 0 0 12px;
  padding-right: 44px;
  color: var(--rock);
  font-size: clamp(27px, 7vw, 37px);
  line-height: 1.2;
}

.copy-notice-product {
  margin: 0;
  padding: 12px 14px;
  background: var(--white);
  border-left: 5px solid var(--orange);
  color: var(--rock);
  font-size: 19px;
  font-weight: 800;
}

.copy-notice-description {
  margin: 16px 0;
  color: #5D666B;
  font-size: 14px;
  line-height: 1.75;
}

.copy-notice-confirm {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 50px;
  padding: 10px 16px;
  border: 1px solid var(--orange);
  border-radius: 0;
  background: var(--orange);
  color: var(--rock);
  font-family: "Khand", "GenSekiGothicTC", sans-serif;
  font-size: 16px;
  font-weight: 900;
  cursor: pointer;
}

.copy-notice-confirm:hover,
.copy-notice-confirm:focus-visible {
  border-color: var(--rock);
  background: var(--rock);
  color: var(--white);
  outline: none;
}

.product-copy-notice.is-closing .copy-notice-card {
  animation: copy-notice-hide 0.18s ease both;
}

@keyframes copy-notice-show {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes copy-notice-hide {
  from {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
  to {
    opacity: 0;
    transform: translateY(12px) scale(0.98);
  }
}

/* ===== 頁尾 ===== */
footer {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 34px 5vw;
  background: var(--rock);
  color: var(--white);
  border-top: 3px solid var(--orange);
}

footer img {
  width: 70px;
  height: 70px;
  object-fit: contain;
  background: transparent;
  border-radius: 50%;
}

footer p {
  margin: 0;
  color: var(--white-soft);
}

/* ===== 手機版 ===== */
@media (max-width: 820px) {
  .menu {
    display: block;
  }

  .site-header nav {
    position: absolute;
    top: 84px;
    right: 0;
    left: 0;
    display: none;
    flex-direction: column;
    padding: 20px;
    background: var(--rock);
  }

  .site-header nav.open {
    display: flex;
  }

  .hero {
    grid-template-columns: 1fr;
  }

  .hero-art {
    min-height: 62svh;
  }

  .hero-copy {
    padding: 55px 24px;
  }

  .home-grid,
  .brand-story,
  .card-grid {
    grid-template-columns: 1fr;
  }

  .stripe {
    font-size: 20px;
  }

  .toolbar,
  .appreciation-toolbar {
    display: block;
  }

  .feature h2,
  .brand-story h2 {
    font-size: 44px;
  }

  .poster,
  .media {
    aspect-ratio: 9 / 16;
  }

  .filter-group {
    margin-top: 20px;
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 6px;
  }

  .filter-group button {
    flex: 0 0 auto;
  }

  .actions {
    display: grid;
    grid-template-columns: 1fr;
    width: 100%;
  }

  .actions a,
  .actions a.outline {
    width: 100%;
  }
}

@media (max-width: 520px) {
  .product-copy-notice {
    padding: 12px;
  }

  .copy-notice-card {
    width: 100%;
    padding: 52px 20px 22px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .copy-notice-card,
  .product-copy-notice.is-closing .copy-notice-card {
    animation: none;
  }
}
