/* Cart page (templates/storefront/cart/cart.html). Builds on panels.css + samudhra.css. */
.cart-grid { display: grid; grid-template-columns: minmax(0, 1fr) 400px; gap: clamp(16px, 2vw, 28px); align-items: start; }
.cart-side { display: grid; gap: 14px; position: sticky; top: calc(var(--hdr-h) + 64px); }
.cart-side .panel + .panel { margin-top: 0; }

/* free delivery progress */
.free-card { background: var(--surface); border-radius: 20px; padding: 14px 16px; box-shadow: var(--shadow); }
.free-top { display: flex; gap: 12px; align-items: center; }
.free-top b { display: block; font-size: .94rem; }
.free-top span span { font-size: .78rem; color: var(--muted); }
.free-card .bar { height: 9px; border-radius: 9px; background: var(--surface-2); margin-top: 12px; overflow: hidden; }
.free-card .bar i { display: block; height: 100%; width: var(--w); border-radius: 9px; background: linear-gradient(90deg, var(--brand), var(--brand-pale)); position: relative; overflow: hidden; animation: growW 1.1s var(--ease) .2s both; }
.free-card .bar i::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, transparent, rgba(255,255,255,.6), transparent); animation: shine 1.6s linear infinite; }
@keyframes growW { from { width: 0; } }

/* lines */
.cart-lines { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.line.cl { grid-template-columns: 88px minmax(0, 1fr) auto; align-items: start; margin: 0; padding: 12px; border-radius: 20px; transition: transform .35s var(--ease), box-shadow .35s var(--ease); }
.line.cl:hover { box-shadow: var(--shadow-lg); }
.cl-img { position: relative; width: 88px; height: 88px; border-radius: 15px; overflow: hidden; background: var(--white); display: block; }
.cl-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.line.cl:hover .cl-img img { transform: scale(1.07); }
.cl-img .ph-ic { width: 100%; height: 100%; border-radius: 0; font-size: 2.2rem; }
.cl-img .marker { top: 6px; right: auto; left: 6px; width: 14px; height: 14px; }
.cl-img .marker::after { width: 6px; height: 6px; }
.cl-body { min-width: 0; padding-top: 2px; }
.cl-body .lname { font-size: .96rem; }
.cl-side { display: flex; flex-direction: column; align-items: flex-end; justify-content: space-between; gap: 10px; align-self: stretch; }
.cl-price { text-align: right; display: flex; flex-direction: column; align-items: flex-end; line-height: 1.2; }
.cl-price b { font-family: var(--f-display); font-size: 1.14rem; letter-spacing: -.03em; }
.cl-price s { font-size: .76rem; color: var(--muted); }
.cl-price small { font-size: .72rem; color: var(--muted); }
.cl-ctl { display: flex; align-items: center; gap: 6px; }
.cl-ctl .stepper { animation: none; box-shadow: none; height: 36px; min-width: 96px; }
.cl-rm { width: 36px; height: 36px; border-radius: 11px; border: 0; background: var(--surface-2); color: var(--ink-2); display: inline-flex; align-items: center; justify-content: center; gap: 4px; cursor: pointer; transition: background .2s, color .2s; font-weight: 800; font-size: .8rem; }
.cl-rm .ms { font-size: 19px; }
.cl-rm:hover { background: color-mix(in srgb, var(--hot) 13%, var(--surface)); color: var(--hot); }
.cl-rm.wide { width: auto; padding: 0 12px; }
.line.cl.removing { animation: lineOut .35s var(--ease) forwards; }
.line.cl.busy { opacity: .6; pointer-events: none; }

/* coupons */
.tickets { display: grid; gap: 8px; margin-bottom: 12px; }
.ticket { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; align-items: center; gap: 10px; width: 100%; text-align: left; border: 0; cursor: pointer; padding: 10px 12px 10px 10px; border-radius: 16px; background: var(--mint); color: var(--ink); position: relative; transition: transform .3s var(--spring), box-shadow .25s; box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--brand) 30%, transparent); font: inherit; }
.ticket:hover { transform: translateY(-2px); box-shadow: inset 0 0 0 2px var(--brand); }
.ticket .tk-l { width: 44px; height: 44px; border-radius: 13px; background: var(--brand); color: var(--on-brand); display: grid; place-items: center; }
.ticket .tk-l .ms { font-size: 22px; }
.ticket .tk-m { min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.ticket .tk-m small { font-size: .64rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--hot); }
.ticket .tk-m b { font-size: .88rem; line-height: 1.25; }
.ticket .tk-code { font-family: var(--f-display); font-weight: 800; letter-spacing: .14em; font-size: .78rem; color: var(--brand); }
.ticket .tk-c { font-size: .72rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ticket .tk-go { font-weight: 800; font-size: .76rem; letter-spacing: .06em; text-transform: uppercase; color: var(--brand); }
.ticket.hot { background: color-mix(in srgb, var(--hot) 9%, var(--surface)); box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--hot) 35%, transparent); }
.ticket.hot .tk-l { background: var(--hot); color: var(--on-hot); }
.ticket.hot .tk-go { color: var(--hot); }
.ticket.hot:hover { box-shadow: inset 0 0 0 2px var(--hot); }
.cp.shake { animation: shake .35s; }
@keyframes shake { 25% { transform: translateX(-8px); } 50% { transform: translateX(8px); } 75% { transform: translateX(-4px); } }
.cp-on { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 12px; border-radius: 16px; background: color-mix(in srgb, var(--veg) 12%, var(--surface)); box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--veg) 40%, transparent); font-size: .86rem; }
.cp-on > .ms { color: var(--veg); font-size: 26px; }
.cp-on b { letter-spacing: .08em; }
.cp-on small { display: block; color: var(--ink-2); font-size: .76rem; }
.cp-on small b { letter-spacing: 0; color: var(--veg); }
.cp-on button { border: 0; background: none; color: var(--ink-2); font-weight: 800; font-size: .76rem; text-decoration: underline; cursor: pointer; }
.cp-on button:hover { color: var(--hot); }

/* points + weekly link cards */
.pts-card, .weekly { display: grid; grid-template-columns: auto minmax(0, 1fr) 18px; gap: 12px; align-items: center; transition: transform .35s var(--ease), box-shadow .35s; }
.pts-card:hover, .weekly:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.pts-card b, .weekly b { display: block; font-size: .92rem; }
.pts-card small, .weekly small { display: block; font-size: .78rem; color: var(--muted); margin-top: 2px; }
.pts-card > svg, .weekly > svg { width: 18px; color: var(--muted); }
.coin { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; background: radial-gradient(circle at 35% 30%, #FFE68A, #F5B82E 70%); color: #8A5A00; font-weight: 800; font-size: 1.1rem; box-shadow: inset 0 -3px 0 rgba(0,0,0,.12); animation: coinFlip 4s ease-in-out infinite; }
@keyframes coinFlip { 0%, 70%, 100% { transform: rotateY(0); } 85% { transform: rotateY(180deg); } }
.weekly { background: linear-gradient(120deg, var(--surface), color-mix(in srgb, var(--brand) 10%, var(--surface))); }

/* bill */
.bill-card .free { color: var(--veg); }
.bill-card .save { margin-top: 12px; }
.bill-card .go { margin-top: 16px; height: 56px; border-radius: 16px; font-size: .98rem; box-shadow: var(--shadow-brand); }
.bill-card span.go { opacity: .5; box-shadow: none; cursor: not-allowed; }
.secure { display: flex; align-items: center; justify-content: center; gap: 6px; margin-top: 10px; font-size: .76rem; color: var(--muted); font-weight: 600; }
.secure svg { width: 14px; }

.empty-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }

/* coupon celebration */
.celebrate .modal-card { max-width: 340px; padding: 0 0 20px; text-align: center; overflow: hidden; }
.cel-top { position: relative; height: 112px; display: grid; place-items: center; overflow: hidden; background: radial-gradient(circle at 50% 30%, #2F86FF, #0B3E91 75%); }
.cel-badge { width: 66px; height: 66px; border-radius: 50%; background: var(--white); display: grid; place-items: center; font-size: 2rem; box-shadow: 0 14px 30px -8px rgba(0,0,0,.45); animation: pctIn .8s var(--spring) .1s both; }
.celebrate .modal-card .eyebrow { margin-top: 18px; color: var(--brand); font-size: .78rem; }
.celebrate .modal-card .cel-amt { font-family: var(--f-display); font-weight: 800; font-size: 2rem; letter-spacing: -.04em; margin-top: 4px; color: var(--ink); }
.celebrate .cel-sub { margin-top: 2px; }
.celebrate .btn { width: calc(100% - 40px); margin: 18px 20px 0; }
.cel-top i { position: absolute; top: -12px; width: 8px; height: 12px; border-radius: 2px; animation: celFall 1.6s ease-in forwards; }
@keyframes celFall { to { transform: translate3d(var(--x), 150px, 0) rotate(var(--r)); opacity: .2; } }

@media (max-width: 1100px) { .cart-grid { grid-template-columns: minmax(0, 1fr) 360px; } }
@media (max-width: 960px) {
  .cart-grid { grid-template-columns: 1fr; }
  .cart-side { position: static; }
}
@media (max-width: 767px) {
  .line.cl { grid-template-columns: 72px minmax(0, 1fr); gap: 10px 12px; }
  .cl-img { width: 72px; height: 72px; border-radius: 13px; }
  .cl-side { grid-column: 1 / -1; flex-direction: row-reverse; align-items: center; border-top: 1px dashed var(--line); padding-top: 10px; }
  .cl-price { flex-direction: row; align-items: baseline; gap: 6px; }
}
.cl-ctl .stepper button { display: grid; place-items: center; line-height: 1; padding-bottom: 2px; }
