/* --- CandanSaka header ------------------------------------------------------------- */

.theme-candan-saka .ng-topbar--candan-saka { font-size: 12px; letter-spacing: 0.02em; }
.theme-candan-saka .ng-topbar--candan-saka .ng-topbar__middle { font-weight: 500; }

.theme-candan-saka .ng-header--candan-saka .ng-header__inner--candan-saka {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 24px;
}

.theme-candan-saka .ng-header--candan-saka .ng-header__brand { justify-self: start; }
.theme-candan-saka .ng-header--candan-saka .ng-header__nav--candan-saka {
  display: flex;
  justify-content: center;
  gap: 30px;
  font-size: 14px;
  font-weight: 500;
}
.theme-candan-saka .ng-header--candan-saka .ng-header__actions {
  justify-self: end;
  justify-content: flex-end;
  flex-wrap: nowrap;
}

/* Icon-only actions keep their translated names available to screen readers. */
.theme-candan-saka .ng-header--candan-saka .ng-header__action-label {
  display: block;
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.theme-candan-saka .ng-header--candan-saka .ng-header__action {
  position: relative;
  justify-content: center;
  flex: 0 0 32px;
  width: 32px;
  min-height: 40px;
  gap: 0;
}

.theme-candan-saka .ng-header--candan-saka .ng-header__action > svg {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
}

.theme-candan-saka .ng-header--candan-saka .ng-header__count {
  position: absolute;
  top: 0;
  inset-inline-end: -5px;
}

@media (max-width: 768px) {
  .theme-candan-saka .ng-header--candan-saka .ng-header__inner--candan-saka {
    /* The hamburger, the brand, the actions. */
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 12px;
    padding-inline: 16px;
  }

  .theme-candan-saka .ng-header--candan-saka .ng-header__nav--candan-saka { display: none; }

  .theme-candan-saka .ng-header--candan-saka .ng-header__brand {
    min-width: 0;
    max-width: 100%;
  }

  .theme-candan-saka .ng-header--candan-saka .ng-header__brand img {
    display: block;
    width: clamp(170px, 46vw, 240px);
    max-width: 100%;
    height: auto;
  }

  .theme-candan-saka .ng-header--candan-saka .ng-header__actions {
    /* The last of the three columns: the hamburger and the brand come before it. */
    grid-column: 3;
    grid-row: 1;
    gap: 6px;
    margin-inline-start: auto;
  }
}




/* --- Menu (flat / nested / mega) -------------------------------------------------------- */

.theme-candan-saka .ng-menu { display: flex; align-items: center; gap: 30px; list-style: none; margin: 0; padding: 0; font-size: 14px; font-weight: 500; }
.theme-candan-saka .ng-menu__item { position: relative; }
.theme-candan-saka .ng-menu__label { cursor: default; }

.theme-candan-saka .ng-menu__sub {
  position: absolute; top: 100%; left: 0; z-index: 50;
  min-width: 200px; padding: 10px 0; margin: 0; list-style: none;
  background: var(--ng-color-bg); border: 1px solid var(--ng-color-line); border-radius: var(--ng-radius-md);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.08);
  opacity: 0; visibility: hidden; transition: opacity 0.15s ease;
}
.theme-candan-saka .ng-menu__item:hover > .ng-menu__sub { opacity: 1; visibility: visible; }
.theme-candan-saka .ng-menu__sub .ng-menu__item { display: block; }
.theme-candan-saka .ng-menu__sub a, .theme-candan-saka .ng-menu__sub .ng-menu__label { display: block; padding: 7px 18px; font-weight: 400; }
.theme-candan-saka .ng-menu__sub--deep { top: 0; left: 100%; }

.theme-candan-saka .ng-menu__mega {
  position: absolute; top: 100%; left: 50%; transform: translateX(-50%); z-index: 50;
  display: flex; gap: 40px; padding: 28px 36px;
  background: var(--ng-color-bg); border: 1px solid var(--ng-color-line); border-radius: var(--ng-radius-md);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.1);
  opacity: 0; visibility: hidden; transition: opacity 0.15s ease;
}
.theme-candan-saka .ng-menu__item--mega:hover > .ng-menu__mega { opacity: 1; visibility: visible; }
.theme-candan-saka .ng-menu__mega-column { display: grid; gap: 8px; align-content: start; min-width: 140px; font-weight: 400; }
.theme-candan-saka .ng-menu__mega-heading { font-weight: 600; margin-bottom: 4px; }

/* --- Mega menu as picture tiles (the reference's collection cards) ---------------------------- */

/* A panel of tiles is wider than any one menu entry, so it is centred on the MENU rather than on
   the entry that opened it: the entry stands down as the anchor and the menu takes over. It still
   hangs directly from the menu's bottom edge, so the pointer never crosses a gap on its way down. */
.theme-candan-saka .ng-menu { position: relative; }
.theme-candan-saka .ng-menu > .ng-menu__item--mega:has(> .ng-menu__mega > .ng-menu__tiles) { position: static; }

.theme-candan-saka .ng-menu__mega:has(> .ng-menu__tiles) {
  display: block;
  width: min(1200px, calc(100vw - 48px));
  max-height: calc(100vh - 160px);
  overflow-y: auto;
  /* Scrolling the panel to its end must not carry on into the page behind it. */
  overscroll-behavior: contain;
  padding: 32px;
}

/* The panel's own scrollbar instead of the browser's: a thin rounded thumb floating inside the
   card - no arrows, no grey gutter, clear of the rounded corners - that darkens when the pointer
   is on it. The thumb is drawn inside a transparent border, which is what keeps it off the
   card's edge. */
.theme-candan-saka .ng-menu__mega:has(> .ng-menu__tiles)::-webkit-scrollbar { width: 14px; }
.theme-candan-saka .ng-menu__mega:has(> .ng-menu__tiles)::-webkit-scrollbar-button { display: none; }

.theme-candan-saka .ng-menu__mega:has(> .ng-menu__tiles)::-webkit-scrollbar-track {
  margin-block: 16px;
  background: transparent;
}

.theme-candan-saka .ng-menu__mega:has(> .ng-menu__tiles)::-webkit-scrollbar-thumb {
  background: rgb(0 0 0 / 16%);
  background-clip: padding-box;
  border: 4px solid transparent;
  border-radius: var(--ng-radius-pill);
}

.theme-candan-saka .ng-menu__mega:has(> .ng-menu__tiles)::-webkit-scrollbar-thumb:hover {
  background-color: rgb(0 0 0 / 38%);
}

/* Firefox draws no -webkit- parts; it gets the same thin, quiet bar its own way. Kept apart
   because Chromium ignores every -webkit- rule above the moment these two are set on the box. */
@supports not selector(::-webkit-scrollbar) {
  .theme-candan-saka .ng-menu__mega:has(> .ng-menu__tiles) {
    scrollbar-width: thin;
    scrollbar-color: rgb(0 0 0 / 22%) transparent;
  }
}

.theme-candan-saka .ng-menu__tiles {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 28px 20px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.theme-candan-saka .ng-menu__tile-link {
  position: relative;
  display: block;
  color: inherit;
  text-decoration: none;
}

.theme-candan-saka .ng-menu__tile-link:focus { outline: none; }
.theme-candan-saka .ng-menu__tile-link:focus-visible { outline: 2px solid var(--ng-color-primary); outline-offset: 2px; border-radius: 10px; }

/* The reference's own proportions (1000 x 1215) and its 10px rounding; the grey ground is what a
   category without a picture shows. */
.theme-candan-saka .ng-menu__tile-media {
  display: block;
  aspect-ratio: 1000 / 1215;
  overflow: hidden;
  border-radius: 10px;
  background: var(--ng-color-bg-alt);
}

.theme-candan-saka .ng-menu__tile-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1.5s cubic-bezier(0, 0, .44, 1.18);
}

.theme-candan-saka .ng-menu__tile-link:hover .ng-menu__tile-image { transform: scale(1.06); }

/* The name: a light pill centred near the picture's foot, as wide as its words - the reference's
   mega-menu collection title (#f2f2f2, 3px), inverting to black under the pointer. */
.theme-candan-saka .ng-menu__tile-name {
  position: absolute;
  left: 50%;
  bottom: 14px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: calc(100% - 20px);
  height: 36px;
  padding: 0 14px;
  font-size: 14px;
  font-weight: 500;
  color: var(--ng-color-text);
  background: var(--ng-color-field);
  border-radius: var(--ng-radius-control);
  transform: translateX(-50%);
  transition: color .3s ease, background-color .3s ease;
}

.theme-candan-saka .ng-menu__tile-link:hover .ng-menu__tile-name,
.theme-candan-saka .ng-menu__tile-link:focus-visible .ng-menu__tile-name {
  color: #fff;
  background: #000;
}

.theme-candan-saka .ng-menu__tile-text {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.theme-candan-saka .ng-menu__tile-icon { flex-shrink: 0; width: 14px; height: 14px; }

[dir="rtl"] .theme-candan-saka .ng-menu__tile-name { transform: translateX(50%); left: auto; right: 50%; }
[dir="rtl"] .theme-candan-saka .ng-menu__tile-icon { transform: scaleX(-1); }

/* A category's own children under its tile, as a mosaic of small chips: side by side and
   wrapping to the tile's width, so a long list stays a few short rows instead of a column that
   pushes the next row of tiles down. Each chip is the tile name's pill in miniature - the same
   light ground and the same turn to black under the pointer - so the two read as one family. */
.theme-candan-saka .ng-menu__tile-children {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
  font-size: 12.5px;
  font-weight: 400;
  line-height: 1.25;
}

.theme-candan-saka .ng-menu__tile-children > li { min-width: 0; max-width: 100%; }

.theme-candan-saka .ng-menu__tile-children a {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  min-height: 28px;
  padding: 5px 11px;
  border-radius: var(--ng-radius-control);
  background: var(--ng-color-field);
  color: var(--ng-color-text-soft);
  overflow-wrap: anywhere;
  transition: color .3s ease, background-color .3s ease;
}

.theme-candan-saka .ng-menu__tile-children a:hover,
.theme-candan-saka .ng-menu__tile-children a:focus-visible {
  color: #fff;
  background: #000;
}

.theme-candan-saka .ng-menu__tile-children a:focus-visible { outline: 2px solid var(--ng-color-primary); outline-offset: 2px; }

@media (prefers-reduced-motion: reduce) {
  .theme-candan-saka .ng-menu__tile-children a { transition: none; }
}

/* With an admin-chosen text colour the primary-colour hover may vanish into the background -
   on the BAR itself, hover becomes a dimming of the colour that is legible, not a jump to one
   that may not be. Scoped to the top level only: dropdown panels keep their own rules. */
.theme-candan-saka .ng-header[data-custom-text] .ng-header__nav > a:hover,
.theme-candan-saka .ng-header[data-custom-text] .ng-menu > .ng-menu__item > a:hover,
.theme-candan-saka .ng-header[data-custom-text] .ng-menu > .ng-menu__item > .ng-menu__label:hover,
.theme-candan-saka .ng-header[data-custom-text] .ng-header__action:hover,
.theme-candan-saka .ng-header[data-custom-text] .ng-language__trigger:hover {
  color: inherit;
  opacity: 0.72;
}

/* The panels a menu opens sit on the theme's own background whatever the bar wears, so their
   text goes back to the theme's colour instead of inheriting the bar's - white on the bar must
   not arrive as white on white in the panel. */
.theme-candan-saka .ng-menu__sub,
.theme-candan-saka .ng-menu__mega {
  color: var(--ng-color-text);
}

/* --- Language dropdown as part of the bar ---------------------------------------------- */

/* The panel is not a floating card near the trigger: it CONTINUES the bar - starts exactly at
   the bar's bottom line and wears the bar's own paint. The header anchors it, the trigger's
   wrapper stands down, and both background and text come from the same variables the bar
   itself is painted with - change the bar in the panel and the dropdown follows for free. */
/* The TRIGGER anchors the panel sideways - a dropdown belongs under the hand that opened it,
   not at the far edge of a full-width bar. The way DOWN to the bar's bottom line is computed:
   the trigger row sits --ng-header-pad-block above it, plus the bar's 1px border. Two anchors,
   one axis each. */
.theme-candan-saka .ng-header .ng-language { position: relative; }

.theme-candan-saka .ng-header .ng-language__menu {
  top: calc(100% + var(--ng-header-pad-block, 18px) + 1px);
  inset-inline-end: 0;
  margin: 0;
  padding: 4px;
  border: 1px solid var(--ng-color-line);
  border-top: none;
  border-radius: 0 0 var(--ng-radius-md) var(--ng-radius-md);
  background: color-mix(in srgb, var(--ng-header-bg, var(--ng-color-bg)) calc(var(--ng-header-opacity, 1) * 100%), transparent);
  backdrop-filter: blur(var(--ng-header-blur, 0px));
  color: inherit;
}

/* The rows and the tick wear the bar's colour too - base.css paints them for a white card,
   and a dark word or a primary-red tick disappears on a primary-red bar. */
.theme-candan-saka .ng-header .ng-language__option { color: inherit; }
.theme-candan-saka .ng-header .ng-language__check { color: currentColor; }

/* A hover tint mixed from the CURRENT text colour, so it reads on any bar - light on dark,
   dark on light - instead of the theme's light grey vanishing on a coloured bar. */
.theme-candan-saka .ng-header .ng-language__option:hover {
  background: color-mix(in srgb, currentColor 14%, transparent);
}

/* --- Mobile menu (the reference's canvas-mb) ---------------------------------------------- */

/* The hamburger exists only where the bar's own menu does not: the same 768px line that hides it. */
.theme-candan-saka .ng-mobile-menu__toggle { display: none; }

@media (max-width: 768px) {
  .theme-candan-saka .ng-mobile-menu__toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    margin-inline-start: -8px;
    padding: 0;
    color: inherit;
    background: none;
    border: 0;
    cursor: pointer;
  }

  .theme-candan-saka .ng-mobile-menu__toggle > svg { width: 24px; height: 24px; }
}

/* The shade over the page and the drawer on it. Closed, both stay in the page - invisible and
   out of the pointer's way - so opening and closing are transitions, not appearances. */
.theme-candan-saka .ng-mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgb(0 0 0 / 0%);
  visibility: hidden;
  pointer-events: none;
  transition: background-color .3s ease, visibility 0s linear .3s;
}

.theme-candan-saka .ng-mobile-menu.is-open {
  background: rgb(0 0 0 / 40%);
  visibility: visible;
  pointer-events: auto;
  transition: background-color .3s ease;
}

.theme-candan-saka .ng-mobile-menu__panel {
  position: absolute;
  inset-block: 0;
  inset-inline-start: 0;
  display: flex;
  flex-direction: column;
  width: min(90%, 320px);
  padding: 60px 0 24px;
  padding-inline-start: 20px;
  color: var(--ng-color-text);
  background: var(--ng-color-bg);
  box-shadow: 0 0 40px rgb(0 0 0 / 15%);
  transform: translateX(-100%);
  transition: transform .3s ease;
}

[dir="rtl"] .theme-candan-saka .ng-mobile-menu__panel { transform: translateX(100%); }

.theme-candan-saka .ng-mobile-menu.is-open .ng-mobile-menu__panel { transform: none; }

.theme-candan-saka .ng-mobile-menu__close {
  position: absolute;
  top: 18px;
  inset-inline-start: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  color: inherit;
  background: none;
  border: 0;
  cursor: pointer;
}

.theme-candan-saka .ng-mobile-menu__close > svg { width: 18px; height: 18px; }

.theme-candan-saka .ng-mobile-menu__list {
  flex: 1;
  margin: 0;
  padding: 0;
  padding-inline-end: 15px;
  overflow-y: auto;
  overscroll-behavior: contain;
  list-style: none;
  scrollbar-width: thin;
}

/* Top-level rows: the reference's 14px/500, a hairline between them. */
.theme-candan-saka .ng-mobile-menu__item:not(.ng-mobile-menu__item--sub) { padding: 2px 0; }
.theme-candan-saka .ng-mobile-menu__item:not(.ng-mobile-menu__item--sub):not(:last-child) { border-bottom: 1px solid var(--ng-color-line); }

.theme-candan-saka .ng-mobile-menu__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 40px;
}

.theme-candan-saka .ng-mobile-menu__link {
  flex: 1;
  min-width: 0;
  padding: 8px 0;
  font: inherit;
  font-size: 14px;
  font-weight: 500;
  color: inherit;
  text-align: start;
  text-decoration: none;
  background: none;
  border: 0;
  cursor: pointer;
}

/* Rows under a row: lighter, tighter, as the reference's sub-nav. */
.theme-candan-saka .ng-mobile-menu__item--sub .ng-mobile-menu__row { min-height: 34px; }
.theme-candan-saka .ng-mobile-menu__item--sub .ng-mobile-menu__link { padding: 6px 0; font-weight: 400; }
.theme-candan-saka .ng-mobile-menu__link:hover { color: var(--ng-color-primary); }

/* The plus: two bars, the upright one turning flat to make a minus once the rows are open. */
.theme-candan-saka .ng-mobile-menu__expand {
  position: relative;
  flex: 0 0 30px;
  width: 30px;
  height: 30px;
  padding: 0;
  color: inherit;
  background: none;
  border: 0;
  cursor: pointer;
}

.theme-candan-saka .ng-mobile-menu__expand::before,
.theme-candan-saka .ng-mobile-menu__expand::after {
  content: "";
  position: absolute;
  inset: 0;
  margin: auto;
  background: currentColor;
  transition: transform .4s ease .1s;
}

.theme-candan-saka .ng-mobile-menu__expand::before { width: 2px; height: 12px; }
.theme-candan-saka .ng-mobile-menu__expand::after { width: 12px; height: 2px; }
.theme-candan-saka .ng-mobile-menu__expand[aria-expanded="true"]::before { transform: rotate(90deg); }

/* Opens by growing from nothing to its own height - grid rows 0fr to 1fr - so any number of rows
   animates without measuring a thing. */
.theme-candan-saka .ng-mobile-menu__collapse {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows .3s ease;
}

.theme-candan-saka .ng-mobile-menu__collapse[data-open="true"] { grid-template-rows: 1fr; }

.theme-candan-saka .ng-mobile-menu__sub {
  min-height: 0;
  margin: 0;
  margin-inline-start: 10px;
  padding: 0;
  padding-inline-start: 19px;
  overflow: hidden;
  list-style: none;
  border-inline-start: 1px solid var(--ng-color-line);
}

.theme-candan-saka .ng-mobile-menu__sub > li:last-child { margin-bottom: 12px; }

/* --- The bar once the page moves under it ------------------------------------------------- */

/* At the top of a page the bar floats see-through (base.css keeps it transparent so a hero shows
   through it). Once the page scrolls beneath it, it takes a ground - the reference's header-bg:
   the shop's own header colour from its settings, held at least nearly opaque so the links never
   read straight over a photograph - and a soft shadow to part it from what passes underneath.
   The home page whose film opens it is left out: there the bar rides away with the film and is
   meant to stay clear of it. The header reports the state (data-scrolled); this decides the look. */
.theme-candan-saka .ng-header--candan-saka {
  transition: background-color .3s ease, box-shadow .3s ease;
}

.theme-candan-saka:not(:has(> .ng-site__main > .ng-home > .ng-video-hero:first-child, > .ng-site__main > .ng-home > .ng-editable:first-child > .ng-video-hero)) > .ng-header--candan-saka[data-scrolled="true"] {
  background: color-mix(in srgb, var(--ng-header-bg, var(--ng-color-bg)) calc(max(var(--ng-header-opacity, 1), 0.92) * 100%), transparent) !important;
  backdrop-filter: blur(var(--ng-header-blur, 0px));
  box-shadow: 0 4px 16px rgb(0 0 0 / 6%);
}
