/* JIARON default theme — page chrome: announcement bar, header, nav,
   mega menu, mobile nav, drawers, overlay, footer. */

/* ============================================================
   Announcement bar
   ============================================================ */
.jr-announce {
  background: var(--jr-primary);
  color: var(--jr-on-primary);
  font-size: var(--jr-text-sm);
  line-height: var(--jr-text-sm-lh);
}

.jr-announce__inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  min-height: 2.5rem;
  padding: 0.35rem 0;
  text-align: center;
}

.jr-announce a {
  color: inherit;
  font-weight: 600;
  text-underline-offset: 0.25em;
}

.jr-announce a:hover {
  color: inherit;
}

.jr-announce__aside {
  display: none;
  gap: 1.25rem;
  margin-left: auto;
}

.jr-announce__lead {
  margin-inline: auto;
}

@media (min-width: 1024px) {
  .jr-announce__aside {
    display: inline-flex;
  }
}

/* ============================================================
   Header
   ============================================================ */
.jr-header {
  position: relative;
  z-index: var(--jr-z-header);
  background: var(--jr-white);
}

.jr-header__main-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.75rem 1.25rem;
  padding: 1rem 0;
}

.jr-brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  color: var(--jr-ink);
  min-width: 0;
}

.jr-brand:hover {
  color: var(--jr-ink);
}

.jr-brand__logo {
  height: 2.25rem;
  width: auto;
  max-width: 9rem;
  object-fit: contain;
  flex-shrink: 0;
}

.jr-brand__name {
  font-family: var(--jr-font-display);
  font-weight: 700;
  font-size: clamp(1rem, 3.5vw, 1.35rem);
  letter-spacing: var(--jr-tracking-tight);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ---------- Search ---------- */
.jr-search {
  display: none;
  flex: 1 1 12rem;
  align-items: stretch;
  min-width: 0;
  position: relative;
}

.jr-search--mobile,
.jr-search--shop {
  display: flex;
  width: 100%;
}

.jr-search--shop {
  margin-bottom: 1.25rem;
}

.jr-search__field {
  position: relative;
  flex: 1;
  min-width: 0;
  display: flex;
}

.jr-search__input {
  flex: 1;
  min-width: 0;
  width: 100%;
  border: 1px solid var(--jr-line);
  border-right: 0;
  border-radius: var(--jr-r-pill) 0 0 var(--jr-r-pill);
  padding: 0.7rem 1.15rem;
  font-size: var(--jr-text-sm);
  background: var(--jr-white);
  color: var(--jr-ink);
}

.jr-search__input:focus {
  outline: none;
  border-color: var(--jr-primary);
  position: relative;
  z-index: 1;
}

.jr-search__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  border: 1px solid var(--jr-primary);
  background: var(--jr-primary);
  color: var(--jr-on-primary);
  border-radius: 0 var(--jr-r-pill) var(--jr-r-pill) 0;
  padding: 0.7rem 1.35rem;
  font-size: var(--jr-text-sm);
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: background var(--jr-dur) var(--jr-ease);
}

.jr-search__btn:hover {
  background: var(--jr-primary-dark);
}

.jr-search__btn-label {
  display: none;
}

@media (min-width: 1200px) {
  .jr-search__btn-label {
    display: inline;
  }
}

.jr-search__suggest {
  position: absolute;
  top: calc(100% + 0.5rem);
  left: 0;
  right: 0;
  z-index: var(--jr-z-suggest);
  margin: 0;
  padding: 0.35rem 0;
  list-style: none;
  background: var(--jr-white);
  border: 1px solid var(--jr-line);
  border-radius: var(--jr-r-media);
  box-shadow: var(--jr-z12);
  max-height: 24rem;
  overflow: auto;
}

.jr-search__suggest[hidden] {
  display: none !important;
}

.jr-search__hit {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.6rem 0.9rem;
  text-decoration: none;
  color: var(--jr-ink);
}

.jr-search__hit:hover,
.jr-search__hit:focus {
  background: var(--jr-primary-veil);
  color: var(--jr-ink);
  outline: none;
}

.jr-search__thumb {
  width: 2.75rem;
  height: 2.75rem;
  border-radius: var(--jr-r-sm);
  object-fit: contain;
  background: var(--jr-plate);
  flex-shrink: 0;
}

.jr-search__thumb--empty {
  display: block;
  border: 1px solid var(--jr-line);
}

.jr-search__hit-text {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  min-width: 0;
}

.jr-search__hit-name {
  font-weight: 600;
  font-size: var(--jr-text-sm);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.jr-search__hit-price {
  font-size: var(--jr-text-xs);
  color: var(--jr-muted);
}

/* ---------- Header actions ---------- */
.jr-header__actions {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  justify-self: end;
}

.jr-header__action {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.35rem 0.5rem 0.35rem 0.35rem;
  text-decoration: none;
  color: var(--jr-ink);
  background: none;
  border: 0;
  cursor: pointer;
}

.jr-header__action:hover {
  color: var(--jr-primary);
}

.jr-header__action-text {
  display: none;
  flex-direction: column;
  line-height: 1.2;
  text-align: left;
  min-width: 2.5rem;
  margin-left: 0.1rem;
}

.jr-header__action-text small {
  font-size: var(--jr-text-xs);
  color: var(--jr-disabled);
  white-space: nowrap;
}

.jr-header__action-text strong {
  font-size: var(--jr-text-sm);
  font-weight: 600;
  white-space: nowrap;
}

@media (min-width: 1400px) {
  .jr-header__action-text {
    display: flex;
  }
}

.jr-cart-badge {
  display: none;
  position: absolute;
  top: -0.2rem;
  left: 1.35rem;
  min-width: 1.15rem;
  height: 1.15rem;
  padding: 0 0.28rem;
  border-radius: var(--jr-r-pill);
  background: var(--jr-error);
  color: var(--jr-white);
  font-size: 0.65rem;
  font-weight: 700;
  line-height: 1.15rem;
  text-align: center;
  box-shadow: 0 0 0 2px var(--jr-white);
}

.jr-cart-badge.is-visible {
  display: block;
}

.jr-menu-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  border: 1px solid var(--jr-line);
  background: var(--jr-white);
  border-radius: var(--jr-r-pill);
  padding: 0;
  color: var(--jr-ink);
  cursor: pointer;
}

.jr-menu-btn:hover {
  border-color: var(--jr-primary);
  color: var(--jr-primary);
}

/* ============================================================
   Nav row (sticky)
   ============================================================ */
.jr-header__nav {
  /* Containing block for the absolutely positioned mega panel. */
  position: relative;
  border-top: 1px solid var(--jr-line);
  border-bottom: 1px solid var(--jr-line);
  background: var(--jr-white);
}

.jr-header__nav.is-stuck {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: var(--jr-z-header);
  border-top-color: transparent;
  box-shadow: var(--jr-z24);
  animation: jr-fade-down 400ms var(--jr-ease);
}

.jr-header__nav-inner {
  display: none;
  align-items: center;
  gap: 1.5rem;
  min-height: 3.5rem;
}

@media (min-width: 1024px) {
  .jr-header__nav-inner {
    display: flex;
  }
}

.jr-nav {
  display: flex;
  align-items: center;
  gap: clamp(0.75rem, 1.6vw, 1.5rem);
  font-size: var(--jr-text-sm);
  font-weight: 500;
}

.jr-nav a {
  text-decoration: none;
  color: var(--jr-ink-2);
  padding: 0.35rem 0;
}

.jr-nav a:hover,
.jr-nav a[aria-current="page"] {
  color: var(--jr-primary);
}

.jr-nav__spacer {
  margin-left: auto;
}

.jr-nav__contact {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: var(--jr-text-sm);
  font-weight: 600;
  color: var(--jr-ink);
  text-decoration: none;
}

/* ---------- Categories dropdown / mega menu ---------- */
.jr-nav__mega {
  position: static;
}

.jr-nav__mega-trigger {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  border: 0;
  background: var(--jr-primary);
  color: var(--jr-on-primary);
  padding: 0.7rem 1.25rem;
  border-radius: var(--jr-r-pill);
  font-size: var(--jr-text-sm);
  font-weight: 600;
  line-height: 1.4;
  cursor: pointer;
  transition: background var(--jr-dur) var(--jr-ease);
}

.jr-nav__mega-trigger:hover {
  background: var(--jr-primary-dark);
}

.jr-nav__mega-trigger::after {
  content: "";
  width: 0.4rem;
  height: 0.4rem;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg) translateY(-1px);
  transition: transform var(--jr-dur) var(--jr-ease);
}

.jr-nav__mega.is-open .jr-nav__mega-trigger::after {
  transform: rotate(225deg) translateY(1px);
}

.jr-mega-menu {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translate(-50%, 1rem);
  width: min(var(--jr-max), calc(100vw - 2rem));
  padding: 1.5rem;
  border-radius: var(--jr-r-media);
  background: var(--jr-white);
  box-shadow: var(--jr-z12);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition:
    opacity var(--jr-dur) var(--jr-ease),
    transform var(--jr-dur) var(--jr-ease),
    visibility var(--jr-dur) var(--jr-ease);
  z-index: var(--jr-z-mega);
}

.jr-nav__mega.is-open .jr-mega-menu {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translate(-50%, 0);
}

.jr-mega-menu__grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.25rem 2rem;
  max-height: min(70vh, 34rem);
  overflow: auto;
  scrollbar-width: thin;
}

.jr-mega-col {
  min-width: 0;
}

.jr-mega-col__title {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-bottom: 0.75rem;
  font-family: var(--jr-font-display);
  font-weight: 700;
  font-size: var(--jr-text-base);
  color: var(--jr-ink);
  text-decoration: none;
  line-height: 1.3;
}

.jr-mega-col__thumb {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: var(--jr-r-pill);
  background: var(--jr-plate);
  object-fit: contain;
  flex-shrink: 0;
}

.jr-mega-sub,
.jr-mega-leaf {
  margin: 0;
  padding: 0;
  list-style: none;
}

.jr-mega-sub {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.jr-mega-sub__title {
  display: block;
  font-size: var(--jr-text-sm);
  font-weight: 600;
  color: var(--jr-ink-2);
  text-decoration: none;
  line-height: 1.3;
}

.jr-mega-leaf {
  margin-top: 0.35rem;
  padding-left: 0.75rem;
  border-left: 1px solid var(--jr-line);
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.jr-mega-leaf a {
  font-size: var(--jr-text-xs);
  line-height: var(--jr-text-xs-lh);
  color: var(--jr-muted);
  text-decoration: none;
}

.jr-mega-col a:hover,
.jr-mega-col a:focus-visible {
  color: var(--jr-primary);
}

@media (max-width: 1279px) {
  .jr-mega-menu__grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* ============================================================
   Mobile nav
   ============================================================ */
.jr-nav-mobile {
  display: none;
  flex-direction: column;
  gap: 0.5rem;
  padding: 0.85rem 0 1.25rem;
  border-top: 1px solid var(--jr-line);
}

.jr-nav-mobile.is-open {
  display: flex;
}

.jr-nav-mobile a {
  text-decoration: none;
  padding: 0.65rem 0;
  color: var(--jr-ink);
  font-weight: 500;
  border-bottom: 1px solid var(--jr-line);
}

.jr-nav-mobile a:last-child {
  border-bottom: none;
}

@media (min-width: 1024px) {
  .jr-nav-mobile {
    display: none !important;
  }
}

@media (min-width: 900px) {
  .jr-header__main-inner {
    grid-template-columns: auto minmax(14rem, 1fr) auto;
  }

  .jr-search {
    display: flex;
  }

  .jr-menu-btn {
    display: none;
  }
}

@media (min-width: 1024px) {
  .jr-menu-btn {
    display: none;
  }
}

@media (max-width: 899px) {
  .jr-header__main-inner .jr-search {
    display: none;
  }
}

/* ============================================================
   Overlay + drawers
   ============================================================ */
.jr-overlay {
  position: fixed;
  inset: 0;
  z-index: var(--jr-z-overlay);
  background: rgba(22, 28, 36, 0.48);
  opacity: 0;
  visibility: hidden;
  transition:
    opacity var(--jr-dur-drawer) var(--jr-ease-drawer),
    visibility var(--jr-dur-drawer) var(--jr-ease-drawer);
}

.jr-overlay[data-state="open"] {
  opacity: 1;
  visibility: visible;
}

.jr-drawer {
  position: fixed;
  top: 0;
  right: 0;
  z-index: var(--jr-z-drawer);
  display: flex;
  flex-direction: column;
  width: min(100%, 28rem);
  height: 100vh;
  height: 100dvh;
  background: var(--jr-white);
  box-shadow: var(--jr-z-dark);
  transform: translateX(100%);
  visibility: hidden;
  transition:
    transform var(--jr-dur-drawer) var(--jr-ease-drawer),
    visibility var(--jr-dur-drawer) var(--jr-ease-drawer);
}

.jr-drawer[data-state="open"] {
  transform: none;
  visibility: visible;
}

.jr-drawer--left {
  right: auto;
  left: 0;
  transform: translateX(-100%);
}

.jr-drawer--wide {
  width: min(100%, 60rem);
}

/* Floating card treatment on large screens, like the Sellzy reference. */
@media (min-width: 1024px) {
  .jr-drawer--float {
    top: 1.5rem;
    right: 1.35rem;
    height: calc(100vh - 3rem);
    border-radius: var(--jr-r-card);
    overflow: hidden;
  }
}

.jr-drawer__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--jr-line);
  flex-shrink: 0;
}

.jr-drawer__title {
  margin: 0;
  font-size: var(--jr-text-lg);
  line-height: var(--jr-text-lg-lh);
}

.jr-drawer__body {
  flex: 1;
  overflow-y: auto;
  padding: 1.5rem;
}

.jr-drawer__foot {
  border-top: 1px solid var(--jr-line);
  padding: 1.25rem 1.5rem;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

/* ============================================================
   Footer
   ============================================================ */
.jr-footer {
  margin-top: var(--jr-section-y);
  background: var(--jr-gray-100);
  border-top: 1px solid var(--jr-line);
}

.jr-footer__grid {
  display: grid;
  gap: 2rem;
  padding: clamp(2.5rem, 5vw, 4rem) 0 2.5rem;
}

@media (min-width: 640px) {
  .jr-footer__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1024px) {
  .jr-footer__grid {
    grid-template-columns: 1.6fr repeat(3, minmax(0, 1fr));
    gap: 3rem;
  }
}

.jr-footer h3,
.jr-footer h4 {
  font-size: var(--jr-text-base);
  margin-bottom: 1rem;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.jr-footer h4 .jr-icon {
  color: var(--jr-primary);
}

.jr-footer p,
.jr-footer a {
  color: var(--jr-muted);
  font-size: var(--jr-text-sm);
  line-height: var(--jr-text-sm-lh);
}

.jr-footer ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.jr-footer a {
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.jr-footer a:hover {
  color: var(--jr-primary);
}

.jr-footer__social {
  display: flex;
  flex-direction: row;
  gap: 0.5rem;
  margin-top: 1.25rem;
}

.jr-footer__bar {
  border-top: 1px solid var(--jr-line);
  padding: 1.25rem var(--jr-space);
  text-align: center;
  font-size: var(--jr-text-xs);
  line-height: var(--jr-text-xs-lh);
  color: var(--jr-muted);
}
