body {
    margin: 0;
    background-color: #ffffff;
}

main {
    margin-top: 100px;
}

.search-section {
    padding-bottom: 20px;
    border-bottom: 2px solid #000000;
}

.search-bar {
    display: flex;
    align-items: center;
    position: relative;
}

.form-input {
    width: 100%;
    padding: 12px;
    margin-top: 5px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 16px;
}

.search-icon {
    position: absolute;
    right: 10px;
    background: none;
    border: none;
    cursor: pointer;
}

.filter-section {
    margin-bottom: 30px;
}

.selected-filters {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.selected-filter {
    display: flex;
    align-items: center;
    background: #fff;
    border: 1px solid #ddd;
    padding: 5px 10px;
    border-radius: 15px;
    font-size: 13px;
    color: #543fe4;
    font-weight: bold;
}

.selected-filter span {
    margin-right: 5px;
}

.selected-filter button {
    background: none;
    border: none;
    color: #888;
    cursor: pointer;
    font-size: 12px;
}

.filter-table {
    width: 100%;
    border-collapse: collapse;
}

.filter-table tr {
    border-bottom: 1px solid #ddd;
}

.filter-table td {
    padding: 10px 0;
    vertical-align: middle;
    margin-left: 16px;
}

.filter-label {
    font-weight: bold;
    font-size: 16px;
    width: 130px;
}

.filter-buttons {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 8px;
    border: none;
    background: none;
    cursor: pointer;
    font-size: 13px;
}

.filter-btn:hover {
    background-color: #f0f0f0; /* 호버 시 배경색을 연한 회색으로 변경 */
    cursor: pointer; /* 마우스 커서를 손가락 모양으로 변경 */
}

.price-input {
    padding: 0 12px;
    margin: 0 3px;
    border: 1px solid #ccc;
    border-radius: 20px;
    font-size: 13px;
    width: 80px;
    height: 34px;
    box-sizing: border-box;
    vertical-align: middle;
}

.price-search-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    background-color: #6b59e8;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 4px;
    transition: background 0.2s;
}

.price-search-icon:hover {
    background-color: #0056b3;
}

.price-search-icon:hover {
    background-color: #543fe4;
}

.filter-btn,
.price-input,
.price-search-icon,
.unit-label {
    height: 32px;
    font-size: 13px;
    line-height: 1;
    vertical-align: middle;
    display: inline-flex;
    align-items: center;
}

.unit-label {
    font-size: 13px;
    line-height: 1;
    vertical-align: middle;
    display: inline-flex;
    align-items: center;
}

.filter-btn.selected {
    background-color: #6b59e8;
    color: white;
    font-weight: bold;
    border-radius: 20px;
    padding: 3px 9px;
}

.color-options {
    display: flex;
    gap: 4px;
    margin-left: 16px;
}

.color-circle {
    width: 25px;
    height: 25px;
    border-radius: 50%;
    cursor: pointer;
    border: 1px solid #ccc;
    margin: 5px;
}

.color-circle:hover {
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.5); /* 호버 시 그림자 효과 추가 */
    transform: scale(1.1); /* 호버 시 크기를 10% 확대 */
    cursor: pointer; /* 마우스 커서를 손가락 모양으로 변경 */
}

.color-circle.selected {
    border: 1px solid #6b59e8;
    transform: scale(1.1);
}

.filter-toggle {
    background: none;
    border: none;
    color: #6b59e8;
    font-size: 12px;
    cursor: pointer;
    padding: 0;
    text-decoration: underline;
    text-decoration-color: #6b59e8;
}

.search-result {
    grid-column: 1 / -1;
    margin-bottom: 15px;
    border-bottom: 2px solid #000;
    padding-bottom: 10px;
    font-size: 17px;
    font-weight: bold;
}

.results-section {
    margin-top: 20px;
    padding: 0 16px;
    display: grid;
}

#searchResultDiv {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-bottom: 30px;
    min-height: 720px;
}

.result-item {
    text-align: center;
}

.result-item img {
    width: 100%;
    max-width: 260px;
    height: 260px;
    object-fit: cover;
    border-radius: 10px;
    border: 1px solid #ddd;
}

.result-item p {
    margin: 10px 0 0;
    font-size: 15px;
}

.map-button-section {
    position: fixed;
    bottom: 20px;
    left: 0;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.map-container {
    position: relative;
    width: 100%;
}

.map-btn {
    display: block;
    margin-top: 5px;
    padding: 12px 24px;
    background: #6b59e8;
    color: #fff;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    cursor: pointer;
    z-index: 1000;
}

.map-btn:hover {
    background: #543fe4;
}

#map {
    display: none;
    position: absolute;
    top: 20%;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    height: 80%;
    pointer-events: auto;
}

#map.open {
    display: block;
    bottom: 10%;
}

#mapOverlay {
    position: fixed;
    bottom: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.map-box {
    width: 100%;
    max-width: 1150px;
    height: 100%;
    background: #eee;
    border-radius: 10px;
    overflow: hidden;
}

.close-map {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 50%;
    width: 32px;
    height: 32px;
}

.product-content {
    color: black;
    font-style: bold;
    text-decoration: none;
}

#paginationDiv {
    margin-bottom: 10px;
    display: flex !important;
    justify-content: center;
}

.pagination {
    display: inline-flex;
    border: 1px solid #000;
    border-radius: 6px;
    overflow: hidden;
    margin-top: 30px;
}

.page-item .page-link {
    padding: 8px 16px;
    background-color: #fff;
    color: #000;
    font-weight: 700;
    font-size: 16px;
    border: none;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}

.page-item:last-child .page-link {
    border-right: none;
}

.page-item .page-link:hover {
    background-color: #dcd8fa;
    color: #000000;
    font-weight: bold;
}

.page-item.active .page-link {
    background-color: #ffffff;
    color: #6b59e8;
    font-weight: bold;
}

.page-item.disabled .page-link {
    background-color: #f0f0f0;
    color: #ccc;
    border-right: 1px solid #ddd;
    cursor: not-allowed;
}

.category-btn.selected {
    background-color: #6b59e8 !important;
    color: white !important;
    font-weight: bold !important;
    border-radius: 20px !important;
    padding: 3px 9px !important;
}

@media (max-width: 768px) {
    #searchResultDiv {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
}

@media (max-width: 480px) {
    .form-input,
    .filter-btn,
    .price-input,
    .map-btn {
        font-size: 14px;
    }

    .filter-label {
        font-size: 14px;
        width: auto;
    }

    #searchResultDiv {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .result-item img {
        width: 100%;
        height: auto;
    }

    .map-btn {
        width: 90%;
        padding: 10px;
    }
}
