/* Base Styles */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: #f8f9fa;
    color: #333;
    line-height: 1.6;
}

/* Navigation Bar */
.navbar {
    background-color: #fff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.navbar-logo {
    width: 50px;
    height: 50px;
    object-fit: contain;
    border-radius: 50%;
}

.navbar-title {
    color: #2a6f97;
    font-weight: 600;
    font-size: 1.5rem;
    margin: 0 20px;
    flex-grow: 1;
    text-align: center;
}

.navbar-links {
    display: flex;
    gap: 20px;
}

.navbar-link {
    text-decoration: none;
    color: #495057;
    font-weight: 500;
    padding: 8px 12px;
    border-radius: 4px;
    transition: all 0.2s;
}

.navbar-link:hover {
    color: #2a6f97;
}

.navbar-link.active {
    color: #2a6f97;
    background-color: #e1f0fa;
}

/* Hero Section */
.hero {
    background-color: #2a6f97;
    color: white;
    padding: 80px 20px;
    text-align: center;
    margin-bottom: 40px;
    background-image: linear-gradient(rgba(42, 111, 151, 0.5), rgba(42, 111, 151, 0.5)), 
                      url('/images/startseite.webp');
    background-size: cover;
    background-position: center;
    border-radius: 8px;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
}

.hero-content h2 {
    font-size: 2.5rem;
    margin-bottom: 20px;
    line-height: 1.2;
}

.hero-content p {
    font-size: 1.3rem;
    margin-bottom: 30px;
    opacity: 0.9;
}

/* CTA Button */
.cta-button {
    display: inline-block;
    padding: 12px 30px;
    background-color: white;
    color: #2a6f97;
    text-decoration: none;
    border-radius: 30px;
    font-weight: 600;
    transition: all 0.3s;
    font-size: 1.1rem;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.cta-button:hover {
    background-color: #e1f0fa;
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.15);
}

/* About Section */
.about {
    background-color: white;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 2px 15px rgba(0,0,0,0.05);
    margin-bottom: 40px;
}

.about-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.about h3 {
    color: #2a6f97;
    margin-bottom: 20px;
    font-size: 1.8rem;
}

.about p {
    line-height: 1.8;
    font-size: 1.1rem;
    color: #555;
}

/* Main Content Container */
.main-container {
    max-width: 1200px;
    margin: 30px auto;
    padding: 0 20px;
}

/* Filters Section */
.filters-section {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    padding: 20px;
    margin-bottom: 20px;
}

.filters-container {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
}

.filter-group {
    flex: 1;
    min-width: 200px;
}

.filter-group h3 {
    margin-bottom: 10px;
    color: #2a6f97;
    font-size: 1rem;
}

.filter-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.filter-btn {
    padding: 6px 12px;
    background-color: #e9ecef;
    color: #495057;
    border: none;
    border-radius: 15px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 5px;
}

.filter-btn.active {
    background-color: #4a9fe0;
    color: white;
}

.filter-btn .count {
    font-size: 0.75rem;
    opacity: 0.8;
}

.sort-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.sort-select {
    padding: 8px 12px;
    border-radius: 6px;
    border: 1px solid #dee2e6;
    background-color: white;
    cursor: pointer;
}

/* Product Grid Styles */
.grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 20px;
    padding: 10px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.product-box {
    background: white;
    border-radius: 10px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.08);
    overflow: hidden;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
    cursor: pointer;
}

.product-box:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.product-image {
    width: 100%;
    height: 160px;
    object-fit: cover;
    border-bottom: 1px solid #eee;
}

.product-content {
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: 15px;
}

.product-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 10px;
}

.product-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: #2c3e50;
    flex: 1;
}

.details-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
    margin-left: 8px;
    transition: all 0.2s ease;
}

.details-btn svg {
    width: 18px;
    height: 18px;
    transition: transform 0.2s;
    fill: #4a9fe0;
}

.details-btn:hover {
    opacity: 0.8;
}

.details-btn:hover svg {
    transform: scale(1.1);
    fill: #2a6f97;
}

.product-wool-type {
    display: inline-block;
    padding: 4px 10px;
    background-color: #e1f0fa;
    color: #2a6f97;
    border-radius: 15px;
    font-size: 0.75rem;
    margin-bottom: 12px;
    font-weight: 500;
    align-self: flex-start;
}

.product-footer {
    margin-top: auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.product-price {
    font-weight: 700;
    color: #000;
    font-size: 1rem;
}

.product-shop-links {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.product-shop-link {
    display: inline-block;
    padding: 6px 12px;
    background-color: #4a9fe0;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.2s;
    font-weight: 500;
    font-size: 0.8rem;
}

.product-shop-link:hover {
    background-color: #3a8bc8;
}

/* No products message */
.no-products-message {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px;
    color: #666;
    font-size: 1.1rem;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    margin: 20px 0;
}

/* Popup Styles */
.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    padding: 20px;
    opacity: 0;
    animation: fadeIn 0.3s forwards;
}

@keyframes fadeIn {
    to { opacity: 1; }
}

.product-popup {
    background: white;
    border-radius: 12px;
    max-width: 900px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
    transform: translateY(20px);
    animation: slideUp 0.3s forwards;
}

@keyframes slideUp {
    to { transform: translateY(0); }
}

.popup-close-container {
    position: sticky;
    top: 0;
    height: 0;
    z-index: 10;
}

.popup-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(0,0,0,0.35);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 11;
    transition: all 0.2s;
}

.popup-close svg {
    width: 24px;
    height: 24px;
    fill: white;
}

.popup-close:hover {
    background: rgba(0,0,0,0.5);
}

.popup-content {
    display: flex;
    flex-direction: column;
    padding: 40px;
    position: relative;
}

.popup-image {
    width: 100%;
    max-height: 350px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 25px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
}

.popup-details {
    flex: 1;
}

.popup-title {
    font-size: 1.8rem;
    margin-bottom: 15px;
    color: #2c3e50;
    font-weight: 600;
}

.popup-wool-type {
    display: inline-block;
    padding: 6px 14px;
    background-color: #e1f0fa;
    color: #2a6f97;
    border-radius: 15px;
    font-size: 0.9rem;
    margin-bottom: 15px;
    font-weight: 500;
}

.popup-product-id {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 20px;
}

.detail-list {
    list-style: none;
    margin-bottom: 30px;
}

.detail-list li {
    margin-bottom: 12px;
    line-height: 1.6;
    font-size: 1rem;
    display: flex;
}

.detail-list strong {
    min-width: 120px;
    display: inline-block;
    color: #2a6f97;
}

.popup-shop-links {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 20px;
}

.popup-shop-link {
    display: inline-block;
    padding: 10px 18px;
    background-color: #4a9fe0;
    color: white;
    text-decoration: none;
    border-radius: 6px;
    transition: all 0.2s;
    font-weight: 500;
}

.popup-shop-link:hover {
    background-color: #3a8bc8;
    transform: translateY(-2px);
}

/* Impressum Page Styles */
.impressum-section {
    background-color: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.impressum-section h2 {
    color: #2a6f97;
    margin-bottom: 25px;
    font-size: 1.8rem;
}

.impressum-section h3 {
    color: #2a6f97;
    margin: 20px 0 10px;
    font-size: 1.2rem;
}

.impressum-section p {
    margin-bottom: 15px;
    line-height: 1.6;
}

/* Responsive styles */
@media (max-width: 767px) {
    .grid-container {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .product-image {
        height: 180px;
    }
    
    .navbar-container {
        flex-direction: column;
        gap: 10px;
    }
    
    .navbar-title {
        margin: 10px 0;
    }
    
    .popup-close {
        top: 15px;
        right: 15px;
    }
    
    .popup-content {
        padding: 60px 25px 25px;
    }
    
    .popup-title {
        font-size: 1.4rem;
    }
    
    .detail-list li {
        flex-direction: column;
    }
    
    .detail-list strong {
        margin-bottom: 3px;
    }
    
    .hero {
        padding: 60px 20px;
    }
    
    .hero-content h2 {
        font-size: 2rem;
    }
    
    .hero-content p {
        font-size: 1.1rem;
    }
    
    .about {
        padding: 30px 20px;
    }
    
    .about h3 {
        font-size: 1.5rem;
    }
}

@media (min-width: 768px) and (max-width: 991px) {
    .grid-container {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .popup-content {
        flex-direction: row;
        gap: 40px;
    }
    
    .popup-image {
        width: 45%;
        max-height: none;
        margin-bottom: 0;
        align-self: flex-start;
    }
    
    .popup-details {
        width: 55%;
    }
    
    .product-image {
        height: 200px;
    }
    
    .product-title {
        font-size: 1.1rem;
    }
    
    .product-wool-type {
        font-size: 0.8rem;
        padding: 5px 12px;
    }
    
    .product-price {
        font-size: 1.1rem;
    }
    
    .product-shop-link {
        font-size: 0.85rem;
        padding: 7px 14px;
    }

    .no-products-message {
        font-size: 1.3rem;
        padding: 60px;
    }
}

@media (min-width: 992px) {
    .grid-container {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Animation for popup content */
@keyframes fadeInContent {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.popup-content > * {
    animation: fadeInContent 0.4s forwards;
    animation-delay: 0.1s;
    opacity: 0;
}

.popup-image {
    animation-delay: 0.15s !important;
}

.popup-title {
    animation-delay: 0.2s !important;
}

.popup-wool-type {
    animation-delay: 0.25s !important;
}

.detail-list {
    animation-delay: 0.3s !important;
}

.popup-shop-links {
    animation-delay: 0.35s !important;
}