/* Branch Selection Modal */
#modalBranchSelection .modal-content {
    border-radius: 16px;
    border: none;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
}

#modalBranchSelection .modal-dialog {
    margin-top: 30px;
    margin-bottom: 30px;
}

.branch-modal-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-color: var(--mds-color-main);
    color: #fff;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    cursor: pointer;
    opacity: 1;
    font-size: 14px;
    line-height: 1;
}

.branch-modal-close:hover {
    opacity: 0.9;
    color: #fff;
}

.branch-modal-header {
    text-align: center;
    margin-bottom: 20px;
}

.branch-modal-title {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 5px;
    color: #333;
}

.branch-modal-subtitle {
    font-size: 13px;
    color: #777;
    margin-bottom: 0;
}

.branch-modal-section {
    margin-bottom: 20px;
}

.branch-section-title {
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    color: #888;
    margin-bottom: 10px;
    letter-spacing: 0.3px;
}

.branch-cities,
.branch-branches {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.btn.btn-city,
.btn.btn-branch {
    border: 1px solid var(--mds-color-main);
    background-color: #fff;
    color: #333;
    border-radius: 20px;
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.btn.btn-city:hover,
.btn.btn-branch:hover,
.btn.btn-city.active,
.btn.btn-branch.active {
    background-color: var(--mds-color-main);
    color: #fff;
}

.btn.btn-branch:disabled,
.btn.btn-city:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.branch-branches-section {
    display: none;
}

.branch-branches-section.visible {
    display: block;
}

.branch-modal-empty {
    text-align: center;
    padding: 20px;
    color: #777;
    font-size: 14px;
}

/* Branch Selector in Header */
.branch-selector {
    display: inline-flex;
    align-items: center;
    cursor: pointer;
    padding: 4px 10px;
    border-radius: 8px;
    transition: background-color 0.2s ease;
    text-decoration: none;
    color: inherit;
    max-width: 160px;
    margin-left: 10px;
}

.branch-selector:hover {
    background-color: rgba(0, 0, 0, 0.04);
    text-decoration: none;
    color: inherit;
}

.branch-selector-text {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
    margin-right: 8px;
    text-align: left;
}

.branch-selector-label {
    font-size: 10px;
    color: #777;
    display: flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
}

.branch-selector-label .icon-arrow-down {
    font-size: 8px;
    color: var(--mds-color-main);
}

.branch-selector-name {
    font-size: 13px;
    font-weight: 600;
    color: #333;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 120px;
}

.branch-selector-icon {
    color: var(--mds-color-main);
    font-size: 18px;
    flex-shrink: 0;
}

/* Mobile Branch Selector */
.mobile-branch-selector {
    display: inline-flex;
    align-items: center;
    cursor: pointer;
    padding: 4px;
    color: #333;
    text-decoration: none;
    max-width: 160px;
}

.mobile-branch-selector:hover {
    text-decoration: none;
    color: #333;
}

.mobile-branch-selector-icon {
    color: var(--mds-color-main);
    font-size: 18px;
    margin-right: 6px;
    flex-shrink: 0;
}

.mobile-branch-selector-text {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
    text-align: left;
}

.mobile-branch-selector-label {
    font-size: 9px !important;
    color: #777;
    display: flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
}

.mobile-branch-selector-label .icon-arrow-down {
    font-size: 8px;
    color: var(--mds-color-main);
}

.mobile-branch-selector-name {
    font-size: 14px !important;
    font-weight: 600;
    color: #333;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 120px;
}

/* Mobile header adjustments */
@media (max-width: 991px) {
    .nav-mobile-header-container {
        flex-wrap: nowrap;
    }

    .flex-item-right {
        display: flex;
        align-items: center;
        gap: 8px;
    }

    .a-search-icon,
    .a-mobile-cart {
        display: none !important;
    }
}

/* Desktop adjustments */
@media (min-width: 992px) {
    .mobile-branch-selector {
        display: none;
    }
}

@media (max-width: 767px) {
    .branch-cities,
    .branch-branches {
        gap: 8px;
    }

    .btn.btn-city,
    .btn.btn-branch {
        padding: 6px 12px;
        font-size: 12px;
    }
}
