:root {
  --bg: #0b0b0b;
  --surface: #171717;
  --surface-2: #1f1f1f;
  --border: #2a2a2a;
  --accent: #cda45e;
  --accent-dim: #8a713f;
  --text: #f2f2f0;
  --text-dim: #9a9a9a;
  --danger: #d66;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  background: var(--bg) url("../img/bg.png") no-repeat center top / cover fixed;
  color: var(--text);
  font-family: -apple-system, "Segoe UI", Roboto, sans-serif;
}

/* ---------- Header ---------- */

.header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}

.header__top {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 24px;
  padding: 12px 24px;
}

@media (max-width: 700px) {
  .header__top {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
  }
}

.header__logo {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  line-height: 0;
  justify-self: center;
}

.header__logo img {
  height: 84px;
  width: auto;
  display: block;
}

.header__info {
  display: flex;
  justify-content: flex-end;
  gap: 22px;
  flex-wrap: wrap;
  font-size: 17px;
  font-weight: 500;
  color: var(--text-dim);
}

@media (max-width: 700px) {
  .header__info {
    justify-content: center;
  }
}

.header__phone {
  color: var(--text);
  text-decoration: none;
  font-weight: 700;
}

.header__tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 0 24px 14px;
  scrollbar-width: thin;
}

.header__tabs button {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 9px 18px;
  cursor: pointer;
  white-space: nowrap;
  font-size: 14px;
  transition: background 0.15s, color 0.15s;
}

.header__tabs button:hover {
  border-color: var(--accent-dim);
}

.header__tabs button.active {
  background: var(--accent);
  color: #1a1409;
  font-weight: 600;
  border-color: var(--accent);
}

/* ---------- Layout ---------- */

.layout {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 24px;
  padding: 24px;
  max-width: 1400px;
  margin: 0 auto;
  align-items: start;
}

@media (max-width: 900px) {
  .layout {
    grid-template-columns: 1fr;
  }
}

/* ---------- Search ---------- */

.search-bar {
  margin-bottom: 16px;
}

.search-bar input {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 16px;
  color: var(--text);
  font-size: 15px;
}

.search-bar input:focus {
  outline: none;
  border-color: var(--accent-dim);
}

.search-bar input::placeholder {
  color: var(--text-dim);
}

/* ---------- Promo banner ---------- */

.promo {
  position: relative;
  margin-bottom: 20px;
}

.promo:empty {
  display: none;
}

.promo__viewport {
  overflow: hidden;
  border-radius: 16px;
}

.promo__track {
  display: flex;
  transition: transform 0.4s ease;
}

.promo__arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: rgba(11, 11, 11, 0.7);
  color: var(--text);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
}

.promo__arrow:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.promo__arrow--prev {
  left: 10px;
}

.promo__arrow--next {
  right: 10px;
}

.promo__dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 12px;
}

.promo__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: none;
  background: var(--border);
  cursor: pointer;
  padding: 0;
}

.promo__dot--active {
  background: var(--accent);
  width: 20px;
  border-radius: 4px;
}

.promo-card {
  flex: 0 0 100%;
  width: 100%;
  box-sizing: border-box;
  border-radius: 16px;
  padding: 24px;
  background: linear-gradient(135deg, #211a10 0%, #14110a 60%), var(--surface);
  border: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}

.promo-card__badge {
  display: inline-block;
  background: var(--accent);
  color: #1a1409;
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  padding: 4px 12px;
  border-radius: 999px;
  margin-bottom: 12px;
}

.promo-card__title {
  font-size: 20px;
  font-weight: 700;
  margin: 0 0 6px;
  color: var(--text);
}

.promo-card__text {
  color: var(--accent);
  font-size: 15px;
  font-weight: 600;
  margin: 0;
}

/* ---------- Catalog ---------- */

.catalog {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
  align-content: start;
}

.catalog__loading,
.catalog__empty {
  color: var(--text-dim);
  grid-column: 1 / -1;
}

.dish-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: border-color 0.15s;
}

.dish-card:hover {
  border-color: var(--accent-dim);
  cursor: pointer;
}

.dish-card__photo {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 44px;
  background: linear-gradient(160deg, var(--surface-2), #0f0f0f);
  overflow: hidden;
}

.dish-card__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.dish-card__name {
  font-weight: 600;
  font-size: 15px;
}

.dish-card__weight {
  color: var(--text-dim);
  font-size: 13px;
}

.dish-card__description {
  color: var(--text-dim);
  font-size: 12px;
  line-height: 1.4;
  margin: 0;
}

.dish-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
}

.dish-card__price {
  font-weight: 700;
}

.dish-card__price--old {
  color: var(--text-dim);
  text-decoration: line-through;
  font-weight: 400;
  font-size: 13px;
  margin-right: 6px;
}

.dish-card__add {
  background: var(--accent);
  color: #1a1409;
  border: none;
  border-radius: 999px;
  width: 34px;
  height: 34px;
  font-size: 18px;
  font-weight: 700;
  cursor: pointer;
  flex-shrink: 0;
}

.dish-card__add:hover {
  background: #e0b877;
}

.dish-card__out-of-stock {
  color: var(--danger);
  font-size: 13px;
}

/* ---------- Cart ---------- */

.cart {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px;
  height: fit-content;
  position: sticky;
  top: 130px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.cart__title {
  margin: 0;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.cart__clear {
  background: none;
  border: none;
  color: var(--text-dim);
  cursor: pointer;
  font-size: 15px;
}

.cart__clear:hover {
  color: var(--danger);
}

.cart__items {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.cart__empty {
  color: var(--text-dim);
  font-size: 14px;
  margin: 0;
}

.cart-item {
  display: flex;
  gap: 10px;
  align-items: center;
}

.cart-item__remove {
  background: none;
  border: none;
  color: var(--text-dim);
  font-size: 14px;
  cursor: pointer;
  flex-shrink: 0;
  padding: 4px;
  line-height: 1;
}

.cart-item__remove:hover {
  color: var(--danger);
}

.cart-item__icon {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background: var(--surface-2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}

.cart-item__info {
  flex: 1;
  min-width: 0;
}

.cart-item__name {
  font-size: 13px;
  line-height: 1.3;
}

.cart-item__price {
  font-size: 13px;
  color: var(--text-dim);
}

.cart-item__qty {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.cart-item__qty button {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text);
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
}

.cart-item__qty button:hover {
  border-color: var(--accent-dim);
}

.cart__summary {
  border-top: 1px solid var(--border);
  padding-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.cart__row {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
  color: var(--text-dim);
}

.cart__row--total {
  color: var(--text);
  font-weight: 700;
  font-size: 16px;
}

.cart__checkout {
  width: 100%;
  padding: 13px;
  border: none;
  border-radius: 10px;
  background: var(--accent);
  color: #1a1409;
  font-weight: 700;
  cursor: pointer;
}

.cart__checkout:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.cart__checkout:not(:disabled):hover {
  background: #e0b877;
}

/* ---------- Dish page ---------- */

.breadcrumbs {
  font-size: 13px;
  color: var(--text-dim);
  margin-bottom: 16px;
}

.breadcrumbs span {
  margin: 0 6px;
}

.breadcrumbs a {
  color: var(--text-dim);
  text-decoration: none;
}

.breadcrumbs a:hover {
  color: var(--accent);
}

.dish-page__inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 24px;
}

.dish-page__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  margin-top: 16px;
}

@media (max-width: 800px) {
  .dish-page__grid {
    grid-template-columns: 1fr;
  }
}

.dish-page__photo {
  position: relative;
  aspect-ratio: 4 / 3;
  border-radius: 16px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 96px;
  background: linear-gradient(160deg, var(--surface-2), #0f0f0f);
}

.dish-page__photo-track {
  display: flex;
  width: 100%;
  height: 100%;
  transition: transform 0.4s ease;
}

.dish-page__photo-track img {
  flex: 0 0 100%;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.dish-page__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.dish-page__photo .promo__dots {
  position: absolute;
  bottom: 12px;
  left: 0;
  right: 0;
  margin: 0;
}

.dish-page__name {
  margin: 0 0 4px;
  font-size: 26px;
}

.dish-page__weight {
  color: var(--text-dim);
  font-size: 14px;
  margin-bottom: 18px;
}

.dish-page__buy {
  display: flex;
  gap: 14px;
  margin-bottom: 22px;
}

.dish-page__qty {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 4px 10px;
  gap: 14px;
}

.dish-page__qty button {
  width: 30px;
  height: 30px;
  font-size: 16px;
}

.dish-page__add {
  flex: 1;
  border: none;
  border-radius: 10px;
  background: var(--accent);
  color: #1a1409;
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
}

.dish-page__add:hover {
  background: #e0b877;
}

.dish-page__options-title {
  color: var(--text-dim);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  margin: 0 0 10px;
}

.dish-page__option {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  margin-bottom: 8px;
  font-size: 14px;
  cursor: pointer;
}

.dish-page__option:hover {
  border-color: var(--accent-dim);
}

.dish-page__option input {
  accent-color: var(--accent);
  width: 16px;
  height: 16px;
}

.dish-page__description {
  color: var(--text-dim);
  font-size: 14px;
  line-height: 1.5;
  margin-top: 20px;
}

/* ---------- Checkout ---------- */

.checkout__inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 24px;
}

.checkout__back {
  background: none;
  border: none;
  color: var(--text-dim);
  font-size: 14px;
  cursor: pointer;
  margin-bottom: 16px;
  padding: 0;
}

.checkout__back:hover {
  color: var(--text);
}

.checkout__title {
  margin: 0 0 20px;
  font-size: 26px;
}

.checkout__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

@media (max-width: 800px) {
  .checkout__grid {
    grid-template-columns: 1fr;
  }
}

.checkout__col {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.checkout__card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px;
}

.checkout__card h3 {
  margin: 0 0 14px;
  font-size: 15px;
  color: var(--text-dim);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.checkout-item-row {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
  padding: 6px 0;
  border-bottom: 1px solid var(--border);
}

.checkout__field {
  display: block;
  margin-bottom: 12px;
}

.checkout__field span {
  display: block;
  font-size: 12px;
  color: var(--text-dim);
  margin-bottom: 6px;
}

.checkout__field input {
  width: 100%;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 12px;
  color: var(--text);
  font-size: 14px;
}

.checkout__option {
  display: block;
  width: 100%;
  text-align: left;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  margin-bottom: 8px;
  font-size: 14px;
  color: var(--text-dim);
  background: var(--surface-2);
  cursor: pointer;
  font-family: inherit;
}

.checkout__option:hover {
  border-color: var(--accent-dim);
}

.checkout__option--active {
  border-color: var(--accent);
  color: var(--text);
  background: rgba(205, 164, 94, 0.08);
}

.checkout__hint {
  font-size: 12px;
  color: var(--text-dim);
  margin: 4px 0 10px;
  line-height: 1.4;
}

.checkout__consent {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 13px;
  color: var(--text-dim);
  cursor: pointer;
}

.checkout__consent input {
  margin-top: 2px;
  accent-color: var(--accent);
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.checkout__consent a {
  color: var(--accent);
}

.checkout__error {
  color: var(--danger);
  font-size: 13px;
  margin: 0 0 4px;
}

.checkout__submit {
  width: 100%;
  padding: 14px;
  border: none;
  border-radius: 10px;
  background: var(--accent);
  color: #1a1409;
  font-weight: 700;
  cursor: pointer;
}

.checkout__submit:hover:not(:disabled) {
  background: #e0b877;
}

.checkout__submit:disabled {
  background: var(--surface-2);
  color: var(--text-dim);
  border: 1px solid var(--border);
  cursor: not-allowed;
}

/* ---------- Order success ---------- */

.order-success {
  min-height: 60vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.order-success__inner {
  text-align: center;
  max-width: 420px;
  padding: 24px;
}

.order-success__icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--accent);
  color: #1a1409;
  font-size: 32px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
}

.order-success__note {
  color: var(--text-dim);
  margin-bottom: 24px;
}

/* ---------- Подсказки адреса ---------- */

.address-field {
  position: relative;
}

.address-field > label span {
  display: block;
  font-size: 12px;
  color: var(--text-dim);
  margin-bottom: 6px;
}

.address-suggest {
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  margin: 4px 0 0;
  padding: 4px;
  list-style: none;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  z-index: 20;
  max-height: 260px;
  overflow-y: auto;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
}

.address-suggest li {
  padding: 10px 12px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  line-height: 1.3;
}

.address-suggest li small {
  display: block;
  color: var(--text-dim);
  font-size: 12px;
  margin-top: 2px;
}

.address-suggest li:hover,
.address-suggest li.is-active {
  background: rgba(205, 164, 94, 0.12);
}
