:root {
  --bg-main: #f8faf8;
  --bg-card: #ffffff;
  --bg-accent: #eef4f0;
  --bg-dark: #121915;
  --bg-dark-card: #1c2520;
  --text-main: #243029;
  --text-muted: #5e7265;
  --text-light: #9eb1a4;
  --primary: #2d5a41;
  --primary-hover: #224531;
  --accent: #d8e8dd;
  --border: #e1e8e3;
  --border-dark: #2a3830;
  --error: #b83a3a;
  --success: #2d7a48;
  --radius: 12px;
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.06);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  background: var(--bg-main);
  color: var(--text-main);
  font-family: var(--font);
  line-height: 1.6;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.container { max-width: 1080px; margin: 0 auto; padding: 0 24px; width: 100%; }

/* Header & Nav */
header {
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}
.header-inner { display: flex; justify-content: space-between; align-items: center; height: 70px; }
.logo { font-size: 1.3rem; font-weight: 700; color: var(--primary); text-decoration: none; letter-spacing: -0.02em; }

nav ul { display: flex; list-style: none; gap: 28px; }
nav a { color: var(--text-main); text-decoration: none; font-weight: 500; font-size: 0.95rem; transition: color 0.2s; }
nav a:hover { color: var(--primary); }

main { flex: 1; padding-bottom: 80px; }

/* Hero */
.hero { padding: 48px 0 28px; text-align: center; }
.hero h1 { font-size: 2.5rem; color: var(--primary); margin-bottom: 12px; font-weight: 700; letter-spacing: -0.02em; }
.hero p { color: var(--text-muted); max-width: 600px; margin: 0 auto; font-size: 1.05rem; }

/* Section Titles & Dividers */
.section-title {
  font-size: 1.4rem;
  margin: 40px 0 20px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
  color: var(--primary);
  font-weight: 600;
}

/* Visual Image / Banner Divider */
.catalog-divider {
  margin: 48px 0;
  border-radius: var(--radius);
  background: linear-gradient(135deg, #2d5a41 0%, #1c3829 100%);
  color: #ffffff;
  padding: 36px 32px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  box-shadow: var(--shadow-sm);
}
@media (max-width: 768px) {
  .catalog-divider { flex-direction: column; text-align: center; padding: 28px 20px; }
}

.divider-text h3 { font-size: 1.3rem; margin-bottom: 8px; color: #ffffff; }
.divider-text p { font-size: 0.95rem; color: var(--accent); max-width: 500px; }
.divider-icon { font-size: 3.5rem; flex-shrink: 0; }

/* Category Preference Filter Pills */
.preference-filters {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}

.filter-btn {
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-muted);
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 0.88rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

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

/* Feature Grid Section */
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin: 32px 0 48px;
}
@media (max-width: 768px) { .features-grid { grid-template-columns: 1fr; } }

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  display: flex;
  gap: 16px;
  align-items: flex-start;
}
.feature-icon {
  background: var(--bg-accent);
  color: var(--primary);
  font-size: 1.5rem;
  width: 48px;
  height: 48px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.feature-body h4 { font-size: 1rem; color: var(--primary); margin-bottom: 4px; font-weight: 600; }
.feature-body p { font-size: 0.88rem; color: var(--text-muted); line-height: 1.45; }

/* Grid Layouts & Cards */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 24px; }

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s, box-shadow 0.2s;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.card-icon { background: var(--bg-accent); padding: 32px; text-align: center; font-size: 3.2rem; }
.card-body { padding: 22px; display: flex; flex-direction: column; flex-grow: 1; }
.card-title { font-size: 1.2rem; margin-bottom: 6px; font-weight: 600; }
.card-price { font-weight: 700; color: var(--primary); margin-bottom: 10px; font-size: 1.1rem; }
.card-text { color: var(--text-muted); font-size: 0.92rem; margin-bottom: 18px; flex-grow: 1; line-height: 1.5; }

/* Badges */
.badge-list { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.badge { background: var(--bg-accent); color: var(--primary); font-size: 0.75rem; font-weight: 600; padding: 4px 10px; border-radius: 20px; }

/* Buttons & Inputs */
.btn {
  display: inline-block;
  text-align: center;
  background: var(--primary);
  color: #fff;
  text-decoration: none;
  padding: 10px 18px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.92rem;
  border: none;
  cursor: pointer;
  transition: background 0.2s;
}
.btn:hover { background: var(--primary-hover); }

/* Forms & Product View */
.product-detail { display: grid; grid-template-columns: 1fr 1fr; gap: 36px; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 32px; margin-top: 24px; box-shadow: var(--shadow-sm); }
@media (max-width: 768px) { .product-detail { grid-template-columns: 1fr; padding: 20px; } }

.order-box { background: var(--bg-main); border: 1px solid var(--border); padding: 22px; border-radius: var(--radius); }
.form-group { margin-bottom: 14px; }
.form-group label { display: block; font-size: 0.82rem; font-weight: 600; color: var(--text-muted); margin-bottom: 6px; text-transform: uppercase; letter-spacing: 0.03em; }
.form-control { width: 100%; padding: 10px 12px; border: 1px solid var(--border); border-radius: 6px; font-size: 0.92rem; outline: none; background: #fff; }
.form-control:focus { border-color: var(--primary); }
.hp-field { display: none !important; }

.captcha-row { display: flex; align-items: center; gap: 12px; }
.captcha-q { background: var(--bg-accent); color: var(--primary); padding: 8px 14px; border-radius: 6px; font-weight: 700; font-size: 0.9rem; border: 1px solid var(--border); }

.form-notice { margin-top: 12px; padding: 12px; border-radius: 6px; font-size: 0.88rem; display: none; }
.form-notice.success { display: block; background: #e8f5ed; color: var(--success); border: 1px solid #bce3cb; }
.form-notice.error { display: block; background: #fdf0f0; color: var(--error); border: 1px solid #f7c5c5; }

/* Pagination */
.pagination { display: flex; justify-content: center; gap: 8px; margin-top: 36px; }
.pagination a { display: inline-block; padding: 8px 16px; border: 1px solid var(--border); background: var(--bg-card); color: var(--text-main); text-decoration: none; border-radius: 6px; font-size: 0.9rem; font-weight: 500; }
.pagination a.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.pagination a:hover:not(.active) { background: var(--bg-accent); }

/* Sophisticated Footer */
footer {
  background: var(--bg-dark);
  color: var(--text-light);
  padding: 64px 0 32px;
  margin-top: auto;
  border-top: 4px solid var(--primary);
}

.footer-top {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 48px;
  border-bottom: 1px solid var(--border-dark);
}

@media (max-width: 900px) {
  .footer-top { grid-template-columns: 1fr 1fr; gap: 32px; }
}
@media (max-width: 600px) {
  .footer-top { grid-template-columns: 1fr; gap: 32px; }
}

.footer-brand h3 { color: #ffffff; font-size: 1.35rem; font-weight: 700; margin-bottom: 12px; letter-spacing: -0.02em; }
.footer-brand p { font-size: 0.92rem; line-height: 1.6; color: var(--text-light); max-width: 320px; }

.footer-col h4 { color: #ffffff; font-size: 0.85rem; margin-bottom: 18px; text-transform: uppercase; letter-spacing: 0.08em; font-weight: 600; }
.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: 10px; }
.footer-col ul a { color: var(--text-light); text-decoration: none; font-size: 0.9rem; transition: color 0.2s; }
.footer-col ul a:hover { color: #ffffff; }

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 28px;
  font-size: 0.85rem;
  color: #6a7f72;
}

@media (max-width: 600px) {
  .footer-bottom { flex-direction: column; gap: 12px; text-align: center; }
}
/* --- Base Header Layout --- */
.header {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border, #e1e8e3);
  position: sticky;
  top: 0;
  z-index: 1000;
  height: 70px; /* Fixed height prevents layout shift */
}

.header-container {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px;
  height: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
}

.logo {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--primary, #2d5a41);
  text-decoration: none;
  letter-spacing: -0.02em;
}

/* Hide Checkbox Toggle Input completely */
.menu-toggle {
  display: none;
}

/* --- Desktop Navigation --- */
.nav-menu ul {
  display: flex;
  list-style: none;
  gap: 28px;
  margin: 0;
  padding: 0;
}

.nav-menu a {
  color: var(--text-main, #243029);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  transition: color 0.2s ease;
}

.nav-menu a:hover {
  color: var(--primary, #2d5a41);
}

/* Hamburger Icon (Hidden on Desktop) */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 26px;
  height: 20px;
  cursor: pointer;
  z-index: 1001;
}

.hamburger .bar {
  display: block;
  width: 100%;
  height: 2.5px;
  background-color: var(--primary, #2d5a41);
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

/* --- Mobile Responsive Menu (768px and under) --- */
@media (max-width: 768px) {
  .hamburger {
    display: flex; /* Show Hamburger on Mobile */
  }

  .nav-menu {
    position: absolute;
    top: 70px; /* Aligns right beneath the sticky header */
    left: 0;
    width: 100%;
    background: #ffffff;
    border-bottom: 1px solid var(--border, #e1e8e3);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
    
    /* Smooth CSS slide-down animation */
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s cubic-bezier(0.4, 0, 0.2, 1), padding 0.35s ease;
    padding: 0 24px;
  }

  .nav-menu ul {
    flex-direction: column;
    gap: 0;
  }

  .nav-menu li {
    border-bottom: 1px solid var(--border, #f0f4f1);
  }

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

  .nav-menu a {
    display: block;
    padding: 16px 0;
    font-size: 1.05rem;
  }

  /* --- CSS-Only Open State (When Checkbox is Checked) --- */
  .menu-toggle:checked ~ .nav-menu {
    max-height: 320px; /* Height allowance for menu list */
    padding: 8px 24px 16px;
  }

  /* Morph Hamburger icon to 'X' when open */
  .menu-toggle:checked ~ .hamburger .bar:nth-child(1) {
    transform: translateY(8.5px) rotate(45deg);
  }

  .menu-toggle:checked ~ .hamburger .bar:nth-child(2) {
    opacity: 0;
  }

  .menu-toggle:checked ~ .hamburger .bar:nth-child(3) {
    transform: translateY(-8.5px) rotate(-45deg);
  }
}