/**
 * Grimages UI – integration with Astroid / HikaShop (step 1: header and navigation).
 * Everything is scoped to body.gri-v2. !important only where the legacy CSS
 * (grimages.css, Astroid compiled CSS) uses an id selector or !important itself.
 */

/* ---------- Shell ---------- */
.gri-v2 .gri-wrap {
  max-width: 1320px;
  margin-inline: auto;
  padding-inline: var(--space-6);
}

.gri-v2 .gri-sparkle { position: fixed; }

html.gri-lock,
html.gri-lock body { overflow: hidden; }

/* The Astroid header section becomes a full-width sticky band.
   The promo bar (36px) scrolls away, the logo row and the menu stay. */
.gri-v2 .astroid-header-section {
  position: sticky;
  top: -36px;
  z-index: var(--z-header);
  padding: 0 !important;
  margin: 0 !important;
  background: var(--surface);
}

.gri-v2 .astroid-header-section > .container,
.gri-v2 .astroid-header-section > .container-fluid {
  max-width: none;
  padding: 0;
}

.gri-v2 .astroid-header-section .astroid-row,
.gri-v2 .astroid-header-section .astroid-column {
  margin: 0;
  padding: 0;
}

.gri-v2 #astroid-sticky-header,
.gri-v2 .astroid-mobilemenu,
.gri-v2 .astroid-offcanvas { display: none !important; }

/* ---------- Header ---------- */
.gri-v2 .gri-header { box-shadow: var(--shadow-card); }

.gri-v2 .gri-header__promo {
  min-height: 36px;
  padding: 0;
  display: block;
  text-align: initial;
}

.gri-v2 .gri-promo {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  min-height: 36px;
}

.gri-v2 .gri-promo__msg {
  flex: 1 1 auto;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  font: 700 14px/20px var(--font-body);
  color: var(--on-brand);
}

.gri-v2 .gri-promo__msg .gri-icon { width: 18px; height: 18px; flex: none; }
.gri-v2 .gri-promo__msg > span { overflow: hidden; text-overflow: ellipsis; }
.gri-v2 .gri-promo__tools { max-width: 30%; max-height: 36px; }

.gri-v2 .gri-promo__tools,
.gri-v2 .gri-promo__help {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  flex: 0 0 auto;
  min-width: 0;
}

.gri-v2 .gri-promo__help a {
  color: var(--on-brand);
  font: 400 13px/20px var(--font-body);
  text-decoration: none;
  opacity: .92;
}

.gri-v2 .gri-promo__help a:hover { opacity: 1; text-decoration: underline; }

/* Toolbar modules moved here: languages + currency */
/* The legacy CSS gives the language list a 7px top margin and the currency module a 3px padding. */
.gri-v2 .gri-promo__tools > .moduletable,
.gri-v2 .gri-promo__tools .hikashop_currency_module,
.gri-v2 .gri-promo__tools .mod-languages,
.gri-v2 .gri-drawer__tools > .moduletable,
.gri-v2 .gri-drawer__tools .hikashop_currency_module,
.gri-v2 .gri-drawer__tools .mod-languages {
  display: flex;
  align-items: center;
  margin: 0 !important;
  padding: 0 !important;
}

.gri-v2 .gri-promo__tools .mod-languages__list { display: flex; align-items: center; gap: 2px; margin: 0 !important; padding: 0; list-style: none; }
.gri-v2 .gri-drawer__tools .mod-languages__list { margin: 0 !important; }
.gri-v2 .gri-promo__tools .mod-languages__list li { margin: 0; }

.gri-v2 .gri-promo__tools .mod-languages__list a {
  display: block;
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  color: var(--on-brand);
  font: 700 12px/16px var(--font-body);
  text-decoration: none;
  opacity: .8;
}

.gri-v2 .gri-promo__tools .mod-languages__list .lang-active a { background: rgba(255, 255, 255, .18); opacity: 1; }

.gri-v2 .gri-promo__tools select.hikashopcurrency {
  height: 24px;
  padding: 0 22px 0 8px;
  border: 1px solid rgba(255, 255, 255, .4);
  border-radius: var(--radius-pill);
  background-color: transparent;
  color: var(--on-brand);
  font: 700 12px/1 var(--font-body);
  width: auto;
}

.gri-v2 .gri-promo__tools select.hikashopcurrency option { color: var(--ink); }

.gri-v2 .gri-header__main {
  display: flex;
  align-items: center;
  gap: var(--space-6);
  padding-block: var(--space-3);
}

.gri-v2 .gri-header__logo { flex: none; }
.gri-v2 .gri-header__logo img { display: block; height: 56px; width: auto; }

.gri-v2 .gri-header .gri-search { max-width: 640px; }
.gri-v2 .gri-search input[type="search"] { height: auto; padding: 0; box-shadow: none; }
.gri-v2 .gri-search input[type="search"]::-webkit-search-cancel-button { cursor: pointer; }

.gri-v2 .gri-tool { cursor: pointer; }
.gri-v2 .gri-tool__count[hidden] { display: none; }

/* Navigation row + mega menu */
.gri-v2 .gri-header__navrow { position: relative; border-top: 1px solid var(--line); }
.gri-v2 .gri-header__nav { border-top: 0; }

.gri-v2 button.gri-nav__link {
  border: 0;
  cursor: pointer;
}

.gri-v2 .gri-nav__link--all .gri-icon--chevron {
  width: 16px;
  height: 16px;
  transition: transform var(--dur-base) var(--ease-out);
}

.gri-v2 .gri-nav__link--all[aria-expanded="true"] .gri-icon--chevron { transform: rotate(180deg); }
.gri-v2 .gri-nav__link--promo { color: var(--magenta-500); }
.gri-v2 .gri-nav__link .gri-icon { width: 18px; height: 18px; }

.gri-v2 .gri-mega-wrap {
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  z-index: var(--z-drawer);
}

.gri-v2 .gri-mega-wrap[hidden] { display: none; }

.gri-v2 .gri-mega {
  position: relative;
  z-index: 1;
  grid-template-columns: repeat(3, minmax(0, 1fr)) minmax(0, 1.3fr);
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}

.gri-v2 .gri-mega-wrap .gri-wrap { padding-inline: var(--space-6); }

.gri-v2 .gri-mega__title {
  margin: 0 0 var(--space-2);
  font: 700 18px/24px var(--font-display);
  color: var(--violet-900);
}

.gri-v2 .gri-mega li a.is-active { color: var(--magenta-500); font-weight: 700; }
.gri-v2 .gri-mega__more { display: inline-flex !important; align-items: center; gap: var(--space-1); font-weight: 700; color: var(--violet-700) !important; }
.gri-v2 .gri-mega__more .gri-icon { width: 16px; height: 16px; }

.gri-v2 .gri-mega__aside { display: flex; flex-direction: column; gap: var(--space-3); min-width: 0; }
.gri-v2 .gri-mega__aside .gri-mega__feature { flex: 1; min-height: 0; }

.gri-v2 a.gri-mega__news {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-md);
  background: var(--surface-2);
  border: 1px solid var(--line);
  text-decoration: none;
  transition: transform var(--dur-base) var(--ease-bounce), border-color var(--dur-base);
}

.gri-v2 a.gri-mega__news:hover { transform: translateY(-2px); border-color: var(--yellow-400); }

.gri-v2 .gri-mega__news-icon {
  width: 40px;
  height: 40px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--yellow-400);
  color: var(--ink);
}

.gri-v2 a.gri-mega__news:hover .gri-mega__news-icon { animation: gri-wiggle 1s ease-in-out; }
.gri-v2 .gri-mega__news-icon .gri-icon { width: 22px; height: 22px; }
.gri-v2 .gri-mega__news-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.gri-v2 .gri-mega__news-text strong { font: 700 18px/22px var(--font-display); color: var(--violet-900); }
.gri-v2 .gri-mega__news-text span { font: 400 14px/20px var(--font-body); color: var(--ink-muted); }
.gri-v2 .gri-mega__news-arrow { width: 18px; height: 18px; color: var(--violet-700); flex: none; }

.gri-v2 a.gri-mega__feature { text-decoration: none; transition: transform var(--dur-base) var(--ease-bounce); }
.gri-v2 a.gri-mega__feature:hover { transform: translateY(-3px) rotate(-.5deg); }
.gri-v2 .gri-mega__feature-title { font: 800 28px/30px var(--font-display); }
.gri-v2 .gri-mega__feature-text { font: 400 15px/22px var(--font-body); }
.gri-v2 .gri-mega__feature .gri-badge { align-self: flex-start; }

.gri-v2 .gri-btn--light {
  --btn-bg: var(--surface);
  --btn-fg: var(--violet-900);
  --btn-edge: var(--violet-900);
  align-self: flex-start;
}

.gri-v2 .gri-mega__extra {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  padding: var(--space-4) var(--space-6);
  margin-top: calc(var(--radius-lg) * -1);
  padding-top: calc(var(--radius-lg) + var(--space-3));
  background: var(--surface-2);
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
  position: relative;
  box-shadow: var(--shadow-raised);
}

.gri-v2 a.gri-chip {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.gri-v2 a.gri-chip.is-active { background: var(--violet-700); border-color: var(--violet-700); color: var(--on-brand); }

/* Search suggestions */
.gri-v2 .gri-search__panel { max-height: min(70vh, 560px); overflow-y: auto; }
.gri-v2 .gri-search__panel[hidden] { display: none; }
.gri-v2 .gri-search__hit[aria-selected="true"],
.gri-v2 .gri-search__cats .gri-chip[aria-selected="true"] { background: var(--magenta-050); }
.gri-v2 .gri-search__cats .gri-chip[aria-selected="true"] { border-color: var(--magenta-500); }
.gri-v2 .gri-search mark { padding: 0; background: none; color: var(--magenta-500); font-weight: 700; }
.gri-v2 .gri-search__name {
  flex: 1;
  min-width: 0;
  font: 400 15px/20px var(--font-body);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.gri-v2 .gri-search__hit img,
.gri-v2 .gri-search__noimg { width: 48px; height: 48px; flex: none; }
.gri-v2 .gri-search__noimg { border-radius: var(--radius-sm); background: var(--surface-2); }
.gri-v2 .gri-search__hit .gri-price__now { flex: none; }
.gri-v2 .gri-search__empty { margin: 0; padding: var(--space-3); color: var(--ink-muted); }
.gri-v2 .gri-search__all { justify-self: start; margin-top: var(--space-1); }

/* ---------- Mobile bar + drawer ---------- */
.gri-v2 .gri-mobilebar { display: none; }

.gri-v2 .gri-mobilebar button {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 6px 0;
  border: 0;
  background: none;
  color: var(--ink-muted);
  font: 700 12px/16px var(--font-body);
  border-radius: var(--radius-sm);
  cursor: pointer;
}

.gri-v2 .gri-mobilebar button .gri-icon { width: 24px; height: 24px; }

.gri-v2 .gri-drawer {
  position: fixed;
  inset: 0;
  z-index: var(--z-drawer);
}

.gri-v2 .gri-drawer[hidden] { display: none; }

.gri-v2 .gri-drawer__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(42, 23, 53, .5);
  opacity: 0;
  transition: opacity var(--dur-base) var(--ease-out);
}

.gri-v2 .gri-drawer__panel {
  position: absolute;
  inset: 0 auto 0 0;
  width: min(380px, 88vw);
  overflow-y: auto;
  overscroll-behavior: contain;
  background: var(--surface);
  box-shadow: var(--shadow-raised);
  padding: 0 0 calc(var(--space-6) + env(safe-area-inset-bottom, 0px));
  transform: translateX(-100%);
  transition: transform var(--dur-base) var(--ease-out);
}

.gri-v2 .gri-drawer.is-open .gri-drawer__backdrop { opacity: 1; }
.gri-v2 .gri-drawer.is-open .gri-drawer__panel { transform: none; }

.gri-v2 .gri-drawer__head {
  position: sticky;
  top: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-3) var(--space-4);
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}

.gri-v2 .gri-drawer__close {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: var(--surface-2);
  color: var(--ink);
  cursor: pointer;
}

.gri-v2 .gri-drawer__section { padding: var(--space-4) var(--space-4) 0; }

.gri-v2 .gri-drawer__title {
  margin: 0 0 var(--space-2);
  font: 700 12px/16px var(--font-body);
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.gri-v2 .gri-drawer__list { list-style: none; margin: 0; padding: 0; }

.gri-v2 .gri-drawer__list a {
  display: flex;
  align-items: center;
  min-height: 48px;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  font: 700 16px/22px var(--font-body);
  text-decoration: none;
}

.gri-v2 .gri-drawer__list a.is-active { color: var(--magenta-500); }
.gri-v2 .gri-drawer__chips { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.gri-v2 .gri-drawer__tools { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-4); padding-bottom: var(--space-4); }
.gri-v2 .gri-drawer__tools:empty { display: none; }
.gri-v2 .gri-drawer__tools .mod-languages__list { display: flex; gap: var(--space-2); margin: 0; padding: 0; list-style: none; }
.gri-v2 .gri-drawer__tools .mod-languages__list a { display: inline-flex; min-height: 40px; align-items: center; padding: 0 var(--space-3); border: 1px solid var(--line-strong); border-radius: var(--radius-pill); color: var(--ink); text-decoration: none; font-weight: 700; }
.gri-v2 .gri-drawer__tools .mod-languages__list .lang-active a { background: var(--violet-700); border-color: var(--violet-700); color: var(--on-brand); }
.gri-v2 .gri-drawer__tools select.hikashopcurrency { height: 40px; border-radius: var(--radius-pill); }

/* ---------- Moments band (former category tiles) ---------- */
/* Permanent categories are in the menu now; the coloured band keeps the seasonal tiles. */
.gri-v2 .gri-tile--permanent,
.gri-v2 #deployCategoryMenu { display: none !important; }

.gri-v2 .breadcrumbs-content .hikashop_subcategories .hk-row-fluid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-3);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  padding-block: var(--space-2);
}

.gri-v2 .breadcrumbs-content .hikashop_subcategories .hk-row-fluid::-webkit-scrollbar { display: none; }

.gri-v2 .breadcrumbs-content .gri-tile--moment {
  flex: 0 0 auto;
  width: calc((100% - 4 * var(--space-3)) / 5) !important;
  max-width: none;
  scroll-snap-align: start;
}

.gri-v2 .breadcrumbs-content .gri-tile--moment .hikashop_container { margin: 0 !important; }

.gri-v2 .breadcrumbs-content .gri-tile--moment .hikashop_subcontainer {
  border-radius: var(--radius-md);
  height: auto !important;
}

.gri-v2 .breadcrumbs-content .gri-tile--moment .hikashop_category_name a {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: .02em;
}

/* ---------- Mobile ---------- */
@media (max-width: 991.98px) {
  .gri-v2 .gri-wrap { padding-inline: var(--space-4); }

  .gri-v2 .astroid-header-section { top: -32px; }
  .gri-v2 .gri-header__promo,
  .gri-v2 .gri-promo { min-height: 32px; }
  .gri-v2 .gri-promo__tools,
  .gri-v2 .gri-promo__help { display: none; }

  .gri-v2 .gri-promo__more { display: none; }

  .gri-v2 .gri-promo__msg {
    justify-content: center;
    font-size: 12px;
    line-height: 16px;
  }

  .gri-v2 .gri-header__main {
    flex-wrap: wrap;
    gap: var(--space-2) var(--space-3);
    padding-block: var(--space-2);
  }

  .gri-v2 .gri-header__logo img { height: 40px; }
  .gri-v2 .gri-header .gri-search { order: 3; flex-basis: 100%; max-width: none; }
  .gri-v2 .gri-search__box { height: 44px; }
  .gri-v2 .gri-search__go { display: none; }
  .gri-v2 .gri-tool { min-width: 48px; }
  .gri-v2 .gri-tool__label,
  .gri-v2 .gri-tool--wishlist,
  .gri-v2 .gri-tool--cart { display: none; }
  .gri-v2 .gri-header__navrow { display: none; }

  .gri-v2 .gri-mobilebar {
    display: grid;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: var(--z-header);
  }

  .gri-v2 body,
  body.gri-v2 { padding-bottom: calc(68px + env(safe-area-inset-bottom, 0px)); }

  .gri-v2 #astroid-backtotop { bottom: calc(84px + env(safe-area-inset-bottom, 0px)) !important; }

  /* The band no longer collapses behind a button: it scrolls sideways. */
  .gri-v2 .breadcrumbs-content { max-height: none !important; }
  .gri-v2 .breadcrumbs-content .hikashop_subcategories { visibility: visible !important; max-height: none !important; overflow: visible !important; }
  .gri-v2 .breadcrumbs-content .hikashop_subcategories .hk-row-fluid { flex-wrap: nowrap; justify-content: flex-start; }
  .gri-v2 .breadcrumbs-content .gri-tile--moment { width: 72vw !important; max-width: 260px; }
}

/* ---------- Breadcrumb ---------- */
.gri-v2 .gri-crumbs ol {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-1) var(--space-2);
  margin: 0;
  padding: 0;
  list-style: none;
  font: 400 14px/20px var(--font-body);
  color: var(--ink-muted);
}

.gri-v2 .gri-crumbs li { display: inline-flex; align-items: center; gap: var(--space-2); min-width: 0; }
.gri-v2 .gri-crumbs li + li::before { content: "›"; color: var(--line-strong); }
.gri-v2 .gri-crumbs a { color: var(--ink-muted) !important; text-decoration: none; }
.gri-v2 .gri-crumbs a:hover { color: var(--magenta-500) !important; text-decoration: underline; }
.gri-v2 .gri-crumbs li[aria-current] span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 40ch; color: var(--ink); }

@media (max-width: 991.98px) {
  .gri-v2 .gri-crumbs li[aria-current] { display: none; }
}

/* ---------- Link colours ----------
   grimages.css and the "Add Custom CSS" module force `body a { color: #a6095b !important }`.
   Inside the new UI each link gets its own colour back. Remove with the legacy rule (step 7). */
.gri-v2 .gri-nav__link,
.gri-v2 .gri-tool,
.gri-v2 .gri-mega li a,
.gri-v2 .gri-search__hit,
.gri-v2 .gri-drawer__list a,
.gri-v2 a.gri-chip { color: var(--ink) !important; }

.gri-v2 .gri-nav__link:hover,
.gri-v2 .gri-nav__link.is-active,
.gri-v2 .gri-nav__link--promo,
.gri-v2 .gri-nav__link--season,
.gri-v2 .gri-tool:hover,
.gri-v2 .gri-mega li a:hover,
.gri-v2 .gri-mega li a.is-active,
.gri-v2 .gri-mobilebar a.is-active,
.gri-v2 .gri-drawer__list a.is-active { color: var(--magenta-500) !important; }

.gri-v2 .gri-nav__link--all,
.gri-v2 .gri-nav__link--all:hover,
.gri-v2 .gri-header__promo a,
.gri-v2 a.gri-mega__feature,
.gri-v2 a.gri-chip.is-active { color: var(--on-brand) !important; }

.gri-v2 a.gri-mega__news { color: var(--ink) !important; }

.gri-v2 .gri-mega__more { color: var(--violet-700) !important; }
.gri-v2 .gri-mobilebar a { color: var(--ink-muted) !important; }
.gri-v2 .gri a.gri-btn { color: var(--btn-fg) !important; }
.gri-v2 .gri-tool__total { color: var(--magenta-500) !important; }

/* ---------- Dialog (design system Dialog) ---------- */
.gri-dialog { position: fixed; inset: 0; z-index: var(--z-toast); display: grid; place-items: center; padding: var(--space-4); }
.gri-dialog[hidden] { display: none; }
.gri-dialog__backdrop { position: absolute; inset: 0; background: rgba(42, 23, 53, .55); animation: gri-fade var(--dur-base) var(--ease-out); }
.gri-dialog__panel {
  position: relative; width: min(420px, 100%); padding: var(--space-6) var(--space-5) var(--space-5);
  border-radius: var(--radius-lg); background: var(--surface); box-shadow: var(--shadow-raised);
  text-align: center; font-family: var(--font-body); color: var(--ink);
  animation: gri-pop var(--dur-slow) var(--ease-bounce);
}
.gri-dialog__icon { width: 64px; height: 64px; margin: 0 auto var(--space-3); display: grid; place-items: center; border-radius: 50%; background: var(--magenta-050); color: var(--magenta-500); }
.gri-dialog__icon .gri-icon { width: 30px; height: 30px; }
.gri-dialog__icon--heart .gri-icon svg { fill: currentColor; }
.gri-dialog__title { margin: 0 0 var(--space-2); font: 800 24px/28px var(--font-display); color: var(--violet-900); }
.gri-dialog__text { margin: 0 0 var(--space-5); font: 400 15px/22px var(--font-body); color: var(--ink-muted); }
.gri-dialog__actions { display: grid; gap: var(--space-2); }
.gri-dialog__actions .gri-btn { width: 100%; }
.gri-dialog__close { position: absolute; top: var(--space-3); right: var(--space-3); width: 40px; height: 40px; border: 0; border-radius: 50%; background: var(--surface-2); color: var(--ink); display: grid; place-items: center; cursor: pointer; }
.gri-dialog__close .gri-icon { width: 18px; height: 18px; }
@keyframes gri-fade { from { opacity: 0; } }
.gri-v2 .gri-dialog a.gri-btn:not(#gri-none) { color: var(--btn-fg) !important; text-decoration: none; }
.gri-v2 .gri-dialog .gri-btn--ghost { --btn-fg: var(--violet-700); }
.gri-v2 .gri-dialog .gri-dialog__title:not(#gri-none) { margin: 0 0 var(--space-2); font: 800 24px/28px var(--font-display) !important; color: var(--violet-900); text-transform: none; text-wrap: balance; }
.gri-v2 .gri-dialog .gri-btn--ghost:not(#gri-none) { background: transparent !important; border: 0; box-shadow: none !important; }
.gri-v2 .gri-dialog .gri-btn--ghost:not(#gri-none):hover { background: var(--violet-050) !important; }

/* ---------- Seasonal band: home page only (design system SeasonStrip) ---------- */
/* Elsewhere the tiles and the old "categories" button go; the band disappears when nothing else is in it
   (announcements and page titles placed in the same position stay). */
.gri-v2.gri-inner .breadcrumbs-content .moduletable.gri-mod-tiles,
.gri-v2.gri-inner .breadcrumbs-content:not(:has(.moduletable:not(.gri-mod-tiles))) { display: none !important; }

/* ---------- E-mail first identification (checkout, login, registration) ---------- */
.gri-v2 .gri-ef {
  width: 100%;
  max-width: 460px;
  margin: 0 auto var(--space-5);
  padding: var(--space-6);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-card);
}

.gri-v2 .gri-ef__title:not(#gri-none) { margin: 0 0 var(--space-2); font: 800 26px/30px var(--font-display) !important; color: var(--violet-900); text-transform: none; }
.gri-v2 .gri-ef__text { margin: 0 0 var(--space-4); font: 400 15px/22px var(--font-body); color: var(--ink-muted); }
.gri-v2 .gri-ef__text [data-ef-email] { font-weight: 700; color: var(--ink); word-break: break-all; }
.gri-v2 .gri-ef__form { display: grid; gap: var(--space-4); margin: 0; }
.gri-v2 .gri-ef .gri-field { max-width: none; }
.gri-v2 .gri-ef .gri-input { height: 52px; font-size: 17px; }
.gri-v2 .gri-ef__change { border: 0; padding: 0; background: none; color: var(--violet-700); font: 700 14px/20px var(--font-body); text-decoration: underline; cursor: pointer; }
.gri-v2 .gri-ef a.gri-btn:not(#gri-none) { color: var(--btn-fg) !important; text-decoration: none; }
.gri-v2 .gri-ef-part[hidden] { display: none !important; }
.gri-v2.gri-ef-active .hikashop_checkout_login .gri-ef-part { float: none; width: 100% !important; max-width: 460px; margin: 0 auto; flex: 0 0 auto; }
.gri-v2.gri-ef-active #hikashop_checkout_registration .gri-ef-part,
.gri-v2.gri-ef-active .hikashop_checkout_login .gri-ef-part:has(#hikashop_checkout_registration) { max-width: 720px; }
.gri-v2.gri-ef-active .hikashop_checkout_login > h1,
.gri-v2.gri-ef-active .hikashop_checkout_login > h2,
.gri-v2.gri-ef-active .hikashop_checkout_login .hikashop_checkout_login_title,
.gri-v2.gri-ef-active #hikashop_checkout_login_form > h2,
.gri-v2.gri-ef-active #hikashop_checkout_registration > h2 { display: none; }

/* E-mail first: the card above, then only the relevant HikaShop form, centred, fields stacked (Field) */
.gri-v2 .gri-ef-row { display: block !important; margin: 0 !important; }
.gri-v2 .gri-ef-row > .gri-ef-part {
  float: none !important;
  width: 100% !important;
  max-width: 460px !important;
  margin: 0 auto !important;
  padding: 0 !important;
}

.gri-v2 .gri-ef-row > .gri-ef-part:has(#hikashop_checkout_registration) { max-width: 620px !important; }

.gri-v2 .hikashop_checkout_login .hkform-group,
.gri-v2 #com-users-login__form .control-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  margin: 0 0 var(--space-4);
}

.gri-v2 .hikashop_checkout_login .hkcontrol-label,
.gri-v2 .hikashop_checkout_login .hkform-group > [class*="hkc-"] {
  float: none !important;
  width: 100% !important;
  max-width: none !important;
  padding: 0 !important;
  margin: 0 !important;
  text-align: left !important;
  font: 700 14px/20px var(--font-body);
  color: var(--ink);
}

.gri-v2 .hikashop_checkout_login input[type="text"],
.gri-v2 .hikashop_checkout_login input[type="email"],
.gri-v2 .hikashop_checkout_login input[type="password"],
.gri-v2 #com-users-login__form input[type="text"],
.gri-v2 #com-users-login__form input[type="password"] {
  width: 100% !important;
  height: 48px;
  padding: 0 var(--space-4);
  border: 1px solid var(--line-strong) !important;
  border-radius: var(--radius-sm) !important;
  background: var(--surface) !important;
  box-shadow: none !important;
  font: 400 16px/1 var(--font-body);
  color: var(--ink);
}

.gri-v2 .hikashop_checkout_login input:focus,
.gri-v2 #com-users-login__form input:focus { border-color: var(--magenta-500) !important; box-shadow: 0 0 0 3px var(--magenta-050) !important; outline: none; }
.gri-v2 .hikashop_checkout_login .password-group,
.gri-v2 #com-users-login__form .password-group { display: flex; gap: 0; }
.gri-v2 .hikashop_checkout_login .password-group input { border-radius: var(--radius-sm) 0 0 var(--radius-sm) !important; }
.gri-v2 .hikashop_checkout_login .input-password-toggle { border-radius: 0 var(--radius-sm) var(--radius-sm) 0 !important; border: 1px solid var(--line-strong) !important; border-left: 0 !important; background: var(--surface-2) !important; }

.gri-v2 .hikashop_checkout_login .hikabtn_checkout_login_form:not(#gri-none) {
  width: 100%;
  min-height: 52px;
  border: 0 !important;
  border-radius: var(--radius-pill) !important;
  background: var(--violet-700) !important;
  color: var(--on-brand) !important;
  box-shadow: 0 4px 0 var(--violet-900) !important;
  font: 700 17px/1 var(--font-body);
}

/* ---------- HikaShop forms: password with integrated eye, yes/no radios as chips ---------- */
.gri-v2 .password-group .input-group { display: flex; flex-wrap: nowrap; width: 100%; }
.gri-v2 .password-group .input-group > input { flex: 1 1 auto; min-width: 0; width: auto !important; border-radius: var(--radius-sm) 0 0 var(--radius-sm) !important; }
.gri-v2 .password-group .input-password-toggle:not(#gri-none) {
  flex: none;
  width: 48px;
  height: 48px;
  padding: 0;
  border: 1px solid var(--line-strong) !important;
  border-left: 0 !important;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0 !important;
  background: var(--surface-2) !important;
  color: var(--violet-700) !important;
  box-shadow: none !important;
}

.gri-v2 .hikaradios .btn-group { display: flex; flex-wrap: wrap; gap: var(--space-2); box-shadow: none; }

.gri-v2 .hikaradios .hikaradio-label:not(#gri-none) {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  min-height: 44px;
  margin: 0 !important;
  padding: var(--space-2) var(--space-4);
  border: 1px solid var(--line-strong) !important;
  border-radius: var(--radius-pill) !important;
  background: var(--surface) !important;
  color: var(--ink) !important;
  box-shadow: none !important;
  font: 700 14px/20px var(--font-body);
  text-align: left;
  white-space: normal;
  cursor: pointer;
}

.gri-v2 .hikaradios .hikaradio-label:not(#gri-none):hover { border-color: var(--violet-700) !important; }
.gri-v2 .hikaradios .hikaradio-label.active:not(#gri-none) { border-color: var(--violet-700) !important; background: var(--violet-700) !important; color: var(--on-brand) !important; }
.gri-v2 .hikaradios .hikaradio-label.active.btn-success:not(#gri-none) { border-color: var(--success) !important; background: var(--success) !important; }
.gri-v2 .hikaradios .hikaradio-label.active.btn-success:not(#gri-none)::before { content: "✓"; }

/* ---------- Login helpers (checkout login, Joomla login / reset / remind) as in the design system ---------- */
/* "Se souvenir de moi": Field checkbox */
.gri-v2 .hikashop_login_remember_line .hkcheckbox label,
.gri-v2 .com-users-login__remember .form-check {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  margin: 0;
  padding: 0;
  font: 400 16px/24px var(--font-body) !important;
  color: var(--ink);
  cursor: pointer;
}

.gri-v2 .hikashop_login_remember_line input[type="checkbox"],
.gri-v2 .com-users-login__remember input[type="checkbox"] {
  width: 20px;
  height: 20px;
  margin: 0 !important;
  float: none;
  accent-color: var(--violet-700);
  cursor: pointer;
}

.gri-v2 .com-users-login__remember .form-check-label { font: 400 16px/24px var(--font-body); }

/* "Mot de passe oublié ? · Identifiant oublié ?" on one discreet centred line (grouped by grimages-ui.js) */
.gri-v2 .gri-login-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  margin: 0 0 var(--space-4);
  font: 400 14px/20px var(--font-body);
}

.gri-v2 .gri-login-links a + a::before {
  content: "·";
  display: inline-block;
  margin: 0 var(--space-2);
  color: var(--ink-muted);
  text-decoration: none;
}

.gri-v2 .gri-login-links a:not(#gri-none) { color: var(--violet-700) !important; text-decoration: none; }
.gri-v2 .gri-login-links a:not(#gri-none):hover { text-decoration: underline; }
.gri-v2 .com-users-login .gri-login-links { margin-top: var(--space-4); }

.gri-v2 .hikashop_login_button_line { margin-bottom: var(--space-3) !important; }

/* Joomla login, password reset and username reminder pages: one centred card */
.gri-v2 .com-users-login,
.gri-v2 .com-users-reset,
.gri-v2 .com-users-remind {
  float: none !important;
  width: 100% !important;
  max-width: 460px !important;
  max-width: calc(460px + 2 * var(--space-4)) !important;
  margin: var(--space-6) auto !important;
  padding: 0 var(--space-4) !important;
  flex: none !important;
}

.gri-v2 .com-users-login__form,
.gri-v2 .com-users-reset__form,
.gri-v2 .com-users-remind__form {
  margin: 0;
  padding: var(--space-6) !important;
  border: 1px solid var(--line) !important;
  border-radius: var(--radius-lg) !important;
  background: var(--surface) !important;
  box-shadow: var(--shadow-card) !important;
}

.gri-v2 .com-users-reset__form fieldset,
.gri-v2 .com-users-remind__form fieldset,
.gri-v2 .com-users-login__form fieldset { margin: 0; padding: 0; border: 0; }

.gri-v2 .com-users-reset__form legend,
.gri-v2 .com-users-remind__form legend {
  float: none;
  width: 100%;
  margin: 0 0 var(--space-4);
  padding: 0;
  font: 400 15px/22px var(--font-body);
  color: var(--ink-muted);
}

.gri-v2 .com-users-reset .control-group,
.gri-v2 .com-users-remind .control-group,
.gri-v2 .com-users-login .control-group { display: flex; flex-direction: column; gap: var(--space-1); margin: 0 0 var(--space-4); }

.gri-v2 .com-users-reset .control-label,
.gri-v2 .com-users-remind .control-label,
.gri-v2 .com-users-login .control-label,
.gri-v2 .com-users-reset .controls,
.gri-v2 .com-users-remind .controls,
.gri-v2 .com-users-login .controls { float: none !important; width: 100% !important; margin: 0 !important; padding: 0 !important; text-align: left !important; }

.gri-v2 .com-users-reset label,
.gri-v2 .com-users-remind label,
.gri-v2 .com-users-login .control-label label { font: 700 14px/20px var(--font-body); color: var(--ink); }

.gri-v2 .com-users-reset input[type="email"],
.gri-v2 .com-users-remind input[type="email"] {
  width: 100% !important;
  height: 48px;
  padding: 0 var(--space-4);
  border: 1px solid var(--line-strong) !important;
  border-radius: var(--radius-sm) !important;
  box-shadow: none !important;
  font: 400 16px/1 var(--font-body);
}

.gri-v2 .com-users-reset input:focus,
.gri-v2 .com-users-remind input:focus { border-color: var(--magenta-500) !important; box-shadow: 0 0 0 3px var(--magenta-050) !important; outline: none; }

.gri-v2 .com-users-login .btn-primary:not(#gri-none),
.gri-v2 .com-users-reset .btn-primary:not(#gri-none),
.gri-v2 .com-users-remind .btn-primary:not(#gri-none) {
  width: 100%;
  min-height: 52px;
  border: 0 !important;
  border-radius: var(--radius-pill) !important;
  background: var(--violet-700) !important;
  color: var(--on-brand) !important;
  box-shadow: 0 4px 0 var(--violet-900) !important;
  font: 700 17px/1 var(--font-body);
  transition: transform var(--dur-fast) var(--ease-out), box-shadow var(--dur-fast);
}

.gri-v2 .com-users-login .btn-primary:not(#gri-none):hover,
.gri-v2 .com-users-reset .btn-primary:not(#gri-none):hover,
.gri-v2 .com-users-remind .btn-primary:not(#gri-none):hover { transform: translateY(-2px); box-shadow: 0 6px 0 var(--violet-900) !important; }

/* The legacy grimages.css squares .btn-primary on hover/focus (border-radius: 4px !important, with an id) */
.gri-v2 .com-users-login .btn-primary:not(#gri-none):is(:hover, :focus, :active),
.gri-v2 .com-users-reset .btn-primary:not(#gri-none):is(:hover, :focus, :active),
.gri-v2 .com-users-remind .btn-primary:not(#gri-none):is(:hover, :focus, :active) { border-radius: var(--radius-pill) !important; background: var(--violet-700) !important; }


.gri-v2 .gri-login-title:not(#gri-none) { margin: 0 0 var(--space-2); font: 800 26px/30px var(--font-display) !important; color: var(--violet-900); text-transform: none; }

/* E-mail first, once the address is known: the step text heads the form, all in one card */
.gri-v2 .gri-ef-row > .gri-ef-part.gri-ef-joined {
  padding: var(--space-6) !important;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-card);
}

.gri-v2 .gri-ef-joined > .gri-ef__step { margin: 0 0 var(--space-5); }
.gri-v2 .gri-ef-joined > .gri-ef__step .gri-ef__text:last-child { margin-bottom: 0; }
.gri-v2 .hikashop_checkout_login .gri-login-links { margin-bottom: 0; }

/* ---------- Focus pages (checkout, log in, account recovery): nothing around the task ---------- */
.gri-v2.gri-focus .astroid-component-section .astroid-module-position { display: none !important; }
.gri-v2.gri-focus .astroid-component-section { padding-top: var(--space-6) !important; padding-bottom: var(--space-8) !important; }

/* ---------- Checkout header: logo + "Paiement sécurisé" (CheckoutSteps) ---------- */
.gri-v2 .gri-header--checkout .gri-header__main { justify-content: space-between; gap: var(--space-4); }
.gri-v2 .gri-header__secure {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  margin: 0;
  font: 700 15px/20px var(--font-body);
  color: var(--ink);
}

.gri-v2 .gri-header__secure .gri-icon { color: var(--success); }

.gri-v2 .gri-header__back:not(#gri-none) {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  color: var(--violet-700) !important;
  font: 700 14px/20px var(--font-body);
  text-decoration: none;
}

.gri-v2 .gri-header__back:not(#gri-none):hover { text-decoration: underline; }

/* ---------- CheckoutSteps: HikaShop's wizard bar, 4 steps at most ("Fin" is the confirmation) ---------- */
.gri-v2 .hikashop_wizardbar {
  margin: 0 auto var(--space-6) !important;
  max-width: 720px;
  padding: 0 !important;
  border: 0 !important;
  background: none !important;
  box-shadow: none !important;
}

.gri-v2 .hikashop_wizardbar ul {
  display: flex;
  gap: var(--space-2);
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

.gri-v2 .hikashop_wizardbar li {
  flex: 1;
  display: flex !important;
  flex-direction: column;
  gap: var(--space-2);
  min-width: 0;
  float: none !important;
  width: auto !important;
  height: auto !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  background: none !important;
  font: 700 14px/20px var(--font-body);
  color: var(--ink-muted);
  counter-increment: step;
}

.gri-v2 .hikashop_wizardbar li:last-child:not(.hikashop_cart_step_current) { display: none !important; }
.gri-v2 .hikashop_wizardbar li::before { content: ""; height: 6px; border-radius: var(--radius-pill); background: var(--line); }
.gri-v2 .hikashop_wizardbar .hkbadge,
.gri-v2 .hikashop_wizardbar .hikashop_chevron { display: none !important; }
.gri-v2 .hikashop_wizardbar .hikashop_checkout_step_name { padding: 0 !important; color: inherit !important; font: inherit !important; background: none !important; }
.gri-v2 .hikashop_wizardbar .hikashop_checkout_step_name::before { content: counter(step) ". "; }
.gri-v2 .hikashop_wizardbar li:has(~ li.hikashop_cart_step_current) { color: var(--success); }
.gri-v2 .hikashop_wizardbar li:has(~ li.hikashop_cart_step_current)::before { background: var(--success); }
.gri-v2 .hikashop_wizardbar li:has(~ li.hikashop_cart_step_current) .hikashop_checkout_step_name::before { content: "✓ "; }
.gri-v2 .hikashop_wizardbar li.hikashop_cart_step_current { color: var(--violet-900); }
.gri-v2 .hikashop_wizardbar li.hikashop_cart_step_current::before {
  background: linear-gradient(90deg, var(--grad-start), var(--grad-mid), var(--grad-end));
  background-size: 200% 100%;
  animation: gri-shine 2.4s linear infinite;
}

@media (max-width: 991.98px) {
  .gri-v2.gri-focus .astroid-component-section { padding-top: var(--space-4) !important; }
  .gri-v2 .com-users-login,
  .gri-v2 .com-users-reset,
  .gri-v2 .com-users-remind { margin-top: 0 !important; }

  body.gri-v2.gri-checkout { padding-bottom: 0; }
  .gri-v2 .gri-header--checkout .gri-header__main { flex-wrap: nowrap; }
  .gri-v2 .gri-header__secure { font-size: 14px; }
  .gri-v2 .gri-header__back span:not(.gri-icon) { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .gri-v2 .gri-header__back { order: -1; min-width: 44px; min-height: 44px; justify-content: center; }
  .gri-v2 .gri-header--checkout .gri-header__logo { margin-right: auto; }

  /* Steps: the current one is named, the others keep their bar and number */
  .gri-v2 .hikashop_wizardbar li { font-size: 13px; }
  .gri-v2 .hikashop_wizardbar li.hikashop_cart_step_current { flex: 3; }
  .gri-v2 .hikashop_wizardbar li:not(.hikashop_cart_step_current) .hikashop_checkout_step_name { font-size: 0 !important; }
  .gri-v2 .hikashop_wizardbar li:not(.hikashop_cart_step_current) .hikashop_checkout_step_name::before { font-size: 13px; content: counter(step); }
  .gri-v2 .hikashop_wizardbar li:has(~ li.hikashop_cart_step_current) .hikashop_checkout_step_name::before { content: "✓"; }

  .gri-v2 .gri-ef,
  .gri-v2 .gri-ef-row > .gri-ef-part.gri-ef-joined,
  .gri-v2 .com-users-login__form,
  .gri-v2 .com-users-reset__form,
  .gri-v2 .com-users-remind__form { padding: var(--space-5) !important; }
  .gri-v2 .gri-ef__title:not(#gri-none),
  .gri-v2 .gri-login-title:not(#gri-none) { font-size: 22px !important; line-height: 26px !important; }
}

/* Joomla login: "Pas encore de compte ?" on its own line, no orphan separator */
.gri-v2 .com-users-login .gri-login-links a[href*="registration"] { flex-basis: 100%; margin-top: var(--space-2); text-align: center; font-weight: 700; }
.gri-v2 .com-users-login .gri-login-links a[href*="registration"]::before { content: none; }

/* ---------- HikaShop block loader (checkout blocks, cart module): three bouncing paint drops ---------- */
.gri-v2 div.hikashop_checkout_loading > div.hikashop_checkout_loading_elem {
  border-radius: inherit;
  background: rgba(255, 255, 255, .72) !important;
  opacity: 0;
  filter: none;
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
  animation: gri-loader-in var(--dur-base) var(--ease-out) 150ms forwards;
}

.gri-v2 div.hikashop_checkout_loading > div.hikashop_checkout_loading_spinner,
.gri-v2 div.hikashop_checkout_loading > div.hikashop_checkout_loading_spinner.small_spinner {
  display: grid;
  place-items: center;
  border-radius: inherit;
  background: none !important;
  opacity: 0;
  animation: gri-loader-in var(--dur-base) var(--ease-out) 150ms forwards;
}

.gri-v2 div.hikashop_checkout_loading > div.hikashop_checkout_loading_spinner::before {
  content: "";
  width: 14px;
  height: 14px;
  border-radius: 50%;
  transform: translateX(-48px);
  animation: gri-drops 1.1s var(--ease-out) infinite;
}

.gri-v2 div.hikashop_checkout_loading > div.hikashop_checkout_loading_spinner.small_spinner::before { width: 10px; height: 10px; transform: translateX(-32px); animation-name: gri-drops-sm; }

/* The whole checkout reloads (next step, order placing): drops in the middle of the screen */
.gri-v2 #hikashop_checkout.hikashop_checkout_loading > div.hikashop_checkout_loading_spinner::before { position: fixed; top: 50%; left: 50%; margin: -7px 0 0 -7px; }

.gri-v2 div.hikashop_checkout_loading > div.hikashop_checkout_loading_message:not(#gri-none) {
  position: fixed;
  top: 50%;
  margin-top: var(--space-8);
  font: 700 16px/24px var(--font-body);
  color: var(--violet-900);
  text-shadow: none;
}

/* HikaShop's own spinners never show in v2. Its CSS matches spinners at any depth, so a block
   inside a loading block (or the whole checkout) showed the GIF next to the drops: only the
   outermost loading zone keeps its overlay. */
.gri-v2 .hikashop_checkout_loading_spinner { background-image: none !important; }
.gri-v2 .hikashop_checkout_loading .hikashop_checkout_loading > .hikashop_checkout_loading_spinner,
.gri-v2 .hikashop_checkout_loading .hikashop_checkout_loading > .hikashop_checkout_loading_elem,
.gri-v2 .hikashop_checkout_loading :not(.hikashop_checkout_loading) > .hikashop_checkout_loading_spinner,
.gri-v2 .hikashop_checkout_loading :not(.hikashop_checkout_loading) > .hikashop_checkout_loading_elem { display: none !important; }

/* "Suivant" while the checkout works: HikaShop appends a spinner GIF; the drops already say it. */
.gri-v2 .next_button_disabled::after { content: none !important; display: none !important; }
.gri-v2 .next_button_disabled { opacity: .6; }
.gri-v2 .hikashop_infinite_scroll.loading a { background-image: none !important; }

@keyframes gri-loader-in { to { opacity: 1; } }

/* The drops are shadows of an invisible dot moved out of the way (a shadow is never painted under its box). */
@keyframes gri-drops {
  0%, 80%, 100% { box-shadow: 24px 0px 0 var(--yellow-400), 48px 0px 0 var(--magenta-500), 72px 0px 0 var(--violet-700); }
  20% { box-shadow: 24px -12px 0 var(--yellow-400), 48px 0px 0 var(--magenta-500), 72px 0px 0 var(--violet-700); }
  40% { box-shadow: 24px 0px 0 var(--yellow-400), 48px -12px 0 var(--magenta-500), 72px 0px 0 var(--violet-700); }
  60% { box-shadow: 24px 0px 0 var(--yellow-400), 48px 0px 0 var(--magenta-500), 72px -12px 0 var(--violet-700); }
}

@keyframes gri-drops-sm {
  0%, 80%, 100% { box-shadow: 16px 0px 0 var(--yellow-400), 32px 0px 0 var(--magenta-500), 48px 0px 0 var(--violet-700); }
  20% { box-shadow: 16px -8px 0 var(--yellow-400), 32px 0px 0 var(--magenta-500), 48px 0px 0 var(--violet-700); }
  40% { box-shadow: 16px 0px 0 var(--yellow-400), 32px -8px 0 var(--magenta-500), 48px 0px 0 var(--violet-700); }
  60% { box-shadow: 16px 0px 0 var(--yellow-400), 32px 0px 0 var(--magenta-500), 48px -8px 0 var(--violet-700); }
}

@media (prefers-reduced-motion: reduce) {
  .gri-v2 div.hikashop_checkout_loading > div.hikashop_checkout_loading_spinner::before { animation-duration: 2.4s; }
}

/* ---------- AddedToast (bottom right; above the MobileBar on phones) ---------- */
/* HikaShop's own "cartnotify" box: replaced by the toast */
.gri-v2 .notifyjs-corner { display: none !important; }

.gri-v2 .gri-toast-host {
  position: fixed;
  right: var(--space-5);
  bottom: var(--space-5);
  z-index: var(--z-toast, 1100);
  width: min(400px, calc(100vw - 2 * var(--space-4)));
  transition: opacity var(--dur-fast), transform var(--dur-fast);
}

.gri-v2 .gri-toast-host.is-leaving { opacity: 0; transform: translateY(12px); }
.gri-v2 .gri-toast-host .gri-toast { position: relative; flex-wrap: wrap; width: 100%; padding-right: var(--space-8); }
.gri-v2 .gri-toast-host .gri-toast img { flex: none; background: var(--surface); }
.gri-v2 .gri-toast__detail { display: block; color: var(--ink); overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.gri-v2 .gri-toast-host .gri-toast__text strong .gri-icon svg { width: 18px; height: 18px; }
.gri-v2 .gri-toast-host a.gri-btn:not(#gri-none) { flex: none; color: var(--on-brand) !important; text-decoration: none; }

.gri-v2 .gri-toast__close {
  position: absolute;
  top: var(--space-1);
  right: var(--space-1);
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: none;
  color: var(--ink-muted);
  cursor: pointer;
}

.gri-v2 .gri-toast__close:hover { background: var(--violet-050); color: var(--ink); }
.gri-v2 .gri-toast__close svg { width: 16px; height: 16px; }

.gri-v2 .gri-toast--error { border-color: var(--danger); }
.gri-v2 .gri-toast--error .gri-toast__text strong { color: var(--danger); }

/* Compact FreeShippingBar inside the toast */
.gri-v2 .gri-toast .gri-ship--compact { flex-basis: 100%; gap: var(--space-1); padding: var(--space-2) var(--space-3); }
.gri-v2 .gri-ship--compact .gri-ship__text { font-size: 13px; line-height: 18px; }
.gri-v2 .gri-ship--compact .gri-ship__text > .gri-icon { display: none; }
.gri-v2 .gri-ship--compact .gri-ship__track { height: 8px; margin: var(--space-2) 12px var(--space-1); }
.gri-v2 .gri-ship--compact .gri-ship__truck { width: 24px; height: 24px; margin: -12px 0 0 -12px; }
.gri-v2 .gri-ship--compact .gri-ship__truck svg { width: 14px; height: 14px; }
.gri-v2 .gri-ship--compact.is-done .gri-ship__fill { background: var(--success); }

@media (max-width: 991.98px) {
  .gri-v2 .gri-toast-host { right: var(--space-4); left: var(--space-4); width: auto; bottom: calc(80px + env(safe-area-inset-bottom, 0px)); }
  .gri-v2.gri-checkout .gri-toast-host { bottom: var(--space-4); }
}

@media (prefers-reduced-motion: reduce) {
  .gri-v2 .gri-toast-host .gri-toast { animation: none; }
}
.gri-v2 .gri-toast-host .gri-toast__text strong { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gri-v2 .gri-toast__amount { display: block; margin-top: 2px; font: 700 14px/20px var(--font-body); color: var(--ink); font-variant-numeric: tabular-nums; }
.gri-v2 .gri-toast-host .gri-toast img { width: 52px; height: 52px; }
@media (max-width: 575.98px) {
  .gri-v2 .gri-toast-host .gri-toast { gap: var(--space-2); }
  .gri-v2 .gri-toast-host .gri-toast img { width: 44px; height: 44px; }
  .gri-v2 .gri-toast-host .gri-toast__text strong { font-size: 14px; }
  .gri-v2 .gri-toast-host a.gri-btn:not(#gri-none) { padding: 0 var(--space-3); }
}

/* ---------- Dialog, frame variant: HikaShop popup pages (terms, printable cart, invoices...) ---------- */
.gri-v2 .gri-dialog__panel--frame {
  display: flex;
  flex-direction: column;
  width: min(820px, 100%);
  max-width: none;
  height: min(86vh, 900px);
  padding: var(--space-6) var(--space-6) var(--space-5);
  text-align: left;
}

.gri-v2 .gri-dialog__panel--frame .gri-dialog__title:not(#gri-none) { margin: 0 var(--space-8) var(--space-4) 0; font-size: 22px !important; line-height: 28px; text-align: left; }
.gri-v2 .gri-dialog__panel--frame .gri-dialog__title:empty { display: none; }
.gri-v2 .gri-dialog__panel--frame .gri-dialog__actions:empty { display: none; }

.gri-v2 .gri-dialog__frame {
  position: relative;
  flex: 1;
  min-height: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
}

.gri-v2 .gri-dialog__frame iframe { display: block; width: 100%; height: 100%; border: 0; transition: opacity var(--dur-base); }
.gri-v2 .gri-dialog__frame.is-loading iframe { opacity: 0; }

/* Loading: the three paint drops of the block loader */
.gri-v2 .gri-dialog__loading { position: absolute; inset: 0; display: none; place-items: center; }
.gri-v2 .gri-dialog__frame.is-loading .gri-dialog__loading { display: grid; }
.gri-v2 .gri-dialog__loading::before { content: ""; width: 14px; height: 14px; border-radius: 50%; transform: translateX(-48px); animation: gri-drops 1.1s var(--ease-out) infinite; }

/* Alert icon (outline) in the Dialog */
.gri-v2 .gri-dialog__icon--alertCircle { background: var(--danger-050); color: var(--danger); }
.gri-v2 .gri-dialog__icon--trash { background: var(--danger-050); color: var(--danger); }

/* vex itself is no longer used in v2; hide a stray one */
.gri-v2 .vex.vex-theme-default { display: none !important; }

@media (max-width: 767.98px) {
  .gri-v2 .gri-dialog__panel--frame { height: 88vh; padding: var(--space-5) var(--space-4) var(--space-4); }
}
.gri-v2 .gri-dialog__panel--frame .gri-dialog__actions { display: flex; justify-content: flex-end; margin-top: var(--space-4); }
.gri-v2 .gri-dialog__panel--frame .gri-dialog__actions .gri-btn { width: auto; min-width: 180px; }

/* ---------- Chat launcher (design system ChatLauncher) ---------- */
/* Shown once Tawk.to is loaded (html.gri-chat-on) or waits for the first interaction (gri-chat-lazy),
   hidden while the chat window is open. */
.gri-v2 .gri-chatlauncher { display: none; }
.gri-chat-on body.gri-v2 .gri-chatlauncher,
.gri-chat-lazy body.gri-v2 .gri-chatlauncher { display: inline-flex; }
.gri-chat-open body.gri-v2 .gri-chatlauncher { display: none; }

@media (max-width: 991.98px) {
  /* The mobile bar has its own "Aide" entry. The checkout has no bar: compact launcher. */
  body.gri-v2:not(.gri-checkout) .gri-chatlauncher { display: none !important; }
  body.gri-v2.gri-checkout .gri-chatlauncher { left: var(--space-3); bottom: calc(var(--space-3) + env(safe-area-inset-bottom, 0px)); gap: 0; padding-right: 6px; }
  body.gri-v2.gri-checkout .gri-chatlauncher__label { max-width: 0; opacity: 0; }
}

/* ---------- Joomla messages (design system Alert) ---------- */
/* joomla-alert gets data-gri="info|success|danger" and its icon from enhanceMessages(). */
.gri-v2 #system-message-container joomla-alert,
.gri-v2 #system-message-container .alert {
  display: flex;
  gap: var(--space-3);
  align-items: flex-start;
  margin: 0 0 var(--space-3);
  padding: var(--space-4);
  border: 0;
  border-radius: var(--radius-md);
  background: var(--violet-050);
  color: var(--ink);
  font: 400 15px/22px var(--font-body);
  box-shadow: none;
}

.gri-v2 #system-message-container [data-gri="success"] { background: var(--success-050); }
.gri-v2 #system-message-container [data-gri="danger"] { background: var(--danger-050); }
.gri-v2 #system-message-container .gri-msg__icon { flex: none; width: 22px; height: 22px; color: var(--violet-700); }
.gri-v2 #system-message-container .gri-msg__icon svg { width: 22px; height: 22px; }
.gri-v2 #system-message-container [data-gri="success"] .gri-msg__icon { color: var(--success); }
.gri-v2 #system-message-container [data-gri="danger"] .gri-msg__icon { color: var(--danger); }
.gri-v2 #system-message-container .alert-heading { display: none; }
.gri-v2 #system-message-container .alert-wrapper { flex: 1; min-width: 0; }
.gri-v2 #system-message-container .alert-message { padding: 0; }
.gri-v2 #system-message-container .alert-message a { font-weight: 700; }

.gri-v2 #system-message-container .joomla-alert--close,
.gri-v2 #system-message-container .alert .btn-close {
  order: 2;
  flex: none;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  margin: -3px -4px 0 auto;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: none;
  color: var(--ink-muted);
  font-size: 22px;
  line-height: 1;
  opacity: 1;
  cursor: pointer;
  position: static;
}

.gri-v2 #system-message-container .joomla-alert--close:hover { background: rgba(55, 0, 107, .08); color: var(--ink); }

/* Login, password reset…: the message sits above the centred card, at its width. */
.gri-v2.gri-focus:not(.gri-checkout):not(.gri-cartpage) #system-message-container { max-width: 460px; margin: 0 auto var(--space-4); }

/* ---------- Rail (makeRail): product cards scrolling sideways; 3 visible by default ---------- */
.gri-v2 .gri-rail { position: relative; }

.gri-v2 .gri-rail__track:not(#gri-none) {
  display: flex !important;
  flex-wrap: nowrap !important;
  gap: var(--space-4);
  /* Room for the hovered card (lifted, raised shadow): a scrolling box clips what overflows it. */
  margin: calc(-1 * var(--space-4)) calc(-1 * var(--space-3)) calc(-1 * var(--space-2)) !important;
  padding: var(--space-4) var(--space-3) var(--space-6);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-padding: var(--space-3);
  scrollbar-width: none;
  overscroll-behavior-x: contain;
}

.gri-v2 .gri-rail__track::-webkit-scrollbar { display: none; }

/* With a mouse, the hovered card lifts 4px with shadow-raised (0 14px 36px): the scrolling track
   must hold that whole shadow, or it clips it. Touch screens have no hover: the small room above. */
@media (hover: hover) and (min-width: 992px) {
  .gri-v2 .gri-rail__track:not(#gri-none) {
    margin: -28px -40px -56px !important;
    padding: 28px 40px 56px;
    scroll-padding: 40px;
  }
  .gri-v2 .gri-rail__nav--prev { left: -22px; }
  .gri-v2 .gri-rail__nav--next { right: -22px; }
}

.gri-v2 .gri-rail__track > .hikashop_product {
  flex: 0 0 calc((100% - 2 * var(--space-4)) / 3) !important;
  width: auto !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 0 !important;
  float: none !important;
  scroll-snap-align: start;
}

.gri-v2 .gri-rail__track .hikashop_container,
.gri-v2 .gri-rail__track .hikashop_subcontainer { height: 100%; min-height: 0 !important; margin: 0; padding: 0 !important; border: 0 !important; }
.gri-v2 .gri-rail__track .gri-card { height: 100%; }

.gri-v2 .gri-rail__nav {
  position: absolute;
  top: 38%;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--surface);
  color: var(--violet-700);
  box-shadow: var(--shadow-raised);
  cursor: pointer;
  transition: transform var(--dur-fast) var(--ease-out), background var(--dur-fast);
}

.gri-v2 .gri-rail__nav[hidden] { display: none; }
.gri-v2 .gri-rail__nav:hover { background: var(--violet-050); transform: scale(1.06); }
.gri-v2 .gri-rail__nav svg { width: 22px; height: 22px; }
.gri-v2 .gri-rail__nav--prev { left: -18px; }
.gri-v2 .gri-rail__nav--next { right: -18px; }

@media (max-width: 767.98px) {
  /* Swipe: 1.6 cards visible say "there is more" */
  .gri-v2 .gri-rail__track > .hikashop_product { flex-basis: 62% !important; }
  .gri-v2 .gri-rail__nav { display: none; }
}


/* ---------- Currency picker (initCurrency): FilterBar panel and options of the design system ---------- */
.gri-v2 .gri-picker { position: relative; display: inline-flex; }
.gri-v2 .gri-picker select.hikashopcurrency { position: absolute; width: 1px; height: 1px; padding: 0; border: 0; opacity: 0; pointer-events: none; }

.gri-v2 .gri-picker__btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 26px;
  padding: 0 8px 0 11px;
  border: 1px solid rgba(255, 255, 255, .45);
  border-radius: var(--radius-pill);
  background: transparent;
  color: var(--on-brand);
  font: 700 12px/1 var(--font-body);
  white-space: nowrap;
  cursor: pointer;
  transition: background var(--dur-fast), border-color var(--dur-fast);
}

.gri-v2 .gri-picker__btn:hover,
.gri-v2 .gri-picker__btn[aria-expanded="true"] { background: rgba(255, 255, 255, .16); border-color: rgba(255, 255, 255, .8); }
.gri-v2 .gri-picker__btn:focus-visible { outline: none; box-shadow: 0 0 0 3px rgba(255, 255, 255, .5); }
.gri-v2 .gri-picker__btn svg { width: 14px; height: 14px; transition: transform var(--dur-base) var(--ease-out); }
.gri-v2 .gri-picker__btn[aria-expanded="true"] svg { transform: rotate(180deg); }

.gri-v2 .gri-picker__pop { width: 190px; top: calc(100% + 8px); }
.gri-v2 .gri-picker__pop .gri-fpop__list { max-height: 300px; padding: var(--space-2); }
.gri-v2 .gri-picker__pop .gri-fopt { font-size: 14px; }
.gri-v2 .gri-picker__pop .gri-fopt:focus-visible { outline: none; background: var(--violet-050); }

/* In the mobile drawer: a field-like button, the panel opens upwards (bottom of the drawer) */
.gri-v2 .gri-drawer__tools .gri-picker__btn { height: 40px; padding: 0 var(--space-3) 0 var(--space-4); border-color: var(--line-strong); color: var(--ink); font-size: 15px; }
.gri-v2 .gri-drawer__tools .gri-picker__btn:hover,
.gri-v2 .gri-drawer__tools .gri-picker__btn[aria-expanded="true"] { background: var(--violet-050); border-color: var(--violet-700); }
.gri-v2 .gri-drawer__tools .gri-picker__btn:focus-visible { box-shadow: var(--shadow-focus); }
.gri-v2 .gri-drawer__tools .gri-picker__pop { top: auto; bottom: calc(100% + 8px); }

/* Languages in the mobile drawer: the legacy "body a" colour (magenta, !important) made the active
   language unreadable on its violet chip. */
.gri-v2 .gri-drawer__tools .mod-languages__list a:not(#gri-none) { color: var(--violet-900) !important; }
.gri-v2 .gri-drawer__tools .mod-languages__list .lang-active a:not(#gri-none) { color: var(--on-brand) !important; }

/* ---------- Left over from the legacy grimages.css (no longer loaded, see stripLegacy) ---------- */
/* FaLang's credit link, injected at the end of the content */
.gri-v2 a[href*="faboba.com"] { display: none !important; }
/* Joomla gives the active language item a background */
.gri-v2 .mod-languages__list li.lang-active { background: transparent !important; }
/* Cart lines (checkout, cart page): HikaShop floats the quantity tools and indents the prices */
.gri-v2 .hikashop_cart_product_price_value .hikashop_product_price,
.gri-v2 .hikashop_cart_product_total_value .hikashop_product_price { margin: 0; }
.gri-v2 .hikashop_cart_product_quantity_value .hikashop_product_quantity_field,
.gri-v2 .hikashop_cart_product_quantity_value .hikashop_cart_product_quantity_refresh,
.gri-v2 .hikashop_cart_product_quantity_value .hikashop_cart_product_quantity_delete { float: none; }

/* Bootstrap alerts in the page (enhanceMessages adds data-gri and the icon): the design-system Alert */
.gri-v2 .alert.gri-pagealert:not(#gri-none) { display: flex; gap: var(--space-3); align-items: flex-start; margin: 0 0 var(--space-4); padding: var(--space-4); border: 0; border-radius: var(--radius-md); background: var(--violet-050); box-shadow: none !important; color: var(--ink) !important; font: 400 15px/22px var(--font-body); text-align: left; }
.gri-v2 .alert.gri-pagealert[data-gri="success"]:not(#gri-none) { background: var(--success-050); }
.gri-v2 .alert.gri-pagealert[data-gri="danger"]:not(#gri-none) { background: var(--danger-050); }
.gri-v2 .gri-pagealert .gri-msg__icon { flex: none; width: 22px; height: 22px; color: var(--violet-700); }
.gri-v2 .gri-pagealert .gri-msg__icon svg { width: 22px; height: 22px; }
.gri-v2 .gri-pagealert[data-gri="success"] .gri-msg__icon { color: var(--success); }
.gri-v2 .gri-pagealert[data-gri="danger"] .gri-msg__icon { color: var(--danger); }
.gri-v2 .gri-pagealert a:not(#gri-none) { font-weight: 700; color: var(--violet-700) !important; text-decoration: underline; text-underline-offset: 3px; }
.gri-v2 .gri-pagealert[data-gri="danger"] a:not(#gri-none) { color: var(--danger) !important; }
.gri-v2 .hikashop_cart_product_price_value .hikashop_product_price_full { padding: 0 !important; }
/* Empty side columns of the content row (no module in the position): hidden, the content takes their
   room. The legacy 2020 script did it on product pages only (see stripLegacy). */
.gri-v2 .astroid-component-section .astroid-row > .astroid-column:has(> .astroid-module-position:only-child:empty) { display: none !important; }
.gri-v2 .astroid-component-section .astroid-row:has(> .astroid-column > .astroid-module-position:only-child:empty) > .astroid-column:has(.astroid-component-area) { flex: 1 1 0; max-width: none; width: auto; }

/* ---------- Back to top (design system BackToTop on Astroid's button, initBackToTop) ---------- */
/* Astroid styles the button by its id (yellow square, 4px radius !important) */
.gri-v2 #astroid-backtotop.gri-totop { right: var(--space-5); bottom: var(--space-5); width: 44px; height: 44px; margin: 0; padding: 0 !important; border: 1px solid var(--line); border-radius: 50% !important; background: var(--surface) !important; box-shadow: var(--shadow-raised); color: var(--violet-700); }
.gri-v2 #astroid-backtotop.gri-totop:hover { box-shadow: var(--shadow-pop); }
/* jQuery fades it in with display: block: centre the chevron then */
.gri-v2 #astroid-backtotop.gri-totop[style*="display: block"] { display: grid !important; }
@media (max-width: 991.98px) {
  /* Above the MobileBar, or the product page's add-to-cart bar */
  body.gri-v2 #astroid-backtotop.gri-totop { right: var(--space-4); bottom: calc(84px + env(safe-area-inset-bottom, 0px)); }
  body.gri-v2.view-product #astroid-backtotop.gri-totop { bottom: calc(96px + env(safe-area-inset-bottom, 0px)); }
  body.gri-v2.gri-checkout #astroid-backtotop.gri-totop { bottom: calc(var(--space-3) + env(safe-area-inset-bottom, 0px)); }
}

/* ---------- HikaShop carousels (Swiper: brand logos under the listings) ---------- */
.gri-v2 .hikashop_carousel .swiper-pagination,
.gri-v2 [id^="hikashop_carousel_pagination_"] { display: none !important; }
.gri-v2 .hikashop_carousel .swiper-button-prev,
.gri-v2 .hikashop_carousel .swiper-button-next {
  width: 44px; height: 44px; margin-top: -22px;
  border: 1px solid var(--line); border-radius: 50%; background: var(--surface); box-shadow: var(--shadow-raised);
  color: var(--violet-700); transition: box-shadow var(--dur-base) var(--ease-out), transform var(--dur-base) var(--ease-out);
}
.gri-v2 .hikashop_carousel .swiper-button-prev:hover,
.gri-v2 .hikashop_carousel .swiper-button-next:hover { box-shadow: var(--shadow-pop); transform: translateY(-2px); }
.gri-v2 .hikashop_carousel .swiper-button-prev::after,
.gri-v2 .hikashop_carousel .swiper-button-next::after { font-size: 16px; font-weight: 700; }
.gri-v2 .hikashop_carousel .swiper-button-disabled { opacity: 0 !important; pointer-events: none; }

/* ---------- Cookie consent (design system CookieConsent, initConsent) ---------- */
/* While the banner waits for a choice, it takes the bottom-left corner of the chat launcher. */
.gri-consent-pending body.gri-v2 .gri-chatlauncher { display: none !important; }
.gri-v2 .gri-consent .gri-btn:not(#gri-none) { color: var(--btn-fg) !important; }
.gri-v2 .gri-consent__text a:not(#gri-none) { color: var(--violet-700) !important; }
.gri-v2 .gri-dialog .gri-consent__cats { margin: 0 0 var(--space-4); text-align: left; }
/* Product description videos: preview and player at the width of the text */
.gri-v2 .gri-pdp .gri-ytph,
.gri-v2 .gri-pdp .gri-ytframe { max-width: 640px; margin: var(--space-3) 0; }
@media (max-width: 991.98px) {
  /* Above the MobileBar */
  body.gri-v2:not(.gri-checkout) .gri-consent { bottom: calc(68px + env(safe-area-inset-bottom, 0px)); padding-bottom: var(--space-4); border-radius: var(--radius-lg); left: var(--space-2); right: var(--space-2); border-bottom: 1px solid var(--line); }
}
/* Astroid's h2 size and font would win */
.gri-v2 .gri-consent__title:not(#gri-none) { margin: 0 0 var(--space-2); font: 800 20px/1.2 var(--font-display) !important; letter-spacing: 0; text-transform: none !important; color: var(--violet-900) !important; }
@media (max-width: 767.98px) {
  .gri-v2 .gri-consent__text { margin-bottom: var(--space-3); font-size: 14px; line-height: 20px; }
}
