@font-face {
  font-family: "CQLogo";
  src: url("../assets/fonts/Handlee-Regular.ttf") format("truetype");
  font-display: swap;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #151515;
  background: #fafafa;
}

button,
input,
textarea {
  font: inherit;
}

.cq-header {
  position: sticky;
  top: 0;
  z-index: 20;
  min-height: 72px;
  padding: 0 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid #e9e9e9;
}

.cq-logo {
  font-family: "CQLogo", sans-serif;
  color: #111;
  text-decoration: none;
  font-size: 34px;
  line-height: 1;
}

.cq-logo span {
  color: #de0f0f;
}

.cq-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
}

.cq-nav a {
  color: #111;
  text-decoration: none;
  font-weight: 800;
  font-size: 15px;
}

.cq-nav a.active,
.cq-nav a:hover {
  color: #de0f0f;
}

.order-shell {
  width: min(1420px, 100%);
  margin: 0 auto;
  padding: 38px 24px 72px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 390px;
  gap: 28px;
  align-items: start;
}

.order-heading {
  padding: 42px 0 28px;
}

.section-kicker {
  margin: 0 0 10px;
  color: #de0f0f;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.order-heading h1,
.result-card h1 {
  margin: 0 0 18px;
  max-width: 850px;
  font-size: clamp(44px, 7vw, 92px);
  line-height: .95;
}

.order-heading p:not(.section-kicker),
.result-card p {
  max-width: 720px;
  color: #545454;
  font-size: 20px;
  line-height: 1.5;
}

.status-banner {
  min-height: 48px;
  padding: 14px 18px;
  background: #111;
  color: white;
  font-weight: 800;
}

.status-banner.is-error {
  background: #7c1111;
}

.category-tabs {
  position: sticky;
  top: 72px;
  z-index: 10;
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 14px 0;
  background: #fafafa;
}

.category-tabs button {
  min-height: 40px;
  padding: 9px 14px;
  border: 1px solid #ddd;
  background: white;
  color: #111;
  font-weight: 850;
  cursor: pointer;
}

.category-tabs button.is-active,
.category-tabs button:hover {
  border-color: #111;
  background: #111;
  color: white;
}

.menu-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.order-item {
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr);
  min-height: 150px;
  background: white;
  border: 1px solid #e8e8e8;
}

.order-item img,
.image-fallback {
  width: 132px;
  height: 100%;
  min-height: 150px;
  object-fit: cover;
  background: #111;
}

.image-fallback {
  display: grid;
  place-items: center;
  color: white;
  font-weight: 900;
}

.item-content {
  min-width: 0;
  padding: 18px;
  display: grid;
  gap: 12px;
}

.item-content h3 {
  margin: 0;
  font-size: 22px;
  line-height: 1.1;
}

.item-content p {
  margin: 0;
  color: #595959;
  font-size: 15px;
  line-height: 1.45;
}

.item-footer {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 14px;
}

.price {
  font-weight: 900;
  font-size: 18px;
}

.add-button,
.checkout-button,
.text-button,
.quantity-button {
  border: 0;
  cursor: pointer;
}

.add-button,
.checkout-button {
  min-height: 44px;
  padding: 12px 18px;
  background: #de0f0f;
  color: white;
  font-weight: 900;
  text-decoration: none;
}

.checkout-button {
  width: 100%;
  display: inline-grid;
  place-items: center;
}

.checkout-button:disabled {
  cursor: not-allowed;
  background: #bcbcbc;
}

.cart-panel {
  position: sticky;
  top: 96px;
  padding: 22px;
  background: white;
  border: 1px solid #e4e4e4;
  box-shadow: 0 18px 50px rgba(0, 0, 0, .08);
}

.cart-header {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: start;
  margin-bottom: 16px;
}

.cart-header h2 {
  margin: 0;
  font-size: 36px;
  line-height: 1;
}

.text-button {
  background: transparent;
  color: #de0f0f;
  font-weight: 900;
}

.cart-items {
  display: grid;
  gap: 12px;
  padding-bottom: 16px;
  border-bottom: 1px solid #eee;
}

.empty-cart {
  margin: 0;
  color: #666;
}

.cart-line {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
}

.cart-line h3 {
  margin: 0 0 4px;
  font-size: 16px;
}

.cart-line p {
  margin: 0;
  color: #666;
  font-size: 14px;
}

.quantity-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.quantity-button {
  width: 30px;
  height: 30px;
  background: #f1f1f1;
  color: #111;
  font-weight: 900;
}

.cart-totals {
  display: grid;
  gap: 8px;
  padding: 16px 0;
  border-bottom: 1px solid #eee;
}

.cart-totals div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
}

.grand-total {
  font-size: 20px;
}

.tip-box {
  margin: 18px 0;
  padding: 16px;
  border: 1px solid #e4e4e4;
}

.tip-box legend {
  padding: 0 6px;
  font-weight: 900;
}

.tip-box p {
  margin: 0 0 12px;
  color: #565656;
  font-size: 14px;
  line-height: 1.45;
}

.tip-options {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.tip-options label {
  min-height: 42px;
  padding: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  background: #f5f5f5;
  font-weight: 850;
}

.checkout-form {
  display: grid;
  gap: 12px;
}

.checkout-form label {
  display: grid;
  gap: 6px;
  font-weight: 850;
}

.checkout-form input,
.checkout-form textarea {
  width: 100%;
  padding: 12px;
  border: 1px solid #d6d6d6;
  background: white;
}

.checkout-form input:focus,
.checkout-form textarea:focus {
  outline: 3px solid rgba(222, 15, 15, .18);
  border-color: #de0f0f;
}

.checkout-note,
.form-status {
  margin: 0;
  color: #5f5f5f;
  font-size: 14px;
  line-height: 1.45;
}

.form-status.is-error {
  color: #9b1111;
  font-weight: 850;
}

.result-page {
  min-height: 100vh;
  padding: 40px 24px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 28px;
}

.result-card {
  width: min(760px, 100%);
  padding: 42px;
  background: white;
  border: 1px solid #e6e6e6;
  box-shadow: 0 18px 50px rgba(0, 0, 0, .08);
}

@media (max-width: 1100px) {
  .order-shell {
    grid-template-columns: 1fr;
  }

  .cart-panel {
    position: static;
  }
}

@media (max-width: 760px) {
  .cq-header {
    padding: 18px 22px;
    align-items: flex-start;
    flex-direction: column;
  }

  .order-shell {
    padding: 16px 16px 48px;
  }

  .menu-list {
    grid-template-columns: 1fr;
  }

  .order-item {
    grid-template-columns: 106px minmax(0, 1fr);
  }

  .order-item img,
  .image-fallback {
    width: 106px;
  }

  .item-footer {
    align-items: start;
    flex-direction: column;
  }
}
