@font-face{
  font-family: "MohrAltBlack";
  src: url("/fonts/mohr-alt-black.otf") format("opentype");
  font-display: swap;
}

:root{
  --bg:#fbf8f3;
  --card:#ffffff;
  --text:#0f172a;
  --muted:#64748b;
  --line:#e5e7eb;

  --btn:#074a2f;
  --btnText:#ffffff;

  --outline:#074a2f;
  --danger:#b91c1c;
}

*{ box-sizing:border-box; }

body{
  margin:0;
  font-family: system-ui,-apple-system,Segoe UI,Roboto,Ubuntu,"Helvetica Neue",Arial;
  background: var(--bg);
  color: var(--text);
}

.wrap{
  max-width:560px;
  margin:0 auto;
  padding:18px 14px 120px;
}

.header{
  padding:6px 2px 12px;
}

/* ===== BRAND ===== */
.brand{
  font-family: "MohrAltBlack", system-ui, -apple-system, Segoe UI, Roboto, Arial;
  font-weight: 900;
  letter-spacing: -0.02em;
  font-size: 26px;
  text-transform: lowercase;
  color: #074a2f;
}

.brand .tm{
  font-size: 0.55em;
  vertical-align: super;
  margin-left: 2px;
  color: #074a2f;
}

.header h1{
  margin:6px 0 6px;
  font-size:28px;
  letter-spacing:-.03em;
}

.muted{
  color: var(--muted);
  font-size:13px;
  line-height:1.4;
}

/* ===== CARDS ===== */
.card{
  background: var(--card);
  border: 1px solid rgba(7, 74, 47, 0.18);
  border-radius: 22px;
  padding: 14px;
  box-shadow: 0 1px 0 rgba(15,23,42,.03);
}

@media (hover: hover) and (pointer: fine){
  .card:hover{
    border-color: rgba(7, 74, 47, 0.26);
  }
}

.stack{
  display:flex;
  flex-direction:column;
  gap:10px;
}

.grid2{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:10px;
}

.label{
  font-size:12px;
  color: var(--muted);
  font-weight:700;
  margin:0 0 6px;
}

/* ===== INPUTS ===== */
.select, input{
  width:100%;
  border-radius:18px;
  border:1px solid var(--line);
  padding:12px 14px;
  font-size:16px;
  background:#fff;
  outline:none;
}

.select:focus,
input:focus{
  border-color: rgba(7, 74, 47, 0.45);
  box-shadow: 0 0 0 3px rgba(7, 74, 47, 0.12);
}

/* ===== BUTTONS ===== */
.btn{
  width:100%;
  border:0;
  border-radius:18px;
  padding:12px 14px;
  font-weight:800;
  font-size:16px;
  background: var(--btn);
  color: var(--btnText);
  cursor:pointer;

  transition:
    transform .06s ease,
    filter .12s ease,
    opacity .12s ease,
    box-shadow .12s ease;

  box-shadow: 0 1px 0 rgba(15,23,42,.05);
  -webkit-tap-highlight-color: transparent;
}

.btn:active{
  transform: scale(0.985);
  filter: brightness(0.92);
}

.btn:focus-visible{
  outline: 3px solid rgba(7, 74, 47, 0.25);
  outline-offset: 2px;
}

.btn:disabled{
  opacity:.55;
  filter: grayscale(.1);
  cursor:not-allowed;
}

.btn.secondary{
  background:#fff;
  color: var(--btn);
  border:1px solid var(--outline);
  box-shadow:none;
}

.btn.secondary:active{
  transform: scale(0.985);
  filter: brightness(0.96);
}

.btn.danger{
  background: var(--danger);
  color:#fff;
}

@media (hover: hover) and (pointer: fine){
  .btn:hover{ filter: brightness(0.96); }
  .btn.secondary:hover{ filter: brightness(0.985); }
}

/* ===== SMALL / PILLS ===== */
.small{
  font-size:12px;
  color: var(--muted);
}

.pill{
  display:inline-flex;
  align-items:center;
  gap:6px;
  background:#fff7ed;
  color:#9a3412;
  border:1px solid #fed7aa;
  font-weight:800;
  border-radius:999px;
  padding:4px 10px;
  font-size:12px;
}

/* ===== CART ITEMS ===== */
.item{
  border-radius:18px;
  border:1px solid rgba(7, 74, 47, 0.14);
  padding:12px;
  background:#fff;
  display:flex;
  gap:10px;
  align-items:flex-start;
}

@media (hover: hover) and (pointer: fine){
  .item:hover{
    border-color: rgba(7, 74, 47, 0.22);
  }
}

.item .meta{ flex:1; }

.item .title{
  font-weight:900;
  font-size:14px;
}

.item .sub{
  font-size:12px;
  color: var(--muted);
  margin-top:2px;
}

.item .sum{
  font-weight:900;
  margin-top:6px;
}

/* ===== BOTTOM BAR ===== */
.bottomBar{
  position:fixed;
  left:0;
  right:0;
  bottom:0;
  border-top:1px solid var(--line);
  background: rgba(251, 248, 243, .92);
  backdrop-filter: blur(10px);
}

.bottomBar .inner{
  max-width:560px;
  margin:0 auto;
  padding:10px 14px;
  display:flex;
  align-items:center;
  gap:12px;
}

.bottomBar .total{ flex:1; }

.bottomBar .total .t1{
  font-size:12px;
  color: var(--muted);
}

.bottomBar .total .t2{
  font-size:18px;
  font-weight:950;
}

/* ===== SPINNER ===== */
.spinner{
  width:16px;
  height:16px;
  border-radius:999px;
  border:2px solid rgba(255,255,255,.45);
  border-top-color: rgba(255,255,255,1);
  display:inline-block;
  animation: spin .7s linear infinite;
}

.btn.secondary .spinner{
  border-color: rgba(7,74,47,.25);
  border-top-color: rgba(7,74,47,1);
}

@keyframes spin{
  to{ transform: rotate(360deg); }
}

.hidden{ display:none; }
