/* ==========================================================================
   FETCH THEME — cart page
   head · delivery progress · pet check · lines · auto-reorder upgrade · summary · saved · recs
   ========================================================================== */

.sec { padding-top: var(--sec); }
.sec-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px 24px; flex-wrap: wrap; margin-bottom: clamp(18px, 2.2vw, 28px); }
.sec-head .eyebrow { margin-bottom: 10px; }
@keyframes stageIn { from { opacity: 0; transform: translateY(8px); } }
@keyframes pulse { 50% { box-shadow: 0 0 0 7px rgba(63, 138, 102, .08); } }

.cart { padding-top: 14px; }
.cart__head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; padding: 16px 0 18px; }
.cart__h { font-size: clamp(34px, 4vw, 52px); letter-spacing: -.035em; display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.cart__n { font: 700 14px var(--sans); letter-spacing: 0; color: var(--text-3); padding: 4px 12px; border-radius: var(--pill); background: var(--blush); color: var(--cocoa); }
.cart__grid { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: clamp(18px, 2.6vw, 36px); align-items: start; }
.cart__main { display: grid; gap: 12px; min-width: 0; }

/* ---------- delivery progress ---------- */
.cship { padding: 14px 18px; border-radius: var(--r-m); background: var(--cream); }
.cship__top { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; font-size: 14px; line-height: 1.35; }
.cship__ico { display: grid; place-items: center; width: 36px; height: 36px; flex: none; border-radius: 12px; background: #fff; color: var(--berry); box-shadow: var(--shadow-s); }
.cship__ico--ok { background: var(--sage); color: #fff; }
.cship b { font-weight: 800; }
.cship b.hl { color: var(--berry); }
.cship__bar { height: 8px; border-radius: var(--pill); background: #fff; box-shadow: inset 0 0 0 1px var(--line); overflow: hidden; }
.cship__bar i { display: block; height: 100%; width: 0; border-radius: inherit; background: linear-gradient(90deg, var(--berry-3), var(--berry)); transition: width .8s var(--ease-out); }
.cship__bar i.ok { background: linear-gradient(90deg, #6bc79b, var(--sage)); }
.cadds { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 12px; }
.cadd { display: grid; grid-template-columns: 42px 1fr auto; gap: 10px; align-items: center; padding: 7px 8px; border-radius: var(--r-s); background: #fff; box-shadow: 0 0 0 1px var(--line); }
.cadd__img { width: 42px; height: 42px; border-radius: 10px; overflow: hidden; background: var(--tint); display: grid; place-items: center; }
.cadd__img .pack { width: 100%; height: 100%; }
.cadd b { display: block; font-size: 12.5px; font-weight: 800; line-height: 1.2; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.cadd small { font-size: 12px; color: var(--text-3); font-weight: 600; }
.cadd button { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--cocoa); color: #fff; transition: background .2s, transform .3s var(--ease-spring); }
.cadd button:hover { background: var(--berry); transform: scale(1.1); }

/* ---------- pet check ---------- */
.cwho { display: flex; align-items: center; gap: 8px; overflow-x: auto; scrollbar-width: none; padding: 2px 0; }
.cwho::-webkit-scrollbar { display: none; }
.cwho__l { flex: none; display: inline-flex; align-items: center; gap: 7px; margin-right: 4px; font-size: 13px; font-weight: 700; color: var(--text-2); }
.cwho__l .ico { color: var(--berry); }
.cw { flex: none; display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 14px 0 4px; border-radius: var(--pill); background: #fff; border: 1.5px solid var(--line); font-weight: 700; font-size: 13px; transition: all .3s var(--ease-spring); }
.cw img { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; }
.cw--all { padding-left: 14px; }
.cw:hover { border-color: var(--cocoa); }
.cw.is-on { background: var(--cocoa); border-color: var(--cocoa); color: #fff; }
.calert { display: flex; gap: 10px; align-items: flex-start; padding: 11px 14px; border-radius: var(--r-s); background: var(--berry-tint); color: var(--berry-2); font-size: 13.5px; line-height: 1.4; animation: stageIn .4s var(--ease-out) both; }
.calert .ico { flex: none; margin-top: 1px; stroke-width: 2.3; }
.calert--ok { background: var(--sage-tint); color: #1d5a40; }

/* ---------- lines ---------- */
.clines { display: grid; gap: 10px; }
.cl { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 16px; padding: 14px; border-radius: var(--r-l); background: #fff; box-shadow: 0 0 0 1px var(--line); animation: stageIn .5s var(--ease-out) both; transition: box-shadow .3s; }
.cl:hover { box-shadow: 0 0 0 1px var(--line), var(--shadow-s); }
.cl.is-no { box-shadow: 0 0 0 1.5px rgba(198, 61, 104, .45); }
.cl__img { position: relative; width: 112px; height: 124px; border-radius: var(--r-m); overflow: hidden; background: var(--tint, var(--cream)); }
.cl__img .pack { width: 100%; height: 100%; }
.cl__body { display: grid; gap: 10px; min-width: 0; align-content: start; }
.cl__top { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.cl__name { font-weight: 800; font-size: 16px; line-height: 1.25; letter-spacing: -.01em; }
.cl__name:hover { color: var(--berry); }
.cl__var { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 4px; font-size: 13px; color: var(--text-3); font-weight: 600; }
.cl__fit { display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 9px; border-radius: var(--pill); font-size: 11.5px; font-weight: 800; }
.cl__fit .ico { width: 12px; height: 12px; stroke-width: 2.6; }
.cl__fit--ok { background: var(--sage-tint); color: #1d5a40; }
.cl__fit--warn { background: var(--butter-tint); color: #6e4a00; }
.cl__fit--no { background: var(--berry-tint); color: var(--berry-2); }
.cl__price { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.cl__price b { display: block; font-size: 18px; font-weight: 800; letter-spacing: -.02em; }
.cl__price s { font-size: 13px; color: var(--text-3); }
.cl__price small { display: block; font-size: 12px; color: var(--text-3); font-weight: 600; }
.cl__mode { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.mseg { display: inline-flex; padding: 3px; border-radius: var(--pill); background: var(--cream); }
.mseg button { display: inline-flex; align-items: center; gap: 5px; height: 30px; padding: 0 13px; border-radius: var(--pill); font-size: 12.5px; font-weight: 800; color: var(--text-2); transition: all .25s var(--ease); white-space: nowrap; }
.mseg button:hover { color: var(--cocoa); }
.mseg button[aria-checked="true"] { background: #fff; color: var(--cocoa); box-shadow: var(--shadow-s); }
.mseg button.sub[aria-checked="true"] { background: var(--sage); color: #fff; }
.cl__wk { position: relative; }
.cl__wk select { height: 36px; padding: 0 28px 0 12px; border-radius: var(--pill); border: 1.5px solid rgba(36, 102, 74, .3); background: var(--sage-tint); color: #1d5a40; font-weight: 800; font-size: 12.5px; appearance: none; cursor: pointer; }
.cl__wk .ico { position: absolute; right: 9px; top: 11px; width: 14px; height: 14px; pointer-events: none; color: #1d5a40; }
.cl__row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.cl .qty { height: 38px; }
.cl__act { display: flex; gap: 14px; margin-left: auto; }
.cl__act button { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700; color: var(--text-2); text-decoration: underline; text-decoration-color: transparent; text-underline-offset: 3px; transition: color .2s, text-decoration-color .2s; }
.cl__act button:hover { color: var(--berry); text-decoration-color: currentColor; }
.cl__act .ico { width: 15px; height: 15px; }

/* ---------- auto-reorder upgrade ---------- */
.cup:empty { display: none; }
.cup__in { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: var(--r-l); background: var(--sage-tint); animation: stageIn .5s var(--ease-out) both; }
.cup__ico { display: grid; place-items: center; width: 44px; height: 44px; flex: none; border-radius: 14px; background: var(--sage); color: #fff; }
.cup b { display: block; font-size: 14.5px; font-weight: 800; color: #1d5a40; }
.cup small { font-size: 13px; color: #24664a; }
.cup .btn { margin-left: auto; flex: none; }

/* ---------- summary ---------- */
.sum { position: sticky; top: calc(var(--head-h) + 16px); display: grid; gap: 14px; padding: 20px; border-radius: var(--r-l); background: #fff; box-shadow: 0 0 0 1px var(--line), var(--shadow-m); }
.sum h2 { font: 600 24px/1 var(--display); letter-spacing: -.025em; font-variation-settings: "SOFT" 100, "WONK" 1; }
.srow { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; font-size: 14px; color: var(--text-2); font-variant-numeric: tabular-nums; }
.srow b { color: var(--cocoa); font-weight: 700; }
.srow--save, .srow--save b { color: #1d5a40; font-weight: 800; }
.srow--free b { color: #1d5a40; }
.stotal { display: flex; justify-content: space-between; align-items: baseline; padding-top: 14px; border-top: 1px dashed var(--line-2); }
.stotal span { font-weight: 800; font-size: 15px; }
.stotal b { font: 600 34px/1 var(--display); letter-spacing: -.035em; font-variation-settings: "SOFT" 100, "WONK" 1; font-variant-numeric: tabular-nums; }
.stotal small { display: block; font-size: 12px; font-weight: 600; color: var(--text-3); text-align: right; margin-top: 4px; font-family: var(--sans); letter-spacing: 0; }
.sfield { display: grid; gap: 6px; }
.sfield > label, .sfield > .lab { font-size: 12px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--text-3); }
.ssel { position: relative; }
.ssel select { width: 100%; height: 42px; padding: 0 34px 0 14px; border-radius: var(--r-s); border: 1.5px solid var(--line); background: #fff; font-weight: 700; font-size: 14px; appearance: none; cursor: pointer; }
.ssel select:hover { border-color: var(--cocoa); }
.ssel .ico { position: absolute; right: 12px; top: 13px; width: 16px; height: 16px; pointer-events: none; color: var(--text-3); }
.seta { display: flex; align-items: center; gap: 10px; font-size: 13px; line-height: 1.35; margin-top: 2px; }
.seta .dot { flex: none; width: 9px; height: 9px; border-radius: 50%; background: var(--sage); box-shadow: 0 0 0 4px rgba(63, 138, 102, .2); animation: pulse 2s 3; }
.seta b { font-weight: 800; }
.promo { display: flex; gap: 6px; }
.promo input { flex: 1; min-width: 0; height: 42px; padding: 0 14px; border-radius: var(--r-s); border: 1.5px solid var(--line); background: #fff; font-weight: 700; font-size: 14px; text-transform: uppercase; letter-spacing: .04em; outline: 0; }
.promo input::placeholder { text-transform: none; letter-spacing: 0; font-weight: 500; color: var(--text-3); }
.promo input:focus { border-color: var(--cocoa); box-shadow: var(--focus); }
.promo .btn { flex: none; }
.pmsg { font-size: 12.5px; font-weight: 600; margin-top: 2px; }
.pmsg--err { color: var(--berry-2); }
.pmsg--hint { color: var(--text-3); }
.papplied { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 12px; border-radius: var(--r-s); background: var(--sage-tint); color: #1d5a40; font-size: 13.5px; font-weight: 800; }
.papplied span { display: inline-flex; align-items: center; gap: 8px; }
.papplied button { font-size: 12.5px; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
.note summary { display: flex; align-items: center; gap: 8px; list-style: none; cursor: pointer; font-size: 13.5px; font-weight: 700; color: var(--text-2); }
.note summary::-webkit-details-marker { display: none; }
.note summary:hover { color: var(--berry); }
.note summary .ico { width: 16px; height: 16px; color: var(--berry); }
.note textarea { width: 100%; min-height: 76px; margin-top: 10px; padding: 12px 14px; border-radius: var(--r-s); border: 1.5px solid var(--line); background: #fff; font-size: 14px; resize: vertical; outline: 0; }
.note textarea:focus { border-color: var(--cocoa); box-shadow: var(--focus); }
.recur { padding: 12px 14px; border-radius: var(--r-m); background: var(--sage-tint); font-size: 13px; line-height: 1.45; color: #1d5a40; }
.recur b { display: flex; align-items: center; gap: 7px; font-size: 13.5px; font-weight: 800; margin-bottom: 4px; }
.recur ul { display: grid; gap: 3px; }
.recur li { display: flex; justify-content: space-between; gap: 10px; }
.sbtns { display: grid; gap: 8px; }
.sbtns .btn { width: 100%; }
.sbtns .btn--gcash { background: #0a6cff; color: #fff; }
.sbtns .btn--gcash:hover { background: #0856cc; transform: translateY(-2px); }
.sbtns .or { display: flex; align-items: center; gap: 10px; font-size: 12px; font-weight: 700; color: var(--text-3); }
.sbtns .or::before, .sbtns .or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.strust { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 14px; font-size: 12px; font-weight: 700; color: var(--text-2); }
.strust span { display: inline-flex; align-items: center; gap: 6px; }
.strust .ico { width: 15px; height: 15px; color: var(--sage); stroke-width: 2.2; }
.spay { display: flex; justify-content: center; gap: 6px; flex-wrap: wrap; }
.spay span { padding: 4px 9px; border-radius: 6px; background: var(--cream); font-weight: 800; font-size: 10.5px; letter-spacing: .05em; color: var(--text-2); }

/* ---------- empty ---------- */
.cempty { display: grid; justify-items: center; text-align: center; gap: 14px; padding: clamp(40px, 7vw, 84px) 16px; border-radius: var(--r-xl); background: radial-gradient(60% 80% at 50% 0%, rgba(255, 201, 77, .35), transparent 70%), var(--blush); }
.cempty[hidden] { display: none; }
.cempty__ico { display: grid; place-items: center; width: 72px; height: 72px; border-radius: 24px; background: #fff; color: var(--berry); box-shadow: var(--shadow-m); transform: rotate(-6deg); }
.cempty__ico .ico { width: 32px; height: 32px; }
.cempty h2 { font-size: clamp(30px, 4vw, 46px); letter-spacing: -.035em; }
.cempty p { color: var(--text-2); max-width: 44ch; }
.cempty__btns { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 6px; }

/* ---------- saved ---------- */
.csaved__row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.sv { display: grid; grid-template-columns: 76px 1fr; gap: 14px; align-items: center; padding: 10px 14px 10px 10px; border-radius: var(--r-m); background: #fff; box-shadow: 0 0 0 1px var(--line); animation: stageIn .45s var(--ease-out) both; }
.sv__img { width: 76px; height: 76px; border-radius: 14px; overflow: hidden; background: var(--tint); display: grid; place-items: center; }
.sv__img .pack { width: 100%; height: 100%; }
.sv b { display: block; font-size: 14px; font-weight: 800; line-height: 1.25; }
.sv small { display: block; color: var(--text-3); font-size: 12.5px; font-weight: 600; margin: 2px 0 8px; }
.sv__act { display: flex; align-items: center; gap: 10px; }
.sv__act .link { font-size: 12.5px; }

/* ---------- recs ---------- */
.pgrid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.pgrid .pc { animation: cardIn .55s var(--ease-out) both; animation-delay: calc(var(--n, 0) * 60ms); }
@keyframes cardIn { from { opacity: 0; transform: translateY(14px); } }

/* ---------- sticky checkout (phones) ---------- */
.cstick { position: fixed; left: 0; right: 0; bottom: 0; z-index: 70; padding: 10px 0 calc(10px + env(safe-area-inset-bottom)); background: rgba(255, 250, 245, .98); box-shadow: 0 -1px 0 var(--line), 0 -14px 30px -18px rgba(42, 26, 24, .3); transform: translateY(110%); visibility: hidden; transition: transform .5s var(--ease-out), visibility 0s .5s; }
.cstick.is-on { transform: none; visibility: visible; transition-delay: 0s; }
.cstick__in { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.cstick small { display: block; font-size: 12px; font-weight: 700; color: var(--text-3); }
.cstick b { font: 600 26px/1 var(--display); letter-spacing: -.03em; font-variation-settings: "SOFT" 100; font-variant-numeric: tabular-nums; }
.cstick .btn { flex: 1; max-width: 240px; }

/* ---------- responsive ---------- */
@media (max-width: 1000px) {
  .cart__grid { grid-template-columns: minmax(0, 1fr); }
  .sum { position: static; }
  .pgrid { grid-template-columns: repeat(2, 1fr); }
  .csaved__row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 761px) { .cstick { display: none; } }
@media (max-width: 760px) {
  body { padding-bottom: 76px; }
  .cadds { grid-template-columns: 1fr; }
  .cl { grid-template-columns: 84px minmax(0, 1fr); gap: 12px; padding: 12px; }
  .cl__img { width: 84px; height: 96px; }
  .cl__name { font-size: 14.5px; }
  .cl__price b { font-size: 16px; }
  .cl__act { margin-left: 0; width: 100%; }
  .cup__in { flex-wrap: wrap; }
  .cup .btn { width: 100%; margin: 0; }
  .pgrid { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 64%; overflow-x: auto; scroll-snap-type: x mandatory; margin-inline: calc(var(--gutter) * -1); padding: 4px var(--gutter) 14px; scrollbar-width: none; }
  .pgrid::-webkit-scrollbar { display: none; }
  .pgrid .pc { scroll-snap-align: start; }
  .csaved__row { grid-template-columns: minmax(0, 1fr); }
  .sec { padding-top: clamp(36px, 8vw, 52px); }
}
@media (max-width: 460px) {
  .cl__top { flex-direction: column; gap: 4px; }
  .cl__price { text-align: left; display: flex; gap: 8px; align-items: baseline; }
  .cl__price small { display: none; }
}

@media (max-width: 460px) {
  .cl__mode { min-width: 0; }
  .mseg { max-width: 100%; }
  .mseg button { padding: 0 11px; font-size: 12px; min-width: 0; }
  .mseg button .ico { display: none; }
}

.cart__n:empty { display: none; }
.cempty .btn--soft { background: #fff; box-shadow: var(--shadow-s); }
.cempty .btn--soft:hover { background: var(--cocoa); color: #fff; }
