/* ═══════════════════════════════════════════════════════════════
   CheapShop Nepal — phone app layer
   Active only on phones: <html class="app-mode"> is set by the small
   script in the <head> of index.html (and kept up to date by mobile.js).
   Desktop never sees any of this.
   ═══════════════════════════════════════════════════════════════ */
:root {
	--tabbar-h: 62px;
	--safe-b: env(safe-area-inset-bottom, 0px);
	--app-pad: 14px;
	--app-radius: 18px;
	--app-card: #fff;
	--app-line: rgba(30,90,69,.1);
}

/* ── Things phones don't need (the tab bar replaces them) ── */
.app-mode .topbar,
.app-mode .fab,
.app-mode .track-btn,
.app-mode .skip-link,
.app-mode .scroll-progress,
.app-mode .section-head p,
.app-mode .footer-col[aria-label="Shop by category"] { display: none !important; }
.tabbar, .buy-bar, .cart-footer, .app-title, .quick-add, .sheet-backdrop, .snack, .co-summary { display: none; }

.app-mode body {
	padding-bottom: calc(var(--tabbar-h) + var(--safe-b));
	-webkit-tap-highlight-color: transparent;
	overscroll-behavior-y: none;
}
.app-mode body.is-product { padding-bottom: calc(76px + var(--safe-b)); }
.app-mode main { padding: 0 var(--app-pad); }

/* no "lifted" cards after a tap: phones have no hover */
.app-mode .product:hover, .app-mode .category:hover, .app-mode .c-card:hover,
.app-mode .trust-strip li:hover, .app-mode .opt-btn:hover, .app-mode .pd-pair:hover { transform: none; }
.app-mode .product:hover::before { opacity: 0; }
.app-mode .product:hover .main-img { transform: none; }

/* ═════════ Header: logo + name + bag, search underneath ═════════ */
.app-mode header { background: rgba(255,253,248,.94); }
.app-mode header::after { height: 1px; opacity: .5; box-shadow: none; }
.app-mode .nav { padding: 8px var(--app-pad) 6px; gap: 10px; flex-wrap: nowrap; }
.app-mode .logo { width: 40px; height: 40px; flex: 0 0 40px; }
.app-mode .logo img { box-shadow: 0 0 0 2px #fff, 0 0 0 3px rgba(33,245,138,.45); }
.app-mode .app-title { display: block; min-width: 0; color: var(--green-3); text-decoration: none; font: 700 18px/1.05 'Space Grotesk', sans-serif; letter-spacing: -.03em; white-space: nowrap; }
.app-mode .app-title b { color: var(--coral); }
.app-mode .app-title small { display: block; margin-top: 2px; font: 500 11px 'DM Sans', sans-serif; letter-spacing: 0; color: var(--muted); }
.app-mode .nav-actions { gap: 8px; flex: none; margin-left: auto; }
.app-mode .app-title { overflow: hidden; text-overflow: ellipsis; }
.app-mode .cart-button#cartButton { position: relative; width: 42px; height: 42px; padding: 0; border-radius: 50%; justify-content: center; }
.app-mode .cart-label { display: none; }
.app-mode .cart-count.is-zero { display: none; }
.app-mode .cart-count { position: absolute; top: -5px; right: -5px; min-width: 19px; height: 19px; padding: 0 5px; border-radius: 10px; font-size: 11px; }

/* search bar lives in the header on phones, so it is always one tap away */
.app-mode header .brand-search { max-width: none; margin: 0 var(--app-pad) 10px; animation: none; }
.app-mode header .brand-search input { height: 44px; padding: 0 44px 0 42px; font-size: 16px; border-radius: 14px; background: #f1f1ea; border: 1px solid transparent; box-shadow: none; }
.app-mode header .brand-search input:focus { background: #fff; border-color: var(--green); box-shadow: 0 0 0 3px rgba(33,245,138,.22); }
.app-mode header .brand-search .search-icon { left: 14px; width: 18px; height: 18px; }
.app-mode header .brand-search button { top: 4px; right: 4px; width: 36px; height: 36px; border-radius: 11px; box-shadow: none; }
.app-mode header .brand-search button svg { width: 16px; height: 16px; }
.app-mode .search-clear { position: absolute; right: 46px; top: 50%; width: 28px; height: 28px; margin-top: -14px; border: 0; border-radius: 50%; background: #dcdcd2; color: #555; font-size: 15px; line-height: 1; display: grid; place-items: center; }
.app-mode .search-clear[hidden] { display: none; }
/* the clear (✕) button is for phones only; "!important" beats the shop's general ".search button" style */
.search-clear[hidden], html:not(.app-mode) .search-clear { display: none !important; }

/* ═════════ Home ═════════ */
/* brand banner → compact promo card */
.app-mode .brand {
	flex-direction: row-reverse; justify-content: space-between; align-items: center; gap: 12px;
	margin: 12px 0 0; padding: 18px 16px 18px 18px; border-radius: 22px; text-align: left; overflow: hidden; position: relative;
	background: radial-gradient(120% 140% at 100% 0%, rgba(200,255,61,.28), transparent 55%), linear-gradient(135deg, #0a2e22 0%, #164d39 55%, #1e5a45 100%);
	box-shadow: 0 18px 34px -20px rgba(15,58,43,.9), inset 0 0 0 1px rgba(33,245,138,.25);
}
.app-mode .brand-logo-wrap { animation: none; }
.app-mode .brand-logo-wrap::before { inset: -14px; opacity: .6; }
.app-mode .brand-logo { width: 82px; height: 82px; box-shadow: 0 0 0 3px rgba(255,255,255,.95), 0 0 24px rgba(33,245,138,.6); }
.app-mode .brand-text { text-align: left; animation: none; min-width: 0; }
.app-mode .brand h1.brand-name {
	font-size: 25px; line-height: 1.02; letter-spacing: -.035em; animation: none; filter: none;
	background: none; color: #fff; -webkit-text-fill-color: #fff; text-shadow: 0 0 18px rgba(33,245,138,.45);
}
.app-mode .brand-tag { margin-top: 8px; font-size: 13px; line-height: 1.4; color: #cfe6d8; }
.app-mode .brand-tag b { color: var(--neon-lime); }
.app-mode .brand-tag::after { width: 64px; height: 2px; margin-top: 10px; }

/* trust points → one row of pills you can swipe */
.app-mode .trust-strip {
	display: flex; grid-template-columns: none; gap: 8px; margin: 12px calc(-1 * var(--app-pad)) 0; padding: 2px var(--app-pad) 4px;
	overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-inline: var(--app-pad); scrollbar-width: none;
}
.app-mode .trust-strip::-webkit-scrollbar { display: none; }
.app-mode .trust-strip li { flex: none; flex-direction: row; gap: 8px; padding: 8px 12px 8px 8px; border-radius: 999px; text-align: left; scroll-snap-align: start; box-shadow: none; }
.app-mode .trust-strip svg { width: 28px; height: 28px; padding: 6px; border-radius: 50%; }
.app-mode .trust-strip b { font-size: 12.5px; white-space: nowrap; }
.app-mode .trust-strip small { display: none; }

.app-mode .section-head { margin: 22px 0 10px; align-items: center; }
.app-mode .section-head h2 { font-size: 19px; gap: 9px; }
.app-mode .section-head h2::before { width: 4px; }
.app-mode #resultCount { display: block; margin: 0; font-size: 12px; }
.app-mode .section-head:has(#productTitle) { display: flex; justify-content: space-between; }
.app-mode .section-head:has(#productTitle) > div { display: flex; align-items: baseline; justify-content: space-between; width: 100%; gap: 10px; }

/* category chips */
.app-mode .categories { gap: 8px; margin: -6px calc(-1 * var(--app-pad)) 0; padding: 6px var(--app-pad) 8px; scroll-padding-inline: var(--app-pad); -webkit-mask-image: none; mask-image: none; }
.app-mode .category { padding: 9px 16px; font-size: 13.5px; min-height: 40px; }
.app-mode .category.active { box-shadow: 0 6px 14px -6px rgba(30,90,69,.7); }

/* product grid: 2 columns of app-style cards */
.app-mode .products { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.app-mode .skeleton { aspect-ratio: .74; border-radius: var(--app-radius); }
.product-cell { position: relative; min-width: 0; }
.app-mode .product {
	aspect-ratio: auto; height: 100%; border-radius: var(--app-radius); border: 1px solid var(--app-line);
	box-shadow: 0 1px 2px rgba(20,40,30,.05), 0 8px 20px -16px rgba(20,50,35,.5);
}
.app-mode .product:active { transform: scale(.98); }
.app-mode .product-image { flex: none; aspect-ratio: 1 / 1; }
.app-mode .product-image img.main-img { padding: 6px; }
.app-mode .product-body { flex: 1; padding: 8px 11px 11px; gap: 4px; border-top: 0; }
.app-mode .product h3 { font-size: 13px; line-height: 1.3; font-weight: 600; min-height: 2.6em; }
.app-mode .price-row { align-items: flex-end; padding-right: 40px; min-height: 36px; }
.app-mode .price { display: flex; flex-direction: column; font-size: 16px; line-height: 1.15; }
.app-mode .price small { margin: 1px 0 0; font-size: 11.5px; }
.app-mode .tag { top: 8px; left: 8px; padding: 3px 8px; font-size: 10px; box-shadow: 0 4px 10px -4px rgba(244,203,85,.9); }
.app-mode .terma-logo-badge { width: 30px; height: 30px; bottom: 6px; right: 6px; }

/* round "+" button on every card: adds to the bag without leaving the list */
.app-mode .quick-add {
	display: grid; place-items: center; position: absolute; right: 9px; bottom: 10px; z-index: 4;
	width: 36px; height: 36px; padding: 0; border: 0; border-radius: 12px; color: #fff;
	background: linear-gradient(135deg, var(--green-4), var(--green-2));
	box-shadow: 0 8px 16px -6px rgba(30,90,69,.8), 0 0 0 3px #fff;
	transition: transform .15s var(--ease);
}
.app-mode .quick-add svg { width: 20px; height: 20px; }
.app-mode .quick-add:active { transform: scale(.88); }
.app-mode .quick-add.options { background: #fff; color: var(--green); box-shadow: 0 6px 14px -6px rgba(30,90,69,.6), inset 0 0 0 1.5px rgba(30,90,69,.35), 0 0 0 3px #fff; }
.app-mode .quick-add.done { background: linear-gradient(135deg, #2be870, #12a94e); }

.app-mode .empty { padding: 44px 16px; font-size: 15px; }

/* ═════════ Bottom tab bar ═════════ */
.app-mode .tabbar {
	display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
	height: calc(var(--tabbar-h) + var(--safe-b)); padding: 0 4px var(--safe-b);
	background: rgba(255,255,255,.96); -webkit-backdrop-filter: blur(14px) saturate(160%); backdrop-filter: blur(14px) saturate(160%);
	border-top: 1px solid rgba(30,90,69,.1); box-shadow: 0 -8px 24px -16px rgba(20,50,35,.45);
}
.app-mode body.is-product .tabbar { display: none; }
.tab {
	position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
	min-width: 0; padding: 0; border: 0; background: none; color: #7b837d; text-decoration: none;
	font: 600 10.5px 'DM Sans', sans-serif; letter-spacing: .01em;
}
.tab-ico { position: relative; display: grid; place-items: center; width: 52px; height: 30px; border-radius: 999px; transition: background .2s, color .2s; }
.tab-ico svg { width: 22px; height: 22px; }
.tab.active { color: var(--green-3); }
.tab.active .tab-ico { background: #e3f1d0; color: var(--green); }
.tab:active .tab-ico { transform: scale(.92); }
.tab-chat .tab-ico { color: #12984f; }
.tab-badge {
	position: absolute; top: -3px; left: 29px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px;
	display: grid; place-items: center; font-size: 10.5px; font-weight: 700; color: #fff;
	background: linear-gradient(135deg, #f0805f, #e0533a); box-shadow: 0 0 0 2px #fff;
}
.tab-badge[hidden] { display: none; }
.tab-badge.bump { animation: bump .45s var(--ease); }

/* ═════════ Bottom sheet (categories) ═════════ */
.app-mode .sheet-backdrop { display: block; position: fixed; inset: 0; z-index: 150; background: rgba(10,25,18,.5); opacity: 0; pointer-events: none; transition: opacity .25s; }
.app-mode .sheet-backdrop.open { opacity: 1; pointer-events: auto; }
.sheet {
	position: absolute; left: 0; right: 0; bottom: 0; max-height: 82vh; max-height: 82dvh; overflow-y: auto; overscroll-behavior: contain;
	padding: 8px var(--app-pad) calc(18px + var(--safe-b)); border-radius: 24px 24px 0 0; background: var(--paper);
	transform: translateY(100%); transition: transform .32s var(--ease);
	box-shadow: 0 -20px 50px -20px rgba(0,0,0,.45);
}
.sheet-backdrop.open .sheet { transform: none; }
.sheet-handle { width: 40px; height: 5px; margin: 2px auto 12px; border-radius: 3px; background: #d6d8cf; }
.sheet-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.sheet-head h3 { font-size: 20px; letter-spacing: -.03em; }
.sheet-close { width: 36px; height: 36px; border: 0; border-radius: 50%; background: #efefe7; color: var(--ink); font-size: 18px; display: grid; place-items: center; }
.cat-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.cat-tile {
	display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 10px 6px 12px; border-radius: 16px;
	border: 1px solid var(--app-line); background: #fff; color: var(--ink); text-align: center; font: inherit;
}
.cat-tile.active { border-color: var(--green); box-shadow: 0 0 0 2px rgba(33,245,138,.35); background: #f4faea; }
.cat-tile:active { transform: scale(.96); }
.cat-thumb { width: 64px; height: 64px; border-radius: 14px; display: grid; place-items: center; overflow: hidden; background: radial-gradient(120% 100% at 50% 0%, #fff, #eef1e6); color: var(--green); }
.cat-thumb img { width: 100%; height: 100%; object-fit: contain; padding: 4px; }
.cat-thumb svg { width: 28px; height: 28px; }
.cat-tile b { font-size: 13px; line-height: 1.2; }
.cat-tile small { font-size: 11px; color: var(--muted); }

/* ═════════ "Added to bag" snackbar ═════════ */
.app-mode .snack {
	display: flex; align-items: center; gap: 12px; position: fixed; left: 12px; right: 12px; z-index: 120;
	bottom: calc(var(--tabbar-h) + var(--safe-b) + 10px); padding: 10px 10px 10px 12px; border-radius: 16px;
	color: #eaffd0; background: #0f3a2b; box-shadow: 0 0 0 1px rgba(33,245,138,.5), 0 18px 40px -12px rgba(0,0,0,.55);
	opacity: 0; transform: translateY(16px); pointer-events: none; transition: opacity .25s, transform .3s var(--ease);
}
.app-mode body.is-product .snack { bottom: calc(76px + var(--safe-b) + 10px); }
.app-mode .snack.show { opacity: 1; transform: none; pointer-events: auto; }
.snack img { width: 40px; height: 40px; flex: none; border-radius: 10px; object-fit: contain; background: #fff; padding: 2px; }
.snack-text { flex: 1; min-width: 0; font-size: 13px; line-height: 1.3; }
.snack-text b { display: block; font-size: 14px; color: #fff; }
.snack-text span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #a9c9b8; }
.snack-btn { flex: none; padding: 10px 14px; border: 0; border-radius: 11px; font: 700 13px 'DM Sans', sans-serif; color: #0a2e22; background: var(--neon-lime); }
.app-mode .site-toast { bottom: calc(var(--tabbar-h) + var(--safe-b) + 14px); max-width: calc(100% - 32px); text-align: center; }
.app-mode body.is-product .site-toast { bottom: calc(76px + var(--safe-b) + 14px); }

/* ═════════ Product page ═════════ */
/* full-screen photo: the shop header steps aside, round buttons float over the photo instead */
.app-mode body.is-product header { display: none; }
.app-mode body.is-product main { padding: 0; }
.app-mode .pd-bag-fab {
	position: absolute; top: calc(12px + env(safe-area-inset-top, 0px)); right: 62px; z-index: 8; width: 42px; height: 42px;
	display: grid; place-items: center; border: 0; border-radius: 50%; color: var(--ink);
	background: rgba(255,255,255,.92); box-shadow: 0 6px 18px -6px rgba(0,0,0,.35);
}
.pd-bag-fab { display: none; }
.app-mode .pd-bag-fab svg { width: 20px; height: 20px; }
.app-mode .pd-bag-fab .tab-badge { top: -4px; left: auto; right: -4px; }
.app-mode #productPage { position: relative; }
/* floating round back button over the photo */
.app-mode #productPage .pd-back {
	position: absolute; top: calc(12px + env(safe-area-inset-top, 0px)); left: 12px; z-index: 8; width: 42px; height: 42px; margin: 0; padding: 0;
	display: grid; place-items: center; border-radius: 50%; font-size: 0; color: var(--ink);
	background: rgba(255,255,255,.92); border: 0; box-shadow: 0 6px 18px -6px rgba(0,0,0,.35);
	-webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
}
.app-mode #productPage .pd-back::before {
	content: ''; width: 22px; height: 22px; background: currentColor;
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M15 18l-6-6 6-6'/%3E%3C/svg%3E") center / contain no-repeat;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M15 18l-6-6 6-6'/%3E%3C/svg%3E") center / contain no-repeat;
}
.app-mode #productPage .pd-back kbd { display: none; }
.app-mode .pd-share-fab {
	position: absolute; top: calc(12px + env(safe-area-inset-top, 0px)); right: 12px; z-index: 8; width: 42px; height: 42px; display: grid; place-items: center;
	border: 0; border-radius: 50%; color: var(--ink); background: rgba(255,255,255,.92); box-shadow: 0 6px 18px -6px rgba(0,0,0,.35);
}
.pd-share-fab { display: none; }
.app-mode .pd-share-fab svg { width: 20px; height: 20px; }

.app-mode .pd { display: block; padding: 0; gap: 0; border: 0; border-radius: 0; background: none; box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; animation: none; }
.app-mode .pd-media { position: relative; top: 0; }
.app-mode .pd-media .product-image { border: 0; border-radius: 0; box-shadow: none; background: #fff; aspect-ratio: 1 / 1; }
.app-mode .pd-media .product-image img.main-img { padding: 22px; }
.app-mode .pd-media .tag { top: auto; bottom: 34px; left: 14px; }
.app-mode .pd-media .terma-logo-badge { width: 46px; height: 46px; bottom: 34px; right: 14px; }
.app-mode .pd-thumbs { display: none; }                 /* swipe + dots on phones */
.app-mode .pd-dots { bottom: 32px; }
.app-mode .card-rating { font-size: 11px; }
.app-mode .stock-left { left: 8px; bottom: 8px; padding: 3px 8px; font-size: 10.5px; }
.app-mode .pd-stock { margin: -4px 0 12px; }
.app-mode .buy-add:disabled, .app-mode .buy-now:disabled { opacity: .5; filter: grayscale(1); }
.app-mode .coupon-row input { font-size: 16px; }
.app-mode .pd-info {
	position: relative; margin-top: -20px; padding: 18px var(--app-pad) 8px; border-radius: 24px 24px 0 0;
	background: var(--cream); box-shadow: 0 -10px 24px -18px rgba(20,50,35,.45);
}
.app-mode .pd-info::before { content: ''; display: block; width: 40px; height: 4px; margin: -8px auto 12px; border-radius: 2px; background: #d6d8cf; }
.app-mode .pd-cat { padding: 4px 10px; font-size: 10.5px; }
.app-mode .pd-info h1 { font-size: 21px; line-height: 1.28; letter-spacing: -.025em; margin: 10px 0 10px; }
.app-mode .product-origin { margin-bottom: 6px; }
.app-mode .pd-price { margin-bottom: 12px; padding-bottom: 14px; gap: 10px; }
.app-mode .pd-price .now { font-size: 30px; }
.app-mode .pd-price .was { font-size: 14px; }

/* options: each group is a white card with big tap targets */
.app-mode .pd-info .options-group { margin: 0 0 10px; padding: 12px; border-radius: 16px; background: #fff; border: 1px solid var(--app-line); }
.app-mode .options-label { margin-bottom: 8px; font-size: 11px; }
.app-mode .option-btns { gap: 8px; }
.app-mode .opt-btn { min-height: 42px; padding: 8px 14px; border-radius: 12px; font-size: 13.5px; }
.app-mode .opt-btn:active { transform: scale(.96); }
.app-mode .opt-hint { font-size: 12px; }
.app-mode .pd-info .terma-gallery { display: none; }
.app-mode .pd-buy { display: none; }
.app-mode .pd-trust { gap: 8px; margin-top: 14px; }
.app-mode .pd-trust > div { padding: 10px 4px; border-radius: 14px; font-size: 10.5px; gap: 5px; }
.app-mode .pd-trust svg { width: 20px; height: 20px; }
.app-mode .pd-share { margin-top: 14px; }
.app-mode .pd-pairs-grid { grid-template-columns: 1fr; }
.app-mode .pd-info > h2 { margin-top: 22px !important; }
.app-mode .pd-desc { font-size: 14.5px; line-height: 1.65; }
.app-mode .pd-desc .lead { font-size: 15.5px; }
.app-mode .pd-specs { font-size: 13px; }
.app-mode .pd-specs th, .app-mode .pd-specs td { padding: 9px 10px; }

/* sticky buy bar: price + Add to bag + Buy now */
.app-mode body.is-product .buy-bar {
	display: flex; align-items: center; gap: 8px; position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
	padding: 10px var(--app-pad) calc(10px + var(--safe-b));
	background: rgba(255,255,255,.97); border-top: 1px solid rgba(30,90,69,.1); box-shadow: 0 -10px 28px -16px rgba(20,50,35,.5);
}
.buy-price { flex: 1; min-width: 0; line-height: 1.1; }
.buy-price small { display: block; font-size: 11px; color: var(--muted); font-weight: 600; }
.buy-price b { display: block; font: 700 19px 'Space Grotesk', sans-serif; letter-spacing: -.02em; color: var(--green-3); white-space: nowrap; }
.buy-add, .buy-now { height: 48px; padding: 0 16px; border: 0; border-radius: 14px; font: 700 14.5px 'DM Sans', sans-serif; white-space: nowrap; }
.buy-add { display: flex; align-items: center; gap: 6px; color: var(--green-3); background: #e3f1d0; box-shadow: inset 0 0 0 1.5px rgba(30,90,69,.25); }
.buy-add svg { width: 18px; height: 18px; }
.buy-now { color: #fff; background: linear-gradient(135deg, #f0805f, #e0533a); box-shadow: 0 10px 22px -10px rgba(233,109,79,.9); }
.buy-add:active, .buy-now:active { transform: scale(.96); }

/* ═════════ Bag (slides up, total + Checkout pinned to the bottom) ═════════ */
.app-mode .cart-overlay { align-items: flex-end; background: rgba(10,25,18,.5); }
.app-mode .cart-modal { height: 100%; height: 100dvh; display: flex; flex-direction: column; transform: translateY(100%); transition: transform .32s var(--ease); background: var(--cream); }
.app-mode .cart-overlay.open .cart-modal { transform: none; }
.app-mode .cart-top { flex: none; padding: 12px var(--app-pad); padding-top: calc(12px + env(safe-area-inset-top, 0px)); }
.app-mode .cart-top h2 { font-size: 19px; }
.app-mode .cart-top .cart-close { width: 38px; height: 38px; font-size: 17px; }
.app-mode .cart-body { flex: 1; min-height: 0; display: block; overflow-y: auto; overscroll-behavior: contain; }
.app-mode .cart-items-col { padding: 10px var(--app-pad) 4px; }
.app-mode .cart-line {
	position: relative; grid-template-columns: 78px minmax(0, 1fr); gap: 12px; margin-bottom: 10px; padding: 12px;
	border: 1px solid var(--app-line); border-radius: 16px; background: #fff; box-shadow: 0 8px 20px -18px rgba(20,50,35,.6);
}
.app-mode .cart-line:last-child { border-bottom: 1px solid var(--app-line); }
.app-mode .cart-line-img { width: 78px; height: 78px; border-radius: 12px; border: 0; background: #f4f3ea; }
.app-mode .cart-line-info { gap: 4px; min-width: 0; padding-right: 26px; }
.app-mode .cart-line-name { font-size: 13.5px; line-height: 1.35; font-weight: 600; }
.app-mode .cart-line-price { font: 700 16px 'Space Grotesk', sans-serif; }
.app-mode .cart-remove { position: absolute; top: 6px; right: 6px; width: 34px; height: 34px; margin: 0; padding: 0; border-radius: 50%; color: #a9aea8; font-size: 22px; display: grid; place-items: center; }
.app-mode .cart-qty { gap: 0; margin-top: 6px; width: max-content; border-radius: 12px; background: #f1f1ea; }
.app-mode .cart-qty button { width: 38px; height: 36px; border: 0; border-radius: 12px; background: none; font-size: 20px; }
.app-mode .cart-qty button:hover { transform: none; box-shadow: none; }
.app-mode .cart-qty span { min-width: 26px; font-size: 15px; }
/* coffee options in the bag stay folded until "Change options" is tapped */
.app-mode .cart-edit { display: none; }
.app-mode .cart-line.editing .cart-edit { display: block; grid-column: 1 / -1; }
.app-mode .cart-edit-toggle { align-self: flex-start; margin-top: 2px; padding: 5px 10px; border: 0; border-radius: 999px; font: 700 12px 'DM Sans', sans-serif; color: var(--green); background: #eef4e2; }
.app-mode .cart-coffee-imgs { gap: 6px; }
.app-mode .cart-opt-btn { min-height: 38px; padding: 6px 12px; border-radius: 10px; }
.app-mode .cart-empty { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 60px 20px 30px; text-align: center; color: var(--muted); }
.cart-empty { display: none; }
.app-mode .cart-empty svg { width: 64px; height: 64px; padding: 16px; border-radius: 50%; color: var(--green); background: #e3f1d0; }
.app-mode .cart-empty b { font: 700 18px 'Space Grotesk', sans-serif; color: var(--ink); }
.app-mode .cart-empty button { margin-top: 6px; padding: 12px 22px; border: 0; border-radius: 14px; font-weight: 700; color: #fff; background: linear-gradient(135deg, var(--green-4), var(--green-2)); }
.app-mode .cart-summary-col { padding: 6px var(--app-pad) 18px; background: none; border-top: 0; }
.app-mode .cart-summary-col.is-empty { display: none; }
.app-mode .delivery-section { margin-bottom: 14px; }
.app-mode .delivery-title { font-size: 14px; }
.app-mode .delivery-sub { display: none; }
.app-mode .delivery-head { margin-bottom: 8px; }
.app-mode .delivery-options { grid-template-columns: 1fr 1fr; gap: 8px; }
.app-mode .delivery-opt { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "text radio" "price radio"; gap: 2px 8px; padding: 12px; border-radius: 14px; }
.app-mode .delivery-opt .dl-icon { display: none; }
.app-mode .delivery-opt-text { grid-area: text; }
.app-mode .delivery-opt-name { font-size: 13.5px; }
.app-mode .delivery-opt-fee { font-size: 11px; }
.app-mode .dl-price { grid-area: price; font-size: 15px; }
.app-mode .dl-radio { grid-area: radio; }
.app-mode .summary-rows { padding: 12px 14px; border-radius: 16px; }
.app-mode .summary-row { font-size: 13.5px; margin-bottom: 6px; }
.app-mode .summary-row.total { font-size: 18px; margin-top: 8px; padding-top: 10px; }
.app-mode .checkout-btn { display: none; }
.app-mode .checkout-note { font-size: 12px; }
.app-mode .cart-footer {
	display: flex; flex: none; align-items: center; gap: 12px; padding: 10px var(--app-pad) calc(10px + var(--safe-b));
	background: #fff; border-top: 1px solid rgba(30,90,69,.1); box-shadow: 0 -10px 28px -16px rgba(20,50,35,.5);
}
.app-mode .cart-footer[hidden] { display: none; }
.cart-footer-total { flex: 1; min-width: 0; line-height: 1.1; }
.cart-footer-total small { display: block; font-size: 11px; font-weight: 600; color: var(--muted); }
.cart-footer-total b { display: block; font: 700 20px 'Space Grotesk', sans-serif; letter-spacing: -.02em; color: var(--green-3); white-space: nowrap; }
.cart-footer button { height: 50px; padding: 0 26px; border: 0; border-radius: 14px; font: 700 15.5px 'DM Sans', sans-serif; color: #fff; background: linear-gradient(135deg, #f0805f, #e0533a); box-shadow: 0 10px 22px -10px rgba(233,109,79,.9); }
.cart-footer button:active { transform: scale(.97); }

/* ═════════ Checkout (bottom sheet, Place order pinned) ═════════ */
@keyframes sheetUp { from { transform: translateY(100%); } to { transform: none; } }
.app-mode .modal-backdrop { align-items: flex-end; padding: 0; background: rgba(10,25,18,.5); }
.app-mode .checkout-modal {
	width: 100%; max-height: 94vh; max-height: 94dvh; padding: 0 var(--app-pad) 0; border-radius: 24px 24px 0 0;
	overscroll-behavior: contain; animation: sheetUp .32s var(--ease);
}
.app-mode .modal-head { position: sticky; top: 0; z-index: 3; margin: 0 calc(-1 * var(--app-pad)) 12px; padding: 16px var(--app-pad) 12px; background: var(--paper); border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.app-mode .modal-head h2 { font-size: 20px; }
.app-mode .close { width: 36px; height: 36px; border-radius: 50%; background: #efefe7; font-size: 20px; display: grid; place-items: center; color: var(--ink); }
.app-mode .co-summary { display: flex; flex-basis: 100%; align-items: center; justify-content: space-between; gap: 10px; margin-top: 10px; padding: 10px 12px; border-radius: 12px; background: #eef4e2; font-size: 13px; color: var(--green-3); }
.app-mode .co-summary b { font: 700 16px 'Space Grotesk', sans-serif; }
.app-mode .form-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
.app-mode .form-field { grid-column: 1 / -1; margin: 0; }
.app-mode .form-field:has(#receiverPhone), .app-mode .form-field:has(#additionalPhone) { grid-column: auto; }
.app-mode .form-field label { font-size: 11px; }
.app-mode .form-field input, .app-mode .form-field textarea { padding: 12px 13px; font-size: 16px; border-radius: 12px; }
.app-mode .form-field textarea { min-height: 70px; }
.app-mode .saved-note { grid-column: 1 / -1; margin: -2px 0 2px; font-size: 12px; color: var(--muted); }
.app-mode .saved-note button { border: 0; background: none; padding: 0; color: var(--green); font: 700 12px 'DM Sans', sans-serif; text-decoration: underline; }
.app-mode .pay-section { margin-top: 14px; }
.app-mode .pay-grid { gap: 8px; }
.app-mode .pay-box { padding: 10px 12px; }
.app-mode .place-order-btn {
	position: sticky; bottom: 0; z-index: 3; margin: 16px 0 0; height: 54px; border-radius: 16px;
	box-shadow: 0 0 0 10px var(--paper), 0 -18px 18px 2px var(--paper), 0 12px 24px -8px rgba(233,109,79,.8);
}
.app-mode .order-form { padding-bottom: calc(12px + var(--safe-b)); }
.app-mode .order-success { padding: 26px 4px calc(24px + var(--safe-b)); }
.app-mode .checkout-modal:has(.order-success.open) .co-summary { display: none; }
.app-mode .order-success h3 { font-size: 26px; }
.app-mode .order-success .primary { display: block; width: 100%; height: 52px; margin-top: 18px !important; border-radius: 14px; font-size: 16px; }
.app-mode .order-success .track-order-link { display: block; margin-top: 18px; }

/* ═════════ My Orders ═════════ */
.app-mode #ordersPage .pd-back { display: none; }
.app-mode .orders-page-head { margin: 18px 0 14px; }
.app-mode .orders-page-head h1 { font-size: 24px; margin-bottom: 6px; }
.app-mode .orders-page-head p { font-size: 13px; }
.app-mode .order-card { padding: 14px; border-radius: 18px; }
.app-mode .orders-empty svg { width: 60px; height: 60px; display: block; margin: 0 auto 12px; color: var(--green); }

/* ═════════ Contact + footer ═════════ */
.app-mode .contact { margin-top: 40px; }
.app-mode .contact-grid { margin-top: 24px; gap: 20px; }
.app-mode .contact-intro h2 { font-size: 30px; }
.app-mode .contact-intro p { font-size: 14.5px; margin-bottom: 18px; }
.app-mode .founder-card { max-width: none; }
.app-mode .c-card { padding: 14px; border-radius: 18px; }
.app-mode .c-ico { width: 46px; height: 46px; border-radius: 14px; }
.app-mode .site-footer { margin-top: 40px; padding: 36px var(--app-pad) 22px; }
.app-mode .footer-top { gap: 24px; }
.app-mode .footer-bottom { margin-top: 26px; padding-right: 0; }

@media (prefers-reduced-motion: reduce) {
	.sheet, .cart-modal, .snack, .checkout-modal { transition: none !important; animation: none !important; }
}
