/* ============================================================
   Shared styles for public pages (browse, profile, booking,
   packages, safety...). Uses the design tokens from base.html.
   ============================================================ */

.pg-wrap { max-width: 1180px; margin: 0 auto; padding: 110px 24px 70px; }
.pg-wrap-narrow { max-width: 860px; }

.pg-kicker {
    display: inline-flex; align-items: center; gap: 8px;
    background: var(--surface-warm); color: var(--orange);
    font-weight: 700; font-size: 0.8rem; letter-spacing: 0.06em;
    text-transform: uppercase; padding: 7px 14px; border-radius: 999px;
    margin-bottom: 14px;
}
.pg-title { font-size: clamp(1.7rem, 4vw, 2.5rem); font-weight: 800; color: var(--ink); margin-bottom: 10px; }
.pg-sub { color: var(--muted); font-size: 1.02rem; max-width: 640px; margin-bottom: 28px; }

.pg-card {
    background: var(--surface); border: 1px solid var(--line);
    border-radius: 20px; padding: 24px; box-shadow: 0 8px 26px rgba(30,79,145,0.06);
}

/* ---------- buttons ---------- */
.pg-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 13px 26px; border-radius: 999px; border: none; cursor: pointer;
    font-family: var(--font-body); font-weight: 700; font-size: 0.95rem;
    text-decoration: none; transition: all .2s ease;
}
.pg-btn-primary { background: linear-gradient(135deg, var(--blue) 0%, var(--orange) 100%); color: #fff; }
.pg-btn-primary:hover { transform: translateY(-2px); box-shadow: 0 10px 26px rgba(30,79,145,0.3); }
.pg-btn-outline { background: transparent; color: var(--blue); border: 2px solid var(--blue); }
.pg-btn-outline:hover { background: var(--blue); color: #fff; }
.pg-btn-pink { background: #e8467c; color: #fff; }
.pg-btn-pink:hover { transform: translateY(-2px); box-shadow: 0 10px 26px rgba(232,70,124,0.35); }
.pg-btn-ghost { background: var(--surface-soft); color: var(--ink); }
.pg-btn:disabled { opacity: .55; cursor: not-allowed; transform: none !important; box-shadow: none !important; }
.pg-btn-sm { padding: 8px 16px; font-size: 0.85rem; }
.pg-btn-block { width: 100%; }

/* ---------- filters bar ---------- */
.filter-bar {
    display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end;
    background: var(--surface); border: 1px solid var(--line); border-radius: 18px;
    padding: 16px; margin-bottom: 26px; box-shadow: 0 8px 26px rgba(30,79,145,0.05);
}
.filter-field { display: flex; flex-direction: column; gap: 5px; min-width: 130px; flex: 1; }
.filter-field label { font-size: 0.72rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.filter-field select, .filter-field input {
    padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px;
    font-family: var(--font-body); font-size: 0.9rem; color: var(--ink); background: #fff;
}

/* ---------- buddy cards grid ---------- */
.buddy-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(255px, 1fr)); gap: 22px; }
.bcard {
    background: var(--surface); border: 1px solid var(--line); border-radius: 20px;
    overflow: hidden; transition: all .25s ease; display: flex; flex-direction: column;
}
.bcard:hover { transform: translateY(-5px); box-shadow: var(--shadow); }
.bcard-photo { position: relative; aspect-ratio: 4/4.4; background: var(--surface-soft); }
.bcard-photo img { width: 100%; height: 100%; object-fit: cover; }
.bcard-photo .no-photo { display:flex; align-items:center; justify-content:center; height:100%; color:var(--muted); font-size:2.4rem; }
.bcard-verify {
    position: absolute; top: 12px; left: 12px; background: rgba(22,53,95,0.82); color: #ffe9c2;
    font-size: 0.7rem; font-weight: 700; padding: 5px 11px; border-radius: 999px; backdrop-filter: blur(4px);
}
.bcard-body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 7px; flex: 1; }
.bcard-name { font-size: 1.08rem; font-weight: 800; color: var(--ink); display:flex; align-items:center; gap:8px; }
.bcard-rating { color: var(--gold); font-weight: 700; font-size: 0.86rem; }
.bcard-meta { color: var(--muted); font-size: 0.82rem; display: flex; align-items: center; gap: 6px; }
.bcard-meta i { width: 14px; color: var(--blue); font-size: 0.78rem; }
.bcard-price { margin-top: auto; padding-top: 10px; font-weight: 800; color: var(--blue); font-size: 0.95rem; }
.bcard-price small { color: var(--muted); font-weight: 500; }
.bcard-next { font-size: 0.78rem; color: #1d8a4c; font-weight: 700; }

/* ---------- badges & chips ---------- */
.chip { display: inline-flex; align-items:center; gap:5px; background: var(--surface-soft); color: var(--blue);
        font-size: 0.75rem; font-weight: 700; padding: 4px 11px; border-radius: 999px; }
.chip-warm { background: var(--surface-warm); color: var(--orange); }
.chip-green { background: #e5f7ec; color: #1d8a4c; }
.chip-select { cursor: pointer; border: 1.5px solid var(--line); background: #fff; user-select: none; padding: 8px 16px; font-size: 0.85rem; }
.chip-select.on { background: var(--blue); color: #fff; border-color: var(--blue); }

/* ---------- profile layout ---------- */
.profile-grid { display: grid; grid-template-columns: 1.25fr 0.95fr 1fr; gap: 22px; align-items: start; }
@media (max-width: 1020px) { .profile-grid { grid-template-columns: 1fr 1fr; } .profile-col-book { grid-column: 1 / -1; } }
@media (max-width: 700px)  { .profile-grid { grid-template-columns: 1fr; } }

.pf-photo-main { position: relative; border-radius: 20px; overflow: hidden; aspect-ratio: 4/4.3; background: var(--surface-soft); }
.pf-photo-main img { width: 100%; height: 100%; object-fit: cover; }
.pf-thumbs { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.pf-thumbs img { width: 62px; height: 62px; object-fit: cover; border-radius: 12px; cursor: pointer; border: 2px solid transparent; }
.pf-thumbs img.on { border-color: var(--orange); }

.trust-list { display: flex; flex-direction: column; gap: 13px; }
.trust-item { display: flex; gap: 12px; align-items: flex-start; }
.trust-item .t-ico { width: 34px; height: 34px; border-radius: 10px; background: #e5f7ec; color: #1d8a4c;
                     display: flex; align-items: center; justify-content: center; font-size: 0.85rem; flex-shrink: 0; }
.trust-item .t-ico.muted { background: var(--surface-soft); color: var(--muted); }
.trust-item h5 { font-size: 0.88rem; color: var(--ink); margin-bottom: 2px; }
.trust-item p { font-size: 0.8rem; color: var(--muted); }

.review-card { background: var(--surface-soft); border-radius: 14px; padding: 14px 16px; margin-top: 10px; }
.review-card .stars { color: var(--gold); font-size: 0.8rem; font-weight: 800; }
.review-card p { font-size: 0.86rem; color: var(--ink); margin: 6px 0; font-style: italic; }
.review-card small { color: var(--muted); font-size: 0.75rem; }

/* ---------- booking box ---------- */
.book-box { position: sticky; top: 96px; }
.book-box .field { margin-bottom: 13px; }
.book-box label { display: block; font-size: 0.72rem; font-weight: 800; color: var(--muted);
                  text-transform: uppercase; letter-spacing: .05em; margin-bottom: 6px; }
.book-box select, .book-box input {
    width: 100%; padding: 12px 13px; border: 1px solid var(--line); border-radius: 12px;
    font-family: var(--font-body); font-size: 0.92rem; color: var(--ink); background: #fff;
}
.slot-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; max-height: 132px; overflow-y: auto; }
.slot { text-align: center; padding: 9px 4px; border: 1.5px solid var(--line); border-radius: 10px;
        font-size: 0.83rem; font-weight: 700; color: var(--ink); cursor: pointer; background: #fff; }
.slot.on { background: var(--blue); color: #fff; border-color: var(--blue); }
.slot-empty { grid-column: 1 / -1; color: var(--muted); font-size: 0.83rem; text-align: center; padding: 8px; }

.price-row { display: flex; justify-content: space-between; font-size: 0.9rem; color: var(--muted); padding: 4px 0; }
.price-row.total { font-weight: 800; color: var(--ink); font-size: 1.05rem; border-top: 1px dashed var(--line);
                   margin-top: 8px; padding-top: 10px; }
.protect-note { background: var(--surface-warm); border-radius: 12px; padding: 12px 14px; font-size: 0.8rem;
                color: var(--ink); margin-top: 14px; }
.protect-note b { color: var(--orange); }

/* ---------- forms ---------- */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-grid .full { grid-column: 1 / -1; }
@media (max-width: 640px) { .form-grid { grid-template-columns: 1fr; } }
.f-field label { display: block; font-size: 0.78rem; font-weight: 800; color: var(--muted); margin-bottom: 6px;
                 text-transform: uppercase; letter-spacing: .04em; }
.f-field input, .f-field select, .f-field textarea {
    width: 100%; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px;
    font-family: var(--font-body); font-size: 0.93rem; color: var(--ink); background: #fff;
}
.f-field textarea { resize: vertical; min-height: 90px; }

/* ---------- info/steps ---------- */
.step-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin: 26px 0; }
.step-cell { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 16px; text-align: center; }
.step-cell .n { font-size: 1.3rem; font-weight: 800; color: var(--orange); }
.step-cell .t { font-size: 0.85rem; font-weight: 700; color: var(--ink); margin-top: 4px; }

.notice { border-radius: 14px; padding: 14px 18px; font-size: 0.9rem; margin: 18px 0; }
.notice-green { background: #e5f7ec; color: #14532d; border: 1px solid #b7e4c7; }
.notice-blue { background: var(--surface-soft); color: var(--ink); border: 1px solid var(--line); }
.notice-warn { background: var(--surface-warm); color: #7a4a12; border: 1px solid #f3dfb0; }

/* ---------- package cards ---------- */
.pkg-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px; }
.pkg-card { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 26px;
            display: flex; flex-direction: column; gap: 12px; transition: all .25s ease; }
.pkg-card:hover { transform: translateY(-5px); box-shadow: var(--shadow); }
.pkg-card .p-ico { width: 52px; height: 52px; border-radius: 15px; display: flex; align-items: center; justify-content: center;
                   background: linear-gradient(135deg, var(--blue), var(--orange)); color: #fff; font-size: 1.3rem; }
.pkg-card h3 { font-size: 1.15rem; color: var(--ink); }
.pkg-card p { font-size: 0.88rem; color: var(--muted); flex: 1; }

/* ---------- chat ---------- */
.chat-box { display: flex; flex-direction: column; gap: 9px; max-height: 330px; overflow-y: auto; padding: 6px 2px; }
.msg { max-width: 78%; padding: 10px 14px; border-radius: 15px; font-size: 0.89rem; line-height: 1.4; }
.msg.me { align-self: flex-end; background: var(--blue); color: #fff; border-bottom-right-radius: 5px; }
.msg.them { align-self: flex-start; background: var(--surface-soft); color: var(--ink); border-bottom-left-radius: 5px; }
.msg small { display: block; opacity: 0.7; font-size: 0.68rem; margin-top: 3px; }

/* ---------- misc ---------- */
.stat-pills { display: flex; gap: 10px; flex-wrap: wrap; margin: 14px 0; }
.toast-inline { border-radius: 12px; padding: 12px 16px; font-size: 0.88rem; font-weight: 600; margin-top: 12px; display: none; }
.toast-inline.ok { display: block; background: #e5f7ec; color: #14532d; }
.toast-inline.err { display: block; background: #fdecec; color: #b42318; }
.sect-h { font-size: 1.2rem; font-weight: 800; color: var(--ink); margin: 26px 0 12px; }
.skel { background: linear-gradient(100deg, #eef2f8 40%, #f8fafc 50%, #eef2f8 60%); background-size: 200% 100%;
        animation: skel 1.3s infinite; }
@keyframes skel { to { background-position-x: -200%; } }
