/* ============================================================================
   KORBI TAB NAVIGATION
   Ported from reference/index.html — class names prefixed with korbi-tabs__
   ============================================================================ */

/* --- Root container ---
   NO color: var(--fg) here — that leaks into Elementor template content.
   Colors are scoped to header/nav elements only. */
.korbi-tabs {
  --bg-color: #a00098;
  --fg: #ffffff;
  --muted-fg: rgba(255,255,255,.80);
  --nav-line: rgba(255,255,255,.70);
  --location-fg: var(--fg);

  position: relative;
  width: 100%;
  min-height: 100dvh;
  overflow-x: hidden;
  font-family: var(--font-family);
  background:
    radial-gradient(circle at 74% 15%, rgba(255,255,255,.08), transparent 28%),
    linear-gradient(180deg,
      color-mix(in srgb, var(--bg-color), white 10%) 0%,
      var(--bg-color) 48%,
      color-mix(in srgb, var(--bg-color), black 10%) 100%
    );
  transition: background .22s ease;
}

/* Button reset — ONLY for tab nav buttons, not all buttons */
.korbi-tabs__item {
  font: inherit;
  color: inherit;
  appearance: none;
  -webkit-appearance: none;
  border: 0;
  background: transparent;
  padding: 0;
  margin: 0;
  padding-top: 10px;
  cursor: pointer;
}

/* =========================
   HEADER — from reference lines 146-206
========================= */
.korbi-tabs__delivery {
  position: absolute;
  left: 17px;
  top: 46px;
  margin: 0;
  font-size: 29px;
  line-height: 27px;
  font-weight: 800;
  letter-spacing: -1.15px;
  color: var(--fg);
}

.korbi-tabs__location {
  position: absolute;
  left: 17px;
  top: 78px;
  width: 292px;
  display: flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
  overflow: hidden;
  color: var(--location-fg);
  font-size: 12px;
  line-height: 14px;
  font-weight: 600;
  letter-spacing: -.15px;
}

.korbi-tabs__location strong { font-weight: 700; }
.korbi-tabs__location span { overflow: hidden; text-overflow: ellipsis; }

.korbi-tabs__location svg {
  width: 10px;
  height: 10px;
  flex: 0 0 auto;
  stroke: currentColor;
  stroke-width: 3;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  margin-top: 1px;
}

.korbi-tabs__profile {
  position: absolute;
  right: 16px;
  top: 48px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #fff;
  display: grid;
  place-items: center;
  box-shadow: 0 2px 8px rgba(0,0,0,.13);
  text-decoration: none;
}

.korbi-tabs__profile svg {
  width: 25px;
  height: 25px;
  fill: #1f1f1f;
}

/* =========================
   SEARCH — from reference lines 212-260
========================= */
.korbi-tabs__search {
  position: absolute;
  left: 17px;
  right: 17px;
  top: 103px;
  height: 48px;
  border-radius: 8px;
  background: #fff;
  color: #343434;
  display: flex;
  align-items: center;
  padding: 0 14px;
  text-decoration: none;
}

.korbi-tabs__search span {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #616161;
  font-size: 14px;
  line-height: 1;
  font-weight: 500;
  letter-spacing: -.1px;
}

.korbi-tabs__search-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #333;
}

.korbi-tabs__search-actions svg {
  width: 21px;
  height: 21px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2.25;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.korbi-tabs__divider {
  width: 1px;
  height: 23px;
  background: #d6d6d6;
}

/* =========================
   CATEGORY NAV — from reference lines 266-377
   EXACT copy, only class names changed.
========================= */
.korbi-tabs__nav-scroll {
  position: absolute;
  left: 0;
  top: 166px;
  width: 100%;
  height: 63px;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  z-index: 10;
}

.korbi-tabs__nav-scroll::-webkit-scrollbar {
  display: none;
}

.korbi-tabs__nav {
  position: relative;
  height: 63px;
  color: var(--muted-fg);
}

.korbi-tabs__nav-curve {
  position: absolute;
  left: 0;
  bottom: 0px;
  height: 32px;
  overflow: visible;
  z-index: 1;
  pointer-events: none;
}

/* stroke is set via HTML attribute stroke="url(#korbiNavFade-xxx)"
   Do NOT set stroke here — it would override the per-widget gradient reference. */
.korbi-tabs__nav-curve path {
  fill: none;
  stroke-width: 1.45;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.korbi-tabs__item {
  --cx: 0px;
  --w: 76px;
  position: absolute;
  left: calc(var(--cx) - (var(--w) / 2));
  top: 0;
  width: var(--w);
  height: 62px;
  display: flex;
  flex-direction: column;
  align-items: center;
  color: var(--muted-fg);
  z-index: 4;
}

.korbi-tabs__item.is-active { color: var(--fg); }

.korbi-tabs__icon {
  position: relative;
  width: 23px;
  height: 23px;
  margin-top: 3px;
  margin-bottom: 4px;
}

.korbi-tabs__icon svg {
  position: absolute;
  inset: 0;
  width: 23px;
  height: 23px;
}

.korbi-tabs__icon-outline {
  display: block;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.85;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.korbi-tabs__icon-filled {
  display: none;
  fill: currentColor;
  stroke: none;
}

.korbi-tabs__item.is-active .korbi-tabs__icon-outline {
  display: none;
}

.korbi-tabs__item.is-active .korbi-tabs__icon-filled {
  display: block;
}

/* Uploaded SVG icon via Media Library (img fallback) */
.korbi-tabs__icon img {
  position: absolute;
  inset: 0;
  width: 23px;
  height: 23px;
  object-fit: contain;
  opacity: 0.7;
  transition: opacity 180ms ease;
}

.korbi-tabs__item.is-active .korbi-tabs__icon img {
  opacity: 1;
}

.korbi-tabs__label {
  height: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10.2px;
  line-height: 1;
  padding-top:14px ;
  white-space: nowrap;
  font-weight: 600;
  letter-spacing: -.1px;
}

.korbi-tabs__item.is-active .korbi-tabs__label { font-weight: 700; }

/* =========================
   CONTENT — isolated from tab colors
   This area loads Elementor templates. It must NOT inherit
   tab foreground colors, font weights, or button resets.
========================= */
.korbi-tabs__content {
  position: relative;
  min-height: 200px;
  margin-top: 229px;
  background: #ffffff;
  color: #333333;
  font-weight: normal;
  letter-spacing: normal;
  line-height: normal;
}

.korbi-tabs__panel {
  display: none;
  color: #333333;
  background: #ffffff;
}

.korbi-tabs__panel.is-active {
  display: block;
}

.korbi-tabs__panel.is-loading {
  min-height: 300px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.korbi-tabs__spinner {
  width: 32px;
  height: 32px;
  border: 3px solid rgba(160,0,152,0.25);
  border-top-color: var(--bg-color);
  border-radius: 50%;
  animation: korbiSpin 700ms linear infinite;
}

.korbi-tabs-empty {
  padding: 40px 17px;
  text-align: center;
  color: rgba(2, 6, 12, 0.62);
}

/* =========================
   STICKY COMPACT TOP BAR — from reference lines 1010-1150
   EXACT copy, only class names changed.
   Fixed widths replaced with 100%/right:17px for fluid layout.
========================= */
.korbi-tabs__sticky-bar {
  position: fixed;
  left: 0;
  right: 0;
  top: 0;
  width: 100%;
  height: 120px;
  background: #ffffff;
  box-shadow: 0 1px 0 rgba(0,0,0,.10);
  z-index: 999;
  opacity: 0;
  pointer-events: none;
transition: opacity .18s ease;
  overflow: hidden;
}

.korbi-tabs__sticky-bar.is-visible {
  opacity: 1;
  pointer-events: auto;
}

.korbi-tabs__sticky-inner {
  width: 100%;
  height: 120px;
  position: relative;
}

.korbi-tabs__sticky-search {
  position: absolute;
  left: 17px;
  right: 17px;
  top: 8px;
  height: 48px;
  border-radius: 8px;
  background: #ffffff;
  border: 1px solid #d8dbe0;
  color: #343434;
  display: flex;
  align-items: center;
  padding: 0 14px;
  box-shadow: none;
  text-decoration: none;
}

.korbi-tabs__sticky-search span {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #616161;
  font-size: 14px;
  line-height: 1;
  font-weight: 500;
  letter-spacing: -.1px;
}

.korbi-tabs__sticky-search-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #333;
}

.korbi-tabs__sticky-search-actions svg {
  width: 21px;
  height: 21px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2.25;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.korbi-tabs__sticky-divider {
  width: 1px;
  height: 23px;
  background: #d6d6d6;
}

.korbi-tabs__sticky-nav-scroll {
  position: absolute;
  left: 0;
  top: 57px;
  width: 100%;
  height: 63px;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.korbi-tabs__sticky-nav-scroll::-webkit-scrollbar {
  display: none;
}

/* Sticky nav uses dark colors */
.korbi-tabs__sticky-nav {
  position: relative;
  height: 63px;
  color: #555960;
}

.korbi-tabs__sticky-nav .korbi-tabs__nav-curve {
  left: 0;
  bottom: 0px;
  top: auto;
  height: 32px;
  color: #171717;
}

.korbi-tabs__sticky-nav .korbi-tabs__item {
  color: #555960;
}

.korbi-tabs__sticky-nav .korbi-tabs__item.is-active {
  color: #111111;
}

.korbi-tabs__sticky-nav .korbi-tabs__label {
  font-size: 10.2px;
  font-weight: 600;
}

.korbi-tabs__sticky-nav .korbi-tabs__item.is-active .korbi-tabs__label {
  font-weight: 700;
}

/* Condensed state — hide main header elements when sticky bar is visible */

.korbi-tabs__delivery,
.korbi-tabs__location,
.korbi-tabs__profile,
.korbi-tabs__search,
.korbi-tabs > .korbi-tabs__nav-scroll {
  transition: opacity .18s ease;
}

.korbi-tabs.is-condensed .korbi-tabs__delivery,
.korbi-tabs.is-condensed .korbi-tabs__location,
.korbi-tabs.is-condensed .korbi-tabs__profile,
.korbi-tabs.is-condensed .korbi-tabs__search,
.korbi-tabs.is-condensed > .korbi-tabs__nav-scroll {
  opacity: 0;
  pointer-events: none;
}

@keyframes korbiSpin {
  to { transform: rotate(360deg); }
}