/* public/style.css — räkor.se */
:root {
  --ink: #092442;          /* mörkblå: text, sidhuvud, sidfot */
  --ink-2: #0E3058;        /* inmatningsfält på mörk bakgrund */
  --ink-line: #1F3E63;     /* kantlinjer på mörk bakgrund */
  --ink-muted: #B9C6D3;    /* ljus text på mörk bakgrund */
  --body: #33475C;         /* brödtext */
  --muted: #5A6573;        /* sekundär text */
  --bg: #FFFFFF;
  --surface: #F3F4F6;      /* grå ytor */
  --line: #E1E4E8;
  --line-strong: #C9CED6;
  --placeholder: #E5E8EC;
  --accent: #D7141A;       /* röd: köpknappar, rea */
  --accent-dark: #B01015;
  --msc: #1F4E79;
  --msc-bg: #E3ECEF;
  --asc: #2F6B5E;
  --ok: #1E6B4F;
  --radius: 20px;
  --wrap: 1280px;
  --display: 'Fraunces', Georgia, serif;
  --sans: 'Instrument Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 96px; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--sans); font-size: 17px; line-height: 1.5; }
img { max-width: 100%; display: block; }
a { color: var(--ink); }
a:hover { color: var(--msc); }
button, input, select { font: inherit; color: inherit; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 32px; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
[hidden] { display: none !important; }
h1, h2, h3 { font-family: var(--display); letter-spacing: -0.02em; line-height: 1.05; margin: 0; }
:focus-visible { outline: 3px solid var(--msc); outline-offset: 2px; }

/* --- Knappar --- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 52px; padding: 0 28px; border-radius: 999px; font-weight: 600; font-size: 17px; text-decoration: none; border: 2px solid transparent; cursor: pointer; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-dark); color: #fff; }
.btn-outline { border-color: var(--ink); background: transparent; color: var(--ink); }
.btn-outline:hover { background: var(--ink); color: #fff; }
.btn-msc { background: var(--msc); color: #fff; }
.btn-msc:hover { background: var(--ink); color: #fff; }

/* --- Sidhuvud --- */
.site-header { position: sticky; top: 0; z-index: 20; background: #fff; border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; align-items: center; gap: 32px; height: 80px; }
.logo { display: flex; align-items: center; gap: 12px; text-decoration: none; flex-shrink: 0; }
.logo svg { width: 49px; height: 49px; }
.logo span { font-family: var(--display); font-size: 35px; font-weight: 800; letter-spacing: -0.02em; }
.search { flex: 1; position: relative; display: flex; }
.search input { width: 100%; height: 48px; padding: 0 20px 0 48px; border-radius: 999px; border: 1px solid var(--line-strong); background: var(--surface); font-size: 16px; }
.search input:focus { background: #fff; }
.search svg { position: absolute; left: 18px; top: 15px; width: 18px; height: 18px; color: var(--muted); pointer-events: none; }
.main-nav { display: flex; align-items: center; gap: 24px; font-weight: 500; flex-shrink: 0; }
.main-nav a { text-decoration: none; padding: 10px 0; }
.main-nav a[aria-current="page"] { box-shadow: inset 0 -2px 0 var(--ink); }
.main-nav .nav-rea { color: var(--accent); font-weight: 600; }
.menu-toggle { display: none; width: 44px; height: 44px; border: none; background: transparent; cursor: pointer; align-items: center; justify-content: center; }

/* --- Hero --- */
.hero .wrap { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 56px; padding-top: 64px; padding-bottom: 56px; align-items: center; }
.hero-kicker { font-size: 15px; font-weight: 600; color: var(--msc); margin: 0 0 18px; }
.hero h1 { font-size: clamp(42px, 5.4vw, 72px); font-weight: 800; }
.hero p { font-size: 20px; color: var(--body); max-width: 34em; margin: 24px 0 32px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; }
.deal-card { position: relative; background: var(--ink); color: #fff; border-radius: 28px; overflow: hidden; display: grid; grid-template-rows: 280px auto; text-decoration: none; min-height: 460px; }
.deal-card:hover { color: #fff; }
.deal-card .deal-img { background: #fff; display: flex; align-items: center; justify-content: center; }
.deal-card .deal-img img { width: 100%; height: 100%; object-fit: cover; }
.deal-card .deal-body { padding: 26px 30px 30px; display: flex; flex-direction: column; gap: 8px; }
.deal-badge { position: absolute; top: 18px; left: 18px; background: var(--accent); color: #fff; font-weight: 600; font-size: 15px; padding: 8px 14px; border-radius: 999px; }
.deal-title { font-family: var(--display); font-size: 26px; font-weight: 600; line-height: 1.15; }
.deal-price { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.deal-price strong { font-family: var(--display); font-size: 34px; font-weight: 600; }
.deal-price span { color: var(--ink-muted); }

/* --- Kategorikort --- */
.cats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); grid-template-rows: 220px 220px; gap: 18px; }
.cat-card { position: relative; border-radius: var(--radius); overflow: hidden; background: var(--surface); text-decoration: none; display: flex; align-items: flex-end; padding: 18px; min-height: 160px; }
.cat-card img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
img.img-failed { visibility: hidden; }
.cat-card .cat-label { position: relative; background: #fff; border-radius: 14px; padding: 12px 18px; display: flex; flex-direction: column; }
.cat-card .cat-label strong { font-family: var(--display); font-size: 24px; font-weight: 600; line-height: 1.1; }
.cat-card .cat-label span { font-size: 15px; color: var(--muted); }
.cat-card.big { grid-column: span 2; grid-row: span 2; padding: 28px; }
.cat-card.big .cat-label strong { font-size: 36px; font-weight: 800; }
.cat-card.rea { background: var(--accent); color: #fff; flex-direction: column; align-items: flex-start; justify-content: space-between; padding: 24px; }
.cat-card.rea:hover { background: var(--accent-dark); color: #fff; }
.cat-card.rea strong { font-family: var(--display); font-size: 40px; font-weight: 800; }

/* --- Löften --- */
.promises { margin-top: 56px; background: var(--ink); color: #fff; border-radius: 24px; padding: 36px 44px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 44px; }
.promises h3 { font-size: 24px; font-weight: 600; margin-bottom: 8px; }
.promises p { margin: 0; color: var(--ink-muted); font-size: 16px; }

/* --- Produktlista --- */
.listing { margin-top: 88px; padding: 72px 0; background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.listing-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; flex-wrap: wrap; margin-bottom: 28px; }
.crumbs { font-size: 15px; color: var(--muted); margin-bottom: 8px; }
.crumbs a { color: var(--muted); }
.listing h2 { font-size: clamp(36px, 4vw, 52px); font-weight: 800; }
.listing-count { color: var(--muted); font-size: 15px; margin-top: 6px; }
.filters { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.chip { min-height: 44px; padding: 0 18px; border-radius: 999px; border: 1px solid var(--line-strong); background: #fff; font-size: 15px; font-weight: 500; cursor: pointer; }
.chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; font-weight: 600; }
.sort { display: flex; align-items: center; gap: 8px; font-size: 15px; }
.sort select { height: 44px; padding: 0 12px; border-radius: 12px; border: 1px solid var(--line-strong); background: #fff; font-size: 15px; }

.product-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 22px; }
.product-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; text-decoration: none; transition: border-color .15s ease, transform .15s ease; }
.product-card:hover { border-color: var(--line-strong); transform: translateY(-2px); color: var(--ink); }
.product-card .img { position: relative; aspect-ratio: 4 / 3; background: #fff; border-bottom: 1px solid var(--line); }
.product-card .img img { width: 100%; height: 100%; object-fit: cover; }
.badges { position: absolute; top: 12px; left: 12px; display: flex; gap: 6px; flex-wrap: wrap; }
.badge { font-size: 13px; font-weight: 600; padding: 5px 10px; border-radius: 999px; color: #fff; line-height: 1.2; }
.badge-msc { background: var(--msc); }
.badge-asc { background: var(--asc); }
.badge-rea { background: var(--accent); }
.badge-plain { background: #fff; color: var(--ink); border: 1px solid var(--line-strong); }
.product-card .body { padding: 18px 20px 20px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.product-card .title { font-size: 17px; font-weight: 600; line-height: 1.3; flex: 1; }
.price-row { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.price { font-family: var(--display); font-size: 24px; font-weight: 600; }
.price.is-rea { color: var(--accent); }
.old-price { font-size: 15px; color: var(--muted); text-decoration: line-through; }
.unit-price { font-size: 14px; color: var(--muted); }
.state-msg { color: var(--muted); padding: 24px 0; }

.pagination { display: flex; justify-content: center; gap: 8px; margin-top: 36px; flex-wrap: wrap; }
.pagination button { min-width: 44px; height: 44px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line-strong); background: #fff; cursor: pointer; }
.pagination button[aria-current="page"] { background: var(--ink); color: #fff; border-color: var(--ink); font-weight: 600; }
.pagination .gap { align-self: center; color: var(--muted); padding: 0 4px; }
.disclaimer { font-size: 14px; color: var(--muted); margin: 24px 0 0; }

/* --- MSC-sektion --- */
.msc-block { margin-top: 88px; background: var(--msc-bg); border-radius: 32px; padding: 60px 64px; display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 56px; align-items: center; }
.msc-block .kicker { color: var(--msc); font-weight: 600; font-size: 15px; margin: 0 0 14px; }
.msc-block h2 { font-size: clamp(34px, 3.6vw, 48px); font-weight: 800; }
.msc-block p { color: var(--body); font-size: 19px; line-height: 1.6; margin: 20px 0 26px; max-width: 36em; }
.msc-block .actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.msc-block .actions a.link { font-weight: 600; color: var(--msc); padding: 12px 8px; }
.msc-list { background: #fff; border-radius: var(--radius); padding: 8px 24px; }
.msc-list a { display: flex; justify-content: space-between; gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--line); text-decoration: none; }
.msc-list a:last-child { border-bottom: none; }
.msc-list a strong { white-space: nowrap; }

/* --- Sidfot --- */
.site-footer { margin-top: 104px; background: var(--ink); color: #fff; padding: 72px 0 40px; }
.footer-top { display: flex; justify-content: space-between; gap: 48px; flex-wrap: wrap; }
.footer-top h2 { font-size: 36px; font-weight: 800; }
.footer-top p { color: var(--ink-muted); margin: 10px 0 0; }
.subscribe { width: 100%; max-width: 480px; }
.subscribe label { display: block; color: var(--ink-muted); font-size: 15px; margin-bottom: 8px; }
.subscribe .row { display: flex; gap: 10px; }
.subscribe input { flex: 1; min-width: 0; height: 52px; padding: 0 18px; border-radius: 999px; border: 1px solid var(--ink-line); background: var(--ink-2); color: #fff; font-size: 17px; }
.subscribe input::placeholder { color: #8FA3B8; }
.subscribe .msg { min-height: 1.5em; margin: 8px 0 0; font-size: 15px; color: var(--ink-muted); }
.footer-links { margin-top: 48px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)) minmax(0, 1.4fr); gap: 36px; }
.footer-links h3 { font-family: var(--sans); font-size: 16px; font-weight: 600; letter-spacing: 0; margin-bottom: 12px; }
.footer-links ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.footer-links a { color: var(--ink-muted); }
.footer-links a:hover { color: #fff; }
.footer-links p { margin: 0; color: var(--ink-muted); font-size: 14px; line-height: 1.6; }
.footer-bottom { margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--ink-line); color: var(--ink-muted); font-size: 14px; }

/* --- Produktsida --- */
.product-page { padding-top: 28px; }
.product-main { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 64px; margin-top: 24px; }
.product-image { background: #fff; border: 1px solid var(--line); border-radius: 28px; overflow: hidden; aspect-ratio: 1 / 1; }
.product-image img { width: 100%; height: 100%; object-fit: cover; }
.product-info { display: flex; flex-direction: column; gap: 20px; padding-top: 8px; }
.product-info .badges { position: static; }
.product-info .badge { font-size: 14px; padding: 7px 12px; }
.product-info h1 { font-size: clamp(34px, 3.8vw, 52px); font-weight: 800; }
.product-info .price { font-size: 44px; }
.stock { display: flex; align-items: center; gap: 8px; font-weight: 500; }
.stock.ok { color: var(--ok); }
.stock.out { color: var(--muted); }
.buy { min-height: 64px; font-size: 20px; width: 100%; }
.buy-note { margin: 0; font-size: 15px; color: var(--muted); }
.info-box { background: var(--msc-bg); border-radius: 18px; padding: 20px 24px; }
.info-box strong { color: var(--msc); display: block; margin-bottom: 4px; }
.info-box p { margin: 0; font-size: 15px; color: var(--body); }
.product-details { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 64px; margin-top: 72px; }
.product-details h2 { font-size: 32px; font-weight: 600; margin-bottom: 16px; }
.description p { color: var(--body); font-size: 18px; line-height: 1.7; margin: 0 0 16px; max-width: 38em; }
.description ul { padding-left: 20px; color: var(--body); line-height: 1.7; }
.facts { margin: 0; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); }
.facts dt, .facts dd { margin: 0; padding: 14px 0; border-bottom: 1px solid var(--line); }
.facts dt { color: var(--muted); }
.facts dd { font-weight: 500; }
.related { margin-top: 80px; }
.related h2 { font-size: 36px; font-weight: 800; margin-bottom: 24px; }

/* --- Om oss --- */
.about-page { max-width: 820px; padding-top: 28px; }
.about-page h1 { font-size: clamp(40px, 5vw, 60px); font-weight: 800; margin: 8px 0 28px; }
.about-text { color: var(--body); font-size: 18px; line-height: 1.7; }
.about-text p { margin: 0 0 18px; }
.about-text a { color: var(--msc); font-weight: 600; }
.about-text h2, .about-text h3 { font-size: 26px; font-weight: 600; margin: 32px 0 12px; }
.about-links { margin-top: 48px; padding-top: 32px; border-top: 1px solid var(--line); }
.about-links h2, .about-links h3, .about-links h4 { font-family: var(--display); font-size: 26px; font-weight: 600; margin: 0 0 16px; }
.about-links ul { list-style: none; margin: 0; padding: 0; columns: 3 180px; column-gap: 32px; }
.about-links li { padding: 6px 0; break-inside: avoid; }
.about-links a { color: var(--body); text-decoration: none; }
.about-links a:hover { color: var(--msc); text-decoration: underline; }
.about-page + .site-footer .footer-links { margin-top: 0; }

/* --- Mobil / surfplatta --- */
@media (max-width: 1100px) {
  .main-nav { gap: 16px; font-size: 16px; }
  .product-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .wrap { padding: 0 20px; }
  .site-header .wrap { height: auto; min-height: 64px; flex-wrap: wrap; gap: 10px; padding-top: 10px; padding-bottom: 12px; }
  .logo svg { width: 39px; height: 39px; }
  .logo span { font-size: 29px; }
  .menu-toggle { display: inline-flex; margin-left: auto; }
  .search { order: 3; flex-basis: 100%; }
  .main-nav { display: none; order: 4; flex-basis: 100%; flex-direction: column; align-items: stretch; gap: 0; }
  .main-nav.open { display: flex; }
  .main-nav a { padding: 14px 0; border-top: 1px solid var(--line); }
  .main-nav a[aria-current="page"] { box-shadow: none; font-weight: 700; }
  .hero .wrap { grid-template-columns: 1fr; gap: 32px; padding-top: 32px; }
  .hero p { font-size: 17px; margin: 16px 0 22px; }
  .deal-card { grid-template-rows: 220px auto; min-height: 0; }
  .cats { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: 170px; grid-auto-rows: 130px; gap: 12px; }
  .cat-card { min-height: 0; padding: 12px; }
  .cat-card.big { grid-column: span 2; grid-row: span 1; padding: 16px; }
  .cat-card.big .cat-label strong { font-size: 26px; }
  .cat-card .cat-label { padding: 8px 14px; }
  .cat-card .cat-label strong { font-size: 19px; }
  .promises { grid-template-columns: 1fr; gap: 18px; padding: 24px; margin-top: 32px; }
  .promises h3 { font-size: 19px; margin-bottom: 2px; }
  .listing { margin-top: 48px; padding: 40px 0; }
  .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .product-card .body { padding: 12px; }
  .product-card .title { font-size: 15px; }
  .price { font-size: 19px; }
  .badge { font-size: 11px; padding: 4px 8px; }
  .msc-block { grid-template-columns: 1fr; padding: 32px 22px; gap: 24px; margin-top: 48px; }
  .msc-block p { font-size: 16px; }
  .site-footer { margin-top: 56px; padding: 40px 0 28px; }
  .footer-top h2 { font-size: 28px; }
  .subscribe .row { flex-direction: column; }
  .footer-links { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px; }
  .footer-links > div:last-child { grid-column: span 2; }
  .product-main, .product-details { grid-template-columns: 1fr; gap: 28px; }
  .product-details { margin-top: 40px; }
  .product-info .price { font-size: 36px; }
}
