/* Mert Karataş Shop v1.6.51 ---------------------------------------------
   Intermediate viewport hardening.
   - No change to the decorative line on mertkaratash.com (different site).
   - Footer edge alignment, gateway/intro stability, compact responsive menu,
     LAB motion budget and achievement typography.
----------------------------------------------------------------------------- */

/* 1) Desktop footer: brand signature and identity cards close the vertical
      composition instead of floating at the top of a taller footer. */
@media (min-width:981px){
  .mks-footer--expanded .mks-footer__brand,
  .mks-footer--expanded .mks-footer__identities{
    align-self:end!important;
  }
  .mks-footer--expanded .mks-footer__brand{align-content:end!important}
}

/* 2) Achievement cards: avoid the clipped headline / oversized type failure
      seen on intermediate laptop/tablet widths. */
.mks-achievements,
.mks-achievements__head,
.mks-achievements__grid,
.mks-achievement{min-width:0}
.mks-achievement h3{
  max-width:100%!important;
  font-size:clamp(1rem,1.35vw,1.25rem)!important;
  line-height:1.03!important;
  overflow-wrap:anywhere;
  text-wrap:balance;
}
.mks-achievement p{max-width:34ch!important;overflow-wrap:anywhere}
@media (max-width:1280px) and (min-width:761px){
  .mks-account-page .mks-achievements__grid,
  .mks-achievements__grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  .mks-achievement{min-height:174px!important;padding:.9rem!important}
  .mks-achievement h3{font-size:clamp(1rem,1.7vw,1.18rem)!important}
  .mks-achievement p{font-size:.62rem!important;line-height:1.46!important}
  .mks-achievement__progress{left:.9rem!important;right:.9rem!important;bottom:.86rem!important}
}

/* 3) Gateway: the two identities become one-column before they start fighting
      for width. The old hover takeover/parallax is intentionally neutral here. */
@media (max-width:1180px){
  .mks-gateway__grid{
    height:auto!important;
    flex-direction:column!important;
  }
  .mks-gateway .mks-identity{
    flex:0 0 auto!important;
    flex-basis:auto!important;
    width:100%!important;
    height:clamp(430px,52vw,540px)!important;
    min-height:430px!important;
  }
  .mks-gateway__grid:has(.mks-identity:hover) .mks-identity{
    flex-basis:auto!important;
  }
  .mks-gateway .mks-identity__content,
  .mks-gateway .mks-product-scene{
    transform:none!important;
  }
  .mks-gateway .mks-product-scene{
    --scene-shift-x:0px!important;
    --scene-shift-y:0px!important;
  }
  .mks-gateway .mks-identity__content{
    --content-shift-x:0px!important;
    --content-shift-y:0px!important;
    width:min(58%,410px)!important;
  }
  .mks-gateway .mks-scene-product:hover{
    transform:translate(-50%,-50%) rotate(var(--scene-r))!important;
    filter:drop-shadow(0 20px 28px rgba(0,0,0,.34))!important;
  }
  .mks-gateway .mks-identity--mk strong{
    max-width:6.2ch;
    font-size:clamp(3rem,6.6vw,4.75rem)!important;
    line-height:.84!important;
    text-wrap:balance;
  }
}

/* 4) Collection / MERTED / LAB intros: when the composition is already
      compact, never run the desktop "media takes over the copy" hover state. */
@media (max-width:1180px){
  .mks-collection-hero[data-mks-motion-intro].is-motion-expanded .mks-collection-stage,
  .mks-identity-archive--merted.is-motion-expanded .mks-identity-archive__scene{
    width:100%!important;
    transform:none!important;
    box-shadow:none!important;
  }
  .mks-collection-hero[data-mks-motion-intro].is-motion-expanded .mks-collection-hero__copy>span,
  .mks-collection-hero[data-mks-motion-intro].is-motion-expanded .mks-collection-hero__copy>p,
  .mks-collection-hero[data-mks-motion-intro].is-motion-expanded .mks-collection-hero__copy>h1,
  .mks-collection-hero[data-mks-motion-intro].is-motion-expanded .mks-collection-hero__statement,
  .mks-identity-archive--merted.is-motion-expanded .mks-identity-archive__copy>span,
  .mks-identity-archive--merted.is-motion-expanded .mks-identity-archive__copy>p,
  .mks-identity-archive--merted.is-motion-expanded .mks-identity-archive__copy>h1,
  .mks-identity-archive--merted.is-motion-expanded .mks-identity-archive__line{
    transform:none!important;
    opacity:1!important;
    animation:none!important;
    filter:none!important;
    clip-path:none!important;
  }
  .mks-collection-motion-label,
  .mks-merted-signal-field{animation:none!important}

  /* LAB: keep the blueprint readable, remove GPU-expensive lightning and
     translate/scale takeover on tablet/narrow desktop. */
  .mks-lab-lightning{display:none!important}
  .mks-lab-archive-hero[data-mks-motion-intro] .mks-lab-archive-hero__lead,
  .mks-lab-archive-hero[data-mks-motion-intro] .mks-lab-archive-hero__lead>img{
    transform:none!important;
    transition:filter .25s ease!important;
    will-change:auto!important;
  }
  .mks-lab-archive-hero[data-mks-motion-intro].is-motion-expanded .mks-lab-assembly,
  .mks-lab-archive-hero.is-motion-seen .mks-lab-assembly,
  .mks-lab-archive-hero[data-mks-motion-intro] .mks-lab-assembly i,
  .mks-lab-archive-hero[data-mks-motion-intro] .mks-lab-assembly b{
    animation:none!important;
  }
}

/* 5) Header changes mode earlier. This fixes the 1050–1240px collision band
      without shrinking the typography into illegibility. */
@media (max-width:1240px){
  .mks-header__inner{
    grid-template-columns:minmax(96px,1fr) auto!important;
    gap:clamp(.5rem,1.4vw,1rem)!important;
  }
  .mks-nav{display:none!important}
  .mks-menu-toggle{display:inline-flex!important}
  .mks-tools{gap:.42rem!important;min-width:0}
  .mks-tools>.mks-langs,
  .mks-tools>.mks-theme-toggle{display:none!important}
  .mks-account-link span{
    display:block!important;
    max-width:78px!important;
    overflow:hidden!important;
    text-overflow:ellipsis!important;
    white-space:nowrap!important;
  }

  /* Responsive drawer exists across tablet + narrow-desktop, not only phone. */
  .mks-mobile{
    position:fixed!important;
    inset:0!important;
    z-index:990!important;
    display:grid!important;
    grid-template-rows:auto minmax(0,1fr) auto!important;
    align-content:start!important;
    padding:clamp(6.2rem,11vh,7.6rem) clamp(1.1rem,3vw,2.4rem) max(1.2rem,env(safe-area-inset-bottom))!important;
    overflow-x:hidden!important;
    overflow-y:auto!important;
    overscroll-behavior:contain!important;
    -webkit-overflow-scrolling:touch;
    background:#050b17!important;
    opacity:0;
    visibility:hidden;
    pointer-events:none;
    transition:opacity .24s ease,visibility .24s!important;
  }
  .mks-mobile::before{
    content:"";
    position:absolute;
    inset:0;
    background:linear-gradient(rgba(71,222,245,.055) 1px,transparent 1px),linear-gradient(90deg,rgba(71,222,245,.045) 1px,transparent 1px),radial-gradient(circle at 80% 12%,rgba(255,85,183,.11),transparent 30%);
    background-size:48px 48px,48px 48px,auto;
    pointer-events:none;
  }
  .mks-mobile>*{position:relative;z-index:1}
  .mks-menu-open .mks-mobile{opacity:1!important;visibility:visible!important;pointer-events:auto!important}

  .mks-mobile__utility{
    display:flex!important;
    flex-wrap:nowrap!important;
    align-items:center!important;
    justify-content:flex-start!important;
    gap:.5rem!important;
    width:max-content!important;
    max-width:100%!important;
    margin:0 0 1rem!important;
  }
  .mks-mobile__utility .mks-langs{
    display:flex!important;
    align-items:center!important;
    gap:.08rem!important;
    width:auto!important;
    min-width:0!important;
    min-height:38px!important;
    margin:0!important;
    padding:.18rem!important;
    border:1px solid rgba(198,211,235,.14)!important;
    background:rgba(7,18,37,.42)!important;
  }
  .mks-mobile__utility .mks-langs a{
    display:flex!important;
    align-items:center!important;
    justify-content:center!important;
    gap:.25rem!important;
    width:auto!important;
    min-width:0!important;
    min-height:30px!important;
    padding:.32rem .42rem!important;
    border:0!important;
    background:transparent!important;
  }
  .mks-mobile__utility .mks-langs a.is-current{background:rgba(210,174,103,.08)!important}
  .mks-mobile__utility .mks-theme-toggle{
    display:inline-flex!important;
    align-items:center!important;
    justify-content:center!important;
    gap:.38rem!important;
    width:auto!important;
    min-width:84px!important;
    min-height:38px!important;
    margin:0!important;
    padding:.42rem .5rem!important;
  }
  .mks-mobile__utility .mks-theme-toggle b{
    display:block!important;
    font:900 .49rem/1 Inter,system-ui,sans-serif!important;
    letter-spacing:.09em!important;
    white-space:nowrap!important;
  }

  .mks-mobile>nav:not(.mks-mobile__langs){
    display:grid!important;
    align-content:start!important;
    min-height:0!important;
    margin:0!important;
  }
  .mks-mobile>nav:not(.mks-mobile__langs) a{
    display:grid!important;
    grid-template-columns:34px minmax(0,1fr)!important;
    align-items:baseline!important;
    padding:clamp(.55rem,1.4vh,.8rem) 0!important;
    border-bottom:1px solid rgba(255,255,255,.1)!important;
    text-decoration:none!important;
  }
  .mks-mobile>nav:not(.mks-mobile__langs) small{font-size:.5rem!important}
  .mks-mobile>nav:not(.mks-mobile__langs) span{
    min-width:0!important;
    font-size:clamp(2rem,5.6vw,4rem)!important;
    line-height:.94!important;
    overflow-wrap:anywhere;
  }
  .mks-mobile footer{
    display:flex!important;
    flex-wrap:wrap!important;
    gap:.75rem 1.2rem!important;
    justify-content:space-between!important;
    margin-top:1rem!important;
    padding-top:1rem!important;
    border-top:1px solid var(--line)!important;
  }

  /* Compact menu control. */
  .mks-menu-toggle{
    position:relative!important;
    width:42px!important;
    height:38px!important;
    min-width:42px!important;
    padding:0!important;
    display:grid!important;
    place-items:center!important;
    gap:0!important;
    border:1px solid rgba(198,211,235,.14)!important;
  }
  .mks-menu-toggle span{
    position:absolute!important;
    width:1px!important;
    height:1px!important;
    overflow:hidden!important;
    clip:rect(0 0 0 0)!important;
    clip-path:inset(50%)!important;
    white-space:nowrap!important;
  }
  .mks-menu-toggle i{
    position:absolute!important;
    left:11px!important;
    width:18px!important;
    height:1px!important;
    transition:transform .2s ease,top .2s ease!important;
  }
  .mks-menu-toggle i:first-of-type{top:14px!important}
  .mks-menu-toggle i:last-of-type{top:22px!important}
  .mks-menu-open .mks-menu-toggle i:first-of-type{top:18px!important;transform:rotate(45deg)!important}
  .mks-menu-open .mks-menu-toggle i:last-of-type{top:18px!important;transform:rotate(-45deg)!important}
}

@media (max-width:900px){
  .mks-account-link span{display:none!important}
  .mks-header__inner{width:calc(100% - 24px)!important}
  .mks-mobile>nav:not(.mks-mobile__langs) span{font-size:clamp(1.85rem,7.5vw,3.1rem)!important}
}

@media (max-width:760px){
  .mks-mobile{
    padding:5.65rem 1rem max(1rem,env(safe-area-inset-bottom))!important;
  }
  .mks-mobile__utility{
    width:100%!important;
    max-width:100%!important;
  }
  .mks-mobile__utility .mks-langs,
  .mks-mobile__utility .mks-theme-toggle{
    flex:1 1 0!important;
    width:auto!important;
    min-width:0!important;
  }
  .mks-mobile__utility .mks-langs a{flex:1 1 0!important}
  .mks-mobile__utility .mks-theme-toggle{min-width:0!important}
  .mks-mobile>nav:not(.mks-mobile__langs) span{font-size:clamp(1.75rem,8.8vw,2.75rem)!important}

  .mks-account-page .mks-achievements__grid,
  .mks-achievements__grid{grid-template-columns:1fr!important}
  .mks-achievement{min-height:154px!important}
  .mks-achievement h3{font-size:1.05rem!important}
}

/* Light drawer parity. */
@media (max-width:1240px){
  html[data-mks-theme="light"] .mks-mobile{background:#f1ece3!important;color:#171b24!important}
  html[data-mks-theme="light"] .mks-mobile::before{
    background:linear-gradient(rgba(42,56,77,.065) 1px,transparent 1px),linear-gradient(90deg,rgba(42,56,77,.05) 1px,transparent 1px),radial-gradient(circle at 78% 10%,rgba(255,85,183,.10),transparent 28%),linear-gradient(180deg,rgba(255,255,255,.65),rgba(241,236,227,.94))!important;
    background-size:48px 48px,48px 48px,auto,auto!important;
  }
  html[data-mks-theme="light"] .mks-mobile>nav:not(.mks-mobile__langs) a{border-bottom-color:rgba(25,35,50,.1)!important}
  html[data-mks-theme="light"] .mks-mobile>nav:not(.mks-mobile__langs) span{color:#1b2230!important}
  html[data-mks-theme="light"] .mks-mobile__utility .mks-langs,
  html[data-mks-theme="light"] .mks-mobile__utility .mks-theme-toggle{background:rgba(255,255,255,.56)!important;border-color:rgba(40,55,76,.14)!important;color:#343a48!important}
}

@media (prefers-reduced-motion:reduce){
  .mks-gateway .mks-identity__content,
  .mks-gateway .mks-product-scene,
  .mks-gateway .mks-scene-product,
  .mks-mobile,
  .mks-menu-toggle i{transition:none!important;animation:none!important}
}

/* Logged-in storefront preview: the menu starts below WordPress's own bar. */
@media (max-width:1240px){
  body.admin-bar .mks-mobile{top:32px!important;bottom:0!important}
}
@media (max-width:782px){
  body.admin-bar .mks-mobile{top:46px!important}
}
@media (max-width:760px){
  .mks-gateway .mks-identity__content{width:min(86%,390px)!important}
}
