/* ===== ITEM PHOTO: square crop ===== */
.crop-ov { position: fixed; inset: 0; z-index: 10020; background: #0b1626; color: #fff; display: flex; flex-direction: column; }
.crop-top { padding: 14px 18px 6px; }
.crop-title { font-family: 'Rajdhani', sans-serif; font-size: 1.3rem; font-weight: 700; }
.crop-sub { font-size: 0.78rem; opacity: .7; margin-top: 2px; }
.crop-body { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; padding: 10px; }
.crop-frame { position: relative; overflow: hidden; background: #222; touch-action: none; cursor: grab; box-shadow: 0 0 0 2px #fff; }
.crop-frame:active { cursor: grabbing; }
.crop-frame img { position: absolute; left: 0; top: 0; max-width: none; transform-origin: 0 0; user-select: none; pointer-events: none; }
.crop-grid { position: absolute; inset: 0; pointer-events: none;
  background:
    linear-gradient(rgba(255,255,255,.35), rgba(255,255,255,.35)) 33.33% 0 / 1px 100% no-repeat,
    linear-gradient(rgba(255,255,255,.35), rgba(255,255,255,.35)) 66.66% 0 / 1px 100% no-repeat,
    linear-gradient(rgba(255,255,255,.35), rgba(255,255,255,.35)) 0 33.33% / 100% 1px no-repeat,
    linear-gradient(rgba(255,255,255,.35), rgba(255,255,255,.35)) 0 66.66% / 100% 1px no-repeat; }
.crop-zoom { display: flex; align-items: center; gap: 12px; width: min(90vw, 380px); font-size: 1.2rem; }
.crop-zoom input { flex: 1; accent-color: #fff; }
.crop-zb { width: 34px; height: 34px; border-radius: 50%; border: 1px solid rgba(255,255,255,.35); background: rgba(255,255,255,.1); color: #fff; font-size: 1.2rem; font-weight: 700; line-height: 1; cursor: pointer; flex-shrink: 0; }
.crop-zb:hover { background: rgba(255,255,255,.22); }
.crop-foot { display: flex; gap: 10px; justify-content: flex-end; padding: 12px 18px 18px; }
.crop-btn { padding: 8px 18px; border-radius: 8px; font-family: inherit; font-size: 0.88rem; font-weight: 700; cursor: pointer; }
.crop-cancel { background: rgba(255,255,255,.1); color: #fff; border: 1px solid rgba(255,255,255,.3); }
.crop-save { min-width: 130px; border: none; color: #fff; background: linear-gradient(135deg, var(--green), var(--green2)); }

/* ===== MOBILE PO — shopping style ===== */
.mpo { position: fixed; inset: 0; z-index: 450; background: #eef2f8; display: none; flex-direction: column; }
#mpo-page { flex: 1; overflow-y: auto; padding-bottom: 96px; -webkit-overflow-scrolling: touch; }
.mpo-top { position: sticky; top: 0; z-index: 3; display: flex; align-items: center; gap: 10px; padding: 10px 12px; color: #fff; background: linear-gradient(135deg, var(--navy), #234d78); }
.mpo-top h1 { flex: 1; margin: 0; color: #fff !important; font-size: 1.05rem; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mpo-back { width: 34px; height: 34px; border-radius: 10px; border: none; background: rgba(255,255,255,.15); color: #fff; font-size: 1.4rem; line-height: 1; cursor: pointer; }
.mpo-cartic { position: relative; width: 40px; height: 34px; border-radius: 10px; border: none; background: rgba(255,255,255,.15); color: #fff; font-size: 1rem; cursor: pointer; }
.mpo-cartic b { position: absolute; top: -6px; right: -6px; min-width: 18px; height: 18px; border-radius: 9px; background: var(--orange); font-size: 0.68rem; display: flex; align-items: center; justify-content: center; }
.mpo-search { position: sticky; top: 66px; z-index: 2; box-shadow: 0 0 0 14px #eef2f8; display: flex; align-items: center; gap: 8px; margin: 12px 12px 4px; padding: 0 12px; height: 42px; background: #fff; border: 1px solid var(--border); border-radius: 12px; color: var(--muted); }
.mpo-search input { flex: 1; border: none; outline: none; background: transparent; font-size: 0.92rem; font-family: inherit; color: var(--text); }
.mpo-sec { margin: 14px 14px 8px; font-size: 0.72rem; font-weight: 800; letter-spacing: .4px; text-transform: uppercase; color: var(--muted); }
.mpo-empty { grid-column: 1 / -1; text-align: center; color: var(--muted); padding: 40px 10px; font-size: 0.9rem; }
.mpo-noimg { font-size: 1.5rem; font-weight: 800; color: #9aa7b8; }
/* category tiles */
.mpo-cats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; padding: 0 12px; }
.mpo-cat { background: #fff; border-radius: 14px; padding: 8px 6px 10px; text-align: center; box-shadow: 0 2px 8px rgba(15,37,64,.07); cursor: pointer; }
.mpo-cat-img { aspect-ratio: 1 / 1; border-radius: 12px; overflow: hidden; background: #f1f4f9; display: flex; align-items: center; justify-content: center; margin-bottom: 6px; }
.mpo-cat-img img { width: 100%; height: 100%; object-fit: cover; }
.mpo-cat-n { font-size: 0.78rem; font-weight: 700; color: var(--text); line-height: 1.2; min-height: 2.4em; display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; word-break: break-word; }
.mpo-cat-c { font-size: 0.7rem; color: var(--muted); }
/* item cards */
.mpo-items { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; padding: 0 12px; }
.mpo-it { background: #fff; border-radius: 14px; overflow: hidden; box-shadow: 0 2px 8px rgba(15,37,64,.07); display: flex; flex-direction: column; }
.mpo-it-img { position: relative; aspect-ratio: 1 / 1; background: #f1f4f9; display: flex; align-items: center; justify-content: center; cursor: zoom-in; }
.mpo-it-img img { width: 100%; height: 100%; object-fit: cover; }
.mpo-stk { position: absolute; left: 8px; top: 8px; padding: 2px 6px; border-radius: 6px; background: #fff; color: var(--green); font-size: 0.66rem; font-weight: 700; }
.mpo-stk0 { color: var(--red); }
.mpo-it-b { padding: 8px 10px 10px; display: flex; flex-direction: column; gap: 2px; flex: 1; }
.mpo-it-nm { font-size: 0.8rem; font-weight: 700; color: var(--text); line-height: 1.25; min-height: 2.5em; display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.mpo-it-sku { font-size: 0.7rem; color: var(--muted); font-family: monospace; }
.mpo-it-row { display: flex; align-items: center; justify-content: space-between; gap: 6px; margin-top: auto; padding-top: 6px; }
.mpo-it-pr { font-size: 0.8rem; font-weight: 800; color: var(--text); }
.mpo-it-pr small { font-weight: 500; color: var(--muted); }
.mpo-add { padding: 5px 14px; border-radius: 8px; border: 1.5px solid var(--green); background: #f1faf5; color: var(--green); font-size: 0.8rem; font-weight: 800; cursor: pointer; font-family: inherit; }
.mpo-step { display: flex; align-items: center; border-radius: 8px; background: var(--green); color: #fff; flex-shrink: 0; }
.mpo-step button { width: 28px; height: 28px; border: none; background: none; color: #fff; font-size: 1.05rem; font-weight: 800; cursor: pointer; }
.mpo-step span { min-width: 22px; text-align: center; font-size: 0.82rem; font-weight: 800; }
/* cart bar */
.mpo-bar { position: absolute; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom, 0px)); z-index: 4; display: none; align-items: center; justify-content: space-between; padding: 11px 16px; border-radius: 14px; color: #fff; background: var(--green); box-shadow: 0 10px 30px rgba(10,107,58,.35); cursor: pointer; font-size: 0.82rem; }
.mpo-bar b { display: block; font-size: 0.95rem; }
.mpo-bar-r { font-weight: 800; font-size: 0.88rem; }
/* cart */
.mpo-card { margin: 10px 12px; padding: 12px 14px; background: #fff; border-radius: 14px; box-shadow: 0 2px 8px rgba(15,37,64,.07); }
.mpo-ci { display: grid; grid-template-columns: 52px minmax(0, 1fr); align-items: center; gap: 8px 10px; padding: 10px 0; border-bottom: 1px solid #eef1f6; }
.mpo-ci:last-child { border-bottom: none; }
.mpo-ci-img { width: 52px; height: 52px; border-radius: 10px; overflow: hidden; background: #f1f4f9; display: flex; align-items: center; justify-content: center; flex-shrink: 0; cursor: zoom-in; }
.mpo-ci-img img { width: 100%; height: 100%; object-fit: cover; }
.mpo-ci-img .mpo-noimg { font-size: 0.9rem; }
.mpo-ci-m { flex: 1; min-width: 0; }
.mpo-ci-nm { font-size: 0.8rem; font-weight: 700; color: var(--text); }
.mpo-ci-f { grid-column: 1 / -1; display: flex; align-items: center; gap: 8px; }
.mpo-ci-q { margin-left: auto; }
.mpo-ci-f label { display: flex; align-items: center; gap: 4px; font-size: 0.72rem; color: var(--muted); }
.mpo-ci-f input { width: 64px; height: 28px; border: 1px solid var(--border); border-radius: 7px; padding: 0 6px; font-size: 0.8rem; text-align: right; font-family: inherit; }
.mpo-lbl { font-size: 0.68rem; font-weight: 700; text-transform: uppercase; color: var(--muted); margin-bottom: 4px; }
.mpo-inp { width: 100%; height: 40px; border: 1px solid var(--border); border-radius: 10px; padding: 0 10px; margin-bottom: 10px; font-size: 0.9rem; font-family: inherit; background: #fff; color: var(--text); }
.mpo-inp::-webkit-calendar-picker-indicator { display: none !important; }
.mpo-inp[type="date"]::-webkit-calendar-picker-indicator { display: block !important; }
.mpo-inp[readonly] { background: var(--surface2); color: var(--muted); font-family: monospace; }
.mpo-sum { display: grid; grid-template-columns: 1fr 1fr; gap: 0 10px; }
.mpo-row { display: flex; justify-content: space-between; padding: 5px 0; font-size: 0.84rem; color: var(--text2, #2d3f55); }
.mpo-grand { margin-top: 6px; padding-top: 10px; border-top: 1px dashed var(--border); font-size: 1rem; font-weight: 800; color: var(--text); }
.mpo-place-wrap { padding: 6px 12px 20px; }
.mpo-place { width: 100%; height: 48px; border: none; border-radius: 12px; color: #fff; font-size: 0.95rem; font-weight: 800; font-family: inherit; background: linear-gradient(135deg, var(--green), var(--green2)); cursor: pointer; }
.mpo-place:disabled { opacity: .6; }
/* full-screen photo */
.mpo-vw { position: absolute; inset: 0; z-index: 10; display: none; flex-direction: column; background: #000; }
.mpo-vw.open { display: flex; }
.mpo-vw-top { display: flex; align-items: center; justify-content: space-between; padding: 10px 14px; color: #fff; font-family: monospace; font-size: 0.82rem; }
.mpo-vw-x { width: 38px; height: 38px; border-radius: 50%; border: none; background: rgba(255,255,255,.15); color: #fff; font-size: 1.1rem; cursor: pointer; }
.mpo-vw-stage { flex: 1; position: relative; overflow: hidden; touch-action: none; }
.mpo-vw-pic { position: absolute; width: min(100vw, 560px); aspect-ratio: 1 / 1; background: #fff; display: flex; align-items: center; justify-content: center; transform-origin: 0 0; user-select: none; }
.mpo-vw-pic img { width: 100%; height: 100%; object-fit: contain; pointer-events: none; }
.mpo-vw-pic .mpo-noimg { font-size: 4rem; }
.mpo-vw-hint { padding: 6px; text-align: center; color: #aaa; font-size: 0.72rem; }
.mpo-vw-bot { display: flex; align-items: center; gap: 12px; padding: 12px 16px calc(14px + env(safe-area-inset-bottom, 0px)); background: #fff; border-radius: 16px 16px 0 0; }
.mpo-vw-nm { font-size: 0.88rem; font-weight: 800; color: var(--text); }
.mpo-vw-sub { font-size: 0.74rem; color: var(--muted); margin-top: 2px; }
/* screen ke hisaab se column: phone 2, bada phone/tablet 3, bada tablet 4 */
@media (min-width: 520px) {
  .mpo-cats, .mpo-items { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (min-width: 900px) {
  .mpo-cats, .mpo-items { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
/* Cart ke neeche: chhote Cancel + Submit, right corner (PR) */
.mpo-act { display: flex; justify-content: flex-end; gap: 8px; padding: 6px 12px 20px; }
.mpo-cancel { height: 40px; padding: 0 18px; border-radius: 10px; border: 1px solid var(--border); background: #fff; color: var(--muted); font-size: 0.85rem; font-weight: 700; font-family: inherit; cursor: pointer; }
.mpo-place.mpo-place-sm { width: auto; height: 40px; padding: 0 18px; border-radius: 10px; font-size: 0.85rem; }

/* "+ Add more items" — cart me items ke neeche (PR + PO) */
.mpo-addmore { display: flex; align-items: center; justify-content: center; gap: 6px; width: 100%; margin-top: 10px; padding: 9px; border: 1.5px dashed var(--navy2, #1e3a5f); border-radius: 10px; background: #f5f8ff; color: var(--navy2, #1e3a5f); font-family: inherit; font-size: 0.82rem; font-weight: 700; cursor: pointer; }

/* Desktop pe shopping screen (cart me item the) — beech me phone jitna panel, peeche halka andhera */
.mpo.mpo-wide { left: 50%; right: auto; width: 480px; max-width: 100%; transform: translateX(-50%); box-shadow: 0 0 0 100vmax rgba(15, 23, 42, .55); }
.mpo.mpo-wide .mpo-cats, .mpo.mpo-wide .mpo-items { grid-template-columns: repeat(3, minmax(0, 1fr)); }