/* ==========================================================================
   KOMBITA LANCHES — cardápio digital
   Paleta e tipografia inspiradas no cardápio físico (kombi, praia, verão).
   ========================================================================== */

@import url("https://fonts.googleapis.com/css2?family=Baloo+2:wght@500;600;700;800&family=Inter:wght@400;500;600;700&display=swap");

:root {
  /* cores */
  --wine: #6a1620;
  --wine-deep: #4a0f17;
  --red: #c62a2e;
  --orange: #f2812c;
  --orange-soft: #ffb35c;
  --cream: #fbe6b0;
  --sand: #fff6e4;
  --white: #fffdf9;
  --ink: #2a1a15;
  --ink-soft: #6b4c42;
  --line: #eee0c6;
  --success: #2f8f4e;

  /* tipografia */
  --font-display: "Baloo 2", system-ui, sans-serif;
  --font-body: "Inter", system-ui, sans-serif;

  /* forma */
  --radius-lg: 22px;
  --radius-md: 14px;
  --radius-sm: 9px;
  --shadow-card: 0 6px 18px rgba(74, 15, 23, 0.1);
  --shadow-sheet: 0 -10px 30px rgba(42, 15, 10, 0.25);

}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  background: #e7d9be;
  color: var(--ink);
  font-family: var(--font-body);
  -webkit-tap-highlight-color: transparent;
  overflow-x: hidden;
  overscroll-behavior: none;
  touch-action: manipulation;
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
}

button {
  font-family: inherit;
  cursor: pointer;
}

input,
textarea,
select {
  font-family: inherit;
  font-size: 16px;
}

img {
  max-width: 100%;
  display: block;
}

/* ---------- shell (phone-frame on wide screens) ---------- */

.app-shell {
  width: 100%;
  max-width: none;
  margin: 0 auto;
  min-height: 100vh;
  background: var(--sand);
  position: relative;
  display: flex;
  flex-direction: column;
  box-shadow: 0 0 60px rgba(0, 0, 0, 0.15);
  padding-bottom: 92px; /* espaço pra barra do carrinho */
  overflow-x: hidden;
}

@media (min-width: 540px) {
  html,
  body {
    background: var(--sand);
  }
  .app-shell {
    margin: 0;
    min-height: 100vh;
    border-radius: 0;
  }
}

/* ---------- topbar ---------- */

.topbar {
  position: relative;
  background:
    linear-gradient(135deg, rgba(110, 24, 34, 0.58), rgba(74, 15, 23, 0.42) 42%, rgba(198, 42, 46, 0.48)),
    url("../imagens/banner.jpg") center/cover no-repeat;
  padding: 20px 16px 26px;
  color: var(--white);
  overflow: hidden;
}

.topbar__sun {
  position: absolute;
  top: -30px;
  right: -18px;
  width: 150px;
  height: 150px;
  opacity: 0.9;
}

.topbar__content {
  position: relative;
  z-index: 1;
}

.topbar__brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 8px 12px 8px 8px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 10px 22px rgba(20, 7, 10, 0.14);
  backdrop-filter: blur(2px);
}

.topbar__badge {
  width: 84px;
  height: 84px;
  padding: 0;
  border-radius: 0;
  background: transparent;
  border: none;
  object-fit: contain;
  display: block;
  flex-shrink: 0;
  box-shadow: none;
}

.topbar__name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.5rem, 3.8vw, 2rem);
  line-height: 1.05;
  margin: 0;
  letter-spacing: 0.2px;
  color: #fffdf8;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.16);
}

.topbar__tagline {
  margin: 2px 0 0;
  font-size: 12.5px;
  color: #ffe9b5;
  opacity: 1;
  letter-spacing: 0.2px;
}

.topbar__meta {
  margin-top: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--sand);
  background: rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  padding: 7px 12px;
  width: fit-content;
}

.topbar__meta strong {
  color: var(--cream);
}

/* ---------- category tabs ---------- */

.category-tabs {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  gap: 8px;
  padding: 12px 16px;
  background: var(--sand);
  overflow-x: auto;
  scrollbar-width: none;
  border-bottom: 1px solid var(--line);
}

.category-tabs::-webkit-scrollbar {
  display: none;
}

.tab {
  flex: 0 0 auto;
  border: 1.5px solid var(--line);
  background: var(--white);
  color: var(--ink-soft);
  font-weight: 600;
  font-size: 14px;
  padding: 9px 16px;
  border-radius: 999px;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease, transform 0.1s ease;
  white-space: nowrap;
}

.tab:active {
  transform: scale(0.97);
}

.tab.is-active {
  background: var(--red);
  border-color: var(--red);
  color: var(--white);
}

/* ---------- product list ---------- */

.product-list {
  padding: 14px 16px 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.category-heading {
  font-family: var(--font-display);
  font-size: 19px;
  color: var(--wine);
  margin: 6px 2px 0;
}

.product-card {
  display: flex;
  gap: 12px;
  background: var(--white);
  border-radius: var(--radius-md);
  padding: 12px;
  box-shadow: var(--shadow-card);
  border: 1px solid rgba(74, 15, 23, 0.05);
  text-align: left;
  width: 100%;
}

.product-card__thumb {
  width: 76px;
  height: 76px;
  border-radius: var(--radius-sm);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(160deg, var(--orange-soft), var(--red));
  color: var(--white);
}

.product-card__thumb svg {
  width: 38px;
  height: 38px;
}

.product-card__body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.product-card__top {
  display: flex;
  justify-content: space-between;
  gap: 8px;
}

.product-card__name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 15.5px;
  color: var(--ink);
  margin: 0;
}

.product-card__price {
  font-weight: 700;
  color: var(--wine);
  white-space: nowrap;
  font-size: 14.5px;
}

.product-card__price--muted {
  color: var(--ink-soft);
  font-size: 12.5px;
  font-weight: 600;
}

.product-card__desc {
  font-size: 12.5px;
  color: var(--ink-soft);
  margin: 3px 0 8px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.35;
}

.product-card__badge {
  display: inline-block;
  align-self: flex-start;
  background: var(--cream);
  color: var(--wine-deep);
  font-size: 10.5px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  margin-bottom: 6px;
}

.product-card__footer {
  margin-top: auto;
  display: flex;
  justify-content: flex-end;
}

.btn {
  border: none;
  border-radius: 999px;
  font-weight: 700;
  padding: 9px 18px;
  font-size: 13.5px;
  transition: transform 0.1s ease, filter 0.15s ease;
}

.btn:active {
  transform: scale(0.96);
}

.btn--primary {
  background: linear-gradient(120deg, var(--red), var(--orange));
  color: var(--white);
}

.btn--ghost {
  background: transparent;
  border: 1.5px solid var(--wine);
  color: var(--wine);
}

.btn--ask {
  background: var(--cream);
  color: var(--wine-deep);
}

.btn--block {
  width: 100%;
  padding: 15px;
  font-size: 15.5px;
  border-radius: var(--radius-md);
}

.btn:disabled {
  opacity: 0.45;
  filter: grayscale(0.3);
  transform: none;
}

/* ---------- cart bar ---------- */

.cart-bar {
  position: fixed;
  left: 50%;
  bottom: 16px;
  transform: translateX(-50%);
  width: calc(100% - 32px);
  max-width: none;
  z-index: 30;
  animation: cartIn 0.22s ease;
}

@keyframes cartIn {
  from {
    opacity: 0;
    transform: translate(-50%, 12px);
  }
  to {
    opacity: 1;
    transform: translate(-50%, 0);
  }
}

.cart-bar__btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(120deg, var(--wine), var(--wine-deep));
  color: var(--white);
  border: none;
  border-radius: 999px;
  padding: 14px 20px;
  box-shadow: 0 10px 24px rgba(42, 15, 10, 0.35);
  font-weight: 600;
}

.cart-bar__left {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
}

.cart-bar__count {
  background: var(--orange);
  color: var(--white);
  font-weight: 800;
  font-size: 12px;
  min-width: 20px;
  height: 20px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 5px;
}

.cart-bar__right {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  font-size: 15px;
}

/* ---------- overlays / sheets ---------- */

.sheet-overlay,
.fullscreen-overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: rgba(30, 12, 10, 0.5);
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.fullscreen-overlay {
  align-items: stretch;
  background: var(--sand);
}

.sheet {
  width: 100%;
  max-width: none;
  max-height: 88vh;
  background: var(--white);
  border-radius: 24px 24px 0 0;
  overflow-y: auto;
  animation: sheetUp 0.24s cubic-bezier(0.2, 0.8, 0.3, 1);
  padding-bottom: 24px;
}

.sheet--tall {
  max-height: 92vh;
}

@keyframes sheetUp {
  from {
    transform: translateY(100%);
  }
  to {
    transform: translateY(0);
  }
}

.sheet__handle {
  width: 40px;
  height: 4px;
  background: var(--line);
  border-radius: 999px;
  margin: 10px auto 4px;
}

.sheet__close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: rgba(42, 15, 10, 0.06);
  color: var(--ink);
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ---------- product sheet ---------- */

.sheet__media {
  height: 150px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(160deg, var(--orange-soft), var(--red));
  color: var(--white);
  position: relative;
}

.sheet__media svg {
  width: 66px;
  height: 66px;
}

.sheet__body {
  padding: 18px 20px 8px;
}

.sheet__title {
  font-family: var(--font-display);
  font-size: 21px;
  color: var(--wine);
  margin: 0 0 4px;
}

.sheet__price {
  font-weight: 700;
  color: var(--red);
  font-size: 16px;
  margin-bottom: 10px;
}

.sheet__desc {
  font-size: 13.5px;
  color: var(--ink-soft);
  line-height: 1.5;
  margin-bottom: 18px;
}

.field-group {
  margin-bottom: 18px;
}

.field-group__label {
  font-family: var(--font-display);
  font-size: 14.5px;
  color: var(--ink);
  margin-bottom: 8px;
  display: block;
}

.variant-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 11px 13px;
  margin-bottom: 8px;
  font-size: 13.5px;
  font-weight: 500;
}

.variant-option.is-selected {
  border-color: var(--red);
  background: rgba(198, 42, 46, 0.05);
}

.variant-option input {
  accent-color: var(--red);
  width: 18px;
  height: 18px;
}

.adicional-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  gap: 10px;
}

.adicional-row:last-child {
  border-bottom: none;
}

.adicional-row__name {
  font-size: 13.5px;
  font-weight: 500;
}

.adicional-row__price {
  font-size: 12px;
  color: var(--ink-soft);
  display: block;
}

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

.stepper__btn {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1.5px solid var(--line);
  background: var(--white);
  font-size: 16px;
  font-weight: 700;
  color: var(--wine);
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.stepper__btn:active {
  background: var(--sand);
}

.stepper__value {
  min-width: 18px;
  text-align: center;
  font-weight: 700;
}

textarea.note-input {
  width: 100%;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  min-height: 64px;
  resize: vertical;
  font-size: 13.5px;
}

.sheet__footer {
  position: sticky;
  bottom: 0;
  background: var(--white);
  padding: 14px 20px 4px;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 12px;
}

.sheet__footer .stepper {
  flex-shrink: 0;
}

/* ---------- cart sheet ---------- */

.cart-empty {
  padding: 40px 24px 20px;
  text-align: center;
  color: var(--ink-soft);
}

.cart-empty svg {
  width: 56px;
  height: 56px;
  color: var(--orange);
  margin-bottom: 10px;
}

.cart-line {
  display: flex;
  gap: 12px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--line);
}

.cart-line__thumb {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: linear-gradient(160deg, var(--orange-soft), var(--red));
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
}

.cart-line__thumb svg {
  width: 22px;
  height: 22px;
}

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

.cart-line__name {
  font-weight: 600;
  font-size: 14px;
  margin: 0 0 2px;
}

.cart-line__meta {
  font-size: 12px;
  color: var(--ink-soft);
  line-height: 1.4;
}

.cart-line__row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 8px;
}

.cart-line__price {
  font-weight: 700;
  color: var(--wine);
  font-size: 13.5px;
}

.cart-line__actions {
  display: flex;
  gap: 12px;
  margin-top: 6px;
}

.link-btn {
  background: none;
  border: none;
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-soft);
  text-decoration: underline;
  padding: 0;
}

.summary-block {
  padding: 14px 20px 4px;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  font-size: 13.5px;
  color: var(--ink-soft);
  margin-bottom: 6px;
}

.summary-row--total {
  font-family: var(--font-display);
  font-size: 18px;
  color: var(--wine);
  font-weight: 700;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed var(--line);
}

/* ---------- checkout screens ---------- */

.checkout-screen {
  width: 100%;
  max-width: none;
  margin: 0 auto;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--sand);
}

.checkout-header {
  padding: 18px 16px 14px;
  background: transparent;
  border-bottom: 1px solid rgba(119, 72, 59, 0.18);
  display: flex;
  align-items: center;
  gap: 12px;
}

.checkout-header__back {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1.5px solid rgba(119, 72, 59, 0.38);
  background: rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.checkout-header__title {
  font-family: var(--font-display);
  font-size: 17px;
  color: var(--wine);
  margin: 0;
}

.checkout-steps {
  display: flex;
  gap: 6px;
  margin-top: 10px;
}

.checkout-step-dot {
  height: 5px;
  flex: 1;
  border-radius: 999px;
  background: rgba(119, 72, 59, 0.2);
}

.checkout-step-dot.is-done,
.checkout-step-dot.is-current {
  background: var(--red);
}

.checkout-body {
  flex: 1;
  width: 100%;
  padding: 18px 20px 100px;
  overflow-y: auto;
}

@media (max-width: 390px) {
  .checkout-body {
    padding: 16px 14px 100px;
  }

  .checkout-footer {
    padding: 12px 14px 18px;
  }

  .text-field-row {
    flex-direction: column;
    gap: 0;
  }

  .text-field-row .text-field {
    flex: 1 1 auto;
  }
}

.radio-card {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1.5px solid rgba(119, 72, 59, 0.45);
  border-radius: 18px;
  padding: 14px 16px;
  margin-bottom: 12px;
  font-weight: 600;
  font-size: 16px;
  line-height: 1.2;
  box-sizing: border-box;
  flex: 1 1 100%;
  min-width: 0;
  background: rgba(255, 255, 255, 0.08);
}

.mode-selector {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 18px;
}

.radio-card label {
  flex: 1 1 auto;
  width: 100%;
  min-width: 0;
  display: flex;
  align-items: center;
  word-break: break-word;
  white-space: normal;
  color: var(--wine-deep);
}

.radio-card.is-selected {
  border-color: var(--red);
  background: rgba(198, 42, 46, 0.08);
}

.radio-card input {
  appearance: none;
  -webkit-appearance: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid rgba(119, 72, 59, 0.75);
  background: #f5efe7;
  flex: 0 0 auto;
  margin: 0;
  position: relative;
}

.radio-card.is-selected input {
  border-color: var(--red);
  background: var(--red);
  box-shadow: inset 0 0 0 5px #f5efe7;
}

.text-field {
  margin-bottom: 14px;
}

.text-field label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--wine-deep);
  margin-bottom: 8px;
}

.text-field input,
.text-field select,
.text-field textarea {
  width: 100%;
  border: 1.5px solid rgba(119, 72, 59, 0.35);
  border-radius: 12px;
  padding: 14px 12px;
  background: rgba(255, 255, 255, 0.14);
  color: var(--wine-deep);
  font-size: 16px;
}

.text-field input::placeholder,
.text-field textarea::placeholder {
  color: rgba(74, 15, 23, 0.42);
}

.text-field-row {
  display: flex;
  gap: 10px;
}

.text-field-row .text-field {
  flex: 1;
}

.checkout-footer {
  position: sticky;
  bottom: 0;
  padding: 14px 20px 18px;
  background: var(--white);
  border-top: 1px solid var(--line);
}

.review-card {
  background: var(--white);
  border-radius: var(--radius-md);
  padding: 16px;
  box-shadow: var(--shadow-card);
  margin-bottom: 14px;
}

.review-card h3 {
  font-family: var(--font-display);
  font-size: 14px;
  color: var(--wine);
  margin: 0 0 8px;
}

.review-card p {
  font-size: 13.5px;
  margin: 0 0 3px;
  color: var(--ink);
}

.review-item {
  font-size: 13.5px;
  margin-bottom: 10px;
}

.review-item strong {
  display: block;
}

.review-item span.meta {
  color: var(--ink-soft);
  font-size: 12px;
  display: block;
  margin-left: 4px;
}

.hint {
  font-size: 12px;
  color: var(--ink-soft);
  background: var(--cream);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  margin-top: 4px;
}

.error-text {
  color: var(--red);
  font-size: 12px;
  margin-top: -8px;
  margin-bottom: 12px;
  display: none;
}

.error-text.is-visible {
  display: block;
}

/* ---------- toast ---------- */

.toast {
  position: fixed;
  left: 50%;
  bottom: 100px;
  transform: translateX(-50%);
  background: var(--ink);
  color: var(--white);
  padding: 10px 18px;
  border-radius: 999px;
  font-size: 13px;
  z-index: 80;
  animation: toastIn 0.2s ease;
}

@keyframes toastIn {
  from {
    opacity: 0;
    transform: translate(-50%, 8px);
  }
  to {
    opacity: 1;
    transform: translate(-50%, 0);
  }
}

[hidden] {
  display: none !important;
}
