:root {
  --color-primary: #2d6a4f;
  --color-primary-dark: #1b4332;
  --color-primary-light: #40916c;
  --color-accent: #95d5b2;
  --color-bg: #f8faf8;
  --color-bg-alt: #edf4ef;
  --color-text: #1a2e1f;
  --color-text-muted: #5c6b5f;
  --color-white: #ffffff;
  --color-border: #d8e6dc;
  --shadow-sm: 0 1px 3px rgba(27, 67, 50, 0.08);
  --shadow-md: 0 8px 24px rgba(27, 67, 50, 0.12);
  --shadow-lg: 0 16px 48px rgba(27, 67, 50, 0.16);
  --radius: 12px;
  --radius-lg: 20px;
  --header-h: 56px;
  --font: "Noto Sans SC", system-ui, -apple-system, sans-serif;
  --max-w: 1140px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-top: env(safe-area-inset-top, 0px);
}

@media (min-width: 768px) {
  :root {
    --header-h: 72px;
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + var(--safe-top) + 0.5rem);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.7;
  color: var(--color-text);
  background: var(--color-bg);
  overflow-x: hidden;
}

body.nav-open {
  overflow: hidden;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color 0.2s;
}

a:hover {
  color: var(--color-primary-dark);
}

.container {
  width: min(100% - 2.5rem, var(--max-w));
  margin-inline: auto;
}

@media (min-width: 768px) {
  .container {
    width: min(100% - 2rem, var(--max-w));
  }
}

/* Header */
.header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 100;
  height: calc(var(--header-h) + var(--safe-top));
  padding-top: var(--safe-top);
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--color-border);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(100% - 1.25rem, var(--max-w));
  height: var(--header-h);
  margin-inline: auto;
}

@media (min-width: 768px) {
  .nav-inner {
    width: min(100% - 2rem, var(--max-w));
  }
}

.logo {
  display: flex;
  align-items: center;
  font-weight: 700;
  font-size: clamp(0.8rem, 2.2vw, 1.05rem);
  color: var(--color-primary-dark);
  line-height: 1.35;
  flex-shrink: 1;
  min-width: 0;
}

.logo-text {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 0.8125rem;
  letter-spacing: -0.01em;
}

@media (min-width: 768px) {
  .logo-text {
    font-size: inherit;
    -webkit-line-clamp: 1;
    white-space: nowrap;
    display: block;
    overflow: visible;
  }
}

.logo:hover {
  color: var(--color-primary);
}

.nav {
  display: flex;
  gap: 2rem;
}

.nav a {
  font-weight: 500;
  color: var(--color-text);
  font-size: 0.95rem;
}

.nav a:hover {
  color: var(--color-primary);
}

.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin-right: -0.5rem;
  padding: 0;
  border: none;
  border-radius: 10px;
  background: var(--color-bg-alt);
  color: var(--color-primary-dark);
  cursor: pointer;
  flex-shrink: 0;
  -webkit-tap-highlight-color: transparent;
}

.nav-toggle:active {
  background: var(--color-border);
}

/* Hero */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: calc(var(--header-h) + 3rem) 0 4rem;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(135deg, rgba(27, 67, 50, 0.88) 0%, rgba(45, 106, 79, 0.75) 50%, rgba(64, 145, 108, 0.65) 100%),
    url("https://images.unsplash.com/photo-1500382017468-9049fed747ef?w=1920&q=80") center / cover no-repeat;
  z-index: -1;
}

.hero-content {
  color: var(--color-white);
}

.hero-tag {
  display: inline-block;
  margin: 0 0 1rem;
  padding: 0.35rem 0.9rem;
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.25);
}

.hero h1 {
  margin: 0 0 1rem;
  font-size: clamp(1.5rem, 6.5vw, 2.75rem);
  font-weight: 700;
  line-height: 1.3;
  max-width: none;
}

.hero-desc {
  margin: 0 0 2rem;
  font-size: 1.05rem;
  max-width: 42ch;
  opacity: 0.92;
  line-height: 1.8;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 3rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: 999px;
  border: 2px solid transparent;
  transition: transform 0.2s, background 0.2s, border-color 0.2s;
}

@media (hover: hover) {
  .btn:hover {
    transform: translateY(-2px);
  }

  .business-card:hover,
  .product-card:hover {
    transform: translateY(-4px);
  }
}

.btn-primary {
  background: var(--color-white);
  color: var(--color-primary-dark);
}

.btn-primary:hover {
  background: var(--color-accent);
  color: var(--color-primary-dark);
}

.btn-outline {
  border-color: rgba(255, 255, 255, 0.6);
  color: var(--color-white);
}

.btn-outline:hover {
  background: rgba(255, 255, 255, 0.12);
  color: var(--color-white);
}

.hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 2.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.hero-stats li {
  display: flex;
  flex-direction: column;
}

.hero-stats strong {
  font-size: 1.5rem;
  font-weight: 700;
}

.hero-stats span {
  font-size: 0.85rem;
  opacity: 0.8;
}

/* Sections */
.section {
  padding: 5rem 0;
}

.section-alt {
  background: var(--color-bg-alt);
}

.section-header {
  text-align: center;
  margin-bottom: 3rem;
}

.section-header h2 {
  margin: 0 0 0.5rem;
  font-size: clamp(1.5rem, 3vw, 2rem);
  color: var(--color-primary-dark);
}

.section-header p {
  margin: 0;
  color: var(--color-text-muted);
}

/* About */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}

.about-text p {
  margin: 0 0 1rem;
  color: var(--color-text-muted);
}

.about-facts {
  margin: 1.5rem 0 0;
  padding: 0;
  list-style: none;
}

.about-facts li {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.6rem;
  font-size: 0.95rem;
  color: var(--color-text);
}

.about-facts svg {
  width: 18px;
  height: 18px;
  color: var(--color-primary);
  flex-shrink: 0;
}

.about-card {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.about-card img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

/* Business */
.business-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.business-card {
  padding: 1.75rem;
  background: var(--color-white);
  border-radius: var(--radius);
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s, box-shadow 0.2s;
}

@media (hover: hover) {
  .business-card:hover {
    box-shadow: var(--shadow-md);
  }
}

.business-card svg {
  width: 32px;
  height: 32px;
  color: var(--color-primary);
  margin-bottom: 1rem;
}

.business-card h3 {
  margin: 0 0 0.5rem;
  font-size: 1.1rem;
  color: var(--color-primary-dark);
}

.business-card p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--color-text-muted);
  line-height: 1.6;
}

/* Products */
.product-filters {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 2rem;
}

.filter-btn {
  padding: 0.45rem 1rem;
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-text-muted);
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.2s;
}

.filter-btn:hover,
.filter-btn.active {
  color: var(--color-white);
  background: var(--color-primary);
  border-color: var(--color-primary);
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1.5rem;
}

.product-card {
  display: flex;
  flex-direction: column;
  background: var(--color-white);
  border-radius: var(--radius);
  border: 1px solid var(--color-border);
  overflow: hidden;
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  padding: 0;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s, box-shadow 0.2s;
}

.product-card:active {
  transform: scale(0.98);
}

@media (hover: hover) {
  .product-card:hover {
    box-shadow: var(--shadow-md);
  }
}

.product-card-image {
  aspect-ratio: 1;
  object-fit: contain;
  background: #f5f9f6;
  padding: 0.75rem;
}

.product-card-body {
  padding: 1rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.product-card-category {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--color-primary-light);
  text-transform: none;
}

.product-card-title {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-primary-dark);
}

.product-card-excerpt {
  margin: 0;
  font-size: 0.8rem;
  color: var(--color-text-muted);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 2.5rem 1rem;
  color: var(--color-text-muted);
  font-size: 0.95rem;
}

/* Contact */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: start;
}

.contact-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.contact-list li {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.contact-list svg {
  width: 24px;
  height: 24px;
  color: var(--color-primary);
  flex-shrink: 0;
  margin-top: 0.2rem;
}

.contact-list strong {
  display: block;
  margin-bottom: 0.25rem;
  color: var(--color-primary-dark);
}

.contact-list span,
.contact-list a {
  font-size: 0.95rem;
  color: var(--color-text-muted);
}

.contact-map {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.contact-map iframe {
  width: 100%;
  height: 100%;
  min-height: 280px;
  border: 0;
  border-radius: var(--radius-lg);
}

.contact-map-link {
  display: inline-block;
  margin-top: 0.35rem;
  font-size: 0.875rem;
}

.footer-sub a {
  color: rgba(255, 255, 255, 0.65);
}

.footer-sub a:hover {
  color: var(--color-white);
}

/* Footer */
.footer {
  padding: 2rem 0;
  background: var(--color-primary-dark);
  color: rgba(255, 255, 255, 0.85);
  text-align: center;
}

.footer-inner p {
  margin: 0.25rem 0;
  font-size: 0.9rem;
}

.footer-sub {
  font-size: 0.8rem !important;
  opacity: 0.65;
}

/* Modal */
.modal {
  padding: 0;
  border: none;
  background: transparent;
  max-width: none;
  max-height: none;
  width: 100%;
  height: 100%;
}

.modal::backdrop {
  background: rgba(26, 46, 31, 0.55);
  backdrop-filter: blur(4px);
}

.modal-box {
  position: relative;
  width: min(92vw, 720px);
  max-height: 90vh;
  margin: 5vh auto;
  background: var(--color-white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

.modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: var(--color-white);
  color: var(--color-text);
  cursor: pointer;
  box-shadow: var(--shadow-sm);
}

.modal-close:hover {
  background: var(--color-bg-alt);
}

.modal-body {
  display: grid;
  grid-template-columns: 240px 1fr;
  max-height: 90vh;
  overflow: auto;
}

.modal-image {
  width: 100%;
  height: 100%;
  min-height: 200px;
  object-fit: contain;
  background: var(--color-bg-alt);
  padding: 1rem;
}

.modal-content {
  padding: 2rem 2rem 2rem 1.5rem;
}

.modal-category {
  display: inline-block;
  margin-bottom: 0.5rem;
  padding: 0.2rem 0.6rem;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--color-primary);
  background: var(--color-bg-alt);
  border-radius: 4px;
}

.modal-content h3 {
  margin: 0 0 1rem;
  font-size: 1.35rem;
  color: var(--color-primary-dark);
}

.modal-detail {
  font-size: 0.9rem;
  color: var(--color-text-muted);
  line-height: 1.75;
}

.modal-detail br {
  display: block;
  content: "";
  margin-top: 0.5rem;
}

/* Responsive — tablet */
@media (max-width: 900px) {
  .about-grid,
  .contact-grid {
    grid-template-columns: 1fr;
  }

  .business-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .modal-body {
    grid-template-columns: 1fr;
  }

  .modal-image {
    max-height: 240px;
  }
}

/* Responsive — H5 mobile */
@media (max-width: 768px) {
  .section {
    padding: 3rem 0;
  }

  .section-header {
    margin-bottom: 2rem;
  }

  .section-header p {
    font-size: 0.9rem;
  }

  .hero {
    min-height: auto;
    padding: calc(var(--header-h) + var(--safe-top) + 2rem) 0 2.5rem;
  }

  .hero-desc {
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
    line-height: 1.75;
  }

  .hero-actions {
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 2rem;
  }

  .hero-actions .btn {
    width: 100%;
    min-height: 48px;
    padding: 0.875rem 1.25rem;
  }

  .hero-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.12);
    border-radius: var(--radius);
    border: 1px solid rgba(255, 255, 255, 0.2);
  }

  .hero-stats li {
    text-align: center;
    padding: 0.25rem;
  }

  .hero-stats strong {
    font-size: 1.25rem;
  }

  .hero-stats span {
    font-size: 0.75rem;
  }

  .about-grid {
    gap: 1.5rem;
  }

  .about-card {
    order: -1;
  }

  .about-text p {
    font-size: 0.9375rem;
    text-align: justify;
  }

  .about-facts {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 1.25rem;
  }

  .about-facts li {
    align-items: flex-start;
    margin-bottom: 0;
    padding: 0.75rem 1rem;
    background: var(--color-white);
    border-radius: var(--radius);
    border: 1px solid var(--color-border);
    font-size: 0.875rem;
    line-height: 1.5;
  }

  .business-grid {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }

  .business-card {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    padding: 1.25rem;
  }

  .business-card svg {
    margin-bottom: 0;
    flex-shrink: 0;
  }

  .business-card h3 {
    font-size: 1rem;
  }

  .business-card p {
    font-size: 0.875rem;
  }

  .product-filters {
    flex-wrap: nowrap;
    justify-content: flex-start;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    margin: 0 -0.25rem 1.5rem;
    padding: 0.25rem 0.25rem 0.75rem;
    mask-image: linear-gradient(90deg, transparent, #000 8px, #000 calc(100% - 24px), transparent);
  }

  .product-filters::-webkit-scrollbar {
    display: none;
  }

  .filter-btn {
    flex-shrink: 0;
    min-height: 40px;
    padding: 0.5rem 1.125rem;
    font-size: 0.8125rem;
  }

  .product-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
  }

  .product-card-body {
    padding: 0.75rem;
  }

  .product-card-title {
    font-size: 0.9rem;
  }

  .product-card-excerpt {
    font-size: 0.75rem;
    -webkit-line-clamp: 1;
  }

  .contact-list li {
    padding: 1rem;
    margin-bottom: 0.75rem;
    background: var(--color-white);
    border-radius: var(--radius);
    border: 1px solid var(--color-border);
  }

  .contact-list li:last-child {
    margin-bottom: 0;
  }

  .contact-list a[href^="tel:"] {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--color-primary);
  }

  .contact-map iframe {
    min-height: 220px;
  }

  .footer {
    padding: 1.5rem 0 calc(1.5rem + var(--safe-bottom));
  }

  .footer-inner p {
    font-size: 0.8125rem;
    line-height: 1.6;
  }

  .modal-box {
    width: 100%;
    max-height: min(92vh, 92dvh);
    margin: auto 0 0;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  }

  .modal-body {
    max-height: min(85vh, 85dvh);
    -webkit-overflow-scrolling: touch;
  }

  .modal-content {
    padding: 1.25rem 1.25rem calc(1.25rem + var(--safe-bottom));
  }

  .modal-content h3 {
    font-size: 1.15rem;
    padding-right: 2rem;
  }

  .modal-detail {
    font-size: 0.875rem;
  }

  .modal-close {
    top: 0.75rem;
    right: 0.75rem;
    width: 44px;
    height: 44px;
  }
}

@media (max-width: 640px) {
  .nav-toggle {
    display: flex;
  }

  .nav {
    position: fixed;
    top: calc(var(--header-h) + var(--safe-top));
    left: 0;
    right: 0;
    bottom: 0;
    flex-direction: column;
    gap: 0;
    padding: 0.5rem 1.25rem 1.5rem;
    background: var(--color-white);
    border-bottom: 1px solid var(--color-border);
    box-shadow: var(--shadow-lg);
    transform: translateX(100%);
    opacity: 1;
    pointer-events: none;
    transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .nav.is-open {
    transform: translateX(0);
    pointer-events: auto;
  }

  .nav a {
    display: flex;
    align-items: center;
    min-height: 52px;
    padding: 0.875rem 0;
    font-size: 1rem;
    border-bottom: 1px solid var(--color-border);
    -webkit-tap-highlight-color: transparent;
  }

  .nav a:active {
    color: var(--color-primary);
  }

  .nav a:last-child {
    border-bottom: none;
  }
}

/* Nav backdrop overlay */
.nav-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 99;
  background: rgba(26, 46, 31, 0.4);
  border: none;
  padding: 0;
  cursor: pointer;
}

@media (max-width: 640px) {
  .nav-backdrop.is-visible {
    display: block;
  }
}
