/* Klondaik Marketplace Stage 2 v0.8.1 — isolated styles */
.market-logo--main img,
.market-footer .market-logo img {
    width: 39px !important;
    height: 39px !important;
    max-width: 39px !important;
    max-height: 39px !important;
    object-fit: contain !important;
    flex: 0 0 39px;
}
.market-logo--main { display:flex; align-items:center; gap:9px; }
.hero-slider img { max-width:100%; height:auto; }

/* =========================================================
   Klondaik auth v0.7 — safe motion refinement
   Based on the last approved working layout.
   ========================================================= */
@media (min-width:1181px){
  /* Slogan: +15%, while retaining the approved line breaks. */
  .auth-v5__copy h1{
    font-size:clamp(35px,3.35vw,59px);
    line-height:1.09;
  }

  /* Scene: approximately +10%, shifted towards the auth panel.
     The image remains a single transparent PNG, so it cannot crop
     or duplicate its internal cards. */
  .auth-v5__scene{
    margin-left:-48px;
    margin-right:-48px;
    overflow:visible;
  }
  .auth-v5__scene img{
    width:127%;
    max-width:none;
    height:100%;
    object-fit:contain;
    object-position:center center;
    animation:authSceneBreathSafe 6.8s ease-in-out infinite;
    transform-origin:54% 70%;
    will-change:transform;
  }

  /* Taller panel so the security notice is always visible. */
  .auth-v5__panel{
    min-height:590px;
    height:min(74vh,690px);
    max-height:none;
    display:flex;
    flex-direction:column;
    overflow:hidden;
  }
  .auth-v5__panel .auth-pane.is-active{
    display:flex;
    flex-direction:column;
    min-height:0;
  }
  .auth-v5__panel .auth-pane[data-auth-pane="login"]{
    flex:1 1 auto;
  }
  .auth-v5__security{
    margin-top:auto;
    flex:0 0 auto;
  }
}

/* Laptop scene “breathes” only ±4 px. */
@keyframes authSceneBreathSafe{
  0%,100%{transform:translate3d(0,2px,0) rotate(-.10deg)}
  50%{transform:translate3d(0,-4px,0) rotate(.10deg)}
}

/* Subtle, infrequent light sweep on the primary button. */
.auth-submit{
  position:relative;
  isolation:isolate;
  overflow:hidden;
}
.auth-submit::before{
  content:"";
  position:absolute;
  z-index:-1;
  top:-75%;
  bottom:-75%;
  left:-45%;
  width:24%;
  pointer-events:none;
  background:linear-gradient(90deg,transparent,rgba(255,255,255,.30),transparent);
  transform:skewX(-18deg);
  animation:authButtonShimmerSafe 5.6s ease-in-out infinite;
}
@keyframes authButtonShimmerSafe{
  0%,68%{left:-45%;opacity:0}
  73%{opacity:1}
  90%{left:120%;opacity:.85}
  100%{left:120%;opacity:0}
}

/* Compact-height desktop adjustment: keep everything inside one screen. */
@media (max-height:820px) and (min-width:1181px){
  .auth-v5__copy h1{font-size:clamp(32px,3vw,50px)}
  .auth-v5__scene{margin-left:-44px;margin-right:-42px}
  .auth-v5__scene img{width:124%}
  .auth-v5__panel{
    min-height:545px;
    height:min(74vh,640px);
    padding-bottom:13px;
  }
  .auth-v5__security{padding:8px 11px;margin-top:auto}
  .auth-v5__security small{font-size:9px}
}

@media (prefers-reduced-motion:reduce){
  .auth-v5__scene img,.auth-submit::before{animation:none!important}
}

/* =========================================================
   Klondaik 2.0 — Marketplace UI Stage 2
   Home, categories, Ozon-like cards and catalog mega menu
   ========================================================= */
.market-body{background:#f7f7f5}.market-main{width:min(1420px,calc(100% - 40px));margin:0 auto}.market-main--home{padding:22px 0 66px}
.market-header{position:sticky;top:0;z-index:80;background:rgba(255,255,255,.96);border-bottom:1px solid #ececea;backdrop-filter:blur(20px)}
.market-header__main{width:min(1480px,calc(100% - 36px));margin:auto;min-height:78px;display:grid;grid-template-columns:auto auto minmax(280px,1fr) auto auto;align-items:center;gap:14px}
.market-logo--main{display:flex;align-items:center;gap:9px;text-decoration:none;white-space:nowrap}.market-logo--main img,.market-footer .market-logo img{width:39px;height:39px;object-fit:contain}.market-logo--main span{font-size:26px;font-weight:800;letter-spacing:.035em}
.catalog-button{height:48px;border:0;border-radius:15px;padding:0 21px;background:linear-gradient(135deg,#ff9b00,#f2b600);font:700 15px Montserrat;display:flex;align-items:center;gap:10px;cursor:pointer;box-shadow:0 10px 22px rgba(236,152,0,.18)}.catalog-button__icon{font-size:24px;line-height:1}.catalog-button.is-open .catalog-button__icon{transform:rotate(45deg)}
.global-search{height:48px;border:1px solid #e4e5e7;border-radius:15px;background:#fafafa;display:flex;align-items:center;gap:10px;padding:0 16px}.global-search span{font-size:24px}.global-search input{width:100%;border:0;background:transparent;outline:none;font:500 14px Montserrat}.city-button{height:48px;border:0;border-radius:15px;padding:0 16px;background:#f6f2ff;color:#5440d8;font-weight:700;white-space:nowrap}
.header-tools{display:flex;align-items:center;gap:12px}.header-tools>a:not(.publish-button){display:flex;flex-direction:column;align-items:center;text-decoration:none;min-width:55px;font-size:16px}.header-tools small{font-size:9px;color:#676b75}.publish-button{padding:14px 18px;border-radius:15px;background:#e92323;color:#fff;text-decoration:none;font-size:13px;font-weight:800;white-space:nowrap;box-shadow:0 10px 22px rgba(218,32,32,.17)}
.market-header__sub{width:min(1480px,calc(100% - 36px));margin:0 auto 13px;display:flex;gap:9px;align-items:center}.market-header__sub>a,.market-header__sub form button{border:1px solid #e3e3e3;background:#fff;border-radius:13px;padding:10px 15px;text-decoration:none;color:#30333b;font:600 12px Montserrat}.market-header__spacer{flex:1}

.catalog-mega{position:absolute;left:0;right:0;top:100%;background:#fff;border-top:1px solid #ececec;box-shadow:0 30px 60px rgba(24,24,31,.17);max-height:calc(100vh - 125px);overflow:auto}.catalog-mega__inner{width:min(1480px,calc(100% - 36px));margin:auto;display:grid;grid-template-columns:260px 1fr;min-height:600px}.catalog-mega__roots{padding:22px 14px 30px 0;border-right:1px solid #ececef;display:flex;flex-direction:column;gap:3px}.catalog-mega__roots button{border:0;background:transparent;border-radius:13px;padding:11px 13px;text-align:left;font:600 13px Montserrat;display:flex;align-items:center;gap:10px;cursor:pointer}.catalog-mega__roots button span{width:25px;font-size:18px}.catalog-mega__roots button.is-active{background:#fff3df;color:#cd7200}.catalog-mega__content{padding:27px 0 42px 32px}.catalog-mega__heading{display:flex;align-items:flex-end;justify-content:space-between;margin-bottom:23px}.catalog-mega__heading small,.section-kicker{display:block;font-size:10px;letter-spacing:.17em;color:#8b8d94;font-weight:800}.catalog-mega__heading h2{font-size:30px;margin:4px 0 0}.catalog-mega__heading a{font-size:12px;color:#483bd1}.catalog-mega__columns{display:grid;grid-template-columns:repeat(4,minmax(160px,1fr));gap:28px 38px}.mega-group{min-width:0}.mega-group__title{display:block;font-size:14px;font-weight:800;text-decoration:none;margin-bottom:9px}.mega-group__links{display:flex;flex-direction:column;gap:7px}.mega-group__links a{font-size:12px;color:#666b76;text-decoration:none}.mega-group__links a:hover{color:#e88700}.mega-group__links .is-extra{display:none}.mega-group.is-expanded .mega-group__links .is-extra{display:block}.mega-more{border:0;background:transparent;color:#4e59cf;padding:8px 0 0;font:600 11px Montserrat;cursor:pointer}.catalog-backdrop{position:fixed;z-index:70;inset:0;background:rgba(19,20,25,.27)}body.catalog-is-open{overflow:hidden}

.hero-slider--modern{position:relative;border-radius:30px;overflow:hidden;height:350px;box-shadow:0 24px 60px rgba(34,35,45,.09)}.hero-slider__track{display:flex;height:100%;transition:transform .65s cubic-bezier(.2,.8,.2,1)}.hero-slide{min-width:100%;height:100%;display:flex;align-items:center;justify-content:space-between;padding:46px 70px;position:relative;overflow:hidden}.hero-slide:after{content:"";position:absolute;width:520px;height:520px;border-radius:50%;right:-90px;top:-180px;background:rgba(255,255,255,.14)}.hero-slide--sunset{background:linear-gradient(118deg,#ffe7ae,#ffc43e 53%,#f29b00)}.hero-slide--violet{background:linear-gradient(118deg,#e6dbff,#9b7bf0 56%,#6845d0);color:#fff}.hero-slide--sky{background:linear-gradient(118deg,#dff4ff,#81c7e8 55%,#3d9bce)}.hero-slide__copy{position:relative;z-index:2;max-width:620px}.hero-slide__eyebrow{font-size:11px;letter-spacing:.16em;font-weight:800}.hero-slide h1{font-size:clamp(34px,4vw,57px);line-height:1.06;margin:12px 0 14px;letter-spacing:-.045em}.hero-slide p{max-width:520px;font-size:15px;line-height:1.6;margin:0 0 25px}.hero-slide__copy a{display:inline-block;padding:14px 22px;border-radius:13px;background:#15161b;color:#fff;text-decoration:none;font-weight:800;font-size:13px}.hero-slide__art{position:relative;z-index:2;width:390px;height:250px;display:grid;place-items:center;font-size:105px}.hero-slide__art span{position:absolute;filter:drop-shadow(0 16px 20px rgba(0,0,0,.14))}.hero-slide__art span:nth-child(1){font-size:110px}.hero-slide__art span:nth-child(2){font-size:76px;left:0;bottom:20px}.hero-slide__art span:nth-child(3){font-size:72px;right:5px;top:12px}.hero-slide__art span:nth-child(4){font-size:64px;right:30px;bottom:0}.slider-arrow{position:absolute;top:50%;z-index:4;width:42px;height:42px;border:0;border-radius:50%;background:rgba(255,255,255,.77);font-size:26px;cursor:pointer}.slider-arrow--prev{left:18px}.slider-arrow--next{right:18px}.slider-dots{position:absolute;z-index:4;left:50%;bottom:16px;display:flex;gap:6px;transform:translateX(-50%)}.slider-dots button{width:8px;height:8px;border:0;border-radius:20px;background:rgba(255,255,255,.65)}.slider-dots button.is-active{width:28px;background:#fff}

.section-title-row{display:flex;align-items:flex-end;justify-content:space-between;margin-bottom:20px}.section-title-row h2{font-size:30px;letter-spacing:-.035em;margin:5px 0 0}.section-title-row>a,.section-catalog-open{border:0;background:transparent;color:#4c40c7;text-decoration:none;font:700 12px Montserrat;cursor:pointer}.partners-section--modern,.category-showcase--tiles,.fresh-section--ozon{margin-top:46px}.carousel-controls{display:flex;gap:7px}.carousel-controls button{width:36px;height:36px;border:1px solid #ddd;border-radius:11px;background:#fff;font-size:20px}.partner-carousel{display:flex;overflow:auto;gap:12px;scrollbar-width:none;scroll-snap-type:x mandatory}.partner-carousel::-webkit-scrollbar{display:none}.partner-card{min-width:158px;height:154px;padding:14px;border:1px solid #e5e5e7;border-radius:20px;background:#fff;text-decoration:none;display:flex;flex-direction:column;align-items:center;text-align:center;scroll-snap-align:start}.partner-card>span{width:68px;height:68px;border-radius:20px;display:grid;place-items:center;color:#fff;font-size:22px;font-weight:800;margin-bottom:8px}.partner--green>span{background:#259548}.partner--orange>span{background:#f39200}.partner--black>span{background:#191a1e}.partner-card strong{font-size:11px}.partner-card small{font-size:9px;color:#858891;margin-top:5px;line-height:1.3}

.category-picture-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(208px,1fr));gap:10px}.category-picture-tile{height:100px;min-width:208px;position:relative;overflow:hidden;border:1px solid #e5e5e7;border-radius:17px;background:linear-gradient(135deg,#fff,#f1f2f4);text-decoration:none;isolation:isolate}.category-picture-tile:before{content:"";position:absolute;inset:0;background:linear-gradient(90deg,rgba(255,255,255,.92),rgba(255,255,255,.25));z-index:1}.category-picture-tile__title{position:absolute;z-index:3;left:14px;top:13px;width:52%;font-size:12px;font-weight:800;line-height:1.25}.category-picture-tile img{position:absolute;z-index:0;right:-3px;bottom:-5px;width:61%;height:98%;object-fit:contain;transition:transform .25s}.category-picture-tile:hover img{transform:scale(1.06) translateX(-2px)}.category-picture-tile__emoji{position:absolute;right:25px;bottom:16px;font-size:48px}

.product-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(205px,1fr));gap:18px}.product-card{min-width:0;background:#fff;border-radius:20px;overflow:hidden;text-decoration:none;border:1px solid #ededed;transition:transform .22s,box-shadow .22s}.product-card:hover{transform:translateY(-4px);box-shadow:0 18px 38px rgba(31,33,42,.10)}.product-card__media{position:relative;aspect-ratio:4/5;background:linear-gradient(145deg,#f3f0eb,#eceff4);display:grid;place-items:center;overflow:hidden}.product-card__media>img{width:100%;height:100%;object-fit:cover}.product-card__media>span{font-size:76px}.product-card__favorite{position:absolute;right:11px;top:11px;width:38px;height:38px;border:0;border-radius:50%;background:rgba(255,255,255,.9);font-size:25px;cursor:pointer}.product-card__badge{position:absolute;left:11px;bottom:10px;padding:5px 9px;border-radius:8px;background:#6f4ae8;color:#fff;font-size:9px;font-weight:800}.product-card__content{padding:12px 13px 15px}.product-card__price{display:block;font-size:20px;margin-bottom:7px}.product-card h3{font-size:13px;line-height:1.42;margin:0;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;min-height:37px}.product-card p{font-size:10px;color:#858891;margin:8px 0}.product-card__seller{font-size:9px;color:#2f8d4d}.product-grid--home{grid-template-columns:repeat(6,minmax(0,1fr))}

.market-footer--modern{width:min(1420px,calc(100% - 40px));margin:0 auto 30px;border-radius:24px;background:#1d1e23;color:#fff;padding:32px;display:flex;justify-content:space-between}.market-footer .market-logo{display:flex;align-items:center;gap:9px;text-decoration:none;font-weight:800}.market-footer p{font-size:11px;color:#aaaeb8}.market-footer nav{display:flex;gap:22px;align-items:center}.market-footer nav a{font-size:11px;color:#ddd;text-decoration:none}

.category-page,.catalog-page--modern{padding:30px 0 70px}.breadcrumbs{display:flex;gap:8px;align-items:center;color:#6a60cb;font-size:11px}.breadcrumbs a{text-decoration:none}.category-page__heading,.catalog-head--modern{display:flex;align-items:flex-end;justify-content:space-between;margin:15px 0 24px}.category-page__heading h1,.catalog-head--modern h1{font-size:35px;margin:5px 0 0}.category-page__count{color:#777b85;font-size:12px}.subcategory-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(208px,1fr));gap:10px}.subcategory-tile{height:100px;position:relative;overflow:hidden;border:1px solid #e3e4e6;border-radius:16px;background:#fff;text-decoration:none}.subcategory-tile>span{position:absolute;z-index:2;left:12px;top:11px;width:49%;font-size:11px;font-weight:800}.subcategory-tile img{position:absolute;right:-4px;bottom:-3px;width:62%;height:96%;object-fit:contain}.subcategory-tile>strong{position:absolute;right:25px;bottom:14px;font-size:45px}.subcategory-lists{display:grid;grid-template-columns:repeat(4,minmax(170px,1fr));gap:30px 45px;margin-top:31px}.subcategory-list{display:flex;flex-direction:column;gap:7px}.subcategory-list a{text-decoration:none;color:#676b76;font-size:11px}.subcategory-list>a:first-child{color:#1c1d22;margin-bottom:3px}.subcategory-list .is-extra{display:none}.subcategory-list.is-expanded .is-extra{display:block}.subcategory-list button{align-self:flex-start;border:0;background:transparent;color:#4d5cc6;padding:5px 0;font:600 10px Montserrat}.catalog-results{margin-top:35px}.catalog-toolbar{display:flex;justify-content:space-between;align-items:center;border-top:1px solid #e5e5e5;border-bottom:1px solid #e8e8e8;padding:14px 0;margin-bottom:22px}.catalog-filters{display:flex;gap:8px}.catalog-filters button,.catalog-toolbar select{border:1px solid #e2e2e4;border-radius:11px;background:#fff;padding:10px 13px;font:600 11px Montserrat;color:#555963}.empty-state{text-align:center;padding:90px 20px;color:#777b86}.empty-state>div{font-size:45px}.empty-state h3{color:#22252d}.catalog-search{display:flex;gap:8px}.catalog-search input,.catalog-search select{height:44px;border:1px solid #dedfe3;border-radius:12px;padding:0 13px;font:500 12px Montserrat}.catalog-search input{width:300px}.catalog-search button{border:0;border-radius:12px;padding:0 22px;background:#f49a00;font-weight:800}.pagination{margin-top:26px}

@media(max-width:1250px){.market-header__main{grid-template-columns:auto auto 1fr auto}.city-button{display:none}.header-tools>a:not(.publish-button){display:none}.product-grid--home{grid-template-columns:repeat(4,1fr)}.catalog-mega__columns{grid-template-columns:repeat(3,1fr)}}
@media(max-width:900px){.market-header__main{grid-template-columns:auto auto 1fr}.header-tools{display:none}.market-header__sub{overflow:auto}.hero-slider--modern{height:390px}.hero-slide{padding:38px}.hero-slide__art{width:260px}.product-grid--home{grid-template-columns:repeat(3,1fr)}.subcategory-lists{grid-template-columns:repeat(2,1fr)}.catalog-mega__inner{grid-template-columns:210px 1fr}.catalog-mega__columns{grid-template-columns:repeat(2,1fr)}}
@media(max-width:650px){.market-main{width:min(100% - 24px,1420px)}.market-header__main{width:calc(100% - 24px);grid-template-columns:auto auto}.global-search{grid-column:1/-1}.market-logo--main span{font-size:20px}.hero-slider--modern{height:470px}.hero-slide{padding:28px;align-items:flex-start}.hero-slide__art{position:absolute;right:10px;bottom:0;opacity:.45}.hero-slide h1{font-size:36px}.product-grid,.product-grid--home{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.category-picture-grid,.subcategory-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.category-picture-tile,.subcategory-tile{min-width:0}.catalog-mega__inner{display:block}.catalog-mega__roots{flex-direction:row;overflow:auto;border-right:0;border-bottom:1px solid #eee;padding:12px}.catalog-mega__roots button{white-space:nowrap}.catalog-mega__content{padding:20px}.catalog-mega__columns{grid-template-columns:1fr 1fr;gap:20px}.subcategory-lists{grid-template-columns:1fr 1fr}.catalog-search{width:100%;flex-wrap:wrap}.catalog-search input{width:100%}.catalog-toolbar{align-items:flex-start;gap:10px;flex-direction:column}.market-footer--modern{flex-direction:column;gap:20px}}
