/* Profile Page - Redesigned layout per provided mock */
:root{ --primary:#92041d; --text:#0f172a; --muted:#6b7280; --border:#e5e7eb; --bg:#ffffff; --bg-light:#f8fafc }
*{ box-sizing:border-box }
body{ margin:0; font-family:'Plus Jakarta Sans',-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Arial,sans-serif; background:var(--bg-light); color:var(--text) }

/* Header */
.profile-header{ position:sticky; top:0; left:0; right:0; height:56px; background:#fff; border-bottom:1px solid var(--border); display:grid; grid-template-columns:44px 1fr 44px; align-items:center; padding:8px 8px; z-index:10 }
.profile-header .back-button,.profile-header .settings-button{ background:none;border:none;width:48px;height:48px;display:flex;align-items:center;justify-content:center;color:#000000;border-radius:20px }
.profile-header .back-button:hover,.profile-header .settings-button:hover{ background:#f1f5f9 }
.profile-header .header-title{ font-size:16px;font-weight:700;text-align:center;margin:0 }
.profile-header .back-button .icon-svg{ width:32px;height:32px;display:block }

/* Dark mode */
html.dark .profile-header{ background:#1E1E1E; border-bottom-color:#333 }
html.dark .profile-header .back-button,
html.dark .profile-header .settings-button{ color:#E0E0E0 }
html.dark .profile-header .back-button:hover,
html.dark .profile-header .settings-button:hover{ background:#2A2A2A }
html.dark .profile-header .header-title{ color:#E0E0E0 }

.profile-container{ max-width:470px; margin:0 auto; min-height:100vh; background:var(--bg) }

/* Cover & avatar */
.profile-cover{ position:relative; height:140px; background:#e2e8f0; overflow:hidden }
.profile-cover img{ width:100%; height:100%; object-fit:cover; display:block }
.profile-avatar{ position:relative; display:flex; justify-content:center; }
.profile-avatar .avatar{ width:96px; height:96px; border-radius:999px; background:linear-gradient(135deg,#92041d,#92041D); color:#fff; display:flex; align-items:center; justify-content:center; font-size:34px; font-weight:800; border:4px solid #fff; margin-top:-48px; box-shadow:0 6px 16px rgba(0,0,0,.12) }
.profile-avatar .avatar img{ width:100%; height:100%; object-fit:cover; border-radius:999px }

/* Name */
.profile-name-wrap{ text-align:center; padding:10px 16px 6px }
.profile-name-wrap .profile-name{ margin:6px 0 0; font-size:20px; font-weight:800 }
/* Location under name (visible when logged-in) */
.profile-name-wrap .profile-location{ margin-top:6px; display:inline-flex; gap:6px; align-items:center; color:var(--muted); font-size:14px }
.profile-name-wrap .profile-location .icon{ font-size:14px }

/* Stats 4 columns */
.profile-stats{ display:grid; grid-template-columns:repeat(4,1fr); border-top:1px solid var(--border); border-bottom:1px solid var(--border); margin:10px 12px; background:#fff; border-radius:12px; overflow:hidden }
.profile-stats .stat{ padding:12px 6px; text-align:center }
.profile-stats .stat:not(:last-child){ border-right:1px solid var(--border) }
.profile-stats .stat-link{ display:block; text-decoration:none; color:inherit; cursor:pointer; transition:all 0.2s; border-radius:8px; padding:4px }
.profile-stats .stat-link:hover{ background:#f8fafc }
.profile-stats .stat-value{ font-weight:800 }
.profile-stats .stat-label{ font-size:12px; color:var(--muted) }

/* Bio card */
.bio-card{ margin:12px; border:1px solid var(--border); border-radius:12px; padding:12px; background:#fff; color:#111827 }
.bio-card p{ margin:0 0 8px; font-size:14px }

/* Action button */
.profile-actions{ padding:0 12px 8px }
.actions-row{ display:flex; gap:10px; align-items:center }
.btn{ display:inline-flex; align-items:center; justify-content:center; width:100%; border:none; border-radius:12px; padding:12px 16px; font-weight:700; cursor:pointer; text-decoration:none; background:linear-gradient(135deg,#92041d,#92041D); color:#fff; box-shadow:0 8px 16px rgba(157,44,111,.25) }
.btn-share{ width:48px; height:48px; border-radius:12px; border:none; display:flex; align-items:center; justify-content:center; background:linear-gradient(135deg,#92041d,#92041D); color:#fff; box-shadow:0 8px 16px rgba(157,44,111,.25); flex:0 0 auto }
.btn-secondary{ background:#fff; color:var(--text); border:1px solid var(--border); box-shadow:none }

/* Posts grid */
.profile-posts{ padding:12px; position:relative }
.posts-grid{ display:grid; grid-template-columns:repeat(3,1fr); gap:9px }
.post{ display:block; aspect-ratio:1; border-radius:8px; overflow:hidden; background:#f1f5f9; position:relative }
.post img{ width:100%; height:100%; object-fit:cover; display:block; transition:transform .2s ease }
.post.locked{ border:1px solid var(--border) }
.post.locked img{ filter: blur(10px); -webkit-filter: blur(10px); transform: scale(1.06) }
.post.locked::after{ content:''; position:absolute; inset:0; background:rgba(255,255,255,.2); }

/* Sold/Hold overlay */
.post.sold img, .post.hold img{ filter:grayscale(100%) brightness(0.7) }
.post-overlay{ position:absolute; top:0; left:0; width:100%; height:100%; background:rgba(0,0,0,0.6); display:flex; align-items:center; justify-content:center; z-index:2 }
.post-overlay-text{ color:#fff; font-size:11px; font-weight:700; text-align:center; text-transform:uppercase; letter-spacing:0.5px; padding:0 4px }

.empty{ padding:24px; text-align:center; color:var(--muted) }

/* Locked CTA button (reuses gradient style similar to product detail) */
.locked-cta{ padding:12px; display:flex; justify-content:center }
/* Floating CTA overlay for visitors */
.locked-cta-floating{ position:absolute; left:50%; transform:translateX(-50%); top:40%; z-index:2; width:85%; max-width:360px }
.mau-dong-button{ width:100%; background: linear-gradient(135deg,#92041d,#92041D); color:#fff; border:none; border-radius:12px; padding:14px 20px; font-size:14px; font-weight:800; letter-spacing:.3px; cursor:pointer; box-shadow:0 8px 20px rgba(157,44,111,.25) }
.mau-dong-button .button-text{ display:flex; align-items:center; justify-content:center; gap:8px }
.mau-dong-button .button-icon{ font-size:18px }
