/*
Theme Name: Astra Child
Description: Motyw potomny Astra z własnym headerem
Template: astra
Version: 1.0
*/

/* UKRYCIE ORYGINALNEGO HEADERA ASTRA */
.ast-masthead-custom-menu-items,
.ast-masthead,
.site-header,
#masthead {
    display: none !important;
}

/* WŁASNY HEADER - KOMPLETNE STYLE */
.custom-site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(15px);
    box-shadow: 0 2px 20px rgba(0,0,0,0.08);
    border-bottom: 1px solid rgba(102, 126, 234, 0.1);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    animation: slideInDown 0.6s ease-out;
}

.custom-site-header.scrolled {
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 4px 30px rgba(0,0,0,0.12);
    backdrop-filter: blur(20px);
}

/* Container headera */
.custom-header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 70px;
    gap: 20px;
}

/* Logo/Branding */
.custom-site-branding {
    flex-shrink: 0;
    margin-right: auto;
}

.custom-site-title {
    margin: 0;
    font-size: 1.8rem;
    font-weight: 700;
}

.custom-site-title a {
    background: linear-gradient(135deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-decoration: none;
    transition: all 0.3s ease;
}

.custom-site-title a:hover {
    background: linear-gradient(135deg, #764ba2, #667eea);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.custom-logo img {
    max-height: 50px;
    width: auto;
    transition: transform 0.3s ease;
}

.custom-logo img:hover {
    transform: scale(1.05);
}

/* Główna nawigacja */
.custom-main-navigation {
    display: flex;
    align-items: center;
    margin-left: 20px;
}

.custom-nav-menu {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 10px;
}

.custom-nav-menu li {
    position: relative;
}

.custom-nav-menu a {
    display: inline-block;
    padding: 12px 24px;
    border: 2px solid #667eea;
    background: transparent;
    color: #667eea !important;
    border-radius: 25px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.custom-nav-menu a::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: #667eea;
    transition: all 0.3s ease;
    z-index: -1;
}

.custom-nav-menu a:hover::before {
    left: 0;
}

.custom-nav-menu a:hover {
    color: white !important;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
}

/* Dropdown menu */
.custom-nav-menu .sub-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(15px);
    border-radius: 10px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
    padding: 10px 0;
    min-width: 200px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
    z-index: 1000;
}

.custom-nav-menu li:hover .sub-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.custom-nav-menu .sub-menu a {
    border: none;
    border-radius: 0;
    padding: 10px 20px;
    display: block;
    margin: 0;
}

.custom-nav-menu .sub-menu a:hover {
    background: #f8f9ff;
    transform: translateX(5px);
}

/* Koszyk WooCommerce */
.custom-cart-icon {
    position: relative;
    margin-left: 20px;
}

.cart-link {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    background: linear-gradient(45deg, #667eea, #3347aa);
    color: white !important;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.cart-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, #667eea, #3347aa);
    transition: all 0.3s ease;
    z-index: -1;
}

.cart-link:hover::before {
    left: 0;
}

.cart-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(238, 90, 36, 0.3);
}

.cart-icon {
    font-size: 1.2rem;
    margin-right: 8px;
}

.cart-count {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    min-width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 700;
}

/* Mobile menu toggle */
.custom-mobile-menu-toggle {
    display: none;
    flex-direction: column;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
    z-index: 10001;
}

.custom-mobile-menu-toggle span {
    width: 25px;
    height: 3px;
    background: #667eea;
    margin: 3px 0;
    transition: all 0.3s ease;
    border-radius: 2px;
}

.custom-mobile-menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.custom-mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.custom-mobile-menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

/* Mobile menu */
.custom-mobile-menu {
    position: fixed;
    top: 70px;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(15px);
    padding: 20px;
    transform: translateY(-100%);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 9998;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
}

.custom-mobile-menu.active {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
}

.custom-mobile-nav-menu {
    list-style: none;
    margin: 0;
    padding: 0;
}

.custom-mobile-nav-menu li {
    margin: 10px 0;
}

.custom-mobile-nav-menu a {
    display: block;
    padding: 15px 20px;
    color: #667eea !important;
    text-decoration: none;
    font-weight: 600;
    border-radius: 10px;
    transition: all 0.3s ease;
}

.custom-mobile-nav-menu a:hover {
    background: #f8f9ff;
    color: #764ba2 !important;
    transform: translateX(10px);
}

/* Kompensacja dla fixed header */
body {
    padding-top: 70px;
}

body.mobile-menu-open {
    overflow: hidden;
}

/* Animacje */
@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-100%);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* RESPONSIVE DESIGN */
@media (max-width: 1024px) {
    .custom-header-container {
        padding: 0 15px;
    }
    
    .custom-nav-menu {
        gap: 5px;
    }
    
    .custom-nav-menu a {
        padding: 10px 18px;
        font-size: 0.9rem;
    }
}

/* TABLET I TELEFON - KOSZYK NADAL WIDOCZNY */
@media (max-width: 768px) {
    .custom-main-navigation {
        display: none; /* Ukryj tylko menu nawigacyjne */
    }
    
    .custom-cart-icon {
        display: flex; /* KOSZYK ZOSTAJE WIDOCZNY */
        margin-left: 10px;
    }
    
    .custom-mobile-menu-toggle {
        display: flex;
    }
    
    .custom-header-container {
        min-height: 60px;
    }
    
    body {
        padding-top: 60px;
    }
    
    .custom-mobile-menu {
        top: 60px;
    }
    
    .custom-site-title {
        font-size: 1.5rem;
    }
}

/* MAŁE TELEFONY - DOSTOSOWANIA KOSZYKA */
@media (max-width: 480px) {
    .custom-header-container {
        padding: 0 10px;
        min-height: 55px;
    }
    
    body {
        padding-top: 55px;
    }
    
    .custom-mobile-menu {
        top: 55px;
        padding: 15px;
    }
    
    .custom-site-title {
        font-size: 1.3rem;
    }
    
    .custom-logo img {
        max-height: 40px;
    }
    
    /* Zmniejsz koszyk na małych ekranach */
    .cart-link {
        padding: 10px 15px;
        font-size: 0.9rem;
    }
    
    .cart-icon {
        font-size: 1rem;
        margin-right: 6px;
    }
    
    .cart-count {
        min-width: 20px;
        height: 20px;
        font-size: 0.7rem;
    }
    
    .custom-cart-icon {
        margin-left: 5px;
    }
}

/* Dodatkowe style dla WordPress */
.admin-bar .custom-site-header {
    top: 32px;
}

@media (max-width: 782px) {
    .admin-bar .custom-site-header {
        top: 46px;
    }
}

@media (max-width: 600px) {
    .admin-bar .custom-site-header {
        top: 0;
    }
}

/* Smooth scroll dla całej strony */
html {
    scroll-behavior: smooth;
}

/* Poprawka dla Gutenberg */
.wp-block {
    max-width: 100%;
}

/* Style dla różnych stanów linków */
.custom-nav-menu a:focus,
.cart-link:focus,
.custom-mobile-nav-menu a:focus {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}

/* Dodatkowe efekty hover */
.custom-nav-menu li:hover {
    transform: scale(1.02);
}

.custom-cart-icon:hover {
    transform: scale(1.05);
}

/* Loading animation */
.custom-site-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #667eea, #764ba2);
    transition: width 0.3s ease;
}

.custom-site-header.scrolled::after {
    width: 100%;
}