/* 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;
    }
    
    /* 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: 30px 20px !important;
        align-items: center !important;
        justify-content: space-between !important;
    }
}

/* Base B2B - Style główne */
:root {
    --header-height: 80px;
    --mobile-header-height: 56px;
    --sidebar-width: 250px;
    --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: auto;
    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;
    }
}

/* Na desktop w wysokiej rozdzielczości upewnij się że sidebar jest widoczny */
@media (min-width: 992px) {
    .sidebar {
        transform: translateX(0) !important;
    }
}

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

.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" - to jest druga sekcja sidebar po Dashboard */
.sidebar-section:nth-child(3) {
    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 {
    background: #f3f4f6;
    color: #1f2937;
}

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

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

.sidebar-info-card {
    display: flex;
    flex-direction: column;
    margin: 24px 16px 32px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 14px;
    color: var(--sidebar-text-color);
    font-size: 13px;
    line-height: 1.5;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}

.sidebar-info-card[data-collapsed="false"] .sidebar-info-toggle i {
    transform: rotate(180deg);
}

.sidebar-info-details {
    overflow: hidden;
    max-height: 0;
    opacity: 0;
    transform: translateY(-6px);
    margin-top: 0;
    padding-top: 0;
    border-top: 1px solid rgba(255, 255, 255, 0);
    display: grid;
    gap: 14px;
    pointer-events: none;
    transition: max-height 0.35s ease, opacity 0.3s ease, transform 0.3s ease, margin-top 0.3s ease, padding-top 0.3s ease, border-color 0.3s ease;
}

.sidebar-info-card[data-collapsed="false"] .sidebar-info-details {
    max-height: 1000px;
    opacity: 1;
    transform: translateY(0);
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    pointer-events: auto;
}

.sidebar-info-card .sidebar-info-toggle {
    margin-top: 18px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.08);
    color: var(--sidebar-text-color);
    border-radius: 999px;
    padding: 10px 16px;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease;
}

.sidebar-info-card .sidebar-info-toggle:hover {
    background: rgba(255, 255, 255, 0.14);
    border-color: rgba(255, 255, 255, 0.18);
}

.sidebar-info-card .sidebar-info-toggle i {
    transition: transform 0.2s ease;
}

.sidebar-info-section--tight {
    margin-bottom: 10px;
}

@media (min-width: 992px) {
    .sidebar-info-card {
        margin: 20px;
        margin-top: auto;
        padding: 18px 20px;
    }
}

.sidebar-info-company {
    font-weight: 600;
    margin-bottom: 14px;
}

.sidebar-info-section {
    margin-bottom: 14px;
}

.sidebar-info-section-title {
    text-transform: uppercase;
    font-size: 11px;
    letter-spacing: 0.5px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 4px;
}

.sidebar-info-text {
    color: rgba(255, 255, 255, 0.85);
}

.sidebar-info-text a,
.sidebar-info-link {
    color: #86b7ff;
    text-decoration: none;
}

.sidebar-info-text a:hover,
.sidebar-info-link:hover {
    text-decoration: underline;
}

/* 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: 25px 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;
}

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

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

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

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

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

.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;
    border-radius: 0 12px 12px 0;
    background: linear-gradient(135deg, #2F7DFF 0%, #1d5bb8 100%);
    color: white;
    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;
}

.search-input-group .btn:hover {
    background: linear-gradient(135deg, #1d5bb8 0%, #0f3d7a 100%);
    border-color: #1d5bb8;
    color: white;
}

.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 */
.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);
}

.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;
}

.stock-badge.on-order {
    background: linear-gradient(135deg, #FF9800 0%, #FF6B35 100%) !important;
    border: 1px solid #FF8C00 !important;
    color: white !important;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    box-shadow: 0 1px 2px rgba(255, 152, 0, 0.3);
    display: inline-flex;
    align-items: center;
    gap: 4px;
    position: absolute;
    top: 12px;
    right: 12px;
}

.stock-badge.on-order i {
    font-size: 11px;
    color: white !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);
}

.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 item styling with border */
.cart-item-sidebar {
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 12px;
    background: #ffffff;
}

/* Order info badge styling - pomarańczowy badge jak na karcie produktu */
.cart-item-order-info {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 10px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    background: linear-gradient(135deg, #fff7ed 0%, #ffedd5 100%);
    border: 1px solid #fed7aa;
    color: #c2410c;
    box-shadow: 0 1px 2px rgba(251, 146, 60, 0.1);
    margin-top: 4px;
    margin-bottom: 4px;
}

.cart-item-order-info i {
    font-size: 10px;
    color: #ea580c;
}

.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 - DO NOT HIDE - used for search suggestions */

/* 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.6rem;
        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;
    }
    
    .mobile-logo img {
        height: 58px !important;
    }
    
    .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; /* Zwiększony padding dla lepszej czytelności na bardzo małych ekranach */
    }
    
    .mobile-logo img {
        height: 24px !important;
    }
    
    .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-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: 15px;
    font-weight: 600;
    border: 1px solid #e2e8f0;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 6px;
    line-height: 1.4;
}

.product-detail-meta .meta-item .text-muted.small,
.product-detail-meta .meta-item .text-muted.small strong {
    font-size: 15px;
}

.product-detail-meta .meta-item strong {
    font-size: inherit;
}

.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: 34px;
    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-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 {
    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: 30px;
    height: 30px;
    margin-right: 10px;
    object-fit: contain;
}

.tile svg {
    width: 30px;
    height: 30px;
    margin-right: 10px;
    object-fit: contain;
    fill: #2F7DFF;
}

.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-section small.text-muted,
#variant-stock-info {
    font-size: 14px;
    font-weight: 600;
    color: #334155;
}

.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);
}

.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%;
}

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

/* 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 */
}

.mobile-logo {
    display: flex;
    align-items: center;
    cursor: pointer;
    height: 32px; /* Stała wysokość dla logo */
}

/* Ł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 {
    background: linear-gradient(135deg, #1d5bb8 0%, #0f3d7a 100%);
    border-color: #1d5bb8;
    border-left: none;
    color: white;
}

/* 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;
}

/* 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: 15px;
    color: var(--gray-600);
}

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

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

.variant-sku-display {
    font-size: 14px;
    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 {
        background: rgba(255,255,255,0.08);
        color: white;
        border-left-color: var(--primary-color);
    }
    
    .sidebar .sidebar-menu-link.active {
        background: #2F7DFF !important;
        color: white !important;
        border-left-color: var(--primary-color) !important;
    }
    
    .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-section:nth-child(3) {
        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;
        }
    }
}
