/* COMPLETE ANTI-FOUC PROTECTION - CRITICAL CSS */
@media (max-width: 990px) {
    /* Natychmiast ukryj desktop elementy */
    .main-header {
        display: none !important;
        visibility: hidden !important;
    }
    
    /* Natychmiast ukryj sidebar ale pozwól JavaScript działać */
    .sidebar:not(.open):not(.js-loaded) {
        transform: translateX(-100%) !important;
        visibility: hidden !important;
        opacity: 0 !important;
    }
    
    /* Ensure sidebar.open works even before js-loaded */
    .sidebar.open {
        transform: translateX(0) !important;
        visibility: visible !important;
        opacity: 1 !important;
    }
    
    /* Natychmiast ukryj mobile search bar ale pozwól JavaScript działać */
    .mobile-search-bar:not(.active):not(.js-loaded) {
        transform: translateY(-100%) !important;
        visibility: hidden !important;
        opacity: 0 !important;
    }
    
    /* Ensure mobile search bar active works even before js-loaded */
    .mobile-search-bar.active {
        transform: translateY(0) !important;
        visibility: visible !important;
        opacity: 1 !important;
    }
    
    /* Mobile header zawsze widoczny */
    .mobile-header {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
    }
    
    /* Natychmiastowe style dla ikon mobile header */
    .mobile-cart, .mobile-search-toggle {
        color: #ffffff !important;
        background: transparent !important;
        border: 1px solid rgba(255,255,255,0.2) !important;
    }
    
    .hamburger-menu span {
        background: #ffffff !important;
    }

    .header-category-nav {
        display: none !important;
    }
    
    /* Zapobiegaj miganiu przycisków */
    .mobile-cart i, .mobile-search-toggle i {
        color: #ffffff !important;
    }
    
    /* Disable transitions initially, re-enable with js-loaded class */
    .sidebar:not(.js-loaded) {
        transition: none !important;
    }
    
    .mobile-search-bar:not(.js-loaded) {
        transition: none !important;
    }
    
    .hamburger-menu:not(.js-loaded) span {
        transition: none !important;
    }
    
    .mobile-cart:not(.js-loaded), .mobile-search-toggle:not(.js-loaded) {
        transition: none !important;
    }
}

@media (min-width: 991px) {
    .mobile-header {
        display: none !important;
        visibility: hidden !important;
        opacity: 0 !important;
    }
    
    .main-header {
        display: flex !important;
        position: fixed !important;
        top: 0 !important;
        left: var(--sidebar-width) !important;
        right: 0 !important;
        z-index: 1000 !important;
        background: white !important;
        border-bottom: 1px solid #e5e7eb !important;
        box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1) !important;
        width: calc(100% - var(--sidebar-width)) !important;
        height: var(--header-height) !important;
        padding: 0 20px !important;
        align-items: center !important;
        justify-content: space-between !important;
        overflow: visible !important;
    }

    .header-category-nav {
        display: none !important;
    }

    .main-content.has-category-nav {
        padding-top: var(--header-height) !important;
    }
}

/* Base B2B - Style główne */
:root {
    --header-height: 80px;
    --mobile-header-height: 56px;
    --sidebar-width: 250px;
    --cat-nav-height: 48px;
    --sidebar-bg-color: #2d3436;
    --sidebar-text-color: #ffffff;
    --blue-accent: #4287F3;
    --sidebar-bg: #2d3436;
    --primary-color: #2F7DFF;
    --white: #ffffff;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-900: #1f2937;
    --gray-700: #6c757d;
}

/* Brand Typography */
html {
    overflow-x: hidden !important;
    max-width: 100% !important;
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    background-color: #f8f9fa;
    font-family: 'Be Vietnam Pro', sans-serif;
    font-weight: 400;
    line-height: 1.6;
    overflow-x: hidden !important;
    max-width: 100% !important;
    box-sizing: border-box;
}

* {
    box-sizing: border-box !important;
}

*:not(script):not(style) {
    max-width: 100% !important;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Be Vietnam Pro', sans-serif;
    font-weight: 700;
}

.btn, .form-control, .form-select {
    font-family: 'Mulish', sans-serif;
    font-weight: 500;
}

/* Custom button hover styles */
.btn:hover {
    background-color: #0C0212 !important;
    color: #2F7DFF !important;
    border-color: #0C0212 !important;
}

.product-name, .variant-name {
    font-family: 'Be Vietnam Pro', sans-serif;
    font-weight: 600;
}

/* UPEWNIJ SIĘ ŻE WSZYSTKIE CENY SĄ POGRUBIONE - GŁÓWNA REGUŁA */
.price-badge, .price-badge-with-variants, .stock-badge {
    font-family: 'Mulish', sans-serif;
    font-weight: 600 !important;
}

small, .text-muted {
    font-family: 'Mulish', sans-serif;
    font-weight: 400;
}

/* Sidebar */
.sidebar {
    width: var(--sidebar-width);
    height: 100vh;
    background-color: var(--sidebar-bg-color);
    color: var(--sidebar-text-color);
    position: fixed;
    top: 0;
    left: 0;
    transition: transform 0.3s ease;
    z-index: 1000;
    overflow-y: hidden;
    overflow-x: hidden; /* Zapobiega poziomemu scrollowi w sidebar */
    border-right: none !important; /* Usuwa białą linię z prawej strony */
    transform: translateX(0) !important; /* Na desktop zawsze widoczny */
    display: flex;
    flex-direction: column;
}

/* Przywróć transitions po załadowaniu JavaScript */
@media (max-width: 990px) {
    .sidebar.js-loaded {
        transition: opacity 0.3s ease, transform 0.3s ease !important;
        visibility: visible !important;
    }
    
    .sidebar.mobile-ready {
        opacity: 1;
    }
    
    .mobile-search-bar.js-loaded {
        transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1) !important;
        visibility: visible !important;
        opacity: 1 !important;
    }
    
    .mobile-cart.js-loaded, .mobile-search-toggle.js-loaded {
        transition: all 0.2s ease !important;
    }
    
    .hamburger-menu.js-loaded span {
        transition: all 0.3s ease !important;
    }
}

@media (min-width: 991px) {
    .sidebar {
        transform: none !important;
    }
}

.sidebar-header {
    padding: 20px 20px 20px 20px; /* Poprawione marginesy logo na PC */
    margin-bottom: 20px;
    flex-shrink: 0;
}

.sidebar-body {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
}

.sidebar-logo {
    font-size: 24px;
    font-weight: 600;
    color: #1f2937;
    display: flex;
    align-items: center;
    gap: 8px;
}


.sidebar-section-title {
    font-size: 11px;
    font-weight: 600;
    color: #9ba3ad;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 0 20px;
    margin-bottom: 8px;
}

/* Margines dla sekcji "Moje konto" */
.sidebar-account-section {
    margin-top: 10px;
    padding-top: 15px;
    border-top: 1px solid rgba(155, 163, 173, 0.1);
}



.sidebar-menu {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-menu-item {
    margin: 2px 0;
}

.sidebar-menu-link {
    display: flex;
    align-items: center;
    padding: 8px 20px;
    color: #9ba3ad;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    border-radius: 6px;
    margin: 0 12px;
    transition: all 0.2s ease;
}

.sidebar-menu-link:hover,
.sidebar-menu-link:focus {
    background: #f3f4f6;
    color: #1f2937;
    outline: none;
    text-decoration: none;
}

.sidebar-menu-link:active {
    background: #2F7DFF !important;
    color: white !important;
    outline: none;
    text-decoration: none;
}

.sidebar-menu-link:active .sidebar-menu-icon {
    color: white !important;
}

.sidebar-menu-link.active,
.sidebar-menu-link.active:hover,
.sidebar-menu-link.active:focus,
.sidebar-menu-link.active:active {
    background: #2F7DFF !important;
    color: white !important;
    border-left-color: var(--primary-color) !important;
    outline: none;
}

.sidebar-logout-link {
    color: rgba(255,255,255,0.6) !important;
    font-size: 0.85rem;
}

.sidebar-logout-link:hover,
.sidebar-logout-link:focus,
.sidebar-logout-link:active {
    color: #ff6b6b !important;
    background: rgba(255, 107, 107, 0.1) !important;
    outline: none;
    text-decoration: none;
}

.sidebar-logout-link .sidebar-menu-icon {
    color: rgba(255,255,255,0.5);
}

.sidebar-logout-link:hover .sidebar-menu-icon {
    color: #ff6b6b !important;
}

.sidebar-menu-icon {
    width: 20px;
    height: 20px;
    margin-right: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Main Content */
.main-content {
    margin-left: var(--sidebar-width);
    transition: margin-left 0.3s ease;
    min-height: 100vh;
    background: #f8f9fa;
    width: calc(100% - var(--sidebar-width));
    max-width: calc(100% - var(--sidebar-width));
    box-sizing: border-box;
    padding: 0;
    margin-top: 0;
    padding-top: var(--header-height);
}

.main-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    margin: 0;
    background: white;
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid #e5e7eb;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    width: 100%;
    box-sizing: border-box;
    height: var(--header-height);
    overflow: visible;
}

.main-header h1 {
    font-size: 24px;
    font-weight: 600;
    color: #1f2937;
    margin: 0;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.header-category-nav {
    display: none !important;
}

.header-cat-list,
.header-cat-item,
.header-cat-link,
.header-cat-dropdown {
    display: none !important;
}

.sidebar-category-nav {
    display: block;
    margin-top: 22px;
    padding-top: 18px;
    border-top: 1px solid rgba(155, 163, 173, 0.12);
}

.sidebar-cat-menu {
    padding-bottom: 8px;
}

.sidebar-cat-row {
    display: flex;
    align-items: center;
}

.sidebar-cat-link {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.sidebar-cat-label {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sidebar-cat-toggle {
    flex: 0 0 auto;
    background: none;
    border: none;
    color: #9ba3ad;
    padding: 8px 14px;
    cursor: pointer;
}

.sidebar-cat-toggle i {
    font-size: 11px;
    transition: transform 0.15s ease;
}

.sidebar-cat-item.is-open > .sidebar-cat-row .sidebar-cat-toggle i {
    transform: rotate(180deg);
}

.sidebar-cat-children {
    display: none;
    list-style: none;
    margin: 0;
    padding: 0 0 0 12px;
}

.sidebar-cat-item.is-open > .sidebar-cat-children {
    display: block;
}

.sidebar-cat-flyout {
    display: none;
    position: fixed;
    z-index: 1200;
    min-width: 220px !important;
    width: min(280px, calc(100vw - var(--sidebar-width) - 8px)) !important;
    max-width: min(300px, calc(100vw - var(--sidebar-width) - 8px)) !important;
    margin: 0;
    padding: 8px 6px;
    background: #2d3436;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-left: none;
    border-radius: 0 10px 10px 0;
    box-shadow: 8px 12px 28px rgba(12, 2, 18, 0.28);
    color: #ffffff;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    max-height: calc(100vh - 16px);
    max-height: calc(100dvh - 16px);
}

.sidebar-cat-flyout.is-open {
    display: block;
}

.sidebar-cat-flyout.sidebar-cat-flyout {
    min-width: 220px !important;
    width: min(280px, calc(100vw - var(--sidebar-width) - 8px)) !important;
    max-width: min(300px, calc(100vw - var(--sidebar-width) - 8px)) !important;
}

.sidebar-cat-item.is-flyout-open > .sidebar-cat-row .sidebar-cat-link {
    background: #2F7DFF;
    color: #ffffff;
}

.sidebar-cat-flyout-pointer,
.sidebar-cat-flyout-title,
.sidebar-cat-flyout-chevron {
    display: none !important;
}

.sidebar-cat-flyout-head {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 2px 4px 8px;
    margin: 0 2px 4px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-cat-flyout-head[hidden] {
    display: none !important;
}

.sidebar-cat-flyout-back {
    flex: 0 0 36px;
    width: 36px;
    height: 36px;
    border: none;
    background: transparent;
    color: rgba(255, 255, 255, 0.85);
    cursor: pointer;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.sidebar-cat-flyout-back:hover,
.sidebar-cat-flyout-back:focus {
    background: rgba(47, 125, 255, 0.22);
    color: #ffffff;
    outline: none;
}

.sidebar-cat-flyout-head-link {
    flex: 1;
    min-width: 0;
    color: #ffffff;
    font-family: 'Mulish', sans-serif;
    font-weight: 800;
    font-size: 14px;
    line-height: 1.3;
    text-decoration: none;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: none !important;
}

.sidebar-cat-flyout-head-link:hover {
    color: #7eb6ff;
    text-decoration: none;
}

.sidebar-cat-flyout-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.sidebar-cat-flyout-item {
    position: relative;
}

.sidebar-cat-flyout-row {
    display: flex;
    align-items: center;
    border-radius: 6px;
}

.sidebar-cat-flyout-row:hover {
    background: #2F7DFF;
}

.sidebar-cat-flyout-link {
    display: flex;
    align-items: center;
    flex: 1;
    min-width: 0;
    padding: 10px 12px;
    margin: 0;
    color: #dfe6e9;
    font-family: 'Mulish', sans-serif;
    font-weight: 500;
    font-size: 14px;
    line-height: 1.3;
    text-decoration: none;
    border-radius: 6px 0 0 6px;
    max-width: none !important;
}

.sidebar-cat-flyout-link span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sidebar-cat-flyout-row:hover .sidebar-cat-flyout-link,
.sidebar-cat-flyout-item.is-active > .sidebar-cat-flyout-row .sidebar-cat-flyout-link {
    color: #ffffff;
    background: transparent;
    text-decoration: none;
}

.sidebar-cat-flyout-item.is-active > .sidebar-cat-flyout-row {
    background: #2F7DFF;
}

.sidebar-cat-flyout-toggle {
    flex: 0 0 40px;
    width: 40px;
    height: 40px;
    border: none;
    background: transparent;
    color: rgba(255, 255, 255, 0.45);
    cursor: pointer;
    border-radius: 0 6px 6px 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.sidebar-cat-flyout-toggle i {
    font-size: 11px;
}

.sidebar-cat-flyout-row:hover .sidebar-cat-flyout-toggle,
.sidebar-cat-flyout-toggle:hover,
.sidebar-cat-flyout-toggle:focus {
    color: #ffffff;
    outline: none;
}

.sidebar-cat-flyout-sub {
    display: none;
    list-style: none;
    margin: 0;
    padding: 0;
}

.sidebar-cat-flyout-item.is-drill > .sidebar-cat-flyout-row {
    display: none;
}

.sidebar-cat-flyout-item.is-drill > .sidebar-cat-flyout-sub {
    display: block;
}

.sidebar-cat-flyout.is-drilling > .sidebar-cat-flyout-list > .sidebar-cat-flyout-item:not(.is-drill) {
    display: none;
}

.sidebar-cat-flyout-sub:has(> .is-drill) > .sidebar-cat-flyout-item:not(.is-drill) {
    display: none;
}

@media (hover: hover) and (pointer: fine) and (min-width: 991px) {
    .sidebar-category-nav {
        display: block !important;
    }

    .sidebar-cat-toggle,
    .sidebar-cat-children {
        display: none !important;
    }

    .sidebar-cat-flyout.is-open {
        display: block !important;
    }
}

@media (max-width: 990px), (hover: none), (pointer: coarse) {
    .header-category-nav {
        display: none !important;
    }

    .sidebar-category-nav {
        display: block;
        padding-top: 12px;
    }

    .sidebar-cat-flyout {
        display: none !important;
    }

    .sidebar-cat-toggle {
        min-width: 44px;
        min-height: 44px;
    }
}

/* Beautiful search input styling */
.search-input-group {
    position: relative;
    width: 400px;
    flex: none;
    max-width: 500px;
    height: 48px;
    overflow: visible;
}

.search-input-group .input-group {
    border-radius: 12px;
    overflow: visible;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    height: 48px;
}

.search-input-group .form-control {
    border: 2px solid #e5e7eb !important;
    border-right: none !important;
    border-radius: 12px 0 0 12px !important;
    padding: 12px 16px !important;
    font-size: 14px !important;
    background: white !important;
    transition: all 0.3s ease;
    height: 48px !important;
    color: #333 !important;
}

.search-input-group .form-control:focus {
    border: 2px solid #e5e7eb !important;
    border-right: none !important;
    box-shadow: none !important;
    outline: none !important;
}

.search-input-group .btn {
    border: 2px solid #2F7DFF !important;
    border-radius: 0 12px 12px 0 !important;
    background: linear-gradient(135deg, #2F7DFF 0%, #1d5bb8 100%) !important;
    color: white !important;
    padding: 12px 20px !important;
    font-weight: 600;
    transition: all 0.3s ease;
    height: 48px !important;
    box-shadow: 0 4px 12px rgba(47, 125, 255, 0.3);
    display: flex !important;
    align-items: center;
    justify-content: center;
}

.search-input-group .btn:hover,
.search-input-group .btn:focus,
.search-input-group .btn:active {
    background: linear-gradient(135deg, #1d5bb8 0%, #0f3d7a 100%) !important;
    border-color: #1d5bb8 !important;
    color: white !important;
    outline: none !important;
    box-shadow: 0 4px 12px rgba(47, 125, 255, 0.4) !important;
}

.cart-button {
    position: relative;
    background: #2F7DFF;
    border: none;
    border-radius: 12px;
    padding: 12px 20px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: white;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    cursor: pointer;
    height: 48px;
    box-shadow: 0 4px 12px rgba(47, 125, 255, 0.3);
    margin-right: 8px;
}

.cart-button:hover {
    background: #1d5bb8;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(47, 125, 255, 0.4);
}

.admin-button {
    position: relative;
    background: #28a745;
    border: none;
    border-radius: 12px;
    padding: 12px 20px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: white;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    cursor: pointer;
    height: 48px;
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
    margin-right: 8px;
}

.admin-button:hover {
    background: #218838;
    color: white;
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(40, 167, 69, 0.4);
}

.cart-badge {
    background: #ef4444;
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
    position: absolute;
    top: -6px;
    right: -6px;
}

.content-area {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    padding: 15px;
    margin: 10px;
    width: calc(100% - 20px);
    max-width: calc(100% - 20px);
    box-sizing: border-box;
}

/* Products Grid */
.homepage-slider {
    width: 100%;
    max-width: 100%;
    margin: 0 0 20px 0;
    box-sizing: border-box;
    overflow: hidden;
}

.homepage-slider .swiper {
    width: 100%;
    max-width: 100%;
    border-radius: 16px;
    overflow: hidden;
    background: #f8fafc;
    box-shadow: 0 8px 24px rgba(12, 2, 18, 0.08);
}

.homepage-slider .swiper-slide {
    width: 100%;
}

.homepage-slider .swiper-slide a {
    display: block;
    width: 100%;
}

.homepage-slider .swiper-slide img {
    width: 100%;
    height: auto;
    display: block;
    vertical-align: top;
}

.homepage-slider-img-mobile {
    display: none;
}

@media (max-width: 768px) {
    .homepage-slider-img-desktop.has-mobile-alt {
        display: none;
    }

    .homepage-slider-img-mobile {
        display: block;
    }
}

.homepage-slider .swiper-button-prev,
.homepage-slider .swiper-button-next {
    color: #2F7DFF;
}

.homepage-slider .swiper-pagination-bullet-active {
    background: #2F7DFF;
}

@media (max-width: 768px) {
    .homepage-slider .swiper-button-prev,
    .homepage-slider .swiper-button-next {
        display: none;
    }

    .homepage-slider .swiper-pagination {
        position: relative;
        margin-top: 8px;
    }
}

.products-section {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
}

.products-section h3 {
    color: var(--gray-900);
    margin-bottom: 24px;
    font-size: 1.5rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Ukryj nagłówek Produkty na mobile */
@media (max-width: 990px) {
    .products-section h3 {
        display: none;
    }
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* Domyślnie 3 kolumny na desktop */
    gap: 24px;
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
    box-sizing: border-box;
    padding-top: 16px; /* Space for hover effect - increased */
}

/* Responsywne breakpointy dla produktów */
@media (min-width: 1800px) {
    .products-grid {
        grid-template-columns: repeat(6, 1fr); /* 6 kolumn na bardzo dużych ekranach */
        gap: 20px;
    }
}

@media (min-width: 1600px) and (max-width: 1799px) {
    .products-grid {
        grid-template-columns: repeat(5, 1fr); /* 5 kolumn na dużych ekranach */
        gap: 22px;
    }
}

@media (min-width: 1400px) and (max-width: 1599px) {
    .products-grid {
        grid-template-columns: repeat(4, 1fr); /* 4 kolumny */
        gap: 20px;
    }
}

@media (min-width: 1200px) and (max-width: 1399px) {
    .products-grid {
        grid-template-columns: repeat(3, 1fr); /* 3 kolumny na średnich ekranach */
        gap: 18px;
    }
}

@media (min-width: 900px) and (max-width: 1199px) {
    .products-grid {
        grid-template-columns: repeat(2, 1fr); /* 2 kolumny na mniejszych ekranach */
        gap: 18px;
    }
}

@media (max-width: 899px) {
    .products-grid {
        grid-template-columns: repeat(1, 1fr); /* 1 kolumna na mobile */
        gap: 18px;
    }
}

@media (max-width: 990px) {
    .products-grid {
        grid-template-columns: repeat(2, 1fr); /* 2 kolumny na mobile */
        gap: 20px;
        width: 100%;
        max-width: 100%;
        overflow-x: hidden;
        padding: 16px 10px; /* Zwiększony padding dla lepszej czytelności */
        margin-top: 20px; /* Margines od góry zamiast nagłówka */
    }
    
    .main-content {
        margin-left: 0;
        padding-top: var(--mobile-header-height);
        width: 100%;
        max-width: 100%;
        overflow-x: hidden;
        padding: var(--mobile-header-height) 5px 5px 5px; /* ZMNIEJSZONY PADDING */
        box-sizing: border-box;
    }
    
    .main-header {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        width: 100% !important;
        height: var(--mobile-header-height) !important;
        display: none !important;
    }
    

    
    /* Usuwamy box-shadow z koszyka i admin button na mobile */
    .cart-button, .admin-button {
        box-shadow: none !important;
    }
    
    .content-area {
        padding: 15px;
        margin: 0;
        width: 100%;
        max-width: 100%;
        overflow-x: hidden;
        box-sizing: border-box;
    }
}

@media (max-width: 767px) {
    .products-grid {
        grid-template-columns: repeat(1, 1fr); /* 1 kolumna na bardzo małych ekranach */
        gap: 15px;
        padding: 16px 15px; /* Zwiększony padding dla lepszej czytelności */
    }
    
    .main-content {
        padding: var(--mobile-header-height) 10px 10px 10px; /* Zwiększony padding */
    }
    
    .content-area {
        padding: 15px; /* Zwiększony padding dla lepszej czytelności */
    }
}

.product-card {
    background: linear-gradient(135deg, #ffffff 0%, #fafbfc 100%);
    border-radius: 16px;
    border: 1px solid #e5e7eb;
    transition: all 0.4s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    height: 100%;
    display: flex;
    flex-direction: column;
    text-decoration: none !important;
    color: inherit !important;
    position: relative;
}

.product-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(47, 125, 255, 0.02) 0%, rgba(139, 92, 246, 0.02) 100%);
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
    z-index: 1;
}

.product-card:hover::before {
    opacity: 1;
}

.product-card > * {
    position: relative;
    z-index: 2;
}

.product-image-container {
    position: relative;
    height: 250px;
    overflow: hidden;
    border-radius: 12px 12px 0 0;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
}

.product-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.product-card:hover .product-image {
    transform: scale(1.05);
}

/* Tryb "Pełne zdjęcia" (Ustawienia sklepu): bez przycinania, np. kwadratowe packshoty */
.product-list-images-contain .product-card .product-image-container {
    background: #fff;
}

.product-list-images-contain .product-card .product-image {
    object-fit: contain;
}

.product-image-placeholder {
    width: 100%;
    height: 100%;
    background: #f3f4f6;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #9ca3af;
    font-size: 14px;
    font-weight: 500;
}

.product-image-placeholder i {
    font-size: 48px;
    margin-bottom: 8px;
    opacity: 0.5;
}

.product-image-placeholder-large {
    width: 100%;
    height: 450px;
    background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #9ca3af;
    font-size: 16px;
    font-weight: 500;
    border-radius: 16px;
    border: 2px dashed #d1d5db;
}

.product-image-placeholder-large i {
    font-size: 64px;
    margin-bottom: 12px;
    opacity: 0.5;
}

.stock-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(34, 197, 94, 0.9);
    color: white;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
}

.stock-badge.out-of-stock {
    background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%) !important;
    border: 1px solid #fecaca !important;
    color: #dc2626 !important;
    position: static !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 4px !important;
    padding: 6px 10px !important;
    border-radius: 8px !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    box-shadow: 0 1px 2px rgba(239, 68, 68, 0.1) !important;
}

.product-info {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    background: white;
    border-radius: 0 0 16px 16px;
}

.product-name {
    font-size: 17px;
    font-weight: 600;
    color: #111827;
    margin: 0 0 10px 0;
    line-height: 1.4;
    height: 48px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.product-sku {
    font-size: 12px;
    color: #6b7280;
    margin: 0 0 12px 0;
    height: 16px;
}

.product-price-stock-badges {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 18px;
    flex-wrap: wrap;
}

.price-badge {
    display: flex;
    align-items: center;
    gap: 4px;
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
    color: #1e40af;
    padding: 6px 10px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600 !important;
    border: 1px solid #bfdbfe;
    box-shadow: 0 1px 2px rgba(59, 130, 246, 0.1);
}

.deposit-badge {
    display: flex;
    align-items: center;
    gap: 4px;
    background: #f0fdf4;
    color: #166534;
    padding: 6px 10px;
    border-radius: 8px;
    font-size: 12px;
    border: 1px solid #bbf7d0;
}

.product-deposit-info {
    font-size: 14px;
}

.product-actions {
    display: flex;
    gap: 10px;
    margin-top: auto;
    padding-top: 4px;
}

.product-actions .btn {
    flex: 1;
    border-radius: 12px;
    font-weight: 600;
    padding: 12px 16px;
    font-size: 14px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    background: #2F7DFF !important;
    border-color: #2F7DFF !important;
    color: white !important;
}

.product-actions .btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s ease;
}

.product-actions .btn:hover::before {
    left: 100%;
}

.product-actions .btn:hover {
    background: #1d5bb8 !important;
    border-color: #1d5bb8 !important;
    color: white !important;
}

.variants-badge {
    display: flex;
    align-items: center;
    gap: 4px;
    background: linear-gradient(135deg, #e0e7ff 0%, #c7d2fe 100%);
    color: #3730a3;
    padding: 6px 10px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    border: 1px solid #c7d2fe;
    box-shadow: 0 1px 2px rgba(99, 102, 241, 0.1);
}

/* SKONSOLIDOWANA DEFINICJA - WSZYSTKIE CENY MAJĄ IDENTYCZNY WYGLĄD */
.price-badge, .price-badge-with-variants {
    display: flex !important;
    align-items: center !important;
    gap: 4px !important;
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%) !important;
    color: #1e40af !important;
    padding: 6px 10px !important;
    border-radius: 8px !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    border: 1px solid #bfdbfe !important;
    box-shadow: 0 1px 2px rgba(59, 130, 246, 0.1) !important;
}

/* DODATKOWA REGUŁA DEBUGOWA - GWARANTUJE POGRUBIENIE WSZYSTKICH CEN */
[class*="price-badge"] {
    font-weight: 600 !important;
}

.price-badge-with-variants i {
    font-size: 10px;
    color: #2563eb;
}

.variants-badge i {
    font-size: 10px;
}

/* Cart Sidebar */
.cart-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 2000;
    display: none;
}

.cart-sidebar {
    position: fixed;
    top: 0;
    right: -400px;
    width: 400px;
    height: 100vh;
    background: white;
    z-index: 2001;
    transition: right 0.3s ease;
    display: flex;
    flex-direction: column;
}

.cart-sidebar.open {
    right: 0;
}

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

.cart-header h4 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #1f2937;
}

.cart-close {
    background: none;
    border: none;
    font-size: 20px;
    color: #6b7280;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
}

.cart-close:hover {
    background: #f3f4f6;
    color: #1f2937;
}

.cart-content {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

.cart-footer {
    padding: 20px;
    border-top: 1px solid #e5e7eb;
    background: #f9fafb;
}

.summary-line {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 14px;
}

.summary-line-total {
    font-weight: 600;
    font-size: 16px;
    color: #1f2937;
    border-top: 1px solid #e5e7eb;
    padding-top: 8px;
    margin-top: 8px;
}

/* Notifications */
.notification {
    position: fixed;
    bottom: 20px;
    right: 20px;
    padding: 15px 20px;
    border-radius: 4px;
    background: white;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    transform: translateX(120%);
    transition: transform 0.3s ease;
    z-index: 10000;
    display: flex;
    align-items: center;
    gap: 10px;
    max-width: 300px;
}

.notification.show {
    transform: translateX(0) !important;
}

.notification-success {
    background: #4CAF50;
    color: white;
}

.notification-error {
    background: #f44336;
    color: white;
}

.notification-warning {
    background: #ff9800;
    color: white;
}

.notification-content {
    flex: 1;
}

.notification-close {
    background: none;
    border: none;
    color: inherit;
    font-size: 20px;
    cursor: pointer;
    padding: 0;
    opacity: 0.7;
}

.notification-close:hover {
    opacity: 1;
}

/* Button overrides */
.btn-primary {
    background: #2F7DFF !important;
    border-color: #2F7DFF !important;
    color: white !important;
}

.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active,
.btn-primary.active,
.btn-primary:not(:disabled):not(.disabled):active {
    background: #1d5bb8 !important;
    border-color: #2970e5 !important;
    color: white !important;
    box-shadow: 0 0 0 0.2rem rgba(47, 125, 255, 0.25) !important;
}

.btn-primary:disabled,
.btn-primary.disabled {
    background: #2F7DFF !important;
    border-color: #2F7DFF !important;
    opacity: 0.65 !important;
}

.btn-outline-primary {
    color: #2F7DFF !important;
    border-color: #2F7DFF !important;
    background: transparent !important;
}

.btn-outline-primary:hover,
.btn-outline-primary:focus,
.btn-outline-primary:active,
.btn-outline-primary.active,
.btn-outline-primary:not(:disabled):not(.disabled):active {
    background: #2F7DFF !important;
    border-color: #2F7DFF !important;
    color: white !important;
    box-shadow: 0 0 0 0.2rem rgba(47, 125, 255, 0.25) !important;
}

/* Pagination */
.pagination-container {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #e5e7eb;
}

.pagination .page-link {
    color: #2F7DFF;
    border-color: #e5e7eb;
}

.pagination .page-link:hover {
    color: #2970e5;
    background-color: #f3f4f6;
    border-color: #2F7DFF;
}

.pagination .page-item.active .page-link {
    background-color: #2F7DFF;
    border-color: #2F7DFF;
    color: white;
}

/* Product Detail */
.product-detail-section {
    max-width: 1400px;
    width: 100%;
    margin: 0 auto;
    padding: 24px;
    display: block;
}

.product-detail-content {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0;
    background: transparent;
    border-radius: 0;
    box-shadow: none;
}

.product-detail-section::before {
    display: none; /* UKRYJ NIEBIESKI PASEK - ZDUBLOWANY ELEMENT */
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #2F7DFF 0%, #4287F3 50%, #6B9EFF 100%);
    border-radius: 20px 20px 0 0;
}

.product-detail-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 32px;
    padding-bottom: 20px;
    border-bottom: 1px solid #dee2e6; /* Zmienione z niebieskiego na szary */
    position: relative;
}

.product-detail-header::after {
    display: none; /* Ukryj niebieski pasek */
}

.product-detail-header h3 {
    font-size: 28px;
    font-weight: 800;
    color: #1f2937;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 12px;
}

.product-detail-header .btn {
    padding: 12px 24px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 2px 8px rgba(47, 125, 255, 0.2);
    transition: all 0.3s ease;
}

.product-detail-header .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(47, 125, 255, 0.3);
}

.product-detail-images {
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    display: flex;
    justify-content: center;
}

.product-gallery-swiper {
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    border: 1px solid #e5e7eb;
    position: relative;
    width: 100%;
    max-width: fit-content;
    margin: 0 auto;
}

/* Remove shadow on mobile for product gallery */
@media (max-width: 990px) {
    .product-gallery-swiper {
        box-shadow: none !important;
    }
}

.product-gallery-swiper::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(47, 125, 255, 0.02) 0%, rgba(139, 92, 246, 0.02) 100%);
    pointer-events: none;
    z-index: 1;
}

.product-main-swiper {
    border-radius: 12px;
    overflow: hidden;
    background: linear-gradient(135deg, #ffffff 0%, #f8fafb 100%);
    width: 100%;
}

.product-slide-image {
    width: 100%;
    height: auto;
    min-height: 400px;
    max-height: 600px;
    object-fit: contain;
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.4s ease;
    position: relative;
    z-index: 2;
    background: #ffffff;
}

.product-slide-image:hover {
    transform: scale(1.02);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
}

/* Adaptacyjne wymiary dla różnych formatów zdjęć */
.product-main-swiper .swiper-slide {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 400px;
}

/* Responsywne wymiary dla różnych typów produktów */
@media (min-width: 992px) {
    .product-slide-image {
        max-width: 100%;
        width: auto;
        height: auto;
        min-height: 450px;
        max-height: 650px;
    }
}

@media (min-width: 768px) and (max-width: 991px) {
    .product-slide-image {
        min-height: 400px;
        max-height: 550px;
    }
}

.product-thumbs-swiper {
    height: 80px;
    border-radius: 8px;
    overflow: hidden;
    margin-top: 15px;
    width: 100% !important;
    display: block !important;
    box-sizing: border-box;
    max-width: fit-content;
    margin-left: auto;
    margin-right: auto;
}

.product-thumbs-swiper .swiper-wrapper {
    display: flex !important;
    width: 100% !important;
    box-sizing: border-box;
    justify-content: center;
}

.product-thumb-image {
    width: 70px !important;
    height: 70px !important;
    object-fit: contain;
    background: #ffffff;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    display: block !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.product-thumbs-swiper .swiper-slide {
    opacity: 0.7;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 8px;
    overflow: hidden;
    width: auto !important;
    height: 100% !important;
    flex-shrink: 0 !important;
    margin-right: 12px !important;
}

.product-thumbs-swiper .swiper-slide-thumb-active {
    opacity: 1;
}

.product-thumbs-swiper .swiper-slide-thumb-active .product-thumb-image {
    border-color: #2F7DFF;
    box-shadow: 0 2px 8px rgba(47, 125, 255, 0.3);
}

.product-image-placeholder-large {
    width: 100%;
    min-height: 400px;
    max-height: 600px;
    height: auto;
    background: #f8fafc;
    border: 2px dashed #e2e8f0;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #94a3b8;
    font-size: 18px;
    font-weight: 500;
    aspect-ratio: 4/3;
    max-width: 600px;
    margin: 0 auto;
}

.product-image-placeholder-large i {
    font-size: 64px;
    margin-bottom: 20px;
    opacity: 0.5;
}

/* Sekcja pełnej szerokości pod głównym contentem */
.product-full-width-content {
    grid-column: 1 / -1;
    width: 100%;
    margin-top: 20px;
}

/* Warianty na pełną szerokość */
.variants-section {
    margin-bottom: 30px;
}

.variants-section h4 {
    font-size: 22px;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.variants-count {
    color: #6b7280;
    font-weight: 500;
}

.product-variants-info {
    margin-bottom: 20px;
}

.product-variants-info .alert {
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
    border: 1px solid #93c5fd;
    color: #1e40af;
    border-radius: 8px;
    padding: 12px 16px;
}

.product-variants-info .alert i {
    margin-right: 8px;
}

.variants-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}

.variant-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    border: 2px solid #e5e7eb;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.variant-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 0;
}

.variant-card:hover {
    border-color: #2F7DFF;
    box-shadow: 0 4px 20px rgba(47, 125, 255, 0.15);
    transform: translateY(-2px);
}

.variant-card:hover::before {
    opacity: 1;
}

.variant-card > * {
    position: relative;
    z-index: 1;
}

.variant-card h5 {
    font-size: 16px;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 8px;
}

.variant-card .variant-meta {
    margin-bottom: 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.variant-card .variant-meta small {
    color: #6b7280;
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.variant-card .variant-meta small i {
    width: 12px;
    text-align: center;
}

.variant-card .variant-price {
    font-size: 18px;
    font-weight: 700;
    color: #2F7DFF;
    margin-bottom: 8px;
}

.variant-card .variant-stock {
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.variant-card .variant-stock.in-stock {
    color: #065f46;
}

.variant-card .variant-stock.out-of-stock {
    color: #991b1b;
}

/* Sekcja opisu i parametrów */
.product-content-section {
    width: 100%;
    max-width: 95%;
    margin: 0 auto;
    padding: 40px;
    background: linear-gradient(135deg, #ffffff 0%, #f8fafb 100%);
    border-radius: 16px;
    /* Usunięte obramowanie */
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
}

.content-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    align-items: start;
}

/* Jeśli jest tylko jeden element (opis lub parametry), rozciągnij go na pełną szerokość */
.content-grid:has(.content-column:only-child) .content-column,
.content-grid .content-column:only-child {
    grid-column: 1 / -1;
}

/* ===================================
   STYLE DLA BADGE'ÓW PRODUKTÓW
   =================================== */

.product-price-stock-badges {
    display: flex;
    gap: 8px;
    margin-top: 8px;
    flex-wrap: wrap;
}

/* Dla produktów głównych - cena i sztuki obok siebie */
.main-product .product-price-stock-badges {
    display: flex;
    flex-direction: row;
    gap: 8px;
    margin-top: 8px;
    flex-wrap: wrap;
}

/* Dla wariantów - cena i sztuki obok siebie */
.variant .product-price-stock-badges {
    display: flex;
    flex-direction: row;
    gap: 8px;
    margin-top: 8px;
    flex-wrap: wrap;
}

/* Moved to specific .stock-badge definition below */

/* USUNIĘTA DUPLIKOWANA DEFINICJA - UŻYWAMY SKONSOLIDOWANEJ POWYŻEJ */

.price-badge i, .price-badge-with-variants i {
    color: #2563eb !important;
    font-size: 10px !important;
}

.stock-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 10px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    border: 1px solid #2196f3;
    background-color: #e3f2fd;
    color: #0d47a1;
}

.stock-badge i {
    color: #2196f3;
    font-size: 10px;
}

.stock-badge-empty {
    background-color: #ffebee;
    border-color: #f44336;
    color: #c62828;
}

.stock-badge-empty i {
    color: #f44336;
}

.out-of-stock-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 10px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
    border: 1px solid #fecaca;
    color: #dc2626;
    box-shadow: 0 1px 2px rgba(239, 68, 68, 0.1);
}

.out-of-stock-badge i {
    color: #ef4444;
    font-size: 10px;
}

/* Responsywność dla małych ekranów */
@media (max-width: 576px) {
    .product-price-stock-badges {
        gap: 6px;
        margin-top: 6px;
    }
    
    .price-badge, .stock-badge, .out-of-stock-badge, .price-badge-with-variants {
        padding: 3px 6px;
        font-size: 10px;
        gap: 3px;
    }
    
    .price-badge i, .stock-badge i, .out-of-stock-badge i, .price-badge-with-variants i {
        font-size: 9px;
    }
}

/* Kursor pointer dla klikalne elementy */
.product-name,
.product-image {
    cursor: pointer;
}

.product-name:hover {
    color: #007bff;
    text-decoration: underline;
}

.product-image:hover {
    opacity: 0.8;
    transition: opacity 0.3s;
}

/* Ukryj stary layout */
.old-layout {
    display: none !important;
}

/* #product-list is hidden by default, shown by JS when search results available */

/* Media Queries - Responsive Design */

/* Desktop Large (1400px+) */
@media (min-width: 1400px) {
    .sidebar {
        width: 260px;
    }
    
    .main-content {
        margin-left: 260px;
    }
    
    .main-header {
        left: 260px !important;
        width: calc(100% - 260px) !important;
    }
}

/* Desktop (1200px - 1399px) */
@media (max-width: 1399px) {
    .sidebar {
        width: 240px;
    }
    
    .main-content {
        margin-left: 240px;
    }
    
    .main-header {
        left: 240px !important;
        width: calc(100% - 240px) !important;
    }
}

/* Tablet Large (992px - 1199px) */
@media (max-width: 1199px) {
    .sidebar {
        width: 220px;
    }
    
    .main-content {
        margin-left: 220px;
    }
    
    .main-header {
        padding: 12px 16px;
        left: 220px !important;
        width: calc(100% - 220px) !important;
    }
}

/* Tablet (768px - 991px) */
@media (max-width: 990px) {
    .mobile-header {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
        height: var(--mobile-header-height) !important;
    }
    
    .sidebar {
        transform: translateX(-100%) !important;
        width: 280px;
        z-index: 1030;
        border-right: none;
        top: var(--mobile-header-height);
        height: calc(100vh - var(--mobile-header-height));
        padding-top: 0;
        position: fixed !important;
        left: 0 !important;
    }

    .sidebar.open {
        transform: translateX(0) !important;
        z-index: 1030 !important;
        visibility: visible !important;
        opacity: 1 !important;
    }
    
    .sidebar-overlay {
        z-index: 1025 !important;
    }
    
    .sidebar-overlay.active {
        z-index: 1025 !important;
    }

    .main-content {
        margin-left: 0;
        padding-top: var(--mobile-header-height);
    }
    

    
    .content-area {
        padding: 16px;
    }
    
    /* MOBILE HEADER DISPLAY */
    .mobile-header {
        display: block !important;
    }
    
    /* Product detail content responsiveness */
    .product-detail-content-fullwidth {
        padding: 15px;
    }
    
    .product-main-section {
        flex-direction: column;
    }
    
    .product-detail-images {
        width: 100%;
        margin-bottom: 20px;
    }
    
    .product-details-modal {
        width: 100%;
        padding: 15px;
    }
    
    .product-detail-info h1 {
        font-size: 1.5rem;
        margin-bottom: 15px;
    }
    
    .product-price-large {
        font-size: 1.8rem;
        margin: 15px 0;
    }
    
    .add-to-cart-section {
        margin-top: 20px;
    }
    
    .variant-selection-section {
        margin: 15px 0;
    }
    
    .variant-details {
        padding: 15px;
        margin: 15px 0;
    }
    
    /* Content sections responsive */
    .content-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .product-description,
    .product-features {
        margin-bottom: 20px;
    }
}

@media (min-width: 992px) {
    .mobile-header {
        display: none !important;
        visibility: hidden !important;
        opacity: 0 !important;
    }
}

/* Dodatkowa reguła dla desktop - ukryj mobile header */
@media (min-width: 991px) {
    .mobile-header {
        display: none !important;
        visibility: hidden !important;
        opacity: 0 !important;
        height: 0 !important;
        overflow: hidden !important;
    }
}

/* DODATKOWA REGUŁA DLA DESKTOP STICKY HEADER */
/* Usunięto specyficzną regułę - dziedziczona z głównego @media (min-width: 992px) */

/* UKRYJ NIEBIESKIE PASKI Z PRODUCT-DETAIL-HEADER */
.product-detail-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 32px;
    padding-bottom: 20px;
    border-bottom: 1px solid #dee2e6; /* Zmienione z niebieskiego na szary */
    position: relative;
}

.product-detail-header::after {
    display: none; /* Ukryj niebieski pasek */
}

/* Mobile Large (576px - 767px) */
@media (max-width: 767px) {
    .mobile-header {
        display: block !important;
    }
    
    .sidebar {
        transform: translateX(-100%) !important;
        width: 280px;
        max-width: 85vw;
        z-index: 1030 !important;
        position: fixed !important;
        left: 0 !important;
    }
    
    .sidebar.open {
        transform: translateX(0) !important;
        z-index: 1030 !important;
        visibility: visible !important;
        opacity: 1 !important;
    }
    
    .main-content {
        margin-left: 0;
        padding-top: var(--mobile-header-height);
    }
    
    .content-area {
        padding: 12px;
    }

    .products-grid {
        grid-template-columns: repeat(2, 1fr); /* 2 kolumny zawsze wypełnione */
        gap: 12px;
    }

    .cart-sidebar {
        width: 100%;
        max-width: none;
    }
    
    /* MOBILE HEADER DISPLAY */
    .mobile-header {
        display: block !important;
    }
    
    .product-detail-content-fullwidth {
        padding: 4px;
    }
    
    .product-details-modal {
        padding: 10px;
    }
    
    .product-detail-info h1 {
        font-size: 1.3rem;
        line-height: 1.4;
    }
    
    .product-price-large {
        font-size: 1.6rem;
    }
    
    .product-detail-meta .meta-item {
        margin-bottom: 10px;
    }
    
    .quantity-section {
        margin: 15px 0;
    }
    
    .quantity-input-group {
        max-width: 140px;
    }
    
    .add-main-product-to-cart {
        padding: 12px 20px;
        font-size: 14px;
    }
    
    /* Product gallery responsive improvements */
    .product-gallery-swiper {
        margin-bottom: 15px;
    }
    
    .product-main-swiper {
        margin-bottom: 10px;
    }
    
    .product-thumbs-swiper {
        height: 60px;
    }
    
    .product-thumb-image {
        height: 50px;
        width: 50px;
    }
    
    .product-slide-image {
        max-height: 300px;
        object-fit: contain;
    }
    
    /* Features list responsive */
    .features-list li {
        padding: 8px 15px;
        font-size: 14px;
    }
    
    .product-description,
    .product-features {
        margin-bottom: 15px;
        padding: 12px;
        border-radius: 4px;
        border: 1px solid #e5e7eb;
        background: #ffffff;
        box-shadow: none;
    }
    
    .product-description h6,
    .product-features h6 {
        font-size: 1.1rem;
        margin-bottom: 10px;
    }
    
    /* Cart sidebar responsive improvements */
    .cart-sidebar {
        width: 100%;
        right: -100%;
    }
    
    .cart-sidebar.open {
        right: 0;
    }
    
    /* Checkout modal mobile improvements */
    .modal-dialog.modal-xl {
        max-width: 95%;
        margin: 10px auto;
    }
    
    .modal-body .row {
        flex-direction: column;
    }
    
    .modal-body .col-md-6 {
        width: 100%;
        max-width: 100%;
    }
}

/* Mobile Small (max 575px) */
@media (max-width: 575px) {
    .mobile-header {
        display: block;
    }
    
    .mobile-header-content {
        padding: 0 12px;
    }
    
    .sidebar {
        transform: translateX(-100%) !important;
        width: 100%;
        max-width: 320px;
    }
    
    .sidebar.open {
        transform: translateX(0) !important;
    }
    
    .main-content {
        margin-left: 0;
        padding-top: var(--mobile-header-height);
    }
    
    .content-area {
        padding: 15px; /* Zwiększony padding dla lepszej czytelności */
    }
    
    .products-grid {
        grid-template-columns: 1fr; /* Jedna kolumna na bardzo małych ekranach */
        gap: 15px;
        padding: 16px 15px; /* Zwiększony padding dla lepszej czytelności */
    }
    
    .search-input-group {
        flex-direction: column;
        gap: 8px;
        margin: 0 !important;
    }
    
    .search-input-group .input-group {
        width: 320px !important;
        max-width: 80vw;
    }
    
    .cart-sidebar {
        width: 100%;
        max-width: none;
    }
    
    .mobile-header-left {
        gap: 8px;
    }
    
    .product-detail-info h1 {
        font-size: 1.2rem;
    }
    
    .product-price-large {
        font-size: 1.4rem;
    }
    
    .product-detail-images {
        margin-bottom: 15px;
    }
    
    .variant-selection-section .form-select {
        font-size: 14px;
        padding: 8px 12px;
    }
    
    .variant-details {
        padding: 10px;
        margin: 10px 0;
    }
    
    .quantity-input-group {
        max-width: 120px;
    }
    
    .quantity-btn {
        width: 32px;
        height: 32px;
        font-size: 14px;
    }
    
    .quantity-input {
        height: 32px;
        font-size: 14px;
    }
    
    .add-main-product-to-cart {
        padding: 10px 16px;
        font-size: 13px;
        height: 44px;
    }
    
    .product-slide-image {
        min-height: 300px;
        max-height: 450px;
        object-fit: contain;
    }
    
    .product-detail-images {
        width: 100%;
        max-width: 100%;
    }
    
    .product-gallery-swiper {
        max-width: 100%;
    }
    
    .product-thumbs-swiper {
        height: 60px;
        max-width: 100%;
        margin-left: 0;
        margin-right: 0;
    }
    
    .product-thumb-image {
        width: 50px !important;
        height: 50px !important;
        object-fit: contain;
    }
    
    .features-list li {
        padding: 6px 12px;
        font-size: 13px;
    }
}

/* Very Small Mobile (max 375px) */
@media (max-width: 375px) {
    .mobile-header-content {
        padding: 0 8px;
    }
    
    .sidebar {
        width: 100%;
        max-width: 300px;
    }
    
    .content-area {
        padding: 10px;
    }
    
    .mobile-cart {
        padding: 6px 8px !important;
        font-size: 12px !important;
    }
    
    .product-detail-images {
        padding: 0 5px;
        max-width: 100%;
    }
    
    .product-gallery-swiper {
        max-width: 100%;
        margin: 0;
    }
    
    .product-slide-image {
        min-height: 250px;
        max-height: 350px;
        object-fit: contain;
    }
    
    .product-thumbs-swiper {
        height: 50px;
        margin-left: 0;
        margin-right: 0;
    }
    
    .product-thumb-image {
        width: 40px !important;
        height: 40px !important;
    }
}

/* ===================================
   POPUP ZAMÓWIENIA
   =================================== */

#order-popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    padding: 40px;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    z-index: 10000;
    text-align: center;
    display: none; /* Ukryty domyślnie */
}

#order-popup.show {
    display: block;
}

#order-popup .loader {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #2F7DFF;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

#order-popup-message {
    font-size: 16px;
    font-weight: 600;
    color: #1f2937;
    margin: 0;
}

/* Overlay dla popup zamówienia */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    display: none; /* Ukryty domyślnie */
}

.overlay.show {
    display: block;
}

.product-details-modal {
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    padding: 0 10px;
    background: linear-gradient(135deg, rgba(255,255,255,0.8) 0%, rgba(248,250,252,0.8) 100%);
    border-radius: 20px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.04);
    border: 1px solid rgba(229, 231, 235, 0.5);
    backdrop-filter: blur(10px);
}

.product-title-meta-row {
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
    gap: 10px;
    margin: 0 0 20px 0;
}

.product-title-meta-row.has-manufacturer-logo .product-manufacturer-logo,
.product-title-meta-row.has-manufacturer-logo .product-detail-meta,
.product-title-meta-row.has-manufacturer-logo .meta-item {
    height: 48px;
}

.product-manufacturer-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    height: 48px;
    padding: 6px 10px;
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    box-sizing: border-box;
}

.product-manufacturer-logo img {
    max-height: 100%;
    max-width: 140px;
    width: auto;
    height: 100%;
    object-fit: contain;
}

.product-title-meta-row .product-detail-meta {
    margin-bottom: 0;
}

.product-title-meta-row.has-manufacturer-logo .meta-item {
    box-sizing: border-box;
    padding-top: 0;
    padding-bottom: 0;
    font-weight: 400;
}

.product-title-meta-row .meta-item,
.product-title-meta-row .meta-item span {
    font-weight: 400;
}

.product-price-large.product-price-both,
.variant-price-display.product-price-both {
    display: inline-flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: stretch;
    gap: 10px;
    width: auto;
    max-width: 100%;
    font-size: inherit;
    font-weight: 400;
    background: none;
    -webkit-text-fill-color: inherit;
    text-shadow: none;
    letter-spacing: 0;
    margin-bottom: 24px;
}

.product-price-large.product-price-both::before {
    display: none;
}

.product-price-both .product-price-line {
    flex: 0 0 auto;
    width: auto;
    min-width: 0;
    padding: 10px 14px;
    border-radius: 14px;
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    box-sizing: border-box;
}

.product-price-both .product-price-net {
    background: rgba(47, 125, 255, 0.06);
    border-color: rgba(47, 125, 255, 0.2);
}

.product-price-both .product-price-label {
    display: block;
    font-family: 'Mulish', sans-serif;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #64748b;
    margin-bottom: 4px;
    line-height: 1.2;
}

.product-price-both .product-price-net .product-price-label {
    color: #2F7DFF;
}

.product-price-both .product-price-amount {
    display: block;
    font-family: 'Be Vietnam Pro', sans-serif;
    font-size: 24px;
    font-weight: 800;
    color: #0C0212;
    letter-spacing: -0.4px;
    line-height: 1.2;
    -webkit-text-fill-color: #0C0212;
}

.product-price-both .product-price-net .product-price-amount {
    color: #2F7DFF;
    -webkit-text-fill-color: #2F7DFF;
}

.product-price-both .product-price-gross .product-price-amount {
    font-size: 22px;
}

@media (max-width: 576px) {
    .product-price-both .product-price-amount {
        font-size: 20px;
    }

    .product-price-both .product-price-gross .product-price-amount {
        font-size: 18px;
    }
}

.product-content-params-first .content-grid {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.product-content-params-first .content-column-features {
    order: 1;
    width: 100%;
}

.product-content-params-first .content-column-description {
    order: 2;
    width: 100%;
}

.product-content-params-first .features-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px 24px;
}

@media (max-width: 768px) {
    .product-content-params-first .features-list {
        grid-template-columns: 1fr;
    }
}

.features-list-wrap {
    position: relative;
}

.features-list-wrap .features-list {
    overflow: hidden;
    max-height: none;
    transition: max-height 0.45s ease;
}

.features-fade {
    display: flex;
    justify-content: center;
    align-items: flex-end;
    padding-top: 16px;
    transition: background 0.35s ease, height 0.35s ease, padding 0.35s ease;
}

.features-list-wrap.is-collapsed .features-fade {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 96px;
    padding: 0 16px 12px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.88) 42%, #ffffff 78%);
    pointer-events: none;
}

.features-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 40px;
    padding: 8px 22px;
    border: none;
    border-radius: 999px;
    background: #ffffff;
    color: #2F7DFF;
    font-family: 'Mulish', sans-serif;
    font-weight: 800;
    font-size: 0.9rem;
    cursor: pointer;
    box-shadow: 0 6px 20px rgba(12, 2, 18, 0.1);
    pointer-events: auto;
    transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.features-toggle i {
    transition: transform 0.35s ease;
}

.features-list-wrap:not(.is-collapsed) .features-toggle i {
    transform: rotate(180deg);
}

.features-toggle:hover,
.features-toggle:focus {
    background: #2F7DFF;
    color: #ffffff;
    box-shadow: 0 8px 24px rgba(47, 125, 255, 0.28);
}

@media (min-width: 769px) {
    .features-list-wrap:has(.features-toggle-mobile-only).is-collapsed .features-list {
        max-height: none;
        overflow: visible;
    }

    .features-list-wrap:has(.features-toggle-mobile-only) .features-fade {
        display: none;
    }
}

.product-detail-info {
    padding: 32px;
}

.product-detail-info h1 {
    font-size: 32px;
    font-weight: 800;
    color: #111827;
    margin: 0 0 24px 0;
    line-height: 1.2;
    border-bottom: 3px solid #f1f5f9;
    padding-bottom: 16px;
    position: relative;
}

.product-detail-info h1::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 0;
    width: 60px;
    height: 3px;
    background: linear-gradient(135deg, #2F7DFF 0%, #4287F3 100%);
    border-radius: 2px;
}

.product-detail-meta {
    margin-bottom: 20px;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.product-detail-meta .meta-item {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    color: #475569;
    padding: 8px 16px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 400;
    border: 1px solid #e2e8f0;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.product-detail-meta .meta-item:hover {
    background: linear-gradient(135deg, #e2e8f0 0%, #cbd5e1 100%);
    border-color: #cbd5e1;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.product-detail-meta .meta-item i {
    font-size: 11px;
    color: #64748b;
}

.product-sku-modal,
.product-ean-modal,
.product-weight-modal {
    margin-bottom: 0;
    color: inherit;
    font-weight: 600;
    font-size: 13px;
}

.product-price-large {
    font-size: 42px;
    font-weight: 900;
    background: linear-gradient(135deg, #2F7DFF 0%, #4287F3 50%, #6B9EFF 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 20px;
    text-shadow: 0 4px 8px rgba(47, 125, 255, 0.15);
    display: block;
    position: relative;
    letter-spacing: -1px;
}

.product-price-large::before {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(135deg, rgba(47, 125, 255, 0.2) 0%, rgba(107, 158, 255, 0.2) 100%);
    border-radius: 1px;
}

.product-stock-info {
    margin-bottom: 24px;
}

.product-detail-stock {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 14px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.product-detail-stock.in-stock {
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
    color: #065f46;
    border: 1px solid #10b981;
}

.product-detail-stock.out-of-stock {
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    color: #991b1b;
    border: 1px solid #ef4444;
}

.add-to-cart-section {
    display: flex;
    justify-content: flex-start;
    margin-bottom: 20px;
}

.add-to-cart-section .btn {
    border-radius: 8px;
    font-weight: 600;
    font-size: 16px;
    padding: 12px 24px;
    transition: all 0.3s ease;
    border: none;
    text-transform: none;
    min-height: 48px;
}

.add-to-cart-section .btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Przyciski nawigacji Swiper */
.product-main-swiper .swiper-button-next,
.product-main-swiper .swiper-button-prev {
    color: #2F7DFF;
    background: rgba(255, 255, 255, 0.95);
    width: 48px;
    height: 48px;
    border-radius: 50%;
    margin-top: -24px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.product-main-swiper .swiper-button-next:after,
.product-main-swiper .swiper-button-prev:after {
    font-size: 18px;
    font-weight: bold;
}

.product-main-swiper .swiper-button-next:hover,
.product-main-swiper .swiper-button-prev:hover {
    background: rgba(255, 255, 255, 1);
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

/* Paginacja Swiper */
.product-main-swiper .swiper-pagination-bullet {
    background: #2F7DFF;
    opacity: 0.4;
    width: 12px;
    height: 12px;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.product-main-swiper .swiper-pagination-bullet-active {
    opacity: 1;
    transform: scale(1.2);
    box-shadow: 0 2px 8px rgba(47, 125, 255, 0.4);
}

/* Responsywność dla karty produktu */
@media (max-width: 1024px) {
    .product-detail-section {
        padding: 0 2%;
        max-width: 96%;
    }
    
    .product-main-section {
        grid-template-columns: 1fr;
        gap: 40px;
        max-width: 92%;
    }
    
    .product-variants-section,
    .product-content-section {
        max-width: 92%;
        padding: 30px;
    }
    
    .product-detail-section .main-header {
        padding: 15px 2%;
    }
}

@media (max-width: 768px) {
    .product-detail-section {
        padding: 0 3%;
        max-width: 94%;
    }
    
    .product-main-section {
        max-width: 90%;
        gap: 30px;
    }
    
    .product-variants-section,
    .product-content-section {
        max-width: 90%;
        padding: 20px;
    }
    
    .product-detail-section .main-header {
        padding: 10px 3%;
        flex-direction: column;
        gap: 15px;
        align-items: stretch;
    }
    
    .product-detail-header {
        text-align: center;
    }
    
    .product-detail-section .header-actions {
        justify-content: center;
    }
}

/* Wyśrodkowanie całej zawartości na stronie produktu */
.product-detail-section .main-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 40px;
    background: white;
    border-bottom: 1px solid #dee2e6;
    margin-bottom: 40px;
}

.product-detail-header {
    flex: 1;
    margin: 0;
    padding: 0;
    background: none;
    border: none;
}

.product-detail-header::after {
    display: none;
}

/* Zagwarantuj że koszyk jest w prawym górnym rogu */
.product-detail-section .header-actions {
    display: flex;
    align-items: center;
}

.product-detail-section .cart-button {
    background: #2F7DFF;
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
    box-shadow: 0 2px 4px rgba(47, 125, 255, 0.2);
}

.product-detail-section .cart-button:hover {
    background: #1d4ed8;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(47, 125, 255, 0.3);
}

/* Stylowanie przycisku powrotu */
.product-detail-header .btn-outline-primary {
    border: 2px solid #2F7DFF;
    color: #2F7DFF;
    background: white;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.product-detail-header .btn-outline-primary:hover {
    background: #2F7DFF;
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(47, 125, 255, 0.3);
}

/* Główna sekcja produktu - centrowanie */
/* Duplikat usunięty - style są już zdefiniowane wcześniej */

.product-main-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    margin-bottom: 40px;
    align-items: start;
    background: linear-gradient(135deg, #ffffff 0%, #fafbfc 100%);
    border-radius: 24px;
    padding: 40px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.06);
    border: 1px solid #e5e7eb;
    position: relative;
    overflow: hidden;
}

.product-main-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(47, 125, 255, 0.01) 0%, rgba(139, 92, 246, 0.01) 100%);
    pointer-events: none;
    z-index: 1;
}

.product-main-section > * {
    position: relative;
    z-index: 2;
}

.product-variants-section {
    width: 100%;
    max-width: 95%;
    margin: 0 auto 40px auto;
    padding: 40px;
    background: linear-gradient(135deg, #ffffff 0%, #f8fafb 100%);
    border-radius: 16px;
    border: 1px solid rgba(229, 231, 235, 0.6);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
}

.product-content-section {
    width: 100%;
    max-width: 95%;
    margin: 0 auto;
    padding: 40px;
    background: linear-gradient(135deg, #ffffff 0%, #f8fafb 100%);
    border-radius: 16px;
    border: 1px solid rgba(229, 231, 235, 0.6);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
}

.product-detail-content-fullwidth {
    width: 100%;
    max-width: none;
    padding: 40px;
}

.content-grid .content-column:only-child {
    grid-column: 1 / -1;
}

.product-description {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
    padding: 24px;
    height: fit-content;
}

.product-description h6 {
    margin-bottom: 16px;
    color: #1f2937;
    font-size: 18px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
    border-bottom: 2px solid #f1f5f9;
    padding-bottom: 10px;
}

.product-description .description-content {
    line-height: 1.6;
    color: #4b5563;
    font-size: 14px;
}

.product-description .description-content p {
    margin: 0 0 12px;
}

.product-description .description-content p:last-child {
    margin-bottom: 0;
}

.product-description .description-content strong,
.product-description .description-content b {
    font-weight: 700;
    color: #0C0212;
}

.product-description .description-content ul,
.product-description .description-content ol {
    margin: 8px 0 12px 1.2em;
    padding: 0;
}

.product-description .description-content li {
    margin-bottom: 4px;
}

/* ===========================================================
   Allegro-style description layout (section / item / text-item / image-item)
   Allegro uses a 12-column grid: .item-12 = full row, .item-6 = half, etc.
   =========================================================== */
.allegro-description .section {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 20px;
    align-items: stretch;
}

.allegro-description .section:last-child {
    margin-bottom: 0;
}

.allegro-description .item {
    flex: 1 1 100%;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.allegro-description .item-1  { flex: 0 0 calc(8.3333% - 18.333px); }
.allegro-description .item-2  { flex: 0 0 calc(16.6666% - 16.666px); }
.allegro-description .item-3  { flex: 0 0 calc(25% - 15px); }
.allegro-description .item-4  { flex: 0 0 calc(33.3333% - 13.333px); }
.allegro-description .item-5  { flex: 0 0 calc(41.6666% - 11.666px); }
.allegro-description .item-6  { flex: 0 0 calc(50% - 10px); }
.allegro-description .item-7  { flex: 0 0 calc(58.3333% - 8.333px); }
.allegro-description .item-8  { flex: 0 0 calc(66.6666% - 6.666px); }
.allegro-description .item-9  { flex: 0 0 calc(75% - 5px); }
.allegro-description .item-10 { flex: 0 0 calc(83.3333% - 3.333px); }
.allegro-description .item-11 { flex: 0 0 calc(91.6666% - 1.666px); }
.allegro-description .item-12 { flex: 0 0 100%; }

/* Image block with shimmer placeholder */
.allegro-description .image-item {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    min-height: 180px;
    border-radius: 8px;
    overflow: hidden;
    background-color: #f1f5f9;
}

.allegro-description .image-item::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        90deg,
        rgba(241, 245, 249, 0) 0%,
        rgba(203, 213, 225, 0.65) 50%,
        rgba(241, 245, 249, 0) 100%
    );
    background-size: 200% 100%;
    background-repeat: no-repeat;
    animation: allegro-shimmer 1.4s ease-in-out infinite;
    pointer-events: none;
    z-index: 1;
    transition: opacity 0.35s ease;
}

/* Once the image is loaded, hide the shimmer and drop the min-height */
.allegro-description .image-item:has(img.img-loaded) {
    min-height: 0;
    background-color: transparent;
}

.allegro-description .image-item:has(img.img-loaded)::before {
    opacity: 0;
    animation: none;
}

.allegro-description .image-item img {
    position: relative;
    z-index: 2;
    max-width: 100%;
    height: auto;
    display: block;
    border-radius: 8px;
    object-fit: contain;
    opacity: 0;
    transform: scale(1.01);
    transition: opacity 0.45s ease, transform 0.45s ease;
}

.allegro-description .image-item img.img-loaded {
    opacity: 1;
    transform: scale(1);
}

.allegro-description .image-item img.img-error {
    opacity: 0.4;
    filter: grayscale(1);
}

@keyframes allegro-shimmer {
    0%   { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Fallback for browsers without :has() — script toggles this helper class */
.allegro-description .image-item.is-loaded {
    min-height: 0;
    background-color: transparent;
}
.allegro-description .image-item.is-loaded::before {
    opacity: 0;
    animation: none;
}

/* Respect reduced motion preferences */
@media (prefers-reduced-motion: reduce) {
    .allegro-description .image-item::before {
        animation: none;
    }
    .allegro-description .image-item img {
        transition: opacity 0.2s ease;
        transform: none;
    }
}

/* Text block */
.allegro-description .text-item {
    width: 100%;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.allegro-description .text-item h1,
.allegro-description .text-item h2 {
    font-size: 18px;
    font-weight: 700;
    color: #1f2937;
    margin: 0 0 12px;
    line-height: 1.35;
}

.allegro-description .text-item p {
    margin: 0 0 10px;
    line-height: 1.6;
    color: #374151;
    font-size: 14px;
}

.allegro-description .text-item p:last-child {
    margin-bottom: 0;
}

.allegro-description .text-item b,
.allegro-description .text-item strong {
    color: #111827;
    font-weight: 700;
}

.allegro-description .text-item ul,
.allegro-description .text-item ol {
    margin: 0 0 10px;
    padding-left: 20px;
    color: #374151;
    font-size: 14px;
    line-height: 1.6;
}

.allegro-description .text-item li {
    margin-bottom: 4px;
}

/* Mobile: every item takes the full row (Allegro behaves the same way) */
@media (max-width: 768px) {
    .allegro-description .section {
        gap: 14px;
        margin-bottom: 14px;
    }
    .allegro-description .item[class*="item-"] {
        flex: 0 0 100%;
    }
    .allegro-description .text-item h1,
    .allegro-description .text-item h2 {
        font-size: 16px;
    }
}

.product-features {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
    padding: 24px;
    height: fit-content;
}

.product-features h6 {
    font-size: 18px;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    border-bottom: 2px solid #f1f5f9;
    padding-bottom: 10px;
}

.features-list {
    list-style: none;
    padding: 0;
    margin: 0;
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 1px 6px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    border: 1px solid #e2e8f0;
}

.features-list li {
    padding: 12px 16px;
    border-bottom: 1px solid #f1f5f9;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: background-color 0.2s ease;
    font-size: 14px;
    color: #4b5563;
}

.features-list li:hover {
    background-color: #f8fafc;
}

.features-list li:last-child {
    border-bottom: none;
}

.features-list li::before {
    content: '✓';
    color: #10b981;
    font-weight: bold;
    font-size: 14px;
    width: 18px;
    height: 18px;
    background: #d1fae5;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    flex-shrink: 0;
}

.features-list li strong {
    color: #1f2937;
    font-weight: 600;
    min-width: 100px;
}

.content-column {
    width: 100%;
}

/* Lightbox/Modal dla galerii zdjęć */
.lightbox-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

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

.lightbox-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 8px;
}

.lightbox-close {
    position: absolute;
    top: -50px;
    right: 0;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: #333;
    cursor: pointer;
    transition: all 0.2s ease;
}

.lightbox-close:hover {
    background: white;
    transform: scale(1.1);
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.9);
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: #333;
    cursor: pointer;
    transition: all 0.2s ease;
}

.lightbox-nav:hover {
    background: white;
    transform: translateY(-50%) scale(1.1);
}

.lightbox-prev {
    left: -80px;
}

.lightbox-next {
    right: -80px;
}

/* Klikalne zdjęcia */
.product-slide-image {
    cursor: pointer;
    transition: transform 0.2s ease;
}

.product-slide-image:hover {
    transform: scale(1.02);
}

/* Responsywność */
@media (max-width: 1200px) {
    .product-detail-content {
        max-width: 1200px;
        padding: 0 20px;
    }
    
    .product-main-section {
        gap: 30px;
    }
}

@media (max-width: 992px) {
    .product-detail-content {
        max-width: 900px;
    }
    
    .product-main-section {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .lightbox-nav {
        display: none;
    }
    
    .lightbox-close {
        top: 20px;
        right: 20px;
    }
}

@media (max-width: 768px) {
    .product-detail-section {
        padding: 15px;
    }
    
    .product-detail-content {
        max-width: 100%;
        padding: 0 10px;
    }
    
    .product-main-section {
        gap: 20px;
    }
}

@media (max-width: 576px) {
    .product-detail-section {
        padding: 10px;
    }
    
    .product-detail-content {
        padding: 0 5px;
    }
    
    .lightbox-content {
        max-width: 95vw;
        max-height: 95vh;
    }
}

/* Styles dla modal checkout - płatności i dostawy */
.modal .tile-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    margin: 15px 0;
}

.modal .tile {
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    padding: 12px;
    display: flex;
    align-items: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background-color: #fff;
    min-height: 60px;
}

.modal .tile:hover {
    border-color: #2F7DFF;
    background-color: #f8faff;
}

.modal .tile.selected {
    border-color: #2F7DFF;
    background-color: #f0f7ff;
    box-shadow: 0 2px 8px rgba(47, 125, 255, 0.15);
}

.modal .tile img {
    width: 32px;
    height: 32px;
    min-width: 32px;
    margin-right: 12px;
    object-fit: contain;
    border-radius: 4px;
}

.modal .tile svg,
.modal .tile .icon-wrapper svg {
    width: 32px;
    height: 32px;
    min-width: 32px;
    margin-right: 12px;
}

.modal .tile .icon-wrapper {
    width: 32px;
    height: 32px;
    min-width: 32px;
    margin-right: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal .tile-content {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.modal .tile-title {
    font-weight: 600;
    font-size: 14px;
    color: #1f2937;
    margin-bottom: 2px;
}

.modal .tile-description {
    font-size: 12px;
    color: #6b7280;
}

/* Responsive dla modal */
@media (max-width: 768px) {
    .modal .tile {
        padding: 10px;
        min-height: 50px;
    }
    
    .modal .tile img,
    .modal .tile svg,
    .modal .tile .icon-wrapper svg,
    .modal .tile .icon-wrapper {
        width: 28px;
        height: 28px;
        min-width: 28px;
        margin-right: 10px;
    }
    
    .modal .tile-title {
        font-size: 13px;
    }
    
    .modal .tile-description {
        font-size: 11px;
    }
}

/* Starsze style tile (dla kompatybilności ze starym layoutem) */
.tile-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
}

.tile-container.is-invalid-tiles {
    border: 2px solid #dc3545;
    border-radius: 10px;
    padding: 10px;
}

.tile {
    border: 2px solid #ddd;
    border-radius: 5px;
    padding: 10px;
    display: flex;
    align-items: center;
    cursor: pointer;
    transition: all 0.3s ease;
    flex: 1 0 calc(33.333% - 10px);
    min-width: 150px;
    background-color: #fff;
}

.tile:hover {
    border-color: #2F7DFF;
    background-color: #f8faff;
}

.tile.selected {
    border-color: #2F7DFF;
    background-color: #f0f7ff;
}

.tile img {
    width: 32px;
    height: 32px;
    min-width: 32px;
    margin-right: 12px;
    object-fit: contain;
    flex-shrink: 0;
}

.tile svg {
    width: 32px;
    height: 32px;
    min-width: 32px;
    margin-right: 12px;
    object-fit: contain;
    fill: #2F7DFF;
    flex-shrink: 0;
}

.tile .icon-wrapper {
    width: 32px;
    height: 32px;
    min-width: 32px;
    margin-right: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.tile .icon-wrapper svg {
    width: 32px;
    height: 32px;
    min-width: 32px;
    margin-right: 0;
}

.tile .icon-wrapper i {
    color: #2F7DFF;
    font-size: 1.2rem;
    line-height: 1;
}

.checkout-section .tile img,
.checkout-section .tile svg,
.checkout-section .tile .icon-wrapper,
.checkout-section .tile .icon-wrapper svg {
    width: 32px;
    height: 32px;
    min-width: 32px;
    flex-shrink: 0;
}

.extra-field-download-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-left: 6px;
    vertical-align: middle;
}

.related-products-section {
    width: 100%;
    margin-top: 40px;
    padding-top: 24px;
    border-top: 1px solid #e5e7eb;
}

.related-products-title {
    font-family: 'Be Vietnam Pro', sans-serif;
    font-weight: 800;
    font-size: 1.25rem;
    color: #0C0212;
    margin: 0 0 20px 0;
}

.related-products-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.related-product-card {
    display: block;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    overflow: hidden;
    text-decoration: none;
    color: #0C0212;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.related-product-card:hover {
    border-color: #2F7DFF;
    box-shadow: 0 4px 16px rgba(47, 125, 255, 0.12);
    color: #0C0212;
}

.related-product-image {
    height: 160px;
    background: #f8fafc;
    display: flex;
    align-items: center;
    justify-content: center;
}

.related-product-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.related-product-image i {
    color: #94a3b8;
    font-size: 2rem;
}

.related-product-name {
    font-family: 'Mulish', sans-serif;
    font-weight: 700;
    font-size: 0.95rem;
    padding: 12px 14px 16px;
}

@media (max-width: 1199px) {
    .related-products-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 899px) {
    .related-products-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 575px) {
    .related-products-grid {
        grid-template-columns: 1fr;
    }
}

.tile-content {
    display: flex;
    flex-direction: column;
}

.tile-title {
    font-weight: bold;
    font-size: 14px;
}

.tile-description {
    font-size: 12px;
    color: #6c757d;
}

/* Style dla pól ilości produktu */
.quantity-section {
    margin-bottom: 20px;
}

.quantity-section .form-label {
    font-weight: 600;
    color: #374151;
    margin-bottom: 8px;
    font-size: 14px;
}

.quantity-input-group {
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    border: 2px solid #e5e7eb;
    border-radius: 16px;
    overflow: hidden;
    max-width: 220px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease;
    position: relative;
}

.quantity-input-group:hover {
    border-color: #cbd5e1;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
}

.quantity-input-group:focus-within {
    border-color: #2F7DFF;
    box-shadow: 0 6px 20px rgba(47, 125, 255, 0.15);
}

.quantity-btn {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    border: none;
    width: 40px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #475569;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    font-weight: 600;
    border-radius: 0;
}

.quantity-btn:first-child {
    border-radius: 14px 0 0 14px;
}

.quantity-btn:last-child {
    border-radius: 0 14px 14px 0;
}

.quantity-btn:hover {
    background: linear-gradient(135deg, #e2e8f0 0%, #cbd5e1 100%);
    color: #334155;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.quantity-btn:active {
    background: linear-gradient(135deg, #cbd5e1 0%, #94a3b8 100%);
    transform: translateY(0);
}

.quantity-input {
    border: none;
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    text-align: center;
    width: 70px;
    height: 44px;
    font-weight: 700;
    font-size: 16px;
    color: #111827;
    padding: 0;
    outline: none;
    border-left: 1px solid #e5e7eb;
    border-right: 1px solid #e5e7eb;
}

.quantity-input:focus {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    color: #0369a1;
}

.quantity-unit {
    padding: 0 12px;
    color: #6b7280;
    font-size: 14px;
    font-weight: 500;
    background: #f9fafb;
    height: 44px;
    display: flex;
    align-items: center;
    border-left: 1px solid #e5e7eb;
}

/* Style dla wariantów */
.variant-quantity-section {
    margin-bottom: 12px;
}

.variant-quantity-section .quantity-input-group {
    max-width: 160px;
}

.variant-quantity-section .quantity-btn {
    width: 30px;
    height: 36px;
    font-size: 12px;
}

.variant-quantity-section .quantity-input {
    width: 50px;
    height: 36px;
    font-size: 14px;
}

.variant-quantity-section .quantity-unit {
    padding: 0 8px;
    height: 36px;
    font-size: 12px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .quantity-input-group {
        max-width: 180px;
    }
    
    .quantity-btn {
        width: 32px;
        height: 40px;
    }
    
    .quantity-input {
        width: 50px;
        height: 40px;
        font-size: 14px;
    }
    
    .quantity-unit {
        padding: 0 8px;
        height: 40px;
        font-size: 12px;
    }
    
    .variant-quantity-section .quantity-input-group {
        max-width: 140px;
    }
    
    .variant-quantity-section .quantity-btn {
        width: 28px;
        height: 32px;
    }
    
    .variant-quantity-section .quantity-input {
        width: 40px;
        height: 32px;
        font-size: 12px;
    }
    
    .variant-quantity-section .quantity-unit {
        padding: 0 6px;
        height: 32px;
        font-size: 11px;
    }
}

/* Style dla przycisku na stronie produktu */
.add-main-product-to-cart {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 50%, #1e40af 100%) !important;
    border: 2px solid transparent !important;
    color: white !important;
    padding: 0 24px !important;
    font-size: 16px !important;
    font-weight: 700 !important;
    border-radius: 16px !important;
    height: 54px !important;
    min-height: 54px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 10px !important;
    transition: all 0.4s ease !important;
    text-decoration: none !important;
    cursor: pointer !important;
    white-space: nowrap !important;
    flex-shrink: 0 !important;
    box-shadow: 0 6px 24px rgba(37, 99, 235, 0.25) !important;
    letter-spacing: 0.5px !important;
    position: relative !important;
    overflow: hidden !important;
}

.add-main-product-to-cart::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.6s ease;
    z-index: 1;
}

.add-main-product-to-cart:hover::before {
    left: 100%;
}

.add-main-product-to-cart > * {
    position: relative;
    z-index: 2;
}

.add-main-product-to-cart:hover {
    background: linear-gradient(135deg, #1d4ed8 0%, #1e40af 50%, #1e3a8a 100%) !important;
    border-color: #1d4ed8 !important;
    color: white !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 8px 32px rgba(37, 99, 235, 0.4) !important;
}

.add-main-product-to-cart:focus {
    background: linear-gradient(135deg, #1d4ed8 0%, #1e40af 50%, #1e3a8a 100%) !important;
    border-color: #1d4ed8 !important;
    color: white !important;
    box-shadow: 0 0 0 0.2rem rgba(37, 99, 235, 0.25) !important;
}

.add-main-product-to-cart:active {
    background: linear-gradient(135deg, #1e40af 0%, #1e3a8a 50%, #1e3a8a 100%) !important;
    border-color: #1e40af !important;
    transform: translateY(0) !important;
}

/* Responsive layout dla quantity i przycisku */
@media (max-width: 576px) {
    .quantity-section .d-flex {
        flex-direction: column !important;
        gap: 12px !important;
        align-items: stretch !important;
    }
    
    .add-main-product-to-cart {
        width: 100% !important;
        justify-content: center !important;
    }
}

/* Mobile Header - ukryty domyślnie */
.mobile-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--mobile-header-height);
    background: var(--sidebar-bg-color);
    color: white;
    z-index: 950;
    display: none !important; /* Ukryj na desktop */
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    overflow: hidden;
}

.mobile-header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
    padding: 0 16px;
    min-height: var(--mobile-header-height);
}

.mobile-header-left {
    display: flex;
    align-items: center;
    gap: 12px;
    height: 100%;
    min-width: 0;
    flex: 1 1 auto;
}

.mobile-header-right {
    display: flex;
    align-items: center;
    gap: 8px;
    height: 100%;
    flex-shrink: 0;
}

/* Hamburger Menu - lepsze wyrównanie */
.hamburger-menu {
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 40px;
    height: 40px;
    position: relative;
    border-radius: 6px;
    transition: background-color 0.2s ease;
    margin: auto 0; /* Wyrównanie w pionie */
    flex-shrink: 0;
}

.mobile-logo {
    display: flex;
    align-items: center;
    cursor: pointer;
    height: 100%;
    max-height: 100%;
    min-width: 0;
    max-width: min(200px, 46vw);
    overflow: hidden;
}

.mobile-header .mobile-logo img,
.mobile-header .logo-dynamic {
    height: auto !important;
    width: auto;
    max-height: calc(var(--mobile-header-height) - 16px);
    max-width: 100%;
    object-fit: contain;
}

/* Ładne ikony w mobile header - poprawione wyrównanie */
.mobile-cart, .mobile-search-toggle {
    background: transparent !important;
    border: 1px solid rgba(255,255,255,0.2) !important;
    color: #ffffff !important;
    padding: 0 !important;
    border-radius: 8px !important;
    font-size: 16px !important;
    width: 40px !important;
    height: 40px !important;
    min-width: 40px !important;
    min-height: 40px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: all 0.2s ease !important;
    margin: auto 0 !important; /* Wyrównanie w pionie */
}

.mobile-cart:hover, .mobile-search-toggle:hover {
    background: rgba(255, 255, 255, 0.1) !important;
    border-color: rgba(255,255,255,0.4) !important;
    transform: translateY(-1px);
}

/* Przycisk powrotu - responsywne stylowanie */
.product-detail-header {
    margin: 15px 0;
    padding: 0 20px;
}

.product-detail-header .btn-outline-primary {
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    background: transparent;
    font-weight: 600;
    padding: 10px 20px;
    border-radius: 8px;
    transition: all 0.2s ease;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.product-detail-header .btn-outline-primary:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(47, 125, 255, 0.3);
}

.product-detail-header .btn-outline-primary:focus {
    box-shadow: 0 0 0 0.2rem rgba(47, 125, 255, 0.25);
    outline: none;
}

.product-detail-header .btn-outline-primary i {
    font-size: 12px;
    transition: transform 0.2s ease;
}

.product-detail-header .btn-outline-primary:hover i {
    transform: translateX(-2px);
}

/* Mobile responsywność dla przycisku powrotu */
@media (max-width: 990px) {
    .product-detail-header {
        margin: 10px 0;
        padding: 0 15px;
    }
    
    .product-detail-header .btn-outline-primary {
        padding: 8px 16px;
        font-size: 13px;
        border-width: 1px;
        border-radius: 6px;
    }
    
    .product-detail-header .btn-outline-primary i {
        font-size: 11px;
    }
}

@media (max-width: 576px) {
    .product-detail-header {
        margin: 8px 0;
        padding: 0 10px;
    }
    
    .product-detail-header .btn-outline-primary {
        padding: 6px 12px;
        font-size: 12px;
        width: auto;
        min-width: auto;
    }
    
    .product-detail-header .btn-outline-primary i {
        font-size: 10px;
    }
}

/* Sidebar Overlay */
.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 950;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

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

/* Mobile search bar */
.mobile-search-bar {
    position: fixed;
    top: var(--mobile-header-height);
    left: 0;
    right: 0;
    background: var(--sidebar-bg-color);
    padding: 20px 15px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    transform: translateY(-100%);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 995;
    box-shadow: 0 8px 32px rgba(0,0,0,0.2);
    backdrop-filter: blur(10px);
    display: block; /* Pokaż na mobile */
}

@media (max-width: 990px) {
    .mobile-search-bar {
        display: block !important; /* Zawsze widoczny na mobile */
    }
}

@media (min-width: 991px) {
    .mobile-search-bar {
        display: none !important; /* Ukryj na desktop */
    }
}

.mobile-search-bar.active {
    transform: translateY(0) !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* Zapobieganie przewijaniu przy otwieraniu mobile search */
.mobile-search-toggle {
    scroll-behavior: auto !important;
    position: relative;
}

.mobile-search-toggle:focus {
    scroll-behavior: auto !important;
}

.mobile-search-content {
    max-width: 1200px;
    margin: 0 auto;
}

.mobile-search-bar .input-group {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.mobile-search-bar .form-control {
    background: white;
    border: 2px solid #e5e7eb;
    border-right: none;
    border-radius: 12px 0 0 12px;
    padding: 12px 16px;
    font-size: 16px;
    color: #333;
    transition: all 0.3s ease;
    height: 48px;
}

.mobile-search-bar .form-control:focus {
    border-color: #e5e7eb;
    box-shadow: none;
    outline: none;
    background: white;
}

.mobile-search-bar .form-control::placeholder {
    color: #6b7280;
}

.mobile-search-bar .btn {
    background: linear-gradient(135deg, #2F7DFF 0%, #1d5bb8 100%);
    border: 2px solid #2F7DFF;
    border-left: none;
    color: white;
    border-radius: 0 12px 12px 0;
    padding: 12px 20px;
    font-weight: 600;
    transition: all 0.3s ease;
    height: 48px;
    box-shadow: 0 4px 12px rgba(47, 125, 255, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
}

.mobile-search-bar .btn:hover,
.mobile-search-bar .btn:focus,
.mobile-search-bar .btn:active {
    background: linear-gradient(135deg, #1d5bb8 0%, #0f3d7a 100%) !important;
    border-color: #1d5bb8 !important;
    border-left: none !important;
    color: white !important;
    outline: none !important;
    box-shadow: 0 4px 12px rgba(47, 125, 255, 0.4) !important;
}

/* Style dla przycisku close usunięte - nie ma już przycisku X */

.mobile-search-bar .list-group {
    background: rgba(255,255,255,0.95);
    border-radius: 12px;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.1);
    border: none;
    overflow: hidden;
}

.mobile-search-bar .list-group-item {
    background: transparent;
    border: none;
    border-bottom: 1px solid rgba(0,0,0,0.05);
    padding: 12px 16px;
    transition: all 0.2s ease;
}

.mobile-search-bar .list-group-item:hover {
    background: rgba(102, 126, 234, 0.1);
}

.mobile-search-bar .list-group-item:last-child {
    border-bottom: none;
}

/* Show desktop search on desktop */
@media (min-width: 991px) {
    .desktop-search {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
        width: 400px;
        margin-right: 20px;
    }
}

/* Hide desktop search on mobile */
@media (max-width: 990px) {
    .desktop-search {
        display: none !important;
    }
}

@media (max-width: 990px) {
    .desktop-only {
        display: none !important;
    }
}

/* Style dla dropdown z wariantami */
.variant-selection-section {
    margin-bottom: 20px;
}

.variant-selection-section .form-label {
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: 8px;
}

.variant-selection-section .form-select {
    border: 2px solid var(--gray-200);
    border-radius: 8px;
    padding: 12px 16px;
    font-size: 14px;
    transition: all 0.2s ease;
    background-color: white;
}

.variant-selection-section .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(47, 125, 255, 0.25);
    outline: none;
}

.variant-details {
    background: var(--gray-50);
    border: 1px solid var(--gray-200);
    border-radius: 8px;
    padding: 12px 16px;
    margin-top: 12px;
}

.variant-info {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.variant-price-display {
    font-size: 18px;
    font-weight: 700;
    color: var(--primary-color);
}

.variant-stock-display {
    font-size: 14px;
    color: var(--gray-600);
}

.variant-stock-display.in-stock {
    color: #28a745;
}

.variant-stock-display.out-of-stock {
    color: #dc3545;
}

.variant-sku-display {
    font-size: 12px;
    color: var(--gray-500);
    font-family: 'Courier New', monospace;
}

/* Responsive dla dropdown wariantów */
@media (max-width: 576px) {
    .variant-selection-section .form-select {
        font-size: 13px;
        padding: 10px 12px;
    }
    
    .variant-details {
        padding: 10px 12px;
    }
    
    .variant-price-display {
        font-size: 16px;
    }
}

/* RESPONSYWNOŚĆ OBRAZÓW W PRODUCTS.PHP NA MOBILE */
.product-slide-image {
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    object-fit: contain !important;
    max-height: 350px !important; /* Ustaw maksymalną wysokość */
}

.product-gallery-swiper,
.product-main-swiper,
.product-thumbs-swiper {
    width: 100% !important;
    max-width: 100% !important;
    overflow: hidden !important; /* Zapobiega wychodzeniu poza kontener */
}

.product-main-swiper .swiper-slide {
    width: 100% !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    overflow: hidden !important;
}

/* Galeria na mobile - ograniczenie szerokości */
.product-detail-images {
    max-width: 100%;
    overflow: hidden;
    margin: 0 auto; /* Wyśrodkowanie */
}

/* Sidebar styling improvements for mobile */
@media (max-width: 990px) {
    .sidebar {
        background: var(--sidebar-bg-color);
        color: var(--sidebar-text-color);
    }
    
    /* Lepsze stylowanie sekcji w sidebar na mobile */
    .sidebar .sidebar-section {
        margin-bottom: 0;
        border-bottom: 1px solid rgba(255,255,255,0.1);
    }
    
    .sidebar .sidebar-section:last-child {
        border-bottom: none;
    }
    
    .sidebar .sidebar-section-title {
        font-size: 12px;
        font-weight: 600;
        text-transform: uppercase;
        letter-spacing: 0.5px;
        color: rgba(255,255,255,0.7);
        padding: 15px 20px 10px 20px;
        margin-bottom: 0;
        border-bottom: none;
    }
    
    .sidebar .sidebar-menu {
        padding-bottom: 15px;
    }
    
    .sidebar .sidebar-menu-item {
        margin: 0;
    }
    
    .sidebar .sidebar-menu-link {
        display: flex;
        align-items: center;
        padding: 12px 20px;
        color: rgba(255,255,255,0.9);
        text-decoration: none;
        font-size: 14px;
        font-weight: 500;
        transition: all 0.2s ease;
        border-left: 3px solid transparent;
    }
    
    .sidebar .sidebar-menu-link:hover,
    .sidebar .sidebar-menu-link:focus {
        background: rgba(255,255,255,0.08);
        color: white;
        border-left-color: var(--primary-color);
        outline: none;
        text-decoration: none;
    }

    .sidebar .sidebar-menu-link:active {
        background: #2F7DFF !important;
        color: white !important;
        border-left-color: var(--primary-color) !important;
        outline: none;
        text-decoration: none;
    }

    .sidebar .sidebar-menu-link:active .sidebar-menu-icon {
        color: white !important;
    }

    .sidebar .sidebar-menu-link.active,
    .sidebar .sidebar-menu-link.active:hover,
    .sidebar .sidebar-menu-link.active:focus,
    .sidebar .sidebar-menu-link.active:active {
        background: #2F7DFF !important;
        color: white !important;
        border-left-color: var(--primary-color) !important;
        outline: none;
    }
    
    .sidebar .sidebar-menu-icon {
        width: 20px;
        height: 20px;
        margin-right: 12px;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 14px;
        color: rgba(255,255,255,0.8);
    }
    
    .sidebar .sidebar-menu-link:hover .sidebar-menu-icon,
    .sidebar .sidebar-menu-link.active .sidebar-menu-icon {
        color: white !important; /* Biała ikona dla aktywnego menu na mobile */
    }
}

/* Smooth scrolling dla body z otwartym sidebarau */
body.sidebar-open {
    overflow: hidden;
    position: fixed;
    width: 100%;
    top: 0;
    left: 0;
}

/* Focus states dla accessibility */
.hamburger-menu:focus {
    outline: 2px solid rgba(255, 255, 255, 0.8);
    outline-offset: 2px;
}

.sidebar-menu-link:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: -2px;
    background: rgba(255,255,255,0.1);
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .mobile-header {
        border-bottom: 2px solid white;
    }
    
    .hamburger-menu span {
        background: white;
    }
    
    .sidebar {
        border-right: 2px solid white;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .sidebar, .main-content, .sidebar-overlay, .hamburger-menu span, .mobile-search-bar {
        transition: none;
    }
}

.hamburger-menu:hover {
    background: rgba(255, 255, 255, 0.1);
}

.hamburger-menu span {
    display: block;
    width: 20px;
    height: 2px;
    background: white;
    margin: 2px 0;
    transition: all 0.3s ease;
    transform-origin: center;
}

.hamburger-menu.active span:nth-child(1) {
    transform: rotate(45deg) translate(4px, 4px);
}

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

.hamburger-menu.active span:nth-child(3) {
    transform: rotate(-45deg) translate(4px, -4px);
}

/* Sidebar bez logo na mobile i ładny design */
@media (max-width: 990px) {
    .sidebar {
        transform: translateX(-100%) !important;
        width: 280px;
        z-index: 1002;
        border-right: none;
        top: var(--mobile-header-height);
        height: calc(100vh - var(--mobile-header-height));
        padding-top: 0; /* Usuwa padding na górze */
    }
    
    /* Ukryj logo w sidebar na mobile */
    .sidebar .sidebar-header {
        display: none !important;
    }
    
    /* Pierwszy section bliżej góry */
    .sidebar .sidebar-section:first-child {
        margin-top: 20px;
    }
    
    /* Margines dla sekcji "Moje konto" na mobile */
    .sidebar .sidebar-account-section {
        margin-top: 10px;
        padding-top: 12px;
        border-top: 1px solid rgba(155, 163, 173, 0.1);
    }

    .main-content {
        margin-left: 0;
        padding-top: var(--mobile-header-height);
    }
    
    /* MOBILE HEADER DISPLAY */
    .mobile-header {
        display: block !important;
    }
    
    /* Pokaż mobile search bar na mobile */
    .mobile-search-bar {
        display: block;
    }
    
    /* RESPONSYWNA KARTA PRODUKTU NA MOBILE */
    .product-detail-content-fullwidth {
        padding: 2px !important;
        overflow-x: hidden; /* Zapobiega poziomemu scrollowi */
    }
    
    .product-main-section {
        flex-direction: column;
        gap: 20px;
        width: 100% !important;
        max-width: 100% !important;
        padding: 8px !important;
        margin: 0 !important;
        box-sizing: border-box !important;
        border: none !important;
        border-radius: 0 !important;
        box-shadow: none !important;
        background: transparent !important;
    }
    
    /* Galeria wyśrodkowana na mobile */
    .product-detail-images {
        width: 100%;
        margin: 0 auto 20px auto;
        text-align: center;
    }
    
    /* Informacje o produkcie - tytuł i treść do lewej */
    .product-detail-info {
        text-align: left;
        padding: 0 4px !important;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }
    
    .product-detail-info h1 {
        text-align: left;
        margin-bottom: 15px;
        font-size: 1.4rem;
        line-height: 1.3;
    }
    
    /* SKU/EAN do lewej */
    .product-detail-meta {
        text-align: left;
        justify-content: flex-start;
    }
    
    /* Quantity controls i przycisk w jednej linii na mobile */
    .add-to-cart-section {
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        gap: 15px !important;
        margin-top: 20px;
    }
    
    .quantity-section {
        flex: 0 0 auto;
    }
    
    .add-main-product-to-cart {
        flex: 1;
        max-width: 200px;
        height: 44px;
        font-size: 14px;
        padding: 0 15px;
    }
    
    /* Variant quantity też w jednej linii */
    .variant-cart-section {
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        gap: 15px !important;
        margin-top: 15px;
    }
    
    .variant-quantity-section {
        flex: 0 0 auto;
    }
    
    #add-variant-to-cart {
        flex: 1;
        max-width: 200px;
        height: 44px;
        font-size: 14px;
        padding: 0 15px;
    }
}

/* Products.php specific mobile styles */
@media (max-width: 990px) {
    /* Product detail specific overrides */
    .product-detail-content-fullwidth {
        padding: 2px !important;
        overflow-x: hidden !important; /* Zapobiega poziomemu scrollowi */
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }
    
    .product-main-section {
        flex-direction: column;
        gap: 20px;
        width: 100% !important;
        max-width: 100% !important;
        padding: 8px !important;
        margin: 0 !important;
        overflow-x: hidden;
        box-sizing: border-box;
        border: none !important;
        border-radius: 0 !important;
        box-shadow: none !important;
        background: transparent !important;
    }
    
    /* Usuń gradientowe tło na mobile */
    .product-main-section::before {
        display: none !important;
    }
    
    /* Galeria wyśrodkowana na mobile */
    .product-detail-images {
        width: 100%;
        max-width: 100%;
        margin: 0 auto 20px auto;
        text-align: center;
        overflow-x: hidden;
        box-sizing: border-box;
    }
    
    /* Image swiper containers */
    .product-gallery-swiper,
    .product-main-swiper,
    .product-thumbs-swiper {
        width: 100% !important;
        max-width: 100% !important;
        overflow: hidden !important; /* Zapobiega wychodzeniu poza kontener */
        box-sizing: border-box !important;
    }
    
    .product-main-swiper .swiper-slide {
        width: 100% !important;
        max-width: 100% !important;
        display: flex !important;
        justify-content: center !important;
        align-items: center !important;
        overflow: hidden !important;
        box-sizing: border-box !important;
    }
    
    /* Product images responsive */
    .product-slide-image {
        width: 100% !important;
        max-width: 100% !important;
        height: auto !important;
        object-fit: contain !important;
        max-height: 350px !important;
        box-sizing: border-box !important;
    }
    
    /* Product info section */
    .product-detail-info {
        text-align: left;
        padding: 0 4px !important;
        width: 100% !important;
        max-width: 100% !important;
        overflow-x: hidden;
        box-sizing: border-box;
    }
    
    .product-detail-info h1 {
        text-align: left;
        margin-bottom: 15px;
        font-size: 1.4rem;
        line-height: 1.3;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }
    
    /* Meta info */
    .product-detail-meta {
        text-align: left;
        justify-content: flex-start;
        width: 100%;
        max-width: 100%;
        overflow-x: hidden;
        flex-wrap: wrap;
    }
    
    /* Cart section responsive */
    .add-to-cart-section {
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        gap: 15px !important;
        margin-top: 20px;
        width: 100%;
        max-width: 100%;
        overflow-x: hidden;
        box-sizing: border-box;
    }
    
    .quantity-section {
        flex: 0 0 auto;
        min-width: 120px;
    }
    
    .add-main-product-to-cart {
        flex: 1;
        max-width: 200px;
        height: 44px;
        font-size: 14px;
        padding: 0 15px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    /* Variant section responsive */
    .variant-cart-section {
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        gap: 15px !important;
        margin-top: 15px;
        width: 100%;
        max-width: 100%;
        overflow-x: hidden;
        box-sizing: border-box;
    }
    
    .variant-quantity-section {
        flex: 0 0 auto;
        min-width: 120px;
    }
    
    #add-variant-to-cart {
        flex: 1;
        max-width: 200px;
        height: 44px;
        font-size: 14px;
        padding: 0 15px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    /* Content containers */
    .content-column {
        width: 100%;
        max-width: 100%;
        overflow-x: hidden;
        box-sizing: border-box;
    }
    
    /* Search results */
    #product-list {
        width: 100%;
        max-width: 100%;
        overflow-x: hidden;
        box-sizing: border-box;
    }
    
    .list-group-item {
        word-wrap: break-word;
        overflow-wrap: break-word;
    }
}

/* ===================================
   GLOBAL OVERFLOW-X FIXES
   =================================== */

/* Fix horizontal scroll issues */
.input-group {
    width: 100% !important;
    max-width: 100% !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
}

.input-group .form-control {
    min-width: 0 !important;
    flex: 1 !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
}

.input-group .btn {
    flex-shrink: 0 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    box-sizing: border-box !important;
}

/* DODATKOWE POPRAWKI DLA SZEROKOŚCI NA MOBILE */
@media (max-width: 990px) {
    .main-content {
        padding-left: 5px !important;
        padding-right: 5px !important;
    }
    .content-area {
        padding-left: 3px !important;
        padding-right: 3px !important;
    }
    .product-content-section {
        margin-left: 0 !important;
        margin-right: 0 !important;
        padding-left: 10px !important;
        padding-right: 10px !important;
    }
    .product-description, .product-features {
        margin-left: 0 !important;
        margin-right: 0 !important;
        padding-left: 15px !important;
        padding-right: 15px !important;
    }
}

@media (max-width: 767px) {
    .main-content {
        padding-left: 2px !important;
        padding-right: 2px !important;
    }
    .content-area {
        padding-left: 1px !important;
        padding-right: 1px !important;
    }
    .product-content-section {
        padding-left: 5px !important;
        padding-right: 5px !important;
    }
    .product-description, .product-features {
        padding-left: 10px !important;
        padding-right: 10px !important;
    }
}

/* ===================================
   MOBILE STYLING FOR PRODUCT-CONTENT-SECTION
   =================================== */

/* Mobile wyśrodkowanie dla product-content-section */
@media (max-width: 990px) {
    .product-content-section {
        margin: 0 auto !important;
        text-align: center !important;
        width: 95% !important;
        max-width: 100% !important;
        padding: 20px 15px !important;
        border: none !important;
        box-shadow: none !important;
        background: transparent !important;
    }
    
    /* Wyśrodkuj content grid na mobile */
    .content-grid {
        justify-items: center !important;
        text-align: center !important;
    }
    
    /* Wyrównaj kolumny content do środka */
    .content-column {
        text-align: left !important; /* Treść w kolumnach do lewej */
        max-width: 100% !important;
        margin: 0 auto !important;
    }
}

@media (max-width: 767px) {
    .product-content-section {
        padding: 15px 10px !important;
        width: 98% !important;
    }
}

@media (max-width: 576px) {
    .product-content-section {
        padding: 10px 5px !important;
        width: 100% !important;
        margin: 0 !important;
    }
}

/* ===================================
   GLOBAL OVERFLOW-X FIXES
   =================================== */

/* ===================================
   FINAL OVERRIDE FOR PRODUCT-CONTENT-SECTION
   =================================== */

/* Usuń obramowanie z product-content-section na wszystkich rozdzielczościach */
.product-content-section {
    border: none !important;
}

/* Mobile - wyśrodkuj product-content-section */
@media (max-width: 990px) {
    .product-content-section {
        margin: 0 auto !important;
        text-align: center !important;
        border: none !important;
        box-shadow: none !important;
        background: transparent !important;
    }
    
    .content-grid {
        justify-items: center !important;
        text-align: center !important;
    }
    
    .content-column {
        text-align: left !important;
        max-width: 100% !important;
        margin: 0 auto !important;
    }
}

/* Na mobile od razu ukryj sidebar aby nie było mignięcia */
@media (max-width: 990px) {
    .sidebar {
        transform: translateX(-100%) !important;
    }
}

/* ===================================
   GOOGLE RECAPTCHA FIXES
   =================================== */

/* Poprawki dla Google reCAPTCHA - zapewnia że nie ukrywa się pod produktami */
.g-recaptcha, 
#g-recaptcha {
    z-index: 2000 !important;
}

/* Badge w prawym dolnym rogu - zwiększa z-index */
.grecaptcha-badge {
    z-index: 2000 !important;
}

/* Modal overlay dla reCAPTCHA popup */
.grecaptcha-overlay {
    z-index: 2100 !important;
}

/* ===================================
   MOBILE Z-INDEX FIXES
   =================================== */

/* Na mobile - przywróć oryginalne z-index dla prawidłowego działania */
@media (max-width: 990px) {
    .mobile-header {
        z-index: 1040 !important; /* Wyższy niż sidebar (1030) na mobile */
    }
    
    .sidebar-overlay {
        z-index: 1035 !important; /* Między sidebar a mobile header */
    }
    
    .mobile-search-bar {
        z-index: 1020 !important; /* Pod mobile header ale nad sidebar */
    }
}

/* ===================================
   COMPLETE MODAL OVERRIDE - NO BOOTSTRAP INTERFERENCE
   =================================== */

/* NUCLEAR OPTION - Override everything with maximum specificity */
#userModal.modal .modal-dialog.modal-admin,
#clientModal.modal .modal-dialog.modal-admin,
#deleteConfirmModal.modal .modal-dialog.modal-admin,
.modal#userModal .modal-dialog.modal-admin,
.modal#clientModal .modal-dialog.modal-admin,
.modal#deleteConfirmModal .modal-dialog.modal-admin {
    position: relative !important;
    width: 50% !important;
    max-width: 600px !important;
    min-width: 400px !important;
    margin: 1.75rem auto !important;
    pointer-events: none !important;
    transform: none !important;
    left: auto !important;
    right: auto !important;
    top: auto !important;
    bottom: auto !important;
}

/* ULTRA SPECIFIC MODAL CONTENT OVERRIDE */
#userModal.modal .modal-dialog.modal-admin .modal-content,
#clientModal.modal .modal-dialog.modal-admin .modal-content,
#deleteConfirmModal.modal .modal-dialog.modal-admin .modal-content,
.modal#userModal .modal-dialog.modal-admin .modal-content,
.modal#clientModal .modal-dialog.modal-admin .modal-content,
.modal#deleteConfirmModal .modal-dialog.modal-admin .modal-content,
#userModal .modal-content,
#clientModal .modal-content,
#deleteConfirmModal .modal-content {
    position: relative !important;
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
    max-width: 100% !important;
    pointer-events: auto !important;
    background-color: #fff !important;
    background-clip: padding-box !important;
    border: 1px solid rgba(0, 0, 0, .2) !important;
    border-radius: .5rem !important;
    outline: 0 !important;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15) !important;
    margin: 0 !important;
    left: auto !important;
    right: auto !important;
    top: auto !important;
    bottom: auto !important;
    transform: none !important;
}

/* Alternative approach - Direct style injection */
.modal-dialog.modal-admin {
    position: relative !important;
    width: 50% !important;
    max-width: 600px !important;
    min-width: 400px !important;
    margin: 1.75rem auto !important;
    pointer-events: none !important;
    display: block !important;
    transform: none !important;
}

.modal-dialog.modal-admin .modal-content {
    position: relative !important;
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
    max-width: 100% !important;
    pointer-events: auto !important;
    background-color: #fff !important;
    background-clip: padding-box !important;
    border: 1px solid rgba(0, 0, 0, .2) !important;
    border-radius: .5rem !important;
    outline: 0 !important;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15) !important;
    margin: 0 !important;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    #userModal.modal .modal-dialog.modal-admin,
    #clientModal.modal .modal-dialog.modal-admin,
    #deleteConfirmModal.modal .modal-dialog.modal-admin,
    .modal-dialog.modal-admin {
        width: 90% !important;
        max-width: 90% !important;
        min-width: 280px !important;
        margin: 1rem auto !important;
    }
}

@media (max-width: 576px) {
    #userModal.modal .modal-dialog.modal-admin,
    #clientModal.modal .modal-dialog.modal-admin,
    #deleteConfirmModal.modal .modal-dialog.modal-admin,
    .modal-dialog.modal-admin {
        width: 95% !important;
        max-width: 95% !important;
        min-width: 250px !important;
                 margin: 0.5rem auto !important;
     }
}

/* ===================================
   JAVASCRIPT HELPER STYLES - FORCE INLINE STYLES
   =================================== */

/* Force styles that JavaScript will apply */
.force-modal-width {
    width: 50% !important;
    max-width: 600px !important;
}

.force-modal-center {
    margin: 1.75rem auto !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    position: relative !important;
}

.force-modal-center {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

/* Kompaktowy Modal Sukcesu Zamówienia */
.custom-success-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.custom-success-modal.show {
    opacity: 1;
    visibility: visible;
}

.custom-success-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(3px);
}

.custom-success-content {
    position: relative;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    max-width: 400px !important;
    width: 90%;
    padding: 0;
    transform: scale(0.9) translateY(20px);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.custom-success-modal.show .custom-success-content {
    transform: scale(1) translateY(0);
}

.success-icon-container {
    text-align: center;
    padding: 30px 30px 20px;
    background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
    border-radius: 16px 16px 0 0;
}

.success-icon {
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.success-icon i {
    font-size: 28px;
    color: #ffffff;
}

.success-header {
    text-align: center;
    padding: 20px 30px 15px;
}

.success-header h2 {
    font-family: 'Be Vietnam Pro', sans-serif;
    font-weight: 700;
    font-size: 22px;
    color: #2d3436;
    margin: 0 0 8px;
    line-height: 1.2;
}

.success-header p {
    font-family: 'Mulish', sans-serif;
    font-weight: 400;
    font-size: 14px;
    color: #6c757d;
    margin: 0;
}

.success-body {
    padding: 0 30px 30px;
}

.order-info {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
    border-left: 4px solid #4CAF50;
}

.order-number {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    flex-wrap: wrap;
    gap: 8px;
}

.order-number .label {
    font-family: 'Mulish', sans-serif;
    font-weight: 600;
    color: #495057;
    font-size: 13px;
}

.order-number .value {
    font-family: 'Be Vietnam Pro', sans-serif;
    font-weight: 700;
    color: #2d3436;
    font-size: 16px;
    background: #ffffff;
    padding: 6px 12px;
    border-radius: 6px;
    border: 2px solid #e9ecef;
}

.order-message {
    font-family: 'Mulish', sans-serif;
    font-weight: 400;
    color: #6c757d;
    margin: 0;
    font-size: 13px;
    line-height: 1.4;
}

.countdown-section {
    text-align: center;
    margin-bottom: 20px;
    padding: 15px;
    background: linear-gradient(135deg, #e3f2fd 0%, #f3e5f5 100%);
    border-radius: 10px;
    border: 1px solid #e1f5fe;
}

.countdown-section p {
    font-family: 'Mulish', sans-serif;
    font-weight: 500;
    color: #495057;
    margin: 0;
    font-size: 13px;
}

.countdown-number {
    font-family: 'Be Vietnam Pro', sans-serif;
    font-weight: 700;
    color: #2F7DFF;
    font-size: 16px;
    background: #ffffff;
    padding: 3px 10px;
    border-radius: 5px;
    border: 2px solid #2F7DFF;
    display: inline-block;
    min-width: 25px;
    text-align: center;
}

.success-actions {
    display: flex;
    gap: 12px;
    flex-direction: column;
}

.success-btn {
    font-family: 'Mulish', sans-serif;
    font-weight: 600;
    padding: 12px 20px;
    border-radius: 10px;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 14px;
    text-decoration: none;
}

.success-btn.primary {
    background: linear-gradient(135deg, #2F7DFF 0%, #1e5bb8 100%);
    color: #ffffff;
    box-shadow: 0 3px 12px rgba(47, 125, 255, 0.3);
}

.success-btn.primary:hover {
    background: linear-gradient(135deg, #1e5bb8 0%, #164a9e 100%);
    box-shadow: 0 4px 16px rgba(47, 125, 255, 0.4);
    transform: translateY(-1px);
}

.success-btn.secondary {
    background: #ffffff;
    color: #6c757d;
    border: 2px solid #e9ecef;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.success-btn.secondary:hover {
    background: #f8f9fa;
    border-color: #dee2e6;
    color: #495057;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.15);
    transform: translateY(-1px);
}

.success-btn i {
    font-size: 14px;
}

/* Responsywność dla modala sukcesu */
@media (max-width: 576px) {
    .custom-success-content {
        width: 95%;
        margin: 20px;
        border-radius: 14px;
    }
    
    .success-icon-container {
        padding: 25px 20px 15px;
        border-radius: 14px 14px 0 0;
    }
    
    .success-icon {
        width: 50px;
        height: 50px;
    }
    
    .success-icon i {
        font-size: 24px;
    }
    
    .success-header {
        padding: 15px 20px 12px;
    }
    
    .success-header h2 {
        font-size: 20px;
    }
    
    .success-header p {
        font-size: 13px;
    }
    
    .success-body {
        padding: 0 20px 25px;
    }
    
    .order-info {
        padding: 15px;
    }
    
    .order-number {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }
    
    .order-number .value {
        font-size: 14px;
        padding: 5px 10px;
    }
    
    .countdown-section {
        padding: 12px;
    }
    
    .countdown-section p {
        font-size: 12px;
    }
    
    .countdown-number {
        font-size: 14px;
        padding: 2px 8px;
    }
    
    .success-btn {
        padding: 10px 16px;
        font-size: 13px;
    }
}

@media (max-width: 400px) {
    .success-header h2 {
        font-size: 18px;
    }
    
    .order-number .value {
        font-size: 13px;
    }
    
    .success-btn {
        padding: 9px 14px;
        font-size: 12px;
    }
}

/* Language Selector Styles */
.sidebar-language-section {
    margin-top: auto;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-language-selector {
    padding: 0;
    position: relative;
}

.language-current {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    color: var(--sidebar-text-color);
    cursor: pointer !important;
    transition: background-color 0.3s ease;
    border-radius: 8px;
    margin: 0 10px;
    pointer-events: auto !important;
}

.language-current:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.language-current .flag-icon {
    width: 20px;
    height: 15px;
    margin-right: 10px;
    border-radius: 2px;
    object-fit: cover;
}

.language-current span {
    flex-grow: 1;
    font-weight: 500;
}

.language-current i {
    font-size: 12px;
    transition: transform 0.3s ease;
}

/* Rotate chevron when dropdown is active */
.sidebar-language-selector.dropdown-open .language-current i {
    transform: rotate(180deg);
}

.language-dropdown {
    position: fixed !important;
    background: var(--sidebar-bg-color) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 8px !important;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15) !important;
    z-index: 2000 !important;
    min-width: 150px !important;
    opacity: 0 !important;
    visibility: hidden !important;
    transform: translateY(-10px) !important;
    transition: all 0.3s ease !important;
}

.language-dropdown.active {
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateY(0) !important;
}

/* Internal Language Dropdown (inside sidebar) */
.language-dropdown-internal {
    position: absolute !important;
    bottom: 100% !important;
    left: 10px !important;
    right: 10px !important;
    background: var(--sidebar-bg-color) !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    border-radius: 8px !important;
    box-shadow: 0 -10px 25px rgba(0, 0, 0, 0.25) !important;
    z-index: 1000 !important;
    opacity: 0 !important;
    visibility: hidden !important;
    transform: translateY(10px) !important;
    transition: all 0.3s ease !important;
    margin-bottom: 10px !important;
}

.language-dropdown-internal.active {
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateY(0) !important;
}

/* Hide external dropdown - always use internal */
.language-dropdown {
    display: none !important;
}

.language-option {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    cursor: pointer;
    transition: background-color 0.2s ease;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--sidebar-text-color);
}

.language-option:last-child {
    border-bottom: none;
}

.language-option:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.language-option .flag-icon {
    width: 20px;
    height: 15px;
    margin-right: 10px;
    border-radius: 2px;
    object-fit: cover;
}

.language-option span {
    font-weight: 500;
    color: var(--sidebar-text-color);
}

/* Override notification styles to fix positioning */
.notification {
    position: fixed !important;
    bottom: 20px !important;
    right: 20px !important;
    top: auto !important;
    z-index: 9999 !important;
    min-width: 300px;
    max-width: 400px;
    padding: 16px 20px;
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    transform: translateX(100%);
    opacity: 0;
    transition: all 0.3s ease;
    font-family: 'Mulish', sans-serif;
    font-weight: 500;
}

.notification.show {
    transform: translateX(0) !important;
    opacity: 1 !important;
}

.notification-success {
    background-color: #10b981 !important;
    color: white !important;
}

.notification-error {
    background-color: #ef4444 !important;
    color: white !important;
}

.notification-warning {
    background-color: #f59e0b !important;
    color: white !important;
}

.notification-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.notification-close {
    background: none;
    border: none;
    color: inherit;
    font-size: 18px;
    cursor: pointer;
    padding: 0;
    margin-left: 10px;
}

.notification-close:hover {
    opacity: 0.8;
}

@media (max-width: 576px) {
    .notification {
        bottom: 10px !important;
        right: 10px !important;
        left: 10px !important;
        min-width: auto !important;
        max-width: none !important;
    }
}

/* Price Display Toggle Switch (Netto/Brutto) - New Design */
.sidebar-price-section {
    margin-top: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 15px;
}

.price-display-toggle {
    display: flex;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 4px;
    margin-top: 10px;
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.price-display-toggle .toggle-button {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.7);
    background: transparent;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    user-select: none;
    text-align: center;
}

.price-display-toggle .toggle-button:hover {
    color: rgba(255, 255, 255, 0.9);
    background: rgba(255, 255, 255, 0.05);
}

.price-display-toggle .toggle-button.active {
    background: rgba(255, 255, 255, 0.2);
    color: #ffffff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.price-display-toggle .toggle-button i {
    font-size: 12px;
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

.price-display-toggle .toggle-button.active i {
    opacity: 1;
}

.price-display-toggle .toggle-button span {
    font-weight: 500;
    white-space: nowrap;
}

/* Hover effects */
.price-display-toggle .toggle-button:not(.active):hover {
    transform: translateY(-1px);
    background: rgba(255, 255, 255, 0.08);
}

/* Focus for accessibility */
.price-display-toggle .toggle-button:focus {
    outline: 2px solid rgba(255, 255, 255, 0.3);
    outline-offset: 2px;
}

/* Responsive */
@media (max-width: 990px) {
    .sidebar-price-section {
        padding: 15px 20px;
        margin: 0;
        border-top: 1px solid rgba(255,255,255,0.1);
    }
    
    .price-display-toggle {
        margin-top: 8px;
        padding: 3px;
    }
    
    .price-display-toggle .toggle-button {
        padding: 6px 8px;
        font-size: 12px;
        gap: 4px;
    }
    
    .price-display-toggle .toggle-button i {
        font-size: 11px;
    }
}

@media (max-width: 576px) {
    .price-display-toggle .toggle-button {
        padding: 5px 6px;
        font-size: 11px;
    }
    
    .price-display-toggle .toggle-button span {
        display: none; /* Hide text on very small screens, show only icons */
    }
}

/* ===== GLOBALNE STYLE MODALI ===== */
/* Usuwamy Bootstrap style i robimy własne */

/* Podstawowe style modali */
.modal-dialog {
    max-width: 600px !important;
    width: auto !important;
    margin: 1.75rem auto !important;
    position: relative !important;
    pointer-events: none !important;
}

/* Małe modały (np. Aktualizacja cen) */
.modal-dialog.modal-sm,
.modal-dialog[style*="max-width: 50%"],
.modal-dialog[style*="width: 50%"] {
    max-width: 400px !important;
    width: auto !important;
}

/* Średnie modały */
.modal-dialog.modal-md {
    max-width: 600px !important;
    width: auto !important;
}

/* Duże modały */
.modal-dialog.modal-lg {
    max-width: 800px !important;
    width: auto !important;
}

/* Extra duże modały */
.modal-dialog.modal-xl {
    max-width: 1200px !important;
    width: auto !important;
}

/* Modały admin */
.modal-dialog.modal-admin {
    max-width: 500px !important;
    width: auto !important;
}

/* Responsywność modali */
@media (max-width: 768px) {
    .modal-dialog {
        max-width: 95% !important;
        margin: 0.5rem auto !important;
    }
    
    .modal-dialog.modal-sm {
        max-width: 90% !important;
    }
    
    .modal-dialog.modal-lg,
    .modal-dialog.modal-xl {
        max-width: 95% !important;
    }
}

@media (max-width: 576px) {
    .modal-dialog {
        max-width: 98% !important;
        margin: 0.25rem auto !important;
    }
}

/* Styles for Products Header Row and Filters */
.products-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    min-height: 42px; /* Stała wysokość żeby nie skakało */
}

.filters-section {
    margin-left: auto;
    position: relative;
    flex-shrink: 0; /* Nie pozwól na kurczenie się */
    min-width: 120px; /* Minimalna szerokość */
}

.filters-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
    white-space: nowrap; /* Nie łam tekstu */
    padding: 8px 16px; /* Stały padding */
    min-width: 120px; /* Minimalna szerokość przycisku */
    justify-content: center; /* Wyśrodkuj tekst */
    max-width: 300px; /* Maksymalna szerokość */
    overflow: hidden; /* Ukryj przepełnienie */
    text-overflow: ellipsis; /* Dodaj ... gdy za długie */
}

.filters-toggle:hover {
    background-color: #6c757d;
    border-color: #6c757d;
    color: white;
}

.filters-toggle i {
    font-size: 14px;
    flex-shrink: 0; /* Ikona się nie kurczy */
}

.filters-text {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Usuń badge - już nie używamy */
.filters-badge {
    display: none !important;
}

.active-filters-status {
    background: #e7f3ff;
    border: 1px solid #b8daff;
    border-radius: 6px;
    padding: 12px;
}

.active-filters-status i {
    color: #0066cc;
}

@media (max-width: 768px) {
    .products-header-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .filters-section {
        margin-left: 0;
        width: 100%;
    }
    
    .filters-toggle {
        width: 100%;
        justify-content: center;
    }
    
    /* Responsywna paginacja na mobile */
    .pagination-responsive {
        flex-wrap: wrap;
    }
    
    .pagination-responsive .page-item .page-link {
        padding: 0.5rem 0.75rem;
        min-width: 44px;
        text-align: center;
    }
    
    /* Na bardzo małych ekranach zmniejsz padding */
    @media (max-width: 480px) {
        .pagination-responsive .page-item .page-link {
            padding: 0.4rem 0.6rem;
            min-width: 40px;
            font-size: 0.9rem;
        }
    }
}

/* ======================== MERGED FROM LEGACY STYLE.CSS ======================== */

/* --- Login Page --- */

.login-container {
    width: 100%;
    max-width: 400px;
    padding: 2rem;
}

.login-form-container {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.login-logo {
    text-align: center;
    margin-bottom: 2rem;
}

.login-logo img {
    height: 60px;
    margin-bottom: 1rem;
}

/* --- Loading & Error Messages --- */

.loading-message,
.error-message {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    min-height: 400px !important;
    width: 100vw !important;
    max-width: 100vw !important;
    left: 0 !important;
    right: 0 !important;
    text-align: center !important;
    flex-direction: column !important;
    gap: 20px !important;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%) !important;
    border-radius: 16px !important;
    margin: 30px auto !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05) !important;
    border: 1px solid #e2e8f0 !important;
    animation: fadeInMessage 0.5s ease-in-out !important;
    position: relative !important;
    box-sizing: border-box !important;
    justify-self: center !important;
    align-self: center !important;
}

.loading-message .fa-spinner,
.error-message .fa-exclamation-triangle {
    color: #4287F3 !important;
    margin-bottom: 10px !important;
}

.loading-message h4,
.error-message h4 {
    font-size: 1.5rem !important;
    font-weight: 600 !important;
    color: #334155 !important;
    margin: 0 0 10px 0 !important;
}

.loading-message p,
.error-message p {
    font-size: 1rem !important;
    color: #64748b !important;
    margin: 0 !important;
    line-height: 1.5 !important;
}

.error-message .btn {
    margin-top: 15px !important;
}

@keyframes fadeInMessage {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 768px) {
    .loading-message,
    .error-message {
        min-height: 300px !important;
        margin: 20px 0 !important;
        padding: 40px 20px !important;
    }

    .loading-message h4,
    .error-message h4 {
        font-size: 1.25rem !important;
    }

    .loading-message p,
    .error-message p {
        font-size: 0.9rem !important;
    }
}

/* --- Product Search List (visible only when JS shows it) --- */

#product-list.active {
    display: block;
    max-height: 500px;
    min-height: 0;
    overflow-y: auto;
    border: 1px solid #ddd;
}

@media (min-width: 768px) {
    #product-list.active {
        max-height: 600px;
    }
}

@media (min-width: 1200px) {
    #product-list.active {
        max-height: 700px;
    }
}

.list-group-item {
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.add-product {
    margin-left: 10px;
    vertical-align: middle;
}

/* --- Checkout Layout --- */

.checkout-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: stretch;
}

.checkout-column, .checkout-summary {
    background-color: #f9f9fa;
    padding: 20px;
    border: 1px solid #ddd;
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
}

.checkout-column1 {
    width: 100%;
}

.checkout-column2 {
    width: 100%;
}

@media (min-width: 768px) {
    .checkout-column1 {
        width: 40%;
    }
    .checkout-column2 {
        width: 20%;
    }
    .checkout-summary {
        width: 40%;
    }
}

@media (min-width: 992px) {
    .checkout-column1 {
        width: 30%;
    }
    .checkout-column2 {
        width: 20%;
    }
    .checkout-summary {
        width: 50%;
    }
}

/* --- Cart Items --- */

#selected-products {
    max-height: 250px;
    overflow-y: auto;
}

.cart-summary-line {
    margin: 5px 0;
}

.cart-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    border-bottom: 1px solid #e0e0e0;
    overflow: visible;
    transition: all 0.3s ease;
    max-height: 500px;
    opacity: 1;
    position: relative;
}

.cart-item:last-child {
    border-bottom: none;
}

.cart-item.variants-open {
    z-index: 9999;
    position: relative;
}

/* --- Cart Action Controls --- */

.cart-item-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    position: relative;
}

.price-remove-container {
    display: flex;
    align-items: center;
    gap: 5px;
    flex-shrink: 0;
}

.quantity-control {
    display: flex;
    align-items: center;
    border: 1px solid #ced4da;
    border-radius: 4px;
    overflow: hidden;
    width: fit-content;
}

.quantity-control button {
    background-color: #f8f9fa;
    border: none;
    padding: 5px 10px;
    font-size: 1em;
    cursor: pointer;
    height: 38px;
}

.quantity-input {
    width: 40px;
    text-align: center;
    border: none;
    padding: 5px;
    appearance: textfield;
    -moz-appearance: textfield;
    height: 38px;
}

.quantity-input::-webkit-outer-spin-button,
.quantity-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.product-price {
    font-weight: bold;
    font-size: 14px;
    margin: 0 15px;
    white-space: nowrap;
    min-width: 80px;
    text-align: right;
    flex-shrink: 0;
}

.remove-product {
    color: #dc3545;
    background: none;
    border: none;
    font-size: 1.2em;
    cursor: pointer;
    padding: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 38px;
    width: 38px;
}

/* --- Desktop Cart Layout --- */

@media (min-width: 769px) {
    .cart-item-actions {
        justify-content: flex-end;
        gap: 15px;
    }

    .variants-toggle {
        order: 1;
        margin: 0;
    }

    .quantity-price-container {
        display: flex;
        align-items: center;
        gap: 10px;
        margin-left: auto;
        order: 2;
    }

    .quantity-control {
        order: 2;
    }

    .price-remove-container {
        order: 3;
    }

    .product-price {
        font-weight: bold;
        font-size: 14px;
        margin: 0;
        white-space: nowrap;
        min-width: 80px;
        text-align: right;
    }

    .remove-product {
        width: 38px;
        height: 38px;
        padding: 0;
        display: flex;
        align-items: center;
        justify-content: center;
        flex-shrink: 0;
    }

    .variants-toggle {
        position: relative;
    }

    .variants-tooltip {
        position: absolute;
        bottom: calc(100% + 10px);
        left: 50%;
        transform: translateX(-50%);
        background-color: #dc3545;
        color: white;
        padding: 8px 12px;
        border-radius: 4px;
        font-size: 12px;
        white-space: nowrap;
        pointer-events: none;
        z-index: 1000;
        animation: floatingTooltip 2s ease-in-out infinite;
    }

    .variants-tooltip::after {
        content: '';
        position: absolute;
        top: 100%;
        left: 50%;
        transform: translateX(-50%);
        border-width: 6px;
        border-style: solid;
        border-color: #dc3545 transparent transparent transparent;
    }

    @keyframes floatingTooltip {
        0% { transform: translate(-50%, 0); }
        50% { transform: translate(-50%, -5px); }
        100% { transform: translate(-50%, 0); }
    }

    .variant-item.selected {
        background-color: #e8f4ff;
        border-left: 3px solid #4287F3;
    }
}

/* --- Inline Variant Selection (Cart) --- */

.variants-toggle {
    height: 38px;
    min-width: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 12px;
    white-space: nowrap;
    border: 1px solid #dee2e6;
    background-color: #fff;
    color: #495057;
    transition: all 0.3s ease;
    position: relative;
    margin-right: auto;
}

.variants-toggle i {
    margin-right: 8px;
}

.variants-toggle:hover {
    background-color: #f8f9fa;
}

.variants-toggle.warning {
    border-color: #dc3545;
    color: #dc3545;
    background-color: #fff;
    animation: glowPulse 2s infinite;
}

@keyframes glowPulse {
    0% {
        box-shadow: 0 0 0 0 rgba(220, 53, 69, 0.4);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(220, 53, 69, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(220, 53, 69, 0);
    }
}

@keyframes floatingTooltip {
    0% {
        transform: translateX(-50%) translateY(0);
    }
    50% {
        transform: translateX(-50%) translateY(-3px);
    }
    100% {
        transform: translateX(-50%) translateY(0);
    }
}

.variants-tooltip {
    position: absolute;
    bottom: calc(100% + 10px);
    left: 50%;
    transform: translateX(-50%);
    background-color: #dc3545;
    color: white;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 12px;
    white-space: nowrap;
    pointer-events: none;
    z-index: 1000;
    animation: floatingTooltip 2s ease-in-out infinite;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 32px;
}

.variants-toggle.warning .variants-tooltip {
    opacity: 1;
    visibility: visible;
    animation: floatingTooltip 2s ease-in-out infinite;
}

.variants-tooltip::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 50%;
    transform: translateX(-50%);
    border-width: 6px 6px 0;
    border-style: solid;
    border-color: #dc3545 transparent transparent;
}

.variants-container {
    position: absolute;
    width: 300px;
    left: 0;
    top: calc(100% + 5px);
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    z-index: 10000;
    display: none;
}

.variant-item {
    padding: 12px 15px;
    cursor: pointer;
    transition: background-color 0.2s ease;
    border-bottom: 1px solid #f0f0f0;
}

.variant-item:last-child {
    border-bottom: none;
}

.variant-item:hover {
    background-color: #f8f9fa;
}

.variant-item.selected {
    background-color: #d9e5f8;
    border-left: 3px solid #2F7DFF;
}

.variant-title {
    font-size: 14px;
    margin-bottom: 4px;
}

.variant-price {
    font-weight: bold;
    color: var(--blue-accent);
}

.variant-info {
    font-size: 12px;
    color: #666;
    margin-top: 5px;
}

/* --- Cart Summary --- */

#cart-summary {
    background-color: #f8f9fa;
    border-radius: 5px;
    padding: 20px;
    margin-top: 20px;
}

.summary-title {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 15px;
}

/* --- Order Button --- */

/* --- Cart Animations --- */

.cart-item-new {
    animation: slideIn 0.3s ease-out forwards;
}

.cart-item-remove {
    animation: slideOut 0.3s ease-out forwards;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideOut {
    from {
        opacity: 1;
        transform: translateY(0);
    }
    to {
        opacity: 0;
        transform: translateY(20px);
    }
}

/* --- Empty Cart --- */

#empty-cart-message {
    background-color: #DDDDDD;
    opacity: 0.6;
    border-radius: 5px;
    padding: 10px;
    text-align: center;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 10px;
}

#empty-cart-message i {
    margin-right: 10px;
}

/* --- Success Animation --- */

.success-animation {
    margin: 20px auto;
}

.checkmark {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: block;
    stroke-width: 4;
    stroke: #4BB543;
    stroke-miterlimit: 10;
    margin: 10% auto;
    box-shadow: inset 0px 0px 0px #4BB543;
    animation: fill .4s ease-in-out .4s forwards, scale .3s ease-in-out .9s both;
    position: relative;
}

.checkmark__circle {
    stroke-dasharray: 166;
    stroke-dashoffset: 166;
    stroke-width: 4;
    stroke-miterlimit: 10;
    stroke: #4BB543;
    fill: none;
    animation: stroke .6s cubic-bezier(0.65, 0, 0.45, 1) forwards;
}

.checkmark__check {
    transform-origin: 50% 50%;
    stroke-dasharray: 48;
    stroke-dashoffset: 48;
    stroke-width: 4;
    stroke: #fff;
    animation: stroke .3s cubic-bezier(0.65, 0, 0.45, 1) .8s forwards;
}

@keyframes stroke {
    100% {
        stroke-dashoffset: 0;
    }
}

@keyframes scale {
    0%, 100% {
        transform: none;
    }
    50% {
        transform: scale3d(1.1, 1.1, 1);
    }
}

@keyframes fill {
    100% {
        box-shadow: inset 0px 0px 0px 80px #4BB543;
    }
}

/* --- Product Search Groups --- */

.product-group {
    border: 1px solid #dee2e6;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 10px;
}

.main-product {
    background-color: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
}

.main-product.has-variants {
    border-left: 2px solid #eee;
}

.product-item-content {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 10px;
    width: 100%;
}

.product-group .product-image {
    width: 40px;
    height: 40px;
    min-width: 40px;
    border-radius: 4px;
    object-fit: cover;
    border: 1px solid #dee2e6;
}

.cart-item .product-image {
    width: 60px;
    height: 60px;
    min-width: 60px;
    border-radius: 4px;
    object-fit: cover;
    border: 1px solid #dee2e6;
}

.variants-list .product-image {
    width: 60px;
    height: 60px;
    min-width: 60px;
    border-radius: 4px;
    object-fit: cover;
    border: 1px solid #dee2e6;
}

.variants-list {
    border-left: 2px solid #eee;
    margin-left: 20px;
}

.variant {
    border-left: 3px solid transparent;
}

.variant.highlighted {
    border-left: 3px solid #0d6efd;
    background-color: #f0f7ff;
}

.highlight {
    background-color: #fff3cd;
    border-left: 4px solid #ffc107;
}

.product-group.highlight {
    background: none;
}

.toggle-variants {
    min-width: 150px;
}

.search-loader {
    text-align: center;
    padding: 20px;
    display: none;
}

.search-loader .spinner-border {
    width: 1.5rem;
    height: 1.5rem;
    margin-right: 10px;
}

.list-group-item.variant {
    padding: 0;
    border-left: 3px solid transparent;
}

.list-group-item.variant.highlight {
    border-left: 3px solid #0d6efd;
    background-color: rgba(13, 110, 253, 0.05);
}

.icon-wrapper {
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 10px;
}

.icon-wrapper svg {
    width: 100%;
    height: 100%;
    fill: #2F7DFF;
}

.icon-wrapper i {
    color: #2F7DFF;
    font-size: 1.2rem;
}

.price-info {
    color: #0d6efd;
    font-weight: 500;
    margin-top: 4px;
}

/* --- Empty State --- */

.products-grid:has(.empty-state-container) {
    display: grid !important;
    grid-template-columns: 1fr !important;
}

.empty-state-container {
    display: grid;
    place-items: center;
    padding: 80px 40px;
    min-height: 500px;
    width: 100%;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    border-radius: 16px;
    margin: 30px 0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    border: 1px solid #e2e8f0;
    animation: fadeInEmpty 0.6s ease-in-out;
    box-sizing: border-box;
}

.empty-state-content {
    text-align: center;
    animation: slideUpEmpty 0.7s ease-out;
}

.empty-state-icon {
    margin-bottom: 30px;
}

.empty-state-icon i {
    font-size: 6rem;
    color: #94a3b8;
    opacity: 0.8;
    animation: gentleBounce 3s ease-in-out infinite;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.empty-state-title {
    font-size: 2rem;
    font-weight: 700;
    color: #334155;
    margin-bottom: 16px;
    margin-top: 0;
    letter-spacing: -0.025em;
}

.empty-state-subtitle {
    font-size: 1.125rem;
    color: #64748b;
    margin-bottom: 0;
    line-height: 1.6;
    font-weight: 400;
}

@keyframes fadeInEmpty {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes slideUpEmpty {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes gentleBounce {
    0%, 100% {
        transform: translateY(0) scale(1);
    }
    50% {
        transform: translateY(-8px) scale(1.05);
    }
}

/* --- Grid Loading/Error States --- */

.products-grid .loading-message,
.products-grid .error-message {
    grid-column: 1 / -1 !important;
    justify-self: center !important;
    align-self: center !important;
    width: 100% !important;
    max-width: 600px !important;
    margin: 40px auto !important;
    position: relative !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
}

#products-grid .loading-message,
#products-grid .error-message,
.content-area .loading-message,
.content-area .error-message {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    text-align: center !important;
    width: 100% !important;
    margin-left: auto !important;
    margin-right: auto !important;
    position: relative !important;
    left: 0 !important;
    right: 0 !important;
    top: 0 !important;
    transform: none !important;
}

/* --- Mobile: Cart & Checkout (max-width: 768px) --- */

@media (max-width: 768px) {
    .variants-wrapper {
        width: 100% !important;
    }

    .variants-container {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        max-height: 200px;
        overflow-y: auto;
        background: #fff;
        border: 1px solid #dee2e6;
        border-radius: 8px;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
        z-index: 1000;
        display: none;
    }

    .variants-container.active {
        display: block;
    }

    .variants-list {
        padding: 10px;
        background: #f8f9fa;
        border-radius: 8px;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    }

    .variant-item {
        padding: 12px;
        font-size: 14px;
        border-bottom: 1px solid #ddd;
        transition: background-color 0.2s ease;
        cursor: pointer;
    }

    .variant-item:last-child {
        border-bottom: none;
    }

    .variant-item:active,
    .variant-item.selected {
        background-color: #d9e5f8;
        border-left: 3px solid #2F7DFF;
    }

    .variant-title {
        font-size: 14px;
        font-weight: bold;
        margin-bottom: 4px;
    }

    .variant-title small {
        color: #666;
        font-size: 12px;
    }

    .variant-price {
        font-size: 13px;
        color: #666;
    }

    .variants-modal-header {
        display: none;
    }

    .variants-modal-header h5 {
        margin: 0;
        font-size: 16px;
        font-weight: 600;
    }

    .close-variants-modal {
        border: none;
        background: none;
        font-size: 24px;
        color: #666;
        padding: 0;
        width: 30px;
        height: 30px;
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
    }

    .checkout-container {
        flex-direction: column;
    }

    .checkout-column,
    .checkout-column1,
    .checkout-column2,
    .checkout-summary {
        width: 100%;
        margin-bottom: 20px;
    }

    #product-list,
    #search-results {
        z-index: 1000;
    }

    .cart-item {
        flex-direction: column;
        align-items: stretch;
        padding: 15px;
        margin-bottom: 15px;
        background-color: #fff;
        border-radius: 8px;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    }

    .cart-item .product-details {
        width: 100%;
        margin-bottom: 15px;
        display: flex;
        align-items: flex-start;
    }

    .cart-item .product-image {
        width: 80px;
        height: 60px;
        object-fit: cover;
        margin-right: 15px;
        border-radius: 4px;
    }

    .cart-item .product-info {
        flex: 1;
        min-width: 0;
    }

    .cart-item .product-name {
        font-size: 14px;
        margin-bottom: 4px;
        line-height: 1.3;
        word-wrap: break-word;
    }

    .cart-item .product-sku {
        font-size: 12px;
        color: #666;
        margin-bottom: 10px;
        word-break: break-word;
        line-height: 1.3;
    }

    .cart-item-actions {
        width: 100%;
        flex-direction: column;
        gap: 12px;
        margin-top: 10px;
    }

    .variants-toggle {
        width: 100%;
        height: 44px;
        order: 1;
        margin: 0;
        border-radius: 6px;
        justify-content: center;
        background-color: #f8f9fa;
    }

    .variants-toggle.warning {
        border-color: #dc3545;
        color: #dc3545;
        background-color: rgba(220, 53, 69, 0.05);
    }

    .variants-toggle i {
        font-size: 16px;
    }

    .quantity-price-container {
        width: 100%;
        display: flex;
        justify-content: space-between;
        align-items: center;
        order: 2;
        margin-top: 10px;
    }

    .quantity-control {
        flex: 0 0 auto;
    }

    .quantity-control button {
        width: 44px;
        height: 44px;
        background-color: #f8f9fa;
        border: none;
        font-size: 18px;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: background-color 0.2s ease;
        cursor: pointer;
    }

    .quantity-control button:active {
        background-color: #e9ecef;
    }

    .quantity-input {
        width: 50px;
        text-align: center;
        border: none;
        border-left: 1px solid #dee2e6;
        border-right: 1px solid #dee2e6;
        font-size: 14px;
        padding: 0;
        height: 44px;
        background-color: #fff;
    }

    .quantity-input::-webkit-outer-spin-button,
    .quantity-input::-webkit-inner-spin-button {
        -webkit-appearance: none;
        margin: 0;
    }

    .price-remove-container {
        display: flex;
        align-items: center;
        gap: 12px;
    }

    .product-price {
        font-size: 16px;
        font-weight: 600;
        margin: 0;
        white-space: nowrap;
        color: #2d3436;
    }

    .remove-product {
        width: 44px;
        height: 44px;
        padding: 0;
        background-color: #fff;
        border: 1px solid #dc3545;
        border-radius: 6px;
        color: #dc3545;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: all 0.2s ease;
        cursor: pointer;
    }

    .remove-product:hover {
        background-color: #dc3545;
        color: #fff;
    }

    #cart-summary {
        margin-top: 20px;
        padding: 15px;
        border-radius: 8px;
        background-color: #f8f9fa;
    }

    .summary-title {
        font-size: 16px;
        margin-bottom: 15px;
    }

    #order-button {
        margin-top: 10px;
    }

    #empty-cart-message {
        margin: 20px 0;
        padding: 20px;
        text-align: center;
        background-color: #f8f9fa;
        border-radius: 8px;
        color: #666;
        display: flex;
        align-items: center;
        justify-content: center;
        min-height: 100px;
    }

    .checkmark {
        width: 80px;
        height: 80px;
    }

    .empty-state-container {
        padding: 60px 20px;
        min-height: 400px;
        margin: 20px 0;
        border-radius: 12px;
    }

    .empty-state-icon i {
        font-size: 4.5rem;
    }

    .empty-state-title {
        font-size: 1.75rem;
    }

    .empty-state-subtitle {
        font-size: 1rem;
    }
}

/* --- Small Screens: Product Search (max-width: 576px) --- */

@media (max-width: 576px) {
    .product-item-content {
        flex-direction: row;
        align-items: center;
        gap: 12px;
        padding: 10px;
    }

    .product-group .product-item-content {
        padding: 10px;
    }

    .product-group .product-name {
        display: block;
        text-transform: none;
    }

    .product-group .main-product {
        padding: 0;
    }
}

/* --- Very Small Screens: Empty State (max-width: 480px) --- */

@media (max-width: 480px) {
    .empty-state-container {
        padding: 40px 15px;
        min-height: 350px;
        margin: 15px 0;
    }

    .empty-state-icon i {
        font-size: 3.5rem;
    }

    .empty-state-title {
        font-size: 1.5rem;
    }

    .empty-state-subtitle {
        font-size: 0.95rem;
    }
}

/* =====================================================
   UTILITY CLASSES (replacing inline styles)
   ===================================================== */

/* --- Initially hidden elements (toggled by JS) --- */
#product-list,
#mobile-product-list,
#mobile-cart-count,
#cart-count,
#cart-summary-sidebar,
#proceed-to-checkout,
#variant-details,
#variant-cart-section,
#import-preview,
#import-errors,
#invoice-details,
#loading-message-container,
#pagination-container,
#cart-summary,
#active-filters-status,
#password-help,
#price_groups_container,
#is_active_container,
#import-preview,
#import-errors,
.old-layout {
    display: none;
}

/* --- Empty cart message (sidebar) --- */
#empty-cart-message-sidebar {
    display: none;
    text-align: center;
    padding: 40px 20px;
    color: #6c757d;
}

#empty-cart-message-sidebar > i.fa-shopping-cart {
    font-size: 48px;
    margin-bottom: 15px;
    opacity: 0.3;
}

/* --- Empty cart message (main checkout) --- */
#empty-cart-message {
    display: none;
    background-color: #DDDDDD;
    opacity: 0.6;
    border-radius: 5px;
    padding: 10px;
    text-align: center;
    height: 50px;
    align-items: center;
    justify-content: center;
    margin-top: 10px;
}

#empty-cart-message .fa-face-frown {
    margin-right: 10px;
}

/* --- Layout: logo and header elements --- */
.mobile-logo {
    cursor: pointer;
}

.sidebar-logo {
    cursor: pointer;
}

.sidebar-logo img {
    max-width: 100%;
    object-fit: contain;
}

.mobile-logo img {
    max-width: 100%;
    object-fit: contain;
}

/* --- Cart items wrapper --- */
.cart-items-wrapper {
    position: relative;
}

/* --- Modal dialog sizes --- */
.checkout-modal .modal-dialog {
    max-width: 50%;
    width: 50%;
}

.import-cart-modal .modal-dialog {
    max-width: 520px;
    width: 95%;
}

#orderModalDialog {
    max-width: 50%;
    width: 50%;
}

.status-modal .modal-dialog {
    max-width: 500px;
}

/* --- Filters section --- */
.filters-section {
    display: flex;
    gap: 10px;
    align-items: center;
}

.sort-dropdown-icon {
    margin-left: 6px;
}

.sort-dropdown .dropdown-menu {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

/* --- Invoice section header --- */
.invoice-section-header {
    color: #2F7DFF;
}

/* --- Order table elements --- */
.order-thumbnail-col {
    width: 80px;
}

.order-thumbnail-img {
    width: 60px;
    height: 60px;
    object-fit: cover;
}

.order-thumbnail-placeholder {
    width: 60px;
    height: 60px;
}

/* --- Admin: filter containers (categories, manufacturers, tags) --- */
.admin-filter-container {
    max-height: 300px;
    overflow-y: auto;
    border: 1px solid #dee2e6;
    padding: 10px;
    border-radius: 4px;
}

/* --- Admin: price groups list --- */
#price_groups_list {
    max-height: 200px;
    overflow-y: auto;
}

/* --- Product suggestions (JS-generated) --- */
.product-suggestion-img {
    width: 40px;
    height: 40px;
    object-fit: cover;
    border-radius: 4px;
    margin-right: 12px;
}

.product-suggestion-placeholder {
    width: 40px;
    height: 40px;
    background: #f3f4f6;
    border-radius: 4px;
    margin-right: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-suggestion-placeholder.hidden,
.product-suggestion-img.hidden {
    display: none;
}

.product-suggestion-placeholder i {
    font-size: 16px;
}

.product-suggestion-name {
    font-weight: 500;
    color: #1f2937;
    margin-bottom: 2px;
}

.product-suggestion-meta {
    font-size: 12px;
    color: #6b7280;
}

/* --- Search highlight (JS-generated) --- */
.search-highlight {
    background: #fef3c7;
    padding: 1px 2px;
    border-radius: 2px;
}

/* --- Admin: BaseLinker logo in orders --- */
.bl-logo-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* --- Swiper nav hidden (single image) --- */
.swiper-nav-hidden {
    display: none;
}

/* --- b2b_settings: payment/delivery panels --- */
.settings-panel {
    height: 100%;
    min-height: 400px;
}

.settings-panel-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.settings-panel-title h4 {
    margin: 0;
}

.settings-method-icon {
    width: 30px;
    height: 30px;
    margin-right: 10px;
    object-fit: contain;
}

.settings-method-icon-wrapper {
    width: 30px;
    height: 30px;
    margin-right: 10px;
}

.settings-delivery-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

.settings-price-toggle-btn {
    height: 36px;
    line-height: 1.42857143;
}

.settings-form-right {
    text-align: right;
    padding-top: 10px;
}

.settings-section-spacing {
    margin-bottom: 15px;
}

.settings-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.settings-section-header h5 {
    margin: 0;
}

.settings-filter-container {
    height: 250px;
    min-height: 250px;
    overflow-y: auto;
    border: 1px solid #ddd;
    padding: 10px;
    border-radius: 4px;
    background: #f9f9f9;
}

.settings-product-ids-info {
    color: #777;
    font-size: 12px;
    margin-bottom: 8px;
}

.settings-product-ids-textarea {
    font-family: monospace;
    font-size: 13px;
}

.settings-section-top-spacing {
    margin-top: 10px;
}

.settings-help-text {
    color: #777;
    font-size: 12px;
    margin-top: 4px;
}

.settings-submit-row {
    margin-top: 20px;
    text-align: right;
}

/* btn-default alias for BS5 */
.btn-default {
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    color: #495057;
}

.btn-default:hover {
    background-color: #e9ecef;
    border-color: #adb5bd;
}

/* Catalog accordion - panel style matching orders_options */
.catalog-accordion-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.catalog-accordion-panel {
    background: #f6f7f9;
    border: 1px solid #e0e3e8;
    border-left: 4px solid #2F7DFF;
    border-radius: 4px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.catalog-accordion-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 14px 12px 16px;
    cursor: pointer;
    user-select: none;
    font-size: 0.87rem;
    font-weight: 700;
    color: #333;
}

.catalog-accordion-header:hover {
    background: #eef0f4;
}

.catalog-accordion-chevron {
    width: 26px;
    height: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #cdd1d6;
    border-radius: 6px;
    color: #9ca3af;
    font-size: 0.65rem;
    flex-shrink: 0;
    background: #fff;
    transition: transform 0.2s;
}

.catalog-accordion-panel.open .catalog-accordion-chevron {
    transform: rotate(180deg);
}

.catalog-accordion-body {
    display: none;
    padding: 0 16px 14px;
    background: #fff;
    border-top: 1px solid #ebedf0;
}

.catalog-accordion-panel.open > .catalog-accordion-body {
    display: block;
}

.catalog-accordion-save {
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px solid #f0f0f0;
    text-align: right;
}

.catalog-search-no-results {
    display: none;
}

.catalog-search-no-results.visible {
    display: block;
}

.catalog-accordion-search-group {
    max-width: 260px;
}

/* --- b2b_settings: price group panel (JS-generated) --- */
.price-group-panel {
    margin-bottom: 15px;
}

.price-group-panel .panel-body {
    padding: 15px;
}

.price-group-panel h5 {
    margin: 0 0 5px 0;
    color: #2c3e50;
}

.price-group-currency-label {
    margin-right: 8px;
}

.price-group-radio-hidden {
    display: none;
}

.price-group-label-left {
    border-top-left-radius: 20px;
    border-bottom-left-radius: 20px;
}

.price-group-label-right {
    border-top-right-radius: 20px;
    border-bottom-right-radius: 20px;
}

/* --- b2b_settings: loading states --- */
.settings-loading-spinner {
    padding: 20px;
    text-align: center;
}

.settings-loading-spinner i {
    font-size: 2em;
    margin-bottom: 15px;
}

.settings-loading-message {
    color: blue;
    font-weight: bold;
}

/* --- b2b_settings: price input addon --- */
.price-input-addon {
    font-size: 18px;
    font-weight: bold;
}

.price-threshold-info {
    display: block;
    margin-top: 5px;
}

.price-section-spacing {
    margin-bottom: 8px;
}

/* --- b2b_settings: toast container --- */
.b2b-toast-container {
    z-index: 1500;
}

/* --- b2b_settings: modal backdrop (JS) --- */
.b2b-modal-backdrop {
    z-index: 1040;
}

/* --- Install page: step icons --- */
.install-step-icon {
    color: var(--blue);
}

/* --- Install page: tables preview --- */
.install-tables-preview {
    max-height: 200px;
    overflow-y: auto;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    padding: 12px;
    font-size: 0.85rem;
    font-family: monospace;
}

/* --- Admin order statuses --- */
.admin-statuses-table-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.admin-statuses-table-body {
    padding: 15px;
}

/* --- Catalog: dropdown sorting menu override --- */
.sort-dropdown .dropdown-menu {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

/* --- Global Search Dropdown --- */
.search-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #e5e7eb;
    border-top: none;
    border-radius: 0 0 8px 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    overflow-y: auto;
    z-index: 1000;
}

#search-dropdown {
    max-height: 300px;
}

#mobile-search-dropdown {
    max-height: 250px;
}

.search-dropdown .dropdown-item.no-results {
    padding: 12px 16px;
    color: #6b7280;
    font-style: italic;
    background-color: #f9fafb !important;
    cursor: default !important;
}

.search-dropdown .dropdown-item.highlighted {
    background-color: #f3f4f6 !important;
}

.search-dropdown .dropdown-item:hover {
    background-color: #f9fafb !important;
}

.search-dropdown .search-result-item:last-child {
    border-bottom: none !important;
}

.search-result-item {
    padding: 12px 16px;
    border-bottom: 1px solid #f1f5f9;
    cursor: pointer;
    transition: background-color 0.2s;
}

.search-result-item-layout {
    display: flex;
    align-items: center;
    gap: 12px;
}

.search-result-item-body {
    flex: 1;
    min-width: 0;
}

.search-result-item-name {
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 4px;
    line-height: 1.2;
}

.search-result-item-sku {
    font-size: 12px;
    color: #6b7280;
    margin-bottom: 4px;
}

.search-result-item-meta {
    display: flex;
    gap: 12px;
    font-size: 12px;
}

.search-result-item-price {
    color: #059669;
    font-weight: 500;
}

.search-result-item-arrow {
    color: #9ca3af;
    font-size: 12px;
}

/* --- Cart Image Placeholders --- */
.cart-image-placeholder {
    display: flex;
    width: 80px;
    height: 60px;
    background: #f3f4f6;
    border-radius: 4px;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    color: #9ca3af;
    font-size: 12px;
}

.cart-image-placeholder i {
    font-size: 20px;
    margin-bottom: 4px;
    opacity: 0.5;
}

/* --- Cart Sidebar Image --- */
.sidebar-img {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 4px;
    margin-right: 10px;
}

.sidebar-img-placeholder {
    display: flex;
    width: 50px;
    height: 50px;
    background: #f3f4f6;
    border-radius: 4px;
    margin-right: 10px;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    color: #9ca3af;
    font-size: 10px;
}

.sidebar-img-placeholder i {
    font-size: 16px;
    margin-bottom: 2px;
    opacity: 0.5;
}

.sidebar-img-placeholder span {
    font-size: 8px;
}

/* --- Cart Layout Helpers --- */
.product-details {
    position: relative;
}

.quantity-price-container {
    position: relative;
}

.variants-wrapper {
    position: relative;
}

/* === Admin Settings Page Responsive (sidebar = 280px) === */

/* col-xxl-6 sections (Base API, Pochodzenie danych) stack below 1600px */
@media (max-width: 1599px) {
    .content-area .col-xxl-6,
    .content-area [class*="col-xxl-6"] {
        flex: 0 0 100% !important;
        max-width: 100% !important;
        width: 100% !important;
    }
    .content-area .col-xxl-4,
    .content-area [class*="col-xxl-4"] {
        flex: 0 0 100% !important;
        max-width: 100% !important;
        width: 100% !important;
    }
    .content-area .col-xxl-8,
    .content-area [class*="col-xxl-8"] {
        flex: 0 0 100% !important;
        max-width: 100% !important;
        width: 100% !important;
    }
}

/* Method cards inside panels: 1 per row below 1400px viewport */
@media (max-width: 1399px) {
    .content-area .settings-panel .row[class*="row-cols"] > .col {
        flex: 0 0 100% !important;
        max-width: 100% !important;
        width: 100% !important;
    }
}

/* Payment/delivery methods (col-md-6) stack only on small screens */
@media (max-width: 991px) {
    .content-area .panel-body {
        padding: 15px !important;
    }
    .content-area .panel-heading {
        padding: 15px 20px !important;
    }
}

/* ============================================
   Settings Page Styles
   Source: settings.php
   ============================================ */

.language-options, .price-display-options {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.language-option-card, .price-option-card {
    display: flex;
    align-items: center;
    padding: 20px;
    border: 2px solid #dee2e6;
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: #ffffff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    position: relative;
    overflow: hidden;
}

.language-option-card:hover, .price-option-card:hover {
    border-color: #dee2e6;
    box-shadow: 0 8px 25px rgba(74, 144, 226, 0.15);
    transform: translateY(-2px);
}

.language-option-card.active, .price-option-card.active {
    border-color: #4a90e2;
    background: linear-gradient(135deg, #f8fbff 0%, #e8f4fd 100%);
    box-shadow: 0 8px 25px rgba(74, 144, 226, 0.2);
}

.language-flag, .price-option-icon {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 20px;
    border-radius: 12px;
    background: #f8f9fa;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.language-option-card.active .language-flag,
.price-option-card.active .price-option-icon {
    background: linear-gradient(135deg, #4a90e2 0%, #357abd 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(74, 144, 226, 0.3);
}

.flag-icon-large {
    width: 36px;
    height: auto;
    border-radius: 6px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.price-option-icon i {
    font-size: 24px;
    color: #6c757d;
    transition: color 0.3s ease;
}

.price-option-card.active .price-option-icon i {
    color: white;
}

.language-info, .price-option-info {
    flex: 1;
    min-width: 0;
}

.language-name, .price-option-name {
    font-weight: 700;
    font-size: 18px;
    color: #212529;
    margin-bottom: 6px;
    letter-spacing: -0.02em;
}

.language-description, .price-option-description {
    font-size: 15px;
    color: #6c757d;
    line-height: 1.4;
    font-weight: 500;
}

.language-option-card.active .language-name,
.language-option-card.active .language-description,
.price-option-card.active .price-option-name,
.price-option-card.active .price-option-description {
    color: #2c5aa0;
}

.language-check, .price-option-check {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #e9ecef;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
}

.language-option-card.active .language-check,
.price-option-card.active .price-option-check {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.3);
    transform: scale(1.1);
}

.language-check i, .price-option-check i {
    font-size: 14px;
    opacity: 0;
    transition: all 0.3s ease;
    transform: scale(0.8);
}

.language-option-card.active .language-check i,
.price-option-card.active .price-option-check i {
    opacity: 1;
    transform: scale(1);
}

.client-info-item {
    margin-bottom: 20px;
}

.client-info-item label {
    display: block;
    font-weight: 600;
    color: #495057;
    margin-bottom: 8px;
    font-size: 15px;
    letter-spacing: -0.01em;
}

.client-info-item span {
    display: block;
    color: #212529;
    padding: 12px 16px;
    background: #f8f9fa;
    border-radius: 10px;
    border: 1px solid #e9ecef;
    font-weight: 500;
    transition: all 0.3s ease;
}

.client-info-item span:hover {
    background: #e9ecef;
    border-color: #dee2e6;
}

.product-card-header {
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border-bottom: 1px solid #e9ecef;
    border-radius: 16px 16px 0 0 !important;
    padding: 20px 24px !important;
}

.product-card-header h5 {
    color: #495057;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin: 0;
}

.product-card-header i {
    color: #4a90e2;
    margin-right: 10px;
}

.product-card-body {
    padding: 24px !important;
}

.product-card {
    border: 1px solid #e9ecef;
    border-radius: 16px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    overflow: hidden;
}

.product-card:hover {
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
    transform: translateY(-1px);
}

@media (max-width: 768px) {
    .language-options, .price-display-options {
        gap: 12px;
    }

    .language-option-card, .price-option-card {
        padding: 16px;
    }

    .language-flag, .price-option-icon {
        width: 48px;
        height: 48px;
        margin-right: 16px;
    }

    .flag-icon-large {
        width: 28px;
    }

    .price-option-icon i {
        font-size: 20px;
    }

    .language-name, .price-option-name {
        font-size: 16px;
    }

    .language-description, .price-option-description {
        font-size: 14px;
    }

    .language-check, .price-option-check {
        width: 24px;
        height: 24px;
    }

    .language-check i, .price-option-check i {
        font-size: 12px;
    }

    .product-card-header {
        padding: 16px 20px !important;
    }

    .product-card-body {
        padding: 20px !important;
    }
}

.settings-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 0;
}

.settings-row .product-card {
    margin-bottom: 0 !important;
}

@media (max-width: 768px) {
    .settings-row {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .settings-row .product-card {
        margin-bottom: 15px !important;
    }

    .settings-row .product-card:last-child {
        margin-bottom: 0 !important;
    }
}

#client-form {
    background: #ffffff;
    border-radius: 16px;
    padding: 0;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.05);
}

#client-form .mb-4 {
    background: #ffffff;
    border: 2px solid #dee2e6;
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 20px;
    position: relative;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

#client-form h6 {
    color: #2c5aa0;
    font-weight: 700;
    font-size: 18px;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid #e9ecef;
    display: flex;
    align-items: center;
    gap: 10px;
    letter-spacing: -0.02em;
}

#client-form h6 i {
    color: #4a90e2;
    font-size: 20px;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

#client-form .form-label {
    font-weight: 600;
    color: #495057;
    margin-bottom: 8px;
    font-size: 15px;
    display: block;
    letter-spacing: -0.01em;
}

#client-form .form-control,
#client-form .form-select {
    border: 2px solid #e9ecef;
    border-radius: 12px;
    padding: 12px 16px;
    font-size: 15px;
    background: #ffffff;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    min-height: 48px;
    font-weight: 500;
}

#client-form .form-control:focus,
#client-form .form-select:focus {
    border-color: #4a90e2;
    box-shadow: 0 0 0 0.25rem rgba(74, 144, 226, 0.15);
    outline: none;
    background: #ffffff;
    transform: translateY(-1px);
}

#client-form .form-control:hover:not(:focus),
#client-form .form-select:hover:not(:focus) {
    border-color: #adb5bd;
    transform: translateY(-1px);
}

#client-form .text-danger {
    color: #dc3545 !important;
    font-weight: 600;
}

#client-form .d-flex.justify-content-end {
    background: #ffffff;
    padding: 24px;
    margin: 20px 0 0 0;
    border-radius: 16px;
    border: 2px solid #dee2e6;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

#client-form .btn {
    border-radius: 12px;
    padding: 12px 24px;
    font-weight: 600;
    font-size: 15px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
    min-height: 48px;
    display: flex;
    align-items: center;
    gap: 8px;
    letter-spacing: -0.01em;
}

#client-form .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

#client-form .btn-primary {
    background: linear-gradient(135deg, #4a90e2 0%, #357abd 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(74, 144, 226, 0.3);
}

#client-form .btn-primary:hover {
    background: linear-gradient(135deg, #357abd 0%, #2c5aa0 100%);
    box-shadow: 0 8px 25px rgba(74, 144, 226, 0.4);
}

#client-form .btn-outline-secondary {
    background: #ffffff;
    border: 2px solid #dee2e6;
    color: #6c757d;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

#client-form .btn-outline-secondary:hover {
    background: #f8f9fa;
    color: #495057;
    border-color: #4a90e2;
    box-shadow: 0 8px 25px rgba(74, 144, 226, 0.15);
}

@media (max-width: 768px) {
    #client-form .mb-4 {
        padding: 20px;
        margin-bottom: 16px;
    }

    #client-form h6 {
        font-size: 16px;
    }

    #client-form .d-flex.justify-content-end {
        flex-direction: column;
        padding: 20px;
    }

    #client-form .btn {
        margin-bottom: 12px;
        width: 100%;
        justify-content: center;
    }

    #client-form .btn:last-child {
        margin-bottom: 0;
    }

    #client-form .form-control,
    #client-form .form-select {
        padding: 10px 14px;
        min-height: 44px;
    }
}

@media (max-width: 576px) {
    #client-form .mb-4 {
        padding: 16px;
        border-radius: 8px;
    }

    #client-form .d-flex.justify-content-end {
        padding: 16px;
        border-radius: 8px;
    }

    #client-form .form-control,
    #client-form .form-select {
        border-radius: 8px;
    }

    #client-form .btn {
        border-radius: 8px;
        padding: 10px 20px;
        min-height: 44px;
    }
}

/* ============================================
   Toast Notifications
   Source: settings.php
   ============================================ */

.toast-notification {
    position: fixed;
    top: 80px;
    right: 20px;
    color: white;
    padding: 12px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 9999;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    font-weight: 500;
}

.toast-notification.show {
    transform: translateX(0);
}

.toast-notification.toast-success { background: #28a745; }
.toast-notification.toast-error { background: #dc3545; }

@media (max-width: 768px) {
    .toast-notification {
        top: 60px;
        right: 10px;
        left: 10px;
        transform: translateY(-100%);
        text-align: center;
    }

    .toast-notification.show {
        transform: translateY(0);
    }
}

/* ============================================
   Checkout Modal & Invoice Styles
   Source: views/catalog.php, products.php
   ============================================ */

@media (min-width: 768px) {
    #checkout-modal .modal-dialog {
        max-width: 50% !important;
        width: 50% !important;
        margin: 1.75rem auto;
    }
}

@media (max-width: 767px) {
    #checkout-modal .modal-dialog {
        max-width: 95% !important;
        width: 95% !important;
        margin: 0.5rem auto;
    }
}

#checkout-modal .modal-content {
    width: 100%;
}

#importCartModal { z-index: 12000 !important; }
.modal-backdrop.import-backdrop { z-index: 11999 !important; }

#checkout-modal .modal-body hr {
    border-color: #dee2e6;
    margin: 1.5rem 0;
}

#checkout-modal .modal-body h6 {
    color: #495057;
    font-weight: 600;
    margin-bottom: 1rem;
}

.invoice-section {
    border: 1px solid #e0e7ef;
    border-radius: 14px;
    padding: 24px;
    background: #f8fafe;
    position: relative;
    margin-top: 15px;
    transition: border-color 0.25s ease;
}

.invoice-section:hover {
    border-color: #2F7DFF;
}

.invoice-header {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 10px;
    margin-bottom: 18px;
    padding-bottom: 14px;
    border-bottom: 1px solid #e0e7ef;
    flex-wrap: nowrap !important;
}

.invoice-header i {
    color: #2F7DFF;
    font-size: 1.15rem;
    flex-shrink: 0;
}

.invoice-header h6 {
    margin: 0 !important;
    color: #0C0212 !important;
    font-family: 'Be Vietnam Pro', sans-serif;
    font-weight: 800;
    font-size: 0.95rem;
    flex-grow: 1;
    white-space: nowrap;
}

.invoice-badge {
    background: #2F7DFF;
    color: #ffffff;
    padding: 3px 10px;
    border-radius: 8px;
    font-family: 'Be Vietnam Pro', sans-serif;
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.invoice-section .form-check {
    margin-bottom: 15px;
}

.invoice-section .form-check-input {
    width: 1.15em;
    height: 1.15em;
    border: 2px solid #2F7DFF !important;
    margin-right: 10px;
    cursor: pointer;
}

.invoice-section .form-check-label {
    color: #0C0212;
    font-family: 'Mulish', sans-serif;
    font-size: 0.92rem;
    cursor: pointer;
}

.invoice-section .form-check-label strong {
    color: #0C0212;
    font-size: 0.95rem;
}

.invoice-section .form-check-input:checked {
    background-color: #2F7DFF;
    border-color: #2F7DFF;
}

.invoice-section .form-control {
    border-color: #dee2e6;
    transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.invoice-section .form-control:focus {
    border-color: #2F7DFF;
    box-shadow: 0 0 0 0.2rem rgba(47, 125, 255, 0.15);
}

.invoice-section .form-label {
    color: #495057;
    font-family: 'Mulish', sans-serif;
    font-weight: 600;
    font-size: 0.85rem;
}

#checkout-summary .summary-line-vat {
    border-top: 1px solid #e9ecef;
    padding-top: 8px;
    margin-top: 8px;
    color: #6c757d;
    font-size: 0.9em;
}

#checkout-summary .summary-line-brutto {
    color: #6c757d;
    font-size: 0.9em;
}

.summary-line small,
.product-price small,
#checkout-summary small {
    color: #6c757d;
    font-size: 0.75em;
    font-weight: normal;
    margin-left: 2px;
}

.price-badge small,
.price-badge-with-variants small {
    color: #6c757d;
    font-size: 0.85em !important;
    font-weight: normal;
    margin-left: 2px;
}

.product-price-large small {
    color: #6c757d;
    font-size: 18px !important;
    font-weight: normal;
    margin-left: 2px;
}

.tile-description small {
    color: #6c757d;
    font-size: 0.75em;
    font-weight: normal;
    margin-left: 2px;
}

.price-info-meta {
    margin-top: 10px;
}

.loading-message-container {
    position: relative;
    width: 100%;
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 20px 0;
}

.loading-message, .error-message {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 60px 20px;
    min-height: 300px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 12px;
    border: 1px solid #dee2e6;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    animation: fadeIn 0.5s ease-in-out;
}

.loading-message i, .error-message i {
    margin-bottom: 20px;
    color: #6c757d;
}

.loading-message i.fa-spinner {
    color: #007bff;
}

.error-message i.fa-exclamation-triangle {
    color: #dc3545;
}

.loading-message h4, .error-message h4 {
    color: #495057;
    font-weight: 600;
    margin-bottom: 10px;
    font-size: 1.5rem;
}

.loading-message p, .error-message p {
    color: #6c757d;
    margin-bottom: 20px;
    font-size: 1rem;
    line-height: 1.5;
}

.error-message .btn {
    margin-top: 10px;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 768px) {
    .loading-message, .error-message {
        padding: 40px 15px;
        min-height: 250px;
    }

    .loading-message h4, .error-message h4 {
        font-size: 1.25rem;
    }

    .loading-message p, .error-message p {
        font-size: 0.9rem;
    }
}

/* ============================================
   Orders Page Overrides
   (cart hiding moved to inline style in orders.php)
   ============================================ */

/* ============================================
   Dynamic Logo Sizing (from layout.php)
   ============================================ */
.logo-dynamic {
    height: var(--logo-height, 45px);
}

.mobile-header .mobile-logo img.logo-dynamic,
.mobile-header .logo-dynamic {
    height: auto !important;
    max-height: calc(var(--mobile-header-height) - 16px) !important;
    width: auto;
    max-width: 100%;
    object-fit: contain;
}

.sidebar-bottom-section {
    margin-top: auto;
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 12px;
    padding-bottom: 16px;
    flex-shrink: 0;
}

/* ============================================
   Status Badge (dynamic color via custom property)
   ============================================ */
.status-badge {
    background-color: var(--status-color, #6c757d);
    color: #fff;
    font-family: 'Mulish', sans-serif;
    font-weight: 700;
    font-size: 0.78rem;
    padding: 5px 14px;
    border-radius: 20px;
    letter-spacing: 0.02em;
    display: inline-block;
}

/* ============================================
   Orders Page — List & Detail Views
   ============================================ */

.orders-page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 28px;
    flex-wrap: wrap;
    gap: 12px;
}

.orders-page-header h1 {
    font-family: 'Be Vietnam Pro', sans-serif;
    font-weight: 800;
    font-size: 1.6rem;
    color: #0C0212;
    margin: 0;
}

.orders-page-header .btn-back {
    font-family: 'Mulish', sans-serif;
    font-weight: 700;
    font-size: 0.85rem;
    padding: 8px 20px;
    border-radius: 12px;
    background: #f0f4f8;
    color: #0C0212;
    border: 1px solid #dee2e6;
    transition: all 0.2s ease;
    text-decoration: none;
}

.orders-page-header .btn-back:hover {
    background: #2F7DFF;
    color: #fff;
    border-color: #2F7DFF;
}

.orders-card {
    background: #fff;
    border: 1px solid #e0e7ef;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    margin-bottom: 28px;
}

.orders-card-header {
    background: #fff;
    padding: 20px 24px;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.orders-card-header h5 {
    font-family: 'Be Vietnam Pro', sans-serif;
    font-weight: 800;
    font-size: 1.05rem;
    color: #0C0212;
    margin: 0;
}

.orders-card-header h5 i {
    color: #2F7DFF;
    margin-right: 8px;
}

.orders-card-body {
    padding: 0;
}

.orders-card-body.padded {
    padding: 24px;
}

/* --- Orders Table --- */
.orders-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin: 0;
}

.orders-table thead th {
    background: #2F7DFF;
    color: #fff;
    font-family: 'Mulish', sans-serif;
    font-weight: 700;
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 14px 16px;
    border: none;
    white-space: nowrap;
}

.orders-table thead th:first-child {
    border-top-left-radius: 0;
}

.orders-table thead th:last-child {
    border-top-right-radius: 0;
}

.orders-table tbody td {
    padding: 14px 16px;
    font-family: 'Mulish', sans-serif;
    font-size: 0.88rem;
    color: #333;
    border-bottom: 1px solid #f0f2f5;
    vertical-align: middle;
}

.orders-table tbody tr:last-child td {
    border-bottom: none;
}

.orders-table tbody tr {
    transition: background 0.15s ease;
}

.orders-table tbody tr:hover {
    background: #f5f8ff;
}

.orders-table .order-id-cell {
    font-family: 'Be Vietnam Pro', sans-serif;
    font-weight: 700;
    color: #2F7DFF;
}

.orders-table .order-id-cell small {
    font-family: 'Mulish', sans-serif;
    font-weight: 400;
    color: #6c757d;
}

.orders-table .btn-details {
    font-family: 'Mulish', sans-serif;
    font-weight: 700;
    font-size: 0.8rem;
    padding: 6px 16px;
    border-radius: 10px;
    background: #2F7DFF;
    color: #fff;
    border: none;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.orders-table .btn-details:hover {
    background: #1a6ae0;
    transform: translateY(-1px);
    box-shadow: 0 3px 10px rgba(47, 125, 255, 0.3);
    color: #fff;
}

/* --- Orders Table Footer (totals) --- */
.orders-table tfoot td,
.orders-table tfoot th {
    background: #f8fafe;
    font-family: 'Mulish', sans-serif;
    font-weight: 700;
    font-size: 0.88rem;
    padding: 12px 16px;
    border: none;
    border-top: 2px solid #e0e7ef;
    color: #0C0212;
}

.orders-table tfoot tr.order-total-row td,
.orders-table tfoot tr.order-total-row th {
    font-family: 'Be Vietnam Pro', sans-serif;
    font-weight: 800;
    font-size: 1rem;
    color: #2F7DFF;
}

/* --- Order Detail Info Grid --- */
.order-info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-bottom: 28px;
}

@media (max-width: 768px) {
    .order-info-grid {
        grid-template-columns: 1fr;
    }
}

.order-info-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.order-info-list li {
    display: flex;
    align-items: flex-start;
    padding: 10px 0;
    border-bottom: 1px solid #f0f2f5;
    font-family: 'Mulish', sans-serif;
    font-size: 0.88rem;
    gap: 16px;
}

.order-info-list li:last-child {
    border-bottom: none;
}

.order-info-label {
    color: #6c757d;
    font-weight: 600;
    width: 45%;
    flex-shrink: 0;
}

.order-info-value {
    color: #0C0212;
    text-align: right;
    font-weight: 500;
    width: 55%;
    word-break: break-word;
}

.order-address-block {
    line-height: 1.7;
    text-align: right;
}

/* --- Order Product Thumbnail --- */
.order-product-thumb {
    width: 56px;
    height: 56px;
    object-fit: cover;
    border-radius: 10px;
    border: 1px solid #e9ecef;
}

.order-product-thumb-placeholder {
    width: 56px;
    height: 56px;
    border-radius: 10px;
    background: #f5f5f5;
    border: 1px solid #e9ecef;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ccc;
}

.order-product-name {
    font-family: 'Mulish', sans-serif;
    font-weight: 700;
    color: #0C0212;
}

.order-product-attr {
    font-size: 0.8rem;
    color: #6c757d;
}

/* --- Invoice Download Button --- */
.btn-invoice {
    font-family: 'Mulish', sans-serif;
    font-weight: 700;
    font-size: 0.8rem;
    padding: 7px 18px;
    border-radius: 10px;
    background: transparent;
    color: #2F7DFF;
    border: 1.5px solid #2F7DFF;
    transition: all 0.2s ease;
}

.btn-invoice:hover {
    background: #2F7DFF;
    color: #fff;
}

/* --- Packages section --- */
.order-package-item {
    background: #f8fafe;
    border: 1px solid #e0e7ef;
    border-radius: 14px;
    padding: 20px;
    margin-bottom: 12px;
}

.order-package-item:last-child {
    margin-bottom: 0;
}

/* --- Empty orders --- */
.orders-empty {
    text-align: center;
    padding: 60px 20px;
}

.orders-empty-icon {
    font-size: 3rem;
    color: #c8d6e5;
    margin-bottom: 16px;
}

.orders-empty h4 {
    font-family: 'Be Vietnam Pro', sans-serif;
    font-weight: 800;
    color: #0C0212;
    margin-bottom: 8px;
}

.orders-empty p {
    font-family: 'Mulish', sans-serif;
    color: #6c757d;
    margin-bottom: 20px;
}

.orders-empty .btn-shop {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: 'Mulish', sans-serif;
    font-weight: 700;
    padding: 10px 28px;
    border-radius: 12px;
    background: #2F7DFF;
    color: #fff;
    border: none;
    text-decoration: none;
    transition: all 0.2s ease;
}

.orders-empty .btn-shop i {
    font-size: 1rem;
    color: inherit;
    margin-bottom: 0;
}

.orders-empty .btn-shop:hover {
    background: #1a6ae0;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(47, 125, 255, 0.3);
}

/* --- Order Detail Comments --- */
.order-comment {
    border-radius: 12px;
    padding: 16px 20px;
    margin-bottom: 12px;
    font-family: 'Mulish', sans-serif;
    font-size: 0.9rem;
}

.order-comment.customer {
    background: #f0f6ff;
    border: 1px solid #d0e2ff;
}

.order-comment.admin {
    background: #fff8e1;
    border: 1px solid #ffe0b2;
}

.order-comment strong {
    font-weight: 800;
    display: block;
    margin-bottom: 6px;
}

/* ============================================
   Inline Checkout Section
   ============================================ */
.checkout-section {
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
    margin: 20px;
    animation: checkoutSlideIn 0.35s ease-out;
}

@keyframes checkoutSlideIn {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: translateY(0); }
}

.checkout-section-header {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px 28px;
    border-bottom: 1px solid #e9ecef;
}

.checkout-section-title {
    font-family: 'Be Vietnam Pro', sans-serif;
    font-weight: 800;
    font-size: 1.2rem;
    color: #0C0212;
    margin: 0;
}

.checkout-section-title i {
    color: #2F7DFF;
    margin-right: 8px;
}

.btn-back-to-products {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: none;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    padding: 8px 16px;
    font-family: 'Mulish', sans-serif;
    font-weight: 600;
    font-size: 0.9rem;
    color: #495057;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-back-to-products:hover {
    border-color: #2F7DFF;
    color: #2F7DFF;
    background: rgba(47, 125, 255, 0.04);
}

.checkout-section-body {
    padding: 28px;
}

/* ---- Checkout Stepper Bar ---- */
.checkout-stepper {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px 28px 0;
    gap: 0;
}

.checkout-stepper-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    cursor: default;
    position: relative;
    min-width: 100px;
    flex: 0 0 auto;
}

.checkout-stepper-item.completed {
    cursor: pointer;
}

.stepper-number {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Be Vietnam Pro', sans-serif;
    font-weight: 800;
    font-size: 1rem;
    color: #adb5bd;
    background: #f1f3f5;
    border: 2px solid #dee2e6;
    transition: all 0.3s ease;
}

.checkout-stepper-item.active .stepper-number {
    background: #2F7DFF;
    border-color: #2F7DFF;
    color: #ffffff;
    box-shadow: 0 4px 14px rgba(47, 125, 255, 0.35);
}

.checkout-stepper-item.completed .stepper-number {
    background: #ffffff;
    border-color: #2F7DFF;
    color: #2F7DFF;
}

.checkout-stepper-item.completed .stepper-number span {
    display: none;
}

.checkout-stepper-item.completed .stepper-number::after {
    content: '\f00c';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    font-size: 0.85rem;
}

.stepper-label {
    font-family: 'Mulish', sans-serif;
    font-weight: 600;
    font-size: 0.78rem;
    color: #adb5bd;
    text-align: center;
    transition: color 0.3s ease;
    max-width: 120px;
}

.checkout-stepper-item.active .stepper-label {
    color: #2F7DFF;
    font-weight: 800;
}

.checkout-stepper-item.completed .stepper-label {
    color: #0C0212;
}

.stepper-connector {
    flex: 1;
    height: 2px;
    background: #dee2e6;
    margin: 0 8px;
    margin-bottom: 28px;
    transition: background 0.3s ease;
}

.stepper-connector.active {
    background: #2F7DFF;
}

/* ---- Checkout Steps ---- */
.checkout-step {
    display: none;
}

.checkout-step.active {
    display: block;
    animation: stepFadeIn 0.3s ease-out;
}

@keyframes stepFadeIn {
    from { opacity: 0; transform: translateX(12px); }
    to   { opacity: 1; transform: translateX(0); }
}

.checkout-step-heading {
    font-family: 'Be Vietnam Pro', sans-serif;
    font-weight: 800;
    font-size: 1.1rem;
    color: #0C0212;
    margin: 0 0 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid #f1f3f5;
}

.checkout-step-heading i {
    color: #2F7DFF;
    margin-right: 8px;
}

/* ---- Minimum Order Bar ---- */
@keyframes minOrderPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: .75; }
}
.min-order-bar {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 8px 16px;
    background: #eef4ff;
    border: 1px solid #b3d1ff;
    border-radius: 6px;
    text-align: center;
    animation: minOrderPulse 2.5s ease-in-out infinite;
}
.min-order-bar-track {
    width: 100%;
    height: 4px;
    background: #d0dfff;
    border-radius: 2px;
    overflow: hidden;
}
.min-order-bar-fill {
    height: 100%;
    background: #2F7DFF;
    border-radius: 2px;
    transition: width .35s ease;
}
.min-order-bar-text {
    font-family: 'Mulish', sans-serif;
    font-size: 12px;
    font-weight: 700;
    color: #0C0212;
}
.checkout-step-actions .min-order-bar {
    margin: 0 0 0 auto;
}
.cart-footer .min-order-bar {
    margin-top: 10px;
    width: 100%;
}

.checkout-step-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-top: 28px;
    padding-top: 20px;
    border-top: 1px solid #e9ecef;
}

.checkout-step-actions .btn {
    min-width: 160px;
}

.checkout-step-actions .btn-primary {
    margin-left: auto;
}

/* ---- Order Summary (Step 3) ---- */
.order-summary-products {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin-bottom: 24px;
}

.order-summary-products thead th {
    font-family: 'Mulish', sans-serif;
    font-weight: 800;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #6c757d;
    background: #f8f9fa;
    padding: 10px 14px;
    border-bottom: 2px solid #e9ecef;
}

.order-summary-products thead th:first-child {
    border-radius: 10px 0 0 0;
}

.order-summary-products thead th:last-child {
    border-radius: 0 10px 0 0;
    text-align: right;
}

.order-summary-products tbody td {
    padding: 12px 14px;
    vertical-align: middle;
    border-bottom: 1px solid #f1f3f5;
    font-family: 'Mulish', sans-serif;
    font-size: 0.9rem;
    color: #0C0212;
}

.order-summary-products tbody td:last-child {
    text-align: right;
    font-weight: 700;
}

.order-summary-products .product-thumb {
    width: 44px;
    height: 44px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.order-summary-products .product-name {
    font-weight: 700;
    display: block;
}

.order-summary-products .product-sku {
    font-size: 0.78rem;
    color: #6c757d;
}

.order-summary-method {
    display: flex;
    align-items: center;
    gap: 14px;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    padding: 14px 18px;
    margin-bottom: 12px;
}

.order-summary-method i {
    font-size: 1.2rem;
    color: #2F7DFF;
    width: 24px;
    text-align: center;
}

.order-summary-method-icon {
    width: 32px;
    height: 32px;
    min-width: 32px;
    object-fit: contain;
    border-radius: 4px;
}

.order-summary-method-icon-wrapper {
    width: 32px;
    height: 32px;
    min-width: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.order-summary-method-icon-wrapper svg {
    width: 100%;
    height: 100%;
    fill: #2F7DFF;
}

.order-summary-method-icon-wrapper i {
    font-size: 1.2rem;
    color: #2F7DFF;
}

.order-summary-method-label {
    font-family: 'Mulish', sans-serif;
    font-weight: 600;
    font-size: 0.85rem;
    color: #6c757d;
}

.order-summary-method-value {
    font-family: 'Mulish', sans-serif;
    font-weight: 800;
    font-size: 0.95rem;
    color: #0C0212;
}

.order-summary-methods-row {
    display: flex;
    gap: 12px;
    margin-bottom: 12px;
}

.order-summary-methods-row .order-summary-method {
    flex: 1;
    margin-bottom: 0;
}

.checkout-summary-box {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 18px 22px;
    border: 1px solid #e9ecef;
}

.checkout-summary-box .summary-line {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
    font-family: 'Mulish', sans-serif;
    font-size: 0.9rem;
    color: #495057;
}

.checkout-summary-box .summary-line-vat {
    color: #6c757d;
    font-size: 0.85rem;
}

.checkout-summary-box .summary-line-total {
    font-family: 'Be Vietnam Pro', sans-serif;
    font-weight: 800;
    font-size: 1.1rem;
    color: #0C0212;
    border-top: 2px solid #dee2e6;
    padding-top: 12px;
    margin-top: 6px;
}

/* ============================================
   Inline Order Success Section
   ============================================ */
.order-success-section {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 60vh;
    padding: 40px 20px;
}

.order-success-content {
    text-align: center;
    max-width: 480px;
    width: 100%;
    background: transparent;
    border-radius: 0;
    padding: 48px 36px;
    box-shadow: none;
    animation: successFadeIn 0.4s ease-out;
}

@keyframes successFadeIn {
    from { opacity: 0; transform: scale(0.95); }
    to   { opacity: 1; transform: scale(1); }
}

.success-checkmark-wrapper {
    margin-bottom: 28px;
}

.success-checkmark-svg {
    width: 80px;
    height: 80px;
}

.success-checkmark-svg .checkmark-circle {
    stroke-dasharray: 226;
    stroke-dashoffset: 226;
    transition: none;
}

.success-checkmark-svg .checkmark-path {
    stroke-dasharray: 60;
    stroke-dashoffset: 60;
    transition: none;
}

.success-checkmark-svg.animate .checkmark-circle {
    animation: drawCircle 0.6s ease-out forwards;
}

.success-checkmark-svg.animate .checkmark-path {
    animation: drawCheck 0.4s 0.5s ease-out forwards;
}

@keyframes drawCircle {
    to { stroke-dashoffset: 0; }
}

@keyframes drawCheck {
    to { stroke-dashoffset: 0; }
}

.success-title {
    font-family: 'Be Vietnam Pro', sans-serif;
    font-weight: 800;
    font-size: 1.6rem;
    color: #0C0212;
    margin: 0 0 8px;
}

.success-subtitle {
    font-family: 'Mulish', sans-serif;
    font-weight: 400;
    font-size: 1rem;
    color: #6c757d;
    margin: 0 0 24px;
}

.success-order-info {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: #f0f6ff;
    border: 2px solid #2F7DFF;
    border-radius: 12px;
    padding: 12px 20px;
    margin-bottom: 16px;
}

.success-order-label {
    font-family: 'Mulish', sans-serif;
    font-weight: 600;
    color: #495057;
    font-size: 0.9rem;
}

.success-order-value {
    font-family: 'Be Vietnam Pro', sans-serif;
    font-weight: 800;
    color: #2F7DFF;
    font-size: 1.1rem;
}

.success-status {
    font-family: 'Mulish', sans-serif;
    color: #6c757d;
    font-size: 0.9rem;
    margin: 0 0 24px;
}

.success-countdown {
    background: transparent;
    border-radius: 0;
    padding: 14px 20px;
    margin-bottom: 24px;
}

.success-countdown p {
    font-family: 'Mulish', sans-serif;
    font-weight: 500;
    color: #495057;
    margin: 0;
    font-size: 0.9rem;
}

.success-countdown .countdown-number {
    font-family: 'Be Vietnam Pro', sans-serif;
    font-weight: 700;
    color: #2F7DFF;
    font-size: 1.1rem;
    background: #ffffff;
    padding: 2px 10px;
    border-radius: 6px;
    border: 2px solid #2F7DFF;
    display: inline-block;
    min-width: 26px;
    text-align: center;
}

.success-actions-inline {
    display: flex;
    justify-content: center;
    gap: 12px;
}

/* ============================================
   Inline Order Iframe Section
   ============================================ */
.order-iframe-section {
    margin: 0;
    background: #ffffff;
    border-radius: 0;
    box-shadow: none;
    overflow: hidden;
    animation: checkoutSlideIn 0.35s ease-out;
    width: 100vw;
    position: relative;
    left: 50%;
    transform: translateX(-50%);
}

.iframe-section-header {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 24px;
    border-bottom: 1px solid #e9ecef;
}

.iframe-section-title {
    font-family: 'Be Vietnam Pro', sans-serif;
    font-weight: 800;
    font-size: 1.1rem;
    color: #0C0212;
    margin: 0;
}

.iframe-section-title i {
    color: #2F7DFF;
    margin-right: 8px;
}

.iframe-container {
    width: 100%;
}

.iframe-container iframe {
    width: 100%;
    height: 85vh;
    border: none;
    display: block;
}

@media (max-width: 768px) {
    .checkout-section {
        margin: 10px;
        border-radius: 12px;
    }
    .checkout-section-header {
        padding: 14px 16px;
        flex-wrap: wrap;
        gap: 10px;
    }
    .checkout-section-body {
        padding: 16px;
    }
    .checkout-stepper {
        padding: 16px 12px 0;
        gap: 0;
    }
    .stepper-number {
        width: 32px;
        height: 32px;
        font-size: 0.85rem;
    }
    .stepper-label {
        font-size: 0.7rem;
        max-width: 80px;
    }
    .stepper-connector {
        margin-bottom: 22px;
    }
    .checkout-step-heading {
        font-size: 1rem;
    }
    .checkout-step-actions {
        flex-direction: column;
        gap: 10px;
    }
    .checkout-step-actions .btn {
        width: 100%;
        min-width: unset;
    }
    .order-summary-products thead th,
    .order-summary-products tbody td {
        padding: 8px 10px;
        font-size: 0.82rem;
    }
    .order-summary-products .product-thumb {
        width: 36px;
        height: 36px;
    }
    .order-summary-method {
        padding: 10px 14px;
    }
    .order-summary-methods-row {
        flex-direction: column;
    }
    .checkout-summary-box {
        padding: 14px 16px;
    }
    .order-success-content {
        padding: 32px 20px;
    }
    .success-title {
        font-size: 1.3rem;
    }
    .order-iframe-section {
        margin: 0;
    }
    .iframe-section-header {
        padding: 12px 16px;
        flex-wrap: wrap;
        gap: 8px;
    }
    .iframe-container iframe {
        height: 85vh;
    }
}

/* Client CMS pages */
.cms-page {
    background: #ffffff;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
    padding: 32px 40px;
    max-width: 860px;
}

.cms-page-title {
    font-family: 'Be Vietnam Pro', sans-serif;
    font-weight: 800;
    font-size: 1.75rem;
    color: #0C0212;
    margin: 0 0 24px;
    padding-bottom: 16px;
    border-bottom: 2px solid #f1f5f9;
}

.cms-page-body {
    font-family: 'Mulish', sans-serif;
    font-size: 1rem;
    line-height: 1.7;
    color: #4b5563;
}

.cms-page-body h2,
.cms-page-body h3,
.cms-page-body h4 {
    font-family: 'Be Vietnam Pro', sans-serif;
    font-weight: 800;
    color: #0C0212;
    margin: 1.5em 0 0.6em;
}

.cms-page-body p {
    margin: 0 0 1em;
}

.cms-page-body ul,
.cms-page-body ol {
    margin: 0 0 1em 1.25em;
}

.cms-page-body a {
    color: #2F7DFF;
}

.cms-page-body a:hover {
    color: #1d5bb8;
}

.cms-page-body blockquote {
    border-left: 3px solid #2F7DFF;
    margin: 0 0 1em;
    padding: 0.25em 0 0.25em 1em;
    color: #64748b;
}

.cms-page-body table {
    width: 100%;
    border-collapse: collapse;
    margin: 0 0 1em;
}

.cms-page-body th,
.cms-page-body td {
    border: 1px solid #e2e8f0;
    padding: 8px 12px;
    text-align: left;
}

@media (max-width: 768px) {
    .cms-page {
        padding: 20px 16px;
    }
    .cms-page-title {
        font-size: 1.4rem;
    }
}
