/**
 * Q8Kart storefront — Jarir-inspired UI
 * White chrome · Red accent #E31C23 · Soft gray page · Rounded cards
 * Layout reference: https://www.jarir.com/kw-en/
 */
:root {
  --jr-red: #e31c23;
  --jr-red-deep: #c4161c;
  --jr-ink: #222222;
  --jr-muted: #6b6b6b;
  --jr-line: #e8e8e8;
  --jr-page: #ffffff;
  --jr-soft: #f3f3f3;
  --jr-soft-2: #f7f7f7;
  --jr-white: #ffffff;
  --jr-price: #e31c23;
  --jr-radius: 16px;
  --jr-radius-sm: 12px;
  --jr-max: 1280px;
  --jr-font: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --jr-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
  --jr-ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*, *::before, *::after { box-sizing: border-box; }

html {
  background: var(--jr-white) !important;
  width: 100%;
  max-width: 100%;
  -webkit-text-size-adjust: 100%;
}

html, body {
  font-family: var(--jr-font) !important;
  color: var(--jr-ink);
  line-height: 1.45;
}

body {
  display: block !important;
  background: var(--jr-white) !important;
  min-height: 100%;
  width: 100%;
  max-width: 100%;
  margin: 0;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
}

img, svg, video { max-width: 100%; height: auto; }
a { color: var(--jr-ink); transition: color 0.15s var(--jr-ease); }
:focus-visible { outline: 2px solid var(--jr-red); outline-offset: 2px; }
[x-cloak] { display: none !important; }

.page-wrapper {
  width: 100%;
  max-width: 100%;
  min-height: 100vh;
  background: var(--jr-white);
  overflow-x: clip;
}

/* —— Sticky Jarir header —— */
.page-header {
  position: sticky;
  top: 0;
  z-index: 100;
  width: 100%;
  background: var(--jr-white);
}

.jr-chrome { width: 100%; }

.jr-header {
  position: sticky;
  top: 0;
  z-index: 100;
  width: 100%;
  background: var(--jr-white);
  border-bottom: 1px solid transparent;
  padding-top: env(safe-area-inset-top, 0px);
  transition: box-shadow 0.2s var(--jr-ease), border-color 0.2s var(--jr-ease);
}

.jr-header.is-scrolled {
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  border-bottom-color: var(--jr-line);
}

.jr-header__bar { background: var(--jr-white); }

.jr-header__inner {
  max-width: var(--jr-max);
  margin: 0 auto;
  padding: 0.55rem 0.75rem;
  display: grid;
  grid-template-columns: auto auto minmax(0, 1fr) auto;
  grid-template-areas: "menu logo search actions";
  align-items: center;
  gap: 0.55rem 0.5rem;
  width: 100%;
}

@media (max-width: 639px) {
  .jr-header__inner {
    grid-template-columns: auto auto 1fr auto;
    grid-template-areas: "menu logo search actions";
  }
}

@media (min-width: 1024px) {
  .jr-header__inner {
    padding: 0.75rem 1.25rem;
    gap: 0.85rem 1rem;
  }
  .jr-header__menu { display: none !important; }
  .jr-header__inner {
    grid-template-columns: auto minmax(0, 1fr) auto;
    grid-template-areas: "logo search actions";
  }
}

.jr-header__menu { grid-area: menu; }
.jr-header__logo { grid-area: logo; min-width: 0; }
.jr-header__search { grid-area: search; min-width: 0; }
.jr-header__actions {
  grid-area: actions;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.jr-logo {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  text-decoration: none !important;
  color: var(--jr-ink) !important;
}
.jr-logo__mark {
  width: 2.15rem;
  height: 2.15rem;
  border-radius: 999px;
  background: var(--jr-red);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  flex-shrink: 0;
}
.jr-logo__text {
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
@media (max-width: 420px) {
  .jr-logo__text { display: none; }
}

.jr-icon-btn {
  position: relative;
  width: 2.5rem;
  height: 2.5rem;
  border: 0;
  border-radius: 999px;
  background: var(--jr-soft);
  color: var(--jr-ink) !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none !important;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.jr-header__cart { background: var(--jr-soft); }
.jr-header__account { background: transparent; }
@media (max-width: 639px) {
  .jr-header__account { display: none; }
}

.jr-cart-badge {
  position: absolute;
  top: -0.1rem;
  right: -0.1rem;
  min-width: 1.05rem;
  height: 1.05rem;
  padding: 0 0.25rem;
  border-radius: 999px;
  background: var(--jr-red);
  color: #fff !important;
  font-size: 0.65rem;
  font-weight: 700;
  line-height: 1.05rem;
  text-align: center;
}

/* Search — pill like Jarir */
.jr-search__form {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  min-height: 42px;
  padding: 0.2rem 0.35rem 0.2rem 0.85rem;
  background: var(--jr-soft);
  border-radius: 999px;
}
.jr-search__icon {
  display: inline-flex;
  color: #888;
  flex-shrink: 0;
}
.jr-search__input {
  flex: 1;
  min-width: 0;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  padding: 0.45rem 0.35rem !important;
  font-size: 15px !important;
  color: var(--jr-ink) !important;
}
.jr-search__input::placeholder { color: #9a9a9a; }
.jr-search__btn {
  display: none;
  border: 0;
  background: var(--jr-red);
  color: #fff;
  border-radius: 999px;
  padding: 0.45rem 0.9rem;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
}
@media (min-width: 768px) {
  .jr-search__btn { display: inline-flex; }
  .jr-search__form { min-height: 46px; }
}
.jr-search__suggest {
  position: absolute;
  left: 0; right: 0;
  top: calc(100% + 6px);
  z-index: 50;
  background: #fff;
  border: 1px solid var(--jr-line);
  border-radius: var(--jr-radius-sm);
  box-shadow: var(--jr-shadow);
  overflow: hidden;
}
.jr-search__suggest-item {
  width: 100%;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem 1rem;
  border: 0;
  background: #fff;
  text-align: left;
  cursor: pointer;
}
.jr-search__suggest-item:hover { background: var(--jr-soft); }
.jr-search__suggest-count { color: var(--jr-muted); }

/* Drawer */
.jr-drawer { position: fixed; inset: 0; z-index: 120; }
.jr-drawer__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(17, 17, 17, 0.45);
  backdrop-filter: blur(2px);
}
.jr-drawer__panel {
  position: absolute;
  top: 0; left: 0; bottom: 0;
  width: min(88vw, 340px);
  background: #fff;
  box-shadow: 12px 0 40px rgba(0,0,0,.18);
  display: flex;
  flex-direction: column;
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
  overflow: hidden;
}

.jr-drawer__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.95rem 1rem;
  border-bottom: 1px solid var(--jr-line);
  background: #fff;
}
.jr-drawer__brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none !important;
  color: var(--jr-ink) !important;
  min-width: 0;
}
.jr-drawer__brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
  min-width: 0;
}
.jr-drawer__brand-text strong {
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: 0.02em;
}
.jr-drawer__brand-text small {
  color: var(--jr-muted);
  font-size: 0.72rem;
  font-weight: 500;
}
.jr-drawer__close {
  width: 2.35rem;
  height: 2.35rem;
  border: 0;
  border-radius: 999px;
  background: var(--jr-soft);
  color: var(--jr-ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
}

.jr-drawer__body {
  overflow: auto;
  flex: 1;
  padding: 0.85rem 0.9rem 1.25rem;
  -webkit-overflow-scrolling: touch;
}

.jr-drawer__auth {
  padding: 1rem;
  border-radius: 14px;
  background: linear-gradient(145deg, #fff5f5 0%, #ffe9ea 55%, #fff 100%);
  border: 1px solid #f3d0d2;
  margin-bottom: 0.9rem;
}
.jr-drawer__auth-title {
  margin: 0 0 0.85rem;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--jr-ink);
  line-height: 1.35;
}
.jr-drawer__auth-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
}
.jr-drawer__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0.55rem 0.7rem;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 700;
  text-decoration: none !important;
}
.jr-drawer__btn--primary {
  background: var(--jr-red) !important;
  color: #fff !important;
}
.jr-drawer__btn--ghost {
  background: #fff !important;
  color: var(--jr-red) !important;
  border: 1.5px solid #f0b8bb;
}

.jr-drawer__quick {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.55rem;
  margin-bottom: 1.15rem;
}
.jr-drawer__quick-item {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.75rem 0.7rem;
  border-radius: 12px;
  background: var(--jr-soft-2);
  border: 1px solid var(--jr-line);
  text-decoration: none !important;
  color: var(--jr-ink) !important;
  font-size: 0.8rem;
  font-weight: 700;
}
.jr-drawer__quick-icon {
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  background: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--jr-red);
  flex-shrink: 0;
  box-shadow: 0 1px 4px rgba(0,0,0,.05);
}

.jr-drawer__section { margin-bottom: 0.5rem; }
.jr-drawer__section-title {
  margin: 0 0 0.65rem;
  padding: 0 0.15rem;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--jr-muted);
}

.jr-drawer__cats {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--jr-line);
  border-radius: 14px;
  overflow: hidden;
  background: #fff;
}
.jr-drawer__cat {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.78rem 0.85rem;
  text-decoration: none !important;
  color: var(--jr-ink) !important;
  border-bottom: 1px solid var(--jr-line);
  transition: background 0.15s var(--jr-ease);
}
.jr-drawer__cat:last-child { border-bottom: 0; }
.jr-drawer__cat:active,
.jr-drawer__cat:hover { background: var(--jr-soft-2); }
.jr-drawer__cat-icon {
  width: 2.35rem;
  height: 2.35rem;
  border-radius: 999px;
  background-color: var(--jr-cat-bg, #eee);
  flex-shrink: 0;
}
.jr-drawer__cat-label {
  flex: 1;
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.25;
}
.jr-drawer__cat-chevron {
  color: #b0b0b0;
  display: inline-flex;
}

.jr-drawer__menu-fallback:empty,
.jr-drawer__menu-fallback:not(:has(a)) { display: none; }
.jr-drawer__menu-fallback nav,
.jr-drawer__menu-fallback .navigation,
.jr-drawer__menu-fallback ul {
  list-style: none;
  margin: 0.85rem 0 0;
  padding: 0;
}
.jr-drawer__menu-fallback a {
  display: block;
  padding: 0.75rem 0.85rem;
  color: var(--jr-ink) !important;
  text-decoration: none !important;
  font-weight: 600;
  border-bottom: 1px solid var(--jr-line);
}

.jr-drawer__foot {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  padding: 0.85rem 1rem;
  border-top: 1px solid var(--jr-line);
  background: var(--jr-soft-2);
  font-size: 0.8rem;
}
.jr-drawer__foot a {
  color: var(--jr-muted) !important;
  text-decoration: none !important;
  font-weight: 600;
}
.jr-drawer__foot a:hover { color: var(--jr-red) !important; }

html.jr-drawer-open, body.jr-drawer-open { overflow: hidden !important; }

nav.q8kart-mobile-tabbar,
#q8kart-wide-nav.q8kart-mobile-tabbar { display: none !important; }

/* —— Mobile bottom tab bar —— */
.jr-tabbar {
  display: none;
}
@media (max-width: 767px) {
  .jr-tabbar {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 80;
    height: calc(3.55rem + env(safe-area-inset-bottom, 0px));
    padding: 0.35rem 0.25rem calc(0.35rem + env(safe-area-inset-bottom, 0px));
    background: #fff;
    border-top: 1px solid var(--jr-line);
    box-shadow: 0 -6px 20px rgba(0, 0, 0, 0.06);
  }
  body {
    padding-bottom: calc(3.55rem + env(safe-area-inset-bottom, 0px)) !important;
  }
  body.jr-drawer-open .jr-tabbar {
    opacity: 0;
    pointer-events: none;
  }
}
.jr-tabbar__item {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--jr-muted);
  text-decoration: none !important;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.15rem;
  min-width: 0;
  padding: 0.2rem;
  font: inherit;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.jr-tabbar__item:hover,
.jr-tabbar__item:focus-visible {
  color: var(--jr-red);
  outline: none;
}
.jr-tabbar__icon {
  position: relative;
  display: inline-flex;
  width: 1.45rem;
  height: 1.45rem;
  align-items: center;
  justify-content: center;
}
.jr-tabbar__icon svg { display: block; }
.jr-tabbar__label {
  font-size: 0.68rem;
  font-weight: 650;
  line-height: 1.1;
  white-space: nowrap;
}
.jr-tabbar__badge {
  position: absolute;
  top: -0.35rem;
  right: -0.55rem;
  min-width: 1rem;
  height: 1rem;
  padding: 0 0.25rem;
  border-radius: 999px;
  background: var(--jr-red);
  color: #fff;
  font-size: 0.62rem;
  font-weight: 700;
  line-height: 1rem;
  text-align: center;
}

/* —— Homepage —— */
.jr-home {
  width: 100%;
  padding: 0 0 2rem;
  overflow-x: hidden;
  background: var(--jr-white);
}

body.cms-home .page-main,
body.q8kart-home .page-main,
body.cms-index-index .page-main {
  padding: 0 !important;
  max-width: none !important;
  background: var(--jr-white);
}
body.cms-home .columns,
body.q8kart-home .columns,
body.cms-index-index .columns {
  padding-left: 0 !important;
  padding-right: 0 !important;
  max-width: none !important;
}
body.cms-home .column.main,
body.q8kart-home .column.main,
body.cms-index-index .column.main {
  padding-left: 0 !important;
  padding-right: 0 !important;
  width: 100% !important;
}
body.cms-index-index .page-title-wrapper { display: none; }

.jr-hero {
  max-width: var(--jr-max);
  margin: 0 auto;
  padding: 0.85rem 0.75rem 0;
}
@media (min-width: 768px) {
  .jr-hero { padding: 1rem 1.15rem 0; }
}
.jr-hero__frame {
  position: relative;
  overflow: hidden;
  border-radius: var(--jr-radius);
  background: var(--jr-soft);
}
.jr-hero__track {
  display: flex;
  width: 100%;
  transition: transform 0.45s var(--jr-ease);
}
.jr-hero__slide {
  flex: 0 0 100%;
  width: 100%;
  display: block;
  line-height: 0;
}
.jr-hero__slide img {
  width: 100%;
  height: 160px;
  object-fit: cover;
  display: block;
}
@media (min-width: 768px) {
  .jr-hero__slide img { height: 220px; }
}
@media (min-width: 1200px) {
  .jr-hero__slide img { height: 260px; }
}

.jr-rail-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  width: 2.35rem;
  height: 2.35rem;
  border: 0;
  border-radius: 999px;
  background: rgba(120, 120, 120, 0.35);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  backdrop-filter: blur(4px);
}
.jr-rail-btn--prev { left: 0.55rem; }
.jr-rail-btn--next { right: 0.55rem; }
.jr-rail-wrap .jr-rail-btn--prev { display: none; }

.jr-section {
  max-width: var(--jr-max);
  margin: 0 auto;
  padding: 1.35rem 0.75rem 0.15rem;
}
@media (min-width: 768px) {
  .jr-section { padding: 1.6rem 1.15rem 0.25rem; }
}
.jr-section__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.9rem;
}
.jr-section__title {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--jr-ink);
}
@media (min-width: 768px) {
  .jr-section__title { font-size: 1.4rem; }
}
.jr-section__link {
  color: var(--jr-red) !important;
  font-size: 0.85rem;
  font-weight: 700;
  text-decoration: none !important;
}

.jr-rail-wrap { position: relative; }
.jr-rail {
  display: flex;
  gap: 0.7rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  padding: 0.15rem 2.2rem 0.35rem 0.1rem;
  scrollbar-width: none;
}
.jr-rail::-webkit-scrollbar { display: none; }

.jr-cat {
  flex: 0 0 7.6rem;
  scroll-snap-align: start;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  gap: 0.55rem;
  min-height: 0;
  padding: 0;
  border-radius: var(--jr-radius-sm);
  background: transparent;
  text-decoration: none !important;
  color: var(--jr-ink) !important;
  transition: transform 0.15s var(--jr-ease);
}
@media (min-width: 768px) {
  .jr-cat { flex-basis: 8.6rem; }
}
.jr-cat:hover { transform: translateY(-2px); }
.jr-cat__media {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: var(--jr-radius-sm);
  overflow: hidden;
  background: var(--jr-cat-bg, #eee);
  box-shadow: none;
  display: block;
  position: relative;
}
.jr-cat__media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}
.jr-cat__fallback {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--jr-ink);
}
.jr-cat__label {
  text-align: center;
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.25;
  padding: 0 0.2rem;
}
.jr-cat-empty {
  margin: 0;
  padding: 0.75rem;
  color: var(--jr-muted);
  font-size: 0.9rem;
}

.jr-drawer__cat-media {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 999px;
  overflow: hidden;
  background: var(--jr-cat-bg, #eee);
  display: grid;
  place-items: center;
  flex-shrink: 0;
  box-shadow: inset 0 0 0 3px #fff;
}
.jr-drawer__cat-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.jr-drawer__empty {
  margin: 0;
  padding: 0.85rem;
  color: var(--jr-muted);
  font-size: 0.85rem;
}

.jr-rail--brands { padding-right: 2.2rem; }
.jr-brand {
  flex: 0 0 8.5rem;
  scroll-snap-align: start;
  min-height: 4.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.65rem 0.85rem;
  border: 1px solid var(--jr-line);
  border-radius: var(--jr-radius-sm);
  background: #fff;
  text-decoration: none !important;
  color: var(--jr-ink) !important;
  font-weight: 700;
  font-size: 0.9rem;
}
.jr-brand__logo {
  display: block;
  width: 100%;
  max-width: 6.5rem;
  height: 2.75rem;
  object-fit: contain;
}
.jr-brand--all {
  color: var(--jr-red) !important;
  border-color: #f0c8ca;
  background: #fff7f7;
}

.jr-products {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.7rem;
}
@media (min-width: 768px) {
  .jr-products { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0.9rem; }
}
.jr-product {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid var(--jr-line);
  border-radius: var(--jr-radius-sm);
  padding: 0.7rem;
  text-decoration: none !important;
  color: var(--jr-ink) !important;
  transition: box-shadow 0.15s var(--jr-ease), transform 0.15s var(--jr-ease);
}
.jr-product:hover { box-shadow: var(--jr-shadow); transform: translateY(-2px); }
.jr-product__media {
  aspect-ratio: 1;
  border-radius: 10px;
  overflow: hidden;
  background: var(--jr-soft-2);
  margin-bottom: 0.55rem;
}
.jr-product__media img { width: 100%; height: 100%; object-fit: contain; }
.jr-product__name {
  font-size: 0.8rem;
  line-height: 1.35;
  margin-bottom: 0.35rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.15em;
}
.jr-product__was { color: var(--jr-muted); text-decoration: line-through; font-size: 0.72rem; display: block; }
.jr-product__now { color: var(--jr-price); font-weight: 800; font-size: 0.95rem; }
.jr-product__now small { font-size: 0.65rem; font-weight: 600; }

.jr-services {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.7rem;
}
@media (min-width: 900px) {
  .jr-services { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
.jr-service {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  padding: 1rem 0.9rem;
  border: 1px solid var(--jr-line);
  border-radius: var(--jr-radius-sm);
  text-decoration: none !important;
  color: var(--jr-ink) !important;
  background: var(--jr-soft-2);
}
.jr-service strong { font-size: 0.9rem; }
.jr-service span { font-size: 0.75rem; color: var(--jr-muted); }

.jr-trust {
  max-width: var(--jr-max);
  margin: 1.5rem auto 0;
  padding: 0.5rem 0.75rem 0;
  display: grid;
  gap: 0.7rem;
}
@media (min-width: 768px) {
  .jr-trust {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    padding: 0.75rem 1.15rem 0;
  }
}
.jr-trust__item {
  padding: 1rem 0.9rem;
  border-radius: var(--jr-radius-sm);
  background: var(--jr-soft-2);
  border: 1px solid var(--jr-line);
}
.jr-trust__item strong {
  display: block;
  margin-bottom: 0.35rem;
  font-size: 0.88rem;
}
.jr-trust__item span {
  font-size: 0.78rem;
  color: var(--jr-muted);
  line-height: 1.4;
}

/* —— Footer —— */
.jr-footer {
  margin-top: 2rem;
  background: #1a1a1a;
  color: #eee;
  padding: 1.75rem 1rem 2rem;
}
.jr-footer a { color: #cfcfcf !important; text-decoration: none !important; }
.jr-footer a:hover { color: #fff !important; }
.jr-footer__newsletter {
  max-width: var(--jr-max);
  margin: 0 auto 1.5rem;
  text-align: center;
}
.jr-footer__newsletter-title {
  margin: 0 0 1rem;
  font-size: 1.05rem;
  font-weight: 700;
  color: #fff;
}
.jr-footer__form {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
  margin-bottom: 1rem;
}
.jr-footer__email {
  min-width: min(100%, 280px);
  flex: 1 1 220px;
  max-width: 360px;
  min-height: 44px;
  border: 0;
  border-radius: 999px;
  padding: 0.65rem 1rem;
  font-size: 0.9rem;
}
.jr-footer__subscribe {
  min-height: 44px;
  border: 0;
  border-radius: 999px;
  padding: 0.65rem 1.2rem;
  background: var(--jr-red);
  color: #fff;
  font-weight: 700;
  cursor: pointer;
}
.jr-footer__social {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  justify-content: center;
}
.jr-footer__social a {
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 999px;
  background: #333;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  color: #fff !important;
}
.jr-footer__grid {
  max-width: var(--jr-max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem 1rem;
  padding-top: 0.5rem;
  border-top: 1px solid #333;
}
@media (min-width: 900px) {
  .jr-footer__grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
.jr-footer__grid h4 {
  margin: 0 0 0.65rem;
  color: #fff;
  font-size: 0.95rem;
}
.jr-footer__grid a {
  display: block;
  padding: 0.28rem 0;
  font-size: 0.84rem;
}
.jr-footer__copy {
  max-width: var(--jr-max);
  margin: 1.5rem auto 0;
  padding-top: 1rem;
  border-top: 1px solid #333;
  text-align: center;
  font-size: 0.78rem;
  color: #999;
}

/* —— Auth pages (Sign In / Create Account) —— */
body.jr-auth-page,
body.customer-account-login,
body.customer-account-create,
body.customer-account-forgotpassword {
  background: #f6f6f6 !important;
}
body.jr-auth-page .page-main,
body.customer-account-login .page-main,
body.customer-account-create .page-main,
body.customer-account-forgotpassword .page-main {
  max-width: 100% !important;
  margin: 0 auto !important;
  padding: 1.25rem 1rem 2.75rem !important;
  background: transparent !important;
}
body.jr-auth-page .columns,
body.customer-account-login .columns,
body.customer-account-create .columns {
  max-width: none !important;
  padding: 0 !important;
}
.jr-auth-wrap,
.login-container,
.registration-container {
  width: 100%;
  max-width: 28rem;
  margin: 0 auto;
  display: block !important;
}
.jr-auth-wrap--register,
.registration-container {
  max-width: 40rem;
}
.jr-auth,
.jr-auth__intro {
  width: 100%;
}
.jr-auth__card,
.jr-auth-wrap--register .form-create-account,
body.customer-account-forgotpassword .card {
  background: #fff;
  border: 1px solid var(--jr-line);
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.06);
  padding: 1.5rem 1.25rem 1.35rem;
}
@media (min-width: 640px) {
  .jr-auth__card,
  .jr-auth-wrap--register .form-create-account,
  body.customer-account-forgotpassword .card {
    padding: 1.85rem 1.75rem 1.6rem;
  }
}
.jr-auth__brand {
  display: flex;
  justify-content: center;
  margin-bottom: 0.85rem;
}
.jr-auth__mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  border-radius: 999px;
  background: var(--jr-red);
  color: #fff;
  font-weight: 900;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
}
.jr-auth__title {
  margin: 0 0 0.35rem;
  text-align: center;
  font-size: clamp(1.35rem, 3.5vw, 1.65rem);
  font-weight: 850;
  color: var(--jr-ink);
  line-height: 1.2;
}
.jr-auth__lead {
  margin: 0 0 1.25rem;
  text-align: center;
  color: var(--jr-muted);
  font-size: 0.92rem;
  line-height: 1.45;
}
.jr-auth__intro {
  margin-bottom: 1rem;
}
.jr-auth__form .field,
.jr-auth-wrap--register .field,
body.customer-account-create .field {
  margin-bottom: 0.95rem;
}
.jr-auth__form .label,
.jr-auth-wrap--register .label,
body.customer-account-login .label,
body.customer-account-create .label {
  display: block;
  margin-bottom: 0.35rem;
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--jr-ink);
}
.jr-auth__form .form-input,
.jr-auth-wrap--register .form-input,
.jr-auth-wrap--register .form-select,
body.customer-account-login .form-input,
body.customer-account-create .form-input,
body.customer-account-create .form-select,
body.customer-account-forgotpassword .form-input {
  width: 100% !important;
  min-height: 48px;
  border: 1px solid #d9d9d9 !important;
  border-radius: 12px !important;
  padding: 0.75rem 1rem !important;
  font-size: 16px !important;
  background: #fff !important;
  box-shadow: none !important;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.jr-auth__form .form-input:focus,
.jr-auth-wrap--register .form-input:focus,
body.customer-account-create .form-input:focus {
  outline: none !important;
  border-color: #f0a0a3 !important;
  box-shadow: 0 0 0 3px rgba(227, 28, 35, 0.12) !important;
}
.jr-auth__password,
body.customer-account-login .field.password .control,
body.customer-account-create .field.password .control,
body.customer-account-create .control.flex.items-center {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}
.jr-auth__password .form-input,
body.customer-account-login .field.password .form-input,
body.customer-account-create .field.password .form-input {
  padding-right: 3rem !important;
}
.jr-auth__toggle,
body.customer-account-login .field.password button,
body.customer-account-create .field.password button {
  position: absolute;
  right: 0.15rem;
  top: 50%;
  transform: translateY(-50%);
  border: 0;
  background: transparent;
  color: #777 !important;
  padding: 0.65rem 0.75rem;
  cursor: pointer;
}
.jr-auth__actions {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding-top: 0.35rem;
}
.jr-auth__submit,
.jr-auth-wrap--register .btn-primary,
body.customer-account-create .actions-toolbar .btn-primary,
body.customer-account-forgotpassword .btn-primary {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 50px;
  border: 0 !important;
  border-radius: 999px !important;
  background: var(--jr-red) !important;
  color: #fff !important;
  font-weight: 800 !important;
  font-size: 1rem !important;
  text-decoration: none !important;
  cursor: pointer;
}
.jr-auth__submit:hover,
.jr-auth-wrap--register .btn-primary:hover {
  background: var(--jr-red-deep) !important;
}
.jr-auth__forgot {
  display: block;
  text-align: center;
  color: var(--jr-red) !important;
  font-weight: 700;
  font-size: 0.9rem;
  text-decoration: none !important;
}
.jr-auth__switch {
  margin: 1.15rem 0 0;
  text-align: center;
  color: var(--jr-muted);
  font-size: 0.92rem;
}
.jr-auth__switch a {
  color: var(--jr-red) !important;
  font-weight: 800;
  text-decoration: none !important;
  margin-left: 0.25rem;
}
.jr-auth__error {
  display: flex;
  gap: 0.5rem;
  align-items: flex-start;
  margin-top: 0.85rem;
  padding: 0.75rem 0.85rem;
  border-radius: 10px;
  background: #fef2f2;
  color: #b91c1c;
  font-size: 0.875rem;
}
.jr-auth__legal {
  margin-top: 0.85rem;
  text-align: center;
  font-size: 0.75rem;
  color: var(--jr-muted);
}

.jr-auth-wrap--register .form-create-account,
.registration-container .form-create-account {
  display: block;
}
.jr-auth-wrap--register .form-create-account > .md\:grid,
.jr-auth-wrap--register .form-create-account > div.md\:grid,
.registration-container .form-create-account > .md\:grid,
.registration-container .form-create-account > div.md\:grid {
  display: grid !important;
  grid-template-columns: 1fr;
  gap: 0.85rem;
}
@media (min-width: 768px) {
  .jr-auth-wrap--register .form-create-account > .md\:grid,
  .jr-auth-wrap--register .form-create-account > div.md\:grid,
  .registration-container .form-create-account > .md\:grid,
  .registration-container .form-create-account > div.md\:grid {
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
  }
}
.jr-auth-wrap--register fieldset.card,
.registration-container fieldset.card,
body.customer-account-create fieldset.card {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  padding: 0 !important;
  margin: 0 0 0.5rem !important;
}
.jr-auth-wrap--register fieldset.card > legend,
.registration-container fieldset.card > legend,
body.customer-account-create fieldset.card > legend {
  display: block;
  width: 100%;
  margin: 0 0 0.75rem;
  padding: 0;
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--jr-ink);
}
.jr-auth-wrap--register .actions-toolbar,
.registration-container .actions-toolbar,
body.customer-account-create .actions-toolbar {
  margin-top: 0.75rem;
  padding-top: 0.25rem;
}
.jr-auth-wrap--register .actions-toolbar .primary,
.registration-container .actions-toolbar .primary,
body.customer-account-create .actions-toolbar .primary {
  width: 100%;
}
.jr-auth-wrap--register .mb-8,
.registration-container .mb-8 {
  margin-bottom: 0 !important;
}
/* Wrap create form visually as one card */
.registration-container .form-create-account {
  background: #fff;
  border: 1px solid var(--jr-line);
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.06);
  padding: 1.35rem 1.2rem 1.25rem;
}
@media (min-width: 640px) {
  .registration-container .form-create-account {
    padding: 1.75rem 1.6rem 1.5rem;
  }
}

/* Legacy aliases still used by Hyvä cards on auth */
.xc-auth-btn,
body.customer-account-login .btn-primary,
body.customer-account-create .btn-primary {
  background: var(--jr-red) !important;
  border-color: var(--jr-red) !important;
  color: #fff !important;
  border-radius: 999px !important;
  font-weight: 800 !important;
}

/* —— PLP product cards (Flatsome .box-q8kart style) —— */
.q8kart-product-list {
  width: 100%;
  max-width: var(--jr-max);
  margin: 0 auto;
  padding: 0.5rem 0.75rem 2rem;
}
@media (min-width: 768px) {
  .q8kart-product-list { padding: 0.75rem 1.15rem 2.5rem; }
}
.q8kart-products-grid {
  list-style: none;
  margin: 0;
  padding: 0;
}
.q8kart-products-grid > li {
  display: flex;
  min-height: 0;
}
.box-q8kart {
  background: #fff;
  border: 1px solid var(--jr-line);
  border-radius: 10px;
  box-shadow: 0 2px 14px rgba(0, 0, 0, 0.06);
  overflow: hidden;
  width: 100%;
  min-height: 0;
}
.box-q8kart__image {
  position: relative;
  aspect-ratio: 1 / 1;
  background: #f9f9f9;
  overflow: hidden;
}
.box-q8kart__image a,
.box-q8kart__image .product-image-wrapper,
.box-q8kart__image .product-image-photo {
  display: block;
  width: 100%;
  height: 100%;
}
.box-q8kart__image img,
.box-q8kart__image .product-image-photo {
  width: 100% !important;
  height: 100% !important;
  object-fit: contain;
  object-position: center;
}
.box-q8kart__wish {
  position: absolute;
  top: 0.45rem;
  right: 0.45rem;
  z-index: 2;
}
.box-q8kart__badge {
  position: absolute;
  top: 0.45rem;
  left: 0.45rem;
  z-index: 2;
  background: var(--jr-red);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 800;
  line-height: 1;
  padding: 0.35rem 0.45rem;
  border-radius: 4px;
}
.box-q8kart__text {
  text-align: center;
  padding: 0.55rem 0.55rem 0.65rem;
  gap: 0.25rem;
  min-height: 0;
}
.box-q8kart__title {
  min-height: calc(1.3em * 2);
  margin: 0;
}
.box-q8kart__title a,
.box-q8kart .product-item-link {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 0.92rem;
  font-weight: 800;
  line-height: 1.3;
  color: var(--jr-ink) !important;
  text-decoration: none !important;
}
.box-q8kart__rating { min-height: 0; }
.box-q8kart__price {
  margin-top: auto;
  min-height: 1.75rem;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: center;
  gap: 0.2rem 0.4rem;
}
.box-q8kart__price .price-box,
.box-q8kart__price .price-container {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: center;
  gap: 0.2rem 0.4rem;
  margin: 0;
}
.box-q8kart__price .price {
  font-size: 1.05rem;
  font-weight: 800;
  color: #000;
}
.box-q8kart__price .old-price .price,
.box-q8kart__price .price-label + .price,
.box-q8kart__price .old-price .price-wrapper .price {
  font-size: 0.85rem;
  font-weight: 600;
  color: #d32f2f !important;
  text-decoration: line-through;
}
.box-q8kart__price .special-price .price,
.box-q8kart__price .final-price .price {
  font-size: 1.05rem;
  font-weight: 800;
  color: #000 !important;
}
.box-q8kart__price .price-label { display: none; }
.box-q8kart__actions {
  width: 100%;
  margin-top: 0.35rem;
}
.box-q8kart__atc {
  display: block !important;
  width: 100% !important;
  box-sizing: border-box;
  margin: 0 !important;
  text-align: center;
  background: var(--jr-red) !important;
  border: 1px solid var(--jr-red) !important;
  border-radius: 6px !important;
  color: #fff !important;
  font-weight: 600 !important;
  font-size: 0.8125rem !important;
  line-height: 1.25 !important;
  padding: 0.45rem 0.65rem !important;
  min-height: 0 !important;
  box-shadow: none !important;
  cursor: pointer;
  text-decoration: none !important;
}
.box-q8kart__atc:hover {
  filter: brightness(1.06);
  background: var(--jr-red-deep) !important;
  border-color: var(--jr-red-deep) !important;
}

/* Global buttons / PLP */
.btn-primary, .action.primary, button.action.primary {
  background: var(--jr-red) !important;
  border-color: var(--jr-red) !important;
  color: #fff !important;
  border-radius: 999px !important;
  font-weight: 700 !important;
}
.product-items,
ol.products.list.items.product-items {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
  list-style: none;
  margin: 0;
  padding: 0.25rem 0 1.5rem;
}
@media (min-width: 768px) {
  .product-items,
  ol.products.list.items.product-items { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (min-width: 1100px) {
  .product-items,
  ol.products.list.items.product-items { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* Full-width archive layout */
body.q8kart-plp .page-main,
body.q8kart-product-archive-fullwidth .page-main {
  max-width: none !important;
  padding-left: clamp(12px, 2.5vw, 40px) !important;
  padding-right: clamp(12px, 2.5vw, 40px) !important;
}

/* Legacy class aliases so older markup does not break */
.xc-header, #header.xc-header { background: transparent; }
.xc-footer { display: contents; }

/* Drawer slide helpers (if Tailwind transition utilities missing) */
.jr-drawer__panel.-translate-x-full,
.jr-drawer__panel.translate-x-0 { will-change: transform; }
.-translate-x-full { transform: translateX(-100%) !important; }
.translate-x-0 { transform: translateX(0) !important; }
.transition { transition-property: transform, opacity; }
.ease-out { transition-timing-function: cubic-bezier(0,0,.2,1); }
.ease-in { transition-timing-function: cubic-bezier(.4,0,1,1); }
.duration-300 { transition-duration: .3s; }
.duration-200 { transition-duration: .2s; }

/* Hyvä React Checkout page */
body.jr-react-checkout .jr-tabbar,
body.jr-react-checkout .jr-header,
body.jr-react-checkout .jr-drawer {
  display: none !important;
}
body.jr-react-checkout {
  padding-bottom: 0 !important;
}
