/* MEMEZ home page redesign — 2026-05-17 */
/* Combined desktop + mobile @media. Variables match Phase 1 tokens. */

  :root{
    --bg:#100E0F; --bg-2:#080708; --card:#121011;
    --line:rgba(255,255,255,.05); --line-2:rgba(255,255,255,.09);
    --text:#fff; --dim:#A9A9A9; --dim-2:#6a6669;
    --accent:#FF204E; --accent-2:#AD1B39; --accent-soft:rgba(255,32,78,.10);
  }

  /* === Reset global conflicts when on home-v2 ===
     Existing /min/css_main_*.css declares:
       header{ height:800px; background:url(/images/header.webp); z-index:-1; padding:180px 60px; }
       body,html{ overflow-x:hidden; height:100vh; }
     These break the redesign layout — neutralize on home-v2 only. */
  html.home-v2-root,
  html.home-v2-root body.home-v2{
    height:auto !important; min-height:100vh;
    overflow-x:hidden;
  }
  body.home-v2 header{
    height:auto !important; padding:0 !important; background:none !important;
    z-index:auto !important; width:auto !important; position:static;
  }
  /* Hide Chatbro widget on the redesigned home — replaced by .v2-chat-fab */
  body.home-v2 iframe[src*="chatbro" i],
  body.home-v2 div[id*="chatbro" i],
  body.home-v2 div[class*="chatbro" i]{ display:none !important; }

  body.home-v2 *,
  body.home-v2 *::before,
  body.home-v2 *::after{ box-sizing:border-box; }
  body.home-v2{ margin:0; padding:0; background:#0a0809; color:var(--text); font-family:Inter,system-ui,sans-serif; -webkit-font-smoothing:antialiased; font-size:14px; line-height:1.5; }
  body.home-v2 a{ color:inherit; text-decoration:none; }
  body.home-v2 button{ font-family:inherit; cursor:pointer; }
  body.home-v2 img{ display:block; max-width:100%; }
  body.home-v2 .page{ width:1320px; max-width:calc(100% - 64px); margin:0 auto; }
  /* === Wide screens: расширяем .page (2K/27") ===
   * Должны быть здесь (не в v2_layout.css), потому что home_redesign.css грузится последним
   * и иначе перебивает правилом width:1320px выше. */
  @media (min-width:1500px){
    body.home-v2 .page{ width:1600px; }
  }
  @media (min-width:1900px){
    body.home-v2 .page{ width:1760px; }
  }
  body.home-v2 .ph{
    width:100%; height:100%;
    background:repeating-linear-gradient(135deg,#1a1819 0 12px,#161516 12px 24px);
    display:flex; align-items:center; justify-content:center;
    font-family:ui-monospace,monospace; font-size:11px;
    color:#5a5658; letter-spacing:1px; text-transform:uppercase; padding:14px; text-align:center;
  }
  body.home-v2 .btn-mem{
    appearance:none; border:none; color:#fff; font-weight:600; font-size:14px;
    padding:14px 22px; border-radius:12px;
    background:linear-gradient(180deg,var(--accent),var(--accent-2));
    box-shadow:0 8px 20px rgba(255,32,78,.30), inset 0 1px 0 rgba(255,255,255,.18);
    display:inline-flex; align-items:center; gap:10px;
  }
  body.home-v2 .pill{
    display:inline-flex; align-items:center; gap:6px;
    padding:5px 10px; border-radius:999px;
    font-size:11.5px; font-weight:500;
    border:1px solid var(--line-2);
    background:rgba(0,0,0,.55); color:var(--text);
  }
  body.home-v2 .pill .dot{ width:6px; height:6px; border-radius:50%; }
  body.home-v2 .pill.undetected{ border-color:rgba(44,198,107,.35); color:#7ee2a3; }
  body.home-v2 .pill.undetected .dot{ background:#2cc66b; box-shadow:0 0 8px #2cc66b; }
  body.home-v2 .pill.new{ border-color:rgba(255,32,78,.35); color:#ffb0c0; background:var(--accent-soft); }
  body.home-v2 .pill.new .dot{ background:var(--accent); }

  /* NOTE: topbar / mega / lang / drawer / chat-fab styles moved to /css/topbar_v2.css
   * — they're now global (loaded via includes/head.php on ALL pages, not just home). */

  body.home-v2 .v2-section{ padding:56px 40px 28px; }
  body.home-v2 .v2-sec-head{ display:flex; align-items:end; justify-content:space-between; gap:20px; margin-bottom:28px; }
  body.home-v2 .v2-sec-h{ font-size:30px; font-weight:700; margin:0; letter-spacing:-.8px; line-height:1.1; }
  body.home-v2 .v2-sec-sub{ color:var(--dim); font-size:14px; margin-top:6px; }
  body.home-v2 .v2-link-all{ color:var(--dim); font-size:13px; }
  body.home-v2 .v2-link-all:hover{ color:var(--accent); }

  /* HERO */
  body.home-v2 .v2-hero{
    position:relative; padding:72px 40px 72px;
    display:grid; grid-template-columns:1fr 620px; gap:40px; align-items:center;
    overflow:hidden;
    margin-left:calc(50% - 50vw); margin-right:calc(50% - 50vw);
    padding-left:max(40px, calc(50vw - 50%));
    padding-right:max(40px, calc(50vw - 50%));
  }
  body.home-v2 .v2-hero > *{ min-width:0; position:relative; z-index:2; }
  body.home-v2 .v2-hero-bg{ position:absolute; inset:0; z-index:0; overflow:hidden; pointer-events:none; }
  body.home-v2 .v2-hero-bg .media{
    position:absolute; inset:-20px;
    width:calc(100% + 40px); height:calc(100% + 40px);
    object-fit:cover;
    filter:blur(10px) saturate(.95) brightness(.65);
    transform:scale(1.05);
  }
  body.home-v2 .v2-hero-bg video.media{ background:#0a0809; }
  body.home-v2 .v2-hero-bg video.media:not(:has(source)){ display:none; }
  body.home-v2 .v2-hero-bg video.media:has(source) ~ .ph-fallback{ display:none; }
  /* Fallback-фон когда нет ни видео ни постера — мягкий градиент в цветах акцента */
  body.home-v2 .v2-hero-bg .v2-hero-fallback{
    background:
      radial-gradient(120% 80% at 30% 30%, rgba(255,32,78,.20), transparent 70%),
      radial-gradient(80% 60% at 80% 80%, rgba(173,27,57,.18), transparent 70%),
      linear-gradient(180deg, rgba(20,16,17,.5) 0%, #0a0809 100%);
  }
  /* IMG-постер позади video — виден пока видео грузится или если оно сломалось */
  body.home-v2 .v2-hero-bg .v2-hero-poster{ z-index:0; }
  body.home-v2 .v2-hero-bg video.media{ z-index:1; }
  body.home-v2 .v2-hero-bg::after{
    content:""; position:absolute; inset:0; z-index:1;
    background:
      radial-gradient(70% 90% at 25% 40%, rgba(16,14,15,.78), rgba(16,14,15,.48) 50%, rgba(16,14,15,.12) 80%),
      radial-gradient(closest-side at 80% 30%, rgba(255,32,78,.18), transparent 70%),
      linear-gradient(180deg, rgba(16,14,15,.35) 0%, rgba(16,14,15,.55) 55%, rgba(10,8,9,.92) 85%, #0a0809 100%);
  }
  /* Плавный fade с hero к body bg, чтобы убрать резкий перепад со следующей секцией */
  body.home-v2 .v2-hero::after{
    content:""; position:absolute; left:0; right:0; bottom:0; height:160px;
    z-index:3; pointer-events:none;
    background:linear-gradient(180deg, rgba(10,8,9,0) 0%, rgba(10,8,9,.6) 55%, #0a0809 100%);
  }
  body.home-v2 .v2-hero{ padding-bottom:120px; }
  body.home-v2 .v2-section:first-of-type{ padding-top:36px; }
  body.home-v2 .v2-hero h1{
    font-size:60px; font-weight:800; letter-spacing:-1.6px; line-height:1.05;
    margin:0 0 24px; color:var(--accent);
  }
  body.home-v2 .v2-hero .v2-sub{
    font-size:22px; color:var(--text); font-weight:700;
    margin:0 0 18px; letter-spacing:-.3px; line-height:1.3; max-width:560px;
  }
  body.home-v2 .v2-hero .v2-lead{
    color:var(--dim); font-size:15px; line-height:1.65; margin:0 0 30px; max-width:520px;
  }
  body.home-v2 .v2-hero-search{
    display:flex; align-items:center; gap:12px;
    background:#1b181a; border:1px solid var(--line-2);
    border-radius:14px; padding:14px 18px; max-width:380px;
    color:var(--dim); font-size:14px;
  }
  body.home-v2 .v2-hero-search svg{ flex:none; color:var(--dim); }
  body.home-v2 .v2-hero-search input{
    flex:1; background:transparent; border:none; outline:none;
    color:var(--text); font:inherit; font-family:Inter,sans-serif;
  }
  body.home-v2 .v2-hero-search input::placeholder{ color:var(--dim); }

  body.home-v2 .v2-hero-stage{ position:relative; height:520px; }
  body.home-v2 .v2-bubble{
    position:absolute; z-index:2;
    background:linear-gradient(180deg, rgba(40,15,22,.92), rgba(20,8,12,.92));
    border:1px solid rgba(255,32,78,.25);
    backdrop-filter:blur(8px);
    border-radius:18px; padding:14px 22px;
    font-size:17px; font-weight:600; color:var(--text); letter-spacing:-.2px;
    box-shadow:0 14px 30px rgba(0,0,0,.5), 0 0 30px rgba(255,32,78,.08);
    white-space:nowrap;
  }
  body.home-v2 .v2-bubble .hl{ color:var(--accent); font-weight:700; }
  body.home-v2 .v2-bubble.b1{ top:6%;   right:0;     }
  body.home-v2 .v2-bubble.b2{ top:30%;  right:-20px; }
  body.home-v2 .v2-bubble.b3{ top:54%;  right:-10px; }
  body.home-v2 .v2-bubble.b4{ top:78%;  right:-30px; }

  /* (chat-fab moved to topbar_v2.css) */

  /* Catalog tile */
  body.home-v2 .v2-gcard{
    position:relative; border-radius:14px; overflow:hidden;
    border:1px solid var(--line); cursor:pointer;
    transition:transform .15s, border-color .15s;
    background:var(--card);
    display:grid; grid-template-rows:1fr auto;
  }
  body.home-v2 .v2-gcard:hover{ transform:translateY(-2px); border-color:rgba(255,32,78,.35); }
  body.home-v2 .v2-gcard .art{ position:relative; aspect-ratio:16/10; overflow:hidden; }
  /* default (no image) — show color gradient + name watermark */
  body.home-v2 .v2-gcard .art .bg{ position:absolute; inset:0; background:linear-gradient(160deg, var(--c) 0%, #0a0809 100%); }
  body.home-v2 .v2-gcard .art .bg::after{
    content:""; position:absolute; inset:0;
    background:radial-gradient(120% 80% at 50% 100%, rgba(0,0,0,.55), transparent 60%),
               repeating-linear-gradient(135deg, rgba(255,255,255,.03) 0 8px, transparent 8px 16px);
  }
  body.home-v2 .v2-gcard .art .ic{
    position:absolute; top:50%; left:50%; transform:translate(-50%,-58%);
    font-size:32px; font-weight:800; letter-spacing:-1px;
    color:rgba(255,255,255,.18); text-transform:uppercase;
  }
  /* With real image — use it as background, keep dark overlay for text legibility */
  body.home-v2 .v2-gcard.has-img .art .bg{
    background-image: linear-gradient(180deg, rgba(0,0,0,.05) 0%, rgba(0,0,0,.55) 100%), var(--img);
    background-size: cover, cover;
    background-position: center, center;
    background-repeat: no-repeat, no-repeat;
  }
  body.home-v2 .v2-gcard.has-img .art .bg::after{
    background:radial-gradient(120% 80% at 50% 100%, rgba(0,0,0,.45), transparent 65%);
  }
  body.home-v2 .v2-gcard .body{
    padding:14px 16px 16px;
    display:flex; justify-content:space-between; align-items:flex-end; gap:14px;
  }
  body.home-v2 .v2-gcard .nm{ font-size:15px; font-weight:700; letter-spacing:-.2px; line-height:1.15; }
  body.home-v2 .v2-gcard .v2-row{ font-size:12px; color:var(--dim); margin-top:4px; }
  body.home-v2 .v2-gcard .price{ font-size:13px; font-weight:700; white-space:nowrap; }
  body.home-v2 .v2-gcard .price .from{ color:var(--dim); font-weight:500; font-size:11px; letter-spacing:.8px; text-transform:uppercase; }

  body.home-v2 .v2-pop-grid{ display:grid; grid-template-columns:repeat(3, 1fr); gap:14px; }
  body.home-v2 .v2-pop-grid .v2-gcard .art{ aspect-ratio:16/9; }
  body.home-v2 .v2-pop-grid .v2-gcard .nm{ font-size:18px; }

  body.home-v2 .v2-cat-grid{ display:grid; grid-template-columns:repeat(6, 1fr); gap:12px; }
  body.home-v2 .v2-cat-grid .v2-gcard .art{ aspect-ratio:1/1; }
  body.home-v2 .v2-cat-grid .v2-gcard .body{ padding:10px 12px 12px; flex-direction:column; align-items:flex-start; gap:2px; }
  body.home-v2 .v2-cat-grid .v2-gcard .row-bot{ width:100%; display:flex; justify-content:space-between; margin-top:6px; font-size:11px; color:var(--dim); }
  body.home-v2 .v2-cat-grid .v2-gcard .price{ font-size:11.5px; }

  /* Fresh cards */
  body.home-v2 .v2-fresh-grid{ display:grid; grid-template-columns:repeat(3, 1fr); gap:14px; }
  body.home-v2 .v2-fcard{
    background:var(--card); border:1px solid var(--line);
    border-radius:14px; overflow:hidden; cursor:pointer;
    transition:transform .15s, border-color .15s;
    display:flex; flex-direction:column;
  }
  body.home-v2 .v2-fcard:hover{ transform:translateY(-2px); border-color:rgba(255,32,78,.35); }
  body.home-v2 .v2-fcard .img{ aspect-ratio:16/9; position:relative; }
  body.home-v2 .v2-fcard .img .badges{ position:absolute; top:12px; left:12px; display:flex; gap:6px; }
  body.home-v2 .v2-fcard .img .os{
    position:absolute; right:12px; bottom:12px;
    display:inline-flex; align-items:center; gap:6px;
    padding:5px 10px; border-radius:8px;
    background:rgba(8,7,8,.7); backdrop-filter:blur(8px);
    border:1px solid var(--line-2);
    font-size:11px; font-weight:600; color:var(--text); letter-spacing:.2px;
  }
  body.home-v2 .v2-fcard .img .os svg{ color:#7ab8ff; }
  body.home-v2 .v2-fcard .img .os .v{ color:var(--dim); font-weight:500; }
  body.home-v2 .v2-fcard .body{ padding:16px 18px 18px; display:flex; flex-direction:column; gap:6px; flex:1; }
  body.home-v2 .v2-fcard .nm{ font-size:18px; font-weight:700; letter-spacing:-.3px; }
  body.home-v2 .v2-fcard .desc{ color:var(--dim); font-size:13px; line-height:1.5; flex:1; }
  body.home-v2 .v2-fcard .v2-row{ display:flex; justify-content:space-between; align-items:center; margin-top:6px; margin-left:0; margin-right:0; }
  body.home-v2 .v2-fcard .status{ font-size:11px; color:#7ee2a3; display:inline-flex; align-items:center; gap:5px; }
  body.home-v2 .v2-fcard .status .dot{ width:5px; height:5px; border-radius:50%; background:#2cc66b; box-shadow:0 0 6px #2cc66b; }
  body.home-v2 .v2-fcard .pr{ font-size:14px; font-weight:700; }
  body.home-v2 .v2-fcard .pr .from{ color:var(--dim); font-weight:500; font-size:11px; letter-spacing:.8px; text-transform:uppercase; margin-right:4px; }

  /* Video band */
  body.home-v2 .v2-video-band{
    margin:32px 40px; border-radius:18px; overflow:hidden;
    border:1px solid var(--line); background:var(--card);
    position:relative;
  }
  body.home-v2 .v2-video-band .frame{ aspect-ratio:21/9; position:relative; overflow:hidden; }
  body.home-v2 .v2-video-band .frame::before{
    content:""; position:absolute; inset:0; z-index:1;
    background:
      radial-gradient(60% 60% at 50% 50%, transparent, rgba(0,0,0,.55) 80%),
      linear-gradient(180deg, rgba(8,7,8,0) 50%, rgba(8,7,8,.85) 100%);
  }
  body.home-v2 .v2-video-band .play{
    position:absolute; left:50%; top:50%; transform:translate(-50%,-50%); z-index:2;
    width:88px; height:88px; border-radius:50%;
    background:linear-gradient(180deg,var(--accent),var(--accent-2));
    display:grid; place-items:center; cursor:pointer; border:none;
    box-shadow:0 20px 40px rgba(255,32,78,.45), 0 0 0 14px rgba(255,32,78,.15);
    transition:transform .15s;
  }
  body.home-v2 .v2-video-band .play:hover{ transform:translate(-50%,-50%) scale(1.06); }
  body.home-v2 .v2-video-band .play svg{ margin-left:5px; }
  body.home-v2 .v2-video-band .caption{
    position:absolute; left:40px; bottom:32px; z-index:2; max-width:60%;
  }
  body.home-v2 .v2-video-band .caption .eyebrow{
    font-size:11px; letter-spacing:1.6px; text-transform:uppercase;
    color:var(--accent); font-weight:700; margin-bottom:10px;
  }
  body.home-v2 .v2-video-band .caption h2{
    font-size:36px; font-weight:800; margin:0 0 8px; letter-spacing:-.8px;
  }
  body.home-v2 .v2-video-band .caption p{ color:var(--dim); font-size:14px; margin:0; }

  /* Reviews */
  body.home-v2 .v2-rev-grid{ display:grid; grid-template-columns:repeat(3, 1fr); gap:14px; }
  body.home-v2 .v2-rev{
    background:var(--card); border:1px solid var(--line);
    border-radius:14px; padding:20px;
  }
  body.home-v2 .v2-rev .rh{ display:flex; align-items:center; justify-content:space-between; margin-bottom:12px; }
  body.home-v2 .v2-rev .rh .who{ display:flex; align-items:center; gap:10px; }
  body.home-v2 .v2-rev .av{
    width:36px; height:36px; border-radius:50%;
    background:linear-gradient(135deg,var(--accent),var(--accent-2));
    display:grid; place-items:center; font-weight:700; font-size:13px;
  }
  body.home-v2 .v2-rev .nm{ font-size:13.5px; font-weight:600; text-transform:lowercase; }
  body.home-v2 .v2-rev .dt{ font-size:11.5px; color:var(--dim-2); }
  body.home-v2 .v2-rev .stars{ display:flex; gap:2px; color:var(--accent); }
  body.home-v2 .v2-rev .txt{ color:var(--dim); font-size:13.5px; line-height:1.55; }
  body.home-v2 .v2-rev .txt b{ color:var(--text); font-weight:500; }

  /* Articles */
  body.home-v2 .v2-art-grid{ display:grid; grid-template-columns:repeat(3, 1fr); gap:14px; }
  body.home-v2 .v2-acard{
    background:var(--card); border:1px solid var(--line);
    border-radius:14px; overflow:hidden; cursor:pointer;
    transition:border-color .15s, transform .15s;
    display:flex; flex-direction:column;
  }
  body.home-v2 .v2-acard:hover{ border-color:rgba(255,32,78,.35); transform:translateY(-2px); }
  body.home-v2 .v2-acard .img{ aspect-ratio:16/9; }
  body.home-v2 .v2-acard .img img{ width:100%; height:100%; object-fit:cover; }
  body.home-v2 .v2-acard .body{ padding:16px 18px 18px; display:flex; flex-direction:column; gap:8px; flex:1; }
  body.home-v2 .v2-acard .meta{ font-size:11px; color:var(--dim-2); letter-spacing:.4px; }
  body.home-v2 .v2-acard .t{ font-size:16px; font-weight:700; letter-spacing:-.2px; margin:0; line-height:1.25; }
  body.home-v2 .v2-acard .x{ color:var(--dim); font-size:12.5px; line-height:1.55; flex:1; }
  body.home-v2 .v2-acard .more{ font-size:12px; color:var(--accent); font-weight:600; margin-top:4px; }

  /* SEO */
  body.home-v2 .v2-seo{
    background:var(--card); border:1px solid var(--line);
    border-radius:18px; padding:40px; margin:40px;
    display:grid; grid-template-columns:1fr 1.4fr; gap:48px;
  }
  body.home-v2 .v2-seo h2{ margin:0; font-size:32px; font-weight:700; letter-spacing:-.7px; line-height:1.15; }
  body.home-v2 .v2-seo h2 .red{ color:var(--accent); }
  body.home-v2 .v2-seo p{ color:var(--dim); font-size:14px; line-height:1.7; margin:0 0 14px; }
  body.home-v2 .v2-seo p:last-child{ margin-bottom:0; }
  body.home-v2 .v2-seo p strong{ color:var(--text); font-weight:600; }
  body.home-v2 .v2-seo ul{ margin:0 0 14px; padding-left:20px; color:var(--dim); font-size:14px; line-height:1.7; }
  body.home-v2 .v2-seo a{ color:var(--accent); }

  /* Drawer / chat-fab styles also moved to /css/topbar_v2.css */

  /* Responsive */
  @media (max-width:1180px){
    body.home-v2 .v2-hero{ grid-template-columns:1fr; padding:48px 32px 36px; }
    body.home-v2 .v2-hero h1{ font-size:44px; }
    body.home-v2 .v2-hero-stage{ height:440px; }
    body.home-v2 .v2-pop-grid{ grid-template-columns:repeat(3,1fr); }
    body.home-v2 .v2-cat-grid{ grid-template-columns:repeat(4,1fr); }
    body.home-v2 .v2-fresh-grid, body.home-v2 .v2-rev-grid, body.home-v2 .v2-art-grid{ grid-template-columns:repeat(2,1fr); }
    body.home-v2 .v2-video-band .caption h2{ font-size:28px; }
    body.home-v2 .v2-seo{ grid-template-columns:1fr; gap:18px; padding:32px; }
  }
  @media (max-width:760px){
    /* Topbar mobile rules are in topbar_v2.css */
    body.home-v2 .v2-hero{ padding:32px 16px 24px; gap:20px; }
    body.home-v2 .v2-hero h1{ font-size:30px; }
    body.home-v2 .v2-hero .v2-sub{ font-size:15px; }
    body.home-v2 .v2-hero-stage{ height:300px; }
    body.home-v2 .v2-bubble{ font-size:13px; padding:10px 14px; }
    body.home-v2 .v2-bubble.b1{ right:auto; left:0; }
    body.home-v2 .v2-bubble.b2{ right:0; }
    body.home-v2 .v2-bubble.b3{ right:auto; left:0; }
    body.home-v2 .v2-bubble.b4{ right:0; }
    body.home-v2 .v2-pop-grid, body.home-v2 .v2-fresh-grid,
    body.home-v2 .v2-rev-grid, body.home-v2 .v2-art-grid{ grid-template-columns:1fr; }
    body.home-v2 .v2-cat-grid{ grid-template-columns:repeat(2,1fr); }
    body.home-v2 .v2-section{ padding:32px 16px 16px; }
    body.home-v2 .v2-video-band{ margin:20px 16px; }
    body.home-v2 .v2-video-band .frame{ aspect-ratio:16/9; }
    body.home-v2 .v2-video-band .caption{ left:20px; bottom:20px; max-width:90%; }
    body.home-v2 .v2-video-band .caption h2{ font-size:22px; }
    body.home-v2 .v2-video-band .play{ width:64px; height:64px; }
    body.home-v2 .v2-seo{ margin:20px 16px; padding:24px; }
    body.home-v2 .v2-seo h2{ font-size:22px; }
  }
