:root {
    --primary: #8B7355;
    --secondary: #D4C0A1;
    --light: #F5F1E8;
    --dark: #4A3C29;
    --accent: #A52A2A;
    --menu-hover: #7a6348;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: var(--light);
    color: #333;
    line-height: 1.6;
}

header {
    background: linear-gradient(135deg, var(--primary), var(--dark));
    padding: 2rem 0 0;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.site-title {
    font-size: 3.5rem;
    color: var(--light);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 3px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
    font-family: 'Georgia', serif;
    margin-bottom: 0.5rem;
}

.site-subtitle {
    color: var(--secondary);
    font-size: 1.2rem;
    max-width: 800px;
    margin: 0 auto 20px;
}

/* Poziome menu */
.horizontal-menu {
    background-color: var(--dark);
    padding: 0;
    margin-top: 10px;
}

.menu-container {
    max-width: 1200px;
    margin: 0 auto;
}

.menu-list {
    display: flex;
    list-style: none;
    justify-content: center;
    flex-wrap: wrap;
}

.menu-item {
    position: relative;
}

.menu-link {
    display: flex;
    align-items: center;
    padding: 15px 25px;
    color: var(--light);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
    white-space: nowrap;
}

.menu-link:hover,
.menu-link.active {
    background-color: var(--menu-hover);
}

.menu-icon {
    margin-right: 8px;
    width: 16px;
    height: 16px;
    fill: currentColor;
}

.menu-arrow {
    margin-left: 8px;
    width: 12px;
    height: 12px;
    transition: transform 0.3s ease;
    fill: currentColor;
}

/* Rozwijane podmenu */
.submenu {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 250px;
    background: white;
    border-radius: 0 0 5px 5px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.15);
    list-style: none;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
    z-index: 1000;
}

.menu-item:hover .submenu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.menu-item:hover .menu-arrow {
    transform: rotate(180deg);
}

.submenu-item {
    border-bottom: 1px solid #eee;
}

.submenu-link {
    display: block;
    padding: 12px 20px;
    color: var(--dark);
    text-decoration: none;
    transition: all 0.2s ease;
}

.submenu-link:hover {
    background-color: var(--secondary);
    padding-left: 25px;
}

.container {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 15px;
}

.section-title {
    color: var(--primary);
    border-bottom: 2px solid var(--secondary);
    padding-bottom: 10px;
    margin-bottom: 20px;
    font-size: 1.8rem;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
    margin-top: 20px;
}

.product-card {
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    background: white;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.08);
}

.product-header {
    background: var(--secondary);
    padding: 15px;
    text-align: center;
}

.product-title {
    font-size: 1.2rem;
    color: var(--dark);
    margin: 0;
}

.product-body {
    padding: 20px;
}

.provider {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}

.provider-logo {
    width: 60px;
    height: 40px;
    object-fit: contain;
    margin-right: 15px;
    border: 1px solid #eee;
    padding: 5px;
    border-radius: 4px;
    background: white;
}

.provider-name {
    font-weight: bold;
    color: var(--primary);
}

.product-description {
    margin-bottom: 20px;
    color: #555;
    line-height: 1.5;
    font-size: 0.95rem;
}

.product-description ul {
    padding-left: 20px;
}

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

.btn-apply {
    display: block;
    width: 100%;
    padding: 12px;
    background: var(--primary);
    color: white;
    text-align: center;
    text-decoration: none;
    border-radius: 5px;
    font-weight: bold;
    transition: background 0.3s ease;
    cursor: pointer;
    border: none;
    font-size: 1rem;
}

.btn-apply:hover {
    background: var(--dark);
}

.subcategory-section {
    margin-bottom: 50px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e0e0e0;
}

.section-intro {
    margin-bottom: 30px;
    color: #555;
    font-size: 1.1rem;
    line-height: 1.6;
    text-align: center;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.more-link-container {
    text-align: center;
    margin-top: 20px;
}

footer {
    background: var(--dark);
    color: var(--light);
    text-align: center;
    padding: 30px 0;
    margin-top: 40px;
}

.loading {
    text-align: center;
    padding: 40px;
    color: var(--primary);
}

.loading-spinner {
    border: 4px solid rgba(0,0,0,0.1);
    border-left-color: var(--primary);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

.mobile-menu-btn {
    display: none;
    background: var(--dark);
    color: white;
    border: none;
    padding: 12px 20px;
    font-size: 1.2rem;
    cursor: pointer;
    width: 100%;
    text-align: center;
}

.error-message {
    background: #ffebee;
    color: #b71c1c;
    padding: 20px;
    border-radius: 8px;
    margin: 20px 0;
    text-align: center;
    border: 1px solid #ffcdd2;
}

.breadcrumb {
    display: flex;
    align-items: center;
    padding: 10px 0;
    margin-bottom: 20px;
    font-size: 0.95rem;
}

.breadcrumb a {
    color: var(--primary);
    text-decoration: none;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

.breadcrumb span {
    margin: 0 8px;
    color: #777;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

@media (max-width: 992px) {
    .home-grid {
        grid-template-columns: 1fr;
    }
    
    .site-title {
        font-size: 2.8rem;
    }
    
    .menu-list {
        flex-wrap: wrap;
    }
}

@media (max-width: 768px) {
    .site-title {
        font-size: 2.2rem;
    }
    
    .menu-list {
        display: none;
        flex-direction: column;
    }
    
    .mobile-menu-btn {
        display: block;
    }
    
    .menu-list.active {
        display: flex;
    }
    
    .submenu {
        position: static;
        width: 100%;
        opacity: 1;
        visibility: visible;
        transform: none;
        display: none;
        box-shadow: none;
        border-radius: 0;
    }
    
    .menu-item:hover .submenu {
        transform: none;
    }
    
    .menu-item.active .submenu {
        display: block;
    }
}