/* 지도 전용 스타일 */

/* 기본 레이아웃 조정 */
.store_layout.store_pg {
    padding: 0 !important;
    margin: 0 !important;
}

.map-container {
    position: relative;
    width: 100%;
    height: calc(100vh - 110px);
    overflow: hidden;
    margin-top: 55px;
}

/* 헤더 카테고리 슬라이드 (기존) */
.category-slide-container {
    position: relative;
    margin-top: 8px;
    padding: 0 16px 12px;
}

.category-slide {
    overflow: hidden;
}

.category-slide .swiper-wrapper {
    display: flex;
}

.category-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 8px 12px;
    border-radius: 20px;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 70px;
    text-decoration: none;
    color: #666;
    margin-right: 8px;
}

.category-item.active {
    background: var(--primary, #ff6b35);
    color: white;
    border-color: var(--primary, #ff6b35);
}

.category-icon {
    width: 24px;
    height: 24px;
    margin-bottom: 4px;
    border-radius: 50%;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.category-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.category-name {
    font-size: 12px;
    font-weight: 500;
    white-space: nowrap;
}

/* 지도 상단 카테고리 컨테이너 (새로 추가) */
.map-category-container {
    position: absolute;
    top: 0px;
    left: 15px;
    right: 15px;
    z-index: 1000;
    background: transparent;
    border-radius: 12px;
    padding: 8px;
    box-shadow: none;
    border: none;
}


/* 지도 상단 카테고리 스크롤 */
.map-category-scroll {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 4px 0;
    scrollbar-width: none;
    -ms-overflow-style: none;
    scroll-behavior: smooth;
}

.map-category-scroll::-webkit-scrollbar {
    display: none;
}

/* 지도 상단 카테고리 아이템 */
.map-category-item {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 20px;
    white-space: nowrap;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: fit-content;
    font-size: 13px;
    font-weight: 500;
    color: #666;
    user-select: none;
    flex-shrink: 0;
}

.map-category-item:hover {
    background: #e9ecef;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.map-category-item.active {
    background: var(--primary, #ff6b35);
    color: white;
    border-color: var(--primary, #ff6b35);
    box-shadow: 0 2px 8px rgba(255, 107, 53, 0.3);
    transform: translateY(-1px);
}

.map-category-item.active:hover {
    background: #e55a2b;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 107, 53, 0.4);
}

/* 지도 상단 카테고리 아이콘 */
.map-category-icon {
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border-radius: 50%;
    overflow: hidden;
}

.map-category-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.2s ease;
}

.map-category-item:hover .map-category-icon img {
    transform: scale(1.1);
}

/* 지도 상단 카테고리 이름 */
.map-category-name {
    font-size: 13px;
    font-weight: 500;
    line-height: 1;
}

/* 지도 상단 카테고리 로딩 */
.map-category-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px;
    color: #666;
    font-size: 13px;
    gap: 8px;
}

.map-category-loading::after {
    content: '';
    width: 16px;
    height: 16px;
    border: 2px solid #e9ecef;
    border-top-color: var(--primary, #ff6b35);
    border-radius: 50%;
    animation: categorySpinLoader 1s linear infinite;
}

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

/* 지도 */
#map {
    width: 100%;
    height: 100%;
    position: relative;
}

/* 중앙 마커 */
.center-marker {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 500;
    width: 40px;
    height: 40px;
    background: var(--primary, #ff6b35);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(255, 107, 53, 0.3);
    pointer-events: none;
}

.center-marker::before {
    content: '';
    width: 16px;
    height: 16px;
    background: white;
    border-radius: 50%;
}

/* 하단 컨트롤 */
.map-controls {
    position: absolute;
    bottom: 20px;
    left: 16px;
    right: 16px;
    z-index: 1000;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
}

.current-location-btn {
    width: 48px;
    height: 48px;
    border: none;
    border-radius: 50%;
    background: white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 20px;
    color: #333;
    transition: all 0.2s ease;
}

.current-location-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

.list-btn {
    background: #333;
    color: white;
    border: none;
    border-radius: 24px;
    padding: 12px 20px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
}

.list-btn:hover {
    background: #222;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
}

/* 하단 시트 */
.bottom-sheet {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    border-radius: 20px 20px 0 0;
    transform: translateY(100%);
    transition: transform 0.3s ease;
    z-index: 2000;
    max-height: 70vh;
    overflow: hidden;
    max-width: 576px;
    margin: 0 auto;
}

.bottom-sheet.active {
    transform: translateY(0);
}

.sheet-header {
    padding: 0 15px 15px 15px;
    border-bottom: 1px solid #eee;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.sheet-handle {
    width: 60px;
    height: 10px;
    background: #ddd;
    border-radius: 10px;
    margin: 0 auto 12px;
    margin-top: 15px;
    cursor: pointer;
}

.sheet-title {
    font-size: 18px;
    font-weight: 600;
    color: #333;
}

.close-btn {
    width: 32px;
    height: 32px;
    border: none;
    background: none;
    cursor: pointer;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: #666;
    transition: all 0.2s ease;
}

.close-btn:hover {
    background: #f8f9fa;
    color: #333;
}

.sheet-content {
    padding: 0 16px 16px;
    max-height: calc(70vh - 80px);
    overflow-y: auto;
}

.store-item {
    display: flex;
    padding: 12px 0;
    border-bottom: 1px solid #f0f0f0;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.store-item:hover {
    background-color: #f8f9fa;
    margin: 0 -16px;
    padding-left: 16px;
    padding-right: 16px;
}

.store-image {
    width: 70px;
    height: 70px;
    border-radius: 8px;
    background: #f8f9fa;
    margin-right: 12px;
    overflow: hidden;
    flex-shrink: 0;
}

.store-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.store-info {
    flex: 1;
    min-width: 0;
}

.store-name {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin-bottom: 4px;
    line-height: 1.3;
}

.store-desc {
    font-size: 14px;
    color: #666;
    margin-bottom: 8px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.store-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: #999;
    flex-wrap: wrap;
}

.coupon-badge {
    background: var(--primary, #ff6b35);
    color: white;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 500;
}

/* 로딩 */
.loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1000;
    display: none;
}

.loading.show {
    display: block;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid var(--primary, #ff6b35);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 바텀 메뉴 스타일 조정 */
.bt_menu {
    width: calc(100% + 2px);
    max-width: 576px;
    background: #fff;
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1500;
    display: block;
}

.bt_menu ul {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    text-align: center;
    padding: 0 1.6rem;
    height: 5.5rem;
    border-top: 0;
    box-shadow: 0px -6px 6px rgba(0, 0, 0, 0.06);
    margin: 0;
    list-style: none;
}

.bt_menu ul li {
    width: 20%;
    max-width: 6.0rem;
    margin-bottom: 0.3rem;
}

.bt_menu ul li a {
    display: inline-block;
    color: #999;
    font-weight: 400;
    font-size: 1.2rem;
    text-decoration: none;
}

.bt_menu ul li .ico {
    width: 3.0rem;
    display: block;
    margin: 0 auto;
    margin-bottom: 0.3rem;
}

.bt_menu ul li .img_on {
    display: none;
}

.bt_menu ul li.on a {
    color: var(--primary, #ff6b35);
    font-weight: 600;
}

.bt_menu ul li.on .img_on {
    display: block;
}

.bt_menu ul li.on .img_off {
    display: none;
}

.bt_menu ul li.bt_home_btn {
    position: relative;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    min-width: 60px;
}

.bt_menu ul li.bt_home_btn .ico {
    width: 6.0rem;
    display: block;
    margin: 0 auto;
    margin-bottom: 0.3rem;
}

.bt_home_btn img {
    width: 60px;
    height: 60px;
}

/* 커스텀 마커 스타일 */
.custom-marker {
    background: var(--primary, #ff6b35);
    border: 2px solid white;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    transition: transform 0.2s ease;
    color: white;
    font-size: 12px;
    font-weight: bold;
}

.custom-marker:hover {
    transform: scale(1.1);
}

.custom-marker.selected {
    background: #333;
    transform: scale(1.2);
}

/* 클러스터 스타일 */
.cluster-marker {
    background: var(--primary, #ff6b35);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 12px;
    border: 2px solid white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

/* 카테고리 스크롤 페이드 효과 */
.map-category-container::before,
.map-category-container::after {
    content: '';
    position: absolute;
    top: 8px;
    bottom: 8px;
    width: 20px;
    pointer-events: none;
    z-index: 1;
}

.map-category-container::before {
    left: 8px;
}

.map-category-container::after {
    right: 8px;
}

/* 카테고리 아이템 애니메이션 */
.map-category-item {
    animation: categoryFadeIn 0.3s ease forwards;
    opacity: 0;
    transform: translateY(10px);
}

.map-category-item:nth-child(1) { animation-delay: 0.1s; }
.map-category-item:nth-child(2) { animation-delay: 0.15s; }
.map-category-item:nth-child(3) { animation-delay: 0.2s; }
.map-category-item:nth-child(4) { animation-delay: 0.25s; }
.map-category-item:nth-child(5) { animation-delay: 0.3s; }
.map-category-item:nth-child(6) { animation-delay: 0.35s; }
.map-category-item:nth-child(7) { animation-delay: 0.4s; }

@keyframes categoryFadeIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 반응형 */
@media (max-width: 576px) {
    .category-item {
        min-width: 60px;
        padding: 6px 8px;
    }

    .category-name {
        font-size: 11px;
    }

    .category-slide-container {
        padding: 0 12px 8px;
    }

    .map-controls {
        left: 12px;
        right: 12px;
    }

    .store-name {
        font-size: 15px;
    }

    .store-desc {
        font-size: 13px;
    }

    /* 지도 상단 카테고리 모바일 조정 */
    .map-category-container {
        top: 10px;
        left: 10px;
        right: 10px;
        padding: 6px;
    }

    .map-category-item {
        padding: 6px 10px;
        font-size: 12px;
        gap: 5px;
    }

    .map-category-icon {
        width: 16px;
        height: 16px;
    }

    .map-category-name {
        font-size: 12px;
    }
}

/* 헤더 높이 조정 */
header {
    position: relative;
    z-index: 1001;
    background: white;
    border-bottom: 1px solid #eee;
}

/* 메인 컨텐츠 조정 */
.wrap.no_bt_btn {
    padding-bottom: 0 !important;
}

/* 지도 컨테이너 높이 조정 */
@media (max-height: 667px) {
    .map-container {
        height: calc(100vh - 110px);
    }
}

@media (max-height: 568px) {
    .map-container {
        height: calc(100vh - 100px);
    }
}

/* 접근성 개선 */
.map-category-item:focus {
    outline: 2px solid var(--primary, #ff6b35);
    outline-offset: 2px;
}

.current-location-btn:focus,
.list-btn:focus,
.close-btn:focus {
    outline: 2px solid var(--primary, #ff6b35);
    outline-offset: 2px;
}

/* 고해상도 디스플레이 지원 */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .map-category-icon img {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
}

/* 터치 디바이스 최적화 */
@media (hover: none) and (pointer: coarse) {
    .map-category-item {
        padding: 5px 14px;
        min-height: 34px;
    }

    .current-location-btn,
    .list-btn {
        min-width: 44px;
        min-height: 44px;
    }
}

/* 다크모드 지원 */
@media (prefers-color-scheme: dark) {
    /*
    .map-category-container {
        background: rgba(40, 44, 52, 0.95);
        border-color: rgba(255, 255, 255, 0.1);
    }

    .map-category-item {
        background: #2c3e50;
        border-color: #34495e;
        color: #ecf0f1;
    }

    .map-category-item:hover {
        background: #34495e;
    }

    .map-category-loading {
        color: #ecf0f1;
    }

    .bottom-sheet {
        background: #2c3e50;
    }

    .sheet-title {
        color: #ecf0f1;
    }

    .store-name {
        color: #ecf0f1;
    }

    .store-desc {
        color: #bdc3c7;
    }

     */
}