/* ═══════════════════════════════════════════════
   CasaPrimes — SHARED LAYOUT CSS
   Topbar · Navbar · Footer · Mobile Bottom Nav
   Imported by _Layout.cshtml only
═══════════════════════════════════════════════ */

:root{
  --or:#F26522;
  --or-d:#d9531a;
  --or-pale:#fff4ee;
  --or-glow:rgba(242,101,34,.18);
  --text:#1a1208;
  --muted:#7a6e65;
  --border:#e8ddd4;
  --cream:#fdf8f4;
  --white:#fff;
  --navy:#1a2744;
  --radius:12px;
}
*,*::before,*::after{box-sizing:border-box;margin:0;padding:0}
html{scroll-behavior:smooth}
body{font-family:'Outfit',sans-serif;color:var(--text);background:var(--white)}

/* ── TOPBAR ── */
.topbar{
  background:var(--navy);color:rgba(255,255,255,.85);
  font-size:.78rem;padding:7px 40px;
  display:flex;align-items:center;justify-content:space-between;gap:12px;
}
.topbar a{color:var(--or);text-decoration:none}

/* ── NAVBAR ── */
.navbar{
  position:sticky;top:0;z-index:300;
  background:var(--white);
  border-bottom:1px solid var(--border);
  height:64px;
  display:flex;align-items:center;
  padding:0 40px;gap:24px;
  box-shadow:0 2px 12px rgba(0,0,0,.06);
}
.nb-brand{
  font-family:'Cormorant Garamond',serif;
  font-size:1.6rem;font-weight:700;
  color:var(--text);text-decoration:none;white-space:nowrap;
}
.nb-brand span{color:var(--or)}

/* home-style nav — plain links */
.nb-links{display:flex;align-items:center;gap:4px;margin-left:8px}
.nb-link{
  font-size:.84rem;font-weight:500;color:var(--muted);
  text-decoration:none;padding:8px 12px;border-radius:8px;
  transition:all .2s;white-space:nowrap;
}
.nb-link:hover{color:var(--text);background:var(--or-pale)}

/* search-style inline search bar in navbar */
.nb-search{
  flex:1;max-width:340px;
  display:flex;align-items:center;
  background:var(--cream);border:1.5px solid var(--border);
  border-radius:50px;overflow:hidden;
  transition:border-color .2s;
}
.nb-search:focus-within{border-color:var(--or)}
.nb-search input{
  flex:1;border:none;background:transparent;
  padding:9px 16px;font-family:'Outfit',sans-serif;font-size:.88rem;
  color:var(--text);outline:none;
}
.nb-search button{
  background:var(--or);color:#fff;border:none;
  padding:9px 18px;font-family:'Outfit',sans-serif;
  font-size:.82rem;font-weight:600;cursor:pointer;
  border-radius:0 50px 50px 0;transition:background .2s;
}
.nb-search button:hover{background:var(--or-d)}

.nb-right{display:flex;align-items:center;gap:8px;margin-left:auto}
.nb-icon{
  width:36px;height:36px;display:flex;align-items:center;
  justify-content:center;border-radius:50%;
  background:var(--cream);border:1px solid var(--border);
  font-size:1rem;text-decoration:none;color:var(--text);
  transition:all .2s;cursor:pointer;
}
.nb-icon:hover{background:var(--or-pale);border-color:var(--or)}
.nb-post{
  background:var(--or);color:#fff;
  padding:9px 20px;border-radius:50px;
  font-size:.85rem;font-weight:700;
  text-decoration:none;
  display:flex;align-items:center;gap:6px;
  transition:background .2s;
  box-shadow:0 4px 14px var(--or-glow);
  white-space:nowrap;
}
.nb-post:hover{background:var(--or-d)}
.nb-post .badge{
  background:#fff;color:var(--or);
  font-size:.7rem;font-weight:800;
  padding:1px 7px;border-radius:50px;
}

/* ── FOOTER ── */
footer {
    background: var(--navy);
    color: rgba(255,255,255,.8);
    padding: 40px 20px 15px;
    font-family: 'Outfit',sans-serif;
}
.footer-top{
  display:grid;
  grid-template-columns:1.6fr 1fr 1fr 1fr;
  gap:40px;
  margin-bottom:40px;
}
.ft-brand{
  font-family:'Cormorant Garamond',serif;
  font-size:1.8rem;font-weight:700;color:#fff;margin-bottom:12px;
}
.ft-brand span{color:var(--or)}
.ft-desc{font-size:.84rem;color:rgba(255,255,255,.55);line-height:1.7;margin-bottom:20px}
.ft-social{display:flex;gap:10px}
.ft-soc{
  width:34px;height:34px;border-radius:50%;
  border:1px solid rgba(255,255,255,.2);
  display:flex;align-items:center;justify-content:center;
  font-size:.85rem;cursor:pointer;
  text-decoration:none;color:#fff;transition:all .2s;
}
.ft-soc:hover{background:var(--or);border-color:var(--or)}
.ft-col-title{
  font-size:.75rem;font-weight:700;text-transform:uppercase;
  letter-spacing:.1em;color:rgba(255,255,255,.4);margin-bottom:16px;
}
.ft-links{display:flex;flex-direction:column;gap:10px}
.ft-link{
  font-size:.85rem;color:rgba(255,255,255,.65);
  text-decoration:none;transition:color .2s;
}
.ft-link:hover{color:var(--or)}
.ft-app{display:flex;flex-direction:column;gap:10px;margin-top:8px}
.ft-app-btn{
  display:flex;align-items:center;gap:10px;
  background:rgba(255,255,255,.08);
  border:1px solid rgba(255,255,255,.15);
  border-radius:10px;padding:10px 14px;
  cursor:pointer;text-decoration:none;color:#fff;transition:all .2s;
}
.ft-app-btn:hover{background:rgba(255,255,255,.15)}
.app-icon{font-size:1.4rem}
.footer-bottom{
  border-top:1px solid rgba(255,255,255,.1);
  padding-top:24px;
  display:flex;align-items:center;
  justify-content:space-between;
  flex-wrap:wrap;gap:12px;
}
.footer-bottom p{font-size:.8rem;color:rgba(255,255,255,.4)}

/* ── FLOATING POST BUTTON (mobile, not logged in) ── */
.float-post{
  display:none;
  position:fixed;bottom:76px;right:16px;z-index:450;
  background:var(--or);color:#fff;
  width:56px;height:56px;border-radius:50%;
  font-size:1.5rem;font-weight:900;
  box-shadow:0 6px 20px var(--or-glow);
  align-items:center;justify-content:center;
  text-decoration:none;
  transition:transform .2s;
}
.float-post:hover{transform:scale(1.1)}

/* ── MOBILE BOTTOM NAV ── */
.mob-bottom-nav{
  display:none;
  position:fixed;bottom:0;left:0;right:0;
  background:var(--white);
  border-top:1px solid var(--border);
  padding:6px 0 env(safe-area-inset-bottom,8px);
  z-index:500;
  box-shadow:0 -4px 20px rgba(0,0,0,.08);
}
.mob-nav-items{
  display:flex;
  justify-content:space-around;
  align-items:flex-end;
  padding:0 4px;
}
.mob-nav-item{
  display:flex;flex-direction:column;align-items:center;
  gap:3px;font-size:.62rem;font-weight:600;
  color:#a09488;cursor:pointer;
  padding:4px 10px 2px;text-decoration:none;
  transition:color .2s;min-width:52px;
}
.mob-nav-item.active{color:var(--or)}
.mob-nav-item:hover{color:var(--or)}
.mob-nav-icon{
  width:24px;height:24px;
  display:flex;align-items:center;justify-content:center;
  transition:transform .2s;
}
.mob-nav-item.active .mob-nav-icon{transform:scale(1.1)}
/* raised center Post button */
.mob-nav-post{margin-top:-18px;padding-bottom:4px;color:#a09488}
.mob-nav-post:hover{color:var(--or)}
.mob-nav-post-icon{
  width:48px;height:48px;border-radius:50%;
  background:var(--or);
  display:flex;align-items:center;justify-content:center;
  box-shadow:0 4px 16px var(--or-glow);
  transition:transform .2s,box-shadow .2s;
  margin-bottom:2px;
  border:3px solid var(--white);
}
.mob-nav-post:hover .mob-nav-post-icon{
  transform:scale(1.08);
  box-shadow:0 6px 20px var(--or-glow);
}

/* ══════════════════════════════════════════════
   RESPONSIVE
══════════════════════════════════════════════ */
@media(max-width:1024px){
  .navbar{padding:0 24px}
  footer{padding:48px 24px 36px}
  .footer-top{grid-template-columns:1.4fr 1fr 1fr;gap:28px}
  /* hide app download col on tablet */
  .footer-top > div:last-child{display:none}
}

@media(max-width:768px){
  /* topbar */
  .topbar{padding:5px 14px;font-size:.7rem}

  /* navbar */
  .navbar{padding:0 14px;height:56px;gap:10px}
  .nb-links{display:none}
  .nb-search{max-width:200px}
  .nb-post{display:none}               /* replaced by raised Post tab */
  .nb-icon{width:32px;height:32px;font-size:.88rem}

  /* footer — hidden on mobile, replaced by bottom nav */
  footer{display:none}

  /* show float-post & bottom nav */
  .float-post{display:flex}
  .mob-bottom-nav{display:block}

  /* page body needs bottom padding so content clears nav */
  body{padding-bottom:72px}
}

@media(max-width:480px){
  .topbar span:last-child{display:none}
  .nb-search{max-width:160px}
  .nb-icon{width:30px;height:30px}
}

/* ═══════════════════════════════════════════════════════
   PWA — CUSTOM BRANDED INSTALL POPUP
   Bottom-sheet on mobile · centered modal on desktop
═══════════════════════════════════════════════════════ */

/* ── Wrapper ─────────────────────────────────────── */
#pwaPopup {
  position: fixed; inset: 0; z-index: 9999;
  display: flex; align-items: flex-end; justify-content: center;
}

/* ── Backdrop ────────────────────────────────────── */
.pwa-backdrop {
  position: absolute; inset: 0;
  background: rgba(10, 14, 30, 0.55);
  backdrop-filter: blur(3px);
  opacity: 0;
  transition: opacity .38s ease;
}
#pwaPopup.pwa-popup-show .pwa-backdrop { opacity: 1 }

/* ── Sheet (bottom on mobile, card on desktop) ───── */
.pwa-sheet {
  position: relative; z-index: 1;
  width: 100%; max-width: 480px;
  background: #fff;
  border-radius: 28px 28px 0 0;
  overflow: hidden;
  transform: translateY(110%);
  transition: transform .42s cubic-bezier(.34,1.22,.64,1);
  max-height: 92vh;
  overflow-y: auto;
  scrollbar-width: none;
}
.pwa-sheet::-webkit-scrollbar { display: none }
#pwaPopup.pwa-popup-show .pwa-sheet { transform: translateY(0) }

/* ── Drag handle ─────────────────────────────────── */
.pwa-handle {
  width: 40px; height: 4px;
  background: #e0d8d0; border-radius: 2px;
  margin: 12px auto 0;
}

/* ── Close button ────────────────────────────────── */
.pwa-close {
  position: absolute; top: 14px; right: 16px;
  width: 32px; height: 32px; border-radius: 50%;
  background: #f4ede8; border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  color: #7a6e65; transition: all .2s; z-index: 2;
}
.pwa-close:hover { background: #fde8dc; color: #F26522 }

/* ── Hero section ────────────────────────────────── */
.pwa-hero {
  position: relative;
  height: 180px;
  background: linear-gradient(135deg, #fff4ee 0%, #ffe8d6 60%, #ffd6b8 100%);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}

/* animated blobs */
.pwa-hero-blob {
  position: absolute;
  border-radius: 50%;
  opacity: .18;
}
.pwa-blob-1 {
  width: 220px; height: 220px;
  background: #F26522;
  top: -60px; right: -40px;
  animation: pwaBlob 6s ease-in-out infinite alternate;
}
.pwa-blob-2 {
  width: 160px; height: 160px;
  background: #1a2744;
  bottom: -60px; left: -30px;
  animation: pwaBlob 8s ease-in-out infinite alternate-reverse;
}
@@keyframes pwaBlob {
  from { transform: scale(1) rotate(0deg) }
  to   { transform: scale(1.15) rotate(15deg) }
}

/* app icon */
.pwa-app-icon {
  position: relative; z-index: 1;
  width: 88px; height: 88px;
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 12px 40px rgba(242,101,34,.28), 0 2px 8px rgba(0,0,0,.08);
  display: flex; align-items: center; justify-content: center;
  animation: pwaIconPop .6s .3s cubic-bezier(.34,1.56,.64,1) both;
}
@@keyframes pwaIconPop {
  from { transform: scale(.6) translateY(20px); opacity: 0 }
  to   { transform: scale(1)  translateY(0);    opacity: 1 }
}
.pwa-app-icon img { border-radius: 16px }

/* floating mini cards */
.pwa-float-card {
  position: absolute; z-index: 1;
  background: #fff;
  border-radius: 50px;
  padding: 5px 12px;
  font-size: .72rem; font-weight: 600; color: #1a1208;
  display: flex; align-items: center; gap: 5px;
  box-shadow: 0 4px 16px rgba(0,0,0,.12);
  white-space: nowrap;
}
.pwa-fc-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: #F26522; flex-shrink: 0;
}
.pwa-fc-dot-green { background: #16a34a }

.pwa-fc-1 {
  top: 28px; left: 16px;
  animation: pwaFloatIn .5s .5s ease both;
}
.pwa-fc-2 {
  top: 28px; right: 16px;
  animation: pwaFloatIn .5s .65s ease both;
}
.pwa-fc-3 {
  bottom: 22px; left: 50%; transform: translateX(-50%);
  animation: pwaFloatIn .5s .8s ease both;
}
@@keyframes pwaFloatIn {
  from { opacity: 0; transform: translateY(10px) }
  to   { opacity: 1; transform: translateY(0) }
}
.pwa-fc-3 { animation: pwaFloatIn3 .5s .8s ease both }
@@keyframes pwaFloatIn3 {
  from { opacity: 0; transform: translateX(-50%) translateY(10px) }
  to   { opacity: 1; transform: translateX(-50%) translateY(0) }
}

/* ── Content ─────────────────────────────────────── */
.pwa-content {
  padding: 20px 24px 32px;
  padding-bottom: max(32px, env(safe-area-inset-bottom, 32px));
}
.pwa-badge {
  display: inline-flex; align-items: center; gap: 6px;
  background: #f0fdf4; color: #15803d;
  font-size: .7rem; font-weight: 700;
  padding: 4px 12px; border-radius: 50px;
  margin-bottom: 10px;
  border: 1px solid #bbf7d0;
}
.pwa-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.75rem; font-weight: 700;
  color: #1a1208; line-height: 1.15;
  margin-bottom: 8px;
}
.pwa-title span { color: #F26522; font-style: italic }
.pwa-desc {
  font-size: .88rem; color: #7a6e65; line-height: 1.6;
  margin-bottom: 20px;
}

/* ── Feature list ────────────────────────────────── */
.pwa-features {
  display: flex; flex-direction: column; gap: 12px;
  margin-bottom: 24px;
}
.pwa-feature {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px;
  background: #fdf8f4;
  border: 1px solid #e8ddd4;
  border-radius: 12px;
}
.pwa-feature-icon {
  width: 38px; height: 38px; border-radius: 10px;
  background: #fff4ee;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem; flex-shrink: 0;
}
.pwa-feature-name { font-size: .84rem; font-weight: 700; color: #1a1208 }
.pwa-feature-sub  { font-size: .72rem; color: #7a6e65; margin-top: 1px }

/* ── Buttons ─────────────────────────────────────── */
.pwa-btn-primary {
  width: 100%; padding: 15px;
  background: #F26522; color: #fff;
  border: none; border-radius: 50px;
  font-family: 'Outfit', sans-serif;
  font-size: 1rem; font-weight: 700;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  transition: background .2s, transform .15s, box-shadow .2s;
  box-shadow: 0 6px 20px rgba(242,101,34,.35);
  margin-bottom: 10px;
}
.pwa-btn-primary:hover  { background: #d9531a; box-shadow: 0 8px 28px rgba(242,101,34,.45) }
.pwa-btn-primary:active { transform: scale(.98) }

.pwa-btn-secondary {
  width: 100%; padding: 13px;
  background: transparent; color: #7a6e65;
  border: 1.5px solid #e8ddd4; border-radius: 50px;
  font-family: 'Outfit', sans-serif;
  font-size: .9rem; font-weight: 600;
  cursor: pointer; transition: all .2s;
}
.pwa-btn-secondary:hover { background: #fdf8f4; color: #1a1208; border-color: #c8bdb5 }

/* ── Navbar install button ───────────────────────── */
.pwa-install-btn {
  display: none;
  align-items: center; gap: 7px;
  background: #fff4ee; color: #F26522;
  border: 1.5px solid #F26522; border-radius: 50px;
  padding: 7px 16px;
  font-family: 'Outfit', sans-serif;
  font-size: .8rem; font-weight: 700;
  cursor: pointer; transition: all .2s; white-space: nowrap;
}
.pwa-install-btn:hover { background: #F26522; color: #fff }

/* ── Toast ───────────────────────────────────────── */
.pwa-toast {
  position: fixed; bottom: 90px; left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: #1a2744; color: #fff;
  padding: 11px 24px; border-radius: 50px;
  font-size: .84rem; font-weight: 600;
  box-shadow: 0 6px 24px rgba(0,0,0,.2);
  z-index: 10000; opacity: 0;
  transition: opacity .3s, transform .3s;
  white-space: nowrap; pointer-events: none;
}
.pwa-toast.pwa-toast-show {
  opacity: 1; transform: translateX(-50%) translateY(0);
}

/* ── Desktop: center card instead of bottom sheet ── */
@media (min-width: 600px) {
  #pwaPopup { align-items: center }
  .pwa-sheet {
    border-radius: 24px;
    max-height: 88vh;
    transform: scale(.9) translateY(30px);
    opacity: 0;
    transition: transform .4s cubic-bezier(.34,1.22,.64,1), opacity .3s ease;
  }
  #pwaPopup.pwa-popup-show .pwa-sheet {
    transform: scale(1) translateY(0);
    opacity: 1;
  }
  .pwa-handle { display: none }
  .pwa-hero   { height: 200px }
}

@media (max-width: 768px) {
  .pwa-install-btn { display: none !important }
  .pwa-toast       { bottom: 160px }
  .pwa-content     { padding-bottom: max(90px, env(safe-area-inset-bottom, 90px)) }
}
