.product-page{padding-top:16px}.product-page .detail-thumb{aspect-ratio:1/1;height:auto;max-height:none;border-radius:18px;background:linear-gradient(135deg,#1e293b,#4338ca);display:grid;place-items:center;overflow:hidden;margin-bottom:14px}.product-page .detail-thumb.has-image{background:#0f172a}.product-page .detail-thumb img{width:100%;height:100%;display:block;object-fit:cover}.product-page h1{font-size:1.4rem;line-height:1.2;margin:7px 0}.product-page .detail-price{font-size:1.55rem;font-weight:900;margin:12px 0}.product-page .seller{display:flex;align-items:center;gap:9px}.product-page .seller .avatar{width:36px;height:36px}.product-page .info-row{display:flex;justify-content:space-between;gap:14px;padding:12px 0;border-bottom:1px solid #2a3850}.product-page .info-row:last-child{border-bottom:0}.sticky-buy.product-actions{position:fixed;left:max(12px,calc(50% - 203px));bottom:calc(70px + env(safe-area-inset-bottom));transform:none;width:min(406px,calc(100% - 24px));z-index:25;background:rgba(15,23,42,.96);border:1px solid var(--kk-border);border-radius:18px;padding:10px;display:flex;gap:9px;box-shadow:0 14px 40px rgba(0,0,0,.35)}.sticky-buy.product-actions .btn{flex:1}.product-actions .chat-trigger{flex:0 0 42%;white-space:nowrap}.product-actions .buy-now{flex:1}
.chat-modal{position:fixed;inset:0;z-index:80;display:none}.chat-modal.is-open{display:block}.chat-backdrop{position:absolute;inset:0;background:rgba(2,6,23,.72);backdrop-filter:blur(4px)}.chat-sheet{position:absolute;left:max(0px,calc(50% - 215px));bottom:calc(68px + env(safe-area-inset-bottom));transform:none;width:min(430px,100vw);height:min(78vh,650px);background:#111d33;border:1px solid #334155;border-bottom:0;border-radius:22px 22px 0 0;display:flex;flex-direction:column;overflow:hidden;box-shadow:0 -18px 50px rgba(0,0,0,.4)}.chat-header{display:flex;justify-content:space-between;align-items:center;padding:14px 16px;border-bottom:1px solid #334155}.chat-close{width:40px;height:40px;border-radius:12px;border:1px solid #334155;background:#18263d;color:#f8fafc;font-size:24px}.chat-body{flex:1;overflow:auto;padding:14px}.chat-empty{height:100%;display:flex;flex-direction:column;justify-content:center;align-items:center;text-align:center;gap:7px;color:#94a3b8;padding:24px}.chat-empty strong{color:#f8fafc}.chat-message{display:flex;margin-bottom:9px}.chat-message.mine{justify-content:flex-end}.chat-message.theirs{justify-content:flex-start}.chat-bubble{max-width:82%;padding:9px 11px;border-radius:15px;background:#1e293b;color:#f8fafc;font-size:14px;line-height:1.45}.chat-message.mine .chat-bubble{background:#4f46e5}.chat-bubble small{display:block;margin-top:5px;opacity:.7;font-size:10px}.chat-attachment{display:block;margin-top:7px;color:#c4b5fd;text-decoration:none;font-size:12px;word-break:break-word}.chat-compose{padding:10px 12px calc(10px + env(safe-area-inset-bottom));border-top:1px solid #334155;background:#0f172a}.chat-compose textarea{width:100%;resize:none;box-sizing:border-box;min-height:52px;border:1px solid #334155;border-radius:12px;background:#111b2f;color:#f8fafc;padding:10px 12px;outline:none}.chat-compose-row{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-top:8px}.attach-btn{display:inline-flex;align-items:center;gap:5px;color:#c4b5fd;font-size:12px;cursor:pointer}.chat-compose .btn{min-width:78px}.chat-lock{overflow:hidden}
@media(max-width:360px){.product-actions .chat-trigger{font-size:12px;padding-inline:8px}.product-actions .buy-now{font-size:12px;padding-inline:8px}.chat-sheet{height:82vh}}

/* Desktop browser preview: keep product actions and chat sheet aligned with the 430px mobile app shell. */
@media(min-width:431px){.sticky-buy.product-actions{left:calc(50% - 203px);width:406px}.chat-sheet{left:calc(50% - 215px);width:430px}}

/* Chat attachment picker + upload progress */
.chat-attachment-preview{display:flex;align-items:center;gap:10px;margin-top:8px;padding:9px 10px;border:1px solid #334155;border-radius:12px;background:#16233a;min-width:0}.chat-attachment-preview[hidden],.chat-upload-progress[hidden],.chat-upload-error[hidden]{display:none}.chat-file-icon{width:34px;height:34px;display:grid;place-items:center;flex:0 0 34px;border-radius:9px;background:#243554}.chat-file-meta{min-width:0;display:flex;flex-direction:column;gap:2px;flex:1}.chat-file-meta strong{font-size:12px;color:#f8fafc;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.chat-file-meta span{font-size:10px;color:#94a3b8}.chat-file-remove{width:30px;height:30px;border:1px solid #334155;border-radius:9px;background:#111b2f;color:#f8fafc;font-size:18px;line-height:1;cursor:pointer}.chat-upload-progress{margin-top:8px;padding:9px 10px;border:1px solid #334155;border-radius:12px;background:#121f34}.chat-upload-progress-head{display:flex;justify-content:space-between;gap:8px;font-size:10px;color:#cbd5e1;margin-bottom:7px}.chat-upload-progress-head strong{color:#c4b5fd}.chat-progress-track{height:7px;background:#26364f;border-radius:999px;overflow:hidden}.chat-progress-track span{display:block;width:0;height:100%;background:#6366f1;border-radius:inherit;transition:width .12s ease}.chat-upload-error{margin-top:8px;padding:8px 10px;border:1px solid rgba(239,68,68,.45);border-radius:10px;background:rgba(127,29,29,.28);color:#fecaca;font-size:11px;line-height:1.4}.chat-compose .btn:disabled{opacity:.65;cursor:wait}.chat-compose .attach-btn{user-select:none}

/* CSS STABILIZATION 2026-09-29
   Product-page-only guards. Do not style generic .avatar/.img/.topbar here. */
.product-page .detail-thumb{
  width:100%;
  max-width:100%;
  min-width:0;
  min-height:0;
  box-sizing:border-box;
}
.product-page .detail-thumb img{
  display:block;
  width:100%;
  height:100%;
  max-width:100%;
  min-width:0;
  min-height:0;
  object-fit:cover;
  object-position:center;
}
.product-page .seller .avatar{
  width:36px;
  height:36px;
  min-width:36px;
  max-width:36px;
  min-height:36px;
  max-height:36px;
  flex:0 0 36px;
  overflow:hidden;
  border-radius:50%;
}
.product-page .seller .avatar img{
  display:block;
  width:100%;
  height:100%;
  max-width:100%;
  max-height:100%;
  object-fit:cover;
  object-position:center;
}
.product-page .seller > div{
  min-width:0;
  max-width:100%;
}
.product-page .seller strong{
  overflow-wrap:anywhere;
}
@media(max-width:360px){
  .product-page .detail-thumb{border-radius:16px;}
  .product-page .seller .avatar{
    width:34px;height:34px;min-width:34px;max-width:34px;
    min-height:34px;max-height:34px;flex-basis:34px;
  }
}


/* Product report / Trust & Safety */
.product-report-section{margin-top:24px;padding:0 0 24px}.report-divider{height:1px;background:#e2e8f0;margin:8px 0 24px}.report-head h2{margin:4px 0 6px}.product-report-form{display:grid;gap:14px;margin-top:16px}.product-report-form label{display:grid;gap:7px;font-weight:700;font-size:13px}.product-report-form select,.product-report-form textarea{width:100%;box-sizing:border-box;border:1px solid #d7deea;border-radius:12px;background:#fff;padding:12px 13px;font:inherit;color:#172033;outline:none}.product-report-form textarea{resize:vertical;min-height:120px}.product-report-form select:focus,.product-report-form textarea:focus{border-color:#1769ff;box-shadow:0 0 0 3px rgba(23,105,255,.10)}.report-submit{border:0;border-radius:12px;padding:13px 16px;background:#172033;color:#fff;font-weight:800;font-size:14px;cursor:pointer}.report-login-note{padding:13px 14px;border:1px solid #e2e8f0;border-radius:12px;background:#f8fafc;color:#475569;font-size:13px}.report-login-note a{color:#1769ff;font-weight:800;text-decoration:none}.report-alert{padding:12px 14px;border-radius:12px;margin:12px 0;font-size:13px;font-weight:700}.report-alert.success{background:#ecfdf5;color:#166534;border:1px solid #bbf7d0}.report-alert.error{background:#fef2f2;color:#991b1b;border:1px solid #fecaca}.eyebrow{font-size:10px;font-weight:800;letter-spacing:.08em;color:#64748b}

/* HOTFIX 2026-09-30 — keep the non-buyer ownership notice inside the mobile app shell.
   .app is a centered flex item; the ownership notice sits outside .app in product.php.
   Without positioning, it becomes a second flex item and appears beside the 430px product page. */
.sticky-buy:not(.product-actions){
  position:fixed;
  left:50%;
  bottom:calc(70px + env(safe-area-inset-bottom));
  transform:translateX(-50%);
  width:min(430px,100vw);
  box-sizing:border-box;
  padding:10px 16px;
  z-index:25;
  background:rgba(15,23,42,.96);
  border-top:1px solid var(--kk-border);
}
.sticky-buy:not(.product-actions) .notice{
  width:100%;
  box-sizing:border-box;
}
@media(max-width:360px){
  .sticky-buy:not(.product-actions){padding-inline:12px;}
}


/* Trust & Safety UX — report is a text action that opens a modal, not an inline form. */
.product-report-link-wrap{
  margin:26px 0 8px;
  padding:18px 0 4px;
  border-top:1px solid #26344d;
  text-align:center;
}
.product-report-link{
  appearance:none;
  border:0;
  background:transparent;
  color:#94a3b8;
  font:inherit;
  font-size:12px;
  font-weight:700;
  text-decoration:underline;
  text-underline-offset:3px;
  cursor:pointer;
  padding:8px 10px;
}
.product-report-link:hover,.product-report-link:focus-visible{color:#f8fafc;}
.report-modal{position:fixed;inset:0;z-index:90;display:none;}
.report-modal.is-open{display:block;}
.report-modal-backdrop{position:absolute;inset:0;background:rgba(2,6,23,.76);backdrop-filter:blur(4px);}
.report-modal-sheet{
  position:absolute;
  left:50%;
  bottom:0;
  transform:translateX(-50%);
  width:min(430px,100vw);
  max-height:min(82vh,700px);
  box-sizing:border-box;
  overflow:hidden;
  display:flex;
  flex-direction:column;
  background:#111d33;
  color:#f8fafc;
  border:1px solid #334155;
  border-bottom:0;
  border-radius:22px 22px 0 0;
  box-shadow:0 -18px 50px rgba(0,0,0,.42);
}
.report-modal-header{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
  padding:16px 16px 12px;
  border-bottom:1px solid #334155;
}
.report-modal-header h2{margin:4px 0 0;font-size:20px;line-height:1.15;}
.report-modal-close{
  width:40px;height:40px;flex:0 0 40px;
  border:1px solid #334155;border-radius:12px;
  background:#18263d;color:#f8fafc;font-size:24px;line-height:1;cursor:pointer;
}
.report-modal-body{overflow:auto;padding:14px 16px calc(18px + env(safe-area-inset-bottom));}
.report-modal-body .muted{color:#94a3b8;}
.report-modal-body .product-report-form{margin-top:14px;}
.report-modal-body .product-report-form label{color:#f8fafc;}
.report-modal-body .product-report-form select,
.report-modal-body .product-report-form textarea{
  border-color:#cbd5e1;
}
.report-modal-body .report-login-note{
  margin-top:14px;
  background:#18263d;
  border-color:#334155;
  color:#cbd5e1;
}
.report-modal-body .report-alert{margin-top:12px;}
.report-lock{overflow:hidden;}
@media(max-width:360px){
  .report-modal-sheet{max-height:88vh;border-radius:18px 18px 0 0;}
  .report-modal-header{padding-inline:13px;}
  .report-modal-body{padding-inline:13px;}
}


/* Product link actions — compact share/report controls. */
.product-link-actions{
  display:flex;
  align-items:center;
  justify-content:center;
  flex-wrap:wrap;
  gap:4px 8px;
  margin:24px 0 8px;
  padding:14px 0 4px;
  border-top:1px solid #26344d;
  text-align:center;
}
.product-link-actions button{
  appearance:none;
  border:0;
  background:transparent;
  color:#94a3b8;
  font:inherit;
  font-size:12px;
  font-weight:700;
  text-decoration:underline;
  text-underline-offset:3px;
  cursor:pointer;
  padding:7px 9px;
}
.product-link-actions button:hover,.product-link-actions button:focus-visible{color:#f8fafc;}
.product-share-status{
  flex:0 0 100%;
  color:#86efac;
  font-size:11px;
  font-weight:700;
  min-height:16px;
}
.product-share-status[hidden]{display:none;}
.product-link-actions .product-report-link{margin:0;}
