/* Smooth Scrolling + sticky header offset */
html {
    scroll-behavior: smooth;
    scroll-padding-top: 110px;
}

#products,
#rolunk,
#kapcsolat {
    scroll-margin-top: 110px;
}

/* Global Settings */
:root {
    --primary-color: #e50914;
    /* Example vibrant red for calls to action */
    --secondary-color: #ffffff;
    /* Pure white background */
    --text-color: #111111;
    /* Dark text for contrast */
    --glass-bg: rgba(255, 255, 255, 0.1);
    --glass-border: rgba(255, 255, 255, 0.2);
    --font-primary: 'Inter', sans-serif;
}

body {
    background-color: var(--secondary-color);
    color: var(--text-color);
    font-family: var(--font-primary);
    margin: 0;
    padding: 0;
    line-height: 1.6;
}

main {
    position: relative;
    /* Create positioning context for absolute children */
}

/* Content Container - limits max width and centers content */
.content-container {
    position: relative;
    max-width: 1400px;
    /* Maximum width for content */
    margin: 0 auto;
    /* Center the container */
    padding: 0 2rem;
    /* Side padding for smaller screens */
}


/* Header (Minimal for now, can expand later) */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    box-sizing: border-box;
    /* Ensure padding doesn't overflow width */
    padding: 0.5rem 2rem;
    z-index: 1000;
    display: flex;
    flex-wrap: nowrap;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    /* Optional: add subtle shadow for separation */
}

.logo img {
    height: 60px;
    /* Adjust based on logo aspect ratio */
    width: auto;
    display: block;
}

nav a {
    color: #000000;
    /* Black text for white header */
    text-decoration: none;
    margin-left: 2rem;
    font-weight: 500;
    transition: color 0.3s ease;
}

nav a:hover {
    color: #00FF00;
    /* Neon Green Hover */
}

.header-actions {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    gap: 1.75rem;
    margin-left: 1rem;
    flex-shrink: 0;
}

button.header-cart-btn,
.header-cart-btn {
    position: relative;
    display: inline-flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: auto;
    height: auto;
    min-width: 0;
    min-height: 0;
    margin: 0;
    padding: 0;
    border: 0 none;
    border-radius: 0;
    background: transparent;
    background-color: transparent;
    box-shadow: none;
    color: #222;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    outline: none;
    transition: color 0.2s ease;
}

button.header-cart-btn:hover,
button.header-cart-btn:focus,
.header-cart-btn:hover,
.header-cart-btn:focus {
    border: 0 none;
    background: transparent;
    background-color: transparent;
    box-shadow: none;
    color: #27ae60;
    outline: none;
}

.header-cart-btn .header-cart-badge,
#cart-count.header-cart-badge {
    position: static;
    top: auto;
    right: auto;
    display: inline;
    min-width: 0;
    height: auto;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    background-color: transparent;
    color: #27ae60;
    font-size: 0.95rem;
    font-weight: 800;
    line-height: 1;
    text-align: center;
}

.lang-selector {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 0.3rem;
    align-items: center;
    margin: 0;
    position: relative;
}

.lang-toggle {
    display: none;
}

.lang-menu {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 0.3rem;
    align-items: center;
}

.cart-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 1290;
}
.cart-backdrop.open {
    display: block;
}
.cart-backdrop[hidden] {
    display: none !important;
}

.cart-drawer {
    position: fixed;
    top: 50%;
    left: 50%;
    right: auto;
    width: min(420px, calc(100vw - 24px));
    max-height: min(90dvh, 720px);
    height: auto;
    background: #fff;
    z-index: 1300;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.2);
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translate(-50%, -46%) scale(0.96);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
}

.cart-drawer.open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translate(-50%, -50%) scale(1);
}
.cart-drawer-header { padding: 14px 16px; border-bottom: 1px solid #eee; display: flex; justify-content: space-between; align-items: center; flex-shrink: 0; }
.cart-close-btn { border: none; background: transparent; font-size: 24px; cursor: pointer; line-height: 1; }
.cart-items { flex: 1 1 auto; overflow-y: auto; padding: 14px 16px; min-height: 0; -webkit-overflow-scrolling: touch; }
.cart-footer { border-top: 1px solid #eee; padding: 12px 16px; flex-shrink: 0; box-sizing: border-box; width: 100%; max-width: 100%; }
.cart-footer-total {
    margin-bottom: 10px;
}
.cart-footer .btn-filter,
#btn-continue-order {
    display: block;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    margin-top: 0;
    text-align: center;
    text-decoration: none;
    padding: 12px 16px;
}

/* Language Selector */
.lang-btn {
    color: #888888;
    text-decoration: none;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.25rem 0.5rem;
    border-radius: 3px;
    transition: color 0.3s ease, background-color 0.3s ease;
    letter-spacing: 0.5px;
}

.lang-btn:hover {
    color: #333333;
}

.lang-btn.active {
    color: #ffffff;
    background-color: #00cc00;
}

/* Hero Section */
.hero-section {
    position: relative;
    /* height: 100vh; Removed to respect image aspect ratio */
    width: 100%;
    margin-top: 80px;
    overflow: visible;
    /* Allow panel to extend beyond section */
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-bg {
    width: 100%;
    height: auto;
    /* Natural height */
    display: block;
    filter: brightness(0.6);
}

.hero-content {
    position: absolute;
    top: 50%;
    right: 5%;
    /* Align to the right side */
    left: auto;
    /* Remove centering */
    transform: translateY(-50%);
    /* Only center vertically */
    text-align: right;
    z-index: 1;
    max-width: 800px;
    padding: 2rem;
    width: auto;
    /* Allow it to size based on content/max-width */
}

.hero-title {
    font-size: 3rem;
    /* Adjusted for longer text */
    font-weight: 800;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: -1px;
    color: #ffffff;
    /* Force white on hero image */
    text-shadow: 2px 2px 10px rgba(0, 0, 0, 0.8);
    /* Stronger shadow for readability */
    animation: fadeInDown 1s ease-out;
}

.hero-subtitle {
    font-size: 1.5rem;
    margin-bottom: 2rem;
    color: #f0f0f0;
    /* Force light grey on hero */
    text-shadow: 1px 1px 5px rgba(0, 0, 0, 0.8);
    animation: fadeInUp 1s ease-out 0.3s backwards;
}

.cta-button {
    display: inline-block;
    padding: 1rem 2.5rem;
    background-color: #00FF00;
    /* Neon Green */
    color: #000000;
    /* Black text for contrast */
    text-decoration: none;
    font-weight: 700;
    text-transform: uppercase;
    border-radius: 4px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    animation: fadeInUp 1s ease-out 0.6s backwards;
}

.cta-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(229, 9, 20, 0.4);
}

/* Animations */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Reusable Animation Classes for sections */
.animate-up {
    animation: fadeInUp 1s ease-out backwards;
}

.delay-1 {
    animation-delay: 0.2s;
}

.delay-2 {
    animation-delay: 0.4s;
}

.delay-3 {
    animation-delay: 0.6s;
}

.delay-4 {
    animation-delay: 0.8s;
}

/* Global Decorative Pixels */
.global-pixels {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.gpx {
    position: absolute;
    background-color: #00FF00;
    opacity: 0;
    animation: gpxFade var(--gpx-dur, 6s) ease-in-out var(--gpx-del, 0s) infinite;
}

/* Staggered timing for each global pixel */
.gpx:nth-child(1) {
    --gpx-dur: 7.0s;
    --gpx-del: 0.0s;
}

.gpx:nth-child(2) {
    --gpx-dur: 8.5s;
    --gpx-del: 2.0s;
}

.gpx:nth-child(3) {
    --gpx-dur: 6.0s;
    --gpx-del: 4.5s;
}

.gpx:nth-child(4) {
    --gpx-dur: 9.0s;
    --gpx-del: 1.2s;
}

.gpx:nth-child(5) {
    --gpx-dur: 7.5s;
    --gpx-del: 3.8s;
}

.gpx:nth-child(6) {
    --gpx-dur: 8.0s;
    --gpx-del: 5.5s;
}

.gpx:nth-child(7) {
    --gpx-dur: 6.5s;
    --gpx-del: 0.8s;
}

.gpx:nth-child(8) {
    --gpx-dur: 9.5s;
    --gpx-del: 3.0s;
}

.gpx:nth-child(9) {
    --gpx-dur: 7.2s;
    --gpx-del: 6.0s;
}

.gpx:nth-child(10) {
    --gpx-dur: 8.8s;
    --gpx-del: 1.5s;
}

.gpx:nth-child(11) {
    --gpx-dur: 6.8s;
    --gpx-del: 4.0s;
}

.gpx:nth-child(12) {
    --gpx-dur: 7.8s;
    --gpx-del: 2.5s;
}

.gpx:nth-child(13) {
    --gpx-dur: 9.2s;
    --gpx-del: 5.0s;
}

.gpx:nth-child(14) {
    --gpx-dur: 6.3s;
    --gpx-del: 0.5s;
}

.gpx:nth-child(15) {
    --gpx-dur: 8.2s;
    --gpx-del: 3.5s;
}

.gpx:nth-child(16) {
    --gpx-dur: 7.4s;
    --gpx-del: 6.5s;
}

.gpx:nth-child(17) {
    --gpx-dur: 9.0s;
    --gpx-del: 1.8s;
}

.gpx:nth-child(18) {
    --gpx-dur: 6.6s;
    --gpx-del: 4.8s;
}

@keyframes gpxFade {
    0% {
        opacity: 0;
    }

    25% {
        opacity: 0.4;
    }

    50% {
        opacity: 0.15;
    }

    75% {
        opacity: 0.35;
    }

    100% {
        opacity: 0;
    }
}


/* ===== Mobile nav / shell ===== */
.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 40px;
    height: 40px;
    margin-left: auto;
    margin-right: 0.5rem;
    padding: 8px;
    border: 0;
    background: transparent;
    cursor: pointer;
    flex-shrink: 0;
}
.nav-toggle-bar {
    display: block;
    width: 22px;
    height: 2px;
    background: #222;
    border-radius: 1px;
    transition: transform 0.2s ease, opacity 0.2s ease;
}
body.nav-open .nav-toggle-bar:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}
body.nav-open .nav-toggle-bar:nth-child(2) {
    opacity: 0;
}
body.nav-open .nav-toggle-bar:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}
.nav-backdrop {
    display: none;
}
.site-nav {
    display: flex;
    align-items: center;
}

@media (max-width: 768px) {
    :root {
        --header-offset: 60px;
    }
    header {
        padding: 0.45rem 1rem;
        gap: 0.35rem;
        background: rgba(255, 255, 255, 0.96);
    }
    .logo img {
        height: 44px;
    }
    .nav-toggle {
        display: inline-flex;
        order: 2;
    }
    .header-actions {
        order: 3;
        gap: 0.85rem;
        margin-left: 0;
    }
    .site-nav {
        display: none;
        position: fixed;
        top: var(--header-offset);
        left: 0;
        right: 0;
        z-index: 1100;
        flex-direction: column;
        align-items: stretch;
        background: #fff;
        border-bottom: 1px solid #eee;
        box-shadow: 0 8px 20px rgba(0,0,0,0.08);
        padding: 0.5rem 0;
    }
    body.nav-open header {
        z-index: 1200;
    }
    body.nav-open .site-nav {
        display: flex;
    }
    .site-nav a {
        margin: 0;
        padding: 0.9rem 1.25rem;
        border-bottom: 1px solid #f3f3f3;
        font-weight: 600;
        position: relative;
        z-index: 1;
    }
    .nav-backdrop {
        display: block;
        position: fixed;
        inset: 0;
        top: var(--header-offset);
        background: rgba(0,0,0,0.35);
        /* Must stay below header stacking context (nav lives inside header) */
        z-index: 990;
    }
    .nav-backdrop[hidden] {
        display: none !important;
    }
    .cart-drawer {
        width: calc(100vw - 20px);
        max-height: calc(100dvh - 24px);
        border-radius: 10px;
        overflow: hidden;
    }
    .cart-footer {
        padding: 12px;
    }
    .hero-section {
        margin-top: var(--header-offset);
        min-height: min(68vh, 460px);
        overflow: hidden;
        align-items: flex-end;
    }
    .hero-bg {
        position: absolute;
        inset: 0;
        width: 100%;
        height: 100%;
        object-fit: cover;
        object-position: center;
    }
    .shop-search-bar {
        top: var(--header-offset);
    }
    .hero-content {
        position: relative;
        top: auto;
        bottom: auto;
        right: auto;
        left: auto;
        max-width: none;
        width: 100%;
        padding: 1.1rem 1rem 1.25rem;
        text-align: center;
        transform: none;
        z-index: 5;
    }
    .hero-title {
        font-size: 1.25rem;
        line-height: 1.25;
        margin-bottom: 0.4rem;
    }
    .hero-subtitle {
        font-size: 0.9rem;
        margin-bottom: 0.85rem;
    }
    .cta-button {
        padding: 0.75rem 1.4rem;
        font-size: 0.85rem;
        position: relative;
        z-index: 6;
    }
    .lang-toggle {
        display: inline-flex;
        align-items: center;
        gap: 0.15rem;
        border: 0;
        outline: none;
        background: transparent;
        box-shadow: none;
        -webkit-appearance: none;
        appearance: none;
        color: #222;
        font-size: 0.75rem;
        font-weight: 700;
        letter-spacing: 0.4px;
        padding: 0.2rem 0.15rem;
        border-radius: 0;
        cursor: pointer;
        line-height: 1;
        min-width: 0;
        justify-content: center;
    }
    .lang-toggle:focus-visible {
        outline: 2px solid #00cc00;
        outline-offset: 2px;
    }
    .lang-toggle-caret {
        font-size: 0.65rem;
        opacity: 0.7;
    }
    .lang-menu {
        display: none;
        position: absolute;
        top: calc(100% + 6px);
        right: 0;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        min-width: 3rem;
        width: max-content;
        background: #fff;
        border: 1px solid #e5e5e5;
        border-radius: 6px;
        box-shadow: 0 8px 20px rgba(0,0,0,0.12);
        padding: 4px;
        z-index: 1300;
    }
    .lang-selector.is-open .lang-menu {
        display: flex;
    }
    .lang-menu .lang-btn {
        display: block;
        padding: 0.45rem 0.55rem;
        font-size: 0.72rem;
        text-align: center;
        border-radius: 4px;
        margin: 0;
    }
    .lang-menu .lang-btn.active {
        pointer-events: none;
    }
}
