/* Tillägg för jämförelsesidorna. Allt annat kommer från Shopellos egen stilmall (shopello.css). */

.sj-smulor { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.sj-ingress { max-width: 46rem; line-height: 1.6; }

.sj-butiksnamn { display: flex; flex-wrap: wrap; align-items: center; gap: .25rem .5rem; margin-bottom: .125rem; }
.sj-pris { display: flex; flex-direction: column; align-items: flex-end; flex-shrink: 0; text-align: right; line-height: 1.2; }
.sj-ord { text-decoration: line-through; }
/* Butiksrader: namn + villkor | pris | knapp på en rad; på mobil hamnar knappen under. */
.sj-erbjudanden { border: 1px solid #e5e7eb; border-radius: .5rem; overflow: hidden; }
.sj-erb { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: .25rem 1rem; padding: .625rem .875rem; background: #fff; }
.sj-erb + .sj-erb { border-top: 1px solid #e5e7eb; }
.sj-erb-butik { min-width: 0; }
.sj-knapp { height: 2.25rem; padding: 0 .875rem; }
.sj-fler > summary { list-style: none; cursor: pointer; width: 100%; height: 2.5rem; }
.sj-fler > summary::-webkit-details-marker { display: none; }
.sj-fler[open] > summary { display: none; }
@media (max-width: 479px) {
  .sj-erb { gap: .25rem .625rem; padding: .625rem .75rem; }
  .sj-knapp { padding: 0 .625rem; }
  .sj-knapp svg { display: none; }
}
/* Mobil: mindre bild så att butikslistan syns tidigare. */
@media (max-width: 1023px) {
  .sj-produktbild { aspect-ratio: auto; height: 240px; }
}
.sj-lagst { background: #f9fafb; box-shadow: inset 3px 0 0 var(--primary); }
.sj-marke {
  display: inline-block; padding: .125rem .5rem; border-radius: 9999px;
  background: var(--primary); color: var(--primary-foreground);
  font-size: .75rem; font-weight: 500; line-height: 1.25rem; vertical-align: middle;
}

[data-sj-mobilmeny][hidden] { display: none; }

/* Sidhuvudet: "Jämför priser" med kategoripanel (dator) och kategorilista (mobilmeny). */
.sj-jmeny { position: relative; }
.sj-jpanel { display: none; position: absolute; top: 100%; left: 50%; transform: translateX(-50%); padding-top: .5rem; z-index: 60; }
.sj-jmeny:hover > .sj-jpanel, .sj-jmeny:focus-within > .sj-jpanel { display: block; }
.sj-jmeny:hover > a svg, .sj-jmeny:focus-within > a svg { transform: rotate(180deg); }
.sj-jpanel-inre { width: min(42rem, 90vw); padding: 1rem 1.25rem; background: #fff; border: 1px solid #e5e7eb; border-radius: .5rem; box-shadow: 0 10px 25px -5px rgba(0,0,0,.12); }
.sj-jpanel-rubrik { margin: 0 0 .5rem; font-size: .75rem; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: #6b7280; }
.sj-jpanel ul { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .125rem 1rem; list-style: none; margin: 0; padding: 0; }
.sj-jpanel ul a, .sj-jmobil a { display: flex; justify-content: space-between; gap: .5rem; padding: .375rem .5rem; border-radius: .375rem; font-size: .875rem; color: #111827; }
.sj-jpanel ul a:hover, .sj-jmobil a:hover { background: #f3f4f6; }
.sj-jpanel ul a span, .sj-jmobil a span { color: #9ca3af; font-size: .75rem; }
.sj-jpanel-alla { display: inline-block; margin-top: .75rem; font-size: .875rem; font-weight: 500; text-decoration: underline; color: #111827; }
.sj-jmobil { list-style: none; margin: .25rem 0 0 .75rem; padding: 0 0 0 .5rem; border-left: 1px solid #e5e7eb; }
.sj-kategorirubrik { font-size: 1.5rem; line-height: 2rem; font-weight: 700; color: #111827; margin-top: 2.5rem; scroll-margin-top: 5rem; }

/* Sidväljare på kategorisidorna. */
.sj-sidor { display: flex; flex-wrap: wrap; align-items: center; gap: .375rem; margin-top: 1.5rem; }
.sj-sidor a, .sj-sidor span { display: inline-flex; align-items: center; justify-content: center; min-width: 2.25rem; height: 2.25rem; padding: 0 .75rem; border: 1px solid #e5e7eb; border-radius: .375rem; font-size: .875rem; color: #111827; background: #fff; }
.sj-sidor a:hover { border-color: var(--primary); }
.sj-sidor [aria-current] { background: var(--primary); color: var(--primary-foreground); border-color: var(--primary); }
.sj-sidor .sj-sidor-glapp { border: 0; background: none; min-width: 1rem; padding: 0; }

/* Kategoritexter och guider. */
.sj-kopguide { max-width: 46rem; margin-top: 3rem; }
.sj-kopguide h2, .sj-guide h2 { font-size: 1.25rem; line-height: 1.75rem; font-weight: 700; color: #111827; margin: 2rem 0 .5rem; }
.sj-kopguide p, .sj-guide p, .sj-guide li { color: #374151; line-height: 1.7; margin: 0 0 .875rem; }
.sj-guide ul, .sj-guide ol { padding-left: 1.25rem; margin: 0 0 1rem; }
.sj-guide ul { list-style: disc; } .sj-guide ol { list-style: decimal; }
.sj-guide a, .sj-kopguide a { color: #111827; text-decoration: underline; }

/* Produktkarusell i guiderna: vågrät rullning, snäpper per kort. */
.sj-karusell { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(10.5rem, 12rem); gap: .75rem; overflow-x: auto; scroll-snap-type: x mandatory; padding: .25rem .125rem 1rem; margin: 1rem 0 .25rem; }
.sj-kort { scroll-snap-align: start; display: flex; flex-direction: column; gap: .25rem; padding: .75rem; background: #fff; border: 1px solid #e5e7eb; border-radius: .5rem; text-decoration: none !important; color: #111827; }
.sj-kort:hover { border-color: var(--primary); }
.sj-kort-bild { display: block; aspect-ratio: 1; }
.sj-kort-bild img { width: 100%; height: 100%; object-fit: contain; }
.sj-kort-namn { font-size: .875rem; font-weight: 500; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.sj-kort-pris { font-weight: 700; }
.sj-kort-butiker { font-size: .75rem; color: #6b7280; }
.sj-karusell-alla { display: inline-block; font-size: .875rem; font-weight: 500; margin-bottom: 1rem; }
.sj-guide-bild { width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; border-radius: .75rem; margin: 1.25rem 0 1.5rem; }
/* Shopellos egna menyer: två spalter, smalare panel, vänsterjusterad under menyvalet. */
.sj-jpanel--shopello { left: 0; transform: none; }
.sj-jpanel--shopello .sj-jpanel-inre { width: min(30rem, 90vw); }
.sj-jpanel--shopello ul { grid-template-columns: repeat(2, minmax(0, 1fr)); }
/* Guider i menyn och som kort på startsidan. */
.sj-jpanel-guider { margin-top: 1rem; }
.sj-jpanel ul.sj-jguider, .sj-jmenu ul.sj-jguider { grid-template-columns: 1fr; }
.sj-jguider { list-style: none; margin: .25rem 0 0; padding: 0; }
.sj-jguider a { display: block; padding: .375rem .5rem; border-radius: .375rem; font-size: .875rem; font-weight: 500; color: #111827; }
.sj-jguider a:hover { background: #f3f4f6; }
.sj-guide h3 { font-size: 1rem; font-weight: 600; color: #111827; margin: 1.25rem 0 .25rem; }

/* Layout 0.14: guidesidan i en centrerad läsbar spalt; karuseller och kort får bredare plats. */
.sj-guide-ram { max-width: 48rem; margin: 0 auto; }
.sj-guide-bild + p { font-size: 1.125rem; line-height: 1.7; color: #1f2937; }
.sj-guide h2 { font-size: 1.375rem; margin-top: 2.5rem; }

/* Guidekort med bild (startsidan, kategorisidor, Fler guider). */
.sj-guidelista { margin-top: 2.5rem; }
.sj-guidelista h2 { font-size: 1.25rem; font-weight: 700; color: #111827; margin-bottom: .875rem; }
.sj-ingress + .sj-guidelista { margin-top: 1.75rem; }
.sj-gkort-lista { display: grid; grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr)); gap: 1.25rem; }
.sj-gkort { display: flex; flex-direction: column; overflow: hidden; background: #fff; border: 1px solid #e5e7eb; border-radius: .75rem; color: #111827; text-decoration: none !important; transition: box-shadow .15s, border-color .15s; }
.sj-gkort:hover { border-color: var(--primary); box-shadow: 0 6px 18px -8px rgba(0,0,0,.25); }
.sj-gkort img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.sj-gkort-text { display: flex; flex-direction: column; gap: .375rem; padding: .875rem 1rem 1rem; }
.sj-gkort-text strong { font-size: 1rem; line-height: 1.35; }
.sj-gkort-text span { font-size: .8125rem; line-height: 1.5; color: #6b7280; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

/* Karusell: rutnät på dator (inga avkapade kort), vågrät rullning med glimt av nästa kort på mobil. */
@media (min-width: 768px) {
  .sj-karusell { grid-auto-flow: row; grid-template-columns: repeat(4, minmax(0, 1fr)); grid-auto-columns: auto; overflow: visible; }
}
@media (max-width: 767px) {
  .sj-karusell { grid-auto-columns: 42%; }
}

/* Produktsidan 0.15: sammanfattning, liknande produkter, köpguider. */
.sj-sammanfattning { line-height: 1.65; max-width: 40rem; }
.sj-liknande { margin-top: 3rem; }
.sj-liknande h2 { font-size: 1.25rem; font-weight: 700; color: #111827; margin-bottom: .25rem; }
@media (min-width: 768px) { .sj-liknande .sj-karusell { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
/* Kortbilden: fast kvadrat oavsett bildens egna mått. */
.sj-kort-bild { position: relative; overflow: hidden; }
.sj-kort-bild img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }

/* Lägst med frakt (0.19.0) */
.sj-marke-frakt { background: #15803d; color: #fff; }

/* ===== 0.24.0: färg för besparing och deals, mätare, Sparkollen ===== */
:root {
  --sj-blacka: #111827;      /* bas: Shopellos svarta */
  --sj-spar: #05603a;        /* du sparar: djup grön */
  --sj-spar-ljus: #e7f6ee;
  --sj-lapp: #ffd23f;        /* prislappen: deals och prisfall */
  --sj-lapp-text: #1a1300;
}
.sj-marke-frakt { background: var(--sj-spar); color: #fff; }
.sj-pf-minus { color: var(--sj-lapp-text) !important; background: var(--sj-lapp); border-radius: 4px; padding: 0 6px; display: inline-block !important; }
.sj-prisfall-block span[style*="#047857"] { background: var(--sj-lapp) !important; color: var(--sj-lapp-text) !important; }
.sj-beslut { background: linear-gradient(135deg, var(--sj-spar-ljus), #fff 60%) !important; border-color: #b7e2c9 !important; }
.sj-beslut b { color: var(--sj-spar); }
/* Prisskillnadsmätaren: billigast till dyrast, mittenpriset markerat. */
.sj-matare { position: relative; height: 10px; border-radius: 999px; background: linear-gradient(90deg, var(--sj-spar) 0%, #9ca3af 55%, #d97706 100%); margin: 14px 0 22px; max-width: 420px; }
.sj-matare i { position: absolute; top: -4px; width: 2px; height: 18px; background: var(--sj-blacka); }
.sj-matare i span { position: absolute; top: 20px; left: 50%; transform: translateX(-50%); white-space: nowrap; font-size: .7rem; font-style: normal; color: #374151; }
.sj-matare .sj-m-min { left: 0; } .sj-matare .sj-m-max { right: 0; left: auto; }
/* Verktygskort med ikon. */
.sj-verktyg a { display: grid !important; grid-template-columns: 40px 1fr; gap: 12px; align-items: start; transition: transform .15s ease, box-shadow .15s ease; }
.sj-verktyg a:hover { transform: translateY(-2px); box-shadow: 0 6px 18px rgba(17,24,39,.08); }
.sj-ikon { width: 40px; height: 40px; border-radius: 10px; background: var(--sj-spar-ljus); color: var(--sj-spar); display: grid; place-items: center; }
.sj-ikon svg { width: 24px; height: 24px; }
/* Sparkollen: liten räknare nere till höger. */
.sj-sparkoll { position: fixed; left: 16px; bottom: 16px; z-index: 70; background: var(--sj-blacka); color: #fff; border-radius: 14px; padding: 10px 14px; font-size: .85rem; line-height: 1.3; box-shadow: 0 10px 30px rgba(0,0,0,.25); max-width: 280px; cursor: pointer; }
.sj-sparkoll b { color: var(--sj-lapp); font-size: 1rem; }
.sj-sparkoll small { display: block; color: #d1d5db; margin-top: 2px; }
.sj-sparkoll .sj-x { position: absolute; top: 4px; right: 8px; color: #9ca3af; background: none; border: 0; cursor: pointer; font-size: 1rem; }
.sj-sparkoll-panel { margin-top: 8px; border-top: 1px solid #374151; padding-top: 8px; display: none; }
.sj-sparkoll.is-oppen .sj-sparkoll-panel { display: block; }
.sj-sparkoll-panel li { list-style: none; color: #e5e7eb; }
.sj-sparkoll-panel li.is-las { color: #6b7280; }
.sj-toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); opacity: 0; z-index: 80; background: var(--sj-lapp); color: var(--sj-lapp-text); font-weight: 700; padding: 10px 18px; border-radius: 999px; box-shadow: 0 10px 30px rgba(0,0,0,.2); transition: all .35s cubic-bezier(.2,.9,.3,1.3); }
.sj-toast.is-synlig { opacity: 1; transform: translate(-50%, 0); }
@keyframes sj-pop { 0% { transform: scale(1); } 40% { transform: scale(1.12); } 100% { transform: scale(1); } }
.sj-sparkoll.is-pop { animation: sj-pop .45s ease; }
@media (prefers-reduced-motion: reduce) { .sj-toast, .sj-verktyg a { transition: none; } .sj-sparkoll.is-pop { animation: none; } }
@media (max-width: 560px) { .sj-sparkoll { left: 8px; bottom: 8px; max-width: 220px; padding: 8px 12px; font-size: .78rem; } .sj-sparkoll small { display: none; } .sj-sparkoll.is-oppen small { display: block; } }
