/* ===== Pedido pelo site 30 Tons ===== */
body { background: var(--cream); padding-bottom: 90px; }
.wrap { width: min(1180px, 100% - 32px); margin-inline: auto; }
.btn.sm { padding: .55em 1.1em; font-size: .92rem; }
.btn.full { width: 100%; }
.btn.big { padding: 1.05em; font-size: 1.1rem; }
.link { background: none; border: 0; color: var(--berry); font-weight: 800; cursor: pointer; padding: 0; justify-self: start; }

/* TOPO */
.top { background: linear-gradient(120deg, var(--grape), var(--grape-deep)); color: #fff; position: relative; overflow: hidden; }
.top::after { content: ''; position: absolute; width: 340px; height: 340px; border-radius: 50%; background: var(--mango); opacity: .22; right: -90px; top: -160px; }
.top-in { display: flex; align-items: center; gap: 18px; padding: 16px 0; position: relative; z-index: 1; }
.logo { background: #fff; border-radius: 16px; padding: 6px 12px; flex: none; }
.logo img { height: 40px; width: auto; }
.top-title h1 { font-size: clamp(1.4rem, 3vw, 2rem); }
.top-title p { margin: 2px 0 0; color: rgba(255,255,255,.75); font-weight: 700; font-size: .92rem; }
.back { margin-left: auto; color: #fff; }

/* CARDÁPIO + SACOLA */
.shop { display: grid; grid-template-columns: 1fr 360px; gap: 24px; padding: 24px 0; align-items: start; }
.search-bar { position: sticky; top: 0; z-index: 5; background: var(--cream); padding: 6px 0 12px; display: grid; gap: 10px; }
.cats { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
.cats::-webkit-scrollbar { display: none; }
.cats button { border: 0; background: #fff; border-radius: 999px; padding: 8px 16px; font-weight: 800; cursor: pointer; color: var(--muted); white-space: nowrap; box-shadow: 0 4px 14px -10px rgba(54,16,90,.5); }
.cats button.on { background: var(--grape); color: #fff; }
.cat-title { font-size: 1.35rem; color: var(--grape-ink); margin: 18px 0 10px; }
.products { display: grid; gap: 4px; }
.plist { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; }
.prod { --c: var(--grape); display: grid; grid-template-columns: 54px 1fr auto; gap: 12px; align-items: center; background: #fff; border-radius: 20px; padding: 14px; border: 0; text-align: left; cursor: pointer; position: relative; overflow: hidden; box-shadow: 0 8px 22px -18px rgba(54,16,90,.6); transition: transform .12s, box-shadow .12s; }
.prod:disabled { cursor: default; opacity: .7; }
.prod:disabled .plus { background: #cfc6da; }
.prod:hover:not(:disabled) { transform: translateY(-2px); box-shadow: 0 14px 26px -16px rgba(54,16,90,.6); }
.prod .e { width: 54px; height: 54px; border-radius: 16px; display: grid; place-items: center; font-size: 1.8rem; background: color-mix(in srgb, var(--c) 14%, #fff); }
.prod .n { font-weight: 800; line-height: 1.2; display: block; }
.prod .d { color: var(--muted); font-size: .85rem; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.prod .p { font-family: var(--font-display); font-weight: 700; color: var(--c); display: block; margin-top: 2px; }
.prod .plus { width: 36px; height: 36px; border-radius: 12px; background: var(--c); color: #fff; display: grid; place-items: center; font-size: 1.4rem; font-weight: 900; }
.prod .inbag { position: absolute; top: 8px; right: 8px; background: var(--berry); color: #fff; font-size: .72rem; font-weight: 900; border-radius: 999px; padding: 1px 8px; }
.loading, .none { color: var(--muted); text-align: center; padding: 40px 0; font-weight: 700; }

.closed, .last-order { background: #fff; border-radius: 22px; padding: 22px; margin-bottom: 16px; box-shadow: var(--shadow); }
.closed { text-align: center; }
.closed b { font-size: 2.6rem; display: block; }
.closed h2 { color: var(--grape-ink); margin: 6px 0; }
.closed p { color: var(--muted); }
.last-order { display: flex; gap: 14px; align-items: center; justify-content: space-between; flex-wrap: wrap; border: 2px solid var(--mango); padding: 14px 18px; }
.last-order p { margin: 0; font-weight: 700; }

.cart { background: #fff; border-radius: 24px; box-shadow: var(--shadow); position: sticky; top: 16px; display: flex; flex-direction: column; max-height: calc(100vh - 32px); overflow: hidden; }
.cart-head { display: flex; justify-content: space-between; align-items: center; padding: 18px 20px 8px; }
.cart-head h2 { font-size: 1.35rem; color: var(--grape-ink); }
#cart-close { display: none; }
.cart-items { overflow: auto; padding: 0 14px; flex: 1; min-height: 80px; }
.cart-empty { text-align: center; color: var(--muted); padding: 26px 8px; font-weight: 700; }
.cart-empty b { display: block; font-size: 2.4rem; }
.ci { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; padding: 12px 6px; border-bottom: 1px dashed var(--line); }
.ci .nm { font-weight: 800; }
.ci .ob { grid-column: 1 / -1; color: var(--muted); font-size: .85rem; font-style: italic; }
.ci .sub { color: var(--muted); font-size: .85rem; }
.ci .tt { font-weight: 900; text-align: right; }
.ci .qty { display: flex; align-items: center; gap: 6px; justify-content: flex-end; font-weight: 800; }
.ci .qty button { width: 28px; height: 28px; border-radius: 9px; border: 0; background: #f1edf5; cursor: pointer; font-weight: 900; color: var(--grape); }
.ci .qty button.del { background: #ffe8ea; color: var(--berry-deep); }
.cart-foot { border-top: 1px solid var(--line); padding: 14px 20px 18px; display: grid; gap: 10px; background: #fcfaff; }
.cart-foot .row, .summary .row { display: flex; justify-content: space-between; font-weight: 700; }
.min { margin: 0; font-size: .85rem; color: var(--warn); font-weight: 800; }

.bag-bar { position: fixed; left: 12px; right: 12px; bottom: max(12px, env(safe-area-inset-bottom)); z-index: 40; display: none; align-items: center; gap: 12px; border: 0; border-radius: 18px; padding: 14px 18px; background: var(--berry); color: #fff; font-weight: 800; font-size: 1.05rem; cursor: pointer; box-shadow: 0 16px 30px -12px var(--berry); }
.bag-bar b { margin-left: auto; font-family: var(--font-display); }
.bag-n { background: #fff; color: var(--berry); border-radius: 999px; min-width: 28px; height: 28px; display: grid; place-items: center; font-weight: 900; }

/* CHECKOUT */
.card { background: #fff; border-radius: 28px; padding: clamp(20px, 4vw, 34px); box-shadow: var(--shadow); }
.checkout, .track { padding: 24px 0; max-width: 640px; }
.form { display: grid; gap: 16px; }
.form h2 { font-size: 1.8rem; color: var(--grape-ink); }
fieldset { border: 0; padding: 0; margin: 0; display: grid; gap: 8px; }
legend { font-weight: 800; font-size: .85rem; color: var(--muted); padding: 0; margin-bottom: 8px; }
legend small { font-weight: 700; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
textarea.input { resize: vertical; }
.seg { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.seg label { cursor: pointer; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg span { display: block; border: 2px solid var(--line); border-radius: 14px; padding: 12px; font-weight: 800; text-align: center; transition: .15s; background: #fff; }
.seg span small { display: block; font-size: .78rem; color: var(--muted); font-weight: 700; }
.seg input:checked + span { border-color: var(--grape); background: var(--grape); color: #fff; }
.seg input:checked + span small { color: rgba(255,255,255,.8); }
.seg input:focus-visible + span { box-shadow: 0 0 0 4px rgba(91,26,142,.2); }
.seg label.disabled { opacity: .45; pointer-events: none; }
.summary { background: var(--cream); border-radius: 16px; padding: 14px 16px; display: grid; gap: 6px; }
.summary .tot { font-family: var(--font-display); font-size: 1.4rem; color: var(--grape-ink); border-top: 1px dashed var(--line); padding-top: 8px; margin-top: 2px; }
.summary .note { font-size: .8rem; color: var(--muted); margin: 0; }
.msg { border-radius: 14px; padding: 12px 14px; font-weight: 700; }
.msg.err { background: #ffe8ea; color: #b3132a; }

/* ACOMPANHAMENTO */
.track-head { text-align: center; }
.big-emo { font-size: 3.6rem; animation: pop .6s cubic-bezier(.2,1.6,.4,1); }
@keyframes pop { from { transform: scale(0); } }
.track-head h2 { font-size: 1.9rem; color: var(--grape-ink); margin: 4px 0; }
.track-head p { color: var(--muted); margin: 6px 0; }
.t-num b { font-family: var(--font-display); color: var(--grape); font-size: 1.3rem; }
.timeline { list-style: none; padding: 0; margin: 22px 0; display: grid; gap: 0; }
.timeline li { display: grid; grid-template-columns: 38px 1fr; gap: 12px; align-items: start; position: relative; padding-bottom: 18px; color: var(--muted); }
.timeline li:last-child { padding-bottom: 0; }
.timeline li::before { content: ''; position: absolute; left: 18px; top: 34px; bottom: 0; width: 3px; background: var(--line); border-radius: 3px; }
.timeline li:last-child::before { display: none; }
.timeline .dot { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: #f1edf5; font-size: 1.1rem; position: relative; z-index: 1; }
.timeline b { display: block; color: inherit; padding-top: 7px; }
.timeline small { font-weight: 700; }
.timeline li.done { color: var(--ink); }
.timeline li.done .dot { background: var(--ok); color: #fff; }
.timeline li.done::before { background: var(--ok); }
.timeline li.cur { color: var(--grape-ink); }
.timeline li.cur .dot { background: var(--grape); color: #fff; box-shadow: 0 0 0 6px rgba(91,26,142,.15); animation: pulse 1.6s ease-in-out infinite; }
.timeline li.cur b { font-size: 1.1rem; }
.timeline li.cancel .dot { background: var(--berry-deep); color: #fff; }
@keyframes pulse { 50% { box-shadow: 0 0 0 12px rgba(91,26,142,0); } }
.t-items { background: var(--cream); border-radius: 16px; padding: 14px 16px; display: grid; gap: 6px; }
.t-items .row { display: flex; justify-content: space-between; gap: 10px; }
.t-items .row small { color: var(--muted); display: block; font-style: italic; }
.t-items .tot { border-top: 1px dashed var(--line); padding-top: 8px; font-weight: 900; }
.t-live { text-align: center; color: var(--muted); font-size: .85rem; font-weight: 700; }
.t-acts { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }

.t-coupon { border: 2px dashed var(--berry); border-radius: 18px; padding: 16px; text-align: center; margin-bottom: 14px; display: grid; gap: 6px; }
.t-coupon[hidden] { display: none; }
.t-coupon .k { font-weight: 900; color: var(--berry); text-transform: uppercase; font-size: .8rem; letter-spacing: .08em; }
.t-coupon .b { font-weight: 800; }
.t-coupon .c { font-family: var(--font-display); font-size: 1.35rem; color: var(--grape); letter-spacing: .05em; }
.t-coupon small { color: var(--muted); font-weight: 700; }
.t-coupon .btn { justify-self: center; }

/* MODAL DO ITEM */
.sheet { position: fixed; inset: 0; background: rgba(36,16,58,.55); display: grid; place-items: center; z-index: 100; padding: 16px; backdrop-filter: blur(3px); }
.sheet[hidden] { display: none; }
.sheet-box { background: #fff; border-radius: 26px; padding: 26px; width: min(440px, 100%); position: relative; display: grid; gap: 14px; animation: up .22s ease; max-height: 92vh; overflow: auto; }
@keyframes up { from { transform: translateY(30px); opacity: 0; } }
.sheet-x { position: absolute; top: 12px; right: 14px; border: 0; background: #f1edf5; width: 36px; height: 36px; border-radius: 50%; font-size: 1.3rem; cursor: pointer; }
.sh-emo { font-size: 3rem; text-align: center; }
.sheet h3 { text-align: center; font-size: 1.5rem; color: var(--grape-ink); }
.sh-desc { text-align: center; color: var(--muted); margin: -6px 0 0; }
.stepper { display: flex; align-items: center; justify-content: center; gap: 18px; }
.stepper button { width: 46px; height: 46px; border-radius: 14px; border: 0; background: #f1edf5; color: var(--grape); font-size: 1.5rem; font-weight: 900; cursor: pointer; }
.stepper output { font-family: var(--font-display); font-size: 2rem; min-width: 50px; text-align: center; }
.grams { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.grams button { border: 2px solid var(--line); background: #fff; border-radius: 12px; padding: 10px 4px; font-weight: 800; cursor: pointer; }
.grams button.on { background: var(--grape); border-color: var(--grape); color: #fff; }
.kg-note { font-size: .82rem; color: var(--muted); text-align: center; margin: 0; }

.toast { position: fixed; left: 50%; bottom: 90px; transform: translate(-50%, 160px); background: var(--grape-ink); color: #fff; padding: 12px 20px; border-radius: 14px; font-weight: 800; z-index: 200; transition: transform .25s; max-width: calc(100% - 32px); }
.toast.show { transform: translate(-50%, 0); }

.credit { text-align: center; font-size: .85rem; color: var(--muted); padding: 10px 0 20px; }
.credit a { color: var(--grape); font-weight: 800; text-decoration: none; }

@media (max-width: 900px) {
  .shop { grid-template-columns: 1fr; }
  .cart { position: fixed; inset: auto 0 0 0; max-height: 82vh; border-radius: 24px 24px 0 0; z-index: 60; transform: translateY(105%); transition: transform .25s ease; }
  .cart.open { transform: none; box-shadow: 0 -20px 60px -10px rgba(36,16,58,.5); }
  #cart-close { display: block; }
  .bag-bar:not([hidden]) { display: flex; }
}
@media (max-width: 560px) {
  .top-in { gap: 12px; }
  .logo img { height: 32px; }
  .back { display: none; }
  .two { grid-template-columns: 1fr; }
  .plist { grid-template-columns: 1fr; }
}
