.mushrooms-container {
    max-width: 1200px;
    margin: 100px auto 40px;
    padding: 0 20px;
}

.search-box {
    position: relative;
    display: inline-block;
}

.search-box div {
    display: inline-block;
    position: relative;
}

.search-box input {
    padding: 8px;
    width: 200px;
}

.search-box button {
    padding: 8px 16px;
    margin-left: 10px;
}

.clear-search {
    cursor: pointer;
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    color: #666;
}

.filter-box {
    margin: 20px 0;
}

.filter-box label {
    margin-right: 15px;
}

.mushrooms-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    position: relative;
}

.mushroom-card {
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
    overflow: hidden;
    transition: all 0.3s ease;
    cursor: pointer;
    height: 400px;
    position: relative;
}


.mushroom-preview {
    height: 100%;
    width: 100%;
    position: relative;
}

.mushroom-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.mushroom-title {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0,0,0,0.7);
    color: white;
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.mushroom-name {
    font-weight: bold;
    font-size: 1.1em;
}

.mushroom-details {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 800px;
    height: 80vh;
    background: white;
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 5px 30px rgba(0,0,0,0.3);
    z-index: 1000;
    overflow-y: auto;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.mushroom-details h2 {
    color: #2c3e50;
    margin-bottom: 20px;
    text-align: center;
    font-size: 1.5em;
}

.mushroom-info {
    padding: 0 15px;
}

.mushroom-info p {
    margin-bottom: 15px;
    line-height: 1.6;
    font-size: 1em;
}

.mushroom-card.expanded .mushroom-details {
    opacity: 1;
    visibility: visible;
}

.overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    z-index: 999;
}

.overlay.active {
    opacity: 1;
    visibility: visible;
}

@media screen and (max-width: 768px) {
    .mushrooms-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .filter-box {
        display: flex;
        flex-direction: column;
    }

    .filter-box label {
        margin: 5px 0;
    }

    .mushroom-card {
        height: 250px;
    }

    .mushroom-details {
        width: 92%;
        height: 85vh;
        padding: 0;
        display: flex;
        flex-direction: column;
    }

    .mushroom-details h2 {
        padding: 20px;
        margin: 0;
    }

    .mushroom-info {
        flex: 1;
        overflow-y: auto;
        padding: 0 20px 20px 20px;
    }

    .mushroom-info p {
        width: auto;
        font-size: 0.92em;
        line-height: 1.5;
        margin-bottom: 15px;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }

    .mushroom-title {
        padding: 10px;
    }

    .mushroom-name {
        font-size: 1em;
    }
}

.mushroom-details::-webkit-scrollbar {
    width: 8px;
}

.mushroom-details::-webkit-scrollbar-track {
    background: #f0f0f0;
}

.mushroom-details::-webkit-scrollbar-thumb {
    background-color: #27ae60;
    border-radius: 4px;
}
