/* MN Gallery — "Magnet Snap" theme layer (loaded after styles.css) */
:root{--gold-2:#d8c08a;--snap:cubic-bezier(.2,1.45,.35,1);--ease-out:cubic-bezier(.22,.8,.3,1)}
html{scroll-behavior:smooth}
body:not(.dashboard-body){font-family:"Tajawal",system-ui,-apple-system,"Segoe UI",sans-serif;-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility}
::selection{background:rgba(184,155,99,.35)}

/* header: soft glass */
body:not(.dashboard-body) .site-header,body:not(.dashboard-body) .simple-header{background:rgba(252,251,247,.88);-webkit-backdrop-filter:saturate(1.3) blur(12px);backdrop-filter:saturate(1.3) blur(12px)}
body:not(.dashboard-body) .desktop-nav a{position:relative}
body:not(.dashboard-body) .desktop-nav a::after{content:"";position:absolute;inset-inline:0;bottom:-6px;height:2px;background:linear-gradient(90deg,transparent,var(--gold),transparent);transform:scaleX(0);transition:transform .35s var(--ease-out)}
body:not(.dashboard-body) .desktop-nav a:hover::after,body:not(.dashboard-body) .desktop-nav a.active::after{transform:scaleX(1)}

/* buttons */
body:not(.dashboard-body) .btn{transition:transform .25s var(--snap),box-shadow .3s ease,background .3s ease,border-color .3s ease}
body:not(.dashboard-body) .btn-primary{background:linear-gradient(135deg,#335046,#294039 60%,#223630);box-shadow:0 10px 24px rgba(41,64,57,.26)}
body:not(.dashboard-body) .btn-primary:not([disabled]):hover{box-shadow:0 14px 30px rgba(184,155,99,.38),0 0 0 1px rgba(184,155,99,.5)}
body:not(.dashboard-body) .btn-primary:not([disabled]):active{transform:scale(.97)}
body:not(.dashboard-body) .btn-outline:hover{border-color:var(--gold)}

/* section headings: gold hairline */
body:not(.dashboard-body) .section-heading.center h2::after,body:not(.dashboard-body) .catalog-hero h1::after{content:"";display:block;width:56px;height:2px;margin:14px auto 0;background:linear-gradient(90deg,transparent,var(--gold),transparent)}
body:not(.dashboard-body) .catalog-hero h1::after{margin-inline:0 auto}
body:not(.dashboard-body) .eyebrow{letter-spacing:.03em}

/* cards: thin gold edge + lift */
body:not(.dashboard-body) .product-card,body:not(.dashboard-body) .theme-card,body:not(.dashboard-body) .branch-card,body:not(.dashboard-body) .feature{border:1px solid rgba(184,155,99,.26);box-shadow:0 14px 34px rgba(41,64,57,.08);transition:transform .45s var(--snap),box-shadow .35s ease,border-color .3s ease}
@media (hover:hover){
  body:not(.dashboard-body) .product-card:hover,body:not(.dashboard-body) .theme-card:hover,body:not(.dashboard-body) .branch-card:hover{transform:translateY(-7px) rotate(-.5deg);box-shadow:0 26px 50px rgba(41,64,57,.16);border-color:rgba(184,155,99,.6)}
  body:not(.dashboard-body) .image-placeholder img{transition:transform .8s var(--ease-out)}
  body:not(.dashboard-body) a:hover>.image-placeholder img,body:not(.dashboard-body) .product-card:hover .image-placeholder img{transform:scale(1.045)}
}
body:not(.dashboard-body) .product-card:active,body:not(.dashboard-body) .theme-card:active,body:not(.dashboard-body) .branch-card:active{transform:scale(.985)}

/* MAGNET SNAP: cards drop onto the surface with a small overshoot */
.mg-snap{opacity:0;transform:translateY(22px) scale(1.07) rotate(var(--r,-2deg));filter:drop-shadow(0 22px 22px rgba(41,64,57,.22))}
.mg-snap.is-in{opacity:1;transform:none;filter:drop-shadow(0 0 0 rgba(41,64,57,0));transition:transform .75s var(--snap),opacity .4s ease,filter .8s ease;transition-delay:var(--d,0ms)}
.mg-snap.is-done{transition:none;filter:none}

/* hero text rises in (pure CSS, never blocks content) */
@keyframes mgRise{from{opacity:0;transform:translateY(12px)}to{opacity:1;transform:none}}
body:not(.dashboard-body) .hero-copy>*{animation:mgRise .55s var(--ease-out) both}
body:not(.dashboard-body) .hero-copy>*:nth-child(2){animation-delay:.08s}
body:not(.dashboard-body) .hero-copy>*:nth-child(3){animation-delay:.16s}
body:not(.dashboard-body) .hero-copy>*:nth-child(4){animation-delay:.24s}
body:not(.dashboard-body) .hero-copy>*:nth-child(5){animation-delay:.32s}

/* cart badge: magnet "click" */
@keyframes mgBump{0%{transform:scale(1)}35%{transform:scale(1.45) rotate(-6deg)}70%{transform:scale(.92)}100%{transform:scale(1)}}
.mg-bump{animation:mgBump .6s var(--snap)}

/* soft page-to-page fade where the browser supports it */
@view-transition{navigation:auto}
::view-transition-old(root),::view-transition-new(root){animation-duration:.28s}

@media (prefers-reduced-motion:reduce){
  html{scroll-behavior:auto}
  .mg-snap,.mg-snap.is-in{opacity:1!important;transform:none!important;filter:none!important;transition:none!important}
  body:not(.dashboard-body) .hero-copy>*,.mg-bump{animation:none!important}
  body:not(.dashboard-body) *{transition-duration:.01ms!important}
  ::view-transition-old(root),::view-transition-new(root){animation:none}
}

/* full-width blocks: rise only (no scale/rotate) so they never push the page wider on phones */
.seo-article h2.mg-snap,details.faq.mg-snap,.section-heading.mg-snap,.themes-group.mg-snap{transform:translateY(22px)}
