/* ===== 基础变量 ===== */
:root {
    --primary-color: #ef9f50;
    --primary-hover: #e08a3c;
    --secondary-color: #17a2b8;
    --secondary-hover: #138496;
    --danger-color: #ff4e5f;
    --bg-color: #fffef2;
    --card-bg: #fff;
    --text-primary: #161616;
    --text-secondary: #666;
    --text-muted: #9b9b9b;
    --shadow-sm: 0 0.16vw 0.5vw rgba(0, 0, 0, 0.08);
    --shadow-md: 0 0.16vw 0.45vw rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 0.3vw 0.6vw rgba(0, 0, 0, 0.12);
    --radius-sm: 0.2vw;
    --radius-md: 0.8vw;
    --radius-lg: 1vw;
    --transition: all 0.2s ease;
}

/* ===== 主容器 ===== */
.findCon {
    background-color: var(--bg-color);
    font-family: OPPOSans, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    padding: 3.1vw 0 6.9vw 0;
}

.findConTit {
    font-size: clamp(1.5rem, 2.86vw, 3rem);
    line-height: 1.2;
    font-weight: bold;
    color: var(--primary-color);
}

.findConFlex {
    display: flex;
    justify-content: center;
    align-items: center;
    column-gap: 0.44vw;
    flex-wrap: wrap;
}

.findSan {
    width: clamp(3rem, 5.23vw, 6rem);
    height: auto;
}

.findConGrid {
    display: grid;
    gap: 0.36vw;
    justify-items: center;
}

.findSubFlex {
    display: flex;
    column-gap: 0.2vw;
    font-size: clamp(0.875rem, 1.25vw, 1.25rem);
    line-height: 1.4;
    font-weight: 500;
    color: #000;
    align-items: baseline;
    flex-wrap: wrap;
    justify-content: center;
}

.findSubFlex img {
    width: clamp(0.7rem, 0.96vw, 1rem);
    height: auto;
}

/* ===== 地图容器 ===== */
.findMapWrap {
    width: min(92vw, 1400px);
    margin: 2.2vw auto 1.95vw;
}

.findMapBoxWrap {
    display: flex;
    column-gap: 1.2vw;
    align-items: flex-start;
    position: relative;
}

.findMapLeft {
    flex: 1;
    min-width: 0;
    position: relative;
}

/* ===== 搜索栏 ===== */
.findSearchBar {
    height: clamp(2.5rem, 3.23vw, 4rem);
    background: var(--card-bg);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: center;
    padding: 0 1.1vw;
    margin-bottom: 0.8vw;
    gap: 0.5rem;
}

.findSearchBarIcon {
    width: clamp(1rem, 1.35vw, 1.5rem);
    height: auto;
    flex-shrink: 0;
    opacity: 0.45;
}

.findSearchBar input {
    border: 0;
    flex: 1;
    outline: none;
    font-size: clamp(0.875rem, 1.25vw, 1.125rem);
    color: #111;
    box-shadow: none;
    background: transparent;
    min-width: 0;
}

.findSearchBar input::placeholder {
    color: var(--text-muted);
}

.findSearchBar input:focus {
    outline: none;
    box-shadow: none;
    border: none;
}

.findSearchActions {
    display: flex;
    align-items: center;
    gap: 0;
    flex-shrink: 0;
}

.findActionBtn {
    background: transparent;
    border: none;
    padding: 0.3rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.2s;
    box-shadow: none;
}

.findActionBtn img {
    width: clamp(0.9rem, 1.2vw, 1.35rem);
    height: auto;
    display: block;
}

.findActionBtn:hover {
    opacity: 0.6;
}

.findSearchDivider {
    width: 1px;
    height: clamp(1rem, 1.3vw, 1.5rem);
    background: #ccc;
    margin: 0 clamp(0.35rem, 0.5vw, 0.6rem);
    flex-shrink: 0;
}

/* ===== 地图控制按钮 ===== */
.findMapControls {
    position: absolute;
    top: clamp(0.5rem, 0.8vw, 1rem);
    left: clamp(0.5rem, 0.8vw, 1rem);
    z-index: 10;
    display: flex;
    gap: 0.5vw;
    flex-wrap: wrap;
}

.findMapControl {
    background: var(--card-bg);
    border: none;
    border-radius: var(--radius-sm);
    padding: clamp(0.3rem, 0.5vw, 0.6rem) clamp(0.6rem, 1vw, 1rem);
    font-size: clamp(0.75rem, 0.9vw, 0.95rem);
    color: #555;
    cursor: pointer;
    box-shadow: 0 0.1vw 0.3vw rgba(0, 0, 0, 0.15);
    transition: var(--transition);
    font-weight: 400;
}

.findMapControl.active {
    background: var(--primary-color);
    color: #fff;
    font-weight: 600;
}

.findMapControl:hover {
    background: #f5f5f5;
    transform: translateY(-1px);
}

.findMapControl.active:hover {
    background: var(--primary-hover);
}

.findMapControl:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* ===== Google 地图容器 ===== */
.findMapBox {
    height: clamp(300px, 34vw, 500px);
    min-height: 300px;
    border-radius: var(--radius-lg);
    position: relative;
    background: #e5e5e5;
    z-index: 2;
}

/* Google Maps 样式覆盖 - 移动端修复 */
.findMapBox .gm-style {
    border-radius: var(--radius-lg);
}

/* 确保地图在移动端正确显示 */
.findMapBox > div {
    border-radius: var(--radius-lg);
}

/* 移动端地图修复 */
@media (max-width: 768px) {
    .findMapLeft {
        width: 100%;
    }

    .findMapBox {
        position: relative;
        overflow: hidden;
    }

    /* 确保 Google Maps 内部元素正确渲染 */
    .findMapBox .gm-style {
        position: absolute !important;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
    }
}

/* ===== 地图装饰图片 ===== */
.findMapDeco {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    z-index: 0;
    opacity: 0.5;
    width: 8vw;
    max-width: 100px;
}

.findMapDecoLeft {
    left: 0;
    transform: translateY(-50%) translateX(-90%);
}

.findMapDecoRight {
    right: 0;
    transform: translateY(-50%) translateX(80%);
}

/* ===== 店铺列表容器 ===== */
.findStoreListContainer {
    width: min(28vw, 380px);
    min-width: 280px;
    max-height: clamp(300px, 34vw, 500px);
    background: var(--card-bg);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* ===== 店铺列表 ===== */
.findStoreList {
    flex: 1;
    overflow-y: auto;
    padding: 0;
}

/* 自定义滚动条 */
.findStoreList::-webkit-scrollbar {
    width: 6px;
}

.findStoreList::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.findStoreList::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 3px;
}

.findStoreList::-webkit-scrollbar-thumb:hover {
    background: #aaa;
}

/* Firefox 滚动条 */
.findStoreList {
    scrollbar-width: thin;
    scrollbar-color: #ccc #f1f1f1;
}

/* ===== 空状态提示 ===== */
.findStoreEmpty {
    background: var(--card-bg);
    border-radius: var(--radius-md);
    padding: clamp(0.75rem, 0.85vw, 1rem) clamp(1rem, 1vw, 1.25rem);
    font-size: clamp(0.875rem, 0.95vw, 1rem);
    color: var(--text-secondary);
    text-align: center;
    box-shadow: var(--shadow-sm);
}

/* ===== 店铺卡片 ===== */
.findStoreItem {
    display: flex;
    flex-direction: column;
    padding: clamp(0.75rem, 1vw, 1.25rem);
    cursor: pointer;
    border-bottom: 1px dashed #ddd;
    transition: background-color 0.2s;
}

.findStoreItem:last-child {
    border-bottom: none;
}

.findStoreItem:hover {
    background-color: #fafafa;
}

.findStoreItem.active {
    background: #fff8f0;
}

.findStoreMain {
    margin-bottom: 0.6vw;
}

.findStoreName {
    font-size: clamp(0.95rem, 1.1vw, 1.25rem);
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.3vw;
    line-height: 1.3;
    word-break: break-word;
}

.findStoreAddr {
    font-size: clamp(0.8rem, 0.9vw, 1rem);
    color: var(--text-secondary);
    line-height: 1.4;
    font-weight: 300;
    margin-bottom: 0.4vw;
    word-break: break-word;
}

.findStoreDistance {
    font-size: clamp(0.875rem, 1vw, 1.125rem);
    color: var(--text-primary);
    font-weight: 600;
    display: flex;
    align-items: center;
    column-gap: 0.4vw;
}

.findStoreDistance::after {
    content: "";
    display: inline-block;
    width: 1rem;
    height: 1rem;
    background-image: url("/wp-content/uploads/2026/04/road.svg");
    background-size: cover;
    background-repeat: no-repeat;
}

.findStoreFooter {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.findStoreNav {
    border: 0;
    background: var(--secondary-color);
    color: #fff;
    border-radius: var(--radius-sm);
    font-size: clamp(0.8rem, 0.85vw, 1rem);
    font-weight: 500;
    padding: 0.2vw 0.4vw;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    transition: var(--transition);
    text-decoration: none;
}

.findStoreNav:hover, .findStoreNav:focus {
    color: #fff !important;
    transform: translateY(-1px);
}

.findStoreNav:active {
    transform: translateY(0);
}

.findStoreNav:focus-visible {
    outline: 2px solid var(--secondary-color);
    outline-offset: 2px;
}

.findStoreNav::before {
    content: "";
    display: inline-block;
    width: 1rem;
    height: 1rem;
    background-image: url("/wp-content/uploads/2026/04/dir.svg");
    background-size: cover;
    background-repeat: no-repeat;
    flex-shrink: 0;
}

/* ===== 响应式设计 ===== */

/* 平板端 (768px - 1199px) */
@media (max-width: 1199px) {
    .findCon {
        padding: 2.5rem 1.5rem;
    }

    .findConTit {
        font-size: clamp(1.75rem, 4vw, 2.5rem);
    }

    .findMapWrap {
        width: 100%;
        max-width: 900px;
        margin: 2rem auto;
    }

    .findMapBoxWrap {
        flex-direction: column;
        gap: 1rem;
    }

    .findMapLeft {
        width: 100%;
    }

    .findMapBox {
        height: 450px;
        min-height: 450px;
    }

    .findStoreListContainer {
        width: 100%;
        min-width: auto;
        max-height: 350px;
        margin-top: 0;
    }

    .findMapDeco {
        display: none;
    }

    .findMapControls {
        top: 0.75rem;
        left: 0.75rem;
    }

    .findMapControl {
        padding: 0.5rem 1rem;
        font-size: 0.875rem;
    }

    .findSearchBar {
        padding: 0 1rem;
        height: 3.5rem;
        margin-bottom: 1rem;
    }

}

/* 移动端 (480px - 767px) */
@media (max-width: 767px) {
    .findCon {
        padding: 1.5rem 1rem;
    }

    .findConFlex {
        gap: 1.25rem;
    }

    .findConGrid {
        gap: 0.5rem;
    }

    .findConTit {
        font-size: 2.95rem;
    }

    .findSubFlex {
        font-size: 1rem;
        align-items: center;
        gap: 0.5rem;
    }

    .findSan {
        width: 40px;
    }

    .findMapWrap {
        width: 100%;
        margin:3rem 0 1.5rem 0;
    }

    .findMapBox {
        height: 350px;
        min-height: 350px;
    }

    .findStoreListContainer {
        max-height: 300px;
    }

    .findSearchBar {
        padding: 0 0.875rem;
        height: 3rem;
        margin-bottom: 0.75rem;
    }

    .findSearchBar input {
        font-size: 1rem;
    }

    .findMapControls {
        top: 0.5rem;
        left: 0.5rem;
        gap: 0.5rem;
    }

    .findMapControl {
        padding: 0.4rem 0.75rem;
        font-size: 0.8125rem;
    }

    .findStoreItem {
        padding: 1rem;
    }

    .findStoreName {
        font-size: 1rem;
    }

    .findStoreAddr {
        font-size: 0.875rem;
    }

    .findStoreNav {
        padding: 0.375rem 0.75rem;
        font-size: 0.8125rem;
    }
}

/* 小屏移动端 (< 480px) */
@media (max-width: 479px) {
    .findCon {
        padding: 1.25rem 0.875rem;
    }

    .findConTit {
        font-size: 1.5rem;
    }

    .findSubFlex {
        font-size: 0.9375rem;
    }

    .findSan {
        width: 64px;
    }

    .findMapBox {
        height: 300px;
        min-height: 300px;
        border-radius: var(--radius-md);
    }

    .findStoreListContainer {
        max-height: 280px;
        border-radius: var(--radius-md);
    }

    .findSearchBar {
        padding: 0 0.75rem;
        height: 2.75rem;
        border-radius: var(--radius-sm);
    }

    .findSearchBar img {
        width: 1.125rem;
    }

    .findSearchBar input {
        font-size: 0.9375rem;
    }

    .findMapControls {
        top: 0.375rem;
        left: 0.375rem;
        gap: 0.375rem;
    }

    .findMapControl {
        padding: 0.35rem 0.625rem;
        font-size: 0.75rem;
        border-radius: 0.25rem;
    }

    .findStoreItem {
        padding: 0.875rem;
    }

    .findStoreName {
        font-size: 0.9375rem;
        margin-bottom: 0.25rem;
    }

    .findStoreAddr {
        font-size: 0.8125rem;
        margin-bottom: 0.375rem;
    }

    .findStoreDistance {
        font-size: 0.875rem;
    }

    .findStoreDistance::after {
        width: 0.875rem;
        height: 0.875rem;
    }

    .findStoreNav {
        padding: 0.3125rem 0.625rem;
        font-size: 0.75rem;
    }

    .findStoreNav::before {
        width: 0.875rem;
        height: 0.875rem;
    }

    .findStoreFooter {
        gap: 0.5rem;
    }
}

/* 超小屏设备 (< 360px) */
@media (max-width: 359px) {
    .findCon {
        padding: 1rem 0.75rem;
    }

    .findConTit {
        font-size: 1.375rem;
    }

    .findSubFlex {
        font-size: 0.875rem;
    }

    .findMapBox {
        height: 260px;
        min-height: 260px;
    }

    .findStoreListContainer {
        max-height: 240px;
    }

    .findSearchBar {
        height: 2.5rem;
    }

}

/* ===== 减少动画偏好 ===== */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ===== 打印样式 ===== */
@media print {
    .findMapBox,
    .findMapControls,
    .findSearchBar,
    .findMapDeco {
        display: none !important;
    }

    .findMapBoxWrap {
        flex-direction: column;
    }

    .findStoreListContainer {
        width: 100%;
        max-width: none;
        max-height: none;
        box-shadow: none;
    }

    .findStoreItem {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ddd;
        padding: 0.75rem;
    }
}

/* ===== 高对比度模式 ===== */
@media (prefers-contrast: high) {
    .findStoreItem {
        border: 2px solid #000;
    }

    .findStoreNav {
        border: 2px solid currentColor;
    }
}

/* ===== 地图信息窗口内容样式 ===== */
.findMapInfoWindow {
    padding: 12px;
    text-align: center;
}

.findMapInfoTitle {
    margin: 0;
    font-size: 14px;
    color: #666;
}

.findMapInfoSubtitle {
    margin: 8px 0 0;
    font-size: 12px;
    color: #999;
}

/* ===== 店铺信息窗口样式 ===== */
.findMapStoreInfo {
    padding: 8px 28px 8px 4px;
    min-width: 200px;
    position: relative;
}

.findMapStoreClose {
    position: absolute;
    top: -10px;
    right: 4px;
    width: 24px;
    height: 24px;
    border: none;
    background: transparent;
    color: #999;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.2s;
    box-shadow: none;
}

.findMapStoreClose:hover {
    color: #333;
}

.findMapStoreName {
    margin: 0 0 6px;
    font-size: 16px;
    font-weight: 600;
    color: #111;
    line-height: 1.3;
    padding-right: 2vw;
}

.findMapStoreAddress {
    margin: 0;
    font-size: 13px;
    color: #666;
    line-height: 1.4;
}

/* ===== 地图加载错误提示样式 ===== */
.findMapError {
    padding: 40px;
    text-align: center;
    background: #fff;
    border-radius: 8px;
}

.findMapErrorText {
    margin: 0;
    color: #666;
    font-size: 16px;
}

/* ===== Google Maps 原生信息窗口样式覆盖 ===== */
.gm-style .gm-style-iw-c {
    padding: 12px !important;
    border-radius: 8px !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15) !important;
}

.gm-style .gm-style-iw-d {
    overflow: hidden !important;
}

.gm-style .gm-style-iw-t::after {
    background: linear-gradient(45deg, rgba(255,255,255,1) 50%, rgba(255,255,255,0) 51%, rgba(255,255,255,0) 100%);
}

/* 隐藏 Google Maps 信息窗口的默认关闭按钮 */
.gm-style-iw-chr {
    display: none !important;
}
