/* Grimages site template: page skeleton, base typography and the few rules the former Astroid theme set.
   Loaded after the reduced Bootstrap (bootstrap.css) and before the plugin's sheets (plg_system_grimagesui),
   which style the header, footer, listings, product, cart and content. Colours and fonts are those of the
   site's Astroid theme, so the page renders as before; design-system tokens (grimages-ui.css) take over
   where the plugin defines them. */

/* ---------- Base (Astroid theme: Lato 16px/1.7, ink #2c2e36, links violet) ----------
   Same selector weight as Astroid's (.astroid-framework h1…), so the plugin's rules win or lose as before. */
.gri-tpl {
  --bs-body-bg: #fff;
  --bs-body-color: #2c2e36;
  --bs-link-color: #392442;
  --bs-link-color-rgb: 57, 36, 66;
  --bs-link-opacity: 1;
  --bs-link-hover-color: #0871b8;
  --bs-link-hover-color-rgb: 8, 113, 184;
  --as-header-bg: #fff;
}

body.gri-tpl {
  font-family: "Lato", Arial, Helvetica, sans-serif;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.7em;
  text-transform: none;
}

.gri-tpl h1, .gri-tpl .h1 { font-family: "Lato", Arial, Helvetica, sans-serif; font-weight: 800; font-size: 65px; line-height: 1.2em; text-transform: none; }
.gri-tpl h2, .gri-tpl .h2 { font-family: "Lato", Arial, Helvetica, sans-serif; font-weight: 800; font-size: 45px; line-height: 1.2em; text-transform: none; }
.gri-tpl h3, .gri-tpl .h3 { font-family: "Lato", Arial, Helvetica, sans-serif; font-weight: 600; font-size: 36px; line-height: 1.2em; text-transform: none; }
.gri-tpl h4, .gri-tpl .h4 { font-family: "Lato", Arial, Helvetica, sans-serif; font-weight: 500; font-size: 28px; line-height: 1.2em; text-transform: none; }
.gri-tpl h5, .gri-tpl .h5 { font-family: "Lato", Arial, Helvetica, sans-serif; font-weight: 600; font-size: 22px; line-height: 1.2em; text-transform: none; }
.gri-tpl h6, .gri-tpl .h6 { font-family: "Lato", Arial, Helvetica, sans-serif; font-weight: 600; font-size: 18px; line-height: 1.5em; text-transform: none; }

@media (max-width: 991.98px) {
  .gri-tpl h1, .gri-tpl .h1 { font-size: 55px; }
  .gri-tpl h2, .gri-tpl .h2 { font-size: 38px; }
  .gri-tpl h3, .gri-tpl .h3 { font-size: 32px; }
}

@media (max-width: 575.98px) {
  .gri-tpl h1, .gri-tpl .h1 { font-size: 40px; }
  .gri-tpl h2, .gri-tpl .h2 { font-size: 32px; }
  .gri-tpl h3, .gri-tpl .h3 { font-size: 30px; }
  .gri-tpl h4, .gri-tpl .h4 { font-size: 26px; }
}

/* ---------- Skeleton: page, sections (gri-section--header|tiles|main|footer), rows (gri-cols), columns (gri-col),
   module positions (gri-pos). Same boxes as the former Astroid layout. ---------- */
html, body, .gri-page { min-height: 100vh; }
.gri-page { position: relative; display: flex; flex-direction: column; }
.gri-section--header { width: 100%; left: 0; z-index: 1002; background-color: var(--as-header-bg); }
.gri-section--main { padding: 50px 0; }
.gri-article__image figure { margin-bottom: 0; }

/* Toolbar (currency, languages), when the plugin is off (it shows it in the header's promo bar) */
#gri-toolbar { background-color: #dee2e6; }

/* Footer, as long as the plugin has not replaced it with its own (plugin off) */
.gri-section--footer { padding-bottom: 100px; }
.gri-section--footer .gri-cols { padding: 50px 0 10px; }
.gri-section--footer .gri-trustindex { margin-top: 25px; margin-bottom: 15px; }
.gri-social { gap: 12px; font-size: 32px; }

/* Header when the plugin is off: the logo and the menu of the language */
.gri-tpl-header { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 32px; padding: 12px 0; }
.gri-tpl-header__logo img { display: block; width: 180px; height: auto; }
.gri-tpl-header ul { display: flex; flex-wrap: wrap; gap: 4px 20px; margin: 0; padding: 0; list-style: none; }

/* ---------- Former Astroid custom CSS (template option « customcss ») ---------- */
.description-icon-list { list-style: none; padding-left: 0; margin-left: 0; }
.description-icon-list li { margin-bottom: .4em; padding-left: 0; }
.hikashop_product_image img { filter: none !important; }

/* ---------- Offline page (offline.php) and error page without the plugin (error.php) ---------- */
.gri-offline, .gri-error { display: grid; place-items: center; min-height: 100vh; margin: 0; padding: 24px 16px; background: #faf8fc; }
.gri-offline__card, .gri-error__card { width: min(440px, 100%); padding: 40px 32px; border: 1px solid #e6e0ee; border-radius: 16px; background: #fff; box-shadow: 0 8px 24px rgba(57, 36, 66, .08); text-align: center; }
.gri-offline__logo, .gri-error__logo { display: block; width: 200px; height: auto; margin: 0 auto 24px; }
.gri-offline__image { max-width: 100%; height: auto; margin-bottom: 16px; }
.gri-offline__text { margin-bottom: 24px; }
.gri-offline__form { text-align: left; }
.gri-tpl .gri-error__code { margin: 0; font-size: 96px; font-weight: 800; line-height: 1; color: #d00b72; }
.gri-tpl .gri-error__title { margin: 8px 0 12px; font-size: 26px; color: #392442; }
.gri-error__text { margin-bottom: 24px; }
.gri-error__debug { margin-top: 24px; padding: 12px; overflow: auto; border-radius: 8px; background: #f4f1f7; font-size: 12px; text-align: left; white-space: pre-wrap; }
