/* ============================================================
   Ukoni — cart drawer + checkout (order-widget.css)
   Brand tokens: butter #FFF8EB, espresso #2A2018, char #1E1712,
   ember #E24E1B, brass #D9A441, smoke #6F6150.
   Display: Fraunces. Body/UI: DM Sans.

   The menu itself is rendered inline in the page by order-widget.js.
   This stylesheet covers: the floating cart bar, the cart drawer
   (side sheet on desktop, bottom sheet on mobile), checkout steps,
   and the WhatsApp order option.
   ============================================================ */

/* ------------------------------------------------------------------
   Floating cart bar (appears once the cart has items)
------------------------------------------------------------------ */
.uk-cart-bar {
  position: fixed; left: 50%; bottom: 1rem; transform: translateX(-50%) translateY(150%);
  z-index: 1500;
  display: flex; align-items: center; gap: 1rem;
  background: var(--char); color: var(--butter);
  border-radius: 100px; padding: 0.625rem 0.75rem 0.625rem 1.25rem;
  box-shadow: 0 12px 32px rgba(30,23,18,0.28);
  cursor: pointer; transition: transform 0.3s ease;
  max-width: calc(100vw - 2rem);
  font-family: "DM Sans", system-ui, sans-serif;
}
.uk-cart-bar.show { transform: translateX(-50%) translateY(0); }
.uk-cart-bar__count {
  background: var(--ember); color: #fff; border-radius: 100px;
  min-width: 28px; height: 28px; display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 0.875rem; padding-inline: 0.375rem;
}
.uk-cart-bar__label { font-weight: 700; font-size: 0.9375rem; }
.uk-cart-bar__total { font-weight: 700; color: var(--brass); font-size: 0.9375rem; }
.uk-cart-bar__cta {
  background: var(--ember); color: #fff; border: none; border-radius: 100px;
  padding: 0.5rem 1.25rem; font-family: inherit; font-weight: 700; font-size: 0.9375rem; cursor: pointer;
}
.uk-cart-bar__cta:hover { background: var(--ember-deep); }

/* ------------------------------------------------------------------
   Drawer + backdrop
------------------------------------------------------------------ */
.uk-backdrop {
  position: fixed; inset: 0; z-index: 2000; background: rgba(30,23,18,0.5);
  opacity: 0; pointer-events: none; transition: opacity 0.25s ease;
}
.uk-backdrop.show { opacity: 1; pointer-events: auto; }

.uk-drawer {
  position: fixed; z-index: 2100; background: var(--butter);
  display: flex; flex-direction: column;
  font-family: "DM Sans", system-ui, sans-serif;
  color: var(--espresso);
}
/* Desktop: side sheet from the right */
@media (min-width: 640px) {
  .uk-drawer {
    top: 0; right: 0; height: 100dvh; width: min(440px, 100vw);
    transform: translateX(100%); transition: transform 0.3s ease;
    box-shadow: -12px 0 40px rgba(30,23,18,0.18);
  }
  .uk-drawer.show { transform: translateX(0); }
}
/* Mobile: bottom sheet */
@media (max-width: 639px) {
  .uk-drawer {
    left: 0; right: 0; bottom: 0; max-height: 88dvh; height: auto;
    border-radius: 16px 16px 0 0; transform: translateY(100%); transition: transform 0.3s ease;
    box-shadow: 0 -12px 40px rgba(30,23,18,0.2);
  }
  .uk-drawer.show { transform: translateY(0); }
}

.uk-drawer__head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 1rem 1.25rem; border-bottom: 1px solid var(--brass-light);
  background: var(--butter);
}
.uk-drawer__title { font-family: Fraunces, Georgia, serif; font-weight: 700; font-size: 1.25rem; color: var(--char); }
.uk-drawer__close {
  width: 40px; height: 40px; border: none; background: none; font-size: 1.5rem;
  color: var(--espresso); cursor: pointer; display: flex; align-items: center; justify-content: center; border-radius: 50%;
}
.uk-drawer__close:hover { background: var(--cream); }

.uk-drawer__body { flex: 1; overflow-y: auto; padding: 1.25rem; }
.uk-drawer__foot { padding: 1rem 1.25rem; border-top: 1px solid var(--brass-light); background: var(--butter); }

/* ------------------------------------------------------------------
   Cart items
------------------------------------------------------------------ */
.uk-cart-empty { text-align: center; color: var(--smoke); padding: 2rem 0; }
.uk-cart-empty__title { font-family: Fraunces, Georgia, serif; font-size: 1.125rem; color: var(--char); margin-bottom: 0.5rem; }

.uk-cart-item {
  display: flex; align-items: center; gap: 0.75rem; padding: 0.75rem 0;
  border-bottom: 1px solid var(--brass-light);
}
.uk-cart-item:last-child { border-bottom: none; }
.uk-cart-item__info { flex: 1; min-width: 0; }
.uk-cart-item__name { font-weight: 600; font-size: 0.9375rem; display: block; }
.uk-cart-item__price { font-size: 0.8125rem; color: var(--smoke); }
.uk-cart-item__total { font-weight: 700; color: var(--ember); font-size: 0.9375rem; min-width: 64px; text-align: right; }
.uk-cart-item__remove { background: none; border: none; color: var(--smoke); font-size: 1.125rem; cursor: pointer; width: 28px; height: 28px; }
.uk-cart-item__remove:hover { color: var(--ember); }

/* Stepper */
.uk-stepper { display: inline-flex; align-items: center; border: 1px solid var(--brass); border-radius: 100px; overflow: hidden; }
.uk-stepper button {
  width: 32px; height: 32px; border: none; background: transparent; color: var(--char);
  font-family: inherit; font-size: 1rem; font-weight: 700; cursor: pointer;
}
.uk-stepper button:hover { background: var(--brass-light); }
.uk-stepper .uk-stepper__val { min-width: 26px; text-align: center; font-weight: 700; font-size: 0.875rem; }

/* Totals */
.uk-totals { display: flex; flex-direction: column; gap: 0.375rem; margin-bottom: 1rem; }
.uk-totals__row { display: flex; justify-content: space-between; font-size: 0.9375rem; }
.uk-totals__row--total { border-top: 2px solid var(--brass); margin-top: 0.375rem; padding-top: 0.625rem; font-weight: 700; font-size: 1.0625rem; }

/* Primary CTA */
.uk-btn {
  display: block; width: 100%; padding: 0.875rem; text-align: center;
  font-family: inherit; font-size: 1rem; font-weight: 700; border-radius: 8px; cursor: pointer;
  border: none; transition: 0.15s;
}
.uk-btn--primary { background: var(--char); color: var(--butter); }
.uk-btn--primary:hover { background: var(--ember); }
.uk-btn--ember { background: var(--ember); color: #fff; }
.uk-btn--ember:hover { background: var(--ember-deep); }
.uk-btn--whatsapp { background: #25D366; color: #04250f; display: flex; align-items: center; justify-content: center; gap: 0.5rem; }
.uk-btn--whatsapp:hover { background: #1ebe5b; }
.uk-btn--ghost { background: transparent; color: var(--smoke); font-weight: 600; font-size: 0.875rem; }
.uk-btn--ghost:hover { color: var(--ember); }
.uk-btn:disabled { opacity: 0.6; cursor: not-allowed; }

/* ------------------------------------------------------------------
   Checkout steps
------------------------------------------------------------------ */
.uk-steps { display: flex; gap: 0.5rem; margin-bottom: 1.25rem; }
.uk-step {
  flex: 1; text-align: center; font-size: 0.75rem; font-weight: 600; color: var(--smoke);
  padding: 0.375rem 0.25rem; border-bottom: 2px solid var(--brass-light);
}
.uk-step--active { color: var(--ember); border-bottom-color: var(--ember); }
.uk-step--done { color: var(--espresso); border-bottom-color: var(--brass); }

.uk-form { display: flex; flex-direction: column; gap: 0.875rem; }
.uk-field { display: flex; flex-direction: column; gap: 0.25rem; }
.uk-field__label { font-size: 0.8125rem; font-weight: 600; color: var(--espresso); }
.uk-field__input {
  width: 100%; padding: 0.75rem; font-family: inherit; font-size: 1rem;
  border: 1px solid var(--brass); border-radius: 8px; background: #fff; color: var(--espresso);
}
.uk-field__input:focus { outline: none; border-color: var(--ember); }
.uk-field__textarea { resize: vertical; min-height: 60px; }

.uk-radio { display: flex; align-items: flex-start; gap: 0.75rem; cursor: pointer; padding: 0.875rem 0.75rem; border: 1px solid var(--brass-light); border-radius: 8px; background: #fff; }
.uk-radio input { margin-top: 0.25rem; accent-color: var(--ember); }
.uk-radio__box { display: flex; flex-direction: column; }
.uk-radio__label { font-weight: 700; font-size: 0.9375rem; color: var(--espresso); }
.uk-radio__desc { font-size: 0.8125rem; color: var(--smoke); }

.uk-form__error {
  padding: 0.625rem 0.75rem; background: #FDE8E8; color: var(--ember-deep);
  border-radius: 8px; font-size: 0.875rem; font-weight: 600;
}

.uk-note { font-size: 0.8125rem; color: var(--smoke); }
.uk-summary { padding: 0.75rem; background: #fff; border: 1px solid var(--brass-light); border-radius: 8px; margin-bottom: 1rem; }
.uk-summary__row { display: flex; justify-content: space-between; padding: 0.2rem 0; font-size: 0.875rem; }
.uk-summary__row--total { border-top: 1px solid var(--brass); margin-top: 0.3rem; padding-top: 0.45rem; font-weight: 700; font-size: 0.9375rem; }

/* Confirmation */
.uk-confirm { text-align: center; padding: 1.5rem 0.5rem; display: flex; flex-direction: column; align-items: center; gap: 0.75rem; }
.uk-confirm__check { width: 56px; height: 56px; background: var(--char); color: var(--butter); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 1.5rem; font-weight: 700; }
.uk-confirm__title { font-family: Fraunces, Georgia, serif; font-size: 1.375rem; color: var(--char); }
.uk-confirm__ref { font-size: 1rem; color: var(--smoke); }
.uk-confirm__ref strong { color: var(--ember); font-size: 1.25rem; letter-spacing: 0.03em; }
.uk-confirm__note { font-size: 0.9375rem; color: var(--espresso); }
.uk-confirm__link { display: inline-block; padding: 0.625rem 1.25rem; background: var(--char); color: var(--butter); border-radius: 8px; font-weight: 600; font-size: 0.9375rem; }
.uk-confirm__link:hover { background: var(--ember); }

/* WhatsApp flow banner (in-checkout) */
.uk-wa-banner { display: flex; gap: 0.875rem; align-items: flex-start; padding: 0.875rem; background: #e8f8ee; border: 1px solid #bce8c9; border-radius: 8px; }
.uk-wa-banner__icon { font-size: 1.5rem; line-height: 1; }
.uk-wa-banner__text { font-size: 0.875rem; color: #0c3b1f; }
.uk-wa-banner__text strong { display: block; font-size: 0.9375rem; }

/* Body scroll lock when drawer is open */
body.uk-drawer-open { overflow: hidden; }
