* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --promo-banner-height: 40px;
  --nav-height: 64px;
  --header-total-height: calc(var(--promo-banner-height) + var(--nav-height));
  --accent: #023D4F;
  --divider: #B0B0B0;
  --text-primary: #023D4F;
  --text-secondary: #4A4A4A;
  --border-radius: 12px;
  --border-radius-small: 8px;
  --transition: 0.2s ease;
  --lang-gap: 12px;
  --nav-icon-gap: 4px;
  --nav-icon-hit: 40px;
  --nav-icon-bg: #F5F5F5;
  --nav-platform-height: 4px;
  --logo-stroke: 2px;
  --logo-outline-gap: 6px;
  --logo-cutout-radius: 10px;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif;
  background: #F5F5F5;
  color: var(--text-primary);
}

input, button, select, textarea {
  font-family: inherit;
  font-size: 16px;
  color: var(--text-primary);
}

html { -webkit-text-size-adjust: 100%; }

.global-search-input input,
.search-container input,
.price-input {
  font-size: 16px;
  color: var(--text-primary);
}

.promo-banner {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--promo-banner-height);
  background-color: #023D4F;
  z-index: 1001;
  display: flex;
  align-items: center;
  justify-content: center;
}

.promo-content {
  width: 100%;
  padding: 0 16px;
  text-align: center;
}

.promo-content p {
  color: #ffffff;
  font-size: 14px;
  line-height: 1;
}

.navbar {
  position: fixed;
  top: var(--promo-banner-height);
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 12px;
  height: var(--nav-height);
  background: #FFFFFF;
  border-bottom: 1px solid var(--divider);
  z-index: 1000;
}

.nav-platform {
  position: absolute;
  left: 0;
  bottom: 6px;
  height: var(--nav-platform-height);
  width: 0;
  background: #023D4F;
  border-radius: 999px;
  opacity: 0;
  pointer-events: none;
  z-index: 1001;
  transform: translateX(0);
  transition:
    transform 260ms cubic-bezier(.22,.61,.36,1),
    width 260ms cubic-bezier(.22,.61,.36,1),
    opacity 180ms ease;
}

.navbar.platform-visible .nav-platform {
  opacity: 1;
}

.logo-link {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  position: relative;
}

.logo-desktop {
  display: none;
  height: calc(40px - (2 * var(--logo-stroke)));
  width: auto;
}

.logo-mobile {
  display: inline-block;
  width: calc(32px - (2 * var(--logo-stroke)));
  height: calc(32px - (2 * var(--logo-stroke)));
}

.drawer-header .drawer-logo {
  height: calc(28px - (2 * var(--logo-stroke)));
}

.logo-link::before,
.drawer-header a::before {
  content: '';
  position: absolute;
  inset: calc(-1 * var(--logo-outline-gap));
  border: var(--logo-stroke) solid var(--text-primary);
  border-radius: 12px;
  pointer-events: none;
  z-index: 1;
  -webkit-mask: radial-gradient(circle at 100% 0, transparent 0, transparent var(--logo-cutout-radius), #000 calc(var(--logo-cutout-radius) + 1px));
  mask: radial-gradient(circle at 100% 0, transparent 0, transparent var(--logo-cutout-radius), #000 calc(var(--logo-cutout-radius) + 1px));
}

.logo-link::after,
.drawer-header a::after {
  content: '*';
  position: absolute;
  top: calc(-1 * var(--logo-outline-gap) - 0.25rem);
  right: calc(-1 * var(--logo-outline-gap) - 0.25rem);
  font-size: 0.9rem;
  line-height: 1;
  color: var(--text-primary);
  padding: 2px 4px;
  border-radius: 999px;
  pointer-events: none;
  z-index: 2;
}

.drawer-header a { position: relative; }

.desktop-nav a {
  margin: 0 12px;
  color: var(--text-primary);
  text-decoration: none;
  font-size: 1rem;
  font-weight: 600;
  text-transform: uppercase;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: var(--nav-icon-gap);
}

.language-container {
  position: relative;
  align-items: center;
  gap: 0;
}

.lang-trigger {
  border: none;
  background: transparent;
  padding: 0;
  width: var(--nav-icon-hit);
  height: var(--nav-icon-hit);
  border-radius: 999px;
  transition: background var(--transition), transform var(--transition);
}

.lang-trigger:hover,
.lang-trigger:focus-visible {
  background: var(--nav-icon-bg);
  box-shadow: none;
}

.lang-trigger:active {
  background: #B0B0B0;
  transform: scale(0.98);
}

.current-flag {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  display: inline-block;
}

.flag-dropdown {
  position: fixed;
  top: calc(var(--promo-banner-height) + var(--nav-height) + var(--lang-gap));
  right: var(--lang-gap);
  min-width: 180px;
  background: #FFFFFF;
  border: 1px solid var(--divider);
  border-radius: var(--border-radius);
  box-shadow: 0 10px 30px rgba(0,0,0,.10);
  padding: 6px 0;
  z-index: 1004;
  opacity: 0;
  transform: translateY(-6px);
  pointer-events: none;
  transition: opacity .2s ease, transform .2s ease;
}

.language-container:hover .flag-dropdown,
.language-container.open .flag-dropdown,
.flag-dropdown:hover {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.lang-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  cursor: pointer;
  transition: background-color .15s ease;
}

.lang-item:hover { background: #F5F5F5; }

.lang-item img {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  object-fit: cover;
}

.lang-name {
  font-size: 0.95rem;
  color: var(--text-primary);
}

.flag {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  cursor: pointer;
}

.icon-btn, .menu-toggle, #drawerClose {
  border: none;
  background: transparent;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  line-height: 0;
}

.icon-btn,
.auth-link,
.bag-link {
  width: var(--nav-icon-hit);
  height: var(--nav-icon-hit);
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: background var(--transition), transform var(--transition);
}

.auth-link { 
  gap: 6px; 
  color: var(--text-primary); 
  text-decoration: none; 
  font-size: 0.95rem; 
}

.bag-link { align-items: center; }

.icon-btn:hover,
.icon-btn:focus-visible,
.auth-link:hover,
.auth-link:focus-visible,
.bag-link:hover,
.bag-link:focus-visible,
.lang-trigger:hover,
.lang-trigger:focus-visible {
  background: var(--nav-icon-bg);
}

.icon-btn:active,
.auth-link:active,
.bag-link:active,
.lang-trigger:active {
  background: #B0B0B0;
}

.icon-btn img, .auth-link img, .bag-link img {
  width: 24px;
  height: 24px;
  display: inline-block;
}

.menu-toggle {
  width: 44px;
  height: 44px;
  display: none;
}

.menu-toggle svg, #drawerClose svg {
  width: 24px;
  height: 24px;
  color: var(--accent);
  display: block;
}

#drawerClose { width: 40px; height: 40px; }
#drawerClose svg { width: 18px; height: 18px; }

.search-container {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-right: 12px;
}

.search-container input {
  flex: 1;
  min-width: 240px;
  border: 1px solid #B0B0B0;
  border-radius: var(--border-radius-small);
  padding: 8px 12px;
  font-size: 1rem;
  height: 40px;
  background: transparent;
  outline: none;
  transition: border-color var(--transition);
}

.search-container input:focus { border-color: #023D4F; }

.global-search {
  position: fixed;
  top: var(--promo-banner-height);
  left: 0;
  right: 0;
  background: #FFFFFF;
  z-index: 1002;
  padding: 16px;
}

.global-search.hidden { display: none; }

.global-search-inner {
  max-width: 1000px;
  margin: 0 auto;
  background: #fff;
  border-radius: var(--border-radius);
  overflow: hidden;
}

.global-search-input {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--divider);
}

.global-search-input input {
  flex: 1;
  border: 1px solid #B0B0B0;
  border-radius: var(--border-radius-small);
  height: 40px;
  padding: 0 12px;
  outline: none;
}

.global-search-input button {
  border: none;
  background: transparent;
  font-size: 18px;
  line-height: 1;
}

.global-search-results {
  list-style: none;
  max-height: 60vh;
  overflow: auto;
}

.global-search-results li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--divider);
  cursor: pointer;
}

.global-search-results li:hover { background: #F5F5F5; }

.global-search-results img {
  width: 40px;
  height: 40px;
  object-fit: contain;
}

.global-search.fullbar {
  top: var(--promo-banner-height);
  height: var(--nav-height);
  padding: 0;
  display: flex;
  align-items: center;
}

.global-search.fullbar .global-search-inner {
  max-width: none;
  margin: 0;
  border-radius: 0;
  background: transparent;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
}

.global-search.fullbar .global-search-input {
  padding: 0 16px;
  background: #FFFFFF;
  border-radius: 0;
  height: var(--nav-height);
  width: 100%;
  border-bottom: none;
}

.global-search.fullbar .global-search-results { display: none; }

.global-search-dropdown {
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  background: #FFFFFF;
  border-radius: 0 0 var(--border-radius) var(--border-radius);
  z-index: 1003;
  max-height: 350px;
  overflow-y: auto;
  border-top: 1px solid var(--divider);
  padding: 0;
  margin: 0;
  list-style: none;
}

.global-search-dropdown li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 18px;
  cursor: pointer;
  border-bottom: 1px solid var(--divider);
  transition: background 0.15s;
}

.global-search-dropdown li:last-child { border-bottom: none; }

.global-search-dropdown li:hover { background: #F5F5F5; }

.global-search-dropdown img {
  width: 40px;
  height: 40px;
  object-fit: contain;
  border-radius: var(--border-radius-small);
  background: #F5F5F5;
}

.global-search-dropdown .gs-name { 
  font-size: 1rem; 
  font-weight: 500; 
  color: var(--text-primary); 
}
.global-search-dropdown .gs-price { display: none; }

.drawer {
  position: fixed;
  inset: 0;
  background: #FFFFFF;
  z-index: 1100;
  display: flex;
  flex-direction: column;
  transition: transform 0.35s cubic-bezier(.4,0,.2,1), opacity 0.25s;
  transform: translateX(-100%);
  opacity: 0;
}

.drawer:not(.hidden) {
  transform: translateX(0);
  opacity: 1;
}

.drawer-header {
  background: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 24px 8px 24px;
  position: relative;
}

.drawer-header a img {
  height: 28px;
  width: auto;
  margin: 0;
}

.drawer-body {
  background: #FFFFFF;
  padding: 6px 0 24px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  flex: 1;
  position: relative;
  overflow: hidden;
}

.drawer-root-wrap {
  transition: transform 0.35s cubic-bezier(.4,0,.2,1), opacity 0.25s;
  will-change: transform, opacity;
  transform: translateX(0);
  opacity: 1;
  position: relative;
  z-index: 2;
}

.drawer.submenu-open .drawer-root-wrap {
  transform: translateX(-100%);
  opacity: 0;
  pointer-events: none;
}

.drawer-sub {
  background: #FFFFFF;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 3;
  transform: translateX(-100%);
  opacity: 0;
  transition: transform 0.35s cubic-bezier(.4,0,.2,1), opacity 0.25s;
  pointer-events: none;
}

.drawer-sub.animate-in {
  transform: translateX(0);
  opacity: 1;
  pointer-events: auto;
}

.drawer-sub.animate-out {
  transform: translateX(100%);
  opacity: 0;
  pointer-events: none;
}

.drawer.submenu-open .drawer-sub:not(.hidden):not(.animate-out) {
  transform: translateX(0);
  opacity: 1;
  pointer-events: auto;
}

.drawer-list { list-style: none; }

.drawer-item {
  padding: 18px 16px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-primary);
}

.drawer-item a {
  color: inherit;
  text-decoration: none;
  flex: 1;
}

.drawer-right-arrow {
  margin-left: auto;
  width: auto;
  height: 1em;
  color: var(--accent);
  flex-shrink: 0;
  display: inline-block;
  vertical-align: middle;
}

.drawer-right {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 16px;
}

.drawer-flag {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.back-btn, .header-back {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  outline: none !important;
  padding: 0 !important;
  margin: 0 !important;
  line-height: 0 !important;
  display: none;
  cursor: pointer;
}

.back-btn img, .header-back img {
  display: inline-block;
  width: 24px;
  height: 24px;
  background: none !important;
  border: none !important;
  margin: 0;
  padding: 0;
  box-shadow: none !important;
  vertical-align: middle;
}

.drawer.submenu-open .drawer-header .header-back { display: inline-flex; }

.drawer.submenu-open .drawer-header a {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  right: auto;
}

.drawer-separator { padding: 0; margin: 0; height: 0; border: none; background: none; display: block; }
.drawer-separator-inner { margin: 10px 16px; height: 1px; background: var(--divider); width: calc(100% - 32px); border-radius: 1px; display: block; }

.page-container {
  max-width: 1200px;
  margin: calc(var(--header-total-height) + 20px) auto 20px;
  padding: 0 16px;
}

body.products-page .page-container {
  margin: 8px auto 20px;
  max-width: none;
  padding: 0 16px;
}

.hero { width: 100%; }

.banner-link {
  display: block;
  position: relative;
  border-radius: var(--border-radius);
  overflow: hidden;
}

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

.banner-content {
  position: absolute;
  bottom: 16px;
  left: 16px;
  right: 16px;
  text-align: center;
  color: #fff;
}

.banner-content h2 { margin-bottom: 12px; font-size: 2.8rem; }

.banner-button, .leaf-hero-button {
  border: 2px solid #fff;
  background: transparent;
  color: #fff;
  padding: 10px 20px;
  border-radius: var(--border-radius-small);
  font-size: 1.2rem;
  cursor: pointer;
  transition: background var(--transition);
}

.banner-button:hover { background: #FFFFFF; color: var(--text-primary); }

.leaf-hero {
  margin-top: var(--header-total-height);
  width: 100%;
}

.leaf-hero-link {
  display: block;
  position: relative;
  width: 100%;
  height: 420px;
}

.leaf-hero-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.leaf-hero-content {
  position: absolute;
  left: 5%;
  bottom: 10%;
  right: 5%;
  max-width: 760px;
  color: #fff;
  text-align: left;
}

.leaf-hero-content h2 {
  font-size: 2.4rem;
  line-height: 1.2;
  margin-bottom: 12px;
  text-shadow: 0 2px 12px rgba(0,0,0,0.45);
}

.leaf-hero-button { background: rgba(2, 61, 79, 0.15); font-size: 1.05rem; padding: 10px 22px; }
.leaf-hero-button:hover { background: rgba(2, 61, 79, 0.30); }

.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
  justify-content: center;
}

.product-card {
  background: #FFFFFF;
  border-radius: var(--border-radius);
  border: 1px solid #B0B0B0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.07);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: none;
  margin: 0;
}

.card-bg { width: 100%; aspect-ratio: 1/1; object-fit: cover; }

.card-info-row {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-rows: auto auto;
  gap: 6px 12px;
  padding: 16px 20px;
}

.name-box { grid-column: 1 / -1; font-weight: 600; font-size: 1.2rem; }
.amount-box { grid-column: 1; grid-row: 2; color: var(--text-secondary); }
.price-box { grid-column: 2; grid-row: 2; justify-self: end; font-weight: 700; font-size: 1.1rem; color: var(--text-primary); }

.filter-bar {
  margin: calc(var(--header-total-height) + 8px) 16px 0;
  width: calc(100% - 32px);
  display: flex;
  align-items: center;
  gap: 12px;
}

.filter-button {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 16px;
  height: 48px;
  border: 1px solid #B0B0B0;
  border-radius: var(--border-radius);
  background: #FFFFFF;
  cursor: pointer;
  font-size: 1rem;
  color: var(--text-primary);
}

.filter-button img { height: 24px; width: auto; }

.sort-bar {
  display: flex;
  align-items: center;
  padding: 0 16px;
  height: 48px;
  border: 1px solid #B0B0B0;
  border-radius: var(--border-radius);
  background: #FFFFFF;
  overflow-x: auto;
  flex: 1;
}

.sort-options { display: flex; gap: 16px; }

.sort-option {
  padding: 0 16px;
  border: none;
  background: transparent;
  white-space: nowrap;
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
  color: var(--text-primary);
}

.sort-option.active { font-weight: bold; text-decoration: underline; }

.filter-menu {
  margin: 8px 16px 0;
  border: 1px solid #B0B0B0;
  border-radius: var(--border-radius);
  background: #FFFFFF;
  padding: 12px;
  display: block;
}

.filter-menu.hidden { display: none; }

.slider-container { display: flex; align-items: center; gap: 8px; }

.range-slider {
  position: relative;
  flex: 1;
  height: 20px;
  display: flex;
  align-items: center;
}

.range-slider input[type=range] {
  position: absolute;
  width: 100%;
  height: 4px;
  margin: 0;
  -webkit-appearance: none;
  appearance: none;
  background: transparent;
  pointer-events: none;
  z-index: 1;
}

.range-slider::before {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  height: 4px;
  background: #B0B0B0;
  z-index: 0;
  border-radius: 2px;
}

.range-slider::after {
  content: '';
  position: absolute;
  height: 4px;
  background: var(--text-primary);
  z-index: 2;
  border-radius: 2px;
  left: var(--range-min, 0%);
  right: calc(100% - var(--range-max, 100%));
}

.range-slider input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none;
  height: 20px;
  width: 20px;
  border-radius: 50%;
  background: var(--text-primary);
  cursor: pointer;
  pointer-events: all;
  position: relative;
  transition: transform var(--transition);
  box-shadow: 0 0 0 12px rgba(0,0,0,0);
}

.range-slider input[type=range]::-webkit-slider-thumb:active { transform: scale(1.2); }

.range-slider input[type=range]::-moz-range-thumb {
  height: 20px;
  width: 20px;
  border-radius: 50%;
  background: var(--text-primary);
  cursor: pointer;
  box-shadow: 0 0 0 12px rgba(0,0,0,0);
  pointer-events: all;
}

.range-slider input[type=range]::-ms-thumb {
  height: 20px;
  width: 20px;
  border-radius: 50%;
  background: var(--text-primary);
  cursor: pointer;
  box-shadow: 0 0 0 12px rgba(0,0,0,0);
  pointer-events: all;
}

.price-input {
  width: 50px;
  padding: 4px;
  border: 1px solid #B0B0B0;
  border-radius: 6px;
  background: #FFFFFF;
  color: var(--text-primary);
  text-align: center;
  pointer-events: none;
}

.menu-separator {
  width: 1px;
  background: #B0B0B0;
  margin: 12px 0;
  height: auto;
}

.categories { display: grid; gap: 8px; }

.category { display: flex; align-items: center; gap: 6px; }

.category input {
  appearance: none;
  width: 18px;
  height: 18px;
  border: 2px solid var(--text-primary);
  border-radius: 50%;
  cursor: pointer;
}

.category input:checked { background: var(--text-primary); border-color: var(--text-primary); }

.category span { font-size: 0.95rem; }

.desktop-only, .desktop-only-wide { display: none; }
.hidden { display: none; }

@media (min-width: 768px) {
  .categories { grid-template-columns: repeat(5, 1fr); }
  .products-page .products-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
}

@media (min-width: 1024px) {
  .logo-desktop { display: inline-block; height: 36px; width: auto; }
  .logo-mobile { display: none; }
  .desktop-only { display: flex; }
  .products-page .products-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (min-width: 1200px) {
  .desktop-only-wide { display: inline-flex; }
  .products-page .products-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (max-width: 767px) {
  #mainNav { display: none; }
  .language-container { display: none; }
  .menu-toggle { display: inline-block; }
  .logo-link { position: absolute; left: 50%; transform: translateX(-50%); }
  .nav-platform { display: none; }
  .auth-link { display: none !important; }
  .leaf-hero-content { text-align: center; left: 8px; right: 8px; bottom: 16px; }
  .leaf-hero-button { display: inline-block; }
}