/* kupujlajki.pl — style menu (przyciski-pille + platformy, hover na czystym CSS) */

:root{
  --pill-grad:linear-gradient(100deg,#6A45EA 0%,#5E6CF0 52%,#6C86F4 100%);
  --arrow:#8f8bff;
  --ink:#20254a;
  --muted:#7a7fa3;
  --active:#ecebfd;
  --white:#fff;
  --focus:#bcd2ff;
  --plat-h:60px;
  --radius:999px;
}
*{box-sizing:border-box;}
/*
html,body{margin:0;}
body{
  font-family:"Plus Jakarta Sans","Segoe UI",system-ui,-apple-system,sans-serif;
  min-height:100vh;color:#fff;
  background:
    radial-gradient(72% 120% at 6% -8%, rgba(123,48,205,.55), transparent 55%),
    radial-gradient(60% 100% at 100% 6%, rgba(40,120,235,.42), transparent 60%),
    linear-gradient(135deg,#2f2fb8 0%,#2a44cd 55%,#2b62db 100%);
  background-attachment:fixed;
}
*/
.wrap{max-width:1340px;margin:0 auto;padding:24px 22px 60px;position:relative;}

/* ============ GÓRNE MENU: logo + przyciski-pille (styl „Zobacz ofertę") ============ */
.topbar{display:flex;align-items:center;gap:16px;padding:2px;min-height:60px;flex-wrap:wrap;}
.logo{display:inline-flex;align-items:center;gap:4px;text-decoration:none;color:#fff;flex:0 0 auto;}
.logo-text{font-weight:800;font-size:25px;letter-spacing:.3px;}
.logo-thumb{margin-bottom:-3px;}
.actions{margin-left:auto;display:flex;align-items:center;gap:12px;flex-wrap:wrap;}
.pill-btn{
  display:inline-flex!important;align-items:center!important;justify-content:center!important;gap:6px;
  height:46px;padding:0 22px!important;border-radius:var(--radius);
  background:var(--pill-grad);color:#fff;text-decoration:none;border:0;cursor:pointer;
  font:inherit;font-size:15px;font-weight:700;line-height:1;
  box-shadow:0 8px 20px rgba(40,30,120,.35), inset 0 1px 0 rgba(255,255,255,.20);
  transition:transform .15s ease, filter .15s ease;
}
.pill-btn:hover{filter:brightness(1.07);transform:translateY(-1px);}
.pill-btn .caret{opacity:.95;margin-left:1px;}
.flag{width:25px;height:17px;border-radius:3px;overflow:hidden;display:inline-flex;flex-direction:column;
  box-shadow:0 0 0 1px rgba(255,255,255,.55);}
.flag-w{flex:1;background:#fff;}.flag-r{flex:1;background:#dc143c;}
.account-avatar{flex:0 0 auto;width:46px;height:46px;margin-left:2px;border-radius:13px;display:inline-flex;
  align-items:center;justify-content:center;text-decoration:none;
  background:radial-gradient(120% 120% at 30% 20%,#ffd36b 0%,#f0992f 38%,#7a3df0 100%);
  box-shadow:0 5px 14px rgba(28,18,90,.45), inset 0 0 0 1px rgba(255,255,255,.25);overflow:hidden;}
.account-avatar img{width:100%;height:100%;object-fit:cover;display:block;}

/* ============ DOLNE MENU: białe platformy ============ */
.platforms{
  margin-top:14px;min-height:var(--plat-h);border-radius:var(--radius);
  background:var(--white);
  /* box-shadow:0 16px 40px rgba(20,16,80,.30); */
  box-shadow:0 10px 10px rgba(20,16,80,.30);
  display:flex;align-items:center;justify-content:space-between;gap:2px;
  padding:8px 14px;position:relative;
}
.tab-wrap{position:relative;display:inline-flex;}
.tab{
  display:inline-flex;align-items:center;gap:8px;border:0;background:transparent;cursor:pointer;
  font:inherit;font-size:14px;font-weight:700;color:var(--ink);
  padding:9px 12px;border-radius:var(--radius);white-space:nowrap;transition:background .15s ease;
}
.tab .ic{width:21px;height:21px;flex:0 0 auto;}
.tab .chev{width:10px;height:6px;transition:transform .2s ease;opacity:.5;}
.tab-wrap:hover .tab,.tab-wrap:focus-within .tab{background:var(--active);color:#1d6ff0;}
.tab-wrap:hover .chev,.tab-wrap:focus-within .chev{transform:rotate(180deg);opacity:.9;}

/* dropdown (podkategorie) — czysty CSS hover, niezawodny dla każdej zakładki */
.dropdown{
  position:absolute;top:100%;left:0;margin-top:10px;
  min-width:300px;width:max-content;max-width:640px;background:#fff;border-radius:18px;padding:10px;
  box-shadow:0 24px 50px rgba(20,16,80,.34);
  opacity:0;visibility:hidden;transform:translateY(-6px);
  transition:opacity .16s ease, transform .16s ease, visibility .16s;
  z-index:50;
}
/* przezroczysty „mostek” zakrywający 10px szczeliny, by hover nie gubił się w drodze do listy */
.dropdown::before{content:"";position:absolute;left:0;right:0;top:-12px;height:14px;}
.tab-wrap:hover .dropdown,.tab-wrap:focus-within .dropdown{opacity:1;visibility:visible;transform:none;}
.tab-wrap.ralign .dropdown{left:auto;right:0;}
.di{display:flex;align-items:center;gap:13px;padding:12px 14px;border-radius:12px;
  color:var(--ink);text-decoration:none;font-size:15px;font-weight:600;}
.di:hover{background:#f3f3fb;}
.lbl{white-space:nowrap;}
.mk{width:30px;height:30px;border-radius:9px;background:#f1f0fd;display:inline-flex;
  align-items:center;justify-content:center;flex:0 0 auto;transition:background .15s ease;}
.mk svg{width:17px;height:17px;color:#7b6cf2;stroke:#7b6cf2;fill:none;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round;}
.di:hover .mk{background:#e7e3fd;}
.sub-i .mk{width:26px;height:26px;border-radius:8px;}
.sub-i .mk svg{width:15px;height:15px;}
.di .go{margin-left:auto;color:#c2c5da;}
.new{margin-left:auto;font-size:11px;font-weight:800;color:#fff;background:#1d6ff0;border-radius:999px;padding:2px 8px;white-space:nowrap;}

/* poziom 3 — pod-podmenu (flyout w bok), też czysty CSS hover */
.di-wrap{position:relative;display:block;}
.submenu{
  position:absolute;top:-10px;left:100%;margin-left:0;
  min-width:240px;width:max-content;max-width:640px;max-height:72vh;overflow-y:auto;
  background:#fff;border-radius:14px;padding:8px;
  box-shadow:0 24px 50px rgba(20,16,80,.34);
  opacity:0;visibility:hidden;transform:translateX(-6px);
  transition:opacity .15s ease, transform .15s ease, visibility .15s;
  z-index:60;
}
.di-wrap:hover>.submenu,.di-wrap:focus-within>.submenu{opacity:1;visibility:visible;transform:none;}
.di-wrap.flip>.submenu{left:auto;right:100%;margin-left:0;margin-right:0;transform:translateX(6px);}
.di-wrap.flip:hover>.submenu,.di-wrap.flip:focus-within>.submenu{transform:none;}
.sub-i{display:flex;align-items:center;gap:10px;padding:9px 12px;border-radius:9px;
  color:var(--ink);text-decoration:none;font-size:13.5px;font-weight:600;line-height:1.3;}
.sub-i:hover{background:#f3f3fb;}
.sub-i b{font-weight:800;}
.sub-i .amt{margin-left:auto;color:#8a73ff;font-weight:800;font-size:12.5px;}

/* ============ HERO + CTA ============ */
.hero{margin-top:54px;max-width:620px;}
.hero h1{font-size:46px;line-height:1.05;font-weight:800;margin:0 0 18px;}
.hero p{color:rgba(255,255,255,.82);font-size:17px;line-height:1.6;margin:0 0 30px;max-width:520px;}
.cta-row{display:flex;gap:16px;flex-wrap:wrap;}
.btn{display:inline-flex;align-items:center;gap:14px;border:0;cursor:pointer;text-decoration:none;
  font:inherit;font-weight:700;font-size:16px;color:#fff;padding:6px 6px 6px 26px;border-radius:var(--radius);}
.btn .arr{width:38px;height:38px;border-radius:50%;display:inline-flex;align-items:center;justify-content:center;}
.btn-primary{background:var(--pill-grad);box-shadow:0 12px 26px rgba(40,30,120,.45);}
.btn-primary .arr{background:var(--arrow);}
.btn-ghost{background:rgba(18,22,70,.42);box-shadow:inset 0 0 0 1px rgba(255,255,255,.22);}
.btn-ghost .arr{background:rgba(255,255,255,.16);}
.btn:hover{filter:brightness(1.06);transform:translateY(-1px);transition:.15s;}

a:focus-visible,button:focus-visible{outline:3px solid var(--focus);outline-offset:3px;border-radius:12px;}

/* ============ RESPONSYWNOŚĆ ============ */
@media (max-width:1040px){
  .platforms{flex-wrap:wrap;justify-content:center;border-radius:26px;gap:4px;}
  .dropdown{left:50%;transform:translate(-50%,-6px);}
  .tab-wrap:hover .dropdown,.tab-wrap:focus-within .dropdown{transform:translate(-50%,0);}
  .tab-wrap.ralign .dropdown{left:50%;right:auto;}
}
@media (max-width:880px){
  .actions{gap:8px;}
  .pill-btn{height:42px;padding:0 15px;font-size:14px;}
  .logo-text{font-size:22px;}
  .hero h1{font-size:34px;}
}
@media (prefers-reduced-motion:reduce){*{transition:none !important;}}
/* --- GTRANSLATE CUSTOM PILL INTEGRATION --- */
.custom-gt-wrap {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* Strip default backgrounds and borders from GTranslate */
.custom-gt-wrap select,
.custom-gt-wrap .gt_switcher {
    background: transparent !important;
    border: none !important;
    color: #fff !important;
    height: 46px !important;
    line-height: 46px !important;
    padding: 0 22px !important;
    font-family: inherit !important;
    font-size: 15px !important;
    font-weight: 700 !important;
    box-shadow: none !important;
    outline: none !important;
    cursor: pointer !important;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

/* Ensure the text inside the "Nice Dropdown" setting stays white */
.custom-gt-wrap .gt_switcher a {
    color: #fff !important;
    font-weight: 700 !important;
}

/* Fix dropdown arrow color if using the native select */
.custom-gt-wrap select option {
    background: #20254a !important; /* Dark background for the open dropdown options */
    color: #fff !important;
}

/* =========================================
   1. GTRANSLATE BUTTON ALIGNMENT FIX
   ========================================= */
.custom-gt-wrap .gt_switcher {
    display: flex !important;
    align-items: center !important;
    height: 100% !important;
}

.custom-gt-wrap .gt_switcher a,
.custom-gt-wrap .gt_switcher a.gt_selector {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important; /* Perfect space between flag and text */
    color: #fff !important;
    text-decoration: none !important;
    font-weight: 700 !important;
    font-size: 15px !important;
    font-family: inherit !important;
    padding: 0 !important;
    margin: 0 !important;
}

.custom-gt-wrap .gt_switcher img {
    margin: 0 !important;
    vertical-align: middle !important;
    border-radius: 2px !important; /* Sharpens the flag edges */
}

/* Hide the default GTranslate dropdown arrow if it duplicates your design */
.custom-gt-wrap .gt_switcher a span.gt-caret {
    display: none !important;
}

/* =========================================
   2. BOTTOM MENU PERFECT SPACING FIX
   ========================================= */
#platforms.platforms {
    display: flex !important;
    flex-wrap: wrap !important; /* <-- THIS FIXES THE OVERFLOW */
    justify-content: center !important; /* Keeps them centered if they wrap */
    align-items: center !important;
    width: 100% !important;
    padding: 10px 15px !important;
    gap: 8px 5px !important; /* 8px vertical gap (if wrapped), 14px horizontal */
}

/* Ensure the tab wrappers flex properly */
.tab-wrap {
    display: inline-flex !important;
    justify-content: center !important;
}
.tnl_container{max-width: 1400px!important;}

/* =========================================
   3. GTRANSLATE DROPDOWN & BLINKING FIX
   ========================================= */

/* 1. Force the wrapper to be the anchor point */
.custom-gt-wrap {
    position: relative !important;
    z-index: 99999 !important; /* Forces it above the white bottom menu */
}

/* 2. Lock the dropdown box exactly below the button */
.custom-gt-wrap .gt_switcher .gt_option {
    position: absolute !important;
    top: 100% !important; /* Pushes it exactly below the purple pill */
    left: 50% !important; 
    transform: translateX(-50%) !important; /* Centers it under the button */
    margin-top: 8px !important; /* Little gap between button and dropdown */
    z-index: 999999 !important;
    background: #fff !important; 
    border-radius: 12px !important;
    box-shadow: 0 16px 40px rgba(20, 16, 80, 0.30) !important;
    max-height: 400px !important;
    overflow-y: auto !important;
}

/* 3. Invisible bridge to stop the blinking hover loop */
.custom-gt-wrap .gt_switcher::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    height: 15px; /* Bridges the 8px gap above */
    background: transparent;
}

/* 4. Style the dropdown text so it's readable on the white background */
.custom-gt-wrap .gt_switcher .gt_option a {
    color: #20254a !important; 
    padding: 10px 15px !important;
}

.custom-gt-wrap .gt_switcher .gt_option a:hover {
    background: #f3f3fb !important;
}

/* =========================================
   GTRANSLATE POPUP BLINKING FIX (ISOLATED)
   ========================================= */

/* 1. Target the specific GTranslate wrapper (avoids .topbar and .actions) */
.custom-gt-wrap {
    position: relative !important;
    z-index: 2147483647 !important; /* Max browser z-index */
}

/* 2. Force the popup to the absolute top layer */
.gt_white_content.notranslate {
    z-index: 2147483647 !important;
    pointer-events: auto !important; /* Ensures it captures the mouse */
    box-shadow: 0 24px 50px rgba(20, 16, 80, 0.4) !important;
}

/* 3. Create the invisible bridge directly on the popup */
.gt_white_content.notranslate::before {
    content: "" !important;
    position: absolute !important;
    top: -40px !important; /* Reaches up past the empty gap to touch the button */
    left: 0 !important;
    right: 0 !important;
    height: 40px !important;
    background: transparent !important; 
    z-index: 2147483647 !important;
}


.gtranslate_wrapper {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px;
    height: 46px;
    padding: 0 15px !important;
    border-radius: var(--radius);
    background: var(--pill-grad);
    color: #fff;
    text-decoration: none;
    border: 0;
    cursor: pointer;
    font: inherit;
    font-size: 15px;
    font-weight: 700;
    line-height: 1;
    box-shadow: 0 8px 20px rgba(40, 30, 120, .35), inset 0 1px 0 rgba(255, 255, 255, .20);
    transition: transform .15s ease, filter .15s ease;
    position: relative;
    /* left: 483px; */
    left: 650px;
}
/* =========================================
   RESPONSYWNOŚĆ (MOBILE FIXES)
   ========================================= */
@media (max-width: 1040px) {
    /* 1. Ensure the white bar controls the boundaries */
    .platforms {
        position: relative !important;
        flex-wrap: wrap !important;
    }
    
    /* 2. Detach dropdowns from individual buttons so they don't fly off the screen */
    .tab-wrap {
        position: static !important; 
    }
    
    /* 3. Make dropdown fill the screen width perfectly */
    .dropdown {
        position: absolute !important;
        top: 100% !important; /* Starts exactly below the white bar */
        left: 10px !important;
        right: 10px !important;
        width: auto !important;
        max-width: none !important;
        transform: none !important; /* Kills the centering math */
        margin-top: 10px !important;
        max-height: 70vh !important; /* Allows scrolling if menu is huge */
        overflow-y: auto !important;
        box-shadow: 0 16px 40px rgba(20, 16, 80, 0.3) !important;
    }

    /* Prevent hover state from moving the fixed dropdown */
    .tab-wrap:hover .dropdown, 
    .tab-wrap:focus-within .dropdown {
        transform: none !important;
    }

    /* 4. Format the row to make room for the big toggle button */
    .di {
        position: relative !important;
        padding-right: 60px !important; /* Creates empty space on the right */
        display: flex !important;
        align-items: center !important;
    }

    /* 5. Create a massive, easy-to-tap toggle button area */
    .sub-toggle {
        position: absolute !important;
        right: 0 !important;
        top: 0 !important;
        bottom: 0 !important;
        width: 50px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        z-index: 20 !important;
        background: transparent;
        border-left: 1px solid rgba(0,0,0,0.06); /* Clean visual separator line */
    }

    .sub-toggle svg {
        color: #1d6ff0 !important; /* Vivid blue so it stands out */
        transition: transform 0.3s ease !important;
    }

    /* 6. Convert Fly-out to Static Accordion */
    .submenu {
        position: static !important;
        width: 100% !important;
        box-shadow: inset 0 2px 10px rgba(0,0,0,0.03) !important;
        background: #f8f8fb !important;
        border: 1px solid #eee !important;
        margin-top: 5px !important;
        display: none !important; /* Hidden by default */
        opacity: 1 !important;
        visibility: visible !important;
        transform: none !important;
    }

    /* Disable hover-reveal on mobile to prevent conflicts */
    .di-wrap:hover > .submenu, 
    .di-wrap:focus-within > .submenu {
        display: none !important;
    }

    /* 7. Open the accordion when JS adds the 'mobile-open' class */
    .di-wrap.mobile-open > .submenu {
        display: block !important;
    }

    /* Rotate arrow down when open */
    .di-wrap.mobile-open > .di > .sub-toggle svg {
        transform: rotate(90deg) !important;
    }
}

/* =========================================
   MOBILE ARROW STRETCHING FIX
   ========================================= */
@media (max-width: 1040px) {
    .sub-toggle {
        bottom: auto !important; /* Stops the button from stretching downward */
        height: 46px !important; /* Locks it to the exact height of the text row */
    }
}
/* =========================================
   DESKTOP ARROW ALIGNMENT FIX
   ========================================= */
@media (min-width: 1041px) {
    /* 1. Set the wrapper as the anchor point */
    .di-wrap {
        position: relative !important;
    }
    
    /* 2. Make sure the text row takes up full width but leaves room for the arrow */
    .di {
        width: 100% !important;
        padding-right: 35px !important; 
    }

    /* 3. Lock the arrow to the right edge and center it vertically */
    .sub-toggle {
        position: absolute !important;
        right: 15px !important;
        top: 50% !important;
        transform: translateY(-50%) !important; /* Perfectly centers it up/down */
        display: inline-flex !important;
        align-items: center !important;
        color: #c2c5da !important; /* Restores the light grey color */
        pointer-events: none !important; /* Allows clicking right through the arrow */
        margin: 0 !important;
        padding: 0 !important;
        height: auto !important;
    }
    
    /* 4. Restore the arrow hover color if the user hovers the row */
    .di-wrap:hover .sub-toggle {
        color: #8a73ff !important;
    }
}
