.header-inner {
    position: relative;
}

/* Widok mobilny */
.mobile-header {
    display: none;
    justify-content: space-between;
    align-items: center;
    position: relative;
}

.menu-toggle {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--color-dark-green);
    cursor: pointer;
    padding: 5px;
}

.mobile-logo {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: auto;
}

.mobile-logo .header-logo {
    max-height: 40px;
}

.mobile-actions {
    display: flex;
    flex-direction: row;
    gap: 1rem;
    margin: 0;
    margin-left: auto;
}

.mobile-actions a i {
    color: var(--color-dark-green);
    font-size: 1.5rem;
}

/* Mobile menu */
.mobile-menu {
    position: fixed;
    top: 0;
    left: -280px;
    width: 280px;
    height: 100vh;
    background: #fff;
    z-index: 2001;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
    transition: left 0.3s ease;
    overflow-y: auto;
}

.mobile-menu.active {
    left: 0;
}

.mobile-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #eee;
}

.mobile-menu-header h2 {
    margin: 0;
    font-size: 1.5rem;
}

.mobile-menu-close {
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    color: #888;
}

.mobile-nav {
    display: flex;
    flex-direction: column;
    padding: 20px;
}

.mobile-nav a {
    padding: 15px 0;
    text-decoration: none;
    color: #333;
    font-weight: 500;
    border-bottom: 1px solid #eee;
    transition: color 0.3s;
}

.mobile-nav a:hover {
    color: #e0a89c;
}

/* Widok desktopowy */
.desktop-header {
    display: flex;
    width: 100%;
    justify-content: space-between;
    align-items: center;
}

/* Style dla wyszukiwarki - desktop */
.search-container {
    position: absolute;
    top: 50%;
    right: 120px;
    transform: translateY(-50%);
    width: 0;
    opacity: 0;
    pointer-events: none;
    transition: width .3s ease, opacity .2s ease;
    z-index: 900;
}

.search-container.active {
    width: 360px;
    opacity: 1;
    pointer-events: auto;
}

.search-form {
    display: flex;
    position: relative;
}

.search-input {
    width: 100%;
    padding: 10px 40px 10px 15px;
    border: 1px solid #ddd;
    border-radius: 30px;
    font-size: 1rem;
    outline: none;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.search-close {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.2rem;
    color: #888;
}

/* Style dla wyszukiwarki - mobile inline */
.mobile-search-expanded {
    flex: 1;
    max-width: 0;
    overflow: hidden;
    transition: max-width 0.3s ease;
    margin-left: auto;
    margin-right: 15px;
}

.mobile-search-expanded.active {
    max-width: 1000px;
    margin-right: 15px;
}

.mobile-search-form-inline {
    display: flex;
    align-items: center;
    gap: 15px;
    position: relative;
    justify-content: flex-end;
}

.mobile-search-input-inline {
    flex: 1;
    padding: 10px 30px 10px 15px;
    border: 1px solid #ddd;
    border-radius: 20px;
    font-size: 0.95rem;
    outline: none;
}

.mobile-search-input-inline:focus {
    border-color: #2d5a4a;
    box-shadow: 0 0 0 2px rgba(45, 90, 74, 0.1);
}

.search-close-inline {
    position: absolute;
    right: 5px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.2rem;
    color: #888;
    padding: 5px;
    display: flex;
    align-items: center;
}

/* Style dla sidebara */
.sidebar {
    position: fixed;
    top: 0;
    right: -400px;
    width: 400px;
    height: 100vh;
    background: #fff;
    z-index: 2000;
    box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
    transition: right 0.3s ease;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.sidebar.active {
    right: 0;
}

.sidebar-content {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.sidebar-header {
    padding: 20px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.sidebar-header h2 {
    font-size: 1.5rem;
    margin: 0;
}

.sidebar-close {
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    color: #888;
}

.sidebar-body {
    padding: 20px;
    flex-grow: 1;
}

.sidebar-footer {
    padding: 20px;
    border-top: 1px solid #eee;
}

/* Basket controls */
#cartSidebar .cart-item .btn {
    padding: 4px 8px;
    line-height: 1;
}

#cartSidebar .btn-checkout {
    display: block;
    width: 100%;
    text-align: center;
    background-color: var(--color-dark-green, #2e6b5f);
    color: #fff;
    border-radius: 6px;
    padding: 10px 14px;
    text-decoration: none;
    transition: opacity .2s ease;
}

#cartSidebar .btn-checkout.disabled {
    background-color: #ddd;
    color: #999;
    cursor: not-allowed;
    pointer-events: none;
}

.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    min-height: 300px;
}

.empty-icon {
    font-size: 4rem;
    color: #ddd;
    margin-bottom: 20px;
}

.empty-text {
    color: #888;
    font-size: 1.2rem;
    margin-bottom: 20px;
}

.cart-summary {
    margin-bottom: 20px;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
}

.summary-row.total {
    font-weight: bold;
    font-size: 1.2rem;
    border-top: 1px solid #eee;
    padding-top: 10px;
    margin-top: 10px;
}

/* Mobile fixes for cart sidebar footer */
@media (max-width: 768px) {
    .sidebar {
        padding-left: 16px;
        padding-right: 16px;
    }

    .sidebar-header {
        padding-left: 16px;
        padding-right: 16px;
    }

    .sidebar-body {
        padding-left: 16px;
        padding-right: 16px;
        padding-bottom: 0;
        flex: 1;
        overflow-y: auto;
    }

    .sidebar-footer {
        position: sticky;
        bottom: 0;
        background: #fff;
        z-index: 10;
        box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
        padding: 16px;
        margin: 0 -16px;
        border-top: 2px solid #eee;
    }

    #cartSidebar .sidebar-content {
        padding-bottom: 0;
    }

    #cartSidebar .btn-checkout {
        padding: 14px 20px;
        font-size: 16px;
        font-weight: 600;
    }

    #cartSidebar .d-flex {
        flex-direction: column;
        gap: 12px;
        margin-bottom: 12px;
    }

    #cartSidebar #headerPromoInput {
        width: 100%;
        max-width: 100%;
        padding: 12px 16px;
        font-size: 16px;
        border-radius: 8px;
    }

    #cartSidebar #headerApplyPromo {
        width: 100%;
        padding: 12px 20px;
        font-size: 16px;
    }

    .cart-items {
        max-height: 50vh;
        overflow-y: auto;
        padding-right: 8px;
    }
}

.btn-checkout.disabled {
    background-color: #ddd;
    cursor: not-allowed;
    pointer-events: none;
}

.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s;
}

.sidebar-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Responsive */
@media (max-width: 991px) {

    /* Przełączenie między desktopowym a mobilnym widokiem */
    .desktop-header {
        display: none;
    }

    .mobile-header {
        position: relative;
        display: flex;
        width: 100%;

    }

    /* Sidebar na całą szerokość */
    .sidebar {
        width: 100%;
        right: -100%;
    }

    /* Styl dla wyszukiwarki mobilnej */
    .search-container {
        display: none !important;
    }
}

@media (min-width: 992px) {

    .mobile-header,
    .mobile-search-container,
    .mobile-menu {
        display: none;
    }
}