/**
 * Grimages UI – product page (redesign step 2). Markup: tmpl/hikashop/product_show.php,
 * which wraps the original HikaShop blocks. Loaded on product pages only, scoped to .gri-v2.
 */

.gri-v2 .gri-pdp {
  grid-template-columns: minmax(0, 1fr);
  display: grid;
  gap: var(--space-6);
  padding-block: var(--space-4) var(--space-7);
  color: var(--ink);
}

/* The template puts 50px above the component: the breadcrumb already gives the page its start. */
.gri-v2.view-product .gri-section--main { padding-top: var(--space-3) !important; }

/* ---------- Grid ---------- */
.gri-v2 .gri-pdp__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: var(--space-7);
  align-items: start;
}

/* ---------- Gallery (HikaShop show_block_img) ---------- */
.gri-v2 .gri-pdp .gri-pdp__media,
.gri-v2 .gri-pdp .gri-pdp__info { width: auto; float: none; margin: 0; padding: 0; }
.gri-v2 .gri-pdp__media { position: sticky; top: 150px; }

.gri-v2 .gri-pdp #hikashop_product_image_main { width: 100% !important; }

.gri-v2 .gri-pdp .hikashop_main_image_div {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.gri-v2 .gri-pdp .hikashop_product_main_image_thumb {
  height: auto !important;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  padding: var(--space-5);
}

.gri-v2 .gri-pdp .hikashop_product_main_image,
.gri-v2 .gri-pdp .hikashop_product_main_image_subdiv { width: 100%; height: 100%; display: grid !important; place-items: center; }

.gri-v2 .gri-pdp #hikashop_main_image {
  width: auto !important;
  height: auto !important;
  max-width: 100%;
  max-height: 100%;
  margin: 0 !important;
  object-fit: contain;
  cursor: zoom-in;
  transition: transform var(--dur-slow) var(--ease-out);
}

.gri-v2 .gri-pdp .hikashop_main_image_div:hover #hikashop_main_image { transform: scale(1.04); }

.gri-v2 .gri-pdp .hikashop_slide_prev,
.gri-v2 .gri-pdp .hikashop_slide_next {
  position: absolute;
  top: 50%;
  z-index: 2;
  width: 44px;
  height: 44px;
  margin-top: -22px;
  border-radius: 50%;
  background: var(--surface);
  box-shadow: var(--shadow-card);
  color: var(--violet-700) !important;
  place-items: center;
  text-decoration: none;
}

.gri-v2 .gri-pdp .hikashop_slide_prev_active,
.gri-v2 .gri-pdp .hikashop_slide_next_active { display: grid; }
.gri-v2 .gri-pdp .hikashop_slide_prev { left: var(--space-3); }
.gri-v2 .gri-pdp .hikashop_slide_next { right: var(--space-3); }

.gri-v2 .gri-pdp .hikashop_small_image_div {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-top: var(--space-3);
}

.gri-v2 .gri-pdp .hikashop_small_image_div > a {
  width: 72px;
  height: 72px;
  display: grid;
  place-items: center;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  transition: border-color var(--dur-fast), transform var(--dur-fast) var(--ease-bounce);
}

.gri-v2 .gri-pdp .hikashop_small_image_div > a:hover { transform: translateY(-2px); border-color: var(--violet-700); }
.gri-v2 .gri-pdp .hikashop_small_image_div > a.hikashop_active_thumbnail { border-color: var(--magenta-500); box-shadow: 0 0 0 2px var(--magenta-050); }
.gri-v2 .gri-pdp .hikashop_small_image_div img { width: 100% !important; height: 100% !important; object-fit: contain; margin: 0 !important; }

/* ---------- Info column ---------- */
.gri-v2 .gri-pdp__info { display: flex; flex-direction: column; gap: var(--space-4); min-width: 0; }
.gri-v2 .gri-pdp__info > br { display: none; }
.gri-v2 .gri-pdp__head { display: flex; flex-direction: column; gap: var(--space-1); }

.gri-v2 .gri-pdp__brand {
  align-self: flex-start;
  font: 700 13px/18px var(--font-body);
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--violet-700) !important;
  text-decoration: none;
}

.gri-v2 .gri-pdp__brand:hover { color: var(--magenta-500) !important; }

.gri-v2 #hikashop_product_top_part .gri-pdp__title,
.gri-v2 .gri-pdp__title {
  margin: 0;
  font: 800 36px/40px var(--font-display);
  color: var(--ink);
  text-wrap: balance;
  text-transform: none;
}

.gri-v2 .gri-pdp__title .hikashop_product_code_main { display: block; font: 400 14px/20px var(--font-body); color: var(--ink-muted); }

/* Rating: hidden while the product has no vote ("Pas de vote") */
.gri-v2 .gri-pdp .hikashop_product_vote_mini:has(.hk-rating-empty),
.gri-v2 .gri-pdp .hikashop_product_vote_mini:empty { display: none; }
.gri-v2 .gri-pdp .hikashop_product_vote_mini .hk-rating-empty-label { display: none; }

/* ---------- Price ---------- */
.gri-v2 .gri-pdp__price .hikashop_product_price_main { display: block; text-align: left; }

.gri-v2 .gri-pdp__price .hikashop_product_price,
.gri-v2 .gri-pdp__price .hikashop_product_price_per_unit,
.gri-v2 .gri-pdp__price .hikashop_product_price_per_unit_x {
  display: inline !important;
  width: auto !important;
  float: none !important;
  margin: 0 !important;
  text-align: left !important;
}

.gri-v2 .gri-pdp__price .hikashop_product_price_full {
  justify-content: flex-start;
  text-align: left;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: var(--space-1) var(--space-2);
}

.gri-v2 .gri-pdp__price .hikashop_product_price_full > br { display: none; }

.gri-v2 .gri-pdp__price .hikashop_product_price_0,
.gri-v2 .gri-pdp__price .hikashop_product_price_full > .hikashop_product_price {
  font: 900 36px/40px var(--font-body) !important;
  color: var(--magenta-500) !important;
  font-variant-numeric: tabular-nums;
}

.gri-v2 .gri-pdp__price .hikashop_product_price_before_discount {
  font: 400 18px/24px var(--font-body);
  color: var(--ink-muted) !important;
  text-decoration: line-through;
}

.gri-v2 .gri-pdp__price .hikashop_product_discount {
  display: inline-flex;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  background: var(--orange-500);
  color: var(--ink) !important;
  font: 700 13px/16px var(--font-body);
}

.gri-v2 .gri-pdp__price .hikashop_product_price_per_unit {
  display: inline !important;
  font: 400 15px/20px var(--font-body);
  color: var(--ink-muted);
}

/* Volume prices: "0,54 € l'unité pour au moins 10 achetés." → small cards */
.gri-v2 .gri-pdp__price .hikashop_product_price_with_min_qty {
  display: inline-flex;
  flex-direction: column;
  padding: var(--space-2) var(--space-3);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
}

.gri-v2 .gri-pdp__price .hikashop_product_price_with_min_qty:first-of-type { flex-basis: auto; }
.gri-v2 .gri-pdp__price .hikashop_product_several_prices .hikashop_product_price_0 + .hikashop_product_price_per_unit { flex-basis: 100%; }

.gri-v2 .gri-pdp__price .hikashop_product_price_with_min_qty .hikashop_product_price {
  font: 900 18px/22px var(--font-body) !important;
  color: var(--violet-900) !important;
}

.gri-v2 .gri-pdp__price .hikashop_product_price_per_unit_x { font: 400 13px/18px var(--font-body); color: var(--ink-muted); }

/* ---------- Variants (HikaShop characteristics) ---------- */
.gri-v2 .gri-pdp .hikashop_product_characteristics {
  margin: 0;
  padding: 0;
  border: 0 !important;
  background: none;
  box-shadow: none;
}

.gri-v2 .gri-pdp .hikashop_product_characteristics_table,
.gri-v2 .gri-pdp .hikashop_product_characteristics_table tbody,
.gri-v2 .gri-pdp .hikashop_product_characteristics_table tr,
.gri-v2 .gri-pdp .hikashop_product_characteristics_table td { display: block; width: auto; padding: 0; border: 0; }

.gri-v2 .gri-pdp .hikashop_product_characteristics_table tr + tr { margin-top: var(--space-4); }

.gri-v2 .gri-pdp .hikashop_product_characteristics_table td:first-child {
  margin-bottom: var(--space-2);
  font: 700 15px/20px var(--font-body);
}

.gri-v2 .gri-pdp .hikashop_product_characteristics_table td:first-child [data-gri-choice] { font-weight: 400; color: var(--ink-muted); }

.gri-v2 .gri-pdp .hikashop_product_characteristics select {
  height: 48px;
  max-width: 420px;
  padding: 0 var(--space-6) 0 var(--space-4);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background-color: var(--surface);
  font: 400 16px/1 var(--font-body);
  color: var(--ink);
}

.gri-v2 .gri-pdp .hikashop_product_characteristics select.gri-select--chips {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.gri-v2 .gri-pdp__chips { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.gri-v2 .gri-pdp__chips .gri-chip { min-width: 48px; justify-content: center; transition: transform var(--dur-fast) var(--ease-bounce), background-color var(--dur-fast); }
.gri-v2 .gri-pdp__chips .gri-chip:active { transform: scale(.94); }

/* ---------- Buy block (HikaShop quantity layout) ---------- */
.gri-v2 .gri-pdp__buy {
  padding: 0;
  background: none;
}

.gri-v2 .gri-pdp .hikashop_product_quantity_main {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-3);
}

.gri-v2 .gri-pdp .hikashop_product_quantity_main > br { display: none; }

.gri-v2 .gri-pdp .hikashop_product_stock_count {
  flex-basis: 100%;
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font: 700 15px/20px var(--font-body);
  color: var(--success);
}

.gri-v2 .gri-pdp .hikashop_product_stock_count::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 0 3px var(--success-050);
}

.gri-v2 .gri-pdp .hikashop_product_stock_count:empty,
.gri-v2 .gri-pdp .hikashop_product_stock_count.is-empty { display: none; }
.gri-v2 .gri-pdp .hikashop_product_stock_count.is-low { color: var(--warning); }
.gri-v2 .gri-pdp .hikashop_product_stock_count.is-low::before { box-shadow: 0 0 0 3px #fbf0dc; animation: gri-pulse 1.6s ease-in-out infinite; }
.gri-v2 .gri-pdp .hikashop_product_stock_count.hikashop_product_no_stock { color: var(--danger); }
.gri-v2 .gri-pdp .hikashop_product_stock_count.hikashop_product_no_stock::before { box-shadow: 0 0 0 3px var(--danger-050); }

/* Quantity: [−] [ 1 ] [+] pill */
.gri-v2 .gri-pdp .hikashop_quantity_form { display: flex; align-items: center; margin: 0; }

.gri-v2 .gri-pdp .hikashop_product_quantity_input_div_default_main {
  display: inline-flex;
  align-items: center;
  height: 52px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-pill);
  background: var(--surface);
  overflow: hidden;
}

.gri-v2 #hikashop_product_right_part #hikashop_product_quantity_main .hikashop_product_quantity_change_div_default { display: contents !important; }
.gri-v2 #hikashop_product_right_part #hikashop_product_quantity_main .hikashop_product_quantity_change_div_minus_default,
.gri-v2 #hikashop_product_right_part #hikashop_product_quantity_main .hikashop_product_quantity_change_div_plus_default { display: block !important; float: none; margin: 0; padding: 0; }
.gri-v2 #hikashop_product_right_part #hikashop_product_quantity_main .hikashop_product_quantity_change_div_minus_default { order: 1; }
.gri-v2 #hikashop_product_right_part #hikashop_product_quantity_main .hikashop_product_quantity_input_div_default { order: 2; display: block; float: none; width: auto; margin: 0; padding: 0; }
.gri-v2 #hikashop_product_right_part #hikashop_product_quantity_main .hikashop_product_quantity_change_div_plus_default { order: 3; }

.gri-v2 #hikashop_product_right_part #hikashop_product_quantity_main .hikashop_product_quantity_field_change {
  width: 46px;
  height: 50px;
  display: grid;
  place-items: center;
  margin: 0;
  padding: 0;
  border: 0 !important;
  border-radius: 0;
  background: transparent !important;
  box-shadow: none !important;
  color: var(--violet-700) !important;
  font: 700 22px/1 var(--font-body);
  text-decoration: none;
}

.gri-v2 #hikashop_product_right_part #hikashop_product_quantity_main .hikashop_product_quantity_field_change:hover { background: var(--violet-050) !important; }

.gri-v2 #hikashop_product_right_part #hikashop_product_quantity_main input.hikashop_product_quantity_field {
  width: 52px !important;
  height: 50px;
  margin: 0;
  padding: 0;
  border: 0 !important;
  box-shadow: none !important;
  background: transparent;
  text-align: center;
  font: 700 18px/1 var(--font-body);
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

/* Add to cart = primary "pop" button */
.gri-v2 #hikashop_product_right_part #hikashop_product_quantity_main a[id$="_add_to_cart_button"],
.gri-v2 #hikashop_product_right_part #hikashop_product_quantity_main .hika_waitlist_btn {
  --btn-bg: var(--violet-700);
  --btn-fg: var(--on-brand);
  --btn-edge: var(--violet-900);
  flex: 1 1 220px;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  min-height: 56px;
  margin: 0 0 4px;
  padding: 0 var(--space-6);
  border: 0 !important;
  border-radius: var(--radius-pill) !important;
  background: var(--btn-bg) !important;
  color: var(--btn-fg) !important;
  box-shadow: 0 4px 0 var(--btn-edge) !important;
  font: 700 18px/1 var(--font-body) !important;
  text-decoration: none !important;
  text-transform: none !important;
  transform: translateY(0);
  transition: transform var(--dur-fast) var(--ease-out), box-shadow var(--dur-fast) var(--ease-out), background-color var(--dur-base);
}

.gri-v2 #hikashop_product_right_part #hikashop_product_quantity_main a[id$="_add_to_cart_button"]:hover,
.gri-v2 #hikashop_product_right_part #hikashop_product_quantity_main .hika_waitlist_btn:hover { transform: translateY(-2px); box-shadow: 0 6px 0 var(--btn-edge) !important; }
.gri-v2 #hikashop_product_right_part #hikashop_product_quantity_main a[id$="_add_to_cart_button"]:active { transform: translateY(4px); box-shadow: 0 0 0 var(--btn-edge) !important; }
.gri-v2 #hikashop_product_right_part #hikashop_product_quantity_main a[id$="_add_to_cart_button"] .gri-icon { width: 22px; height: 22px; }
.gri-v2 #hikashop_product_right_part #hikashop_product_quantity_main a[id$="_add_to_cart_button"].add_in_progress { opacity: .7; pointer-events: none; }

.gri-v2 #hikashop_product_right_part #hikashop_product_quantity_main .hika_waitlist_btn {
  --btn-bg: var(--surface);
  --btn-fg: var(--violet-700);
  --btn-edge: var(--violet-700);
  border: 2px solid var(--violet-700) !important;
}

.gri-v2 .gri-pdp .hikashop_product_quantity_main_alt {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font: 400 15px/22px var(--font-body);
  color: var(--ink-muted);
}

.gri-v2 .gri-pdp .hikashop_product_quantity_main_alt.hikashop_alt_hide { display: none; }

/* ---------- Legacy clean-up ---------- */
.gri-v2 #hikashop_product_top_part { margin: 0; padding: 0; border: 0 !important; background: none; }
.gri-v2 #hikashop_product_top_part h1 { margin: 0; padding: 0; border: 0 !important; }
.gri-v2 .gri-pdp .element-invisible {
  position: absolute !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

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

/* ---------- Reassurance ---------- */
.gri-v2 .gri-pdp__reassure {
  display: grid;
  gap: var(--space-3);
  /* Air between the buy buttons and the reassurance lines, with a thin separator */
  margin: var(--space-6) 0 0;
  padding: var(--space-5) 0 0;
  border-top: 1px solid var(--line);
  list-style: none;
}

.gri-v2 .gri-pdp__reassure li {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  font: 400 14px/20px var(--font-body);
  color: var(--ink-muted);
}

.gri-v2 .gri-pdp__reassure li > .gri-icon {
  width: 36px;
  height: 36px;
  flex: none;
  padding: 8px;
  border-radius: 50%;
  background: var(--magenta-050);
  color: var(--magenta-500);
}

.gri-v2 .gri-pdp__reassure strong { color: var(--ink); }
.gri-v2 .gri-pdp__reassure-more { font-size: inherit; }
.gri-v2 .gri-pdp__reassure-short { display: none; }

/* Phones: one row of three, icon over a short label; the details stay on larger screens */
@media (max-width: 767.98px) {
  .gri-v2 .gri-pdp__reassure { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-2); margin-top: var(--space-4); padding-top: var(--space-3); }
  .gri-v2 .gri-pdp__reassure li { flex-direction: column; align-items: center; gap: 4px; text-align: center; font-size: 12px; line-height: 16px; }
  .gri-v2 .gri-pdp__reassure li > .gri-icon { width: 30px; height: 30px; padding: 6px; }
  .gri-v2 .gri-pdp__reassure strong { font-weight: 700; }
  .gri-v2 .gri-pdp__reassure-more { display: none; }
  .gri-v2 .gri-pdp__reassure-short { display: block; font-size: 11px; line-height: 14px; }
}
.gri-v2 .gri-pdp .hikashop_product_contact_main:empty,
.gri-v2 .gri-pdp .hikashop_product_tags:empty { display: none; }

/* ---------- Description + details ---------- */
.gri-v2 .gri-pdp__details {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
  gap: var(--space-6);
  align-items: start;
  margin-top: var(--space-4);
}

.gri-v2 .gri-pdp__desc,
.gri-v2 .gri-pdp__specs {
  padding: var(--space-6);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
}

.gri-v2 .gri-pdp__specs { background: var(--surface-2); border-color: transparent; }

.gri-v2 .gri-pdp__h2 {
  margin: 0 0 var(--space-4);
  font: 700 24px/30px var(--font-display);
  color: var(--violet-900);
  text-transform: none;
}

.gri-v2 .gri-pdp .hikashop_product_description_main {
  max-width: 72ch;
  font: 400 16px/26px var(--font-body);
  color: var(--ink);
}

.gri-v2 .gri-pdp .hikashop_product_description_main p { margin: 0 0 var(--space-3); }
.gri-v2 .gri-pdp .hikashop_product_description_main span.lead { font: 700 18px/26px var(--font-body); }
.gri-v2 .gri-pdp .hikashop_product_description_main :is(h1, h2, h3, h4):not(#gri-none) { margin: var(--space-4) 0 var(--space-2); font: 800 20px/1.25 var(--font-display) !important; text-transform: none !important; color: var(--violet-900) !important; }
.gri-v2 .gri-pdp .hikashop_product_description_main > :is(h1, h2, h3, h4):first-child:not(#gri-none) { margin-top: 0; }
.gri-v2 .gri-pdp .hikashop_product_description_main a { color: var(--magenta-500) !important; }
.gri-v2 .gri-pdp .hikashop_product_description_main img { max-width: 100%; height: auto; border-radius: var(--radius-md); }
/* Tables typed in a description (sizes, contents…): design-system look, text may wrap (their inline
   « white-space: nowrap » widened the page on phones); a very wide one scrolls in its own box. */
.gri-v2 .gri-pdp .hikashop_product_description_main { min-width: 0; }
.gri-v2 .gri-pdp .gri-desc-table { max-width: 100%; margin: 0 0 var(--space-4); overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius-md); contain: inline-size; }
.gri-v2 .gri-pdp .hikashop_product_description_main table:not(#gri-none) { width: 100% !important; max-width: none; margin: 0; border-collapse: collapse !important; font: 400 14px/20px var(--font-body); }
.gri-v2 .gri-pdp .hikashop_product_description_main :is(th, td):not(#gri-none) { padding: 8px 12px !important; border: 0 !important; border-bottom: 1px solid var(--line) !important; white-space: normal !important; text-align: left; vertical-align: top; }
.gri-v2 .gri-pdp .hikashop_product_description_main tr:last-child > :is(th, td) { border-bottom: 0 !important; }
.gri-v2 .gri-pdp .hikashop_product_description_main :is(th, td) + :is(th, td) { border-left: 1px solid var(--line) !important; }
.gri-v2 .gri-pdp .hikashop_product_description_main th:not(#gri-none),
.gri-v2 .gri-pdp .hikashop_product_description_main thead td:not(#gri-none) { background: var(--violet-050); color: var(--violet-900); font-weight: 700; }
.gri-v2 .gri-pdp .hikashop_product_description_main tbody td:first-child { font-weight: 700; white-space: nowrap !important; }
@media (max-width: 575.98px) {
  .gri-v2 .gri-pdp .hikashop_product_description_main table:not(#gri-none) { font-size: 13px; line-height: 18px; }
  .gri-v2 .gri-pdp .hikashop_product_description_main :is(th, td):not(#gri-none) { padding: 6px 8px !important; }
}

.gri-v2 .gri-pdp__specs { font: 400 15px/24px var(--font-body); }
.gri-v2 .gri-pdp__specs a { color: var(--magenta-500) !important; font-weight: 700; }
.gri-v2 .gri-pdp__specs table { width: 100%; border-collapse: collapse; }
.gri-v2 .gri-pdp__specs td,
.gri-v2 .gri-pdp__specs th { padding: var(--space-2) 0; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.gri-v2 .gri-pdp__specs td:first-child { font-weight: 700; padding-right: var(--space-3); }
.gri-v2 .gri-pdp__specs .hikashop_product_url_main:empty,
.gri-v2 .gri-pdp__specs .hikashop_product_files_main:empty { display: none; }

/* ---------- Reviews (initReviews: HikaShop vote listing and form, after the layout) ---------- */
/* Rating under the title: the design-system Rating, linking to the reviews */
.gri-v2 .hikashop_product_vote_mini:has(.gri-pdp__rating) .hikashop_vote_stars { display: none; }
.gri-v2 a.gri-pdp__rating:not(#gri-none) { color: var(--ink-muted) !important; text-decoration: none; }
.gri-v2 a.gri-pdp__rating:not(#gri-none):hover span:last-child { text-decoration: underline; text-underline-offset: 3px; }

.gri-v2 .gri-reviews__anchor { display: block; scroll-margin-top: 140px; }
.gri-v2 #hikashop_comment_form.gri-reviews {
  margin-top: var(--space-7);
  padding: 0;
  border: 0;
  background: none !important;
  font: 400 15px/22px var(--font-body);
  overflow: visible !important; /* legacy hidden overflow made it a scroll container: the summary could not stick */
}
.gri-v2 .gri-reviews .hikashop_product_vote_listing,
.gri-v2 .gri-reviews .hikashop_listing_comment { margin: 0; padding: 0; border: 0; background: none !important; }

.gri-v2 .gri-reviews__grid { display: grid; grid-template-columns: minmax(240px, 300px) minmax(0, 1fr); gap: var(--space-7); align-items: start; }

/* Summary */
.gri-v2 .gri-reviews__summary { position: sticky; top: 152px; /* under the sticky header (128px) */ display: flex; flex-direction: column; gap: var(--space-3); padding: var(--space-5); border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); }
.gri-v2 .gri-reviews__title:not(#gri-none) { margin: 0; font: 800 26px/1.15 var(--font-display) !important; text-transform: none !important; color: var(--violet-900) !important; }
.gri-v2 .gri-reviews__avg { display: flex; align-items: baseline; gap: var(--space-2); margin: 0; }
.gri-v2 .gri-reviews__avg strong { font: 800 52px/1 var(--font-display); color: var(--violet-900); }
.gri-v2 .gri-reviews__avg span { font-size: 15px; color: var(--ink-muted); }
.gri-v2 .gri-stars--lg .gri-stars__row .gri-icon { width: 22px; height: 22px; }
.gri-v2 .gri-stars .gri-stars__row .gri-icon svg { width: 100%; height: 100%; fill: currentColor; }
.gri-v2 .gri-reviews__bars { display: grid; gap: 6px; margin: var(--space-2) 0 0; padding: 0; list-style: none; }
.gri-v2 .gri-reviews__bars li { display: grid; grid-template-columns: 10px 14px minmax(0, 1fr) 24px; align-items: center; gap: var(--space-2); margin: 0; font: 700 13px/1 var(--font-body); color: var(--ink-muted); }
.gri-v2 .gri-reviews__bars li::before { content: none !important; }
.gri-v2 .gri-reviews__bars li > svg { width: 14px; height: 14px; fill: var(--yellow-400); stroke: var(--yellow-400); }
.gri-v2 .gri-reviews__bar { height: 8px; border-radius: 4px; background: var(--surface-2); overflow: hidden; }
.gri-v2 .gri-reviews__bar > span { display: block; height: 100%; border-radius: inherit; background: var(--yellow-400); }
.gri-v2 .gri-reviews__barcount { text-align: right; font-weight: 400; }
.gri-v2 .gri-reviews__empty { margin: 0; color: var(--ink-muted); }
.gri-v2 a.gri-reviews__write:not(#gri-none) { align-self: stretch; justify-content: center; margin-top: var(--space-2); color: var(--violet-700) !important; text-decoration: none; }

/* Review cards */
.gri-v2 .gri-reviews__list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-4); }
.gri-v2 .gri-review { display: flex; flex-direction: column; gap: var(--space-3); padding: var(--space-4) var(--space-5); border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface); }
.gri-v2 .gri-review[hidden] { display: none; }
.gri-v2 .gri-review__head { display: grid; grid-template-columns: 40px minmax(0, 1fr); grid-template-areas: "avatar who" "avatar stars"; column-gap: var(--space-3); align-items: center; }
.gri-v2 .gri-review__avatar { grid-area: avatar; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--c); color: #fff; font: 800 18px/1 var(--font-display); }
.gri-v2 .gri-review__who { grid-area: who; display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 var(--space-2); min-width: 0; }
.gri-v2 .gri-review__who strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink); }
.gri-v2 .gri-review__who time { font-size: 13px; color: var(--ink-muted); }
.gri-v2 .gri-review__head .gri-stars { grid-area: stars; }
.gri-v2 .gri-review__head .gri-stars__row .gri-icon { width: 14px; height: 14px; }
.gri-v2 .gri-review__text { margin: 0; color: var(--ink); overflow-wrap: anywhere; }
.gri-v2 .gri-reviews__more { margin: var(--space-4) auto 0; display: flex; }
.gri-v2 .gri-reviews__main .pagination .limit,
.gri-v2 .gri-reviews__main .pagination:not(:has(a)) .hikashop_results_counter { display: none; }
.gri-v2 .gri-reviews__main .hikashop_results_counter { display: block; margin-top: var(--space-3); text-align: center; font-size: 13px; color: var(--ink-muted); }

/* Form and guest card */
.gri-v2 .gri-reviews #hikashop_vote_form { margin-top: var(--space-5); scroll-margin-top: 140px; }
.gri-v2 .gri-review-login { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; align-items: center; gap: var(--space-4); padding: var(--space-4) var(--space-5); border-radius: var(--radius-md); background: var(--violet-050); }
.gri-v2 .gri-review-login__icon { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--surface); color: var(--yellow-400); }
.gri-v2 .gri-review-login__icon svg { width: 22px; height: 22px; fill: currentColor; }
.gri-v2 .gri-review-login p { margin: 0; font-weight: 700; color: var(--violet-900); }
.gri-v2 .gri-review-login a.gri-btn:not(#gri-none) { color: var(--violet-700) !important; text-decoration: none; }

.gri-v2 .gri-review-form { display: grid; gap: var(--space-3); padding: var(--space-5); border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface); }
.gri-v2 .gri-review-form__title:not(#gri-none) { margin: 0; font: 800 20px/1.2 var(--font-display) !important; text-transform: none !important; color: var(--violet-900) !important; }
.gri-v2 .gri-review-form .hikashop_vote_stars { display: flex; align-items: center; gap: var(--space-3); }
.gri-v2 .gri-review-form__label { font: 700 14px/20px var(--font-body); }
.gri-v2 .gri-review-form .clear_both,
.gri-v2 .gri-review-form > br { display: none; }
.gri-v2 .gri-review-form .hk-rating { display: inline-flex; gap: 4px; width: auto !important; margin: 0 !important; float: none !important; }
.gri-v2 .gri-review-form .hk-rate-star {
  width: 30px;
  height: 30px;
  background: var(--line) !important;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m12 2.5 2.9 6 6.6.9-4.8 4.6 1.2 6.5L12 17.4l-5.9 3.1 1.2-6.5L2.5 9.4l6.6-.9Z'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m12 2.5 2.9 6 6.6.9-4.8 4.6 1.2 6.5L12 17.4l-5.9 3.1 1.2-6.5L2.5 9.4l6.6-.9Z'/%3E%3C/svg%3E") center / contain no-repeat;
  cursor: pointer;
  transition: transform var(--dur-fast) var(--ease-bounce);
}
.gri-v2 .gri-review-form .hk-rate-star::before { content: none !important; }
.gri-v2 .gri-review-form .hk-rate-star.state-full,
.gri-v2 .gri-review-form .hk-rate-star.state-hover { background: var(--yellow-400) !important; }
.gri-v2 .gri-review-form .hk-rate-star:hover { transform: scale(1.15); }
.gri-v2 .gri-review-form textarea {
  width: 100%;
  min-height: 112px;
  padding: var(--space-3) var(--space-4);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--surface);
  font: 400 16px/24px var(--font-body);
  color: var(--ink);
  resize: vertical;
}
.gri-v2 .gri-review-form textarea:focus { outline: none; border-color: var(--magenta-500); box-shadow: 0 0 0 3px var(--magenta-050); }
.gri-v2 .gri-review-form input.gri-review-form__send:not(#gri-none) { justify-self: start; }
.gri-v2 .gri-review-form .hikashop_vote_stars { justify-content: flex-start; }
.gri-v2 .gri-review-form .hikashop_vote_notification:not(:empty) { padding: var(--space-3) var(--space-4); border-radius: var(--radius-md); background: var(--violet-050) !important; color: var(--violet-900); font-weight: 700; }
.gri-v2 .gri-review-form .hikashop_vote_notification * { margin: 0 !important; padding: 0 !important; border: 0 !important; background: none !important; box-shadow: none !important; color: inherit !important; font: inherit !important; }

/* ---------- Mobile buy bar ---------- */
.gri-v2 .gri-buybar { display: none; }

@media (max-width: 991.98px) {
  .gri-v2 .gri-pdp { gap: var(--space-4); }
  .gri-v2 .gri-pdp__grid { grid-template-columns: minmax(0, 1fr); gap: var(--space-5); }
  .gri-v2 .gri-pdp__media { position: static; }
  .gri-v2 .gri-pdp .hikashop_product_main_image_thumb { padding: var(--space-3); }
  .gri-v2 .gri-pdp .hikashop_small_image_div { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .gri-v2 .gri-pdp .hikashop_small_image_div > a { flex: none; width: 60px; height: 60px; }
  .gri-v2 .gri-pdp__title { font-size: 28px; line-height: 32px; }
  .gri-v2 .gri-pdp__details { grid-template-columns: 1fr; }
  .gri-v2 .gri-pdp__desc,
  .gri-v2 .gri-pdp__specs { padding: var(--space-4); border-radius: var(--radius-md); }
  .gri-v2 .gri-reviews__grid { grid-template-columns: minmax(0, 1fr); gap: var(--space-5); }
  .gri-v2 .gri-reviews__summary { position: static; }
  .gri-v2 .gri-reviews__list { grid-template-columns: minmax(0, 1fr); }
  .gri-v2 .gri-review-login { grid-template-columns: 44px minmax(0, 1fr); }
  .gri-v2 .gri-review-login .gri-btn { grid-column: 1 / -1; }

  .gri-v2 .gri-buybar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: var(--z-header);
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-3) var(--space-4) calc(var(--space-3) + env(safe-area-inset-bottom, 0px));
    background: var(--surface);
    border-top: 1px solid var(--line);
    box-shadow: 0 -6px 20px rgba(55, 0, 107, .1);
    transform: translateY(110%);
    transition: transform var(--dur-base) var(--ease-out);
  }

  .gri-v2 .gri-buybar[hidden] { display: none; }
  .gri-v2 .gri-buybar.is-visible { transform: none; }
  .gri-v2 .gri-buybar__price { flex: 1; min-width: 0; font: 900 22px/26px var(--font-body); color: var(--magenta-500); font-variant-numeric: tabular-nums; }
  .gri-v2 .gri-buybar .gri-btn { flex: none; }

  /* The buy bar replaces the bottom navigation while it is shown */
  .gri-v2.gri-buybar-on .gri-mobilebar { transform: translateY(110%); }
  .gri-v2 .gri-mobilebar { transition: transform var(--dur-base) var(--ease-out); }
}

@media (prefers-reduced-motion: reduce) {
  .gri-v2 .gri-pdp *,
  .gri-v2 .gri-buybar { animation: none !important; transition-duration: 0ms !important; }
}

/* Quantity stepper exactly as the design system: white pill, transparent number field, in every state */
.gri-v2 #hikashop_product_right_part #hikashop_product_quantity_main input.hikashop_product_quantity_field,
.gri-v2 #hikashop_product_right_part #hikashop_product_quantity_main input.hikashop_product_quantity_field:focus,
.gri-v2 #hikashop_product_right_part #hikashop_product_quantity_main input.hikashop_product_quantity_field:hover {
  background: transparent !important;
  box-shadow: none !important;
  outline: none;
}

/* ---------- Wishlist heart next to the add button ---------- */
.gri-v2 .gri-pdp__buy { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; column-gap: var(--space-3); }
.gri-v2 .gri-pdp__buy > .hikashop_product_quantity_main_alt { grid-column: 1 / -1; }

.gri-v2 .gri-pdp a.gri-pdp__wish:not(#gri-none) {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border: 2px solid var(--line-strong);
  border-radius: 50%;
  background: var(--surface);
  color: var(--violet-700) !important;
  text-decoration: none;
  transition: transform var(--dur-fast) var(--ease-bounce), color var(--dur-fast), border-color var(--dur-fast);
}

.gri-v2 .gri-pdp a.gri-pdp__wish:not(#gri-none) .gri-icon { width: 24px; height: 24px; }
.gri-v2 .gri-pdp a.gri-pdp__wish:not(#gri-none):hover { border-color: var(--magenta-500); color: var(--magenta-500) !important; transform: scale(1.06); }
.gri-v2 .gri-pdp a.gri-pdp__wish.is-on:not(#gri-none) { border-color: var(--magenta-500); color: var(--magenta-500) !important; }
.gri-v2 .gri-pdp a.gri-pdp__wish.is-on svg { fill: currentColor; }
.gri-v2 .gri-pdp a.gri-pdp__wish.add_in_progress { opacity: .6; pointer-events: none; }
.gri-v2 .gri-pdp a.gri-pdp__wish.is-locked:not(#gri-none) { color: var(--ink-muted) !important; }
.gri-v2 .gri-pdp a.gri-pdp__wish:not(#gri-none) { position: static !important; inset: auto !important; margin: 0 0 4px; }

/* HikaShop's own "Ajouter à vos favoris" button (logged-in customers): replaced by the heart */
.gri-v2 .gri-pdp .hikashop_product_quantity_main .hikawishlist,
.gri-v2 .gri-pdp .hikashop_product_quantity_main [data-addtowishlist] { display: none !important; }

/* Phones: the add button takes the full width, so the heart sits on the quantity row */
@media (max-width: 767.98px) {
  .gri-v2 .gri-pdp__buy { position: relative; grid-template-columns: minmax(0, 1fr); }
  .gri-v2 .gri-pdp a.gri-pdp__wish:not(#gri-none) {
    position: absolute !important;
    right: 0;
    bottom: calc(56px + var(--space-3));
    inset: auto 0 calc(56px + var(--space-3)) auto !important;
    width: 52px;
    height: 52px;
    margin: 0;
  }
}

/* Legacy grimages.css decorates the review form with two big Font Awesome stars and a frame */
.gri-v2 #hikashop_comment_form.gri-reviews::before,
.gri-v2 #hikashop_comment_form.gri-reviews::after { content: none !important; display: none !important; }
.gri-v2 .gri-reviews #hikashop_vote_form,
.gri-v2 .gri-reviews .hikashop_product_vote_form { padding: 0 !important; border: 0 !important; border-radius: 0 !important; background: none !important; box-shadow: none !important; }
.gri-v2 .gri-reviews__bars li > svg { color: var(--yellow-400); }

/* ---------- « À combiner avec » (HikaShop related products, initRelatedRail) ---------- */
.gri-v2 #hikashop_submodules { margin-top: var(--space-7); }
.gri-v2 #hikashop_submodules .hikashop_category_information > h2:not(#gri-none) {
  margin: 0 0 var(--space-5);
  padding: 0;
  border: 0;
  font: 800 clamp(24px, 2.2vw, 28px)/1.15 var(--font-display) !important;
  letter-spacing: -.01em;
  text-transform: none !important;
  color: var(--violet-900) !important;
}
.gri-v2 .gri-related .gri-rail__track > .hikashop_product { flex-basis: calc((100% - 3 * var(--space-4)) / 4) !important; }
.gri-v2 .gri-pager-off { display: none !important; }

@media (max-width: 991.98px) {
  .gri-v2 .gri-related .gri-rail__track > .hikashop_product { flex-basis: 46% !important; }
}

/* Review form in the Dialog (initReviews) */
.gri-v2 .gri-dialog__panel--content { width: min(560px, calc(100vw - 32px)); text-align: left; }
.gri-v2 .gri-dialog__panel--content .gri-dialog__title { text-align: left; }
.gri-v2 .gri-dialog .gri-review-form { padding: 0; border: 0; background: none; }
.gri-v2 .gri-dialog .gri-review-form .gri-review-form__send { width: 100%; justify-content: center; }
.gri-v2 .gri-dialog__panel--content .gri-dialog__actions:empty { display: none; }

/* Options (ProductAddon): the HikaShop table stays in the page, hidden; its Non/Oui select is driven by the card */
.gri-v2 .gri-pdp__options:not(#gri-none) { margin: var(--space-4) 0; padding: 0; border: 0; background: none; box-shadow: none; }
.gri-v2 .gri-pdp__options .hikashop_product_options_table[hidden] { display: none !important; }
.gri-v2 .gri-addon select.gri-addon__select { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); border: 0; opacity: 0; pointer-events: none; }
.gri-v2 .gri-pdp .gri-addons__total { margin: 0 0 var(--space-4); }
.gri-v2 .gri-pdp .gri-addons__total .hikashop_option_price_value { font: 800 22px/1.1 var(--font-display) !important; color: var(--violet-900) !important; font-style: normal !important; }

/* Best-seller badge above the brand (design system Badge --best) */
.gri-v2 .gri-pdp__best { align-self: flex-start; margin-bottom: var(--space-2); }
.gri-v2 .gri-pdp__head > .gri-pdp__best + .gri-pdp__brand { display: block; }
