/* IzhHunter V106 — focused storefront fixes: selection, auth, mobile cards, how-to guide. */

/* Familiar readable text selection (browser-like light blue). */
html ::selection{background:#b9d8ff!important;color:#102019!important;text-shadow:none!important}
html ::-moz-selection{background:#b9d8ff!important;color:#102019!important;text-shadow:none!important}

/* Standalone-page login modal. The homepage keeps its existing SPA modal. */
#ihGlobalAuthModal{position:fixed;inset:0;z-index:12000;display:none;align-items:center;justify-content:center;padding:20px;background:rgba(9,20,14,.66);backdrop-filter:blur(8px);-webkit-backdrop-filter:blur(8px)}
#ihGlobalAuthModal.active{display:flex}
body.ih-global-auth-open{overflow:hidden!important}
#ihGlobalAuthModal .ih-global-auth-dialog{position:relative;width:min(440px,100%);max-height:min(760px,calc(100dvh - 32px));overflow:auto;border:1px solid #d9dfd9;border-radius:20px;background:#fff;box-shadow:0 30px 80px rgba(8,24,16,.28);padding:24px;font-family:"Golos Text",Arial,sans-serif;color:#18231c}
#ihGlobalAuthModal .ih-global-auth-close{position:absolute;right:14px;top:14px;width:38px;height:38px;border:1px solid #dfe5df;border-radius:11px;background:#fff;color:#1f3026;font-size:22px;line-height:1;cursor:pointer}
#ihGlobalAuthModal .ih-global-auth-brand{display:flex;align-items:center;gap:10px;padding-right:48px;margin-bottom:20px}
#ihGlobalAuthModal .ih-global-auth-brand img{width:48px;height:48px;object-fit:contain}
#ihGlobalAuthModal .ih-global-auth-brand strong{display:block;font-size:22px;font-weight:900;letter-spacing:-.03em}
#ihGlobalAuthModal .ih-global-auth-brand span{display:block;margin-top:3px;color:#728078;font-size:12px}
#ihGlobalAuthModal .ih-global-auth-tabs{display:grid;grid-template-columns:1fr 1fr;gap:6px;padding:5px;border-radius:13px;background:#f1f4f1;margin-bottom:18px}
#ihGlobalAuthModal .ih-global-auth-tab{min-height:40px;border:0;border-radius:9px;background:transparent;color:#5c6b61;font-weight:800;cursor:pointer}
#ihGlobalAuthModal .ih-global-auth-tab.active{background:#fff;color:#153d2d;box-shadow:0 2px 8px rgba(13,48,34,.08)}
#ihGlobalAuthModal .ih-global-auth-panel{display:none}
#ihGlobalAuthModal .ih-global-auth-panel.active{display:block}
#ihGlobalAuthModal h2{margin:0 0 5px;font-size:25px;line-height:1.12;letter-spacing:-.03em;color:#17251c}
#ihGlobalAuthModal .ih-global-auth-lead{margin:0 0 17px;color:#6b776f;font-size:13px;line-height:1.5}
#ihGlobalAuthModal .ih-global-auth-field{display:block;margin:0 0 12px;font-size:12px;font-weight:800;color:#324238}
#ihGlobalAuthModal .ih-global-auth-field input{width:100%;height:46px;margin-top:6px;padding:0 13px;border:1px solid #cfd8d1;border-radius:11px;background:#fff;color:#17231c;font:inherit;font-size:14px;outline:none}
#ihGlobalAuthModal .ih-global-auth-field input:focus{border-color:#377a5d;box-shadow:0 0 0 3px rgba(55,122,93,.14)}
#ihGlobalAuthModal .ih-global-auth-submit{width:100%;min-height:46px;margin-top:3px;border:0;border-radius:11px;background:#315b45;color:#fff;font-weight:900;cursor:pointer}
#ihGlobalAuthModal .ih-global-auth-submit:disabled{opacity:.65;cursor:wait}
#ihGlobalAuthModal .ih-global-auth-error{display:none;margin:0 0 12px;padding:10px 12px;border-radius:10px;background:#fff0ed;color:#9a3f35;font-size:12px;line-height:1.4}
#ihGlobalAuthModal .ih-global-auth-error.active{display:block}
#ihGlobalAuthModal .ih-global-auth-foot{display:flex;justify-content:center;margin-top:14px;font-size:12px}
#ihGlobalAuthModal .ih-global-auth-foot a{color:#315b45;font-weight:800;text-decoration:none}


#ihGlobalAuthModal .ih-global-auth-linkbtn,#ihGlobalAuthModal .ih-global-auth-back{border:0;background:transparent;color:#315b45;font:inherit;font-size:12px;font-weight:800;cursor:pointer;padding:5px;text-decoration:none}
#ihGlobalAuthModal .ih-global-auth-forgot{display:none;margin-top:16px;padding-top:16px;border-top:1px solid #e3e8e3}
#ihGlobalAuthModal .ih-global-auth-forgot.active{display:block}
#ihGlobalAuthModal .ih-global-auth-forgot h3{margin:0 0 5px;font-size:17px;color:#1d2b22}
#ihGlobalAuthModal .ih-global-auth-forgot p{margin:0 0 12px;color:#6b776f;font-size:12px;line-height:1.45}
#ihGlobalAuthModal .ih-global-auth-error.success{display:block;background:#edf7f0;color:#2f6649}

/* Main-page journal CTA: use a real image element instead of relying on a cached CSS background. */
body #section-news .home-journal-cta{position:relative!important;isolation:isolate!important;overflow:hidden!important;background:#123324!important}
body #section-news .home-journal-cta-bg{position:absolute!important;inset:0!important;z-index:0!important;width:100%!important;height:100%!important;object-fit:cover!important;object-position:center 54%!important;display:block!important}
body #section-news .home-journal-cta::after{content:""!important;position:absolute!important;inset:0!important;z-index:1!important;background:linear-gradient(90deg,rgba(9,28,18,.94),rgba(12,42,28,.69),rgba(10,26,18,.34))!important;pointer-events:none!important}
body #section-news .home-journal-cta>div,body #section-news .home-journal-cta>b{position:relative!important;z-index:2!important}

/* Keep guide images visible and neatly cropped when cached DB rows are restored. */
body.guides-page .guide-image,body.guide-article-page .related-img,body #section-news .home-guide-tile-image{background:#eef1ec!important;overflow:hidden!important}
body.guides-page .guide-image img,body.guide-article-page .related-img img,body #section-news .home-guide-tile-image img{display:block!important;width:100%!important;height:100%!important;object-fit:cover!important}

/* Out-of-stock card buttons: allow the full Russian label on narrow cards. */
body .ih-notify-stock-btn{height:auto!important;min-height:44px!important;padding:8px 9px!important;white-space:normal!important;overflow:visible!important}
body .ih-notify-stock-btn span{display:block!important;max-width:100%!important;white-space:normal!important;overflow-wrap:anywhere!important;text-align:center!important;line-height:1.12!important}
@media(max-width:640px){
  body .hl-product-card .ih-notify-stock-btn,body .hl45-category-card .ih-notify-stock-btn{min-height:46px!important;padding:7px 5px!important;font-size:10px!important;line-height:1.08!important;letter-spacing:-.01em!important}
  body.product-page .ih-product-notify{font-size:12px!important;line-height:1.15!important;white-space:normal!important}
}

/* Homepage hits: one horizontal swipe row on phones, with enough products to browse. */
@media(max-width:720px){
  body #section-news .popular-scroll.hl-hits-grid{display:flex!important;grid-template-columns:none!important;flex-wrap:nowrap!important;overflow-x:auto!important;overflow-y:hidden!important;scroll-snap-type:x mandatory!important;scroll-padding-left:2px!important;gap:10px!important;padding:3px 2px 12px!important;-webkit-overflow-scrolling:touch!important;overscroll-behavior-inline:contain!important;scrollbar-width:none!important}
  body #section-news .popular-scroll.hl-hits-grid::-webkit-scrollbar{display:none!important}
  body #section-news .popular-scroll.hl-hits-grid>.listing-card.hl-product-card{display:flex!important;flex:0 0 min(76vw,250px)!important;width:min(76vw,250px)!important;min-width:0!important;scroll-snap-align:start!important;scroll-snap-stop:normal!important}
}

/* HOW TO ORDER — clean editorial step-by-step layout. */
#section-howto .order-guide-content-v106{max-width:1260px;margin:0 auto;padding:26px 0 8px}
#section-howto .howto-overview-v106{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;margin:0 0 22px}
#section-howto .howto-overview-v106>div{display:flex;align-items:center;gap:10px;min-height:74px;padding:13px 14px;border:1px solid #dce2dc;border-radius:14px;background:#fff}
#section-howto .howto-overview-v106 b{display:grid;place-items:center;flex:0 0 34px;width:34px;height:34px;border-radius:50%;background:#edf3ee;color:#315b45;font-size:12px}
#section-howto .howto-overview-v106 span{font-size:12px;line-height:1.3;font-weight:800;color:#29372f}
#section-howto .howto-steps-v106{display:flex;flex-direction:column;gap:18px}
#section-howto .howto-step-v106{display:grid;grid-template-columns:minmax(270px,.72fr) minmax(0,1.28fr);align-items:center;gap:24px;padding:24px;border:1px solid #d9dfd9;border-radius:20px;background:#fff;box-shadow:0 12px 34px rgba(20,45,30,.055)}
#section-howto .howto-step-v106:nth-child(even) .howto-step-copy-v106{order:2}
#section-howto .howto-step-v106:nth-child(even) .howto-step-media-v106{order:1}
#section-howto .howto-step-copy-v106{min-width:0}
#section-howto .howto-step-num-v106{display:inline-flex;align-items:center;gap:8px;margin-bottom:10px;color:#6c7b71;font-size:11px;font-weight:900;letter-spacing:.08em;text-transform:uppercase}
#section-howto .howto-step-num-v106 b{display:grid;place-items:center;width:36px;height:36px;border-radius:50%;background:#315b45;color:#fff;font-size:12px;letter-spacing:0}
#section-howto .howto-step-copy-v106 h2{margin:0 0 9px!important;color:#18251d!important;font-size:clamp(24px,2.25vw,34px)!important;line-height:1.08!important;letter-spacing:-.035em!important}
#section-howto .howto-step-copy-v106 p{margin:0!important;color:#637068!important;font-size:14px!important;line-height:1.65!important}
#section-howto .howto-step-copy-v106 strong{color:#2d5a42}
#section-howto .howto-step-media-v106{margin:0!important;min-width:0;border:1px solid #dde2dd;border-radius:15px;overflow:hidden;background:#f4f6f3;box-shadow:0 8px 24px rgba(17,40,27,.06)}
#section-howto .howto-step-media-v106 img{display:block;width:100%;height:auto;max-height:520px;object-fit:contain;background:#f7f7f3}
#section-howto .howto-step-v106.is-final{grid-template-columns:1fr;background:linear-gradient(135deg,#143d2c,#255c43);border-color:#143d2c;color:#fff;text-align:center;padding:30px}
#section-howto .howto-step-v106.is-final .howto-step-copy-v106{max-width:720px;margin:0 auto}
#section-howto .howto-step-v106.is-final .howto-step-num-v106{justify-content:center;color:#d4e2d9}
#section-howto .howto-step-v106.is-final .howto-step-num-v106 b{background:#e8d6a6;color:#203229}
#section-howto .howto-step-v106.is-final h2{color:#fff!important}
#section-howto .howto-step-v106.is-final p{color:#e0ebe4!important}
#section-howto .howto-help-v106{display:flex;align-items:center;justify-content:space-between;gap:18px;margin-top:18px;padding:20px 22px;border:1px solid #dce2dc;border-radius:16px;background:#f8faf8}
#section-howto .howto-help-v106 h3{margin:0 0 5px;font-size:18px;color:#1d2e23}
#section-howto .howto-help-v106 p{margin:0;color:#6b786f;font-size:13px;line-height:1.5}
#section-howto .howto-help-v106 .info-action-buttons{flex:0 0 auto}
@media(max-width:900px){
  #section-howto .howto-overview-v106{grid-template-columns:repeat(2,minmax(0,1fr))}
  #section-howto .howto-step-v106{grid-template-columns:1fr;gap:16px;padding:18px}
  #section-howto .howto-step-v106:nth-child(even) .howto-step-copy-v106,#section-howto .howto-step-v106:nth-child(even) .howto-step-media-v106{order:initial}
  #section-howto .howto-step-media-v106{order:2!important}
  #section-howto .howto-step-copy-v106{order:1!important}
}
@media(max-width:560px){
  #section-howto .order-guide-content-v106{padding-top:18px}
  #section-howto .howto-overview-v106{grid-template-columns:1fr 1fr;gap:7px}
  #section-howto .howto-overview-v106>div{min-height:64px;padding:10px;gap:8px}
  #section-howto .howto-overview-v106 b{width:30px;height:30px;flex-basis:30px}
  #section-howto .howto-overview-v106 span{font-size:10.5px}
  #section-howto .howto-step-v106{border-radius:15px;padding:15px;gap:13px}
  #section-howto .howto-step-copy-v106 h2{font-size:23px!important}
  #section-howto .howto-step-copy-v106 p{font-size:13px!important;line-height:1.55!important}
  #section-howto .howto-step-media-v106{border-radius:11px}
  #section-howto .howto-step-v106.is-final{padding:23px 17px}
  #section-howto .howto-help-v106{align-items:flex-start;flex-direction:column;padding:17px}
  #section-howto .howto-help-v106 .info-action-buttons{width:100%}
  #section-howto .howto-help-v106 .info-action-buttons>*{width:100%}
}

/* IzhHunter V111 — conservative recovery fixes. No layout rewrites. */
/* Journal CTA always has a real background even before/without lazy <img> decoding. */
body #section-news .home-journal-cta-v111{
  background-color:#123324!important;
  background-image:linear-gradient(90deg,rgba(9,28,18,.90),rgba(12,42,28,.58),rgba(10,26,18,.22)),url('/uploads/hunterlive-mid-banner.webp?v=111')!important;
  background-size:cover!important;background-position:center 54%!important;background-repeat:no-repeat!important;
}
body #section-news .home-journal-cta-v111::after{background:linear-gradient(90deg,rgba(9,28,18,.55),rgba(12,42,28,.22),rgba(10,26,18,.10))!important}
body #section-news .home-journal-cta-v111 .home-journal-cta-bg{opacity:.78!important}

/* Stable guide cards: packaged thumbnails must fill the allocated media area. */
body.guides-page .guide-image,body.guide-article-page .related-img,body #section-news .home-guide-tile-image{overflow:hidden!important;background:#eef1ec!important}
body.guides-page .guide-image img,body.guide-article-page .related-img img,body #section-news .home-guide-tile-image img{display:block!important;width:100%!important;height:100%!important;object-fit:cover!important;object-position:center!important}

/* Full-bleed guide hero while keeping the original source image. */
html body.guide-article-page .ih-guide-hero-v85-bg{display:none!important}
html body.guide-article-page .ih-guide-hero-v85::after{background:transparent!important}
html body.guide-article-page .ih-guide-hero-v85 img{width:100%!important;height:100%!important;max-width:none!important;max-height:none!important;object-fit:cover!important;object-position:center!important;background:#eef1ec!important}

/* Final how-to copy stays readable on dark green. */
#section-howto .howto-step-v106.is-final .howto-step-copy-v106 strong{color:#fff!important}


/* V111 product guide: the picture is a real image layer, not a fragile CSS-only URL. */
body.product-page .v8-guide-card{isolation:isolate!important;}
body.product-page .v8-guide-card .v8-guide-bg{
  position:absolute!important; inset:0!important; width:100%!important; height:100%!important;
  object-fit:cover!important; object-position:center!important; z-index:-2!important; opacity:1!important;
  display:block!important; margin:0!important; padding:0!important; border:0!important;
}
body.product-page .v8-guide-card::before{z-index:-1!important;}
