:root {
  /* Theme (2026-11-16): the owner approved a colourful pink
     "beauty shop" interface — the primary colour moved from Daraz
     orange to deep pink/magenta. The variable names stay (--orange
     is read all over the sheet); only the values changed. */
  --orange: #e91e63;
  --orange-dark: #c2185b;
  --orange-soft: #fce4ec;
  --ink: #212121;
  --muted: #757575;
  --line: #eee;
  --bg: #f5f5f5;
  --green: #1a7f37;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; }
html[data-font="big"] { font-size: 19px; }
html[data-font="bigger"] { font-size: 22px; }
/* At the big text sizes every rem grows 19-38%: the fixed-size
   chrome adapts so nothing ever spills off the screen (owner's
   phone runs "আরও বড়" — the trust bar and header overflowed and
   the right side looked cut off). Trust items stack icon-over-text
   (full cell width for the words), the header lockup steps down. */
html[data-font="bigger"] .logo { font-size: 1.15rem; }
html[data-font="bigger"] .logo-img { width: 1.9rem; height: 1.9rem; }
html[data-font="bigger"] .logo-tag { font-size: .64rem; }
html[data-font="bigger"] .icon-btn { width: 1.9rem; height: 1.9rem; }
body {
  font-family: "Noto Serif Bengali", serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.55;
  padding-bottom: 4.6rem;
  max-width: 560px;
  margin: 0 auto;
  overflow-x: hidden; overflow-x: clip;
}
.hidden { display: none !important; }
/* Owner panel active: the shop chrome disappears — no search bar, no
   ⋯ menu button, no bottom nav, and no dead space where the nav was.
   Only the brand header (logo + ঘরে পাবেন) stays above the panel. */
body.owner-active .search-row,
body.owner-active #menuBtn,
body.owner-active #offerBell,
body.owner-active .bottom-nav { display: none; }
body.owner-active { padding-bottom: 0; }
button { font-family: inherit; cursor: pointer; }
input, select, textarea { font-family: inherit; font-size: 1rem; }

/* ---------------- top bar ---------------- */
.topbar {
  position: sticky; top: 0; z-index: 40;
  background: linear-gradient(120deg, #ad1457 0%, #d81b60 45%, #ec407a 100%);
  padding: 0.3rem 0.8rem 0.3rem;
  box-shadow: 0 2px 8px rgba(0,0,0,.18);
}
.topbar-row { display: flex; align-items: center; justify-content: space-between; }
.top-actions { display: flex; align-items: center; gap: 0.85rem; }
.logo { color: #fff; font-weight: 900; font-size: 1.38rem; letter-spacing: .2px; display: flex; align-items: center; gap: .55rem; }
.logo-text { display: flex; flex-direction: column; line-height: 1.08; }
.logo-tag { font-size: .74rem; font-weight: 600; opacity: .92; letter-spacing: .4px; }
.logo-img {
  width: 2.1rem; height: 2.1rem; border-radius: 50%; object-fit: cover; flex: none;
  background: #fff; box-shadow: 0 0 0 2px rgba(255,255,255,.85), 0 2px 6px rgba(0,0,0,.25);
}
.icon-btn {
  background: rgba(255,255,255,.22); color: #fff; border: none;
  width: 2.1rem; height: 2.1rem; border-radius: 50%;
  font-size: 1.35rem; line-height: 1; backdrop-filter: blur(3px);
  display: flex; align-items: center; justify-content: center;
}
/* Bell + menu are white line pictograms (the reference style), a
   comfortable size with clear air between them (owner's brief). */
.icon-btn svg { width: 1.15rem; height: 1.15rem; display: block; }
.search-row { margin-top: 0.4rem; }
.search-row input {
  width: 100%; border: none; border-radius: 2rem;
  padding: 0.3rem 1rem 0.3rem 2.7rem; outline: none; background: #fff;
  font-size: 0.85rem; box-shadow: 0 2px 8px rgba(0,0,0,.12);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%232121' stroke-width='2.6' stroke-linecap='round'%3E%3Ccircle cx='10.5' cy='10.5' r='6.5'/%3E%3Cpath d='M15.5 15.5 21 21'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: 0.95rem center; background-size: 1.3rem;
}

/* ---------------- hero banner slider ----------------
   Three banners rotate (owner's brief, 2026-11-16). The container
   keeps the .banner class so the বিশেষ ছাড় view still hides it
   with the rule below. Slides are rendered by app.js: designed
   defaults (gradient + catalog photo) or the owner's own uploaded
   photo full-bleed with an optional text overlay. */
.banner {
  margin: 0.55rem 0.7rem; border-radius: 0.9rem; color: #fff;
  overflow: hidden; position: relative;
}
.hero-track { display: flex; transition: transform .55s ease; }
.hero-slide {
  /* Round 11 (owner's first-screen demand): the stage is a slim
     4.2:1 panorama so products show on the first screen. Slide 1's
     picture is pre-padded to this exact shape (banner-wide.jpg),
     so nothing of it is ever cropped. */
  min-width: 100%; aspect-ratio: 5 / 1; min-height: 72px; max-height: 240px;
  display: flex; align-items: center;
  gap: 0.6rem; padding: 0.7rem; cursor: pointer; position: relative;
  overflow: hidden;
}
/* Designed photo banners: live text over the scene's empty left. */
.hero-content {
  position: absolute; left: 0; top: 0; bottom: 0; width: 64%;
  padding: 0.6rem 0.4rem 0.6rem 0.95rem;
  display: flex; flex-direction: column; justify-content: center;
  align-items: flex-start; gap: 0.38rem;
}
.hero-photo-bg .hero-title {
  color: #c2185b; font-size: 1.15rem; line-height: 1.2;
  text-shadow: 0 1px 0 rgba(255,255,255,.65);
}
.hero-photo-bg .hero-title .ht-green { color: #2e7d32; }
.hero-subpill {
  background: #2e7d32; color: #fff; font-weight: 700; font-size: .76rem;
  line-height: 1.3; padding: 0.22rem 0.6rem; border-radius: 2rem;
}
.hero-photo-bg .hero-cta { background: #d81b60; color: #fff; margin-top: 0.15rem; }
.hero-text { flex: 1; min-width: 0; }
.hero-title { font-size: 1.45rem; font-weight: 900; line-height: 1.25; text-shadow: 0 1px 6px rgba(0,0,0,.25); }
.hero-sub { opacity: .95; margin-top: 0.2rem; line-height: 1.45; font-size: .92rem; }
.hero-cta {
  display: inline-block; margin-top: 0.5rem; background: #fff;
  color: var(--orange-dark); font-weight: 800; font-size: .82rem;
  padding: 0.22rem 0.7rem; border-radius: 2rem;
}
.hero-photo {
  width: 104px; height: 132px; object-fit: cover; border-radius: 0.7rem;
  box-shadow: 0 6px 18px rgba(0,0,0,.3); flex: none; background: #fff;
}
.hero-custom { padding: 0; }
.hero-full { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 38%; }
.hero-overlay {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 1.6rem 1rem 0.7rem;
  background: linear-gradient(transparent, rgba(0,0,0,.55));
}
.hero-dots {
  position: absolute; bottom: 0.45rem; left: 0; right: 0;
  display: flex; justify-content: center; gap: 0.35rem; z-index: 2;
}
.hero-dot {
  width: 0.5rem; height: 0.5rem; border-radius: 50%; border: none;
  background: rgba(255,255,255,.55); padding: 0; cursor: pointer;
}
.hero-dot.active { background: #fff; width: 1.1rem; border-radius: 1rem; }
@media (min-width: 768px) {
  .hero-photo { width: 150px; height: 182px; }
  .hero-title { font-size: 2rem; }
  .hero-photo-bg .hero-title { font-size: 2.1rem; }
  .hero-subpill { font-size: .95rem; }
  .hero-content { padding-left: 1.6rem; gap: 0.55rem; }
}

/* ---------------- categories ---------------- */
.cats {
  /* One row of six, like the reference — five categories plus the
     "আরও দেখুন" circle, divided by hairlines. The ladder restores
     the big rings on desktop. */
  display: grid; grid-template-columns: repeat(6, 1fr);
  gap: 0.5rem 0; padding: 0.16rem 0.3rem 0.12rem;
  background: #fff; margin: 0.1rem 0.7rem 0.6rem;
  border-radius: 1rem; box-shadow: 0 2px 10px rgba(0,0,0,.06);
}
.cat { display: flex; flex-direction: column; align-items: center; min-width: 0; }
.cat:first-child { border-left: none; }
.more-ring {
  background: linear-gradient(135deg, #8bc34a, #689f38);
  color: #fff; letter-spacing: 1px;
}

/* ---------------- trust row ----------------
   Four true claims from the shop's own banner, as colourful chips
   (the reference interface's trust strip, without its two promo
   boxes the owner asked to cut). */
.trust-row {
  /* One continuous light-green bar, the reference strip exactly:
     four items side by side, hairline dividers, icon left of bold
     dark text, at the picture's generous size. */
  /* ONE row of four on every screen (owner's settled demand).
     Round 14 (owner's ruler): icon LEFT of the words, compact —
     the only layout that reaches his 0.8cm height target while
     the words stay whole. */
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 0; margin: 0 0.7rem 0.6rem; padding: 0.22rem 0.3rem;
  background: #d5eabd; border-radius: 1rem;
  box-shadow: 0 2px 10px rgba(0,0,0,.05);
}
.trust-item {
  display: flex; flex-direction: row; align-items: center;
  min-width: 0;
  text-align: left; gap: 0.35rem;
  padding: 0.15rem 0.35rem;
  font-size: 0.62rem; font-weight: 700; line-height: 1.15; color: #1b3a12;
}
.trust-item + .trust-item { border-left: 1px solid #93bd6d; }
.trust-ico { font-size: 1.5rem; line-height: 1.1; flex: none; }
.trust-ico svg { width: 1.1rem; height: 1.1rem; display: block; }
/* A single long word must never push the bar off the screen
   (break-word, NOT anywhere — anywhere shredded words into
   single letters in the owner's screenshot). */
.trust-item > span:last-child { overflow-wrap: break-word; }
/* The divider lives HERE, in the later .cat rule — an earlier
   "border: none" in this very rule silently erased the border-left
   set above for three rounds (the owner's repeated "দাগ দেখা যায়
   না" complaint). border: 0 first, then the left divider back on. */
.cat { background: none; border: 0; border-left: 1px solid #cfcfcf; text-align: center; color: var(--ink); }
.cat .ring {
  /* Never wider than its grid cell: at the big text sizes a fixed
     3.9rem ring burst out of its column and shoved the row apart. */
  width: min(2.6rem, 74%); aspect-ratio: 1 / 1; margin: 0 auto 0.06rem; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.45rem; box-shadow: 0 3px 8px rgba(0,0,0,.15);
  border: 2px solid #fff; overflow: hidden; padding: 0;
}
/* Category circles carry a real product photo, like the reference.
   The studio photos frame the product at ~60%, so the circle zooms
   in — the product fills the circle big and bold, as in the picture. */
.cat .ring img, .cat-row .ring img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  transform: scale(1.35);
}
.cat-row .ring { overflow: hidden; padding: 0; }
.cat span { font-size: .72rem; font-weight: 700; display: block; line-height: 1.05; max-width: 100%; overflow-wrap: break-word; text-align: center; }
.cat.selected .ring { outline: 3px solid var(--orange); }

/* ---------------- flash ---------------- */
.flash-head {
  padding: 0.05rem 0.8rem; font-weight: 900; color: var(--orange-dark);
  font-size: 0.95rem; display: flex; align-items: center;
  justify-content: space-between;
}
/* The flash title wears the reference design's ribbon pill. */
#flashTitle {
  background: linear-gradient(90deg, #d81b60, #ec407a);
  color: #fff; padding: 0.18rem 0.85rem; border-radius: 2rem;
  box-shadow: 0 3px 8px rgba(216,27,96,.35); display: inline-block;
}
#flashTitle { cursor: pointer; }
.flash-sub {
  color: var(--orange-dark); font-weight: 700; font-size: .85rem; margin-left: .4rem;
  background: var(--orange-soft); border: 1px solid var(--orange); border-radius: 2rem;
  padding: .18rem .7rem; cursor: pointer;
}
.flash-sub.active { background: var(--orange); color: #fff; }
.flash-strip {
  display: flex; gap: 0.6rem; overflow-x: auto;
  padding: 0.4rem 0.8rem 0.8rem; scrollbar-width: none;
}
/* বিশেষ ছাড় is a dedicated view, not just a filter: while it is on,
   the banner, category row and flash section step aside so ONLY the
   discounted products remain on screen. Leaving it (সব দেখুন, হোম,
   phone back) restores everything. */
#view-home.discount-on .banner,
#view-home.discount-on .cats,
#view-home.discount-on .trust-row,
#view-home.discount-on .flash-head,
#view-home.discount-on .flash-strip { display: none; }
.flash-item {
  min-width: 7.2rem; background: #fff; border-radius: 0.7rem;
  padding: 0.45rem; border: 1px solid var(--line); text-align: left;
}
.flash-item .fname { font-size: .8rem; height: 2.4em; overflow: hidden; }
.off-badge {
  background: #e40046; color: #fff; font-size: .72rem; font-weight: 700;
  padding: 0.12rem 0.5rem; border-radius: 2rem;
  box-shadow: 0 2px 6px rgba(228,0,70,.35);
}

/* ---------------- product grid ---------------- */
.section-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.04rem 0.8rem;
}
.section-head h2 { font-size: 0.92rem; font-weight: 900; }
.grid {
  /* Owner's brief (2026-11-16, evening — reversing his morning
     3-column order after he compared Daraz on his own phone): TWO
     columns on the phone, Daraz-style, so every card, name and
     price reads big for village customers and small phones. The
     wide ladder further down still governs big browser windows. */
  display: grid; grid-template-columns: repeat(2, 1fr);
  gap: 0.55rem; padding: 0.1rem 0.6rem 0.8rem;
}
/* Daraz-style responsive layout: phones keep the 2-column grid and the
   560px app column above EXACTLY as they are — every rule here is
   min-width gated, so nothing changes under 600px. The wider ladder
   (768px and up: app column, bottom nav, owner lists, readable caps)
   lives at the END of this file so it wins the cascade over the base
   rules defined in between. */
@media (min-width: 600px) {
  .grid { grid-template-columns: repeat(3, 1fr); }
}
.card {
  background: #fff; border-radius: 0.8rem; overflow: hidden;
  border: 1px solid var(--line); display: flex; flex-direction: column;
}
.card .imgbox {
  /* Rounds 14-15 (owner's ruler): cards are 3.5cm tall on his
     phone — the photo window is shallower than square; products
     are centred in their studio frames, so nothing important is
     trimmed. The detail page keeps its full square gallery. */
  aspect-ratio: 1/0.72; display: flex; align-items: center; justify-content: center;
  position: relative; overflow: hidden;
}
.card .imgbox img { width: 100%; height: 100%; object-fit: cover; }
.placeholder {
  width: 100%; height: 100%; display: flex; flex-direction: column;
  align-items: center; justify-content: center; color: #fff; gap: .1rem;
}
.placeholder .initial { font-size: 2.6rem; font-weight: 900; }
.placeholder .brand { font-size: .8rem; opacity: .92; padding: 0 .4rem; text-align: center; }
.sample-badge {
  position: absolute; top: .45rem; left: .45rem;
  background: rgba(0,0,0,.62); color: #ffd54d;
  font-size: .72rem; font-weight: 700; padding: .08rem .45rem; border-radius: .3rem;
}
/* Out-of-stock (owner-marked): grey badge over the photo, greyed
   disabled button — visible at a glance in the grid. */
.oos-badge {
  position: absolute; top: .45rem; left: .45rem;
  background: #37474f; color: #fff;
  font-size: .72rem; font-weight: 800; padding: .12rem .5rem; border-radius: .3rem;
}
.add-btn[disabled] { background: #b0bec5; cursor: not-allowed; }
/* Owner list: the matching chip + the settings textarea field. */
.oos-chip {
  background: #eceff1; color: #37474f; border: 1px solid #b0bec5;
  font-size: .72rem; font-weight: 800; padding: .05rem .45rem;
  border-radius: 1rem; white-space: nowrap;
}
.settings-card label textarea {
  display: block; width: 100%; padding: .55rem .65rem; margin-top: .25rem;
  border: 1px solid #ccc; border-radius: .55rem; font: inherit;
  background: #fff; resize: vertical;
}
.settings-card label select {
  display: block; width: 100%; padding: .55rem .65rem; margin-top: .25rem;
  border: 1px solid #ccc; border-radius: .55rem; font: inherit;
  background: #fff;
}
/* Banner-slide editors (Settings → অফার ব্যানার). */
.slide-editor { border-top: 1px dashed #ddd; padding-top: .3rem; margin-top: .7rem; }
.slide-preview {
  width: 100%; max-height: 130px; object-fit: cover;
  border-radius: .6rem; margin: .3rem 0;
}
.card .body { padding: 0.38rem 0.55rem 0.42rem; display: flex; flex-direction: column; gap: .15rem; flex: 1; }
.card .pname { font-size: .9rem; line-height: 1.2; flex: 1; }
.price-row { display: flex; align-items: baseline; gap: .45rem; }
.price { color: var(--orange-dark); font-weight: 900; font-size: 1.05rem; }
.old-price { color: var(--muted); text-decoration: line-through; font-size: .82rem; }
.add-btn {
  margin-top: .25rem; background: var(--orange); color: #fff; border: none;
  border-radius: 0.55rem; padding: 0.38rem 0.1rem; font-weight: 700; font-size: .95rem;
}
.add-btn:active { background: var(--orange-dark); }
.load-more {
  display: block; margin: 0.4rem auto 1.2rem; background: #fff;
  border: 2px solid var(--orange); color: var(--orange-dark);
  padding: 0.6rem 1.6rem; border-radius: 2rem; font-weight: 700;
}
.grid-sentinel { height: 1px; }
.loading-note, .end-note { text-align: center; color: var(--muted); padding: 0.7rem 1rem 1.1rem; }
.loading-note { font-weight: 700; color: var(--orange-dark); }
.empty { text-align: center; color: var(--muted); padding: 1.4rem 1rem; }
.cart-shop-btn { margin-top: .85rem; }

/* Owner photo lightbox (2026-11-17): a full-screen big photo inside
   the owner panel — phone back or any tap closes it. */
.photo-lightbox {
  position: fixed; inset: 0; z-index: 120; background: rgba(0,0,0,.93);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 1rem;
}
.photo-lightbox.hidden { display: none; }
.photo-lightbox img {
  max-width: 100%; max-height: 82vh; object-fit: contain;
  border-radius: .6rem; background: #fff;
}
.photo-lightbox-caption { color: #fff; font-weight: 700; text-align: center; margin-top: .8rem; }
.photo-lightbox-close {
  position: absolute; top: .8rem; right: .8rem; width: 2.6rem; height: 2.6rem;
  border-radius: 50%; border: none; background: rgba(255,255,255,.16);
  color: #fff; font-size: 1.15rem;
}
.owner-product .thumb { cursor: pointer; }
#productForm .preview { cursor: pointer; }

/* ---------------- views / generic ---------------- */
.view { display: none; }
.view.active { display: block; }
.page-title { padding: 0.9rem 0.8rem 0.4rem; font-size: 1.3rem; font-weight: 900; }
.primary-btn {
  background: var(--orange); color: #fff; border: none; width: 100%;
  padding: 0.75rem; border-radius: 0.6rem; font-weight: 800; font-size: 1.05rem;
}
.primary-btn.small { width: auto; padding: 0.55rem 1.2rem; }
.link-btn { background: none; border: none; color: var(--orange-dark); font-weight: 700; padding: .4rem; }
.link-btn.danger { color: #c62828; display: block; margin: 1rem auto; }
.form-msg { margin-top: 0.6rem; font-weight: 600; }
.form-msg.ok { color: var(--green); }
.form-msg.fail { color: #c62828; }
.hint { color: var(--muted); font-size: .9rem; margin-bottom: .6rem; }
.hint code { background: #f0f0f0; padding: .05rem .3rem; border-radius: .25rem; }

/* ---------------- categories page ---------------- */
.cat-list { padding: 0.4rem 0.8rem; display: flex; flex-direction: column; gap: .55rem; }
.cat-row {
  display: flex; align-items: center; gap: .8rem; background: #fff;
  border: 1px solid var(--line); border-radius: .8rem; padding: .7rem .9rem;
  text-align: left; width: 100%; font-size: 1.05rem; font-weight: 700;
}
.cat-row .ring { width: 3.3rem; height: 3.3rem; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 1.5rem; }

/* ---------------- cart / checkout ---------------- */
.cart-item {
  display: flex; gap: .7rem; background: #fff; margin: 0.5rem 0.8rem;
  border: 1px solid var(--line); border-radius: .8rem; padding: .6rem;
  align-items: center;
}
.cart-item .thumb { width: 3.4rem; height: 3.4rem; border-radius: .5rem; overflow: hidden; flex: none; }
.cart-item .thumb img { width: 100%; height: 100%; object-fit: cover; }
.cart-item .thumb .placeholder .initial { font-size: 1.4rem; }
.cart-item .thumb .placeholder .brand { display: none; }
.cart-item .info { flex: 1; }
.qty { display: flex; align-items: center; gap: .5rem; }
.qty button {
  width: 1.8rem; height: 1.8rem; border-radius: 50%; border: 1px solid #ccc;
  background: #fff; font-size: 1.05rem; line-height: 1;
}
.totals {
  background: #fff; margin: 0.8rem; border: 1px solid var(--line);
  border-radius: .8rem; padding: .8rem .9rem;
}
.totals > div { display: flex; justify-content: space-between; padding: .15rem 0; }
.totals .grand { border-top: 1px dashed #ccc; margin-top: .4rem; padding-top: .5rem; font-size: 1.1rem; }
.cod-note { color: var(--muted); font-size: .88rem; margin-top: .4rem; }
form label { display: block; margin: 0.7rem 0.8rem 0; font-weight: 600; }
form input, form select, form textarea {
  display: block; width: 100%; margin-top: .3rem; padding: .6rem .7rem;
  border: 1px solid #ccc; border-radius: .55rem; background: #fff; font-weight: 400;
}
#checkoutForm .primary-btn { margin: 0.9rem 0.8rem 0; width: calc(100% - 1.6rem); }
#checkoutForm .form-msg { margin: 0.6rem 0.8rem 1rem; }

/* ---------------- orders ---------------- */
.lookup { display: flex; gap: .5rem; margin: 0.6rem 0.8rem; }
.lookup input { flex: 1; padding: .55rem .7rem; border: 1px solid #ccc; border-radius: .55rem; }
.order-card {
  background: #fff; margin: 0.85rem 0.8rem; border: 1px solid var(--line);
  border-top: 3px solid var(--orange);
  border-radius: .8rem; padding: .7rem .9rem;
  box-shadow: 0 2px 8px rgba(0,0,0,.07);
}
.order-card .ohead { display: flex; justify-content: space-between; align-items: center; gap: .5rem; }
.status-chip { background: var(--orange-soft); color: var(--orange-dark); font-weight: 700; font-size: .8rem; padding: .1rem .55rem; border-radius: 1rem; white-space: nowrap; }
.order-card .odate { color: var(--muted); font-size: .88rem; margin-top: .1rem; }
.order-card .addr { color: var(--muted); font-size: .9rem; }
.oitems { display: flex; flex-direction: column; gap: .45rem; margin: .55rem 0; }
.oitem {
  display: flex; align-items: center; gap: .6rem;
  background: #fffaf5; border: 1px solid var(--line); border-radius: .6rem; padding: .35rem .5rem;
}
.oitem .thumb { width: 3rem; height: 3rem; border-radius: .45rem; overflow: hidden; flex: none; }
.oitem .thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.oitem .thumb .placeholder { width: 100%; height: 100%; }
.oitem .thumb .placeholder .initial { font-size: 1.2rem; }
.oitem .thumb .placeholder .brand { display: none; }
/* order tracking stepper */
.stepper { display: flex; align-items: flex-start; margin: .75rem 0 .35rem; }
.stepper .step { display: flex; flex-direction: column; align-items: center; width: 2.7rem; flex: none; text-align: center; }
.stepper .dot {
  width: 1.55rem; height: 1.55rem; border-radius: 50%; z-index: 1;
  background: #e3e3e3; border: 2px solid #e3e3e3; color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: .8rem; font-weight: 700;
}
.stepper .step.done .dot { background: var(--orange); border-color: var(--orange); }
.stepper .step.current .dot { background: #fff; border-color: var(--orange); color: var(--orange-dark); box-shadow: 0 0 0 3px var(--orange-soft); }
.stepper .step-label { font-size: .62rem; color: var(--muted); margin-top: .28rem; line-height: 1.3; }
.stepper .step.done .step-label, .stepper .step.current .step-label { color: var(--orange-dark); font-weight: 700; }
.stepper .step-line { flex: 1; height: 2px; background: #e3e3e3; margin-top: .78rem; }
.stepper .step.done + .step-line { background: var(--orange); }
.cancelled-badge {
  background: #fdecea; color: #c62828; font-weight: 700; text-align: center;
  padding: .4rem .7rem; border-radius: .5rem; margin: .65rem 0 .25rem;
}
.orders-hint { margin: .15rem .8rem 0; }

.oitem .oinfo { flex: 1; min-width: 0; }
.oitem .oname { font-weight: 600; line-height: 1.35; }
.oitem .ometa { color: var(--muted); font-size: .88rem; }
.oitem .oline { white-space: nowrap; }

/* ---------------- owner ---------------- */
.owner-tabs { display: flex; gap: .4rem; padding: 0.4rem 0.8rem; flex-wrap: wrap; }
.owner-tabs .tab {
  border: 1px solid var(--orange); background: #fff; color: var(--orange-dark);
  border-radius: 2rem; padding: .4rem .9rem; font-weight: 700;
}
.owner-tabs .tab.active { background: var(--orange); color: #fff; }
.tabpane { display: none; }
.tabpane.active { display: block; }
.preview { width: 6rem; height: 6rem; object-fit: cover; border-radius: .6rem; margin: 0.6rem 0.8rem 0; border: 1px solid var(--line); }
.row-btns { display: flex; align-items: center; gap: .6rem; margin: 0.9rem 0.8rem 0; }
.row-btns .primary-btn { flex: 1; }
#tab-bulk { padding: 0.4rem 0.8rem; }
#tab-bulk textarea { width: 100%; padding: .6rem; border: 1px solid #ccc; border-radius: .55rem; }
#tab-bulk .primary-btn { margin-top: .6rem; }
.owner-product {
  display: flex; align-items: center; gap: .6rem; background: #fff;
  margin: 0.5rem 0.8rem; border: 1px solid var(--line); border-radius: .7rem; padding: .55rem .7rem;
}
.owner-product .info { flex: 1; }
.owner-product .info small { color: var(--muted); }
.mini-btn { border: 1px solid #bbb; background: #fff; border-radius: .45rem; padding: .35rem .6rem; font-weight: 700; }
.mini-btn.del { color: #c62828; border-color: #e0a3a3; }
.owner-order select { padding: .35rem; border-radius: .45rem; border: 1px solid #bbb; margin-top: .4rem; }
/* owner main tabs: পণ্য | অর্ডার | সেটিংস */
.owner-mtabs {
  display: flex; gap: .45rem; margin: 0.2rem 0.8rem 0.7rem;
  background: #fff; border: 1px solid var(--line); border-radius: 2rem; padding: .3rem;
}
.owner-mtabs .mtab {
  flex: 1; border: none; background: none; border-radius: 2rem;
  padding: .5rem .2rem; font-weight: 800; font-size: .98rem; color: var(--muted);
}
.owner-mtabs .mtab.active { background: var(--orange); color: #fff; }
.mtabpane { display: none; }
.mtabpane.active { display: block; }
.pane-title { margin: 0.4rem 0.9rem 0.2rem; font-size: 1.08rem; font-weight: 900; }
.owner-filter { display: flex; gap: .45rem; padding: 0.5rem 0.8rem 0; }
.owner-filter .chip {
  border: 1px solid var(--orange); background: #fff; color: var(--orange-dark);
  border-radius: 2rem; padding: .35rem .85rem; font-weight: 700;
}
.owner-filter .chip.active { background: var(--orange); color: #fff; }
.price-pending {
  background: #fff3e0; color: #b26a00; border: 1px solid #ffcc80;
  font-size: .72rem; font-weight: 800; padding: .08rem .45rem; border-radius: 1rem;
  white-space: nowrap;
}
.owner-product .thumb { width: 3.2rem; height: 3.2rem; border-radius: .5rem; overflow: hidden; flex: none; }
.owner-product .thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.owner-product .thumb .placeholder { width: 100%; height: 100%; }
.owner-product .thumb .placeholder .initial { font-size: 1.25rem; }
.owner-product .thumb .placeholder .brand { display: none; }
/* settings tab cards (PIN change, backup, fingerprint — each exactly once) */
.settings-card {
  background: #fff; border: 1px solid var(--line); border-top: 3px solid var(--orange);
  border-radius: .7rem; margin: 0.9rem 0.8rem; padding: 0.4rem 0.9rem 1rem;
}
.settings-card h3 { margin: 0.7rem 0 0.4rem; font-size: 1.05rem; font-weight: 900; }
.settings-card .primary-btn { margin-top: 0.6rem; }
.settings-card form label { margin-left: 0; margin-right: 0; }
.settings-card #fpList .owner-product { margin-left: 0; margin-right: 0; }
.settings-card label input { display: block; width: 100%; padding: .55rem .65rem; border: 1px solid #ccc; border-radius: .55rem; margin-top: .25rem; }
/* settings category heads: big icon in an orange-tinted circle + title */
.settings-card-head { display: flex; align-items: center; gap: .6rem; margin: 0.7rem 0 0.4rem; }
.settings-card-head h3 { margin: 0; }
.settings-ico {
  flex: none; width: 2.6rem; height: 2.6rem; border-radius: 50%;
  background: #fff3ea; border: 1px solid #ffd9c2;
  display: flex; align-items: center; justify-content: center; font-size: 1.35rem;
}
/* settings category list: four tappable rows (icon + name + arrow);
   each opens its own detail screen one level deeper */
#settingsMenu { margin: 0.9rem 0.8rem; display: flex; flex-direction: column; gap: 0.6rem; }
#settingsMenu.hidden { display: none; }
.settings-row {
  display: flex; align-items: center; gap: 0.7rem; width: 100%;
  background: #fff; border: 1px solid var(--line); border-radius: .7rem;
  padding: .75rem .9rem; font: inherit; font-size: 1.02rem; font-weight: 800;
  color: inherit; cursor: pointer; text-align: left;
}
.settings-row:active { background: #fff3ea; }
.settings-row-arrow { margin-left: auto; font-size: 1.5rem; line-height: 1; font-weight: 900; color: var(--orange); }
.settings-back { display: inline-block; margin: 0.9rem 0.8rem 0; font-size: 1rem; font-weight: 800; }
.settings-subhead { margin: 1rem 0 0.4rem; font-size: 0.98rem; font-weight: 900; }
/* pending-count pill on the ডিভাইস রিকোয়েস্ট settings row */
.settings-badge {
  flex: none; min-width: 1.5rem; height: 1.5rem; padding: 0 0.35rem;
  border-radius: 999px; background: #d92c2c; color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.85rem; font-weight: 900;
}
.settings-badge.hidden { display: none; }
/* device rows inside the ডিভাইস রিকোয়েস্ট card reuse .owner-product;
   the approval code gets its own big chip so it can be compared with
   the code on the waiting device's screen */
.settings-card #devPendingList .owner-product,
.settings-card #devTrustedList .owner-product { margin-left: 0; margin-right: 0; }
.dev-code {
  flex: none; background: #fff3ea; border: 1px dashed var(--orange); color: var(--orange);
  border-radius: .55rem; padding: .25rem .6rem; font-size: 1.25rem; font-weight: 900; letter-spacing: .15em;
}
/* the owner's own phone in the trusted list: flagged, never revocable
   from that screen (every phone shows the same UA label) */
.dev-mine {
  flex: none; background: #e8f7ee; border: 1px solid #9fd8b4; color: #14713c;
  border-radius: .55rem; padding: .3rem .6rem; font-size: .9rem; font-weight: 800;
}
/* panel heads-up: a new device is asking to log in */
.device-notice {
  margin: 0.7rem 0.8rem 0; padding: .65rem .9rem; cursor: pointer;
  background: #fff7ed; border: 1px solid #ffd9c2; border-left: 4px solid var(--orange);
  border-radius: .6rem; font-weight: 700;
}
.device-notice.hidden { display: none; }
/* PIN modal: waiting-for-owner-approval block */
.pin-wait { text-align: center; }
.pin-wait-title { font-size: 1.05rem; font-weight: 900; margin: 0.4rem 0; }
.pin-wait-code {
  font-size: 2.4rem; font-weight: 900; letter-spacing: .25em; color: var(--orange);
  background: #fff3ea; border: 1px dashed var(--orange); border-radius: .7rem;
  padding: .5rem 0 .5rem .25em; margin: 0.6rem 0;
}

/* settings step-up lock screen (fingerprint gate) */
.settings-lock {
  background: #fff; border: 1px solid var(--line); border-top: 3px solid var(--orange);
  border-radius: .7rem; margin: 0.9rem 0.8rem; padding: 1.6rem 1rem 1.2rem; text-align: center;
}
.settings-lock .lock-icon { font-size: 3.2rem; line-height: 1.1; }
.settings-lock h3 { margin: 0.5rem 0 0.3rem; font-size: 1.15rem; font-weight: 900; }
.settings-lock .hint { max-width: 22rem; margin: 0 auto; }
.settings-lock .primary-btn { margin-top: 0.9rem; }
.settings-lock .primary-btn:disabled { opacity: .5; }

/* ---------------- bottom nav ---------------- */
.bottom-nav {
  position: fixed; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 100%; max-width: 560px; background: #fff; z-index: 40;
  display: grid; grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid #ddd; box-shadow: 0 -2px 10px rgba(0,0,0,.06);
}
.nav-btn {
  /* Bigger, thumb-friendly targets (owner's brief: the reference
     design's bottom icons are visibly larger than ours were). */
  background: none; border: none; padding: 0.26rem 0 0.3rem;
  font-size: .78rem; color: var(--muted); position: relative; font-weight: 600;
}
.nav-btn .nav-ico { display: block; font-size: 1.65rem; line-height: 1.15; }
/* Bottom-nav icons are clean line pictograms (the reference style),
   drawn in the button's own colour — pink when active, grey else. */
.nav-btn .nav-ico svg { width: 1.25rem; height: 1.25rem; display: block; margin: 0 auto; }
.nav-btn .nav-label { display: block; }
.nav-btn.active { color: var(--orange-dark); }
.badge {
  position: absolute; top: .2rem; right: calc(50% - 1.3rem);
  background: #e40046; color: #fff; border-radius: 1rem;
  font-size: .68rem; padding: .02rem .38rem;
}

/* ---------------- modals / toast ---------------- */
.modal {
  position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 60;
  display: flex; align-items: flex-end; justify-content: center;
}
.modal-card {
  background: #fff; width: 100%; max-width: 560px; border-radius: 1.1rem 1.1rem 0 0;
  padding: 1.1rem 1rem 1.3rem;
}
.modal-card h3 { margin-bottom: .7rem; font-size: 1.2rem; }
.menu-group { margin-bottom: .9rem; }
.menu-label { font-weight: 700; margin-bottom: .4rem; }
.seg { display: flex; gap: .4rem; }
.seg button {
  flex: 1; padding: .5rem; border-radius: .6rem; border: 1px solid #ccc; background: #fff; font-weight: 600;
}
.seg button.active { background: var(--orange); border-color: var(--orange); color: #fff; }
.menu-item {
  display: block; width: 100%; text-align: left; background: #fafafa;
  border: 1px solid var(--line); border-radius: .6rem;
  padding: .65rem .8rem; margin-bottom: .5rem; font-size: 1rem; font-weight: 600;
}
.about-text { color: var(--muted); margin: 0 0 .8rem; }
.about-logo { display: block; width: 150px; height: 150px; object-fit: cover; border-radius: 18px; margin: 0 auto .8rem; }
.modal-card input { display: block; width: 100%; padding: .6rem .7rem; border: 1px solid #ccc; border-radius: .55rem; margin-bottom: .5rem; }
.toast {
  position: fixed; bottom: 5.6rem; left: 50%; transform: translateX(-50%);
  background: #222; color: #fff; padding: .55rem 1.1rem; border-radius: 2rem;
  z-index: 80; font-size: .95rem; box-shadow: 0 4px 14px rgba(0,0,0,.3);
}

/* ---------------- order cost breakdown ---------------- */
.cost-breakdown {
  border-top: 1px dashed #d8d8d8; margin-top: .55rem; padding-top: .5rem;
}
.cost-breakdown > div {
  display: flex; justify-content: space-between; align-items: baseline;
  padding: .14rem 0; color: var(--muted);
}
.cost-breakdown > div b { color: #222; font-weight: 700; }
.cost-breakdown > div.grand {
  border-top: 1px solid var(--line); margin-top: .3rem; padding-top: .45rem;
  color: #222; font-size: 1.05rem;
}
.cost-breakdown > div.grand b { color: var(--orange-dark); font-weight: 900; }

/* ---------------- product detail view ---------------- */
.detail {
  position: fixed; top: 0; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 100%; max-width: 560px; z-index: 50;
  background: var(--bg); overflow-y: auto; -webkit-overflow-scrolling: touch;
}
.detail-head {
  position: sticky; top: 0; z-index: 5; background: #fff;
  border-bottom: 1px solid var(--line); padding: .55rem .8rem;
}
.detail-back {
  background: none; border: none; font-size: 1.05rem; font-weight: 800;
  color: var(--orange-dark); padding: .25rem .1rem;
}
.detail-main {
  position: relative; aspect-ratio: 1/1; background: #fff; overflow: hidden;
}
.detail-main .placeholder { position: absolute; inset: 0; }
.detail-main .placeholder .initial { font-size: 4rem; }
img.detail-img {
  width: 100%; height: 100%; object-fit: contain; display: block; cursor: zoom-in;
}
.detail-main.zoomed img.detail-img { transform: scale(1.7); cursor: zoom-out; }
.detail-arrow {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 2.3rem; height: 2.3rem; border-radius: 50%; border: none;
  background: rgba(0,0,0,.45); color: #fff; font-size: 1.5rem; line-height: 1;
  display: flex; align-items: center; justify-content: center;
}
.detail-arrow.prev { left: .6rem; }
.detail-arrow.next { right: .6rem; }
.detail-count {
  position: absolute; right: .7rem; bottom: .7rem;
  background: rgba(0,0,0,.55); color: #fff; font-size: .8rem; font-weight: 700;
  padding: .12rem .55rem; border-radius: 1rem;
}
.detail-dots { display: flex; gap: .4rem; justify-content: center; padding: .55rem 0 0; background: #fff; }
.dot-nav {
  width: .55rem; height: .55rem; border-radius: 50%; border: none;
  background: #d5d5d5; padding: 0;
}
.dot-nav.active { background: var(--orange); }
.detail-thumbs {
  display: flex; gap: .5rem; padding: .6rem .8rem .8rem; background: #fff; overflow-x: auto;
}
.detail-thumbs img {
  width: 3.6rem; height: 3.6rem; object-fit: cover; border-radius: .5rem;
  border: 2px solid var(--line); flex: none; background: #fff;
}
.detail-thumbs img.active { border-color: var(--orange); }
.detail-info { background: #fff; margin-top: .6rem; padding: .9rem .95rem 1rem; }
.detail-name { font-size: 1.28rem; font-weight: 900; line-height: 1.35; }
.detail-catrow { display: flex; gap: .45rem; margin-top: .5rem; flex-wrap: wrap; }
.detail-price { margin-top: .55rem; }
.detail-price .price { font-size: 1.55rem; }
.detail-h { margin: 1rem 0 .35rem; font-size: 1.05rem; font-weight: 900; }
.detail-lines { color: var(--muted); line-height: 1.55; }
.detail-lines p { margin: .15rem 0; }
.detail-qty {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 1rem; font-weight: 700;
}
.detail-actions {
  position: sticky; bottom: 0; display: flex; gap: .6rem;
  background: #fff; border-top: 1px solid var(--line);
  padding: .65rem .8rem calc(.65rem + env(safe-area-inset-bottom));
  margin-top: .6rem;
}
.detail-actions button {
  flex: 1; padding: .8rem .4rem; border-radius: .6rem; font-size: 1.02rem; font-weight: 800;
}
/* Owner's order (2026-11-16): the detail add-to-cart button is
   solid pink like every other action button — not white. */
.detail-add { background: var(--orange); border: 2px solid var(--orange); color: #fff; }
.detail-buy { background: var(--orange); border: 2px solid var(--orange); color: #fff; }
/* Out-of-stock detail state: a red note under the price and a single
   greyed-out action in place of the buy buttons. */
.oos-note { color: #b71c1c; font-weight: 700; margin-top: .5rem; }
.detail-oos { background: #eceff1; border: 2px solid #b0bec5; color: #546e7a; cursor: not-allowed; }
/* WhatsApp order + share row on the product page: WhatsApp is how
   many village customers prefer to order — the button opens a chat
   to the shop number with the product already written out. Share
   copies/opens a link that lands on this very product. */
.detail-share-row { display: flex; gap: .6rem; margin-top: 1rem; }
.detail-wa {
  flex: 1; background: #25d366; color: #fff; text-align: center;
  padding: .68rem .4rem; border-radius: .6rem; font-weight: 800;
  font-size: .98rem; text-decoration: none;
}
.detail-wa:active { background: #1eb856; }
.detail-share {
  background: #fff; border: 2px solid #90a4ae; color: #37474f;
  padding: .68rem .8rem; border-radius: .6rem; font-weight: 700; font-size: .95rem;
}
/* "আবার অর্ডার করুন" on the customer's own order cards. */
.reorder-btn {
  margin-top: .6rem; background: #fff; border: 2px solid var(--orange);
  color: var(--orange-dark); border-radius: .55rem;
  padding: .45rem .95rem; font-weight: 700; font-size: .92rem;
}
.reorder-btn:active { background: #fff3e0; }
/* Free-delivery progress line in the cart totals. */
.free-del-hint { color: #2e7d32; font-weight: 700; margin-top: .35rem; }

/* "এরকম আরও পণ্য" — related products under the detail actions. On the
   phone sheet it is its own white block; on desktop it becomes the
   full-width third row of the detail grid (rule below). */
.detail-related { background: #fff; margin-top: .6rem; padding: .9rem .7rem .4rem; }
.detail-related .detail-h { margin: 0 0 .5rem .25rem; }
.related-grid { padding: 0; }

/* ---------------- wide screens: tablet / desktop mode / PC ---------
   The old ladder started widening at 992px, but Chrome's "Desktop
   site" mode on Android uses a 980px layout viewport — just under
   the gate — so desktop-mode phones (and the owner panel with them)
   stayed a narrow 560px strip in the middle of the screen (owner's
   complaint, 2026-11-16). Widening now starts at 768px and the app
   column keeps growing with the screen, Daraz-style; below 768px
   nothing in this section applies, so the phone layout is untouched.
   The fixed bottom nav carries its own 560px cap and is widened in
   step. Forms, cart and settings keep a readable centred cap instead
   of stretching edge to edge; the product detail overlay keeps its
   own 560px sheet. Placed at the end of the file so these rules win
   the cascade over the base rules above. */
@media (min-width: 768px) {
  html { background: var(--bg); }
  body { max-width: 1160px; }
  .bottom-nav { max-width: 1160px; }
  .grid { grid-template-columns: repeat(4, 1fr); }
  .cats { grid-template-columns: repeat(6, 1fr); }
  .cat .ring { width: 4.3rem; height: 4.3rem; font-size: 2rem; }
  .cat span { font-size: 0.92rem; }
  /* lists and orders go two abreast — at 768px each cell is still
     wider than the phone column these cards were designed for */
  #ownerProductList { display: grid; grid-template-columns: 1fr 1fr; align-items: start; }
  #ownerOrders, #ordersList { display: grid; grid-template-columns: 1fr 1fr; align-items: start; }
  /* readable caps, centred */
  .cart-item, .totals { max-width: 860px; margin-left: auto; margin-right: auto; }
  #checkoutForm { max-width: 760px; margin-left: auto; margin-right: auto; }
  #productForm { max-width: 820px; margin-left: auto; margin-right: auto; }
  #settingsMenu, .settings-screen, .settings-lock { max-width: 760px; margin-left: auto; margin-right: auto; }
  /* product detail, Daraz-style (owner-approved 2026-11-16): the sheet
     widens and lifts off the page; gallery on the left, name/price/
     details on the right, and the buy buttons rest at the bottom of
     the right column instead of sticking to the screen bottom. The
     phone sheet (single column, sticky buttons) is untouched. */
  #productDetail { max-width: 1100px; box-shadow: 0 0 44px rgba(0,0,0,.28); }
  #detailBody {
    display: grid; grid-template-columns: 480px 1fr; grid-template-rows: auto 1fr auto;
    column-gap: 1.4rem; padding: 0 1.2rem 1.2rem; background: #fff;
  }
  .detail-gallery { grid-column: 1; grid-row: 1 / 3; }
  .detail-info { grid-column: 2; grid-row: 1; margin-top: 0; }
  .detail-actions { grid-column: 2; grid-row: 2; align-self: end; position: static; margin-top: 1rem; }
  .detail-related { grid-column: 1 / -1; grid-row: 3; margin-top: 1.2rem; padding: 0; background: none; }
}
@media (min-width: 1200px) {
  body { max-width: 1240px; }
  .bottom-nav { max-width: 1240px; }
  .grid { grid-template-columns: repeat(5, 1fr); }
}
@media (min-width: 1500px) {
  body { max-width: 1460px; }
  .bottom-nav { max-width: 1460px; }
  .grid { grid-template-columns: repeat(6, 1fr); }
}
@media (min-width: 1850px) {
  body { max-width: 1680px; }
  .bottom-nav { max-width: 1680px; }
  .grid { grid-template-columns: repeat(7, 1fr); }
}
/* Roomier card internals return on wide screens, where each of the
   4–7 columns is far wider than a phone's three-across card. */
@media (min-width: 768px) {
  .grid { gap: 0.6rem; padding: 0.2rem 0.7rem 0.8rem; }
  .card .body { padding: 0.55rem 0.6rem 0.7rem; gap: 0.25rem; }
  .card .pname { font-size: 0.95rem; }
  .price { font-size: 1.08rem; }
  .old-price { font-size: 0.85rem; }
  .add-btn { font-size: 0.95rem; padding: 0.5rem; }
}

/* Installed app (PWA): the wide ladder above is for browser tabs only.
   In the installed app the owner wants products to stay medium-sized
   even on a big window — so the shop grid is capped at 3 columns in
   standalone/fullscreen display modes (his correction, 2026-11-16).
   Placed last so it wins over every ladder step. */
@media (display-mode: standalone) and (min-width: 600px),
       (display-mode: fullscreen) and (min-width: 600px) {
  .grid { grid-template-columns: repeat(3, 1fr); }
}
