/*
Theme Name: R107 Theme
Theme URI: https://r107.pl
Description: Motyw dedykowany dla strony o Mercedesie R107 (SL i SLC, lata 1971-1989). Zawiera logo w menu, wsparcie dla napraw i ogłoszeń.
Author: Wojtek + AI
Version: 1.0.0
Text Domain: r107-theme
*/

/* Reset i podstawowe style */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #fff;
}

/* Header i menu */
.site-header {
    background-color: #000;
    border-bottom: 1px solid #333;
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
}

.site-logo {
    display: flex;
    align-items: center;
    order: 1;
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    order: 3;
    z-index: 1001;
    position: relative;
}

.hamburger-icon {
    display: flex;
    flex-direction: column;
    gap: 5px;
    width: 31px;
    height: 23px;
}

.hamburger-icon span {
    display: block;
    width: 100%;
    height: 3px;
    background-color: #fff;
    transition: all 0.3s ease;
}

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

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

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

.main-navigation {
    order: 2;
}

.site-logo img {
    max-height: 60px;
    width: auto;
    height: auto;
}

.main-navigation {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.main-navigation ul {
    list-style: none;
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.main-navigation a {
    text-decoration: none;
    color: #fff;
    font-weight: 500;
    transition: color 0.3s ease;
}

.main-navigation a:hover {
    color: #ccc;
}

.sklepy-menu-link {
    text-decoration: none;
    color: #fff;
    font-weight: 500;
    transition: color 0.3s ease;
    margin-right: 1rem;
}

.sklepy-menu-link:hover {
    color: #ccc;
}

.add-ogloszenie-btn {
    padding: 0.75rem 1.5rem;
    background-color: #d32f2f;
    color: #000;
    border: 2px solid #d32f2f;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    margin-left: 1rem;
}

.add-ogloszenie-btn:hover {
    background-color: #b71c1c;
    color: #000;
    border-color: #b71c1c;
}

/* Container */
.site-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

/* Footer */
.site-footer {
    background-color: #f5f5f5;
    border-top: 1px solid #e0e0e0;
    padding: 2rem 0;
    margin-top: 4rem;
    text-align: center;
    color: #666;
}

/* Naprawy - zakładki */
.repair-tabs {
    margin: 2rem 0;
}

.repair-tabs-nav {
    display: flex;
    border-bottom: 2px solid #e0e0e0;
    margin-bottom: 2rem;
    gap: 0;
}

.repair-tab-button {
    padding: 1rem 2rem;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    color: #666;
    transition: all 0.3s ease;
}

.repair-tab-button:hover {
    color: #000;
}

.repair-tab-button.active {
    color: #000;
    border-bottom-color: #000;
}

.repair-tab-content {
    display: none;
    padding: 1rem 0;
}

.repair-tab-content.active {
    display: block;
}

.repair-tab-content ul {
    list-style: none;
    padding-left: 0;
}

.repair-tab-content li {
    padding: 0.5rem 0;
    border-bottom: 1px solid #f0f0f0;
}

.repair-tab-content li:last-child {
    border-bottom: none;
}

/* Single naprawa - Layout z sidebar */
.repair-layout {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 2rem;
    margin-top: 2rem;
}

.repair-sidebar {
    position: sticky;
    top: 100px;
    height: fit-content;
}

.repair-sidebar-nav h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #e0e0e0;
}

.repair-sidebar-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.repair-sidebar-nav li {
    margin-bottom: 0.5rem;
}

.repair-nav-button {
    width: 100%;
    padding: 0.75rem 1rem;
    background: none;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    color: #666;
    text-align: left;
    transition: all 0.3s ease;
}

.repair-nav-button:hover {
    background-color: #f5f5f5;
    border-color: #000;
    color: #000;
}

.repair-nav-button.active {
    background-color: #000;
    color: #fff;
    border-color: #000;
}

.repair-main-content {
    min-width: 0;
}

.repair-section {
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid #e0e0e0;
}

.repair-section:last-child {
    border-bottom: none;
}

.repair-section h2 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.repair-section ul {
    margin-left: 1.5rem;
}

.repair-section li {
    margin-bottom: 0.5rem;
}

.youtube-videos {
    display: grid;
    gap: 2rem;
}

.youtube-video-item {
    position: relative;
    padding-bottom: 56.25%;
    /* 16:9 aspect ratio */
    height: 0;
    overflow: hidden;
}

.youtube-video-item iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.parts-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

.parts-table th,
.parts-table td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid #e0e0e0;
}

.parts-table th {
    background-color: #f9f9f9;
    font-weight: 600;
}

.parts-table tr:hover {
    background-color: #f9f9f9;
}

/* Archiwum napraw - Layout z panelem filtrów */
.naprawy-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 2rem;
    margin-top: 2rem;
}

.naprawy-content {
    min-width: 0;
}

/* Archiwum napraw - Karty */
.naprawy-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.5rem;
}

.naprawa-card {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 1.5rem;
    transition: box-shadow 0.3s ease, transform 0.2s ease;
    background-color: #fff;
}

.naprawa-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

.naprawa-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.naprawa-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0 0 1rem 0;
    color: #333;
    line-height: 1.4;
}

.naprawa-meta {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.naprawa-sekcja {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background-color: #e8f4f8;
    color: #0066cc;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 500;
}

.naprawa-trudnosc {
    font-size: 0.9rem;
    color: #ff9800;
}

.naprawa-czas {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
    font-size: 0.9rem;
    color: #666;
}

.czas-icon {
    font-size: 1rem;
}

.naprawa-objawy {
    margin: 0.75rem 0;
    font-size: 0.9rem;
    color: #666;
    line-height: 1.5;
}

.naprawa-model {
    margin: 0.5rem 0 0 0;
    font-size: 0.85rem;
    color: #999;
}

/* Archiwum ogłoszeń - Layout z panelem filtrów */
.ogloszenia-layout {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 2rem;
    margin-top: 2rem;
}

.filters-sidebar {
    background-color: #f9f9f9;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 1.5rem;
    height: fit-content;
    position: sticky;
    top: 20px;
    max-height: calc(100vh - 40px);
    overflow-y: auto;
    z-index: 100;
}

.filters-header {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e0e0e0;
    text-align: left;
}

.filters-header h2 {
    font-size: 1.2rem;
    font-weight: 600;
    margin: 0;
    flex: 0 1 auto;
    text-align: left;
}

@media (max-width: 768px) {
    .filters-header {
        cursor: pointer;
        user-select: none;
    }

    .filters-header::after {
        content: " ▼";
        transition: transform 0.3s ease;
    }

    .filters-sidebar.filters-open .filters-header::after {
        transform: rotate(180deg);
    }
}

.filters-icon {
    font-size: 0;
    display: inline-block;
    width: 20px;
    height: 20px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M22 3H2l8 9.46V19l4 2v-8.54L22 3z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    vertical-align: middle;
}

.filters-form {
    display: flex;
    flex-direction: column;
    width: 100%;
    gap: 0.75rem;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.filter-group label {
    display: block;
    padding: 0;
    font-weight: 600;
    font-size: 0.9rem;
    color: #333;
    white-space: nowrap;
}

.filter-input-wrapper {
    display: block;
    width: 100%;
    padding: 0;
}

.filter-group input,
.filter-group select {
    width: 100%;
    padding: 0.6rem 2.5rem 0.6rem 0.75rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.9rem;
    font-family: inherit;
    background-color: #fff;
    box-sizing: border-box;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    cursor: pointer;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.filter-group select {
    height: 45px;
}

/* Własna strzałka dla selectów */
.filter-group select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23333' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 12px;
    padding-right: 2.5rem;
}

.filter-group select:hover {
    border-color: #999;
}

.filter-group input:focus,
.filter-group select:focus {
    outline: none;
    border-color: #000;
    box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.1);
}

.filter-group input {
    padding-right: 0.75rem;
}

.filters-submit-wrapper {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.filters-submit-wrapper label {
    display: none;
}

.filters-submit-wrapper .filter-input-wrapper {
    width: 100%;
    padding: 0;
}

.filter-submit-btn {
    width: 100%;
    padding: 0.75rem 1.5rem;
    background-color: #000;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.filter-submit-btn:hover {
    background-color: #333;
}

.filter-submit-btn:active {
    background-color: #555;
}

.ogloszenia-content {
    min-width: 0;
}

/* Archiwum ogłoszeń - Karty */
.ogloszenia-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.ogloszenie-card {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    transition: box-shadow 0.3s ease, transform 0.2s ease;
    background-color: #fff;
}

.ogloszenie-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

.ogloszenie-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.ogloszenie-image {
    width: 100%;
    height: 160px;
    overflow: hidden;
    background-color: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    min-height: 160px;
}

.ogloszenie-image img {
    width: 100%;
    height: 100%;
    min-width: 100%;
    min-height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    visibility: visible;
}

.ogloszenie-info {
    padding: 0.75rem;
}

.ogloszenie-badges {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
    flex-wrap: wrap;
}

.badge {
    display: inline-block;
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 500;
}

.badge-type {
    background-color: #e8f4f8;
    color: #0066cc;
}

.badge-rss {
    background-color: #fff3cd;
    color: #856404;
}

.badge-country {
    background-color: #f0f0f0;
    color: #333;
}

.ogloszenie-title {
    font-size: 0.85rem;
    font-weight: 600;
    margin: 0 0 0.5rem 0;
    color: #333;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.ogloszenie-details {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.ogloszenie-price {
    font-size: 0.95rem;
    font-weight: 600;
    color: #000;
    margin: 0;
    text-align: right;
    margin-left: auto;
}

.ogloszenie-year {
    font-size: 0.75rem;
    color: #666;
    margin: 0;
    text-align: left;
}

/* Page header */
.page-header {
    margin-bottom: 3rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #e0e0e0;
}

.page-title {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.page-description {
    color: #666;
    font-size: 1.1rem;
}

/* Responsywność */
@media (max-width: 768px) {
    .header-container {
        flex-wrap: nowrap;
        /* Prevent wrapping */
        justify-content: space-between;
        /* Logo left, Hamburger right */
    }

    .site-logo {
        order: 1;
        flex-shrink: 0;
        /* Prevent logo shrinking */
    }

    .menu-toggle {
        display: block;
        order: 2;
        margin-left: 0;
        /* Let flex justify handle spacing */
    }

    .main-navigation {
        order: 3;
        position: fixed;
        top: 0;
        right: -100%;
        /* Fully hide off-screen */
        width: 80%;
        /* Wider menu for better usability */
        height: 100vh;
        background-color: #000;
        z-index: 1002;
        /* Higher than toggle */
        transition: right 0.3s ease;
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
        padding: 4rem 1.5rem 2rem;
        /* Add top padding for close button space */
        overflow-y: auto;
        box-shadow: -2px 0 8px rgba(0, 0, 0, 0.5);
    }

    .main-navigation.menu-open {
        right: 0;
    }

    /* Filters on mobile - collapsed by default */
    .filters-sidebar {
        position: fixed;
        bottom: 0;
        left: 0;
        width: 100%;
        height: auto;
        max-height: 0;
        /* Collapsed */
        padding: 0;
        border-radius: 20px 20px 0 0;
        border: none;
        box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.2);
        transition: max-height 0.3s ease, padding 0.3s ease;
        background: #fff;
        z-index: 999;
        overflow: hidden;
    }

    .filters-sidebar.filters-open {
        max-height: 80vh;
        padding: 1.5rem;
        overflow-y: auto;
    }

    /* Trigger button for filters (sticky at bottom or top) */
    .filters-header {
        display: flex;
        /* Show header as trigger */
        position: sticky;
        top: 0;
        background: #f9f9f9;
        margin: 0;
        padding: 10px 20px;
        z-index: 1000;
        width: 100%;
        justify-content: center;
        border: 1px solid #ddd;
        border-radius: 4px;
        cursor: pointer;
    }

    /* Move filters header out of sidebar for mobile structure if possible, 
       but for now we style it to look like a button when collapsed? 
       Actually, `archive-ogloszenie.php` structure has header INSIDE sidebar.
       So we need a different approach: 
    */
}

/* Correct Mobile Filters Implementation */
@media (max-width: 768px) {
    .ogloszenia-layout {
        display: flex;
        flex-direction: column;
    }

    .filters-sidebar {
        position: relative;
        top: 0;
        height: auto;
        max-height: 60px;
        /* Show only header */
        overflow: hidden;
        margin-bottom: 20px;
        transition: max-height 0.3s ease;
        padding: 0;
    }

    .filters-sidebar.filters-open {
        max-height: 1000px;
        /* Expand */
        padding: 1.5rem;
    }

    .filters-header {
        margin: 0;
        padding: 1rem;
        background: #f0f0f0;
        cursor: pointer;
    }

    .filters-header h2 {
        font-size: 1rem;
    }

    .filters-header::after {
        content: " +";
        font-weight: bold;
        margin-left: auto;
    }

    .filters-sidebar.filters-open .filters-header::after {
        content: " -";
    }
}


@media (max-width: 768px) {
    .main-navigation.menu-open {
        right: 0;
    }

    /* Overlay w tle */
    .main-navigation.menu-open::before {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        /* Cover full screen */
        height: 100vh;
        background-color: rgba(0, 0, 0, 0.5);
        z-index: -1;
    }

    .main-navigation ul {
        flex-direction: column;
        gap: 1rem;
        width: 100%;
        margin-top: 2rem;
        padding-left: 0;
        /* Reset default padding to fix alignment */
    }

    .main-navigation .sklepy-menu-link {
        margin-right: 0;
        margin-bottom: 0.5rem;
        display: block;
        padding: 0.5rem 0;
        /* Match typical menu item spacing */
        border-bottom: 1px solid #333;
        text-align: left;
    }

    .main-navigation .add-ogloszenie-btn {
        margin-left: 0;
        width: 100%;
        text-align: center;
        margin-top: 0.5rem;
        margin-bottom: 0.5rem;
        order: 0;
        /* Reset order */
    }

    /* Styl dla przycisku w liście menu */
    .main-navigation .primary-menu .add-ogloszenie-btn {
        display: block;
        padding: 0.75rem 1.5rem;
        margin: 0.5rem 0;
    }

    .main-navigation .primary-menu li {
        width: 100%;
    }

    /* Overlay do zamykania menu */
    body.menu-open::after {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background-color: rgba(0, 0, 0, 0.5);
        z-index: 998;
    }

    .repair-tabs-nav {
        flex-wrap: wrap;
    }

    .repair-tab-button {
        padding: 0.75rem 1rem;
        font-size: 0.9rem;
    }

    .naprawy-grid {
        grid-template-columns: 1fr;
    }

    .ogloszenia-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .page-title {
        font-size: 2rem;
    }

    .ogloszenia-layout,
    .naprawy-layout,
    .repair-layout {
        grid-template-columns: 1fr;
    }

    /* Filters sidebar styles were redefined in the previous block */

    .repair-sidebar {
        position: static;
        margin-bottom: 2rem;
    }

    /* Tabele na mobile - przewijanie poziome */
    .repair-tools-parts table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        width: 100%;
    }

    .repair-tools-parts table thead,
    .repair-tools-parts table tbody {
        display: table;
        width: 100%;
    }

    .repair-tools-parts table tr {
        display: table-row;
    }

    .repair-tools-parts th,
    .repair-tools-parts td {
        white-space: nowrap;
        min-width: 100px;
    }
}

@media (max-width: 640px) {
    .ogloszenia-grid {
        grid-template-columns: 1fr;
    }

    .site-container {
        padding: 1rem;
    }

    .header-container {
        padding: 0 1rem;
    }

    /* Upewnij się, że obrazy są widoczne na mobile */
    .ogloszenie-image {
        display: flex !important;
        visibility: visible !important;
        height: 200px !important;
        width: 100% !important;
        min-height: 200px !important;
    }

    .ogloszenie-image img {
        display: block !important;
        visibility: visible !important;
        width: 100% !important;
        height: 100% !important;
        object-fit: cover !important;
    }

    .ogloszenie-card {
        overflow: visible;
    }
}

/* ============================================
   NOWY LAYOUT NAPRAWY
   ============================================ */

/* Zdjęcie tytułowe */
.repair-featured-image {
    width: 100%;
    margin-bottom: 2rem;
    border-radius: 8px;
    overflow: hidden;
}

.repair-featured-image img {
    width: 100%;
    height: auto;
    display: block;
}

/* Header naprawy */
.repair-header {
    margin-bottom: 2rem;
}

.repair-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: #000;
}

.repair-meta-info {
    display: flex;
    gap: 2rem;
    align-items: center;
    flex-wrap: wrap;
    margin-top: 1rem;
}

.repair-difficulty {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.difficulty-label {
    font-weight: 600;
    color: #333;
}

.difficulty-stars {
    display: flex;
    gap: 0.2rem;
}

.difficulty-stars .star {
    font-size: 1.5rem;
    line-height: 1;
}

.difficulty-stars .star.filled {
    color: #ffc107;
}

.difficulty-stars .star.empty {
    color: #ddd;
}

.repair-tag {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.tag-label {
    font-weight: 600;
    color: #333;
}

.tag-value {
    background-color: #f0f0f0;
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    font-size: 0.9rem;
    color: #333;
}

/* Sekcje naprawy */
.repair-content {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.repair-section {
    margin-bottom: 5px;
}

.section-title {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    color: #000;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Sekcja OBJAWY - czerwona ramka i czerwone tło */
.repair-symptoms {
    border: 3px solid #ccbcbe;
    border-radius: 8px;
    padding: 1.5rem;
    background-color: #ffebee;
    position: relative;
}

.repair-symptoms .symptoms-toggle {
    width: 100%;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    text-align: left;
    margin-bottom: 0;
}

.repair-symptoms .symptoms-toggle:hover {
    opacity: 0.8;
}

.repair-symptoms .symptoms-toggle .section-title {
    margin: 0;
    flex: 1;
    color: #d32f2f;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-align: left;
}

.repair-symptoms .symptoms-toggle .toggle-arrow {
    font-size: 1.2rem;
    transition: transform 0.3s ease;
    margin-left: 1rem;
    color: #d32f2f;
}

.repair-symptoms .symptoms-toggle[aria-expanded="true"] .toggle-arrow {
    transform: rotate(180deg);
}

.repair-symptoms .section-title {
    color: #d32f2f;
    margin-bottom: 0.75rem;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.repair-symptoms .section-title:before {
    content: "?";
    display: inline-block;
    width: 24px;
    height: 24px;
    background-color: #d32f2f;
    color: #fff;
    border-radius: 50%;
    text-align: center;
    line-height: 24px;
    font-size: 16px;
    font-weight: bold;
    margin-right: 0.5rem;
    vertical-align: middle;
}

.symptoms-content {
    margin-top: 1rem;
    font-size: 0.95rem;
}

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

.symptoms-list li {
    padding: 0.5rem 0;
    border-bottom: 1px solid #ffcdd2;
    color: #333;
    font-size: 0.95rem;
}

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

.symptoms-list li:before {
    content: "• ";
    color: #d32f2f;
    font-weight: bold;
    margin-right: 0.5rem;
}

/* Sekcja Narzędzia i Części - niebieska ramka i niebieskie tło */
.repair-tools-parts {
    position: relative;
    border: 3px solid #b6c2ca;
    border-radius: 8px;
    padding: 1.5rem;
    background-color: #e3f2fd;
}

.repair-tools-parts * {
    background-color: transparent;
}

.repair-tools-parts .tools-parts-content,
.repair-tools-parts .tools-list,
.repair-tools-parts .parts-table,
.repair-tools-parts .parts-list {
    background-color: #e3f2fd;
}

.repair-tools-parts .tools-parts-toggle {
    width: 100%;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    text-align: left;
    margin-bottom: 0;
}

.repair-tools-parts .tools-parts-toggle:hover {
    opacity: 0.8;
}

.repair-tools-parts .tools-parts-toggle .section-title {
    margin: 0;
    flex: 1;
    color: #1976d2;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.repair-tools-parts .tools-parts-toggle .toggle-arrow {
    font-size: 1.2rem;
    transition: transform 0.3s ease;
    margin-left: 1rem;
    color: #1976d2;
}

.repair-tools-parts .tools-parts-toggle[aria-expanded="true"] .toggle-arrow {
    transform: rotate(180deg);
}

.repair-tools-parts .section-title {
    color: #1976d2;
    margin-bottom: 0.75rem;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.repair-tools-parts .section-title:before {
    content: "🔧";
    margin-right: 0.5rem;
    vertical-align: middle;
}

.tools-parts-content {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* Style dla tabel HTML w module Narzędzia i części */
.repair-tools-parts table {
    width: 100%;
    border-collapse: collapse;
    font-family: Arial, sans-serif;
    margin: 1rem 0;
    table-layout: fixed;
    overflow-x: auto;
    display: block;
    max-width: 100%;
}

.repair-tools-parts table thead,
.repair-tools-parts table tbody {
    display: block;
    width: 100%;
}

.repair-tools-parts table thead {
    width: calc(100% - 17px);
}

.repair-tools-parts table tbody {
    max-height: 400px;
    overflow-y: auto;
    overflow-x: hidden;
}

.repair-tools-parts table tr {
    display: table;
    width: 100%;
    table-layout: fixed;
}

.repair-tools-parts table,
.repair-tools-parts th,
.repair-tools-parts td {
    border: 1px solid #bbb;
    /* cienkie ramki */
}

.repair-tools-parts th {
    font-weight: bold;
    /* pogrubione nagłówki */
    background: #f4f4f4;
    padding: 8px;
    text-align: left;
    word-wrap: break-word;
}

.repair-tools-parts td {
    padding: 6px 8px;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.repair-tools-parts tbody tr:nth-child(even) {
    background-color: #f9f9f9;
}

.repair-tools-parts tbody tr:hover {
    background-color: #f0f0f0;
}

/* Usuń style z tagu <style> w HTML - nasze style CSS mają wyższy priorytet */
.repair-tools-parts .tools-content style {
    display: none !important;
}

.tools-parts-item {
    margin-bottom: 0;
}

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

.tools-list li {
    padding: 0.5rem 0;
    border-bottom: 1px solid #bbdefb;
    color: #333;
    font-size: 0.95rem;
}

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

.tools-list li:before {
    content: "";
    margin-right: 0;
}

.parts-table {
    width: 100%;
    border-collapse: collapse;
    background-color: #e3f2fd;
    border-radius: 4px;
    overflow: hidden;
    font-size: 0.9rem;
}

.parts-table tbody {
    background-color: #e3f2fd;
}

.parts-table td {
    background-color: #e3f2fd;
}

.parts-table td {
    padding: 0.6rem;
    border-bottom: 1px solid #e0e0e0;
    font-size: 0.9rem;
}

.parts-table tbody tr:last-child td {
    border-bottom: none;
}

.parts-table tbody tr:hover {
    background-color: #f5f5f5;
}

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

.parts-list li {
    padding: 0.5rem 0;
    border-bottom: 1px solid #bbdefb;
    color: #333;
}

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

.parts-list li:before {
    content: "🔩 ";
    margin-right: 0.5rem;
}

/* Sekcja Filmy YouTube */
.repair-videos {
    margin-bottom: 5px;
}

.youtube-videos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-top: 1rem;
}

.youtube-video-item {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.youtube-video-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.youtube-thumbnail-link {
    display: block;
    position: relative;
    width: 100%;
    padding-top: 56.25%;
    /* 16:9 aspect ratio */
    overflow: hidden;
}

.youtube-thumbnail {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.youtube-play-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    background-color: rgba(255, 0, 0, 0.8);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.5rem;
    transition: background-color 0.3s ease;
}

.youtube-thumbnail-link:hover .youtube-play-icon {
    background-color: rgba(255, 0, 0, 1);
}

/* Sekcja Instrukcja */
.repair-instruction {
    margin-bottom: 5px;
}

.repair-instruction .section-title {
    color: #d32f2f;
}

.repair-instruction .section-title:before {
    content: "📄";
    margin-right: 0.5rem;
    vertical-align: middle;
    color: #d32f2f;
    font-size: 1.2em;
}

.repair-description {
    margin-bottom: 1.5rem;
    line-height: 1.8;
    color: #333;
    font-size: 0.95rem;
}

.repair-instruction-content {
    line-height: 1.8;
    color: #333;
    font-size: 0.95rem;
}

.repair-instruction-content h3,
.repair-instruction-content h4 {
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    color: #000;
}

.repair-instruction-content h3:first-child,
.repair-instruction-content h4:first-child {
    margin-top: 0;
}

.repair-instruction-content ol,
.repair-instruction-content ul {
    margin-left: 1.5rem;
    margin-bottom: 1rem;
}

.repair-instruction-content li {
    margin-bottom: 0.5rem;
}

/* Sekcja Komentarze */
.repair-comments {
    margin-bottom: 5px;
    padding-top: 1rem;
    border-top: 2px solid #e0e0e0;
}

.repair-comments .section-title {
    color: #333;
    margin-bottom: 1.5rem;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.comments-section {
    margin-top: 1rem;
}

/* Lista komentarzy */
.comment-list {
    list-style: none;
    padding: 0;
    margin: 0 0 2rem 0;
}

.comment-list .comment {
    background-color: #f9f9f9;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    position: relative;
}

.comment-list .comment:last-child {
    margin-bottom: 0;
}

/* Nagłówek komentarza */
.comment-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e0e0e0;
}

.comment-author {
    font-weight: 600;
    color: #1976d2;
    font-size: 1rem;
}

.comment-author a {
    color: #1976d2;
    text-decoration: none;
}

.comment-author a:hover {
    text-decoration: underline;
}

.comment-metadata {
    font-size: 0.85rem;
    color: #666;
}

.comment-metadata a {
    color: #666;
    text-decoration: none;
}

.comment-metadata a:hover {
    color: #1976d2;
    text-decoration: underline;
}

/* Avatar użytkownika */
.comment-author .avatar {
    border-radius: 50%;
    margin-right: 0.75rem;
    width: 48px;
    height: 48px;
    vertical-align: middle;
}

/* Treść komentarza */
.comment-content {
    color: #333;
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.comment-content p {
    margin-bottom: 0.75rem;
}

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

/* Odpowiedzi (zagnieżdżone komentarze) */
.comment-list .children {
    list-style: none;
    padding: 0;
    margin: 1.5rem 0 0 2rem;
}

.comment-list .children .comment {
    background-color: #fff;
    border-left: 3px solid #1976d2;
}

/* Linki akcji komentarza */
.comment-actions {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #e0e0e0;
}

.comment-reply-link,
.comment-edit-link {
    font-size: 0.85rem;
    color: #666;
    text-decoration: none;
    margin-right: 1rem;
    padding: 0.25rem 0.75rem;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    background-color: #fff;
    transition: all 0.3s ease;
}

.comment-reply-link:hover,
.comment-edit-link:hover {
    color: #1976d2;
    border-color: #1976d2;
    background-color: #e3f2fd;
}

/* Formularz komentarza */
.comment-respond {
    background-color: #f9f9f9;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 2rem;
    margin-top: 2rem;
}

.comment-respond .comment-reply-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 1.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.comment-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.comment-form-comment label {
    display: block;
    font-weight: 600;
    color: #333;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.comment-form-comment textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    font-size: 0.95rem;
    font-family: inherit;
    resize: vertical;
    min-height: 120px;
    box-sizing: border-box;
}

.comment-form-comment textarea:focus {
    outline: none;
    border-color: #1976d2;
    box-shadow: 0 0 0 2px rgba(25, 118, 210, 0.1);
}

.comment-form-author,
.comment-form-email,
.comment-form-url {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.comment-form-author label,
.comment-form-email label,
.comment-form-url label {
    font-weight: 600;
    color: #333;
    font-size: 0.9rem;
}

.comment-form-author input,
.comment-form-email input,
.comment-form-url input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    font-size: 0.95rem;
    font-family: inherit;
    box-sizing: border-box;
}

.comment-form-author input:focus,
.comment-form-email input:focus,
.comment-form-url input:focus {
    outline: none;
    border-color: #1976d2;
    box-shadow: 0 0 0 2px rgba(25, 118, 210, 0.1);
}

.form-submit {
    margin-top: 1rem;
}

.form-submit input[type="submit"] {
    background-color: #1976d2;
    color: #fff;
    border: none;
    padding: 0.75rem 2rem;
    border-radius: 4px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.form-submit input[type="submit"]:hover {
    background-color: #1565c0;
}

.form-submit input[type="submit"]:active {
    background-color: #0d47a1;
}

/* Informacje o zalogowanym użytkowniku */
.logged-in-as-wrapper {
    margin-top: 1rem;
    margin-bottom: 1rem;
    padding: 1rem;
    background-color: #e3f2fd;
    border: 1px solid #b6c2ca;
    border-radius: 4px;
}

.logged-in-as {
    margin: 0;
    font-size: 0.9rem;
    color: #333;
    line-height: 1.6;
}

.logged-in-as a {
    color: #1976d2;
    text-decoration: none;
    font-weight: 500;
}

.logged-in-as a:hover {
    text-decoration: underline;
}

/* Notatki o wymaganych polach */
.comment-notes {
    margin-bottom: 1rem;
    font-size: 0.85rem;
    color: #666;
    font-style: italic;
}

.comment-notes .required {
    color: #d32f2f;
    font-weight: bold;
}

/* Brak komentarzy */
.no-comments {
    text-align: center;
    padding: 2rem;
    color: #666;
    font-style: italic;
}

/* Komentarze zamknięte */
.comments-closed {
    text-align: center;
    padding: 2rem;
    color: #666;
    font-style: italic;
    background-color: #f9f9f9;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
}

/* Responsywność dla napraw */
@media (max-width: 768px) {
    .repair-title {
        font-size: 2rem;
    }

    .repair-meta-info {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .youtube-videos-grid {
        grid-template-columns: 1fr;
    }

    .parts-table {
        font-size: 0.9rem;
    }

    .parts-table th,
    .parts-table td {
        padding: 0.5rem;
    }
}

/* ============================================
   SKLEPY - STYLES
   ============================================ */

.sklepy-layout {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 2rem;
    margin-top: 2rem;
}

.sklepy-content {
    min-width: 0;
}

.category-nav {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.category-link {
    display: block;
    padding: 0.75rem 1rem;
    color: #333;
    text-decoration: none;
    border-radius: 4px;
    transition: background-color 0.3s ease, color 0.3s ease;
    font-weight: 500;
}

.category-link:hover {
    background-color: #f0f0f0;
    color: #1976d2;
}

.sklepy-section {
    margin-bottom: 3rem;
}

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

.sklepy-section-title {
    font-size: 1.8rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid #e0e0e0;
    color: #333;
}

.sklepy-list {
    list-style: none;
    padding: 0;
    margin: 0 0 3rem 0;
}

.sklep-item {
    padding: 1rem 0;
    border-bottom: 1px solid #e0e0e0;
    line-height: 1.6;
}

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

.sklep-item:hover {
    background-color: #f9f9f9;
    padding-left: 0.5rem;
    padding-right: 0.5rem;
    margin-left: -0.5rem;
    margin-right: -0.5rem;
    border-radius: 4px;
    transition: background-color 0.2s ease;
}

.sklep-link {
    text-decoration: none;
    color: inherit;
}

.sklep-name {
    font-size: 1.1rem;
    font-weight: 600;
    color: #1976d2;
}

.sklep-link:hover .sklep-name {
    color: #1565c0;
    text-decoration: underline;
}

.sklep-separator {
    color: #999;
    margin: 0 0.5rem;
}

.sklep-opis {
    color: #666;
    font-size: 0.95rem;
}

.sklep-url-display {
    display: block;
    color: #999;
    font-size: 0.85rem;
    margin-top: 0.25rem;
    font-style: italic;
    word-break: break-all;
}

/* Formularz dodawania sklepu */
.sklep-form-wrapper {
    margin-top: 3rem;
    padding: 2rem;
    background-color: #f9f9f9;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
}

.sklep-form-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #333;
}

.sklep-form-note {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
    font-style: italic;
}

.sklep-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-weight: 600;
    color: #333;
    font-size: 0.9rem;
}

.form-group .required {
    color: #d32f2f;
}

.form-group input[type="text"],
.form-group input[type="url"],
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.95rem;
    font-family: inherit;
    box-sizing: border-box;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: #1976d2;
    box-shadow: 0 0 0 2px rgba(25, 118, 210, 0.1);
}

.sklep-submit-btn {
    padding: 0.75rem 2rem;
    background-color: #1976d2;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.sklep-submit-btn:hover {
    background-color: #1565c0;
}

.sklep-submit-btn:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

.sklep-form-message {
    margin-top: 1rem;
    padding: 1rem;
    border-radius: 4px;
}

.sklep-form-message.success {
    background-color: #e8f5e9;
    border: 1px solid #4caf50;
    color: #2e7d32;
}

.sklep-form-message.error {
    background-color: #ffebee;
    border: 1px solid #f44336;
    color: #c62828;
}

.sklep-login-notice {
    margin-top: 3rem;
    padding: 1.5rem;
    background-color: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 8px;
    text-align: center;
}

.sklep-login-notice a {
    color: #1976d2;
    text-decoration: none;
    font-weight: 600;
}

.sklep-login-notice a:hover {
    text-decoration: underline;
}

/* Responsywność dla sklepów */
@media (max-width: 768px) {
    .sklepy-layout {
        grid-template-columns: 1fr;
    }

    .filters-sidebar {
        position: static;
        margin-bottom: 2rem;
    }

    .category-nav {
        flex-direction: row;
        flex-wrap: wrap;
    }

    .category-link {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }

    .sklepy-section-title {
        font-size: 1.5rem;
    }

    .sklep-item {
        padding: 0.75rem 0;
    }

    .sklep-url-display {
        font-size: 0.8rem;
    }
}