#background {
  position: fixed;
  inset: 0;
  background-size: cover;
  background-color: #000;
  background-position: center;
  background-repeat: no-repeat;
  opacity: 0.8;
}

header {
  position: fixed;
  top: var(--header-top);
  left: 0;
  right: 0;
  width: 100%;
  z-index: 10;
  pointer-events: none;
}

header > .content,
header #category > .content {
  pointer-events: auto;
}

header #btns {
  position: relative;
  width: 100%;
  height: var(--h-header);
  background: linear-gradient(180deg, #5b9105 0%, var(--brand) 100%);
  border-radius: 18px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.14), 0 2px 6px rgba(0, 0, 0, 0.08);
  display: flex;
  align-items: center;
  padding: 0 20px;
  box-sizing: border-box;
  gap: 8px;
  z-index: 12;
}

header #btns #logo {
  position: relative;
  width: auto;
  margin-right: 20px;
  display: flex;
  align-items: center;
  z-index: 2;
}

header #btns #logo img {
  height: 48px;
  width: auto;
  transition: transform 0.2s ease;
}

header #btns #logo a:hover img {
  transform: scale(1.04);
}

header #btns #btn {
  position: relative;
  display: flex;
  align-items: center;
  flex: 1;
  gap: 2px;
}

header #btns .btn {
  position: relative;
  width: auto;
  text-align: center;
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.4px;
  line-height: 1;
  padding: 10px 16px;
  border-radius: 999px;
  transition: background 0.2s ease;
  z-index: 2;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

header #btns .btn a {
  color: #fff;
  text-decoration: none;
}

header #btns .btn:hover {
  background: rgba(255, 255, 255, 0.14);
}

header #btns .btn .chevron {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  cursor: pointer;
  transition: transform 0.25s ease, background 0.2s ease;
}

header #btns .btn .chevron i {
  font-size: 11px;
  color: #fff;
  opacity: 0.85;
  transition: transform 0.25s ease;
}

header #btns .btn .chevron:hover {
  background: rgba(255, 255, 255, 0.18);
}

header #btns .little-btn {
  position: relative;
  width: auto;
}

header #btns #header-search {
  margin-left: auto;
}

header #btns #header-search-btn {
  background: rgba(255, 255, 255, 0.14);
  border: none;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease;
  padding: 0;
}

header #btns #header-search-btn:hover {
  background: rgba(255, 255, 255, 0.24);
}

header #btns #header-search-btn i {
  font-size: 18px;
  color: #fff;
}

header #btns #cart {
  margin-left: 0;
}

header #btns #cart a {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
  transition: background 0.2s ease;
}

header #btns #cart a:hover {
  background: rgba(255, 255, 255, 0.24);
}

header #btns #cart i {
  font-size: 20px;
  color: #fff;
}

header #btns .little-btn #n-products {
  position: absolute;
  right: -4px;
  top: -4px;
  width: 20px;
  height: 20px;
  text-align: center;
  font-size: 11px;
  font-weight: 700;
  line-height: 20px;
  background: #fff;
  border: 2px solid var(--brand);
  color: var(--brand);
  border-radius: 50%;
  z-index: 1;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

header #category {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  width: 100%;
  visibility: hidden;
  opacity: 0;
  transform: translateY(-12px);
  transition: opacity 0.25s ease, transform 0.25s ease, visibility 0s linear 0.25s;
  z-index: 1;
}

header #category > .content {
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.14);
  padding: 24px;
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  margin-top: 10px;
}

header #category .category-close {
  display: none;
}

header #category .section.all-products {
  display: none;
}

header #category.selected {
  visibility: visible;
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.25s ease, transform 0.25s ease, visibility 0s linear 0s;
}

header #category .section {
  flex: 1 1 160px;
  min-width: 140px;
}

header #category .section .title {
  font-size: 15px;
  font-weight: 700;
  color: var(--brand);
  padding-bottom: 6px;
  border-bottom: 2px solid #f0f0ec;
  margin-bottom: 8px;
}

header #category .section .title a {
  color: inherit;
  text-decoration: none;
}

header #category .section .title a:hover {
  text-decoration: underline;
}

header #category .section .text {
  font-size: 14px;
}

header #category .section .text .subcategory {
  padding: 4px 0;
}

header #category .section .text .subcategory a {
  color: #555;
  text-decoration: none;
  transition: color 0.2s ease;
}

header #category .section .text .subcategory:hover a,
header #category .section .text .subcategory a:hover {
  color: var(--brand);
  font-weight: 500;
}

header #header-search-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 11;
  padding: 30px 24px;
  box-sizing: border-box;
  transform: translateY(-100%);
  opacity: 0;
  visibility: hidden;
  transition: transform 0.3s ease, opacity 0.3s ease, visibility 0s linear 0.3s;
  pointer-events: auto;
}

header #header-search-overlay.open {
  transform: translateY(0);
  opacity: 1;
  visibility: visible;
  transition: transform 0.3s ease, opacity 0.3s ease, visibility 0s linear 0s;
}

header #header-search-overlay .search-form {
  position: relative;
  width: 100%;
  max-width: 760px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  background: #fff;
  border-radius: 14px;
  padding: 6px 6px 6px 22px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.2);
  gap: 8px;
  box-sizing: border-box;
}

header #header-search-overlay .search-form input[type="text"] {
  flex: 1;
  border: none;
  outline: none;
  font-size: 18px;
  background: transparent;
  font-family: inherit;
  color: #222;
  padding: 14px 0;
}

header #header-search-overlay .search-form .submit {
  background: var(--brand);
  border: none;
  cursor: pointer;
  width: 44px;
  height: 44px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: background 0.2s ease;
}

header #header-search-overlay .search-form .submit:hover {
  background: var(--brand-dark);
}

header #header-search-overlay .search-form .submit i {
  font-size: 18px;
  color: #fff;
}

header #header-search-overlay .search-form .close {
  position: absolute;
  top: 50%;
  right: -52px;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.14);
  border: none;
  cursor: pointer;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  color: #fff;
  font-size: 26px;
  line-height: 1;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

header #header-search-overlay .search-form .close:hover {
  background: rgba(255, 255, 255, 0.28);
}

@media (max-width: 800px) {
  header #header-search-overlay .search-form .close {
    position: relative;
    right: auto;
    top: auto;
    transform: none;
    flex-shrink: 0;
    color: #555;
  }
}

header #added-to-cart {
  position: fixed;
  top: calc(var(--h-header) + var(--header-top) + 12px);
  right: -360px;
  width: auto;
  max-width: 320px;
  padding: 14px 18px;
  background: #fff;
  color: #333;
  font-weight: 600;
  font-size: 14px;
  border-radius: 12px;
  border-left: 4px solid var(--brand);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.14);
  transition: right 0.35s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.25s ease;
  opacity: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 10px;
  pointer-events: none;
}

header #added-to-cart::before {
  content: '✓';
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  background: var(--brand);
  color: #fff;
  border-radius: 50%;
  font-size: 14px;
  font-weight: 700;
  flex-shrink: 0;
}

header #added-to-cart.down {
  right: 20px;
  opacity: 1;
}

header #menu {
  position: relative;
  width: 26px;
  display: none;
  cursor: pointer;
  flex-shrink: 0;
}

header #menu .bar {
  position: relative;
  width: 100%;
  height: 3px;
  border-radius: 6px;
  background: #fff;
  transition: var(--transition);
}

header #menu .bar-2 {
  margin: 5px 0;
}

header #menu.click .bar-1 {
  margin-top: 8px;
  transform: rotate(45deg);
}

header #menu.click .bar-3 {
  margin-top: -4px;
  transform: rotate(-45deg);
}

header #menu.click .bar-2 {
  display: none;
}

@media (max-width: 900px) {

  header #btns {
    padding: 0 14px;
  }

  header #btns #logo {
    position: absolute;
    left: 50%;
    transform: translate(-50%);
    margin: 0;
  }

  header #btns #logo img {
    height: 40px;
  }

  header #menu {
    display: block;
  }

  header #btns #btn {
    position: fixed;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    width: 78%;
    max-width: 320px;
    left: -100%;
    top: calc(var(--h-header) + var(--header-top) + 8px);
    height: calc(100vh - var(--h-header) - var(--header-top) - 16px);
    background: #fff;
    overflow-y: auto;
    overflow-x: hidden;
    transition: var(--transition);
    z-index: 9;
    padding: 14px 0 20px 0;
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.12);
    border-radius: 0 18px 18px 0;
  }

  header #btns #btn.show {
    left: 0;
  }

  header #btns #btn .btn {
    width: 100%;
    border-radius: 0;
    padding: 16px 24px;
    text-align: left;
    font-size: 15px;
    border-bottom: 1px solid #f0f0ec;
    justify-content: space-between;
  }

  header #btns #btn .btn:hover {
    background: #f8f8f4;
  }

  header #btns #btn .btn a {
    color: #333;
  }

  header #btns #btn .btn .chevron {
    background: #f0f0ec;
  }

  header #btns #btn .btn .chevron img {
    filter: none;
    opacity: 0.6;
  }

  header #btns #shop.open .chevron img {
    transform: rotate(-90deg);
  }

  header #category {
    position: fixed;
    top: calc(var(--h-header) + var(--header-top) + 8px);
    left: -100%;
    right: auto;
    width: 78%;
    max-width: 360px;
    height: calc(100vh - var(--h-header) - var(--header-top) - 16px);
    visibility: visible;
    opacity: 1;
    transform: none;
    transition: left 0.3s ease;
    z-index: 9;
    background: #fff;
    overflow-y: auto;
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.12);
    padding-top: 0;
    box-sizing: border-box;
    pointer-events: auto;
    border-radius: 0 18px 18px 0;
  }

  header #category.selected {
    left: 0;
  }

  header #category > .content {
    background: transparent;
    border-radius: 0;
    box-shadow: none;
    padding: 14px 0;
    margin-top: 0;
    flex-direction: column;
    gap: 0;
    max-width: 100%;
    width: 100%;
  }

  header #category .category-close {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 16px 24px;
    background: var(--brand);
    color: #fff;
    border: none;
    cursor: pointer;
    font-size: 14px;
    font-weight: 700;
    text-align: left;
    border-radius: 0;
    box-sizing: border-box;
  }

  header #category .category-close i {
    font-size: 16px;
    color: #fff;
  }

  header #category .section.all-products {
    display: block;
    padding: 0;
    border-bottom: 1px solid #f0f0ec;
  }

  header #category .all-products-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 24px;
    color: #fff;
    background: var(--brand);
    text-decoration: none;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.3px;
    transition: background 0.2s ease;
  }

  header #category .all-products-link:hover {
    background: var(--brand-dark);
  }

  header #category .all-products-link i {
    font-size: 14px;
    color: #fff;
  }

  header #category .section {
    flex: 1 1 auto;
    min-width: 0;
    padding: 14px 24px;
    border-bottom: 1px solid #f0f0ec;
  }

  header #category .section:last-child {
    border-bottom: none;
  }

  header #category .section .title {
    font-size: 16px;
    border-bottom: none;
    padding-bottom: 0;
    margin-bottom: 6px;
  }

  header #category .section .text {
    padding-left: 6px;
  }

  header #category .section .text .subcategory {
    padding: 6px 0;
    font-size: 14px;
  }

  header #btns #cart {
    margin-left: 0;
    margin-right: 0;
  }

  header #btns #header-search {
    margin-left: auto;
  }

  header #btns #header-search-btn {
    width: 40px;
    height: 40px;
  }

  header #btns #header-search-btn img {
    height: 16px;
  }

  header #btns #cart a {
    width: 40px;
    height: 40px;
  }

  header #btns #cart img {
    height: 20px;
  }

  header #added-to-cart {
    top: auto;
    bottom: 20px;
    right: -360px;
    max-width: calc(100% - 32px);
    font-size: 13px;
    padding: 12px 16px;
  }

  header #added-to-cart.down {
    right: 16px;
  }

}
