/*
 * Site shell of the redesigned Bazar theme: header (three variants), hero header, footer, mobile bar.
 * Loaded after nz-redesign.css (the design system) and overrides its placeholder art with the real scenery, which the
 * layout passes in as custom properties on .bz (absolute URLs from the image slots):
 *   --nz-hero  --nz-head-l  --nz-head-r  --nz-head-plain  --nz-foot
 */

/* -- base: the redesigned parts sit on the paper background, the old pages keep their own -- */
.tp-bazar .nzc-atmo { display: none; }
.nz-main { background: transparent; }
.bz .nz a:focus-visible, .bz .nz button:focus-visible, .bz .nz input:focus-visible { outline: 3px solid color-mix(in srgb, var(--primary) 55%, transparent); outline-offset: 2px; }

/* -- top bar -- */
.nz-top { font-size: 13px; color: var(--text-2); position: relative; z-index: 2; }
.nz-top__row { height: 38px; }
.nz-top__links a { padding-inline: 14px; line-height: 1; }
.nz-weather { gap: 8px; font-size: 13px; }
.nz-weather b { font-size: 14px; }
.nz-weather .nz-sun { width: 22px; height: 22px; }

/* -- header shared bar -- */
.nz-head, .nz-hero { position: relative; }
.nz-head__main { display: flex; align-items: center; gap: 16px; padding-block: 12px; }
.nz-brand { margin-inline-end: auto; text-decoration: none; }
.nz-brand__mark { width: 58px; height: 68px; object-fit: contain; filter: none; }
.nz-brand__name { font-size: 34px; letter-spacing: -.01em; }
.nz-brand__tag { font-size: 12.5px; margin-top: 3px; }
.nz-head__tools { display: flex; align-items: center; gap: 14px; margin-inline-end: 6px; }
.nz-head__actions { display: inline-flex; align-items: center; gap: 12px; }
.nz-select { height: 44px; }
.nz-modebtn { width: 42px; height: 42px; }
.nz-modebtn .bz-mode__moon { display: none; }
[data-nzc-mode="dark"] .nz-modebtn .bz-mode__sun { display: none; }
[data-nzc-mode="dark"] .nz-modebtn .bz-mode__moon { display: block; }

/* -- inner-page header on the scenery (variant photo): a photo on each edge fading into the paper -- */
.nz-head--photo { z-index: 6; background: var(--bg); border-bottom: 1px solid var(--line); }
.nz-head--photo::before, .nz-head--photo::after { content: ''; position: absolute; inset-block: auto 0; height: min(100%, 200px); display: block; width: min(27%, 390px); z-index: 0; pointer-events: none; background-repeat: no-repeat; background-size: auto 100%; }
.nz-head--photo::before { inset-inline-start: auto; left: 0; background-image: var(--nz-head-l); background-position: left center; -webkit-mask-image: linear-gradient(to right, #000 48%, transparent), linear-gradient(to bottom, transparent, #000 38%); mask-image: linear-gradient(to right, #000 48%, transparent), linear-gradient(to bottom, transparent, #000 38%); -webkit-mask-composite: source-in; mask-composite: intersect; }
.nz-head--photo::after { right: 0; background-image: var(--nz-head-r); background-position: right center; -webkit-mask-image: linear-gradient(to left, #000 48%, transparent), linear-gradient(to bottom, transparent, #000 38%); mask-image: linear-gradient(to left, #000 48%, transparent), linear-gradient(to bottom, transparent, #000 38%); -webkit-mask-composite: source-in; mask-composite: intersect; }
.nz-head > * { position: relative; z-index: 1; }
.nz-head--photo .nz-top { background: none; }
.nz-head--photo .nz-head__main { padding-block: 14px 8px; }
.nz-head--photo .nz-nav, .nz-head--plain .nz-nav { border-top: 1px solid color-mix(in srgb, var(--line-strong) 65%, transparent); margin-top: 4px; padding-block: 6px; }
.nz-head--photo .nz-nav { border-top-color: color-mix(in srgb, var(--line-strong) 80%, transparent); }

.nz-head--photo .nz-brand__name, .nz-head--photo .nz-brand__tag, .nz-head--photo .nz-top a, .nz-head--photo .nz-nav a { text-shadow: 0 0 12px rgba(255,255,255,.95), 0 0 3px rgba(255,255,255,.8); }
/* -- login header (variant plain): pastel sky on paper, the scenery only as a faint wash -- */
.nz-head--plain { overflow: hidden; background: linear-gradient(to bottom, color-mix(in srgb, #c9c3e6 34%, var(--bg)) 0, color-mix(in srgb, #f7dcc8 38%, var(--bg)) 34px, var(--bg) 96px); border-bottom: 3px double var(--line-strong); }
.nz-head--plain::before { content: ''; position: absolute; inset: 0; z-index: 0; pointer-events: none; background: var(--nz-head-plain) center top / 100% auto no-repeat; opacity: .42; -webkit-mask-image: linear-gradient(to bottom, #000 25%, transparent 78%); mask-image: linear-gradient(to bottom, #000 25%, transparent 78%); }
.nz-head--plain .nz-top { background: color-mix(in srgb, var(--surface) 45%, transparent); }
/* -- category nav -- */
.nz-nav { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; row-gap: 2px; font-family: var(--font-display); font-weight: 800; font-size: 15px; }
.nz-nav a { padding: 6px 16px; white-space: nowrap; }
.nz-nav a + a::before { top: 30%; height: 40%; }
.nz-nav__all { color: var(--primary-text); }

/* -- quick search bar of inner pages -- */
.nz-headsearch { position: relative; display: flex; justify-content: center; align-items: center; gap: 10px; padding: 4px 0 16px; max-width: none; margin: 0; }
.nz-headsearch .nz-input { max-width: 520px; height: 46px; box-shadow: var(--shadow-1); border: 1.5px solid var(--line-strong); position: relative; }
.nz-headsearch .nz-input input { padding: 0; height: auto; border: 0; background: transparent; box-shadow: none; font-size: 15px; transform: none; }
.nz-headsearch .nz-btn { height: 46px; padding-inline: 28px; }
.nz-headsearch .bz-suggest { inset-inline: 0; top: calc(100% - 10px); max-width: 520px; margin-inline: auto; border: 1.5px solid var(--line-strong); border-radius: var(--r-m); background: var(--surface); box-shadow: var(--shadow-2); }
.nz-headsearch .bz-suggest[hidden] { display: none; }

/* -- home hero header (variant hero): translucent bar over the big scenery -- */
.nz-hero { isolation: isolate; overflow: hidden; }

.nz-herohead .nz-top { background: color-mix(in srgb, var(--surface) 70%, transparent); }
.nz-herohead__bar { background: color-mix(in srgb, var(--surface) 82%, transparent); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); box-shadow: 0 6px 24px rgba(74,44,24,.09); }
.nz-nav--main { flex-wrap: nowrap; border: 0; padding: 0; gap: 2px; margin-inline: auto; }
.nz-nav--main a { position: relative; padding: 12px 12px; font-size: 15px; }
.nz-herohead .nz-head__main { gap: 12px; }
.nz-herohead .nz-brand { margin-inline-end: 8px; }
.nz-herohead .nz-brand__name { font-size: 30px; }
.nz-herohead .nz-brand__tag { font-size: 11.5px; }
.nz-herohead .nz-head__actions .nz-btn { padding-inline: 16px; }
.nz-nav--main a + a::before { display: none; }
.nz-nav--main a.is-active { color: var(--primary-text); }
.nz-nav--main a.is-active::after { content: ''; position: absolute; inset-inline: 14px; bottom: 2px; height: 3px; border-radius: 3px; background: var(--primary); }

/* -- footer -- */
.nz-foot { position: relative; margin-top: 40px; overflow: hidden; color: var(--footer-ink); background: var(--footer); }
.nz-foot::before { display: none; }
.nz-foot__scene { position: absolute; inset: 0; z-index: 0; background: var(--nz-foot) center bottom / cover no-repeat; opacity: .62; }
.nz-foot::after { z-index: 0; background: linear-gradient(to bottom, var(--footer) 0%, color-mix(in srgb, var(--footer) 78%, transparent) 42%, color-mix(in srgb, var(--footer) 46%, transparent) 100%); }
.nz-foot > .nz-wrap { z-index: 1; }
.nz-foot__grid { display: grid; grid-template-columns: 1.45fr 1fr 1fr 1fr 1.5fr; gap: 26px; padding-block: 34px 22px; align-items: start; }
.nz-foot h4 { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; font-size: 16px; color: #fff; }
.nz-foot h4 .nz-ic { width: 22px; height: 22px; padding: 2px; border-radius: 5px; background: var(--primary); color: #fff; }
.nz-foot__col { min-width: 0; }
.nz-foot__col + .nz-foot__col { border-inline-start: 1px solid rgba(255,255,255,.12); padding-inline-start: 24px; }
.nz-foot__links a { display: block; padding-block: 3px; font-size: 14px; color: var(--footer-ink-2); }
.nz-foot__links a:hover { color: #fff; }
.nz-foot__brandcol { display: flex; flex-direction: column; align-items: flex-start; }
.nz-foot__brand { display: flex; align-items: center; gap: 12px; }
.nz-foot__brand img { width: 46px; height: 54px; object-fit: contain; filter: none; border-radius: 8px; }
.nz-foot__brand b { font-size: 26px; }
.nz-social { margin-top: 16px; gap: 10px; }
.nz-social a { width: 42px; height: 42px; background: rgba(15,11,9,.72); border: 1.5px solid rgba(255,255,255,.5); box-shadow: 0 2px 8px rgba(0,0,0,.35); }
.nz-social a:hover { background: var(--primary); border-color: var(--primary); }
.nz-sub { height: 50px; border-radius: 12px; overflow: hidden; background: #fff; border: 2px solid var(--primary); }
.nz-sub input { flex: 1; min-width: 0; height: 100%; padding-inline: 14px; border: 0; outline: 0; background: #fff; font-size: 14px; color: #2b1d16; direction: rtl; text-align: start; }
.nz-sub button { border: 0; padding-inline: 20px; background: var(--primary); }
.nz-sub__msg { margin-top: 8px; font-size: 13px; color: #fff; }
.nz-foot__bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-block: 13px; border-top: 1px solid rgba(255,255,255,.14); font-size: 13px; color: var(--footer-ink-2); }
.nz-foot__bar nav { display: flex; gap: 14px; }
.nz-foot__bar nav a:hover { color: #fff; }
.nz-foot__install { display: inline-flex; align-items: center; gap: 6px; margin-inline-end: 10px; padding: 3px 12px; border: 1px solid rgba(255,255,255,.3); border-radius: 999px; background: transparent; color: inherit; font: inherit; cursor: pointer; }
.nz-foot__install:hover { border-color: #fff; color: #fff; }
.nz-foot__install .nz-ic { width: 15px; height: 15px; }
.nz-foot__made { display: inline-flex; align-items: center; gap: 5px; }

/* -- dark mode -- */
[data-nzc-mode="dark"] .nz-head--photo::before, [data-nzc-mode="dark"] .nz-head--photo::after { filter: brightness(.5) saturate(.85); }
[data-nzc-mode="dark"] .nz-head--plain { background: var(--bg); }
[data-nzc-mode="dark"] .nz-head--plain::before { opacity: .16; }
[data-nzc-mode="dark"] .nz-herohead__bar { background: color-mix(in srgb, var(--surface) 78%, transparent); }
[data-nzc-mode="dark"] .nz-hero::before { opacity: .55; }


/* -- tablet -- */
@media (max-width: 1100px) {
  .nz-foot__grid { grid-template-columns: 1fr 1fr 1fr; }
  .nz-foot__news { grid-column: 1 / -1; }
  .nz-foot__col + .nz-foot__col { border-inline-start: 0; padding-inline-start: 0; }
  .nz-head__tools .nz-date { display: none; }
  .nz-brand__name { font-size: 28px; }
}

/* -- phone: compact header, category nav scrolls sideways, footer stacks -- */
@media (max-width: 760px) {
  .nz-top__links a { padding-inline: 9px; }
  .nz-top__links a:nth-child(3) { display: none; }
  .nz-head__main { flex-wrap: wrap; gap: 10px 12px; padding-block: 10px; }
  .nz-brand { flex: 1 1 100%; margin-inline-end: 0; }
  .nz-brand__mark { width: 44px; height: 52px; }
  .nz-brand__name { font-size: 25px; }
  .nz-brand__tag { font-size: 11.5px; }
  .nz-head__tools { flex: 1 1 auto; margin: 0; }
  .nz-head__actions { flex: 1 1 100%; justify-content: stretch; }
  .nz-head__actions .nz-btn { flex: 1; padding-inline: 12px; --h: 42px; font-size: 15px; }
  .nz-modebtn { order: 3; flex: none; }
  .nz-nav { flex-wrap: nowrap; justify-content: flex-start; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  .nz-nav::-webkit-scrollbar { display: none; }
  .nz-nav--main { display: none; }
  .nz-headsearch { padding-inline: 0; }
  .nz-headsearch .nz-btn { padding-inline: 18px; }
  .nz-foot__grid { grid-template-columns: 1fr 1fr; gap: 20px; padding-block: 26px 14px; }
  .nz-foot__brandcol { grid-column: 1 / -1; order: -1; }
  .nz-foot__bar { flex-direction: column; align-items: flex-start; }
  .nz-foot { margin-bottom: 0; padding-bottom: 76px; }
}
@media print { .nz-top, .nz-head__actions, .nz-headsearch, .nz-foot { display: none; } }
