/* Brand fonts (Bónus brand guide 2023, section 3.4) */
@font-face { font-family: Rubik; src: url(assets/fonts/Rubik-Regular.ttf) format('truetype'); font-weight: 400; font-display: swap; }
@font-face { font-family: Rubik; src: url(assets/fonts/Rubik-Medium.ttf) format('truetype'); font-weight: 500; font-display: swap; }
@font-face { font-family: Rubik; src: url(assets/fonts/Rubik-Bold.ttf) format('truetype'); font-weight: 700; font-display: swap; }
@font-face { font-family: 'Roboto Condensed'; src: url(assets/fonts/RobotoCondensed-Regular.ttf) format('truetype'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Roboto Condensed'; src: url(assets/fonts/RobotoCondensed-Bold.ttf) format('truetype'); font-weight: 700; font-display: swap; }

/* Brand palette (section 3.3): primary yellow, pink, black, white; greys for support */
:root {
  --yellow: #ffe300;
  --pink: #ff59b0;
  --ink: #000000;
  --white: #ffffff;
  --grey-dark: #646464;
  --grey-mid: #a8a8a7;
  --grey-light: #e3e3e3;
  --green: #53b64a;
  --font: Rubik, system-ui, sans-serif;
  --small: 'Roboto Condensed', 'Arial Narrow', sans-serif;
  --track: -0.02em; /* guide: tracking -20 */
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; font-family: var(--font); font-weight: 400; color: var(--ink); background: var(--white); letter-spacing: var(--track); }
img { max-width: 100%; }
a { color: var(--ink); }
button { font-family: inherit; letter-spacing: inherit; }
[hidden] { display: none !important; }

.wrap { max-width: 1200px; margin: 0 auto; padding-left: 24px; padding-right: 24px; }
.muted { font-family: var(--small); font-size: 15px; color: var(--grey-dark); letter-spacing: 0; }

/* Header + hero */
.band-yellow { background: var(--yellow); }
header.band-yellow { overflow: hidden; }
.topbar { padding-top: 20px; padding-bottom: 20px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; }
.topbar-left { display: flex; align-items: center; gap: 40px; flex-wrap: wrap; }
.wordmark { display: block; line-height: 0; }
.wordmark img { height: 32px; width: auto; display: block; }
.mainnav { display: flex; gap: 24px; flex-wrap: wrap; font-size: 16px; font-weight: 500; }
.mainnav a { text-decoration: none; }
.mainnav a.is-current { font-weight: 700; text-decoration: underline; text-underline-offset: 6px; text-decoration-thickness: 3px; }

.hero { position: relative; padding-top: 40px; padding-bottom: 56px; display: flex; flex-wrap: wrap; gap: 32px; align-items: center; justify-content: space-between; }
.hero-text { flex: 0 1 520px; min-width: 0; position: relative; z-index: 1; }
/* Big pig peeking up from the bottom of the band, body tucked behind the countdown */
.hero-pig { position: absolute; right: 339px; bottom: 0; width: 400px; height: auto; transform: translateY(22%); pointer-events: none; }
.eyebrow { font-size: 15px; font-weight: 500; letter-spacing: 0.04em; text-transform: uppercase; }
.eyebrow-yellow { color: var(--yellow); font-size: 14px; }
h1 { margin: 12px 0 16px; font-weight: 700; font-size: clamp(46px, 7.4vw, 84px); line-height: 0.9; letter-spacing: var(--track); }
.hero-text p { margin: 0; font-size: 20px; line-height: 1.4; max-width: 400px; }

.countdown { flex: 0 1 405px; position: relative; z-index: 1; background: var(--ink); color: var(--white); border-radius: 18px; padding: 28px; display: flex; flex-direction: column; gap: 16px; }
.countdown-label { display: flex; align-items: center; gap: 8px; font-size: 17px; font-weight: 500; color: var(--yellow); }
.countdown-nums { display: flex; gap: 20px; align-items: baseline; color: var(--yellow); }
.countdown-nums span:not(.big) { font-size: 18px; font-weight: 500; margin-left: 6px; }
.countdown-nums .big { font-weight: 700; font-size: 56px; line-height: 1; }
.countdown-sub { font-size: 16px; color: var(--grey-light); }
.countdown .btn-block { min-height: 56px; font-size: 18px; border-radius: 14px; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 18px; border-radius: 12px; font-size: 15px; font-weight: 500; text-decoration: none; cursor: pointer; border: 2px solid transparent; }
.btn-block { display: flex; min-height: 48px; font-size: 16px; }
.btn-accent { background: var(--yellow); color: var(--ink); border-color: var(--yellow); }
.btn-outline-light { background: transparent; color: var(--yellow); border-color: var(--yellow); }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 8px; }
.btn-row .btn { min-height: 48px; padding: 0 20px; font-size: 16px; }
.btn:focus-visible, .chip:focus-visible, .add-btn:focus-visible, input:focus-visible, a:focus-visible { outline: 3px solid var(--pink); outline-offset: 2px; }

/* Chips */
.chips { padding-top: 32px; padding-bottom: 8px; display: flex; flex-wrap: wrap; gap: 10px; }
.chip { min-height: 44px; padding: 0 18px; border-radius: 999px; font-size: 15px; font-weight: 500; cursor: pointer; border: 2px solid var(--grey-mid); background: var(--white); color: var(--ink); }
.chip[aria-pressed="true"] { border-color: var(--ink); background: var(--ink); color: var(--yellow); font-weight: 700; }
.chips-small { padding: 0; gap: 8px; }
.chips-small .chip { min-height: 40px; padding: 0 14px; font-size: 14px; }

/* Product grid */
.grid { padding-top: 40px; padding-bottom: 56px; display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 20px; }
.card { border: 2px solid var(--grey-light); border-radius: 16px; overflow: hidden; display: flex; flex-direction: column; background: var(--white); scroll-margin-top: 16px; }
.card.in-list { border-color: var(--ink); }
.card-img { position: relative; aspect-ratio: 1 / 1; background: var(--pink); overflow: hidden; }
.card-img img { width: 100%; height: 100%; object-fit: contain; padding: 8%; box-sizing: border-box; display: block; }
.card-body { padding: 14px 18px 18px; display: flex; flex-direction: column; gap: 4px; flex-grow: 1; }

/* Price: big Rubik Bold number, unit beside it (no shape behind it) */
.card-price { display: flex; align-items: baseline; gap: 6px; margin-bottom: 4px; }
.card-price strong { font-weight: 700; font-size: 36px; line-height: 1; }
.card-price span { font-weight: 700; font-size: 16px; }

.card-name { font-size: 18px; font-weight: 700; line-height: 1.2; overflow-wrap: anywhere; hyphens: auto; }
.card-size, .card-old { font-family: var(--small); font-size: 15px; color: var(--grey-dark); letter-spacing: 0; }
.card-deal { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin-top: 6px; }
.card-old s { text-decoration: line-through; }
.save-tag { background: var(--ink); color: var(--yellow); border-radius: 8px; padding: 6px 10px; font-size: 14px; font-weight: 700; }
.lbl-short { display: none; }
.savings span, .savings strong { white-space: nowrap; }
.card-spacer { flex-grow: 1; }
.add-btn { margin-top: 14px; min-height: 48px; border-radius: 12px; border: 2px solid var(--ink); background: var(--white); color: var(--ink); font-size: 16px; font-weight: 500; display: flex; align-items: center; justify-content: center; gap: 8px; cursor: pointer; }
.add-btn[aria-pressed="true"] { background: var(--ink); color: var(--yellow); font-weight: 700; }

/* Bónuskort */
.band-dark { background: var(--ink); color: var(--white); }
.band-dark a { color: var(--white); }
.band-dark .btn-accent { color: var(--ink); }
.band-dark .btn-outline-light { color: var(--yellow); }
.kort { padding-top: 64px; padding-bottom: 64px; display: flex; flex-wrap: wrap; align-items: center; gap: 48px; }
.kort-img { flex: 1 1 360px; min-width: 0; display: flex; justify-content: center; }
.kort-img img { width: 100%; max-width: 440px; height: auto; display: block; transform: rotate(-4deg); }
.kort-text { flex: 1 1 460px; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.kort-text h2, .stores-side h2 { margin: 0; font-weight: 700; font-size: 44px; line-height: 0.95; }
.kort-text h2 { color: var(--yellow); }
.kort-text p { margin: 0; font-size: 17px; line-height: 1.5; color: var(--grey-light); max-width: 520px; }
.small-link { font-size: 14px; color: var(--grey-light) !important; text-underline-offset: 3px; }

/* Stores */
.band-grey { background: var(--grey-light); }
.stores { padding-top: 64px; padding-bottom: 64px; display: flex; flex-wrap: wrap; gap: 40px; }
.stores-side { flex: 1 1 340px; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.stores-side p { margin: 0; font-size: 17px; line-height: 1.5; }
.stores-side label { font-size: 14px; font-weight: 700; margin-top: 8px; }
.stores-side input { min-height: 48px; border: 2px solid var(--ink); border-radius: 12px; padding: 0 14px; font-size: 16px; font-family: inherit; background: var(--white); width: 100%; }
.stores-list { flex: 1 1 520px; min-width: 0; display: flex; flex-direction: column; gap: 10px; max-height: 470px; overflow-y: auto; padding-right: 4px; }
.store { background: var(--white); border-radius: 14px; padding: 16px 20px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.store-name { font-size: 18px; font-weight: 700; }
.store-meta { font-family: var(--small); font-size: 15px; color: var(--grey-dark); margin-top: 4px; letter-spacing: 0; }
.store-status { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 500; margin-top: 6px; }
.store-status .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--grey-mid); flex: none; }
.store-status.open .dot { background: var(--green); }
.store .btn { border-color: var(--ink); color: var(--ink); background: transparent; }
.store-empty { background: var(--white); border-radius: 14px; padding: 20px; font-size: 16px; display: flex; align-items: center; gap: 16px; }
.store-empty img { width: 72px; height: auto; flex: none; }

/* Footer: wordmark bottom-left (section 4.2) */
.site-footer { padding-top: 32px; padding-bottom: 120px; display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; }
.site-footer img { height: 28px; width: auto; display: block; }
.footnote { font-family: var(--small); font-size: 14px; color: var(--grey-dark); letter-spacing: 0; }

/* Sticky shopping list bar */
.listbar { position: fixed; left: 0; right: 0; bottom: 0; padding: 0 16px 16px; z-index: 10; }
.listbar-inner { max-width: 1168px; margin: 0 auto; background: var(--ink); color: var(--white); border-radius: 16px; padding: 12px 18px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; box-shadow: 0 8px 24px rgba(0,0,0,.18); }
.listbar-who { display: flex; align-items: center; gap: 12px; }
.listbar-pig { width: 52px; height: auto; flex: none; }
.listbar-title { font-size: 17px; font-weight: 700; color: var(--yellow); }
.listbar-sub { font-size: 14px; color: var(--grey-light); }
.listbar-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.savings { display: flex; align-items: center; gap: 8px; height: 44px; padding: 0 16px; border-radius: 12px; background: var(--pink); color: var(--ink); }
.savings span { font-size: 15px; font-weight: 500; }
.savings strong { font-weight: 700; font-size: 22px; line-height: 1; }

.toast { position: fixed; left: 50%; bottom: 110px; transform: translateX(-50%); background: var(--ink); color: var(--yellow); padding: 12px 18px; border-radius: 12px; font-weight: 500; z-index: 20; }

/* Narrower desktops: smaller pig so it stays clear of the intro text */
@media (max-width: 1140px) {
  .hero-pig { width: 300px; right: 304px; }
}
@media (max-width: 900px) {
  .hero-pig { width: 260px; right: 24px; transform: translateY(30%); }
  .countdown { flex-basis: 100%; }
  .hero { padding-bottom: 150px; }
}

/* Phone */
@media (max-width: 640px) {
  .wrap { padding-left: 16px; padding-right: 16px; }
  .topbar-left { gap: 16px; }
  .wordmark img { height: 26px; }
  .mainnav { gap: 16px; font-size: 14px; }
  /* Pig sits centred under the countdown, cropped by the bottom of the band */
  .hero { padding-top: 16px; padding-bottom: 0; }
  .countdown { order: 2; }
  .hero-pig { position: relative; order: 3; right: auto; bottom: auto; width: 220px; margin: -12px auto -28px; transform: none; }
  .hero-text p { font-size: 17px; }
  .countdown { flex-basis: 100%; }
  .grid { padding-top: 24px; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .card-body { padding: 10px 10px 10px; }
  .card-price { gap: 4px; }
  .card-price strong { font-size: 26px; }
  .card-price span { font-size: 13px; }
  .card-name { font-size: 15px; }
  .card-size, .card-old { font-size: 13px; }
  .save-tag { font-size: 12px; padding: 5px 8px; }
  .add-btn { min-height: 44px; font-size: 14px; }
  .kort-text h2, .stores-side h2 { font-size: 34px; }
  .listbar { padding: 0 8px 8px; }
  .listbar-inner { padding: 12px; }
  .listbar-pig { width: 40px; }
  .listbar-sub, #printList { display: none; }
  .listbar-actions { width: 100%; }
  .savings { flex: 1; justify-content: center; padding: 0 10px; }
  .savings strong { font-size: 20px; }
  #shareList { flex: 1; }
  .lbl-long { display: none; }
  .lbl-short { display: inline; }
}

@media print {
  header, .chips, .band-dark, #verslanir, .listbar, .site-footer, .toast { display: none !important; }
  .card:not(.in-list) { display: none; }
  .grid { grid-template-columns: repeat(3, 1fr); }
  .add-btn { display: none; }
}
