/* =============================================
   SITE HEADER — see inc/header.php
   Global rules in style.css force gold links and gradient
   buttons with !important, so header rules reset them here.
   ============================================= */
:root {
  --jig-header-ink:    #1c1917;
  --jig-header-text:   #44403c;
  --jig-header-bg:     #faf8f5;
  --jig-header-field:  #efebe4;
  --jig-header-line:   rgba(28, 25, 23, 0.09);
  --jig-header-main-h: 84px;
}

/* WooCommerce's coming-soon template skips Astra's base CSS, so don't rely on its box-sizing */
.jig-topbar,
.jig-topbar *,
.jig-header,
.jig-header *,
.jig-drawer,
.jig-drawer * {
  box-sizing: border-box;
}

.jig-container {
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Reset the global button treatment inside the header and drawer */
.jig-header button,
.jig-drawer button {
  background: none !important;
  box-shadow: none !important;
  border: 0 !important;
  border-radius: 0 !important;
  padding: 0 !important;
  color: inherit !important;
  font-family: var(--jig-font-body) !important;
  letter-spacing: normal !important;
  text-transform: none !important;
  transform: none !important;
  overflow: visible;
}
.jig-header button::before,
.jig-drawer button::before {
  display: none !important;
}

.jig-icon {
  display: block;
  flex-shrink: 0;
}

.jig-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50% !important;
  color: var(--jig-header-ink) !important;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease;
}
.jig-icon-btn:hover {
  background-color: rgba(28, 25, 23, 0.06) !important;
  color: var(--jig-header-ink) !important;
}

.jig-header a:focus-visible,
.jig-header button:focus-visible,
.jig-drawer a:focus-visible,
.jig-drawer button:focus-visible {
  outline: 2px solid var(--jig-gold) !important;
  outline-offset: 2px;
}

/* ---------- Top bar ---------- */
.jig-topbar {
  position: relative;
  overflow: hidden;
  background: var(--jig-header-ink);
}
.jig-topbar__text,
.jig-topbar__group li {
  font-size: 12.5px !important;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: #ece7df !important;
  line-height: 1.4;
  white-space: nowrap;
}
/* Static copy: read by screen readers, shown instead of the ticker when motion is reduced */
.jig-topbar__text {
  position: absolute !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  margin: 0 !important;
}
.jig-topbar__track {
  display: flex;
  width: max-content;
  animation: jig-topbar-scroll 60s linear infinite;
}
.jig-topbar:hover .jig-topbar__track {
  animation-play-state: paused;
}
.jig-topbar__group {
  display: flex;
  margin: 0 !important;
  padding: 0 !important;
  list-style: none;
}
.jig-topbar__group li {
  position: relative;
  margin: 0 !important;
  padding: 9px 26px;
}
.jig-topbar__group li::before {
  content: "";
  position: absolute;
  top: 50%;
  left: -2px;
  width: 4px;
  height: 4px;
  margin-top: -2px;
  border-radius: 50%;
  background: var(--jig-gold, #b8954e);
}
@keyframes jig-topbar-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
@media (prefers-reduced-motion: reduce) {
  .jig-topbar__marquee {
    display: none;
  }
  .jig-topbar__text {
    position: static !important;
    width: auto;
    height: auto;
    clip: auto;
    padding: 9px 24px;
    text-align: center;
    white-space: normal;
  }
}

/* ---------- Main row ---------- */
.jig-header {
  position: sticky;
  top: var(--wp-admin--admin-bar--height, 0px);
  z-index: 1000;
  background: var(--jig-header-bg);
  border-bottom: 1px solid var(--jig-header-line);
  transition: box-shadow 0.3s ease;
}
.jig-header.is-stuck {
  box-shadow: 0 6px 24px rgba(28, 25, 23, 0.07);
}

.jig-header__main-inner {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 40px;
  height: var(--jig-header-main-h);
  transition: height 0.3s ease;
}
.jig-header.is-stuck .jig-header__main-inner {
  height: 68px;
}

.jig-header__burger {
  display: none !important;
}

.jig-logo {
  font-family: var(--jig-font-head) !important;
  font-size: 2.1rem;
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0.01em;
  color: var(--jig-header-ink) !important;
  white-space: nowrap;
}
.jig-logo::after {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-left: 3px;
  border-radius: 50%;
  background: var(--jig-gold);
}
.jig-logo:hover {
  color: var(--jig-header-ink) !important;
}

/* Search */
.jig-search {
  position: relative;
  justify-self: center;
  width: 100%;
  max-width: 560px;
  margin: 0;
}
.jig-header .jig-search__input {
  width: 100%;
  height: 48px;
  margin: 0;
  padding: 0 56px 0 20px !important;
  background: var(--jig-header-field) !important;
  border: 1px solid transparent !important;
  border-radius: 6px !important;
  font-size: 15px !important;
  color: var(--jig-header-ink) !important;
  box-shadow: none !important;
  transition: background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  -webkit-appearance: none;
  appearance: none;
}
.jig-header .jig-search__input::placeholder {
  color: #8a837b !important;
}
.jig-header .jig-search__input:focus {
  background: #fff !important;
  border-color: var(--jig-gold) !important;
  box-shadow: 0 0 0 3px rgba(184, 149, 78, 0.16) !important;
}
.jig-search__input::-webkit-search-cancel-button {
  display: none;
}
.jig-search__submit {
  position: absolute !important;
  top: 2px;
  right: 4px;
}

/* Account + cart */
.jig-header__actions {
  display: flex;
  align-items: center;
  gap: 6px;
}
.jig-cart {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 44px;
  padding: 0 10px 0 6px;
  border-radius: 22px;
  color: var(--jig-header-ink) !important;
  transition: background-color 0.2s ease;
}
.jig-cart:hover {
  background-color: rgba(28, 25, 23, 0.06);
  color: var(--jig-header-ink) !important;
}
.jig-cart__icon {
  position: relative;
  display: inline-flex;
  padding: 0 4px;
}
.jig-cart__count {
  position: absolute;
  top: -5px;
  right: -5px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 9px;
  background: var(--jig-gold);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  line-height: 18px;
  text-align: center;
}
.jig-cart__count[hidden] {
  display: none;
}
.jig-cart__total {
  font-family: var(--jig-font-body);
  font-size: 15px;
  font-weight: 600;
  white-space: nowrap;
}
.jig-cart__total .amount,
.jig-cart__total bdi {
  color: var(--jig-header-ink) !important;
}

/* Language picker */
.jig-lang {
  position: relative;
}
.jig-header .jig-lang__toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 44px;
  padding: 0 10px !important;
  border-radius: 22px !important;
  font-size: 13px !important;
  font-weight: 600;
  letter-spacing: 0.04em !important;
  color: var(--jig-header-ink) !important;
  cursor: pointer;
  transition: background-color 0.2s ease;
}
.jig-header .jig-lang__toggle:hover,
.jig-header .jig-lang__toggle[aria-expanded="true"] {
  background-color: rgba(28, 25, 23, 0.06) !important;
}
.jig-lang__toggle .jig-icon {
  width: 14px;
  height: 14px;
  transition: transform 0.2s ease;
}
.jig-lang__toggle[aria-expanded="true"] .jig-icon {
  transform: rotate(180deg);
}
.jig-lang__flag {
  display: block;
  width: 18px;
  height: 12px;
  border-radius: 2px;
  object-fit: cover;
  box-shadow: 0 0 0 1px rgba(28, 25, 23, 0.1);
}
.jig-lang__menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 1001;
  min-width: 170px;
  margin: 0 !important;
  padding: 6px;
  list-style: none;
  background: #fff;
  border: 1px solid var(--jig-header-line);
  border-radius: 10px;
  box-shadow: 0 16px 40px -12px rgba(28, 25, 23, 0.25);
}
.jig-lang__menu[hidden] {
  display: none;
}
.jig-lang__menu li {
  margin: 0;
}
.jig-lang__menu a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 6px;
  font-family: var(--jig-font-body) !important;
  font-size: 14px;
  color: var(--jig-header-ink) !important;
}
.jig-lang__menu a:hover {
  background: var(--jig-header-bg);
  color: var(--jig-header-ink) !important;
}
.jig-lang__menu a[aria-current="true"] {
  font-weight: 600;
}
.jig-lang__menu a[aria-current="true"]::after {
  content: '✓';
  margin-left: auto;
  color: var(--jig-gold);
}

/* ---------- Nav row ---------- */
.jig-nav {
  border-top: 1px solid var(--jig-header-line);
}
.jig-nav__inner {
  display: flex;
  align-items: stretch;
  gap: 40px;
  min-height: 52px;
}
.jig-header .jig-catalog-btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 236px;
  padding: 0 22px !important;
  background: var(--jig-header-ink) !important;
  color: #fff !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  letter-spacing: 0.08em !important;
  text-transform: uppercase !important;
  cursor: pointer;
  transition: background-color 0.2s ease;
}
.jig-header .jig-catalog-btn:hover,
.jig-header .jig-catalog-btn[aria-expanded="true"] {
  background: #3a332d !important;
}
.jig-catalog-btn .jig-icon {
  width: 20px;
  height: 20px;
}

.jig-nav__list {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px 34px;
  margin: 0 !important;
  padding: 0;
  list-style: none;
}
.jig-nav__list li {
  margin: 0;
}
.jig-nav__list a {
  position: relative;
  display: inline-block;
  padding: 6px 0;
  font-family: var(--jig-font-body) !important;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--jig-header-text) !important;
}
.jig-nav__list a::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1.5px;
  background: var(--jig-gold);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s ease;
}
.jig-nav__list a:hover,
.jig-nav__list a[aria-current="page"],
.jig-nav__list .current-menu-item > a {
  color: var(--jig-header-ink) !important;
}
.jig-nav__list a:hover::after,
.jig-nav__list a[aria-current="page"]::after,
.jig-nav__list .current-menu-item > a::after {
  transform: scaleX(1);
}

/* ---------- Catalog drawer ---------- */
.jig-drawer-overlay {
  position: fixed;
  inset: 0;
  z-index: 100000;
  background: rgba(28, 25, 23, 0.45);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0s linear 0.3s;
}
.jig-drawer {
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 100001;
  display: flex;
  flex-direction: column;
  width: min(380px, 88vw);
  background: #fff;
  box-shadow: 12px 0 40px rgba(28, 25, 23, 0.12);
  transform: translateX(-100%);
  visibility: hidden;
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1), visibility 0s linear 0.35s;
}
.jig-drawer-open .jig-drawer-overlay {
  opacity: 1;
  visibility: visible;
  transition: opacity 0.3s ease;
}
.jig-drawer-open .jig-drawer {
  transform: none;
  visibility: visible;
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}
.jig-drawer-open {
  overflow: hidden;
}
.admin-bar .jig-drawer {
  top: var(--wp-admin--admin-bar--height, 0px);
}

.jig-drawer__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 16px 18px 28px;
  border-bottom: 1px solid var(--jig-header-line);
}
.jig-drawer__title {
  margin: 0 !important;
  font-size: 13px !important;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--jig-muted) !important;
}
.jig-drawer__body {
  flex: 1;
  overflow-y: auto;
  padding: 8px 0 32px;
  overscroll-behavior: contain;
}

.jig-drawer__all {
  display: block;
  padding: 14px 28px;
  font-family: var(--jig-font-body) !important;
  font-size: 15px;
  font-weight: 600;
  color: var(--jig-header-ink) !important;
}
.jig-drawer__all:hover {
  background: var(--jig-header-bg);
  color: var(--jig-header-ink) !important;
}

.jig-cat-list {
  margin: 0 !important;
  padding: 0;
  list-style: none;
}
.jig-cat {
  margin: 0;
}
.jig-cat__row {
  display: flex;
  align-items: center;
}
.jig-cat__link {
  flex: 1;
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 12px 0 12px 28px;
  font-family: var(--jig-font-body) !important;
  font-size: 15px;
  font-weight: 500;
  color: var(--jig-header-ink) !important;
}
.jig-cat__link:hover {
  color: var(--jig-gold) !important;
}
.jig-cat__count {
  font-size: 12px;
  font-weight: 400;
  color: #a8a29e;
}
.jig-drawer .jig-cat__toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 46px;
  color: var(--jig-header-text) !important;
  cursor: pointer;
}
.jig-cat__toggle .jig-icon {
  width: 18px;
  height: 18px;
  transition: transform 0.25s ease;
}
.jig-cat__toggle[aria-expanded="true"] .jig-icon {
  transform: rotate(180deg);
}

/* Nested categories: indented, lighter */
.jig-cat__children {
  margin: 0 28px 6px;
  border-left: 1px solid var(--jig-header-line);
}
.jig-cat__children[hidden] {
  display: none;
}
.jig-cat__children .jig-cat__link {
  padding: 9px 0 9px 18px;
  font-size: 14.5px;
  font-weight: 400;
  color: var(--jig-header-text) !important;
}
.jig-cat__children .jig-cat__children {
  margin-right: 0;
}

/* Page links only show in the drawer on small screens, where the nav row is hidden */
.jig-drawer__pages {
  display: none;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--jig-header-line);
}
.jig-drawer__page-list {
  margin: 0 !important;
  padding: 0;
  list-style: none;
}
.jig-drawer__page-list a {
  display: block;
  padding: 11px 28px;
  font-family: var(--jig-font-body) !important;
  font-size: 14.5px;
  color: var(--jig-header-text) !important;
}

/* ---------- Tablet / mobile ---------- */
.jig-catalog-btn__short {
  display: none;
}
.jig-header .jig-catalog-btn {
  white-space: nowrap;
}
@media (max-width: 1150px) {
  .jig-catalog-btn__full {
    display: none;
  }
  .jig-catalog-btn__short {
    display: inline;
  }
  .jig-header .jig-catalog-btn {
    padding: 0 18px !important;
  }
  .jig-nav__inner {
    gap: 22px !important;
  }
  .jig-nav__list {
    gap: 4px 18px !important;
  }
}

/* Small laptops and landscape tablets: tighter spacing, and the row never wraps to a second line
   (it scrolls sideways on the narrowest widths instead) */
@media (max-width: 1279px) {
  .jig-nav__inner {
    gap: 28px;
  }
  .jig-nav__list {
    flex-wrap: nowrap;
    gap: 4px 22px;
    overflow-x: auto;
    scrollbar-width: none;
  }
  .jig-nav__list::-webkit-scrollbar {
    display: none;
  }
  .jig-nav__list a {
    font-size: 12px;
    letter-spacing: 0.05em;
    white-space: nowrap;
  }
  .jig-header .jig-catalog-btn {
    min-width: 0;
  }
}

@media (max-width: 1000px) {
  .jig-header__main-inner {
    gap: 24px;
  }
  .jig-nav__inner {
    gap: 28px;
  }
  .jig-nav__list {
    gap: 4px 24px;
  }
  .jig-header .jig-catalog-btn {
    min-width: 0;
  }
}

@media (max-width: 860px) {
  :root {
    --jig-header-main-h: 64px;
  }
  .jig-container {
    padding: 0 16px;
  }
  .jig-topbar__text,
  .jig-topbar__group li {
    font-size: 11.5px !important;
  }
  .jig-topbar__group li {
    padding: 7px 20px;
  }
  .jig-header__main-inner {
    grid-template-columns: auto 1fr auto;
    grid-template-areas:
      "burger logo actions"
      "search search search";
    gap: 0 8px;
    height: auto;
    padding-top: 8px;
    padding-bottom: 12px;
  }
  .jig-header.is-stuck .jig-header__main-inner {
    height: auto;
  }
  .jig-header__burger {
    display: inline-flex !important;
    grid-area: burger;
    margin-left: -10px;
  }
  .jig-logo {
    grid-area: logo;
    justify-self: center;
    font-size: 1.8rem;
  }
  .jig-header__actions {
    grid-area: actions;
    gap: 0;
    margin-right: -6px;
  }
  .jig-cart__total {
    display: none;
  }
  .jig-cart {
    padding: 0 8px;
  }
  .jig-search {
    grid-area: search;
    max-width: none;
    margin-top: 6px;
  }
  .jig-header .jig-search__input {
    height: 44px;
    font-size: 16px !important; /* stops iOS zooming into the field */
  }
  .jig-search__submit {
    top: 0;
  }
  .jig-nav {
    display: none;
  }
  .jig-drawer__pages {
    display: block;
  }
}

@media (prefers-reduced-motion: reduce) {
  .jig-drawer,
  .jig-drawer-overlay,
  .jig-header__main-inner,
  .jig-nav__list a::after {
    transition: none !important;
  }
}
