/* ============================================================
   Ukoni Order Widget — order-widget.css
   Styled via CSS custom properties — inherits site palette.
   ============================================================ */

.ow-root {
  --ow-coal: #161A17;
  --ow-ember: #E4471B;
  --ow-ember-dark: #C73A14;
  --ow-brass: #E2B857;
  --ow-brass-light: #F0D99A;
  --ow-bone: #FFF9EE;
  --ow-ash: #F1EEE5;
  --ow-smoke: #9A9C96;

  font-family: "Space Grotesk", system-ui, sans-serif;
  background: var(--ow-bone);
  border: 1px solid var(--ow-brass);
  border-radius: 4px;
  max-width: 720px;
  margin-inline: auto;
  text-align: left;
  overflow: hidden;
}

.ow-root *,
.ow-root *::before,
.ow-root *::after {
  box-sizing: border-box;
}

/* Header */
.ow-header {
  background: var(--ow-coal);
  color: var(--ow-bone);
  padding: 0.875rem 1.25rem;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}
.ow-header__brand {
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 700;
  font-size: 1.125rem;
}
.ow-header__label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ow-brass);
}

/* Loading / error */
.ow-loading,
.ow-error {
  padding: 2rem;
  text-align: center;
  color: var(--ow-smoke);
}
.ow-error { color: var(--ow-ember); }

/* Tabs */
.ow-tabs {
  display: flex;
  overflow-x: auto;
  border-bottom: 1px solid var(--ow-brass);
  padding: 0.5rem 0.75rem;
  gap: 0.375rem;
  background: var(--ow-bone);
}
.ow-tab {
  flex: 0 0 auto;
  padding: 0.5rem 1rem;
  font-family: inherit;
  font-size: 0.8125rem;
  font-weight: 600;
  border: 1px solid var(--ow-brass);
  background: transparent;
  color: var(--ow-coal);
  border-radius: 100px;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s, color 0.15s;
}
.ow-tab:hover {
  background: var(--ow-brass-light);
}
.ow-tab--active {
  background: var(--ow-ember);
  border-color: var(--ow-ember);
  color: var(--ow-bone);
}

/* Category */
.ow-category {
  padding: 1rem;
}
.ow-category__title {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.0625rem;
  font-weight: 700;
  color: var(--ow-coal);
  margin: 0 0 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--ow-brass);
}

/* Items */
.ow-items {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.ow-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.625rem 0.75rem;
  background: var(--ow-ash);
  border-radius: 4px;
  gap: 0.75rem;
}
.ow-item__info {
  flex: 1;
  min-width: 0;
}
.ow-item__name {
  font-weight: 600;
  font-size: 0.9375rem;
  color: var(--ow-coal);
  display: block;
}
.ow-item__desc {
  font-size: 0.8125rem;
  color: var(--ow-smoke);
  display: block;
  margin-top: 0.125rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ow-item__actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}
.ow-item__price {
  font-weight: 700;
  color: var(--ow-ember);
  font-size: 0.9375rem;
  white-space: nowrap;
}
.ow-item__add {
  padding: 0.375rem 0.875rem;
  font-family: inherit;
  font-size: 0.8125rem;
  font-weight: 600;
  background: var(--ow-coal);
  color: var(--ow-bone);
  border: none;
  border-radius: 4px;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s;
}
.ow-item__add:hover {
  background: var(--ow-ember);
}

/* Cart badge */
.ow-cart-badge {
  display: block;
  width: 100%;
  padding: 0.75rem 1.25rem;
  font-family: inherit;
  font-size: 0.9375rem;
  font-weight: 700;
  background: var(--ow-ember);
  color: var(--ow-bone);
  border: none;
  cursor: pointer;
  text-align: center;
  transition: background 0.15s;
}
.ow-cart-badge:hover {
  background: var(--ow-ember-dark);
}

/* Cart */
.ow-cart {
  padding: 1rem 1.25rem;
}
.ow-cart__head,
.ow-checkout__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}
.ow-cart__title {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--ow-coal);
  margin: 0;
}
.ow-cart__back {
  font-family: inherit;
  font-size: 0.8125rem;
  font-weight: 600;
  background: none;
  border: none;
  color: var(--ow-smoke);
  cursor: pointer;
  padding: 0;
}
.ow-cart__back:hover {
  color: var(--ow-ember);
}

/* Cart items */
.ow-cart__items {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1rem;
}
.ow-cart-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--ow-brass-light);
}
.ow-cart-item__info {
  flex: 1;
  min-width: 0;
}
.ow-cart-item__name {
  font-weight: 600;
  font-size: 0.875rem;
  display: block;
}
.ow-cart-item__cat {
  font-size: 0.75rem;
  color: var(--ow-smoke);
}
.ow-cart-item__qty {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}
.ow-qty-btn {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 600;
  border: 1px solid var(--ow-brass);
  background: var(--ow-bone);
  color: var(--ow-coal);
  border-radius: 4px;
  cursor: pointer;
}
.ow-qty-btn:hover {
  background: var(--ow-ash);
}
.ow-qty-val {
  min-width: 24px;
  text-align: center;
  font-weight: 600;
  font-size: 0.875rem;
}
.ow-cart-item__total {
  font-weight: 700;
  color: var(--ow-ember);
  font-size: 0.875rem;
  min-width: 64px;
  text-align: right;
}
.ow-cart-item__remove {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: inherit;
  font-size: 1.125rem;
  background: none;
  border: none;
  color: var(--ow-smoke);
  cursor: pointer;
}
.ow-cart-item__remove:hover {
  color: var(--ow-ember);
}

/* Cart footer */
.ow-cart__footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 0.75rem;
  border-top: 2px solid var(--ow-brass);
}
.ow-cart__total {
  font-weight: 700;
  font-size: 1.0625rem;
}
.ow-cart__checkout {
  padding: 0.625rem 1.5rem;
  font-family: inherit;
  font-size: 0.9375rem;
  font-weight: 700;
  background: var(--ow-ember);
  color: var(--ow-bone);
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.15s;
}
.ow-cart__checkout:hover {
  background: var(--ow-ember-dark);
}

/* Checkout */
.ow-checkout {
  padding: 1rem 1.25rem;
}
.ow-checkout__summary {
  margin-bottom: 1.25rem;
  padding: 0.75rem;
  background: var(--ow-ash);
  border-radius: 4px;
}
.ow-summary-row {
  display: flex;
  justify-content: space-between;
  padding: 0.25rem 0;
  font-size: 0.875rem;
}
.ow-summary-row--total {
  border-top: 1px solid var(--ow-brass);
  margin-top: 0.375rem;
  padding-top: 0.5rem;
  font-size: 0.9375rem;
}

/* Form */
.ow-form {
  display: flex;
  flex-direction: column;
  gap: 0.875rem;
}
.ow-field__label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--ow-coal);
  margin-bottom: 0.25rem;
}
.ow-field__input {
  width: 100%;
  padding: 0.625rem 0.75rem;
  font-family: inherit;
  font-size: 0.9375rem;
  border: 1px solid var(--ow-brass);
  border-radius: 4px;
  background: var(--ow-bone);
  color: var(--ow-coal);
  transition: border-color 0.15s;
}
.ow-field__input:focus {
  outline: none;
  border-color: var(--ow-ember);
}
.ow-field__textarea {
  resize: vertical;
  min-height: 60px;
}
.ow-form__submit {
  padding: 0.75rem;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 700;
  background: var(--ow-coal);
  color: var(--ow-bone);
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.15s;
  margin-top: 0.25rem;
}
.ow-form__submit:hover {
  background: var(--ow-ember);
}
.ow-form__submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}
.ow-form__error {
  padding: 0.625rem 0.75rem;
  background: #FDE8E8;
  color: #C73A14;
  border-radius: 4px;
  font-size: 0.875rem;
  font-weight: 600;
}

/* Confirmation */
.ow-confirm {
  padding: 2rem 1.25rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}
.ow-confirm__check {
  width: 56px;
  height: 56px;
  background: var(--ow-coal);
  color: var(--ow-bone);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}
.ow-confirm__title {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.25rem;
  color: var(--ow-coal);
  margin: 0;
}
.ow-confirm__ref {
  font-size: 0.9375rem;
  color: var(--ow-smoke);
  margin: 0;
}
.ow-confirm__ref strong {
  color: var(--ow-ember);
  font-size: 1.125rem;
}
.ow-confirm__note {
  font-size: 0.9375rem;
  color: var(--ow-coal);
  margin: 0;
}
.ow-confirm__wa,
.ow-confirm__status {
  display: inline-block;
  padding: 0.625rem 1.25rem;
  font-family: inherit;
  font-size: 0.9375rem;
  font-weight: 600;
  border-radius: 4px;
  text-decoration: none;
  transition: background 0.15s;
}
.ow-confirm__wa {
  background: #25D366;
  color: #fff;
}
.ow-confirm__wa:hover {
  background: #1DA851;
}
.ow-confirm__status {
  background: var(--ow-coal);
  color: var(--ow-bone);
}
.ow-confirm__status:hover {
  background: var(--ow-ember);
}
.ow-confirm__new {
  margin-top: 0.5rem;
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  background: none;
  border: 1px solid var(--ow-brass);
  color: var(--ow-coal);
  padding: 0.5rem 1.25rem;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.15s;
}
.ow-confirm__new:hover {
  background: var(--ow-ash);
}

/* Responsive */
@media (max-width: 480px) {
  .ow-item {
    flex-direction: column;
    align-items: flex-start;
  }
  .ow-item__actions {
    width: 100%;
    justify-content: space-between;
  }
  .ow-cart-item {
    flex-wrap: wrap;
  }
  .ow-cart-item__total {
    order: 10;
    width: 100%;
    text-align: left;
    padding-left: 0;
  }
}
