/* Language switcher (includes/translate.php). Bottom left, opposite the Quick Connect buttons. */
.vgt-lang {
  --vgt-lang-lift: 0px;
  position: fixed;
  left: 24px;
  bottom: calc(24px + var(--vgt-lang-lift));
  z-index: 9995;
  min-width: 150px;
  font-family: Barlow, "Noto Sans Devanagari", "Noto Sans Gujarati", "Nirmala UI", "Segoe UI", sans-serif;
  background: #fff;
  border: 1px solid #E3E5EA;
  border-radius: 20px;
  box-shadow: 0 2px 6px rgba(27, 26, 46, .08), 0 12px 32px rgba(57, 49, 133, .16);
  overflow: hidden;
  transition: bottom .22s ease, box-shadow .25s ease;
}
.vgt-lang[hidden] { display: none; }
.vgt-lang img { display: block; flex: none; width: 24px; height: 16px; border-radius: 3px; box-shadow: 0 0 0 1px rgba(27, 26, 46, .12); }

.vgt-lang-list { list-style: none; margin: 0; padding: 6px; border-bottom: 1px solid #E3E5EA; }
.vgt-lang-list[hidden] { display: none; }
.vgt-lang-list li { margin: 0; }

.vgt-lang-opt, .vgt-lang-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  margin: 0;
  border: 0;
  background: transparent;
  color: #1B1A2E;
  font: inherit;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.2;
  text-align: left;
  cursor: pointer;
  transition: background-color .2s ease, color .2s ease;
}
.vgt-lang-opt { padding: 9px 12px; border-radius: 14px; }
.vgt-lang-opt[aria-selected="true"] { background: #E8F5E4; color: #256C1C; font-weight: 600; }
.vgt-lang-btn { padding: 11px 14px; }
.vgt-lang-btn i { margin-left: auto; font-size: 12px; color: #565970; transition: transform .25s ease; }
.vgt-lang.is-open .vgt-lang-btn i { transform: rotate(180deg); }

@media (hover: hover) {
  .vgt-lang:hover { box-shadow: 0 6px 14px rgba(27, 26, 46, .09), 0 20px 44px rgba(57, 49, 133, .24); }
  .vgt-lang-opt:hover { background: #393185; color: #fff; }
  .vgt-lang-btn:hover { background: #F4F5F7; color: #393185; }
}
.vgt-lang-opt:focus-visible, .vgt-lang-btn:focus-visible { outline: 3px solid #53B144; outline-offset: -3px; }

/* Google's own control has to exist for the translation to run; nobody needs to see it. */
.vgt-gt-el { position: absolute; left: -9999px; top: 0; width: 1px; height: 1px; overflow: hidden; }

/* Google's top banner pushes the page down by writing top:40px on <body>, and its tooltip and
   highlight appear on hover over translated text. The switcher replaces all of that. */
html body { top: 0 !important; position: static !important; }
iframe.skiptranslate, .goog-te-banner-frame, .goog-te-balloon-frame, #goog-gt-tt,
.VIpgJd-ZVi9od-ORHb-OEVmcd, .VIpgJd-ZVi9od-aZ2wEe-wOHMyf { display: none !important; visibility: hidden !important; }
.goog-text-highlight, .VIpgJd-yAWNEb-VIpgJd-fmcmfc-ZIeIlb { background: none !important; box-shadow: none !important; }
font { background: none !important; }

/* The condensed Latin heading font has no Gujarati or Hindi letters, and the system fallback
   runs narrow and tight when forced to its weight. Reset the spacing only for translated pages. */
html[data-vgt-lang] h1, html[data-vgt-lang] h2, html[data-vgt-lang] h3 { letter-spacing: 0; line-height: 1.25; text-transform: none; }

@media (max-width: 860px) {
  .vgt-lang { left: 12px; bottom: calc(16px + var(--vgt-lang-lift)); min-width: 0; }
  .vgt-lang-btn { padding: 9px 12px; font-size: 14px; }
  .vgt-lang-opt { font-size: 15px; padding: 10px 12px; }
}
/* From here down the Quick Connect stack is a solid bottom bar, so sit just above it. */
@media (max-width: 480px) {
  .vgt-lang { left: 10px; bottom: calc(72px + env(safe-area-inset-bottom, 0px) + var(--vgt-lang-lift)); }
}
@media (prefers-reduced-motion: reduce) {
  .vgt-lang, .vgt-lang-opt, .vgt-lang-btn, .vgt-lang-btn i { transition: none; }
}

/* Listing pages keep their filter rail in the bottom-left corner of the screen, so the closed
   switcher shrinks to flag and arrow there and stays in the margin beside the rail. */
@media (min-width: 992px) {
  html:has(.shop-side) .vgt-lang:not(.is-open) { min-width: 0; }
  html:has(.shop-side) .vgt-lang:not(.is-open) [data-lang-name] {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
  }
  html:has(.shop-side) .vgt-lang:not(.is-open) { left: 12px; }
}

/* Not over an open phone menu: the drawer's Contact tab has its own switcher. */
body.nav-open .vgt-lang { display: none; }

.nav-m-langs { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.nav-m-lang {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 8px 14px;
  border: 1px solid #E3E5EA;
  border-radius: 20px;
  background: #fff;
  color: #1B1A2E;
  font: inherit;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
}
.nav-m-lang img { width: 22px; height: 15px; border-radius: 3px; box-shadow: 0 0 0 1px rgba(27, 26, 46, .12); }
.nav-m-lang[aria-pressed="true"] { border-color: #2E8423; background: #E8F5E4; color: #256C1C; font-weight: 600; }

/* A landscape phone has no height to spare, and the drawer's Contact tab has the same choice. */
@media (max-width: 900px) and (max-height: 500px) {
  .vgt-lang { display: none; }
}

/* Phones: a smaller closed button, so it covers less of the page. The open list stays at a size
   a thumb can use. An invisible halo keeps the tap area at 44px. */
@media (max-width: 860px) {
  .vgt-lang-btn { position: relative; gap: 6px; min-height: 32px; padding: 5px 9px; font-size: 12.5px; }
  .vgt-lang-btn::before { content: ""; position: absolute; inset: -6px 0; }
  .vgt-lang-btn img { width: 18px; height: 12px; }
  .vgt-lang-btn i { font-size: 9px; }
}

/* Phones: the open list matches the smaller button. Rows stay 36px, comfortable for a thumb. */
@media (max-width: 860px) {
  .vgt-lang-list { padding: 4px; }
  .vgt-lang-opt { gap: 7px; min-height: 36px; padding: 6px 9px; border-radius: 12px; font-size: 13px; }
  .vgt-lang-opt img { width: 18px; height: 12px; }
}
