/* ── Reset & Variables ── */
*, *::before, *::after { margin: 0; padding: 0; }

:root {
  --orange:       #E8820C;
  --orange-dark:  #B85000;
  --orange-light: #F5A53A;
  --orange-pale:  #FDE9C8;
  --green:        #3A7D44;
  --green-light:  #4E9E5A;
  --bg:           #FFF8F0;
  --text:         #3D2B1F;
  --text-muted:   #7A5C45;
  --border:       #E8D5C0;
  --card-bg:      #FFFFFF;
  --shadow:       0 2px 12px rgba(61,43,31,0.08);
}

/* ── Accessibility helpers ── */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Noto Sans TC', 'PingFang TC', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.75;
  font-size: 16px;
}

[id] {
  scroll-margin-top: 1.5rem;
}

.container {
  max-width: 940px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* ── Hero ── */
#hero {
  position: relative;
  min-height: 85vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: linear-gradient(150deg, #b85000 0%, #e8820c 45%, #f5c340 100%) center/cover no-repeat;
  background-image: url('images/hero2-1.jpg?v=1');
  overflow: hidden;
}

#hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(20, 8, 0, 0.45);
}

.hero-overlay {
  position: relative;
  z-index: 1;
  padding: 2rem 1rem;
}

#hero h1 {
  font-size: clamp(2.5rem, 8vw, 5rem);
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.08em;
  text-shadow: 0 3px 12px rgba(0,0,0,0.4);
  margin-bottom: 0.5rem;
  word-break: keep-all;
}

.subtitle {
  color: rgba(255,255,255,0.92);
  font-size: clamp(1rem, 3.5vw, 1.4rem);
  letter-spacing: 0.2em;
  margin-bottom: 2.5rem;
}

/* ── Buttons ── */
.btn-primary {
  display: inline-block;
  background: var(--text);
  color: #fff;
  padding: 0.8rem 2.25rem;
  border-radius: 3rem;
  text-decoration: none;
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 0.05em;
  transition: background 0.2s, transform 0.15s;
}
.btn-primary:hover {
  background: #5a3e2b;
  transform: translateY(-1px);
}

.btn-group {
  display: flex;
  gap: 0.6rem;
  justify-content: center;
  flex-wrap: wrap;
}

.btn-outline {
  display: inline-block;
  background: transparent;
  color: var(--text-muted);
  border: 1.5px solid var(--text-muted);
  padding: 0.8rem 1.5rem;
  border-radius: 3rem;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  transition: border-color 0.2s, color 0.2s;
}
.btn-outline:hover {
  border-color: var(--text-muted);
  color: var(--text);
}

.btn-secondary {
  display: inline-block;
  background: var(--green);
  color: #fff;
  padding: 0.8rem 2.25rem;
  border-radius: 3rem;
  text-decoration: none;
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 0.05em;
  transition: background 0.2s, transform 0.15s;
}
.btn-secondary:hover {
  background: var(--green-light);
  transform: translateY(-1px);
}

/* ── Quick Nav ── */
.quick-nav {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 2.5rem;
  flex-wrap: nowrap;
  overflow-x: auto;
  padding: 1.25rem 1.25rem;
  background: #fff;
  border-bottom: 1px solid var(--border);
}
.quick-nav a {
  color: var(--text);
  text-decoration: none;
  font-weight: 700;
  font-size: clamp(1rem, 0.6vw + 0.9rem, 1.2rem);
  letter-spacing: 0.03em;
  padding: 0.4rem 0.2rem;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
  flex-shrink: 0;
  transition: color 0.2s, border-color 0.2s;
}
.quick-nav a:hover {
  color: var(--orange-dark);
  border-color: var(--orange-dark);
}

@media (max-width: 600px) {
  .quick-nav {
    gap: 0.5rem;
    padding: 1rem 0.75rem;
  }
  .quick-nav a {
    font-size: 0.85rem;
    letter-spacing: 0.01em;
    padding: 0.3rem 0.15rem;
  }
}

/* ── About ── */
#about {
  padding: 5rem 0 0;
  background: var(--bg);
}

.about-text {
  max-width: 640px;
  margin: 0 auto;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.9;
}

.about-gallery {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  width: 100%;
  margin-top: 2.5rem;
}
.about-gallery img {
  display: block;
  width: 100%;
  height: 420px;
  object-fit: cover;
  object-position: center 65%;
}
.about-gallery img:nth-child(6) {
  object-position: center;
}

@media (max-width: 900px) {
  .about-gallery { grid-template-columns: repeat(3, 1fr); }
  .about-gallery img { height: 300px; }
}

@media (max-width: 600px) {
  .about-gallery { grid-template-columns: repeat(2, 1fr); }
  .about-gallery img { height: 220px; }
}

/* ── Section Headings ── */
h2 {
  font-size: clamp(1.5rem, 4vw, 2.1rem);
  font-weight: 700;
  color: var(--text);
  margin-bottom: 2.5rem;
  text-align: center;
  position: relative;
}

h2::after {
  content: '';
  display: block;
  width: 3rem;
  height: 3px;
  background: var(--orange);
  margin: 0.6rem auto 0;
  border-radius: 2px;
}

/* ── Products ── */
#products {
  padding: 5rem 0;
  background: #fff;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  gap: 1.75rem;
}

.product-card {
  border: 1px solid var(--border);
  border-radius: 1.25rem;
  overflow: hidden;
  background: var(--card-bg);
  box-shadow: var(--shadow);
  transition: transform 0.2s, box-shadow 0.2s;
}
.product-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(61,43,31,0.12);
}

.product-img {
  width: 100%;
  aspect-ratio: 6 / 5;
  overflow: hidden;
}
.product-img img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}
.irwin-img { background: #2a0a00; }
.irwin-img img { object-position: top center; }
.black-img { background: #0f1a0a; }
.black-img img { object-position: center 70%; }
.dried-img { background: #3a1a00; }
.dried-img img { object-position: top center; }

.product-info {
  padding: 1.4rem 1.25rem 1.5rem;
}

.product-info h3 {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--text);
}

.product-desc {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 1rem;
  line-height: 1.6;
}

/* Price table */
.price-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
  margin-bottom: 0.5rem;
}
.price-table thead th {
  background: var(--bg);
  color: var(--text-muted);
  font-weight: 500;
  padding: 0.45rem 0.6rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}
.price-table tbody td {
  padding: 0.5rem 0.6rem;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
  color: var(--text);
}
.price-table tbody tr:last-child td { border-bottom: none; }
td.price {
  font-weight: 700;
  color: var(--orange-dark);
  font-size: 1rem;
  white-space: nowrap;
}

.table-note {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 0.4rem;
  font-style: italic;
}

/* ── 商品狀態標籤（即將上市／已售完等，逐年依實際狀況套用） ── */
.status-card { opacity: 0.88; }

.product-img {
  position: relative;
}

.status-badge {
  position: absolute;
  top: 1rem;
  left: 1rem;
  color: #fff;
  font-size: 0.82rem;
  font-weight: 700;
  padding: 0.3rem 0.75rem;
  border-radius: 2rem;
  letter-spacing: 0.05em;
}
.badge-soon { background: var(--green); }
.badge-soldout { background: var(--text-muted); }

.status-note {
  margin-top: 1rem;
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.6;
}
.status-note a {
  color: var(--green);
  text-decoration: underline;
}

/* ── Order Section ── */
#order {
  padding: 5rem 0;
  background: var(--bg);
}

.order-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  gap: 1.75rem;
}

.order-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 1.25rem;
  overflow: hidden;
  text-align: center;
  box-shadow: var(--shadow);
}

.order-card-header {
  padding: 2rem 2rem 1.75rem;
}

.order-header-mango {
  background: #FDE9C8;
}

.order-header-dried {
  background: #E6F2EA;
}

.order-card-body {
  padding: 1.75rem 2rem 2rem;
}

.order-icon {
  font-size: 2.75rem;
  line-height: 1;
  margin-bottom: 0.75rem;
}

.order-card h3 {
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 0.3rem;
  color: var(--text);
}

.order-sub {
  color: var(--text-muted);
  font-size: 0.88rem;
  margin-bottom: 0;
}

.order-steps {
  list-style: none;
  counter-reset: step;
  text-align: left;
  margin-bottom: 1.75rem;
}

.order-steps li {
  counter-increment: step;
  padding: 0.45rem 0 0.45rem 2.4rem;
  position: relative;
  font-size: 0.9rem;
  color: var(--text);
  border-bottom: 1px solid var(--bg);
}

.order-steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  background: var(--orange-dark);
  color: #fff;
  width: 1.6rem;
  height: 1.6rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
}

/* ── Footer ── */
footer {
  background: var(--text);
  color: rgba(255,255,255,0.75);
  text-align: center;
  padding: 3.5rem 1rem 3rem;
}

.footer-deco {
  font-size: 1.4rem;
  letter-spacing: 0.6rem;
  margin-bottom: 1.25rem;
  opacity: 0.85;
}

footer .farm-name {
  font-size: 1.1rem;
  font-weight: 700;
  color: rgba(255,255,255,0.95);
  margin-bottom: 0.4rem;
  letter-spacing: 0.12em;
}

.footer-tagline {
  color: rgba(255,255,255,0.55);
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  margin-bottom: 1.75rem;
}

.footer-links {
  margin-bottom: 1.5rem;
}
.footer-links a {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--orange-light);
  text-decoration: underline;
  font-weight: 500;
  font-size: 0.95rem;
}
.footer-links a:hover { text-decoration: none; }
.fb-icon {
  width: 1.1em;
  height: 1.1em;
  flex-shrink: 0;
}
.footer-sep {
  color: rgba(255,255,255,0.55);
  margin: 0 0.4rem;
}

.copyright {
  font-size: 0.78rem;
  color: rgba(255,255,255,0.55);
  margin-top: 0;
}

.last-updated {
  font-size: 0.72rem;
  color: rgba(255,255,255,0.55);
  margin-top: 0.3rem;
}

/* ── Back to Top ── */
.back-to-top {
  position: fixed;
  right: 1.5rem;
  bottom: 2rem;
  width: 3rem;
  height: 3rem;
  background: var(--text);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  text-decoration: none;
  box-shadow: var(--shadow);
  z-index: 50;
  transition: background 0.2s, transform 0.15s;
}
.back-to-top:hover {
  background: #5a3e2b;
  transform: translateY(-2px);
}

/* ── Responsive ── */
@media (max-width: 600px) {
  #hero { min-height: 70vh; }

  .product-grid,
  .order-grid { grid-template-columns: 1fr; }

  .order-card { padding: 1.75rem 1.25rem; }

  .price-table { font-size: 0.82rem; }
}
