/* Dark Theme dla Amazonix */
body.dark-mode {
    background-color: #333333 !important;
}

/* Główny header */
body.dark-mode header.bg-dark {
    background-color: #0a0a0a !important;
}

body.dark-mode header .bg-dark {
    background-color: #0a0a0a !important;
}

body.dark-mode header .text-white {
    color: #ffffff !important;
}

body.dark-mode .bg-body-secondary {
    background-color: #1a1a1a !important;
}

body.dark-mode .bg-body-secondary .btn-link.text-dark {
    color: #b0b0b0 !important;
}

body.dark-mode .bg-body-secondary .btn-link.text-dark:hover {
    color: #ffffff !important;
}

body.dark-mode header .btn-link.text-white {
    color: #ffffff !important;
}

body.dark-mode header .btn-link.text-white:hover {
    color: #0d6efd !important;
}

body.dark-mode header .btn-link.text-white svg {
    stroke: #ffffff;
}

body.dark-mode header .btn-link.text-white:hover svg {
    stroke: #0d6efd;
}

body.dark-mode header .bg-dark.text-white.px-3.py-2.rounded {
    background-color: #0a0a0a !important;
    color: #ffffff !important;
}

body.dark-mode header .form-control {
    background-color: #2d2d2d !important;
    border-color: #404040 !important;
    color: #ffffff !important;
}

body.dark-mode header .form-control::placeholder {
    color: #808080 !important;
}

body.dark-mode header .form-control:focus {
    border-color: #0d6efd !important;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

body.dark-mode header .btn-primary {
    background-color: #0d6efd;
    border-color: #0d6efd;
}

body.dark-mode header .btn-primary:hover {
    background-color: #0b5ed7;
    border-color: #0a58ca;
}

body.dark-mode .dropdown-menu {
    background-color: #2d2d2d !important;
    border-color: #404040 !important;
}

body.dark-mode .dropdown-item {
    color: #b0b0b0 !important;
}

body.dark-mode .dropdown-item:hover {
    background-color: #404040 !important;
    color: #ffffff !important;
}

body.dark-mode .badge.bg-danger {
    background-color: #dc3545 !important;
}

/* Nawigacja kategorie */
body.dark-mode nav .btn-link.text-dark {
    color: #b0b0b0 !important;
}

body.dark-mode nav .btn-link.text-dark:hover {
    color: #ffffff !important;
}

/* Sekcje główne */
body.dark-mode section.bg-white {
    background-color: #0a0a0a !important;
}

body.dark-mode .bg-white {
    background-color: #1e1e1e !important;
}

body.dark-mode section[style*="background:#1f2a37"] {
    background-color: #0a0a0a !important;
}

body.dark-mode div[style*="background:#111827"] {
    background-color: #1a1a1a !important;
    border: 1px solid #333333;
}

body.dark-mode div[style*="background:#f59e0b"] {
    background-color: #b9770e !important;
}

/* Karty i produkty */
body.dark-mode .card {
    background-color: #1e1e1e !important;
    border-color: #333333 !important;
}

body.dark-mode .card-body {
    background-color: #1e1e1e !important;
}

body.dark-mode .card-title {
    color: #ffffff !important;
}

body.dark-mode .card-text {
    color: #b0b0b0 !important;
}

body.dark-mode .text-dark {
    color: #ffffff !important;
}

body.dark-mode .text-secondary {
    color: #b0b0b0 !important;
}

body.dark-mode .text-muted {
    color: #808080 !important;
}

/* Przyciski */
body.dark-mode .btn-warning {
    background-color: #f59e0b;
    border-color: #f59e0b;
    color: #1a1a1a;
}

body.dark-mode .btn-warning:hover {
    background-color: #e68a00;
}

body.dark-mode .btn-outline-primary {
    color: #0d6efd;
    border-color: #0d6efd;
}

body.dark-mode .btn-outline-primary:hover {
    background-color: #0d6efd;
    color: #ffffff;
}

body.dark-mode .btn-link {
    color: #0d6efd;
}

body.dark-mode .btn-light {
    background-color: #2d2d2d !important;
    border-color: #404040 !important;
    color: #ffffff !important;
}

body.dark-mode .btn-light:hover {
    background-color: #404040 !important;
    color: #ffffff !important;
}

/* Linki */
body.dark-mode a:not(.btn):not(.nav-link):not(.dropdown-item) {
    color: #6ea8fe;
}

body.dark-mode a:not(.btn):not(.nav-link):not(.dropdown-item):hover {
    color: #9ec5fe;
}

body.dark-mode .small.text-decoration-none {
    color: #6ea8fe !important;
}

body.dark-mode .small.text-decoration-none:hover {
    color: #9ec5fe !important;
}

/* Alerty */
body.dark-mode .alert-success {
    background-color: rgba(25, 135, 84, 0.2);
    border-color: rgba(25, 135, 84, 0.3);
    color: #75b798;
}

body.dark-mode .alert-danger {
    background-color: rgba(220, 53, 69, 0.2);
    border-color: rgba(220, 53, 69, 0.3);
    color: #ea868f;
}

body.dark-mode .alert-info {
    background-color: rgba(13, 110, 253, 0.2);
    border-color: rgba(13, 110, 253, 0.3);
    color: #6ea8fe;
}

body.dark-mode .alert-dismissible .btn-close {
    filter: invert(1) grayscale(100%) brightness(200%);
}

/* Badge */
body.dark-mode .badge.bg-warning {
    background-color: #f59e0b !important;
    color: #1a1a1a !important;
}

body.dark-mode .badge.bg-dark {
    background-color: #2d2d2d !important;
    color: #ffffff !important;
}

body.dark-mode .badge.bg-success {
    background-color: #198754 !important;
    color: #ffffff !important;
}

body.dark-mode .badge.bg-secondary {
    background-color: #4d4d4d !important;
    color: #ffffff !important;
}

/* Formularze ogólne */
body.dark-mode input,
body.dark-mode textarea,
body.dark-mode select {
    background-color: #2d2d2d !important;
    border-color: #404040 !important;
    color: #ffffff !important;
}

body.dark-mode input::placeholder,
body.dark-mode textarea::placeholder {
    color: #808080 !important;
}

body.dark-mode input:focus,
body.dark-mode textarea:focus,
body.dark-mode select:focus {
    border-color: #0d6efd !important;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

body.dark-mode select option {
    background-color: #2d2d2d;
    color: #ffffff;
}

/* Formularz logowania */
body.dark-mode .form-label {
    color: #ffffff !important;
}

body.dark-mode .form-check-label {
    color: #ffffff !important;
}

body.dark-mode .form-check-input {
    background-color: #2d2d2d !important;
    border-color: #404040 !important;
}

body.dark-mode .form-check-input:checked {
    background-color: #0d6efd !important;
    border-color: #0d6efd !important;
}

body.dark-mode .invalid-feedback {
    color: #ea868f !important;
}

/* Tabele */
body.dark-mode .table {
    background-color: #1e1e1e !important;
    color: #ffffff !important;
    border-color: #404040 !important;
}

body.dark-mode .table * {
    color: #ffffff !important;
}

body.dark-mode .table td,
body.dark-mode .table th {
    border-color: #404040 !important;
}

body.dark-mode .table thead th {
    background-color: #2d2d2d !important;
    color: #ffffff !important;
}

body.dark-mode .table tbody tr {
    background-color: #1e1e1e !important;
}

body.dark-mode .table tbody td {
    color: #b0b0b0 !important;
}

body.dark-mode .table tbody tr:hover {
    background-color: #2d2d2d !important;
}

body.dark-mode .table tbody tr:hover td {
    color: #ffffff !important;
}

body.dark-mode .table-light {
    background-color: #2d2d2d !important;
}

body.dark-mode .table-light th {
    background-color: #2d2d2d !important;
    color: #ffffff !important;
}

body.dark-mode .table-striped > tbody > tr:nth-of-type(odd) > * {
    background-color: rgba(255, 255, 255, 0.05);
}

body.dark-mode .table-hover > tbody > tr:hover > * {
    background-color: rgba(255, 255, 255, 0.1);
}

/* List group */
body.dark-mode .list-group-item {
    background-color: #1e1e1e !important;
    border-color: #333333 !important;
    color: #ffffff !important;
}

body.dark-mode .list-group-item.active {
    background-color: #0d6efd !important;
    border-color: #0d6efd !important;
}

body.dark-mode .list-group-item-action:hover {
    background-color: #2d2d2d !important;
}

/* Modal */
body.dark-mode .modal-content {
    background-color: #1e1e1e !important;
    border-color: #333333;
}

body.dark-mode .modal-header,
body.dark-mode .modal-footer {
    border-color: #404040;
}

body.dark-mode .modal-title {
    color: #ffffff;
}

body.dark-mode .btn-close {
    filter: invert(1) grayscale(100%) brightness(200%);
}

/* Paginacja */
body.dark-mode .page-link {
    background-color: #2d2d2d;
    border-color: #404040;
    color: #b0b0b0;
}

body.dark-mode .page-link:hover {
    background-color: #404040;
    color: #ffffff;
}

body.dark-mode .page-item.active .page-link {
    background-color: #0d6efd;
    border-color: #0d6efd;
}

/* Stopka */
body.dark-mode footer {
    background-color: #1a1a1a !important;
    border-top: 1px solid #333333 !important;
}

body.dark-mode footer a {
    color: #b0b0b0;
}

body.dark-mode footer a:hover {
    color: #ffffff;
}

body.dark-mode hr {
    background-color: #404040;
}

/* Koszyk */
body.dark-mode .cart-item {
    border-bottom: 1px solid #333333;
}

/* Scrollbar */
body.dark-mode ::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

body.dark-mode ::-webkit-scrollbar-track {
    background: #1e1e1e;
}

body.dark-mode ::-webkit-scrollbar-thumb {
    background: #555555;
    border-radius: 5px;
}

body.dark-mode ::-webkit-scrollbar-thumb:hover {
    background: #777777;
}

/* Mapa */
body.dark-mode #map {
    filter: brightness(0.7) invert(0.9) hue-rotate(180deg);
}

/* Przełącznik dark mode */
.theme-toggle {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: #1e1e1e;
    border: 1px solid #333333;
    color: #ffffff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.theme-toggle:hover {
    transform: scale(1.1);
    background-color: #2d2d2d;
}

/* Strona O nas */
body.dark-mode section.bg-light {
    background-color: #1a1a1a !important;
}

body.dark-mode .bg-light {
    background-color: #1a1a1a !important;
}

body.dark-mode section.bg-light .display-4,
body.dark-mode section.bg-light .lead,
body.dark-mode section.bg-light p {
    color: #ffffff !important;
}

body.dark-mode .card.border-0.shadow-sm {
    background-color: #1e1e1e !important;
    border: 1px solid #333333 !important;
}

/* Strona Kariera - silne wymuszenie */
body.dark-mode .table,
body.dark-mode .table *,
body.dark-mode .table td,
body.dark-mode .table th,
body.dark-mode .table tr,
body.dark-mode .table tbody,
body.dark-mode .table thead {
    background-color: #1e1e1e !important;
    color: #ffffff !important;
    border-color: #404040 !important;
}

body.dark-mode .table thead tr,
body.dark-mode .table thead th {
    background-color: #2d2d2d !important;
}

body.dark-mode .table tbody tr:hover,
body.dark-mode .table tbody tr:hover td {
    background-color: #3d3d3d !important;
}

body.dark-mode .card-header.bg-primary {
    background-color: #0d6efd !important;
}

body.dark-mode .card-header.bg-primary h3 {
    color: #ffffff !important;
}

/* Nagłówki */
body.dark-mode .display-4 {
    color: #ffffff !important;
}

body.dark-mode .lead {
    color: #b0b0b0 !important;
}

body.dark-mode h1,
body.dark-mode h2,
body.dark-mode h3,
body.dark-mode h4,
body.dark-mode h5,
body.dark-mode h6 {
    color: #ffffff !important;
}

body.dark-mode p {
    color: #d0d0d0 !important;
}

/* Ostateczne wymuszenie dla wszystkich tekstów */
body.dark-mode,
body.dark-mode * {
    color: #ffffff !important;
}

/* Wyjątki */
body.dark-mode a,
body.dark-mode .btn-link,
body.dark-mode .text-primary {
    color: #0d6efd !important;
}

body.dark-mode a:hover,
body.dark-mode .btn-link:hover {
    color: #9ec5fe !important;
}

body.dark-mode .btn-primary,
body.dark-mode .btn-danger,
body.dark-mode .btn-success,
body.dark-mode .btn-warning {
    color: #ffffff !important;
}

body.dark-mode .btn-warning {
    color: #1a1a1a !important;
}

body.dark-mode .text-muted,
body.dark-mode .text-secondary {
    color: #b0b0b0 !important;
}

body.dark-mode .text-dark {
    color: #1a1a1a !important;
}

body.dark-mode .bg-light,
body.dark-mode .bg-white {
    background-color: #1a1a1a !important;
}

/* Sekcja filtrów */
body.dark-mode .card.shadow-sm.border-0.rounded-4 {
    background-color: #1e1e1e !important;
    border: 1px solid #333333 !important;
}

body.dark-mode .card-body {
    background-color: #1e1e1e !important;
}

body.dark-mode .border-bottom {
    border-color: #333333 !important;
}

body.dark-mode h6,
body.dark-mode .fw-bold {
    color: #ffffff !important;
}

body.dark-mode .btn-link {
    color: #0d6efd !important;
}

body.dark-mode .btn-link:hover {
    color: #9ec5fe !important;
}

body.dark-mode .bg-light {
    background-color: #2d2d2d !important;
}

body.dark-mode .bg-light .fw-semibold {
    color: #ffffff !important;
}

body.dark-mode .badge[style*="background:#c0392b;"] {
    background-color: #c0392b !important;
}

body.dark-mode .form-check-input {
    background-color: #2d2d2d !important;
    border-color: #404040 !important;
}

body.dark-mode .form-check-input:checked {
    background-color: #0d6efd !important;
    border-color: #0d6efd !important;
}

body.dark-mode .form-check-label {
    color: #b0b0b0 !important;
}

body.dark-mode .text-muted {
    color: #808080 !important;
}

/* Przyciski kategorii */
body.dark-mode .btn-outline-secondary {
    background-color: #2d2d2d !important;
    border-color: #404040 !important;
    color: #b0b0b0 !important;
}

body.dark-mode .btn-outline-secondary:hover {
    background-color: #404040 !important;
    color: #ffffff !important;
}

body.dark-mode .btn-check:checked + .btn-outline-secondary {
    background-color: #0d6efd !important;
    border-color: #0d6efd !important;
    color: #ffffff !important;
}

/* Range slider (zakres cenowy) */
body.dark-mode .dual-range .track {
    background-color: #404040 !important;
}

body.dark-mode .dual-range .fill {
    background-color: #0d6efd !important;
}

body.dark-mode input[type="range"] {
    background-color: transparent !important;
}

body.dark-mode input[type="range"]::-webkit-slider-runnable-track {
    background-color: #404040 !important;
}

body.dark-mode input[type="range"]::-webkit-slider-thumb {
    background-color: #0d6efd !important;
}

body.dark-mode .input-group-text {
    background-color: #2d2d2d !important;
    border-color: #404040 !important;
    color: #b0b0b0 !important;
}

body.dark-mode .form-control[readonly] {
    background-color: #2d2d2d !important;
    border-color: #404040 !important;
    color: #ffffff !important;
}

/* Gwiazdki ocen */
body.dark-mode .bi-star-fill.text-warning {
    color: #f59e0b !important;
}

body.dark-mode .bi-star.text-warning {
    color: #f59e0b !important;
}

/* Przycisk główny */
body.dark-mode .btn-primary {
    background-color: #0d6efd !important;
    border-color: #0d6efd !important;
    color: #ffffff !important;
}

body.dark-mode .btn-primary:hover {
    background-color: #0b5ed7 !important;
    border-color: #0a58ca !important;
}

body.dark-mode .rounded-pill {
    background-color: #1e1e1e;
}

/* Collapse strzałki */
body.dark-mode [data-bs-toggle="collapse"] .text-muted {
    color: #808080 !important;
}

body.dark-mode [data-bs-toggle="collapse"]:hover .text-muted {
    color: #ffffff !important;
}

/* Ikony */
body.dark-mode .bi {
    color: inherit;
}
