/* =====================================================================
   MoreDeals.lk — rich theme & motion layer (loaded after app.css)
   ===================================================================== */
:root {
    --grad-brand: linear-gradient(135deg, #f26b21 0%, #ff9a3d 100%);
    --grad-navy: linear-gradient(135deg, #0b2545 0%, #13315c 55%, #1d4e89 100%);
    --shadow-sm: 0 2px 8px rgba(11, 37, 69, .06);
    --shadow-md: 0 12px 30px rgba(11, 37, 69, .10);
    --shadow-lg: 0 24px 60px rgba(11, 37, 69, .16);
    --ease: cubic-bezier(.22, 1, .36, 1);
}
html { scroll-behavior: smooth; }
body { animation: pageIn .5s var(--ease) both; }
@keyframes pageIn { from { opacity: 0; } to { opacity: 1; } }
::selection { background: #f26b21; color: #fff; }

/* ---------- Top progress bar ---------- */
#pageProgress { position: fixed; top: 0; left: 0; height: 3px; width: 0; z-index: 2000; background: var(--grad-brand); box-shadow: 0 0 12px rgba(242,107,33,.8); opacity: 1; }
#pageProgress.run { width: 80%; transition: width 6s cubic-bezier(.1,.7,.2,1); }
#pageProgress.done { width: 100%; opacity: 0; transition: width .2s, opacity .4s .2s; }

/* ---------- Scroll reveal ---------- */
.js [data-reveal] { transition: opacity .8s var(--ease), transform .8s var(--ease); transition-delay: var(--d, 0s); }
.js [data-reveal]:not(.in) { opacity: 0; transform: translateY(28px); }
.js [data-reveal="left"]:not(.in) { transform: translateX(-34px); }
.js [data-reveal="right"]:not(.in) { transform: translateX(34px); }
.js [data-reveal="zoom"]:not(.in) { transform: scale(.92); }

/* ---------- Header ---------- */
.site-header { background: rgba(11, 37, 69, .93); backdrop-filter: blur(14px) saturate(150%); -webkit-backdrop-filter: blur(14px) saturate(150%); transition: box-shadow .3s; }
.site-header.scrolled { box-shadow: 0 10px 30px rgba(0,0,0,.25) !important; }
.site-header .navbar { transition: padding .3s var(--ease); }
.site-header.scrolled .navbar { padding-top: .2rem !important; padding-bottom: .2rem !important; }
.site-header .brand span { display: inline-block; animation: brandBob 3s ease-in-out infinite; }
@keyframes brandBob { 0%,100% { transform: none; } 50% { transform: translateY(-2px); } }
.site-header .navbar-nav > .nav-item > .nav-link:not(.dropdown-toggle) { position: relative; }
.site-header .navbar-nav > .nav-item > .nav-link:not(.dropdown-toggle)::after { content: ""; position: absolute; left: .5rem; right: .5rem; bottom: 2px; height: 2px; border-radius: 2px; background: var(--md-orange); transform: scaleX(0); transform-origin: left; transition: transform .3s var(--ease); }
.site-header .navbar-nav > .nav-item > .nav-link:not(.dropdown-toggle):hover::after { transform: scaleX(1); }
.header-search .input-group { transition: box-shadow .3s; }
.header-search .input-group:focus-within { box-shadow: 0 0 0 4px rgba(242,107,33,.35); }
.cat-strip .nav-link { transition: color .2s; }
.cat-strip .nav-link:hover { color: var(--md-orange) !important; }
.cat-strip .nav-link i { display: inline-block; transition: transform .35s var(--ease); }
.cat-strip .nav-link:hover i { transform: translateY(-2px) scale(1.2); }
.dropdown-menu { border: 0; border-radius: .9rem; padding: .5rem; }
.dropdown-menu.show { animation: dropIn .25s var(--ease); }
.dropdown-item { border-radius: .55rem; transition: background .2s, padding-left .2s; }
.dropdown-item:hover { padding-left: 1.25rem; }
@keyframes dropIn { from { opacity: 0; transform: translateY(8px) scale(.98); } to { opacity: 1; transform: none; } }

/* ---------- Buttons ---------- */
.btn { position: relative; overflow: hidden; transition: transform .2s var(--ease), box-shadow .25s, background-color .2s, color .2s, border-color .2s; }
.btn:active { transform: scale(.97); }
.btn-accent { background: var(--grad-brand); border: 0; box-shadow: 0 6px 18px rgba(242,107,33,.35); }
.btn-accent:hover, .btn-accent:focus { background: var(--grad-brand); transform: translateY(-2px); box-shadow: 0 12px 26px rgba(242,107,33,.45); }
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 8px 20px rgba(11,37,69,.25); }
.btn-white { background: #fff; color: var(--md-navy); font-weight: 700; border: 0; box-shadow: 0 10px 24px rgba(0,0,0,.15); }
.btn-white:hover { background: #fff; color: var(--md-orange); transform: translateY(-2px); }
.btn-shine::before { content: ""; position: absolute; top: 0; left: -75%; width: 50%; height: 100%; background: linear-gradient(120deg, transparent, rgba(255,255,255,.5), transparent); transform: skewX(-20deg); animation: shine 3.8s infinite; pointer-events: none; }
@keyframes shine { 0% { left: -75%; } 45%, 100% { left: 130%; } }
.ripple { position: absolute; border-radius: 50%; transform: scale(0); background: rgba(255,255,255,.45); animation: ripple .6s linear; pointer-events: none; }
.btn-outline-primary .ripple, .btn-light .ripple, .btn-outline-secondary .ripple { background: rgba(11,37,69,.15); }
@keyframes ripple { to { transform: scale(4); opacity: 0; } }

/* ---------- Forms ---------- */
.form-control, .form-select { border-radius: .7rem; transition: border-color .2s, box-shadow .2s, background-color .2s; }
.form-control:hover, .form-select:hover { border-color: #c5ccd8; }
.input-group > .form-control, .input-group > .form-select { border-radius: 0; }
.input-group > :first-child { border-top-left-radius: .7rem !important; border-bottom-left-radius: .7rem !important; }
.input-group > :last-child { border-top-right-radius: .7rem !important; border-bottom-right-radius: .7rem !important; }
.form-section { transition: box-shadow .3s, border-color .3s; }
.form-section:focus-within { border-color: #ffc9a8; box-shadow: 0 10px 30px rgba(242,107,33,.08); }
.form-section h5 .step { background: var(--grad-brand); box-shadow: 0 4px 10px rgba(242,107,33,.35); }
.plan-option { transition: transform .3s var(--ease), border-color .2s, box-shadow .3s, background .2s; }
.plan-option:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.dropzone { transition: all .3s var(--ease); }
.dropzone:hover i, .dropzone.drag i { display: inline-block; animation: bounce .8s var(--ease) infinite alternate; }
@keyframes bounce { to { transform: translateY(-8px); } }
.image-previews .preview { animation: popIn .4s var(--ease) both; }
@keyframes popIn { from { opacity: 0; transform: scale(.8); } to { opacity: 1; transform: none; } }

/* ---------- Cards & generic ---------- */
.card { transition: box-shadow .3s var(--ease); }
.stat-card { transition: transform .35s var(--ease), box-shadow .35s; position: relative; overflow: hidden; }
.stat-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.stat-card .icon { transition: transform .4s var(--ease); }
.stat-card:hover .icon { transform: rotate(-8deg) scale(1.12); }
.account-nav .list-group-item { transition: background .2s, color .2s, padding-left .25s var(--ease); }
.account-nav .list-group-item:hover { padding-left: 1.4rem; }
.empty-state i { display: inline-block; animation: floaty 4s ease-in-out infinite; }
.eyebrow { display: inline-block; font-size: .75rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--md-orange); margin-bottom: .35rem; }
.section-title { font-size: clamp(1.4rem, 2.6vw, 2rem); font-weight: 800; letter-spacing: -.01em; }
.text-gradient { background: linear-gradient(90deg, #ff9a3d, #f26b21, #ffd166, #ff9a3d); background-size: 300% auto; -webkit-background-clip: text; background-clip: text; color: transparent; animation: gradText 6s linear infinite; }
@keyframes gradText { to { background-position: 300% center; } }
@keyframes floaty { 0%,100% { transform: translateY(0) rotate(0); } 50% { transform: translateY(-14px) rotate(4deg); } }

/* ---------- Hero ---------- */
.hero-rich { position: relative; overflow: hidden; background: var(--grad-navy); color: #fff; padding: 5rem 0 8rem; }
.hero-bg { position: absolute; inset: 0; pointer-events: none; }
.blob { position: absolute; border-radius: 50%; filter: blur(70px); opacity: .55; animation: blob 18s ease-in-out infinite; transition: translate .6s var(--ease); }
.blob.b1 { width: 440px; height: 440px; background: #f26b21; top: -140px; right: -90px; }
.blob.b2 { width: 380px; height: 380px; background: #3b82f6; bottom: -160px; left: -110px; animation-delay: -6s; }
.blob.b3 { width: 280px; height: 280px; background: #a855f7; top: 35%; left: 42%; opacity: .28; animation-delay: -12s; }
@keyframes blob { 0%,100% { transform: translate(0,0) scale(1); } 33% { transform: translate(40px,-30px) scale(1.1); } 66% { transform: translate(-30px,25px) scale(.94); } }
.grid-overlay { position: absolute; inset: 0; background-image: linear-gradient(rgba(255,255,255,.05) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.05) 1px, transparent 1px); background-size: 48px 48px; -webkit-mask-image: radial-gradient(ellipse at center, #000 25%, transparent 75%); mask-image: radial-gradient(ellipse at center, #000 25%, transparent 75%); }
.float-icon { position: absolute; width: 60px; height: 60px; border-radius: 18px; display: grid; place-items: center; font-size: 1.55rem; color: #fff; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.2); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); box-shadow: 0 12px 30px rgba(0,0,0,.2); animation: floaty 6s ease-in-out infinite; transition: translate .5s var(--ease); z-index: 1; }
.float-icon.fi1 { top: 16%; left: 7%; }
.float-icon.fi2 { top: 60%; left: 4%; animation-delay: -1.5s; color: #ffb37d; }
.float-icon.fi3 { top: 22%; right: 8%; animation-delay: -3s; }
.float-icon.fi4 { top: 62%; right: 5%; animation-delay: -4.5s; color: #93c5fd; }
.float-icon.fi5 { top: 8%; left: 30%; width: 44px; height: 44px; font-size: 1.1rem; animation-delay: -2s; }
.float-icon.fi6 { top: 10%; right: 28%; width: 44px; height: 44px; font-size: 1.1rem; animation-delay: -5s; color: #fde68a; }
.hero-eyebrow { display: inline-flex; gap: .6rem; align-items: center; padding: .45rem 1.1rem; border-radius: 2rem; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.2); font-size: .88rem; backdrop-filter: blur(6px); }
.live-dot { width: 9px; height: 9px; border-radius: 50%; background: #22c55e; animation: ping 2s infinite; }
@keyframes ping { 0% { box-shadow: 0 0 0 0 rgba(34,197,94,.7); } 70% { box-shadow: 0 0 0 10px rgba(34,197,94,0); } 100% { box-shadow: 0 0 0 0 rgba(34,197,94,0); } }
.hero-rich h1 { font-size: clamp(2.1rem, 5.2vw, 3.7rem); font-weight: 800; line-height: 1.1; letter-spacing: -.02em; }
.rotator { display: inline-block; transition: opacity .35s var(--ease), transform .35s var(--ease); }
.rotator.out { opacity: 0; transform: translateY(-.35em); }
.rotator.pre { opacity: 0; transform: translateY(.35em); transition: none; }
.hero-search-rich { position: relative; z-index: 2; background: #fff; border-radius: 1.25rem; padding: .55rem; box-shadow: 0 30px 60px rgba(0,0,0,.3); transition: transform .35s var(--ease), box-shadow .35s; }
.hero-search-rich:focus-within { transform: translateY(-3px); box-shadow: 0 35px 70px rgba(0,0,0,.35), 0 0 0 5px rgba(242,107,33,.35); }
.hero-search-rich .form-control, .hero-search-rich .form-select { border: 0; box-shadow: none; }
@media (min-width: 768px) { .hero-search-rich .divider { border-left: 1px solid var(--md-border); } }
.chip { display: inline-flex; align-items: center; gap: .4rem; padding: .38rem .9rem; border-radius: 2rem; background: rgba(255,255,255,.1); color: #fff; border: 1px solid rgba(255,255,255,.2); font-size: .85rem; transition: all .25s var(--ease); }
.chip:hover { background: #fff; color: var(--md-navy); transform: translateY(-2px); }
.hero-stats { position: relative; z-index: 2; }
.hero-stats .num { font-family: 'Poppins', sans-serif; font-weight: 800; font-size: clamp(1.4rem, 3vw, 2rem); line-height: 1; }
.hero-stats .lbl { font-size: .8rem; opacity: .7; text-transform: uppercase; letter-spacing: .08em; }
.hero-stats > div + div { border-left: 1px solid rgba(255,255,255,.15); }
.hero-wave { position: absolute; bottom: -1px; left: 0; width: 100%; height: 90px; color: var(--md-bg); }
.hero-wave .w2 { opacity: .5; animation: waveShift 9s ease-in-out infinite alternate; }
@keyframes waveShift { to { transform: translateX(-60px); } }

/* ---------- Category tiles ---------- */
.cat-tile { position: relative; overflow: hidden; transition: transform .45s var(--ease), box-shadow .45s, border-color .3s; }
.cat-tile::before { content: ""; position: absolute; inset: 0; background: linear-gradient(160deg, var(--c1, #fff3eb), transparent 65%); opacity: 0; transition: opacity .4s; }
.cat-tile > * { position: relative; }
.cat-tile:hover { transform: translateY(-8px); box-shadow: var(--shadow-lg); border-color: transparent; }
.cat-tile:hover::before { opacity: 1; }
.cat-tile .icon { background: var(--c1, #fff3eb); color: var(--c2, #f26b21); transition: transform .5s var(--ease), box-shadow .4s; }
.cat-tile:hover .icon { transform: rotate(-10deg) scale(1.15); box-shadow: 0 10px 20px rgba(0,0,0,.08); }
.cat-tile .go { font-size: .75rem; color: var(--c2, #f26b21); font-weight: 600; opacity: 0; transform: translateY(6px); transition: all .35s var(--ease); }
.cat-tile:hover .go { opacity: 1; transform: none; }

/* ---------- Ad cards ---------- */
.ad-card { transition: transform .45s var(--ease), box-shadow .45s; }
.ad-card:hover { transform: translateY(-7px); box-shadow: var(--shadow-lg); }
.ad-card .thumb, .ad-row .thumb { position: relative; background: linear-gradient(90deg, #eef1f6 25%, #f8fafc 50%, #eef1f6 75%); background-size: 200% 100%; animation: shimmer 1.4s infinite linear; overflow: hidden; }
@keyframes shimmer { to { background-position: -200% 0; } }
.ad-card .thumb img, .ad-row .thumb img { transition: transform .9s var(--ease), opacity .5s; }
.js .ad-card .thumb img:not(.loaded), .js .ad-row .thumb img:not(.loaded) { opacity: 0; }
.ad-card:hover .thumb img { transform: scale(1.09); }
.ad-card .thumb::after { content: "View details  →"; position: absolute; left: 0; right: 0; bottom: 0; padding: 2.2rem .9rem .75rem; background: linear-gradient(transparent, rgba(11,37,69,.88)); color: #fff; font-size: .8rem; font-weight: 600; opacity: 0; transform: translateY(12px); transition: all .4s var(--ease); }
.ad-card:hover .thumb::after { opacity: 1; transform: none; }
.ad-card .price { transition: letter-spacing .3s; }
.ad-row { transition: transform .35s var(--ease), box-shadow .35s; }
.ad-row:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.ad-row:hover .thumb img { transform: scale(1.07); }
.fav-btn { transition: transform .25s var(--ease), color .2s; }
.fav-btn:hover { transform: scale(1.15); }
.pop i { display: inline-block; animation: heartPop .5s var(--ease); }
@keyframes heartPop { 0% { transform: scale(1); } 35% { transform: scale(1.6); } 100% { transform: scale(1); } }
.badge-top { background: var(--grad-brand); box-shadow: 0 4px 10px rgba(242,107,33,.4); }
.badge-featured { background: var(--grad-navy); }
.badge-urgent { animation: pulseRed 2s infinite; }
@keyframes pulseRed { 0% { box-shadow: 0 0 0 0 rgba(217,45,32,.6); } 70% { box-shadow: 0 0 0 8px rgba(217,45,32,0); } 100% { box-shadow: 0 0 0 0 rgba(217,45,32,0); } }

/* ---------- Horizontal scroller ---------- */
.scroller { display: grid; grid-auto-flow: column; grid-auto-columns: calc((100% - 3rem) / 4); gap: 1rem; overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth; padding: .75rem .25rem 1.75rem; scrollbar-width: none; }
.scroller::-webkit-scrollbar { display: none; }
.scroller > * { scroll-snap-align: start; }
@media (max-width: 991px) { .scroller { grid-auto-columns: calc((100% - 2rem) / 3); } }
@media (max-width: 767px) { .scroller { grid-auto-columns: calc((100% - 1rem) / 2); } }
@media (max-width: 480px) { .scroller { grid-auto-columns: 75%; } }
.scroll-btn { width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--md-border); background: #fff; color: var(--md-navy); display: inline-grid; place-items: center; transition: all .25s var(--ease); }
.scroll-btn:hover { background: var(--md-navy); color: #fff; border-color: var(--md-navy); transform: scale(1.08); }

/* ---------- How it works ---------- */
.steps { position: relative; }
@media (min-width: 768px) { .steps::before { content: ""; position: absolute; top: 72px; left: 18%; right: 18%; border-top: 2px dashed #f7c6a6; } }
.step-card { position: relative; text-align: center; padding: 2rem 1.5rem; background: #fff; border-radius: 1.25rem; border: 1px solid var(--md-border); height: 100%; transition: transform .45s var(--ease), box-shadow .45s; }
.step-card:hover { transform: translateY(-8px); box-shadow: var(--shadow-md); }
.step-num { position: absolute; top: .8rem; right: 1.2rem; font-family: 'Poppins', sans-serif; font-weight: 800; font-size: 2.6rem; color: rgba(11,37,69,.06); }
.step-icon { width: 76px; height: 76px; margin: 0 auto 1.1rem; border-radius: 24px; display: grid; place-items: center; font-size: 2rem; color: #fff; background: var(--grad-brand); box-shadow: 0 14px 28px rgba(242,107,33,.35); animation: floaty 5s ease-in-out infinite; }
.step-card:nth-child(2) .step-icon, .col:nth-child(2) .step-icon { background: var(--grad-navy); box-shadow: 0 14px 28px rgba(11,37,69,.3); animation-delay: -1.6s; }
.col:nth-child(3) .step-icon { background: linear-gradient(135deg, #16a34a, #4ade80); box-shadow: 0 14px 28px rgba(22,163,74,.3); animation-delay: -3.2s; }

/* ---------- Feature cards ---------- */
.feature-card { background: #fff; border: 1px solid var(--md-border); border-radius: 1.25rem; padding: 1.75rem; height: 100%; transition: transform .45s var(--ease), box-shadow .45s; position: relative; overflow: hidden; }
.feature-card::after { content: ""; position: absolute; width: 160px; height: 160px; border-radius: 50%; background: var(--fc, #fff3eb); right: -60px; top: -60px; transition: transform .6s var(--ease); z-index: 0; }
.feature-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-md); }
.feature-card:hover::after { transform: scale(1.4); }
.feature-card > * { position: relative; z-index: 1; }
.feature-card .ficon { width: 54px; height: 54px; border-radius: 16px; display: grid; place-items: center; font-size: 1.5rem; color: #fff; margin-bottom: 1rem; }

/* ---------- Location pills ---------- */
.loc-pill { display: inline-flex; align-items: center; gap: .4rem; padding: .55rem 1.1rem; border-radius: 2rem; background: #fff; border: 1px solid var(--md-border); color: var(--md-text); font-weight: 500; transition: all .3s var(--ease); }
.loc-pill:hover { background: var(--md-navy); color: #fff; border-color: var(--md-navy); transform: translateY(-3px); box-shadow: var(--shadow-md); }
.loc-pill i { color: var(--md-orange); }

/* ---------- CTA band ---------- */
.cta-band { position: relative; overflow: hidden; border-radius: 1.75rem; padding: 3.25rem 2rem; color: #fff; background: linear-gradient(120deg, #f26b21, #ff8a3d, #f25f5c, #f26b21); background-size: 300% 300%; animation: gradMove 10s ease infinite; box-shadow: 0 30px 60px rgba(242,107,33,.3); }
@keyframes gradMove { 0%,100% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } }
.cta-band .ring { position: absolute; border-radius: 50%; border: 2px solid rgba(255,255,255,.22); animation: spinSlow 24s linear infinite; }
.cta-band .ring.r1 { width: 340px; height: 340px; right: -100px; top: -140px; border-style: dashed; }
.cta-band .ring.r2 { width: 200px; height: 200px; left: -60px; bottom: -90px; animation-direction: reverse; }
@keyframes spinSlow { to { transform: rotate(360deg); } }
.cta-band > .position-relative { z-index: 1; }

/* ---------- Toast notifications ---------- */
.toast-stack { position: fixed; top: 86px; right: 1rem; z-index: 1090; display: flex; flex-direction: column; gap: .65rem; width: min(390px, calc(100% - 2rem)); pointer-events: none; }
.md-toast { pointer-events: auto; display: flex; gap: .8rem; align-items: flex-start; background: #fff; border-radius: 1rem; padding: .9rem 1rem; box-shadow: var(--shadow-lg); border-left: 4px solid var(--tc); position: relative; overflow: hidden; animation: toastIn .55s var(--ease) both; }
.md-toast .ti { color: var(--tc); font-size: 1.35rem; line-height: 1; }
.md-toast .tbody { flex: 1; font-size: .92rem; }
.md-toast .tclose { border: 0; background: none; color: var(--md-muted); padding: 0; line-height: 1; }
.md-toast .bar { position: absolute; bottom: 0; left: 0; height: 3px; background: var(--tc); animation: toastBar 6s linear forwards; }
.md-toast:hover .bar { animation-play-state: paused; }
.md-toast.hide { animation: toastOut .4s var(--ease) forwards; }
@keyframes toastIn { from { opacity: 0; transform: translateX(110%); } to { opacity: 1; transform: none; } }
@keyframes toastOut { to { opacity: 0; transform: translateX(110%); } }
@keyframes toastBar { from { width: 100%; } to { width: 0; } }

/* ---------- Back to top ---------- */
.to-top { position: fixed; right: 1.2rem; bottom: 1.2rem; z-index: 1040; width: 48px; height: 48px; border-radius: 50%; border: 0; color: #fff; background: var(--grad-brand); box-shadow: 0 10px 24px rgba(242,107,33,.4); opacity: 0; transform: translateY(20px) scale(.8); pointer-events: none; transition: all .35s var(--ease); }
.to-top.show { opacity: 1; transform: none; pointer-events: auto; }
.to-top:hover { transform: translateY(-3px); }

/* ---------- Mobile bottom nav & contact bar ---------- */
.mobile-nav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 1045; display: flex; align-items: flex-end; justify-content: space-around; padding: .4rem .5rem calc(.45rem + env(safe-area-inset-bottom)); background: rgba(255,255,255,.96); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-top: 1px solid var(--md-border); box-shadow: 0 -6px 24px rgba(11,37,69,.08); }
.mobile-nav a { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; color: var(--md-muted); font-size: .68rem; font-weight: 600; }
.mobile-nav a i { font-size: 1.3rem; transition: transform .25s var(--ease); }
.mobile-nav a.active { color: var(--md-orange); }
.mobile-nav a.active i { transform: translateY(-2px); }
.mobile-nav .fab { width: 58px; height: 58px; margin-top: -30px; border-radius: 50%; display: grid; place-items: center; font-size: 1.7rem; color: #fff; background: var(--grad-brand); border: 4px solid #fff; box-shadow: 0 10px 24px rgba(242,107,33,.45); animation: fabPulse 2.6s infinite; }
@keyframes fabPulse { 0%,100% { box-shadow: 0 10px 24px rgba(242,107,33,.45), 0 0 0 0 rgba(242,107,33,.4); } 50% { box-shadow: 0 10px 24px rgba(242,107,33,.45), 0 0 0 10px rgba(242,107,33,0); } }
.mobile-contact-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 1046; display: flex; gap: .5rem; padding: .6rem .75rem calc(.6rem + env(safe-area-inset-bottom)); background: #fff; box-shadow: 0 -8px 24px rgba(11,37,69,.12); animation: slideUp .5s var(--ease) both .3s; }
@keyframes slideUp { from { transform: translateY(100%); } to { transform: none; } }
@media (min-width: 768px) { .mobile-nav { display: none; } }
@media (min-width: 992px) { .mobile-contact-bar { display: none; } }
@media (max-width: 767px) { body { padding-bottom: 72px; } .to-top { bottom: 86px; } .toast-stack { top: 70px; } }
@media (max-width: 991px) { body.has-contact-bar { padding-bottom: 78px; } .has-contact-bar .to-top { bottom: 92px; } }
.has-contact-bar .mobile-nav { display: none; }

/* ---------- Ad details ---------- */
.gallery-main img { transition: opacity .3s var(--ease), transform .5s var(--ease); }
.gallery-main img.swap { opacity: 0; transform: scale(.98); }
.gallery-main:hover img { transform: scale(1.02); }
.ad-price-lg { background: var(--grad-brand); -webkit-background-clip: text; background-clip: text; color: transparent; }
.seller-avatar { box-shadow: 0 0 0 3px #fff, 0 0 0 5px #ffd6bd; }

/* ---------- Auth split layout ---------- */
.auth-wrap { display: grid; grid-template-columns: 1fr; min-height: calc(100vh - 140px); }
@media (min-width: 992px) { .auth-wrap { grid-template-columns: 5fr 6fr; } }
.auth-side { display: none; position: relative; overflow: hidden; color: #fff; padding: 4rem 3.5rem; background: var(--grad-navy); }
@media (min-width: 992px) { .auth-side { display: flex; flex-direction: column; justify-content: center; } }
.auth-side .blob { opacity: .45; }
.auth-side > .position-relative { z-index: 1; }
.benefit { display: flex; gap: 1rem; align-items: flex-start; margin-bottom: 1.3rem; }
.benefit i { width: 46px; height: 46px; border-radius: 14px; flex-shrink: 0; display: grid; place-items: center; font-size: 1.2rem; background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.15); }
.auth-main { display: flex; align-items: center; justify-content: center; padding: 2.5rem 1rem; }
.auth-main .auth-card { margin: 0; width: 100%; }
.auth-card { animation: cardIn .7s var(--ease) both; }
@keyframes cardIn { from { opacity: 0; transform: translateY(30px) scale(.98); } to { opacity: 1; transform: none; } }

/* ---------- Footer ---------- */
.site-footer { position: relative; background: var(--grad-navy); padding-top: 5rem; margin-top: 5rem; }
.footer-wave { position: absolute; top: -1px; left: 0; width: 100%; height: 60px; color: var(--md-bg); transform: rotate(180deg); }
.site-footer a { transition: color .2s, padding-left .25s var(--ease); }
.site-footer ul a:hover { padding-left: 4px; }
.social-btn { width: 40px; height: 40px; border-radius: 50%; display: inline-grid; place-items: center; background: rgba(255,255,255,.08); transition: all .3s var(--ease); }
.social-btn:hover { background: var(--md-orange); color: #fff !important; transform: translateY(-3px); }

/* ---------- Admin touches ---------- */
.admin-sidebar .nav-link { transition: background .2s, color .2s, padding-left .25s var(--ease), border-color .2s; }
.admin-sidebar .nav-link:hover { padding-left: 1.7rem; }
.admin-sidebar .nav-link i { transition: transform .3s var(--ease); }
.admin-sidebar .nav-link:hover i { transform: scale(1.2); }
.admin-main > .p-3 { animation: pageIn .5s var(--ease) both; }
.table-hover tbody tr { transition: background .2s; }

/* ---------- Accessibility: reduced motion ---------- */
/* ---------- Preloader / page loader ---------- */
#preloader {
    position: fixed; inset: 0; z-index: 3000; display: grid; place-items: center; overflow: hidden;
    background: radial-gradient(circle at 30% 20%, #1d4e89 0%, #0b2545 55%, #061a33 100%); color: #fff;
    transition: opacity .55s var(--ease), visibility .55s;
    animation: plFailsafe .01s 8s forwards;
}
html:not(.js) #preloader { display: none; }
/* Repeat visits in the same session: only appear if the page is slow (> .45s) */
.pl-quick #preloader { opacity: 0; pointer-events: none; animation: plIn .35s .45s forwards, plFailsafe .01s 8s forwards; }
#preloader.pl-done { opacity: 0 !important; visibility: hidden; pointer-events: none; animation: none; }
#preloader.pl-done .pl-inner { transform: scale(1.08); }
/* Navigating away: translucent overlay shown only if the next page takes a while */
#preloader.pl-leave { opacity: 0; visibility: visible; pointer-events: none; background: rgba(6, 26, 51, .55); backdrop-filter: blur(6px);
    animation: plIn .3s .4s forwards, plFailsafe .01s 12s forwards; }
#preloader.pl-leave .pl-brand, #preloader.pl-leave .pl-bar, #preloader.pl-leave .pl-dot { display: none; }
@keyframes plIn { to { opacity: 1; } }
@keyframes plFailsafe { to { opacity: 0; visibility: hidden; pointer-events: none; } }

.pl-inner { display: flex; flex-direction: column; align-items: center; gap: 1.1rem; transition: transform .55s var(--ease); }
.pl-logo { position: relative; width: 110px; height: 110px; display: grid; place-items: center; }
.pl-ring { position: absolute; inset: 0; border-radius: 50%; border: 3px solid transparent;
    border-top-color: #f26b21; border-right-color: rgba(242,107,33,.35); animation: plSpin 1.1s linear infinite; }
.pl-ring.r2 { inset: 12px; border-width: 2px; border-top-color: transparent; border-bottom-color: #ffb37d; border-left-color: rgba(255,255,255,.35); animation-duration: 1.6s; animation-direction: reverse; }
.pl-core { width: 62px; height: 62px; border-radius: 18px; display: grid; place-items: center; color: #fff;
    background: linear-gradient(135deg, #ff8a3d, #f26b21 55%, #d9480f); box-shadow: 0 10px 30px rgba(242,107,33,.55);
    animation: plBounce 1.4s var(--ease) infinite; }
.pl-core svg { animation: plTag 1.4s var(--ease) infinite; }
.pl-brand { font-family: Poppins, Inter, sans-serif; font-weight: 800; font-size: 1.6rem; letter-spacing: -.02em;
    background: linear-gradient(90deg, #fff 0%, #fff 40%, #ffb37d 50%, #fff 60%, #fff 100%); background-size: 250% 100%;
    -webkit-background-clip: text; background-clip: text; color: transparent; animation: plShine 2.2s linear infinite; }
.pl-brand span { color: #f26b21; -webkit-text-fill-color: #f26b21; }
.pl-bar { width: 160px; height: 4px; border-radius: 4px; background: rgba(255,255,255,.15); overflow: hidden; }
.pl-bar span { display: block; width: 40%; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #ffb37d, #f26b21);
    animation: plSlide 1.2s ease-in-out infinite; }
.pl-text { font-size: .85rem; color: rgba(255,255,255,.7); letter-spacing: .02em; }
.pl-ellipsis i { font-style: normal; animation: plBlink 1.2s infinite; opacity: 0; }
.pl-ellipsis i:nth-child(2) { animation-delay: .2s; }
.pl-ellipsis i:nth-child(3) { animation-delay: .4s; }
.pl-dot { position: absolute; left: var(--x); top: var(--y); width: var(--s); height: var(--s); border-radius: 50%;
    background: radial-gradient(circle, rgba(242,107,33,.9), rgba(242,107,33,0) 70%); animation: plFloat var(--t) ease-in-out infinite alternate; }
@keyframes plSpin { to { transform: rotate(360deg); } }
@keyframes plBounce { 0%, 100% { transform: translateY(0) scale(1); } 45% { transform: translateY(-8px) scale(1.04); } 60% { transform: translateY(0) scale(.96, 1.04); } }
@keyframes plTag { 0%, 100% { transform: rotate(0); } 30% { transform: rotate(-14deg); } 55% { transform: rotate(8deg); } }
@keyframes plShine { from { background-position: 100% 0; } to { background-position: -150% 0; } }
@keyframes plSlide { 0% { transform: translateX(-110%); } 100% { transform: translateX(280%); } }
@keyframes plBlink { 0%, 100% { opacity: 0; } 40%, 60% { opacity: 1; } }
@keyframes plFloat { from { transform: translate(0, 0) scale(1); } to { transform: translate(30px, -40px) scale(1.6); } }

/* ---------- Button loading state ---------- */
.btn.is-loading { position: relative; pointer-events: none; color: transparent !important; }
.btn.is-loading > *:not(.btn-spinner) { visibility: hidden; }
.btn-spinner { position: absolute; left: 50%; top: 50%; width: 1.1em; height: 1.1em; margin: -.55em 0 0 -.55em;
    border: 2px solid; border-right-color: transparent !important; border-radius: 50%; animation: plSpin .7s linear infinite; }

/* ---------- Skeleton placeholders ---------- */
.skeleton { position: relative; overflow: hidden; background: #e9edf3; border-radius: 8px; }
.skeleton::after { content: ""; position: absolute; inset: 0; transform: translateX(-100%);
    background: linear-gradient(90deg, transparent, rgba(255,255,255,.65), transparent); animation: skel 1.3s infinite; }
@keyframes skel { to { transform: translateX(100%); } }
.chart-wrap { position: relative; }
.chart-wrap .skeleton { position: absolute; inset: 0; transition: opacity .4s; }
.chart-wrap.ready .skeleton { opacity: 0; pointer-events: none; }

@media (prefers-reduced-motion: reduce) {
    #preloader { display: none !important; }
    *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
    .js [data-reveal] { opacity: 1; transform: none; }
}
