:root {
  --teal: #0e5a57; --teal-d: #083f3d; --teal-l: #e3f1ef; --saffron: #e8751a; --saffron-d: #c75f0f;
  --cream: #faf6ef; --ink: #1d2a2a; --muted: #5f6c69; --line: #e6dfd2; --white: #fff; --red: #b3261e; --green: #1e7a3c;
  --radius: 14px; --shadow: 0 2px 10px rgba(20, 40, 38, .08);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 16px/1.6 "Noto Sans Devanagari", "Segoe UI", system-ui, -apple-system, Roboto, sans-serif; color: var(--ink); background: var(--cream); }
a { color: var(--teal); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }
h1, h2, h3 { line-height: 1.3; margin: 0 0 .5em; color: var(--teal-d); }
h1 { font-size: 1.7rem; } h2 { font-size: 1.35rem; } h3 { font-size: 1.1rem; }
.wrap { width: min(1160px, 100% - 32px); margin-inline: auto; }
.muted { color: var(--muted); } .small { font-size: .88rem; }

/* header */
.top { background: var(--white); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
.top .wrap { display: flex; align-items: center; gap: 14px; min-height: 62px; }
.logo { display: flex; align-items: center; gap: 9px; font-weight: 700; color: var(--teal-d); font-size: 1.12rem; }
.logo:hover { text-decoration: none; }
.logo .mark { width: 34px; height: 34px; border-radius: 9px; background: var(--teal); color: #fff; display: grid; place-items: center; font-size: 1.1rem; }
.nav { display: flex; gap: 4px; margin-left: auto; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.nav a { padding: 8px 11px; border-radius: 9px; color: var(--ink); font-weight: 500; }
.nav a:hover { background: var(--teal-l); text-decoration: none; }
.nav .btn { margin-left: 4px; }
.nav form { margin: 0; }
.link-btn { background: none; border: 0; font: inherit; color: var(--ink); padding: 8px 11px; border-radius: 9px; cursor: pointer; font-weight: 500; }
.link-btn:hover { background: var(--teal-l); }

/* buttons and forms */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 0; border-radius: 10px; padding: 10px 18px; font: inherit; font-weight: 600; cursor: pointer; background: var(--teal); color: #fff; min-height: 44px; }
.btn:hover { background: var(--teal-d); text-decoration: none; }
.btn.accent { background: var(--saffron); } .btn.accent:hover { background: var(--saffron-d); }
.btn.ghost { background: transparent; color: var(--teal); box-shadow: inset 0 0 0 1.5px var(--teal); } .btn.ghost:hover { background: var(--teal-l); }
.btn.danger { background: var(--red); } .btn.small { padding: 6px 12px; min-height: 36px; font-size: .9rem; }
.btn.wa { background: #1fa855; } .btn.wa:hover { background: #168a44; }
.btn[disabled] { opacity: .6; cursor: wait; }
label { display: block; font-weight: 600; margin-bottom: 4px; font-size: .95rem; }
.req::after { content: " *"; color: var(--red); }
input[type=text], input[type=tel], input[type=email], input[type=password], input[type=number], select, textarea {
  width: 100%; padding: 10px 12px; border: 1.5px solid var(--line); border-radius: 10px; font: inherit; background: #fff; color: var(--ink); min-height: 44px;
}
textarea { min-height: 120px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 3px solid rgba(14, 90, 87, .22); border-color: var(--teal); }
.field { margin-bottom: 14px; }
.grid2 { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }
.err { color: var(--red); font-size: .88rem; margin-top: 3px; }
.hp { position: absolute; left: -9999px; height: 0; overflow: hidden; }
.checks { display: flex; gap: 8px; flex-wrap: wrap; }
.chip-radio { position: relative; }
.chip-radio input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.chip-radio span { display: inline-block; padding: 8px 16px; border-radius: 99px; border: 1.5px solid var(--line); background: #fff; font-weight: 600; }
.chip-radio input:checked + span { background: var(--teal); color: #fff; border-color: var(--teal); }
.chip-radio input:focus-visible + span { outline: 3px solid rgba(14, 90, 87, .3); }

/* messages */
.flash { padding: 12px 16px; border-radius: 10px; margin: 16px 0 0; font-weight: 500; }
.flash.ok { background: #e4f5e9; color: #14532d; } .flash.bad { background: #fde8e6; color: #7a1812; }

/* hero */
.hero { background: linear-gradient(135deg, var(--teal-d), var(--teal)); color: #fff; padding: 44px 0 56px; }
.hero h1 { color: #fff; font-size: clamp(1.7rem, 4.5vw, 2.6rem); max-width: 18ch; }
.hero p { color: #d3ebe8; max-width: 52ch; margin: 0 0 22px; font-size: 1.05rem; }
.searchbox { background: #fff; color: var(--ink); border-radius: 16px; padding: 16px; box-shadow: 0 10px 30px rgba(0, 0, 0, .18); }
.tabs { display: flex; gap: 6px; margin-bottom: 12px; }
.searchbox .row { display: grid; gap: 10px; grid-template-columns: 1fr 1fr 1.4fr auto; align-items: end; }
.cats { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 18px; }
.cats a { background: rgba(255, 255, 255, .13); color: #fff; padding: 7px 14px; border-radius: 99px; font-size: .92rem; }
.cats a:hover { background: rgba(255, 255, 255, .25); text-decoration: none; }

/* sections and cards */
.section { padding: 34px 0 6px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.cards { display: grid; gap: 18px; grid-template-columns: repeat(auto-fill, minmax(255px, 1fr)); margin: 14px 0 20px; }
.card { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; display: flex; flex-direction: column; border: 1px solid var(--line); transition: transform .15s; }
.card:hover { transform: translateY(-3px); text-decoration: none; }
.card .pic { aspect-ratio: 4/3; background: var(--teal-l) center/cover; position: relative; display: grid; place-items: center; font-size: 2.4rem; }
.card .pic img { width: 100%; height: 100%; object-fit: cover; }
.badge { display: inline-block; padding: 3px 10px; border-radius: 99px; font-size: .78rem; font-weight: 700; background: var(--teal-l); color: var(--teal-d); }
.card .pic .badge { position: absolute; top: 10px; left: 10px; background: var(--saffron); color: #fff; }
.card .pic .badge.feat { left: auto; right: 10px; background: #fff; color: var(--saffron-d); }
.card .body { padding: 13px 15px 15px; display: grid; gap: 4px; color: var(--ink); }
.card .price { font-size: 1.28rem; font-weight: 700; color: var(--teal-d); }
.card .ttl { font-weight: 600; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card .meta { color: var(--muted); font-size: .9rem; display: flex; gap: 12px; flex-wrap: wrap; }
.empty { background: #fff; border: 1px dashed var(--line); border-radius: var(--radius); padding: 40px 20px; text-align: center; color: var(--muted); margin: 16px 0; }

.steps { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); margin: 14px 0 30px; }
.step { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.step b { width: 34px; height: 34px; border-radius: 50%; background: var(--saffron); color: #fff; display: grid; place-items: center; margin-bottom: 8px; }
.cta { background: var(--teal-l); border-radius: var(--radius); padding: 26px; text-align: center; margin: 10px 0 40px; }

/* list page */
.filters { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; margin: 18px 0; display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); align-items: end; }
.bar { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 4px; }
.pager { display: flex; gap: 14px; justify-content: center; align-items: center; margin: 22px 0 36px; }
.pager a, .pager .off { padding: 9px 16px; border-radius: 10px; background: #fff; border: 1px solid var(--line); font-weight: 600; }
.pager .off { color: #aaa; } .pager .now { color: var(--muted); }

/* detail */
.detail { display: grid; gap: 24px; grid-template-columns: minmax(0, 1fr) 340px; margin: 20px 0 30px; align-items: start; }
.gallery .main { aspect-ratio: 4/3; background: #000 center/contain no-repeat; border-radius: var(--radius); overflow: hidden; }
.gallery .main img { width: 100%; height: 100%; object-fit: contain; background: #111; }
.thumbs { display: flex; gap: 8px; margin-top: 8px; overflow-x: auto; padding-bottom: 4px; }
.thumbs button { border: 2px solid transparent; padding: 0; border-radius: 9px; overflow: hidden; width: 84px; height: 64px; flex: none; cursor: pointer; background: none; }
.thumbs button.on { border-color: var(--saffron); }
.thumbs img { width: 100%; height: 100%; object-fit: cover; }
.panel { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; margin-bottom: 16px; }
.big-price { font-size: 1.9rem; font-weight: 700; color: var(--teal-d); }
.specs { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin: 14px 0; }
.spec { background: var(--cream); border-radius: 10px; padding: 10px 12px; }
.spec small { display: block; color: var(--muted); }
.spec b { font-size: 1.02rem; }
.seller { position: sticky; top: 76px; }
.seller .who { display: flex; gap: 12px; align-items: center; margin-bottom: 12px; }
.avatar { width: 46px; height: 46px; border-radius: 50%; background: var(--teal); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 1.2rem; }
.seller .btn { width: 100%; margin-top: 8px; }
.notice { background: #fff4e5; border: 1px solid #f3d3a3; color: #7a4a09; border-radius: 10px; padding: 10px 14px; margin: 14px 0; }
.status { padding: 3px 10px; border-radius: 99px; font-size: .8rem; font-weight: 700; display: inline-block; }
.st-pending { background: #fff4e5; color: #8a5200; } .st-active { background: #e4f5e9; color: #14532d; } .st-rejected { background: #fde8e6; color: #7a1812; }
.st-sold { background: #e8eaf6; color: #283593; } .st-expired { background: #eee; color: #555; }

/* account and admin */
.box { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; margin: 22px 0; }
.narrow { width: min(460px, 100%); margin: 28px auto; }
.mine { display: grid; gap: 14px; margin: 16px 0 36px; }
.mine .row { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; display: grid; grid-template-columns: 110px 1fr auto; gap: 14px; align-items: center; }
.mine .pic { width: 110px; height: 82px; border-radius: 9px; background: var(--teal-l); overflow: hidden; display: grid; place-items: center; }
.mine .pic img { width: 100%; height: 100%; object-fit: cover; }
.acts { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.acts form { margin: 0; }
.photo-edit { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.photo-edit figure { margin: 0; position: relative; }
.photo-edit img { width: 96px; height: 72px; object-fit: cover; border-radius: 9px; }
.photo-edit button { position: absolute; top: -6px; right: -6px; width: 26px; height: 26px; border-radius: 50%; border: 0; background: var(--red); color: #fff; cursor: pointer; font-weight: 700; }
table.t { width: 100%; border-collapse: collapse; background: #fff; border-radius: var(--radius); overflow: hidden; }
table.t th, table.t td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
table.t th { background: var(--teal-l); color: var(--teal-d); font-size: .9rem; }
.scroll { overflow-x: auto; }
.tabs-a { display: flex; gap: 8px; flex-wrap: wrap; margin: 14px 0; }
.tabs-a a { padding: 7px 14px; border-radius: 99px; background: #fff; border: 1px solid var(--line); color: var(--ink); font-weight: 600; }
.tabs-a a.on { background: var(--teal); color: #fff; border-color: var(--teal); }

/* footer */
.foot { background: var(--teal-d); color: #cfe4e1; margin-top: 30px; padding: 30px 0 22px; }
.foot a { color: #fff; }
.foot .cols { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.foot h3 { color: #fff; }

@media (max-width: 880px) {
  .detail { grid-template-columns: 1fr; }
  .seller { position: static; }
  .searchbox .row { grid-template-columns: 1fr 1fr; }
  .searchbox .row .btn { grid-column: 1 / -1; }
}
@media (max-width: 640px) {
  .top .wrap { flex-wrap: wrap; padding: 8px 0; }
  .nav { margin-left: 0; width: 100%; justify-content: flex-start; }
  .searchbox .row { grid-template-columns: 1fr; }
  .mine .row { grid-template-columns: 90px 1fr; }
  .mine .pic { width: 90px; height: 70px; }
  .acts { grid-column: 1 / -1; justify-content: flex-start; }
}
