/* Kinana — full cart page. Builds on site.css tokens (--brand, --paper, …). RTL-native. */

.cartpage { padding: 34px 0 70px; }
.cart-head { margin-bottom: 22px; }
.cart-head h1 { font-family: 'El Messiri', serif; font-size: 2rem; color: var(--espresso); }
.cart-head .sub { color: var(--ink-soft); font-size: .95rem; margin-top: 4px; }

.cart-grid { display: grid; grid-template-columns: minmax(0,1fr) 372px; gap: 26px; align-items: start; }
@media (max-width: 940px) { .cart-grid { grid-template-columns: 1fr; } }

/* ---- panels ------------------------------------------------------------- */
.cpanel { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); padding: 20px 22px; }
.cpanel + .cpanel { margin-top: 22px; }
.cpanel-h { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.cpanel-h h2 { font-family: 'El Messiri', serif; font-size: 1.28rem; color: var(--espresso); }
.cpanel-h .count { margin-inline-start: auto; font-size: .8rem; font-weight: 700; color: var(--brand);
  background: var(--cream-2); padding: 3px 11px; border-radius: 999px; }

/* ---- cart line ---------------------------------------------------------- */
.cline { display: grid; grid-template-columns: 72px minmax(0,1fr) auto; gap: 15px; align-items: center;
  padding: 16px 0; border-bottom: 1px solid var(--line); }
.cline:last-child { border-bottom: none; }
.cthumb { width: 72px; height: 80px; border-radius: var(--r-sm); background: var(--cream-2);
  display: grid; place-items: center; overflow: hidden; }
.cthumb img { width: 100%; height: 100%; object-fit: cover; }
.cthumb svg { width: 60px; height: 72px; }
.cinfo { min-width: 0; }
.cinfo .cname { font-family: 'El Messiri', serif; font-weight: 600; font-size: 1.06rem; color: var(--espresso);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cmeta { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 9px; }
.cmeta .tag { font-size: .72rem; font-weight: 600; color: var(--ink-soft); background: var(--cream-2);
  padding: 2px 9px; border-radius: 999px; }
.cprice { font-size: .86rem; color: var(--espresso); font-weight: 600; }
.cprice s { color: var(--ink-soft); font-weight: 400; margin-inline-end: 6px; }
.cline-r { display: flex; flex-direction: column; align-items: flex-end; gap: 10px; }
.cline-total { font-family: 'El Messiri', serif; font-weight: 600; font-size: 1.1rem; color: var(--brand); white-space: nowrap; }

/* qty stepper */
.qstep { display: inline-flex; align-items: center; border: 1.5px solid var(--line); border-radius: 11px; overflow: hidden; }
.qstep button { width: 30px; height: 30px; border: none; background: var(--paper); color: var(--brand);
  font-size: 1.05rem; cursor: pointer; transition: background .15s; }
.qstep button:hover { background: var(--cream-2); }
.qstep button:disabled { opacity: .4; cursor: not-allowed; }
.qstep span { min-width: 30px; text-align: center; font-weight: 700; font-size: .9rem; color: var(--espresso); }

/* line actions */
.cactions { display: flex; gap: 14px; }
.clink { font-size: .76rem; color: var(--ink-soft); background: none; border: none; cursor: pointer;
  display: inline-flex; align-items: center; gap: 4px; padding: 0; transition: color .15s; }
.clink:hover { color: var(--brand); }
.clink.danger:hover { color: #a23b2a; }
.clink svg { width: 14px; height: 14px; }

/* ---- empty -------------------------------------------------------------- */
.cempty { text-align: center; padding: 50px 20px; color: var(--ink-soft); }
.cempty img { width: 84px; height: 84px; opacity: .8; margin-bottom: 14px; }
.cempty p { margin-bottom: 18px; }

/* ---- summary ------------------------------------------------------------ */
.csum { position: sticky; top: 92px; }
.csum .row { display: flex; justify-content: space-between; align-items: center; padding: 9px 0;
  font-size: .92rem; color: var(--ink-soft); }
.csum .row .v { font-weight: 600; color: var(--espresso); }
.csum .row.save .v, .csum .row.coupon .v { color: var(--ok); }
.csum .divider { height: 1px; background: var(--line); margin: 6px 0; }
.csum .row.grand { padding-top: 12px; border-top: 2px solid var(--line); margin-top: 6px;
  font-family: 'El Messiri', serif; font-size: 1.32rem; color: var(--espresso); font-weight: 700; }
.csum .row.grand .v { color: var(--brand); }
.csum .btn { width: 100%; justify-content: center; margin-top: 16px; }

/* free-ship progress */
.freeship { background: var(--cream-2); border-radius: var(--r-sm); padding: 11px 13px; margin-bottom: 14px; font-size: .82rem; color: var(--espresso); }
.freeship.done { color: var(--ok); font-weight: 600; }
.fsbar { height: 7px; border-radius: 99px; background: rgba(90,51,24,.14); margin-top: 8px; overflow: hidden; }
.fsbar i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--gold), var(--brand)); transition: width .4s; }

/* ---- coupon ------------------------------------------------------------- */
.coupon-box { display: flex; gap: 9px; }
.coupon-box input { flex: 1; min-width: 0; padding: 11px 14px; border: 1.5px solid var(--line); border-radius: 12px;
  background: var(--cream); font: inherit; font-size: .9rem; color: var(--espresso); }
.coupon-box input:focus { outline: none; border-color: var(--brand-2); }
.coupon-box .btn { padding: 11px 20px; }
.coupon-msg { font-size: .8rem; margin-top: 9px; min-height: 1em; }
.coupon-msg.ok { color: var(--ok); }
.coupon-msg.err { color: #c0463b; }
.coupon-applied { display: flex; align-items: center; gap: 10px; margin-top: 10px; background: rgba(63,125,79,.1);
  border: 1px solid rgba(63,125,79,.3); border-radius: 12px; padding: 9px 13px; font-size: .85rem; color: var(--ok); font-weight: 600; }
.coupon-applied .x { margin-inline-start: auto; cursor: pointer; color: var(--ink-soft); background: none; border: none; font-size: 1.1rem; line-height: 1; }
.coupon-applied .x:hover { color: #a23b2a; }

/* ---- saved for later / suggestions grids -------------------------------- */
.mini-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 16px; }
.mini { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-sm); overflow: hidden;
  display: flex; flex-direction: column; transition: transform .18s, box-shadow .18s, border-color .18s; }
.mini:hover { transform: translateY(-4px); box-shadow: var(--shadow-lift); border-color: var(--gold-soft); }
.mini .mthumb { aspect-ratio: 4/3; background: var(--cream-2); display: grid; place-items: center; overflow: hidden; }
.mini .mthumb img { width: 100%; height: 100%; object-fit: cover; }
.mini .mthumb svg { width: 70px; height: 84px; }
.mini .mb { padding: 12px 13px 14px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.mini .mname { font-family: 'El Messiri', serif; font-weight: 600; font-size: .98rem; color: var(--espresso);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini .mmeta { font-size: .74rem; color: var(--ink-soft); }
.mini .mprice { font-weight: 700; color: var(--brand); font-size: .95rem; margin-top: 2px; }
.mini .mprice s { color: var(--ink-soft); font-weight: 400; font-size: .8rem; margin-inline-end: 5px; }
.mini .mbtn { margin-top: 9px; display: flex; gap: 7px; }
.mini .mbtn button { flex: 1; padding: 9px 10px; border-radius: 10px; border: 1.5px solid var(--brand);
  background: var(--brand); color: #fff; font: inherit; font-size: .8rem; font-weight: 600; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; gap: 5px; transition: filter .15s, background .15s; }
.mini .mbtn button:hover { filter: brightness(1.08); }
.mini .mbtn button.ghost { background: var(--paper); color: var(--brand); }
.mini .mbtn button.ghost:hover { background: var(--cream-2); filter: none; }
.mini .mbtn button svg { width: 14px; height: 14px; }

.csection { margin-top: 30px; }
.csection > .cpanel-h h2 { font-size: 1.45rem; }

/* small busy state */
.is-busy { opacity: .55; pointer-events: none; }
