/* Marketplace screens: explore feed (wireframe 03), plan detail (04), agency plans + builder (08). */

.plan-card { position: relative; }
a.plan-photo { color: #fff; text-decoration: none; }
a.plan-photo:hover { text-decoration: none; }
.heart { border: 0; cursor: pointer; text-decoration: none; z-index: 2; position: absolute; top: 14px; right: 14px; width: 34px; height: 34px; border-radius: 50%; background: #fff; display: grid; place-items: center; color: var(--ink); font-size: 16px; }
.heart.on { color: #e11d48; }
.new-tag { background: #eef2ff; color: #3730a3; font-size: 12px; font-weight: 600; border-radius: 999px; padding: 3px 9px; }

/* explore */
.explore { display: grid; grid-template-columns: 278px 1fr; min-height: calc(100vh - 66px); background: var(--bg); }
.filters { background: #fff; border-right: 1px solid var(--line); padding: 26px 22px; }
.filters h3 { font-size: 20px; margin-bottom: 18px; }
.f-group { margin-bottom: 22px; }
.f-label { display: block; font-weight: 600; font-size: 14px; margin-bottom: 8px; }
.f-input { width: 100%; padding: 11px 13px; border: 1px solid var(--line); border-radius: 12px; font: 400 14px Inter, sans-serif; }
.f-input:focus, select:focus { outline: 2px solid var(--teal); outline-offset: 1px; }
.f-row { display: flex; gap: 8px; }
.f-pills { display: flex; flex-wrap: wrap; gap: 8px; }
.f-check { display: flex; align-items: center; gap: 8px; font-size: 14px; color: #334155; padding: 4px 0; cursor: pointer; }
.f-check.muted { color: var(--muted); }
.pill { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 8px 15px; font: 500 14px Inter, sans-serif; cursor: pointer; color: var(--ink); }
.pill.on { background: var(--teal-tint); border-color: var(--teal); color: var(--teal); }
.pill.on.dark { background: var(--navy); border-color: var(--navy); color: #fff; }
.feed { padding: 22px 30px 40px; }
.feed-top { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.sort { font-size: 14px; color: var(--muted); }
.sort select { border: 0; background: transparent; font: 500 14px Inter, sans-serif; color: var(--ink); }
.count { color: var(--muted); font-size: 14px; margin: 0 0 12px; }
.feed-cards { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.more { text-align: center; margin-top: 26px; }
.empty { text-align: center; padding: 60px 20px; background: #fff; border-radius: 22px; border: 1px dashed var(--line); }

/* plan detail */
.detail { max-width: 1260px; margin: 0 auto; padding: 20px 32px 40px; }
.crumbs { color: var(--muted); font-size: 13px; margin-bottom: 12px; }
.detail-grid { display: grid; grid-template-columns: 1fr 360px; gap: 32px; align-items: start; }
.gallery { display: grid; grid-template-columns: 1.9fr 1fr; gap: 8px; height: 360px; }
.gallery:has(.g-main:only-child) { grid-template-columns: 1fr; }
.g-main, .g-tile { background-size: cover; background-position: center; border-radius: 18px; position: relative; }
.g-side { display: grid; grid-template-rows: 1fr 1fr; gap: 8px; }
.g-side:has(.g-tile:only-child) { grid-template-rows: 1fr; }
.g-more { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(0,0,0,.45); border-radius: 18px; color: #fff; font-weight: 700; }
.detail-title { display: flex; justify-content: space-between; align-items: start; gap: 16px; margin: 22px 0 14px; }
.detail-title h1 { font-size: 34px; }
.detail-title .sub { margin: 6px 0 0; }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin: 8px 0 26px; }
.facts div { border: 1px solid var(--line); border-radius: 14px; padding: 12px 16px; display: grid; gap: 4px; }
.facts small { font-size: 11px; letter-spacing: .05em; color: var(--muted); }
.facts b { font-size: 16px; }
.detail h2 { font-size: 22px; margin: 26px 0 12px; }
.body-text { line-height: 1.65; color: #334155; white-space: pre-line; }
.itinerary details { border: 1px solid var(--line); border-radius: 14px; padding: 14px 18px; margin-bottom: 10px; background: #fff; }
.itinerary summary { cursor: pointer; font-weight: 600; list-style: none; display: flex; align-items: center; gap: 12px; }
.itinerary summary::-webkit-details-marker { display: none; }
.itinerary details p { margin: 10px 0 0; color: #475569; }
.day-tag { background: #d9f0ec; color: var(--teal); font-size: 12px; font-weight: 700; border-radius: 999px; padding: 4px 10px; white-space: nowrap; }
.buybox { padding: 22px; }
.buy-price { font: 700 30px "DM Sans", sans-serif; margin: 2px 0 16px; }
.buy-price small { font: 400 14px Inter, sans-serif; color: var(--muted); }
.btn.block { display: block; width: 100%; text-align: center; margin-bottom: 10px; }
.agency-box { margin-top: 16px; padding: 20px; }
.agency-head { display: flex; gap: 12px; align-items: center; margin-bottom: 12px; }
.avatar.big { width: 46px; height: 46px; background: var(--navy); font-size: 14px; }
.agency-stats { font-size: 14px; color: #334155; }

/* agency plans + builder */
.ws-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.ws-head h1 { margin: 0; }
.head-actions { display: flex; gap: 10px; align-items: center; }
.notice { background: var(--gold-bg); color: #5c3d00; border-radius: 14px; padding: 12px 16px; font-size: 14px; margin-bottom: 16px; }
.notice.ok { background: var(--ok-bg); color: var(--ok); }
.plan-rows { display: grid; gap: 12px; }
.plan-row { display: flex; align-items: center; gap: 16px; background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 12px 16px; }
.plan-row .thumb { width: 88px; height: 62px; border-radius: 12px; background-size: cover; background-position: center; flex: none; }
.plan-row .info { flex: 1; display: grid; gap: 4px; min-width: 0; }
.row-actions { display: flex; gap: 10px; align-items: center; }
.status { font-size: 12px; font-weight: 600; border-radius: 999px; padding: 4px 11px; background: #eef2f6; color: #475569; }
.s-live { background: var(--ok-bg); color: var(--ok); }
.s-pendingreview { background: var(--gold-bg); color: var(--gold); }
.s-paused { background: #fde8e8; color: #9b1c1c; }
.builder { display: grid; grid-template-columns: 1fr 380px; gap: 22px; align-items: start; }
.steps { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.step { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 9px 16px; font: 500 14px Inter, sans-serif; cursor: pointer; }
.step.on { background: var(--navy); color: #fff; border-color: var(--navy); }
.step-body { display: grid; gap: 16px; margin-top: 0; }
.step-nav { display: flex; justify-content: space-between; margin-top: 14px; }
.fld { display: grid; gap: 6px; font-weight: 600; font-size: 14px; }
.fld input, .fld textarea, .fld select { padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; font: 400 15px Inter, sans-serif; width: 100%; }
.fld input:focus, .fld textarea:focus, .fld select:focus { outline: 2px solid var(--teal); outline-offset: 1px; }
.fld-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; }
.day-edit { display: flex; gap: 12px; align-items: start; }
.day-fields { flex: 1; display: grid; gap: 8px; }
.day-fields input, .day-fields textarea { padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; font: 400 14px Inter, sans-serif; width: 100%; }
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; }
.photo-pick { height: 84px; border: 3px solid transparent; border-radius: 14px; background-size: cover; background-position: center; cursor: pointer; position: relative; padding: 0; }
.photo-pick.on { border-color: var(--teal); }
.photo-pick .order { position: absolute; top: 6px; left: 6px; background: var(--teal); color: #fff; width: 22px; height: 22px; border-radius: 50%; font-size: 12px; font-weight: 700; display: grid; place-items: center; }
.checklist { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.checklist .ok { color: var(--ok); }
.checklist .todo { color: var(--muted); }
.preview-label { font-size: 11px; letter-spacing: .08em; color: var(--muted); margin-bottom: 10px; font-weight: 600; }
a.side-item { text-decoration: none; }
a.side-item:hover { background: rgba(255,255,255,.07); text-decoration: none; }

/* messages (wireframe 06) */
.ws-main.flush { padding: 0; background: #fff; }
.inbox { display: grid; grid-template-columns: 340px 1fr; height: calc(100vh - 66px); background: #fff; }
.convo-list { border-right: 1px solid var(--line); padding: 16px; overflow-y: auto; display: grid; align-content: start; gap: 4px; }
.convo-list .pad { padding: 8px 6px; }
.convo { display: flex; gap: 12px; align-items: center; padding: 12px; border-radius: 14px; color: var(--ink); position: relative; }
.convo:hover { background: var(--bg); text-decoration: none; }
.convo.on { background: var(--teal-tint); box-shadow: inset 3px 0 0 var(--teal); }
.convo-text { display: grid; gap: 3px; min-width: 0; flex: 1; }
.convo-top { display: flex; justify-content: space-between; gap: 8px; }
.convo-top small { color: var(--muted); }
.convo-preview { color: var(--muted); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.convo.unread .convo-top b, .convo.unread .convo-preview { color: var(--ink); font-weight: 700; }
.dot { width: 9px; height: 9px; border-radius: 50%; background: var(--teal); flex: none; }
.mini-avatar.big { width: 40px; height: 40px; font-size: 13px; background: linear-gradient(135deg, #14b8a6, var(--teal)); }
.thread { display: grid; grid-template-rows: auto 1fr auto auto; min-height: 0; background: var(--bg); }
.thread-head { display: flex; align-items: center; gap: 12px; padding: 14px 20px; background: #fff; border-bottom: 1px solid var(--line); }
.thread-head .head-actions { margin-left: auto; }
.thread-empty { grid-row: 1 / -1; display: grid; place-content: center; text-align: center; }
.msgs { overflow-y: auto; padding: 20px; display: grid; align-content: start; gap: 10px; }
.plan-chip { display: flex; align-items: center; gap: 12px; width: fit-content; max-width: 100%; background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 10px 14px; color: var(--ink); }
.plan-chip:hover { text-decoration: none; background: #fcfdfd; }
.plan-chip .thumb { width: 46px; height: 46px; border-radius: 10px; background-size: cover; background-position: center; flex: none; }
.plan-chip small { color: var(--muted); }
.bubble-row { display: flex; }
.bubble-row.mine { justify-content: flex-end; }
.bubble { max-width: min(560px, 80%); background: #fff; border-radius: 16px 16px 16px 4px; padding: 10px 14px; box-shadow: 0 1px 0 rgba(0,0,0,.03); }
.bubble.mine { background: var(--teal); color: #fff; border-radius: 16px 16px 4px 16px; }
.bubble .who { font-size: 12px; font-weight: 700; color: var(--muted); margin-bottom: 2px; }
.bubble .text { white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.45; }
.bubble .when { font-size: 11px; opacity: .65; margin-top: 4px; text-align: right; }
.banner { background: var(--gold-bg); color: #5c3d00; border-radius: 14px; padding: 12px 16px; font-size: 14px; }
.banner.refunded { background: var(--ok-bg); color: var(--ok); }
.composer { display: flex; gap: 10px; padding: 14px 20px; background: #fff; border-top: 1px solid var(--line); }
.composer .f-input { flex: 1; }

@media (max-width: 900px) {
    .inbox { grid-template-columns: 1fr; height: auto; }
    .convo-list { border-right: 0; border-bottom: 1px solid var(--line); max-height: 260px; }
    .thread { min-height: 70vh; }
    .explore, .detail-grid, .builder, .workspace { grid-template-columns: 1fr; }
    .filters { border-right: 0; border-bottom: 1px solid var(--line); }
    .gallery { height: 240px; }
}
