.wrapper {
  overflow: hidden;
  min-height: 100%;
}

body.lock {
  overflow: hidden;
  touch-action: none;
}

.header__menu-btn_active {
  border-bottom: 2px solid #403f3d;
}

/* coffee-menu */
.coffee-menu__tab-img_jam {
  width: 30px;
}
.coffee-menu__tab-img_hazelnut {
  width: 30px;
}
.coffee-menu__tab-img_canned {
  width: 30px;
}

.coffee-menu__title {
  text-align: center;
  margin: 0 auto;
  line-height: 70px;
}

.coffee-menu__tab-list {
  display: flex;
  justify-content: center;
  margin: 40px 0;
  flex-wrap: wrap;
  gap: 10px;
}

.coffee-menu__tab-item a {
  display: flex;
  padding: 8px 16px 8px 8px;
  align-items: center;
  gap: 8px;
  border-radius: 100px;
  font-size: 16px;
  font-weight: 600;
  color: #403f3d;
  background: none;
  border: 1px solid #c1b6ad;
}

.coffee-menu__tab-item:not(:last-of-type) {
  margin-right: 0;
}

.coffee-menu__tab-img {
  background: #c1b6ad;
  border-radius: 100px;
  padding: 7px;
}

.coffee-menu__tab-item a:hover {
  background: #665f55;
  color: #e1d4c9;
  transition: all ease 0.5s;
}

.coffee-menu__list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 310px));
  gap: 24px;
  justify-content: center;
}

.coffee-menu__item {
  display: inline-block;
  border-radius: 40px;
  border: 1px solid #c1b6ad;
  height: 506px;
  cursor: pointer;
  position: relative;
}

.coffee-menu__item:hover {
  transform: scale(1.1);
  transition: ease 0.6s;
}
.coffee-menu__img {
  border-radius: 40px;
  max-width: 310px;
  width: 100%;
  height: 300px;
  object-fit: contain;
  display: block;
  margin: auto;
  padding: 16px 16px 0;
}

.coffee-menu__title-card {
  font-size: 24px;
  margin-bottom: 12px;
}

.coffee-menu__text {
  line-height: 150%;
  width: 270px;
}

.coffee-menu__price {
  position: absolute;
  bottom: 20px;
  font-size: 24px;
  font-weight: 600;
}

.coffee-menu__info {
  padding: 20px;
}

.coffee-menu__content-wrapper {
  display: none;
}

.faded {
  opacity: 0;
  transition: all 0.15s;
}

.faded.in {
  opacity: 1;
  transition: all 0.15s;
}

.active {
  display: block;
}

.coffee-menu__tab-link.active {
  background: #665f55;
  color: #e1d4c9;
}

.more-menu-btn {
  border: 1px solid #665f55;
  border-radius: 100%;
  width: 60px;
  display: block;
  height: 60px;
  margin: 0 auto;
  position: relative;
  background-color: #e1d4c9;
}

.more-menu-btn img {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.more-menu-btn {
  display: none;
}

/* footer */

/* modal */

.modal {
  position: fixed;
  inset: 0;
  background: rgba(40, 38, 36, 0.7);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  opacity: 0;
  visibility: hidden;
  overflow-y: auto;
  overflow-x: hidden;
  transition:
    opacity 0.35s ease,
    visibility 0.35s ease;
  z-index: 400;
}

.modal.open {
  opacity: 1;
  visibility: visible;
}

.modal__body {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 100vh;
  padding: 32px 20px;
  box-sizing: border-box;
}

.modal__content-wrapper {
  display: flex;
  background: #f5ede6;
  border-radius: 32px;
  max-width: 780px;
  width: 100%;
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(40, 38, 36, 0.25);
  transform: translateY(20px);
  opacity: 0;
  transition:
    transform 0.4s ease,
    opacity 0.4s ease;
}

.modal.open .modal__content-wrapper {
  transform: translateY(0);
  opacity: 1;
}

/* Image side */
.modal__img {
  width: 260px;
  min-width: 260px;
  align-self: stretch;
  object-fit: contain;
  padding: 24px;
  background: rgba(176, 144, 122, 0.1);
  border-radius: 0;
  margin: 0;
  display: block;
  box-sizing: border-box;
}

/* Content side */
.modal__content {
  padding: 32px 32px 28px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.modal__title {
  font-size: 26px;
  font-weight: 700;
  color: #2d2b29;
  margin: 0 0 8px;
  line-height: 1.2;
}

.modal__text {
  font-size: 14px;
  color: #7a6f68;
  line-height: 1.6;
  margin-bottom: 24px;
}

/* Section labels —ховаємо Size і Additives */
.modal__content > span,
.modal__size-list,
.modal__additives-list {
  display: none !important;
}

.modal__list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 20px;
}

.modal__item:not(:last-of-type) {
  margin-right: 0;
}

.modal__item a {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 7px 14px 7px 7px;
  border-radius: 100px;
  font-size: 13px;
  font-weight: 600;
  color: #403f3d;
  background: #ede3da;
  border: 1.5px solid #d4c5ba;
  transition: all 0.2s ease;
  cursor: pointer;
}

.modal__item a:hover {
  border-color: #b0907a;
  background: #e8ddd5;
}

.modal__link span {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #c1b6ad;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  transition: background 0.2s;
  flex-shrink: 0;
}

.modal__size-link.active,
.modal__additives-link.active {
  background: #665f55 !important;
  color: #e1d4c9 !important;
  border-color: #665f55 !important;
}

.modal__size-link.active span,
.modal__additives-link.active span {
  background: rgba(225, 212, 201, 0.25) !important;
  color: #e1d4c9 !important;
}

/* Flavor picker */
.modal__flavor-label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #9e8e84;
  margin: 0 0 10px;
  display: block;
}

.modal__flavor-list {
  display: flex !important;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 20px;
  padding: 0;
  list-style: none;
}

.modal__flavor-item {
  margin: 0;
}

.modal__flavor-link {
  display: inline-flex;
  align-items: center;
  padding: 8px 16px;
  border-radius: 100px;
  font-size: 13px;
  font-weight: 600;
  color: #403f3d;
  background: #ede3da;
  border: 1.5px solid #d4c5ba;
  transition: all 0.2s ease;
  cursor: pointer;
  text-decoration: none;
}

.modal__flavor-link:hover {
  border-color: #b0907a;
  background: #e8ddd5;
}

.modal__flavor-link.active {
  background: #665f55;
  color: #e1d4c9;
  border-color: #665f55;
}

.modal__flavor-msg {
  display: none;
  font-size: 13px;
  color: #b0907a;
  font-weight: 600;
  margin-bottom: 10px;
}

/* Total */
.modal__total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: auto;
  padding: 20px 0 0;
  border-top: 1px solid #d4c5ba;
}

.modal__total span:first-child {
  font-size: 13px;
  font-weight: 700;
  color: #9e8e84;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  visibility: hidden; /* ховаємо "Total:" */
}

.modal__total span:first-child::before {
  content: "Ціна";
  visibility: visible;
}

.modal__prise,
.modal__price {
  font-size: 28px;
  font-weight: 700;
  color: #403f3d;
}

/* Buttons */
.add-to-cart-btn {
  width: 100%;
  padding: 13px;
  background: #b0907a;
  color: #fff;
  border: none;
  border-radius: 100px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.25s;
  font-family: "Inter", sans-serif;
  margin-top: 14px;
  letter-spacing: 0.02em;
}

.add-to-cart-btn:hover {
  background: #665f55;
}

.modal__close {
  display: block;
  text-align: center;
  padding: 11px 0;
  margin-top: 8px;
  border-radius: 100px;
  border: 1.5px solid #d4c5ba;
  font-weight: 600;
  font-size: 14px;
  color: #7a6f68;
  transition: all 0.25s ease;
}

.modal__close:hover {
  border-color: #665f55;
  color: #403f3d;
  background: #ede3da;
}

.coffe-menu__link {
  color: #403f3d;
}

/* Mobile modal */
@media (max-width: 600px) {
  .modal__content-wrapper {
    flex-direction: column;
    border-radius: 28px;
  }

  .modal__img {
    width: 100%;
    min-width: unset;
    height: 220px;
    min-height: unset;
    object-fit: contain;
    padding: 20px;
  }

  .modal__content {
    padding: 24px 20px 20px;
  }

  .modal__title {
    font-size: 22px;
  }

  .modal__prise,
  .modal__price {
    font-size: 24px;
  }
}

/* RESPONSIVE */

@media (max-width: 1155px) {
  .coffee-menu__list {
    grid-template-columns: repeat(2, minmax(0, 310px));
  }
  .more-menu {
    display: none;
  }
  .more-menu-btn {
    display: block;
  }
}

@media (max-width: 767px) {
  .coffee-menu__title {
    font-size: 36px;
    line-height: 130%;
  }

  /* Horizontal scroll for tabs */
  .coffee-menu__tab-nav {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 0 -16px;
    padding: 0 16px;
  }

  .coffee-menu__tab-nav::-webkit-scrollbar {
    display: none;
  }

  .coffee-menu__tab-list {
    flex-wrap: nowrap;
    justify-content: flex-start;
    gap: 8px;
    margin: 24px 0;
    width: max-content;
  }

  .coffee-menu__tab-item:not(:last-of-type) {
    margin-right: 0;
  }

  .coffee-menu__tab-item a {
    font-size: 14px;
    padding: 8px 16px 8px 8px;
    gap: 6px;
    white-space: nowrap;
  }

  .coffee-menu__list {
    grid-template-columns: repeat(2, minmax(0, 300px));
    gap: 16px;
  }

  .coffee-menu__item {
    max-width: 100%;
    height: auto;
    min-height: 420px;
  }

  .coffee-menu__img {
    max-width: 100%;
    width: 100%;
    height: 240px;
    object-fit: contain;
  }

  .modal__img {
    display: none;
  }

  .modal__content-wrapper {
    max-width: 100%;
  }
}

@media (max-width: 575px) {
  .coffee-menu__title {
    font-size: 28px;
  }

  .coffee-menu__list {
    grid-template-columns: minmax(0, 340px);
  }

  .coffee-menu__item {
    max-width: 100%;
    border-radius: 24px;
  }

  .coffee-menu__img {
    border-radius: 24px;
    height: 200px;
  }

  .modal__content-wrapper {
    border-radius: 24px;
    padding: 16px;
  }

  .modal__list {
    flex-wrap: wrap;
    gap: 8px;
  }

  .modal__item:not(:last-of-type) {
    margin-right: 0;
    margin-bottom: 0;
  }
}
