:root {
  --kakobuy-orange: #ff2b45;
  --kakobuy-orange-dark: #e71936;
  --kakobuy-ink: #171a20;
  --kakobuy-muted: #657083;
  --kakobuy-line: #e2e6ec;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  display: grid;
  grid-template-columns: auto auto minmax(280px, 430px) auto;
  align-items: center;
  gap: 18px;
  min-height: 78px;
  padding: 10px max(22px, calc((100vw - 1320px) / 2));
  border-bottom: 1px solid var(--kakobuy-line);
  background: rgba(255, 255, 255, .97);
  box-shadow: 0 4px 20px rgba(15, 23, 42, .05);
  backdrop-filter: blur(14px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.brand-logo {
  display: block;
  width: 158px;
  height: auto;
}

.brand-word {
  color: var(--kakobuy-ink);
  font-size: 19px;
  font-weight: 900;
}

.site-header nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 17px;
  color: #353b46;
  font-size: 14px;
  font-weight: 800;
  white-space: nowrap;
}

.site-header nav a:hover {
  color: var(--kakobuy-orange);
}

.header-search {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) 42px;
  align-items: center;
  min-width: 0;
  height: 46px;
  overflow: hidden;
  border: 1.5px solid var(--kakobuy-orange);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 5px 18px rgba(212, 112, 52, .08);
}

.header-search-mode {
  display: inline-flex;
  align-items: center;
  align-self: stretch;
  padding: 0 12px;
  border-right: 1px solid var(--kakobuy-line);
  color: #5f6672;
  font-size: 12px;
  font-weight: 800;
}

.header-search input {
  min-width: 0;
  height: 100%;
  padding: 0 12px;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--kakobuy-ink);
  font: inherit;
  font-size: 13px;
}

.header-search input::placeholder {
  color: #9aa3b3;
}

.header-search button {
  display: grid;
  width: 42px;
  height: 42px;
  padding: 0;
  place-items: center;
  border: 0;
  background: transparent;
  color: var(--kakobuy-orange);
  cursor: pointer;
}

.header-search button:hover {
  color: var(--kakobuy-orange-dark);
  background: #fff7f1;
}

.header-search svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
}

.locale-switcher {
  position: relative;
  justify-self: end;
  font-size: 14px;
}

.locale-trigger {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 38px;
  padding: 5px 6px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--kakobuy-ink);
  font: inherit;
  font-weight: 400;
  white-space: nowrap;
  cursor: pointer;
}

.locale-trigger:hover,
.locale-trigger[aria-expanded="true"] {
  color: var(--kakobuy-orange);
  background: transparent;
  box-shadow: none;
}

.locale-globe {
  position: relative;
  display: grid;
  width: 25px;
  height: 25px;
  place-items: center;
  border: 1px solid currentColor;
  border-radius: 50%;
  color: inherit;
  font-size: 10px;
  font-weight: 500;
  line-height: 1;
}

.locale-globe::after {
  content: "";
  position: absolute;
  left: 3px;
  bottom: -4px;
  width: 9px;
  height: 4px;
  border-left: 1px solid currentColor;
  border-bottom: 1px solid currentColor;
  transform: skewX(-25deg);
}

.locale-chevron {
  display: none;
}

.locale-popover {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 1000;
  width: min(260px, calc(100vw - 20px));
  padding: 10px 12px 11px;
  border: 1px solid #e2e5ea;
  border-radius: 2px;
  background: #fff;
  box-shadow: 0 6px 18px rgba(15, 23, 42, .18);
}

.locale-popover::before {
  content: "";
  position: absolute;
  top: -7px;
  left: 50%;
  width: 12px;
  height: 12px;
  border-top: 1px solid #e2e5ea;
  border-left: 1px solid #e2e5ea;
  background: #fff;
  transform: translateX(-50%) rotate(45deg);
}

.locale-popover[hidden] { display: none; }

.locale-title {
  display: block;
  margin: 0 0 8px;
  color: #666;
  font-size: 14px;
  font-weight: 400;
}

.locale-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px 20px;
  margin-bottom: 10px;
}

.locale-options.currency-options {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.locale-option,
.locale-submit {
  min-height: 26px;
  padding: 3px 5px;
  border: 1px solid #d9dde4;
  border-radius: 2px;
  background: #fff;
  color: #60656f;
  font: inherit;
  font-size: 12px;
  font-weight: 400;
  cursor: pointer;
}

.locale-option:hover,
.locale-option.is-selected {
  border-color: #ff4b22;
  background: #fff;
  color: #ff4b22;
}

.locale-submit {
  width: 100%;
  min-height: 31px;
  margin-top: 2px;
  border-color: #ff4b22;
  border-radius: 4px;
  background: #ff4b22;
  color: #fff;
  font-size: 14px;
  font-weight: 500;
}

.locale-submit:hover { background: #ee3d16; }

#google_translate_element,
.goog-te-banner-frame,
.goog-te-balloon-frame,
.goog-logo-link,
.goog-te-gadget span { display: none !important; }

body { top: 0 !important; }

/* Official KakoBuy first-slide image; site copy and internal search remain independent. */
.hero {
  min-height: clamp(390px, 25vw, 500px);
  padding: 72px 0 64px;
  background: #b7763b;
  color: #fff;
}

.hero .hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  transform: none;
}

.hero::after {
  background: linear-gradient(90deg, rgba(44, 22, 13, .80) 0%, rgba(55, 29, 16, .62) 44%, rgba(64, 35, 18, .20) 76%, rgba(64, 35, 18, .08) 100%);
}

.hero .hero-layout { max-width: 1180px; }
.hero .hero-layout > div { max-width: 720px; }
.hero p { color: rgba(255, 255, 255, .92); }

.hero .global-search button {
  background: var(--kakobuy-orange);
}

.hero .global-search button:hover {
  background: var(--kakobuy-orange-dark);
  box-shadow: 0 14px 24px rgba(212, 112, 52, .30);
}

@media (max-width: 1180px) {
  .site-header {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px 14px;
    padding: 12px 20px;
  }

  .brand { grid-column: 1; grid-row: 1; }
  .locale-switcher { grid-column: 2; grid-row: 1; }

  .header-search {
    grid-column: 1 / -1;
    grid-row: 2;
    width: min(720px, 100%);
    justify-self: center;
  }

  .site-header nav {
    grid-column: 1 / -1;
    grid-row: 3;
    justify-content: center;
    overflow-x: auto;
    width: 100%;
    padding: 2px 0;
  }
}

@media (max-width: 680px) {
  .site-header {
    position: relative;
    gap: 10px;
    padding: 11px 12px;
  }

  .brand-logo { width: 132px; }
  .brand-word { font-size: 15px; }

  .locale-trigger {
    min-height: 36px;
    padding: 4px;
  }

  .locale-trigger-label { font-size: 12px; }
  .locale-globe { width: 23px; height: 23px; font-size: 9px; }

  .header-search {
    grid-template-columns: auto minmax(0, 1fr) 40px;
    height: 44px;
  }

  .header-search-mode {
    padding: 0 9px;
    font-size: 10px;
  }

  .header-search input {
    padding: 0 9px;
    font-size: 12px;
  }

  .site-header nav {
    justify-content: flex-start;
    gap: 16px;
    font-size: 13px;
  }

  .locale-popover {
    position: fixed;
    top: 64px;
    right: 10px;
    left: auto;
    width: min(260px, calc(100vw - 20px));
    max-height: calc(100vh - 90px);
    overflow: auto;
  }

  .locale-options,
  .locale-options.currency-options { grid-template-columns: repeat(2, minmax(0, 1fr)); }

  .hero {
    min-height: 500px;
    padding: 58px 0 52px;
  }

  .hero .hero-bg { object-position: 48% center; }

  .hero::after {
    background: linear-gradient(180deg, rgba(44, 22, 13, .84) 0%, rgba(55, 29, 16, .68) 62%, rgba(64, 35, 18, .42) 100%);
  }

  .hero .hero-layout > div { max-width: none; }
}
