﻿/* Root Variables */
:root {
    --primary-blue: var(--primary-color);
    --primary-blue-hover: #1d4ed8;
    --light-gray: #f8f9fa;
    --medium-gray: #e9ecef;
    --dark-gray: #6c757d;
    --text-dark: #212529;
    --border-color: #dee2e6;
    --shadow-sm: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    --shadow-md: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

/* City Selector Styles */
.city-selector-container {
    background: white;
    padding: 20px 0 0;
    box-shadow: var(--shadow-sm);
    position: relative;
    z-index: 100;
}

.city-tabs-wrapper {
    overflow-x: auto;
    padding: 0 20px 20px;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

    .city-tabs-wrapper::-webkit-scrollbar {
        display: none;
    }

.city-tabs {
    display: flex;
    gap: 8px;
    min-width: fit-content;
    padding-bottom: 10px;
}

.city-tab {
    background: var(--medium-gray);
    border: none;
    padding: 12px 24px;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-dark);
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    position: relative;
}

    .city-tab:hover {
        background: var(--primary-blue);
        color: white;
        transform: translateY(-2px);
    }

    .city-tab.active {
        background: var(--primary-blue);
        color: var(--dark-color);
        box-shadow: var(--shadow-md);
    }

.city-indicator {
    height: 4px;
    background: var(--primary-blue);
    margin: 0 20px;
    border-radius: 2px;
}

/* Store Sidebar */
.stores-sidebar {
    height: 100%;
    background: white;
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
}

.stores-list {
    padding: 30px 25px;
    overflow-y: auto;
    max-height: 700px;
    height: 740px;
}

.store-card {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 25px;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
    cursor: pointer;
}

    .store-card:hover {
        box-shadow: var(--shadow-md);
        transform: translateY(-2px);
        border-color: var(--primary-blue);
    }

.store-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
}

.store-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--primary-blue);
    margin: 0 0 5px 0;
}

.store-name {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-dark);
    margin: 0 0 8px 0;
}

.store-address {
    font-size: 14px;
    color: var(--dark-gray);
    line-height: 1.4;
    margin-bottom: 20px;
}

.store-contact {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 25px;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text-dark);
    text-decoration: none;
    font-size: 14px;
    transition: color 0.2s ease;
}

    .contact-item:hover {
        color: var(--primary-blue);
    }

.contact-icon {
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--dark-gray);
    flex-shrink: 0;
}

.view-maps-btn {
    background: var(--primary-blue);
    color: var(--dark-color);
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

    .view-maps-btn:hover {
        background: var(--primary-blue-hover);
        transform: translateY(-1px);
        box-shadow: var(--shadow-md);
    }

/* Map Container */
.map-container {
    height: 100%;
    position: relative;
}

.map-wrapper {
    height: 100%;
    position: relative;
    background: var(--light-gray);
}

#alfalah_map {
    height: 100%;
    width: 100%;
    border-radius: 0;
}

.map-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10;
}

/* Custom Scrollbar */
.stores-list::-webkit-scrollbar {
    width: 6px;
}

.stores-list::-webkit-scrollbar-track {
    background: var(--light-gray);
}

.stores-list::-webkit-scrollbar-thumb {
    background: var(--medium-gray);
    border-radius: 3px;
}

    .stores-list::-webkit-scrollbar-thumb:hover {
        background: var(--dark-gray);
    }

/* Responsive Design */
@media (max-width: 991.98px) {
    .main-content {
        height: auto;
    }

    .stores-sidebar {
        height: auto;
        max-height: 50vh;
        border-right: none;
        border-bottom: 1px solid var(--border-color);
    }

    .stores-list {
        max-height: 40vh;
        height: auto;
    }

    .map-container {
        height: 50vh;
        min-height: 400px;
    }

    .stores-list {
        padding: 20px;
    }

    .store-card {
        padding: 20px;
        margin-bottom: 20px;
    }
}

@media (max-width: 575.98px) {
    .city-tabs-wrapper {
        padding: 0 15px 20px;
    }

    .city-tab {
        padding: 10px 16px;
        font-size: 13px;
    }

    .stores-list {
        padding: 15px;
    }

    .store-card {
        padding: 15px;
    }

    .store-title {
        font-size: 18px;
    }

    .store-name {
        font-size: 16px;
    }

    .map-container {
        height: 40vh;
        min-height: 300px;
    }
}

/* Animation Classes */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.slide-in {
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        transform: translateX(-20px);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Loading State */
.loading {
    opacity: 0.7;
    pointer-events: none;
}
