/* ── Top Header ──────────────────────────────────────────────── */
/* ── Search ──────────────────────────────────────────────────── */
.site-search {
  display: flex;
  align-items: center;

  min-width: 250px;
  height: 38px;

  background: #ffffff;
  border: 1px solid rgba(207, 227, 196, 0.9);
  border-radius: 999px;
  overflow: hidden;

  box-shadow: 0 8px 20px rgba(18, 72, 38, 0.07);
}

.site-search__label {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.site-search input {
  width: 100%;
  min-width: 0;

  border: 0;
  outline: 0;
  padding: 8px 14px;

  color: #24442c;
  font-size: 0.84rem;
  font-weight: 500;
  background: transparent;
}

.site-search input::placeholder {
  color: #7c927c;
}

.site-search button {
  width: 42px;
  height: 38px;

  display: flex;
  align-items: center;
  justify-content: center;

  border: 0;
  border-left: 1px solid #dcebd5;
  color: #145c30;
  background: #f3fbef;
  cursor: pointer;

  transition:
    background 0.18s ease,
    color 0.18s ease;
}

.site-search button:hover {
  background: #dff3d7;
  color: #0d3d20;
}

.site-search button .material-icons {
  font-size: 1.15rem;
}

.site-search--mobile {
  display: none;
  margin: 14px 18px 10px;
  min-width: auto;
}

.site-search--desktop {
  flex: 0 1 540px;
  max-width: 540px;
  margin-inline: auto;
  border-radius: 0;
}

/* ── Phone Form ──────────────────────────────────────────────── */
/* ── Header Shell ────────────────────────────────────────────── */
header {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1000;

  width: 100%;

  background: #ffffff;

  box-shadow: 0 4px 24px rgba(13, 61, 32, 0.08);
  transition: box-shadow 0.25s ease;
}

header .sidebar {
  position: static;
  top: auto;
  width: 100%;
  min-height: 0;
  max-height: none;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 max(16px, calc((100vw - 1400px) / 2 + 24px));
  overflow-x: auto;
  overflow-y: hidden;
  background: #f4faf6;
  border-right: 0;
  border-bottom: 1px solid #dfeae3;
  box-shadow: none;
  z-index: 1;
}

header .sidebar h2 {
  position: sticky;
  left: 0;
  z-index: 2;
  min-height: 42px;
  margin: 0;
  padding: 0 16px 0 0;
  background: #f4faf6;
  border-right: 1px solid #dfeae3;
  border-bottom: 0;
  white-space: nowrap;
}

header .sidebar .main_cat_group {
  flex: 0 0 auto;
}

header .sidebar .main_cat_row {
  border-bottom: 0;
  border-radius: 8px;
}

header .sidebar .main_cat_link {
  min-height: 34px;
  padding: 0 12px;
  font-size: 0.82rem;
  white-space: nowrap;
}

header.scrolled {
  box-shadow: 0 8px 30px rgba(13, 61, 32, 0.13);
}

/* ── Nav Container ───────────────────────────────────────────── */
.nav-container {
  max-width: 1320px;
  margin: 0 auto;

  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;

  min-height: 72px;
  padding: 8px 28px;
}

/* ── Logo ────────────────────────────────────────────────────── */
.logo {
  display: flex;
  align-items: center;
  gap: 11px;
  text-decoration: none;
  flex-shrink: 0;
}

.logo img {
  width: 56px;
  height: 56px;

  border-radius: 50%;
  object-fit: cover;

  border: 2px solid #e3f3e7;
  box-shadow: 0 8px 20px rgba(20, 92, 48, 0.16);
}

.logo h3 {
  margin: 0;

  font-family: var(--font-display, "Sora", sans-serif);
  font-size: 1.34rem;
  font-weight: 800;
  line-height: 1.15;

  color: #176b3a;
  letter-spacing: 0;
}

/* ── Desktop Navigation ──────────────────────────────────────── */
.desktop-menu {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;

  width: 100%;
  min-height: 40px;
  padding: 0 22px;
  background: linear-gradient(180deg, #ecfaf3 0%, #dff6eb 100%);
  border-top: 1px solid #cfe8da;
  border-bottom: 1px solid #c2e1d2;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.desktop-menu > a,
.shop-menu__button {
  position: relative;

  min-height: 40px;
  padding: 0 11px;

  color: #245f4f;
  border-radius: 8px;

  font-size: 0.85rem;
  font-weight: 800;
  text-decoration: none;
  letter-spacing: 0.01em;

  display: inline-flex;
  align-items: center;
  gap: 4px;
  border: 0;
  background: transparent;
  cursor: pointer;

  transition:
    color 0.18s ease,
    background 0.18s ease,
    transform 0.18s ease;
}

.desktop-menu > a::after,
.shop-menu__button::after {
  content: "";
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 5px;

  height: 2px;
  border-radius: 999px;
  background: #22a355;

  transform: scaleX(0);
  transform-origin: center;
  transition: transform 0.24s ease;
}

.desktop-menu > a:hover,
.desktop-menu > a.active-link,
.shop-menu:hover .shop-menu__button,
.shop-menu:focus-within .shop-menu__button {
  color: #18352a;
  background: #ffffff;
  transform: none;
  box-shadow: 0 8px 18px rgba(47, 133, 104, 0.12);
}

.desktop-menu > a:hover::after,
.desktop-menu > a.active-link::after,
.shop-menu:hover .shop-menu__button::after,
.shop-menu:focus-within .shop-menu__button::after {
  transform: scaleX(1);
}

.shop-menu {
  position: relative;
}

.shop-menu__button .material-icons {
  font-size: 1rem;
  line-height: 1;
  transition: transform 0.18s ease;
}

.shop-menu:hover .shop-menu__button .material-icons,
.shop-menu:focus-within .shop-menu__button .material-icons {
  transform: rotate(180deg);
}

.shop-menu__dropdown,
.shop-menu__subcategories {
  position: absolute;
  z-index: 1200;
  min-width: 230px;
  padding: 8px;
  background: #ffffff;
  border: 1px solid #dcebd5;
  border-radius: 8px;
  box-shadow: 0 22px 48px rgba(18, 72, 38, 0.16);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(8px);
  transition:
    opacity 0.18s ease,
    visibility 0.18s ease,
    transform 0.18s ease;
}

.shop-menu__dropdown {
  top: 100%;
  left: 0;
  max-height: min(70vh, 520px);
  overflow: visible;
}

.header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex: 0 0 auto;
}

.header-actions a {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  padding: 0 11px;

  color: #245f4f;
  border-radius: 8px;
  font-size: 0.88rem;
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
  transition:
    color 0.18s ease,
    background 0.18s ease,
    box-shadow 0.18s ease;
}

.header-actions a:hover {
  color: #18352a;
  background: #e9f9f2;
  box-shadow: 0 8px 18px rgba(47, 133, 104, 0.1);
}

.shop-menu:hover .shop-menu__dropdown,
.shop-menu:focus-within .shop-menu__dropdown {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
}

.shop-menu__category {
  position: relative;
}

.shop-menu__category-link,
.shop-menu__subcategories a,
.shop-menu__subcategories span,
.shop-menu__empty {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 40px;
  width: 100%;
  padding: 9px 12px;
  color: #24442c;
  border-radius: 8px;
  font-size: 0.84rem;
  font-weight: 700;
  line-height: 1.25;
  text-decoration: none;
  white-space: nowrap;
}

.shop-menu__category-link::after,
.shop-menu__subcategories a::after {
  display: none;
}

.shop-menu__category-link .material-icons {
  font-size: 1rem;
  color: #79a96b;
}

.shop-menu__category-link:hover,
.shop-menu__category:focus-within .shop-menu__category-link,
.shop-menu__subcategories a:hover,
.shop-menu__subcategories a:focus-visible {
  color: #145c30;
  background: #f0fdf6;
}

.shop-menu__subcategories {
  top: -8px;
  left: calc(100% + 8px);
  max-height: min(62vh, 440px);
  overflow-y: auto;
  transform: translateX(-6px);
}

.shop-menu__category:hover .shop-menu__subcategories,
.shop-menu__category:focus-within .shop-menu__subcategories {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateX(0);
}

/* ── Hamburger ───────────────────────────────────────────────── */
.hamburger {
  display: none;

  width: 42px;
  height: 42px;
  padding: 10px;

  flex-direction: column;
  justify-content: center;
  gap: 5px;

  border: 1px solid #d9eadc;
  border-radius: 12px;
  background: #f6fbf7;

  cursor: pointer;
  z-index: 1001;
}

.hamburger span {
  display: block;
  width: 100%;
  height: 2.5px;

  background-color: #145c30;
  border-radius: 999px;

  transition:
    transform 0.25s ease,
    opacity 0.25s ease;
}

.hamburger:hover {
  background: #eef8f1;
}

/* ================================================================
   Mobile Side Menu
   ================================================================ */

.side-menu {
  position: fixed;
  top: 0;
  right: -340px;
  z-index: 1100;

  width: min(320px, 86vw);
  height: 100%;

  background: #ffffff;
  border-left: 1px solid #e5f0e0;
  box-shadow: -12px 0 45px rgba(0, 0, 0, 0.16);

  overflow-y: auto;
  transition: right 0.32s ease;
}

.side-menu.open {
  right: 0;
}

/* ── Drawer Header ───────────────────────────────────────────── */
.side-menu-header {
  position: sticky;
  top: 0;
  z-index: 2;

  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;

  padding: 18px 22px;

  background:
    linear-gradient(135deg, #f4faf0 0%, #eaf7e5 100%);
  border-bottom: 1px solid #d4e9c8;
}

.side-menu-brand {
  font-family: var(--font-display, "Sora", sans-serif);
  font-size: 1.05rem;
  font-weight: 800;
  color: #145c30;
  letter-spacing: -0.02em;
}

.close-btn {
  width: 38px;
  height: 38px;

  display: flex;
  align-items: center;
  justify-content: center;

  border: 1px solid #b8d9a5;
  border-radius: 12px;

  color: #2e7d1c;
  font-size: 1rem;

  cursor: pointer;
  background: #ffffff;

  transition:
    background 0.18s ease,
    color 0.18s ease,
    border-color 0.18s ease,
    transform 0.18s ease;
}

.close-btn:hover {
  background: #e8f5e1;
  color: #1a5c0a;
  border-color: #7ec860;
  transform: rotate(90deg);
}

/* ── Mobile Nav Links ────────────────────────────────────────── */
.mobile-menu {
  display: flex;
  flex-direction: column;
  padding: 10px 0 0;
}

.mobile-menu a {
  display: flex;
  align-items: center;
  gap: 12px;

  padding: 14px 24px;

  font-size: 0.92rem;
  font-weight: 700;
  color: #255f18;

  border-bottom: 1px solid #edf6e8;
  text-decoration: none;

  transition:
    background 0.18s ease,
    color 0.18s ease,
    padding-left 0.18s ease;
}

.mobile-menu a .material-icons {
  font-size: 1.05rem;
  color: #4ca82d;
  opacity: 0.78;
}

.mobile-menu a:hover {
  background: #f0faeb;
  color: #145c30;
  padding-left: 30px;
}

.mobile-menu a:hover .material-icons {
  opacity: 1;
}

/* ── Mobile Categories ───────────────────────────────────────── */
.mobile-categories {
  margin-top: 6px;
  border-top: 1px solid #d4e9c8;
}

.mobile-categories__heading {
  display: flex;
  align-items: center;
  gap: 8px;

  padding: 16px 24px 10px;

  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.11em;
  text-transform: uppercase;

  color: #6aac4c;
}

.mobile-categories__heading .material-icons {
  font-size: 1rem;
  color: #6aac4c;
}

/* Main Category Row */
.mobile-main-cat {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;

  padding: 13px 24px;

  font-size: 0.88rem;
  font-weight: 800;
  color: #1e6b0d;

  border-bottom: 1px solid #edf6e8;
  cursor: pointer;
  user-select: none;
  background: #ffffff;

  transition:
    background 0.18s ease,
    color 0.18s ease;
}

.mobile-main-cat:hover,
.mobile-main-cat.open {
  background: #f0faeb;
  color: #144d08;
}

.mobile-main-cat__arrow {
  font-size: 1.15rem;
  color: #7ec860;
  line-height: 1;

  transition:
    transform 0.22s ease,
    color 0.22s ease;
}

.mobile-main-cat.open .mobile-main-cat__arrow {
  transform: rotate(90deg);
  color: #2e7d1c;
}

/* Sub Category List */
.mobile-sub-list {
  display: none;
  flex-direction: column;

  margin: 8px 16px 14px;
  padding: 8px;

  background: #ffffff;
  border: 1px solid #d7ead0;
  border-radius: 16px;

  box-shadow: 0 12px 30px rgba(18, 72, 26, 0.12);
}

.mobile-sub-list.show {
  display: flex;
  animation: mobileSubCardIn 0.18s ease;
}

@keyframes mobileSubCardIn {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.mobile-sub-item {
  display: block;
  position: relative;

  padding: 11px 14px 11px 32px;

  font-size: 0.82rem;
  font-weight: 700;
  color: #3a8020;

  text-decoration: none;
  border-bottom: 1px solid #edf6e8;
  border-radius: 10px;

  transition:
    background 0.18s ease,
    color 0.18s ease,
    padding-left 0.18s ease;
}

.mobile-sub-item::before {
  content: "";
  position: absolute;
  left: 15px;
  top: 50%;

  width: 6px;
  height: 6px;

  border-radius: 50%;
  background: #a8d48e;

  transform: translateY(-50%);
}

.mobile-sub-item:hover {
  background: #e8f5e1;
  color: #1a5c0a;
  padding-left: 36px;
}

.mobile-sub-item:last-child {
  border-bottom: none;
}

/* ── Overlay ─────────────────────────────────────────────────── */
.menu-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1090;

  background: rgba(0, 0, 0, 0.45);

  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
}

.menu-overlay.active {
  display: block;
  animation: overlayFadeIn 0.22s ease;
}

@keyframes overlayFadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

body.menu-open {
  overflow: hidden;
}

/* ── Responsive ──────────────────────────────────────────────── */
@media (max-width: 991px) {
  .desktop-menu {
    gap: 2px;
  }

  .desktop-menu > a,
  .shop-menu__button {
    padding: 8px 10px;
    font-size: 0.8rem;
  }

  .site-search {
    min-width: 210px;
  }
}

@media (max-width: 767px) {
  header {
    min-height: var(--header-h);
  }

  .header-actions {
    display: none;
  }

  .site-search--desktop {
    display: none;
  }

  .site-search--mobile {
    display: flex;
  }

  .desktop-menu {
    display: none;
  }

  .hamburger {
    display: flex;
  }

  .nav-container {
    min-height: 72px;
    padding: 10px 16px;
  }

  .logo {
    gap: 9px;
  }

  .logo h3 {
    font-size: 0.95rem;
    max-width: 160px;
  }

  .logo img {
    width: 40px;
    height: 40px;
  }

}

@media (max-width: 420px) {
  .logo h3 {
    font-size: 0.88rem;
    max-width: 135px;
  }

  .side-menu {
    width: 88vw;
  }
}
