:root {
  --usta-red: #701e2a;
  --usta-cream: #fff7e9;
  --usta-dark: #39251e;
  --usta-border: #e6d7c5;
}

.usta-price {
  font-size: 25px;
  font-weight: 800;
  color: var(--usta-red);
  margin: 12px 0;
}

.usta-portion {
  font-size: 13px;
  color: #75645c;
  margin-bottom: 12px;
}

.usta-quantity {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 10px 0;
}

.usta-quantity button {
  width: 38px;
  height: 38px;
  padding: 0;
  font-size: 20px;
  border-radius: 8px;
}

.usta-quantity output {
  min-width: 24px;
  text-align: center;
  font-weight: 700;
}

.usta-add {
  width: 100%;
  margin-top: 8px;
  font-weight: 700;
}

.usta-add:disabled {
  opacity: .45;
  cursor: not-allowed;
}

.usta-cart-trigger {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 100;
  border-radius: 14px;
  padding: 16px 24px;
  box-shadow: 0 6px 24px #0003;
  font-weight: 800;
}

.usta-cart {
  width: min(460px, calc(100% - 24px));
  max-height: 90dvh;
  border: 0;
  border-radius: 18px;
  padding: 22px;
  color: var(--usta-dark);
  background: var(--usta-cream);
  box-shadow: 0 15px 60px #0004;
  overflow: auto;
}

.usta-cart::backdrop {
  background: #0008;
}

.usta-cart-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.usta-cart-item {
  display: grid;
  grid-template-columns: 65px 1fr;
  gap: 12px;
  border-bottom: 1px solid var(--usta-border);
  padding: 15px 0;
}

.usta-cart-item img {
  width: 65px;
  height: 65px;
  border-radius: 10px;
  object-fit: cover;
}

.usta-cart-item button {
  padding: 7px 12px;
}

.usta-cart-item p {
  margin: 5px 0;
}

.usta-cart-total {
  font-size: 23px;
  font-weight: 800;
  padding: 20px 0;
}

.usta-cart-note {
  font-size: 13px;
  padding: 12px;
  border-radius: 8px;
  background: #f1e4d0;
}

.usta-cart-clear {
  width: 100%;
  margin-top: 12px;
  background: #59463c;
}

.usta-checkout {
  width: 100%;
  margin-top: 12px;
  min-height: 48px;
  background: #701e2a;
  color: white;
  font-weight: 700;
  opacity: 1;
  cursor: pointer;
}

.usta-checkout:hover:not(:disabled) {
  background: #50141e;
}

.usta-checkout:disabled {
  opacity: .5;
  cursor: not-allowed;
}

.usta-toast {
  position: fixed;
  bottom: 90px;
  right: 20px;
  z-index: 101;
  padding: 12px 18px;
  background: #39251e;
  color: white;
  border-radius: 10px;
}

@media (max-width: 600px) {
  .usta-cart-trigger {
    left: 14px;
    right: 14px;
    bottom: 14px;
  }

  body {
    padding-bottom: 85px;
  }
}

/* USTA SOFRASI - ORDER BUTTONS */
.usta-product-actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 9px;
    margin-top: 12px;
}
.usta-product-actions button {
    width: 100%;
    min-height: 46px;
    padding: 12px 15px;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
}
.usta-product-actions .usta-add {
    color: #701e2a;
    background: #fff8ef;
    border: 1px solid #701e2a;
}
.usta-buy-now {
    color: #ffffff;
    background: #701e2a;
    border: 1px solid #701e2a;
}
.usta-buy-now:hover:not(:disabled) {
    background: #50141e;
}
.usta-product-actions button:disabled {
    opacity: .45;
    cursor: not-allowed;
}

/* USTA SOFRASI V3.1 - CHECKOUT */

.usta-checkout-dialog {
  width: min(94vw, 580px);
  max-height: 90dvh;
  overflow-y: auto;
  padding: 24px;
  border: 0;
  border-radius: 20px;
  background: #fffdf8;
  color: #25201c;
  box-sizing: border-box;
}

.usta-checkout-dialog::backdrop {
  background: rgba(20, 15, 12, .65);
}

.usta-checkout-dialog [hidden] {
  display: none !important;
}

.checkout-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.checkout-header small {
  color: #701e2a;
  font-weight: 800;
  letter-spacing: 2px;
}

.checkout-header h2 {
  margin: 8px 0;
}

.checkout-header button {
  border: 0;
  background: #eee5d9;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  cursor: pointer;
}

.checkout-preview {
  background: #f5eee3;
  padding: 12px;
  border-radius: 9px;
  font-size: 13px;
  margin: 15px 0;
}

.usta-checkout-dialog h3 {
  color: #701e2a;
  margin: 24px 0 12px;
  font-size: 17px;
}

.usta-checkout-dialog label {
  display: block;
  margin: 12px 0;
  font-size: 14px;
  font-weight: 600;
}

.usta-checkout-dialog input:not([type="radio"]),
.usta-checkout-dialog textarea {
  display: block;
  width: 100%;
  margin-top: 6px;
  padding: 13px;
  border: 1px solid #d8cec1;
  border-radius: 9px;
  background: white;
  color: #25201c;
  font: inherit;
  font-size: 16px;
  box-sizing: border-box;
}

.checkout-options label {
  padding: 13px;
  border: 1px solid #e4dbcf;
  border-radius: 9px;
  background: white;
  cursor: pointer;
}

.checkout-options input {
  accent-color: #701e2a;
  margin-right: 8px;
}

.checkout-disabled {
  opacity: .5;
}

.checkout-line {
  display: flex;
  justify-content: space-between;
  gap: 15px;
  padding: 12px 0;
  border-bottom: 1px solid #eee5d9;
  font-size: 14px;
}

.checkout-total {
  font-size: 18px;
  color: #701e2a;
  font-weight: 800;
  margin-bottom: 18px;
}

.checkout-submit,
.checkout-back {
  width: 100%;
  min-height: 48px;
  padding: 13px;
  border-radius: 10px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
}

.checkout-submit {
  color: white;
  background: #701e2a;
  border: 0;
}

.checkout-back {
  background: transparent;
  border: 1px solid #701e2a;
  color: #701e2a;
}

#checkoutMessage {
  font-size: 14px;
  line-height: 1.5;
  color: #701e2a;
}

@media (max-width: 480px) {
  .usta-checkout-dialog {
    padding: 16px;
    border-radius: 14px;
  }
}

/* USTA SOFRASI V3.2.1 */

.usta-cart {
  width: min(540px, calc(100% - 24px));
  padding: 18px;
}

.usta-cart-item {
  padding: 12px 0;
  align-items: start;
}

.usta-cart-item .usta-quantity,
article .usta-quantity {
  display: flex;
  flex-direction: row;
  align-items: center;
  padding: 0;
  gap: 10px;
}

.usta-cart-item .usta-quantity button {
  width: 34px;
  height: 34px;
  padding: 0;
}

.usta-cart-item p:empty {
  display: none;
}

.usta-cart-total {
  font-size: 21px;
  padding: 14px 0;
}

.usta-checkout-dialog select {
  display: block;
  width: 100%;
  margin-top: 6px;
  padding: 13px;
  border: 1px solid #d8cec1;
  border-radius: 9px;
  background: white;
  font: inherit;
}

.checkout-submit:disabled {
  opacity: .55;
  cursor: wait;
}

.checkout-header button {
  color: #701e2a;
  padding: 0;
}

/* USTA_P04_CART */

.usta-checkout:not(:disabled) {
  opacity: 1;
  cursor: pointer;
  background: #701e2a;
  color: white;
  font-weight: 700;
  min-height: 48px;
}

.usta-checkout:disabled {
  opacity: .5;
  cursor: not-allowed;
}

.usta-cart {
  width: min(540px, calc(100% - 24px));
  padding: 18px;
}

.usta-cart-item {
  padding: 12px 0;
  align-items: start;
}

article .usta-quantity,
.usta-cart-item .usta-quantity {
  display: flex;
  flex-direction: row;
  align-items: center;
  padding: 0;
  gap: 10px;
}

.usta-cart-item .usta-quantity button {
  width: 34px;
  height: 34px;
  padding: 0;
}

.usta-cart-item p:empty {
  display: none;
}

.usta-checkout-dialog select {
  display: block;
  width: 100%;
  margin-top: 6px;
  padding: 13px;
  border: 1px solid #d8cec1;
  border-radius: 9px;
  background: white;
  font: inherit;
}

.checkout-header button {
  color: #701e2a;
  padding: 0;
}

.checkout-submit:disabled {
  opacity: .55;
  cursor: wait;
}
