body {
  margin: 0;
}

header {
  display: flex;
  height: 40px;
  justify-content: space-between;
  align-items: center;
  padding: 0 50px;
  box-sizing: border-box;
  font-family: monospace;
  font-weight: bold;
  font-size: large;
  position: relative;
  z-index: 1;
}

header ul {
  padding: 0;
  margin: 0;
  list-style: none;
  display: flex;
  gap: 20px;
}

.logo-link {
  display: flex;
  align-items: center;
  background-color: #eee5;
  border: 1px solid #eee9;
  border-radius: 8px;
  padding: 4px 10px;
}

.logo {
  display: block;
  height: 28px;
  width: auto;
}

.carousel {
  width: 100vw;
  height: 100vh;
  position: relative;
  overflow: hidden;
  margin-top: -40px;
}

.list {
  width: 100%;
  height: 100%;
}

.item {
  width: 100%;
  height: 100%;
  background-color: var(--bg);
  position: absolute;
  top: 0;
  left: 0;
  overflow: hidden;
}

.item img.fruit {
  width: 90%;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 15;
  pointer-events: none;
}

.item .content {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  font-size: 12rem;
  color: #eee;
  font-weight: bold;
  font-family:
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    Roboto,
    Oxygen,
    Ubuntu,
    Cantarell,
    "Open Sans",
    "Helvetica Neue",
    sans-serif;
  text-transform: uppercase;
  white-space: nowrap;
}

.item {
  display: none;
}

.item.active {
  display: block;
}

.item.hidden {
  display: block;
  pointer-events: none;
  background-color: transparent;
  z-index: 1;
}

@keyframes toActive {
  from {
    top: 100%;
    opacity: 0;
  }
}

@keyframes toOut {
  from {
    top: 50%;
    opacity: 1;
  }
}

.item.active img.fruit {
  animation: toActive 0.5s ease-in-out 1;
}

.item.hidden img.fruit {
  animation: toOut 0.8s ease-in-out 1;
  top: -100%;
  opacity: 0;
}

.item.active .content {
  animation: toActive 0.8s ease-in-out 1;
}

.item.hidden .content {
  opacity: 0;
}

:root {
  --width-mockup: calc(371px / 1.5);
  --height-mockup: calc(371px / 1.5);
}

.mockup {
  position: absolute;
  top: 50%;
  left: 50%;
  --left: 0;
  transform: translate(-50%, -50%);
  width: var(--width-mockup);
  height: var(--height-mockup);
  background:
    url(img/mockup.png) 0 0 no-repeat,
    url(img/listSoda.jpg) var(--left) 0;
  background-size: auto 100%;
  background-blend-mode: multiply;
  mask-image: url(img/mockup.png);
  -webkit-mask-image: url(img/mockup.png);
  mask-repeat: no-repeat;
  -webkit-mask-repeat: no-repeat;
  mask-size: auto 100%;
  -webkit-mask-size: auto 100%;
  transition: background 0.5s;
}

.leaves {
  position: absolute;
  width: 170px;
  height: 170px;
  background-image: url(img/leaves.png);
  background-size: 100%;
  top: calc(40% - (var(--height-mockup) / 1.7));
  left: calc(44% + (var(--width-mockup) / 5));
}

.shadow {
  width: var(--width-mockup);
  height: 100px;
  background-color: #0008;
  border-radius: 50%;
  position: absolute;
  top: calc(50% + (var(--height-mockup) / 2));
  left: 47%;
  transform: translateX(-50%);
  filter: blur(20px);
}

#prev,
#next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background-color: #eee5;
  border: 1px solid #eee9;
  color: #eee;
  font-size: x-large;
  font-weight: bold;
  font-family: monospace;
  cursor: pointer;
  z-index: 15;
}

#prev {
  left: 20px;
}

#next {
  right: 20px;
}

.right .item.hidden img.fruit {
  animation: toOut 0.8s ease-in-out 1;
  top: 100%;
  opacity: 0;
}

@keyframes toActivePrev {
  from {
    top: 0;
    opacity: 0;
  }
}

.right .item.active img.fruit,
.right .item.active .content {
  animation: toActivePrev 0.8s ease-in-out 1;
}

/* ===== Mobile responsive (desktop rules above untouched) ===== */
@media (max-width: 700px) {
  header {
    padding: 0 16px;
    font-size: 0.8rem;
  }

  header ul {
    gap: 10px;
  }

  .logo {
    height: 20px;
  }

  .item .content {
    font-size: clamp(2.2rem, 13vw, 4.5rem);
  }

  :root {
    --width-mockup: calc(371px / 2);
    --height-mockup: calc(371px / 2);
  }

  .leaves {
    width: 110px;
    height: 110px;
    top: calc(50% - (var(--height-mockup) * 1.05));
    left: calc(50% + (var(--width-mockup) * 0.35));
  }

  .shadow {
    height: 60px;
    left: 50%;
    filter: blur(14px);
  }

  #prev,
  #next {
    width: 46px;
    height: 46px;
    font-size: large;
  }

  #prev {
    left: 12px;
  }

  #next {
    right: 12px;
  }
}
