/* STORE LOCATIONS SECTION */

.store-locations {
    --store-bg: var(--color-bg);
    --store-text: var(--color-text);
    --store-accent: var(--color-accent);
    
    background-color: var(--store-bg);
    color: var(--store-text);
    padding: 80px 0;
    position: relative;
}

.store-locations__heading {
    margin-bottom: 50px;
    max-width: 800px;
    width: min(800px, 100%);
}

/* Follow global heading alignment settings */
.heading-layout-align-center .store-locations .store-locations__heading {
    margin-inline: auto;
}

.heading-layout-align-left .store-locations .store-locations__heading {
    margin-inline: 0;
}

.heading-layout-align-right .store-locations .store-locations__heading {
    margin-inline-start: auto;
    margin-inline-end: 0;
}

/* Tabs - Segmented look */
.store-locations__tabs-wrapper {
    display: flex;
    justify-content: center;
    margin-bottom: var(--spacing-lg);
    margin-top: var(--spacing-lg);
    padding: 0 var(--container-padding);
}

.store-locations__tabs {
    display: flex;
    background-color: var(--color-surface);
    padding: 6px;
    border-radius: var(--radius-lg);
    gap: 4px;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    max-width: 100%;
    border: 1px solid var(--color-border-light);
}

.store-locations__tabs::-webkit-scrollbar {
    display: none;
}

.store-locations__tab {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 24px;
    background-color: transparent;
    border: none;
    border-radius: var(--radius-md);
    font-size: var(--fs-base);
    font-weight: var(--fw-semibold);
    color: var(--color-text-muted);
    transition: all 0.3s ease;
    white-space: nowrap;
    cursor: pointer;
}

.store-locations__tab-icon {
    width: 20px;
    height: 20px;
    opacity: 0.7;
    object-fit: contain;
}

.store-locations__tab:not(.is-active):hover {
    color: var(--color-text);
    background-color: var(--color-surface-hover);
}

[data-theme="dark"] .store-locations__tab:not(.is-active):hover {
    background-color: rgba(255, 255, 255, 0.08);
}

.store-locations__tab.is-active {
    background-color: var(--store-accent);
    color: var(--color-white-static, #ffffff);
    box-shadow: var(--shadow-sm);
}

/* Specific case where accent is too light (like in default dark mode) */
[data-theme="dark"] .store-locations__tab.is-active {
    color: var(--color-black-static, #000000);
}

.store-locations__tab.is-active .store-locations__tab-icon {
    opacity: 1;
    filter: brightness(0) invert(1);
}

[data-theme="dark"] .store-locations__tab.is-active .store-locations__tab-icon {
    filter: none;
}

/* Map Content Wrapper */
.store-locations__map-wrapper {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    height: 400px;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--color-border-light);
}

.store-locations__map-area {
    width: 100%;
    height: 100%;
    background-color: var(--color-surface);
}

.store-locations__map-item {
    display: none;
    width: 100%;
    height: 100%;
}

.store-locations__map-item.is-active {
    display: block;
}

.store-locations__map-item iframe {
    width: 100%;
    height: 100%;
    border: 0;
}

/* List Overlay - Floating on the map */
.store-locations__list-overlay {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 260px;
    bottom: 20px;
    z-index: 10;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

[dir="rtl"] .store-locations__list-overlay {
    right: auto;
    left: 20px;
}

.store-locations__list-overlay.is-collapsed {
    transform: translateX(calc(100% + 20px));
}

[dir="rtl"] .store-locations__list-overlay.is-collapsed {
    transform: translateX(calc(-100% - 20px));
}

/* Toggle Button */
.store-locations__toggle-btn {
    position: absolute;
    top: 20px;
    left: -40px;
    width: 40px;
    height: 40px;
    background: var(--color-card-bg, #ffffff);
    border: 1px solid var(--color-border-light);
    border-right: none;
    border-radius: var(--radius-md) 0 0 var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: -4px 0 8px rgba(0, 0, 0, 0.1);
    z-index: 11;
    pointer-events: auto;
}

[dir="rtl"] .store-locations__toggle-btn {
    left: auto;
    right: -40px;
    border-right: 1px solid var(--color-border-light);
    border-left: none;
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    box-shadow: 4px 0 8px rgba(0, 0, 0, 0.1);
}

.store-locations__toggle-btn .lucide-icon,
.store-locations__toggle-btn svg {
    width: 20px;
    height: 20px;
    color: var(--color-text);
}

.store-locations__toggle-btn .icon-open { display: none; }
.store-locations__toggle-btn .icon-close { display: block; }

.store-locations__list-overlay.is-collapsed .store-locations__toggle-btn .icon-open { display: block; }
.store-locations__list-overlay.is-collapsed .store-locations__toggle-btn .icon-close { display: none; }

[dir="rtl"] .store-locations__toggle-btn .icon-open { display: block; }
[dir="rtl"] .store-locations__toggle-btn .icon-close { display: none; }

[dir="rtl"] .store-locations__list-overlay.is-collapsed .store-locations__toggle-btn .icon-open { display: none; }
[dir="rtl"] .store-locations__list-overlay.is-collapsed .store-locations__toggle-btn .icon-close { display: block; }

.store-locations__list-area {
    height: 100%;
    display: flex;
    flex-direction: column;
    pointer-events: auto;
}

.store-locations__city-list {
    display: none;
    flex-direction: column;
    gap: 8px;
    height: 100%;
    overflow-y: auto;
    padding: 10px;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: var(--radius-lg);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

/* --- Dark Mode Specifics --- */
[data-theme="dark"] .store-locations__city-list {
    background: rgba(30, 30, 30, 0.85);
    border-color: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .store-locations__toggle-btn:hover {
    background: var(--color-surface-hover);
}

[data-theme="dark"] .store-locations__city-item:not(.is-active) {
    color: var(--color-text-muted);
}

[data-theme="dark"] .store-locations__city-item:not(.is-active):hover {
    background-color: rgba(255, 255, 255, 0.08);
}

[data-theme="dark"] .store-locations__city-item:not(.is-active):hover i {
    opacity: 1;
}

[data-theme="dark"] .store-locations__tabs {
    background-color: var(--color-surface);
    border-color: var(--color-border);
}

.store-locations__city-list.is-active {
    display: flex;
}

.store-locations__city-list::-webkit-scrollbar {
    width: 4px;
}

.store-locations__city-list::-webkit-scrollbar-thumb {
    background: var(--color-border);
    border-radius: 10px;
}

.store-locations__city-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    background-color: transparent;
    border: 1px solid transparent;
    border-radius: var(--radius-md);
    font-weight: var(--fw-semibold);
    color: var(--color-text);
    transition: all 0.2s ease;
    text-align: inherit;
    cursor: pointer;
}

.store-locations__city-item i {
    width: 18px;
    height: 18px;
    opacity: 0.5;
    flex-shrink: 0;
    transition: transform 0.2s ease;
}

.store-locations__city-item:not(.is-active):hover {
    background-color: rgba(0, 0, 0, 0.05);
}

.store-locations__city-item.is-active {
    background-color: var(--store-accent);
    color: var(--color-white-static, #ffffff);
    box-shadow: var(--shadow-sm);
}

[data-theme="dark"] .store-locations__city-item.is-active {
    color: var(--color-black-static, #000000);
}

.store-locations__city-item.is-active i {
    opacity: 1;
    color: inherit;
    transform: scale(1.1);
}

/* Mobile Adjustments */
@media (max-width: 991px) {
    .store-locations {
        padding-top: var(--spacing-md) !important;
        padding-bottom: var(--spacing-md) !important;
    }

    .store-locations__map-wrapper {
        height: auto;
        display: flex;
        flex-direction: column;
        border: none;
        box-shadow: none;
        overflow: visible;
    }

    .store-locations__map-area {
        height: 350px;
        order: 2;
        border-radius: var(--radius-md);
        overflow: hidden;
        border: 1px solid var(--color-border-light);
    }

    .store-locations__list-overlay {
        position: static;
        width: 100% !important;
        height: auto;
        order: 1;
        margin-bottom: 20px;
        transform: none !important;
    }

    .store-locations__toggle-btn {
        display: none;
    }

    [dir="rtl"] .store-locations__list-overlay {
        left: auto;
    }

    .store-locations__city-list {
        background: var(--color-card-bg);
        backdrop-filter: none;
        border: 1px solid var(--color-border-light);
        padding: 0;
        box-shadow: none;
        height: auto;
        overflow-y: visible;
    }

    [data-theme="dark"] .store-locations__city-list {
        background: var(--color-card-bg);
        border-color: var(--color-border);
    }
}

@media (max-width: 480px) {
    .store-locations__tab {
        padding: 8px 16px;
        font-size: var(--fs-sm);
    }
}

