/* 
 * Header & Footer Styles - Herbal Nest Theme
 * assets/css/header-footer.css
 */

/* CSS Variables */
:root {
    --herbal-green: #047857;
    --herbal-light: #10b981;
    --herbal-brown: #92400e;
    --cream: #faf8f5;
    --warm-white: #fefefe;
    --transition: all 0.3s ease;
}

/* General Reset & Base Styles */
* {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    line-height: 1.6;
    color: #374151;
}

.font-serif {
    font-family: 'Playfair Display', serif;
}

/* Header Styles */
.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: var(--transition);
}

.top-bar {
    background: var(--herbal-green);
    color: white;
    padding: 0.5rem 0;
    font-size: 0.875rem;
}

.main-navigation {
    background: white;
    border-bottom: 1px solid #f3f4f6;
}

.nav-link {
    position: relative;
    color: #374151;
    font-weight: 500;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    text-decoration: none;
    padding: 0.5rem 0;
    transition: var(--transition);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 50%;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--herbal-green), var(--herbal-light));
    transition: var(--transition);
    transform: translateX(-50%);
}

.nav-link:hover::after,
.nav-link.current-menu-item::after {
    width: 100%;
}

.nav-link:hover,
.nav-link.current-menu-item {
    color: var(--herbal-green);
    transform: translateY(-1px);
}

/* Logo Styles */
.site-branding {
    flex-shrink: 0;
}

.logo-container {
    text-align: center;
    filter: drop-shadow(0 4px 12px rgba(4, 120, 87, 0.15));
}

.site-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--herbal-green);
    letter-spacing: 0.1em;
    margin: 0;
    text-decoration: none;
}

.site-description {
    color: var(--herbal-brown);
    font-size: 0.75rem;
    letter-spacing: 0.2em;
    font-weight: 300;
    text-transform: uppercase;
    margin: 0;
}

/* Action Icons */
.search-toggle,
.account-link,
.cart-link {
    color: #6b7280;
    padding: 0.5rem;
    transition: var(--transition);
    text-decoration: none;
}

.search-toggle:hover,
.account-link:hover,
.cart-link:hover {
    color: var(--herbal-green);
    transform: scale(1.1);
}

.cart-count {
    position: absolute;
    top: -4px;
    right: -4px;
    background: var(--herbal-green);
    color: white;
    font-size: 0.75rem;
    border-radius: 50%;
    width: 1.25rem;
    height: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: pulse 2s infinite;
}

/* Mobile Menu */
.mobile-menu-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 0.5rem;
    background: #f3f4f6;
    color: #6b7280;
    border: none;
    cursor: pointer;
    transition: var(--transition);
}

.mobile-menu-toggle:hover {
    background: #e5e7eb;
}

.mobile-menu {
    position: fixed;
    top: 0;
    right: 0;
    height: 100vh;
    width: 20rem;
    background: white;
    box-shadow: -10px 0 50px rgba(0, 0, 0, 0.2);
    z-index: 60;
    overflow-y: auto;
    transform: translateX(100%);
    transition: transform 0.3s ease;
}

.mobile-menu.active {
    transform: translateX(0);
}

.mobile-menu-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 50;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.mobile-menu-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.mobile-menu-close {
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    background: #f3f4f6;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
}

.mobile-menu-close:hover {
    background: #e5e7eb;
}

.mobile-nav a {
    display: block;
    color: #374151;
    font-weight: 500;
    font-size: 1.125rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid #f3f4f6;
    text-decoration: none;
    transition: var(--transition);
}

.mobile-nav a:hover {
    color: var(--herbal-green);
}

/* Search Modal */
.search-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    z-index: 60;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.search-modal.active {
    opacity: 1;
    pointer-events: auto;
}

.search-container {
    background: white;
    border-radius: 0.5rem;
    padding: 2rem;
    max-width: 32rem;
    width: 100%;
    margin: 0 1rem;
}

.search-close {
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    background: #f3f4f6;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
}

.search-close:hover {
    background: #e5e7eb;
}

/* Footer Styles */
.site-footer {
    background: linear-gradient(to bottom, #f9fafb, white);
    border-top: 1px solid #f3f4f6;
}

.newsletter-section {
    background: linear-gradient(to right, var(--herbal-green), #065f46);
    padding: 4rem 0;
}

.newsletter-icon svg {
    color: white;
    margin: 0 auto 1.5rem;
}

.newsletter-form {
    max-width: 28rem;
    margin: 0 auto;
}

.newsletter-form form {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

@media (min-width: 640px) {
    .newsletter-form form {
        flex-direction: row;
    }
}

.newsletter-form input[type="email"] {
    flex: 1;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    border: none;
    outline: none;
    color: #374151;
}

.newsletter-form input[type="email"]:focus {
    ring: 2px;
    ring-color: white;
}

.newsletter-form button {
    background: white;
    color: var(--herbal-green);
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.newsletter-form button:hover {
    background: #f3f4f6;
}

.footer-content {
    padding: 4rem 0;
}

.footer-brand h4 {
    font-family: 'Playfair Display', serif;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--herbal-green);
    letter-spacing: 0.1em;
    margin: 0 0 0.5rem 0;
}

.footer-links h4,
.footer-categories h4,
.footer-contact h4 {
    font-size: 1.125rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #d1fae5;
}

.footer-menu {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-menu li {
    margin-bottom: 0.75rem;
}

.footer-menu a {
    color: #6b7280;
    text-decoration: none;
    transition: var(--transition);
    display: flex;
    align-items: center;
}

.footer-menu a:hover {
    color: var(--herbal-green);
}

.footer-menu a i {
    color: #d1fae5;
    margin-right: 0.5rem;
    font-size: 0.75rem;
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-link {
    background: #f3f4f6;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6b7280;
    text-decoration: none;
    transition: var(--transition);
}

.social-link:hover {
    background: var(--herbal-green);
    color: white;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.contact-item {
    display: flex;
    align-items: flex-start;
}

.contact-item i {
    color: var(--herbal-green);
    margin-right: 0.75rem;
    margin-top: 0.25rem;
}

.contact-item a {
    color: #6b7280;
    text-decoration: none;
    transition: var(--transition);
}

.contact-item a:hover {
    color: var(--herbal-green);
}

.footer-bottom {
    background: #064e3b;
    color: #d1fae5;
    padding: 1.5rem 0;
}

.footer-legal {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1.5rem;
    font-size: 0.875rem;
}

.footer-legal a {
    color: #d1fae5;
    text-decoration: none;
    transition: var(--transition);
}

.footer-legal a:hover {
    color: white;
}

/* Back to Top Button */
#back-to-top {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    background: var(--herbal-green);
    color: white;
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 40;
    opacity: 0;
    transform: translateY(0.5rem);
    pointer-events: none;
    transition: var(--transition);
}

#back-to-top.active {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

#back-to-top:hover {
    background: #065f46;
    transform: translateY(-2px);
}

/* Animations */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fadeInUp {
    animation: fadeInUp 0.6s ease-out;
}

/* Responsive Design */
@media (max-width: 768px) {
    .top-bar {
        display: none !important;
    }
    
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    .site-title {
        font-size: 1.25rem;
    }
    
    .site-description {
        font-size: 0.625rem;
    }
    
    .footer-content {
        padding: 2rem 0;
    }
    
    .newsletter-section {
        padding: 2rem 0;
    }
    
    .footer-legal {
        flex-direction: column;
        gap: 0.5rem;
        text-align: center;
    }
}

@media (max-width: 640px) {
    .newsletter-form form {
        flex-direction: column;
    }
    
    .social-links {
        justify-content: center;
    }
}

/* Accessibility */
.skip-link {
    position: absolute;
    left: -9999px;
    top: auto;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.skip-link:focus {
    position: fixed;
    top: 0;
    left: 0;
    width: auto;
    height: auto;
    padding: 1rem;
    background: var(--herbal-green);
    color: white;
    text-decoration: none;
    z-index: 999999;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .nav-link::after {
        background: currentColor;
    }
    
    .social-link:hover {
        outline: 2px solid currentColor;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Print styles */
@media print {
    .site-header,
    .site-footer,
    #back-to-top,
    .mobile-menu,
    .search-modal {
        display: none !important;
    }
}

/* Container utility */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

@media (min-width: 640px) {
    .container {
        padding: 0 2rem;
    }
}

@media (min-width: 1024px) {
    .container {
        padding: 0 1rem;
    }
}

/* Utility classes */
.text-center { text-align: center; }
.flex { display: flex; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.space-x-4 > * + * { margin-left: 1rem; }
.space-x-6 > * + * { margin-left: 1.5rem; }
.space-x-8 > * + * { margin-left: 2rem; }
.space-y-3 > * + * { margin-top: 0.75rem; }
.space-y-4 > * + * { margin-top: 1rem; }
.space-y-6 > * + * { margin-top: 1.5rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mb-8 { margin-bottom: 2rem; }
.py-16 { padding: 4rem 0; }
.px-4 { padding: 0 1rem; }
.text-sm { font-size: 0.875rem; }
.text-lg { font-size: 1.125rem; }
.text-xl { font-size: 1.25rem; }
.text-2xl { font-size: 1.5rem; }
.text-3xl { font-size: 1.875rem; }
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }
.uppercase { text-transform: uppercase; }
.tracking-wide { letter-spacing: 0.025em; }
.tracking-wider { letter-spacing: 0.05em; }
.tracking-widest { letter-spacing: 0.1em; }
.rounded-lg { border-radius: 0.5rem; }
.rounded-full { border-radius: 9999px; }
.shadow-lg { box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05); }

/* Usunięcie marginesów i paddingów kontenera na stronach sklepu */
.woocommerce .container,
.page-template-shop .container {
    max-width: 100% !important;
    width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
}

/* Rozciągnięcie głównej zawartości */
.woocommerce .site-main,
.page-template-shop .site-main {
    width: 100%;
    max-width: 100%;
    padding: 0;
}

/* Jeśli chcesz zachować padding dla treści wewnętrznej */
.woocommerce .woocommerce-products-header,
.woocommerce .products,
.woocommerce .woocommerce-pagination {
    padding: 0 20px;
}

/* Menu kategorii sklepu */
.shop-categories-menu {
    background: #f9fafb;
    border-bottom: 1px solid #e5e7eb;
}

.shop-categories-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    overflow-x: auto;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE */
}

.shop-categories-nav ul::-webkit-scrollbar {
    display: none; /* Chrome, Safari */
}

.category-link {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.5rem 1rem;
    color: #6b7280;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.875rem;
    border-radius: 0.375rem;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.category-link:hover,
.category-link.active {
    color: var(--herbal-green);
    background: white;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.category-link .count {
    font-size: 0.75rem;
    color: #9ca3af;
    background: #f3f4f6;
    padding: 0.125rem 0.375rem;
    border-radius: 0.75rem;
}

.category-link.active .count {
    background: rgba(4, 120, 87, 0.1);
    color: var(--herbal-green);
}

/* Responsywność */
@media (max-width: 768px) {
    .shop-categories-nav ul {
        padding: 0.75rem 0;
    }
    
    .category-link {
        padding: 0.375rem 0.75rem;
        font-size: 0.8rem;
    }
}

/* Shop Categories Menu Styles */
.shop-categories-menu {
    background: #f9fafb;
    border-bottom: 1px solid #e5e7eb;
    position: sticky;
    top: 80px; /* dostosuj do wysokości głównego header */
    z-index: 40;
}

.shop-categories-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    overflow-x: auto;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE */
    scroll-behavior: smooth;
}

.shop-categories-nav ul::-webkit-scrollbar {
    display: none; /* Chrome, Safari */
}

.category-link {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.5rem 1rem;
    color: #6b7280;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.875rem;
    border-radius: 0.375rem;
    transition: all 0.2s ease;
    white-space: nowrap;
    border: 1px solid transparent;
}

.category-link:hover,
.category-link.active {
    color: var(--herbal-green, #047857);
    background: white;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    border-color: rgba(4, 120, 87, 0.1);
    transform: translateY(-1px);
}

.category-link .count {
    font-size: 0.75rem;
    color: #9ca3af;
    background: #f3f4f6;
    padding: 0.125rem 0.375rem;
    border-radius: 0.75rem;
    margin-left: 0.25rem;
    transition: all 0.2s ease;
}

.category-link.active .count {
    background: rgba(4, 120, 87, 0.1);
    color: var(--herbal-green, #047857);
}

.category-link i {
    font-size: 0.75rem;
    opacity: 0.8;
}

.category-link:hover i,
.category-link.active i {
    opacity: 1;
}

/* Scrollbar hide utility */
.scrollbar-hide {
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.scrollbar-hide::-webkit-scrollbar {
    display: none;
}

/* Search Modal Styles */
.search-modal {
    backdrop-filter: blur(4px);
}

.search-modal.active {
    opacity: 1;
    pointer-events: auto;
}

/* Mobile Menu Enhancements */
.mobile-menu.active {
    transform: translateX(0);
}

.mobile-menu-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

/* Full Width Shop Layout */
.woocommerce .container,
.page-template-shop .container {
    max-width: 100% !important;
    width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
}

.woocommerce .site-main,
.page-template-shop .site-main {
    width: 100%;
    max-width: 100%;
    padding: 0;
}

/* Preserve inner content padding */
.woocommerce .woocommerce-products-header,
.woocommerce .products,
.woocommerce .woocommerce-pagination,
.woocommerce .woocommerce-ordering,
.woocommerce .woocommerce-result-count {
    padding-left: 20px;
    padding-right: 20px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .shop-categories-menu {
        top: 70px; /* dostosuj dla mobile header */
    }
    
    .shop-categories-nav ul {
        padding: 0.75rem 0;
        gap: 1rem;
    }
    
    .category-link {
        padding: 0.375rem 0.75rem;
        font-size: 0.8rem;
    }
    
    .category-link .count {
        padding: 0.1rem 0.3rem;
        font-size: 0.7rem;
    }
    
    /* Full width on mobile */
    .woocommerce .woocommerce-products-header,
    .woocommerce .products,
    .woocommerce .woocommerce-pagination,
    .woocommerce .woocommerce-ordering,
    .woocommerce .woocommerce-result-count {
        padding-left: 15px;
        padding-right: 15px;
    }
}

/* Animation for cart count */
@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

.cart-count {
    animation: pulse 2s infinite;
}

/* Logo hover effect */
.logo-container:hover {
    transform: scale(1.05);
    transition: transform 0.3s ease;
}

.logo-container svg .leaves {
    transition: fill 0.3s ease;
}

.logo-container:hover svg .leaves {
    fill: var(--herbal-light, #10b981);
}