/* Dilema menu. Plain CSS, no JS. Views switch with :target (see index.html). */

@font-face {
  font-family: "Onest";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("fonts/onest-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Onest";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("fonts/onest-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --bg: #f8f8f8;
  --brand: #9c5b19;
  --ink: #111827;
  --ink-item: #1d1d1d;
  --radius: 15px;
  --shadow: 0 15px 30px rgba(0, 0, 0, 0.07);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
  background: var(--bg);
}

body {
  margin: 0;
  padding-left: env(safe-area-inset-left);
  padding-right: env(safe-area-inset-right);
  background: var(--bg);
  color: var(--ink);
  font-family: "Onest", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 15px;
  line-height: 1.1;
}

img {
  display: block;
  border: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

h2 {
  margin: 0;
}

/* Page shell: header, one visible view, footer pinned to the bottom. */

.page {
  display: -webkit-flex;
  display: flex;
  -webkit-flex-direction: column;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
  max-width: 480px;
  margin: 0 auto;
}

main {
  -webkit-flex: 1 0 auto;
  flex: 1 0 auto;
  padding: 0 16px 24px;
}

/* View switching. Empty <i class="t" id="..."> anchors sit at the top of the page,
   so jumping to one always lands at y=0 and the logo stays in view. */

.t {
  display: block;
  height: 0;
  overflow: hidden;
}

.cat {
  display: none;
}

#kafa:target ~ main .c-kafa,
#topli:target ~ main .c-topli,
#limunade:target ~ main .c-limunade,
#cijedeni:target ~ main .c-cijedeni,
#sokovi:target ~ main .c-sokovi,
#pivo:target ~ main .c-pivo,
#vino:target ~ main .c-vino,
#koktel:target ~ main .c-koktel,
#zestoka:target ~ main .c-zestoka,
#vitaminska:target ~ main .c-vitaminska,
#sladoled:target ~ main .c-sladoled {
  display: block;
}

.t:target ~ main #home {
  display: none;
}

/* Header */

.hero {
  position: relative;
  height: 145px;
  margin-bottom: 52px;
}

.hero > picture,
.hero > picture img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.hero > picture img {
  -o-object-fit: cover;
  object-fit: cover;
  -o-object-position: center bottom;
  object-position: center bottom;
}

.t:target ~ .hero {
  height: 123px;
  margin-bottom: 51px;
}

.logo {
  position: absolute;
  left: 50%;
  bottom: -32px;
  width: 96px;
  height: 96px;
  margin-left: -48px;
}

.logo img {
  width: 96px;
  height: 96px;
}

.back {
  display: none;
  position: absolute;
  top: 12px;
  left: 12px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
}

.back::before {
  content: "";
  position: absolute;
  top: 16px;
  left: 18px;
  width: 10px;
  height: 10px;
  border-left: 2px solid var(--ink);
  border-bottom: 2px solid var(--ink);
  -webkit-transform: rotate(45deg);
  transform: rotate(45deg);
}

.t:target ~ .hero .back {
  display: block;
}

/* Home: category tiles */

.tiles {
  display: -ms-grid;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  grid-gap: 12px 11px;
  gap: 12px 11px;
}

.tile {
  position: relative;
  overflow: hidden;
  grid-column: span 2;
  min-height: 135px;
  padding: 16px 11px 0;
  border-radius: var(--radius);
  background: #fff;
  font-size: 15px;
  line-height: 1.1;
  -webkit-touch-callout: none;
}

.tile.wide {
  grid-column: span 3;
}

.tile:active {
  box-shadow: var(--shadow);
}

.tile span {
  position: relative;
  z-index: 1;
  display: block;
  max-width: 90px;
}

.tile picture {
  position: absolute;
  right: 0;
  bottom: 0;
  width: var(--w);
  margin-right: var(--r, 0);
}

.tile img {
  width: 100%;
  height: auto;
}

/* Category: accordion cards */

.card {
  margin-bottom: 10px;
  border-radius: var(--radius);
  background: #fff;
}

.card[open] {
  box-shadow: var(--shadow);
}

.card summary {
  display: -webkit-flex;
  display: flex;
  -webkit-align-items: center;
  align-items: center;
  -webkit-justify-content: space-between;
  justify-content: space-between;
  min-height: 50px;
  padding: 0 20px;
  font-size: 15px;
  text-transform: uppercase;
  cursor: pointer;
  list-style: none;
  -webkit-user-select: none;
  user-select: none;
}

.card summary::-webkit-details-marker {
  display: none;
}

.card summary::marker {
  content: "";
}

.card summary::after {
  content: "";
  -webkit-flex: none;
  flex: none;
  width: 11px;
  height: 7px;
  margin-left: 12px;
  background: url("img/chevron.svg") center / 11px 6.3px no-repeat;
}

.card[open] summary {
  min-height: 58px;
}

.card[open] summary::after {
  -webkit-transform: rotate(180deg);
  transform: rotate(180deg);
}

.items {
  padding: 0 20px 22px;
}

.item {
  display: -webkit-flex;
  display: flex;
  -webkit-align-items: center;
  align-items: center;
  margin-top: 10px;
  color: var(--ink-item);
}

.item:first-child {
  margin-top: 0;
}

.item picture {
  -webkit-flex: none;
  flex: none;
  margin-right: 14px;
}

.item img {
  width: 33px;
  height: 33px;
  border-radius: 6.6px;
}

.name {
  -webkit-flex: 1 1 auto;
  flex: 1 1 auto;
  min-width: 0;
  padding-right: 12px;
  font-size: 14px;
  line-height: 1.2;
  text-transform: capitalize;
  overflow-wrap: break-word;
  word-wrap: break-word;
}

.name small {
  display: block;
  font-size: 10px;
  text-transform: none;
}

.price {
  -webkit-flex: none;
  flex: none;
  margin-left: auto;
  font-size: 16px;
  line-height: 1.2;
  text-align: right;
  white-space: nowrap;
}

/* Footer */

footer {
  display: -webkit-flex;
  display: flex;
  -webkit-justify-content: space-between;
  justify-content: space-between;
  -webkit-align-items: center;
  align-items: center;
  min-height: 35px;
  padding: 0 16px env(safe-area-inset-bottom);
  background: var(--brand);
  color: #fff;
  font-size: 12px;
  line-height: 1.1;
}

footer a,
footer span {
  display: -webkit-flex;
  display: flex;
  -webkit-align-items: center;
  align-items: center;
}

footer img {
  width: 18px;
  height: auto;
  margin-right: 10px;
}

@media (prefers-reduced-motion: no-preference) {
  .card summary::after {
    transition: -webkit-transform 0.15s;
    transition: transform 0.15s;
  }
}

.item .ph {
  -webkit-flex: none;
  flex: none;
  width: 33px;
  height: 33px;
  margin-right: 14px;
}
