:root {
	--bg: #f4f5f7;
	--card: #ffffff;
	--ink: #1c2333;
	--muted: #5b6475;
	--line: #dde1e8;
	--accent: #2448b8;
	--accent-ink: #ffffff;
	--sale: #b42318;
	--ok: #0e7a4f;
	--radius: 6px;
	--font: "Figtree", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body.f-body { margin: 0; background: var(--bg); color: var(--ink); font: 400 16px/1.5 var(--font); }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); }
.f-wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 16px; }
.f-main { padding-top: 20px; padding-bottom: 48px; min-height: 60vh; }

.f-head { background: var(--ink); color: #fff; position: sticky; top: 0; z-index: 10; padding-top: env(safe-area-inset-top, 0px); }
.f-head-row { display: flex; align-items: center; justify-content: space-between; height: 56px; }
.f-logo { color: #fff; text-decoration: none; font-weight: 700; font-size: 20px; letter-spacing: .2px; }
.f-nav { display: flex; gap: 18px; }
.f-nav a { color: #fff; text-decoration: none; font-weight: 500; font-size: 15px; }
.f-nav b { background: #fff; color: var(--ink); border-radius: 10px; padding: 0 7px; font-size: 13px; margin-left: 2px; }
.f-cats { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 10px; scrollbar-width: none; }
.f-cats a { color: #c9cfdb; text-decoration: none; padding: 6px 12px; border-radius: 20px; white-space: nowrap; font-size: 15px; }
.f-cats a.on { background: #fff; color: var(--ink); font-weight: 600; }

.f-h1 { font-size: 26px; line-height: 1.2; margin: 4px 0 6px; font-weight: 700; }
.f-lead { color: var(--muted); margin: 0 0 18px; }
.f-note { color: var(--muted); font-size: 14px; }
.f-count { color: var(--muted); font-size: 14px; margin: 12px 0 8px; }

.f-flash { padding: 12px 14px; border-radius: var(--radius); margin-bottom: 16px; font-weight: 500; }
.f-flash-ok { background: #e3f4ec; color: #0b5d3c; }
.f-flash-error { background: #fbe9e7; color: #8c1d13; }

.f-btn { display: inline-block; background: var(--accent); color: var(--accent-ink); border: 0; border-radius: var(--radius); padding: 11px 18px; font: 600 16px var(--font); text-decoration: none; cursor: pointer; }
.f-btn:focus-visible, .f-link:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible { outline: 3px solid #f2b705; outline-offset: 2px; }
.f-btn-big { width: 100%; text-align: center; padding: 14px; font-size: 17px; }
.f-link { background: none; border: 0; padding: 0; color: var(--sale); font: 500 14px var(--font); cursor: pointer; text-decoration: underline; }

.f-filters { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); }
.f-filters summary { padding: 12px 14px; font-weight: 600; cursor: pointer; }
.f-filter-form { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; padding: 0 14px 14px; }
.f-filter-form label { display: flex; flex-direction: column; gap: 4px; font-size: 14px; color: var(--muted); }
.f-filter-form .f-check { flex-direction: row; align-items: center; gap: 8px; color: var(--ink); grid-column: 1 / -1; }
.f-filter-form select, .f-filter-form input[type=number], .f-form input, .f-form select { font: 16px var(--font); padding: 9px 10px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; color: var(--ink); width: 100%; }
.f-filter-actions { grid-column: 1 / -1; display: flex; gap: 16px; align-items: center; }

.f-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
@media (min-width: 720px) { .f-grid { grid-template-columns: repeat(3, 1fr); gap: 20px; } }
@media (min-width: 1000px) { .f-grid { grid-template-columns: repeat(4, 1fr); } }
.f-card a { display: flex; flex-direction: column; gap: 4px; text-decoration: none; color: var(--ink); }
.f-card-name { font-size: 14px; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin-top: 6px; }
.f-card-sizes { font-size: 13px; color: var(--muted); }

.f-photo { position: relative; margin: 0; background: #e9ebef; border-radius: var(--radius); overflow: hidden; aspect-ratio: 3 / 4; }
.f-photo img { width: 100%; height: 100%; object-fit: cover; object-position: center top; }
.f-strip { position: absolute; left: 0; right: 0; bottom: 0; display: flex; justify-content: space-between; gap: 8px; padding: 5px 8px; background: rgba(28, 35, 51, .86); color: #fff; font-size: 12px; font-weight: 600; letter-spacing: .4px; font-variant-numeric: tabular-nums; }

.f-price { font-weight: 700; font-size: 16px; }
.f-mrp { color: var(--muted); font-size: 14px; }
.f-off { color: var(--ok); font-size: 14px; font-weight: 600; }
.f-big-price .f-price { font-size: 26px; }
.f-big-price .f-mrp, .f-big-price .f-off { font-size: 16px; }
.f-sold { color: var(--sale); font-weight: 500; }
.f-code { color: var(--muted); font-size: 14px; font-variant-numeric: tabular-nums; }

.f-product { display: grid; gap: 22px; }
@media (min-width: 860px) { .f-product { grid-template-columns: 1.1fr 1fr; align-items: start; } }
.f-gallery { position: relative; }
.f-gallery-track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; gap: 10px; scrollbar-width: none; border-radius: var(--radius); }
.f-gallery-track::-webkit-scrollbar { display: none; }
.f-gallery-track .f-photo { flex: 0 0 100%; scroll-snap-align: start; }
.f-dots { display: flex; justify-content: center; gap: 8px; margin-top: 10px; }
.f-dots button { width: 9px; height: 9px; border-radius: 50%; border: 0; background: #c3c8d2; padding: 0; cursor: pointer; }
.f-dots button.on { background: var(--ink); }

.f-sizes { border: 0; padding: 0; margin: 16px 0; display: flex; flex-wrap: wrap; gap: 8px; }
.f-sizes legend { font-weight: 600; margin-bottom: 8px; padding: 0; }
.f-sizes label { position: relative; }
.f-sizes input { position: absolute; opacity: 0; inset: 0; }
.f-sizes span { display: inline-block; min-width: 52px; text-align: center; padding: 10px 12px; border: 1.5px solid var(--line); border-radius: var(--radius); background: #fff; font-weight: 600; cursor: pointer; }
.f-sizes input:checked + span { border-color: var(--ink); background: var(--ink); color: #fff; }
.f-sizes input:focus-visible + span { outline: 3px solid #f2b705; outline-offset: 2px; }
.f-sizes .out span { color: #a8afbc; text-decoration: line-through; background: #f1f2f5; cursor: not-allowed; }

.f-how { background: var(--card); border-left: 4px solid var(--accent); padding: 12px 14px; margin: 22px 0; border-radius: 0 var(--radius) var(--radius) 0; }
.f-how p { margin: 6px 0 0; color: var(--muted); font-size: 15px; }
.f-details { display: grid; grid-template-columns: max-content 1fr; gap: 6px 18px; margin: 0; }
.f-details dt { color: var(--muted); }
.f-details dd { margin: 0; font-weight: 500; }

.f-counter-card { display: flex; justify-content: space-between; align-items: center; gap: 16px; background: var(--ink); color: #fff; border-radius: var(--radius); padding: 16px; margin-bottom: 18px; }
.f-counter-card p { margin: 4px 0 0; }
.f-counter-card .f-note { color: #c9cfdb; }
.f-qr { background: #fff; padding: 8px; border-radius: 4px; width: 132px; height: 132px; flex: 0 0 auto; }
.f-qr img, .f-qr canvas { width: 116px !important; height: 116px !important; }
.f-wishlist { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.f-wish-item { display: grid; grid-template-columns: 110px 1fr; gap: 14px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px; }
.f-wish-item.gone { opacity: .7; }
.f-wish-text { display: flex; flex-direction: column; gap: 4px; font-size: 15px; }
.f-wish-text a { color: var(--ink); text-decoration: none; }

.f-form { display: grid; gap: 14px; max-width: 520px; }
.f-form label { display: flex; flex-direction: column; gap: 6px; font-weight: 500; }
.f-narrow { max-width: 380px; }
.f-phone { display: flex; align-items: stretch; }
.f-phone span { padding: 9px 10px; background: #e9ebef; border: 1px solid var(--line); border-right: 0; border-radius: var(--radius) 0 0 var(--radius); }
.f-phone input { border-radius: 0 var(--radius) var(--radius) 0 !important; }
.f-otp { font-size: 24px !important; letter-spacing: 8px; text-align: center; }
.f-logout { margin-top: 28px; }

.f-pages { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin-top: 28px; }
.f-pages a { padding: 8px 13px; border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; color: var(--ink); background: #fff; }
.f-pages a.on { background: var(--ink); color: #fff; border-color: var(--ink); }

.f-empty { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px 20px; text-align: center; }
.f-foot { background: #e6e9ee; color: var(--muted); padding: 22px 0 calc(22px + env(safe-area-inset-bottom, 0px)); font-size: 14px; }
.f-foot p { margin: 4px 0; }
.f-foot-how { color: var(--ink); font-weight: 600; }
@media (prefers-reduced-motion: no-preference) { .f-gallery-track { scroll-behavior: smooth; } }

.f-qr-wrap { text-align: center; }
.f-qr-code { margin-top: 6px; font-weight: 700; letter-spacing: 3px; font-size: 18px; }
.f-h2 { font-size: 20px; margin: 30px 0 10px; }
.f-bills { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; max-width: 520px; }
.f-bills a { display: flex; justify-content: space-between; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; color: var(--ink); text-decoration: none; }
.f-sale { display: inline-block; background: #b42318; color: #fff; font-size: 12px; font-weight: 600; padding: 1px 7px; border-radius: 10px; vertical-align: middle; }
.f-form .f-check-row { flex-direction: row; align-items: flex-start; gap: 10px; font-weight: 400; color: var(--muted); }
.f-form .f-check-row input { width: auto; margin-top: 4px; }
.f-report summary { color: var(--sale); font-size: 14px; cursor: pointer; margin-top: 4px; }
.f-report .f-form { margin-top: 8px; gap: 8px; }

.f-foot-links { margin-top: 10px; font-size: 13px; }
.f-foot-links a { color: var(--muted); text-decoration: underline; }
.f-foot-links span { margin: 0 6px; color: var(--muted); }

/* v0.17.0 — wallet */
.f-wallet-box{background:#f0fdf4;border:1.5px solid #bbf7d0;border-radius:10px;padding:16px 18px;margin:20px 0;}
.f-wallet-label{font-size:12px;color:#166534;font-weight:600;text-transform:uppercase;letter-spacing:.5px;margin-bottom:4px;}
.f-wallet-amount{font-size:28px;font-weight:700;color:#15803d;}

/* ── Quick View ───────────────────────────────────────────────────────────── */
#f-qv {
	position: fixed; inset: 0;
	background: rgba(0,0,0,.55);
	z-index: 100;
	display: flex; align-items: center; justify-content: center;
	opacity: 0; pointer-events: none;
	transition: opacity .2s ease;
}
#f-qv.open { opacity: 1; pointer-events: auto; }

#f-qv-panel {
	position: relative;
	background: #fff;
	border-radius: 16px;
	width: 94%; max-width: 940px;
	height: 90vh;
	display: flex; flex-direction: column;
	overflow: hidden;
	box-shadow: 0 20px 60px rgba(0,0,0,.35);
}
@media (min-width: 760px) {
	#f-qv-panel { flex-direction: row; }
}

#f-qv-close {
	position: absolute; top: 10px; right: 10px; z-index: 20;
	width: 36px; height: 36px; border-radius: 50%;
	background: rgba(28,35,51,.75); color: #fff;
	border: 0; font-size: 18px; line-height: 1;
	cursor: pointer; display: flex; align-items: center; justify-content: center;
	transition: background .15s;
}
#f-qv-close:hover { background: var(--ink); }

/* Image side */
#f-qv-imgs {
	flex: 0 0 46vh;
	display: flex; flex-direction: column;
	background: #e9ebef; overflow: hidden; min-height: 0;
}
@media (min-width: 760px) {
	#f-qv-imgs { flex: 0 0 50%; max-height: none; }
}
#f-qv-track {
	flex: 1; display: flex;
	overflow-x: scroll; scroll-snap-type: x mandatory;
	scrollbar-width: none; min-height: 0;
	cursor: zoom-in;
}
#f-qv-track::-webkit-scrollbar { display: none; }
#f-qv-track .f-qv-slide {
	flex: 0 0 100%; scroll-snap-align: start;
	margin: 0; position: relative;
	display: flex; flex-direction: column;
}
#f-qv-track .f-qv-slide img {
	flex: 1; width: 100%; height: 100%;
	object-fit: contain; object-position: center;
	background: #e9ebef; display: block;
}
#f-qv-thumbs {
	display: flex; gap: 6px; padding: 8px;
	overflow-x: auto; background: #fff;
	scrollbar-width: none; flex-shrink: 0;
}
#f-qv-thumbs::-webkit-scrollbar { display: none; }
.f-qv-thumb {
	width: 52px; height: 52px; flex: 0 0 52px;
	border: 2px solid transparent; border-radius: 4px;
	overflow: hidden; cursor: pointer; padding: 0;
	background: #e9ebef;
}
.f-qv-thumb.on { border-color: var(--ink); }
.f-qv-thumb img { width: 100%; height: 100%; object-fit: cover; }

/* Info side */
#f-qv-info {
	flex: 1; overflow-y: auto; overflow-x: hidden;
	padding: 48px 20px 24px;
	overscroll-behavior: contain;
}
.f-qv-name { font-size: 20px; font-weight: 700; line-height: 1.3; margin: 0 0 6px; }
#f-qv-flash { margin-bottom: 12px; font-size: 14px; border-radius: var(--radius); padding: 10px 12px; }
.f-qv-no-photos { display: flex; align-items: center; justify-content: center; height: 100%; color: var(--muted); font-size: 14px; }

/* ── Lightbox ─────────────────────────────────────────────────────────────── */
#f-lb {
	position: fixed; inset: 0;
	background: #0a0a0a; z-index: 200;
	display: flex; flex-direction: column;
	opacity: 0; pointer-events: none;
	transition: opacity .15s ease;
}
#f-lb.open { opacity: 1; pointer-events: auto; }

#f-lb-close {
	position: absolute;
	top: calc(env(safe-area-inset-top, 0px) + 10px); right: 14px;
	z-index: 50; width: 44px; height: 44px; border-radius: 50%;
	background: rgba(20,20,20,.85); color: #fff;
	border: 2px solid rgba(255,255,255,.25);
	font-size: 22px; line-height: 1;
	cursor: pointer; display: flex; align-items: center; justify-content: center;
	backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
}
#f-lb-close:hover { background: rgba(0,0,0,.95); }

#f-lb-track {
	flex: 1; display: flex;
	overflow-x: scroll; scroll-snap-type: x mandatory;
	scrollbar-width: none; min-height: 0;
	touch-action: pan-x; /* allow horizontal swipe, prevent browser pinch/double-tap zoom */
}
#f-lb-track::-webkit-scrollbar { display: none; }

.f-lb-slide {
	flex: 0 0 100%; scroll-snap-align: start;
	display: flex; flex-direction: column;
	align-items: stretch; justify-content: center;
	position: relative; margin: 0; padding: 0; overflow: hidden;
}
.f-lb-slide img {
	width: 100%; height: 100%; object-fit: contain;
	transition: transform .25s ease;
	transform-origin: center center;
	user-select: none; display: block;
}
.f-lb-slide .f-strip { position: absolute; left: 0; right: 0; bottom: 0; }

#f-lb-bar {
	display: flex; gap: 6px;
	padding: 10px 14px;
	padding-bottom: calc(10px + env(safe-area-inset-bottom, 0px));
	background: rgba(0,0,0,.85);
	overflow-x: auto; scrollbar-width: none;
	flex-shrink: 0; justify-content: center;
	position: relative; z-index: 20; /* stays above scaled image */
}
#f-lb-bar::-webkit-scrollbar { display: none; }
.f-lb-thumb {
	width: 50px; height: 50px; flex: 0 0 50px;
	border: 2px solid rgba(255,255,255,.25); border-radius: 4px;
	overflow: hidden; cursor: pointer; padding: 0; background: #333;
}
.f-lb-thumb.on { border-color: #fff; }
.f-lb-thumb img { width: 100%; height: 100%; object-fit: cover; }
