/* Rorgrand header: smal topprad, huvudrad (meny, logga, sök, ikoner) och menypanelen. */
.rg-wrap { box-sizing: border-box; max-width: 1600px; margin: 0 auto; padding-inline: clamp(16px, 3vw, 64px); }
.rg-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Topprad ---------- */
.rg-topbar { background: var(--rg-slate-dark, #2c3b43); color: #e8edef; font-size: 12.5px; line-height: 1; }
.rg-topbar__in { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 40px; }
.rg-usp { display: flex; align-items: center; gap: 26px; margin: 0; padding: 0; list-style: none; }
.rg-usp li { display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.rg-usp svg { flex: none; fill: none; stroke: #e3d6c1; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.rg-topbar__r { display: flex; align-items: center; gap: 20px; }
.rg-toplinks { display: flex; align-items: center; gap: 8px; }
.rg-toplinks a { padding: 7px 14px; border: 1px solid rgba(255, 255, 255, 0.28); color: #fff; text-decoration: none; letter-spacing: 0.01em; transition: background .15s, color .15s; }
.rg-toplinks a:hover { background: #fff; color: #14191c; border-color: #fff; }
.rg-vat { display: flex; align-items: center; gap: 8px; margin: 0; padding: 0 0 0 20px; border: 0; border-left: 1px solid rgba(255, 255, 255, 0.22); border-radius: 0; background: transparent; color: #fff; font: inherit; font-size: 11px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; cursor: pointer; }
.rg-vat__track { position: relative; width: 28px; height: 14px; border-radius: 7px; background: rgba(255, 255, 255, 0.25); transition: background .2s; }
.rg-vat__knob { position: absolute; left: 2px; top: 2px; width: 10px; height: 10px; border-radius: 50%; background: #fff; transition: transform .2s, background .2s; }
.rg-vat[aria-checked="true"] .rg-vat__track { background: #e3d6c1; }
.rg-vat[aria-checked="true"] .rg-vat__knob { transform: translateX(14px); background: #2c3b43; }
.rg-vat__label { min-width: 70px; text-align: left; }
.rg-vat { transition: opacity .18s ease, transform .18s ease; }
.rg-vat.is-switching { opacity: .68; transform: scale(.98); pointer-events: none; }
.rg-vat[aria-busy="true"] .rg-vat__knob { animation: rg-vat-pulse .7s ease-in-out infinite alternate; }
@keyframes rg-vat-pulse { from { opacity: .55; } to { opacity: 1; } }
.rg-vat:focus-visible, .rg-toplinks a:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

/* ---------- Huvudrad ---------- */
.rg-sticky { position: sticky; top: 0; z-index: 100; }
body.admin-bar .rg-sticky { top: 32px; }
@media (max-width: 782px) { body.admin-bar .rg-sticky { top: 46px; } }
.rg-header { position: relative; background: #fff; border-bottom: 1px solid var(--rg-line, #ddd2c2); --ink: var(--rg-ink, #14191c); --line: var(--rg-line, #ddd2c2); --s: var(--rg-slate, #455b66); }
.rg-header__main { display: grid; grid-template-columns: auto minmax(280px, 560px) auto; justify-content: space-between; align-items: center; gap: 24px; min-height: 76px; }
.rg-header__left { display: flex; align-items: center; gap: 28px; }
.rg-menubtn { display: flex; flex-direction: column; align-items: center; gap: 3px; min-width: 44px; color: var(--ink); text-decoration: none; cursor: pointer; }
.rg-menubtn svg { fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; }
.rg-menubtn__t { font-size: 10.5px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; }
.rg-menubtn .rg-ico-close, .rg-menubtn .rg-menubtn__t--close { display: none; }
.rg-menubtn[aria-expanded="true"] .rg-ico-open, .rg-menubtn[aria-expanded="true"] .rg-menubtn__t--open { display: none; }
.rg-menubtn[aria-expanded="true"] .rg-ico-close { display: block; }
.rg-menubtn[aria-expanded="true"] .rg-menubtn__t--close { display: block; }
.rg-menubtn:hover { color: var(--s); }
.rg-logo { display: block; color: var(--s); text-decoration: none; }
.rg-logo__img, .rg-logo img { display: block; height: var(--logo-hojd, 32px) !important; width: auto !important; max-width: none !important; max-height: 44px; }

.rg-search { position: relative; width: 100%; margin: 0; }
.rg-search input[type="search"] { width: 100%; height: 44px; margin: 0; padding: 0 52px 0 18px; border: 1px solid var(--line); border-radius: 0; background: #faf8f4; color: var(--ink); font-size: 15px; box-shadow: none; }
.rg-search input[type="search"]::placeholder { color: #6a757a; opacity: 1; }
.rg-search input[type="search"]:focus-visible { outline: 2px solid var(--s); outline-offset: 0; background: #fff; }
.rg-search button { position: absolute; right: 0; top: 0; width: 46px; height: 44px; margin: 0; padding: 0; display: flex; align-items: center; justify-content: center; border: 0; border-radius: 0; background: transparent; color: var(--ink); line-height: 1; cursor: pointer; transform: none !important; box-shadow: none !important; }
.rg-search button:hover, .rg-search button:focus { background: transparent; color: var(--s); transform: none !important; box-shadow: none !important; }
.rg-search button svg { display: block; width: 20px; height: 20px; margin: 0; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.rg-live-search { position: absolute; left: 50%; top: calc(100% + 18px); z-index: 120; width: min(1080px, calc(100vw - 32px)); transform: translateX(-50%); padding: 30px; border: 1px solid var(--line); background: #fff; color: var(--ink); box-shadow: 0 24px 70px rgba(20, 25, 28, .22); }
.rg-live-search[hidden] { display: none; }
.rg-live-search__head { display: flex; align-items: baseline; gap: 7px; margin-bottom: 22px; color: #68757b; font-size: 13px; }
.rg-live-search__head strong { color: var(--ink); font-size: 19px; font-weight: 600; }
.rg-live-search__group { margin-top: 22px; }
.rg-live-search__group h3 { margin: 0 0 10px; color: #68757b; font-size: 11px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }
.rg-live-search__grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.rg-live-search__item { display: flex; min-height: 116px; gap: 15px; padding: 12px; border: 1px solid #e4e0d9; color: var(--ink); text-decoration: none; transition: border-color .16s, background .16s; }
.rg-live-search__item:hover, .rg-live-search__item:focus-visible { border-color: var(--s); background: #faf8f4; }
.rg-live-search__item--product { display: block; padding: 10px; }
.rg-live-search__item--product img, .rg-live-search__placeholder { display: flex; width: 100%; height: 156px; margin-bottom: 13px; align-items: center; justify-content: center; object-fit: cover; background: #f3f0ea; color: #8b9699; font-size: 46px; font-weight: 600; }
.rg-live-search__item--category { align-items: center; }
.rg-live-search__item--category .rg-live-search__arrow { margin-left: auto; }
.rg-live-search__item-copy { display: flex; min-width: 0; flex: 1; flex-direction: column; gap: 5px; }
.rg-live-search__item-copy strong { overflow: hidden; font-size: 14px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.rg-live-search__item-copy small { overflow: hidden; color: #68757b; font-size: 12px; line-height: 1.35; text-overflow: ellipsis; white-space: nowrap; }
.rg-live-search__arrow { color: var(--s); font-size: 20px; }
.rg-live-search__all { display: block; margin: 28px auto 0; padding: 14px 28px; border: 1px solid var(--ink); background: var(--ink); color: #fff; font-size: 13px; font-weight: 700; letter-spacing: .1em; text-align: center; text-decoration: none; text-transform: uppercase; transition: background .16s, color .16s, border-color .16s; }
.rg-live-search__all:hover, .rg-live-search__all:focus-visible { border-color: var(--s); background: var(--s); color: #fff; }
.rg-live-search__message { padding: 42px 10px; color: #68757b; font-size: 15px; text-align: center; }
.rg-live-search__message.is-loading { color: var(--s); }
.rg-live-search__message.is-loading::after { content: ""; display: inline-block; width: 12px; height: 12px; margin-left: 8px; border: 2px solid #d9d3c8; border-top-color: var(--s); border-radius: 50%; vertical-align: -2px; animation: rg-search-spin .65s linear infinite; }
@keyframes rg-search-spin { to { transform: rotate(360deg); } }

.rg-actions { display: flex; align-items: flex-start; gap: 6px; }
.rg-act { position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 60px; padding: 2px 8px; color: var(--ink); text-decoration: none; }
.rg-act:hover { color: var(--s); }
.rg-act__t { font-size: 11.5px; font-weight: 500; letter-spacing: 0.02em; }
.rg-act__icon { position: relative; display: block; width: 24px; height: 24px; }
.rg-act__icon svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.rg-cart__count { box-sizing: border-box; position: absolute; right: -10px; top: -8px; min-width: 17px; height: 17px; padding: 0 4px; display: inline-flex; align-items: center; justify-content: center; border-radius: 9px; background: var(--ink); color: #fff; font-size: 10.5px; font-weight: 600; }
.rg-act:focus-visible, .rg-menubtn:focus-visible { outline: 2px solid var(--s); outline-offset: 3px; }

/* ---------- Menypanelen ---------- */
.rg-mega { position: absolute; left: 0; right: 0; top: 100%; z-index: 60; background: #fff; border-bottom: 1px solid var(--line); box-shadow: 0 24px 48px rgba(20, 25, 28, 0.12); max-height: calc(100vh - 150px); overflow-y: auto; color: var(--ink); }
.rg-mega[hidden] { display: none; }
.rg-mega__inner { display: grid; grid-template-columns: minmax(240px, 320px) minmax(0, 1fr) 280px; padding-block: 28px 40px; }
.rg-mega__top, .rg-mega__list { margin: 0; padding: 0; list-style: none; }
.rg-mega__top li, .rg-mega__list li { margin: 0; padding: 0; list-style: none; }
.rg-mega__quick { display: none; }
.rg-mega__lead--last { margin-bottom: 14px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.rg-mega__toplink, .rg-mega__topbtn { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 46px; padding: 0 20px 0 0; margin: 0; border: 0; border-radius: 0; background: transparent; color: var(--ink); font: inherit; font-size: 16px; font-weight: 400; text-align: left; text-decoration: none; cursor: pointer; }
.rg-mega__toplink { font-weight: 600; }
.rg-mega__toplink:hover, .rg-mega__topbtn:hover { color: var(--s); }
.rg-mega__topbtn { position: relative; }
.rg-mega__topbtn[aria-expanded="true"] { font-weight: 600; }
.rg-mega__topbtn[aria-expanded="true"]::before { content: ""; position: absolute; left: -16px; top: 10px; bottom: 10px; width: 2px; background: var(--ink); }
.rg-mega__name { flex: 1; min-width: 0; }
.rg-chev { width: 14px; height: 14px; flex: 0 0 14px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; opacity: 0.5; }
.rg-mega__panels { min-width: 0; }
.rg-mega__panel[hidden], .rg-mega__sub[hidden] { display: none; }
.rg-mega__panel { display: grid; grid-template-columns: minmax(240px, 320px) minmax(0, 1fr); min-height: 100%; }
.rg-mega__lvl2 { border-left: 1px solid var(--line); margin-left: 12px; padding-left: 28px; }
.rg-mega__lvl3 { border-left: 1px solid var(--line); padding-left: 28px; min-width: 0; }
.rg-mega__all, .rg-mega__row { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 46px; color: var(--ink); font-size: 16px; text-decoration: none; }
.rg-mega__all { font-weight: 600; }
.rg-mega__row:hover, .rg-mega__all:hover { color: var(--s); }
.rg-mega__row[aria-expanded="true"] { font-weight: 600; text-decoration: underline; text-underline-offset: 6px; }
.rg-mega__help { margin-left: 28px; align-self: start; padding: 4px 0 4px 28px; border-left: 1px solid var(--line); }
.rg-mega__help b { display: block; font-size: 17px; font-weight: 600; margin-bottom: 8px; line-height: 1.25; }
.rg-mega__help p { margin: 0 0 16px; font-size: 14px; line-height: 1.5; color: #3c474d; }
.rg-mega__help a { display: inline-block; padding: 0 0 3px; border-bottom: 1px solid var(--ink); color: var(--ink); font-size: 14px; font-weight: 600; text-decoration: none; }
.rg-mega__help a:hover { color: var(--s); border-color: var(--s); }
.rg-mega a:focus-visible, .rg-mega button:focus-visible { outline: 2px solid var(--s); outline-offset: 2px; }
.rg-mega__inner--nohelp { grid-template-columns: minmax(240px, 320px) minmax(0, 1fr); }

.rg-vat-note { font-size: 12px; font-weight: 400; color: #5a6a72; }

@media (max-width: 1200px) { .rg-mega__inner { grid-template-columns: minmax(220px, 300px) minmax(0, 1fr); } .rg-mega__help { display: none; } .rg-usp li:nth-child(3):not(.is-mobile) { display: none; } }
@media (max-width: 1000px) { .rg-usp li:not(.is-mobile) { display: none; } }
@media (max-width: 900px) {
  .rg-topbar__in { gap: 14px; }
  .rg-toplinks { display: none; }
  .rg-vat { padding-left: 0; border-left: 0; }
  .rg-logo__img, .rg-logo img { height: 26px !important; }
  .rg-mega__quick { display: block; }
  .rg-mega__quick--first { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
  .rg-mega__quick .rg-mega__toplink { font-weight: 400; font-size: 15px; color: #3c474d; min-height: 40px; }
  .rg-header__main { display: flex; flex-wrap: wrap; gap: 10px 14px; padding-block: 10px; min-height: 0; }
  .rg-header__left { gap: 18px; }
  .rg-actions { margin-left: auto; }
  .rg-search { flex-basis: 100%; order: 3; }
  .rg-act__t { display: none; }
  .rg-act { min-width: 36px; }
  .rg-live-search__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
  .rg-live-search { top: calc(100% + 10px); width: calc(100vw - 24px); padding: 18px; }
  .rg-live-search__grid { grid-template-columns: 1fr; }
  .rg-live-search__item { min-height: 100px; }
  .rg-live-search__item img { width: 76px; height: 76px; flex-basis: 76px; }
}
@media (max-width: 760px) {
  .rg-mega__inner, .rg-mega__panel { grid-template-columns: 1fr; }
  .rg-mega__lvl2 { margin-left: 0; border-left: 0; padding-left: 0; }
  .rg-mega__lvl3 { border-left: 0; padding-left: 0; }
  .rg-mega__topbtn[aria-expanded="true"]::before { left: -12px; }
}

/* The original Rorgrand header is rendered by the plugin. Hide Blocksy's header rows to prevent two headers. */
body .ct-header,
body #header,
body header.site-header:not(.rg-header),
body .site-header:not(.rg-header) {
  display: none !important;
}
/* Keep the Rorgrand header above page content and below WordPress admin bar. */
body .rg-sticky { z-index: 999; }
