/* ─── Rarefinds Butik (whitelabel) ────────────────────────────────────────
   Klassisk, ljus webbutik: centrerad logga, bannerbildspel, runda kategorier,
   produkter utan ramar. Paletten räknas fram från två varumärkesfärger som
   functions.php skriver ut: --brand (knappar, markeringar) och --brand-2
   (toppraden, bildspel utan bild). Laddas efter förälderns main.css/checkout.css
   och skriver över dess variabler, så produktsida och kassa följer med. ── */

:root {
  --bg: #FFFFFF;
  --surface: #FFFFFF;
  --surface-2: #F4F4F2;
  --ink: #141414;
  --ink-2: rgba(20, 20, 20, 0.68);
  --ink-3: rgba(20, 20, 20, 0.46);
  --line: rgba(20, 20, 20, 0.1);
  --line-2: rgba(20, 20, 20, 0.2);
  --brand-text: color-mix(in oklab, var(--brand) 62%, var(--ink)); /* läsbar mot vitt även för gult/guld */
  --shadow: 0 12px 32px -12px rgba(0, 0, 0, 0.2);
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #111112;
  --surface: #111112;
  --surface-2: #1C1C1E;
  --ink: #F2F2F0;
  --ink-2: rgba(242, 242, 240, 0.7);
  --ink-3: rgba(242, 242, 240, 0.48);
  --line: rgba(242, 242, 240, 0.1);
  --line-2: rgba(242, 242, 240, 0.2);
  --brand-text: color-mix(in oklab, var(--brand) 82%, #fff);
  --shadow: 0 12px 32px -12px rgba(0, 0, 0, 0.7);
  color-scheme: dark;
}
/* Förälderns variabler (main.css, checkout.css) */
:root, :root[data-theme="dark"] {
  --bg-2: var(--surface-2);
  --img-bg: var(--surface-2);
  --accent: var(--brand-text);
  --accent-ink: var(--brand-ink);
  --chrome: var(--brand);
  --chrome-shadow: none;
  --panel-bg: var(--surface-2);
  --panel-border: var(--line);
  --panel-shadow: none;
  --sans: var(--font-body);
  --mono: var(--font-body);
  --gutter: 16px;
}
@media (min-width: 900px) { :root, :root[data-theme="dark"] { --gutter: 40px; } }

body { background: var(--bg); color: var(--ink); font: 400 0.9375rem/1.55 var(--font-body); letter-spacing: 0; }
body.rb-locked { overflow: hidden; }
::selection { background: var(--brand); color: var(--brand-ink); }
.rf-wrap { max-width: 1360px; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }

/* ─── Byggstenar ─── */
.rb-h1, .rb-h2, .rb-slide__title, .rf-pdp__title, .rf-article__title, .rf-flow-head__title {
  font-family: var(--font-display); text-transform: var(--display-case); font-weight: 600; letter-spacing: -0.01em; color: var(--ink);
}
.rb-h1 { margin: 0; font-size: clamp(1.75rem, 4vw, 2.5rem); line-height: 1.1; }
.rb-h2 { margin: 0; font-size: clamp(1.25rem, 2.4vw, 1.625rem); line-height: 1.2; }
.rb-h2--center { text-align: center; margin-bottom: 28px; }
.rb-btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; height: 46px; padding: 0 26px; border: 0; border-radius: var(--radius); background: var(--brand); color: var(--brand-ink); font: 600 0.9375rem var(--font-body); text-decoration: none; cursor: pointer; transition: filter 0.15s; }
.rb-btn:hover { filter: brightness(1.07); }
.rb-btn--ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1px var(--line-2); }
.rb-btn--ghost:hover { filter: none; box-shadow: inset 0 0 0 1px var(--ink); }
.rb-btn--light { background: #fff; color: #111; }
.rb-icon { position: relative; display: inline-grid; place-items: center; width: 42px; height: 42px; padding: 0; border: 0; background: none; color: var(--ink); cursor: pointer; text-decoration: none; }
.rb-icon:hover { color: var(--ink-2); }
.rb-arrow { display: inline-grid; place-items: center; width: 38px; height: 38px; padding: 0; border: 1px solid var(--line-2); border-radius: 999px; background: var(--bg); color: var(--ink); cursor: pointer; transition: opacity 0.15s, border-color 0.15s; }
.rb-arrow:hover:not(:disabled) { border-color: var(--ink); }
.rb-arrow:disabled { opacity: 0.3; cursor: default; }
.rb-section { padding-top: 56px; }
@media (min-width: 900px) { .rb-section { padding-top: 80px; } }
.rb-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 22px; }
.rb-head__end { display: flex; align-items: center; gap: 8px; }
.rb-more { margin-right: 8px; font: 500 0.875rem var(--font-body); color: var(--ink); text-decoration: underline; text-underline-offset: 4px; text-decoration-color: var(--line-2); white-space: nowrap; }
.rb-more:hover { text-decoration-color: var(--ink); }
.rb-more span { display: none; }
@media (max-width: 599px) { .rb-head .rb-arrow { display: none; } }

/* ─── Topprad + header ─── */
.rb-topbar { background: var(--brand-2); color: var(--brand-2-ink); font: 500 0.75rem/1.3 var(--font-body); letter-spacing: 0.03em; text-align: center; }
.rb-topbar .rf-wrap { padding-top: 9px; padding-bottom: 9px; }
.rb-header { position: sticky; top: 0; z-index: 50; background: var(--bg); border-bottom: 1px solid var(--line); }
.rb-header__inner { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; min-height: calc(var(--logo-h) + 24px); }
.rb-header__start { display: flex; align-items: center; min-width: 0; }
.rb-logo { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-width: 0; color: var(--ink); text-decoration: none; }
.rb-logo__img { width: auto; height: var(--logo-h); max-width: 220px; object-fit: contain; }
.rb-logo__name { font: 600 1.25rem/1 var(--font-display); text-transform: var(--display-case); letter-spacing: 0; white-space: nowrap; }
.rb-logo--small .rb-logo__img { height: 44px; }
.rb-header__icons { display: flex; align-items: center; justify-content: flex-end; gap: 0; }
.rb-cart__count { position: absolute; top: 4px; right: 2px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 99px; background: var(--brand); color: var(--brand-ink); font: 700 0.625rem/17px var(--font-body); text-align: center; }
.rb-cart__count.is-empty { display: none; }
.rb-mode span { display: inline-grid; }
.rb-mode .rb-mode__moon, :root[data-theme="dark"] .rb-mode .rb-mode__sun { display: none; }
:root[data-theme="dark"] .rb-mode .rb-mode__moon { display: inline-grid; }
.rb-search { display: none; align-items: center; gap: 8px; width: 100%; max-width: 280px; height: 40px; padding: 0 2px; border-bottom: 1px solid var(--line-2); color: var(--ink-3); }
.rb-search input[type="search"] { flex: 1; min-width: 0; height: 100%; border: 0; background: none; color: var(--ink); font: 400 0.875rem var(--font-body); }
.rb-search input::placeholder { color: var(--ink-3); }
.rb-search input:focus { outline: none; }
.rb-search:focus-within { border-color: var(--ink); }
.rb-nav { display: none; border-top: 1px solid var(--line); }
.rb-nav__list { list-style: none; margin: 0; padding: 0; display: flex; justify-content: center; flex-wrap: wrap; gap: 0 6px; }
.rb-nav__list > li { position: relative; }
.rb-nav__list a { display: block; padding: 14px 14px; color: var(--ink); font: 500 0.875rem var(--font-body); letter-spacing: 0.02em; text-decoration: none; white-space: nowrap; }
.rb-nav__list > li > a { background: linear-gradient(var(--ink), var(--ink)) no-repeat center bottom 10px / 0 1px; transition: background-size 0.2s; }
.rb-nav__list > li > a:hover, .rb-nav__list > .current-menu-item > a { background-size: calc(100% - 28px) 1px; }
.rb-nav__list .sub-menu { position: absolute; left: 0; top: 100%; z-index: 5; min-width: 220px; margin: 0; padding: 8px 0; list-style: none; border: 1px solid var(--line); background: var(--bg); box-shadow: var(--shadow); opacity: 0; visibility: hidden; transition: 0.15s; }
.rb-nav__list .sub-menu a { padding: 8px 18px; }
.rb-nav__list li:hover > .sub-menu, .rb-nav__list li:focus-within > .sub-menu { opacity: 1; visibility: visible; }
.rb-icon--account { display: none; }
@media (max-width: 999px) {
  .rb-header.is-searching .rb-search { display: flex; grid-column: 1 / -1; grid-row: 2; max-width: none; margin-bottom: 12px; }
  .rb-header__start { grid-row: 1; }
}
@media (min-width: 1000px) {
  .rb-hamb, .rb-icon--search { display: none; }
  .rb-search { display: flex; }
  .rb-nav { display: block; }
  .rb-icon--account { display: inline-grid; }
}

/* ─── Lådor (menyn, filtren på mobil) ─── */
.rb-drawer { position: fixed; inset: 0; z-index: 90; display: none; background: rgba(0, 0, 0, 0.45); }
.rb-drawer.is-open { display: block; animation: rb-fade 0.2s; }
.rb-drawer__panel { position: absolute; top: 0; bottom: 0; right: 0; width: min(380px, 88vw); display: flex; flex-direction: column; padding: 12px 20px 20px; overflow-y: auto; background: var(--bg); animation: rb-in-right 0.25s cubic-bezier(0.2, 0.8, 0.2, 1); }
.rb-drawer__panel--left { right: auto; left: 0; animation-name: rb-in-left; }
.rb-drawer__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-bottom: 10px; margin-bottom: 6px; border-bottom: 1px solid var(--line); }
.rb-drawer__nav { list-style: none; margin: 0; padding: 0; }
.rb-drawer__nav a { display: block; padding: 14px 0; border-bottom: 1px solid var(--line); color: var(--ink); font: 500 1rem var(--font-body); text-decoration: none; }
.rb-drawer__nav .sub-menu { list-style: none; padding: 0 0 0 14px; margin: 0; }
.rb-drawer__nav .sub-menu a { font-size: 0.9375rem; color: var(--ink-2); }
.rb-drawer__account { display: flex; align-items: center; gap: 10px; margin-top: 18px; color: var(--ink-2); text-decoration: none; }
@keyframes rb-fade { from { opacity: 0; } }
@keyframes rb-in-right { from { transform: translateX(100%); } }
@keyframes rb-in-left { from { transform: translateX(-100%); } }
@media (prefers-reduced-motion: reduce) { .rb-drawer.is-open, .rb-drawer__panel { animation: none; } }

/* ─── Bannerbildspel (hela bredden) ─── */
.rb-hero { position: relative; }
.rb-hero__track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior-x: contain; }
.rb-hero__track::-webkit-scrollbar { display: none; }
.rb-slide { position: relative; flex: 0 0 100%; min-width: 0; display: flex; align-items: center; height: clamp(440px, 41.6vw, 660px); overflow: hidden; scroll-snap-align: start; scroll-snap-stop: always; background: var(--brand-2); color: var(--brand-2-ink); text-decoration: none; isolation: isolate; }
.rb-slide__img { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; }
.rb-slide.has-image { color: #fff; }
.rb-slide.has-image::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(0, 0, 0, 0.5) 0%, rgba(0, 0, 0, 0.2) 38%, transparent 58%); }
.rb-slide__inner { display: flex; width: 100%; }
.rb-slide:not(.has-image) { align-items: center; text-align: center; }
.rb-slide:not(.has-image) .rb-slide__inner { justify-content: center; }
.rb-slide__copy { display: flex; flex-direction: column; align-items: flex-start; gap: 14px; max-width: 540px; padding: 40px 0 56px; }
.rb-slide.has-image .rb-slide__copy { text-shadow: 0 2px 24px rgba(0, 0, 0, 0.35); }
.rb-slide:not(.has-image) .rb-slide__copy { align-items: center; }
.rb-slide__eyebrow { display: inline-flex; align-items: center; gap: 10px; font: 600 0.75rem var(--font-body); letter-spacing: 0.16em; text-transform: uppercase; color: color-mix(in oklab, var(--brand) 75%, #fff); }
.rb-slide__eyebrow::before { content: ""; width: 28px; height: 2px; background: currentColor; }
.rb-slide__title { display: block; margin: 0; font-size: clamp(2.25rem, 5.2vw, 4.5rem); line-height: 1; color: inherit; text-wrap: balance; }
.rb-slide__text { max-width: 46ch; font-size: 1.0625rem; line-height: 1.5; opacity: 0.9; }
.rb-slide .rb-btn { margin-top: 10px; height: 52px; padding: 0 30px; }
.rb-slide.has-image .rb-btn--light { background: var(--brand); color: var(--brand-ink); text-shadow: none; }
.rb-slide:not(.has-image) .rb-btn--light { background: var(--brand); color: var(--brand-ink); }
.rb-arrow--hero { position: absolute; top: 50%; z-index: 2; display: none; transform: translateY(-50%); border: 0; background: rgba(255, 255, 255, 0.9); color: #111; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15); }
.rb-arrow--prev { left: 20px; }
.rb-arrow--next { right: 20px; }
@media (hover: hover) { .rb-hero:hover .rb-arrow--hero { display: inline-grid; } }
.rb-dots { position: absolute; left: 0; right: 0; bottom: 22px; z-index: 2; display: flex; justify-content: center; gap: 8px; pointer-events: none; }
.rb-dot { width: 8px; height: 8px; padding: 0; border: 0; border-radius: 99px; background: rgba(255, 255, 255, 0.5); cursor: pointer; pointer-events: auto; transition: background 0.2s, transform 0.2s; }
.rb-dot.is-active { background: #fff; transform: scale(1.25); }
@media (max-width: 699px) {
  /* Mobil: bilden överst (höger del, där produkterna brukar stå), texten under på andrafärgen */
  .rb-slide.has-image { flex-direction: column; align-items: stretch; height: auto; color: var(--brand-2-ink); }
  .rb-slide.has-image::before { display: none; }
  .rb-slide__img { position: relative; z-index: auto; height: auto; aspect-ratio: 4 / 3; object-position: 78% center; }
  .rb-slide__copy { padding: 24px 0 60px; gap: 10px; }
  .rb-slide.has-image .rb-slide__copy { text-shadow: none; }
  .rb-slide:not(.has-image) { height: auto; min-height: 420px; }
}

/* ─── Kategorier ─── */
.rb-cats { display: grid; grid-auto-flow: column; grid-auto-columns: 78%; gap: 14px; margin: 0 calc(var(--gutter) * -1); padding: 0 var(--gutter) 4px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.rb-cats::-webkit-scrollbar { display: none; }
.rb-cat { position: relative; display: flex; flex-direction: column; min-width: 0; overflow: hidden; scroll-snap-align: start; border-radius: var(--radius); background: var(--surface-2); color: var(--ink); text-decoration: none; }
.rb-cat__media { position: relative; display: block; aspect-ratio: 5 / 4; }
.rb-cat__media img { position: absolute; top: 12%; left: 50%; width: 44%; height: 76%; object-fit: contain; filter: drop-shadow(0 14px 22px rgba(0, 0, 0, 0.22)); transition: transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1); }
.rb-cat__media--1 img { width: 64%; transform: translateX(-50%); }
.rb-cat__media--2 img:nth-child(1) { transform: translateX(-82%) rotate(-7deg); }
.rb-cat__media--2 img:nth-child(2) { transform: translateX(-18%) rotate(7deg); }
.rb-cat__media--3 img:nth-child(1) { transform: translateX(-105%) rotate(-10deg) scale(0.9); }
.rb-cat__media--3 img:nth-child(2) { z-index: 1; transform: translateX(-50%); }
.rb-cat__media--3 img:nth-child(3) { transform: translateX(5%) rotate(10deg) scale(0.9); }
.rb-cat:hover .rb-cat__media--3 img:nth-child(1) { transform: translateX(-118%) rotate(-14deg) scale(0.9); }
.rb-cat:hover .rb-cat__media--3 img:nth-child(3) { transform: translateX(18%) rotate(14deg) scale(0.9); }
.rb-cat:hover .rb-cat__media--1 img, .rb-cat:hover .rb-cat__media--3 img:nth-child(2) { transform: translateX(-50%) translateY(-4px) scale(1.03); }
.rb-cat__text { display: flex; flex-direction: column; gap: 2px; padding: 0 20px 20px; }
.rb-cat__text strong { font: 600 1.25rem/1.2 var(--font-display); text-transform: var(--display-case); }
.rb-cat__text small { font-size: 0.8125rem; color: var(--ink-3); }
.rb-cat__go { position: absolute; top: 16px; right: 16px; z-index: 2; display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border-radius: 99px; background: var(--bg); color: var(--ink); font: 600 0.8125rem var(--font-body); transition: background 0.2s, color 0.2s; }
.rb-cat:hover .rb-cat__go { background: var(--brand); color: var(--brand-ink); }
@media (min-width: 900px) {
  .rb-cats { grid-auto-flow: row; grid-template-columns: repeat(var(--n, 3), minmax(0, 1fr)); gap: 24px; margin: 0; padding: 0; overflow: visible; }
}

/* ─── Produktkort ─── */
ul.products.rb-grid, .rb-results ul.products { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px 14px; }
@media (min-width: 900px) { ul.products.rb-grid, .rb-results ul.products { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 44px 24px; } }
.rb-card { position: relative; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.rb-card__media { position: relative; margin-bottom: 10px; aspect-ratio: 1; border-radius: var(--radius); background: var(--surface-2); perspective: 1400px; }
.rb-card__flip { position: absolute; inset: 0; display: block; transform-style: preserve-3d; transition: transform 0.6s cubic-bezier(0.3, 0.7, 0.2, 1); }
.rb-card__face { position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.rb-card__face--back { transform: rotateY(180deg); }
.rb-card__img { position: absolute; inset: 9%; width: 82%; height: 82%; object-fit: contain; transition: transform 0.35s; }
@media (hover: hover) {
  .rb-card__media.has-back:hover .rb-card__flip { transform: rotateY(180deg); }
  .rb-card__media:not(.has-back):hover .rb-card__img { transform: scale(1.04); }
}
@media (prefers-reduced-motion: reduce) { .rb-card__flip { transition: none; } }
.rb-card.is-sold .rb-card__img { opacity: 0.45; filter: grayscale(1); }
.rb-tag { position: absolute; left: 10px; top: 10px; z-index: 1; padding: 4px 9px; border-radius: 99px; background: var(--bg); color: var(--ink); font: 600 0.6875rem/1.2 var(--font-body); }
.rb-tag--sale { background: var(--brand); color: var(--brand-ink); }
/* Namnet (två rader) och info-raden tar alltid lika mycket plats — då hamnar köpknapparna i linje fast de sitter direkt under priset. */
.rb-card__name { min-height: 2.7em; color: var(--ink); font: 500 0.9375rem/1.35 var(--font-body); text-decoration: none; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.rb-card__name:hover { text-decoration: underline; text-underline-offset: 3px; }
.rb-card__meta { min-height: 1.4em; margin: 0; font-size: 0.8125rem; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rb-card__price { margin: 2px 0 12px; font: 600 0.9375rem var(--font-body); color: var(--ink); font-variant-numeric: tabular-nums; }
.rb-card__price del { margin-right: 6px; font-weight: 400; color: var(--ink-3); }
.rb-card__price ins { text-decoration: none; color: var(--brand-text); }
.rb-card__add { display: flex; align-items: center; justify-content: center; height: 42px; padding: 0 12px; border-radius: var(--radius); background: var(--brand); color: var(--brand-ink); font: 600 0.8125rem var(--font-body); text-decoration: none; white-space: nowrap; transition: filter 0.15s; }
.rb-card__add:hover { filter: brightness(1.07); }
.rb-card__add.loading { opacity: 0.6; }
.rb-card__add.added { background: var(--ink); color: var(--bg); }
.rb-card__add.is-disabled { background: var(--surface-2); color: var(--ink-3); cursor: default; }
.rb-card .added_to_cart { display: none; }

/* ─── Hyllor (karusell) ─── */
ul.products.rb-rail { display: grid; grid-auto-flow: column; grid-auto-columns: calc((100% - 14px) / 2.2); grid-template-columns: none; gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior-x: contain; }
ul.products.rb-rail::-webkit-scrollbar { display: none; }
.rb-rail > .rb-card { scroll-snap-align: start; }
@media (min-width: 700px) { ul.products.rb-rail { grid-auto-columns: calc((100% - 48px) / 3); gap: 24px; } }
@media (min-width: 1100px) { ul.products.rb-rail { grid-auto-columns: calc((100% - 96px) / 5); } }
.rb-rail__more { margin: 28px 0 0; text-align: center; }
.rb-rail__more .rb-btn { gap: 8px; }

/* ─── Butikssidan ─── */
.rb-listing { padding-top: 28px; padding-bottom: 72px; }
.rb-listing__head { margin-bottom: 24px; text-align: center; }
.rb-crumbs { margin-bottom: 10px; font-size: 0.8125rem; color: var(--ink-3); }
.rb-crumbs a { color: var(--ink-3); text-decoration: none; }
.rb-crumbs a:hover { color: var(--ink); }
.rb-listing__desc { max-width: 60ch; margin: 10px auto 0; color: var(--ink-2); }
.rb-filterbar { display: flex; align-items: center; gap: 10px; padding: 12px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.rb-filterbar__open { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0; border: 0; background: none; color: var(--ink); font: 600 0.875rem var(--font-body); cursor: pointer; }
.rb-filterbar__sort { margin-left: auto; }
.rb-filterbar__sort .woocommerce-ordering { margin: 0; }
.rb-filterbar__sort select { appearance: none; height: 40px; padding: 0 28px 0 10px; border: 0; background-color: transparent; color: var(--ink); font: 500 0.875rem var(--font-body); cursor: pointer; text-align: right;
  background-image: linear-gradient(45deg, transparent 50%, currentColor 50%), linear-gradient(135deg, currentColor 50%, transparent 50%); background-position: right 12px center, right 7px center; background-size: 5px 5px; background-repeat: no-repeat; }
.rb-active { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; min-height: 32px; margin: 16px 0 24px; }
.rb-active__count { margin-right: 6px; font-size: 0.875rem; color: var(--ink-3); }
.rb-active__chip { display: inline-flex; align-items: center; gap: 8px; height: 30px; padding: 0 10px 0 12px; border-radius: 99px; background: var(--surface-2); color: var(--ink); font: 500 0.8125rem var(--font-body); text-decoration: none; }
.rb-active__chip span { font-size: 1rem; line-height: 1; color: var(--ink-3); }
.rb-active__chip:hover span { color: var(--ink); }
.rb-active__clear { margin-left: 4px; font-size: 0.8125rem; color: var(--ink-2); }
.rb-empty { display: grid; justify-items: center; gap: 14px; padding: 48px 0; color: var(--ink-2); text-align: center; }
.rb-results .woocommerce-pagination { margin-top: 48px; }
.rb-results .woocommerce-pagination ul { justify-content: center; gap: 4px; font: 500 0.9375rem var(--font-body); }
.rb-results .woocommerce-pagination a, .rb-results .woocommerce-pagination span { display: inline-grid; place-items: center; min-width: 40px; height: 40px; padding: 0 10px; border-radius: 99px; color: var(--ink); text-decoration: none; }
.rb-results .woocommerce-pagination a:hover { background: var(--surface-2); }
.rb-results .woocommerce-pagination .current { background: var(--ink); color: var(--bg); text-decoration: none; }

/* Filterinnehåll (gemensamt) */
.rb-filters__title { margin: 0; font: 600 1.125rem var(--font-display); text-transform: var(--display-case); }
.rb-facet summary { display: flex; align-items: center; gap: 8px; font: 500 0.875rem var(--font-body); color: var(--ink); cursor: pointer; list-style: none; }
.rb-facet summary::-webkit-details-marker { display: none; }
.rb-facet summary svg { color: var(--ink-3); transition: transform 0.2s; }
.rb-facet[open] summary svg { transform: rotate(180deg); }
.rb-facet__n { display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 99px; background: var(--ink); color: var(--bg); font: 700 0.625rem var(--font-body); }
.rb-facet__search { width: 100%; height: 36px; margin-bottom: 8px; padding: 0 12px; border: 1px solid var(--line-2); border-radius: var(--radius); background: var(--bg); color: var(--ink); font: 400 0.875rem var(--font-body); }
.rb-facet__search:focus { outline: none; border-color: var(--ink); }
.rb-facet__list { list-style: none; margin: 0; padding: 0; }
.rb-opt { display: flex; align-items: center; gap: 10px; padding: 7px 0; color: var(--ink); font-size: 0.875rem; text-decoration: none; }
.rb-opt:hover .rb-opt__name { text-decoration: underline; text-underline-offset: 3px; }
.rb-opt__box { flex: 0 0 auto; width: 16px; height: 16px; border: 1px solid var(--line-2); border-radius: 3px; background: var(--bg); }
.rb-opt--radio .rb-opt__box { border-radius: 50%; }
.rb-opt.is-on .rb-opt__box { border-color: var(--ink); background: var(--ink); box-shadow: inset 0 0 0 3px var(--bg); }
.rb-opt__name { flex: 1; min-width: 0; }
.rb-opt__n { font-size: 0.75rem; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.rb-switch { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); font: 500 0.875rem var(--font-body); text-decoration: none; white-space: nowrap; }
.rb-switch__track { position: relative; flex: 0 0 auto; width: 34px; height: 20px; border-radius: 99px; background: var(--line-2); transition: 0.15s; }
.rb-switch__track::after { content: ""; position: absolute; left: 3px; top: 3px; width: 14px; height: 14px; border-radius: 50%; background: #fff; transition: 0.15s; }
.rb-switch.is-on .rb-switch__track { background: var(--ink); }
.rb-switch.is-on .rb-switch__track::after { left: 17px; }
.rb-filters__foot { position: sticky; bottom: -20px; display: flex; gap: 10px; margin-top: auto; padding: 16px 0 0; background: var(--bg); }
.rb-filters__foot .rb-btn { flex: 1; padding: 0 12px; white-space: nowrap; font-size: 0.875rem; }

@media (max-width: 999px) {
  .rb-facet { border-bottom: 1px solid var(--line); }
  .rb-facet summary { padding: 16px 0; font-size: 0.9375rem; }
  .rb-facet summary svg { margin-left: auto; }
  .rb-facet__panel { padding-bottom: 12px; }
  .rb-switch { padding: 18px 0; }
}
@media (min-width: 1000px) {
  /* Dator: filtren som en rad rullgardiner */
  .rb-filterbar__open, .rb-filters__head, .rb-filters__foot { display: none; }
  .rb-drawer--filters { position: static; z-index: auto; display: block; background: none; }
  .rb-drawer--filters .rb-drawer__panel { position: static; width: auto; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 4px 26px; padding: 0; overflow: visible; background: none; animation: none; }
  .rb-facet { position: relative; }
  .rb-facet summary { height: 40px; }
  .rb-facet__panel { position: absolute; left: -16px; top: calc(100% + 8px); z-index: 20; width: 280px; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg); box-shadow: var(--shadow); }
  .rb-facet__list { max-height: 320px; overflow-y: auto; }
}

/* ─── Produktsidan (förälderns mall) ─── */
.shop-butik .rf-pdp { padding-top: 24px; padding-bottom: 24px; }
.shop-butik .rf-crumbs, .shop-butik .rf-crumbs a { font: 400 0.8125rem var(--font-body); letter-spacing: 0; text-transform: none; color: var(--ink-3); }
.shop-butik .rf-pdp__media { padding: 28px; border-radius: var(--radius); background: var(--surface-2); }
.shop-butik .rf-pdp__title { font-size: clamp(1.75rem, 3.5vw, 2.5rem); line-height: 1.1; }
.shop-butik .rf-pdp__price { font: 600 1.5rem var(--font-body); color: var(--ink); }
.shop-butik .rf-rule { height: 1px; background: var(--line); }
.shop-butik .rf-facts dt { font: 500 0.8125rem/1.7 var(--font-body); letter-spacing: 0; text-transform: none; }
.shop-butik .rf-pdp__buy .single_add_to_cart_button { border-radius: var(--radius); background: var(--brand); color: var(--brand-ink); font: 600 1rem var(--font-body); }
.shop-butik .rf-pdp__buy .quantity .qty { border-radius: var(--radius); border-color: var(--line-2); }
.shop-butik .rf-pdp__promises { font: 400 0.8125rem var(--font-body); letter-spacing: 0; text-transform: none; color: var(--ink-2); }
.shop-butik .rf-pdp__promises li::before { content: "✓  "; color: var(--ink); }
.shop-butik .rf-pdp__condition { border-color: var(--line-2); border-radius: var(--radius); background: var(--surface); font: 400 0.9375rem var(--font-body); }
.shop-butik .rf-chip { border-color: var(--line-2); border-radius: 999px; font: 500 0.8125rem/1 var(--font-body); letter-spacing: 0; text-transform: none; color: var(--ink); }
.shop-butik .rf-chips li:first-child .rf-chip { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.shop-butik a.rf-chip:hover { border-color: var(--ink-3); }
.shop-butik .rf-chips li:first-child a.rf-chip:hover { filter: brightness(1.06); }
.shop-butik .rf-pdp-details { margin-top: 8px; padding: 32px 0; border-top: 0; background: var(--surface-2); }
.shop-butik .rf-pdp-details__title { font: 600 1.125rem/1.2 var(--font-display); letter-spacing: 0; text-transform: var(--display-case); color: var(--ink); }
/* Faktan i köpkolumnen: inramad, sista raden utan streck. */
.shop-butik .rf-pdp__info .rf-facts { padding: 0 16px; border: 1px solid var(--line-2); border-radius: var(--radius); }
.shop-butik .rf-pdp__info .rf-facts__row:last-child { border-bottom: 0; }
@media (min-width: 900px) { .shop-butik .rf-pdp-details { padding: 44px 0; } }
.shop-butik .rf-section__head { border-bottom: 0; margin-bottom: 22px; }
.shop-butik .rf-section__head .rf-label { font: 600 clamp(1.25rem, 2.4vw, 1.625rem)/1.2 var(--font-display); letter-spacing: -0.01em; text-transform: var(--display-case); color: var(--ink); }
.shop-butik .rf-section__head .rf-label--link { font: 500 0.875rem var(--font-body); text-transform: none; color: var(--ink); text-decoration: underline; text-underline-offset: 4px; }
.shop-butik .rf-section ul.products { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px 14px; }
@media (min-width: 900px) { .shop-butik .rf-section ul.products { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 44px 24px; } }
.shop-butik .rf-gallery__dot.is-active { background: var(--ink); }

/* ─── Sidor, kassa, meddelanden ─── */
.shop-butik .rf-article__title, .shop-butik .rf-flow-head__title { font-size: clamp(1.75rem, 4vw, 2.5rem); line-height: 1.1; color: var(--ink); }
.shop-butik .rf-dot-accent { color: var(--ink); }
.shop-butik .rf-steps { font-family: var(--font-body); font-weight: 500; text-transform: none; }
.woocommerce-message, .woocommerce-info, .woocommerce-error { border-top: 1px solid var(--line); }
.woocommerce-message .button { color: var(--ink); }
.wc-block-components-button:not(.is-link), .wc-block-cart__submit-button, .wc-block-components-checkout-place-order-button { border-radius: var(--radius) !important; background: var(--brand) !important; color: var(--brand-ink) !important; }
.shop-butik .rf-flow .wc-block-components-button:not(.is-link) { border-radius: var(--radius) !important; font: 600 1rem var(--font-body) !important; }
.shop-butik .rf-flow .wc-block-components-order-summary-item__quantity { background: var(--ink) !important; color: var(--bg) !important; }
.shop-butik .rf-content { padding-top: 36px; padding-bottom: 80px; max-width: 820px; }
.shop-butik .rf-prose { font-size: 1rem; line-height: 1.7; color: var(--ink-2); }
.shop-butik .rf-prose h2 { margin: 40px 0 12px; font: 600 1.375rem/1.2 var(--font-display); text-transform: var(--display-case); color: var(--ink); }
.shop-butik .rf-prose a { color: var(--ink); }

/* ─── Sidfot ─── */
.rb-footer { margin-top: 96px; padding: 56px 0 24px; background: var(--surface-2); }
.rb-footer__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px 24px; padding-bottom: 40px; }
.rb-footer__brand { grid-column: 1 / -1; display: flex; flex-direction: column; align-items: flex-start; gap: 14px; }
.rb-footer__brand p { max-width: 40ch; margin: 0; font-size: 0.875rem; color: var(--ink-2); }
.rb-footer__title { margin: 0 0 12px; font: 600 0.875rem var(--font-body); color: var(--ink); }
.rb-footer__list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; font-size: 0.875rem; }
.rb-footer__list a { color: var(--ink-2); text-decoration: none; }
.rb-footer__list a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.rb-footer__base { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; padding-top: 20px; border-top: 1px solid var(--line); font-size: 0.8125rem; color: var(--ink-3); }
.rb-footer__base a { color: var(--ink-2); }
@media (min-width: 900px) {
  .rb-footer__grid { grid-template-columns: 2fr 1fr 1fr 1fr; }
  .rb-footer__brand { grid-column: auto; }
}

/* ─── Innehållssidor: prislistor och steg (t.ex. CGC-gradering) ─── */
.rb-lead { margin: 0 0 8px; max-width: 58ch; font-size: 1.1875rem; line-height: 1.55; color: var(--ink); }
.rb-badge-line { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 18px; padding: 6px 12px; border-radius: 99px; background: var(--surface-2); color: var(--ink); font: 600 0.8125rem var(--font-body); }
.rb-prices { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 20px 0 8px; }
.rb-prices > div { display: flex; flex-direction: column; gap: 4px; padding: 18px; border-radius: var(--radius); background: var(--surface-2); }
.rb-prices strong { font: 600 0.9375rem var(--font-body); color: var(--ink); }
.rb-prices .rb-prices__amount { font: 700 1.75rem/1.1 var(--font-body); color: var(--ink); font-variant-numeric: tabular-nums; }
.rb-prices .rb-prices__amount small { font-size: 0.875rem; font-weight: 500; color: var(--ink-3); }
.rb-prices p { margin: 4px 0 0; font-size: 0.875rem; line-height: 1.5; color: var(--ink-2); }
@media (min-width: 800px) { .rb-prices { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.rb-prices--buy { grid-template-columns: minmax(0, 1fr); }
@media (min-width: 560px) { .rb-prices--buy { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.rb-prices--buy .rb-prices__text { flex: 1; }
.rb-prices--buy .rb-prices__text p { margin: 4px 0 0; }
.rb-prices__buy { display: flex; gap: 8px; margin-top: 12px; }
.rb-prices__qty { width: 64px; flex: 0 0 auto; height: 44px; padding: 0 6px; border: 1px solid var(--line-2); border-radius: var(--radius); background: var(--bg); color: var(--ink); text-align: center; font: 500 1rem var(--font-body); }
.rb-prices__btn { flex: 1; min-width: 0; height: 44px; margin-top: 12px; padding: 0 14px; white-space: nowrap; }
.rb-prices__buy .rb-prices__btn { margin-top: 0; }
.rb-steps { list-style: none; counter-reset: step; margin: 20px 0; padding: 0; display: grid; gap: 10px; }
.rb-steps li { counter-increment: step; position: relative; margin: 0; padding: 16px 18px 16px 64px; border-radius: var(--radius); background: var(--surface-2); }
.rb-steps li::before { content: counter(step); position: absolute; left: 18px; top: 15px; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--brand); color: var(--brand-ink); font: 700 0.875rem var(--font-body); }
.rb-steps li strong { display: block; color: var(--ink); }
.rb-note { margin: 24px 0 0; padding: 16px 18px; border-left: 3px solid var(--brand); background: var(--surface-2); color: var(--ink-2); }

/* ─── Rip & Ship ─── */
.rb-live-dot { display: inline-block; flex: 0 0 auto; width: 8px; height: 8px; margin-right: 8px; border-radius: 50%; background: #E5484D; box-shadow: 0 0 0 0 rgba(229, 72, 77, 0.6); animation: rb-live 1.8s infinite; vertical-align: middle; }
@keyframes rb-live { 70% { box-shadow: 0 0 0 7px rgba(229, 72, 77, 0); } 100% { box-shadow: 0 0 0 0 rgba(229, 72, 77, 0); } }
@media (prefers-reduced-motion: reduce) { .rb-live-dot { animation: none; } }
.rb-card__actions { display: flex; flex-direction: column; gap: 6px; }
.rb-card__add--live { background: var(--ink); color: var(--bg); }
.rb-card__alt { display: flex; align-items: center; justify-content: center; height: 34px; border-radius: var(--radius); color: var(--ink-2); font: 500 0.8125rem var(--font-body); text-decoration: none; box-shadow: inset 0 0 0 1px var(--line-2); }
.rb-card__alt:hover { color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.rb-rip-hero { background: var(--brand-2); color: var(--brand-2-ink); }
.rb-rip-hero__inner { display: flex; flex-direction: column; align-items: flex-start; gap: 14px; padding-top: 56px; padding-bottom: 56px; }
.rb-rip-hero__eyebrow { display: inline-flex; align-items: center; margin: 0; padding: 6px 12px; border-radius: 99px; background: rgba(255, 255, 255, 0.12); font: 600 0.75rem var(--font-body); letter-spacing: 0.12em; text-transform: uppercase; }
.rb-rip-hero__title { margin: 0; font: 600 clamp(2.25rem, 6vw, 4rem)/1.02 var(--font-display); text-transform: var(--display-case); }
.rb-rip-hero__text { max-width: 52ch; margin: 0; font-size: 1.0625rem; line-height: 1.55; opacity: 0.88; }
.rb-rip-hero__row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; margin-top: 8px; }
.rb-rip-hero__next { display: flex; flex-direction: column; margin: 0 12px 0 0; padding-left: 14px; border-left: 3px solid var(--brand); }
.rb-rip-hero__next small { font-size: 0.75rem; opacity: 0.75; }
.rb-rip-hero__next strong { font: 700 1.125rem var(--font-body); }
.rb-btn--ghost-light { background: transparent; color: inherit; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.45); }
.rb-rip-info { max-width: 1040px; padding-top: 48px; }
.rb-rip-info .rb-steps { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.rb-rip-info .rb-info-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); margin: 16px 0; padding: 0; list-style: none; }
.rb-rip-info .rb-info-grid li { margin: 0; padding: 16px 18px; border-radius: var(--radius); background: var(--surface-2); color: var(--ink); }
.rb-rip-info .rb-info-grid li::marker { content: none; }

/* Leveransval på produktsidan */
.rb-choice__select { position: absolute !important; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.rb-choice { display: flex; flex-wrap: wrap; gap: 8px; }
.rb-choice__opt { display: inline-flex; align-items: center; height: 44px; padding: 0 16px; border: 0; border-radius: var(--radius); background: var(--bg); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line-2); font: 600 0.875rem var(--font-body); cursor: pointer; }
.rb-choice__opt:hover { box-shadow: inset 0 0 0 1px var(--ink); }
.rb-choice__opt.is-on { box-shadow: inset 0 0 0 2px var(--ink); }
.shop-butik .variations { width: 100%; margin-bottom: 14px; border-collapse: collapse; }
.shop-butik .variations th, .shop-butik .variations td { display: block; padding: 0; text-align: left; }
.shop-butik .variations th label { display: block; margin-bottom: 8px; font: 600 0.8125rem var(--font-body); color: var(--ink-2); }
.shop-butik .reset_variations { display: none !important; }
.shop-butik .woocommerce-variation-price { display: none; }
.shop-butik .single_variation_wrap .woocommerce-variation-add-to-cart { display: flex; gap: 10px; }
.shop-butik .rf-pdp__buy form.variations_form { display: block; }
.shop-butik .rf-pdp__buy form.variations_form .single_add_to_cart_button { flex: 1; white-space: nowrap; }

/* ─── Sälj dina kort ─── */
.rb-sell { max-width: 1040px; padding-bottom: 24px; }
.rb-sell__form, .rb-sell__done { display: grid; gap: 20px; padding: 28px 22px; border-radius: var(--radius); background: var(--surface-2); }
@media (min-width: 800px) { .rb-sell__form, .rb-sell__done { padding: 40px; } }
.rb-sell__form header p, .rb-sell__done p { margin: 6px 0 0; color: var(--ink-2); }
.rb-sell__done { justify-items: start; }
.rb-sell__row { display: grid; gap: 20px; align-items: start; }
@media (min-width: 800px) { .rb-sell__row { grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); } }
.rb-field { display: grid; gap: 8px; min-width: 0; margin: 0; padding: 0; border: 0; }
.rb-field > span, .rb-field > legend { padding: 0; font: 600 0.875rem var(--font-body); color: var(--ink); }
.rb-field small { font-weight: 400; color: var(--ink-3); }
.rb-field input[type=text], .rb-field input[type=email], .rb-field input[type=tel], .rb-field textarea { width: 100%; padding: 12px 14px; border: 0; border-radius: var(--radius); background: var(--bg); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line-2); font: 400 1rem/1.5 var(--font-body); }
.rb-field input:focus, .rb-field textarea:focus { outline: none; box-shadow: inset 0 0 0 2px var(--ink); }
.rb-field textarea { resize: vertical; }
.rb-field input[type=file] { font: 400 0.875rem var(--font-body); color: var(--ink-2); }
.rb-field input[type=file]::file-selector-button { height: 42px; margin-right: 12px; padding: 0 16px; border: 0; border-radius: var(--radius); background: var(--bg); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line-2); font: 600 0.875rem var(--font-body); cursor: pointer; }
.rb-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.rb-chip input { position: absolute; opacity: 0; pointer-events: none; }
.rb-chip span { display: inline-flex; align-items: center; height: 42px; padding: 0 16px; border-radius: var(--radius); background: var(--bg); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line-2); font: 500 0.875rem var(--font-body); cursor: pointer; }
.rb-chip span:hover { box-shadow: inset 0 0 0 1px var(--ink); }
.rb-chip input:checked + span { box-shadow: inset 0 0 0 2px var(--ink); font-weight: 600; }
.rb-chip input:focus-visible + span { outline: 2px solid var(--brand); outline-offset: 2px; }
.rb-sell__hp { position: absolute; left: -9999px; }
.rb-sell__foot { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; }
.rb-sell__foot small { color: var(--ink-3); }
.rb-sell__error { margin: 0; padding: 14px 16px; border-left: 3px solid #E5484D; background: var(--bg); color: var(--ink); }

/* Elementor-sidor: Elementors ".elementor img { height: auto }" väger tyngre än temats bildhöjder. */
.elementor .rb-card__img { height: 82%; }
.elementor .rb-cat__media img { height: 76%; }
@media (min-width: 700px) { .elementor .rb-slide__img { height: 100%; } }
